@envive-ai/react-widgets-v3 0.3.9 → 0.3.11
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/_virtual/rolldown_runtime.cjs +2 -0
- package/dist/debug/GenericSelect.cjs +167 -0
- package/dist/debug/GenericSelect.js +165 -0
- package/dist/debug/MessageContent.cjs +151 -0
- package/dist/debug/MessageContent.js +149 -0
- package/dist/debug/chatEmbed.cjs +95 -0
- package/dist/debug/chatEmbed.js +92 -0
- package/dist/debug/debugBar.cjs +18 -0
- package/dist/debug/debugBar.js +17 -0
- package/dist/debug/reportIssue.cjs +528 -0
- package/dist/debug/reportIssue.js +524 -0
- package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
- package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/CustomerServiceApi.cjs +265 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/DefaultApi.cjs +591 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/InferenceApi.cjs +265 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/ProductsApi.cjs +105 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/SearchApi.cjs +229 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/index.cjs +43 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/index.cjs +39 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddNoteToLatestConversationRequest.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddNoteToLatestConversationResponse.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddToCartAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AnalyticsIdentifyRequest.cjs +86 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AnalyticsTrackEventRequest.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AttachmentRequest.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AutoForm.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Context.cjs +89 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ConversationStatus.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CreateConversationRequest.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CreateConversationResponse.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceAttachment.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceConversation.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceConversationMessages.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceCustomer.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceMessage.cjs +85 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustomerServiceProvider.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormResponseAttributes.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormResponseAttributesFormCategory.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormSubmittedAttributes.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormType.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FulfillmentDisplayStatus.cjs +84 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/GenerationParams.cjs +74 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/GetConversationMessagesRequest.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/IsBusinessHoursRequest.cjs +54 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/IsBusinessHoursResponse.cjs +59 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/LabelValue.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ManualForm.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRule.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleAction.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleActionAttribute.cjs +58 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleActionType.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleCondition.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleOp.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleStatus.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/NextMessageRequest.cjs +78 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrderItemInfo.cjs +78 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrderResponseAttributes.cjs +71 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Organization.cjs +83 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationConfig.cjs +82 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationConfigResults.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationSettings.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PDPAttributes.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributeCategory.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributes.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributesAttributes.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPIdAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPUrlAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PageVisitAttributes.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PageVisitCategory.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductRetrievalRequest.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductRetrievalResponse.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchFilterResponseAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchRequest.cjs +71 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponse.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponseAttributes.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponseV2.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/QueryTypedAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ReportContent.cjs +59 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ReportSessionRequest.cjs +99 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Response.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ResponseCategory.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ResponseProductAttributes.cjs +91 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchAttributes.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchResponseProduct.cjs +93 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchSuggestionsResponse.cjs +58 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SendMessageRequest.cjs +71 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SendMessageResponse.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/StatsigExperiment.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/StatsigFeatureGate.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Suggestion.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SuggestionCategory.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SuggestionClickedAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventProductCategory.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventRequest.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventResponse.cjs +78 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/TurnInfo.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/TurnInfoPrevUserEvent.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingGenericConfig.cjs +52 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingPDPConfig.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingPLPConfig.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingRequest.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingResponse.cjs +73 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingResponseSpecificDetails.cjs +59 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingType.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEvent.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEventAttributes.cjs +75 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEventCategory.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/V1GetSessionMessages200Response.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/V1SearchExplainGet200Response.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetString.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetTextRequest.cjs +73 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetTextResponse.cjs +66 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetType.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/index.cjs +221 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/runtime.cjs +324 -0
- package/dist/node_modules/react-icons/fa/index.cjs +65 -0
- package/dist/node_modules/react-icons/fa/index.js +61 -0
- package/dist/node_modules/react-icons/lib/iconBase.cjs +121 -0
- package/dist/node_modules/react-icons/lib/iconBase.js +119 -0
- package/dist/node_modules/react-icons/lib/iconContext.cjs +17 -0
- package/dist/node_modules/react-icons/lib/iconContext.js +14 -0
- package/dist/packages/icons/dist/IconCloseVariant.cjs +22 -0
- package/dist/packages/icons/dist/IconCloseVariant.js +22 -0
- package/dist/packages/icons/dist/_virtual/rolldown_runtime.cjs +27 -0
- package/dist/packages/icons/dist/_virtual/rolldown_runtime.js +25 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +696 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.js +696 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +43 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +43 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.cjs +1528 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.js +1528 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.cjs +329 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.js +329 -0
- package/dist/packages/icons/dist/node_modules/react/index.cjs +13 -0
- package/dist/packages/icons/dist/node_modules/react/index.js +13 -0
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.cjs +13 -0
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.js +13 -0
- package/dist/{widgets → packages/widgets}/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
- package/dist/{widgets → packages/widgets}/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +1 -1
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +2 -0
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +2 -0
- package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.cjs +4 -1
- package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.js +5 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.cjs +31 -0
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +15 -0
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +15 -0
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.js +30 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.cjs +3 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.d.cts +2 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.d.ts +2 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.js +3 -0
- package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +2 -1
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.js +2 -1
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +2 -1
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +2 -1
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +26 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +27 -3
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.cjs +1 -1
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.js +1 -1
- package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +4 -2
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.js +4 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +2 -1
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +2 -1
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.cjs +1 -1
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.js +1 -1
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +2 -1
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +2 -1
- package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
- package/dist/widgets-v2/SearchResults/index.d.ts +3 -3
- package/dist/widgets-v2/SearchZeroState/index.d.ts +4 -4
- package/dist/widgets-v2/SuggestionBar/index.d.ts +3 -3
- package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +2 -2
- package/package.json +5 -1
- package/src/debug/GenericSelect.tsx +236 -0
- package/src/debug/MessageContent.tsx +248 -0
- package/src/debug/chatEmbed.tsx +119 -0
- package/src/debug/debugBar.tsx +13 -0
- package/src/debug/reportIssue.tsx +649 -0
- package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +6 -0
- package/src/stories/FullPageSalesAgentWidget.stories.tsx +68 -0
- package/src/stories/SalesAgentTest/SalesAgentTest.tsx +10 -2
- package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +2 -0
- package/src/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.ts +11 -5
- package/src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.tsx +46 -0
- package/src/widgets/FullPageSalesAgentWidget/index.ts +1 -0
- package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +5 -1
- package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +6 -1
- package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +31 -2
- package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +10 -2
- package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +5 -1
- package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +5 -1
- /package/dist/{widgets → packages/widgets}/dist/SearchResults/SearchResults.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchResults/index.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchResults/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/SearchZeroState.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/index.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/SuggestionBar.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/index.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionButtonContainer/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/config/BaseWidgetConfig.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/config/WidgetType.d.ts +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_ChatPreviewLoadingWidget = require('../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.cjs');
|
|
3
3
|
const require_ChatPreviewComparisonWidget = require('../ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs');
|
|
4
|
-
const require_useGetWidgetStatus = require('../hooks/useGetWidgetStatus.cjs');
|
|
5
4
|
const require_ChatPreviewWidget = require('../ChatPreviewWidget/ChatPreviewWidget.cjs');
|
|
5
|
+
const require_useGetWidgetStatus = require('../hooks/useGetWidgetStatus.cjs');
|
|
6
6
|
const require_SocialProofWidget = require('../SocialProofWidget/SocialProofWidget.cjs');
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts
|
|
4
4
|
interface SocialProofFlowWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface SocialProofFlowWidgetProps {
|
|
|
7
7
|
declare const SocialProofFlowWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: SocialProofFlowWidgetProps):
|
|
10
|
+
}: SocialProofFlowWidgetProps): react_jsx_runtime9.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChatPreviewLoadingWidgetWithBaseWidget } from "../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js";
|
|
2
2
|
import { ChatPreviewComparisonWidgetWithBaseWidget } from "../ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js";
|
|
3
|
-
import useGetWidgetStatus_default from "../hooks/useGetWidgetStatus.js";
|
|
4
3
|
import { ChatPreviewWidgetWithBaseWidget } from "../ChatPreviewWidget/ChatPreviewWidget.js";
|
|
4
|
+
import useGetWidgetStatus_default from "../hooks/useGetWidgetStatus.js";
|
|
5
5
|
import { SocialProofWidgetWithBaseWidget } from "../SocialProofWidget/SocialProofWidget.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
@@ -68,14 +68,16 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
68
68
|
const handlePrimaryButtonClick = (0, react.useCallback)((text) => {
|
|
69
69
|
onTypedMessageSubmitted({
|
|
70
70
|
query: text,
|
|
71
|
-
userTyped: false
|
|
71
|
+
userTyped: false,
|
|
72
|
+
displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON
|
|
72
73
|
});
|
|
73
74
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON);
|
|
74
75
|
}, [onTypedMessageSubmitted, openChat]);
|
|
75
76
|
const handleSecondaryButtonClick = (0, react.useCallback)((text) => {
|
|
76
77
|
onTypedMessageSubmitted({
|
|
77
78
|
query: text,
|
|
78
|
-
userTyped: false
|
|
79
|
+
userTyped: false,
|
|
80
|
+
displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON
|
|
79
81
|
});
|
|
80
82
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON);
|
|
81
83
|
}, [onTypedMessageSubmitted, openChat]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/SocialProofWidget/SocialProofWidget.d.ts
|
|
5
5
|
declare const SocialProofWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime18.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface SocialProofWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface SocialProofWidgetProps {
|
|
|
12
12
|
declare const SocialProofWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: SocialProofWidgetProps):
|
|
15
|
+
}: SocialProofWidgetProps): react_jsx_runtime18.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/SocialProofWidget/SocialProofWidget.d.ts
|
|
5
5
|
declare const SocialProofWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime0.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface SocialProofWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface SocialProofWidgetProps {
|
|
|
12
12
|
declare const SocialProofWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: SocialProofWidgetProps):
|
|
15
|
+
}: SocialProofWidgetProps): react_jsx_runtime0.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -67,14 +67,16 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
67
67
|
const handlePrimaryButtonClick = useCallback((text) => {
|
|
68
68
|
onTypedMessageSubmitted({
|
|
69
69
|
query: text,
|
|
70
|
-
userTyped: false
|
|
70
|
+
userTyped: false,
|
|
71
|
+
displayLocation: ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON
|
|
71
72
|
});
|
|
72
73
|
openChat(ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON);
|
|
73
74
|
}, [onTypedMessageSubmitted, openChat]);
|
|
74
75
|
const handleSecondaryButtonClick = useCallback((text) => {
|
|
75
76
|
onTypedMessageSubmitted({
|
|
76
77
|
query: text,
|
|
77
|
-
userTyped: false
|
|
78
|
+
userTyped: false,
|
|
79
|
+
displayLocation: ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON
|
|
78
80
|
});
|
|
79
81
|
openChat(ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON);
|
|
80
82
|
}, [onTypedMessageSubmitted, openChat]);
|
|
@@ -58,7 +58,8 @@ const TitledPromptCarouselWidgetHandler = (props) => {
|
|
|
58
58
|
handleButtonClick: (0, react.useCallback)((text) => {
|
|
59
59
|
onTypedMessageSubmitted({
|
|
60
60
|
query: text,
|
|
61
|
-
userTyped: false
|
|
61
|
+
userTyped: false,
|
|
62
|
+
displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL
|
|
62
63
|
});
|
|
63
64
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL);
|
|
64
65
|
}, [onTypedMessageSubmitted, openChat]),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts
|
|
4
4
|
interface TitledPromptCarouselWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface TitledPromptCarouselWidgetProps {
|
|
|
7
7
|
declare const TitledPromptCarouselWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: TitledPromptCarouselWidgetProps):
|
|
10
|
+
}: TitledPromptCarouselWidgetProps): react_jsx_runtime17.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts
|
|
4
4
|
interface TitledPromptCarouselWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface TitledPromptCarouselWidgetProps {
|
|
|
7
7
|
declare const TitledPromptCarouselWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: TitledPromptCarouselWidgetProps):
|
|
10
|
+
}: TitledPromptCarouselWidgetProps): react_jsx_runtime5.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -57,7 +57,8 @@ const TitledPromptCarouselWidgetHandler = (props) => {
|
|
|
57
57
|
handleButtonClick: useCallback((text) => {
|
|
58
58
|
onTypedMessageSubmitted({
|
|
59
59
|
query: text,
|
|
60
|
-
userTyped: false
|
|
60
|
+
userTyped: false,
|
|
61
|
+
displayLocation: ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL
|
|
61
62
|
});
|
|
62
63
|
openChat(ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL);
|
|
63
64
|
}, [onTypedMessageSubmitted, openChat]),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_ChatPreviewLoadingWidget = require('../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.cjs');
|
|
3
3
|
const require_ChatPreviewComparisonWidget = require('../ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs');
|
|
4
|
-
const require_useGetWidgetStatus = require('../hooks/useGetWidgetStatus.cjs');
|
|
5
4
|
const require_ChatPreviewWidget = require('../ChatPreviewWidget/ChatPreviewWidget.cjs');
|
|
5
|
+
const require_useGetWidgetStatus = require('../hooks/useGetWidgetStatus.cjs');
|
|
6
6
|
const require_TypingAnimationWidget = require('../TypingAnimationWidget/TypingAnimationWidget.cjs');
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts
|
|
4
4
|
interface TypingAnimationFlowWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface TypingAnimationFlowWidgetProps {
|
|
|
7
7
|
declare const TypingAnimationFlowWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: TypingAnimationFlowWidgetProps):
|
|
10
|
+
}: TypingAnimationFlowWidgetProps): react_jsx_runtime6.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts
|
|
4
4
|
interface TypingAnimationFlowWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface TypingAnimationFlowWidgetProps {
|
|
|
7
7
|
declare const TypingAnimationFlowWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: TypingAnimationFlowWidgetProps):
|
|
10
|
+
}: TypingAnimationFlowWidgetProps): react_jsx_runtime4.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChatPreviewLoadingWidgetWithBaseWidget } from "../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js";
|
|
2
2
|
import { ChatPreviewComparisonWidgetWithBaseWidget } from "../ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js";
|
|
3
|
-
import useGetWidgetStatus_default from "../hooks/useGetWidgetStatus.js";
|
|
4
3
|
import { ChatPreviewWidgetWithBaseWidget } from "../ChatPreviewWidget/ChatPreviewWidget.js";
|
|
4
|
+
import useGetWidgetStatus_default from "../hooks/useGetWidgetStatus.js";
|
|
5
5
|
import { TypingAnimationWithBaseWidget } from "../TypingAnimationWidget/TypingAnimationWidget.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
@@ -56,7 +56,8 @@ const TypingAnimationWidgetHandler = (props) => {
|
|
|
56
56
|
const handleButtonClick = (0, react.useCallback)((text) => {
|
|
57
57
|
onTypedMessageSubmitted({
|
|
58
58
|
query: text,
|
|
59
|
-
userTyped: false
|
|
59
|
+
userTyped: false,
|
|
60
|
+
displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TYPING_ANIMATION
|
|
60
61
|
});
|
|
61
62
|
onToggle(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TYPING_ANIMATION);
|
|
62
63
|
}, [onTypedMessageSubmitted, onToggle]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts
|
|
5
5
|
declare const TypingAnimationWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime0.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface TypingAnimationWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface TypingAnimationWidgetProps {
|
|
|
12
12
|
declare const TypingAnimationWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: TypingAnimationWidgetProps):
|
|
15
|
+
}: TypingAnimationWidgetProps): react_jsx_runtime0.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts
|
|
5
5
|
declare const TypingAnimationWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime2.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface TypingAnimationWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface TypingAnimationWidgetProps {
|
|
|
12
12
|
declare const TypingAnimationWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: TypingAnimationWidgetProps):
|
|
15
|
+
}: TypingAnimationWidgetProps): react_jsx_runtime2.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -55,7 +55,8 @@ const TypingAnimationWidgetHandler = (props) => {
|
|
|
55
55
|
const handleButtonClick = useCallback((text) => {
|
|
56
56
|
onTypedMessageSubmitted({
|
|
57
57
|
query: text,
|
|
58
|
-
userTyped: false
|
|
58
|
+
userTyped: false,
|
|
59
|
+
displayLocation: ChatElementDisplayLocationV3.TYPING_ANIMATION
|
|
59
60
|
});
|
|
60
61
|
onToggle(ChatElementDisplayLocationV3.TYPING_ANIMATION);
|
|
61
62
|
}, [onTypedMessageSubmitted, onToggle]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region ../widgets/dist/SearchResults/SearchResultsWidget.d.ts
|
|
4
4
|
//#region src/SearchResults/SearchResultsWidget.d.ts
|
|
5
|
-
declare const SearchResultsWidget: () =>
|
|
5
|
+
declare const SearchResultsWidget: () => react_jsx_runtime2.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region ../widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts
|
|
4
4
|
//#region src/SearchZeroState/SearchZeroStateWidget.d.ts
|
|
@@ -11,7 +11,7 @@ declare const SearchZeroStateWidget: ({
|
|
|
11
11
|
initialIsOpen,
|
|
12
12
|
widgetConfigId,
|
|
13
13
|
entryPointRef
|
|
14
|
-
}: SearchZeroStateWidgetProps) =>
|
|
14
|
+
}: SearchZeroStateWidgetProps) => react_jsx_runtime0.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SearchResultsWidget } from "../../widgets/dist/SearchResults/SearchResultsWidget.js";
|
|
2
|
-
import { SearchResults } from "../../widgets/dist/SearchResults/SearchResults.js";
|
|
3
|
-
import "../../widgets/dist/SearchResults/index.js";
|
|
1
|
+
import { SearchResultsWidget } from "../../packages/widgets/dist/SearchResults/SearchResultsWidget.js";
|
|
2
|
+
import { SearchResults } from "../../packages/widgets/dist/SearchResults/SearchResults.js";
|
|
3
|
+
import "../../packages/widgets/dist/SearchResults/index.js";
|
|
4
4
|
export { SearchResults, SearchResultsWidget };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SearchEntryPointWidgetConfig, SearchInputVariant, SearchZeroStateProps } from "../../widgets/dist/SearchZeroState/types.js";
|
|
2
|
-
import { SearchZeroState } from "../../widgets/dist/SearchZeroState/SearchZeroState.js";
|
|
3
|
-
import { SearchZeroStateWidget } from "../../widgets/dist/SearchZeroState/SearchZeroStateWidget.js";
|
|
4
|
-
import "../../widgets/dist/SearchZeroState/index.js";
|
|
1
|
+
import { SearchEntryPointWidgetConfig, SearchInputVariant, SearchZeroStateProps } from "../../packages/widgets/dist/SearchZeroState/types.js";
|
|
2
|
+
import { SearchZeroState } from "../../packages/widgets/dist/SearchZeroState/SearchZeroState.js";
|
|
3
|
+
import { SearchZeroStateWidget } from "../../packages/widgets/dist/SearchZeroState/SearchZeroStateWidget.js";
|
|
4
|
+
import "../../packages/widgets/dist/SearchZeroState/index.js";
|
|
5
5
|
export { SearchEntryPointWidgetConfig, SearchInputVariant, SearchZeroState, SearchZeroStateProps, SearchZeroStateWidget };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SuggestionBarLocationForMetrics } from "../../widgets/dist/SuggestionBar/types.js";
|
|
2
|
-
import { SuggestionBar } from "../../widgets/dist/SuggestionBar/SuggestionBar.js";
|
|
3
|
-
import "../../widgets/dist/SuggestionBar/index.js";
|
|
1
|
+
import { SuggestionBarLocationForMetrics } from "../../packages/widgets/dist/SuggestionBar/types.js";
|
|
2
|
+
import { SuggestionBar } from "../../packages/widgets/dist/SuggestionBar/SuggestionBar.js";
|
|
3
|
+
import "../../packages/widgets/dist/SuggestionBar/index.js";
|
|
4
4
|
export { SuggestionBar, SuggestionBarLocationForMetrics };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SuggestionButtonContainerProps } from "../../widgets/dist/SuggestionButtonContainer/types.js";
|
|
2
|
-
import { SuggestionButtonContainer } from "../../widgets/dist/SuggestionButtonContainer/SuggestionButtonContainer.js";
|
|
1
|
+
import { SuggestionButtonContainerProps } from "../../packages/widgets/dist/SuggestionButtonContainer/types.js";
|
|
2
|
+
import { SuggestionButtonContainer } from "../../packages/widgets/dist/SuggestionButtonContainer/SuggestionButtonContainer.js";
|
|
3
3
|
export { SuggestionButtonContainer, SuggestionButtonContainerProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envive-ai/react-widgets-v3",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"description": "React widget library v3 for Envive services.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -120,6 +120,10 @@
|
|
|
120
120
|
"import": "./dist/widgets/FloatingChatWidget/index.js",
|
|
121
121
|
"require": "./dist/widgets/FloatingChatWidget/index.cjs"
|
|
122
122
|
},
|
|
123
|
+
"./widgets/FullPageSalesAgentWidget": {
|
|
124
|
+
"import": "./dist/widgets/FullPageSalesAgentWidget/index.js",
|
|
125
|
+
"require": "./dist/widgets/FullPageSalesAgentWidget/index.cjs"
|
|
126
|
+
},
|
|
123
127
|
"./widgets/ProductCardWidget": {
|
|
124
128
|
"import": "./dist/widgets/ProductCardWidget/index.js",
|
|
125
129
|
"require": "./dist/widgets/ProductCardWidget/index.cjs"
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import React, { CSSProperties, useRef, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
type SelectType = 'priority';
|
|
4
|
+
|
|
5
|
+
interface CategorySkillItem {
|
|
6
|
+
icon: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface ChipItem {
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
type DictionaryItem = CategorySkillItem | ChipItem;
|
|
15
|
+
type Dictionary = Record<string, DictionaryItem>;
|
|
16
|
+
|
|
17
|
+
const dictionaries: Record<SelectType, Dictionary> = {
|
|
18
|
+
priority: {
|
|
19
|
+
p0: { label: 'Urgent' },
|
|
20
|
+
p1: { label: 'High' },
|
|
21
|
+
p2: { label: 'Medium' },
|
|
22
|
+
p3: { label: 'Low' },
|
|
23
|
+
'no priority': { label: 'No Priority' },
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// Inline styles for Shadow DOM compatibility
|
|
28
|
+
const styles: Record<string, CSSProperties> = {
|
|
29
|
+
button: {
|
|
30
|
+
display: 'flex',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
gap: '0.5rem',
|
|
33
|
+
fontSize: '0.75rem',
|
|
34
|
+
backgroundColor: 'transparent',
|
|
35
|
+
padding: '0.375rem 0.75rem',
|
|
36
|
+
borderRadius: '0.375rem',
|
|
37
|
+
cursor: 'pointer',
|
|
38
|
+
outline: 'none',
|
|
39
|
+
border: 'none',
|
|
40
|
+
},
|
|
41
|
+
buttonHover: {
|
|
42
|
+
backgroundColor: '#f9fafb',
|
|
43
|
+
},
|
|
44
|
+
dropdown: {
|
|
45
|
+
position: 'absolute',
|
|
46
|
+
left: '0',
|
|
47
|
+
zIndex: 10,
|
|
48
|
+
marginTop: '4px',
|
|
49
|
+
borderRadius: '8px',
|
|
50
|
+
width: '125px',
|
|
51
|
+
backgroundColor: 'white',
|
|
52
|
+
boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
|
|
53
|
+
border: '1px solid rgba(0, 0, 0, 0.05)',
|
|
54
|
+
},
|
|
55
|
+
dropdownItem: {
|
|
56
|
+
display: 'flex',
|
|
57
|
+
width: '100%',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
padding: '4px 8px',
|
|
60
|
+
fontSize: '12px',
|
|
61
|
+
cursor: 'pointer',
|
|
62
|
+
border: 'none',
|
|
63
|
+
backgroundColor: 'transparent',
|
|
64
|
+
textAlign: 'left',
|
|
65
|
+
},
|
|
66
|
+
dropdownItemHover: {
|
|
67
|
+
backgroundColor: '#EBEEF6',
|
|
68
|
+
},
|
|
69
|
+
container: {
|
|
70
|
+
marginLeft: '-1rem',
|
|
71
|
+
position: 'relative',
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// Badge style generator function
|
|
76
|
+
const getBadgeStyles = (variant?: string): CSSProperties => {
|
|
77
|
+
let backgroundColor;
|
|
78
|
+
let textColor;
|
|
79
|
+
|
|
80
|
+
switch (variant) {
|
|
81
|
+
case 'p0':
|
|
82
|
+
backgroundColor = '#940F24';
|
|
83
|
+
textColor = '#F9E8EA';
|
|
84
|
+
break;
|
|
85
|
+
case 'p1':
|
|
86
|
+
backgroundColor = '#F9E8EA';
|
|
87
|
+
textColor = '#940F24';
|
|
88
|
+
break;
|
|
89
|
+
case 'p2':
|
|
90
|
+
backgroundColor = '#FEEBCB';
|
|
91
|
+
textColor = '#C05621';
|
|
92
|
+
break;
|
|
93
|
+
case 'p3':
|
|
94
|
+
backgroundColor = '#E6F6F4';
|
|
95
|
+
textColor = '#007F6D';
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
backgroundColor = '#EBEEF6';
|
|
99
|
+
textColor = '#3C57AA';
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Using fixed medium size values
|
|
103
|
+
return {
|
|
104
|
+
display: 'inline-flex',
|
|
105
|
+
borderRadius: '4px',
|
|
106
|
+
backgroundColor,
|
|
107
|
+
color: textColor,
|
|
108
|
+
fontSize: '0.875rem',
|
|
109
|
+
paddingLeft: '0.625rem',
|
|
110
|
+
paddingRight: '0.625rem',
|
|
111
|
+
paddingTop: '0.25rem',
|
|
112
|
+
paddingBottom: '0.25rem',
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
interface SelectProps {
|
|
117
|
+
type: SelectType;
|
|
118
|
+
selectedKey: string;
|
|
119
|
+
onSelect?: (key: string) => void;
|
|
120
|
+
buttonStyle?: CSSProperties;
|
|
121
|
+
menuStyle?: CSSProperties;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function GenericSelect({
|
|
125
|
+
type,
|
|
126
|
+
selectedKey,
|
|
127
|
+
onSelect,
|
|
128
|
+
buttonStyle = {},
|
|
129
|
+
menuStyle = {},
|
|
130
|
+
}: Readonly<SelectProps>) {
|
|
131
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
132
|
+
const [isHovering, setIsHovering] = useState<string | null>(null);
|
|
133
|
+
const menuRef = useRef<HTMLDivElement>(null);
|
|
134
|
+
const dictionary = dictionaries[type];
|
|
135
|
+
|
|
136
|
+
const renderItem = (key: string, item: DictionaryItem) => {
|
|
137
|
+
const chipItem = item as ChipItem;
|
|
138
|
+
const badgeStyles = getBadgeStyles(key);
|
|
139
|
+
|
|
140
|
+
return <span style={badgeStyles}>{chipItem.label}</span>;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// Close menu when clicking outside
|
|
144
|
+
React.useEffect(() => {
|
|
145
|
+
const handleClickOutside = (event: MouseEvent) => {
|
|
146
|
+
// Check if the click target is within our menu ref
|
|
147
|
+
const isOutside = menuRef.current && !menuRef.current.contains(event.target as Node);
|
|
148
|
+
|
|
149
|
+
// Also check the event path (for Shadow DOM compatibility)
|
|
150
|
+
const path = event.composedPath ? event.composedPath() : [];
|
|
151
|
+
const isInPath = menuRef.current && path.includes(menuRef.current);
|
|
152
|
+
|
|
153
|
+
// Only close if truly outside (not in the path)
|
|
154
|
+
if (isOutside && !isInPath) {
|
|
155
|
+
setIsOpen(false);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
document.addEventListener('mouseup', handleClickOutside, true);
|
|
160
|
+
|
|
161
|
+
return () => {
|
|
162
|
+
document.removeEventListener('mouseup', handleClickOutside, true);
|
|
163
|
+
};
|
|
164
|
+
}, [isOpen]);
|
|
165
|
+
|
|
166
|
+
if (!dictionary) {
|
|
167
|
+
console.error(`Invalid type "${type}".`);
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
<div
|
|
173
|
+
style={styles.container}
|
|
174
|
+
ref={menuRef}
|
|
175
|
+
>
|
|
176
|
+
<button
|
|
177
|
+
type="button"
|
|
178
|
+
style={{
|
|
179
|
+
...styles.button,
|
|
180
|
+
...(isHovering === 'button' ? styles.buttonHover : {}),
|
|
181
|
+
...buttonStyle,
|
|
182
|
+
}}
|
|
183
|
+
onClick={() => {
|
|
184
|
+
setIsOpen(!isOpen);
|
|
185
|
+
}}
|
|
186
|
+
onMouseEnter={() => setIsHovering('button')}
|
|
187
|
+
onMouseLeave={() => setIsHovering(null)}
|
|
188
|
+
>
|
|
189
|
+
{dictionary[selectedKey] ? (
|
|
190
|
+
renderItem(selectedKey, dictionary[selectedKey])
|
|
191
|
+
) : (
|
|
192
|
+
<span
|
|
193
|
+
style={{ color: '#6b7280' }}
|
|
194
|
+
>{`Select ${type.charAt(0).toUpperCase() + type.slice(1)}`}</span>
|
|
195
|
+
)}
|
|
196
|
+
</button>
|
|
197
|
+
|
|
198
|
+
{isOpen && (
|
|
199
|
+
<div
|
|
200
|
+
style={{
|
|
201
|
+
...styles.dropdown,
|
|
202
|
+
...menuStyle,
|
|
203
|
+
}}
|
|
204
|
+
>
|
|
205
|
+
<div style={{ padding: '0.25rem 0' }}>
|
|
206
|
+
{Object.entries(dictionary)
|
|
207
|
+
.filter(([key]) => key !== selectedKey)
|
|
208
|
+
.map(([key, item]) => (
|
|
209
|
+
<button
|
|
210
|
+
type="button"
|
|
211
|
+
key={key}
|
|
212
|
+
style={{
|
|
213
|
+
...styles.dropdownItem,
|
|
214
|
+
...(isHovering === key ? styles.dropdownItemHover : {}),
|
|
215
|
+
}}
|
|
216
|
+
onMouseEnter={() => setIsHovering(key)}
|
|
217
|
+
onMouseLeave={() => setIsHovering(null)}
|
|
218
|
+
onClick={e => {
|
|
219
|
+
// Stop event propagation to prevent handleClickOutside from firing
|
|
220
|
+
e.stopPropagation();
|
|
221
|
+
|
|
222
|
+
if (onSelect) {
|
|
223
|
+
onSelect(key);
|
|
224
|
+
}
|
|
225
|
+
setIsOpen(false);
|
|
226
|
+
}}
|
|
227
|
+
>
|
|
228
|
+
{renderItem(key, item)}
|
|
229
|
+
</button>
|
|
230
|
+
))}
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
)}
|
|
234
|
+
</div>
|
|
235
|
+
);
|
|
236
|
+
}
|