@commandersact/tcconsent-react-native 1.4.2-beta.42
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/LICENSE +20 -0
- package/README.md +112 -0
- package/android/build.gradle +93 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/tcconsentreactnative/TCConsentReactNativeGenerated.java +10 -0
- package/android/src/main/java/com/tcconsentreactnative/TcconsentReactNativeModule.java +460 -0
- package/android/src/main/java/com/tcconsentreactnative/TcconsentReactNativePackage.java +28 -0
- package/android/src/main/proguard-rules.pro +2 -0
- package/ios/TCConsentGenerated.swift +10 -0
- package/ios/TcconsentReactNative-Bridging-Header.h +2 -0
- package/ios/TcconsentReactNative.mm +48 -0
- package/ios/TcconsentReactNative.swift +331 -0
- package/lib/commonjs/TCConsent.js +190 -0
- package/lib/commonjs/TCConsent.js.map +1 -0
- package/lib/commonjs/TCConsentAPI.js +125 -0
- package/lib/commonjs/TCConsentAPI.js.map +1 -0
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/TCConsent.js +164 -0
- package/lib/module/TCConsent.js.map +1 -0
- package/lib/module/TCConsentAPI.js +118 -0
- package/lib/module/TCConsentAPI.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/TCConsent.d.ts +74 -0
- package/lib/typescript/TCConsent.d.ts.map +1 -0
- package/lib/typescript/TCConsentAPI.d.ts +82 -0
- package/lib/typescript/TCConsentAPI.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/package.json +177 -0
- package/src/TCConsent.tsx +225 -0
- package/src/TCConsentAPI.tsx +131 -0
- package/src/index.tsx +2 -0
- package/tcconsent-react-native-swift.podspec +28 -0
- package/tcconsent-react-native.podspec +27 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TCConsentAPI = void 0;
|
|
7
|
+
var _TCConsent = require("./TCConsent");
|
|
8
|
+
class TCConsentAPI {
|
|
9
|
+
/**
|
|
10
|
+
* Checks if kTCPrivacyConsent is empty.
|
|
11
|
+
*
|
|
12
|
+
* @return true if the consent was already given, false otherwise.
|
|
13
|
+
*/
|
|
14
|
+
static isConsentAlreadyGiven() {
|
|
15
|
+
return _TCConsent.TCConsentBridge.isConsentAlreadyGiven();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Return the epochformatted timestamp of the last time the consent was saved.
|
|
20
|
+
*
|
|
21
|
+
* @return epochformatted timestamp or 0.
|
|
22
|
+
*/
|
|
23
|
+
static getLastTimeConsentWasSaved() {
|
|
24
|
+
return _TCConsent.TCConsentBridge.getLastTimeConsentWasSaved();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Check if a Category has been accepted.
|
|
29
|
+
*
|
|
30
|
+
* @param ID the category ID.
|
|
31
|
+
* @return true or false.
|
|
32
|
+
*/
|
|
33
|
+
static isCategoryAccepted(ID) {
|
|
34
|
+
return _TCConsent.TCConsentBridge.isCategoryAccepted(ID);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Check if a vendor has been accepted.
|
|
39
|
+
*
|
|
40
|
+
* @param ID the vendor ID.
|
|
41
|
+
* @return true or false.
|
|
42
|
+
*/
|
|
43
|
+
static isVendorAccepted(ID) {
|
|
44
|
+
return _TCConsent.TCConsentBridge.isVendorAccepted(ID);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Check if a purpose has been accepted.
|
|
49
|
+
*
|
|
50
|
+
* @param ID the purpose ID.
|
|
51
|
+
* @return true or false.
|
|
52
|
+
*/
|
|
53
|
+
static isIABPurposeAccepted(ID) {
|
|
54
|
+
return _TCConsent.TCConsentBridge.isIABPurposeAccepted(ID);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a vendor has been accepted.
|
|
59
|
+
*
|
|
60
|
+
* @param ID the vendor ID.
|
|
61
|
+
* @return true or false.
|
|
62
|
+
*/
|
|
63
|
+
static isIABVendorAccepted(ID) {
|
|
64
|
+
return _TCConsent.TCConsentBridge.isIABVendorAccepted(ID);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Check if a special feature has been accepted.
|
|
69
|
+
*
|
|
70
|
+
* @param ID the vendor ID.
|
|
71
|
+
* @param appContext the application context.
|
|
72
|
+
* @return true or false.
|
|
73
|
+
*/
|
|
74
|
+
static isIABSpecialFeatureAccepted(ID) {
|
|
75
|
+
return _TCConsent.TCConsentBridge.isIABSpecialFeatureAccepted(ID);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Get the list of all accepted categories.
|
|
80
|
+
*
|
|
81
|
+
* @return a List of PRIVACY_CAT_IDs.
|
|
82
|
+
*/
|
|
83
|
+
static getAcceptedCategories() {
|
|
84
|
+
return _TCConsent.TCConsentBridge.getAcceptedCategories();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Get the list of all accepted vendors.
|
|
89
|
+
*
|
|
90
|
+
* @return a List of PRIVACY_VEN_IDs.
|
|
91
|
+
*/
|
|
92
|
+
static getAcceptedVendors() {
|
|
93
|
+
return _TCConsent.TCConsentBridge.getAcceptedVendors();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Get the list of all accepted vendors.
|
|
98
|
+
*
|
|
99
|
+
* @return a List of acm_IDs.
|
|
100
|
+
*/
|
|
101
|
+
static getAcceptedGoogleVendors() {
|
|
102
|
+
return _TCConsent.TCConsentBridge.getAcceptedGoogleVendors();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Get the list of everything that was accepted.
|
|
107
|
+
*
|
|
108
|
+
* @param appContext the application context.
|
|
109
|
+
* @return a List of PRIVACY_VEN_IDs and PRIVACY_CAT_IDs.
|
|
110
|
+
*/
|
|
111
|
+
static getAllAcceptedConsent() {
|
|
112
|
+
return _TCConsent.TCConsentBridge.getAllAcceptedConsent();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Checks if we should display privacy center for any reason.
|
|
117
|
+
* @param context the application context.
|
|
118
|
+
* @return True or False.
|
|
119
|
+
*/
|
|
120
|
+
static shouldDisplayPrivacyCenter() {
|
|
121
|
+
return _TCConsent.TCConsentBridge.shouldDisplayPrivacyCenter();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.TCConsentAPI = TCConsentAPI;
|
|
125
|
+
//# sourceMappingURL=TCConsentAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_TCConsent","require","TCConsentAPI","isConsentAlreadyGiven","TCConsentBridge","getLastTimeConsentWasSaved","isCategoryAccepted","ID","isVendorAccepted","isIABPurposeAccepted","isIABVendorAccepted","isIABSpecialFeatureAccepted","getAcceptedCategories","getAcceptedVendors","getAcceptedGoogleVendors","getAllAcceptedConsent","shouldDisplayPrivacyCenter","exports"],"sourceRoot":"../../src","sources":["TCConsentAPI.tsx"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEO,MAAMC,YAAY,CACzB;EACI;AACJ;AACA;AACA;AACA;EACI,OAAcC,qBAAqBA,CAAA,EACnC;IACI,OAAOC,0BAAe,CAACD,qBAAqB,CAAC,CAAC;EAClD;;EAEA;AACJ;AACA;AACA;AACA;EACI,OAAcE,0BAA0BA,CAAA,EACxC;IACI,OAAOD,0BAAe,CAACC,0BAA0B,CAAC,CAAC;EACvD;;EAEA;AACJ;AACA;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AAA,CAAAf,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
TCConsentAPI: true
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "TCConsentAPI", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return _TCConsentAPI.TCConsentAPI;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
var _TCConsentAPI = require("./TCConsentAPI");
|
|
16
|
+
var _TCConsent = require("./TCConsent");
|
|
17
|
+
Object.keys(_TCConsent).forEach(function (key) {
|
|
18
|
+
if (key === "default" || key === "__esModule") return;
|
|
19
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
20
|
+
if (key in exports && exports[key] === _TCConsent[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _TCConsent[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_TCConsentAPI","require","_TCConsent","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,UAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,UAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,UAAA,CAAAI,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { NativeModules, Platform, NativeEventEmitter } from 'react-native';
|
|
2
|
+
import { TCUserInstance } from '@commandersact/tccore-react-native';
|
|
3
|
+
const LINKING_ERROR = `The package 'tcconsent-react-native' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
|
|
4
|
+
ios: "- You have run 'pod install'\n",
|
|
5
|
+
default: ''
|
|
6
|
+
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
7
|
+
export const TCConsentBridge = NativeModules.TcconsentReactNative ? NativeModules.TcconsentReactNative : new Proxy({}, {
|
|
8
|
+
get() {
|
|
9
|
+
throw new Error(LINKING_ERROR);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const eventEmitter = new NativeEventEmitter(TCConsentBridge);
|
|
13
|
+
eventEmitter.addListener('consentUpdated', _ => {});
|
|
14
|
+
eventEmitter.addListener('consentOutdated', _ => {});
|
|
15
|
+
eventEmitter.addListener('consentCategoryChanged', _ => {});
|
|
16
|
+
eventEmitter.addListener('significantChangesInPrivacy', _ => {});
|
|
17
|
+
eventEmitter.addListener('refreshTCUser', refreshTCUser);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Initialise your TCConsent module with your own siteID/privacyID values
|
|
21
|
+
*
|
|
22
|
+
* @param siteId
|
|
23
|
+
* @param privacyID
|
|
24
|
+
*/
|
|
25
|
+
export async function setSiteIDPrivacyID(siteId, privacyID) {
|
|
26
|
+
await TCConsentBridge.setSiteIDPrivacyID(siteId, privacyID);
|
|
27
|
+
}
|
|
28
|
+
export function acceptAllConsent() {
|
|
29
|
+
TCConsentBridge.acceptAllConsent();
|
|
30
|
+
}
|
|
31
|
+
export function refuseAllConsent() {
|
|
32
|
+
TCConsentBridge.refuseAllConsent();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Show the Privacy Center with the specified options.
|
|
37
|
+
*
|
|
38
|
+
* @param {EPrivacyCenterStartScreen} startScreen - The starting screen for the Privacy Center, could be kTCStartWithVendorScreen or kTCStartWithPurposeScreen.
|
|
39
|
+
* @param {string | null} customAndroidTitle - Optional title value for your privacy center activity on android.
|
|
40
|
+
* @returns {void}
|
|
41
|
+
*/
|
|
42
|
+
export function showPrivacyCenter(startScreen = EPrivacyCenterStartScreen.kTCStartWithDefault, customAndroidTitle = null) {
|
|
43
|
+
if (Platform.OS === 'ios') {
|
|
44
|
+
TCConsentBridge.showPrivacyCenter(startScreen);
|
|
45
|
+
} else if (Platform.OS === 'android') {
|
|
46
|
+
TCConsentBridge.showPrivacyCenter(startScreen, customAndroidTitle);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Enable google ACString usage [IAB Users only]
|
|
52
|
+
*
|
|
53
|
+
* @param useACString boolean value.
|
|
54
|
+
*/
|
|
55
|
+
export function useACString(useACString) {
|
|
56
|
+
TCConsentBridge.useACString(useACString);
|
|
57
|
+
}
|
|
58
|
+
export function setConsentDuration(months) {
|
|
59
|
+
TCConsentBridge.setConsentDuration(months);
|
|
60
|
+
}
|
|
61
|
+
export function useCustomPublisherRestrictions() {
|
|
62
|
+
TCConsentBridge.useCustomPublisherRestrictions();
|
|
63
|
+
}
|
|
64
|
+
export function statEnterPCToVendorScreen() {
|
|
65
|
+
TCConsentBridge.statEnterPCToVendorScreen();
|
|
66
|
+
}
|
|
67
|
+
export function statShowVendorScreen() {
|
|
68
|
+
TCConsentBridge.statShowVendorScreen();
|
|
69
|
+
}
|
|
70
|
+
export function statViewPrivacyPoliciesFromPrivacyCenter() {
|
|
71
|
+
TCConsentBridge.statViewPrivacyPoliciesFromPrivacyCenter();
|
|
72
|
+
}
|
|
73
|
+
export function statViewPrivacyCenter() {
|
|
74
|
+
TCConsentBridge.statViewPrivacyCenter();
|
|
75
|
+
}
|
|
76
|
+
export function statViewBanner() {
|
|
77
|
+
TCConsentBridge.statViewBanner();
|
|
78
|
+
}
|
|
79
|
+
export async function getConsentAsJson() {
|
|
80
|
+
return TCConsentBridge.consentAsJson();
|
|
81
|
+
}
|
|
82
|
+
export async function resetSavedConsent() {
|
|
83
|
+
TCConsentBridge.resetSavedConsent();
|
|
84
|
+
}
|
|
85
|
+
export async function setLanguage(languageCode) {
|
|
86
|
+
return TCConsentBridge.setLanguage(languageCode);
|
|
87
|
+
}
|
|
88
|
+
export async function statViewPrivacyPoliciesFromBanner() {
|
|
89
|
+
return TCConsentBridge.statViewPrivacyPoliciesFromBanner();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* fetches TCConsent.consentVersion on the device.
|
|
94
|
+
*
|
|
95
|
+
* @returns a Promise for the consentVersion native value.
|
|
96
|
+
*/
|
|
97
|
+
export async function getConsentVersion() {
|
|
98
|
+
return TCConsentBridge.getConsentVersion();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* set consentVersion manually for your privacy hits.
|
|
103
|
+
*
|
|
104
|
+
* @param consentVersion string value.
|
|
105
|
+
*/
|
|
106
|
+
export async function setConsentVersion(consentVersion) {
|
|
107
|
+
TCConsentBridge.setConsentVersion(consentVersion);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* set TCConsent.do_not_track value for your privacy hits.
|
|
112
|
+
*
|
|
113
|
+
* @param value boolean value.
|
|
114
|
+
*/
|
|
115
|
+
export async function do_not_track(value) {
|
|
116
|
+
TCConsentBridge.do_not_track(value);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Android OS only ! disable the back button on your privacy center.
|
|
121
|
+
*
|
|
122
|
+
* @param value boolean value, true for enabled button, false for disabled.
|
|
123
|
+
*/
|
|
124
|
+
export async function deactivateBackButton(value) {
|
|
125
|
+
if (Platform.OS === 'android') {
|
|
126
|
+
TCConsentBridge.deactivateBackButton(value);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Sets the consent switches state first time privacy center is shown.
|
|
132
|
+
*
|
|
133
|
+
* @param value boolean value, true for enabled switch per default, false for disabled.
|
|
134
|
+
|
|
135
|
+
export async function switchDefaultState(value: boolean)
|
|
136
|
+
{
|
|
137
|
+
TCConsentBridge.switchDefaultState(value)
|
|
138
|
+
}*/
|
|
139
|
+
|
|
140
|
+
function refreshTCUser(userScheme) {
|
|
141
|
+
if (Platform.OS === 'ios') {
|
|
142
|
+
TCUserInstance.initValues(userScheme);
|
|
143
|
+
} else if (Platform.OS === 'android') {
|
|
144
|
+
TCUserInstance.initValues(JSON.parse(userScheme));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
export let ETCConsentSource = /*#__PURE__*/function (ETCConsentSource) {
|
|
148
|
+
ETCConsentSource["POP_UP"] = "POP_UP";
|
|
149
|
+
ETCConsentSource["PRIVACY_CENTER"] = "PRIVACY_CENTER";
|
|
150
|
+
return ETCConsentSource;
|
|
151
|
+
}({});
|
|
152
|
+
export let ETCConsentAction = /*#__PURE__*/function (ETCConsentAction) {
|
|
153
|
+
ETCConsentAction["ACCEPT_ALL"] = "ACCEPT_ALL";
|
|
154
|
+
ETCConsentAction["REFUSE_ALL"] = "REFUSE_ALL";
|
|
155
|
+
ETCConsentAction["SAVE"] = "SAVE";
|
|
156
|
+
return ETCConsentAction;
|
|
157
|
+
}({});
|
|
158
|
+
export let EPrivacyCenterStartScreen = /*#__PURE__*/function (EPrivacyCenterStartScreen) {
|
|
159
|
+
EPrivacyCenterStartScreen["kTCStartWithVendorScreen"] = "startWithVendorScreen";
|
|
160
|
+
EPrivacyCenterStartScreen["kTCStartWithPurposeScreen"] = "startWithPurposeScreen";
|
|
161
|
+
EPrivacyCenterStartScreen["kTCStartWithDefault"] = "kTCStartWithDefault";
|
|
162
|
+
return EPrivacyCenterStartScreen;
|
|
163
|
+
}({});
|
|
164
|
+
//# sourceMappingURL=TCConsent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","NativeEventEmitter","TCUserInstance","LINKING_ERROR","select","ios","default","TCConsentBridge","TcconsentReactNative","Proxy","get","Error","eventEmitter","addListener","_","refreshTCUser","setSiteIDPrivacyID","siteId","privacyID","acceptAllConsent","refuseAllConsent","showPrivacyCenter","startScreen","EPrivacyCenterStartScreen","kTCStartWithDefault","customAndroidTitle","OS","useACString","setConsentDuration","months","useCustomPublisherRestrictions","statEnterPCToVendorScreen","statShowVendorScreen","statViewPrivacyPoliciesFromPrivacyCenter","statViewPrivacyCenter","statViewBanner","getConsentAsJson","consentAsJson","resetSavedConsent","setLanguage","languageCode","statViewPrivacyPoliciesFromBanner","getConsentVersion","setConsentVersion","consentVersion","do_not_track","value","deactivateBackButton","userScheme","initValues","JSON","parse","ETCConsentSource","ETCConsentAction"],"sourceRoot":"../../src","sources":["TCConsent.tsx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,EAAEC,kBAAkB,QAAQ,cAAc;AAC1E,SAASC,cAAc,QAAQ,oCAAoC;AAEnE,MAAMC,aAAa,GACjB,iFAAiF,GACjFH,QAAQ,CAACI,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,OAAO,MAAMC,eAAe,GAAGR,aAAa,CAACS,oBAAoB,GAC7DT,aAAa,CAACS,oBAAoB,GAClC,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK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,iBAAiBA,CAACC,cAAsB,EAC9D;EACIrC,eAAe,CAACoC,iBAAiB,CAACC,cAAc,CAAC;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,YAAYA,CAACC,KAAc,EACjD;EACIvC,eAAe,CAACsC,YAAY,CAACC,KAAK,CAAC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,oBAAoBA,CAACD,KAAc,EACzD;EACI,IAAI9C,QAAQ,CAAC0B,EAAE,KAAK,SAAS,EAC7B;IACInB,eAAe,CAACwC,oBAAoB,CAACD,KAAK,CAAC;EAC/C;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS/B,aAAaA,CAACiC,UAAe,EACtC;EACI,IAAIhD,QAAQ,CAAC0B,EAAE,KAAK,KAAK,EACzB;IACIxB,cAAc,CAAC+C,UAAU,CAACD,UAAU,CAAC;EACzC,CAAC,MACI,IAAIhD,QAAQ,CAAC0B,EAAE,KAAK,SAAS,EAClC;IACIxB,cAAc,CAAC+C,UAAU,CAACC,IAAI,CAACC,KAAK,CAACH,UAAoB,CAAC,CAAC;EAC/D;AACJ;AAEA,WAAYI,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAM5B,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAO5B,WAAY9B,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { TCConsentBridge } from "./TCConsent";
|
|
2
|
+
export class TCConsentAPI {
|
|
3
|
+
/**
|
|
4
|
+
* Checks if kTCPrivacyConsent is empty.
|
|
5
|
+
*
|
|
6
|
+
* @return true if the consent was already given, false otherwise.
|
|
7
|
+
*/
|
|
8
|
+
static isConsentAlreadyGiven() {
|
|
9
|
+
return TCConsentBridge.isConsentAlreadyGiven();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Return the epochformatted timestamp of the last time the consent was saved.
|
|
14
|
+
*
|
|
15
|
+
* @return epochformatted timestamp or 0.
|
|
16
|
+
*/
|
|
17
|
+
static getLastTimeConsentWasSaved() {
|
|
18
|
+
return TCConsentBridge.getLastTimeConsentWasSaved();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Check if a Category has been accepted.
|
|
23
|
+
*
|
|
24
|
+
* @param ID the category ID.
|
|
25
|
+
* @return true or false.
|
|
26
|
+
*/
|
|
27
|
+
static isCategoryAccepted(ID) {
|
|
28
|
+
return TCConsentBridge.isCategoryAccepted(ID);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Check if a vendor has been accepted.
|
|
33
|
+
*
|
|
34
|
+
* @param ID the vendor ID.
|
|
35
|
+
* @return true or false.
|
|
36
|
+
*/
|
|
37
|
+
static isVendorAccepted(ID) {
|
|
38
|
+
return TCConsentBridge.isVendorAccepted(ID);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Check if a purpose has been accepted.
|
|
43
|
+
*
|
|
44
|
+
* @param ID the purpose ID.
|
|
45
|
+
* @return true or false.
|
|
46
|
+
*/
|
|
47
|
+
static isIABPurposeAccepted(ID) {
|
|
48
|
+
return TCConsentBridge.isIABPurposeAccepted(ID);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a vendor has been accepted.
|
|
53
|
+
*
|
|
54
|
+
* @param ID the vendor ID.
|
|
55
|
+
* @return true or false.
|
|
56
|
+
*/
|
|
57
|
+
static isIABVendorAccepted(ID) {
|
|
58
|
+
return TCConsentBridge.isIABVendorAccepted(ID);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Check if a special feature has been accepted.
|
|
63
|
+
*
|
|
64
|
+
* @param ID the vendor ID.
|
|
65
|
+
* @param appContext the application context.
|
|
66
|
+
* @return true or false.
|
|
67
|
+
*/
|
|
68
|
+
static isIABSpecialFeatureAccepted(ID) {
|
|
69
|
+
return TCConsentBridge.isIABSpecialFeatureAccepted(ID);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Get the list of all accepted categories.
|
|
74
|
+
*
|
|
75
|
+
* @return a List of PRIVACY_CAT_IDs.
|
|
76
|
+
*/
|
|
77
|
+
static getAcceptedCategories() {
|
|
78
|
+
return TCConsentBridge.getAcceptedCategories();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Get the list of all accepted vendors.
|
|
83
|
+
*
|
|
84
|
+
* @return a List of PRIVACY_VEN_IDs.
|
|
85
|
+
*/
|
|
86
|
+
static getAcceptedVendors() {
|
|
87
|
+
return TCConsentBridge.getAcceptedVendors();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Get the list of all accepted vendors.
|
|
92
|
+
*
|
|
93
|
+
* @return a List of acm_IDs.
|
|
94
|
+
*/
|
|
95
|
+
static getAcceptedGoogleVendors() {
|
|
96
|
+
return TCConsentBridge.getAcceptedGoogleVendors();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Get the list of everything that was accepted.
|
|
101
|
+
*
|
|
102
|
+
* @param appContext the application context.
|
|
103
|
+
* @return a List of PRIVACY_VEN_IDs and PRIVACY_CAT_IDs.
|
|
104
|
+
*/
|
|
105
|
+
static getAllAcceptedConsent() {
|
|
106
|
+
return TCConsentBridge.getAllAcceptedConsent();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Checks if we should display privacy center for any reason.
|
|
111
|
+
* @param context the application context.
|
|
112
|
+
* @return True or False.
|
|
113
|
+
*/
|
|
114
|
+
static shouldDisplayPrivacyCenter() {
|
|
115
|
+
return TCConsentBridge.shouldDisplayPrivacyCenter();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=TCConsentAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TCConsentBridge","TCConsentAPI","isConsentAlreadyGiven","getLastTimeConsentWasSaved","isCategoryAccepted","ID","isVendorAccepted","isIABPurposeAccepted","isIABVendorAccepted","isIABSpecialFeatureAccepted","getAcceptedCategories","getAcceptedVendors","getAcceptedGoogleVendors","getAllAcceptedConsent","shouldDisplayPrivacyCenter"],"sourceRoot":"../../src","sources":["TCConsentAPI.tsx"],"mappings":"AAAA,SAASA,eAAe,QAAQ,aAAa;AAE7C,OAAO,MAAMC,YAAY,CACzB;EACI;AACJ;AACA;AACA;AACA;EACI,OAAcC,qBAAqBA,CAAA,EACnC;IACI,OAAOF,eAAe,CAACE,qBAAqB,CAAC,CAAC;EAClD;;EAEA;AACJ;AACA;AACA;AACA;EACI,OAAcC,0BAA0BA,CAAA,EACxC;IACI,OAAOH,eAAe,CAACG,0BAA0B,CAAC,CAAC;EACvD;;EAEA;AACJ;AACA;AACA;AACA;AACA;EACI,OAAcC,kBAAkBA,CAACC,EAAU,EAC3C;IACI,OAAOL,eAAe,CAACI,kBAAkB,CAACC,EAAE,CAAC;EACjD;;EAEA;AACJ;AACA;AACA;AACA;AACA;EACI,OAAcC,gBAAgBA,CAACD,EAAU,EACzC;IACI,OAAOL,eAAe,CAACM,gBAAgB,CAACD,EAAE,CAAC;EAC/C;;EAEA;AACJ;AACA;AACA;AACA;AACA;EACI,OAAcE,oBAAoBA,CAACF,EAAU,EAC7C;IACI,OAAOL,eAAe,CAACO,oBAAoB,CAACF,EAAE,CAAC;EACnD;;EAEA;AACJ;AACA;AACA;AACA;AACA;EACI,OAAcG,mBAAmBA,CAACH,EAAU,EAC5C;IACI,OAAOL,eAAe,CAACQ,mBAAmB,CAACH,EAAE,CAAC;EAClD;;EAEA;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,OAAcI,2BAA2BA,CAACJ,EAAU,EACpD;IACI,OAAOL,eAAe,CAACS,2BAA2B,CAACJ,EAAE,CAAC;EAC1D;;EAEA;AACJ;AACA;AACA;AACA;EACI,OAAcK,qBAAqBA,CAAA,EACnC;IACI,OAAOV,eAAe,CAACU,qBAAqB,CAAC,CAAC;EAClD;;EAEA;AACJ;AACA;AACA;AACA;EACI,OAAcC,kBAAkBA,CAAA,EAChC;IACI,OAAOX,eAAe,CAACW,kBAAkB,CAAC,CAAC;EAC/C;;EAEA;AACJ;AACA;AACA;AACA;EACI,OAAcC,wBAAwBA,CAAA,EACtC;IACI,OAAOZ,eAAe,CAACY,wBAAwB,CAAC,CAAC;EACrD;;EAEA;AACJ;AACA;AACA;AACA;AACA;EACI,OAAcC,qBAAqBA,CAAA,EACnC;IACI,OAAOb,eAAe,CAACa,qBAAqB,CAAC,CAAC;EAClD;;EAEA;AACJ;AACA;AACA;AACA;EACI,OAAcC,0BAA0BA,CAAA,EACxC;IACG,OAAOd,eAAe,CAACc,0BAA0B,CAAC,CAAC;EACtD;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TCConsentAPI"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,cAAc,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare const TCConsentBridge: any;
|
|
2
|
+
/**
|
|
3
|
+
* Initialise your TCConsent module with your own siteID/privacyID values
|
|
4
|
+
*
|
|
5
|
+
* @param siteId
|
|
6
|
+
* @param privacyID
|
|
7
|
+
*/
|
|
8
|
+
export declare function setSiteIDPrivacyID(siteId: number, privacyID: number): Promise<void>;
|
|
9
|
+
export declare function acceptAllConsent(): void;
|
|
10
|
+
export declare function refuseAllConsent(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Show the Privacy Center with the specified options.
|
|
13
|
+
*
|
|
14
|
+
* @param {EPrivacyCenterStartScreen} startScreen - The starting screen for the Privacy Center, could be kTCStartWithVendorScreen or kTCStartWithPurposeScreen.
|
|
15
|
+
* @param {string | null} customAndroidTitle - Optional title value for your privacy center activity on android.
|
|
16
|
+
* @returns {void}
|
|
17
|
+
*/
|
|
18
|
+
export declare function showPrivacyCenter(startScreen?: EPrivacyCenterStartScreen, customAndroidTitle?: string | null): void;
|
|
19
|
+
/**
|
|
20
|
+
* Enable google ACString usage [IAB Users only]
|
|
21
|
+
*
|
|
22
|
+
* @param useACString boolean value.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useACString(useACString: boolean): void;
|
|
25
|
+
export declare function setConsentDuration(months: number): void;
|
|
26
|
+
export declare function useCustomPublisherRestrictions(): void;
|
|
27
|
+
export declare function statEnterPCToVendorScreen(): void;
|
|
28
|
+
export declare function statShowVendorScreen(): void;
|
|
29
|
+
export declare function statViewPrivacyPoliciesFromPrivacyCenter(): void;
|
|
30
|
+
export declare function statViewPrivacyCenter(): void;
|
|
31
|
+
export declare function statViewBanner(): void;
|
|
32
|
+
export declare function getConsentAsJson(): Promise<string>;
|
|
33
|
+
export declare function resetSavedConsent(): Promise<void>;
|
|
34
|
+
export declare function setLanguage(languageCode: string): Promise<any>;
|
|
35
|
+
export declare function statViewPrivacyPoliciesFromBanner(): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* fetches TCConsent.consentVersion on the device.
|
|
38
|
+
*
|
|
39
|
+
* @returns a Promise for the consentVersion native value.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getConsentVersion(): Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* set consentVersion manually for your privacy hits.
|
|
44
|
+
*
|
|
45
|
+
* @param consentVersion string value.
|
|
46
|
+
*/
|
|
47
|
+
export declare function setConsentVersion(consentVersion: string): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* set TCConsent.do_not_track value for your privacy hits.
|
|
50
|
+
*
|
|
51
|
+
* @param value boolean value.
|
|
52
|
+
*/
|
|
53
|
+
export declare function do_not_track(value: boolean): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Android OS only ! disable the back button on your privacy center.
|
|
56
|
+
*
|
|
57
|
+
* @param value boolean value, true for enabled button, false for disabled.
|
|
58
|
+
*/
|
|
59
|
+
export declare function deactivateBackButton(value: boolean): Promise<void>;
|
|
60
|
+
export declare enum ETCConsentSource {
|
|
61
|
+
POP_UP = "POP_UP",
|
|
62
|
+
PRIVACY_CENTER = "PRIVACY_CENTER"
|
|
63
|
+
}
|
|
64
|
+
export declare enum ETCConsentAction {
|
|
65
|
+
ACCEPT_ALL = "ACCEPT_ALL",
|
|
66
|
+
REFUSE_ALL = "REFUSE_ALL",
|
|
67
|
+
SAVE = "SAVE"
|
|
68
|
+
}
|
|
69
|
+
export declare enum EPrivacyCenterStartScreen {
|
|
70
|
+
kTCStartWithVendorScreen = "startWithVendorScreen",
|
|
71
|
+
kTCStartWithPurposeScreen = "startWithPurposeScreen",
|
|
72
|
+
kTCStartWithDefault = "kTCStartWithDefault"
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=TCConsent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TCConsent.d.ts","sourceRoot":"","sources":["../../src/TCConsent.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,KASvB,CAAC;AAUN;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAGzE;AAED,wBAAgB,gBAAgB,SAG/B;AAED,wBAAgB,gBAAgB,SAG/B;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,GAAE,yBAAyE,EAAE,kBAAkB,GAAC,MAAM,GAAG,IAAW,QAUhK;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,OAAO,QAG/C;AAID,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,QAGhD;AAED,wBAAgB,8BAA8B,SAG7C;AAQD,wBAAgB,yBAAyB,SAGxC;AAED,wBAAgB,oBAAoB,SAGnC;AAED,wBAAgB,wCAAwC,SAGvD;AAED,wBAAgB,qBAAqB,SAGpC;AAED,wBAAgB,cAAc,SAG7B;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAGxD;AAED,wBAAsB,iBAAiB,kBAGtC;AAED,wBAAsB,WAAW,CAAC,YAAY,EAAE,MAAM,gBAGrD;AAED,wBAAsB,iCAAiC,iBAGtD;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAGzD;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,cAAc,EAAE,MAAM,iBAG7D;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,OAAO,iBAGhD;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,OAAO,iBAMxD;AAwBD,oBAAY,gBAAgB;IAExB,MAAM,WAAW;IACjB,cAAc,mBAAmB;CACpC;AAED,oBAAY,gBAAgB;IAE1B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,IAAI,SAAS;CACd;AAED,oBAAY,yBAAyB;IAEjC,wBAAwB,0BAA0B;IAClD,yBAAyB,2BAA2B;IACpD,mBAAmB,wBAAwB;CAC9C"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export declare class TCConsentAPI {
|
|
2
|
+
/**
|
|
3
|
+
* Checks if kTCPrivacyConsent is empty.
|
|
4
|
+
*
|
|
5
|
+
* @return true if the consent was already given, false otherwise.
|
|
6
|
+
*/
|
|
7
|
+
static isConsentAlreadyGiven(): Promise<boolean>;
|
|
8
|
+
/**
|
|
9
|
+
* Return the epochformatted timestamp of the last time the consent was saved.
|
|
10
|
+
*
|
|
11
|
+
* @return epochformatted timestamp or 0.
|
|
12
|
+
*/
|
|
13
|
+
static getLastTimeConsentWasSaved(): Promise<number>;
|
|
14
|
+
/**
|
|
15
|
+
* Check if a Category has been accepted.
|
|
16
|
+
*
|
|
17
|
+
* @param ID the category ID.
|
|
18
|
+
* @return true or false.
|
|
19
|
+
*/
|
|
20
|
+
static isCategoryAccepted(ID: number): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a vendor has been accepted.
|
|
23
|
+
*
|
|
24
|
+
* @param ID the vendor ID.
|
|
25
|
+
* @return true or false.
|
|
26
|
+
*/
|
|
27
|
+
static isVendorAccepted(ID: number): Promise<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Check if a purpose has been accepted.
|
|
30
|
+
*
|
|
31
|
+
* @param ID the purpose ID.
|
|
32
|
+
* @return true or false.
|
|
33
|
+
*/
|
|
34
|
+
static isIABPurposeAccepted(ID: number): Promise<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* Check if a vendor has been accepted.
|
|
37
|
+
*
|
|
38
|
+
* @param ID the vendor ID.
|
|
39
|
+
* @return true or false.
|
|
40
|
+
*/
|
|
41
|
+
static isIABVendorAccepted(ID: number): Promise<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Check if a special feature has been accepted.
|
|
44
|
+
*
|
|
45
|
+
* @param ID the vendor ID.
|
|
46
|
+
* @param appContext the application context.
|
|
47
|
+
* @return true or false.
|
|
48
|
+
*/
|
|
49
|
+
static isIABSpecialFeatureAccepted(ID: number): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Get the list of all accepted categories.
|
|
52
|
+
*
|
|
53
|
+
* @return a List of PRIVACY_CAT_IDs.
|
|
54
|
+
*/
|
|
55
|
+
static getAcceptedCategories(): Promise<Array<String>>;
|
|
56
|
+
/**
|
|
57
|
+
* Get the list of all accepted vendors.
|
|
58
|
+
*
|
|
59
|
+
* @return a List of PRIVACY_VEN_IDs.
|
|
60
|
+
*/
|
|
61
|
+
static getAcceptedVendors(): Promise<Array<String>>;
|
|
62
|
+
/**
|
|
63
|
+
* Get the list of all accepted vendors.
|
|
64
|
+
*
|
|
65
|
+
* @return a List of acm_IDs.
|
|
66
|
+
*/
|
|
67
|
+
static getAcceptedGoogleVendors(): Promise<Array<String>>;
|
|
68
|
+
/**
|
|
69
|
+
* Get the list of everything that was accepted.
|
|
70
|
+
*
|
|
71
|
+
* @param appContext the application context.
|
|
72
|
+
* @return a List of PRIVACY_VEN_IDs and PRIVACY_CAT_IDs.
|
|
73
|
+
*/
|
|
74
|
+
static getAllAcceptedConsent(): Promise<Array<String>>;
|
|
75
|
+
/**
|
|
76
|
+
* Checks if we should display privacy center for any reason.
|
|
77
|
+
* @param context the application context.
|
|
78
|
+
* @return True or False.
|
|
79
|
+
*/
|
|
80
|
+
static shouldDisplayPrivacyCenter(): Promise<boolean>;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=TCConsentAPI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TCConsentAPI.d.ts","sourceRoot":"","sources":["../../src/TCConsentAPI.tsx"],"names":[],"mappings":"AAEA,qBAAa,YAAY;IAErB;;;;OAIG;WACW,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC;IAKvD;;;;OAIG;WACW,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC;IAK3D;;;;;OAKG;WACW,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK9D;;;;;OAKG;WACW,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK5D;;;;;OAKG;WACW,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKhE;;;;;OAKG;WACW,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK/D;;;;;;OAMG;WACW,2BAA2B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKvE;;;;OAIG;WACW,qBAAqB,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAK7D;;;;OAIG;WACW,kBAAkB,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAK1D;;;;OAIG;WACW,wBAAwB,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAKhE;;;;;OAKG;WACW,qBAAqB,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAK7D;;;;OAIG;WACW,0BAA0B,IAAI,OAAO,CAAC,OAAO,CAAC;CAI/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,cAAc,aAAa,CAAC"}
|