@envive-ai/react-hooks 0.3.23 → 0.3.24
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.
- package/dist/atoms/app/index.d.cts +7 -7
- package/dist/atoms/app/index.d.ts +7 -7
- package/dist/atoms/app/variant.d.cts +6 -6
- package/dist/atoms/chat/chatState.cjs +2 -2
- package/dist/atoms/chat/chatState.d.cts +20 -20
- package/dist/atoms/chat/chatState.d.ts +20 -20
- package/dist/atoms/chat/chatState.js +2 -2
- package/dist/atoms/chat/form.d.cts +3 -3
- package/dist/atoms/chat/form.d.ts +2 -2
- package/dist/atoms/chat/index.d.cts +1 -1
- package/dist/atoms/chat/lastMessage.d.cts +2 -2
- package/dist/atoms/chat/lastMessage.d.ts +2 -2
- package/dist/atoms/chat/messageQueue.d.ts +6 -6
- package/dist/atoms/chat/performanceMetrics.d.cts +6 -6
- package/dist/atoms/chat/performanceMetrics.d.ts +6 -6
- package/dist/atoms/chat/renderedWidgetRefs.d.ts +2 -2
- package/dist/atoms/chat/replies.d.cts +2 -2
- package/dist/atoms/chat/replies.d.ts +2 -2
- package/dist/atoms/chat/suggestions.d.cts +2 -2
- package/dist/atoms/chat/suggestions.d.ts +2 -2
- package/dist/atoms/envive/enviveConfig.d.cts +13 -13
- package/dist/atoms/envive/enviveConfig.d.ts +13 -13
- package/dist/atoms/globalSearch/globalSearch.d.cts +5 -5
- package/dist/atoms/org/customerService.d.cts +6 -6
- package/dist/atoms/org/customerService.d.ts +6 -6
- package/dist/atoms/org/graphqlConfig.d.cts +4 -4
- package/dist/atoms/org/graphqlConfig.d.ts +4 -4
- package/dist/atoms/org/newOrgConfigAtom.d.cts +2 -2
- package/dist/atoms/org/newOrgConfigAtom.d.ts +2 -2
- package/dist/atoms/org/orgAnalyticsConfig.d.cts +5 -5
- package/dist/atoms/org/orgAnalyticsConfig.d.ts +5 -5
- package/dist/atoms/search/chatSearch.d.cts +17 -17
- package/dist/atoms/search/chatSearch.d.ts +17 -17
- package/dist/atoms/search/searchAPI.d.cts +13 -13
- package/dist/atoms/search/searchAPI.d.ts +13 -13
- package/dist/atoms/search/types.d.ts +1 -1
- package/dist/atoms/search/utils.d.ts +1 -1
- package/dist/atoms/widget/chatPreviewLoading.d.cts +2 -2
- package/dist/atoms/widget/chatPreviewLoading.d.ts +2 -2
- package/dist/contexts/enviveContext/enviveContext.cjs +3 -3
- package/dist/contexts/enviveContext/enviveContext.js +3 -3
- package/dist/contexts/graphqlContext/graphqlContext.cjs +4 -4
- package/dist/contexts/graphqlContext/graphqlContext.js +4 -4
- package/dist/contexts/types.d.cts +1 -1
- package/dist/contexts/types.d.ts +1 -1
- package/dist/contexts/typesV3.d.cts +1 -1
- package/dist/hooks/GrabAndScroll/useGrabAndScroll.d.cts +2 -2
- package/dist/hooks/Search/useSearchInput.cjs +1 -1
- package/dist/hooks/Search/useSearchInput.js +1 -1
- package/dist/hooks/utils.d.cts +1 -1
- package/package.json +1 -1
- package/src/atoms/chat/chatState.ts +1 -1
- package/src/contexts/graphqlContext/graphqlContext.tsx +6 -8
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@ export const initializedAtom = atom<boolean>(false);
|
|
|
26
26
|
export const chatIsOpenAtom = atom<boolean>(false);
|
|
27
27
|
export const requestFailureAtom = atom<boolean>(false);
|
|
28
28
|
export const formSubmitAtom = atom<FormSubmittedAttributes>();
|
|
29
|
-
export const listeningToSpeechAtom = atom<
|
|
29
|
+
export const listeningToSpeechAtom = atom<'start' | 'stop' | 'abort' | undefined>(undefined);
|
|
30
30
|
export const chatOnToggleAtom = atom(
|
|
31
31
|
null,
|
|
32
32
|
(
|
|
@@ -254,21 +254,19 @@ export const GraphQLProvider = ({
|
|
|
254
254
|
const isSemanticColors = !window.location.href.includes('globals=merchant');
|
|
255
255
|
const isStorybook = window.top?.location.href.includes('?path=');
|
|
256
256
|
|
|
257
|
-
// If
|
|
258
|
-
if (
|
|
257
|
+
// If no v3 colors are found, return the default mock config to allow unconfigured merchants to work by default
|
|
258
|
+
if (!v3RootConfig?.colors || (isStorybook && isSemanticColors)) {
|
|
259
259
|
logger.logDebug('GraphQLContext | Returning mock v3 config', {
|
|
260
|
-
colorsConfig: mockV3ColorsConfig
|
|
260
|
+
colorsConfig: mockV3ColorsConfig,
|
|
261
261
|
frontendConfig: mockV3FrontendConfig as FrontendConfigV3Response,
|
|
262
262
|
});
|
|
263
263
|
const colorsConfig = mockV3ColorsConfig;
|
|
264
264
|
const frontendConfig = mockV3FrontendConfig;
|
|
265
265
|
return {
|
|
266
|
-
colorsConfig
|
|
267
|
-
? (colorsConfig as ColorsConfigV3Response)
|
|
268
|
-
: (v3ColorsConfig as ColorsConfigV3Response),
|
|
266
|
+
colorsConfig,
|
|
269
267
|
frontendConfig: frontendConfig as FrontendConfigV3Response,
|
|
270
268
|
orgPageConfig: {
|
|
271
|
-
pageVariants:
|
|
269
|
+
pageVariants: DEFAULT_PAGE_VARIANTS,
|
|
272
270
|
widgetConfigs: {},
|
|
273
271
|
mountingConfigs: {},
|
|
274
272
|
},
|
|
@@ -277,7 +275,7 @@ export const GraphQLProvider = ({
|
|
|
277
275
|
|
|
278
276
|
logger.logDebug('GraphQLContext | Returning v3 config', {
|
|
279
277
|
colorsConfig: v3ColorsConfig as ColorsConfigV3Response,
|
|
280
|
-
frontendConfig: v3FrontendConfig
|
|
278
|
+
frontendConfig: v3FrontendConfig,
|
|
281
279
|
orgPageConfig: {
|
|
282
280
|
pageVariants: v3pageVariants,
|
|
283
281
|
widgetConfigs: v3WidgetConfigs,
|