@genesislcap/foundation-comms 14.472.1 → 14.473.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.
|
@@ -54,23 +54,16 @@ export interface FoundationAnalytics {
|
|
|
54
54
|
trackEvent(eventName: FoundationAnalyticsEventType, payload: {}): void;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
|
-
* The default implementation for the FoundationAnalytics interface.
|
|
57
|
+
* The default no-op implementation for the FoundationAnalytics interface.
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* The `analytics` npm package (v0.8.16) was removed after a security scan flagged its transitive
|
|
61
|
+
* for using `window.location.search.substring(1)` - no upstream fix is available.
|
|
62
|
+
* Replace this no-op when analytics tracking is needed.
|
|
63
|
+
*
|
|
58
64
|
* @public
|
|
59
65
|
*/
|
|
60
66
|
export declare class DefaultFoundationAnalytics implements FoundationAnalytics {
|
|
61
|
-
private analytics;
|
|
62
|
-
/**
|
|
63
|
-
* TODO: Remove the static config.
|
|
64
|
-
* We could register a config with the container at startup and have it injected here or remove the constructor and
|
|
65
|
-
* define a method call.
|
|
66
|
-
*/
|
|
67
|
-
constructor(config: {
|
|
68
|
-
app: 'foundation-app';
|
|
69
|
-
debug: true;
|
|
70
|
-
});
|
|
71
|
-
/**
|
|
72
|
-
* Set typed overloads
|
|
73
|
-
*/
|
|
74
67
|
trackEvent(eventName: FoundationAnalyticsEventType.controlClicked, payload: FoundationAnalyticsEvent.ControlClicked): void;
|
|
75
68
|
trackEvent(eventName: FoundationAnalyticsEventType.routeChanged, payload: FoundationAnalyticsEvent.RouteChanged): void;
|
|
76
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/analytics/analytics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/analytics/analytics.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,oBAAY,4BAA4B;IACtC,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;CAC9B;AAED;;GAEG;AACH,yBAAiB,wBAAwB,CAAC;IACxC;;;OAGG;IACH,UAAiB,cAAc;QAC7B,IAAI,EAAE,MAAM,CAAC;KACd;IAED;;;OAGG;IACH,UAAiB,YAAY;QAC3B,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,UAAU,CACR,SAAS,EAAE,4BAA4B,CAAC,cAAc,EACtD,OAAO,EAAE,wBAAwB,CAAC,cAAc,GAC/C,IAAI,CAAC;IAER;;;;;OAKG;IACH,UAAU,CACR,SAAS,EAAE,4BAA4B,CAAC,YAAY,EACpD,OAAO,EAAE,wBAAwB,CAAC,YAAY,GAC7C,IAAI,CAAC;IAER;;;;;OAKG;IACH,UAAU,CAAC,SAAS,EAAE,4BAA4B,EAAE,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC;CACxE;AAED;;;;;;;;;GASG;AACH,qBAAa,0BAA2B,YAAW,mBAAmB;IAC7D,UAAU,CACf,SAAS,EAAE,4BAA4B,CAAC,cAAc,EACtD,OAAO,EAAE,wBAAwB,CAAC,cAAc,GAC/C,IAAI;IACA,UAAU,CACf,SAAS,EAAE,4BAA4B,CAAC,YAAY,EACpD,OAAO,EAAE,wBAAwB,CAAC,YAAY,GAC7C,IAAI;CAIR;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,2EAE/B,CAAC;AAEF;;;;;;;;GAQG"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DI } from '@microsoft/fast-foundation';
|
|
2
|
-
import Analytics from 'analytics';
|
|
3
2
|
import { logger } from '../utils';
|
|
4
3
|
/**
|
|
5
4
|
* Analytics event types
|
|
@@ -11,21 +10,18 @@ export var FoundationAnalyticsEventType;
|
|
|
11
10
|
FoundationAnalyticsEventType["routeChanged"] = "routeChanged";
|
|
12
11
|
})(FoundationAnalyticsEventType || (FoundationAnalyticsEventType = {}));
|
|
13
12
|
/**
|
|
14
|
-
* The default implementation for the FoundationAnalytics interface.
|
|
13
|
+
* The default no-op implementation for the FoundationAnalytics interface.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* The `analytics` npm package (v0.8.16) was removed after a security scan flagged its transitive
|
|
17
|
+
* for using `window.location.search.substring(1)` - no upstream fix is available.
|
|
18
|
+
* Replace this no-op when analytics tracking is needed.
|
|
19
|
+
*
|
|
15
20
|
* @public
|
|
16
21
|
*/
|
|
17
22
|
export class DefaultFoundationAnalytics {
|
|
18
|
-
/**
|
|
19
|
-
* TODO: Remove the static config.
|
|
20
|
-
* We could register a config with the container at startup and have it injected here or remove the constructor and
|
|
21
|
-
* define a method call.
|
|
22
|
-
*/
|
|
23
|
-
constructor(config) {
|
|
24
|
-
this.analytics = Analytics(config);
|
|
25
|
-
}
|
|
26
23
|
trackEvent(eventName, payload) {
|
|
27
24
|
logger.debug(`FoundationAnalytics.trackEvent ${eventName} : ${JSON.stringify(payload)}`);
|
|
28
|
-
this.analytics.track(eventName, payload);
|
|
29
25
|
}
|
|
30
26
|
}
|
|
31
27
|
/**
|
|
@@ -17052,7 +17052,7 @@
|
|
|
17052
17052
|
{
|
|
17053
17053
|
"kind": "Class",
|
|
17054
17054
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultFoundationAnalytics:class",
|
|
17055
|
-
"docComment": "/**\n * The default implementation for the FoundationAnalytics interface.\n *\n * @public\n */\n",
|
|
17055
|
+
"docComment": "/**\n * The default no-op implementation for the FoundationAnalytics interface.\n *\n * @remarks\n *\n * The `analytics` npm package (v0.8.16) was removed after a security scan flagged its transitive for using `window.location.search.substring(1)` - no upstream fix is available. Replace this no-op when analytics tracking is needed.\n *\n * @public\n */\n",
|
|
17056
17056
|
"excerptTokens": [
|
|
17057
17057
|
{
|
|
17058
17058
|
"kind": "Content",
|
|
@@ -17074,42 +17074,10 @@
|
|
|
17074
17074
|
"name": "DefaultFoundationAnalytics",
|
|
17075
17075
|
"preserveMemberOrder": false,
|
|
17076
17076
|
"members": [
|
|
17077
|
-
{
|
|
17078
|
-
"kind": "Constructor",
|
|
17079
|
-
"canonicalReference": "@genesislcap/foundation-comms!DefaultFoundationAnalytics:constructor(1)",
|
|
17080
|
-
"docComment": "/**\n * TODO: Remove the static config. We could register a config with the container at startup and have it injected here or remove the constructor and define a method call.\n */\n",
|
|
17081
|
-
"excerptTokens": [
|
|
17082
|
-
{
|
|
17083
|
-
"kind": "Content",
|
|
17084
|
-
"text": "constructor(config: "
|
|
17085
|
-
},
|
|
17086
|
-
{
|
|
17087
|
-
"kind": "Content",
|
|
17088
|
-
"text": "{\n app: 'foundation-app';\n debug: true;\n }"
|
|
17089
|
-
},
|
|
17090
|
-
{
|
|
17091
|
-
"kind": "Content",
|
|
17092
|
-
"text": ");"
|
|
17093
|
-
}
|
|
17094
|
-
],
|
|
17095
|
-
"releaseTag": "Public",
|
|
17096
|
-
"isProtected": false,
|
|
17097
|
-
"overloadIndex": 1,
|
|
17098
|
-
"parameters": [
|
|
17099
|
-
{
|
|
17100
|
-
"parameterName": "config",
|
|
17101
|
-
"parameterTypeTokenRange": {
|
|
17102
|
-
"startIndex": 1,
|
|
17103
|
-
"endIndex": 2
|
|
17104
|
-
},
|
|
17105
|
-
"isOptional": false
|
|
17106
|
-
}
|
|
17107
|
-
]
|
|
17108
|
-
},
|
|
17109
17077
|
{
|
|
17110
17078
|
"kind": "Method",
|
|
17111
17079
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultFoundationAnalytics#trackEvent:member(1)",
|
|
17112
|
-
"docComment": "
|
|
17080
|
+
"docComment": "",
|
|
17113
17081
|
"excerptTokens": [
|
|
17114
17082
|
{
|
|
17115
17083
|
"kind": "Content",
|
|
@@ -2099,23 +2099,16 @@ export declare class DefaultEntityDatasource<TDTO, TEntity> extends DefaultDatas
|
|
|
2099
2099
|
}
|
|
2100
2100
|
|
|
2101
2101
|
/**
|
|
2102
|
-
* The default implementation for the FoundationAnalytics interface.
|
|
2102
|
+
* The default no-op implementation for the FoundationAnalytics interface.
|
|
2103
|
+
*
|
|
2104
|
+
* @remarks
|
|
2105
|
+
* The `analytics` npm package (v0.8.16) was removed after a security scan flagged its transitive
|
|
2106
|
+
* for using `window.location.search.substring(1)` - no upstream fix is available.
|
|
2107
|
+
* Replace this no-op when analytics tracking is needed.
|
|
2108
|
+
*
|
|
2103
2109
|
* @public
|
|
2104
2110
|
*/
|
|
2105
2111
|
export declare class DefaultFoundationAnalytics implements FoundationAnalytics {
|
|
2106
|
-
private analytics;
|
|
2107
|
-
/**
|
|
2108
|
-
* TODO: Remove the static config.
|
|
2109
|
-
* We could register a config with the container at startup and have it injected here or remove the constructor and
|
|
2110
|
-
* define a method call.
|
|
2111
|
-
*/
|
|
2112
|
-
constructor(config: {
|
|
2113
|
-
app: 'foundation-app';
|
|
2114
|
-
debug: true;
|
|
2115
|
-
});
|
|
2116
|
-
/**
|
|
2117
|
-
* Set typed overloads
|
|
2118
|
-
*/
|
|
2119
2112
|
trackEvent(eventName: FoundationAnalyticsEventType.controlClicked, payload: FoundationAnalyticsEvent.ControlClicked): void;
|
|
2120
2113
|
trackEvent(eventName: FoundationAnalyticsEventType.routeChanged, payload: FoundationAnalyticsEvent.RouteChanged): void;
|
|
2121
2114
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-comms",
|
|
3
3
|
"description": "Genesis Foundation UI Comms",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.473.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -77,27 +77,26 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@genesislcap/foundation-testing": "14.
|
|
81
|
-
"@genesislcap/genx": "14.
|
|
82
|
-
"@genesislcap/rollup-builder": "14.
|
|
83
|
-
"@genesislcap/ts-builder": "14.
|
|
84
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
85
|
-
"@genesislcap/vite-builder": "14.
|
|
86
|
-
"@genesislcap/webpack-builder": "14.
|
|
80
|
+
"@genesislcap/foundation-testing": "14.473.0",
|
|
81
|
+
"@genesislcap/genx": "14.473.0",
|
|
82
|
+
"@genesislcap/rollup-builder": "14.473.0",
|
|
83
|
+
"@genesislcap/ts-builder": "14.473.0",
|
|
84
|
+
"@genesislcap/uvu-playwright-builder": "14.473.0",
|
|
85
|
+
"@genesislcap/vite-builder": "14.473.0",
|
|
86
|
+
"@genesislcap/webpack-builder": "14.473.0",
|
|
87
87
|
"@types/js-cookie": "^3.0.2",
|
|
88
88
|
"@types/json-schema": "^7.0.11",
|
|
89
89
|
"@types/webappsec-credential-management": "^0.6.2",
|
|
90
90
|
"sinon": "^17.0.1"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@genesislcap/foundation-broadcast-channel": "14.
|
|
94
|
-
"@genesislcap/foundation-logger": "14.
|
|
95
|
-
"@genesislcap/foundation-user": "14.
|
|
96
|
-
"@genesislcap/foundation-utils": "14.
|
|
97
|
-
"@genesislcap/web-core": "14.
|
|
93
|
+
"@genesislcap/foundation-broadcast-channel": "14.473.0",
|
|
94
|
+
"@genesislcap/foundation-logger": "14.473.0",
|
|
95
|
+
"@genesislcap/foundation-user": "14.473.0",
|
|
96
|
+
"@genesislcap/foundation-utils": "14.473.0",
|
|
97
|
+
"@genesislcap/web-core": "14.473.0",
|
|
98
98
|
"@microsoft/fast-element": "1.14.0",
|
|
99
99
|
"@microsoft/fast-foundation": "2.50.0",
|
|
100
|
-
"analytics": "0.8.16",
|
|
101
100
|
"bowser": "^2.11.0",
|
|
102
101
|
"fast-safe-stringify": "^2.1.1",
|
|
103
102
|
"http-status-codes": "^2.2.0",
|
|
@@ -113,5 +112,5 @@
|
|
|
113
112
|
"publishConfig": {
|
|
114
113
|
"access": "public"
|
|
115
114
|
},
|
|
116
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "2408f54cd71e4fe715ab6cbb43b6fd16ec2b733e"
|
|
117
116
|
}
|