@tracelog/lib 0.6.3 → 0.7.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.
- package/dist/browser/tracelog.esm.js +150 -147
- 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/types/index.d.ts +1 -0
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/tag.types.d.ts +43 -0
- package/dist/cjs/types/tag.types.js +31 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/types/tag.types.d.ts +43 -0
- package/dist/esm/types/tag.types.js +28 -0
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ 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';
|
|
11
12
|
export * from './test-bridge.types';
|
|
12
13
|
export * from './validation-error.types';
|
|
13
14
|
export * from './window.types';
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __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);
|
|
27
28
|
__exportStar(require("./test-bridge.types"), exports);
|
|
28
29
|
__exportStar(require("./validation-error.types"), exports);
|
|
29
30
|
__exportStar(require("./window.types"), exports);
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 = {}));
|
|
@@ -8,6 +8,7 @@ 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';
|
|
11
12
|
export * from './test-bridge.types';
|
|
12
13
|
export * from './validation-error.types';
|
|
13
14
|
export * from './window.types';
|
package/dist/esm/types/index.js
CHANGED
|
@@ -8,6 +8,7 @@ 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';
|
|
11
12
|
export * from './test-bridge.types';
|
|
12
13
|
export * from './validation-error.types';
|
|
13
14
|
export * from './window.types';
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 = {}));
|
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.
|
|
5
|
+
"version": "0.7.0",
|
|
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",
|