@tracelog/lib 0.7.0 → 0.7.2
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/dist/browser/tracelog.esm.js +147 -150
- package/dist/browser/tracelog.esm.js.map +1 -1
- package/dist/browser/tracelog.js +2 -2
- package/dist/browser/tracelog.js.map +1 -1
- package/dist/cjs/handlers/click.handler.js +1 -1
- package/dist/cjs/handlers/performance.handler.js +1 -1
- package/dist/cjs/types/index.d.ts +0 -1
- package/dist/cjs/types/index.js +0 -1
- package/dist/cjs/types/test-bridge.types.d.ts +9 -9
- package/dist/cjs/utils/browser/qa-mode.utils.js +1 -1
- package/dist/cjs/utils/emitter.utils.d.ts +1 -1
- package/dist/cjs/utils/network/url.utils.d.ts +1 -1
- package/dist/esm/handlers/click.handler.js +1 -1
- package/dist/esm/handlers/performance.handler.js +1 -1
- package/dist/esm/types/index.d.ts +0 -1
- package/dist/esm/types/index.js +0 -1
- package/dist/esm/types/test-bridge.types.d.ts +9 -9
- package/dist/esm/utils/browser/qa-mode.utils.js +1 -1
- package/dist/esm/utils/emitter.utils.d.ts +1 -1
- package/dist/esm/utils/network/url.utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/types/tag.types.d.ts +0 -43
- package/dist/cjs/types/tag.types.js +0 -31
- package/dist/esm/types/tag.types.d.ts +0 -43
- package/dist/esm/types/tag.types.js +0 -28
|
@@ -4,7 +4,7 @@ exports.ClickHandler = void 0;
|
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const types_1 = require("../types");
|
|
6
6
|
const state_manager_1 = require("../managers/state.manager");
|
|
7
|
-
const utils_1 = require("
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
8
|
class ClickHandler extends state_manager_1.StateManager {
|
|
9
9
|
constructor(eventManager) {
|
|
10
10
|
super();
|
|
@@ -37,7 +37,7 @@ exports.PerformanceHandler = void 0;
|
|
|
37
37
|
const state_manager_1 = require("../managers/state.manager");
|
|
38
38
|
const types_1 = require("../types");
|
|
39
39
|
const constants_1 = require("../constants");
|
|
40
|
-
const utils_1 = require("
|
|
40
|
+
const utils_1 = require("../utils");
|
|
41
41
|
class PerformanceHandler extends state_manager_1.StateManager {
|
|
42
42
|
constructor(eventManager) {
|
|
43
43
|
super();
|
|
@@ -8,7 +8,6 @@ export * from './mode.types';
|
|
|
8
8
|
export * from './queue.types';
|
|
9
9
|
export * from './session.types';
|
|
10
10
|
export * from './state.types';
|
|
11
|
-
export * from './tag.types';
|
|
12
11
|
export * from './test-bridge.types';
|
|
13
12
|
export * from './validation-error.types';
|
|
14
13
|
export * from './window.types';
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -24,7 +24,6 @@ __exportStar(require("./mode.types"), exports);
|
|
|
24
24
|
__exportStar(require("./queue.types"), exports);
|
|
25
25
|
__exportStar(require("./session.types"), exports);
|
|
26
26
|
__exportStar(require("./state.types"), exports);
|
|
27
|
-
__exportStar(require("./tag.types"), exports);
|
|
28
27
|
__exportStar(require("./test-bridge.types"), exports);
|
|
29
28
|
__exportStar(require("./validation-error.types"), exports);
|
|
30
29
|
__exportStar(require("./window.types"), exports);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ClickHandler } from '
|
|
2
|
-
import { ErrorHandler } from '
|
|
3
|
-
import { PageViewHandler } from '
|
|
4
|
-
import { PerformanceHandler } from '
|
|
5
|
-
import { ScrollHandler } from '
|
|
6
|
-
import { SessionHandler } from '
|
|
7
|
-
import { GoogleAnalyticsIntegration } from '
|
|
8
|
-
import { EventManager } from '
|
|
9
|
-
import { StorageManager as TraceLogStorageManager } from '
|
|
1
|
+
import { ClickHandler } from '../handlers/click.handler';
|
|
2
|
+
import { ErrorHandler } from '../handlers/error.handler';
|
|
3
|
+
import { PageViewHandler } from '../handlers/page-view.handler';
|
|
4
|
+
import { PerformanceHandler } from '../handlers/performance.handler';
|
|
5
|
+
import { ScrollHandler } from '../handlers/scroll.handler';
|
|
6
|
+
import { SessionHandler } from '../handlers/session.handler';
|
|
7
|
+
import { GoogleAnalyticsIntegration } from '../integrations/google-analytics.integration';
|
|
8
|
+
import { EventManager } from '../managers/event.manager';
|
|
9
|
+
import { StorageManager as TraceLogStorageManager } from '../managers/storage.manager';
|
|
10
10
|
import { Config } from './config.types';
|
|
11
11
|
import { State } from './state.types';
|
|
12
12
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.detectQaMode = void 0;
|
|
4
|
-
const constants_1 = require("
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
5
|
const logging_utils_1 = require("../logging.utils");
|
|
6
6
|
const QA_MODE_PARAM = 'tlog_mode';
|
|
7
7
|
const QA_MODE_VALUE = 'qa';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTML_DATA_ATTR_PREFIX, MAX_TEXT_LENGTH, INTERACTIVE_SELECTORS } from '../constants';
|
|
2
2
|
import { EventType } from '../types';
|
|
3
3
|
import { StateManager } from '../managers/state.manager';
|
|
4
|
-
import { log } from '
|
|
4
|
+
import { log } from '../utils';
|
|
5
5
|
export class ClickHandler extends StateManager {
|
|
6
6
|
constructor(eventManager) {
|
|
7
7
|
super();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StateManager } from '../managers/state.manager';
|
|
2
2
|
import { EventType } from '../types';
|
|
3
3
|
import { LONG_TASK_THROTTLE_MS, PRECISION_TWO_DECIMALS, WEB_VITALS_THRESHOLDS } from '../constants';
|
|
4
|
-
import { log } from '
|
|
4
|
+
import { log } from '../utils';
|
|
5
5
|
export class PerformanceHandler extends StateManager {
|
|
6
6
|
constructor(eventManager) {
|
|
7
7
|
super();
|
|
@@ -8,7 +8,6 @@ export * from './mode.types';
|
|
|
8
8
|
export * from './queue.types';
|
|
9
9
|
export * from './session.types';
|
|
10
10
|
export * from './state.types';
|
|
11
|
-
export * from './tag.types';
|
|
12
11
|
export * from './test-bridge.types';
|
|
13
12
|
export * from './validation-error.types';
|
|
14
13
|
export * from './window.types';
|
package/dist/esm/types/index.js
CHANGED
|
@@ -8,7 +8,6 @@ export * from './mode.types';
|
|
|
8
8
|
export * from './queue.types';
|
|
9
9
|
export * from './session.types';
|
|
10
10
|
export * from './state.types';
|
|
11
|
-
export * from './tag.types';
|
|
12
11
|
export * from './test-bridge.types';
|
|
13
12
|
export * from './validation-error.types';
|
|
14
13
|
export * from './window.types';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ClickHandler } from '
|
|
2
|
-
import { ErrorHandler } from '
|
|
3
|
-
import { PageViewHandler } from '
|
|
4
|
-
import { PerformanceHandler } from '
|
|
5
|
-
import { ScrollHandler } from '
|
|
6
|
-
import { SessionHandler } from '
|
|
7
|
-
import { GoogleAnalyticsIntegration } from '
|
|
8
|
-
import { EventManager } from '
|
|
9
|
-
import { StorageManager as TraceLogStorageManager } from '
|
|
1
|
+
import { ClickHandler } from '../handlers/click.handler';
|
|
2
|
+
import { ErrorHandler } from '../handlers/error.handler';
|
|
3
|
+
import { PageViewHandler } from '../handlers/page-view.handler';
|
|
4
|
+
import { PerformanceHandler } from '../handlers/performance.handler';
|
|
5
|
+
import { ScrollHandler } from '../handlers/scroll.handler';
|
|
6
|
+
import { SessionHandler } from '../handlers/session.handler';
|
|
7
|
+
import { GoogleAnalyticsIntegration } from '../integrations/google-analytics.integration';
|
|
8
|
+
import { EventManager } from '../managers/event.manager';
|
|
9
|
+
import { StorageManager as TraceLogStorageManager } from '../managers/storage.manager';
|
|
10
10
|
import { Config } from './config.types';
|
|
11
11
|
import { State } from './state.types';
|
|
12
12
|
/**
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tracelog/lib",
|
|
3
3
|
"description": "JavaScript library for web analytics and real-time event tracking",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.2",
|
|
6
6
|
"main": "./dist/cjs/public-api.js",
|
|
7
7
|
"module": "./dist/esm/public-api.js",
|
|
8
8
|
"types": "./dist/esm/public-api.d.ts",
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { EventType } from './event.types';
|
|
2
|
-
export declare enum TagLogicalOperator {
|
|
3
|
-
AND = "AND",
|
|
4
|
-
OR = "OR"
|
|
5
|
-
}
|
|
6
|
-
export declare enum TagConditionType {
|
|
7
|
-
URL_MATCHES = "url_matches",
|
|
8
|
-
ELEMENT_MATCHES = "element_matches",
|
|
9
|
-
DEVICE_TYPE = "device_type",
|
|
10
|
-
ELEMENT_TEXT = "element_text",
|
|
11
|
-
ELEMENT_ATTRIBUTE = "element_attribute",
|
|
12
|
-
UTM_SOURCE = "utm_source",
|
|
13
|
-
UTM_MEDIUM = "utm_medium",
|
|
14
|
-
UTM_CAMPAIGN = "utm_campaign"
|
|
15
|
-
}
|
|
16
|
-
export declare enum TagConditionOperator {
|
|
17
|
-
EQUALS = "equals",
|
|
18
|
-
CONTAINS = "contains",
|
|
19
|
-
STARTS_WITH = "starts_with",
|
|
20
|
-
ENDS_WITH = "ends_with",
|
|
21
|
-
REGEX = "regex",
|
|
22
|
-
GREATER_THAN = "greater_than",
|
|
23
|
-
LESS_THAN = "less_than",
|
|
24
|
-
EXISTS = "exists",
|
|
25
|
-
NOT_EXISTS = "not_exists"
|
|
26
|
-
}
|
|
27
|
-
export type TagConfig = Pick<Tag, 'key' | 'triggerType' | 'logicalOperator' | 'conditions'> & {
|
|
28
|
-
id: string;
|
|
29
|
-
};
|
|
30
|
-
export interface Tag {
|
|
31
|
-
key: string;
|
|
32
|
-
name: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
active: boolean;
|
|
35
|
-
triggerType: EventType;
|
|
36
|
-
logicalOperator?: TagLogicalOperator;
|
|
37
|
-
conditions: TagCondition[];
|
|
38
|
-
}
|
|
39
|
-
export interface TagCondition {
|
|
40
|
-
type: TagConditionType;
|
|
41
|
-
operator: TagConditionOperator;
|
|
42
|
-
value: string;
|
|
43
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TagConditionOperator = exports.TagConditionType = exports.TagLogicalOperator = void 0;
|
|
4
|
-
var TagLogicalOperator;
|
|
5
|
-
(function (TagLogicalOperator) {
|
|
6
|
-
TagLogicalOperator["AND"] = "AND";
|
|
7
|
-
TagLogicalOperator["OR"] = "OR";
|
|
8
|
-
})(TagLogicalOperator || (exports.TagLogicalOperator = TagLogicalOperator = {}));
|
|
9
|
-
var TagConditionType;
|
|
10
|
-
(function (TagConditionType) {
|
|
11
|
-
TagConditionType["URL_MATCHES"] = "url_matches";
|
|
12
|
-
TagConditionType["ELEMENT_MATCHES"] = "element_matches";
|
|
13
|
-
TagConditionType["DEVICE_TYPE"] = "device_type";
|
|
14
|
-
TagConditionType["ELEMENT_TEXT"] = "element_text";
|
|
15
|
-
TagConditionType["ELEMENT_ATTRIBUTE"] = "element_attribute";
|
|
16
|
-
TagConditionType["UTM_SOURCE"] = "utm_source";
|
|
17
|
-
TagConditionType["UTM_MEDIUM"] = "utm_medium";
|
|
18
|
-
TagConditionType["UTM_CAMPAIGN"] = "utm_campaign";
|
|
19
|
-
})(TagConditionType || (exports.TagConditionType = TagConditionType = {}));
|
|
20
|
-
var TagConditionOperator;
|
|
21
|
-
(function (TagConditionOperator) {
|
|
22
|
-
TagConditionOperator["EQUALS"] = "equals";
|
|
23
|
-
TagConditionOperator["CONTAINS"] = "contains";
|
|
24
|
-
TagConditionOperator["STARTS_WITH"] = "starts_with";
|
|
25
|
-
TagConditionOperator["ENDS_WITH"] = "ends_with";
|
|
26
|
-
TagConditionOperator["REGEX"] = "regex";
|
|
27
|
-
TagConditionOperator["GREATER_THAN"] = "greater_than";
|
|
28
|
-
TagConditionOperator["LESS_THAN"] = "less_than";
|
|
29
|
-
TagConditionOperator["EXISTS"] = "exists";
|
|
30
|
-
TagConditionOperator["NOT_EXISTS"] = "not_exists";
|
|
31
|
-
})(TagConditionOperator || (exports.TagConditionOperator = TagConditionOperator = {}));
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { EventType } from './event.types';
|
|
2
|
-
export declare enum TagLogicalOperator {
|
|
3
|
-
AND = "AND",
|
|
4
|
-
OR = "OR"
|
|
5
|
-
}
|
|
6
|
-
export declare enum TagConditionType {
|
|
7
|
-
URL_MATCHES = "url_matches",
|
|
8
|
-
ELEMENT_MATCHES = "element_matches",
|
|
9
|
-
DEVICE_TYPE = "device_type",
|
|
10
|
-
ELEMENT_TEXT = "element_text",
|
|
11
|
-
ELEMENT_ATTRIBUTE = "element_attribute",
|
|
12
|
-
UTM_SOURCE = "utm_source",
|
|
13
|
-
UTM_MEDIUM = "utm_medium",
|
|
14
|
-
UTM_CAMPAIGN = "utm_campaign"
|
|
15
|
-
}
|
|
16
|
-
export declare enum TagConditionOperator {
|
|
17
|
-
EQUALS = "equals",
|
|
18
|
-
CONTAINS = "contains",
|
|
19
|
-
STARTS_WITH = "starts_with",
|
|
20
|
-
ENDS_WITH = "ends_with",
|
|
21
|
-
REGEX = "regex",
|
|
22
|
-
GREATER_THAN = "greater_than",
|
|
23
|
-
LESS_THAN = "less_than",
|
|
24
|
-
EXISTS = "exists",
|
|
25
|
-
NOT_EXISTS = "not_exists"
|
|
26
|
-
}
|
|
27
|
-
export type TagConfig = Pick<Tag, 'key' | 'triggerType' | 'logicalOperator' | 'conditions'> & {
|
|
28
|
-
id: string;
|
|
29
|
-
};
|
|
30
|
-
export interface Tag {
|
|
31
|
-
key: string;
|
|
32
|
-
name: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
active: boolean;
|
|
35
|
-
triggerType: EventType;
|
|
36
|
-
logicalOperator?: TagLogicalOperator;
|
|
37
|
-
conditions: TagCondition[];
|
|
38
|
-
}
|
|
39
|
-
export interface TagCondition {
|
|
40
|
-
type: TagConditionType;
|
|
41
|
-
operator: TagConditionOperator;
|
|
42
|
-
value: string;
|
|
43
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export var TagLogicalOperator;
|
|
2
|
-
(function (TagLogicalOperator) {
|
|
3
|
-
TagLogicalOperator["AND"] = "AND";
|
|
4
|
-
TagLogicalOperator["OR"] = "OR";
|
|
5
|
-
})(TagLogicalOperator || (TagLogicalOperator = {}));
|
|
6
|
-
export var TagConditionType;
|
|
7
|
-
(function (TagConditionType) {
|
|
8
|
-
TagConditionType["URL_MATCHES"] = "url_matches";
|
|
9
|
-
TagConditionType["ELEMENT_MATCHES"] = "element_matches";
|
|
10
|
-
TagConditionType["DEVICE_TYPE"] = "device_type";
|
|
11
|
-
TagConditionType["ELEMENT_TEXT"] = "element_text";
|
|
12
|
-
TagConditionType["ELEMENT_ATTRIBUTE"] = "element_attribute";
|
|
13
|
-
TagConditionType["UTM_SOURCE"] = "utm_source";
|
|
14
|
-
TagConditionType["UTM_MEDIUM"] = "utm_medium";
|
|
15
|
-
TagConditionType["UTM_CAMPAIGN"] = "utm_campaign";
|
|
16
|
-
})(TagConditionType || (TagConditionType = {}));
|
|
17
|
-
export var TagConditionOperator;
|
|
18
|
-
(function (TagConditionOperator) {
|
|
19
|
-
TagConditionOperator["EQUALS"] = "equals";
|
|
20
|
-
TagConditionOperator["CONTAINS"] = "contains";
|
|
21
|
-
TagConditionOperator["STARTS_WITH"] = "starts_with";
|
|
22
|
-
TagConditionOperator["ENDS_WITH"] = "ends_with";
|
|
23
|
-
TagConditionOperator["REGEX"] = "regex";
|
|
24
|
-
TagConditionOperator["GREATER_THAN"] = "greater_than";
|
|
25
|
-
TagConditionOperator["LESS_THAN"] = "less_than";
|
|
26
|
-
TagConditionOperator["EXISTS"] = "exists";
|
|
27
|
-
TagConditionOperator["NOT_EXISTS"] = "not_exists";
|
|
28
|
-
})(TagConditionOperator || (TagConditionOperator = {}));
|