@financial-times/cmp-client 0.0.0-backup.1

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 (78) hide show
  1. package/README.md +273 -0
  2. package/dist/index.cjs +862 -0
  3. package/dist/index.js +862 -0
  4. package/dist/scripts/cmp-static.js +8 -0
  5. package/dist/src/__tests__/index.test.d.ts +2 -0
  6. package/dist/src/__tests__/index.test.d.ts.map +1 -0
  7. package/dist/src/client.d.ts +3 -0
  8. package/dist/src/client.d.ts.map +1 -0
  9. package/dist/src/consent-parsers/__fixtures__/gpp.d.ts +20 -0
  10. package/dist/src/consent-parsers/__fixtures__/gpp.d.ts.map +1 -0
  11. package/dist/src/consent-parsers/__tests__/index.test.d.ts +2 -0
  12. package/dist/src/consent-parsers/__tests__/index.test.d.ts.map +1 -0
  13. package/dist/src/consent-parsers/gpp/__tests__/parse-gpp-consent.test.d.ts +2 -0
  14. package/dist/src/consent-parsers/gpp/__tests__/parse-gpp-consent.test.d.ts.map +1 -0
  15. package/dist/src/consent-parsers/gpp/index.d.ts +3 -0
  16. package/dist/src/consent-parsers/gpp/index.d.ts.map +1 -0
  17. package/dist/src/consent-parsers/index.d.ts +6 -0
  18. package/dist/src/consent-parsers/index.d.ts.map +1 -0
  19. package/dist/src/consent-parsers/tcfv2/__tests__/check-consent.test.d.ts +2 -0
  20. package/dist/src/consent-parsers/tcfv2/__tests__/check-consent.test.d.ts.map +1 -0
  21. package/dist/src/consent-parsers/tcfv2/index.d.ts +10 -0
  22. package/dist/src/consent-parsers/tcfv2/index.d.ts.map +1 -0
  23. package/dist/src/consent-ready/index.d.ts +5 -0
  24. package/dist/src/consent-ready/index.d.ts.map +1 -0
  25. package/dist/src/consent-ready/utils/__fixtures__/helpers.d.ts +28 -0
  26. package/dist/src/consent-ready/utils/__fixtures__/helpers.d.ts.map +1 -0
  27. package/dist/src/consent-ready/utils/__fixtures__/strings.d.ts +5 -0
  28. package/dist/src/consent-ready/utils/__fixtures__/strings.d.ts.map +1 -0
  29. package/dist/src/consent-ready/utils/__tests__/consent.test.d.ts +2 -0
  30. package/dist/src/consent-ready/utils/__tests__/consent.test.d.ts.map +1 -0
  31. package/dist/src/consent-ready/utils/__tests__/validators.test.d.ts +2 -0
  32. package/dist/src/consent-ready/utils/__tests__/validators.test.d.ts.map +1 -0
  33. package/dist/src/consent-ready/utils/consent.d.ts +6 -0
  34. package/dist/src/consent-ready/utils/consent.d.ts.map +1 -0
  35. package/dist/src/consent-ready/utils/get-consent-payload.d.ts +18 -0
  36. package/dist/src/consent-ready/utils/get-consent-payload.d.ts.map +1 -0
  37. package/dist/src/consent-ready/utils/validators.d.ts +15 -0
  38. package/dist/src/consent-ready/utils/validators.d.ts.map +1 -0
  39. package/dist/src/html/__tests__/cmp-manage-cookies-links.test.d.ts +2 -0
  40. package/dist/src/html/__tests__/cmp-manage-cookies-links.test.d.ts.map +1 -0
  41. package/dist/src/html/__tests__/cmp-scripts.test.d.ts +2 -0
  42. package/dist/src/html/__tests__/cmp-scripts.test.d.ts.map +1 -0
  43. package/dist/src/html/cmp-manage-cookies-link.d.ts +8 -0
  44. package/dist/src/html/cmp-manage-cookies-link.d.ts.map +1 -0
  45. package/dist/src/html/cmp-scripts.d.ts +7 -0
  46. package/dist/src/html/cmp-scripts.d.ts.map +1 -0
  47. package/dist/src/index.d.ts +5 -0
  48. package/dist/src/index.d.ts.map +1 -0
  49. package/dist/src/lib/configurators/ft-dot-com.d.ts +7 -0
  50. package/dist/src/lib/configurators/ft-dot-com.d.ts.map +1 -0
  51. package/dist/src/lib/configurators/index.d.ts +14 -0
  52. package/dist/src/lib/configurators/index.d.ts.map +1 -0
  53. package/dist/src/lib/constants.d.ts +40 -0
  54. package/dist/src/lib/constants.d.ts.map +1 -0
  55. package/dist/src/lib/debug.d.ts +15 -0
  56. package/dist/src/lib/debug.d.ts.map +1 -0
  57. package/dist/src/lib/properties.d.ts +132 -0
  58. package/dist/src/lib/properties.d.ts.map +1 -0
  59. package/dist/src/scripts/cmp-static.d.ts +3 -0
  60. package/dist/src/scripts/cmp-static.d.ts.map +1 -0
  61. package/dist/src/tracking/__tests__/state.test.d.ts +2 -0
  62. package/dist/src/tracking/__tests__/state.test.d.ts.map +1 -0
  63. package/dist/src/tracking/constants.d.ts +3 -0
  64. package/dist/src/tracking/constants.d.ts.map +1 -0
  65. package/dist/src/tracking/index.d.ts +3 -0
  66. package/dist/src/tracking/index.d.ts.map +1 -0
  67. package/dist/src/tracking/state.d.ts +15 -0
  68. package/dist/src/tracking/state.d.ts.map +1 -0
  69. package/dist/src/utils/__tests__/url.test.d.ts +2 -0
  70. package/dist/src/utils/__tests__/url.test.d.ts.map +1 -0
  71. package/dist/src/utils/dom.d.ts +3 -0
  72. package/dist/src/utils/dom.d.ts.map +1 -0
  73. package/dist/src/utils/url.d.ts +127 -0
  74. package/dist/src/utils/url.d.ts.map +1 -0
  75. package/package.json +42 -0
  76. package/typings/globals.d.ts +20 -0
  77. package/typings/modules.d.ts +1 -0
  78. package/typings/types.d.ts +280 -0
@@ -0,0 +1,8 @@
1
+ (function(){"use strict";const e=document.createElement("div"),n=document.createElement("style");n.innerHTML=`
2
+ #consent-banner-backup {
3
+ z-index: 1000;
4
+ background-color: white;
5
+ position: absolute;
6
+ bottom: 0;
7
+ padding:10px
8
+ }`,e.id="consent-banner-backup",e.innerHTML="<h2>Manage Cookies</h2><p>We are having issues with our cookie management provider which means you are currently unable to manage cookies. Any previously made consent choices will be honoured.</p>",document.head.appendChild(n),document.body.appendChild(e)})();
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { CMPInitOptions } from "../typings/types.d.ts";
2
+ export declare function initSourcepointCmp(options: CMPInitOptions): Promise<void>;
3
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAY,MAAM,uBAAuB,CAAC;AAWtE,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,cAAc,iBAiD/D"}
@@ -0,0 +1,20 @@
1
+ import type { DeepPartial, GPP } from "../../../typings/types";
2
+ export declare function stubGppPingData(overrideMockData: DeepPartial<GPP.PingData>): void;
3
+ export declare function applyAndStubCaliforniaSection(overrides: Partial<GPP.CaliforniaSection>): void;
4
+ export declare function applyAndStubUsNatSection(overrides: Partial<GPP.UsNatSection>): void;
5
+ export declare function stubGppWithColorado(): void;
6
+ export declare const OPT_IN_CONSENT: {
7
+ permutiveAds: boolean;
8
+ demographicAds: boolean;
9
+ behaviouralAds: boolean;
10
+ programmaticAds: boolean;
11
+ personalisedMarketing: boolean;
12
+ };
13
+ export declare const OPT_OUT_CONSENT: {
14
+ permutiveAds: boolean;
15
+ demographicAds: boolean;
16
+ behaviouralAds: boolean;
17
+ programmaticAds: boolean;
18
+ personalisedMarketing: boolean;
19
+ };
20
+ //# sourceMappingURL=gpp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpp.d.ts","sourceRoot":"","sources":["../../../../src/consent-parsers/__fixtures__/gpp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAkD/D,wBAAgB,eAAe,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,QAkB1E;AAED,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,QAetF;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,QAe5E;AAED,wBAAgB,mBAAmB,SAIlC;AACD,eAAO,MAAM,cAAc;;;;;;CAM1B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../src/consent-parsers/__tests__/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parse-gpp-consent.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-gpp-consent.test.d.ts","sourceRoot":"","sources":["../../../../../src/consent-parsers/gpp/__tests__/parse-gpp-consent.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { ParsedConsentState } from "../../../typings/types";
2
+ export declare function parseGPPConsent(): Promise<ParsedConsentState>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/consent-parsers/gpp/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA+EtE,wBAAsB,eAAe,gCA4BpC"}
@@ -0,0 +1,6 @@
1
+ import { Legislation, ParsedConsentState } from "../../typings/types";
2
+ /**
3
+ * Return a dictionary of booleans keyed by IAB category name.
4
+ */
5
+ export declare function getParsedConsent(activeLegislation: Legislation): Promise<ParsedConsentState>;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/consent-parsers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAItE;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,iBAAiB,EAAE,WAAW,+BAUpE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=check-consent.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-consent.test.d.ts","sourceRoot":"","sources":["../../../../../src/consent-parsers/tcfv2/__tests__/check-consent.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import type { IabCustomCategoryName, ParsedConsentState, TCData } from "../../../typings/types";
2
+ /**
3
+ * Checks the consent for a specific custom purpose.
4
+ * @param categoryName - The custom IAB category identifier to check.
5
+ * @param consentState - The consent state to use for checking.
6
+ * @returns {boolean} - Returns true if consent is granted, otherwise false.
7
+ */
8
+ export declare function checkConsentFor(categoryName: IabCustomCategoryName, { purpose, vendor, specialFeatureOptins }: Partial<TCData>): boolean;
9
+ export declare function parseGDPRConsent(): Promise<ParsedConsentState>;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/consent-parsers/tcfv2/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhG;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,qBAAqB,EACnC,EAAE,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,GACzD,OAAO,CAmBT;AAED,wBAAsB,gBAAgB,gCAqBrC"}
@@ -0,0 +1,5 @@
1
+ import type { ConsentReadyProps } from "../../typings/types.d.ts";
2
+ export declare function consentReadyHandlerFn(props: ConsentReadyProps): (legislation: string, _consentUUID: string, consentString: string, consentMeta: {
3
+ applies?: boolean;
4
+ }) => Promise<void>;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/consent-ready/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AA8B/E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,iBAE7C,MAAM,gBACL,MAAM,iBACL,MAAM,eACR;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,mBAwCrC"}
@@ -0,0 +1,28 @@
1
+ export declare function stubFetch(expectedResponse: unknown): void;
2
+ export declare function stubTCFAPI(consents: {
3
+ purpose: boolean;
4
+ vendor: boolean;
5
+ }): {
6
+ purpose: {
7
+ consents: {
8
+ "1": boolean;
9
+ "2": boolean;
10
+ "3": boolean;
11
+ "4": boolean;
12
+ "5": boolean;
13
+ "6": boolean;
14
+ "7": boolean;
15
+ "8": boolean;
16
+ "9": boolean;
17
+ "10": boolean;
18
+ };
19
+ legitimateInterests: {};
20
+ };
21
+ vendor: {
22
+ consents: {
23
+ 361: boolean;
24
+ };
25
+ legitimateInterests: {};
26
+ };
27
+ };
28
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/consent-ready/utils/__fixtures__/helpers.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,gBAAgB,EAAE,OAAO,QAKlD;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;EA4BzE"}
@@ -0,0 +1,5 @@
1
+ export declare const MOCK_USPAPI_CONSENT: {
2
+ readonly full: "1YNN";
3
+ readonly none: "1YYN";
4
+ };
5
+ //# sourceMappingURL=strings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../../../src/consent-ready/utils/__fixtures__/strings.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=consent.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consent.test.d.ts","sourceRoot":"","sources":["../../../../../src/consent-ready/utils/__tests__/consent.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=validators.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.test.d.ts","sourceRoot":"","sources":["../../../../../src/consent-ready/utils/__tests__/validators.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { ConsentReadyProps, ParsedConsentState } from "../../../typings/types";
2
+ export declare function getConsentCookieValue(): Record<string, boolean>;
3
+ export declare function hasConsentChanged(parsedConsent: ParsedConsentState, previousConsent: Record<string, boolean>): boolean;
4
+ export declare function shouldUpdateConsentStore({ userId, useConsentStore }: ConsentReadyProps): boolean;
5
+ export declare function getConsentEndpoint(updateConsentStore: boolean, props: ConsentReadyProps): string;
6
+ //# sourceMappingURL=consent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consent.d.ts","sourceRoot":"","sources":["../../../../src/consent-ready/utils/consent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAEjB,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAIhC,wBAAgB,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAc/D;AAED,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,kBAAkB,EACjC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvC,OAAO,CAMT;AAED,wBAAgB,wBAAwB,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE,iBAAiB,WAEtF;AAED,wBAAgB,kBAAkB,CAAC,kBAAkB,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,UAMvF"}
@@ -0,0 +1,18 @@
1
+ import type { ParsedConsentState, ConsentPayloadOptions, ConsentCategoryPayload } from "../../../typings/types";
2
+ /**
3
+ * Build payload for updating user's consent
4
+ */
5
+ export declare function getConsentPayload(parsedConsent: ParsedConsentState, updateConsentStore: boolean, { formOfWordsId, cookieDomain }: Partial<ConsentPayloadOptions>): {
6
+ setConsentCookie: boolean;
7
+ formOfWordsId: string | undefined;
8
+ consentSource: string;
9
+ cookieDomain: string | undefined;
10
+ data: Record<string, ConsentCategoryPayload>;
11
+ } | {
12
+ data: Record<string, ConsentCategoryPayload>;
13
+ cookieDomain: string | undefined;
14
+ setConsentCookie?: undefined;
15
+ formOfWordsId?: undefined;
16
+ consentSource?: undefined;
17
+ };
18
+ //# sourceMappingURL=get-consent-payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-consent-payload.d.ts","sourceRoot":"","sources":["../../../../src/consent-ready/utils/get-consent-payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAIhC;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,kBAAkB,EACjC,kBAAkB,EAAE,OAAO,EAC3B,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE,OAAO,CAAC,qBAAqB,CAAC;;;;;;;;;;;;EA6BhE"}
@@ -0,0 +1,15 @@
1
+ import type { RawConsentState } from "../../../typings/types";
2
+ export declare function isValidUspString(val: string | null): boolean;
3
+ /**
4
+ * Validates consent state.
5
+ * @param input - The consent state to validate.
6
+ * @throws Will throw an error if the consent state is invalid.
7
+ */
8
+ export declare function validateRawConsentState(input: RawConsentState): input is RawConsentState;
9
+ /**
10
+ * Validates the custom purpose identifier.
11
+ * @param categoryName - The custom purpose identifier to validate.
12
+ * @throws Will throw an error if the custom purpose identifier is invalid.
13
+ */
14
+ export declare function validateIabConsentCategory(categoryName: string): void;
15
+ //# sourceMappingURL=validators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../../src/consent-ready/utils/validators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAO5D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,IAAI,eAAe,CAkBxF;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAIrE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cmp-manage-cookies-links.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmp-manage-cookies-links.test.d.ts","sourceRoot":"","sources":["../../../../src/html/__tests__/cmp-manage-cookies-links.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cmp-scripts.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmp-scripts.test.d.ts","sourceRoot":"","sources":["../../../../src/html/__tests__/cmp-scripts.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import type { SPConfig, regionConfig } from "../../typings/types";
2
+ declare function findAndUpdateLinks(fallback: boolean, regionId: string, regionApplies: boolean, regionConfig: regionConfig, linkMap: Map<HTMLElement, (this: HTMLElement, ev: MouseEvent) => void>, manageCookiesLinkOverride?: string): void;
3
+ export declare function interceptManageCookiesLinks({ _clientOptions }?: SPConfig): void;
4
+ export declare const exportedForTesting: {
5
+ findAndUpdateLinks: typeof findAndUpdateLinks;
6
+ };
7
+ export {};
8
+ //# sourceMappingURL=cmp-manage-cookies-link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmp-manage-cookies-link.d.ts","sourceRoot":"","sources":["../../../src/html/cmp-manage-cookies-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIlE,iBAAS,kBAAkB,CACzB,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,OAAO,EACtB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC,EACtE,yBAAyB,CAAC,EAAE,MAAM,QAenC;AAED,wBAAgB,2BAA2B,CAAC,EAAE,cAAc,EAAE,GAAE,QAAyB,QA+DxF;AAED,eAAO,MAAM,kBAAkB;;CAE9B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { CMPInitOptions, SPConfig } from "../../typings/types";
2
+ /**
3
+ * Set up the config and event handlers for the CMP
4
+ * Then add the vendor scripts to the head of the document
5
+ */
6
+ export declare function bootstrapCmp(config: SPConfig, options: CMPInitOptions): void;
7
+ //# sourceMappingURL=cmp-scripts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmp-scripts.d.ts","sourceRoot":"","sources":["../../../src/html/cmp-scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAsCpE;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,QAOrE"}
@@ -0,0 +1,5 @@
1
+ export * as debug from "./lib/debug.ts";
2
+ export * as properties from "./lib/properties.ts";
3
+ export { interceptManageCookiesLinks } from "./html/cmp-manage-cookies-link.ts";
4
+ export { initSourcepointCmp } from "./client.ts";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { SPConfig } from "../../../typings/types";
2
+ export declare function getFtDotComOptions(propertyConfig: SPConfig): {
3
+ includeUsNat: boolean;
4
+ } | {
5
+ includeUsNat?: undefined;
6
+ };
7
+ //# sourceMappingURL=ft-dot-com.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ft-dot-com.d.ts","sourceRoot":"","sources":["../../../../src/lib/configurators/ft-dot-com.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AA2BvD,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,QAAQ;;;;EAS1D"}
@@ -0,0 +1,14 @@
1
+ import { SPConfig } from "../../../typings/types";
2
+ export declare function getRuntimeOptions(activeProperty: SPConfig): Partial<{
3
+ propertyConfig: SPConfig;
4
+ userId: string;
5
+ useFTSession: boolean;
6
+ consentProxyHost: string;
7
+ cookieDomain: string;
8
+ formOfWordsId: string;
9
+ useConsentStore: boolean;
10
+ trackingContext: import("../../../typings/types").TrackingContext;
11
+ disableFTCookies: boolean;
12
+ includeUsNat: boolean;
13
+ }>;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/configurators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAWlE,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,QAAQ;;;;;;;;;;;GAYzD"}
@@ -0,0 +1,40 @@
1
+ export declare const SOURCEPOINT_CONSENT_SOURCE = "sourcepoint-cmp";
2
+ export declare const SOURCEPOINT_FOW_SCOPE = "FTPINK";
3
+ export declare const CONSENT_COOKIE_NAME = "FTConsent";
4
+ export declare const SOURCEPOINT_FOW_ID = "sourcepointCmp/VngD.XycZut.595cp9fWdp5XYP9vlFvk";
5
+ export declare const FT_COOKIE_DOMAIN = ".ft.com";
6
+ export declare const FT_CONSENT_PROXY_HOST = "https://consent.ft.com";
7
+ export declare const iabCustomCategories: {
8
+ readonly permutiveAds: {
9
+ readonly purposes: readonly [2, 4, 8, 9];
10
+ readonly iabVendors: readonly [361];
11
+ readonly customVendors: readonly [];
12
+ readonly specialFeatures: readonly [];
13
+ };
14
+ readonly demographicAds: {
15
+ readonly purposes: readonly [7, 9, 10];
16
+ readonly iabVendors: readonly [];
17
+ readonly customVendors: readonly [];
18
+ readonly specialFeatures: readonly [];
19
+ };
20
+ readonly behaviouralAds: {
21
+ readonly purposes: readonly [2, 4, 8, 9];
22
+ readonly iabVendors: readonly [];
23
+ readonly customVendors: readonly [];
24
+ readonly specialFeatures: readonly [];
25
+ };
26
+ readonly programmaticAds: {
27
+ readonly purposes: readonly [2];
28
+ readonly iabVendors: readonly [];
29
+ readonly customVendors: readonly [];
30
+ readonly specialFeatures: readonly [];
31
+ };
32
+ readonly personalisedMarketing: {
33
+ readonly purposes: readonly [2, 7, 8, 9, 10];
34
+ readonly iabVendors: readonly [];
35
+ readonly customVendors: readonly [];
36
+ readonly specialFeatures: readonly [];
37
+ };
38
+ };
39
+ export declare const iabCategoryNames: ("permutiveAds" | "demographicAds" | "behaviouralAds" | "programmaticAds" | "personalisedMarketing")[];
40
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,oBAAoB,CAAC;AAC5D,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C,eAAO,MAAM,kBAAkB,oDAAoD,CAAC;AACpF,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BtB,CAAC;AAEX,eAAO,MAAM,gBAAgB,wGAA8D,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const events: {
2
+ onMessageChoiceSelect: (...args: never) => void;
3
+ onMessageReady: (...args: never) => void;
4
+ onMessageChoiceError: (...args: never) => void;
5
+ onPrivacyManagerAction: (...args: never) => void;
6
+ onPMCancel: (...args: never) => void;
7
+ onMessageReceiveData: (...args: never) => void;
8
+ onSPPMObjectReady: (...args: never) => void;
9
+ onConsentReady: (legislation: string, consentUUID: string, consentString: string, consentMeta: {
10
+ applies?: boolean | undefined;
11
+ }) => Promise<void>;
12
+ onError: (...args: never) => void;
13
+ };
14
+ export declare function logCmpEvents(): void;
15
+ //# sourceMappingURL=debug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../src/lib/debug.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;qCACgB,KAAK;8BAGZ,KAAK;oCAGC,KAAK;sCAGH,KAAK;0BAGjB,KAAK;oCAGK,KAAK;iCAGR,KAAK;;kBAQL,OAAO,GAAG,SAAS;;uBAM7B,KAAK;CAGzB,CAAC;AAEF,wBAAgB,YAAY,SAO3B"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * This config should only be used to test unregistered properties.
3
+ * Properties on *.ft.com are by default registered.
4
+ * The propertyHref value spoofs the request to Sourcepoint as coming from an FT domain
5
+ */
6
+ export declare const FT_DOTCOM_TEST: {
7
+ accountId: number;
8
+ baseEndpoint: string;
9
+ propertyHref: string;
10
+ _clientOptions: {
11
+ privacyManagerId: number;
12
+ manageCookiesLinkOverride: string;
13
+ rootDomain: string;
14
+ };
15
+ joinHref: boolean;
16
+ gdpr: {};
17
+ };
18
+ export declare const FT_DOTCOM_PROD: {
19
+ accountId: number;
20
+ baseEndpoint: string;
21
+ propertyId: number;
22
+ _clientOptions: {
23
+ privacyManagerId: number;
24
+ usnatPrivacyManagerId: number;
25
+ ccpaPrivacyManagerId: number;
26
+ manageCookiesLinkOverride: string;
27
+ rootDomain: string;
28
+ };
29
+ joinHref: boolean;
30
+ gdpr: {};
31
+ };
32
+ export declare const SP_PWMNET: {
33
+ accountId: number;
34
+ baseEndpoint: string;
35
+ propertyId: number;
36
+ _clientOptions: {
37
+ rootDomain: string;
38
+ };
39
+ joinHref: boolean;
40
+ gdpr: {};
41
+ };
42
+ export declare const SP_FDI_INTELLIGENCE: {
43
+ accountId: number;
44
+ baseEndpoint: string;
45
+ propertyId: number;
46
+ _clientOptions: {
47
+ rootDomain: string;
48
+ };
49
+ joinHref: boolean;
50
+ gdpr: {};
51
+ };
52
+ export declare const SP_THE_BANKER: {
53
+ accountId: number;
54
+ baseEndpoint: string;
55
+ propertyId: number;
56
+ _clientOptions: {
57
+ rootDomain: string;
58
+ };
59
+ joinHref: boolean;
60
+ gdpr: {};
61
+ };
62
+ export declare const SP_BANKING_RR: {
63
+ accountId: number;
64
+ baseEndpoint: string;
65
+ propertyId: number;
66
+ _clientOptions: {
67
+ rootDomain: string;
68
+ };
69
+ joinHref: boolean;
70
+ gdpr: {};
71
+ };
72
+ export declare const SP_SUSTAINABLE_VIEWS: {
73
+ accountId: number;
74
+ baseEndpoint: string;
75
+ propertyId: number;
76
+ _clientOptions: {
77
+ rootDomain: string;
78
+ };
79
+ joinHref: boolean;
80
+ gdpr: {};
81
+ };
82
+ export declare const SP_FT_ADVISER: {
83
+ accountId: number;
84
+ baseEndpoint: string;
85
+ propertyId: number;
86
+ _clientOptions: {
87
+ rootDomain: string;
88
+ };
89
+ joinHref: boolean;
90
+ gdpr: {};
91
+ };
92
+ export declare const SP_INVESTORS_CHRONICLE: {
93
+ accountId: number;
94
+ baseEndpoint: string;
95
+ propertyId: number;
96
+ _clientOptions: {
97
+ rootDomain: string;
98
+ };
99
+ joinHref: boolean;
100
+ gdpr: {};
101
+ };
102
+ export declare const MM_IGNITES_ASIA: {
103
+ accountId: number;
104
+ baseEndpoint: string;
105
+ propertyId: number;
106
+ _clientOptions: {
107
+ rootDomain: string;
108
+ };
109
+ joinHref: boolean;
110
+ gdpr: {};
111
+ };
112
+ export declare const MM_IGNITES_EUROPE: {
113
+ accountId: number;
114
+ baseEndpoint: string;
115
+ propertyId: number;
116
+ _clientOptions: {
117
+ rootDomain: string;
118
+ };
119
+ joinHref: boolean;
120
+ gdpr: {};
121
+ };
122
+ export declare const SP_MANDATE_WIRE: {
123
+ accountId: number;
124
+ baseEndpoint: string;
125
+ propertyId: number;
126
+ _clientOptions: {
127
+ rootDomain: string;
128
+ };
129
+ joinHref: boolean;
130
+ gdpr: {};
131
+ };
132
+ //# sourceMappingURL=properties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../../src/lib/properties.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;CAU1B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAY1B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;CAQrB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;CAQ/B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;CAQhC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;CAQlC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;CAQ3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;CAQ7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;CAQ3B,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const bannerDiv: HTMLDivElement;
2
+ declare const backupConsentStyle: HTMLStyleElement;
3
+ //# sourceMappingURL=cmp-static.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmp-static.d.ts","sourceRoot":"","sources":["../../../src/scripts/cmp-static.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,SAAS,gBAAgC,CAAC;AAChD,QAAA,MAAM,kBAAkB,kBAAkC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=state.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.test.d.ts","sourceRoot":"","sources":["../../../../src/tracking/__tests__/state.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export declare const COOKIE_MESSAGE = "cookie-message";
2
+ export declare const PRIVACY_MANAGER = "manage-cookies";
3
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tracking/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { TrackingContext } from "../../typings/types.d.ts";
2
+ export declare function initTracking(context: TrackingContext, cmpBaseEndpoint: string): void;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tracking/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,eAAe,EAGhB,MAAM,0BAA0B,CAAC;AAMlC,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,QAU7E"}
@@ -0,0 +1,15 @@
1
+ import { COOKIE_MESSAGE, PRIVACY_MANAGER } from "./constants.ts";
2
+ export declare const INITIAL_STATE: Readonly<{
3
+ activeComponent: "cookie-message";
4
+ messageId: 0;
5
+ privacyManagerId: 0;
6
+ }>;
7
+ export declare function isPlainObject(obj: unknown): obj is object;
8
+ export declare const getState: () => {
9
+ [x: string]: string | number | boolean | null | undefined;
10
+ activeComponent: typeof COOKIE_MESSAGE | typeof PRIVACY_MANAGER;
11
+ messageId: number;
12
+ privacyManagerId: number;
13
+ };
14
+ export declare const setState: (newState: unknown) => void;
15
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/tracking/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AASjE,eAAO,MAAM,aAAa;;;;EAIxB,CAAC;AAIH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAOzD;AAGD,eAAO,MAAM,QAAQ;;qBAvBF,qBAAqB,GAAG,sBAAsB;eACpD,MAAM;sBACC,MAAM;CAqByB,CAAC;AAEpD,eAAO,MAAM,QAAQ,aAAc,OAAO,SAOzC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=url.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.test.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/url.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export declare function createContentScript(cmpScript: string, content: string): HTMLScriptElement;
2
+ export declare function createSourceScript(src: string): HTMLScriptElement;
3
+ //# sourceMappingURL=dom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/utils/dom.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAKrE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,qBAI7C"}