@envive-ai/react-widgets-v3 0.3.2 → 0.3.6
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/hocs/withBaseWidget/types.d.cts +3 -3
- package/dist/hocs/withBaseWidget/types.d.ts +3 -5
- package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
- package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
- package/dist/node_modules/uuid/dist/native.js +6 -0
- package/dist/node_modules/uuid/dist/rng.js +13 -0
- package/dist/node_modules/uuid/dist/stringify.js +9 -0
- package/dist/node_modules/uuid/dist/v4.js +27 -0
- package/dist/node_modules/uuid/dist-node/native.cjs +8 -0
- package/dist/node_modules/uuid/dist-node/rng.cjs +16 -0
- package/dist/node_modules/uuid/dist-node/stringify.cjs +10 -0
- package/dist/node_modules/uuid/dist-node/v4.cjs +27 -0
- package/dist/{widgets → packages/widgets}/dist/SearchResults/SearchResults.d.ts +3 -4
- 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/packages/widgets/dist/SearchZeroState/index.d.ts +3 -0
- package/dist/{widgets → packages/widgets}/dist/SearchZeroState/types.d.ts +2 -2
- package/dist/{widgets → packages/widgets}/dist/SuggestionBar/SuggestionBar.d.ts +1 -1
- package/dist/{widgets → packages/widgets}/dist/SuggestionButtonContainer/types.d.ts +2 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +28 -11
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +28 -11
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +27 -10
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +27 -10
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +3 -3
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +26 -8
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +27 -9
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +14 -6
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +15 -7
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.cjs +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.js +2 -2
- package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +36 -13
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.js +36 -13
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +13 -5
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +14 -6
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.cjs +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.js +2 -2
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +14 -7
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +14 -7
- package/dist/widgets/dist/SearchResults/SearchResults.d.cts +3 -4
- package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchZeroState/types.d.cts +2 -2
- package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.cts +1 -1
- package/dist/widgets/dist/SuggestionButtonContainer/types.d.cts +2 -3
- package/dist/widgets/hooks/useGetWidgetStatus.cjs +1 -1
- package/dist/widgets/hooks/useGetWidgetStatus.js +1 -1
- package/dist/widgets/utils/functions.cjs +1 -1
- package/dist/widgets/utils/functions.js +1 -1
- package/dist/widgets-v2/SearchResults/index.d.ts +3 -3
- package/dist/widgets-v2/SearchZeroState/index.d.cts +1 -2
- package/dist/widgets-v2/SearchZeroState/index.d.ts +4 -5
- package/dist/widgets-v2/SuggestionBar/index.d.ts +3 -3
- package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/stories/SalesAgentTest/SalesAgentTest.tsx +2 -2
- package/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.tsx +30 -8
- package/src/widgets/ChatPreviewWidget/ChatPreviewWidget.tsx +33 -9
- package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +33 -8
- package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +19 -5
- package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +41 -10
- package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +19 -5
- package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +18 -5
- package/dist/hooks/dist/application/models/api/orgConfigResults.d.ts +0 -1
- package/dist/hooks/dist/application/models/frontendConfig.d.ts +0 -1
- package/dist/hooks/dist/contexts/amplitudeContext/amplitudeContext.d.ts +0 -2
- package/dist/hooks/dist/contexts/amplitudeContext/index.d.ts +0 -2
- package/dist/hooks/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.ts +0 -2
- package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.cts +0 -8
- package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +0 -11
- package/dist/hooks/dist/contexts/hardcopyContext/index.d.ts +0 -1
- package/dist/hooks/dist/contexts/types.d.cts +0 -44
- package/dist/hooks/dist/contexts/types.d.ts +0 -47
- package/dist/hooks/dist/contexts/typesV3.d.cts +0 -201
- package/dist/hooks/dist/contexts/typesV3.d.ts +0 -201
- package/dist/hooks/dist/services/amplitudeService/amplitudeService.d.cts +0 -36
- package/dist/hooks/dist/services/amplitudeService/amplitudeService.d.ts +0 -37
- package/dist/hooks/dist/types/customerService.d.cts +0 -18
- package/dist/hooks/dist/types/customerService.d.ts +0 -18
- package/dist/widgets/dist/SearchZeroState/index.d.ts +0 -4
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.cts +0 -14
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.ts +0 -14
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.cts +0 -15
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.ts +0 -15
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.cts +0 -73
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts +0 -73
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +0 -61
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +0 -61
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.cts +0 -25
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts +0 -25
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.cts +0 -35
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts +0 -35
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.cts +0 -32
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts +0 -32
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +0 -32
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +0 -32
- package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.cts +0 -14
- package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts +0 -15
- package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.cts +0 -61
- package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.ts +0 -61
- package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.cts +0 -60
- package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.ts +0 -60
- package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.cts +0 -11
- package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.ts +0 -11
- package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.cts +0 -28
- package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.ts +0 -28
- package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.cts +0 -10
- package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.ts +0 -10
- /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/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/config/BaseWidgetConfig.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/config/WidgetType.d.ts +0 -0
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { CustomerServiceType } from "../types/customerService.cjs";
|
|
2
|
-
import { MerchantVariantSettings, SearchConfig } from "./types.cjs";
|
|
3
|
-
import { AnimationSpeed, PromptCarouselRows } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
4
|
-
import { ImageGalleryImage, ImageGalleryLayout } from "@envive-ai/react-toolkit-v3/ImageGallery";
|
|
5
|
-
import { PromptButtonVariant } from "@envive-ai/react-toolkit-v3/PromptButton";
|
|
6
|
-
import { WidgetWrapperVariant } from "@envive-ai/react-toolkit-v3/WidgetWrapper";
|
|
7
|
-
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
8
|
-
import { DynamicLayout } from "@envive-ai/react-toolkit-v3/SocialProof";
|
|
9
|
-
import { SparkleIconColor } from "@envive-ai/react-toolkit-v3/WelcomeMessage";
|
|
10
|
-
|
|
11
|
-
//#region ../hooks/dist/contexts/typesV3.d.ts
|
|
12
|
-
|
|
13
|
-
type ImageAspectRatio = '1/1' | '3/4';
|
|
14
|
-
type ButtonColors = {
|
|
15
|
-
lightButtonBackgroundColor: string;
|
|
16
|
-
lightButtonIconColor: string;
|
|
17
|
-
darkButtonBackgroundColor: string;
|
|
18
|
-
darkButtonIconColor: string;
|
|
19
|
-
};
|
|
20
|
-
type Typography = {
|
|
21
|
-
titleFontFamily: string;
|
|
22
|
-
headerFontFamily: string;
|
|
23
|
-
bodyFontFamily: string;
|
|
24
|
-
fontSize?: {
|
|
25
|
-
t1: string;
|
|
26
|
-
t2: string;
|
|
27
|
-
t3: string;
|
|
28
|
-
h1: string;
|
|
29
|
-
h2: string;
|
|
30
|
-
h3: string;
|
|
31
|
-
b1: string;
|
|
32
|
-
b2: string;
|
|
33
|
-
b3: string;
|
|
34
|
-
b4: string;
|
|
35
|
-
b5: string;
|
|
36
|
-
l1: string;
|
|
37
|
-
l2: string;
|
|
38
|
-
};
|
|
39
|
-
fontWeight?: {
|
|
40
|
-
rg: string;
|
|
41
|
-
md: string;
|
|
42
|
-
sb: string;
|
|
43
|
-
};
|
|
44
|
-
letterSpacing?: {
|
|
45
|
-
'0': string;
|
|
46
|
-
'wide-1': string;
|
|
47
|
-
};
|
|
48
|
-
lineHeight?: {
|
|
49
|
-
'124': number;
|
|
50
|
-
'120': number;
|
|
51
|
-
'118': number;
|
|
52
|
-
'116': number;
|
|
53
|
-
'114': number;
|
|
54
|
-
'148': number;
|
|
55
|
-
'140': number;
|
|
56
|
-
'128': number;
|
|
57
|
-
'130': number;
|
|
58
|
-
'133': number;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
type LookAndFeelConfig = {
|
|
62
|
-
theme: Theme;
|
|
63
|
-
agentName: string;
|
|
64
|
-
chatHeaderLogoDarkSrc: string;
|
|
65
|
-
chatHeaderLogoLightSrc: string;
|
|
66
|
-
widgetLogoSrc: string;
|
|
67
|
-
hideWidgetLogo: boolean;
|
|
68
|
-
elementRadius: number;
|
|
69
|
-
imageAspectRatio: ImageAspectRatio;
|
|
70
|
-
buttonColors: ButtonColors;
|
|
71
|
-
typography: Typography;
|
|
72
|
-
};
|
|
73
|
-
declare enum ConfigVersionEnum {
|
|
74
|
-
V3 = "v3",
|
|
75
|
-
Deprecated = "deprecated",
|
|
76
|
-
}
|
|
77
|
-
type ConfigVersion = ConfigVersionEnum.V3 | ConfigVersionEnum.Deprecated | undefined;
|
|
78
|
-
type Mode = 'dark' | 'light';
|
|
79
|
-
type Position = 'bottomLeft' | 'middleLeft' | 'middleRight' | 'bottomRight';
|
|
80
|
-
type ShowOptions = 'always' | 'postInteraction' | 'none';
|
|
81
|
-
type Style = 'attached' | 'detached';
|
|
82
|
-
type FloatingButtonConfig = {
|
|
83
|
-
position: Position;
|
|
84
|
-
backgroundColor?: string;
|
|
85
|
-
mode: Mode;
|
|
86
|
-
showOption: ShowOptions;
|
|
87
|
-
iconSVGSrc?: string;
|
|
88
|
-
style: Style;
|
|
89
|
-
};
|
|
90
|
-
type FloatingChatConfig = {
|
|
91
|
-
headerBackgroundColor?: string;
|
|
92
|
-
headerMode: Mode;
|
|
93
|
-
welcomeMessageIconColor: SparkleIconColor;
|
|
94
|
-
showVerifiedBuyer: boolean;
|
|
95
|
-
userQueryInputEnabled: boolean;
|
|
96
|
-
showEnviveLogo: boolean;
|
|
97
|
-
ignoreFirstModelResponse?: boolean;
|
|
98
|
-
neverShowSingleProductCards?: boolean;
|
|
99
|
-
welcomeMessageTitle: string;
|
|
100
|
-
welcomeMessageText: string;
|
|
101
|
-
chatFooterTextFieldPlaceholderText: string;
|
|
102
|
-
};
|
|
103
|
-
type CustomerServiceIntegration = {
|
|
104
|
-
enabled: boolean;
|
|
105
|
-
provider: CustomerServiceType;
|
|
106
|
-
suppressMerchantButton?: boolean;
|
|
107
|
-
};
|
|
108
|
-
type OrgUIConfigV3 = {
|
|
109
|
-
id?: string;
|
|
110
|
-
version: ConfigVersion;
|
|
111
|
-
shortName: string;
|
|
112
|
-
lookAndFeel: LookAndFeelConfig;
|
|
113
|
-
floatingButton: FloatingButtonConfig;
|
|
114
|
-
floatingChat: FloatingChatConfig;
|
|
115
|
-
merchantOverrideCss?: string;
|
|
116
|
-
customerServiceIntegration?: CustomerServiceIntegration;
|
|
117
|
-
merchantVariantSettings?: MerchantVariantSettings;
|
|
118
|
-
searchConfig?: SearchConfig;
|
|
119
|
-
};
|
|
120
|
-
declare enum WidgetTypeV3 {
|
|
121
|
-
PromptCarouselV3 = "PromptCarouselV3",
|
|
122
|
-
TitledPromptCarouselV3 = "TitledPromptCarouselV3",
|
|
123
|
-
SocialProofV3 = "SocialProofV3",
|
|
124
|
-
TypingAnimationV3 = "TypingAnimationV3",
|
|
125
|
-
ChatPreviewV3 = "ChatPreviewV3",
|
|
126
|
-
ChatPreviewComparisonV3 = "ChatPreviewComparisonV3",
|
|
127
|
-
ChatPreviewLoadingV3 = "ChatPreviewLoadingV3",
|
|
128
|
-
ImagePromptCardV3 = "ImagePromptCardV3",
|
|
129
|
-
PromptButtonCarouselWithImageV3 = "PromptButtonCarouselWithImageV3",
|
|
130
|
-
ImageBannerV3 = "ImageBannerV3",
|
|
131
|
-
SingleImagePromptV3 = "SingleImagePromptV3",
|
|
132
|
-
FloatingChatV3 = "FloatingChatV3",
|
|
133
|
-
FloatingButtonV3 = "FloatingButtonV3",
|
|
134
|
-
}
|
|
135
|
-
interface BaseWidgetConfig<T extends WidgetTypeV3> {
|
|
136
|
-
widgetConfigId: string;
|
|
137
|
-
type: T;
|
|
138
|
-
contentId?: string;
|
|
139
|
-
}
|
|
140
|
-
interface PromptCarouselWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.PromptCarouselV3> {
|
|
141
|
-
promptButtonType?: PromptButtonVariant;
|
|
142
|
-
boldFirstButton?: boolean;
|
|
143
|
-
promptCarouselRows?: PromptCarouselRows;
|
|
144
|
-
animationSpeed?: AnimationSpeed;
|
|
145
|
-
}
|
|
146
|
-
interface TitledPromptCarouselWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.TitledPromptCarouselV3> {
|
|
147
|
-
promptButtonType?: PromptButtonVariant;
|
|
148
|
-
boldFirstButton?: boolean;
|
|
149
|
-
promptCarouselRows?: PromptCarouselRows;
|
|
150
|
-
animationSpeed?: AnimationSpeed;
|
|
151
|
-
}
|
|
152
|
-
declare enum SocialProofWidgetKind {
|
|
153
|
-
STATIC = "static",
|
|
154
|
-
DYNAMIC = "dynamic",
|
|
155
|
-
}
|
|
156
|
-
interface SocialProofWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.SocialProofV3> {
|
|
157
|
-
kind: SocialProofWidgetKind;
|
|
158
|
-
variant: WidgetWrapperVariant;
|
|
159
|
-
hexCardColor?: string;
|
|
160
|
-
promptCarouselRows: PromptCarouselRows;
|
|
161
|
-
hideImage?: boolean;
|
|
162
|
-
imageGalleryLayout: Exclude<ImageGalleryLayout, 'TWO_SIDE'>;
|
|
163
|
-
hideTextField?: boolean;
|
|
164
|
-
primaryButtonVariant: Exclude<PromptButtonVariant, 'suggestedResponse' | 'ghost'>;
|
|
165
|
-
secondaryButtonVariant: Exclude<PromptButtonVariant, 'suggestedResponse' | 'ghost'>;
|
|
166
|
-
dynamicLayout?: DynamicLayout;
|
|
167
|
-
images?: ImageGalleryImage[];
|
|
168
|
-
}
|
|
169
|
-
interface TypingAnimationWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.TypingAnimationV3> {
|
|
170
|
-
widgetVariant?: WidgetWrapperVariant;
|
|
171
|
-
cardColor?: string;
|
|
172
|
-
promptButtonType?: PromptButtonVariant;
|
|
173
|
-
promptCarouselRows?: PromptCarouselRows;
|
|
174
|
-
showTextField?: boolean;
|
|
175
|
-
}
|
|
176
|
-
interface ChatPreviewComparisonWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewComparisonV3> {
|
|
177
|
-
variant: WidgetWrapperVariant;
|
|
178
|
-
hexCardColor?: string;
|
|
179
|
-
hideImage?: boolean;
|
|
180
|
-
hideTextField?: boolean;
|
|
181
|
-
}
|
|
182
|
-
interface ChatPreviewLoadingWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewLoadingV3> {
|
|
183
|
-
variant: WidgetWrapperVariant;
|
|
184
|
-
hexCardColor?: string;
|
|
185
|
-
hideTextField?: boolean;
|
|
186
|
-
}
|
|
187
|
-
interface ChatPreviewWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewV3> {
|
|
188
|
-
variant: WidgetWrapperVariant;
|
|
189
|
-
hexCardColor?: string;
|
|
190
|
-
hideTextField?: boolean;
|
|
191
|
-
}
|
|
192
|
-
interface PromptButtonCarouselWithImageWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.PromptButtonCarouselWithImageV3> {
|
|
193
|
-
promptButtonType?: PromptButtonVariant;
|
|
194
|
-
image?: ImageGalleryImage;
|
|
195
|
-
hideTextField?: boolean;
|
|
196
|
-
}
|
|
197
|
-
interface FloatingChatWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.FloatingChatV3> {}
|
|
198
|
-
type WidgetConfigV3 = PromptCarouselWidgetV3Config | SocialProofWidgetV3Config | TitledPromptCarouselWidgetV3Config | ChatPreviewComparisonWidgetV3Config | ChatPreviewLoadingWidgetV3Config | TypingAnimationWidgetV3Config | ChatPreviewWidgetV3Config | PromptButtonCarouselWithImageWidgetV3Config | FloatingChatWidgetV3Config;
|
|
199
|
-
//#endregion
|
|
200
|
-
//#endregion
|
|
201
|
-
export { type OrgUIConfigV3, type WidgetConfigV3, WidgetTypeV3 };
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { CustomerServiceType } from "../types/customerService.js";
|
|
2
|
-
import { MerchantVariantSettings, 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 { DynamicLayout } from "@envive-ai/react-toolkit-v3/SocialProof";
|
|
6
|
-
import { WidgetWrapperVariant } from "@envive-ai/react-toolkit-v3/WidgetWrapper";
|
|
7
|
-
import { ImageGalleryImage, ImageGalleryLayout } from "@envive-ai/react-toolkit-v3/ImageGallery";
|
|
8
|
-
import { PromptButtonVariant } from "@envive-ai/react-toolkit-v3/PromptButton";
|
|
9
|
-
import { SparkleIconColor } from "@envive-ai/react-toolkit-v3/WelcomeMessage";
|
|
10
|
-
|
|
11
|
-
//#region ../hooks/dist/contexts/typesV3.d.ts
|
|
12
|
-
|
|
13
|
-
type ImageAspectRatio = '1/1' | '3/4';
|
|
14
|
-
type ButtonColors = {
|
|
15
|
-
lightButtonBackgroundColor: string;
|
|
16
|
-
lightButtonIconColor: string;
|
|
17
|
-
darkButtonBackgroundColor: string;
|
|
18
|
-
darkButtonIconColor: string;
|
|
19
|
-
};
|
|
20
|
-
type Typography = {
|
|
21
|
-
titleFontFamily: string;
|
|
22
|
-
headerFontFamily: string;
|
|
23
|
-
bodyFontFamily: string;
|
|
24
|
-
fontSize?: {
|
|
25
|
-
t1: string;
|
|
26
|
-
t2: string;
|
|
27
|
-
t3: string;
|
|
28
|
-
h1: string;
|
|
29
|
-
h2: string;
|
|
30
|
-
h3: string;
|
|
31
|
-
b1: string;
|
|
32
|
-
b2: string;
|
|
33
|
-
b3: string;
|
|
34
|
-
b4: string;
|
|
35
|
-
b5: string;
|
|
36
|
-
l1: string;
|
|
37
|
-
l2: string;
|
|
38
|
-
};
|
|
39
|
-
fontWeight?: {
|
|
40
|
-
rg: string;
|
|
41
|
-
md: string;
|
|
42
|
-
sb: string;
|
|
43
|
-
};
|
|
44
|
-
letterSpacing?: {
|
|
45
|
-
'0': string;
|
|
46
|
-
'wide-1': string;
|
|
47
|
-
};
|
|
48
|
-
lineHeight?: {
|
|
49
|
-
'124': number;
|
|
50
|
-
'120': number;
|
|
51
|
-
'118': number;
|
|
52
|
-
'116': number;
|
|
53
|
-
'114': number;
|
|
54
|
-
'148': number;
|
|
55
|
-
'140': number;
|
|
56
|
-
'128': number;
|
|
57
|
-
'130': number;
|
|
58
|
-
'133': number;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
type LookAndFeelConfig = {
|
|
62
|
-
theme: Theme;
|
|
63
|
-
agentName: string;
|
|
64
|
-
chatHeaderLogoDarkSrc: string;
|
|
65
|
-
chatHeaderLogoLightSrc: string;
|
|
66
|
-
widgetLogoSrc: string;
|
|
67
|
-
hideWidgetLogo: boolean;
|
|
68
|
-
elementRadius: number;
|
|
69
|
-
imageAspectRatio: ImageAspectRatio;
|
|
70
|
-
buttonColors: ButtonColors;
|
|
71
|
-
typography: Typography;
|
|
72
|
-
};
|
|
73
|
-
declare enum ConfigVersionEnum {
|
|
74
|
-
V3 = "v3",
|
|
75
|
-
Deprecated = "deprecated",
|
|
76
|
-
}
|
|
77
|
-
type ConfigVersion = ConfigVersionEnum.V3 | ConfigVersionEnum.Deprecated | undefined;
|
|
78
|
-
type Mode = 'dark' | 'light';
|
|
79
|
-
type Position = 'bottomLeft' | 'middleLeft' | 'middleRight' | 'bottomRight';
|
|
80
|
-
type ShowOptions = 'always' | 'postInteraction' | 'none';
|
|
81
|
-
type Style = 'attached' | 'detached';
|
|
82
|
-
type FloatingButtonConfig = {
|
|
83
|
-
position: Position;
|
|
84
|
-
backgroundColor?: string;
|
|
85
|
-
mode: Mode;
|
|
86
|
-
showOption: ShowOptions;
|
|
87
|
-
iconSVGSrc?: string;
|
|
88
|
-
style: Style;
|
|
89
|
-
};
|
|
90
|
-
type FloatingChatConfig = {
|
|
91
|
-
headerBackgroundColor?: string;
|
|
92
|
-
headerMode: Mode;
|
|
93
|
-
welcomeMessageIconColor: SparkleIconColor;
|
|
94
|
-
showVerifiedBuyer: boolean;
|
|
95
|
-
userQueryInputEnabled: boolean;
|
|
96
|
-
showEnviveLogo: boolean;
|
|
97
|
-
ignoreFirstModelResponse?: boolean;
|
|
98
|
-
neverShowSingleProductCards?: boolean;
|
|
99
|
-
welcomeMessageTitle: string;
|
|
100
|
-
welcomeMessageText: string;
|
|
101
|
-
chatFooterTextFieldPlaceholderText: string;
|
|
102
|
-
};
|
|
103
|
-
type CustomerServiceIntegration = {
|
|
104
|
-
enabled: boolean;
|
|
105
|
-
provider: CustomerServiceType;
|
|
106
|
-
suppressMerchantButton?: boolean;
|
|
107
|
-
};
|
|
108
|
-
type OrgUIConfigV3 = {
|
|
109
|
-
id?: string;
|
|
110
|
-
version: ConfigVersion;
|
|
111
|
-
shortName: string;
|
|
112
|
-
lookAndFeel: LookAndFeelConfig;
|
|
113
|
-
floatingButton: FloatingButtonConfig;
|
|
114
|
-
floatingChat: FloatingChatConfig;
|
|
115
|
-
merchantOverrideCss?: string;
|
|
116
|
-
customerServiceIntegration?: CustomerServiceIntegration;
|
|
117
|
-
merchantVariantSettings?: MerchantVariantSettings;
|
|
118
|
-
searchConfig?: SearchConfig;
|
|
119
|
-
};
|
|
120
|
-
declare enum WidgetTypeV3 {
|
|
121
|
-
PromptCarouselV3 = "PromptCarouselV3",
|
|
122
|
-
TitledPromptCarouselV3 = "TitledPromptCarouselV3",
|
|
123
|
-
SocialProofV3 = "SocialProofV3",
|
|
124
|
-
TypingAnimationV3 = "TypingAnimationV3",
|
|
125
|
-
ChatPreviewV3 = "ChatPreviewV3",
|
|
126
|
-
ChatPreviewComparisonV3 = "ChatPreviewComparisonV3",
|
|
127
|
-
ChatPreviewLoadingV3 = "ChatPreviewLoadingV3",
|
|
128
|
-
ImagePromptCardV3 = "ImagePromptCardV3",
|
|
129
|
-
PromptButtonCarouselWithImageV3 = "PromptButtonCarouselWithImageV3",
|
|
130
|
-
ImageBannerV3 = "ImageBannerV3",
|
|
131
|
-
SingleImagePromptV3 = "SingleImagePromptV3",
|
|
132
|
-
FloatingChatV3 = "FloatingChatV3",
|
|
133
|
-
FloatingButtonV3 = "FloatingButtonV3",
|
|
134
|
-
}
|
|
135
|
-
interface BaseWidgetConfig<T extends WidgetTypeV3> {
|
|
136
|
-
widgetConfigId: string;
|
|
137
|
-
type: T;
|
|
138
|
-
contentId?: string;
|
|
139
|
-
}
|
|
140
|
-
interface PromptCarouselWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.PromptCarouselV3> {
|
|
141
|
-
promptButtonType?: PromptButtonVariant;
|
|
142
|
-
boldFirstButton?: boolean;
|
|
143
|
-
promptCarouselRows?: PromptCarouselRows;
|
|
144
|
-
animationSpeed?: AnimationSpeed;
|
|
145
|
-
}
|
|
146
|
-
interface TitledPromptCarouselWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.TitledPromptCarouselV3> {
|
|
147
|
-
promptButtonType?: PromptButtonVariant;
|
|
148
|
-
boldFirstButton?: boolean;
|
|
149
|
-
promptCarouselRows?: PromptCarouselRows;
|
|
150
|
-
animationSpeed?: AnimationSpeed;
|
|
151
|
-
}
|
|
152
|
-
declare enum SocialProofWidgetKind {
|
|
153
|
-
STATIC = "static",
|
|
154
|
-
DYNAMIC = "dynamic",
|
|
155
|
-
}
|
|
156
|
-
interface SocialProofWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.SocialProofV3> {
|
|
157
|
-
kind: SocialProofWidgetKind;
|
|
158
|
-
variant: WidgetWrapperVariant;
|
|
159
|
-
hexCardColor?: string;
|
|
160
|
-
promptCarouselRows: PromptCarouselRows;
|
|
161
|
-
hideImage?: boolean;
|
|
162
|
-
imageGalleryLayout: Exclude<ImageGalleryLayout, 'TWO_SIDE'>;
|
|
163
|
-
hideTextField?: boolean;
|
|
164
|
-
primaryButtonVariant: Exclude<PromptButtonVariant, 'suggestedResponse' | 'ghost'>;
|
|
165
|
-
secondaryButtonVariant: Exclude<PromptButtonVariant, 'suggestedResponse' | 'ghost'>;
|
|
166
|
-
dynamicLayout?: DynamicLayout;
|
|
167
|
-
images?: ImageGalleryImage[];
|
|
168
|
-
}
|
|
169
|
-
interface TypingAnimationWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.TypingAnimationV3> {
|
|
170
|
-
widgetVariant?: WidgetWrapperVariant;
|
|
171
|
-
cardColor?: string;
|
|
172
|
-
promptButtonType?: PromptButtonVariant;
|
|
173
|
-
promptCarouselRows?: PromptCarouselRows;
|
|
174
|
-
showTextField?: boolean;
|
|
175
|
-
}
|
|
176
|
-
interface ChatPreviewComparisonWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewComparisonV3> {
|
|
177
|
-
variant: WidgetWrapperVariant;
|
|
178
|
-
hexCardColor?: string;
|
|
179
|
-
hideImage?: boolean;
|
|
180
|
-
hideTextField?: boolean;
|
|
181
|
-
}
|
|
182
|
-
interface ChatPreviewLoadingWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewLoadingV3> {
|
|
183
|
-
variant: WidgetWrapperVariant;
|
|
184
|
-
hexCardColor?: string;
|
|
185
|
-
hideTextField?: boolean;
|
|
186
|
-
}
|
|
187
|
-
interface ChatPreviewWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewV3> {
|
|
188
|
-
variant: WidgetWrapperVariant;
|
|
189
|
-
hexCardColor?: string;
|
|
190
|
-
hideTextField?: boolean;
|
|
191
|
-
}
|
|
192
|
-
interface PromptButtonCarouselWithImageWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.PromptButtonCarouselWithImageV3> {
|
|
193
|
-
promptButtonType?: PromptButtonVariant;
|
|
194
|
-
image?: ImageGalleryImage;
|
|
195
|
-
hideTextField?: boolean;
|
|
196
|
-
}
|
|
197
|
-
interface FloatingChatWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.FloatingChatV3> {}
|
|
198
|
-
type WidgetConfigV3 = PromptCarouselWidgetV3Config | SocialProofWidgetV3Config | TitledPromptCarouselWidgetV3Config | ChatPreviewComparisonWidgetV3Config | ChatPreviewLoadingWidgetV3Config | TypingAnimationWidgetV3Config | ChatPreviewWidgetV3Config | PromptButtonCarouselWithImageWidgetV3Config | FloatingChatWidgetV3Config;
|
|
199
|
-
//#endregion
|
|
200
|
-
//#endregion
|
|
201
|
-
export { type OrgUIConfigV3, type WidgetConfigV3, WidgetTypeV3 };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
//#region ../hooks/dist/services/amplitudeService/amplitudeService.d.ts
|
|
2
|
-
|
|
3
|
-
//#region src/services/amplitudeService/amplitudeService.d.ts
|
|
4
|
-
declare enum SpiffyMetricsEventName {
|
|
5
|
-
BundleLoaded = "Bundle Loaded",
|
|
6
|
-
ChatLiveAgentBtnClick = "Chat Live Agent Btn Click",
|
|
7
|
-
ChatFloatingButtonVisible = "Chat Floating Button Visible",
|
|
8
|
-
ChatComponentVisible = "Chat Component Visible",
|
|
9
|
-
ChatComponentExpanded = "Chat Component Expanded",
|
|
10
|
-
ChatComponentCollapsed = "Chat Component Collapsed",
|
|
11
|
-
ChatUserMessageInput = "Chat User Message Input",
|
|
12
|
-
ChatSuggestionClicked = "Chat Suggestion Clicked",
|
|
13
|
-
ChatAssistantResponse = "Chat Assistant Response",
|
|
14
|
-
ProductCardClicked = "Product Card Clicked",
|
|
15
|
-
ProductReviewCardClicked = "Product Review Card Clicked",
|
|
16
|
-
AddToCartClicked = "Add To Cart Clicked",
|
|
17
|
-
PromptCardClicked = "Prompt Card Clicked",
|
|
18
|
-
SupportedEvent = "Supported Event",
|
|
19
|
-
SearchBackToResponseClicked = "Search Back to Response Clicked",
|
|
20
|
-
PerformanceMetrics = "Performance Metrics",
|
|
21
|
-
SearchBarClicked = "Search Bar Clicked",
|
|
22
|
-
OrderLookupStarted = "Order Lookup Started",
|
|
23
|
-
OrderLookupFormSubmitted = "Order Lookup Form Submitted",
|
|
24
|
-
SearchComponentVisible = "Search Component Visible",
|
|
25
|
-
SearchZeroStateSuggestionClicked = "Search Zero State Suggestion Clicked",
|
|
26
|
-
// This is the scrolling list of suggestion buttons in global search
|
|
27
|
-
SearchInputStarted = "Search Input Started",
|
|
28
|
-
SearchQuerySubmitted = "Search Query Submitted",
|
|
29
|
-
SearchResultsViewed = "Search Results Viewed",
|
|
30
|
-
SearchTimeToFirstClick = "Search Time to First Click",
|
|
31
|
-
SearchZeroResultsRate = "Search Zero Results Rate",
|
|
32
|
-
SearchFilterClicked = "Search Filter Clicked",
|
|
33
|
-
SearchSortClicked = "Search Sort Clicked",
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
export { SpiffyMetricsEventName };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import "../../contexts/featureFlagServiceContext/featureFlagServiceContext.js";
|
|
2
|
-
|
|
3
|
-
//#region ../hooks/dist/services/amplitudeService/amplitudeService.d.ts
|
|
4
|
-
//#region src/services/amplitudeService/amplitudeService.d.ts
|
|
5
|
-
declare enum SpiffyMetricsEventName {
|
|
6
|
-
BundleLoaded = "Bundle Loaded",
|
|
7
|
-
ChatLiveAgentBtnClick = "Chat Live Agent Btn Click",
|
|
8
|
-
ChatFloatingButtonVisible = "Chat Floating Button Visible",
|
|
9
|
-
ChatComponentVisible = "Chat Component Visible",
|
|
10
|
-
ChatComponentExpanded = "Chat Component Expanded",
|
|
11
|
-
ChatComponentCollapsed = "Chat Component Collapsed",
|
|
12
|
-
ChatUserMessageInput = "Chat User Message Input",
|
|
13
|
-
ChatSuggestionClicked = "Chat Suggestion Clicked",
|
|
14
|
-
ChatAssistantResponse = "Chat Assistant Response",
|
|
15
|
-
ProductCardClicked = "Product Card Clicked",
|
|
16
|
-
ProductReviewCardClicked = "Product Review Card Clicked",
|
|
17
|
-
AddToCartClicked = "Add To Cart Clicked",
|
|
18
|
-
PromptCardClicked = "Prompt Card Clicked",
|
|
19
|
-
SupportedEvent = "Supported Event",
|
|
20
|
-
SearchBackToResponseClicked = "Search Back to Response Clicked",
|
|
21
|
-
PerformanceMetrics = "Performance Metrics",
|
|
22
|
-
SearchBarClicked = "Search Bar Clicked",
|
|
23
|
-
OrderLookupStarted = "Order Lookup Started",
|
|
24
|
-
OrderLookupFormSubmitted = "Order Lookup Form Submitted",
|
|
25
|
-
SearchComponentVisible = "Search Component Visible",
|
|
26
|
-
SearchZeroStateSuggestionClicked = "Search Zero State Suggestion Clicked",
|
|
27
|
-
// This is the scrolling list of suggestion buttons in global search
|
|
28
|
-
SearchInputStarted = "Search Input Started",
|
|
29
|
-
SearchQuerySubmitted = "Search Query Submitted",
|
|
30
|
-
SearchResultsViewed = "Search Results Viewed",
|
|
31
|
-
SearchTimeToFirstClick = "Search Time to First Click",
|
|
32
|
-
SearchZeroResultsRate = "Search Zero Results Rate",
|
|
33
|
-
SearchFilterClicked = "Search Filter Clicked",
|
|
34
|
-
SearchSortClicked = "Search Sort Clicked",
|
|
35
|
-
}
|
|
36
|
-
//#endregion
|
|
37
|
-
export { SpiffyMetricsEventName };
|
|
@@ -1,18 +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
|
-
unsupported = "unsupported",
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { CustomerServiceType };
|
|
@@ -1,18 +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
|
-
unsupported = "unsupported",
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { CustomerServiceType };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { SearchEntryPointWidgetConfig, SearchInputVariant } from "../packages/hooks/dist/contexts/types.js";
|
|
2
|
-
import { SearchZeroStateProps } from "./types.js";
|
|
3
|
-
import { SearchZeroState } from "./SearchZeroState.js";
|
|
4
|
-
import { SearchZeroStateWidget } from "./SearchZeroStateWidget.js";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CamelCasedPropertiesDeep } from "../utilityTypes/camelCasedPropertiesDeep.cjs";
|
|
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,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,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 };
|
package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.cts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { SplitWords } from "./splitWords.cjs";
|
|
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 };
|