@useblu/blu-lytics 1.0.7 → 1.0.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/initializers/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAyG1E;;;;;;;GAOG;AACH,QAAA,IAAI,uBAAuB,EAAE,eAAe,CAAC;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,gBACjB,iBAAiB,GAAG,iBAAiB,EAAE;iBAC5B,eAAe;MACtC,IAsCF,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/initializers/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AA0G1E;;;;;;;GAOG;AACH,QAAA,IAAI,uBAAuB,EAAE,eAAe,CAAC;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,gBACjB,iBAAiB,GAAG,iBAAiB,EAAE;iBAC5B,eAAe;MACtC,IAsCF,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -25,6 +25,7 @@ var clarityInitializer = function (environment, apiKey) {
25
25
  track: true,
26
26
  content: true
27
27
  });
28
+ clarity.consent();
28
29
  }
29
30
  };
30
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"clarity.d.ts","sourceRoot":"","sources":["../../../../src/providers/setups/clarity/clarity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA0BpD,QAAA,MAAM,eAAe,EAAE,YAKtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"clarity.d.ts","sourceRoot":"","sources":["../../../../src/providers/setups/clarity/clarity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAyBpD,QAAA,MAAM,eAAe,EAAE,YAKtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,12 +1,11 @@
1
1
  import { clarity } from 'clarity-js';
2
2
  var dispatchUserIdentification = function (id, userProperties) {
3
+ clarity.consent();
3
4
  clarity.identify(id);
4
5
  };
5
6
  var dispatchCustomEvent = function (event, properties) {
6
- clarity.set(event, 'customEvent');
7
7
  };
8
8
  var dispatchScreenEvent = function (screen) {
9
- clarity.set(screen, 'screen');
10
9
  };
11
10
  var ClarityProvider = {
12
11
  name: 'Clarity',
@@ -3,7 +3,8 @@ import ClarityProvider from './clarity';
3
3
  jest.mock('clarity-js', function () { return ({
4
4
  clarity: {
5
5
  identify: jest.fn(),
6
- set: jest.fn()
6
+ set: jest.fn(),
7
+ consent: jest.fn()
7
8
  }
8
9
  }); });
9
10
  describe('ClarityProvider', function () {
@@ -12,15 +13,4 @@ describe('ClarityProvider', function () {
12
13
  ClarityProvider.userIdentification(userId, '');
13
14
  expect(clarity.identify).toHaveBeenCalledWith(userId);
14
15
  });
15
- it('dispatchCustomEvent should call clarity.set with correct arguments', function () {
16
- var eventName = 'clickEvent';
17
- var properties = { key: 'value' };
18
- ClarityProvider.customEvent(eventName, properties);
19
- expect(clarity.set).toHaveBeenCalledWith(eventName, 'customEvent');
20
- });
21
- it('dispatchScreenEvent should call clarity.set with correct arguments', function () {
22
- var screenName = 'HomeScreen';
23
- ClarityProvider.screenEvent(screenName);
24
- expect(clarity.set).toHaveBeenCalledWith(screenName, 'screen');
25
- });
26
16
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useblu/blu-lytics",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -17,7 +17,7 @@
17
17
  "@sentry/integrations": "^6.19.7",
18
18
  "@sentry/react": "^6.19.7",
19
19
  "@sentry/tracing": "^6.19.7",
20
- "clarity-js": "^0.7.24",
20
+ "clarity-js": "^0.7.32",
21
21
  "jest-environment-jsdom": "^29.7.0",
22
22
  "mixpanel-browser": "^2.49.0",
23
23
  "react": "^18.2.0"