@envive-ai/react-widgets-v3 0.3.15-beta.0 → 0.3.15

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 (111) hide show
  1. package/dist/hocs/withBaseWidget/types.d.cts +3 -3
  2. package/dist/hocs/withBaseWidget/types.d.ts +3 -5
  3. package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
  4. package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
  5. package/dist/packages/widgets/dist/SearchResults/SearchResults.d.ts +2 -3
  6. package/dist/packages/widgets/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
  7. package/dist/packages/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
  8. package/dist/packages/widgets/dist/SearchZeroState/index.d.ts +1 -2
  9. package/dist/packages/widgets/dist/SearchZeroState/types.d.ts +2 -2
  10. package/dist/packages/widgets/dist/SuggestionBar/SuggestionBar.d.ts +3 -3
  11. package/dist/packages/widgets/dist/SuggestionButtonContainer/types.d.ts +2 -3
  12. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
  13. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
  14. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
  15. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +3 -3
  16. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
  17. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +0 -2
  18. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +0 -2
  19. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
  20. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
  21. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +2 -2
  22. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +2 -2
  23. package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
  24. package/dist/widgets/ProductCardWidget/ProductCardWidget.d.ts +2 -2
  25. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +19 -0
  26. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
  27. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
  28. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +19 -0
  29. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
  30. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
  31. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
  32. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +2 -2
  33. package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +50 -3
  34. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
  35. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
  36. package/dist/widgets/SocialProofWidget/SocialProofWidget.js +51 -4
  37. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +9 -0
  38. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
  39. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
  40. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +10 -1
  41. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
  42. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
  43. package/dist/widgets/dist/SearchResults/SearchResults.d.cts +2 -3
  44. package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
  45. package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
  46. package/dist/widgets/dist/SearchZeroState/types.d.cts +2 -2
  47. package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.cts +3 -3
  48. package/dist/widgets/dist/SuggestionButtonContainer/types.d.cts +2 -3
  49. package/dist/widgets/utils/functions.cjs +0 -14
  50. package/dist/widgets/utils/functions.js +1 -14
  51. package/dist/widgets-v2/SearchZeroState/index.d.cts +1 -2
  52. package/dist/widgets-v2/SearchZeroState/index.d.ts +1 -2
  53. package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +0 -1
  54. package/package.json +1 -1
  55. package/src/widgets/FloatingChatWidget/FloatingChatOverlay.tsx +0 -6
  56. package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +38 -8
  57. package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +3 -2
  58. package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +77 -7
  59. package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +23 -8
  60. package/dist/hooks/dist/application/models/api/widgetText.d.cts +0 -8
  61. package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.cts +0 -12
  62. package/dist/hooks/dist/contexts/types.d.cts +0 -38
  63. package/dist/hooks/dist/contexts/typesV3.d.cts +0 -239
  64. package/dist/hooks/dist/services/amplitudeService/eventNames.d.cts +0 -43
  65. package/dist/hooks/dist/types/customerService.d.cts +0 -21
  66. package/dist/packages/hooks/dist/application/models/api/orgConfigResults.d.ts +0 -1
  67. package/dist/packages/hooks/dist/application/models/api/widgetText.d.ts +0 -8
  68. package/dist/packages/hooks/dist/application/models/frontendConfig.d.ts +0 -1
  69. package/dist/packages/hooks/dist/contexts/amplitudeContext/amplitudeContext.d.ts +0 -2
  70. package/dist/packages/hooks/dist/contexts/amplitudeContext/index.d.ts +0 -2
  71. package/dist/packages/hooks/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.ts +0 -2
  72. package/dist/packages/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +0 -14
  73. package/dist/packages/hooks/dist/contexts/hardcopyContext/index.d.ts +0 -1
  74. package/dist/packages/hooks/dist/contexts/types.d.ts +0 -42
  75. package/dist/packages/hooks/dist/contexts/typesV3.d.ts +0 -239
  76. package/dist/packages/hooks/dist/services/amplitudeService/amplitudeService.d.ts +0 -1
  77. package/dist/packages/hooks/dist/services/amplitudeService/eventNames.d.ts +0 -43
  78. package/dist/packages/hooks/dist/types/customerService.d.ts +0 -21
  79. package/dist/packages/widgets/dist/SuggestionButtonContainer/index.d.ts +0 -2
  80. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/api/response.d.ts +0 -14
  81. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/api/search.d.ts +0 -15
  82. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts +0 -73
  83. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +0 -61
  84. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts +0 -25
  85. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts +0 -35
  86. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts +0 -32
  87. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +0 -32
  88. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/variantInfo/variantInfo.d.ts +0 -1
  89. package/dist/packages/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts +0 -15
  90. package/dist/packages/widgets/dist/packages/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +0 -1
  91. package/dist/packages/widgets/dist/packages/hooks/dist/contexts/types.d.ts +0 -63
  92. package/dist/packages/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.ts +0 -60
  93. package/dist/packages/widgets/dist/packages/hooks/dist/hooks/utils.d.ts +0 -13
  94. package/dist/packages/widgets/dist/packages/hooks/dist/types/OrgInfo.d.ts +0 -1
  95. package/dist/packages/widgets/dist/packages/hooks/dist/types/index.d.ts +0 -1
  96. package/dist/packages/widgets/dist/packages/hooks/dist/types/search-filter-types.d.ts +0 -28
  97. package/dist/packages/widgets/dist/packages/hooks/dist/types/test-types.d.ts +0 -10
  98. package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.cts +0 -14
  99. package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.cts +0 -15
  100. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.cts +0 -73
  101. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +0 -61
  102. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.cts +0 -25
  103. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.cts +0 -35
  104. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.cts +0 -32
  105. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +0 -32
  106. package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.cts +0 -14
  107. package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.cts +0 -61
  108. package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.cts +0 -60
  109. package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.cts +0 -12
  110. package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.cts +0 -28
  111. package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.cts +0 -10
@@ -1,21 +0,0 @@
1
- //#region ../hooks/dist/types/customerService.d.ts
2
-
3
- //#region src/types/customerService.d.ts
4
- declare enum CustomerServiceType {
5
- shopify = "shopify",
6
- gorgias = "gorgias",
7
- kustomer = "kustomer",
8
- groove = "groove",
9
- tidio = "tidio",
10
- zowie = "zowie",
11
- redo = "redo",
12
- gladly = "gladly",
13
- richpanel = "richpanel",
14
- zendesk = "zendesk",
15
- helpscout = "helpscout",
16
- talkdesk = "talkdesk",
17
- eightByEight = "8x8",
18
- unsupported = "unsupported",
19
- }
20
- //#endregion
21
- export { CustomerServiceType };
@@ -1 +0,0 @@
1
- import "../frontendConfig.js";
@@ -1,8 +0,0 @@
1
- //#region ../hooks/dist/application/models/api/widgetText.d.ts
2
- //#region src/application/models/api/widgetText.d.ts
3
- type WidgetString = {
4
- id: string;
5
- value: string;
6
- };
7
- //#endregion
8
- export { WidgetString };
@@ -1 +0,0 @@
1
- import "../../contexts/types.js";
@@ -1,2 +0,0 @@
1
- import "../../services/amplitudeService/amplitudeService.js";
2
- import React from "react";
@@ -1,2 +0,0 @@
1
- import { SpiffyMetricsEventName } from "../../services/amplitudeService/eventNames.js";
2
- import "./amplitudeContext.js";
@@ -1,2 +0,0 @@
1
- import "../../application/models/api/orgConfigResults.js";
2
- import React from "react";
@@ -1,14 +0,0 @@
1
- import "../typesV3.js";
2
- import { WidgetString } from "../../application/models/api/widgetText.js";
3
- import "react";
4
-
5
- //#region ../hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts
6
-
7
- type HardcopyResponse = {
8
- responseId: string;
9
- language: string;
10
- rawValues?: Record<string, WidgetString | WidgetString[]>;
11
- values: Record<string, string | string[]>;
12
- };
13
- //#endregion
14
- export { HardcopyResponse };
@@ -1 +0,0 @@
1
- import { HardcopyResponse } from "./hardcopyContext.js";
@@ -1,42 +0,0 @@
1
- import "./typesV3.js";
2
- import "./hardcopyContext/hardcopyContext.js";
3
- import "../application/models/api/orgConfigResults.js";
4
-
5
- //#region ../hooks/dist/contexts/types.d.ts
6
-
7
- interface AlphabeticFilterSorting {
8
- type: 'alphabetic';
9
- }
10
- interface ProductCountFilterSorting {
11
- type: 'productCount';
12
- }
13
- interface CustomFilterSorting {
14
- type: 'custom';
15
- map: Record<string, number>;
16
- }
17
- type FilterSorting = AlphabeticFilterSorting | ProductCountFilterSorting | CustomFilterSorting;
18
- interface BaseFilterConfig {
19
- filterId: string;
20
- displayName: string;
21
- }
22
- interface DynamicFilterConfig extends BaseFilterConfig {
23
- type: 'dynamic';
24
- attribute: string;
25
- sorting: FilterSorting;
26
- }
27
- interface PriceFilterConfig extends BaseFilterConfig {
28
- type: 'price';
29
- bucketSize: number;
30
- }
31
- type FilterAttribute = DynamicFilterConfig | PriceFilterConfig;
32
- interface SearchConfig {
33
- enableGlobalSearch: boolean;
34
- searchFilterConfig: FilterAttribute[];
35
- searchOverlayHeading?: string;
36
- redirectSearchResultsUrl?: string;
37
- additiveDynamicFilters?: boolean;
38
- recommendedProducts?: string[];
39
- recommendedProductsHeading?: string;
40
- }
41
- //#endregion
42
- export { type SearchConfig };
@@ -1,239 +0,0 @@
1
- import { CustomerServiceType } from "../types/customerService.js";
2
- import { SearchConfig } from "./types.js";
3
- import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
4
- import { AnimationSpeed, PromptCarouselRows } from "@envive-ai/react-toolkit-v3/PromptCarousel";
5
- import { FloatingButtonLocation } from "@envive-ai/react-toolkit-v3/FloatingButton";
6
- import { DynamicLayout, WidgetKind } from "@envive-ai/react-toolkit-v3/SocialProof";
7
- import { WidgetWrapperVariant } from "@envive-ai/react-toolkit-v3/WidgetWrapper";
8
- import { ImageGalleryImage, ImageGalleryLayout } from "@envive-ai/react-toolkit-v3/ImageGallery";
9
- import { PromptButtonVariant } from "@envive-ai/react-toolkit-v3/PromptButton";
10
- import { SparkleIconColor } from "@envive-ai/react-toolkit-v3/WelcomeMessage";
11
-
12
- //#region ../hooks/dist/contexts/typesV3.d.ts
13
-
14
- type ImageAspectRatio = '1/1' | '3/4';
15
- type ButtonColors = {
16
- lightButtonBackgroundColor: string;
17
- lightButtonIconColor: string;
18
- darkButtonBackgroundColor: string;
19
- darkButtonIconColor: string;
20
- };
21
- type Typography = {
22
- titleFontFamily: string;
23
- headerFontFamily: string;
24
- bodyFontFamily: string;
25
- fontSize?: {
26
- t1: string;
27
- t2: string;
28
- t3: string;
29
- h1: string;
30
- h2: string;
31
- h3: string;
32
- b1: string;
33
- b2: string;
34
- b3: string;
35
- b4: string;
36
- b5: string;
37
- l1: string;
38
- l2: string;
39
- };
40
- fontWeight?: {
41
- rg: string;
42
- md: string;
43
- sb: string;
44
- };
45
- letterSpacing?: {
46
- '0': string;
47
- 'wide-1': string;
48
- };
49
- lineHeight?: {
50
- '124': number;
51
- '120': number;
52
- '118': number;
53
- '116': number;
54
- '114': number;
55
- '148': number;
56
- '140': number;
57
- '128': number;
58
- '130': number;
59
- '133': number;
60
- };
61
- };
62
- type LookAndFeelConfig = {
63
- theme: Theme;
64
- agentName: string;
65
- chatHeaderLogoDarkSrc: string;
66
- chatHeaderLogoLightSrc: string;
67
- widgetLogoSrc: string;
68
- hideWidgetLogo: boolean;
69
- elementRadius: number;
70
- imageAspectRatio: ImageAspectRatio;
71
- buttonColors: ButtonColors;
72
- typography: Typography;
73
- };
74
- declare enum ConfigVersionEnum {
75
- V3 = "v3",
76
- Deprecated = "deprecated",
77
- }
78
- type ConfigVersion = ConfigVersionEnum.V3 | ConfigVersionEnum.Deprecated | undefined;
79
- type Mode = 'dark' | 'light';
80
- type ShowOptions = 'always' | 'postInteraction' | 'none';
81
- type Style = 'attached' | 'detached';
82
- type FloatingButtonConfig = {
83
- position: FloatingButtonLocation;
84
- backgroundColor?: string;
85
- mode: Mode;
86
- showOption: ShowOptions;
87
- iconSVGSrc?: string;
88
- style: Style;
89
- };
90
- type ReferrerPopupTrigger = {
91
- type: 'referrer';
92
- referrers: string[];
93
- };
94
- type AutomaticPopupTrigger = {
95
- type: 'automatic';
96
- };
97
- type PopupTrigger = ReferrerPopupTrigger | AutomaticPopupTrigger;
98
- type AutoPopupTrigger = {
99
- delay: number;
100
- trigger: PopupTrigger;
101
- };
102
- interface AutoPopupConfig {
103
- triggers: AutoPopupTrigger[];
104
- }
105
- type PartialViewConfig = {
106
- /**
107
- * When true, only full-screen mode is supported (no partial/draggable middle state).
108
- * Useful when partial view causes usability issues on mobile.
109
- * Default: false (undefined and false = partial view enabled).
110
- */
111
- disabled?: boolean;
112
- };
113
- type FloatingChatConfig = {
114
- headerBackgroundColor?: string;
115
- headerMode: Mode;
116
- welcomeMessageIconColor: SparkleIconColor;
117
- showVerifiedBuyer: boolean;
118
- userQueryInputEnabled: boolean;
119
- showEnviveLogo: boolean;
120
- ignoreFirstModelResponse?: boolean;
121
- neverShowSingleProductCards?: boolean;
122
- welcomeMessageTitle: string;
123
- welcomeMessageText: string;
124
- chatFooterTextFieldPlaceholderText: string;
125
- autoPopupConfig?: AutoPopupConfig;
126
- partialViewConfig?: PartialViewConfig;
127
- };
128
- type CustomerServiceIntegration = {
129
- enabled: boolean;
130
- provider: CustomerServiceType;
131
- suppressMerchantButton?: boolean;
132
- };
133
- type SPASettings = {
134
- enabled: boolean;
135
- refreshInterval?: number;
136
- };
137
- type OrgUIConfigV3 = {
138
- id?: string;
139
- version: ConfigVersion;
140
- shortName: string;
141
- lookAndFeel: LookAndFeelConfig;
142
- floatingButton: FloatingButtonConfig;
143
- floatingChat: FloatingChatConfig;
144
- merchantOverrideCss?: string;
145
- customerServiceIntegration?: CustomerServiceIntegration;
146
- singlePageApplicationSettings?: SPASettings;
147
- searchConfig?: SearchConfig;
148
- };
149
- declare enum WidgetTypeV3 {
150
- PromptCarouselV3 = "PromptCarouselV3",
151
- TitledPromptCarouselV3 = "TitledPromptCarouselV3",
152
- SocialProofV3 = "SocialProofV3",
153
- TypingAnimationV3 = "TypingAnimationV3",
154
- ChatPreviewV3 = "ChatPreviewV3",
155
- ChatPreviewComparisonV3 = "ChatPreviewComparisonV3",
156
- ChatPreviewLoadingV3 = "ChatPreviewLoadingV3",
157
- ImagePromptCardV3 = "ImagePromptCardV3",
158
- PromptButtonCarouselWithImageV3 = "PromptButtonCarouselWithImageV3",
159
- ImageBannerV3 = "ImageBannerV3",
160
- SingleImagePromptV3 = "SingleImagePromptV3",
161
- FloatingChatV3 = "FloatingChatV3",
162
- FloatingButtonV3 = "FloatingButtonV3",
163
- ProductCardV3 = "ProductCardV3",
164
- FullPageSalesAgentV3 = "FullPageSalesAgentV3",
165
- }
166
- interface BaseWidgetConfig<T extends WidgetTypeV3> {
167
- widgetConfigId: string;
168
- type: T;
169
- contentId?: string;
170
- }
171
- interface PromptCarouselWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.PromptCarouselV3> {
172
- promptButtonType?: PromptButtonVariant;
173
- boldFirstButton?: boolean;
174
- promptCarouselRows?: PromptCarouselRows;
175
- animationSpeed?: AnimationSpeed;
176
- }
177
- interface TitledPromptCarouselWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.TitledPromptCarouselV3> {
178
- promptButtonType?: PromptButtonVariant;
179
- boldFirstButton?: boolean;
180
- promptCarouselRows?: PromptCarouselRows;
181
- animationSpeed?: AnimationSpeed;
182
- }
183
- interface SocialProofWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.SocialProofV3> {
184
- kind: WidgetKind;
185
- variant: WidgetWrapperVariant;
186
- hexCardColor?: string;
187
- promptCarouselRows: PromptCarouselRows;
188
- hideImage?: boolean;
189
- imageGalleryLayout: Exclude<ImageGalleryLayout, 'TWO_SIDE'>;
190
- hideTextField?: boolean;
191
- primaryButtonVariant: Exclude<PromptButtonVariant, 'suggestedResponse' | 'ghost'>;
192
- secondaryButtonVariant: Exclude<PromptButtonVariant, 'suggestedResponse' | 'ghost'>;
193
- dynamicLayout?: DynamicLayout;
194
- images?: ImageGalleryImage[];
195
- }
196
- interface TypingAnimationWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.TypingAnimationV3> {
197
- widgetVariant?: WidgetWrapperVariant;
198
- cardColor?: string;
199
- promptButtonType?: PromptButtonVariant;
200
- promptCarouselRows?: PromptCarouselRows;
201
- showTextField?: boolean;
202
- }
203
- interface ChatPreviewComparisonWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewComparisonV3> {
204
- variant: WidgetWrapperVariant;
205
- hexCardColor?: string;
206
- hideImage?: boolean;
207
- hideTextField?: boolean;
208
- }
209
- interface ChatPreviewLoadingWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewLoadingV3> {
210
- variant: WidgetWrapperVariant;
211
- hexCardColor?: string;
212
- hideTextField?: boolean;
213
- }
214
- interface ChatPreviewWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewV3> {
215
- variant: WidgetWrapperVariant;
216
- hexCardColor?: string;
217
- hideTextField?: boolean;
218
- }
219
- interface PromptButtonCarouselWithImageWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.PromptButtonCarouselWithImageV3> {
220
- promptButtonType?: PromptButtonVariant;
221
- image?: ImageGalleryImage;
222
- hideTextField?: boolean;
223
- isDynamic?: boolean;
224
- }
225
- interface FloatingChatWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.FloatingChatV3> {}
226
- interface ProductCardWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ProductCardV3> {
227
- promptButtonType?: PromptButtonVariant;
228
- italicizeHeadline?: boolean;
229
- fallbackColor?: string;
230
- imageSrc?: string;
231
- }
232
- interface FullPageSalesAgentWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.FullPageSalesAgentV3> {
233
- headerContainer?: string;
234
- autoHeight?: boolean;
235
- }
236
- type WidgetConfigV3 = PromptCarouselWidgetV3Config | SocialProofWidgetV3Config | TitledPromptCarouselWidgetV3Config | ChatPreviewComparisonWidgetV3Config | ChatPreviewLoadingWidgetV3Config | TypingAnimationWidgetV3Config | ChatPreviewWidgetV3Config | PromptButtonCarouselWithImageWidgetV3Config | FloatingChatWidgetV3Config | ProductCardWidgetV3Config | FullPageSalesAgentWidgetV3Config;
237
- //#endregion
238
- //#endregion
239
- export { type OrgUIConfigV3, type WidgetConfigV3, WidgetTypeV3 };
@@ -1 +0,0 @@
1
- import "../../contexts/featureFlagServiceContext/featureFlagServiceContext.js";
@@ -1,43 +0,0 @@
1
- //#region ../hooks/dist/services/amplitudeService/eventNames.d.ts
2
- //#region src/services/amplitudeService/eventNames.d.ts
3
- /**
4
- * Event name enums for Amplitude tracking.
5
- *
6
- * NOTE: This file exists separately to avoid circular dependency issues.
7
- * The amplitudeService imports from ga4ProjectionService, which needs these enums.
8
- * By keeping the enums in a separate file, ga4ProjectionService can import them
9
- * without creating a circular dependency with amplitudeService.
10
- */
11
- declare enum SpiffyMetricsEventName {
12
- BundleLoaded = "Bundle Loaded",
13
- EnvironmentInitialized = "Environment Initialized",
14
- ChatLiveAgentBtnClick = "Chat Live Agent Btn Click",
15
- ChatFloatingButtonVisible = "Chat Floating Button Visible",
16
- ChatComponentVisible = "Chat Component Visible",
17
- ChatComponentExpanded = "Chat Component Expanded",
18
- ChatComponentCollapsed = "Chat Component Collapsed",
19
- ChatUserMessageInput = "Chat User Message Input",
20
- ChatSuggestionClicked = "Chat Suggestion Clicked",
21
- ChatAssistantResponse = "Chat Assistant Response",
22
- ProductCardClicked = "Product Card Clicked",
23
- ProductReviewCardClicked = "Product Review Card Clicked",
24
- AddToCartClicked = "Add To Cart Clicked",
25
- PromptCardClicked = "Prompt Card Clicked",
26
- SupportedEvent = "Supported Event",
27
- SearchBackToResponseClicked = "Search Back to Response Clicked",
28
- PerformanceMetrics = "Performance Metrics",
29
- SearchBarClicked = "Search Bar Clicked",
30
- OrderLookupStarted = "Order Lookup Started",
31
- OrderLookupFormSubmitted = "Order Lookup Form Submitted",
32
- SearchComponentVisible = "Search Component Visible",
33
- SearchZeroStateSuggestionClicked = "Search Zero State Suggestion Clicked",
34
- SearchInputStarted = "Search Input Started",
35
- SearchQuerySubmitted = "Search Query Submitted",
36
- SearchResultsViewed = "Search Results Viewed",
37
- SearchTimeToFirstClick = "Search Time to First Click",
38
- SearchZeroResultsRate = "Search Zero Results Rate",
39
- SearchFilterClicked = "Search Filter Clicked",
40
- SearchSortClicked = "Search Sort Clicked",
41
- }
42
- //#endregion
43
- export { SpiffyMetricsEventName };
@@ -1,21 +0,0 @@
1
- //#region ../hooks/dist/types/customerService.d.ts
2
-
3
- //#region src/types/customerService.d.ts
4
- declare enum CustomerServiceType {
5
- shopify = "shopify",
6
- gorgias = "gorgias",
7
- kustomer = "kustomer",
8
- groove = "groove",
9
- tidio = "tidio",
10
- zowie = "zowie",
11
- redo = "redo",
12
- gladly = "gladly",
13
- richpanel = "richpanel",
14
- zendesk = "zendesk",
15
- helpscout = "helpscout",
16
- talkdesk = "talkdesk",
17
- eightByEight = "8x8",
18
- unsupported = "unsupported",
19
- }
20
- //#endregion
21
- export { CustomerServiceType };
@@ -1,2 +0,0 @@
1
- import { SuggestionButtonContainerProps } from "./types.js";
2
- import { SuggestionButtonContainer } from "./SuggestionButtonContainer.js";
@@ -1,14 +0,0 @@
1
- import { CamelCasedPropertiesDeep } from "../utilityTypes/camelCasedPropertiesDeep.js";
2
- import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
3
-
4
- //#region ../widgets/dist/packages/hooks/dist/application/models/api/response.d.ts
5
-
6
- //#region ../hooks/dist/application/models/api/response.d.ts
7
- interface SearchResponseProductAttributes {
8
- category: ResponseCategory.Product;
9
- attributes: CamelCasedPropertiesDeep<SearchResponseProduct>;
10
- }
11
- //#endregion
12
-
13
- //#endregion
14
- export { SearchResponseProductAttributes };
@@ -1,15 +0,0 @@
1
- import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
2
-
3
- //#region ../widgets/dist/packages/hooks/dist/application/models/api/search.d.ts
4
-
5
- //#region ../hooks/dist/application/models/api/search.d.ts
6
- interface SearchResult {
7
- products: SearchResponseProduct[];
8
- filters: string[];
9
- generatedQuery?: string;
10
- totalProductCount: number;
11
- searchResponseId: string;
12
- }
13
- //#endregion
14
- //#endregion
15
- export { SearchResult };
@@ -1,73 +0,0 @@
1
- import { SplitWords } from "./splitWords.js";
2
-
3
- //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts
4
-
5
- //#region ../hooks/dist/application/models/utilityTypes/camelCase.d.ts
6
- //#region src/application/models/utilityTypes/camelCase.d.ts
7
- /**
8
- * CamelCase options.
9
- *
10
- * @see {@link CamelCase}
11
- */
12
- type CamelCaseOptions = {
13
- /**
14
- * Whether to preserved consecutive uppercase letter.
15
- *
16
- * @default true
17
- */
18
- preserveConsecutiveUppercase?: boolean;
19
- };
20
- /**
21
- * Convert an array of words to camel-case.
22
- */
23
- type CamelCaseFromArray<Words extends string[], Options extends CamelCaseOptions, OutputString extends string = ''> = Words extends [infer FirstWord extends string, ...infer RemainingWords extends string[]] ? Options['preserveConsecutiveUppercase'] extends true ? `${Capitalize<FirstWord>}${CamelCaseFromArray<RemainingWords, Options>}` : `${Capitalize<Lowercase<FirstWord>>}${CamelCaseFromArray<RemainingWords, Options>}` : OutputString;
24
- /**
25
- * Convert a string literal to camel-case.
26
- *
27
- * This can be useful when, for example, converting some kebab-cased command-line flags or a snake-cased database result.
28
- *
29
- * By default, consecutive uppercase letter are preserved. See {@link CamelCaseOptions.preserveConsecutiveUppercase preserveConsecutiveUppercase} option to change this behaviour.
30
- *
31
- * @example
32
- * ```
33
- * import type {CamelCase} from 'type-fest';
34
- *
35
- * // Simple
36
- *
37
- * const someVariable: CamelCase<'foo-bar'> = 'fooBar';
38
- *
39
- * // Advanced
40
- *
41
- * type CamelCasedProperties<T> = {
42
- * [K in keyof T as CamelCase<K>]: T[K]
43
- * };
44
- *
45
- * interface RawOptions {
46
- * 'dry-run': boolean;
47
- * 'full_family_name': string;
48
- * foo: number;
49
- * BAR: string;
50
- * QUZ_QUX: number;
51
- * 'OTHER-FIELD': boolean;
52
- * }
53
- *
54
- * const dbResult: CamelCasedProperties<RawOptions> = {
55
- * dryRun: true,
56
- * fullFamilyName: 'bar.js',
57
- * foo: 123,
58
- * bar: 'foo',
59
- * quzQux: 6,
60
- * otherField: false
61
- * };
62
- * ```
63
- *
64
- * @category Change case
65
- * @category Template literal
66
- */
67
- type CamelCase<Type, Options extends CamelCaseOptions = {
68
- preserveConsecutiveUppercase: true;
69
- }> = Type extends string ? string extends Type ? Type : Uncapitalize<CamelCaseFromArray<SplitWords<Type extends Uppercase<Type> ? Lowercase<Type> : Type>, Options>> : Type;
70
- //#endregion
71
- //#endregion
72
- //#endregion
73
- export { CamelCase, CamelCaseOptions };
@@ -1,61 +0,0 @@
1
- import { CamelCase, CamelCaseOptions } from "./camelCase.js";
2
- import { UnknownArray } from "./unknownArray.js";
3
-
4
- //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
5
-
6
- //#region ../hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
7
- //#region src/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
8
- /**
9
- * Convert object properties to camel case recursively.
10
- *
11
- * This can be useful when, for example, converting some API types from a different style.
12
- *
13
- * @see CamelCasedProperties
14
- * @see CamelCase
15
- *
16
- * @example
17
- * ```
18
- * import type {CamelCasedPropertiesDeep} from 'type-fest';
19
- *
20
- * interface User {
21
- * UserId: number;
22
- * UserName: string;
23
- * }
24
- *
25
- * interface UserWithFriends {
26
- * UserInfo: User;
27
- * UserFriends: User[];
28
- * }
29
- *
30
- * const result: CamelCasedPropertiesDeep<UserWithFriends> = {
31
- * userInfo: {
32
- * userId: 1,
33
- * userName: 'Tom',
34
- * },
35
- * userFriends: [
36
- * {
37
- * userId: 2,
38
- * userName: 'Jerry',
39
- * },
40
- * {
41
- * userId: 3,
42
- * userName: 'Spike',
43
- * },
44
- * ],
45
- * };
46
- * ```
47
- *
48
- * @category Change case
49
- * @category Template literal
50
- * @category Object
51
- */
52
- type CamelCasedPropertiesDeep<Value, Options extends CamelCaseOptions = {
53
- preserveConsecutiveUppercase: true;
54
- }> = Value extends Function ? Value : Value extends UnknownArray ? CamelCasedPropertiesArrayDeep<Value> : Value extends Set<infer U> ? Set<CamelCasedPropertiesDeep<U, Options>> : { [K in keyof Value as CamelCase<K, Options>]: CamelCasedPropertiesDeep<Value[K], Options> };
55
- type CamelCasedPropertiesArrayDeep<Value extends UnknownArray> = Value extends [] ? [] : Value extends [infer U, ...infer V] ? [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [infer U, ...infer V] ? readonly [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? readonly [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends Array<infer U> ? Array<CamelCasedPropertiesDeep<U>> : Value extends ReadonlyArray<infer U> ? ReadonlyArray<CamelCasedPropertiesDeep<U>> : never;
56
- //#endregion
57
-
58
- //#endregion
59
-
60
- //#endregion
61
- export { CamelCasedPropertiesDeep };
@@ -1,25 +0,0 @@
1
- import { Trim } from "./trim.js";
2
-
3
- //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts
4
-
5
- //#region ../hooks/dist/application/models/utilityTypes/internal.d.ts
6
- /**
7
- * Returns a boolean for whether the string is numeric.
8
- *
9
- * This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
10
- */
11
- type IsNumeric<T extends string> = T extends `${number}` ? Trim<T> extends T ? true : false : false;
12
- /**
13
- * Returns a boolean for whether the string is lowercased.
14
- */
15
- type IsLowerCase<T extends string> = T extends Lowercase<T> ? true : false;
16
- /**
17
- * Returns a boolean for whether the string is upper-cased.
18
- */
19
- type IsUpperCase<T extends string> = T extends Uppercase<T> ? true : false;
20
- type WordSeparators = '-' | '_' | Whitespace;
21
- type Whitespace = '\u{9}' | '\u{A}' | '\u{B}' | '\u{C}' | '\u{D}' | '\u{20}' | '\u{85}' | '\u{A0}' | '\u{1680}' | '\u{2000}' | '\u{2001}' | '\u{2002}' | '\u{2003}' | '\u{2004}' | '\u{2005}' | '\u{2006}' | '\u{2007}' | '\u{2008}' | '\u{2009}' | '\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}' | '\u{3000}' | '\u{FEFF}';
22
- //#endregion
23
-
24
- //#endregion
25
- export { IsLowerCase, IsNumeric, IsUpperCase, Whitespace, WordSeparators };
@@ -1,35 +0,0 @@
1
- import { IsLowerCase, IsNumeric, IsUpperCase, WordSeparators } from "./internal.js";
2
-
3
- //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts
4
-
5
- //#region ../hooks/dist/application/models/utilityTypes/splitWords.d.ts
6
- //#region src/application/models/utilityTypes/splitWords.d.ts
7
- type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
8
- type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
9
- /**
10
- * Split a string (almost) like Lodash's `_.words()` function.
11
- *
12
- * - Split on each word that begins with a capital letter.
13
- * - Split on each {@link WordSeparators}.
14
- * - Split on numeric sequence.
15
- *
16
- * @example
17
- * ```
18
- * type Words0 = SplitWords<'helloWorld'>; // ['hello', 'World']
19
- * type Words1 = SplitWords<'helloWORLD'>; // ['hello', 'WORLD']
20
- * type Words2 = SplitWords<'hello-world'>; // ['hello', 'world']
21
- * type Words3 = SplitWords<'--hello the_world'>; // ['hello', 'the', 'world']
22
- * type Words4 = SplitWords<'lifeIs42'>; // ['life', 'Is', '42']
23
- * ```
24
- *
25
- * @internal
26
- * @category Change case
27
- * @category Template literal
28
- */
29
- type SplitWords<Sentence extends string, LastCharacter extends string = '', CurrentWord extends string = ''> = Sentence extends `${infer FirstCharacter}${infer RemainingCharacters}` ? FirstCharacter extends WordSeparators ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>] : LastCharacter extends '' ? SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter> : [false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>] ? [...RemoveLastCharacter<CurrentWord, LastCharacter>, ...SplitWords<RemainingCharacters, FirstCharacter, `${LastCharacter}${FirstCharacter}`>] : SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
30
- //#endregion
31
-
32
- //#endregion
33
-
34
- //#endregion
35
- export { SplitWords };