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

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 (143) hide show
  1. package/dist/CXIntegration/implementations/useHelpScoutUnifiedCXButton.cjs +65 -0
  2. package/dist/CXIntegration/implementations/useHelpScoutUnifiedCXButton.js +64 -0
  3. package/dist/CXIntegration/implementations/useTalkdeskUnifiedCXButton.cjs +64 -0
  4. package/dist/CXIntegration/implementations/useTalkdeskUnifiedCXButton.js +63 -0
  5. package/dist/CXIntegration/types.cjs +2 -0
  6. package/dist/CXIntegration/types.js +2 -0
  7. package/dist/CXIntegration/utils/functions.cjs +4 -0
  8. package/dist/CXIntegration/utils/functions.js +4 -0
  9. package/dist/hocs/withBaseWidget/types.d.cts +3 -3
  10. package/dist/hocs/withBaseWidget/types.d.ts +5 -3
  11. package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
  12. package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
  13. package/dist/hooks/dist/application/models/api/widgetText.d.cts +8 -0
  14. package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.cts +12 -0
  15. package/dist/hooks/dist/contexts/types.d.cts +38 -0
  16. package/dist/hooks/dist/contexts/typesV3.d.cts +239 -0
  17. package/dist/hooks/dist/services/amplitudeService/eventNames.d.cts +43 -0
  18. package/dist/hooks/dist/types/customerService.d.cts +21 -0
  19. package/dist/packages/hooks/dist/application/models/api/orgConfigResults.d.ts +1 -0
  20. package/dist/packages/hooks/dist/application/models/api/widgetText.d.ts +8 -0
  21. package/dist/packages/hooks/dist/application/models/frontendConfig.d.ts +1 -0
  22. package/dist/packages/hooks/dist/contexts/amplitudeContext/amplitudeContext.d.ts +2 -0
  23. package/dist/packages/hooks/dist/contexts/amplitudeContext/index.d.ts +2 -0
  24. package/dist/packages/hooks/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.ts +2 -0
  25. package/dist/packages/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +14 -0
  26. package/dist/packages/hooks/dist/contexts/hardcopyContext/index.d.ts +1 -0
  27. package/dist/packages/hooks/dist/contexts/types.d.ts +42 -0
  28. package/dist/packages/hooks/dist/contexts/typesV3.d.ts +239 -0
  29. package/dist/packages/hooks/dist/services/amplitudeService/amplitudeService.d.ts +1 -0
  30. package/dist/packages/hooks/dist/services/amplitudeService/eventNames.d.ts +43 -0
  31. package/dist/packages/hooks/dist/types/customerService.d.ts +21 -0
  32. package/dist/packages/widgets/dist/SearchResults/SearchResults.d.ts +3 -2
  33. package/dist/packages/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
  34. package/dist/packages/widgets/dist/SearchZeroState/index.d.ts +2 -1
  35. package/dist/packages/widgets/dist/SearchZeroState/types.d.ts +2 -2
  36. package/dist/packages/widgets/dist/SuggestionBar/SuggestionBar.d.ts +3 -3
  37. package/dist/packages/widgets/dist/SuggestionButtonContainer/index.d.ts +2 -0
  38. package/dist/packages/widgets/dist/SuggestionButtonContainer/types.d.ts +3 -2
  39. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/api/response.d.ts +14 -0
  40. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/api/search.d.ts +15 -0
  41. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts +73 -0
  42. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +61 -0
  43. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts +25 -0
  44. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts +35 -0
  45. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts +32 -0
  46. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +32 -0
  47. package/dist/packages/widgets/dist/packages/hooks/dist/application/models/variantInfo/variantInfo.d.ts +1 -0
  48. package/dist/packages/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts +15 -0
  49. package/dist/packages/widgets/dist/packages/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +1 -0
  50. package/dist/packages/widgets/dist/packages/hooks/dist/contexts/types.d.ts +63 -0
  51. package/dist/packages/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.ts +60 -0
  52. package/dist/packages/widgets/dist/packages/hooks/dist/hooks/utils.d.ts +13 -0
  53. package/dist/packages/widgets/dist/packages/hooks/dist/types/OrgInfo.d.ts +1 -0
  54. package/dist/packages/widgets/dist/packages/hooks/dist/types/index.d.ts +1 -0
  55. package/dist/packages/widgets/dist/packages/hooks/dist/types/search-filter-types.d.ts +28 -0
  56. package/dist/packages/widgets/dist/packages/hooks/dist/types/test-types.d.ts +10 -0
  57. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
  58. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
  59. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
  60. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +3 -3
  61. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
  62. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +29 -5
  63. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
  64. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
  65. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +30 -6
  66. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +2 -2
  67. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +2 -2
  68. package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +19 -3
  69. package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
  70. package/dist/widgets/ProductCardWidget/ProductCardWidget.d.ts +2 -2
  71. package/dist/widgets/ProductCardWidget/ProductCardWidget.js +20 -4
  72. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +10 -0
  73. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
  74. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
  75. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +12 -2
  76. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +15 -10
  77. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
  78. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
  79. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +16 -11
  80. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
  81. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +2 -2
  82. package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +10 -0
  83. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
  84. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
  85. package/dist/widgets/SocialProofWidget/SocialProofWidget.js +12 -2
  86. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +11 -0
  87. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
  88. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
  89. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +12 -1
  90. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +2 -2
  91. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
  92. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +23 -3
  93. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
  94. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
  95. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +24 -4
  96. package/dist/widgets/dist/SearchResults/SearchResults.d.cts +3 -2
  97. package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
  98. package/dist/widgets/dist/SearchZeroState/types.d.cts +2 -2
  99. package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.cts +3 -3
  100. package/dist/widgets/dist/SuggestionButtonContainer/types.d.cts +3 -2
  101. package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.cts +14 -0
  102. package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.cts +15 -0
  103. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.cts +73 -0
  104. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +61 -0
  105. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.cts +25 -0
  106. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.cts +35 -0
  107. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.cts +32 -0
  108. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +32 -0
  109. package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.cts +14 -0
  110. package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.cts +61 -0
  111. package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.cts +60 -0
  112. package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.cts +12 -0
  113. package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.cts +28 -0
  114. package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.cts +10 -0
  115. package/dist/widgets/utils/functions.cjs +9 -0
  116. package/dist/widgets/utils/functions.js +9 -1
  117. package/dist/widgets-v2/SearchZeroState/index.d.cts +2 -1
  118. package/dist/widgets-v2/SearchZeroState/index.d.ts +2 -1
  119. package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +1 -0
  120. package/package.json +1 -1
  121. package/src/CXIntegration/implementations/useHelpScoutUnifiedCXButton.ts +108 -0
  122. package/src/CXIntegration/implementations/useTalkdeskUnifiedCXButton.ts +94 -0
  123. package/src/CXIntegration/types.ts +2 -0
  124. package/src/CXIntegration/utils/functions.ts +8 -0
  125. package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +15 -3
  126. package/src/widgets/ChatPreviewWidget/__tests__/ChatPreviewWidget.test.tsx +114 -0
  127. package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +56 -15
  128. package/src/widgets/FloatingChatWidget/__tests__/FloatingChatWidget.test.tsx +119 -0
  129. package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +15 -3
  130. package/src/widgets/ProductCardWidget/__tests__/ProductCardWidget.test.tsx +144 -0
  131. package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +12 -1
  132. package/src/widgets/PromptButtonCarouselWithImageWidget/__tests__/PromptButtonCarouselWithImageWidget.test.tsx +179 -0
  133. package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +33 -23
  134. package/src/widgets/PromptCarouselWidget/__tests__/PromptCarouselWidget.test.tsx +150 -0
  135. package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +12 -1
  136. package/src/widgets/SocialProofWidget/__tests__/SocialProofWidget.test.tsx +184 -0
  137. package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +12 -0
  138. package/src/widgets/TitledPromptCarouselWidget/__tests__/TitledPromptCarouselWidget.test.tsx +150 -0
  139. package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +19 -2
  140. package/src/widgets/TypingAnimationWidget/__tests__/TypingAnimationWidget.test.tsx +163 -0
  141. package/src/widgets/__tests__/testUtils.tsx +63 -0
  142. package/src/widgets/__tests__/trackEventCanary.test.ts +45 -0
  143. package/src/widgets/utils/functions.ts +16 -0
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime19 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): react_jsx_runtime1.JSX.Element;
10
+ }: TitledPromptCarouselWidgetProps): react_jsx_runtime19.JSX.Element;
11
11
  displayName: string;
12
12
  };
13
13
  //#endregion
@@ -1,7 +1,8 @@
1
1
  import { withBaseWidget } from "../../hocs/withBaseWidget/withBaseWidget.js";
2
2
  import "../../hocs/withBaseWidget/index.js";
3
+ import { getStringIdForText } from "../utils/functions.js";
3
4
  import { useCallback, useEffect } from "react";
4
- import { SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
5
+ import { EnviveMetricsEventName, SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
  import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
7
8
  import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
@@ -55,6 +56,16 @@ const TitledPromptCarouselWidgetHandler = (props) => {
55
56
  promptCarouselRows,
56
57
  animationSpeed,
57
58
  handleButtonClick: useCallback((text) => {
59
+ const rawValues = hardcopyContent?.rawValues;
60
+ const stringId = getStringIdForText(rawValues, text);
61
+ trackEvent({
62
+ eventName: EnviveMetricsEventName.WidgetTextClicked,
63
+ eventProps: {
64
+ response_id: hardcopyContent?.responseId,
65
+ string_id: stringId,
66
+ text
67
+ }
68
+ });
58
69
  onTypedMessageSubmitted({
59
70
  query: text,
60
71
  userTyped: false,
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 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): react_jsx_runtime1.JSX.Element;
10
+ }: TypingAnimationFlowWidgetProps): react_jsx_runtime0.JSX.Element;
11
11
  displayName: string;
12
12
  };
13
13
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime10 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 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): react_jsx_runtime10.JSX.Element;
10
+ }: TypingAnimationFlowWidgetProps): react_jsx_runtime0.JSX.Element;
11
11
  displayName: string;
12
12
  };
13
13
  //#endregion
@@ -1,6 +1,7 @@
1
1
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
2
  const require_withBaseWidget = require('../../hocs/withBaseWidget/withBaseWidget.cjs');
3
3
  require('../../hocs/withBaseWidget/index.cjs');
4
+ const require_functions = require('../utils/functions.cjs');
4
5
  let react = require("react");
5
6
  let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
6
7
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -28,7 +29,7 @@ const mockHintText = "Ask me anything";
28
29
  const TypingAnimationWidgetHandler = (props) => {
29
30
  const { onTypedMessageSubmitted } = (0, __envive_ai_react_hooks_contexts_salesAgentContext.useSalesAgent)();
30
31
  const onToggle = (0, jotai.useSetAtom)(__envive_ai_react_hooks_atoms_chat_chatState.chatOnToggleAtom);
31
- const { hardcopyContent, widgetConfig, isLoading, widgetConfigId } = props;
32
+ const { hardcopyContent, widgetConfig, uiConfig, isLoading, widgetConfigId } = props;
32
33
  const titleLabel = hardcopyContent?.values?.titleLabel || "";
33
34
  const headlineText = hardcopyContent?.values?.headlineText || "";
34
35
  const animatedTextSequence = hardcopyContent?.values?.animatedTextSequence || [];
@@ -43,6 +44,8 @@ const TypingAnimationWidgetHandler = (props) => {
43
44
  const promptButtonType = typingAnimationWidgetConfig?.promptButtonType || __envive_ai_react_toolkit_v3_PromptButton_types.PromptButtonVariant.LIGHT;
44
45
  const promptCarouselRows = typingAnimationWidgetConfig?.promptCarouselRows || __envive_ai_react_toolkit_v3_PromptCarousel.PromptCarouselRows.ALWAYS_ONE;
45
46
  const showTextField = typingAnimationWidgetConfig?.showTextField !== false;
47
+ const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
48
+ const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
46
49
  const { trackEvent } = (0, __envive_ai_react_hooks_contexts_amplitudeContext.useAmplitude)();
47
50
  (0, react.useEffect)(() => {
48
51
  trackEvent({
@@ -54,13 +57,28 @@ const TypingAnimationWidgetHandler = (props) => {
54
57
  });
55
58
  }, [trackEvent, widgetConfigId]);
56
59
  const handleButtonClick = (0, react.useCallback)((text) => {
60
+ const rawValues = hardcopyContent?.rawValues;
61
+ const stringId = require_functions.getStringIdForText(rawValues, text);
62
+ trackEvent({
63
+ eventName: __envive_ai_react_hooks_contexts_amplitudeContext.EnviveMetricsEventName.WidgetTextClicked,
64
+ eventProps: {
65
+ response_id: hardcopyContent?.responseId,
66
+ string_id: stringId,
67
+ text
68
+ }
69
+ });
57
70
  onTypedMessageSubmitted({
58
71
  query: text,
59
72
  userTyped: false,
60
73
  displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TYPING_ANIMATION
61
74
  });
62
75
  onToggle(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TYPING_ANIMATION);
63
- }, [onTypedMessageSubmitted, onToggle]);
76
+ }, [
77
+ hardcopyContent,
78
+ trackEvent,
79
+ onTypedMessageSubmitted,
80
+ onToggle
81
+ ]);
64
82
  const handleTextFieldClick = (0, react.useCallback)(() => {
65
83
  onToggle(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TYPING_ANIMATION);
66
84
  }, [onToggle]);
@@ -72,7 +90,9 @@ const TypingAnimationWidgetHandler = (props) => {
72
90
  animatedTextSequence: isLoading ? mockAnimatedTextSequence : animatedTextSequence,
73
91
  promptButtonTexts: buttonTexts,
74
92
  hintText: isLoading ? mockHintText : hintText,
75
- textFieldAriaLabel
93
+ textFieldAriaLabel,
94
+ logoSrc: logoSrc ?? void 0,
95
+ hideLogo: hideLogo ?? false
76
96
  },
77
97
  widgetStyleProps: {
78
98
  widgetVariant,
@@ -1,9 +1,9 @@
1
1
  import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
2
- import * as react_jsx_runtime18 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime14 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts
5
5
  declare const TypingAnimationWithBaseWidget: {
6
- (props: BaseWidgetProps): react_jsx_runtime18.JSX.Element;
6
+ (props: BaseWidgetProps): react_jsx_runtime14.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): react_jsx_runtime18.JSX.Element;
15
+ }: TypingAnimationWidgetProps): react_jsx_runtime14.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 react_jsx_runtime7 from "react/jsx-runtime";
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): react_jsx_runtime7.JSX.Element;
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): react_jsx_runtime7.JSX.Element;
15
+ }: TypingAnimationWidgetProps): react_jsx_runtime0.JSX.Element;
16
16
  displayName: string;
17
17
  };
18
18
  //#endregion
@@ -1,7 +1,8 @@
1
1
  import { withBaseWidget } from "../../hocs/withBaseWidget/withBaseWidget.js";
2
2
  import "../../hocs/withBaseWidget/index.js";
3
+ import { getStringIdForText } from "../utils/functions.js";
3
4
  import { useCallback, useEffect } from "react";
4
- import { SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
5
+ import { EnviveMetricsEventName, SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
  import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
7
8
  import { useSetAtom } from "jotai";
@@ -27,7 +28,7 @@ const mockHintText = "Ask me anything";
27
28
  const TypingAnimationWidgetHandler = (props) => {
28
29
  const { onTypedMessageSubmitted } = useSalesAgent();
29
30
  const onToggle = useSetAtom(chatOnToggleAtom);
30
- const { hardcopyContent, widgetConfig, isLoading, widgetConfigId } = props;
31
+ const { hardcopyContent, widgetConfig, uiConfig, isLoading, widgetConfigId } = props;
31
32
  const titleLabel = hardcopyContent?.values?.titleLabel || "";
32
33
  const headlineText = hardcopyContent?.values?.headlineText || "";
33
34
  const animatedTextSequence = hardcopyContent?.values?.animatedTextSequence || [];
@@ -42,6 +43,8 @@ const TypingAnimationWidgetHandler = (props) => {
42
43
  const promptButtonType = typingAnimationWidgetConfig?.promptButtonType || PromptButtonVariant.LIGHT;
43
44
  const promptCarouselRows = typingAnimationWidgetConfig?.promptCarouselRows || PromptCarouselRows.ALWAYS_ONE;
44
45
  const showTextField = typingAnimationWidgetConfig?.showTextField !== false;
46
+ const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
47
+ const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
45
48
  const { trackEvent } = useAmplitude();
46
49
  useEffect(() => {
47
50
  trackEvent({
@@ -53,13 +56,28 @@ const TypingAnimationWidgetHandler = (props) => {
53
56
  });
54
57
  }, [trackEvent, widgetConfigId]);
55
58
  const handleButtonClick = useCallback((text) => {
59
+ const rawValues = hardcopyContent?.rawValues;
60
+ const stringId = getStringIdForText(rawValues, text);
61
+ trackEvent({
62
+ eventName: EnviveMetricsEventName.WidgetTextClicked,
63
+ eventProps: {
64
+ response_id: hardcopyContent?.responseId,
65
+ string_id: stringId,
66
+ text
67
+ }
68
+ });
56
69
  onTypedMessageSubmitted({
57
70
  query: text,
58
71
  userTyped: false,
59
72
  displayLocation: ChatElementDisplayLocationV3.TYPING_ANIMATION
60
73
  });
61
74
  onToggle(ChatElementDisplayLocationV3.TYPING_ANIMATION);
62
- }, [onTypedMessageSubmitted, onToggle]);
75
+ }, [
76
+ hardcopyContent,
77
+ trackEvent,
78
+ onTypedMessageSubmitted,
79
+ onToggle
80
+ ]);
63
81
  const handleTextFieldClick = useCallback(() => {
64
82
  onToggle(ChatElementDisplayLocationV3.TYPING_ANIMATION);
65
83
  }, [onToggle]);
@@ -71,7 +89,9 @@ const TypingAnimationWidgetHandler = (props) => {
71
89
  animatedTextSequence: isLoading ? mockAnimatedTextSequence : animatedTextSequence,
72
90
  promptButtonTexts: buttonTexts,
73
91
  hintText: isLoading ? mockHintText : hintText,
74
- textFieldAriaLabel
92
+ textFieldAriaLabel,
93
+ logoSrc: logoSrc ?? void 0,
94
+ hideLogo: hideLogo ?? false
75
95
  },
76
96
  widgetStyleProps: {
77
97
  widgetVariant,
@@ -1,13 +1,14 @@
1
+ import { SearchResultsHocProps } from "../packages/hooks/dist/hooks/Search/useSearch.cjs";
1
2
  import { SearchResultsEntryPointWidgetConfig } from "./types.cjs";
2
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
3
- import { SearchResultsHocProps } from "@envive-ai/react-hooks/hooks/Search";
4
4
 
5
5
  //#region ../widgets/dist/SearchResults/SearchResults.d.ts
6
+
6
7
  //#region src/SearchResults/SearchResults.d.ts
7
8
  interface SearchResultsProps extends SearchResultsHocProps {
8
9
  widgetConfig: SearchResultsEntryPointWidgetConfig;
9
10
  }
10
- declare const SearchResults: (props: Omit<SearchResultsProps, string | number | symbol>) => react_jsx_runtime0.JSX.Element;
11
+ declare const SearchResults: (props: Omit<SearchResultsProps, keyof SearchResultsHocProps>) => react_jsx_runtime0.JSX.Element;
11
12
  //#endregion
12
13
 
13
14
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime3 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) => react_jsx_runtime2.JSX.Element;
14
+ }: SearchZeroStateWidgetProps) => react_jsx_runtime3.JSX.Element;
15
15
  //#endregion
16
16
 
17
17
  //#endregion
@@ -1,4 +1,4 @@
1
- import { SearchEntryPointWidgetConfig, SearchInputVariant } from "@envive-ai/react-hooks/contexts/types";
1
+ import { SearchEntryPointWidgetConfig } from "../packages/hooks/dist/contexts/types.cjs";
2
2
 
3
3
  //#region ../widgets/dist/SearchZeroState/types.d.ts
4
4
  //#region src/SearchZeroState/types.d.ts
@@ -10,4 +10,4 @@ interface SearchZeroStateProps {
10
10
  //#endregion
11
11
 
12
12
  //#endregion
13
- export { type SearchEntryPointWidgetConfig, type SearchInputVariant, SearchZeroStateProps };
13
+ export { SearchZeroStateProps };
@@ -1,6 +1,6 @@
1
+ import { SuggestionButtonVariant } from "../packages/hooks/dist/contexts/types.cjs";
1
2
  import { SuggestionBarLocationForMetrics } from "./types.cjs";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
3
- import { SuggestionButtonVariant } from "@envive-ai/react-hooks/contexts/types";
3
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
4
4
  import { Message } from "postcss";
5
5
 
6
6
  //#region ../widgets/dist/SuggestionBar/SuggestionBar.d.ts
@@ -30,7 +30,7 @@ declare function SuggestionBar({
30
30
  buttonBorderRadius,
31
31
  handleReply,
32
32
  dataTestId
33
- }: Readonly<SuggestionBarProps>): react_jsx_runtime3.JSX.Element;
33
+ }: Readonly<SuggestionBarProps>): react_jsx_runtime2.JSX.Element;
34
34
  //#endregion
35
35
  //#endregion
36
36
  export { SuggestionBar };
@@ -1,7 +1,8 @@
1
- import { SuggestionButtonVariant } from "@envive-ai/react-hooks/contexts/types";
2
- import { TestProps } from "@envive-ai/react-hooks/types";
1
+ import { TestProps } from "../packages/hooks/dist/types/test-types.cjs";
2
+ import { SuggestionButtonVariant } from "../packages/hooks/dist/contexts/types.cjs";
3
3
 
4
4
  //#region ../widgets/dist/SuggestionButtonContainer/types.d.ts
5
+
5
6
  //#region src/SuggestionButtonContainer/types.d.ts
6
7
  interface SuggestionButtonContainerProps extends TestProps {
7
8
  buttonVariation: SuggestionButtonVariant;
@@ -0,0 +1,14 @@
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 };
@@ -0,0 +1,15 @@
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 };
@@ -0,0 +1,73 @@
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 };
@@ -0,0 +1,61 @@
1
+ import { CamelCase, CamelCaseOptions } from "./camelCase.cjs";
2
+ import { UnknownArray } from "./unknownArray.cjs";
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 };
@@ -0,0 +1,25 @@
1
+ import { Trim } from "./trim.cjs";
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 };
@@ -0,0 +1,35 @@
1
+ import { IsLowerCase, IsNumeric, IsUpperCase, WordSeparators } from "./internal.cjs";
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 };
@@ -0,0 +1,32 @@
1
+ import { Whitespace } from "./internal.cjs";
2
+
3
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts
4
+
5
+ //#region ../hooks/dist/application/models/utilityTypes/trim.d.ts
6
+ //#region src/application/models/utilityTypes/trim.d.ts
7
+ /**
8
+ * Remove spaces from the left side.
9
+ */
10
+ type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
11
+ /**
12
+ * Remove spaces from the right side.
13
+ */
14
+ type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
15
+ /**
16
+ * Remove leading and trailing spaces from a string.
17
+ * @example
18
+ * ```
19
+ * import type {Trim} from 'type-fest';
20
+ *
21
+ * Trim<' foo '>
22
+ * //=> 'foo'
23
+ * ```
24
+ *
25
+ * @category String
26
+ * @category Template literal
27
+ */
28
+ type Trim<V extends string> = TrimLeft<TrimRight<V>>;
29
+ //#endregion
30
+ //#endregion
31
+ //#endregion
32
+ export { Trim };
@@ -0,0 +1,32 @@
1
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts
2
+ //#region ../hooks/dist/application/models/utilityTypes/unknownArray.d.ts
3
+ //#region src/application/models/utilityTypes/unknownArray.d.ts
4
+ /**
5
+ * Represents an array with `unknown` value.
6
+ *
7
+ * Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
8
+ *
9
+ * @example
10
+ * ```
11
+ * import type {UnknownArray} from 'type-fest';
12
+ *
13
+ * type IsArray<T> = T extends UnknownArray ? true : false;
14
+ *
15
+ * type A = IsArray<['foo']>;
16
+ * //=> true
17
+ *
18
+ * type B = IsArray<readonly number[]>;
19
+ * //=> true
20
+ *
21
+ * type C = IsArray<string>;
22
+ * //=> false
23
+ * ```
24
+ *
25
+ * @category Type
26
+ * @category Array
27
+ */
28
+ type UnknownArray = readonly unknown[];
29
+ //#endregion
30
+ //#endregion
31
+ //#endregion
32
+ export { UnknownArray };
@@ -0,0 +1,14 @@
1
+ //#region ../widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts
2
+
3
+ //#region ../hooks/dist/atoms/search/searchAPI.d.ts
4
+
5
+ //#region src/atoms/search/searchAPI.d.ts
6
+ type SelectedFilterOption = {
7
+ id: string;
8
+ displayName: string;
9
+ filterId: string;
10
+ filterItemId: string;
11
+ };
12
+ //#endregion
13
+ //#endregion
14
+ export { SelectedFilterOption };