@pictofit/public-types
Advanced tools
Comparing version
import { Awaitable, HostAdaptor } from "../../"; | ||
export declare function copyHostAdaptor(hostAdaptor: HostAdaptor): HostAdaptor; | ||
export declare const delay: <T extends unknown[], R>(fn: (...args: T) => Awaitable<R>, delayMS: number) => (...args: T) => Promise<R>; | ||
export declare const randomDelay: <T extends unknown[], R>(fn: (...args: T) => Awaitable<R>, delayMinMs: number, delayMaxMs: number) => (...args: T) => Promise<R>; | ||
export declare const modifyResult: <T extends unknown[], R>(fn: (...args: T) => Awaitable<R>, modificationCallBack: (val: R, ...args: T) => R) => (...args: T) => Promise<R>; | ||
export declare const modifyArguments: <T extends unknown[], R>(fn: (...args: T) => Awaitable<R>, modificationCallBack: (...val: T) => T) => (...args: T) => Awaitable<R>; | ||
export declare const delay: <T extends any[], R>(fn: (...args: T) => Awaitable<R>, delayMS: number) => (...args: T) => Promise<R>; | ||
export declare const randomDelay: <T extends any[], R>(fn: (...args: T) => Awaitable<R>, delayMinMs: number, delayMaxMs: number) => (...args: T) => Promise<R>; | ||
export declare const modifyResult: <T extends any[], R>(fn: (...args: T) => Awaitable<R>, modificationCallBack: (val: R, ...args: T) => R) => (...args: T) => Promise<R>; | ||
export declare const modifyArguments: <T extends any[], R>(fn: (...args: T) => Awaitable<R>, modificationCallBack: (...val: T) => T) => (...args: T) => Awaitable<R>; |
@@ -19,3 +19,3 @@ import { toReferenceData } from "./dressingroom.data.interface"; | ||
catch (e) { | ||
console.warn(`Failed to decode CacheID!`, e); // eslint-disable-line no-console | ||
console.log(`Failed to decode CacheID!`, e); | ||
} | ||
@@ -22,0 +22,0 @@ const query = reference === null ? |
@@ -13,2 +13,3 @@ import { RequestInfoCache } from "./cache"; | ||
this.addEntry = (id, data) => { | ||
console.log(`Adding id`, id); | ||
this.availableIds.add(id); | ||
@@ -15,0 +16,0 @@ if (data) { |
import { Analytics } from "../../../mdrc"; | ||
export declare function configureGoogleAnalytics({ app, measurementIds, debug, consentCheck, }: { | ||
export declare function useGoogleAnalytics({ app, measurementIds, debug, consentCheck, }: { | ||
measurementIds: Array<string>; | ||
@@ -4,0 +4,0 @@ debug?: boolean; |
import googleAnalytics from "@analytics/google-analytics"; | ||
import _Analytics from "analytics"; | ||
export function configureGoogleAnalytics({ app, measurementIds, debug, consentCheck, }) { | ||
export function useGoogleAnalytics({ app, measurementIds, debug, consentCheck, }) { | ||
const analytics = _Analytics({ | ||
@@ -22,9 +22,3 @@ app: app ?? "mdrc", | ||
case "Metric": | ||
// console.log( | ||
// "%c[Metric]", | ||
// "font-weight: bolder; color: Turquoise;", | ||
// data.key, | ||
// data.value, | ||
// data.attributes, | ||
// ); | ||
console.log("%c[Metric]", "font-weight: bolder; color: Turquoise;", data.key, data.value, data.attributes); | ||
if (data.key === "RenderTryOn") { | ||
@@ -52,3 +46,3 @@ void analytics.track("render_tryon", { | ||
enableTelemetry: true, | ||
collector: configureGoogleAnalytics({ | ||
collector: useGoogleAnalytics({ | ||
app: "mdrc", | ||
@@ -55,0 +49,0 @@ measurementIds: Array.isArray(measurementId) ? measurementId : [measurementId], |
@@ -39,4 +39,3 @@ const hashParamter = 'pictofit::share'; | ||
catch (e) { | ||
/* eslint-disable no-console */ | ||
console.warn(`Failed to share link with sharing API`, e); | ||
console.error(`Failed to share link with sharing API`, e); | ||
} | ||
@@ -50,4 +49,3 @@ try { | ||
catch (e) { | ||
/* eslint-disable no-console */ | ||
console.warn(`Failed to share with clipboard`, e); | ||
console.error(`Failed to copy link to clipboard`, e); | ||
} | ||
@@ -68,3 +66,2 @@ throw new Error("Sharing failed"); | ||
else { | ||
/* eslint-disable no-console */ | ||
console.warn(`Invalid share state`, encoded); | ||
@@ -76,3 +73,2 @@ } | ||
catch (e) { | ||
/* eslint-disable no-console */ | ||
console.error(`Failed to get share state`, e); | ||
@@ -79,0 +75,0 @@ } |
{ | ||
"name": "@pictofit/public-types", | ||
"version": "0.1.82-afitzek-mdrc-integration-114d6a398a45748eccd957d24fd69d814ef02371", | ||
"version": "0.1.82-fixinfopoints-39d14e4f27088f226af8e6f138acc484b2843aca", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1532393
-0.03%3975
-0.23%