@envive-ai/react-hooks 0.1.2 → 0.1.3
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/adapters/amplitude/index.cjs +13 -13
- package/dist/adapters/amplitude/index.js +10 -10
- package/dist/{api-B2euFL-5.cjs → api-BtzLHcfU.cjs} +27 -27
- package/dist/{api-XRr_lAG6.js → api-kpPTZhV9.js} +27 -27
- package/dist/application/config/index.cjs +1 -1
- package/dist/application/config/index.js +1 -1
- package/dist/application/models/graphql/index.cjs +12 -12
- package/dist/application/models/graphql/index.js +10 -10
- package/dist/application/models/guards/api/index.cjs +2 -2
- package/dist/application/models/guards/api/index.js +2 -2
- package/dist/application/models/index.cjs +54 -54
- package/dist/application/models/index.js +10 -10
- package/dist/application/models/utilityTypes/index.cjs +1 -1
- package/dist/application/models/utilityTypes/index.js +1 -1
- package/dist/application/models/variantInfo/index.cjs +1 -1
- package/dist/application/models/variantInfo/index.js +1 -1
- package/dist/application/service/customerService/index.cjs +2 -2
- package/dist/application/service/customerService/index.js +2 -2
- package/dist/application/service/index.cjs +82 -82
- package/dist/application/service/index.d.cts +1 -1
- package/dist/application/service/index.d.ts +1 -1
- package/dist/application/service/index.js +16 -16
- package/dist/application/utils/index.cjs +37 -37
- package/dist/application/utils/index.d.ts +1 -1
- package/dist/application/utils/index.js +10 -10
- package/dist/atoms/app/index.cjs +16 -16
- package/dist/atoms/app/index.d.cts +1 -1
- package/dist/atoms/app/index.d.ts +2 -2
- package/dist/atoms/app/index.js +10 -10
- package/dist/atoms/atomStore/index.cjs +1 -1
- package/dist/atoms/atomStore/index.js +1 -1
- package/dist/atoms/chat/index.cjs +40 -40
- package/dist/atoms/chat/index.d.cts +26 -26
- package/dist/atoms/chat/index.d.ts +28 -28
- package/dist/atoms/chat/index.js +10 -10
- package/dist/atoms/globalSearch/index.d.cts +5 -5
- package/dist/atoms/globalSearch/index.d.ts +5 -5
- package/dist/atoms/org/index.cjs +33 -33
- package/dist/atoms/org/index.d.cts +26 -26
- package/dist/atoms/org/index.d.ts +26 -26
- package/dist/atoms/org/index.js +11 -11
- package/dist/atoms/search/index.cjs +12 -12
- package/dist/atoms/search/index.d.cts +1 -1
- package/dist/atoms/search/index.d.ts +1 -1
- package/dist/atoms/search/index.js +12 -12
- package/dist/{bandolier-oMkFDJMF.cjs → bandolier-CQrxBHsk.cjs} +37 -37
- package/dist/{bandolier-C7PAIw02.js → bandolier-Di9DpZ8e.js} +12 -12
- package/dist/{carpe-C0ccKuR9.cjs → carpe-3NJOR-Rj.cjs} +23 -23
- package/dist/{carpe-DFc78_lJ.js → carpe-DmWKaIQq.js} +12 -12
- package/dist/{cdnService-DvDSpfVJ.js → cdnService-BNreZjqy.js} +1 -1
- package/dist/{cdnService-dJU3sHpF.cjs → cdnService-vLxePdrU.cjs} +1 -1
- package/dist/{api-CxGedDxj.cjs → chat-CCQMmhc1.cjs} +2807 -2807
- package/dist/{api-NJEaveju.js → chat-H6YcCS4I.js} +2774 -2774
- package/dist/contexts/index.cjs +19 -19
- package/dist/contexts/index.d.cts +3 -3
- package/dist/contexts/index.js +14 -14
- package/dist/{coterie-Cp9FAJTQ.cjs → coterie-D0UFsFC5.cjs} +17 -17
- package/dist/{coterie-BGT8hqFR.js → coterie-JblRmIZL.js} +12 -12
- package/dist/{customerService-CUyZzowx.js → customerService-C4wc0glQ.js} +1 -1
- package/dist/{customerService-DqPw_XKf.cjs → customerService-zsDlp7g2.cjs} +1 -1
- package/dist/default-C5ZTV8HA.cjs +4 -0
- package/dist/{default-wf_IORgo.js → default-DPv8m-eQ.js} +1 -1
- package/dist/{default-BAXPatxf.cjs → default-DRKBosow.cjs} +1 -1
- package/dist/default-ao0vRl0W.js +4 -0
- package/dist/{dreamlandBaby-DZvM81LQ.js → dreamlandBaby-CyS8oW8X.js} +12 -12
- package/dist/{dreamlandBaby-BzuMvUFS.cjs → dreamlandBaby-y7kSvwH2.cjs} +19 -19
- package/dist/events/index.cjs +1 -1
- package/dist/events/index.js +1 -1
- package/dist/{fiveCbd-DE-tDY3d.cjs → fiveCbd-CXVuIBiZ.cjs} +24 -24
- package/dist/{fiveCbd-HNBPqPtX.js → fiveCbd-Cyc3-Ab9.js} +12 -12
- package/dist/{forLoveAndLemons-BeVEBOiu.cjs → forLoveAndLemons-CxQS0USq.cjs} +14 -14
- package/dist/{forLoveAndLemons-BKmJJ9pq.js → forLoveAndLemons-D8mcgmdk.js} +12 -12
- package/dist/{greenpan-BX1viAZB.js → greenpan-JM6SHcqO.js} +12 -12
- package/dist/{greenpan-chd3aa5I.cjs → greenpan-eIzyxVsn.cjs} +21 -21
- package/dist/{grooveLife-CHot3rZw.js → grooveLife-BmsUc2cD.js} +12 -12
- package/dist/{grooveLife-DEob7rK0.cjs → grooveLife-KdTizVUn.cjs} +19 -19
- package/dist/{homegrownCannabis-CoIjcehi.cjs → homegrownCannabis-C0GDai4r.cjs} +18 -18
- package/dist/{homegrownCannabis-CwkS1qDA.js → homegrownCannabis-a9udocBT.js} +12 -12
- package/dist/hooks/index.cjs +36 -36
- package/dist/hooks/index.d.cts +7 -7
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.js +14 -14
- package/dist/{contexts-iAzSvZjb.cjs → hooks-DjOa7ihH.cjs} +195 -195
- package/dist/{contexts-DO75-Kmx.js → hooks-fneW8SWw.js} +93 -93
- package/dist/{index-BkhvV8RZ.d.cts → index-BQErGgfM.d.cts} +29 -29
- package/dist/{index-CzMrMKx-.d.ts → index-CnqHN_jz.d.ts} +29 -29
- package/dist/interceptors/index.cjs +11 -11
- package/dist/interceptors/index.js +11 -11
- package/dist/{jackArcher-bewC0q1T.cjs → jackArcher-B6OJ0N3a.cjs} +25 -25
- package/dist/{jackArcher-BA-pkB4A.js → jackArcher-B9fe4Hv8.js} +12 -12
- package/dist/{jordanCraig-B5k9nlAw.cjs → jordanCraig-0CB_m_ts.cjs} +65 -65
- package/dist/{jordanCraig-BsQ1mYbt.js → jordanCraig-DNm1iw1L.js} +12 -12
- package/dist/{kindredBravely-BxYkCpGY.js → kindredBravely-CZgt7DJA.js} +12 -12
- package/dist/{kindredBravely-DsN0fo3s.cjs → kindredBravely-KvYPbckZ.cjs} +19 -19
- package/dist/{kutFromTheKloth-BQTCu3ct.cjs → kutFromTheKloth-BxgtWZs9.cjs} +19 -19
- package/dist/{kutFromTheKloth-bukOQM3P.js → kutFromTheKloth-SmteSZjk.js} +12 -12
- package/dist/{larryAndSerges-bj7fgy9b.cjs → larryAndSerges-6O_u3L90.cjs} +15 -15
- package/dist/{larryAndSerges-D1ecaT5a.js → larryAndSerges-DO-zG8ES.js} +11 -11
- package/dist/{leapsAndRebounds-DhNpZETg.js → leapsAndRebounds-BK62AmXw.js} +12 -12
- package/dist/{leapsAndRebounds-BfneG_0c.cjs → leapsAndRebounds-gPsWVUmQ.cjs} +20 -20
- package/dist/{longevityrx-D0goIuX0.cjs → longevityrx-DjKbwJo3.cjs} +17 -17
- package/dist/{longevityrx-CnoGcw0w.js → longevityrx-eq5TeUcy.js} +12 -12
- package/dist/{lookOptic-C4afLPZP.cjs → lookOptic-BPPqms_j.cjs} +17 -17
- package/dist/{lookOptic-uJWIKpER.js → lookOptic-jRpBXQCN.js} +12 -12
- package/dist/{mantraBrand-DuwKHM26.js → mantraBrand-BZOZfkUK.js} +12 -12
- package/dist/{mantraBrand-8JUlYtCE.cjs → mantraBrand-Cp8zptkj.cjs} +30 -30
- package/dist/{medterra-DH067P-V.cjs → medterra-BHYCBgvQ.cjs} +27 -27
- package/dist/{medterra-BQec8rzn.js → medterra-CShe6CLY.js} +12 -12
- package/dist/{modells-DUFnLmAz.cjs → modells-DE7-gmjK.cjs} +23 -23
- package/dist/{modells-DAgLE2xo.js → modells-DFyJxNwT.js} +12 -12
- package/dist/{org-CnHL2I9B.cjs → org-Bkn6fl6I.cjs} +22 -22
- package/dist/{org-C11APG3v.js → org-CX8HFbc9.js} +20 -20
- package/dist/{pressedFloral-DVZVfOSQ.cjs → pressedFloral-BMkCVs8c.cjs} +26 -26
- package/dist/{pressedFloral-MdbuoRyA.js → pressedFloral-aK9br-LF.js} +12 -12
- package/dist/{search-bSYdOBhY.cjs → search-DtIFZeMA.cjs} +28 -28
- package/dist/{search-CvHb1M3S.js → search-eWwg8pNn.js} +5 -5
- package/dist/{search-filter-types-BsJjrxk0.d.ts → search-filter-types-ByJnFPc4.d.cts} +8 -8
- package/dist/{search-filter-types-CqaGK3nM.d.cts → search-filter-types-DPgeG8FS.d.ts} +8 -8
- package/dist/{skinPerfection-bGiYxq1i.js → skinPerfection-B9G6yLM2.js} +12 -12
- package/dist/{skinPerfection-BcEWICQN.cjs → skinPerfection-BBC1q65Z.cjs} +17 -17
- package/dist/{snapSupplements-BXSXTjqF.cjs → snapSupplements-D7hx6Kgj.cjs} +17 -17
- package/dist/{snapSupplements-D7hHhdC9.js → snapSupplements-DKvJl__T.js} +12 -12
- package/dist/{spanx-lUzP6Lva.cjs → spanx-D-ZKkxjM.cjs} +20 -20
- package/dist/{spanx-5-0yX3iK.js → spanx-yl7YfVrf.js} +12 -12
- package/dist/{spanxStaging-hreMR0MS.cjs → spanxStaging-CXeIg6zI.cjs} +26 -26
- package/dist/{spanxStaging-HglCMJag.js → spanxStaging-DzGXL9wD.js} +12 -12
- package/dist/{supergoop-CkjtuRck.cjs → supergoop-CSpDPOpl.cjs} +18 -18
- package/dist/{supergoop-C9DDT3lY.js → supergoop-D0UkuRiA.js} +11 -11
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/{types-BVsTRyxL.js → types-C3S1H4hl.js} +33 -33
- package/dist/{types-BUjohkXp.cjs → types-lcjuhDBt.cjs} +33 -33
- package/dist/{uniqueVintage-DIMGtYAU.cjs → uniqueVintage-DygVpCqU.cjs} +36 -36
- package/dist/{uniqueVintage-DPWA5Ed6.js → uniqueVintage-_n0FZFVj.js} +12 -12
- package/dist/{useMessageInterceptor-C2RZM-fo.js → useMessageInterceptor-BP6gzo8a.js} +3 -3
- package/dist/{useMessageInterceptor-B-P_rw73.cjs → useMessageInterceptor-BnUG2Pzt.cjs} +9 -9
- package/dist/{variant-XITncuI3.d.ts → variant-DH4zusMi.d.cts} +1 -1
- package/dist/{variant-BGjOVpY3.d.cts → variant-DTEqSBHd.d.ts} +3 -3
- package/dist/{venaCbd-B-znfAsl.js → venaCbd-BS0dvdBm.js} +12 -12
- package/dist/{venaCbd-BOwOtpOz.cjs → venaCbd-Pqg0bj-P.cjs} +21 -21
- package/dist/{westonJonBoucher-DCRagGu3.js → westonJonBoucher-CLw8Hy6u.js} +12 -12
- package/dist/{westonJonBoucher-CraTzRVt.cjs → westonJonBoucher-CeA0jwxe.cjs} +20 -20
- package/dist/{wineEnthusiast-Bv7umajk.js → wineEnthusiast-M9P18d1w.js} +12 -12
- package/dist/{wineEnthusiast-sVuATrq6.cjs → wineEnthusiast-gHBaQMbe.cjs} +20 -20
- package/dist/{wolfMattress-BUH-Rhov.js → wolfMattress-BQHjoQYu.js} +12 -12
- package/dist/{wolfMattress-DpVHIEnJ.cjs → wolfMattress-CdmN-Evm.cjs} +19 -19
- package/dist/{wolfTactical-Q14A1fpw.js → wolfTactical-Cc2ZLBRh.js} +12 -12
- package/dist/{wolfTactical-BcvF_sy-.cjs → wolfTactical-dObnPgAG.cjs} +20 -20
- package/package.json +1 -1
- package/src/contexts/systemSettingsContext.tsx +21 -8
- package/src/hooks/useSearch.tsx +6 -3
- package/src/types/search-filter-types.ts +7 -7
- package/dist/default-BR3225LZ.js +0 -4
- package/dist/default-DR6YjE9B.cjs +0 -4
- /package/dist/{atomStore-CeJm9Llb.cjs → atomStore-BNQyGmU_.cjs} +0 -0
- /package/dist/{atomStore-BFtpknLM.js → atomStore-TnLPtYns.js} +0 -0
- /package/dist/{enviveConfigContext-Dfr2VH6u.cjs → enviveConfigContext-Bs8kepnO.cjs} +0 -0
- /package/dist/{enviveConfigContext-CUGLpPGU.js → enviveConfigContext-CWVdVWKW.js} +0 -0
- /package/dist/{events-ClCDFK7t.js → events-DgFzlVJR.js} +0 -0
- /package/dist/{events-Da7gpmGv.cjs → events-bH-24eRW.cjs} +0 -0
- /package/dist/{logger-Dln20ans.cjs → logger-Be0NyKaY.cjs} +0 -0
- /package/dist/{logger-pdEEY8T2.js → logger-BexDfK3W.js} +0 -0
- /package/dist/{utilityTypes-C4h2wgAK.cjs → utilityTypes-DMdsI0DG.cjs} +0 -0
- /package/dist/{utilityTypes-BVikejDo.js → utilityTypes-UWdNHElu.js} +0 -0
- /package/dist/{variantInfo-CzhR5W6h.js → variantInfo-BTvC6CQh.js} +0 -0
- /package/dist/{variantInfo-CNRTY0gH.cjs → variantInfo-Cz2YXraO.cjs} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { logger_default } from "./logger-
|
|
2
|
-
import { AmplitudeAdapter, DOMObserver, MessageRole, MessageType, PerfMetricsEvents, SelectorFactory, SessionRestartRequired, SpiffyEventName, SpiffyMetricsEventName, SpiffyWidgets, StringUtils, api_default, appDetailsAtom, chatAtom, chatIdAtom, chatOnToggleAtom, clearUserEventAtom, createResponsePayload, endpointURLAtom, featureFlagServiceAtom, hasParsedVariantInfoAtom, lastAssistantMessageAtom, logPerfMetricAtom, messageFromResponse, messagesAtom, orgCustomerServiceService, orgIdAtom, orgUIConfigAtom, parseHref, processUserEventAtom, queueUserEventAtom, requestFailureAtom, responseStreamingAtom, suggestionsAtom, suggestionsLoadingAtom, supportedEventAtom, urlResolverAtom, userEventQueueAtom, userEventsAtom, userHasRepliedAtom, userIdAtom, userQueueEventCountAtom, variantInfoAtom } from "./
|
|
3
|
-
import { CategoryExtractorType, OrgShortName, PageVariantTestType } from "./types-
|
|
4
|
-
import { getAtomStore } from "./atomStore-
|
|
5
|
-
import { customerServiceAttachment, orgPageConfigAtom } from "./org-
|
|
6
|
-
import { ProductSorting, addSearchFilterAtom, chatSearchIsLoadingAtom, chatSearchProductSortingAtom, chatSearchProducts, chatSearchStateAtom, clearSearchFiltersAtom, createFilterOption, filteredSearchProductsAtom, formatFilterDisplayName, handleSearchResultsAtom, performSearchAtom, removeSearchFilterAtom, searchAtom, searchFiltersAtom, searchParamsAtom, searchProductSortingAtom, searchSelectedFiltersAtom } from "./search-
|
|
1
|
+
import { logger_default } from "./logger-BexDfK3W.js";
|
|
2
|
+
import { AmplitudeAdapter, DOMObserver, MessageRole, MessageType, PerfMetricsEvents, SelectorFactory, SessionRestartRequired, SpiffyEventName, SpiffyMetricsEventName, SpiffyWidgets, StringUtils, api_default, appDetailsAtom, chatAtom, chatIdAtom, chatOnToggleAtom, clearUserEventAtom, createResponsePayload, endpointURLAtom, featureFlagServiceAtom, hasParsedVariantInfoAtom, lastAssistantMessageAtom, logPerfMetricAtom, messageFromResponse, messagesAtom, orgCustomerServiceService, orgIdAtom, orgUIConfigAtom, parseHref, processUserEventAtom, queueUserEventAtom, requestFailureAtom, responseStreamingAtom, suggestionsAtom, suggestionsLoadingAtom, supportedEventAtom, urlResolverAtom, userEventQueueAtom, userEventsAtom, userHasRepliedAtom, userIdAtom, userQueueEventCountAtom, variantInfoAtom } from "./chat-H6YcCS4I.js";
|
|
3
|
+
import { CategoryExtractorType, OrgShortName, PageVariantTestType } from "./types-C3S1H4hl.js";
|
|
4
|
+
import { getAtomStore } from "./atomStore-TnLPtYns.js";
|
|
5
|
+
import { customerServiceAttachment, orgPageConfigAtom } from "./org-CX8HFbc9.js";
|
|
6
|
+
import { ProductSorting, addSearchFilterAtom, chatSearchIsLoadingAtom, chatSearchProductSortingAtom, chatSearchProducts, chatSearchStateAtom, clearSearchFiltersAtom, createFilterOption, filteredSearchProductsAtom, formatFilterDisplayName, handleSearchResultsAtom, performSearchAtom, removeSearchFilterAtom, searchAtom, searchFiltersAtom, searchParamsAtom, searchProductSortingAtom, searchSelectedFiltersAtom } from "./search-eWwg8pNn.js";
|
|
7
7
|
import { autocompleteStateAtom, isFilterOpenAtom } from "./globalSearch-BC0rOX3E.js";
|
|
8
|
-
import { useMessageInterceptor } from "./useMessageInterceptor-
|
|
9
|
-
import { PLPAttributeCategory, PageVisitCategory, UserEventCategory } from "@spiffy-ai/commerce-api-client";
|
|
10
|
-
import { useAtom, useAtomValue, useSetAtom } from "jotai";
|
|
8
|
+
import { useMessageInterceptor } from "./useMessageInterceptor-BP6gzo8a.js";
|
|
11
9
|
import { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
10
|
+
import { useAtom, useAtomValue, useSetAtom } from "jotai";
|
|
11
|
+
import { PLPAttributeCategory, PageVisitCategory, UserEventCategory } from "@spiffy-ai/commerce-api-client";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
import { v4 } from "uuid";
|
|
14
14
|
|
|
@@ -6751,90 +6751,6 @@ const useSnapControl = ({ animationKey, animation, height, unit, snaps, initSnap
|
|
|
6751
6751
|
};
|
|
6752
6752
|
};
|
|
6753
6753
|
|
|
6754
|
-
//#endregion
|
|
6755
|
-
//#region src/hooks/useSystemSettingsContext.ts
|
|
6756
|
-
const useSystemSettingsContext = () => {
|
|
6757
|
-
const context = useContext(SystemSettingsContext);
|
|
6758
|
-
if (!context) throw new Error("useSystemSettingsContext must be used within a SystemSettingsContextProvider");
|
|
6759
|
-
return { ...context };
|
|
6760
|
-
};
|
|
6761
|
-
|
|
6762
|
-
//#endregion
|
|
6763
|
-
//#region src/hooks/useTrackComponentVisibleEvent.ts
|
|
6764
|
-
/**
|
|
6765
|
-
* Tracks a component and logs an event to Amplitude when the component is visible.
|
|
6766
|
-
*
|
|
6767
|
-
* @param component - The component to track.
|
|
6768
|
-
* @param element - The element to track visibility of.
|
|
6769
|
-
* @param eventProps - Additional properties to include with the event.
|
|
6770
|
-
* @param eventName - The Amplitude event name to track (defaults to ChatComponentVisible).
|
|
6771
|
-
*/
|
|
6772
|
-
const useTrackComponentVisibleEvent = (component, element, eventProps, eventName = SpiffyMetricsEventName.ChatComponentVisible) => {
|
|
6773
|
-
const isVisible = useIntersection(element, "0px");
|
|
6774
|
-
const hasTrackedEvent = useRef(false);
|
|
6775
|
-
const componentProps = (() => {
|
|
6776
|
-
if (eventName === SpiffyMetricsEventName.ChatComponentVisible) return {
|
|
6777
|
-
chat_component: component,
|
|
6778
|
-
...eventProps
|
|
6779
|
-
};
|
|
6780
|
-
if (eventName === SpiffyMetricsEventName.SearchComponentVisible) return {
|
|
6781
|
-
search_component: component,
|
|
6782
|
-
...eventProps
|
|
6783
|
-
};
|
|
6784
|
-
return {
|
|
6785
|
-
component,
|
|
6786
|
-
...eventProps
|
|
6787
|
-
};
|
|
6788
|
-
})();
|
|
6789
|
-
useEffect(() => {
|
|
6790
|
-
if (isVisible && !hasTrackedEvent.current) {
|
|
6791
|
-
AmplitudeAdapter.trackEvent({
|
|
6792
|
-
eventName,
|
|
6793
|
-
eventProps: componentProps
|
|
6794
|
-
});
|
|
6795
|
-
hasTrackedEvent.current = true;
|
|
6796
|
-
}
|
|
6797
|
-
}, [
|
|
6798
|
-
isVisible,
|
|
6799
|
-
component,
|
|
6800
|
-
eventProps,
|
|
6801
|
-
eventName,
|
|
6802
|
-
componentProps
|
|
6803
|
-
]);
|
|
6804
|
-
};
|
|
6805
|
-
|
|
6806
|
-
//#endregion
|
|
6807
|
-
//#region src/hooks/useUpdateAnalyticsProps.ts
|
|
6808
|
-
/**
|
|
6809
|
-
* Updates the default analytics properties whenever the variant info changes. This hook also
|
|
6810
|
-
* triggers any events that should be sent once per page visit.
|
|
6811
|
-
*/
|
|
6812
|
-
const useUpdateAnalyticsProps = () => {
|
|
6813
|
-
const variantInfo = useAtomValue(variantInfoAtom);
|
|
6814
|
-
const amplitudeAdapterRef = useRef(null);
|
|
6815
|
-
const hasInitialized = useRef(false);
|
|
6816
|
-
const hasParsedVariantInfo = useAtomValue(hasParsedVariantInfoAtom);
|
|
6817
|
-
useEffect(() => {
|
|
6818
|
-
if (!amplitudeAdapterRef.current) amplitudeAdapterRef.current = AmplitudeAdapter.getSingletonInstanceOf();
|
|
6819
|
-
const variantInfoWithPrefix = Object.fromEntries(Object.entries(variantInfo).map(([key, value]) => [`variantInfo.${key}`, value]));
|
|
6820
|
-
const defaultEventProperties = {
|
|
6821
|
-
page_variant: variantInfo.variant,
|
|
6822
|
-
...variantInfoWithPrefix
|
|
6823
|
-
};
|
|
6824
|
-
if (variantInfo.variant === "pdp") defaultEventProperties.product_id = variantInfo.productId;
|
|
6825
|
-
if (variantInfo.variant === "plp") defaultEventProperties.plp_id = variantInfo.plpId;
|
|
6826
|
-
if (variantInfo.variant === "page_visit") {
|
|
6827
|
-
defaultEventProperties.page_visit_category = variantInfo.pageVisitCategory;
|
|
6828
|
-
defaultEventProperties.page_visit_url = variantInfo.url;
|
|
6829
|
-
}
|
|
6830
|
-
amplitudeAdapterRef.current?.setSupplementalDefaultProps(defaultEventProperties);
|
|
6831
|
-
if (!hasInitialized.current && hasParsedVariantInfo) {
|
|
6832
|
-
AmplitudeAdapter.trackEvent({ eventName: SpiffyMetricsEventName.BundleLoaded });
|
|
6833
|
-
hasInitialized.current = true;
|
|
6834
|
-
}
|
|
6835
|
-
}, [variantInfo, hasParsedVariantInfo]);
|
|
6836
|
-
};
|
|
6837
|
-
|
|
6838
6754
|
//#endregion
|
|
6839
6755
|
//#region src/contexts/chatContext.tsx
|
|
6840
6756
|
/**
|
|
@@ -7148,5 +7064,89 @@ const SystemSettingsContextProvider = ({ children, generationParams, showDebugBa
|
|
|
7148
7064
|
});
|
|
7149
7065
|
};
|
|
7150
7066
|
|
|
7067
|
+
//#endregion
|
|
7068
|
+
//#region src/hooks/useSystemSettingsContext.ts
|
|
7069
|
+
const useSystemSettingsContext = () => {
|
|
7070
|
+
const context = useContext(SystemSettingsContext);
|
|
7071
|
+
if (!context) throw new Error("useSystemSettingsContext must be used within a SystemSettingsContextProvider");
|
|
7072
|
+
return { ...context };
|
|
7073
|
+
};
|
|
7074
|
+
|
|
7075
|
+
//#endregion
|
|
7076
|
+
//#region src/hooks/useTrackComponentVisibleEvent.ts
|
|
7077
|
+
/**
|
|
7078
|
+
* Tracks a component and logs an event to Amplitude when the component is visible.
|
|
7079
|
+
*
|
|
7080
|
+
* @param component - The component to track.
|
|
7081
|
+
* @param element - The element to track visibility of.
|
|
7082
|
+
* @param eventProps - Additional properties to include with the event.
|
|
7083
|
+
* @param eventName - The Amplitude event name to track (defaults to ChatComponentVisible).
|
|
7084
|
+
*/
|
|
7085
|
+
const useTrackComponentVisibleEvent = (component, element, eventProps, eventName = SpiffyMetricsEventName.ChatComponentVisible) => {
|
|
7086
|
+
const isVisible = useIntersection(element, "0px");
|
|
7087
|
+
const hasTrackedEvent = useRef(false);
|
|
7088
|
+
const componentProps = (() => {
|
|
7089
|
+
if (eventName === SpiffyMetricsEventName.ChatComponentVisible) return {
|
|
7090
|
+
chat_component: component,
|
|
7091
|
+
...eventProps
|
|
7092
|
+
};
|
|
7093
|
+
if (eventName === SpiffyMetricsEventName.SearchComponentVisible) return {
|
|
7094
|
+
search_component: component,
|
|
7095
|
+
...eventProps
|
|
7096
|
+
};
|
|
7097
|
+
return {
|
|
7098
|
+
component,
|
|
7099
|
+
...eventProps
|
|
7100
|
+
};
|
|
7101
|
+
})();
|
|
7102
|
+
useEffect(() => {
|
|
7103
|
+
if (isVisible && !hasTrackedEvent.current) {
|
|
7104
|
+
AmplitudeAdapter.trackEvent({
|
|
7105
|
+
eventName,
|
|
7106
|
+
eventProps: componentProps
|
|
7107
|
+
});
|
|
7108
|
+
hasTrackedEvent.current = true;
|
|
7109
|
+
}
|
|
7110
|
+
}, [
|
|
7111
|
+
isVisible,
|
|
7112
|
+
component,
|
|
7113
|
+
eventProps,
|
|
7114
|
+
eventName,
|
|
7115
|
+
componentProps
|
|
7116
|
+
]);
|
|
7117
|
+
};
|
|
7118
|
+
|
|
7119
|
+
//#endregion
|
|
7120
|
+
//#region src/hooks/useUpdateAnalyticsProps.ts
|
|
7121
|
+
/**
|
|
7122
|
+
* Updates the default analytics properties whenever the variant info changes. This hook also
|
|
7123
|
+
* triggers any events that should be sent once per page visit.
|
|
7124
|
+
*/
|
|
7125
|
+
const useUpdateAnalyticsProps = () => {
|
|
7126
|
+
const variantInfo = useAtomValue(variantInfoAtom);
|
|
7127
|
+
const amplitudeAdapterRef = useRef(null);
|
|
7128
|
+
const hasInitialized = useRef(false);
|
|
7129
|
+
const hasParsedVariantInfo = useAtomValue(hasParsedVariantInfoAtom);
|
|
7130
|
+
useEffect(() => {
|
|
7131
|
+
if (!amplitudeAdapterRef.current) amplitudeAdapterRef.current = AmplitudeAdapter.getSingletonInstanceOf();
|
|
7132
|
+
const variantInfoWithPrefix = Object.fromEntries(Object.entries(variantInfo).map(([key, value]) => [`variantInfo.${key}`, value]));
|
|
7133
|
+
const defaultEventProperties = {
|
|
7134
|
+
page_variant: variantInfo.variant,
|
|
7135
|
+
...variantInfoWithPrefix
|
|
7136
|
+
};
|
|
7137
|
+
if (variantInfo.variant === "pdp") defaultEventProperties.product_id = variantInfo.productId;
|
|
7138
|
+
if (variantInfo.variant === "plp") defaultEventProperties.plp_id = variantInfo.plpId;
|
|
7139
|
+
if (variantInfo.variant === "page_visit") {
|
|
7140
|
+
defaultEventProperties.page_visit_category = variantInfo.pageVisitCategory;
|
|
7141
|
+
defaultEventProperties.page_visit_url = variantInfo.url;
|
|
7142
|
+
}
|
|
7143
|
+
amplitudeAdapterRef.current?.setSupplementalDefaultProps(defaultEventProperties);
|
|
7144
|
+
if (!hasInitialized.current && hasParsedVariantInfo) {
|
|
7145
|
+
AmplitudeAdapter.trackEvent({ eventName: SpiffyMetricsEventName.BundleLoaded });
|
|
7146
|
+
hasInitialized.current = true;
|
|
7147
|
+
}
|
|
7148
|
+
}, [variantInfo, hasParsedVariantInfo]);
|
|
7149
|
+
};
|
|
7150
|
+
|
|
7151
7151
|
//#endregion
|
|
7152
7152
|
export { ChatContext, ChatContextProvider, PageVariantService, ShopifyUrlService, SystemSettingsContext, SystemSettingsContextProvider, defaultGenerationParams, useBlockBackButton, useChatToggle, useCustomerSupportHandoff, useDebounce, useDynamicVariants, useElementObserver, useFileUpload, useGrabAndScroll, useHideElements, useHorizontalScrollAnimation, useImageResolver, useIntersection, useIsSmallScreen, useMessageFilter, useMessageScrollObserver, useReducedMotionWithOverride, useSearch, useSnapCalculator, useSnapControl, useSystemSettingsContext, useTrackComponentVisibleEvent, useUpdateAnalyticsProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProductResponseAttributes } from "./index-Cn1SeI5y.cjs";
|
|
2
2
|
import { Message, SearchParams, SearchResult } from "./index-DbWWcYax.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as jotai45 from "jotai";
|
|
4
4
|
|
|
5
5
|
//#region src/atoms/search/types.d.ts
|
|
6
6
|
declare enum ProductSorting {
|
|
@@ -22,13 +22,13 @@ type ChatSearchFilterItem = {
|
|
|
22
22
|
};
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/atoms/search/chatSearch.d.ts
|
|
25
|
-
declare const chatSearchStateAtom:
|
|
25
|
+
declare const chatSearchStateAtom: jotai45.PrimitiveAtom<ChatSearchStateType> & {
|
|
26
26
|
init: ChatSearchStateType;
|
|
27
27
|
};
|
|
28
|
-
declare const chatSearchHasProductsAtom:
|
|
28
|
+
declare const chatSearchHasProductsAtom: jotai45.PrimitiveAtom<boolean> & {
|
|
29
29
|
init: boolean;
|
|
30
30
|
};
|
|
31
|
-
declare const chatSearchProductSortingAtom:
|
|
31
|
+
declare const chatSearchProductSortingAtom: jotai45.PrimitiveAtom<ProductSorting> & {
|
|
32
32
|
init: ProductSorting;
|
|
33
33
|
};
|
|
34
34
|
type ChatSearchTurn = {
|
|
@@ -39,7 +39,7 @@ type ChatSearchTurn = {
|
|
|
39
39
|
filterList: string[];
|
|
40
40
|
messages: Message[];
|
|
41
41
|
};
|
|
42
|
-
declare const chatSearchIsLoadingAtom:
|
|
42
|
+
declare const chatSearchIsLoadingAtom: jotai45.PrimitiveAtom<boolean> & {
|
|
43
43
|
init: boolean;
|
|
44
44
|
};
|
|
45
45
|
type SelectedChatSearchFilterOption = {
|
|
@@ -48,21 +48,21 @@ type SelectedChatSearchFilterOption = {
|
|
|
48
48
|
filterId: string;
|
|
49
49
|
filterItemId: string;
|
|
50
50
|
};
|
|
51
|
-
declare const selectedFilterOptionsAtom:
|
|
51
|
+
declare const selectedFilterOptionsAtom: jotai45.PrimitiveAtom<SelectedChatSearchFilterOption[]> & {
|
|
52
52
|
init: SelectedChatSearchFilterOption[];
|
|
53
53
|
};
|
|
54
|
-
declare const additiveDynamicFiltersAtom:
|
|
54
|
+
declare const additiveDynamicFiltersAtom: jotai45.Atom<boolean>;
|
|
55
55
|
declare const createChatSearchFilterOption: (filterId: string, filterItemId: string, displayName: string) => SelectedChatSearchFilterOption;
|
|
56
|
-
declare const chatSearchParamsAtom:
|
|
56
|
+
declare const chatSearchParamsAtom: jotai45.WritableAtom<{
|
|
57
57
|
id: string | null;
|
|
58
58
|
query: string | null;
|
|
59
59
|
}, [value: {
|
|
60
60
|
id: string | null;
|
|
61
61
|
query: string | null;
|
|
62
62
|
}], void>;
|
|
63
|
-
declare const chatSearchQueryAtom:
|
|
64
|
-
declare const chatSearchIdAtom:
|
|
65
|
-
declare const ChatSearchTurnAtom:
|
|
63
|
+
declare const chatSearchQueryAtom: jotai45.WritableAtom<string | null, [value: string | null], void>;
|
|
64
|
+
declare const chatSearchIdAtom: jotai45.WritableAtom<string | null, [value: string | null], void>;
|
|
65
|
+
declare const ChatSearchTurnAtom: jotai45.Atom<{
|
|
66
66
|
productList: {
|
|
67
67
|
averageRating?: number | undefined;
|
|
68
68
|
colors?: string[] | undefined;
|
|
@@ -91,7 +91,7 @@ declare const ChatSearchTurnAtom: jotai5.Atom<{
|
|
|
91
91
|
filterList: string[];
|
|
92
92
|
messages: Message[];
|
|
93
93
|
} | null>;
|
|
94
|
-
declare const chatSearchProducts:
|
|
94
|
+
declare const chatSearchProducts: jotai45.Atom<{
|
|
95
95
|
averageRating?: number | undefined;
|
|
96
96
|
colors?: string[] | undefined;
|
|
97
97
|
description?: string | undefined;
|
|
@@ -113,19 +113,19 @@ declare const chatSearchProducts: jotai5.Atom<{
|
|
|
113
113
|
title: string;
|
|
114
114
|
url: string;
|
|
115
115
|
}[]>;
|
|
116
|
-
declare const chatSearchFiltersAtom:
|
|
116
|
+
declare const chatSearchFiltersAtom: jotai45.Atom<ChatSearchFilter[]>;
|
|
117
117
|
declare const setSearchParams: (query: string) => void;
|
|
118
|
-
declare const getSearchParamsAtom:
|
|
118
|
+
declare const getSearchParamsAtom: jotai45.Atom<{
|
|
119
119
|
es: string | null;
|
|
120
120
|
esq: string | null;
|
|
121
121
|
}>;
|
|
122
|
-
declare const initiateChatSearchAtom:
|
|
122
|
+
declare const initiateChatSearchAtom: jotai45.WritableAtom<null, [query: string], void> & {
|
|
123
123
|
init: null;
|
|
124
124
|
};
|
|
125
|
-
declare const handleSearchResultsAtom:
|
|
125
|
+
declare const handleSearchResultsAtom: jotai45.WritableAtom<null, [message: Message | undefined], void> & {
|
|
126
126
|
init: null;
|
|
127
127
|
};
|
|
128
|
-
declare const setChatSearchParamsAtom:
|
|
128
|
+
declare const setChatSearchParamsAtom: jotai45.WritableAtom<null, [query: string], void> & {
|
|
129
129
|
init: null;
|
|
130
130
|
};
|
|
131
131
|
//#endregion
|
|
@@ -142,28 +142,28 @@ interface SearchState {
|
|
|
142
142
|
error: string | null;
|
|
143
143
|
lastQuery: string | null;
|
|
144
144
|
}
|
|
145
|
-
declare const searchAtom:
|
|
145
|
+
declare const searchAtom: jotai45.PrimitiveAtom<SearchState> & {
|
|
146
146
|
init: SearchState;
|
|
147
147
|
};
|
|
148
|
-
declare const searchProductSortingAtom:
|
|
148
|
+
declare const searchProductSortingAtom: jotai45.PrimitiveAtom<ProductSorting> & {
|
|
149
149
|
init: ProductSorting;
|
|
150
150
|
};
|
|
151
|
-
declare const searchSelectedFiltersAtom:
|
|
151
|
+
declare const searchSelectedFiltersAtom: jotai45.PrimitiveAtom<SelectedFilterOption[]> & {
|
|
152
152
|
init: SelectedFilterOption[];
|
|
153
153
|
};
|
|
154
154
|
declare const createFilterOption: (filterId: string, filterItemId: string, displayName: string) => SelectedFilterOption;
|
|
155
|
-
declare const searchParamsAtom:
|
|
155
|
+
declare const searchParamsAtom: jotai45.WritableAtom<{
|
|
156
156
|
id: string | null;
|
|
157
157
|
query: string | null;
|
|
158
158
|
}, [value: {
|
|
159
159
|
id: string | null;
|
|
160
160
|
query: string | null;
|
|
161
161
|
}], void>;
|
|
162
|
-
declare const internalSearchSystemStateAtom:
|
|
162
|
+
declare const internalSearchSystemStateAtom: jotai45.PrimitiveAtom<boolean> & {
|
|
163
163
|
init: boolean;
|
|
164
164
|
};
|
|
165
|
-
declare const searchSystemAtom:
|
|
166
|
-
declare const filteredSearchProductsAtom:
|
|
165
|
+
declare const searchSystemAtom: jotai45.WritableAtom<boolean, [value: boolean], void>;
|
|
166
|
+
declare const filteredSearchProductsAtom: jotai45.Atom<{
|
|
167
167
|
averageRating?: number | undefined;
|
|
168
168
|
colors?: string[] | undefined;
|
|
169
169
|
description?: string | undefined;
|
|
@@ -185,17 +185,17 @@ declare const filteredSearchProductsAtom: jotai5.Atom<{
|
|
|
185
185
|
title: string;
|
|
186
186
|
url: string;
|
|
187
187
|
}[]>;
|
|
188
|
-
declare const searchFiltersAtom:
|
|
189
|
-
declare const addSearchFilterAtom:
|
|
188
|
+
declare const searchFiltersAtom: jotai45.Atom<ChatSearchFilter[]>;
|
|
189
|
+
declare const addSearchFilterAtom: jotai45.WritableAtom<null, [filter: SelectedFilterOption], void> & {
|
|
190
190
|
init: null;
|
|
191
191
|
};
|
|
192
|
-
declare const removeSearchFilterAtom:
|
|
192
|
+
declare const removeSearchFilterAtom: jotai45.WritableAtom<null, [filterId: string], void> & {
|
|
193
193
|
init: null;
|
|
194
194
|
};
|
|
195
|
-
declare const clearSearchFiltersAtom:
|
|
195
|
+
declare const clearSearchFiltersAtom: jotai45.WritableAtom<null, [], void> & {
|
|
196
196
|
init: null;
|
|
197
197
|
};
|
|
198
|
-
declare const performSearchAtom:
|
|
198
|
+
declare const performSearchAtom: jotai45.WritableAtom<null, [params: SearchParams, allowRedirect?: unknown], Promise<void>> & {
|
|
199
199
|
init: null;
|
|
200
200
|
};
|
|
201
201
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProductResponseAttributes } from "./index-CIco0cCQ.js";
|
|
2
2
|
import { Message, SearchParams, SearchResult } from "./index-COG1kOZG.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as jotai34 from "jotai";
|
|
4
4
|
|
|
5
5
|
//#region src/atoms/search/types.d.ts
|
|
6
6
|
declare enum ProductSorting {
|
|
@@ -22,13 +22,13 @@ type ChatSearchFilterItem = {
|
|
|
22
22
|
};
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/atoms/search/chatSearch.d.ts
|
|
25
|
-
declare const chatSearchStateAtom:
|
|
25
|
+
declare const chatSearchStateAtom: jotai34.PrimitiveAtom<ChatSearchStateType> & {
|
|
26
26
|
init: ChatSearchStateType;
|
|
27
27
|
};
|
|
28
|
-
declare const chatSearchHasProductsAtom:
|
|
28
|
+
declare const chatSearchHasProductsAtom: jotai34.PrimitiveAtom<boolean> & {
|
|
29
29
|
init: boolean;
|
|
30
30
|
};
|
|
31
|
-
declare const chatSearchProductSortingAtom:
|
|
31
|
+
declare const chatSearchProductSortingAtom: jotai34.PrimitiveAtom<ProductSorting> & {
|
|
32
32
|
init: ProductSorting;
|
|
33
33
|
};
|
|
34
34
|
type ChatSearchTurn = {
|
|
@@ -39,7 +39,7 @@ type ChatSearchTurn = {
|
|
|
39
39
|
filterList: string[];
|
|
40
40
|
messages: Message[];
|
|
41
41
|
};
|
|
42
|
-
declare const chatSearchIsLoadingAtom:
|
|
42
|
+
declare const chatSearchIsLoadingAtom: jotai34.PrimitiveAtom<boolean> & {
|
|
43
43
|
init: boolean;
|
|
44
44
|
};
|
|
45
45
|
type SelectedChatSearchFilterOption = {
|
|
@@ -48,21 +48,21 @@ type SelectedChatSearchFilterOption = {
|
|
|
48
48
|
filterId: string;
|
|
49
49
|
filterItemId: string;
|
|
50
50
|
};
|
|
51
|
-
declare const selectedFilterOptionsAtom:
|
|
51
|
+
declare const selectedFilterOptionsAtom: jotai34.PrimitiveAtom<SelectedChatSearchFilterOption[]> & {
|
|
52
52
|
init: SelectedChatSearchFilterOption[];
|
|
53
53
|
};
|
|
54
|
-
declare const additiveDynamicFiltersAtom:
|
|
54
|
+
declare const additiveDynamicFiltersAtom: jotai34.Atom<boolean>;
|
|
55
55
|
declare const createChatSearchFilterOption: (filterId: string, filterItemId: string, displayName: string) => SelectedChatSearchFilterOption;
|
|
56
|
-
declare const chatSearchParamsAtom:
|
|
56
|
+
declare const chatSearchParamsAtom: jotai34.WritableAtom<{
|
|
57
57
|
id: string | null;
|
|
58
58
|
query: string | null;
|
|
59
59
|
}, [value: {
|
|
60
60
|
id: string | null;
|
|
61
61
|
query: string | null;
|
|
62
62
|
}], void>;
|
|
63
|
-
declare const chatSearchQueryAtom:
|
|
64
|
-
declare const chatSearchIdAtom:
|
|
65
|
-
declare const ChatSearchTurnAtom:
|
|
63
|
+
declare const chatSearchQueryAtom: jotai34.WritableAtom<string | null, [value: string | null], void>;
|
|
64
|
+
declare const chatSearchIdAtom: jotai34.WritableAtom<string | null, [value: string | null], void>;
|
|
65
|
+
declare const ChatSearchTurnAtom: jotai34.Atom<{
|
|
66
66
|
productList: {
|
|
67
67
|
averageRating?: number | undefined;
|
|
68
68
|
colors?: string[] | undefined;
|
|
@@ -91,7 +91,7 @@ declare const ChatSearchTurnAtom: jotai21.Atom<{
|
|
|
91
91
|
filterList: string[];
|
|
92
92
|
messages: Message[];
|
|
93
93
|
} | null>;
|
|
94
|
-
declare const chatSearchProducts:
|
|
94
|
+
declare const chatSearchProducts: jotai34.Atom<{
|
|
95
95
|
averageRating?: number | undefined;
|
|
96
96
|
colors?: string[] | undefined;
|
|
97
97
|
description?: string | undefined;
|
|
@@ -113,19 +113,19 @@ declare const chatSearchProducts: jotai21.Atom<{
|
|
|
113
113
|
title: string;
|
|
114
114
|
url: string;
|
|
115
115
|
}[]>;
|
|
116
|
-
declare const chatSearchFiltersAtom:
|
|
116
|
+
declare const chatSearchFiltersAtom: jotai34.Atom<ChatSearchFilter[]>;
|
|
117
117
|
declare const setSearchParams: (query: string) => void;
|
|
118
|
-
declare const getSearchParamsAtom:
|
|
118
|
+
declare const getSearchParamsAtom: jotai34.Atom<{
|
|
119
119
|
es: string | null;
|
|
120
120
|
esq: string | null;
|
|
121
121
|
}>;
|
|
122
|
-
declare const initiateChatSearchAtom:
|
|
122
|
+
declare const initiateChatSearchAtom: jotai34.WritableAtom<null, [query: string], void> & {
|
|
123
123
|
init: null;
|
|
124
124
|
};
|
|
125
|
-
declare const handleSearchResultsAtom:
|
|
125
|
+
declare const handleSearchResultsAtom: jotai34.WritableAtom<null, [message: Message | undefined], void> & {
|
|
126
126
|
init: null;
|
|
127
127
|
};
|
|
128
|
-
declare const setChatSearchParamsAtom:
|
|
128
|
+
declare const setChatSearchParamsAtom: jotai34.WritableAtom<null, [query: string], void> & {
|
|
129
129
|
init: null;
|
|
130
130
|
};
|
|
131
131
|
//#endregion
|
|
@@ -142,28 +142,28 @@ interface SearchState {
|
|
|
142
142
|
error: string | null;
|
|
143
143
|
lastQuery: string | null;
|
|
144
144
|
}
|
|
145
|
-
declare const searchAtom:
|
|
145
|
+
declare const searchAtom: jotai34.PrimitiveAtom<SearchState> & {
|
|
146
146
|
init: SearchState;
|
|
147
147
|
};
|
|
148
|
-
declare const searchProductSortingAtom:
|
|
148
|
+
declare const searchProductSortingAtom: jotai34.PrimitiveAtom<ProductSorting> & {
|
|
149
149
|
init: ProductSorting;
|
|
150
150
|
};
|
|
151
|
-
declare const searchSelectedFiltersAtom:
|
|
151
|
+
declare const searchSelectedFiltersAtom: jotai34.PrimitiveAtom<SelectedFilterOption[]> & {
|
|
152
152
|
init: SelectedFilterOption[];
|
|
153
153
|
};
|
|
154
154
|
declare const createFilterOption: (filterId: string, filterItemId: string, displayName: string) => SelectedFilterOption;
|
|
155
|
-
declare const searchParamsAtom:
|
|
155
|
+
declare const searchParamsAtom: jotai34.WritableAtom<{
|
|
156
156
|
id: string | null;
|
|
157
157
|
query: string | null;
|
|
158
158
|
}, [value: {
|
|
159
159
|
id: string | null;
|
|
160
160
|
query: string | null;
|
|
161
161
|
}], void>;
|
|
162
|
-
declare const internalSearchSystemStateAtom:
|
|
162
|
+
declare const internalSearchSystemStateAtom: jotai34.PrimitiveAtom<boolean> & {
|
|
163
163
|
init: boolean;
|
|
164
164
|
};
|
|
165
|
-
declare const searchSystemAtom:
|
|
166
|
-
declare const filteredSearchProductsAtom:
|
|
165
|
+
declare const searchSystemAtom: jotai34.WritableAtom<boolean, [value: boolean], void>;
|
|
166
|
+
declare const filteredSearchProductsAtom: jotai34.Atom<{
|
|
167
167
|
averageRating?: number | undefined;
|
|
168
168
|
colors?: string[] | undefined;
|
|
169
169
|
description?: string | undefined;
|
|
@@ -185,17 +185,17 @@ declare const filteredSearchProductsAtom: jotai21.Atom<{
|
|
|
185
185
|
title: string;
|
|
186
186
|
url: string;
|
|
187
187
|
}[]>;
|
|
188
|
-
declare const searchFiltersAtom:
|
|
189
|
-
declare const addSearchFilterAtom:
|
|
188
|
+
declare const searchFiltersAtom: jotai34.Atom<ChatSearchFilter[]>;
|
|
189
|
+
declare const addSearchFilterAtom: jotai34.WritableAtom<null, [filter: SelectedFilterOption], void> & {
|
|
190
190
|
init: null;
|
|
191
191
|
};
|
|
192
|
-
declare const removeSearchFilterAtom:
|
|
192
|
+
declare const removeSearchFilterAtom: jotai34.WritableAtom<null, [filterId: string], void> & {
|
|
193
193
|
init: null;
|
|
194
194
|
};
|
|
195
|
-
declare const clearSearchFiltersAtom:
|
|
195
|
+
declare const clearSearchFiltersAtom: jotai34.WritableAtom<null, [], void> & {
|
|
196
196
|
init: null;
|
|
197
197
|
};
|
|
198
|
-
declare const performSearchAtom:
|
|
198
|
+
declare const performSearchAtom: jotai34.WritableAtom<null, [params: SearchParams, allowRedirect?: unknown], Promise<void>> & {
|
|
199
199
|
init: null;
|
|
200
200
|
};
|
|
201
201
|
//#endregion
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
require('../
|
|
2
|
-
require('../
|
|
3
|
-
require('../
|
|
4
|
-
require('../types-
|
|
5
|
-
require('../enviveConfigContext-
|
|
6
|
-
require('../atomStore-
|
|
7
|
-
require('../
|
|
8
|
-
require('../
|
|
9
|
-
require('../
|
|
10
|
-
require('../
|
|
11
|
-
const require_useMessageInterceptor = require('../useMessageInterceptor-
|
|
1
|
+
require('../events-bH-24eRW.cjs');
|
|
2
|
+
require('../logger-Be0NyKaY.cjs');
|
|
3
|
+
require('../chat-CCQMmhc1.cjs');
|
|
4
|
+
require('../types-lcjuhDBt.cjs');
|
|
5
|
+
require('../enviveConfigContext-Bs8kepnO.cjs');
|
|
6
|
+
require('../atomStore-BNQyGmU_.cjs');
|
|
7
|
+
require('../api-BtzLHcfU.cjs');
|
|
8
|
+
require('../customerService-zsDlp7g2.cjs');
|
|
9
|
+
require('../utilityTypes-DMdsI0DG.cjs');
|
|
10
|
+
require('../variantInfo-Cz2YXraO.cjs');
|
|
11
|
+
const require_useMessageInterceptor = require('../useMessageInterceptor-BnUG2Pzt.cjs');
|
|
12
12
|
|
|
13
13
|
exports.useFormEscalation = require_useMessageInterceptor.useFormEscalation;
|
|
14
14
|
exports.useMessageInterceptor = require_useMessageInterceptor.useMessageInterceptor;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import "../
|
|
4
|
-
import "../types-
|
|
5
|
-
import "../enviveConfigContext-
|
|
6
|
-
import "../atomStore-
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
11
|
-
import { useFormEscalation, useMessageInterceptor } from "../useMessageInterceptor-
|
|
1
|
+
import "../events-DgFzlVJR.js";
|
|
2
|
+
import "../logger-BexDfK3W.js";
|
|
3
|
+
import "../chat-H6YcCS4I.js";
|
|
4
|
+
import "../types-C3S1H4hl.js";
|
|
5
|
+
import "../enviveConfigContext-CWVdVWKW.js";
|
|
6
|
+
import "../atomStore-TnLPtYns.js";
|
|
7
|
+
import "../api-kpPTZhV9.js";
|
|
8
|
+
import "../customerService-C4wc0glQ.js";
|
|
9
|
+
import "../utilityTypes-UWdNHElu.js";
|
|
10
|
+
import "../variantInfo-BTvC6CQh.js";
|
|
11
|
+
import { useFormEscalation, useMessageInterceptor } from "../useMessageInterceptor-BP6gzo8a.js";
|
|
12
12
|
|
|
13
13
|
export { useFormEscalation, useMessageInterceptor };
|