@microsoft/applicationinsights-clickanalytics-js 3.0.0-beta.2303-11 → 3.0.0-nightly3.2304-28

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.
Files changed (107) hide show
  1. package/browser/{ai.clck.3.0.0-beta.2303-11.cjs.js → es5/ai.clck.3.0.0-nightly3.2304-28.cjs.js} +810 -786
  2. package/browser/es5/ai.clck.3.0.0-nightly3.2304-28.cjs.js.map +1 -0
  3. package/browser/es5/ai.clck.3.0.0-nightly3.2304-28.cjs.min.js +6 -0
  4. package/browser/es5/ai.clck.3.0.0-nightly3.2304-28.cjs.min.js.map +1 -0
  5. package/browser/{ai.clck.3.0.0-beta.2303-11.gbl.js → es5/ai.clck.3.0.0-nightly3.2304-28.gbl.js} +809 -785
  6. package/browser/es5/ai.clck.3.0.0-nightly3.2304-28.gbl.js.map +1 -0
  7. package/browser/es5/ai.clck.3.0.0-nightly3.2304-28.gbl.min.js +6 -0
  8. package/browser/es5/ai.clck.3.0.0-nightly3.2304-28.gbl.min.js.map +1 -0
  9. package/browser/es5/ai.clck.3.0.0-nightly3.2304-28.integrity.json +66 -0
  10. package/browser/{ai.clck.3.0.0-beta.2303-11.js → es5/ai.clck.3.0.0-nightly3.2304-28.js} +809 -785
  11. package/browser/es5/ai.clck.3.0.0-nightly3.2304-28.js.map +1 -0
  12. package/browser/es5/ai.clck.3.0.0-nightly3.2304-28.min.js +6 -0
  13. package/browser/es5/ai.clck.3.0.0-nightly3.2304-28.min.js.map +1 -0
  14. package/browser/{ai.clck.3.cjs.js → es5/ai.clck.3.cjs.js} +809 -785
  15. package/browser/es5/ai.clck.3.cjs.js.map +1 -0
  16. package/browser/es5/ai.clck.3.cjs.min.js +6 -0
  17. package/browser/es5/ai.clck.3.cjs.min.js.map +1 -0
  18. package/browser/{ai.clck.3.gbl.js → es5/ai.clck.3.gbl.js} +808 -784
  19. package/browser/es5/ai.clck.3.gbl.js.map +1 -0
  20. package/browser/es5/ai.clck.3.gbl.min.js +6 -0
  21. package/browser/es5/ai.clck.3.gbl.min.js.map +1 -0
  22. package/browser/{ai.clck.3.js → es5/ai.clck.3.js} +808 -784
  23. package/browser/es5/ai.clck.3.js.map +1 -0
  24. package/browser/es5/ai.clck.3.min.js +6 -0
  25. package/browser/es5/ai.clck.3.min.js.map +1 -0
  26. package/dist/{applicationinsights-clickanalytics-js.js → es5/applicationinsights-clickanalytics-js.js} +808 -784
  27. package/dist/es5/applicationinsights-clickanalytics-js.js.map +1 -0
  28. package/dist/es5/applicationinsights-clickanalytics-js.min.js +6 -0
  29. package/dist/es5/applicationinsights-clickanalytics-js.min.js.map +1 -0
  30. package/{dist-esm → dist-es5}/Behaviours.js +1 -1
  31. package/{dist-esm → dist-es5}/ClickAnalyticsPlugin.js +2 -2
  32. package/{dist-esm → dist-es5}/ClickAnalyticsPlugin.js.map +1 -1
  33. package/{dist-esm → dist-es5}/DataCollector.js +1 -1
  34. package/{dist-esm → dist-es5}/Enums.js +1 -1
  35. package/{dist-esm → dist-es5}/Interfaces/Datamodel.js +1 -1
  36. package/{dist-esm → dist-es5}/__DynamicConstants.js +1 -1
  37. package/{dist-esm → dist-es5}/applicationinsights-clickanalytics-js.js +1 -1
  38. package/{dist-esm → dist-es5}/common/Utils.js +1 -1
  39. package/{dist-esm → dist-es5}/events/PageAction.js +1 -1
  40. package/{dist-esm → dist-es5}/events/WebEvent.js +1 -1
  41. package/{dist-esm → dist-es5}/handlers/AutoCaptureHandler.js +1 -1
  42. package/{dist-esm → dist-es5}/handlers/DomContentHandler.js +3 -2
  43. package/dist-es5/handlers/DomContentHandler.js.map +1 -0
  44. package/package.json +19 -18
  45. package/tsconfig.json +4 -3
  46. package/types/applicationinsights-clickanalytics-js.d.ts +101 -2
  47. package/{dist/applicationinsights-clickanalytics-js.d.ts → types/applicationinsights-clickanalytics-js.namespaced.d.ts} +1 -1
  48. package/browser/ai.clck.3.0.0-beta.2303-11.cjs.js.map +0 -1
  49. package/browser/ai.clck.3.0.0-beta.2303-11.cjs.min.js +0 -6
  50. package/browser/ai.clck.3.0.0-beta.2303-11.cjs.min.js.map +0 -1
  51. package/browser/ai.clck.3.0.0-beta.2303-11.gbl.js.map +0 -1
  52. package/browser/ai.clck.3.0.0-beta.2303-11.gbl.min.js +0 -6
  53. package/browser/ai.clck.3.0.0-beta.2303-11.gbl.min.js.map +0 -1
  54. package/browser/ai.clck.3.0.0-beta.2303-11.integrity.json +0 -66
  55. package/browser/ai.clck.3.0.0-beta.2303-11.js.map +0 -1
  56. package/browser/ai.clck.3.0.0-beta.2303-11.min.js +0 -6
  57. package/browser/ai.clck.3.0.0-beta.2303-11.min.js.map +0 -1
  58. package/browser/ai.clck.3.cjs.js.map +0 -1
  59. package/browser/ai.clck.3.cjs.min.js +0 -6
  60. package/browser/ai.clck.3.cjs.min.js.map +0 -1
  61. package/browser/ai.clck.3.gbl.js.map +0 -1
  62. package/browser/ai.clck.3.gbl.min.js +0 -6
  63. package/browser/ai.clck.3.gbl.min.js.map +0 -1
  64. package/browser/ai.clck.3.js.map +0 -1
  65. package/browser/ai.clck.3.min.js +0 -6
  66. package/browser/ai.clck.3.min.js.map +0 -1
  67. package/dist/applicationinsights-clickanalytics-js.api.json +0 -695
  68. package/dist/applicationinsights-clickanalytics-js.api.md +0 -46
  69. package/dist/applicationinsights-clickanalytics-js.js.map +0 -1
  70. package/dist/applicationinsights-clickanalytics-js.min.js +0 -6
  71. package/dist/applicationinsights-clickanalytics-js.min.js.map +0 -1
  72. package/dist/applicationinsights-clickanalytics-js.rollup.d.ts +0 -102
  73. package/dist-esm/handlers/DomContentHandler.js.map +0 -1
  74. package/src/Behaviours.ts +0 -165
  75. package/src/ClickAnalyticsPlugin.ts +0 -183
  76. package/src/DataCollector.ts +0 -159
  77. package/src/Enums.ts +0 -15
  78. package/src/Interfaces/Datamodel.ts +0 -300
  79. package/src/__DynamicConstants.ts +0 -61
  80. package/src/applicationinsights-clickanalytics-js.ts +0 -6
  81. package/src/common/Utils.ts +0 -281
  82. package/src/events/PageAction.ts +0 -197
  83. package/src/events/WebEvent.ts +0 -202
  84. package/src/handlers/AutoCaptureHandler.ts +0 -121
  85. package/src/handlers/DomContentHandler.ts +0 -395
  86. package/types/Behaviours.d.ts +0 -99
  87. package/types/ClickAnalyticsPlugin.d.ts +0 -22
  88. package/types/DataCollector.d.ts +0 -39
  89. package/types/Enums.d.ts +0 -14
  90. package/types/Interfaces/Datamodel.d.ts +0 -291
  91. package/types/__DynamicConstants.d.ts +0 -49
  92. package/types/common/Utils.d.ts +0 -123
  93. package/types/events/PageAction.d.ts +0 -28
  94. package/types/events/WebEvent.d.ts +0 -54
  95. package/types/handlers/AutoCaptureHandler.d.ts +0 -20
  96. package/types/handlers/DomContentHandler.d.ts +0 -29
  97. package/types/tsdoc-metadata.json +0 -11
  98. /package/{dist-esm → dist-es5}/Behaviours.js.map +0 -0
  99. /package/{dist-esm → dist-es5}/DataCollector.js.map +0 -0
  100. /package/{dist-esm → dist-es5}/Enums.js.map +0 -0
  101. /package/{dist-esm → dist-es5}/Interfaces/Datamodel.js.map +0 -0
  102. /package/{dist-esm → dist-es5}/__DynamicConstants.js.map +0 -0
  103. /package/{dist-esm → dist-es5}/applicationinsights-clickanalytics-js.js.map +0 -0
  104. /package/{dist-esm → dist-es5}/common/Utils.js.map +0 -0
  105. /package/{dist-esm → dist-es5}/events/PageAction.js.map +0 -0
  106. /package/{dist-esm → dist-es5}/events/WebEvent.js.map +0 -0
  107. /package/{dist-esm → dist-es5}/handlers/AutoCaptureHandler.js.map +0 -0
package/types/Enums.d.ts DELETED
@@ -1,14 +0,0 @@
1
- /**
2
- * @copyright Microsoft 2020
3
- */
4
- export declare const ActionType: {
5
- CLICKLEFT: string;
6
- CLICKRIGHT: string;
7
- CLICKMIDDLE: string;
8
- SCROLL: string;
9
- ZOOM: string;
10
- RESIZE: string;
11
- KEYBOARDENTER: string;
12
- KEYBOARDSPACE: string;
13
- OTHER: string;
14
- };
@@ -1,291 +0,0 @@
1
- /**
2
- * @copyright Microsoft 2020
3
- */
4
- import { IEventTelemetry } from "@microsoft/applicationinsights-common";
5
- import { IUnloadableComponent } from "@microsoft/applicationinsights-core-js";
6
- /**
7
- * ClickAnalytics Configuration
8
- */
9
- export interface IClickAnalyticsConfiguration {
10
- /**
11
- * Automatic capture configuration. Default is true
12
- */
13
- autoCapture?: boolean;
14
- /**
15
- * Callbacks configuration
16
- */
17
- callback?: IValueCallback;
18
- /**
19
- * Page tags
20
- */
21
- pageTags?: {
22
- [name: string]: string | number | boolean | string[] | number[] | boolean[] | object;
23
- };
24
- /**
25
- * Core data configuration
26
- */
27
- coreData?: ICoreData;
28
- /**
29
- * Custom Data Tags provided to ovverride default tags used to capture click data.
30
- */
31
- dataTags?: ICustomDataTags;
32
- /**
33
- * Validator to use for the data-bhvr value
34
- */
35
- behaviorValidator?: (value: string | number) => string | number;
36
- /**
37
- * Default Behavior value when Right Click event has occured. This
38
- * value will be ovverriden if the element has the data-*-bhvr attribute present.
39
- */
40
- defaultRightClickBhvr?: string | number;
41
- /**
42
- * Flag to drop events that do not have custom event names, no parentId and no data in content (basically no useful click data).
43
- * Default will be false
44
- */
45
- dropInvalidEvents?: boolean;
46
- /**
47
- * Enables the logging of values after a "#" character of the URL. Default is "false."
48
- */
49
- urlCollectHash?: boolean;
50
- /**
51
- * Enables the logging of the query string of the URL. Default is "false."
52
- */
53
- urlCollectQuery?: boolean;
54
- }
55
- /**
56
- * Custom Data Tags Configuration
57
- */
58
- export interface ICustomDataTags {
59
- /**
60
- * When a particular element is not tagged with content name prefix or content name prefix is not provided by user, this flag is used to collect standard HTML attribute for contentName and id.
61
- */
62
- useDefaultContentNameOrId?: boolean;
63
- /**
64
- * Automatic capture content name and value of elements which are tagged with provided prefix
65
- */
66
- customDataPrefix?: string;
67
- /**
68
- * Click Analytics supports a JSON blob content meta data tagging instead of individual data-* attributes. The default attribute is data-ai-blob. This property allows for changing that attribute name.
69
- */
70
- aiBlobAttributeTag?: string;
71
- /**
72
- * Automatic capture metadata name and content with provided prefix
73
- */
74
- metaDataPrefix?: string;
75
- /**
76
- * Automatic capture all metadata names and content. Default is false. If enabled this will override provided metaTagPrefix.
77
- */
78
- captureAllMetaDataContent?: boolean;
79
- /**
80
- * Stop traversing up the DOM to capture content name and value of elements when encountered with this tag
81
- */
82
- parentDataTag?: string;
83
- /**
84
- * Custom attribute Tag to not track telemetry data
85
- */
86
- dntDataTag?: string;
87
- }
88
- /**
89
- * Core data configuration
90
- */
91
- export interface ICoreData {
92
- /**
93
- * document.referrer is the default. This is used to override the default value.
94
- */
95
- referrerUri?: string;
96
- /**
97
- * window.location.href is the default. This is used to override the default value.
98
- */
99
- requestUri?: string;
100
- /**
101
- * Default page name is derived from the url. This is used to override the default.
102
- */
103
- pageName?: string;
104
- /**
105
- * PageType is captured from a meta tag named awa-pageType. This is used to override the value or bypass defining meta tags.
106
- */
107
- pageType?: string;
108
- }
109
- /**
110
- * Value Callbacks configuration
111
- */
112
- export interface IValueCallback {
113
- /**
114
- * Function to override the default pageName capturing behavior.
115
- */
116
- pageName?: () => string;
117
- /**
118
- * A callback function to augument the default pageTags collected during pageAction event.
119
- */
120
- pageActionPageTags?: (element?: Element) => IPageTags;
121
- /**
122
- * A callback function to populate customized contentName.
123
- */
124
- contentName?: (element?: any, useDefaultContentName?: boolean) => string;
125
- }
126
- /**
127
- * PageTags format
128
- */
129
- export interface IPageTags {
130
- /**
131
- * Meta data tags
132
- */
133
- metaTags?: {
134
- [name: string]: string;
135
- };
136
- /**
137
- * Any other page tag
138
- */
139
- [name: string]: string | number | boolean | string[] | number[] | boolean[] | object | undefined;
140
- }
141
- /**
142
- * Auto capture handler interface
143
- */
144
- export interface IAutoCaptureHandler extends IUnloadableComponent {
145
- /**
146
- * Auto capture click
147
- */
148
- click: () => void;
149
- }
150
- export interface IPageActionOverrideValues extends IOverrideValues {
151
- /**
152
- * Uri of the referrer page
153
- */
154
- refUri?: string;
155
- /**
156
- * One of the awa.actionType values
157
- */
158
- actionType?: string;
159
- /**
160
- * Target uri for PageAction events
161
- */
162
- targetUri?: string;
163
- /**
164
- * Click coordinates relative to the top left of the fully rendered content area in the browser
165
- */
166
- clickCoordinateX?: number;
167
- /**
168
- * Click coordinates relative to the top left of the fully rendered content area in the browser
169
- */
170
- clickCoordinateY?: number;
171
- /**
172
- * KVP of the content
173
- */
174
- content?: any;
175
- /**
176
- * KVPs to be added to the content tags collected on a Page Action event; extends the items in the Content blob in Page Action events
177
- */
178
- contentTags?: any;
179
- }
180
- /**
181
- * Override values interface
182
- */
183
- export interface IOverrideValues {
184
- /**
185
- * One of the awa.behavior values.
186
- */
187
- behavior?: string | number;
188
- /**
189
- * Page name
190
- */
191
- pageName?: string;
192
- /**
193
- * Page type
194
- */
195
- pageType?: string;
196
- /**
197
- * KVP to be added to the page tags collected
198
- */
199
- pageTags?: any;
200
- /**
201
- * Indicates if the event was fired automatically
202
- */
203
- isAuto?: boolean;
204
- }
205
- /**
206
- * Content interface
207
- */
208
- export interface IContent {
209
- /**
210
- * Friendly name (Content Name) of the content to be used reporting/visualization purposes
211
- */
212
- cN?: string;
213
- /**
214
- * Unique identifier (friendly names allowed) of the content (Content Id) as designated by the content provider.
215
- * The name should be unique per contentSource such that the two make up the compound key and such that the contentId can be
216
- * looked up in the contentSource for additional metadata.
217
- */
218
- id?: string;
219
- /**
220
- * User specified custom content properties
221
- */
222
- [name: string]: string | number | boolean | string[] | number[] | boolean[] | object | undefined;
223
- }
224
- /**
225
- * Content handler interface
226
- */
227
- export interface IContentHandler extends IUnloadableComponent {
228
- /**
229
- * Get meta data
230
- */
231
- getMetadata: () => {
232
- [name: string]: string;
233
- };
234
- /**
235
- * Get element content
236
- */
237
- getElementContent: (element: Element) => IContent;
238
- }
239
- /**
240
- * Page Action event
241
- */
242
- export interface IPageActionTelemetry extends IEventTelemetry {
243
- /**
244
- * Target uri for PageAction events
245
- */
246
- targetUri?: string;
247
- /**
248
- * One of the awa.actionType values
249
- */
250
- actionType?: string;
251
- /**
252
- * One of the awa.behavior values.
253
- */
254
- behavior?: string | number;
255
- /**
256
- * X, Y representing the absolute co-ordinates withrespect to topleft corner of the page. This should be normalized for the screen resolution to provide better heat map.
257
- */
258
- clickCoordinates?: string;
259
- /**
260
- * JSON-formatted array of content acted upon
261
- */
262
- content?: any;
263
- /**
264
- * Version indicating content version which aids in parsing the content.
265
- */
266
- contentVer?: string;
267
- /**
268
- * Uri of the referrer, this is a convinence for adaptors to just leverage PageAction for click analytics without linking it to the respective Page Views.
269
- */
270
- refUri?: string;
271
- /**
272
- * Time taken in milliseconds since the user saw the page and took the action (such as click on a link, etc.). This will be in seconds.
273
- */
274
- timeToAction?: number;
275
- /**
276
- * A relative or absolute URL that identifies the page or other item. Defaults to the window location.
277
- */
278
- uri?: string;
279
- /**
280
- * Page type
281
- */
282
- pageType?: string;
283
- /**
284
- * Title of the page
285
- */
286
- pageName?: string;
287
- /**
288
- * Content Id (Parent Id) of the parent in which the content was located;
289
- */
290
- parentId?: string;
291
- }
@@ -1,49 +0,0 @@
1
- export declare const _DYN_INDEX_OF = "indexOf";
2
- export declare const _DYN_TRACK_PAGE_ACTION = "trackPageAction";
3
- export declare const _DYN_PAGE_ACTION_PAGE_TAG0 = "pageActionPageTags";
4
- export declare const _DYN__DO_UNLOAD = "_doUnload";
5
- export declare const _DYN_PAGE_NAME = "pageName";
6
- export declare const _DYN_CONTENT_NAME = "contentName";
7
- export declare const _DYN_REQUEST_URI = "requestUri";
8
- export declare const _DYN_PAGE_TYPE = "pageType";
9
- export declare const _DYN_USE_DEFAULT_CONTENT_1 = "useDefaultContentNameOrId";
10
- export declare const _DYN_CAPTURE_ALL_META_DAT2 = "captureAllMetaDataContent";
11
- export declare const _DYN_META_DATA_PREFIX = "metaDataPrefix";
12
- export declare const _DYN_PARENT_DATA_TAG = "parentDataTag";
13
- export declare const _DYN_BEHAVIOR_VALIDATOR = "behaviorValidator";
14
- export declare const _DYN_DEFAULT_RIGHT_CLICK_3 = "defaultRightClickBhvr";
15
- export declare const _DYN_LENGTH = "length";
16
- export declare const _DYN_TAG_NAME = "tagName";
17
- export declare const _DYN_TO_UPPER_CASE = "toUpperCase";
18
- export declare const _DYN_PATHNAME = "pathname";
19
- export declare const _DYN_ADD_EVENT_LISTENER = "addEventListener";
20
- export declare const _DYN_CORE_DATA = "coreData";
21
- export declare const _DYN_GET_ATTRIBUTE = "getAttribute";
22
- export declare const _DYN_PARENT_NODE = "parentNode";
23
- export declare const _DYN_CUSTOM_DATA_PREFIX = "customDataPrefix";
24
- export declare const _DYN_NAME = "name";
25
- export declare const _DYN_DATA = "data";
26
- export declare const _DYN_PROPERTIES = "properties";
27
- export declare const _DYN_ACTION_TYPE = "actionType";
28
- export declare const _DYN_BEHAVIOR = "behavior";
29
- export declare const _DYN_CLICK_COORDINATES = "clickCoordinates";
30
- export declare const _DYN_CONTENT = "content";
31
- export declare const _DYN_REF_URI = "refUri";
32
- export declare const _DYN_PARENT_ID = "parentId";
33
- export declare const _DYN_CAPTURE_PAGE_ACTION = "capturePageAction";
34
- export declare const _DYN_SET_COMMON_PROPERTIE4 = "setCommonProperties";
35
- export declare const _DYN_GET_ELEMENT_CONTENT = "getElementContent";
36
- export declare const _DYN__GET_VALID_BEHAVIOR = "_getValidBehavior";
37
- export declare const _DYN__TRACE_LOGGER = "_traceLogger";
38
- export declare const _DYN_CLICK_COORDINATE_X = "clickCoordinateX";
39
- export declare const _DYN_CLICK_COORDINATE_Y = "clickCoordinateY";
40
- export declare const _DYN__CONFIG = "_config";
41
- export declare const _DYN_DATA_TAGS = "dataTags";
42
- export declare const _DYN__PAGE_TAGS = "_pageTags";
43
- export declare const _DYN__PAGE_TAGS_CALLBACK = "_pageTagsCallback";
44
- export declare const _DYN__META_TAGS = "_metaTags";
45
- export declare const _DYN_SET_BASIC_PROPERTIES = "setBasicProperties";
46
- export declare const _DYN__PAGE_TYPE_META_TAG = "_pageTypeMetaTag";
47
- export declare const _DYN__BEHAVIOR_META_TAG = "_behaviorMetaTag";
48
- export declare const _DYN_PARENT_ELEMENT = "parentElement";
49
- export declare const _DYN_ATTRIBUTES = "attributes";
@@ -1,123 +0,0 @@
1
- /**
2
- * @copyright Microsoft 2020
3
- * File containing utility functions.
4
- */
5
- import { _eInternalMessageId } from "@microsoft/applicationinsights-core-js";
6
- import { IClickAnalyticsConfiguration } from "../Interfaces/Datamodel";
7
- export declare const DEFAULT_DONOT_TRACK_TAG = "ai-dnt";
8
- export declare const DEFAULT_AI_BLOB_ATTRIBUTE_TAG = "ai-blob";
9
- export declare const DEFAULT_DATA_PREFIX = "data-";
10
- export declare const enum _eExtendedInternalMessageId {
11
- CannotParseAiBlobValue = 101,
12
- InvalidContentBlob = 102,
13
- TrackPageActionEventFailed = 103
14
- }
15
- export type _ExtendedInternalMessageId = number | _eExtendedInternalMessageId | _eInternalMessageId;
16
- /**
17
- * Finds attributes in overrideConfig which are invalid or should be objects
18
- * and deletes them. useful in override config
19
- * @param overrideConfig - override config object
20
- * @param attributeNamesExpectedObjects - attributes that should be objects in override config object
21
- */
22
- export declare function removeNonObjectsAndInvalidElements(overrideConfig: IClickAnalyticsConfiguration, attributeNamesExpectedObjects: Array<string>): void;
23
- /**
24
- * Finds attributes in object which are invalid
25
- * and deletes them. useful in override config
26
- * @param object - Input object
27
- */
28
- export declare function removeInvalidElements(object: Object): void;
29
- /**
30
- * Checks if value is assigned to the given param.
31
- * @param value - The token from which the tenant id is to be extracted.
32
- * @returns True/false denoting if value is assigned to the param.
33
- */
34
- export declare function isValueAssigned(value: any): boolean;
35
- /**
36
- * Determines whether an event is a right click or not
37
- * @param evt - Mouse event
38
- * @returns true if the event is a right click
39
- */
40
- export declare function isRightClick(evt: any): boolean;
41
- /**
42
- * Determines whether an event is a left click or not
43
- * @param evt - Mouse event
44
- * @returns true if the event is a left click
45
- */
46
- export declare function isLeftClick(evt: any): boolean;
47
- /**
48
- * Determines whether an event is a middle click or not
49
- * @param evt - Mouse event
50
- * @returns true if the event is a middle click
51
- */
52
- export declare function isMiddleClick(evt: any): boolean;
53
- /**
54
- * Determines whether an event is a keyboard enter or not
55
- * @param evt - Keyboard event
56
- * @returns true if the event is a keyboard enter
57
- */
58
- export declare function isKeyboardEnter(evt: KeyboardEvent): boolean;
59
- /**
60
- * Determines whether an event is a keyboard space or not
61
- * @param evt - Keyboard event
62
- * @returns true if the event is a space enter
63
- */
64
- export declare function isKeyboardSpace(evt: KeyboardEvent): boolean;
65
- /**
66
- * Determines whether the elemt have a DNT(Do Not Track) tag
67
- * @param element - DOM element
68
- * @param doNotTrackFieldName - DOM element
69
- * @returns true if the element must not be tarcked
70
- */
71
- export declare function isElementDnt(element: Element, doNotTrackFieldName: string): boolean;
72
- /**
73
- * Walks up DOM tree to find element with attribute
74
- * @param el - DOM element
75
- * @param attribute - Attribute name
76
- * @returns Dom element which contains attribute
77
- */
78
- export declare function findClosestByAttribute(el: Element, attribute: string): Element;
79
- /**
80
- * checks if attribute is in element.
81
- * method checks for empty string, in case the attribute is set but no value is assigned to it
82
- * @param element - DOM element
83
- * @param attributeToLookFor - Attribute name
84
- * @returns true if attribute is in element, even if empty string
85
- */
86
- export declare function isAttributeInElement(element: Element, attributeToLookFor: string): Boolean;
87
- /**
88
- * Walks up DOM tree to find element which matches validationMethod
89
- * @param el - DOM element
90
- * @param validationMethod - DOM element validation method
91
- * @param validationMethodParam - DOM element validation method parameters
92
- * @returns Dom element which is an anchor
93
- */
94
- export declare function walkUpDomChainWithElementValidation(el: Element, validationMethod: Function, validationMethodParam?: any): Element;
95
- /**
96
- * Determine if DOM element is an anchor
97
- * @param element - DOM element
98
- * @returns Is element an anchor
99
- */
100
- export declare function isElementAnAnchor(element: Element): boolean;
101
- /**
102
- * Walks up DOM tree to find anchor element
103
- * @param element - DOM element
104
- * @returns Dom element which is an anchor
105
- */
106
- export declare function findClosestAnchor(element: Element): Element;
107
- /**
108
- * Returns the specified field and also removes the property from the object if exists.
109
- * @param obj - Input object
110
- * @param fieldName - >Name of the field/property to be extracted
111
- * @returns Value of the specified tag
112
- */
113
- export declare function extractFieldFromObject(obj: Object, fieldName: string): string;
114
- /**
115
- * Adds surrounding square brackets to the passed in text
116
- * @param str - Input string
117
- * @returns String with surrounding brackets
118
- */
119
- export declare function bracketIt(str: string): string;
120
- export declare function validateContentNamePrefix(config: IClickAnalyticsConfiguration, defaultDataPrefix: string): boolean;
121
- export declare function BehaviorMapValidator(map: any): (key: string) => any;
122
- export declare function BehaviorValueValidator(behaviorArray: string[]): (key: string) => string;
123
- export declare function BehaviorEnumValidator(enumObj: any): (key: string) => any;
@@ -1,28 +0,0 @@
1
- /**
2
- * @copyright Microsoft 2020
3
- */
4
- import { ICustomProperties, IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
5
- import { ClickAnalyticsPlugin } from "../ClickAnalyticsPlugin";
6
- import { IClickAnalyticsConfiguration, IContentHandler, IPageActionOverrideValues, IPageActionTelemetry } from "../Interfaces/Datamodel";
7
- import { WebEvent } from "./WebEvent";
8
- export declare class PageAction extends WebEvent {
9
- constructor(clickAnalyticsPlugin: ClickAnalyticsPlugin, config: IClickAnalyticsConfiguration, contentHandler: IContentHandler, pageTagsCallback: any, metaTags: {
10
- [name: string]: string;
11
- }, traceLogger: IDiagnosticLogger);
12
- /**
13
- * API to send pageAction event
14
- * @param pageActionEvent - PageAction event
15
- * @param properties - PageAction properties(Part C)
16
- */
17
- trackPageAction(pageActionEvent: IPageActionTelemetry, properties?: ICustomProperties): void;
18
- /**
19
- * API to create and send a populated PageAction event
20
- * @param element - DOM element
21
- * @param overrideValues - PageAction overrides
22
- * @param customProperties - Custom properties(Part C)
23
- * @param isRightClick - Flag for mouse right clicks
24
- */
25
- capturePageAction(element: Element, overrideValues?: IPageActionOverrideValues, customProperties?: {
26
- [name: string]: string | number | boolean | string[] | number[] | boolean[] | object;
27
- }, isRightClick?: boolean): void;
28
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * @copyright Microsoft 2020
3
- */
4
- import { IDiagnosticLogger, IProcessTelemetryUnloadContext, ITelemetryUnloadState, IUnloadableComponent } from "@microsoft/applicationinsights-core-js";
5
- import { ClickAnalyticsPlugin } from "../ClickAnalyticsPlugin";
6
- import { IClickAnalyticsConfiguration, IContentHandler, IOverrideValues, IPageActionTelemetry, IPageTags } from "../Interfaces/Datamodel";
7
- export declare class WebEvent implements IUnloadableComponent {
8
- protected _pageTags: IPageTags;
9
- protected _pageTypeMetaTag: string;
10
- protected _marketMetaTag: string;
11
- protected _behaviorMetaTag: string;
12
- protected _clickAnalyticsPlugin: ClickAnalyticsPlugin;
13
- protected _config: IClickAnalyticsConfiguration;
14
- protected _contentHandler: IContentHandler;
15
- protected _pageTagsCallback: any;
16
- protected _metaTags: {
17
- [name: string]: string;
18
- };
19
- protected _traceLogger: IDiagnosticLogger;
20
- /**
21
- * @param clickAnalyticsPlugin - Click Analytics plugin instance
22
- * @param config - ClickAnalytics configuration object
23
- * @param contentHandler - Content handler
24
- * @param id - Id object
25
- * @param pageTagsCallback - callback methods to get pageTags value
26
- * @param metaTags - Meta tags
27
- * @param traceLogger - Trace logger to log to console.
28
- */
29
- constructor(clickAnalyticsPlugin: ClickAnalyticsPlugin, config: IClickAnalyticsConfiguration, contentHandler: IContentHandler, pageTagsCallback: any, metaTags: {
30
- [name: string]: string;
31
- }, traceLogger: IDiagnosticLogger);
32
- setBasicProperties(event: IPageActionTelemetry, overrideValues: IOverrideValues): void;
33
- /**
34
- * Sets common properties for events that are based on the WebEvent schema.
35
- * @param event - The event
36
- */
37
- setCommonProperties(event: IPageActionTelemetry, overrideValues: IOverrideValues): void;
38
- /**
39
- * Teardown / Unload hook to allow implementations to perform some additional unload operations before the BaseTelemetryPlugin
40
- * finishes it's removal.
41
- * @param unloadCtx - This is the context that should be used during unloading.
42
- * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
43
- * @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.
44
- * @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
45
- */
46
- _doUnload(unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void): void | boolean;
47
- /**
48
- * Sets pageTags.
49
- * @param event - The event
50
- */
51
- protected _setPageTags(event: IPageActionTelemetry, overrideValues: IOverrideValues): void;
52
- protected _getBehavior(overrideValues?: IOverrideValues): string | number;
53
- protected _getValidBehavior(behavior: string | number): string | number;
54
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * @copyright Microsoft 2020
3
- */
4
- import { IDiagnosticLogger, IProcessTelemetryUnloadContext, ITelemetryUnloadState } from "@microsoft/applicationinsights-core-js";
5
- import { ClickAnalyticsPlugin } from "../ClickAnalyticsPlugin";
6
- import { IAutoCaptureHandler, IClickAnalyticsConfiguration } from "../Interfaces/Datamodel";
7
- import { PageAction } from "../events/PageAction";
8
- export declare class AutoCaptureHandler implements IAutoCaptureHandler {
9
- protected _analyticsPlugin: ClickAnalyticsPlugin;
10
- protected _config: IClickAnalyticsConfiguration;
11
- protected _pageAction: PageAction;
12
- protected _traceLogger: IDiagnosticLogger;
13
- /**
14
- * @param analyticsPlugin - WebAnalytics plugin
15
- * @param traceLogger - Trace logger to log to console.
16
- */
17
- constructor(_analyticsPlugin: ClickAnalyticsPlugin, _config: IClickAnalyticsConfiguration, _pageAction: PageAction, _traceLogger: IDiagnosticLogger);
18
- click(): void;
19
- _doUnload(unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void): void | boolean;
20
- }
@@ -1,29 +0,0 @@
1
- /**
2
- * @copyright Microsoft 2020
3
- */
4
- import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
5
- import { IClickAnalyticsConfiguration, IContent, IContentHandler } from "../Interfaces/Datamodel";
6
- export declare class DomContentHandler implements IContentHandler {
7
- protected _config: IClickAnalyticsConfiguration;
8
- protected _traceLogger: IDiagnosticLogger;
9
- /**
10
- * @param config - ClickAnalytics configuration object
11
- * @param traceLogger - Trace logger to log to console.
12
- */
13
- constructor(_config: IClickAnalyticsConfiguration, _traceLogger: IDiagnosticLogger);
14
- /**
15
- * Collect metatags from DOM.
16
- * Collect data from meta tags.
17
- * @returns {object} - Metatags collection/property bag
18
- */
19
- getMetadata(): {
20
- [name: string]: string;
21
- };
22
- /**
23
- * Collect data-* attributes for the given element.
24
- * All attributes with data-* prefix or user provided customDataPrefix are collected.'data-*' prefix is removed from the key name.
25
- * @param element - The element from which attributes need to be collected.
26
- * @returns String representation of the Json array of element attributes
27
- */
28
- getElementContent(element: Element): IContent;
29
- }
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.34.4"
9
- }
10
- ]
11
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes