@osano/osano-cmp-react-native 0.15.0 → 0.17.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.
- package/README.dev.md +130 -0
- package/README.md +1 -1
- package/lib/commonjs/iab/constants.js +1 -1
- package/lib/commonjs/iab/tcf/consent.js +17 -11
- package/lib/commonjs/iab/tcf/consent.js.map +1 -1
- package/lib/commonjs/iab/tcf/reducer.js +11 -8
- package/lib/commonjs/iab/tcf/reducer.js.map +1 -1
- package/lib/commonjs/iab/tcf/selectors.js +16 -1
- package/lib/commonjs/iab/tcf/selectors.js.map +1 -1
- package/lib/commonjs/iab/tcf/v2.0/tcfcav1-constants.js +15 -3
- package/lib/commonjs/iab/tcf/v2.0/tcfcav1-constants.js.map +1 -1
- package/lib/commonjs/iab/tcf/v2.0/tcfeuv2-constants.js +11 -2
- package/lib/commonjs/iab/tcf/v2.0/tcfeuv2-constants.js.map +1 -1
- package/lib/module/iab/constants.js +1 -1
- package/lib/module/iab/tcf/consent.js +18 -12
- package/lib/module/iab/tcf/consent.js.map +1 -1
- package/lib/module/iab/tcf/reducer.js +12 -9
- package/lib/module/iab/tcf/reducer.js.map +1 -1
- package/lib/module/iab/tcf/selectors.js +13 -0
- package/lib/module/iab/tcf/selectors.js.map +1 -1
- package/lib/module/iab/tcf/v2.0/tcfcav1-constants.js +15 -3
- package/lib/module/iab/tcf/v2.0/tcfcav1-constants.js.map +1 -1
- package/lib/module/iab/tcf/v2.0/tcfeuv2-constants.js +11 -2
- package/lib/module/iab/tcf/v2.0/tcfeuv2-constants.js.map +1 -1
- package/lib/typescript/lib/commonjs/iab/constants.d.ts +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/consent.d.ts +2 -1
- package/lib/typescript/lib/commonjs/iab/tcf/consent.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/reducer.d.ts +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/reducer.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/selectors.d.ts +2 -0
- package/lib/typescript/lib/commonjs/iab/tcf/selectors.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/index.d.ts +15 -6
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/shared-constants.d.ts +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/tcfcav1-constants.d.ts +6 -2
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/tcfeuv2-constants.d.ts +5 -2
- package/lib/typescript/lib/module/ConsentManager.d.ts +179 -2
- package/lib/typescript/lib/module/ConsentManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/constants.d.ts +1 -1
- package/lib/typescript/lib/module/iab/tcf/consent.d.ts +2 -1
- package/lib/typescript/lib/module/iab/tcf/consent.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/index.d.ts +33 -2
- package/lib/typescript/lib/module/iab/tcf/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/reducer.d.ts +1 -0
- package/lib/typescript/lib/module/iab/tcf/reducer.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/selectors.d.ts +2 -0
- package/lib/typescript/lib/module/iab/tcf/selectors.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/v2.0/index.d.ts +33 -2
- package/lib/typescript/lib/module/iab/tcf/v2.0/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/v2.0/shared-constants.d.ts +2 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/shared-constants.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfcav1-constants.d.ts +19 -5
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfcav1-constants.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfeuv2-constants.d.ts +11 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfeuv2-constants.d.ts.map +1 -1
- package/lib/typescript/src/iab/constants.d.ts +1 -1
- package/lib/typescript/src/iab/tcf/consent.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/reducer.d.ts +1 -0
- package/lib/typescript/src/iab/tcf/reducer.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/selectors.d.ts +2 -0
- package/lib/typescript/src/iab/tcf/selectors.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/types.d.ts +2 -0
- package/lib/typescript/src/iab/tcf/types.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/v2.0/shared-constants.d.ts +2 -0
- package/lib/typescript/src/iab/tcf/v2.0/shared-constants.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/v2.0/tcfcav1-constants.d.ts +6 -0
- package/lib/typescript/src/iab/tcf/v2.0/tcfcav1-constants.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/v2.0/tcfeuv2-constants.d.ts +5 -0
- package/lib/typescript/src/iab/tcf/v2.0/tcfeuv2-constants.d.ts.map +1 -1
- package/package.json +16 -6
- package/src/iab/constants.ts +1 -1
- package/src/iab/tcf/consent.ts +41 -26
- package/src/iab/tcf/reducer.ts +14 -7
- package/src/iab/tcf/selectors.ts +16 -0
- package/src/iab/tcf/types.ts +2 -0
- package/src/iab/tcf/v2.0/tcfcav1-constants.ts +24 -3
- package/src/iab/tcf/v2.0/tcfeuv2-constants.ts +19 -1
package/src/iab/tcf/types.ts
CHANGED
|
@@ -73,9 +73,11 @@ export type IabInitOptions = {
|
|
|
73
73
|
defaultTimestamp: number;
|
|
74
74
|
storageKey: string;
|
|
75
75
|
version: TcfVersionType;
|
|
76
|
+
tcfPolicyVersion: number;
|
|
76
77
|
cmpId: number;
|
|
77
78
|
cmpVersion: number;
|
|
78
79
|
coreFieldSequence: CoreField[];
|
|
80
|
+
disclosedVendorsFieldSequence: CoreField[];
|
|
79
81
|
createConsentPayload: (state?: IabState) => Partial<TcfState>;
|
|
80
82
|
tcString: string;
|
|
81
83
|
fallbackGvlVersion: number;
|
|
@@ -19,6 +19,7 @@ import { createUTCTimestampInDeciseconds } from '../helpers';
|
|
|
19
19
|
|
|
20
20
|
// gppSection is the key in redux state that stores the consent string.
|
|
21
21
|
const gppSection = 'tcfcav1';
|
|
22
|
+
const tcfPolicyVersion = 5;
|
|
22
23
|
/**
|
|
23
24
|
* This string is a stub with only the base values so that consent.js has a
|
|
24
25
|
* string to start with. Its values are essentially blank and will be replaced
|
|
@@ -77,6 +78,22 @@ const coreFieldSequence: CoreField[] = [
|
|
|
77
78
|
'vendor.legitimateInterests',
|
|
78
79
|
idsOnlyArrayFormatter,
|
|
79
80
|
],
|
|
81
|
+
// This is not supported in TcfCA v1, HOWEVER, it's still listed and required in the spec doc, and should always be 0
|
|
82
|
+
['PubRestrictions', 12, IntEncoder, 'numPubRestrictions'],
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The fields for the disclosed vendors segment of the TCString for TCF-Canada v1.
|
|
87
|
+
*/
|
|
88
|
+
const disclosedVendorsFieldSequence: CoreField[] = [
|
|
89
|
+
['DisclosedVendorsSegmentType', 3, IntEncoder],
|
|
90
|
+
[
|
|
91
|
+
'DisclosedVendors',
|
|
92
|
+
Number.POSITIVE_INFINITY,
|
|
93
|
+
EncodableOptimizedFixedRange,
|
|
94
|
+
'vendor.vendorsDisclosed',
|
|
95
|
+
idsOnlyArrayFormatter,
|
|
96
|
+
],
|
|
80
97
|
];
|
|
81
98
|
|
|
82
99
|
const version = Number.parseInt(baseInitOptions.version, 10);
|
|
@@ -84,8 +101,10 @@ const staticFields = {
|
|
|
84
101
|
version,
|
|
85
102
|
cmpId: baseInitOptions.cmpId,
|
|
86
103
|
cmpVersion: baseInitOptions.cmpVersion,
|
|
87
|
-
tcfPolicyVersion
|
|
88
|
-
useNonStandardStacks:
|
|
104
|
+
tcfPolicyVersion,
|
|
105
|
+
useNonStandardStacks: false,
|
|
106
|
+
DisclosedVendorsSegmentType: 1,
|
|
107
|
+
numPubRestrictions: 0,
|
|
89
108
|
};
|
|
90
109
|
|
|
91
110
|
const dynamicFields = {
|
|
@@ -95,7 +114,9 @@ const dynamicFields = {
|
|
|
95
114
|
|
|
96
115
|
export const initOptions = {
|
|
97
116
|
...baseInitOptions,
|
|
98
|
-
|
|
117
|
+
tcfPolicyVersion,
|
|
118
|
+
coreFieldSequence,
|
|
119
|
+
disclosedVendorsFieldSequence,
|
|
99
120
|
gppSection,
|
|
100
121
|
tcString: BOOTSTRAP_TCSTRING,
|
|
101
122
|
staticFields,
|
|
@@ -17,6 +17,7 @@ export const iframeName = '__tcfapiLocator';
|
|
|
17
17
|
|
|
18
18
|
// gppSection is the key in redux state that stores the consent string.
|
|
19
19
|
const gppSection = 'tcfeuv2';
|
|
20
|
+
const tcfPolicyVersion = 5;
|
|
20
21
|
/**
|
|
21
22
|
* This string is a stub with only the base values so that consent.js has a
|
|
22
23
|
* string to start with. It was generated with <https://iabtcf.com/>.
|
|
@@ -79,16 +80,31 @@ const coreFieldSequence: CoreField[] = [
|
|
|
79
80
|
['numPubRestrictions', 12, IntEncoder], // This is a meta field and shouldn't be exposed directly via an API
|
|
80
81
|
];
|
|
81
82
|
|
|
83
|
+
/**
|
|
84
|
+
* The fields for the disclosed vendors segment of the TCString in the order they appear in the TCString
|
|
85
|
+
*/
|
|
86
|
+
const disclosedVendorsFieldSequence: CoreField[] = [
|
|
87
|
+
['vendorsDisclosedSegmentType', 3, IntEncoder],
|
|
88
|
+
[
|
|
89
|
+
'vendorsDisclosed',
|
|
90
|
+
Number.POSITIVE_INFINITY,
|
|
91
|
+
EncodableOptimizedFixedRange,
|
|
92
|
+
'vendor.vendorsDisclosed',
|
|
93
|
+
],
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
|
|
82
97
|
const version = Number.parseInt(baseInitOptions.version, 10);
|
|
83
98
|
const staticFields = {
|
|
84
99
|
version,
|
|
85
100
|
cmpId: baseInitOptions.cmpId,
|
|
86
101
|
cmpVersion: baseInitOptions.cmpVersion,
|
|
87
|
-
tcfPolicyVersion
|
|
102
|
+
tcfPolicyVersion,
|
|
88
103
|
useNonStandardStacks: true,
|
|
89
104
|
isServiceSpecific: true,
|
|
90
105
|
purposeOneTreatment: false,
|
|
91
106
|
numPubRestrictions: 0,
|
|
107
|
+
vendorsDisclosedSegmentType: 1,
|
|
92
108
|
};
|
|
93
109
|
|
|
94
110
|
const dynamicFields = {
|
|
@@ -98,7 +114,9 @@ const dynamicFields = {
|
|
|
98
114
|
|
|
99
115
|
export const initOptions = {
|
|
100
116
|
...baseInitOptions,
|
|
117
|
+
tcfPolicyVersion,
|
|
101
118
|
coreFieldSequence,
|
|
119
|
+
disclosedVendorsFieldSequence,
|
|
102
120
|
gppSection,
|
|
103
121
|
tcString: BOOTSTRAP_TCSTRING,
|
|
104
122
|
staticFields,
|