@envive-ai/react-widgets 0.3.56 → 0.3.57
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/SearchResults/SearchResultsWidget.d.cts +2 -2
- package/dist/SearchZeroState/SearchZeroState.cjs +7 -4
- package/dist/SearchZeroState/SearchZeroState.js +6 -4
- package/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
- package/dist/SearchZeroState/components/RecommendedProducts.cjs +1 -1
- package/dist/SearchZeroState/components/RecommendedProducts.js +1 -1
- package/dist/SuggestionBar/SuggestionBar.d.cts +2 -2
- package/dist/SuggestionBar/SuggestionBar.js +1 -1
- package/package.json +1 -1
- package/src/SearchZeroState/SearchZeroState.tsx +4 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/SearchResults/SearchResultsWidget.d.ts
|
|
4
|
-
declare const SearchResultsWidget: () =>
|
|
4
|
+
declare const SearchResultsWidget: () => react_jsx_runtime3.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { SearchResultsWidget };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_Sparkles = require('../packages/icons/dist/Sparkles.cjs');
|
|
3
|
-
const require_IconCloseVariant = require('../packages/icons/dist/IconCloseVariant.cjs');
|
|
4
2
|
const require_SuggestionBar = require('../SuggestionBar/SuggestionBar.cjs');
|
|
5
3
|
require('../SuggestionBar/index.cjs');
|
|
4
|
+
const require_Sparkles = require('../packages/icons/dist/Sparkles.cjs');
|
|
5
|
+
const require_IconCloseVariant = require('../packages/icons/dist/IconCloseVariant.cjs');
|
|
6
6
|
const require_SearchOverlay = require('./SearchOverlay.cjs');
|
|
7
7
|
const require_zeroStateSearchVariants = require('./zeroStateSearchVariants.cjs');
|
|
8
8
|
const require_SearchIcon = require('./SearchIcon.cjs');
|
|
@@ -11,19 +11,22 @@ let react = require("react");
|
|
|
11
11
|
react = require_rolldown_runtime.__toESM(react);
|
|
12
12
|
let __envive_ai_react_hooks_hooks_Search = require("@envive-ai/react-hooks/hooks/Search");
|
|
13
13
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
14
15
|
let framer_motion = require("framer-motion");
|
|
15
16
|
let __envive_ai_react_hooks_hooks_AmplitudeOperations = require("@envive-ai/react-hooks/hooks/AmplitudeOperations");
|
|
16
17
|
let __envive_ai_react_hooks_types = require("@envive-ai/react-hooks/types");
|
|
17
|
-
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
18
18
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
19
19
|
let __envive_ai_react_toolkit_SearchInputForm = require("@envive-ai/react-toolkit/SearchInputForm");
|
|
20
20
|
let __envive_ai_react_toolkit_SearchInput = require("@envive-ai/react-toolkit/SearchInput");
|
|
21
|
+
let __envive_ai_react_hooks_application_logging = require("@envive-ai/react-hooks/application/logging");
|
|
22
|
+
__envive_ai_react_hooks_application_logging = require_rolldown_runtime.__toESM(__envive_ai_react_hooks_application_logging);
|
|
21
23
|
let __envive_ai_react_toolkit_Typography = require("@envive-ai/react-toolkit/Typography");
|
|
22
24
|
|
|
23
25
|
//#region src/SearchZeroState/SearchZeroState.tsx
|
|
24
26
|
const SEARCH_ENTRYPOINT_INPUT_TESTID = "spiffy-search-entrypoint-input";
|
|
27
|
+
const logger = new __envive_ai_react_hooks_application_logging.default("SearchZeroState");
|
|
25
28
|
const SearchZeroState = ({ widgetConfig, initialIsOpen, entryPointRef }) => {
|
|
26
|
-
|
|
29
|
+
logger.logDebug("widgetConfig", widgetConfig);
|
|
27
30
|
const { searchZeroStateVariant, searchInputVariant, searchIconVariant, searchIconSize = 24, searchBoxPlaceholder, layout, compactLabel, initialSuggestions = [], animationSpeed = "standard", suggestionButtonConfig, includeSubtitle, usingPortal = false } = widgetConfig;
|
|
28
31
|
const { variant: suggestionButtonVariant, hoverVariant: suggestionButtonHoverVariant, borderRadius: suggestionButtonBorderRadius } = suggestionButtonConfig;
|
|
29
32
|
const [isOpen, setIsOpen] = (0, react.useState)(!!initialIsOpen);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Sparkles_default } from "../packages/icons/dist/Sparkles.js";
|
|
2
|
-
import { IconCloseVariant_default } from "../packages/icons/dist/IconCloseVariant.js";
|
|
3
1
|
import { SuggestionBar } from "../SuggestionBar/SuggestionBar.js";
|
|
4
2
|
import "../SuggestionBar/index.js";
|
|
3
|
+
import { Sparkles_default } from "../packages/icons/dist/Sparkles.js";
|
|
4
|
+
import { IconCloseVariant_default } from "../packages/icons/dist/IconCloseVariant.js";
|
|
5
5
|
import { SearchOverlay } from "./SearchOverlay.js";
|
|
6
6
|
import { searchZeroStateVariantClasses } from "./zeroStateSearchVariants.js";
|
|
7
7
|
import { SearchIcon } from "./SearchIcon.js";
|
|
@@ -9,19 +9,21 @@ import { RecommendedProducts } from "./components/RecommendedProducts.js";
|
|
|
9
9
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
10
10
|
import { useSearch } from "@envive-ai/react-hooks/hooks/Search";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { MessageType, SpiffyWidgets } from "@envive-ai/react-hooks/application/models";
|
|
12
13
|
import { AnimatePresence, motion } from "framer-motion";
|
|
13
14
|
import { useAmplitudeTracking } from "@envive-ai/react-hooks/hooks/AmplitudeOperations";
|
|
14
15
|
import { SuggestionBarLocationForMetrics } from "@envive-ai/react-hooks/types";
|
|
15
|
-
import { MessageType, SpiffyWidgets } from "@envive-ai/react-hooks/application/models";
|
|
16
16
|
import { SpiffyMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
17
17
|
import { SearchInputForm } from "@envive-ai/react-toolkit/SearchInputForm";
|
|
18
18
|
import { SearchInput, searchInputVariantClasses } from "@envive-ai/react-toolkit/SearchInput";
|
|
19
|
+
import Logger from "@envive-ai/react-hooks/application/logging";
|
|
19
20
|
import { Typography } from "@envive-ai/react-toolkit/Typography";
|
|
20
21
|
|
|
21
22
|
//#region src/SearchZeroState/SearchZeroState.tsx
|
|
22
23
|
const SEARCH_ENTRYPOINT_INPUT_TESTID = "spiffy-search-entrypoint-input";
|
|
24
|
+
const logger = new Logger("SearchZeroState");
|
|
23
25
|
const SearchZeroState = ({ widgetConfig, initialIsOpen, entryPointRef }) => {
|
|
24
|
-
|
|
26
|
+
logger.logDebug("widgetConfig", widgetConfig);
|
|
25
27
|
const { searchZeroStateVariant, searchInputVariant, searchIconVariant, searchIconSize = 24, searchBoxPlaceholder, layout, compactLabel, initialSuggestions = [], animationSpeed = "standard", suggestionButtonConfig, includeSubtitle, usingPortal = false } = widgetConfig;
|
|
26
28
|
const { variant: suggestionButtonVariant, hoverVariant: suggestionButtonHoverVariant, borderRadius: suggestionButtonBorderRadius } = suggestionButtonConfig;
|
|
27
29
|
const [isOpen, setIsOpen] = useState(!!initialIsOpen);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/SearchZeroState/SearchZeroStateWidget.d.ts
|
|
4
4
|
type SearchZeroStateWidgetProps = {
|
|
@@ -10,6 +10,6 @@ declare const SearchZeroStateWidget: ({
|
|
|
10
10
|
initialIsOpen,
|
|
11
11
|
widgetConfigId,
|
|
12
12
|
entryPointRef
|
|
13
|
-
}: SearchZeroStateWidgetProps) =>
|
|
13
|
+
}: SearchZeroStateWidgetProps) => react_jsx_runtime0.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { SearchZeroStateWidget };
|
|
@@ -2,9 +2,9 @@ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
|
2
2
|
let classnames = require("classnames");
|
|
3
3
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
5
6
|
let framer_motion = require("framer-motion");
|
|
6
7
|
let __envive_ai_react_hooks_hooks_AmplitudeOperations = require("@envive-ai/react-hooks/hooks/AmplitudeOperations");
|
|
7
|
-
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
8
8
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
9
9
|
let __envive_ai_react_toolkit_Typography = require("@envive-ai/react-toolkit/Typography");
|
|
10
10
|
let __envive_ai_react_toolkit_ProductGrid = require("@envive-ai/react-toolkit/ProductGrid");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import classNames from "classnames";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChatElementDisplayLocation } from "@envive-ai/react-hooks/application/models";
|
|
3
4
|
import { motion } from "framer-motion";
|
|
4
5
|
import { useAmplitudeTracking } from "@envive-ai/react-hooks/hooks/AmplitudeOperations";
|
|
5
|
-
import { ChatElementDisplayLocation } from "@envive-ai/react-hooks/application/models";
|
|
6
6
|
import { SpiffyMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
7
7
|
import { Typography } from "@envive-ai/react-toolkit/Typography";
|
|
8
8
|
import { ProductGrid } from "@envive-ai/react-toolkit/ProductGrid";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SuggestionBarLocationForMetrics } from "./types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
import { SuggestionButtonVariant } from "@envive-ai/react-hooks/contexts/types";
|
|
4
4
|
import { Message } from "postcss";
|
|
5
5
|
|
|
@@ -29,6 +29,6 @@ declare function SuggestionBar({
|
|
|
29
29
|
buttonBorderRadius,
|
|
30
30
|
handleReply,
|
|
31
31
|
dataTestId
|
|
32
|
-
}: Readonly<SuggestionBarProps>):
|
|
32
|
+
}: Readonly<SuggestionBarProps>): react_jsx_runtime2.JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { SuggestionBar };
|
|
@@ -5,8 +5,8 @@ import "../SuggestionButtonContainer/index.js";
|
|
|
5
5
|
import { useCallback, useRef } from "react";
|
|
6
6
|
import { useSetAtom } from "jotai";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
import { MessageRole, MessageType } from "@envive-ai/react-hooks/application/models";
|
|
9
8
|
import { useScrollContainer } from "react-indiana-drag-scroll";
|
|
9
|
+
import { MessageRole, MessageType } from "@envive-ai/react-hooks/application/models";
|
|
10
10
|
import { PerfMetricsEvents, logPerfMetricAtom } from "@envive-ai/react-hooks/atoms/chat";
|
|
11
11
|
import { SUGGESTION_BAR_TESTID } from "@envive-ai/react-hooks/config";
|
|
12
12
|
import { useIsSmallScreen } from "@envive-ai/react-hooks/hooks/IsSmallScreen";
|
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ import { SearchZeroStateVariant } from '@envive-ai/react-hooks/contexts/types';
|
|
|
8
8
|
import { SpiffyMetricsEventName } from '@envive-ai/react-hooks/contexts/amplitudeContext';
|
|
9
9
|
import { SearchInputForm } from '@envive-ai/react-toolkit/SearchInputForm';
|
|
10
10
|
import { SearchInput, searchInputVariantClasses } from '@envive-ai/react-toolkit/SearchInput';
|
|
11
|
+
import Logger from '@envive-ai/react-hooks/application/logging';
|
|
11
12
|
import { Typography } from '@envive-ai/react-toolkit/Typography';
|
|
12
13
|
import Sparkles from '@envive-ai/react-icons/Sparkles';
|
|
13
14
|
import IconCloseVariant from '@envive-ai/react-icons/IconCloseVariant';
|
|
@@ -22,13 +23,14 @@ import { RecommendedProducts } from './components/RecommendedProducts';
|
|
|
22
23
|
|
|
23
24
|
const SEARCH_ENTRYPOINT_INPUT_TESTID = 'spiffy-search-entrypoint-input';
|
|
24
25
|
|
|
26
|
+
const logger = new Logger('SearchZeroState');
|
|
27
|
+
|
|
25
28
|
export const SearchZeroState: React.FC<SearchZeroStateProps> = ({
|
|
26
29
|
widgetConfig,
|
|
27
30
|
initialIsOpen,
|
|
28
31
|
entryPointRef,
|
|
29
32
|
}) => {
|
|
30
|
-
|
|
31
|
-
console.log('SearchZeroState: widgetConfig', widgetConfig);
|
|
33
|
+
logger.logDebug('widgetConfig', widgetConfig);
|
|
32
34
|
const {
|
|
33
35
|
searchZeroStateVariant,
|
|
34
36
|
searchInputVariant,
|