@phantomstudios/ft-lib 0.4.1-rc1 → 0.5.0-rc10
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/.github/CODEOWNERS +1 -1
- package/.github/dependabot.yml +11 -0
- package/.github/workflows/pr.yml +4 -1
- package/.github/workflows/release.yml +9 -2
- package/.nvmrc +1 -1
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTING.md +3 -5
- package/SUPPORT.md +3 -3
- package/eslint.config.mjs +91 -0
- package/jest.config.js +1 -6
- package/lib/FTTracking/index.d.ts +3 -0
- package/lib/FTTracking/index.d.ts.map +1 -1
- package/lib/FTTracking/index.js +14 -1
- package/lib/FTTracking/index.js.map +1 -1
- package/lib/cmp/loadFtCmp.d.ts +3 -0
- package/lib/cmp/loadFtCmp.d.ts.map +1 -0
- package/lib/cmp/loadFtCmp.js +31 -0
- package/lib/cmp/loadFtCmp.js.map +1 -0
- package/lib/consentMonitor/index.d.ts +12 -12
- package/lib/consentMonitor/index.d.ts.map +1 -1
- package/lib/consentMonitor/index.js +111 -68
- package/lib/consentMonitor/index.js.map +1 -1
- package/lib/gaTracker/index.js +1 -2
- package/lib/gaTracker/index.js.map +1 -1
- package/lib/index.d.ts +7 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -4
- package/lib/index.js.map +1 -1
- package/lib/oTracker/index.js.map +1 -1
- package/lib/permutiveVideoUtils/index.d.ts.map +1 -1
- package/lib/permutiveVideoUtils/index.js +1 -1
- package/lib/permutiveVideoUtils/index.js.map +1 -1
- package/lib/reactPlayerTracking/index.d.ts.map +1 -1
- package/lib/reactPlayerTracking/index.js +1 -1
- package/lib/reactPlayerTracking/index.js.map +1 -1
- package/lib/utils/attention.js.map +1 -1
- package/lib/utils/cookies.js +1 -2
- package/lib/utils/cookies.js.map +1 -1
- package/lib/utils/getTrace.js.map +1 -1
- package/lib/utils/intersectionObserverPolyfill.d.ts +1 -0
- package/lib/utils/intersectionObserverPolyfill.js +1 -0
- package/lib/utils/intersectionObserverPolyfill.js.map +1 -1
- package/lib/utils/scroll.js.map +1 -1
- package/lib/utils/yupValidator.d.ts.map +1 -1
- package/lib/utils/yupValidator.js +2 -2
- package/lib/utils/yupValidator.js.map +1 -1
- package/lib/ytIframeTracking/index.d.ts +0 -1
- package/lib/ytIframeTracking/index.d.ts.map +1 -1
- package/lib/ytIframeTracking/index.js.map +1 -1
- package/package.json +27 -17
- package/src/FTTracking/index.ts +21 -4
- package/src/cmp/loadFtCmp.ts +28 -0
- package/src/consentMonitor/index.ts +108 -85
- package/src/gaTracker/index.ts +4 -4
- package/src/index.ts +10 -3
- package/src/oTracker/index.ts +5 -5
- package/src/permutiveVideoUtils/index.ts +2 -2
- package/src/reactPlayerTracking/index.ts +4 -4
- package/src/types.d.ts +24 -5
- package/src/utils/attention.js +9 -9
- package/src/utils/getTrace.js +2 -2
- package/src/utils/scroll.ts +2 -2
- package/src/utils/yupValidator.ts +6 -6
- package/src/ytIframeTracking/index.ts +9 -9
- package/test/index.test.tsx +13 -12
- package/tsconfig.json +3 -1
- package/.eslintrc +0 -58
package/.github/CODEOWNERS
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
* @
|
|
1
|
+
* @JPedersen @DhiaPhntm
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "npm" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "monthly"
|
package/.github/workflows/pr.yml
CHANGED
|
@@ -8,9 +8,12 @@ jobs:
|
|
|
8
8
|
test:
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
11
14
|
strategy:
|
|
12
15
|
matrix:
|
|
13
|
-
node-version: [
|
|
16
|
+
node-version: [18.x, 20.x, 22.x]
|
|
14
17
|
|
|
15
18
|
steps:
|
|
16
19
|
- uses: actions/checkout@v1
|
|
@@ -32,11 +35,15 @@ jobs:
|
|
|
32
35
|
publish-npm:
|
|
33
36
|
needs: test
|
|
34
37
|
runs-on: ubuntu-latest
|
|
38
|
+
|
|
39
|
+
permissions:
|
|
40
|
+
contents: read
|
|
41
|
+
|
|
35
42
|
steps:
|
|
36
43
|
- uses: actions/checkout@v2
|
|
37
44
|
- uses: actions/setup-node@v1
|
|
38
45
|
with:
|
|
39
|
-
node-version:
|
|
46
|
+
node-version: 22
|
|
40
47
|
registry-url: https://registry.npmjs.org/
|
|
41
48
|
- run: npm ci
|
|
42
49
|
- run: npm publish --access=public
|
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v18.18.0
|
package/CODE_OF_CONDUCT.md
CHANGED
|
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|
|
55
55
|
## Enforcement
|
|
56
56
|
|
|
57
57
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported by contacting the project team at developers@
|
|
58
|
+
reported by contacting the project team at developers@phantom.agency. All
|
|
59
59
|
complaints will be reviewed and investigated and will result in a response that
|
|
60
60
|
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
61
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -4,7 +4,7 @@ I'm really happy that you're interested in helping out with this little project.
|
|
|
4
4
|
|
|
5
5
|
As this is very early days for the project there's not a lot in the way of
|
|
6
6
|
resources, but please check out the [documentation](./README.md), and also the
|
|
7
|
-
[list of issues](https://github.com/phantomstudios
|
|
7
|
+
[list of issues](https://github.com/phantomstudios/ft-lib/issues).
|
|
8
8
|
|
|
9
9
|
Please submit an issue if you need help with anything.
|
|
10
10
|
|
|
@@ -20,7 +20,7 @@ pass. Testing is automated using GitHub Actions CI.
|
|
|
20
20
|
## Submitting changes
|
|
21
21
|
|
|
22
22
|
Please send a
|
|
23
|
-
[GitHub Pull Request to @
|
|
23
|
+
[GitHub Pull Request to @phantomstudios/ft-lib](https://github.com/phantomstudios/ft-lib/pull/new/master)
|
|
24
24
|
with a clear list of what you've done (read more about
|
|
25
25
|
[pull requests](https://help.github.com/en/articles/about-pull-requests)). When you send a pull
|
|
26
26
|
request, please make sure you've covered off all the points in the template.
|
|
@@ -43,6 +43,4 @@ In effect this means:
|
|
|
43
43
|
- Your Pull Request title and description become very important; they are the
|
|
44
44
|
history of the master branch and explain all the changes.
|
|
45
45
|
- You ought to be able to find any previous version easily using GitHub tabs, or
|
|
46
|
-
[Releases](https://github.com/phantomstudios
|
|
47
|
-
|
|
48
|
-
Thanks, John Chipps-Harding
|
|
46
|
+
[Releases](https://github.com/phantomstudios/ft-lib/releases)
|
package/SUPPORT.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @phantomstudios/ft-lib Support
|
|
2
2
|
|
|
3
|
-
For _questions_ on how to use `@
|
|
4
|
-
[GitHub Issue](https://github.com/phantomstudios
|
|
3
|
+
For _questions_ on how to use `@phantomstudios/ft-lib` or what went wrong when you tried something, our primary resource is by opening a
|
|
4
|
+
[GitHub Issue](https://github.com/phantomstudios/ft-lib/issues), where you can get help from developers.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineConfig } from "eslint/config";
|
|
2
|
+
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
|
|
3
|
+
import prettier from "eslint-plugin-prettier";
|
|
4
|
+
import _import from "eslint-plugin-import";
|
|
5
|
+
import globals from "globals";
|
|
6
|
+
import tsParser from "@typescript-eslint/parser";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import js from "@eslint/js";
|
|
10
|
+
import { FlatCompat } from "@eslint/eslintrc";
|
|
11
|
+
|
|
12
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
+
const __dirname = path.dirname(__filename);
|
|
14
|
+
const compat = new FlatCompat({
|
|
15
|
+
baseDirectory: __dirname,
|
|
16
|
+
recommendedConfig: js.configs.recommended,
|
|
17
|
+
allConfig: js.configs.all
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export default defineConfig([{
|
|
21
|
+
ignores: [
|
|
22
|
+
"src/utils/intersectionObserverPolyfill.js",
|
|
23
|
+
],
|
|
24
|
+
|
|
25
|
+
extends: fixupConfigRules(compat.extends(
|
|
26
|
+
"plugin:react/recommended",
|
|
27
|
+
"plugin:react-hooks/recommended",
|
|
28
|
+
"plugin:@typescript-eslint/recommended",
|
|
29
|
+
"plugin:prettier/recommended",
|
|
30
|
+
)),
|
|
31
|
+
|
|
32
|
+
plugins: {
|
|
33
|
+
prettier: fixupPluginRules(prettier),
|
|
34
|
+
import: fixupPluginRules(_import),
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
languageOptions: {
|
|
38
|
+
globals: {
|
|
39
|
+
...globals.browser,
|
|
40
|
+
...globals.node,
|
|
41
|
+
...globals.jest,
|
|
42
|
+
React: "writable",
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
parser: tsParser,
|
|
46
|
+
ecmaVersion: 5,
|
|
47
|
+
sourceType: "commonjs",
|
|
48
|
+
|
|
49
|
+
parserOptions: {
|
|
50
|
+
jsx: true,
|
|
51
|
+
useJSXTextNode: true,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
settings: {
|
|
56
|
+
react: {
|
|
57
|
+
version: "detect",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
rules: {
|
|
62
|
+
"react-hooks/rules-of-hooks": "error",
|
|
63
|
+
"react-hooks/exhaustive-deps": "error",
|
|
64
|
+
"react/react-in-jsx-scope": "off",
|
|
65
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
66
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
67
|
+
"@typescript-eslint/ban-ts-comment": "off",
|
|
68
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
69
|
+
"react/prop-types": "off",
|
|
70
|
+
|
|
71
|
+
"import/order": ["error", {
|
|
72
|
+
groups: ["builtin", "external", "internal"],
|
|
73
|
+
|
|
74
|
+
pathGroups: [{
|
|
75
|
+
pattern: "react",
|
|
76
|
+
group: "external",
|
|
77
|
+
position: "before",
|
|
78
|
+
}],
|
|
79
|
+
|
|
80
|
+
pathGroupsExcludedImportTypes: ["react"],
|
|
81
|
+
"newlines-between": "always",
|
|
82
|
+
|
|
83
|
+
alphabetize: {
|
|
84
|
+
order: "asc",
|
|
85
|
+
caseInsensitive: true,
|
|
86
|
+
},
|
|
87
|
+
}],
|
|
88
|
+
|
|
89
|
+
"prettier/prettier": "error",
|
|
90
|
+
},
|
|
91
|
+
}]);
|
package/jest.config.js
CHANGED
|
@@ -6,7 +6,7 @@ module.exports = {
|
|
|
6
6
|
'<rootDir>/test'
|
|
7
7
|
],
|
|
8
8
|
transform: {
|
|
9
|
-
'^.+\\.tsx?$': 'ts-jest'
|
|
9
|
+
'^.+\\.tsx?$': ['ts-jest', {tsconfig: 'tsconfig.test.json'}]
|
|
10
10
|
},
|
|
11
11
|
moduleFileExtensions: [
|
|
12
12
|
'ts',
|
|
@@ -16,9 +16,4 @@ module.exports = {
|
|
|
16
16
|
'json',
|
|
17
17
|
'node'
|
|
18
18
|
],
|
|
19
|
-
globals: {
|
|
20
|
-
'ts-jest': {
|
|
21
|
-
tsConfig: 'tsconfig.test.json'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
19
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConsentMonitor } from "../consentMonitor";
|
|
1
2
|
import { gaTracker } from "../gaTracker";
|
|
2
3
|
import { oTracker } from "../oTracker";
|
|
3
4
|
import { ScrollTracker } from "../utils/scroll";
|
|
@@ -18,12 +19,14 @@ export declare class FTTracking {
|
|
|
18
19
|
scrollTracker: ScrollTracker;
|
|
19
20
|
disableAppFormatTransform: boolean;
|
|
20
21
|
logValidationErrors: boolean;
|
|
22
|
+
consentMonitor: ConsentMonitor | undefined;
|
|
21
23
|
oEvent: (detail: OrigamiEventType) => void;
|
|
22
24
|
gaEvent: (category: string, action: string, label: string) => void;
|
|
23
25
|
gtmEvent: (category: string, action: string, label: string) => void;
|
|
24
26
|
constructor(config: ConfigType, options?: TrackingOptions);
|
|
25
27
|
set config(c: ConfigType);
|
|
26
28
|
get config(): ConfigType;
|
|
29
|
+
initializeConsentMonitor: () => ConsentMonitor;
|
|
27
30
|
newPageView(config: ConfigType): void;
|
|
28
31
|
}
|
|
29
32
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FTTracking/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FTTracking/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,UAAU,EACV,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,eAAe;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AASD,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAAa;IAC5B,OAAO,EAAE,eAAe,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC;IAC7B,yBAAyB,EAAE,OAAO,CAAC;IACnC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,cAAc,EAAE,cAAc,GAAG,SAAS,CAAC;IAC3C,MAAM,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;gBAExD,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,eAAe;IA2BzD,IAAI,MAAM,CAAC,CAAC,EAAE,UAAU,EAGvB;IACD,IAAI,MAAM,IAJI,UAAU,CAMvB;IAED,wBAAwB,uBAQtB;IAEK,WAAW,CAAC,MAAM,EAAE,UAAU;CAkBtC"}
|
package/lib/FTTracking/index.js
CHANGED
|
@@ -25,6 +25,16 @@ var DEFAULT_OPTIONS = {
|
|
|
25
25
|
};
|
|
26
26
|
var FTTracking = /** @class */ (function () {
|
|
27
27
|
function FTTracking(config, options) {
|
|
28
|
+
var _this = this;
|
|
29
|
+
this.initializeConsentMonitor = function () {
|
|
30
|
+
if (!_this.consentMonitor) {
|
|
31
|
+
_this.consentMonitor = new consentMonitor_1.ConsentMonitor(window.location.hostname, [
|
|
32
|
+
".app",
|
|
33
|
+
"preview",
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
36
|
+
return _this.consentMonitor;
|
|
37
|
+
};
|
|
28
38
|
this.options = __assign(__assign({}, DEFAULT_OPTIONS), options);
|
|
29
39
|
this.oTracker = new oTracker_1.oTracker(config, this.options);
|
|
30
40
|
this.gaTracker = new gaTracker_1.gaTracker(this.options);
|
|
@@ -41,7 +51,10 @@ var FTTracking = /** @class */ (function () {
|
|
|
41
51
|
this.scrollTracker = new scroll_1.ScrollTracker(this);
|
|
42
52
|
//cookie consent monitor for permutive tracking
|
|
43
53
|
window.addEventListener("load", function () {
|
|
44
|
-
new consentMonitor_1.
|
|
54
|
+
_this.consentMonitor = new consentMonitor_1.ConsentMonitor(window.location.hostname, [
|
|
55
|
+
".app",
|
|
56
|
+
"preview",
|
|
57
|
+
]);
|
|
45
58
|
});
|
|
46
59
|
}
|
|
47
60
|
Object.defineProperty(FTTracking.prototype, "config", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/FTTracking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/FTTracking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,oDAG2B;AAC3B,0CAAyC;AACzC,wCAAuC;AACvC,0CAAgD;AAChD,sDAI+B;AAW/B,IAAM,eAAe,GAAG;IACtB,qBAAqB,EAAE,mBAAmB;IAC1C,gBAAgB,EAAE,IAAI;IACtB,iBAAiB,EAAE,IAAI;IACvB,kBAAkB,EAAE,IAAI;CACzB,CAAC;AAEF;IAaE,oBAAY,MAAkB,EAAE,OAAyB;QAAzD,iBA0BC;QASD,6BAAwB,GAAG;YACzB,IAAI,CAAC,KAAI,CAAC,cAAc,EAAE,CAAC;gBACzB,KAAI,CAAC,cAAc,GAAG,IAAI,+BAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE;oBACjE,MAAM;oBACN,SAAS;iBACV,CAAC,CAAC;YACL,CAAC;Y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AAC;YACjB,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QAC3B,CAAC;;;OAAA;IAeM,gCAAW,GAAlB,UAAmB,MAAkB;QACnC,+EAA+E;QAC/E,IAAA,6BAAc,EACZ,MAAM,EACN,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,mBAAmB,CACzB,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC;QAClC,IAAI,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC;YACpC,IAAI,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC;QAC1C,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;YACnC,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxE,CAAC;QACD,mDAAmD;IACrD,CAAC;IACH,iBAAC;AAAD,CAAC,AA5ED,IA4EC;AA5EY,gCAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadFtCmp.d.ts","sourceRoot":"","sources":["../../src/cmp/loadFtCmp.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAoB/C;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAKvD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadFtCmpScript = loadFtCmpScript;
|
|
4
|
+
exports.enqueueCmpCallback = enqueueCmpCallback;
|
|
5
|
+
function loadFtCmpScript() {
|
|
6
|
+
if (document.getElementById("ft-cmp-loader")) {
|
|
7
|
+
return Promise.resolve();
|
|
8
|
+
}
|
|
9
|
+
return new Promise(function (resolve, reject) {
|
|
10
|
+
var script = document.createElement("script");
|
|
11
|
+
script.id = "ft-cmp-loader";
|
|
12
|
+
script.async = true;
|
|
13
|
+
script.src = "https://consent-notice.ft.com/cmp.js";
|
|
14
|
+
script.referrerPolicy = window.location.hostname.endsWith(".ft.com")
|
|
15
|
+
? "" // production hosts
|
|
16
|
+
: "no-referrer-when-downgrade"; // localhost / preview
|
|
17
|
+
script.onload = function () { return resolve(); };
|
|
18
|
+
script.onerror = function () {
|
|
19
|
+
return reject(new Error("Sourcepoint CMP script failed to load"));
|
|
20
|
+
};
|
|
21
|
+
document.head.appendChild(script);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function enqueueCmpCallback(cb) {
|
|
25
|
+
if (!window._sp_)
|
|
26
|
+
window._sp_ = {};
|
|
27
|
+
if (!window._sp_queue)
|
|
28
|
+
window._sp_queue = [];
|
|
29
|
+
window._sp_queue.push(cb);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=loadFtCmp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadFtCmp.js","sourceRoot":"","sources":["../../src/cmp/loadFtCmp.ts"],"names":[],"mappings":";;AAAA,0CAoBC;AAED,gDAKC;AA3BD,SAAgB,eAAe;IAC7B,IAAI,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,CAAC;QAC7C,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,OAAO,IAAI,OAAO,CAAO,UAAC,OAAO,EAAE,MAAM;QACvC,IAAM,MAAM,GAAsB,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACnE,MAAM,CAAC,EAAE,GAAG,eAAe,CAAC;QAC5B,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;QACpB,MAAM,CAAC,GAAG,GAAG,sCAAsC,CAAC;QACpD,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC;YAClE,CAAC,CAAC,EAAE,CAAC,mBAAmB;YACxB,CAAC,CAAC,4BAA4B,CAAC,CAAC,sBAAsB;QAExD,MAAM,CAAC,MAAM,GAAG,cAAM,OAAA,OAAO,EAAE,EAAT,CAAS,CAAC;QAChC,MAAM,CAAC,OAAO,GAAG;YACf,OAAA,MAAM,CAAC,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAA1D,CAA0D,CAAC;QAE7D,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,kBAAkB,CAAC,EAAc;IAC/C,IAAI,CAAC,MAAM,CAAC,IAAI;QAAE,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;IACnC,IAAI,CAAC,MAAM,CAAC,SAAS;QAAE,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;IAE7C,MAAM,CAAC,SAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export declare class
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
protected _isInitialized: boolean;
|
|
7
|
-
constructor(hostname?: string, devHosts?: string[] | string);
|
|
1
|
+
export declare class ConsentMonitor {
|
|
2
|
+
private _consent;
|
|
3
|
+
private _devHosts;
|
|
4
|
+
private _isDevEnvironment;
|
|
5
|
+
private _isInitialized;
|
|
8
6
|
get consent(): boolean;
|
|
9
|
-
get devHosts(): string[]
|
|
7
|
+
get devHosts(): string[];
|
|
10
8
|
get isDevEnvironment(): boolean;
|
|
11
9
|
get isInitialized(): boolean;
|
|
10
|
+
get userHasConsented(): boolean;
|
|
12
11
|
getCookieValue: (name: string) => string;
|
|
13
|
-
|
|
12
|
+
constructor(hostname?: string, devHosts?: string[] | string);
|
|
13
|
+
private attachCmpListeners;
|
|
14
|
+
private enablePermutive;
|
|
15
|
+
private disablePermutive;
|
|
14
16
|
cookieConsentTest: () => void;
|
|
15
|
-
setDevCookieHandler: () => void;
|
|
16
|
-
permutiveConsentOn: () => void;
|
|
17
|
-
permutiveConsentOff: () => void;
|
|
18
17
|
}
|
|
18
|
+
export { ConsentMonitor as consentMonitor };
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/consentMonitor/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/consentMonitor/index.ts"],"names":[],"mappings":"AA2BA,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,cAAc,CAAS;IAE/B,IAAW,OAAO,IAAI,OAAO,CAE5B;IACD,IAAW,QAAQ,IAAI,MAAM,EAAE,CAE9B;IACD,IAAW,gBAAgB,IAAI,OAAO,CAErC;IACD,IAAW,aAAa,IAAI,OAAO,CAElC;IAED,IAAW,gBAAgB,IAAI,OAAO,CAErC;IAED,cAAc,GAAI,MAAM,MAAM,YACgD;gBAElE,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM;IA6B3D,OAAO,CAAC,kBAAkB;IAyB1B,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,gBAAgB;IAQxB,iBAAiB,aAcf;CACH;AAED,OAAO,EAAE,cAAc,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -1,117 +1,160 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
+
};
|
|
2
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
13
|
};
|
|
5
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.consentMonitor = void 0;
|
|
15
|
+
exports.consentMonitor = exports.ConsentMonitor = void 0;
|
|
16
|
+
var cmp_client_1 = require("@financial-times/cmp-client");
|
|
7
17
|
var debug_1 = __importDefault(require("debug"));
|
|
8
|
-
var
|
|
18
|
+
var loadFtCmp_1 = require("../cmp/loadFtCmp");
|
|
19
|
+
var debug = (0, debug_1.default)("@phantomstudios/ft-lib/consentMonitor");
|
|
9
20
|
var DEFAULT_DEV_HOSTS = ["localhost", "phq", ".app", "preview"];
|
|
10
|
-
var
|
|
11
|
-
|
|
21
|
+
var CMP_CHOICE_ACCEPT_ALL = 11;
|
|
22
|
+
var CMP_CHOICE_REJECT_ALL = 13;
|
|
23
|
+
var ConsentMonitor = /** @class */ (function () {
|
|
24
|
+
function ConsentMonitor(hostname, devHosts) {
|
|
12
25
|
var _this = this;
|
|
13
26
|
this._consent = false;
|
|
14
27
|
this._isDevEnvironment = false;
|
|
15
28
|
this._isInitialized = false;
|
|
16
29
|
this.getCookieValue = function (name) { var _a; return ((_a = document.cookie.match("(^|;)\\s*" + name + "\\s*=\\s*([^;]+)")) === null || _a === void 0 ? void 0 : _a.pop()) || ""; };
|
|
17
|
-
|
|
18
|
-
_this.cookieConsentTest();
|
|
19
|
-
setInterval(_this.cookieConsentTest, 3000);
|
|
20
|
-
//Simulate cookie consent behaviour in non-prod environments
|
|
21
|
-
_this._devHosts.map(function (devHost) {
|
|
22
|
-
return _this._hostname.includes(devHost) && _this.setDevCookieHandler();
|
|
23
|
-
});
|
|
24
|
-
};
|
|
30
|
+
//check for FTConsent - cookiesOnSite to trigger custom consent_update event for GTM tags (banner updated)
|
|
25
31
|
this.cookieConsentTest = function () {
|
|
26
|
-
if (window.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
_this._isInitialized = true;
|
|
35
|
-
}
|
|
36
|
-
else if (_this.getCookieValue("FTConsent").includes("behaviouraladsOnsite%3Aon") &&
|
|
37
|
-
!_this.consent) {
|
|
38
|
-
debug("setting permutive tracking consent: on");
|
|
39
|
-
_this.permutiveConsentOn();
|
|
40
|
-
}
|
|
41
|
-
else if (!_this.getCookieValue("FTConsent").includes("behaviouraladsOnsite%3Aon") &&
|
|
42
|
-
_this.consent) {
|
|
43
|
-
debug("setting permutive tracking consent: off");
|
|
44
|
-
_this.permutiveConsentOff();
|
|
45
|
-
}
|
|
32
|
+
if (!_this._isInitialized || !window || !window.dataLayer)
|
|
33
|
+
return;
|
|
34
|
+
if (_this.getCookieValue("FTConsent").includes("cookiesOnsite%3Aon")) {
|
|
35
|
+
//send consent_update event
|
|
36
|
+
window.dataLayer.push({
|
|
37
|
+
event: "consent_update",
|
|
38
|
+
consent: true,
|
|
39
|
+
});
|
|
46
40
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (oCookieMessage) {
|
|
53
|
-
var onCookieMessageAct_1 = function () {
|
|
54
|
-
debug("setting development FT consent cookies");
|
|
55
|
-
document.cookie = "FTConsent=behaviouraladsOnsite%3Aon";
|
|
56
|
-
document.cookie = "FTCookieConsentGDPR=true";
|
|
57
|
-
oCookieMessage.removeEventListener("oCookieMessage.act", onCookieMessageAct_1, false);
|
|
58
|
-
};
|
|
59
|
-
oCookieMessage.addEventListener("oCookieMessage.act", onCookieMessageAct_1);
|
|
41
|
+
else {
|
|
42
|
+
window.dataLayer.push({
|
|
43
|
+
event: "consent_update",
|
|
44
|
+
consent: false,
|
|
45
|
+
});
|
|
60
46
|
}
|
|
61
47
|
};
|
|
62
|
-
this.permutiveConsentOn = function () {
|
|
63
|
-
window.permutive.consent({
|
|
64
|
-
opt_in: true,
|
|
65
|
-
token: "behaviouraladsOnsite:on",
|
|
66
|
-
});
|
|
67
|
-
_this._consent = true;
|
|
68
|
-
};
|
|
69
|
-
this.permutiveConsentOff = function () {
|
|
70
|
-
window.permutive.consent({ opt_in: false });
|
|
71
|
-
_this._consent = false;
|
|
72
|
-
};
|
|
73
48
|
if (Array.isArray(devHosts)) {
|
|
74
|
-
this._devHosts = devHosts
|
|
49
|
+
this._devHosts = __spreadArray(__spreadArray([], devHosts, true), DEFAULT_DEV_HOSTS, true);
|
|
75
50
|
}
|
|
76
51
|
else if (devHosts === undefined) {
|
|
77
|
-
this._devHosts = DEFAULT_DEV_HOSTS;
|
|
52
|
+
this._devHosts = __spreadArray([], DEFAULT_DEV_HOSTS, true);
|
|
78
53
|
}
|
|
79
54
|
else {
|
|
80
|
-
this._devHosts = DEFAULT_DEV_HOSTS;
|
|
81
|
-
this._devHosts.push(devHosts);
|
|
55
|
+
this._devHosts = __spreadArray(__spreadArray([], DEFAULT_DEV_HOSTS, true), [devHosts], false);
|
|
82
56
|
}
|
|
83
|
-
|
|
84
|
-
this.
|
|
57
|
+
var hostToCheck = hostname !== null && hostname !== void 0 ? hostname : window.location.hostname;
|
|
58
|
+
this._isDevEnvironment = this._devHosts.some(function (h) {
|
|
59
|
+
return hostToCheck.includes(h);
|
|
60
|
+
});
|
|
61
|
+
(0, loadFtCmp_1.loadFtCmpScript)()
|
|
62
|
+
.then(function () {
|
|
63
|
+
_this.attachCmpListeners();
|
|
64
|
+
// const propertyConfig = window.location.hostname.endsWith("ft.com")
|
|
65
|
+
// ? properties["FT_DOTCOM_PROD"]
|
|
66
|
+
// : properties["FT_DOTCOM_TEST"];
|
|
67
|
+
// initialize CMP - duplicate?
|
|
68
|
+
//initSourcepointCmp({ propertyConfig });
|
|
69
|
+
// use cmp client lib to intercept footer 'Manage Cookies' links (opens privacy modal)
|
|
70
|
+
// Note, function requires very specific link: text = 'Manage Cookies' and href = 'https://ft.com/preferences/manage-cookies'
|
|
71
|
+
})
|
|
72
|
+
.catch(function (err) { return console.error(err); });
|
|
85
73
|
}
|
|
86
|
-
Object.defineProperty(
|
|
74
|
+
Object.defineProperty(ConsentMonitor.prototype, "consent", {
|
|
87
75
|
get: function () {
|
|
88
76
|
return this._consent;
|
|
89
77
|
},
|
|
90
78
|
enumerable: false,
|
|
91
79
|
configurable: true
|
|
92
80
|
});
|
|
93
|
-
Object.defineProperty(
|
|
81
|
+
Object.defineProperty(ConsentMonitor.prototype, "devHosts", {
|
|
94
82
|
get: function () {
|
|
95
83
|
return this._devHosts;
|
|
96
84
|
},
|
|
97
85
|
enumerable: false,
|
|
98
86
|
configurable: true
|
|
99
87
|
});
|
|
100
|
-
Object.defineProperty(
|
|
88
|
+
Object.defineProperty(ConsentMonitor.prototype, "isDevEnvironment", {
|
|
101
89
|
get: function () {
|
|
102
90
|
return this._isDevEnvironment;
|
|
103
91
|
},
|
|
104
92
|
enumerable: false,
|
|
105
93
|
configurable: true
|
|
106
94
|
});
|
|
107
|
-
Object.defineProperty(
|
|
95
|
+
Object.defineProperty(ConsentMonitor.prototype, "isInitialized", {
|
|
108
96
|
get: function () {
|
|
109
97
|
return this._isInitialized;
|
|
110
98
|
},
|
|
111
99
|
enumerable: false,
|
|
112
100
|
configurable: true
|
|
113
101
|
});
|
|
114
|
-
|
|
102
|
+
Object.defineProperty(ConsentMonitor.prototype, "userHasConsented", {
|
|
103
|
+
get: function () {
|
|
104
|
+
return this._consent;
|
|
105
|
+
},
|
|
106
|
+
enumerable: false,
|
|
107
|
+
configurable: true
|
|
108
|
+
});
|
|
109
|
+
ConsentMonitor.prototype.attachCmpListeners = function () {
|
|
110
|
+
var _this = this;
|
|
111
|
+
(0, loadFtCmp_1.enqueueCmpCallback)(function () {
|
|
112
|
+
var _a, _b, _d, _e;
|
|
113
|
+
var onReady = function (_l, _u, _t, info) {
|
|
114
|
+
debug("onConsentReady:", info);
|
|
115
|
+
if (info.consentedToAll) {
|
|
116
|
+
_this.enablePermutive();
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
_this.disablePermutive();
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
var onChoice = function (_l, _c, typeId) {
|
|
123
|
+
debug("onMessageChoiceSelect:", typeId);
|
|
124
|
+
if (typeId === CMP_CHOICE_ACCEPT_ALL)
|
|
125
|
+
_this.enablePermutive();
|
|
126
|
+
else if (typeId === CMP_CHOICE_REJECT_ALL)
|
|
127
|
+
_this.disablePermutive();
|
|
128
|
+
// banner updated - check new cookie value to fire consent_update event
|
|
129
|
+
setTimeout(_this.cookieConsentTest, 3000);
|
|
130
|
+
};
|
|
131
|
+
(_b = (_a = window._sp_).addEventListener) === null || _b === void 0 ? void 0 : _b.call(_a, "onConsentReady", onReady);
|
|
132
|
+
(_e = (_d = window._sp_).addEventListener) === null || _e === void 0 ? void 0 : _e.call(_d, "onMessageChoiceSelect", onChoice);
|
|
133
|
+
_this._isInitialized = true;
|
|
134
|
+
(0, cmp_client_1.interceptManageCookiesLinks)();
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
ConsentMonitor.prototype.enablePermutive = function () {
|
|
138
|
+
var _a;
|
|
139
|
+
if (this._consent)
|
|
140
|
+
return;
|
|
141
|
+
debug("Permutive consent: ON");
|
|
142
|
+
(_a = window.permutive) === null || _a === void 0 ? void 0 : _a.consent({
|
|
143
|
+
opt_in: true,
|
|
144
|
+
token: "behaviouraladsOnsite:on",
|
|
145
|
+
});
|
|
146
|
+
this._consent = true;
|
|
147
|
+
};
|
|
148
|
+
ConsentMonitor.prototype.disablePermutive = function () {
|
|
149
|
+
var _a;
|
|
150
|
+
if (!this._consent)
|
|
151
|
+
return;
|
|
152
|
+
debug("Permutive consent: OFF");
|
|
153
|
+
(_a = window.permutive) === null || _a === void 0 ? void 0 : _a.consent({ opt_in: false });
|
|
154
|
+
this._consent = false;
|
|
155
|
+
};
|
|
156
|
+
return ConsentMonitor;
|
|
115
157
|
}());
|
|
116
|
-
exports.
|
|
158
|
+
exports.ConsentMonitor = ConsentMonitor;
|
|
159
|
+
exports.consentMonitor = ConsentMonitor;
|
|
117
160
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/consentMonitor/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/consentMonitor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA0E;AAC1E,gDAA0B;AAE1B,8CAAuE;AAEvE,IAAM,KAAK,GAAG,IAAA,eAAK,EAAC,uCAAuC,CAAC,CAAC;AAE7D,IAAM,iBAAiB,GAAG,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AAiBlE,IAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,IAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC;IA0BE,wBAAY,QAAiB,EAAE,QAA4B;QAA3D,iBA2BC;QApDO,aAAQ,GAAG,KAAK,CAAC;QAEjB,sBAAiB,GAAG,KAAK,CAAC;QAC1B,mBAAc,GAAG,KAAK,CAAC;QAmB/B,mBAAc,GAAG,UAAC,IAAY,YAC5B,OAAA,CAAA,MAAA,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,GAAG,kBAAkB,CAAC,0CAAE,GAAG,EAAE,KAAI,EAAE,CAAA,EAAA,CAAC;QAyE9E,0GAA0G;QAC1G,sBAAiB,GAAG;YAClB,IAAI,CAAC,KAAI,CAAC,cAAc,IAAI,CAAC,MAAM,IAA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