@transcend-io/airgap.js-types 14.0.1 → 14.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.mts +20 -0
- package/dist/constants.d.mts.map +1 -0
- package/dist/constants.mjs +46 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/core.d.mts +976 -0
- package/dist/core.d.mts.map +1 -0
- package/dist/core.mjs +115 -0
- package/dist/core.mjs.map +1 -0
- package/dist/enums/browserLanguage.d.mts +314 -0
- package/dist/enums/browserLanguage.d.mts.map +1 -0
- package/dist/enums/browserLanguage.mjs +314 -0
- package/dist/enums/browserLanguage.mjs.map +1 -0
- package/dist/enums/consentExpiry.d.mts +14 -0
- package/dist/enums/consentExpiry.d.mts.map +1 -0
- package/dist/enums/consentExpiry.mjs +14 -0
- package/dist/enums/consentExpiry.mjs.map +1 -0
- package/dist/enums/experience.d.mts +13 -0
- package/dist/enums/experience.d.mts.map +1 -0
- package/dist/enums/experience.mjs +13 -0
- package/dist/enums/experience.mjs.map +1 -0
- package/dist/enums/privacyRegime.d.mts +28 -0
- package/dist/enums/privacyRegime.d.mts.map +1 -0
- package/dist/enums/privacyRegime.mjs +30 -0
- package/dist/enums/privacyRegime.mjs.map +1 -0
- package/dist/enums/purpose.d.mts +71 -0
- package/dist/enums/purpose.d.mts.map +1 -0
- package/dist/enums/purpose.mjs +48 -0
- package/dist/enums/purpose.mjs.map +1 -0
- package/dist/enums/viewState.d.mts +139 -0
- package/dist/enums/viewState.d.mts.map +1 -0
- package/dist/enums/viewState.mjs +66 -0
- package/dist/enums/viewState.mjs.map +1 -0
- package/dist/experience.d.mts +68 -0
- package/dist/experience.d.mts.map +1 -0
- package/dist/experience.mjs +180 -0
- package/dist/experience.mjs.map +1 -0
- package/dist/iab.d.mts +323 -0
- package/dist/iab.d.mts.map +1 -0
- package/dist/iab.mjs +139 -0
- package/dist/iab.mjs.map +1 -0
- package/dist/index.d.mts +13 -2510
- package/dist/index.mjs +12 -1017
- package/dist/mobile.d.mts +42 -0
- package/dist/mobile.d.mts.map +1 -0
- package/dist/mobile.mjs +15 -0
- package/dist/mobile.mjs.map +1 -0
- package/dist/ui.d.mts +566 -0
- package/dist/ui.d.mts.map +1 -0
- package/dist/ui.mjs +87 -0
- package/dist/ui.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
//#region src/enums/viewState.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Consent Manager view state for the Interactive Advertising Bureau
|
|
4
|
+
*/
|
|
5
|
+
declare const IABViewState: {
|
|
6
|
+
/** Transparency and Consent Framework for Europe */TCF_EU: "TCF_EU";
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* View States for Transcend's Consent Manager UI
|
|
10
|
+
*/
|
|
11
|
+
declare const InitialTranscendViewState: {
|
|
12
|
+
/** expanded and showing quick select options */QuickOptions: "QuickOptions"; /** three option UI: essential, functional/analytics, advertising */
|
|
13
|
+
QuickOptions3: "QuickOptions3"; /** accept all button call to action, with more options in the banner footer */
|
|
14
|
+
AcceptAll: "AcceptAll"; /** toggle button that toggles on or off all active purposes in the current regime */
|
|
15
|
+
AcceptAllRejectAllToggle: "AcceptAllRejectAllToggle"; /** accept all or more options, both as calls to action */
|
|
16
|
+
AcceptAllOrMoreChoices: "AcceptAllOrMoreChoices"; /** accept all or reject all */
|
|
17
|
+
AcceptOrRejectAll: "AcceptOrRejectAll"; /** accept all or reject all or more options */
|
|
18
|
+
AcceptOrRejectAllOrMoreChoices: "AcceptOrRejectAllOrMoreChoices"; /** accept or reject the Analytics script tag */
|
|
19
|
+
AcceptOrRejectAnalytics: "AcceptOrRejectAnalytics"; /** accept or reject the Advertising script tag */
|
|
20
|
+
AcceptOrRejectAdvertising: "AcceptOrRejectAdvertising"; /** data collection notice with do not sell */
|
|
21
|
+
NoticeAndDoNotSell: "NoticeAndDoNotSell"; /** open a modal that allows for an explanation of do not sell/share, before opting out */
|
|
22
|
+
DoNotSellExplainer: "DoNotSellExplainer"; /** open a modal that allows for complete options toggling */
|
|
23
|
+
CompleteOptionsToggles: "CompleteOptionsToggles"; /** open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent */
|
|
24
|
+
PrivacyPolicyNotice: "PrivacyPolicyNotice";
|
|
25
|
+
/**
|
|
26
|
+
* open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent
|
|
27
|
+
* and no button to close the modal. instead there is an X in the top right corner of the modal
|
|
28
|
+
*/
|
|
29
|
+
PrivacyPolicyNoticeWithCloseButton: "PrivacyPolicyNoticeWithCloseButton"; /** expanded and showing full checkbox options */
|
|
30
|
+
CompleteOptions: "CompleteOptions"; /** complete options, but selecting a checkbox means the user is opted out */
|
|
31
|
+
CompleteOptionsInverted: "CompleteOptionsInverted"; /** hidden */
|
|
32
|
+
Hidden: "Hidden";
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Type override
|
|
36
|
+
*/
|
|
37
|
+
type InitialTranscendViewState = (typeof InitialTranscendViewState)[keyof typeof InitialTranscendViewState];
|
|
38
|
+
/**
|
|
39
|
+
* Consent Manager view states that can be used at launch
|
|
40
|
+
*/
|
|
41
|
+
declare const InitialViewState: {
|
|
42
|
+
/** Transparency and Consent Framework for Europe */TCF_EU: "TCF_EU"; /** expanded and showing quick select options */
|
|
43
|
+
QuickOptions: "QuickOptions"; /** three option UI: essential, functional/analytics, advertising */
|
|
44
|
+
QuickOptions3: "QuickOptions3"; /** accept all button call to action, with more options in the banner footer */
|
|
45
|
+
AcceptAll: "AcceptAll"; /** toggle button that toggles on or off all active purposes in the current regime */
|
|
46
|
+
AcceptAllRejectAllToggle: "AcceptAllRejectAllToggle"; /** accept all or more options, both as calls to action */
|
|
47
|
+
AcceptAllOrMoreChoices: "AcceptAllOrMoreChoices"; /** accept all or reject all */
|
|
48
|
+
AcceptOrRejectAll: "AcceptOrRejectAll"; /** accept all or reject all or more options */
|
|
49
|
+
AcceptOrRejectAllOrMoreChoices: "AcceptOrRejectAllOrMoreChoices"; /** accept or reject the Analytics script tag */
|
|
50
|
+
AcceptOrRejectAnalytics: "AcceptOrRejectAnalytics"; /** accept or reject the Advertising script tag */
|
|
51
|
+
AcceptOrRejectAdvertising: "AcceptOrRejectAdvertising"; /** data collection notice with do not sell */
|
|
52
|
+
NoticeAndDoNotSell: "NoticeAndDoNotSell"; /** open a modal that allows for an explanation of do not sell/share, before opting out */
|
|
53
|
+
DoNotSellExplainer: "DoNotSellExplainer"; /** open a modal that allows for complete options toggling */
|
|
54
|
+
CompleteOptionsToggles: "CompleteOptionsToggles"; /** open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent */
|
|
55
|
+
PrivacyPolicyNotice: "PrivacyPolicyNotice";
|
|
56
|
+
/**
|
|
57
|
+
* open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent
|
|
58
|
+
* and no button to close the modal. instead there is an X in the top right corner of the modal
|
|
59
|
+
*/
|
|
60
|
+
PrivacyPolicyNoticeWithCloseButton: "PrivacyPolicyNoticeWithCloseButton"; /** expanded and showing full checkbox options */
|
|
61
|
+
CompleteOptions: "CompleteOptions"; /** complete options, but selecting a checkbox means the user is opted out */
|
|
62
|
+
CompleteOptionsInverted: "CompleteOptionsInverted"; /** hidden */
|
|
63
|
+
Hidden: "Hidden";
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Type override
|
|
67
|
+
*/
|
|
68
|
+
type InitialViewState = (typeof InitialViewState)[keyof typeof InitialViewState];
|
|
69
|
+
/**
|
|
70
|
+
* View states that are displayed in response to a user request (e.g. transcend.doNotSell() or )
|
|
71
|
+
*/
|
|
72
|
+
declare const ResponseViewState: {
|
|
73
|
+
/** notice that do not sell has been acknowledged properly */DoNotSellDisclosure: "DoNotSellDisclosure"; /** notice of a 1 click opt out for multiple consent purposes */
|
|
74
|
+
OptOutDisclosure: "OptOutDisclosure";
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Type override
|
|
78
|
+
*/
|
|
79
|
+
type ResponseViewState = (typeof ResponseViewState)[keyof typeof ResponseViewState];
|
|
80
|
+
/**
|
|
81
|
+
* Consent Manager view states that can be navigated to after initial view state
|
|
82
|
+
*/
|
|
83
|
+
declare const DeepViewState: {
|
|
84
|
+
/** language options */LanguageOptions: "LanguageOptions";
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Type override
|
|
88
|
+
*/
|
|
89
|
+
type DeepViewState = (typeof DeepViewState)[keyof typeof DeepViewState];
|
|
90
|
+
/**
|
|
91
|
+
* Consent Manager view states after it's been dismissed
|
|
92
|
+
*/
|
|
93
|
+
declare const DismissedViewState: {
|
|
94
|
+
/** showing and collapsed */Collapsed: "Collapsed"; /** closed */
|
|
95
|
+
Closed: "Closed";
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Type override
|
|
99
|
+
*/
|
|
100
|
+
type DismissedViewState = (typeof DismissedViewState)[keyof typeof DismissedViewState];
|
|
101
|
+
/**
|
|
102
|
+
* All possible view states of the Consent Manager
|
|
103
|
+
*/
|
|
104
|
+
declare const ViewState: {
|
|
105
|
+
/** showing and collapsed */Collapsed: "Collapsed"; /** closed */
|
|
106
|
+
Closed: "Closed"; /** language options */
|
|
107
|
+
LanguageOptions: "LanguageOptions"; /** notice that do not sell has been acknowledged properly */
|
|
108
|
+
DoNotSellDisclosure: "DoNotSellDisclosure"; /** notice of a 1 click opt out for multiple consent purposes */
|
|
109
|
+
OptOutDisclosure: "OptOutDisclosure"; /** Transparency and Consent Framework for Europe */
|
|
110
|
+
TCF_EU: "TCF_EU"; /** expanded and showing quick select options */
|
|
111
|
+
QuickOptions: "QuickOptions"; /** three option UI: essential, functional/analytics, advertising */
|
|
112
|
+
QuickOptions3: "QuickOptions3"; /** accept all button call to action, with more options in the banner footer */
|
|
113
|
+
AcceptAll: "AcceptAll"; /** toggle button that toggles on or off all active purposes in the current regime */
|
|
114
|
+
AcceptAllRejectAllToggle: "AcceptAllRejectAllToggle"; /** accept all or more options, both as calls to action */
|
|
115
|
+
AcceptAllOrMoreChoices: "AcceptAllOrMoreChoices"; /** accept all or reject all */
|
|
116
|
+
AcceptOrRejectAll: "AcceptOrRejectAll"; /** accept all or reject all or more options */
|
|
117
|
+
AcceptOrRejectAllOrMoreChoices: "AcceptOrRejectAllOrMoreChoices"; /** accept or reject the Analytics script tag */
|
|
118
|
+
AcceptOrRejectAnalytics: "AcceptOrRejectAnalytics"; /** accept or reject the Advertising script tag */
|
|
119
|
+
AcceptOrRejectAdvertising: "AcceptOrRejectAdvertising"; /** data collection notice with do not sell */
|
|
120
|
+
NoticeAndDoNotSell: "NoticeAndDoNotSell"; /** open a modal that allows for an explanation of do not sell/share, before opting out */
|
|
121
|
+
DoNotSellExplainer: "DoNotSellExplainer"; /** open a modal that allows for complete options toggling */
|
|
122
|
+
CompleteOptionsToggles: "CompleteOptionsToggles"; /** open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent */
|
|
123
|
+
PrivacyPolicyNotice: "PrivacyPolicyNotice";
|
|
124
|
+
/**
|
|
125
|
+
* open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent
|
|
126
|
+
* and no button to close the modal. instead there is an X in the top right corner of the modal
|
|
127
|
+
*/
|
|
128
|
+
PrivacyPolicyNoticeWithCloseButton: "PrivacyPolicyNoticeWithCloseButton"; /** expanded and showing full checkbox options */
|
|
129
|
+
CompleteOptions: "CompleteOptions"; /** complete options, but selecting a checkbox means the user is opted out */
|
|
130
|
+
CompleteOptionsInverted: "CompleteOptionsInverted"; /** hidden */
|
|
131
|
+
Hidden: "Hidden";
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Type override
|
|
135
|
+
*/
|
|
136
|
+
type ViewState = (typeof ViewState)[keyof typeof ViewState];
|
|
137
|
+
//#endregion
|
|
138
|
+
export { DeepViewState, DismissedViewState, IABViewState, InitialTranscendViewState, InitialViewState, ResponseViewState, ViewState };
|
|
139
|
+
//# sourceMappingURL=viewState.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewState.d.mts","names":[],"sources":["../../src/enums/viewState.ts"],"mappings":";;AAMA;;cAAa,YAAA;EAGX,oDAAA,MAAA;AAAA;;;;cAKW,yBAAA;;;;;;;;;0DA2CD;;4CAC+D;oDAUzE;;EAAA;;;;;;;;;;;;KAXU,yBAAA,WACF,yBAAA,eAAwC,yBAAA;;;;cAKrC,gBAAA;wEAUe;gCAAW;kCAK1B;;;oDAUgB;0CAAW;oEAK3B;;;4CAQY;4CAAW;oDAKvB;;;;;AAUb;;sCAA4F;sDAU1F;;;;;;KArDU,gBAAA,WAA2B,gBAAA,eAA+B,gBAAA;;;;cAKzD,iBAAA;+DAKX,mBAAA;EAAA,gBAAA;AAAA;;;;KAKU,iBAAA,WAA4B,iBAAA,eAAgC,iBAAA;;;;cAK3D,aAAA;yBAGX,eAAA;AAAA;;AAmCF;;KA9BY,aAAA,WAAwB,aAAA,eAA4B,aAAA;;;;cAKnD,kBAAA;8BAKX,SAAA;EAAA,MAAA;AAAA;;;;KAKU,kBAAA,WAA6B,kBAAA,eAAiC,kBAAA;;;;cAK7D,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAUD,SAAA,WAAoB,SAAA,eAAwB,SAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { makeEnum } from "@transcend-io/type-utils";
|
|
2
|
+
//#region src/enums/viewState.ts
|
|
3
|
+
/**
|
|
4
|
+
* Consent Manager view state for the Interactive Advertising Bureau
|
|
5
|
+
*/
|
|
6
|
+
const IABViewState = makeEnum({ TCF_EU: "TCF_EU" });
|
|
7
|
+
/**
|
|
8
|
+
* View States for Transcend's Consent Manager UI
|
|
9
|
+
*/
|
|
10
|
+
const InitialTranscendViewState = makeEnum({
|
|
11
|
+
QuickOptions: "QuickOptions",
|
|
12
|
+
QuickOptions3: "QuickOptions3",
|
|
13
|
+
AcceptAll: "AcceptAll",
|
|
14
|
+
AcceptAllRejectAllToggle: "AcceptAllRejectAllToggle",
|
|
15
|
+
AcceptAllOrMoreChoices: "AcceptAllOrMoreChoices",
|
|
16
|
+
AcceptOrRejectAll: "AcceptOrRejectAll",
|
|
17
|
+
AcceptOrRejectAllOrMoreChoices: "AcceptOrRejectAllOrMoreChoices",
|
|
18
|
+
AcceptOrRejectAnalytics: "AcceptOrRejectAnalytics",
|
|
19
|
+
AcceptOrRejectAdvertising: "AcceptOrRejectAdvertising",
|
|
20
|
+
NoticeAndDoNotSell: "NoticeAndDoNotSell",
|
|
21
|
+
DoNotSellExplainer: "DoNotSellExplainer",
|
|
22
|
+
CompleteOptionsToggles: "CompleteOptionsToggles",
|
|
23
|
+
PrivacyPolicyNotice: "PrivacyPolicyNotice",
|
|
24
|
+
PrivacyPolicyNoticeWithCloseButton: "PrivacyPolicyNoticeWithCloseButton",
|
|
25
|
+
CompleteOptions: "CompleteOptions",
|
|
26
|
+
CompleteOptionsInverted: "CompleteOptionsInverted",
|
|
27
|
+
Hidden: "Hidden"
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* Consent Manager view states that can be used at launch
|
|
31
|
+
*/
|
|
32
|
+
const InitialViewState = makeEnum({
|
|
33
|
+
...InitialTranscendViewState,
|
|
34
|
+
...IABViewState
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* View states that are displayed in response to a user request (e.g. transcend.doNotSell() or )
|
|
38
|
+
*/
|
|
39
|
+
const ResponseViewState = makeEnum({
|
|
40
|
+
DoNotSellDisclosure: "DoNotSellDisclosure",
|
|
41
|
+
OptOutDisclosure: "OptOutDisclosure"
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Consent Manager view states that can be navigated to after initial view state
|
|
45
|
+
*/
|
|
46
|
+
const DeepViewState = makeEnum({ LanguageOptions: "LanguageOptions" });
|
|
47
|
+
/**
|
|
48
|
+
* Consent Manager view states after it's been dismissed
|
|
49
|
+
*/
|
|
50
|
+
const DismissedViewState = makeEnum({
|
|
51
|
+
Collapsed: "Collapsed",
|
|
52
|
+
Closed: "Closed"
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* All possible view states of the Consent Manager
|
|
56
|
+
*/
|
|
57
|
+
const ViewState = makeEnum({
|
|
58
|
+
...InitialViewState,
|
|
59
|
+
...ResponseViewState,
|
|
60
|
+
...DeepViewState,
|
|
61
|
+
...DismissedViewState
|
|
62
|
+
});
|
|
63
|
+
//#endregion
|
|
64
|
+
export { DeepViewState, DismissedViewState, IABViewState, InitialTranscendViewState, InitialViewState, ResponseViewState, ViewState };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=viewState.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewState.mjs","names":[],"sources":["../../src/enums/viewState.ts"],"sourcesContent":["// main\nimport { makeEnum } from '@transcend-io/type-utils';\n\n/**\n * Consent Manager view state for the Interactive Advertising Bureau\n */\nexport const IABViewState = makeEnum({\n /** Transparency and Consent Framework for Europe */\n TCF_EU: 'TCF_EU',\n});\n\n/**\n * View States for Transcend's Consent Manager UI\n */\nexport const InitialTranscendViewState = makeEnum({\n /** expanded and showing quick select options */\n QuickOptions: 'QuickOptions',\n /** three option UI: essential, functional/analytics, advertising */\n QuickOptions3: 'QuickOptions3',\n /** accept all button call to action, with more options in the banner footer */\n AcceptAll: 'AcceptAll',\n /** toggle button that toggles on or off all active purposes in the current regime */\n AcceptAllRejectAllToggle: 'AcceptAllRejectAllToggle',\n /** accept all or more options, both as calls to action */\n AcceptAllOrMoreChoices: 'AcceptAllOrMoreChoices',\n /** accept all or reject all */\n AcceptOrRejectAll: 'AcceptOrRejectAll',\n /** accept all or reject all or more options */\n AcceptOrRejectAllOrMoreChoices: 'AcceptOrRejectAllOrMoreChoices',\n /** accept or reject the Analytics script tag */\n AcceptOrRejectAnalytics: 'AcceptOrRejectAnalytics',\n /** accept or reject the Advertising script tag */\n AcceptOrRejectAdvertising: 'AcceptOrRejectAdvertising',\n /** data collection notice with do not sell */\n NoticeAndDoNotSell: 'NoticeAndDoNotSell',\n /** open a modal that allows for an explanation of do not sell/share, before opting out */\n DoNotSellExplainer: 'DoNotSellExplainer',\n /** open a modal that allows for complete options toggling */\n CompleteOptionsToggles: 'CompleteOptionsToggles',\n /** open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent */\n PrivacyPolicyNotice: 'PrivacyPolicyNotice',\n /**\n * open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent\n * and no button to close the modal. instead there is an X in the top right corner of the modal\n */\n PrivacyPolicyNoticeWithCloseButton: 'PrivacyPolicyNoticeWithCloseButton',\n /** expanded and showing full checkbox options */\n CompleteOptions: 'CompleteOptions',\n /** complete options, but selecting a checkbox means the user is opted out */\n CompleteOptionsInverted: 'CompleteOptionsInverted',\n /** hidden */\n Hidden: 'Hidden',\n});\n\n/**\n * Type override\n */\nexport type InitialTranscendViewState =\n (typeof InitialTranscendViewState)[keyof typeof InitialTranscendViewState];\n\n/**\n * Consent Manager view states that can be used at launch\n */\nexport const InitialViewState = makeEnum({\n /** View States for Transcend's Consent Manager UI */\n ...InitialTranscendViewState,\n /** View States for IAB Frameworks */\n ...IABViewState,\n});\n\n/**\n * Type override\n */\nexport type InitialViewState = (typeof InitialViewState)[keyof typeof InitialViewState];\n\n/**\n * View states that are displayed in response to a user request (e.g. transcend.doNotSell() or )\n */\nexport const ResponseViewState = makeEnum({\n /** notice that do not sell has been acknowledged properly */\n DoNotSellDisclosure: 'DoNotSellDisclosure',\n /** notice of a 1 click opt out for multiple consent purposes */\n OptOutDisclosure: 'OptOutDisclosure',\n});\n\n/**\n * Type override\n */\nexport type ResponseViewState = (typeof ResponseViewState)[keyof typeof ResponseViewState];\n\n/**\n * Consent Manager view states that can be navigated to after initial view state\n */\nexport const DeepViewState = makeEnum({\n /** language options */\n LanguageOptions: 'LanguageOptions',\n});\n\n/**\n * Type override\n */\nexport type DeepViewState = (typeof DeepViewState)[keyof typeof DeepViewState];\n\n/**\n * Consent Manager view states after it's been dismissed\n */\nexport const DismissedViewState = makeEnum({\n /** showing and collapsed */\n Collapsed: 'Collapsed',\n /** closed */\n Closed: 'Closed',\n});\n\n/**\n * Type override\n */\nexport type DismissedViewState = (typeof DismissedViewState)[keyof typeof DismissedViewState];\n\n/**\n * All possible view states of the Consent Manager\n */\nexport const ViewState = makeEnum({\n ...InitialViewState,\n ...ResponseViewState,\n ...DeepViewState,\n ...DismissedViewState,\n});\n\n/**\n * Type override\n */\nexport type ViewState = (typeof ViewState)[keyof typeof ViewState];\n"],"mappings":";;;;;AAMA,MAAa,eAAe,SAAS,EAEnC,QAAQ,UACT,CAAC;;;;AAKF,MAAa,4BAA4B,SAAS;CAEhD,cAAc;CAEd,eAAe;CAEf,WAAW;CAEX,0BAA0B;CAE1B,wBAAwB;CAExB,mBAAmB;CAEnB,gCAAgC;CAEhC,yBAAyB;CAEzB,2BAA2B;CAE3B,oBAAoB;CAEpB,oBAAoB;CAEpB,wBAAwB;CAExB,qBAAqB;CAKrB,oCAAoC;CAEpC,iBAAiB;CAEjB,yBAAyB;CAEzB,QAAQ;CACT,CAAC;;;;AAWF,MAAa,mBAAmB,SAAS;CAEvC,GAAG;CAEH,GAAG;CACJ,CAAC;;;;AAUF,MAAa,oBAAoB,SAAS;CAExC,qBAAqB;CAErB,kBAAkB;CACnB,CAAC;;;;AAUF,MAAa,gBAAgB,SAAS,EAEpC,iBAAiB,mBAClB,CAAC;;;;AAUF,MAAa,qBAAqB,SAAS;CAEzC,WAAW;CAEX,QAAQ;CACT,CAAC;;;;AAUF,MAAa,YAAY,SAAS;CAChC,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { PrivacyRegime } from "./core.mjs";
|
|
2
|
+
import { Purpose } from "./enums/purpose.mjs";
|
|
3
|
+
import { InitialViewState } from "./enums/viewState.mjs";
|
|
4
|
+
import { RegionsOperator } from "./enums/experience.mjs";
|
|
5
|
+
import { OnConsentExpiry } from "./enums/consentExpiry.mjs";
|
|
6
|
+
import { IsoCountryCode } from "@transcend-io/privacy-types";
|
|
7
|
+
|
|
8
|
+
//#region src/experience.d.ts
|
|
9
|
+
interface Region {
|
|
10
|
+
/** A country's ISO code */
|
|
11
|
+
country: IsoCountryCode;
|
|
12
|
+
/** A country subdivision ISO code */
|
|
13
|
+
countrySubDivision?: string;
|
|
14
|
+
}
|
|
15
|
+
interface ExperiencePurposeInput {
|
|
16
|
+
/** name of the purpose */
|
|
17
|
+
purpose: Purpose;
|
|
18
|
+
/** opt out by default */
|
|
19
|
+
defaultOptOut: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface ExperienceInput {
|
|
22
|
+
/** The regime determining the default experience */
|
|
23
|
+
name: PrivacyRegime;
|
|
24
|
+
/** The display name of the experience */
|
|
25
|
+
displayName: string;
|
|
26
|
+
/** A list of regions to be included/not included in this experience */
|
|
27
|
+
regions: Region[];
|
|
28
|
+
/** A list of browser languages that this experience applies to */
|
|
29
|
+
browserLanguages: string[];
|
|
30
|
+
/** A list of browser time zones that this experience applies to */
|
|
31
|
+
browserTimeZones: string[];
|
|
32
|
+
/** Whether the listed regions are included or excluded from the experience */
|
|
33
|
+
operator: RegionsOperator;
|
|
34
|
+
/** If data subject linked to multiple experiences, display priority for experiences. Lower number, higher priority. */
|
|
35
|
+
displayPriority: number;
|
|
36
|
+
/** The view state to display on transcend.showConsentManager() */
|
|
37
|
+
viewState: InitialViewState;
|
|
38
|
+
/** experience purposes to be added */
|
|
39
|
+
experiencePurposeInputs: ExperiencePurposeInput[];
|
|
40
|
+
/** Time in months after which a user's opt-in consent should expire */
|
|
41
|
+
consentExpiry: number;
|
|
42
|
+
/** Behavior to exhibit when the user's consent has expired */
|
|
43
|
+
onConsentExpiry: OnConsentExpiry;
|
|
44
|
+
}
|
|
45
|
+
declare const REGIME_REGIONS: Record<PrivacyRegime, Region[]>;
|
|
46
|
+
declare const REGIME_LANGUAGES: Record<PrivacyRegime, string[]>;
|
|
47
|
+
declare const REGIME_CONSENT_EXPIRY: Record<PrivacyRegime, number>;
|
|
48
|
+
declare const REGIME_ON_CONSENT_EXPIRY: Record<PrivacyRegime, OnConsentExpiry>;
|
|
49
|
+
/**
|
|
50
|
+
* construct default experience for regime
|
|
51
|
+
* @param regime - regime
|
|
52
|
+
* @returns ExperienceInput
|
|
53
|
+
*/
|
|
54
|
+
declare function defaultExperience(regime: PrivacyRegime): ExperienceInput;
|
|
55
|
+
declare const DEFAULT_EXPERIENCES: {
|
|
56
|
+
Unknown: ExperienceInput;
|
|
57
|
+
CPRA: ExperienceInput;
|
|
58
|
+
GDPR: ExperienceInput;
|
|
59
|
+
LGPD: ExperienceInput;
|
|
60
|
+
CDPA: ExperienceInput;
|
|
61
|
+
CPA: ExperienceInput;
|
|
62
|
+
NEVADA_SB220: ExperienceInput;
|
|
63
|
+
nFADP: ExperienceInput;
|
|
64
|
+
US_DNSS: ExperienceInput;
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
export { DEFAULT_EXPERIENCES, ExperienceInput, ExperiencePurposeInput, REGIME_CONSENT_EXPIRY, REGIME_LANGUAGES, REGIME_ON_CONSENT_EXPIRY, REGIME_REGIONS, Region, defaultExperience };
|
|
68
|
+
//# sourceMappingURL=experience.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experience.d.mts","names":[],"sources":["../src/experience.ts"],"mappings":";;;;;;;;UAkBiB,MAAA;;EAEf,OAAA,EAAS,cAAA;EAFM;EAIf,kBAAA;AAAA;AAAA,UAGe,sBAAA;EALf;EAOA,OAAA,EAAS,OAAA;EALT;EAOA,aAAA;AAAA;AAAA,UAGe,eAAA;EAPsB;EASrC,IAAA,EAAM,aAAA;EAPU;EAShB,WAAA;EATS;EAWT,OAAA,EAAS,MAAA;EATI;EAWb,gBAAA;EARe;EAUf,gBAAA;;EAEA,QAAA,EAAU,eAAA;EAND;EAQT,eAAA;EAEW;EAAX,SAAA,EAAW,gBAAA;EAMM;EAJjB,uBAAA,EAAyB,sBAAA;EAIO;EAFhC,aAAA;EAlBM;EAoBN,eAAA,EAAiB,eAAA;AAAA;AAAA,cAKN,cAAA,EAAgB,MAAA,CAAO,aAAA,EAAe,MAAA;AAAA,cAmCtC,gBAAA,EAAkB,MAAA,CAAO,aAAA;AAAA,cAmDzB,qBAAA,EAAuB,MAAA,CAAO,aAAA;AAAA,cAK9B,wBAAA,EAA0B,MAAA,CAAO,aAAA,EAAe,eAAA;;;;;;iBAS7C,iBAAA,CAAkB,MAAA,EAAQ,aAAA,GAAgB,eAAA;AAAA,cAqB7C,mBAAA"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { PrivacyRegimeEnum } from "./enums/privacyRegime.mjs";
|
|
2
|
+
import { InitialViewState } from "./enums/viewState.mjs";
|
|
3
|
+
import { BrowserLanguage } from "./enums/browserLanguage.mjs";
|
|
4
|
+
import { RegionsOperator } from "./enums/experience.mjs";
|
|
5
|
+
import { OnConsentExpiry } from "./enums/consentExpiry.mjs";
|
|
6
|
+
import { DEFAULT_VIEW_STATE_BY_PRIVACY_REGIME } from "./ui.mjs";
|
|
7
|
+
import { DEFAULT_EXPERIENCE_PURPOSE_OPT_OUTS, DEFAULT_EXPERIENCE_PURPOSE_SCOPES, REGIME_DISPLAY_PRIORITY, REGIME_TIMEZONES } from "./constants.mjs";
|
|
8
|
+
import { applyEnum } from "@transcend-io/type-utils";
|
|
9
|
+
import "@transcend-io/privacy-types";
|
|
10
|
+
//#region src/experience.ts
|
|
11
|
+
const REGIME_REGIONS = {
|
|
12
|
+
CPRA: [{
|
|
13
|
+
country: "US",
|
|
14
|
+
countrySubDivision: "US-CA"
|
|
15
|
+
}],
|
|
16
|
+
GDPR: [
|
|
17
|
+
{ country: "EU" },
|
|
18
|
+
{ country: "GB" },
|
|
19
|
+
{ country: "NO" },
|
|
20
|
+
{ country: "IS" },
|
|
21
|
+
{ country: "LI" }
|
|
22
|
+
],
|
|
23
|
+
LGPD: [{ country: "BR" }],
|
|
24
|
+
CDPA: [{
|
|
25
|
+
country: "US",
|
|
26
|
+
countrySubDivision: "US-VA"
|
|
27
|
+
}],
|
|
28
|
+
CPA: [{
|
|
29
|
+
country: "US",
|
|
30
|
+
countrySubDivision: "US-CO"
|
|
31
|
+
}],
|
|
32
|
+
UCPA: [{
|
|
33
|
+
country: "US",
|
|
34
|
+
countrySubDivision: "US-UT"
|
|
35
|
+
}],
|
|
36
|
+
NEVADA_SB220: [{
|
|
37
|
+
country: "US",
|
|
38
|
+
countrySubDivision: "US-NV"
|
|
39
|
+
}],
|
|
40
|
+
nFADP: [{ country: "CH" }],
|
|
41
|
+
US_DNSS: [
|
|
42
|
+
{
|
|
43
|
+
country: "US",
|
|
44
|
+
countrySubDivision: "US-CA"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
country: "US",
|
|
48
|
+
countrySubDivision: "US-VA"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
country: "US",
|
|
52
|
+
countrySubDivision: "US-CO"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
country: "US",
|
|
56
|
+
countrySubDivision: "US-NV"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
country: "US",
|
|
60
|
+
countrySubDivision: "US-TX"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
country: "US",
|
|
64
|
+
countrySubDivision: "US-CT"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
country: "US",
|
|
68
|
+
countrySubDivision: "US-OR"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
country: "US",
|
|
72
|
+
countrySubDivision: "US-MT"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
country: "US",
|
|
76
|
+
countrySubDivision: "US-UT"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
country: "US",
|
|
80
|
+
countrySubDivision: "US-IA"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
country: "US",
|
|
84
|
+
countrySubDivision: "US-DE"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
country: "US",
|
|
88
|
+
countrySubDivision: "US-NH"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
country: "US",
|
|
92
|
+
countrySubDivision: "US-NE"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
country: "US",
|
|
96
|
+
countrySubDivision: "US-NJ"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
};
|
|
100
|
+
const REGIME_LANGUAGES = {
|
|
101
|
+
GDPR: [
|
|
102
|
+
BrowserLanguage["Bulgarian (Bulgaria)"],
|
|
103
|
+
BrowserLanguage["Croatian (Croatia)"],
|
|
104
|
+
BrowserLanguage["Czech (Czech Republic)"],
|
|
105
|
+
BrowserLanguage["Danish (Denmark)"],
|
|
106
|
+
BrowserLanguage["Dutch (Belgium)"],
|
|
107
|
+
BrowserLanguage["Dutch (Netherlands)"],
|
|
108
|
+
BrowserLanguage["English (Ireland)"],
|
|
109
|
+
BrowserLanguage["Estonian (Estonia)"],
|
|
110
|
+
BrowserLanguage["Finnish (Finland)"],
|
|
111
|
+
BrowserLanguage["French (Belgium)"],
|
|
112
|
+
BrowserLanguage["French (France)"],
|
|
113
|
+
BrowserLanguage["French (Luxembourg)"],
|
|
114
|
+
BrowserLanguage["German (Austria)"],
|
|
115
|
+
BrowserLanguage["German (Germany)"],
|
|
116
|
+
BrowserLanguage["German (Liechtenstein)"],
|
|
117
|
+
BrowserLanguage["German (Luxembourg)"],
|
|
118
|
+
BrowserLanguage["Greek (Greece)"],
|
|
119
|
+
BrowserLanguage["Hungarian (Hungary)"],
|
|
120
|
+
BrowserLanguage["Icelandic (Iceland)"],
|
|
121
|
+
BrowserLanguage["Irish (Ireland)"],
|
|
122
|
+
BrowserLanguage["Italian (Italy)"],
|
|
123
|
+
BrowserLanguage["Latvian (Latvia)"],
|
|
124
|
+
BrowserLanguage["Lithuanian (Lithuania)"],
|
|
125
|
+
BrowserLanguage["Maltese (Malta)"],
|
|
126
|
+
BrowserLanguage["Norwegian (Norway)"],
|
|
127
|
+
BrowserLanguage["Norwegian Bokmål (Norway)"],
|
|
128
|
+
BrowserLanguage["Norwegian Nynorsk (Norway)"],
|
|
129
|
+
BrowserLanguage["Polish (Poland)"],
|
|
130
|
+
BrowserLanguage["Portuguese (Portugal)"],
|
|
131
|
+
BrowserLanguage["Romanian (Romania)"],
|
|
132
|
+
BrowserLanguage["Slovak (Slovakia)"],
|
|
133
|
+
BrowserLanguage["Slovenian (Slovenia)"],
|
|
134
|
+
BrowserLanguage["Spanish (España)"],
|
|
135
|
+
BrowserLanguage["Swedish (Finland)"],
|
|
136
|
+
BrowserLanguage["Swedish (Finland)"],
|
|
137
|
+
BrowserLanguage["Swedish (Sweden)"]
|
|
138
|
+
],
|
|
139
|
+
LGPD: [BrowserLanguage["Portuguese (Brazil)"]],
|
|
140
|
+
nFADP: [
|
|
141
|
+
BrowserLanguage["German (Switzerland)"],
|
|
142
|
+
BrowserLanguage["French (Switzerland)"],
|
|
143
|
+
BrowserLanguage["Italian (Switzerland)"],
|
|
144
|
+
BrowserLanguage["English (Switzerland)"],
|
|
145
|
+
BrowserLanguage["Portuguese (Switzerland)"],
|
|
146
|
+
BrowserLanguage["Swiss German (Switzerland)"]
|
|
147
|
+
]
|
|
148
|
+
};
|
|
149
|
+
const REGIME_CONSENT_EXPIRY = { GDPR: 12 };
|
|
150
|
+
const REGIME_ON_CONSENT_EXPIRY = { GDPR: OnConsentExpiry.ResetOptIns };
|
|
151
|
+
/**
|
|
152
|
+
* construct default experience for regime
|
|
153
|
+
* @param regime - regime
|
|
154
|
+
* @returns ExperienceInput
|
|
155
|
+
*/
|
|
156
|
+
function defaultExperience(regime) {
|
|
157
|
+
const isUnknown = regime === "Unknown";
|
|
158
|
+
const regimeEnum = PrivacyRegimeEnum[regime];
|
|
159
|
+
return {
|
|
160
|
+
name: regime,
|
|
161
|
+
displayName: regime,
|
|
162
|
+
regions: REGIME_REGIONS[regime] ?? [],
|
|
163
|
+
operator: isUnknown ? RegionsOperator.NotIn : RegionsOperator.In,
|
|
164
|
+
displayPriority: REGIME_DISPLAY_PRIORITY[regime] ?? 20,
|
|
165
|
+
viewState: DEFAULT_VIEW_STATE_BY_PRIVACY_REGIME[regimeEnum] ?? InitialViewState.Hidden,
|
|
166
|
+
browserLanguages: REGIME_LANGUAGES[regime] ?? [],
|
|
167
|
+
browserTimeZones: REGIME_TIMEZONES[regime] ?? [],
|
|
168
|
+
experiencePurposeInputs: DEFAULT_EXPERIENCE_PURPOSE_SCOPES[regime].map((purpose) => ({
|
|
169
|
+
purpose,
|
|
170
|
+
defaultOptOut: DEFAULT_EXPERIENCE_PURPOSE_OPT_OUTS[regime]?.includes(purpose) ?? false
|
|
171
|
+
})),
|
|
172
|
+
consentExpiry: REGIME_CONSENT_EXPIRY[regime] ?? 0,
|
|
173
|
+
onConsentExpiry: REGIME_ON_CONSENT_EXPIRY[regime] ?? OnConsentExpiry.Prompt
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
const DEFAULT_EXPERIENCES = applyEnum(PrivacyRegimeEnum, defaultExperience);
|
|
177
|
+
//#endregion
|
|
178
|
+
export { DEFAULT_EXPERIENCES, REGIME_CONSENT_EXPIRY, REGIME_LANGUAGES, REGIME_ON_CONSENT_EXPIRY, REGIME_REGIONS, defaultExperience };
|
|
179
|
+
|
|
180
|
+
//# sourceMappingURL=experience.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experience.mjs","names":[],"sources":["../src/experience.ts"],"sourcesContent":["import { IsoCountryCode } from '@transcend-io/privacy-types';\n// main\nimport { applyEnum } from '@transcend-io/type-utils';\n\nimport {\n DEFAULT_EXPERIENCE_PURPOSE_SCOPES,\n DEFAULT_EXPERIENCE_PURPOSE_OPT_OUTS,\n REGIME_DISPLAY_PRIORITY,\n REGIME_TIMEZONES,\n} from './constants.js';\nimport type { PrivacyRegime } from './core.js';\nimport { BrowserLanguage, OnConsentExpiry, RegionsOperator } from './enums/index.js';\n// local\nimport { PrivacyRegimeEnum } from './enums/privacyRegime.js';\nimport { Purpose } from './enums/purpose.js';\nimport { InitialViewState } from './enums/viewState.js';\nimport { DEFAULT_VIEW_STATE_BY_PRIVACY_REGIME } from './ui.js';\n\nexport interface Region {\n /** A country's ISO code */\n country: IsoCountryCode;\n /** A country subdivision ISO code */\n countrySubDivision?: string;\n}\n\nexport interface ExperiencePurposeInput {\n /** name of the purpose */\n purpose: Purpose;\n /** opt out by default */\n defaultOptOut: boolean;\n}\n\nexport interface ExperienceInput {\n /** The regime determining the default experience */\n name: PrivacyRegime;\n /** The display name of the experience */\n displayName: string;\n /** A list of regions to be included/not included in this experience */\n regions: Region[];\n /** A list of browser languages that this experience applies to */\n browserLanguages: string[];\n /** A list of browser time zones that this experience applies to */\n browserTimeZones: string[];\n /** Whether the listed regions are included or excluded from the experience */\n operator: RegionsOperator;\n /** If data subject linked to multiple experiences, display priority for experiences. Lower number, higher priority. */\n displayPriority: number;\n /** The view state to display on transcend.showConsentManager() */\n viewState: InitialViewState;\n /** experience purposes to be added */\n experiencePurposeInputs: ExperiencePurposeInput[];\n /** Time in months after which a user's opt-in consent should expire */\n consentExpiry: number;\n /** Behavior to exhibit when the user's consent has expired */\n onConsentExpiry: OnConsentExpiry;\n}\n\n// default to []\n// Don't put this into constants or you will regret it (per the constants.ts warning)\nexport const REGIME_REGIONS: Record<PrivacyRegime, Region[]> = {\n CPRA: [{ country: 'US', countrySubDivision: 'US-CA' }],\n GDPR: [\n { country: 'EU' },\n { country: 'GB' },\n { country: 'NO' },\n { country: 'IS' },\n { country: 'LI' },\n ],\n LGPD: [{ country: 'BR' }],\n CDPA: [{ country: 'US', countrySubDivision: 'US-VA' }],\n CPA: [{ country: 'US', countrySubDivision: 'US-CO' }],\n UCPA: [{ country: 'US', countrySubDivision: 'US-UT' }],\n NEVADA_SB220: [{ country: 'US', countrySubDivision: 'US-NV' }],\n nFADP: [{ country: 'CH' }],\n US_DNSS: [\n { country: 'US', countrySubDivision: 'US-CA' },\n { country: 'US', countrySubDivision: 'US-VA' },\n { country: 'US', countrySubDivision: 'US-CO' },\n { country: 'US', countrySubDivision: 'US-NV' },\n { country: 'US', countrySubDivision: 'US-TX' },\n { country: 'US', countrySubDivision: 'US-CT' },\n { country: 'US', countrySubDivision: 'US-OR' },\n { country: 'US', countrySubDivision: 'US-MT' },\n { country: 'US', countrySubDivision: 'US-UT' },\n { country: 'US', countrySubDivision: 'US-IA' },\n { country: 'US', countrySubDivision: 'US-DE' },\n { country: 'US', countrySubDivision: 'US-NH' },\n { country: 'US', countrySubDivision: 'US-NE' },\n { country: 'US', countrySubDivision: 'US-NJ' },\n ],\n};\n\n// default to []\n// Don't put this into constants or you will regret it (per the constants.ts warning)\nexport const REGIME_LANGUAGES: Record<PrivacyRegime, string[]> = {\n GDPR: [\n BrowserLanguage['Bulgarian (Bulgaria)'],\n BrowserLanguage['Croatian (Croatia)'],\n BrowserLanguage['Czech (Czech Republic)'],\n BrowserLanguage['Danish (Denmark)'],\n BrowserLanguage['Dutch (Belgium)'],\n BrowserLanguage['Dutch (Netherlands)'],\n BrowserLanguage['English (Ireland)'],\n BrowserLanguage['Estonian (Estonia)'],\n BrowserLanguage['Finnish (Finland)'],\n BrowserLanguage['French (Belgium)'],\n BrowserLanguage['French (France)'],\n BrowserLanguage['French (Luxembourg)'],\n BrowserLanguage['German (Austria)'],\n BrowserLanguage['German (Germany)'],\n BrowserLanguage['German (Liechtenstein)'],\n BrowserLanguage['German (Luxembourg)'],\n BrowserLanguage['Greek (Greece)'],\n BrowserLanguage['Hungarian (Hungary)'],\n BrowserLanguage['Icelandic (Iceland)'],\n BrowserLanguage['Irish (Ireland)'],\n BrowserLanguage['Italian (Italy)'],\n BrowserLanguage['Latvian (Latvia)'],\n BrowserLanguage['Lithuanian (Lithuania)'],\n BrowserLanguage['Maltese (Malta)'],\n BrowserLanguage['Norwegian (Norway)'],\n BrowserLanguage['Norwegian Bokmål (Norway)'],\n BrowserLanguage['Norwegian Nynorsk (Norway)'],\n BrowserLanguage['Polish (Poland)'],\n BrowserLanguage['Portuguese (Portugal)'],\n BrowserLanguage['Romanian (Romania)'],\n BrowserLanguage['Slovak (Slovakia)'],\n BrowserLanguage['Slovenian (Slovenia)'],\n BrowserLanguage['Spanish (Espa\\u00f1a)'],\n BrowserLanguage['Swedish (Finland)'],\n BrowserLanguage['Swedish (Finland)'],\n BrowserLanguage['Swedish (Sweden)'],\n ],\n LGPD: [BrowserLanguage['Portuguese (Brazil)']],\n nFADP: [\n BrowserLanguage['German (Switzerland)'],\n BrowserLanguage['French (Switzerland)'],\n BrowserLanguage['Italian (Switzerland)'],\n BrowserLanguage['English (Switzerland)'],\n BrowserLanguage['Portuguese (Switzerland)'],\n BrowserLanguage['Swiss German (Switzerland)'],\n ],\n};\n\n// default to 0\nexport const REGIME_CONSENT_EXPIRY: Record<PrivacyRegime, number> = {\n GDPR: 12,\n};\n\n// default to prompt\nexport const REGIME_ON_CONSENT_EXPIRY: Record<PrivacyRegime, OnConsentExpiry> = {\n GDPR: OnConsentExpiry.ResetOptIns,\n};\n\n/**\n * construct default experience for regime\n * @param regime - regime\n * @returns ExperienceInput\n */\nexport function defaultExperience(regime: PrivacyRegime): ExperienceInput {\n const isUnknown = regime === 'Unknown';\n const regimeEnum = PrivacyRegimeEnum[regime as keyof typeof PrivacyRegimeEnum];\n return {\n name: regime,\n displayName: regime,\n regions: REGIME_REGIONS[regime] ?? [],\n operator: isUnknown ? RegionsOperator.NotIn : RegionsOperator.In,\n displayPriority: REGIME_DISPLAY_PRIORITY[regime] ?? 20,\n viewState: DEFAULT_VIEW_STATE_BY_PRIVACY_REGIME[regimeEnum] ?? InitialViewState.Hidden,\n browserLanguages: REGIME_LANGUAGES[regime] ?? [],\n browserTimeZones: REGIME_TIMEZONES[regime] ?? [],\n experiencePurposeInputs: DEFAULT_EXPERIENCE_PURPOSE_SCOPES[regime].map((purpose: Purpose) => ({\n purpose,\n defaultOptOut: DEFAULT_EXPERIENCE_PURPOSE_OPT_OUTS[regime]?.includes(purpose) ?? false,\n })),\n consentExpiry: REGIME_CONSENT_EXPIRY[regime] ?? 0,\n onConsentExpiry: REGIME_ON_CONSENT_EXPIRY[regime] ?? OnConsentExpiry.Prompt,\n };\n}\n\nexport const DEFAULT_EXPERIENCES = applyEnum(PrivacyRegimeEnum, defaultExperience);\n"],"mappings":"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"}
|