@heycater/qualification-funnel 1.1.1 → 1.2.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.
- package/dist/demo/iife-auto.html +1 -1
- package/dist/demo/iife.html +1 -1
- package/dist/heycater-funnel.iife.js +1 -1
- package/dist/index.cjs.js +54 -54
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +91 -112
- package/dist/index.esm.js.map +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
package/dist/demo/iife-auto.html
CHANGED
package/dist/demo/iife.html
CHANGED
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
// Configuration - simulating what parent app would provide
|
|
88
88
|
window.__HEYCATER_CONFIG__ = {
|
|
89
89
|
graphqlEndpoint: 'https://api.heycater.com/graphql',
|
|
90
|
-
googleMapsApiKey: '
|
|
90
|
+
googleMapsApiKey: 'YOUR_GOOGLE_MAPS_API_KEY',
|
|
91
91
|
locale: 'de',
|
|
92
92
|
isProduction: false,
|
|
93
93
|
// bugsnagApiKey: 'your-key-here', // Uncomment to enable Bugsnag
|
|
@@ -1481,4 +1481,4 @@
|
|
|
1481
1481
|
display: none;
|
|
1482
1482
|
}
|
|
1483
1483
|
|
|
1484
|
-
`,gU="trustedshops_ratings",vU=3e5;let yU=null;const bU=function(){const e="undefined"!=typeof window?window.__HEYCATER_CONFIG__:void 0;return{apiEndpoint:(null==e?void 0:e.graphqlEndpoint)||"https://api.heycater.com/graphql",googleMapsApiKey:(null==e?void 0:e.googleMapsApiKey)||"
|
|
1484
|
+
`,gU="trustedshops_ratings",vU=3e5;let yU=null;const bU=function(){const e="undefined"!=typeof window?window.__HEYCATER_CONFIG__:void 0;return{apiEndpoint:(null==e?void 0:e.graphqlEndpoint)||"https://api.heycater.com/graphql",googleMapsApiKey:(null==e?void 0:e.googleMapsApiKey)||"",locale:(null==e?void 0:e.locale)||"de",storageKey:"heycater-funnel",onBackground:"light",highlightColor:"primary"}}();var wU;function xU(){const[e,t]=m.useState(null);m.useEffect(()=>{(async()=>{if(yU&&Date.now()-yU.timestamp<vU)return yU.data;if("undefined"!=typeof window)try{const e=sessionStorage.getItem(gU);if(e){const t=JSON.parse(e);if(t.timestamp&&Date.now()-t.timestamp<vU)return yU=t,t.data}}catch{}const e=await fetch("https://integrations.etrusted.com/feeds/grades/v1/channels/chl-735bd2eb-de5a-4bf6-8510-55080217cff2/touchpoints/all/feed.json",{headers:{"Content-Type":"application/json"},method:"GET"}),t=(await e.json()).grades;if(t){const e={data:t,timestamp:Date.now()};if(yU=e,"undefined"!=typeof window)try{sessionStorage.setItem(gU,JSON.stringify(e))}catch{}}return t})().then(t).catch(console.error)},[]);const n=((e={})=>{const t=e.locale||"de",n=e.locales||GD;return yC.isInitialized||yC.use(Ad).init({lng:t,supportedLngs:n,preload:GD,fallbackLng:VB,resources:$B,interpolation:{escapeValue:!1},initImmediate:!1,react:{useSuspense:!1}}),yC.language!==t&&yC.changeLanguage(t),yC})({locale:bU.locale}),r=(o=bU.apiEndpoint,new Sm({url:o,exchanges:[ym,xm({onError:fU}),pU,wm],fetch:hU}));var o;return x.jsx(Om,{value:r,children:x.jsx(Ud,{i18n:n,children:x.jsx(kC,{locale:bU.locale,children:x.jsx(kp,{theme:dU,children:x.jsx(Ca,{theme:dU,children:x.jsxs(Yi,{injectFirst:!0,children:[x.jsx(cl,{}),x.jsx(mU,{}),x.jsx($T,{initialized:!0,storageKey:bU.storageKey,storage:"sessionStorage",children:x.jsx(YB,{onBackground:bU.onBackground,highlightColor:bU.highlightColor,ratings:e})})]})})})})})})}function kU(){document.querySelectorAll("[data-heycater-funnel]").forEach(e=>{U.render(x.jsx(xU,{}),e)})}(wU={graphqlEndpoint:bU.apiEndpoint,googleMapsApiKey:bU.googleMapsApiKey,locale:bU.locale})&&(PC={...OC,...wU}),"undefined"!=typeof window&&window.__HEYCATER_CONFIG__&&(PC={...PC,...window.__HEYCATER_CONFIG__}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",kU):kU(),window.HeycaterFunnel={mount:function(e){const t="string"==typeof e?document.querySelector(e):e;t&&U.render(x.jsx(xU,{}),t)}}}();
|