@workleap/mixpanel 5.0.1 → 5.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @workleap/mixpanel
2
2
 
3
+ ## 5.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#189](https://github.com/workleap/wl-telemetry/pull/189) [`f009896`](https://github.com/workleap/wl-telemetry/commit/f0098965209846a04933c890ba77cf4f645c916c) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated dependencies.
8
+
9
+ - Updated dependencies [[`f009896`](https://github.com/workleap/wl-telemetry/commit/f0098965209846a04933c890ba77cf4f645c916c)]:
10
+ - @workleap-telemetry/core@2.0.2
11
+
12
+ ## 5.0.2
13
+
14
+ ### Patch Changes
15
+
16
+ - [#178](https://github.com/workleap/wl-telemetry/pull/178) [`10a7532`](https://github.com/workleap/wl-telemetry/commit/10a753252343f98b1f0a8b9dd80aea5a9e8d137c) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Update dependencies.
17
+
18
+ - Updated dependencies [[`10a7532`](https://github.com/workleap/wl-telemetry/commit/10a753252343f98b1f0a8b9dd80aea5a9e8d137c)]:
19
+ - @workleap-telemetry/core@2.0.1
20
+ - @workleap/logrocket@3.0.3
21
+
3
22
  ## 5.0.1
4
23
 
5
24
  ### Patch Changes
@@ -1,8 +1,6 @@
1
1
  import { getBaseProperties } from "./properties.js";
2
2
 
3
- ;// CONCATENATED MODULE: external "./properties.js"
4
3
 
5
- ;// CONCATENATED MODULE: ./src/js/MixpanelClient.ts
6
4
 
7
5
  class MixpanelClientImpl {
8
6
  #globalEventProperties = new Map();
@@ -1 +1 @@
1
- {"version":3,"file":"js/MixpanelClient.js","sources":["../../src/js/MixpanelClient.ts"],"sourcesContent":["import type { CreateMixpanelTrackingFunctionOptions, MixpanelTrackingFunction } from \"@workleap-telemetry/core\";\nimport type { Logger } from \"@workleap/logging\";\nimport { getBaseProperties } from \"./properties.ts\";\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface MixpanelClient {\n /**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n createTrackingFunction: (options?: CreateMixpanelTrackingFunctionOptions) => MixpanelTrackingFunction;\n /**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n setGlobalEventProperty: (key: string, value: unknown) => void;\n /**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n setGlobalEventProperties: (values: Record<string, unknown>) => void;\n}\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface MixpanelClientOptions {\n /**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n productId?: string;\n}\n\nexport class MixpanelClientImpl implements MixpanelClient {\n readonly #globalEventProperties = new Map<string, unknown>();\n readonly #endpoint: string;\n readonly #logger: Logger;\n readonly #productId?: string;\n\n constructor(endpoint: string, logger: Logger, options: MixpanelClientOptions = {}) {\n const {\n productId\n } = options;\n\n this.#endpoint = endpoint;\n this.#logger = logger;\n this.#productId = productId;\n }\n\n // IMPORTANT: If you update this method, make sure to update the MixpanelPartialClient\n // interface as well in @workleap-telemetry/core.\n createTrackingFunction(options: CreateMixpanelTrackingFunctionOptions = {}) {\n const {\n productId,\n targetProductId,\n additionalProperties = {}\n } = options;\n\n const trackFunction: MixpanelTrackingFunction = async (eventName, properties, _options = {}) => {\n try {\n const {\n keepAlive = false\n } = _options;\n\n const baseProperties = getBaseProperties();\n\n const allProperties = {\n ...baseProperties,\n ...Object.fromEntries(this.#globalEventProperties),\n ...additionalProperties,\n ...properties\n };\n\n await fetch(this.#endpoint, {\n method: \"POST\",\n credentials: \"include\",\n keepalive: keepAlive,\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n eventName,\n productIdentifier: productId ?? this.#productId,\n // Not sure why, but it seems important to send \"null\" if not target product identifier\n // are provided.\n targetProductIdentifier: targetProductId ?? null,\n properties: allProperties\n })\n });\n } catch (error: unknown) {\n this.#logger\n .withText(`[mixpanel] An error occurred while sending a tracking event to \"${this.#endpoint}\":`)\n .withError(error as Error)\n .error();\n }\n };\n\n return trackFunction;\n }\n\n setGlobalEventProperty(key: string, value: unknown) {\n this.#globalEventProperties.set(key, value);\n }\n\n setGlobalEventProperties(values: Record<string, unknown>) {\n Object.keys(values).forEach(x => {\n this.#globalEventProperties.set(x, values[x]);\n });\n }\n}\n"],"names":["getBaseProperties","MixpanelClientImpl","Map","endpoint","logger","options","productId","targetProductId","additionalProperties","trackFunction","eventName","properties","_options","keepAlive","baseProperties","allProperties","Object","fetch","JSON","error","key","value","values","x"],"mappings":";;;;;AAEoD;AA8B7C,MAAMC;IACA,sBAAsB,GAAG,IAAIC,MAAuB;IACpD,SAAS,CAAS;IAClB,OAAO,CAAS;IAChB,UAAU,CAAU;IAE7B,YAAYC,QAAgB,EAAEC,MAAc,EAAEC,UAAiC,CAAC,CAAC,CAAE;QAC/E,MAAM,EACFC,SAAS,EACZ,GAAGD;QAEJ,IAAI,CAAC,SAAS,GAAGF;QACjB,IAAI,CAAC,OAAO,GAAGC;QACf,IAAI,CAAC,UAAU,GAAGE;IACtB;IAEA,sFAAsF;IACtF,iDAAiD;IACjD,uBAAuBD,UAAiD,CAAC,CAAC,EAAE;QACxE,MAAM,EACFC,SAAS,EACTC,eAAe,EACfC,uBAAuB,CAAC,CAAC,EAC5B,GAAGH;QAEJ,MAAMI,gBAA0C,OAAOC,WAAWC,YAAYC,WAAW,CAAC,CAAC;YACvF,IAAI;gBACA,MAAM,EACFC,YAAY,KAAK,EACpB,GAAGD;gBAEJ,MAAME,iBAAiBd,iBAAiBA;gBAExC,MAAMe,gBAAgB;oBAClB,GAAGD,cAAc;oBACjB,GAAGE,OAAO,WAAW,CAAC,IAAI,CAAC,sBAAsB,CAAC;oBAClD,GAAGR,oBAAoB;oBACvB,GAAGG,UAAU;gBACjB;gBAEA,MAAMM,MAAM,IAAI,CAAC,SAAS,EAAE;oBACxB,QAAQ;oBACR,aAAa;oBACb,WAAWJ;oBACX,SAAS;wBAAE,gBAAgB;oBAAmB;oBAC9C,MAAMK,KAAK,SAAS,CAAC;wBACjBR;wBACA,mBAAmBJ,aAAa,IAAI,CAAC,UAAU;wBAC/C,uFAAuF;wBACvF,gBAAgB;wBAChB,yBAAyBC,mBAAmB;wBAC5C,YAAYQ;oBAChB;gBACJ;YACJ,EAAE,OAAOI,OAAgB;gBACrB,IAAI,CAAC,OAAO,CACP,QAAQ,CAAC,CAAC,gEAAgE,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAC9F,SAAS,CAACA,OACV,KAAK;YACd;QACJ;QAEA,OAAOV;IACX;IAEA,uBAAuBW,GAAW,EAAEC,KAAc,EAAE;QAChD,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAACD,KAAKC;IACzC;IAEA,yBAAyBC,MAA+B,EAAE;QACtDN,OAAO,IAAI,CAACM,QAAQ,OAAO,CAACC,CAAAA;YACxB,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAACA,GAAGD,MAAM,CAACC,EAAE;QAChD;IACJ;AACJ"}
1
+ {"version":3,"file":"js/MixpanelClient.js","sources":["../../src/js/MixpanelClient.ts"],"sourcesContent":["import type { CreateMixpanelTrackingFunctionOptions, MixpanelTrackingFunction } from \"@workleap-telemetry/core\";\nimport type { Logger } from \"@workleap/logging\";\nimport { getBaseProperties } from \"./properties.ts\";\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface MixpanelClient {\n /**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n createTrackingFunction: (options?: CreateMixpanelTrackingFunctionOptions) => MixpanelTrackingFunction;\n /**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n setGlobalEventProperty: (key: string, value: unknown) => void;\n /**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n setGlobalEventProperties: (values: Record<string, unknown>) => void;\n}\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface MixpanelClientOptions {\n /**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n productId?: string;\n}\n\nexport class MixpanelClientImpl implements MixpanelClient {\n readonly #globalEventProperties = new Map<string, unknown>();\n readonly #endpoint: string;\n readonly #logger: Logger;\n readonly #productId?: string;\n\n constructor(endpoint: string, logger: Logger, options: MixpanelClientOptions = {}) {\n const {\n productId\n } = options;\n\n this.#endpoint = endpoint;\n this.#logger = logger;\n this.#productId = productId;\n }\n\n // IMPORTANT: If you update this method, make sure to update the MixpanelPartialClient\n // interface as well in @workleap-telemetry/core.\n createTrackingFunction(options: CreateMixpanelTrackingFunctionOptions = {}) {\n const {\n productId,\n targetProductId,\n additionalProperties = {}\n } = options;\n\n const trackFunction: MixpanelTrackingFunction = async (eventName, properties, _options = {}) => {\n try {\n const {\n keepAlive = false\n } = _options;\n\n const baseProperties = getBaseProperties();\n\n const allProperties = {\n ...baseProperties,\n ...Object.fromEntries(this.#globalEventProperties),\n ...additionalProperties,\n ...properties\n };\n\n await fetch(this.#endpoint, {\n method: \"POST\",\n credentials: \"include\",\n keepalive: keepAlive,\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n eventName,\n productIdentifier: productId ?? this.#productId,\n // Not sure why, but it seems important to send \"null\" if not target product identifier\n // are provided.\n targetProductIdentifier: targetProductId ?? null,\n properties: allProperties\n })\n });\n } catch (error: unknown) {\n this.#logger\n .withText(`[mixpanel] An error occurred while sending a tracking event to \"${this.#endpoint}\":`)\n .withError(error as Error)\n .error();\n }\n };\n\n return trackFunction;\n }\n\n setGlobalEventProperty(key: string, value: unknown) {\n this.#globalEventProperties.set(key, value);\n }\n\n setGlobalEventProperties(values: Record<string, unknown>) {\n Object.keys(values).forEach(x => {\n this.#globalEventProperties.set(x, values[x]);\n });\n }\n}\n"],"names":["getBaseProperties","MixpanelClientImpl","Map","endpoint","logger","options","productId","targetProductId","additionalProperties","trackFunction","eventName","properties","_options","keepAlive","baseProperties","allProperties","Object","fetch","JSON","error","key","value","values","x"],"mappings":";;;AAEoD;AA8B7C,MAAMC,kBAAkBA;IAClB,sBAAsB,GAAG,IAAIC,MAAuB;IACpD,SAAS,CAAS;IAClB,OAAO,CAAS;IAChB,UAAU,CAAU;IAE7B,YAAYC,QAAgB,EAAEC,MAAc,EAAEC,UAAiC,CAAC,CAAC,CAAE;QAC/E,MAAM,EACFC,SAAS,EACZ,GAAGD;QAEJ,IAAI,CAAC,SAAS,GAAGF;QACjB,IAAI,CAAC,OAAO,GAAGC;QACf,IAAI,CAAC,UAAU,GAAGE;IACtB;IAEA,sFAAsF;IACtF,iDAAiD;IACjD,uBAAuBD,UAAiD,CAAC,CAAC,EAAE;QACxE,MAAM,EACFC,SAAS,EACTC,eAAe,EACfC,uBAAuB,CAAC,CAAC,EAC5B,GAAGH;QAEJ,MAAMI,gBAA0C,OAAOC,WAAWC,YAAYC,WAAW,CAAC,CAAC;YACvF,IAAI;gBACA,MAAM,EACFC,YAAY,KAAK,EACpB,GAAGD;gBAEJ,MAAME,iBAAiBd,iBAAiBA;gBAExC,MAAMe,gBAAgB;oBAClB,GAAGD,cAAc;oBACjB,GAAGE,OAAO,WAAW,CAAC,IAAI,CAAC,sBAAsB,CAAC;oBAClD,GAAGR,oBAAoB;oBACvB,GAAGG,UAAU;gBACjB;gBAEA,MAAMM,MAAM,IAAI,CAAC,SAAS,EAAE;oBACxB,QAAQ;oBACR,aAAa;oBACb,WAAWJ;oBACX,SAAS;wBAAE,gBAAgB;oBAAmB;oBAC9C,MAAMK,KAAK,SAAS,CAAC;wBACjBR;wBACA,mBAAmBJ,aAAa,IAAI,CAAC,UAAU;wBAC/C,uFAAuF;wBACvF,gBAAgB;wBAChB,yBAAyBC,mBAAmB;wBAC5C,YAAYQ;oBAChB;gBACJ;YACJ,EAAE,OAAOI,OAAgB;gBACrB,IAAI,CAAC,OAAO,CACP,QAAQ,CAAC,CAAC,gEAAgE,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAC9F,SAAS,CAACA,OACV,KAAK;YACd;QACJ;QAEA,OAAOV;IACX;IAEA,uBAAuBW,GAAW,EAAEC,KAAc,EAAE;QAChD,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAACD,KAAKC;IACzC;IAEA,yBAAyBC,MAA+B,EAAE;QACtDN,OAAO,IAAI,CAACM,QAAQ,OAAO,CAACC,CAAAA;YACxB,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAACA,GAAGD,MAAM,CAACC,EAAE;QAChD;IACJ;AACJ"}
@@ -1,5 +1,3 @@
1
-
2
- ;// CONCATENATED MODULE: ./src/js/NoopMixpanelClient.ts
3
1
  class NoopMixpanelClient {
4
2
  createTrackingFunction() {
5
3
  return ()=>Promise.resolve();
@@ -1 +1 @@
1
- {"version":3,"file":"js/NoopMixpanelClient.js","sources":["../../src/js/NoopMixpanelClient.ts"],"sourcesContent":["import type { MixpanelClient } from \"./MixpanelClient.ts\";\n\nexport class NoopMixpanelClient implements MixpanelClient {\n createTrackingFunction() {\n return () => Promise.resolve();\n }\n\n setGlobalEventProperty() {}\n setGlobalEventProperties() {}\n}\n"],"names":["NoopMixpanelClient","Promise"],"mappings":";;AAEO,MAAMA;IACT,yBAAyB;QACrB,OAAO,IAAMC,QAAQ,OAAO;IAChC;IAEA,yBAAyB,CAAC;IAC1B,2BAA2B,CAAC;AAChC"}
1
+ {"version":3,"file":"js/NoopMixpanelClient.js","sources":["../../src/js/NoopMixpanelClient.ts"],"sourcesContent":["import type { MixpanelClient } from \"./MixpanelClient.ts\";\n\nexport class NoopMixpanelClient implements MixpanelClient {\n createTrackingFunction() {\n return () => Promise.resolve();\n }\n\n setGlobalEventProperty() {}\n setGlobalEventProperties() {}\n}\n"],"names":["NoopMixpanelClient","Promise"],"mappings":"AAEO,MAAMA,kBAAkBA;IAC3B,yBAAyB;QACrB,OAAO,IAAMC,QAAQ,OAAO;IAChC;IAEA,yBAAyB,CAAC;IAC1B,2BAA2B,CAAC;AAChC"}
package/dist/js/env.js CHANGED
@@ -1,5 +1,3 @@
1
-
2
- ;// CONCATENATED MODULE: ./src/js/env.ts
3
1
  const EnvironmentList = [
4
2
  "development",
5
3
  "staging",
@@ -1 +1 @@
1
- {"version":3,"file":"js/env.js","sources":["../../src/js/env.ts"],"sourcesContent":["const EnvironmentList = [\"development\", \"staging\", \"production\", \"local\", \"msw\"] as const;\n\nexport type MixpanelEnvironment = typeof EnvironmentList[number];\n\nconst NavigationApiBaseUrl: Record<MixpanelEnvironment, string> = {\n \"production\": \"https://api.platform.workleap.com/shell/navigation/\",\n \"staging\": \"https://api.platform.workleap-stg.com/shell/navigation/\",\n \"development\": \"https://api.platform.workleap-dev.com/shell/navigation/\",\n \"local\": \"https://api.platform.workleap-dev.com/shell/navigation/\",\n \"msw\": \"/api/shell/navigation/\"\n};\n\n// Cannot use URL() because it doesn't support relative base url: https://github.com/whatwg/url/issues/531.\nfunction resolveApiUrl(path: string, baseUrl: string | undefined): string {\n return `${baseUrl}${baseUrl!.endsWith(\"/\") ? \"\" : \"/\"}${path.startsWith(\"/\") ? path.substring(1) : path}`;\n}\n\nexport function getTrackingEndpoint(envOrTrackingApiBaseUrl: MixpanelEnvironment | (string & {}), trackingEndpoint = \"tracking/track\"): string {\n let baseUrl: string;\n\n if (EnvironmentList.includes(envOrTrackingApiBaseUrl as MixpanelEnvironment)) {\n baseUrl = NavigationApiBaseUrl[envOrTrackingApiBaseUrl as MixpanelEnvironment];\n } else {\n baseUrl = envOrTrackingApiBaseUrl;\n }\n\n return resolveApiUrl(trackingEndpoint, baseUrl);\n}\n"],"names":["EnvironmentList","NavigationApiBaseUrl","resolveApiUrl","path","baseUrl","getTrackingEndpoint","envOrTrackingApiBaseUrl","trackingEndpoint"],"mappings":";;AAAA,MAAMA,kBAAkB;IAAC;IAAe;IAAW;IAAc;IAAS;CAAM;AAIhF,MAAMC,uBAA4D;IAC9D,cAAc;IACd,WAAW;IACX,eAAe;IACf,SAAS;IACT,OAAO;AACX;AAEA,2GAA2G;AAC3G,SAASC,cAAcC,IAAY,EAAEC,OAA2B;IAC5D,OAAO,GAAGA,UAAUA,QAAS,QAAQ,CAAC,OAAO,KAAK,MAAMD,KAAK,UAAU,CAAC,OAAOA,KAAK,SAAS,CAAC,KAAKA,MAAM;AAC7G;AAEO,SAASE,oBAAoBC,uBAA4D,EAAEC,mBAAmB,gBAAgB;IACjI,IAAIH;IAEJ,IAAIJ,gBAAgB,QAAQ,CAACM,0BAAiD;QAC1EF,UAAUH,oBAAoB,CAACK,wBAA+C;IAClF,OAAO;QACHF,UAAUE;IACd;IAEA,OAAOJ,cAAcK,kBAAkBH;AAC3C"}
1
+ {"version":3,"file":"js/env.js","sources":["../../src/js/env.ts"],"sourcesContent":["const EnvironmentList = [\"development\", \"staging\", \"production\", \"local\", \"msw\"] as const;\n\nexport type MixpanelEnvironment = typeof EnvironmentList[number];\n\nconst NavigationApiBaseUrl: Record<MixpanelEnvironment, string> = {\n \"production\": \"https://api.platform.workleap.com/shell/navigation/\",\n \"staging\": \"https://api.platform.workleap-stg.com/shell/navigation/\",\n \"development\": \"https://api.platform.workleap-dev.com/shell/navigation/\",\n \"local\": \"https://api.platform.workleap-dev.com/shell/navigation/\",\n \"msw\": \"/api/shell/navigation/\"\n};\n\n// Cannot use URL() because it doesn't support relative base url: https://github.com/whatwg/url/issues/531.\nfunction resolveApiUrl(path: string, baseUrl: string | undefined): string {\n return `${baseUrl}${baseUrl!.endsWith(\"/\") ? \"\" : \"/\"}${path.startsWith(\"/\") ? path.substring(1) : path}`;\n}\n\nexport function getTrackingEndpoint(envOrTrackingApiBaseUrl: MixpanelEnvironment | (string & {}), trackingEndpoint = \"tracking/track\"): string {\n let baseUrl: string;\n\n if (EnvironmentList.includes(envOrTrackingApiBaseUrl as MixpanelEnvironment)) {\n baseUrl = NavigationApiBaseUrl[envOrTrackingApiBaseUrl as MixpanelEnvironment];\n } else {\n baseUrl = envOrTrackingApiBaseUrl;\n }\n\n return resolveApiUrl(trackingEndpoint, baseUrl);\n}\n"],"names":["EnvironmentList","NavigationApiBaseUrl","resolveApiUrl","path","baseUrl","getTrackingEndpoint","envOrTrackingApiBaseUrl","trackingEndpoint"],"mappings":"AAAA,MAAMA,eAAeA,GAAG;IAAC;IAAe;IAAW;IAAc;IAAS;CAAM;AAIhF,MAAMC,oBAAoBA,GAAwC;IAC9D,cAAc;IACd,WAAW;IACX,eAAe;IACf,SAAS;IACT,OAAO;AACX;AAEA,2GAA2G;AAC3G,SAASC,aAAaA,CAACC,IAAY,EAAEC,OAA2B;IAC5D,OAAO,GAAGA,UAAUA,QAAS,QAAQ,CAAC,OAAO,KAAK,MAAMD,KAAK,UAAU,CAAC,OAAOA,KAAK,SAAS,CAAC,KAAKA,MAAM;AAC7G;AAEO,SAASE,mBAAmBA,CAACC,uBAA4D,EAAEC,mBAAmB,gBAAgB;IACjI,IAAIH;IAEJ,IAAIJ,eAAeA,CAAC,QAAQ,CAACM,0BAAiD;QAC1EF,UAAUH,oBAAoB,CAACK,wBAA+C;IAClF,OAAO;QACHF,UAAUE;IACd;IAEA,OAAOJ,aAAaA,CAACK,kBAAkBH;AAC3C"}
package/dist/js/index.js CHANGED
@@ -1,18 +1,12 @@
1
- import { createTelemetryContext } from "@workleap-telemetry/core";
2
- import { initializeMixpanel } from "./initializeMixpanel.js";
3
- import { NoopMixpanelClient } from "./NoopMixpanelClient.js";
4
1
 
5
- ;// CONCATENATED MODULE: external "@workleap-telemetry/core"
6
2
 
7
- ;// CONCATENATED MODULE: external "./initializeMixpanel.js"
8
3
 
9
- ;// CONCATENATED MODULE: external "./NoopMixpanelClient.js"
10
4
 
11
- ;// CONCATENATED MODULE: ./src/js/index.ts
12
5
 
13
6
 
14
7
 
15
-
16
- export { NoopMixpanelClient, createTelemetryContext, initializeMixpanel };
8
+ export { createTelemetryContext } from "@workleap-telemetry/core";
9
+ export { initializeMixpanel } from "./initializeMixpanel.js";
10
+ export { NoopMixpanelClient } from "./NoopMixpanelClient.js";
17
11
 
18
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"js/index.js","sources":["../../src/js/index.ts"],"sourcesContent":["export { createTelemetryContext, type CreateTelemetryContextOptions, type TelemetryContext } from \"@workleap-telemetry/core\";\nexport type { CreateMixpanelTrackingFunctionOptions, MixpanelEventProperties, MixpanelTrackingFunction, MixpanelTrackingFunctionOptions } from \"@workleap-telemetry/core\";\nexport type { MixpanelEnvironment } from \"./env.ts\";\nexport { initializeMixpanel, type InitializeMixpanelOptions } from \"./initializeMixpanel.ts\";\nexport type { MixpanelClient } from \"./MixpanelClient.ts\";\nexport { NoopMixpanelClient } from \"./NoopMixpanelClient.ts\";\n\n"],"names":["createTelemetryContext","initializeMixpanel","NoopMixpanelClient"],"mappings":";;;;;;;;;;;AAA6H;AAGhC;AAEhC"}
1
+ {"version":3,"file":"js/index.js","sources":["../../src/js/index.ts"],"sourcesContent":["export { createTelemetryContext, type CreateTelemetryContextOptions, type TelemetryContext } from \"@workleap-telemetry/core\";\nexport type { CreateMixpanelTrackingFunctionOptions, MixpanelEventProperties, MixpanelTrackingFunction, MixpanelTrackingFunctionOptions } from \"@workleap-telemetry/core\";\nexport type { MixpanelEnvironment } from \"./env.ts\";\nexport { initializeMixpanel, type InitializeMixpanelOptions } from \"./initializeMixpanel.ts\";\nexport type { MixpanelClient } from \"./MixpanelClient.ts\";\nexport { NoopMixpanelClient } from \"./NoopMixpanelClient.ts\";\n\n"],"names":["createTelemetryContext","initializeMixpanel","NoopMixpanelClient"],"mappings":";;;AAA6H;AAGhC;AAEhC"}
@@ -4,17 +4,11 @@ import { getTrackingEndpoint } from "./env.js";
4
4
  import { MixpanelClientImpl } from "./MixpanelClient.js";
5
5
  import { OtherProperties, getTelemetryProperties } from "./properties.js";
6
6
 
7
- ;// CONCATENATED MODULE: external "@workleap-telemetry/core"
8
7
 
9
- ;// CONCATENATED MODULE: external "@workleap/logging"
10
8
 
11
- ;// CONCATENATED MODULE: external "./env.js"
12
9
 
13
- ;// CONCATENATED MODULE: external "./MixpanelClient.js"
14
10
 
15
- ;// CONCATENATED MODULE: external "./properties.js"
16
11
 
17
- ;// CONCATENATED MODULE: ./src/js/initializeMixpanel.ts
18
12
 
19
13
 
20
14
 
@@ -1 +1 @@
1
- {"version":3,"file":"js/initializeMixpanel.js","sources":["../../src/js/initializeMixpanel.ts"],"sourcesContent":["import { HasExecutedGuard, type LogRocketInstrumentationPartialClient, type TelemetryContext } from \"@workleap-telemetry/core\";\nimport { createCompositeLogger, type RootLogger } from \"@workleap/logging\";\nimport { getTrackingEndpoint, type MixpanelEnvironment } from \"./env.ts\";\nimport { MixpanelClientImpl, type MixpanelClient } from \"./MixpanelClient.ts\";\nimport { getTelemetryProperties, OtherProperties } from \"./properties.ts\";\n\nlet registrationGuardInstance: HasExecutedGuard | undefined;\n\n// It's important to use a lazy singleton instead of a singleton to avoid\n// any future probleme related to HMR, tree-shaking, SSR, etc..\nfunction getRegistrationGuard() {\n if (!registrationGuardInstance) {\n registrationGuardInstance = new HasExecutedGuard();\n }\n\n return registrationGuardInstance;\n}\n\n// This function should only be used by tests.\nexport function __resetRegistrationGuard() {\n if (registrationGuardInstance) {\n registrationGuardInstance.reset();\n }\n}\n\n///////////////////////////\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface InitializeMixpanelOptions {\n /**\n * An optional product id that will be attached to every event.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n productId?: string;\n /**\n * An optional tracking endpoint.\n * @default \"tracking/track\"\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n trackingEndpoint?: string;\n /**\n * Context including telemetry correlation ids.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n telemetryContext?: TelemetryContext;\n /**\n * An optional LogRocket client to automatically add the LogRocket\n * session URL to Mixpanel events once it's available.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n logRocketInstrumentationClient?: LogRocketInstrumentationPartialClient;\n /**\n * Whether or not debug information should be logged to the console.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n verbose?: boolean;\n /**\n * An array of RootLogger instances.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n loggers?: RootLogger[];\n}\n\nexport class MixpanelInitializer {\n initialize(envOrTrackingApiBaseUrl: MixpanelEnvironment | (string & {}), options: Omit<InitializeMixpanelOptions, \"globalEventProperties\"> = {}) {\n const {\n productId,\n trackingEndpoint,\n telemetryContext,\n logRocketInstrumentationClient,\n verbose = false,\n loggers = []\n } = options;\n\n const logger = createCompositeLogger(verbose, loggers);\n const endpoint = getTrackingEndpoint(envOrTrackingApiBaseUrl, trackingEndpoint);\n\n logger.information(\"[mixpanel] Mixpanel is initialized.\");\n\n const client = new MixpanelClientImpl(endpoint, logger, {\n productId\n });\n\n // Set the telemetry correlation ids on every Mixpanel event.\n if (telemetryContext) {\n for (const [key, value] of Object.entries(getTelemetryProperties(telemetryContext))) {\n client.setGlobalEventProperty(key, value);\n }\n }\n\n // If a LogRocket client is already available, register a listener to get the LogRocket session url\n // once it's available to set it on every Mixpanel event.\n if (logRocketInstrumentationClient) {\n logRocketInstrumentationClient.registerGetSessionUrlListener((sessionUrl: string) => {\n logger\n .withText(\"[mixpanel] Received LogRocket session replay URL:\")\n .withText(sessionUrl)\n .debug();\n\n client.setGlobalEventProperty(OtherProperties.LogRocketSessionUrl, sessionUrl);\n });\n }\n\n // The cast is to normalize the inferred return type to the \"LogRocketInstrumentationClient\" type.\n return client as MixpanelClient;\n }\n}\n\n/**\n * Initialize Mixpanel telemetry.\n * @param envOrTrackingApiBaseUrl The environment to get the navigation url from or a base URL.\n * @param options Mixpanel instrumentation options.\n * @returns {MixpanelClient} A Mixpanel client instance.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function initializeMixpanel(\n envOrTrackingApiBaseUrl: MixpanelEnvironment | (string & {}),\n options?: InitializeMixpanelOptions\n) {\n getRegistrationGuard().throw(\"[mixpanel] Mixpanel has already been initialized. Did you call the \\\"initializeMixpanel\\\" function twice?\");\n\n return new MixpanelInitializer().initialize(\n envOrTrackingApiBaseUrl,\n options\n );\n}\n"],"names":["HasExecutedGuard","createCompositeLogger","getTrackingEndpoint","MixpanelClientImpl","getTelemetryProperties","OtherProperties","registrationGuardInstance","getRegistrationGuard","__resetRegistrationGuard","MixpanelInitializer","envOrTrackingApiBaseUrl","options","productId","trackingEndpoint","telemetryContext","logRocketInstrumentationClient","verbose","loggers","logger","endpoint","client","key","value","Object","sessionUrl","initializeMixpanel"],"mappings":";;;;;;;;;;;;;;;;;AAA+H;AACpD;AACF;AACK;AACJ;AAE1E,IAAIM;AAEJ,yEAAyE;AACzE,+DAA+D;AAC/D,SAASC;IACL,IAAI,CAACD,2BAA2B;QAC5BA,4BAA4B,IAAIN,gBAAgBA;IACpD;IAEA,OAAOM;AACX;AAEA,8CAA8C;AACvC,SAASE;IACZ,IAAIF,2BAA2B;QAC3BA,0BAA0B,KAAK;IACnC;AACJ;AA0CO,MAAMG;IACT,WAAWC,uBAA4D,EAAEC,UAAoE,CAAC,CAAC,EAAE;QAC7I,MAAM,EACFC,SAAS,EACTC,gBAAgB,EAChBC,gBAAgB,EAChBC,8BAA8B,EAC9BC,UAAU,KAAK,EACfC,UAAU,EAAE,EACf,GAAGN;QAEJ,MAAMO,SAASjB,qBAAqBA,CAACe,SAASC;QAC9C,MAAME,WAAWjB,mBAAmBA,CAACQ,yBAAyBG;QAE9DK,OAAO,WAAW,CAAC;QAEnB,MAAME,SAAS,IAAIjB,kBAAkBA,CAACgB,UAAUD,QAAQ;YACpDN;QACJ;QAEA,6DAA6D;QAC7D,IAAIE,kBAAkB;YAClB,KAAK,MAAM,CAACO,KAAKC,MAAM,IAAIC,OAAO,OAAO,CAACnB,sBAAsBA,CAACU,mBAAoB;gBACjFM,OAAO,sBAAsB,CAACC,KAAKC;YACvC;QACJ;QAEA,mGAAmG;QACnG,yDAAyD;QACzD,IAAIP,gCAAgC;YAChCA,+BAA+B,6BAA6B,CAAC,CAACS;gBAC1DN,OACK,QAAQ,CAAC,qDACT,QAAQ,CAACM,YACT,KAAK;gBAEVJ,OAAO,sBAAsB,CAACf,mCAAmC,EAAEmB;YACvE;QACJ;QAEA,kGAAkG;QAClG,OAAOJ;IACX;AACJ;AAEA;;;;;;CAMC,GACM,SAASK,mBACZf,uBAA4D,EAC5DC,OAAmC;IAEnCJ,uBAAuB,KAAK,CAAC;IAE7B,OAAO,IAAIE,sBAAsB,UAAU,CACvCC,yBACAC;AAER"}
1
+ {"version":3,"file":"js/initializeMixpanel.js","sources":["../../src/js/initializeMixpanel.ts"],"sourcesContent":["import { HasExecutedGuard, type LogRocketInstrumentationPartialClient, type TelemetryContext } from \"@workleap-telemetry/core\";\nimport { createCompositeLogger, type RootLogger } from \"@workleap/logging\";\nimport { getTrackingEndpoint, type MixpanelEnvironment } from \"./env.ts\";\nimport { MixpanelClientImpl, type MixpanelClient } from \"./MixpanelClient.ts\";\nimport { getTelemetryProperties, OtherProperties } from \"./properties.ts\";\n\nlet registrationGuardInstance: HasExecutedGuard | undefined;\n\n// It's important to use a lazy singleton instead of a singleton to avoid\n// any future probleme related to HMR, tree-shaking, SSR, etc..\nfunction getRegistrationGuard() {\n if (!registrationGuardInstance) {\n registrationGuardInstance = new HasExecutedGuard();\n }\n\n return registrationGuardInstance;\n}\n\n// This function should only be used by tests.\nexport function __resetRegistrationGuard() {\n if (registrationGuardInstance) {\n registrationGuardInstance.reset();\n }\n}\n\n///////////////////////////\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface InitializeMixpanelOptions {\n /**\n * An optional product id that will be attached to every event.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n productId?: string;\n /**\n * An optional tracking endpoint.\n * @default \"tracking/track\"\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n trackingEndpoint?: string;\n /**\n * Context including telemetry correlation ids.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n telemetryContext?: TelemetryContext;\n /**\n * An optional LogRocket client to automatically add the LogRocket\n * session URL to Mixpanel events once it's available.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n logRocketInstrumentationClient?: LogRocketInstrumentationPartialClient;\n /**\n * Whether or not debug information should be logged to the console.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n verbose?: boolean;\n /**\n * An array of RootLogger instances.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n loggers?: RootLogger[];\n}\n\nexport class MixpanelInitializer {\n initialize(envOrTrackingApiBaseUrl: MixpanelEnvironment | (string & {}), options: Omit<InitializeMixpanelOptions, \"globalEventProperties\"> = {}) {\n const {\n productId,\n trackingEndpoint,\n telemetryContext,\n logRocketInstrumentationClient,\n verbose = false,\n loggers = []\n } = options;\n\n const logger = createCompositeLogger(verbose, loggers);\n const endpoint = getTrackingEndpoint(envOrTrackingApiBaseUrl, trackingEndpoint);\n\n logger.information(\"[mixpanel] Mixpanel is initialized.\");\n\n const client = new MixpanelClientImpl(endpoint, logger, {\n productId\n });\n\n // Set the telemetry correlation ids on every Mixpanel event.\n if (telemetryContext) {\n for (const [key, value] of Object.entries(getTelemetryProperties(telemetryContext))) {\n client.setGlobalEventProperty(key, value);\n }\n }\n\n // If a LogRocket client is already available, register a listener to get the LogRocket session url\n // once it's available to set it on every Mixpanel event.\n if (logRocketInstrumentationClient) {\n logRocketInstrumentationClient.registerGetSessionUrlListener((sessionUrl: string) => {\n logger\n .withText(\"[mixpanel] Received LogRocket session replay URL:\")\n .withText(sessionUrl)\n .debug();\n\n client.setGlobalEventProperty(OtherProperties.LogRocketSessionUrl, sessionUrl);\n });\n }\n\n // The cast is to normalize the inferred return type to the \"LogRocketInstrumentationClient\" type.\n return client as MixpanelClient;\n }\n}\n\n/**\n * Initialize Mixpanel telemetry.\n * @param envOrTrackingApiBaseUrl The environment to get the navigation url from or a base URL.\n * @param options Mixpanel instrumentation options.\n * @returns {MixpanelClient} A Mixpanel client instance.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function initializeMixpanel(\n envOrTrackingApiBaseUrl: MixpanelEnvironment | (string & {}),\n options?: InitializeMixpanelOptions\n) {\n getRegistrationGuard().throw(\"[mixpanel] Mixpanel has already been initialized. Did you call the \\\"initializeMixpanel\\\" function twice?\");\n\n return new MixpanelInitializer().initialize(\n envOrTrackingApiBaseUrl,\n options\n );\n}\n"],"names":["HasExecutedGuard","createCompositeLogger","getTrackingEndpoint","MixpanelClientImpl","getTelemetryProperties","OtherProperties","registrationGuardInstance","getRegistrationGuard","__resetRegistrationGuard","MixpanelInitializer","envOrTrackingApiBaseUrl","options","productId","trackingEndpoint","telemetryContext","logRocketInstrumentationClient","verbose","loggers","logger","endpoint","client","key","value","Object","sessionUrl","initializeMixpanel"],"mappings":";;;;;;;;;;;AAA+H;AACpD;AACF;AACK;AACJ;AAE1E,IAAIM,yBAAyBA;AAE7B,yEAAyE;AACzE,+DAA+D;AAC/D,SAASC,oBAAoBA;IACzB,IAAI,CAACD,yBAAyBA,EAAE;QAC5BA,yBAAyBA,GAAG,IAAIN,gBAAgBA;IACpD;IAEA,OAAOM,yBAAyBA;AACpC;AAEA,8CAA8C;AACvC,SAASE,wBAAwBA;IACpC,IAAIF,yBAAyBA,EAAE;QAC3BA,yBAAyBA,CAAC,KAAK;IACnC;AACJ;AA0CO,MAAMG,mBAAmBA;IAC5B,WAAWC,uBAA4D,EAAEC,UAAoE,CAAC,CAAC,EAAE;QAC7I,MAAM,EACFC,SAAS,EACTC,gBAAgB,EAChBC,gBAAgB,EAChBC,8BAA8B,EAC9BC,UAAU,KAAK,EACfC,UAAU,EAAE,EACf,GAAGN;QAEJ,MAAMO,SAASjB,qBAAqBA,CAACe,SAASC;QAC9C,MAAME,WAAWjB,mBAAmBA,CAACQ,yBAAyBG;QAE9DK,OAAO,WAAW,CAAC;QAEnB,MAAME,SAAS,IAAIjB,kBAAkBA,CAACgB,UAAUD,QAAQ;YACpDN;QACJ;QAEA,6DAA6D;QAC7D,IAAIE,kBAAkB;YAClB,KAAK,MAAM,CAACO,KAAKC,MAAM,IAAIC,OAAO,OAAO,CAACnB,sBAAsBA,CAACU,mBAAoB;gBACjFM,OAAO,sBAAsB,CAACC,KAAKC;YACvC;QACJ;QAEA,mGAAmG;QACnG,yDAAyD;QACzD,IAAIP,gCAAgC;YAChCA,+BAA+B,6BAA6B,CAAC,CAACS;gBAC1DN,OACK,QAAQ,CAAC,qDACT,QAAQ,CAACM,YACT,KAAK;gBAEVJ,OAAO,sBAAsB,CAACf,mCAAmC,EAAEmB;YACvE;QACJ;QAEA,kGAAkG;QAClG,OAAOJ;IACX;AACJ;AAEA;;;;;;CAMC,GACM,SAASK,kBAAkBA,CAC9Bf,uBAA4D,EAC5DC,OAAmC;IAEnCJ,oBAAoBA,GAAG,KAAK,CAAC;IAE7B,OAAO,IAAIE,mBAAmBA,GAAG,UAAU,CACvCC,yBACAC;AAER"}
@@ -1,8 +1,6 @@
1
1
  import { browserName, browserVersion, deviceType, osName, referringDomain } from "./utils.js";
2
2
 
3
- ;// CONCATENATED MODULE: external "./utils.js"
4
3
 
5
- ;// CONCATENATED MODULE: ./src/js/properties.ts
6
4
 
7
5
  const BaseProperties = {
8
6
  Browser: "$browser",
@@ -1 +1 @@
1
- {"version":3,"file":"js/properties.js","sources":["../../src/js/properties.ts"],"sourcesContent":["\nimport type { MixpanelEventProperties, TelemetryContext } from \"@workleap-telemetry/core\";\nimport { browserName, browserVersion, deviceType, osName, referringDomain } from \"./utils.ts\";\n\nexport const BaseProperties = {\n Browser: \"$browser\",\n BrowserVersion: \"$browser_version\",\n CurrentUrl: \"$current_url\",\n Device: \"$device\",\n IsMobile: \"Is Mobile\",\n Os: \"$os\",\n Referrer: \"$referrer\",\n ReferringDomain: \"$referring_domain\",\n ScreenHeight: \"$screen_height\",\n ScreenWidth: \"$screen_width\"\n} as const;\n\nexport function getBaseProperties() {\n const userAgent = navigator.userAgent;\n const device = deviceType(userAgent);\n\n return {\n [BaseProperties.Os]: osName(userAgent),\n [BaseProperties.Browser]: browserName(userAgent, navigator.vendor),\n [BaseProperties.Referrer]: document.referrer,\n [BaseProperties.ReferringDomain]: referringDomain(document.referrer),\n [BaseProperties.Device]: device,\n [BaseProperties.CurrentUrl]: window.location.href,\n [BaseProperties.BrowserVersion]: browserVersion(userAgent, navigator.vendor),\n [BaseProperties.ScreenHeight]: window.screen.height,\n [BaseProperties.ScreenWidth]: window.screen.width,\n [BaseProperties.IsMobile]: device.length > 0\n } satisfies MixpanelEventProperties;\n}\n\nexport const TelemetryProperties = {\n DeviceId: \"Device Id\",\n TelemetryId: \"Telemetry Id\"\n} as const;\n\nexport function getTelemetryProperties(context: TelemetryContext) {\n return {\n [TelemetryProperties.TelemetryId]: context.telemetryId,\n [TelemetryProperties.DeviceId]: context.deviceId\n } satisfies MixpanelEventProperties;\n}\n\nexport const OtherProperties = {\n LogRocketSessionUrl: \"LogRocket Session Url\"\n};\n"],"names":["browserName","browserVersion","deviceType","osName","referringDomain","BaseProperties","getBaseProperties","userAgent","navigator","device","document","window","TelemetryProperties","getTelemetryProperties","context","OtherProperties"],"mappings":";;;;;AAE8F;AAEvF,MAAMK,iBAAiB;IAC1B,SAAS;IACT,gBAAgB;IAChB,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,UAAU;IACV,iBAAiB;IACjB,cAAc;IACd,aAAa;AACjB,EAAW;AAEJ,SAASC;IACZ,MAAMC,YAAYC,UAAU,SAAS;IACrC,MAAMC,SAASP,UAAUA,CAACK;IAE1B,OAAO;QACH,CAACF,eAAe,EAAE,CAAC,EAAEF,MAAMA,CAACI;QAC5B,CAACF,eAAe,OAAO,CAAC,EAAEL,WAAWA,CAACO,WAAWC,UAAU,MAAM;QACjE,CAACH,eAAe,QAAQ,CAAC,EAAEK,SAAS,QAAQ;QAC5C,CAACL,eAAe,eAAe,CAAC,EAAED,eAAeA,CAACM,SAAS,QAAQ;QACnE,CAACL,eAAe,MAAM,CAAC,EAAEI;QACzB,CAACJ,eAAe,UAAU,CAAC,EAAEM,OAAO,QAAQ,CAAC,IAAI;QACjD,CAACN,eAAe,cAAc,CAAC,EAAEJ,cAAcA,CAACM,WAAWC,UAAU,MAAM;QAC3E,CAACH,eAAe,YAAY,CAAC,EAAEM,OAAO,MAAM,CAAC,MAAM;QACnD,CAACN,eAAe,WAAW,CAAC,EAAEM,OAAO,MAAM,CAAC,KAAK;QACjD,CAACN,eAAe,QAAQ,CAAC,EAAEI,OAAO,MAAM,GAAG;IAC/C;AACJ;AAEO,MAAMG,sBAAsB;IAC/B,UAAU;IACV,aAAa;AACjB,EAAW;AAEJ,SAASC,uBAAuBC,OAAyB;IAC5D,OAAO;QACH,CAACF,oBAAoB,WAAW,CAAC,EAAEE,QAAQ,WAAW;QACtD,CAACF,oBAAoB,QAAQ,CAAC,EAAEE,QAAQ,QAAQ;IACpD;AACJ;AAEO,MAAMC,kBAAkB;IAC3B,qBAAqB;AACzB,EAAE"}
1
+ {"version":3,"file":"js/properties.js","sources":["../../src/js/properties.ts"],"sourcesContent":["\nimport type { MixpanelEventProperties, TelemetryContext } from \"@workleap-telemetry/core\";\nimport { browserName, browserVersion, deviceType, osName, referringDomain } from \"./utils.ts\";\n\nexport const BaseProperties = {\n Browser: \"$browser\",\n BrowserVersion: \"$browser_version\",\n CurrentUrl: \"$current_url\",\n Device: \"$device\",\n IsMobile: \"Is Mobile\",\n Os: \"$os\",\n Referrer: \"$referrer\",\n ReferringDomain: \"$referring_domain\",\n ScreenHeight: \"$screen_height\",\n ScreenWidth: \"$screen_width\"\n} as const;\n\nexport function getBaseProperties() {\n const userAgent = navigator.userAgent;\n const device = deviceType(userAgent);\n\n return {\n [BaseProperties.Os]: osName(userAgent),\n [BaseProperties.Browser]: browserName(userAgent, navigator.vendor),\n [BaseProperties.Referrer]: document.referrer,\n [BaseProperties.ReferringDomain]: referringDomain(document.referrer),\n [BaseProperties.Device]: device,\n [BaseProperties.CurrentUrl]: window.location.href,\n [BaseProperties.BrowserVersion]: browserVersion(userAgent, navigator.vendor),\n [BaseProperties.ScreenHeight]: window.screen.height,\n [BaseProperties.ScreenWidth]: window.screen.width,\n [BaseProperties.IsMobile]: device.length > 0\n } satisfies MixpanelEventProperties;\n}\n\nexport const TelemetryProperties = {\n DeviceId: \"Device Id\",\n TelemetryId: \"Telemetry Id\"\n} as const;\n\nexport function getTelemetryProperties(context: TelemetryContext) {\n return {\n [TelemetryProperties.TelemetryId]: context.telemetryId,\n [TelemetryProperties.DeviceId]: context.deviceId\n } satisfies MixpanelEventProperties;\n}\n\nexport const OtherProperties = {\n LogRocketSessionUrl: \"LogRocket Session Url\"\n};\n"],"names":["browserName","browserVersion","deviceType","osName","referringDomain","BaseProperties","getBaseProperties","userAgent","navigator","device","document","window","TelemetryProperties","getTelemetryProperties","context","OtherProperties"],"mappings":";;;AAE8F;AAEvF,MAAMK,cAAcA,GAAG;IAC1B,SAAS;IACT,gBAAgB;IAChB,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,UAAU;IACV,iBAAiB;IACjB,cAAc;IACd,aAAa;AACjB,EAAW;AAEJ,SAASC,iBAAiBA;IAC7B,MAAMC,YAAYC,UAAU,SAAS;IACrC,MAAMC,SAASP,UAAUA,CAACK;IAE1B,OAAO;QACH,CAACF,cAAcA,CAAC,EAAE,CAAC,EAAEF,MAAMA,CAACI;QAC5B,CAACF,cAAcA,CAAC,OAAO,CAAC,EAAEL,WAAWA,CAACO,WAAWC,UAAU,MAAM;QACjE,CAACH,cAAcA,CAAC,QAAQ,CAAC,EAAEK,SAAS,QAAQ;QAC5C,CAACL,cAAcA,CAAC,eAAe,CAAC,EAAED,eAAeA,CAACM,SAAS,QAAQ;QACnE,CAACL,cAAcA,CAAC,MAAM,CAAC,EAAEI;QACzB,CAACJ,cAAcA,CAAC,UAAU,CAAC,EAAEM,OAAO,QAAQ,CAAC,IAAI;QACjD,CAACN,cAAcA,CAAC,cAAc,CAAC,EAAEJ,cAAcA,CAACM,WAAWC,UAAU,MAAM;QAC3E,CAACH,cAAcA,CAAC,YAAY,CAAC,EAAEM,OAAO,MAAM,CAAC,MAAM;QACnD,CAACN,cAAcA,CAAC,WAAW,CAAC,EAAEM,OAAO,MAAM,CAAC,KAAK;QACjD,CAACN,cAAcA,CAAC,QAAQ,CAAC,EAAEI,OAAO,MAAM,GAAG;IAC/C;AACJ;AAEO,MAAMG,mBAAmBA,GAAG;IAC/B,UAAU;IACV,aAAa;AACjB,EAAW;AAEJ,SAASC,sBAAsBA,CAACC,OAAyB;IAC5D,OAAO;QACH,CAACF,mBAAmBA,CAAC,WAAW,CAAC,EAAEE,QAAQ,WAAW;QACtD,CAACF,mBAAmBA,CAAC,QAAQ,CAAC,EAAEE,QAAQ,QAAQ;IACpD;AACJ;AAEO,MAAMC,eAAeA,GAAG;IAC3B,qBAAqB;AACzB,EAAE"}
package/dist/js/utils.js CHANGED
@@ -1,5 +1,3 @@
1
-
2
- ;// CONCATENATED MODULE: ./src/js/utils.ts
3
1
  // This code is adapted from https://github.com/mixpanel/mixpanel-js/blob/master/src/utils.js
4
2
  function browserName(userAgent, vendor, opera) {
5
3
  // vendor is undefined for at least IE9
@@ -1 +1 @@
1
- {"version":3,"file":"js/utils.js","sources":["../../src/js/utils.ts"],"sourcesContent":["// This code is adapted from https://github.com/mixpanel/mixpanel-js/blob/master/src/utils.js\nexport function browserName(userAgent: string, vendor?: string, opera?: object) {\n // vendor is undefined for at least IE9\n vendor = vendor || \"\"; // eslint-disable-line no-param-reassign\n\n if (opera || userAgent.includes(\" OPR/\")) {\n if (userAgent.includes(\"Mini\")) {\n return \"Opera Mini\";\n }\n\n return \"Opera\";\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(userAgent)) {\n return \"BlackBerry\";\n } else if (userAgent.includes(\"IEMobile\") || userAgent.includes(\"WPDesktop\")) {\n return \"Internet Explorer Mobile\";\n } else if (userAgent.includes(\"Edge\")) {\n return \"Microsoft Edge\";\n } else if (userAgent.includes(\"FBIOS\")) {\n return \"Facebook Mobile\";\n } else if (userAgent.includes(\"Chrome\")) {\n return \"Chrome\";\n } else if (userAgent.includes(\"CriOS\")) {\n return \"Chrome iOS\";\n } else if (userAgent.includes(\"UCWEB\") || userAgent.includes(\"UCBrowser\")) {\n return \"UC Browser\";\n } else if (userAgent.includes(\"FxiOS\")) {\n return \"Firefox iOS\";\n } else if (vendor.includes(\"Apple\")) {\n if (userAgent.includes(\"Mobile\")) {\n return \"Mobile Safari\";\n }\n\n return \"Safari\";\n } else if (userAgent.includes(\"Android\")) {\n return \"Android Mobile\";\n } else if (userAgent.includes(\"Konqueror\")) {\n return \"Konqueror\";\n } else if (userAgent.includes(\"Firefox\")) {\n return \"Firefox\";\n } else if (userAgent.includes(\"MSIE\") || userAgent.includes(\"Trident/\")) {\n return \"Internet Explorer\";\n } else if (userAgent.includes(\"Gecko\")) {\n return \"Mozilla\";\n }\n\n return \"\";\n}\n\n/**\n * This function detects which browser version is running this script,\n * parsing major and minor version (e.g., 42.1). User agent strings from:\n * http://www.useragentstring.com/pages/useragentstring.php\n */\nexport function browserVersion(userAgent: string, vendor?: string, opera?: object) {\n const browser = browserName(userAgent, vendor, opera);\n const versionRegexs: { [key: string]: RegExp } = {\n \"Internet Explorer Mobile\": /rv:(\\d+(\\.\\d+)?)/,\n \"Microsoft Edge\": /Edge\\/(\\d+(\\.\\d+)?)/,\n \"Chrome\": /Chrome\\/(\\d+(\\.\\d+)?)/,\n \"Chrome iOS\": /CriOS\\/(\\d+(\\.\\d+)?)/,\n \"UC Browser\": /(UCBrowser|UCWEB)\\/(\\d+(\\.\\d+)?)/,\n \"Safari\": /Version\\/(\\d+(\\.\\d+)?)/,\n \"Mobile Safari\": /Version\\/(\\d+(\\.\\d+)?)/,\n \"Opera\": /(Opera|OPR)\\/(\\d+(\\.\\d+)?)/,\n \"Firefox\": /Firefox\\/(\\d+(\\.\\d+)?)/,\n \"Firefox iOS\": /FxiOS\\/(\\d+(\\.\\d+)?)/,\n \"Konqueror\": /Konqueror:(\\d+(\\.\\d+)?)/,\n \"BlackBerry\": /BlackBerry (\\d+(\\.\\d+)?)/,\n \"Android Mobile\": /android\\s(\\d+(\\.\\d+)?)/,\n \"Internet Explorer\": /(rv:|MSIE )(\\d+(\\.\\d+)?)/,\n \"Mozilla\": /rv:(\\d+(\\.\\d+)?)/\n };\n const regex = versionRegexs[browser];\n if (regex === undefined) {\n return null;\n }\n const matches = userAgent.match(regex);\n if (!matches) {\n return null;\n }\n\n return parseFloat(matches[matches.length - 2]);\n}\n\nexport function osName(userAgent: string) {\n const a = userAgent;\n if (/Windows/i.test(a)) {\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n if (/Phone/.test(a) || /WPDesktop/.test(a)) {\n return \"Windows Phone\";\n }\n\n return \"Windows\";\n } else if (/(iPhone|iPad|iPod)/.test(a)) {\n return \"iOS\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/Android/.test(a)) {\n return \"Android\";\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(a)) {\n return \"BlackBerry\";\n } else if (/Mac/i.test(a)) {\n return \"Mac OS X\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/Linux/.test(a)) {\n return \"Linux\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/CrOS/.test(a)) {\n return \"Chrome OS\";\n }\n\n return \"\";\n}\n\nexport function deviceType(userAgent: string) {\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n if (/Windows Phone/i.test(userAgent) || /WPDesktop/.test(userAgent)) {\n return \"Windows Phone\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/iPad/.test(userAgent)) {\n return \"iPad\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/iPod/.test(userAgent)) {\n return \"iPod Touch\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/iPhone/.test(userAgent)) {\n return \"iPhone\";\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(userAgent)) {\n return \"BlackBerry\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/Android/.test(userAgent)) {\n return \"Android\";\n }\n\n return \"\";\n}\n\nexport function referringDomain(referrer: string) {\n const split = referrer.split(\"/\");\n if (split.length >= 3) {\n return split[2];\n }\n\n return \"\";\n}\n"],"names":["browserName","userAgent","vendor","opera","browserVersion","browser","versionRegexs","regex","undefined","matches","parseFloat","osName","a","deviceType","referringDomain","referrer","split"],"mappings":"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"}
1
+ {"version":3,"file":"js/utils.js","sources":["../../src/js/utils.ts"],"sourcesContent":["// This code is adapted from https://github.com/mixpanel/mixpanel-js/blob/master/src/utils.js\nexport function browserName(userAgent: string, vendor?: string, opera?: object) {\n // vendor is undefined for at least IE9\n vendor = vendor || \"\"; // eslint-disable-line no-param-reassign\n\n if (opera || userAgent.includes(\" OPR/\")) {\n if (userAgent.includes(\"Mini\")) {\n return \"Opera Mini\";\n }\n\n return \"Opera\";\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(userAgent)) {\n return \"BlackBerry\";\n } else if (userAgent.includes(\"IEMobile\") || userAgent.includes(\"WPDesktop\")) {\n return \"Internet Explorer Mobile\";\n } else if (userAgent.includes(\"Edge\")) {\n return \"Microsoft Edge\";\n } else if (userAgent.includes(\"FBIOS\")) {\n return \"Facebook Mobile\";\n } else if (userAgent.includes(\"Chrome\")) {\n return \"Chrome\";\n } else if (userAgent.includes(\"CriOS\")) {\n return \"Chrome iOS\";\n } else if (userAgent.includes(\"UCWEB\") || userAgent.includes(\"UCBrowser\")) {\n return \"UC Browser\";\n } else if (userAgent.includes(\"FxiOS\")) {\n return \"Firefox iOS\";\n } else if (vendor.includes(\"Apple\")) {\n if (userAgent.includes(\"Mobile\")) {\n return \"Mobile Safari\";\n }\n\n return \"Safari\";\n } else if (userAgent.includes(\"Android\")) {\n return \"Android Mobile\";\n } else if (userAgent.includes(\"Konqueror\")) {\n return \"Konqueror\";\n } else if (userAgent.includes(\"Firefox\")) {\n return \"Firefox\";\n } else if (userAgent.includes(\"MSIE\") || userAgent.includes(\"Trident/\")) {\n return \"Internet Explorer\";\n } else if (userAgent.includes(\"Gecko\")) {\n return \"Mozilla\";\n }\n\n return \"\";\n}\n\n/**\n * This function detects which browser version is running this script,\n * parsing major and minor version (e.g., 42.1). User agent strings from:\n * http://www.useragentstring.com/pages/useragentstring.php\n */\nexport function browserVersion(userAgent: string, vendor?: string, opera?: object) {\n const browser = browserName(userAgent, vendor, opera);\n const versionRegexs: { [key: string]: RegExp } = {\n \"Internet Explorer Mobile\": /rv:(\\d+(\\.\\d+)?)/,\n \"Microsoft Edge\": /Edge\\/(\\d+(\\.\\d+)?)/,\n \"Chrome\": /Chrome\\/(\\d+(\\.\\d+)?)/,\n \"Chrome iOS\": /CriOS\\/(\\d+(\\.\\d+)?)/,\n \"UC Browser\": /(UCBrowser|UCWEB)\\/(\\d+(\\.\\d+)?)/,\n \"Safari\": /Version\\/(\\d+(\\.\\d+)?)/,\n \"Mobile Safari\": /Version\\/(\\d+(\\.\\d+)?)/,\n \"Opera\": /(Opera|OPR)\\/(\\d+(\\.\\d+)?)/,\n \"Firefox\": /Firefox\\/(\\d+(\\.\\d+)?)/,\n \"Firefox iOS\": /FxiOS\\/(\\d+(\\.\\d+)?)/,\n \"Konqueror\": /Konqueror:(\\d+(\\.\\d+)?)/,\n \"BlackBerry\": /BlackBerry (\\d+(\\.\\d+)?)/,\n \"Android Mobile\": /android\\s(\\d+(\\.\\d+)?)/,\n \"Internet Explorer\": /(rv:|MSIE )(\\d+(\\.\\d+)?)/,\n \"Mozilla\": /rv:(\\d+(\\.\\d+)?)/\n };\n const regex = versionRegexs[browser];\n if (regex === undefined) {\n return null;\n }\n const matches = userAgent.match(regex);\n if (!matches) {\n return null;\n }\n\n return parseFloat(matches[matches.length - 2]);\n}\n\nexport function osName(userAgent: string) {\n const a = userAgent;\n if (/Windows/i.test(a)) {\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n if (/Phone/.test(a) || /WPDesktop/.test(a)) {\n return \"Windows Phone\";\n }\n\n return \"Windows\";\n } else if (/(iPhone|iPad|iPod)/.test(a)) {\n return \"iOS\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/Android/.test(a)) {\n return \"Android\";\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(a)) {\n return \"BlackBerry\";\n } else if (/Mac/i.test(a)) {\n return \"Mac OS X\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/Linux/.test(a)) {\n return \"Linux\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/CrOS/.test(a)) {\n return \"Chrome OS\";\n }\n\n return \"\";\n}\n\nexport function deviceType(userAgent: string) {\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n if (/Windows Phone/i.test(userAgent) || /WPDesktop/.test(userAgent)) {\n return \"Windows Phone\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/iPad/.test(userAgent)) {\n return \"iPad\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/iPod/.test(userAgent)) {\n return \"iPod Touch\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/iPhone/.test(userAgent)) {\n return \"iPhone\";\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(userAgent)) {\n return \"BlackBerry\";\n // eslint-disable-next-line @typescript-eslint/prefer-includes\n } else if (/Android/.test(userAgent)) {\n return \"Android\";\n }\n\n return \"\";\n}\n\nexport function referringDomain(referrer: string) {\n const split = referrer.split(\"/\");\n if (split.length >= 3) {\n return split[2];\n }\n\n return \"\";\n}\n"],"names":["browserName","userAgent","vendor","opera","browserVersion","browser","versionRegexs","regex","undefined","matches","parseFloat","osName","a","deviceType","referringDomain","referrer","split"],"mappings":"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"}
@@ -1,11 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { createContext, useContext } from "react";
3
3
 
4
- ;// CONCATENATED MODULE: external "react/jsx-runtime"
5
4
 
6
- ;// CONCATENATED MODULE: external "react"
7
5
 
8
- ;// CONCATENATED MODULE: ./src/react/MixpanelContext.tsx
9
6
 
10
7
 
11
8
  const MixpanelContext = /*#__PURE__*/ createContext(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"react/MixpanelContext.js","sources":["../../src/react/MixpanelContext.tsx"],"sourcesContent":["import { createContext, type PropsWithChildren, useContext } from \"react\";\nimport type { MixpanelClient } from \"../js/MixpanelClient.ts\";\n\nexport const MixpanelContext = createContext<MixpanelClient | undefined>(undefined);\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface MixpanelProviderProps extends PropsWithChildren {\n client: MixpanelClient;\n}\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function MixpanelProvider(props: MixpanelProviderProps) {\n const {\n client,\n children\n } = props;\n\n return (\n <MixpanelContext.Provider value={client}>\n {children}\n </MixpanelContext.Provider>\n );\n}\n\nexport interface UseMixpanelClientOptions {\n /**\n * Whether or not an exception should be thrown if the client hasn't been provided.\n */\n throwOnUndefined?: boolean;\n}\n\nexport function useMixpanelClient(options?: { throwOnUndefined?: true }): MixpanelClient;\nexport function useMixpanelClient(options: { throwOnUndefined: false }): MixpanelClient | undefined;\n\n/**\n * Retrieve the Mixpanel client.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function useMixpanelClient(options: UseMixpanelClientOptions = {}) {\n const {\n throwOnUndefined = true\n } = options;\n\n const client = useContext(MixpanelContext);\n\n if (!client && throwOnUndefined) {\n throw new Error(\"[mixpanel] The useMixpanelClient function is called before a MixpanelClient instance has been provided.\");\n }\n\n return client;\n}\n"],"names":["createContext","useContext","MixpanelContext","undefined","MixpanelProvider","props","client","children","useMixpanelClient","options","throwOnUndefined","Error"],"mappings":";;;;;;;;;AAA0E;AAGnE,MAAME,gCAAkBF,aAAaA,CAA6BG,WAAW;AASpF;;CAEC,GACM,SAASC,iBAAiBC,KAA4B;IACzD,MAAM,EACFC,MAAM,EACNC,QAAQ,EACX,GAAGF;IAEJ,qBACI,IAACH,gBAAgB,QAAQ;QAAC,OAAOI;kBAC5BC;;AAGb;AAYA;;;CAGC,GACM,SAASC,kBAAkBC,UAAoC,CAAC,CAAC;IACpE,MAAM,EACFC,mBAAmB,IAAI,EAC1B,GAAGD;IAEJ,MAAMH,SAASL,UAAUA,CAACC;IAE1B,IAAI,CAACI,UAAUI,kBAAkB;QAC7B,MAAM,IAAIC,MAAM;IACpB;IAEA,OAAOL;AACX"}
1
+ {"version":3,"file":"react/MixpanelContext.js","sources":["../../src/react/MixpanelContext.tsx"],"sourcesContent":["import { createContext, type PropsWithChildren, useContext } from \"react\";\nimport type { MixpanelClient } from \"../js/MixpanelClient.ts\";\n\nexport const MixpanelContext = createContext<MixpanelClient | undefined>(undefined);\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface MixpanelProviderProps extends PropsWithChildren {\n client: MixpanelClient;\n}\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function MixpanelProvider(props: MixpanelProviderProps) {\n const {\n client,\n children\n } = props;\n\n return (\n <MixpanelContext.Provider value={client}>\n {children}\n </MixpanelContext.Provider>\n );\n}\n\nexport interface UseMixpanelClientOptions {\n /**\n * Whether or not an exception should be thrown if the client hasn't been provided.\n */\n throwOnUndefined?: boolean;\n}\n\nexport function useMixpanelClient(options?: { throwOnUndefined?: true }): MixpanelClient;\nexport function useMixpanelClient(options: { throwOnUndefined: false }): MixpanelClient | undefined;\n\n/**\n * Retrieve the Mixpanel client.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function useMixpanelClient(options: UseMixpanelClientOptions = {}) {\n const {\n throwOnUndefined = true\n } = options;\n\n const client = useContext(MixpanelContext);\n\n if (!client && throwOnUndefined) {\n throw new Error(\"[mixpanel] The useMixpanelClient function is called before a MixpanelClient instance has been provided.\");\n }\n\n return client;\n}\n"],"names":["createContext","useContext","MixpanelContext","undefined","MixpanelProvider","props","client","children","useMixpanelClient","options","throwOnUndefined","Error"],"mappings":";;;;;;AAA0E;AAGnE,MAAME,eAAeA,iBAAGF,aAAaA,CAA6BG,WAAW;AASpF;;CAEC,GACM,SAASC,gBAAgBA,CAACC,KAA4B;IACzD,MAAM,EACFC,MAAM,EACNC,QAAQ,EACX,GAAGF;IAEJ,qBACI,IAACH,eAAeA,CAAC,QAAQ;QAAC,OAAOI;kBAC5BC;;AAGb;AAYA;;;CAGC,GACM,SAASC,iBAAiBA,CAACC,UAAoC,CAAC,CAAC;IACpE,MAAM,EACFC,mBAAmB,IAAI,EAC1B,GAAGD;IAEJ,MAAMH,SAASL,UAAUA,CAACC,eAAeA;IAEzC,IAAI,CAACI,UAAUI,kBAAkB;QAC7B,MAAM,IAAIC,MAAM;IACpB;IAEA,OAAOL;AACX"}
@@ -1,11 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { createContext, useContext, useMemo } from "react";
3
3
 
4
- ;// CONCATENATED MODULE: external "react/jsx-runtime"
5
4
 
6
- ;// CONCATENATED MODULE: external "react"
7
5
 
8
- ;// CONCATENATED MODULE: ./src/react/MixpanelPropertiesProvider.tsx
9
6
 
10
7
 
11
8
  const MixpanelPropertiesContext = /*#__PURE__*/ createContext({});
@@ -1 +1 @@
1
- {"version":3,"file":"react/MixpanelPropertiesProvider.js","sources":["../../src/react/MixpanelPropertiesProvider.tsx"],"sourcesContent":["import { createContext, type PropsWithChildren, useContext, useMemo } from \"react\";\n\nconst MixpanelPropertiesContext = createContext<Record<string, unknown>>({});\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface MixpanelPropertiesProviderProps extends PropsWithChildren {\n value: Record<string, unknown>;\n}\n\n/**\n * Define Mixpanel properties that will be passed down to nested \"useTrackingFunction\" or \"useMixpanelTrackingFunction\" hook.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function MixpanelPropertiesProvider(props: MixpanelPropertiesProviderProps) {\n const {\n value,\n children\n } = props;\n\n const parentContext = useContext(MixpanelPropertiesContext);\n\n const contextValue = useMemo(() => ({\n ...parentContext,\n ...value\n }), [parentContext, value]);\n\n return (\n <MixpanelPropertiesContext.Provider value={contextValue}>\n {children}\n </MixpanelPropertiesContext.Provider>\n );\n}\n\n/**\n * Retrieve the Mixpanel properties from all parent providers.\n * @returns The context value or an empty object literal if no provider isdefined.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport const useMixpanelProviderProperties = () => {\n return useContext(MixpanelPropertiesContext);\n};\n"],"names":["createContext","useContext","useMemo","MixpanelPropertiesContext","MixpanelPropertiesProvider","props","value","children","parentContext","contextValue","useMixpanelProviderProperties"],"mappings":";;;;;;;;;AAAmF;AAEnF,MAAMG,0CAA4BH,aAAaA,CAA0B,CAAC;AAS1E;;;CAGC,GACM,SAASI,2BAA2BC,KAAsC;IAC7E,MAAM,EACFC,KAAK,EACLC,QAAQ,EACX,GAAGF;IAEJ,MAAMG,gBAAgBP,UAAUA,CAACE;IAEjC,MAAMM,eAAeP,OAAOA,CAAC,IAAO;YAChC,GAAGM,aAAa;YAChB,GAAGF,KAAK;QACZ,IAAI;QAACE;QAAeF;KAAM;IAE1B,qBACI,IAACH,0BAA0B,QAAQ;QAAC,OAAOM;kBACtCF;;AAGb;AAEA;;;;CAIC,GACM,MAAMG,gCAAgC;IACzC,OAAOT,UAAUA,CAACE;AACtB,EAAE"}
1
+ {"version":3,"file":"react/MixpanelPropertiesProvider.js","sources":["../../src/react/MixpanelPropertiesProvider.tsx"],"sourcesContent":["import { createContext, type PropsWithChildren, useContext, useMemo } from \"react\";\n\nconst MixpanelPropertiesContext = createContext<Record<string, unknown>>({});\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface MixpanelPropertiesProviderProps extends PropsWithChildren {\n value: Record<string, unknown>;\n}\n\n/**\n * Define Mixpanel properties that will be passed down to nested \"useTrackingFunction\" or \"useMixpanelTrackingFunction\" hook.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function MixpanelPropertiesProvider(props: MixpanelPropertiesProviderProps) {\n const {\n value,\n children\n } = props;\n\n const parentContext = useContext(MixpanelPropertiesContext);\n\n const contextValue = useMemo(() => ({\n ...parentContext,\n ...value\n }), [parentContext, value]);\n\n return (\n <MixpanelPropertiesContext.Provider value={contextValue}>\n {children}\n </MixpanelPropertiesContext.Provider>\n );\n}\n\n/**\n * Retrieve the Mixpanel properties from all parent providers.\n * @returns The context value or an empty object literal if no provider isdefined.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport const useMixpanelProviderProperties = () => {\n return useContext(MixpanelPropertiesContext);\n};\n"],"names":["createContext","useContext","useMemo","MixpanelPropertiesContext","MixpanelPropertiesProvider","props","value","children","parentContext","contextValue","useMixpanelProviderProperties"],"mappings":";;;;;;AAAmF;AAEnF,MAAMG,yBAAyBA,iBAAGH,aAAaA,CAA0B,CAAC;AAS1E;;;CAGC,GACM,SAASI,0BAA0BA,CAACC,KAAsC;IAC7E,MAAM,EACFC,KAAK,EACLC,QAAQ,EACX,GAAGF;IAEJ,MAAMG,gBAAgBP,UAAUA,CAACE,yBAAyBA;IAE1D,MAAMM,eAAeP,OAAOA,CAAC,IAAO;YAChC,GAAGM,aAAa;YAChB,GAAGF,KAAK;QACZ,IAAI;QAACE;QAAeF;KAAM;IAE1B,qBACI,IAACH,yBAAyBA,CAAC,QAAQ;QAAC,OAAOM;kBACtCF;;AAGb;AAEA;;;;CAIC,GACM,MAAMG,6BAA6BA,GAAG;IACzC,OAAOT,UAAUA,CAACE,yBAAyBA;AAC/C,EAAE"}
@@ -1,20 +1,14 @@
1
- import { MixpanelProvider, useMixpanelClient } from "./MixpanelContext.js";
2
- import { MixpanelPropertiesProvider, useMixpanelProviderProperties } from "./MixpanelPropertiesProvider.js";
3
- import { useTrackingFunction } from "./useTrackingFunction.js";
4
1
  export * from "../js/index.js";
5
2
 
6
- ;// CONCATENATED MODULE: external "./MixpanelContext.js"
7
3
 
8
- ;// CONCATENATED MODULE: external "./MixpanelPropertiesProvider.js"
9
4
 
10
- ;// CONCATENATED MODULE: external "./useTrackingFunction.js"
11
5
 
12
- ;// CONCATENATED MODULE: ./src/react/index.ts
13
6
 
14
7
 
15
8
 
16
9
 
17
-
18
- export { MixpanelPropertiesProvider, MixpanelProvider, useMixpanelClient, useMixpanelProviderProperties, useTrackingFunction };
10
+ export { MixpanelProvider, useMixpanelClient } from "./MixpanelContext.js";
11
+ export { MixpanelPropertiesProvider, useMixpanelProviderProperties } from "./MixpanelPropertiesProvider.js";
12
+ export { useTrackingFunction } from "./useTrackingFunction.js";
19
13
 
20
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react/index.js","sources":["../../src/react/index.ts"],"sourcesContent":["export * from \"../js/index.ts\";\nexport { MixpanelProvider, useMixpanelClient, type UseMixpanelClientOptions } from \"./MixpanelContext.tsx\";\nexport { MixpanelPropertiesProvider, useMixpanelProviderProperties, type MixpanelPropertiesProviderProps } from \"./MixpanelPropertiesProvider.tsx\";\nexport { useTrackingFunction, type UseTrackingFunctionOptions } from \"./useTrackingFunction.ts\";\n\n"],"names":["MixpanelProvider","useMixpanelClient","MixpanelPropertiesProvider","useMixpanelProviderProperties","useTrackingFunction"],"mappings":";;;;;;;;;;;;AAA+B;AAC4E;AACwC;AACnD"}
1
+ {"version":3,"file":"react/index.js","sources":["../../src/react/index.ts"],"sourcesContent":["export * from \"../js/index.ts\";\nexport { MixpanelProvider, useMixpanelClient, type UseMixpanelClientOptions } from \"./MixpanelContext.tsx\";\nexport { MixpanelPropertiesProvider, useMixpanelProviderProperties, type MixpanelPropertiesProviderProps } from \"./MixpanelPropertiesProvider.tsx\";\nexport { useTrackingFunction, type UseTrackingFunctionOptions } from \"./useTrackingFunction.ts\";\n\n"],"names":["MixpanelProvider","useMixpanelClient","MixpanelPropertiesProvider","useMixpanelProviderProperties","useTrackingFunction"],"mappings":";;;;AAA+B;AAC4E;AACwC;AACnD"}
@@ -2,13 +2,9 @@ import { useMemo } from "react";
2
2
  import { useMixpanelClient } from "./MixpanelContext.js";
3
3
  import { useMixpanelProviderProperties } from "./MixpanelPropertiesProvider.js";
4
4
 
5
- ;// CONCATENATED MODULE: external "react"
6
5
 
7
- ;// CONCATENATED MODULE: external "./MixpanelContext.js"
8
6
 
9
- ;// CONCATENATED MODULE: external "./MixpanelPropertiesProvider.js"
10
7
 
11
- ;// CONCATENATED MODULE: ./src/react/useTrackingFunction.ts
12
8
 
13
9
 
14
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"react/useTrackingFunction.js","sources":["../../src/react/useTrackingFunction.ts"],"sourcesContent":["import type { CreateMixpanelTrackingFunctionOptions } from \"@workleap-telemetry/core\";\nimport { useMemo } from \"react\";\nimport { useMixpanelClient } from \"./MixpanelContext.tsx\";\nimport { useMixpanelProviderProperties } from \"./MixpanelPropertiesProvider.tsx\";\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport type UseTrackingFunctionOptions = CreateMixpanelTrackingFunctionOptions;\n\n/**\n * Create a Mixpanel tracking function.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function useTrackingFunction(options: UseTrackingFunctionOptions = {}) {\n const {\n productId,\n targetProductId\n } = options;\n\n const client = useMixpanelClient();\n const additionalProperties = useMixpanelProviderProperties();\n\n return useMemo(() => {\n const trackOptions = {\n productId,\n targetProductId,\n additionalProperties\n } satisfies CreateMixpanelTrackingFunctionOptions;\n\n return client.createTrackingFunction(trackOptions);\n }, [client, productId, targetProductId, additionalProperties]);\n}\n"],"names":["useMemo","useMixpanelClient","useMixpanelProviderProperties","useTrackingFunction","options","productId","targetProductId","client","additionalProperties","trackOptions"],"mappings":";;;;;;;;;;;AACgC;AAC0B;AACuB;AAOjF;;;CAGC,GACM,SAASG,oBAAoBC,UAAsC,CAAC,CAAC;IACxE,MAAM,EACFC,SAAS,EACTC,eAAe,EAClB,GAAGF;IAEJ,MAAMG,SAASN,iBAAiBA;IAChC,MAAMO,uBAAuBN,6BAA6BA;IAE1D,OAAOF,OAAOA,CAAC;QACX,MAAMS,eAAe;YACjBJ;YACAC;YACAE;QACJ;QAEA,OAAOD,OAAO,sBAAsB,CAACE;IACzC,GAAG;QAACF;QAAQF;QAAWC;QAAiBE;KAAqB;AACjE"}
1
+ {"version":3,"file":"react/useTrackingFunction.js","sources":["../../src/react/useTrackingFunction.ts"],"sourcesContent":["import type { CreateMixpanelTrackingFunctionOptions } from \"@workleap-telemetry/core\";\nimport { useMemo } from \"react\";\nimport { useMixpanelClient } from \"./MixpanelContext.tsx\";\nimport { useMixpanelProviderProperties } from \"./MixpanelPropertiesProvider.tsx\";\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport type UseTrackingFunctionOptions = CreateMixpanelTrackingFunctionOptions;\n\n/**\n * Create a Mixpanel tracking function.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function useTrackingFunction(options: UseTrackingFunctionOptions = {}) {\n const {\n productId,\n targetProductId\n } = options;\n\n const client = useMixpanelClient();\n const additionalProperties = useMixpanelProviderProperties();\n\n return useMemo(() => {\n const trackOptions = {\n productId,\n targetProductId,\n additionalProperties\n } satisfies CreateMixpanelTrackingFunctionOptions;\n\n return client.createTrackingFunction(trackOptions);\n }, [client, productId, targetProductId, additionalProperties]);\n}\n"],"names":["useMemo","useMixpanelClient","useMixpanelProviderProperties","useTrackingFunction","options","productId","targetProductId","client","additionalProperties","trackOptions"],"mappings":";;;;;;;AACgC;AAC0B;AACuB;AAOjF;;;CAGC,GACM,SAASG,mBAAmBA,CAACC,UAAsC,CAAC,CAAC;IACxE,MAAM,EACFC,SAAS,EACTC,eAAe,EAClB,GAAGF;IAEJ,MAAMG,SAASN,iBAAiBA;IAChC,MAAMO,uBAAuBN,6BAA6BA;IAE1D,OAAOF,OAAOA,CAAC;QACX,MAAMS,eAAe;YACjBJ;YACAC;YACAE;QACJ;QAEA,OAAOD,OAAO,sBAAsB,CAACE;IACzC,GAAG;QAACF;QAAQF;QAAWC;QAAiBE;KAAqB;AACjE"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@workleap/mixpanel",
3
3
  "author": "Workleap",
4
- "version": "5.0.1",
4
+ "version": "5.0.3",
5
5
  "description": "A package containing utilities for Mixpanel telemetry.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -34,7 +34,7 @@
34
34
  "peerDependencies": {
35
35
  "react": "^18.0.0 || ^19.0.0",
36
36
  "react-dom": "^18.0.0 || ^19.0.0",
37
- "@workleap/logrocket": "^3.0.1"
37
+ "@workleap/logrocket": "^3.0.4"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "@workleap/logrocket": {
@@ -48,24 +48,25 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@workleap/logging": "^1.3.6",
52
- "@workleap-telemetry/core": "^2.0.0"
51
+ "@workleap/logging": "^1.3.8",
52
+ "@workleap-telemetry/core": "^2.0.2"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@eslint/js": "9.39.2",
56
- "@rsbuild/core": "1.7.3",
57
- "@rslib/core": "0.19.5",
58
- "@types/react": "19.2.13",
59
- "@typescript-eslint/parser": "8.55.0",
60
- "@typescript/native-preview": "7.0.0-dev.20260227.1",
61
- "@workleap/eslint-configs": "1.1.12",
62
- "@workleap/rslib-configs": "1.1.7",
63
- "@workleap/typescript-configs": "3.0.7",
56
+ "@rsbuild/core": "2.0.5",
57
+ "@rslib/core": "0.21.4",
58
+ "@types/node": "25.7.0",
59
+ "@types/react": "19.2.14",
60
+ "@typescript-eslint/parser": "8.59.3",
61
+ "@typescript/native-preview": "7.0.0-dev.20260512.1",
62
+ "@workleap/eslint-configs": "2.0.3",
63
+ "@workleap/rslib-configs": "1.2.0",
64
+ "@workleap/typescript-configs": "4.0.2",
64
65
  "eslint": "9.39.2",
65
- "happy-dom": "20.6.0",
66
- "typescript": "5.9.3",
67
- "typescript-eslint": "8.55.0",
68
- "vitest": "4.0.18"
66
+ "happy-dom": "20.9.0",
67
+ "typescript": "6.0.3",
68
+ "typescript-eslint": "8.59.3",
69
+ "vitest": "4.1.6"
69
70
  },
70
71
  "sideEffects": false,
71
72
  "scripts": {