@phantomstudios/ft-lib 0.2.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/.babelrc +6 -0
- package/.eslintrc +58 -0
- package/.github/CODEOWNERS +1 -0
- package/.github/workflows/pr.yml +31 -0
- package/.github/workflows/release.yml +44 -0
- package/.nvmrc +1 -0
- package/.prettierignore +5 -0
- package/CODE_OF_CONDUCT.md +76 -0
- package/CONTRIBUTING.md +48 -0
- package/LICENSE +21 -0
- package/README.md +158 -0
- package/SUPPORT.md +4 -0
- package/jest.config.js +24 -0
- package/lib/FTTracking/index.d.ts +24 -0
- package/lib/FTTracking/index.d.ts.map +1 -0
- package/lib/FTTracking/index.js +69 -0
- package/lib/FTTracking/index.js.map +1 -0
- package/lib/consentMonitor/index.d.ts +19 -0
- package/lib/consentMonitor/index.d.ts.map +1 -0
- package/lib/consentMonitor/index.js +117 -0
- package/lib/consentMonitor/index.js.map +1 -0
- package/lib/gaTracker/index.d.ts +13 -0
- package/lib/gaTracker/index.d.ts.map +1 -0
- package/lib/gaTracker/index.js +120 -0
- package/lib/gaTracker/index.js.map +1 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -0
- package/lib/oTracker/index.d.ts +14 -0
- package/lib/oTracker/index.d.ts.map +1 -0
- package/lib/oTracker/index.js +114 -0
- package/lib/oTracker/index.js.map +1 -0
- package/lib/permutiveVideoUtils/index.d.ts +12 -0
- package/lib/permutiveVideoUtils/index.d.ts.map +1 -0
- package/lib/permutiveVideoUtils/index.js +59 -0
- package/lib/permutiveVideoUtils/index.js.map +1 -0
- package/lib/reactPlayerTracking/index.d.ts +30 -0
- package/lib/reactPlayerTracking/index.d.ts.map +1 -0
- package/lib/reactPlayerTracking/index.js +85 -0
- package/lib/reactPlayerTracking/index.js.map +1 -0
- package/lib/utils/attention.d.ts +20 -0
- package/lib/utils/attention.d.ts.map +1 -0
- package/lib/utils/attention.js +142 -0
- package/lib/utils/attention.js.map +1 -0
- package/lib/utils/cookies.d.ts +2 -0
- package/lib/utils/cookies.d.ts.map +1 -0
- package/lib/utils/cookies.js +14 -0
- package/lib/utils/cookies.js.map +1 -0
- package/lib/utils/getTrace.d.ts +6 -0
- package/lib/utils/getTrace.d.ts.map +1 -0
- package/lib/utils/getTrace.js +109 -0
- package/lib/utils/getTrace.js.map +1 -0
- package/lib/utils/intersectionObserverPolyfill.d.ts +1 -0
- package/lib/utils/intersectionObserverPolyfill.d.ts.map +1 -0
- package/lib/utils/intersectionObserverPolyfill.js +421 -0
- package/lib/utils/intersectionObserverPolyfill.js.map +1 -0
- package/lib/utils/scroll.d.ts +18 -0
- package/lib/utils/scroll.d.ts.map +1 -0
- package/lib/utils/scroll.js +75 -0
- package/lib/utils/scroll.js.map +1 -0
- package/lib/utils/yupValidator.d.ts +87 -0
- package/lib/utils/yupValidator.d.ts.map +1 -0
- package/lib/utils/yupValidator.js +189 -0
- package/lib/utils/yupValidator.js.map +1 -0
- package/lib/ytIframeTracking/index.d.ts +27 -0
- package/lib/ytIframeTracking/index.d.ts.map +1 -0
- package/lib/ytIframeTracking/index.js +165 -0
- package/lib/ytIframeTracking/index.js.map +1 -0
- package/package.json +75 -0
- package/src/FTTracking/index.ts +74 -0
- package/src/consentMonitor/index.ts +120 -0
- package/src/gaTracker/index.ts +136 -0
- package/src/index.ts +12 -0
- package/src/oTracker/index.ts +122 -0
- package/src/permutiveVideoUtils/index.ts +53 -0
- package/src/reactPlayerTracking/index.ts +105 -0
- package/src/types.d.ts +33 -0
- package/src/utils/attention.js +138 -0
- package/src/utils/cookies.js +9 -0
- package/src/utils/getTrace.js +122 -0
- package/src/utils/intersectionObserverPolyfill.js +470 -0
- package/src/utils/scroll.ts +94 -0
- package/src/utils/yupValidator.ts +205 -0
- package/src/ytIframeTracking/index.ts +210 -0
- package/test/index.test.tsx +63 -0
- package/tsconfig.json +26 -0
- package/tsconfig.test.json +6 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.reactPlayerTracking = void 0;
|
|
18
|
+
var debug_1 = __importDefault(require("debug"));
|
|
19
|
+
var permutiveVideoUtils_1 = require("../permutiveVideoUtils");
|
|
20
|
+
var debug = (0, debug_1.default)("@phntms/ft-lib");
|
|
21
|
+
var reactPlayerTracking = /** @class */ (function () {
|
|
22
|
+
function reactPlayerTracking(FTTracker, videoTitle, videoUrl) {
|
|
23
|
+
var _this = this;
|
|
24
|
+
this.duration = 0;
|
|
25
|
+
this.playedSeconds = 0;
|
|
26
|
+
this.playedPercent = 0;
|
|
27
|
+
/** 100% is fired with ended event */
|
|
28
|
+
this.GA_milestones = [1, 25, 50, 75];
|
|
29
|
+
this.oTracking_milestones = [25, 50, 75];
|
|
30
|
+
this.setDuration = function (duration) {
|
|
31
|
+
_this.duration = Math.floor(duration);
|
|
32
|
+
};
|
|
33
|
+
this.sendGAEvent = function (action) {
|
|
34
|
+
debug("GA datalayer push - " + action);
|
|
35
|
+
_this.FTTracker.gaEvent("Video", action, _this.videoTitle);
|
|
36
|
+
};
|
|
37
|
+
this.sendoTrackingEvent = function (action, progress) {
|
|
38
|
+
debug("oTracking event - " + action);
|
|
39
|
+
_this.FTTracker.oEvent(__assign({ category: "video", action: action, product: _this.FTTracker.config.product, app: _this.FTTracker.config.app, duration: _this.duration }, (progress && { progress: progress })));
|
|
40
|
+
};
|
|
41
|
+
this.trackPlay = function () {
|
|
42
|
+
_this.sendGAEvent("playing");
|
|
43
|
+
_this.sendoTrackingEvent("playing");
|
|
44
|
+
};
|
|
45
|
+
this.trackPause = function () {
|
|
46
|
+
_this.sendGAEvent("pause");
|
|
47
|
+
_this.sendoTrackingEvent("pause");
|
|
48
|
+
};
|
|
49
|
+
this.trackEnded = function () {
|
|
50
|
+
//fire 100% progress events
|
|
51
|
+
_this.sendGAEvent("100% watched");
|
|
52
|
+
_this.sendoTrackingEvent("progress", 100);
|
|
53
|
+
_this.sendGAEvent("ended");
|
|
54
|
+
_this.sendoTrackingEvent("ended", 100);
|
|
55
|
+
};
|
|
56
|
+
this.trackProgress = function (reactPlayerProgress) {
|
|
57
|
+
var _a;
|
|
58
|
+
_this.playedSeconds = reactPlayerProgress.playedSeconds;
|
|
59
|
+
if (_this.duration > 0) {
|
|
60
|
+
_this.playedPercent = Math.floor((Math.ceil(reactPlayerProgress.playedSeconds) / _this.duration) * 100);
|
|
61
|
+
}
|
|
62
|
+
while (_this.playedPercent >= _this.GA_milestones[0]) {
|
|
63
|
+
debug("GA progress milestone - " + _this.GA_milestones[0]);
|
|
64
|
+
_this.sendGAEvent("".concat(_this.GA_milestones[0], "% watched"));
|
|
65
|
+
_this.GA_milestones.shift();
|
|
66
|
+
}
|
|
67
|
+
while (_this.playedPercent >= _this.oTracking_milestones[0]) {
|
|
68
|
+
debug("oTracking progress milestone - " + _this.oTracking_milestones[0]);
|
|
69
|
+
_this.sendoTrackingEvent("progress", _this.oTracking_milestones[0]);
|
|
70
|
+
_this.oTracking_milestones.shift();
|
|
71
|
+
}
|
|
72
|
+
//permutive only tracks progress events and contains its own milestones
|
|
73
|
+
debug("edit permutive progress event- " + _this.playedSeconds);
|
|
74
|
+
(_a = _this.permutiveTracker) === null || _a === void 0 ? void 0 : _a.emitPermutiveProgressEvent(_this.duration, _this.playedSeconds);
|
|
75
|
+
};
|
|
76
|
+
/** oTracking dispatch event function */
|
|
77
|
+
this.FTTracker = FTTracker;
|
|
78
|
+
this.videoTitle = videoTitle;
|
|
79
|
+
this.videoUrl = videoUrl;
|
|
80
|
+
this.permutiveTracker = new permutiveVideoUtils_1.permutiveVideoUtils(this.FTTracker.config.campaign, this.videoTitle, this.videoUrl);
|
|
81
|
+
}
|
|
82
|
+
return reactPlayerTracking;
|
|
83
|
+
}());
|
|
84
|
+
exports.reactPlayerTracking = reactPlayerTracking;
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reactPlayerTracking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAG1B,8DAA6D;AAE7D,IAAM,KAAK,GAAG,IAAA,eAAK,EAAC,gBAAgB,CAAC,CAAC;AAOtC;IAaE,6BAAY,SAAqB,EAAE,UAAkB,EAAE,QAAgB;QAAvE,iBAUC;QAtBD,aAAQ,GAAG,CAAC,CAAC;QACb,kBAAa,GAAG,CAAC,CAAC;QAClB,kBAAa,GAAG,CAAC,CAAC;QAIlB,qCAAqC;QACrC,kBAAa,GAAa,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAC1C,yBAAoB,GAAa,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAgB9C,gBAAW,GAAG,UAAC,QAAgB;YAC7B,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC,CAAC;QAEF,gBAAW,GAAG,UAAC,MAAc;YAC3B,KAAK,CAAC,sBAAsB,GAAG,MAAM,CAAC,CAAC;YACvC,KAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,KAAI,C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AAQ,CACd,CAAC;IACJ,CAAC;IAqEH,0BAAC;AAAD,CAAC,AA5FD,IA4FC;AA5FY,kDAAmB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class Attention {
|
|
2
|
+
constructor(oTracker: any);
|
|
3
|
+
totalAttentionTime: number;
|
|
4
|
+
startAttentionTime: any;
|
|
5
|
+
endAttentionTime: any;
|
|
6
|
+
hasSentEvent: boolean;
|
|
7
|
+
oTracker: any;
|
|
8
|
+
init(): void;
|
|
9
|
+
startAttention(): void;
|
|
10
|
+
attentionTimeout: number | undefined;
|
|
11
|
+
startConstantAttention(): void;
|
|
12
|
+
constantAttentionInterval: number | undefined;
|
|
13
|
+
endConstantAttention(): void;
|
|
14
|
+
endAttention(): void;
|
|
15
|
+
get(): number;
|
|
16
|
+
addVideoEvents(): void;
|
|
17
|
+
videoPlayers: HTMLCollectionOf<HTMLVideoElement> | undefined;
|
|
18
|
+
handleVisibilityChange(ev: any): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=attention.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attention.d.ts","sourceRoot":"","sources":["../../src/utils/attention.js"],"names":[],"mappings":"AAiBA;IAOE,2BAGC;IATD,2BAAuB;IACvB,wBAAmB;IACnB,sBAAiB;IACjB,sBAAqB;IACrB,cAAS;IAOT,aA2CC;IAED,uBASC;IAJC,qCAGC;IAGH,+BAKC;IAJC,8CAGC;IAGH,6BAGC;IAED,qBASC;IAED,cAKC;IAED,uBAaC;IAZC,6DAA0D;IAc5D,sCAMC;CACF"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Attention = void 0;
|
|
27
|
+
var oViewport = __importStar(require("@financial-times/o-viewport"));
|
|
28
|
+
var ATTENTION_INTERVAL = 15000;
|
|
29
|
+
var ATTENTION_EVENTS = [
|
|
30
|
+
"load",
|
|
31
|
+
"click",
|
|
32
|
+
"focus",
|
|
33
|
+
"scroll",
|
|
34
|
+
"mousemove",
|
|
35
|
+
"touchstart",
|
|
36
|
+
"touchend",
|
|
37
|
+
"touchcancel",
|
|
38
|
+
"touchleave",
|
|
39
|
+
];
|
|
40
|
+
var UNATTENTION_EVENTS = ["blur"];
|
|
41
|
+
var EXIT_EVENTS = ["beforeunload", "unload", "pagehide"];
|
|
42
|
+
var Attention = /** @class */ (function () {
|
|
43
|
+
function Attention(oTracker) {
|
|
44
|
+
this.totalAttentionTime = 0;
|
|
45
|
+
this.hasSentEvent = false;
|
|
46
|
+
this.oTracker = oTracker;
|
|
47
|
+
this.init();
|
|
48
|
+
}
|
|
49
|
+
Attention.prototype.init = function () {
|
|
50
|
+
var _this = this;
|
|
51
|
+
//Add events for all the other Attention events
|
|
52
|
+
for (var i = 0; i < ATTENTION_EVENTS.length; i++) {
|
|
53
|
+
window.addEventListener(ATTENTION_EVENTS[i], function (ev) {
|
|
54
|
+
return _this.startAttention(ev);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
for (var i = 0; i < UNATTENTION_EVENTS.length; i++) {
|
|
58
|
+
window.addEventListener(UNATTENTION_EVENTS[i], function (ev) {
|
|
59
|
+
return _this.endAttention(ev);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
// Need to wait for this to be available
|
|
63
|
+
oViewport.listenTo("visibility");
|
|
64
|
+
document.body.addEventListener("oViewport.visibility", function (ev) { return _this.handleVisibilityChange(ev); }, false);
|
|
65
|
+
this.addVideoEvents();
|
|
66
|
+
// Add event to send data on unload
|
|
67
|
+
EXIT_EVENTS.forEach(function (event) {
|
|
68
|
+
window.addEventListener(event, function () {
|
|
69
|
+
if (_this.hasSentEvent) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
_this.hasSentEvent = true;
|
|
73
|
+
_this.endAttention();
|
|
74
|
+
_this.oTracker.eventDispatcher({
|
|
75
|
+
category: "page",
|
|
76
|
+
action: "interaction",
|
|
77
|
+
context: {
|
|
78
|
+
attention: {
|
|
79
|
+
total: _this.totalAttentionTime,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
Attention.prototype.startAttention = function () {
|
|
87
|
+
var _this = this;
|
|
88
|
+
clearTimeout(this.attentionTimeout);
|
|
89
|
+
if (!this.startAttentionTime) {
|
|
90
|
+
this.startAttentionTime = new Date().getTime();
|
|
91
|
+
}
|
|
92
|
+
this.attentionTimeout = setTimeout(function () { return _this.endAttention(); }, ATTENTION_INTERVAL);
|
|
93
|
+
};
|
|
94
|
+
Attention.prototype.startConstantAttention = function () {
|
|
95
|
+
var _this = this;
|
|
96
|
+
this.constantAttentionInterval = setInterval(function () { return _this.startAttention(); }, ATTENTION_INTERVAL);
|
|
97
|
+
};
|
|
98
|
+
Attention.prototype.endConstantAttention = function () {
|
|
99
|
+
this.endAttention();
|
|
100
|
+
clearInterval(this.constantAttentionInterval);
|
|
101
|
+
};
|
|
102
|
+
Attention.prototype.endAttention = function () {
|
|
103
|
+
if (this.startAttentionTime) {
|
|
104
|
+
this.endAttentionTime = new Date().getTime();
|
|
105
|
+
this.totalAttentionTime += Math.round((this.endAttentionTime - this.startAttentionTime) / 1000);
|
|
106
|
+
clearTimeout(this.attentionTimeout);
|
|
107
|
+
this.startAttentionTime = null;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
Attention.prototype.get = function () {
|
|
111
|
+
//getter should restart attention capturing as endAttention updates the value:
|
|
112
|
+
this.endAttention();
|
|
113
|
+
this.startAttention();
|
|
114
|
+
return this.totalAttentionTime;
|
|
115
|
+
};
|
|
116
|
+
Attention.prototype.addVideoEvents = function () {
|
|
117
|
+
var _this = this;
|
|
118
|
+
this.videoPlayers = document.getElementsByTagName("video");
|
|
119
|
+
for (var i = 0; i < this.videoPlayers.length; i++) {
|
|
120
|
+
this.videoPlayers[i].addEventListener("playing", function (ev) {
|
|
121
|
+
return _this.startConstantAttention(ev);
|
|
122
|
+
});
|
|
123
|
+
this.videoPlayers[i].addEventListener("pause", function (ev) {
|
|
124
|
+
return _this.endConstantAttention(ev);
|
|
125
|
+
});
|
|
126
|
+
this.videoPlayers[i].addEventListener("ended", function (ev) {
|
|
127
|
+
return _this.endConstantAttention(ev);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
Attention.prototype.handleVisibilityChange = function (ev) {
|
|
132
|
+
if (ev.detail.hidden) {
|
|
133
|
+
this.endAttention();
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
this.startAttention();
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
return Attention;
|
|
140
|
+
}());
|
|
141
|
+
exports.Attention = Attention;
|
|
142
|
+
//# sourceMappingURL=attention.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attention.js","sourceRoot":"","sources":["../../src/utils/attention.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAAyD;AAEzD,IAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,IAAM,gBAAgB,GAAG;IACvB,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,UAAU;IACV,aAAa;IACb,YAAY;CACb,CAAC;AACF,IAAM,kBAAkB,GAAG,CAAC,MAAM,CAAC,CAAC;AACpC,IAAM,WAAW,GAAG,CAAC,cAAc,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAE3D;IAOE,mBAAY,QAAQ;QANpB,uBAAkB,GAAG,CAAC,CAAC;QAGvB,iBAAY,GAAG,KAAK,CAAC;QAInB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,wBAAI,GAAJ;QAAA,iBA2CC;QA1CC,+CAA+C;QAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAChD,MAAM,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,UAAC,EAAE;gBAC9C,OAAA,KAAI,CAAC,cAAc,CAAC,EAAE,CAAC;YAAvB,CAAuB,CACxB,CAAC;SACH;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAClD,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,UAAC,EAAE;gBAChD,OAAA,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OAAA,KAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC;YAA7B,CAA6B,CAC9B,CAAC;YACF,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAC,EAAE;gBAChD,OAAA,KAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC;YAA7B,CAA6B,CAC9B,CAAC;SACH;IACH,CAAC;IAED,0CAAsB,GAAtB,UAAuB,EAAE;QACvB,IAAI,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;YACpB,IAAI,CAAC,YAAY,EAAE,CAAC;SACrB;aAAM;YACL,IAAI,CAAC,cAAc,EAAE,CAAC;SACvB;IACH,CAAC;IACH,gBAAC;AAAD,CAAC,AAxHD,IAwHC;AAxHY,8BAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookies.d.ts","sourceRoot":"","sources":["../../src/utils/cookies.js"],"names":[],"mappings":"AAAA,4EAQC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getValueFromCookie = void 0;
|
|
4
|
+
function getValueFromCookie(matcher) {
|
|
5
|
+
if (typeof document !== "undefined") {
|
|
6
|
+
return document.cookie.match(matcher) &&
|
|
7
|
+
RegExp.$1 !== "" &&
|
|
8
|
+
RegExp.$1 !== "null"
|
|
9
|
+
? RegExp.$1
|
|
10
|
+
: null;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.getValueFromCookie = getValueFromCookie;
|
|
14
|
+
//# sourceMappingURL=cookies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookies.js","sourceRoot":"","sources":["../../src/utils/cookies.js"],"names":[],"mappings":";;;AAAA,SAAgB,kBAAkB,CAAC,OAAO;IACxC,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QACnC,OAAO,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;YACnC,MAAM,CAAC,EAAE,KAAK,EAAE;YAChB,MAAM,CAAC,EAAE,KAAK,MAAM;YACpB,CAAC,CAAC,MAAM,CAAC,EAAE;YACX,CAAC,CAAC,IAAI,CAAC;KACV;AACH,CAAC;AARD,gDAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTrace.d.ts","sourceRoot":"","sources":["../../src/utils/getTrace.js"],"names":[],"mappings":";AAwFA;;;EA+BC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function sanitise(str) {
|
|
4
|
+
return typeof str === "string" ? str.trim() : str;
|
|
5
|
+
}
|
|
6
|
+
function assignIfUndefined(subject, target) {
|
|
7
|
+
for (var prop in subject) {
|
|
8
|
+
if (!target[prop]) {
|
|
9
|
+
target[prop] = subject[prop];
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
console.warn("You can't set a custom property called ".concat(prop));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
var elementPropertiesToCollect = [
|
|
17
|
+
"nodeName",
|
|
18
|
+
"className",
|
|
19
|
+
"id",
|
|
20
|
+
"href",
|
|
21
|
+
"text",
|
|
22
|
+
"role",
|
|
23
|
+
];
|
|
24
|
+
// For a given container element, get the number of elements that match the
|
|
25
|
+
// original element (siblings); and the index of the original element (position).
|
|
26
|
+
var getSiblingsAndPosition = function (el, originalEl, selector) {
|
|
27
|
+
var siblings = Array.from(el.querySelectorAll(selector));
|
|
28
|
+
var position = siblings.findIndex(function (item) { return item === originalEl; });
|
|
29
|
+
if (position === -1) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
siblings: siblings.length,
|
|
34
|
+
position: position,
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
// Get all (sanitised) properties of a given element.
|
|
38
|
+
var getAllElementProperties = function (el) {
|
|
39
|
+
return elementPropertiesToCollect.reduce(function (returnObject, property) {
|
|
40
|
+
if (el[property]) {
|
|
41
|
+
returnObject[property] = sanitise(el[property]);
|
|
42
|
+
}
|
|
43
|
+
else if (el.getAttribute(property)) {
|
|
44
|
+
returnObject[property] = sanitise(el.getAttribute(property));
|
|
45
|
+
}
|
|
46
|
+
else if (el.hasAttribute(property)) {
|
|
47
|
+
returnObject[property] = el.hasAttribute(property);
|
|
48
|
+
}
|
|
49
|
+
return returnObject;
|
|
50
|
+
}, {});
|
|
51
|
+
};
|
|
52
|
+
// Get some properties of a given element.
|
|
53
|
+
var getDomPathProps = function (attrs, props) {
|
|
54
|
+
// Collect any attribute that matches given strings.
|
|
55
|
+
attrs
|
|
56
|
+
.filter(function (attribute) {
|
|
57
|
+
return attribute.name.match(/^data-trackable|^data-o-|^aria-/i);
|
|
58
|
+
})
|
|
59
|
+
.forEach(function (attribute) {
|
|
60
|
+
props[attribute.name] = attribute.value;
|
|
61
|
+
});
|
|
62
|
+
return props;
|
|
63
|
+
};
|
|
64
|
+
// Get only the custom data-trackable-context-? properties of a given element
|
|
65
|
+
var getContextProps = function (attrs, props, isOriginalEl) {
|
|
66
|
+
var customProps = {};
|
|
67
|
+
// for the original element collect properties like className, nodeName
|
|
68
|
+
if (isOriginalEl) {
|
|
69
|
+
elementPropertiesToCollect.forEach(function (name) {
|
|
70
|
+
if (typeof props[name] !== "undefined" && name !== "id") {
|
|
71
|
+
customProps[name] = props[name];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
// Collect any attribute that matches given strings.
|
|
76
|
+
attrs
|
|
77
|
+
.filter(function (attribute) { return attribute.name.match(/^data-trackable-context-/i); })
|
|
78
|
+
.forEach(function (attribute) {
|
|
79
|
+
customProps[attribute.name.replace("data-trackable-context-", "")] =
|
|
80
|
+
attribute.value;
|
|
81
|
+
});
|
|
82
|
+
return customProps;
|
|
83
|
+
};
|
|
84
|
+
function getTrace(el) {
|
|
85
|
+
var rootEl = document;
|
|
86
|
+
var originalEl = el;
|
|
87
|
+
var selector = originalEl.getAttribute("data-trackable")
|
|
88
|
+
? "[data-trackable=\"".concat(originalEl.getAttribute("data-trackable"), "\"]")
|
|
89
|
+
: originalEl.nodeName;
|
|
90
|
+
var trace = [];
|
|
91
|
+
var customContext = {};
|
|
92
|
+
while (el && el !== rootEl) {
|
|
93
|
+
var props = getAllElementProperties(el);
|
|
94
|
+
var attrs = Array.from(el.attributes);
|
|
95
|
+
var domPathProps = getDomPathProps(attrs, props);
|
|
96
|
+
// If the element happens to have a data-trackable attribute, get the siblings
|
|
97
|
+
// and position of the element (relative to the current element).
|
|
98
|
+
if (domPathProps["data-trackable"]) {
|
|
99
|
+
domPathProps = Object.assign(domPathProps, getSiblingsAndPosition(el, originalEl, selector));
|
|
100
|
+
}
|
|
101
|
+
trace.push(domPathProps);
|
|
102
|
+
var contextProps = getContextProps(attrs, props, el === originalEl);
|
|
103
|
+
assignIfUndefined(contextProps, customContext);
|
|
104
|
+
el = el.parentNode;
|
|
105
|
+
}
|
|
106
|
+
return { trace: trace, customContext: customContext };
|
|
107
|
+
}
|
|
108
|
+
exports.default = getTrace;
|
|
109
|
+
//# sourceMappingURL=getTrace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTrace.js","sourceRoot":"","sources":["../../src/utils/getTrace.js"],"names":[],"mappings":";;AAAA,SAAS,QAAQ,CAAC,GAAG;IACnB,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AACpD,CAAC;AAED,SAAS,iBAAiB,CAAC,OAAO,EAAE,MAAM;IACxC,KAAK,IAAM,IAAI,IAAI,OAAO,EAAE;QAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YACjB,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,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verPolyfill.d.ts","sourceRoot":"","sources":["../../src/utils/intersectionObserverPolyfill.js"],"names":[],"mappings":""}
|