@rh-support/utils 2.1.34 → 2.1.36

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.
@@ -4,6 +4,6 @@ export interface IPendoTrackEventProperty {
4
4
  }
5
5
  declare function haltEvent(event: React.SyntheticEvent<{}>): void;
6
6
  declare function pendoTrackEvent(name: any, properties?: IPendoTrackEventProperty): void;
7
- declare function dtmTrackEvent(elemRef: React.MutableRefObject<HTMLElement>, eventName: string, event: CustomEventInit<unknown>): void;
7
+ declare function dtmTrackEvent(eventName: string, caseNumber?: string, product?: string): void;
8
8
  export { haltEvent, pendoTrackEvent, dtmTrackEvent };
9
9
  //# sourceMappingURL=eventUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventUtils.d.ts","sourceRoot":"","sources":["../../src/eventUtils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,wBAAwB;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,iBAAS,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,QAKjD;AAKD,iBAAS,eAAe,CAAC,IAAI,KAAA,EAAE,UAAU,GAAE,wBAA6B,QAMvE;AAED,iBAAS,aAAa,CAClB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAC5C,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,QAKlC;AAED,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"eventUtils.d.ts","sourceRoot":"","sources":["../../src/eventUtils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,wBAAwB;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,iBAAS,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,QAKjD;AAKD,iBAAS,eAAe,CAAC,IAAI,KAAA,EAAE,UAAU,GAAE,wBAA6B,QAMvE;AAED,iBAAS,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,QAU9E;AAED,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC"}
@@ -16,9 +16,15 @@ function pendoTrackEvent(name, properties = {}) {
16
16
  pendo.track(name, properties);
17
17
  }
18
18
  }
19
- function dtmTrackEvent(elemRef, eventName, event) {
20
- if (elemRef.current && (Env.getEnvName() === Env.EnvNames.PROD || Env.isLocalEnv())) {
21
- elemRef.current.dispatchEvent(new CustomEvent(eventName, event));
22
- }
19
+ function dtmTrackEvent(eventName, caseNumber, product) {
20
+ (window.appEventData || []).push({
21
+ event: 'Portal Case Management',
22
+ case: {
23
+ type: 'cp-support',
24
+ stepName: eventName, //submit, close, comment, follow, review, search, recommendation click
25
+ caseNumber,
26
+ caseProduct: product,
27
+ },
28
+ });
23
29
  }
24
30
  export { haltEvent, pendoTrackEvent, dtmTrackEvent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/utils",
3
- "version": "2.1.34",
3
+ "version": "2.1.36",
4
4
  "description": "> TODO: description",
5
5
  "author": "Vikas Rathee <vrathee@redhat.com>",
6
6
  "license": "ISC",
@@ -41,7 +41,7 @@
41
41
  "prepublishOnly": "npm run build"
42
42
  },
43
43
  "peerDependencies": {
44
- "@cee-eng/hydrajs": "4.17.17",
44
+ "@cee-eng/hydrajs": "4.17.21",
45
45
  "@cee-eng/ui-toolkit": "1.1.8",
46
46
  "dompurify": "^2.2.6",
47
47
  "i18next": "^22.5.1",
@@ -55,7 +55,7 @@
55
55
  "solr-query-builder": "1.0.1"
56
56
  },
57
57
  "dependencies": {
58
- "@cee-eng/hydrajs": "4.17.17",
58
+ "@cee-eng/hydrajs": "4.17.21",
59
59
  "@cee-eng/ui-toolkit": "1.1.8",
60
60
  "@rh-support/types": "2.0.4",
61
61
  "dompurify": "^2.2.6",
@@ -83,7 +83,7 @@
83
83
  "@types/react-dom": "^18.2.18",
84
84
  "jest": "^29.7.0",
85
85
  "jest-environment-jsdom": "^29.7.0",
86
- "moment-timezone": "^0.5.40"
86
+ "moment-timezone": "^0.5.45"
87
87
  },
88
88
  "overrides": {
89
89
  "@types/react": "^18.2.20",
@@ -93,5 +93,5 @@
93
93
  "defaults and supports es6-module",
94
94
  "maintained node versions"
95
95
  ],
96
- "gitHead": "ecb9820a2fe40793e79c0f9f4786ec657070fe64"
96
+ "gitHead": "fc8601c40a613c50ddac01f11fc79c9f26544aa5"
97
97
  }