@osano/osano-cmp-react-native 0.1.0
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.dev.md +58 -0
- package/README.md +1 -0
- package/android/build.gradle +94 -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/OsanoCMPSDK/OsanoCMPSDKModule.kt +72 -0
- package/android/src/main/java/com/OsanoCMPSDK/OsanoCMPSDKPackage.kt +17 -0
- package/ios/OsanoCmpSDK.mm +43 -0
- package/ios/OsanoCmpSdk.h +12 -0
- package/lib/commonjs/ConsentManager.js +529 -0
- package/lib/commonjs/ConsentManager.js.map +1 -0
- package/lib/commonjs/ConsentUiBuilder.js +75 -0
- package/lib/commonjs/ConsentUiBuilder.js.map +1 -0
- package/lib/commonjs/components/Button.js +222 -0
- package/lib/commonjs/components/Button.js.map +1 -0
- package/lib/commonjs/components/Checkbox.js +75 -0
- package/lib/commonjs/components/Checkbox.js.map +1 -0
- package/lib/commonjs/components/Divider.js +22 -0
- package/lib/commonjs/components/Divider.js.map +1 -0
- package/lib/commonjs/components/ExpansionPanel.js +70 -0
- package/lib/commonjs/components/ExpansionPanel.js.map +1 -0
- package/lib/commonjs/components/Link.js +51 -0
- package/lib/commonjs/components/Link.js.map +1 -0
- package/lib/commonjs/components/List.js +36 -0
- package/lib/commonjs/components/List.js.map +1 -0
- package/lib/commonjs/components/Locale.js +28 -0
- package/lib/commonjs/components/Locale.js.map +1 -0
- package/lib/commonjs/components/StoragePolicyLink.js +32 -0
- package/lib/commonjs/components/StoragePolicyLink.js.map +1 -0
- package/lib/commonjs/components/Toggle.js +113 -0
- package/lib/commonjs/components/Toggle.js.map +1 -0
- package/lib/commonjs/constants.js +37 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/context.js +40 -0
- package/lib/commonjs/context.js.map +1 -0
- package/lib/commonjs/flavors/five.json +11 -0
- package/lib/commonjs/flavors/four.json +11 -0
- package/lib/commonjs/flavors/index.js +32 -0
- package/lib/commonjs/flavors/index.js.map +1 -0
- package/lib/commonjs/flavors/one.json +11 -0
- package/lib/commonjs/flavors/six.json +12 -0
- package/lib/commonjs/flavors/three.json +11 -0
- package/lib/commonjs/flavors/two.json +11 -0
- package/lib/commonjs/hooks/useBoundCallback.js +32 -0
- package/lib/commonjs/hooks/useBoundCallback.js.map +1 -0
- package/lib/commonjs/hooks/useDeviceOrientation.js +20 -0
- package/lib/commonjs/hooks/useDeviceOrientation.js.map +1 -0
- package/lib/commonjs/hooks/usePrevious.js +15 -0
- package/lib/commonjs/hooks/usePrevious.js.map +1 -0
- package/lib/commonjs/hooks/useThunkReducer.js +62 -0
- package/lib/commonjs/hooks/useThunkReducer.js.map +1 -0
- package/lib/commonjs/iab/constants.js +8 -0
- package/lib/commonjs/iab/constants.js.map +1 -0
- package/lib/commonjs/iab/gpp/api.js +226 -0
- package/lib/commonjs/iab/gpp/api.js.map +1 -0
- package/lib/commonjs/iab/gpp/consent.js +99 -0
- package/lib/commonjs/iab/gpp/consent.js.map +1 -0
- package/lib/commonjs/iab/gpp/constants.js +56 -0
- package/lib/commonjs/iab/gpp/constants.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/AbstractBase64UrlEncoder.js +139 -0
- package/lib/commonjs/iab/gpp/encoders/AbstractBase64UrlEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/BooleanEncoder.js +47 -0
- package/lib/commonjs/iab/gpp/encoders/BooleanEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/CompressedBase64UrlEncoder.js +49 -0
- package/lib/commonjs/iab/gpp/encoders/CompressedBase64UrlEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/DatetimeEncoder.js +48 -0
- package/lib/commonjs/iab/gpp/encoders/DatetimeEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/EncodableOptimizedFixedRange.js +184 -0
- package/lib/commonjs/iab/gpp/encoders/EncodableOptimizedFixedRange.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/FibonacciIntegerEncoder.js +81 -0
- package/lib/commonjs/iab/gpp/encoders/FibonacciIntegerEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/FibonacciIntegerRangeEncoder.js +104 -0
- package/lib/commonjs/iab/gpp/encoders/FibonacciIntegerRangeEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/FixedBitfieldEncoder.js +56 -0
- package/lib/commonjs/iab/gpp/encoders/FixedBitfieldEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/FixedIdBitMapEncoder.js +27 -0
- package/lib/commonjs/iab/gpp/encoders/FixedIdBitMapEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/FixedIntegerEncoder.js +62 -0
- package/lib/commonjs/iab/gpp/encoders/FixedIntegerEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/FixedIntegerListEncoder.js +71 -0
- package/lib/commonjs/iab/gpp/encoders/FixedIntegerListEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/FixedIntegerRangeEncoder.js +88 -0
- package/lib/commonjs/iab/gpp/encoders/FixedIntegerRangeEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/FixedStringEncoder.js +68 -0
- package/lib/commonjs/iab/gpp/encoders/FixedStringEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/LICENSE-IABTechLab +176 -0
- package/lib/commonjs/iab/gpp/encoders/TraditionalBase64UrlEncoder.js +46 -0
- package/lib/commonjs/iab/gpp/encoders/TraditionalBase64UrlEncoder.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/errors.js +42 -0
- package/lib/commonjs/iab/gpp/encoders/errors.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/index.js +105 -0
- package/lib/commonjs/iab/gpp/encoders/index.js.map +1 -0
- package/lib/commonjs/iab/gpp/encoders/types.js +2 -0
- package/lib/commonjs/iab/gpp/encoders/types.js.map +1 -0
- package/lib/commonjs/iab/gpp/index.js +16 -0
- package/lib/commonjs/iab/gpp/index.js.map +1 -0
- package/lib/commonjs/iab/gpp/reducer.js +12 -0
- package/lib/commonjs/iab/gpp/reducer.js.map +1 -0
- package/lib/commonjs/iab/gpp/selectors.js +25 -0
- package/lib/commonjs/iab/gpp/selectors.js.map +1 -0
- package/lib/commonjs/iab/gpp/types.js +2 -0
- package/lib/commonjs/iab/gpp/types.js.map +1 -0
- package/lib/commonjs/iab/gpp/v1/constants.js +16 -0
- package/lib/commonjs/iab/gpp/v1/constants.js.map +1 -0
- package/lib/commonjs/iab/gpp/v1/index.js +73 -0
- package/lib/commonjs/iab/gpp/v1/index.js.map +1 -0
- package/lib/commonjs/iab/tcf/actions.js +20 -0
- package/lib/commonjs/iab/tcf/actions.js.map +1 -0
- package/lib/commonjs/iab/tcf/consent.js +306 -0
- package/lib/commonjs/iab/tcf/consent.js.map +1 -0
- package/lib/commonjs/iab/tcf/constants.js +44 -0
- package/lib/commonjs/iab/tcf/constants.js.map +1 -0
- package/lib/commonjs/iab/tcf/index.js +14 -0
- package/lib/commonjs/iab/tcf/index.js.map +1 -0
- package/lib/commonjs/iab/tcf/reducer.js +57 -0
- package/lib/commonjs/iab/tcf/reducer.js.map +1 -0
- package/lib/commonjs/iab/tcf/selectors.js +158 -0
- package/lib/commonjs/iab/tcf/selectors.js.map +1 -0
- package/lib/commonjs/iab/tcf/tcfcav1-api.js +41 -0
- package/lib/commonjs/iab/tcf/tcfcav1-api.js.map +1 -0
- package/lib/commonjs/iab/tcf/tcfeuv2-api.js +256 -0
- package/lib/commonjs/iab/tcf/tcfeuv2-api.js.map +1 -0
- package/lib/commonjs/iab/tcf/types.js +6 -0
- package/lib/commonjs/iab/tcf/types.js.map +1 -0
- package/lib/commonjs/iab/tcf/v2.0/encoders.js +39 -0
- package/lib/commonjs/iab/tcf/v2.0/encoders.js.map +1 -0
- package/lib/commonjs/iab/tcf/v2.0/formatters.js +21 -0
- package/lib/commonjs/iab/tcf/v2.0/formatters.js.map +1 -0
- package/lib/commonjs/iab/tcf/v2.0/helpers.js +25 -0
- package/lib/commonjs/iab/tcf/v2.0/helpers.js.map +1 -0
- package/lib/commonjs/iab/tcf/v2.0/index.js +39 -0
- package/lib/commonjs/iab/tcf/v2.0/index.js.map +1 -0
- package/lib/commonjs/iab/tcf/v2.0/middleware.js +80 -0
- package/lib/commonjs/iab/tcf/v2.0/middleware.js.map +1 -0
- package/lib/commonjs/iab/tcf/v2.0/reducer.js +318 -0
- package/lib/commonjs/iab/tcf/v2.0/reducer.js.map +1 -0
- package/lib/commonjs/iab/tcf/v2.0/shared-constants.js +22 -0
- package/lib/commonjs/iab/tcf/v2.0/shared-constants.js.map +1 -0
- package/lib/commonjs/iab/tcf/v2.0/tcfcav1-constants.js +63 -0
- package/lib/commonjs/iab/tcf/v2.0/tcfcav1-constants.js.map +1 -0
- package/lib/commonjs/iab/tcf/v2.0/tcfeuv2-constants.js +92 -0
- package/lib/commonjs/iab/tcf/v2.0/tcfeuv2-constants.js.map +1 -0
- package/lib/commonjs/iab/types.js +6 -0
- package/lib/commonjs/iab/types.js.map +1 -0
- package/lib/commonjs/iab/usp/api.js +59 -0
- package/lib/commonjs/iab/usp/api.js.map +1 -0
- package/lib/commonjs/iab/usp/consent.js +140 -0
- package/lib/commonjs/iab/usp/consent.js.map +1 -0
- package/lib/commonjs/iab/usp/constants.js +46 -0
- package/lib/commonjs/iab/usp/constants.js.map +1 -0
- package/lib/commonjs/iab/usp/index.js +16 -0
- package/lib/commonjs/iab/usp/index.js.map +1 -0
- package/lib/commonjs/iab/usp/reducer.js +121 -0
- package/lib/commonjs/iab/usp/reducer.js.map +1 -0
- package/lib/commonjs/iab/usp/selectors.js +35 -0
- package/lib/commonjs/iab/usp/selectors.js.map +1 -0
- package/lib/commonjs/iab/usp/types.js +2 -0
- package/lib/commonjs/iab/usp/types.js.map +1 -0
- package/lib/commonjs/iab/usp/v1/constants.js +16 -0
- package/lib/commonjs/iab/usp/v1/constants.js.map +1 -0
- package/lib/commonjs/iab/usp/v1/index.js +58 -0
- package/lib/commonjs/iab/usp/v1/index.js.map +1 -0
- package/lib/commonjs/iab/utilities.js +16 -0
- package/lib/commonjs/iab/utilities.js.map +1 -0
- package/lib/commonjs/index.js +129 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/locale/af.json +306 -0
- package/lib/commonjs/locale/ar.json +306 -0
- package/lib/commonjs/locale/bg.json +306 -0
- package/lib/commonjs/locale/ca.json +306 -0
- package/lib/commonjs/locale/cs.json +306 -0
- package/lib/commonjs/locale/da.json +306 -0
- package/lib/commonjs/locale/de-at.json +306 -0
- package/lib/commonjs/locale/de.json +306 -0
- package/lib/commonjs/locale/el.json +306 -0
- package/lib/commonjs/locale/en-au.json +306 -0
- package/lib/commonjs/locale/en-ca.json +306 -0
- package/lib/commonjs/locale/en-gb.json +306 -0
- package/lib/commonjs/locale/en.json +306 -0
- package/lib/commonjs/locale/es-mx.json +306 -0
- package/lib/commonjs/locale/es.json +306 -0
- package/lib/commonjs/locale/et.json +306 -0
- package/lib/commonjs/locale/fa.json +306 -0
- package/lib/commonjs/locale/fi.json +306 -0
- package/lib/commonjs/locale/fr-ca.json +306 -0
- package/lib/commonjs/locale/fr.json +306 -0
- package/lib/commonjs/locale/gd.json +306 -0
- package/lib/commonjs/locale/he.json +306 -0
- package/lib/commonjs/locale/hi.json +306 -0
- package/lib/commonjs/locale/hr.json +306 -0
- package/lib/commonjs/locale/hu.json +306 -0
- package/lib/commonjs/locale/hy.json +306 -0
- package/lib/commonjs/locale/id.json +306 -0
- package/lib/commonjs/locale/index.js +427 -0
- package/lib/commonjs/locale/index.js.map +1 -0
- package/lib/commonjs/locale/is.json +306 -0
- package/lib/commonjs/locale/it.json +306 -0
- package/lib/commonjs/locale/ja.json +306 -0
- package/lib/commonjs/locale/kk.json +306 -0
- package/lib/commonjs/locale/ko.json +306 -0
- package/lib/commonjs/locale/lt.json +306 -0
- package/lib/commonjs/locale/lv.json +306 -0
- package/lib/commonjs/locale/mi.json +306 -0
- package/lib/commonjs/locale/ms.json +306 -0
- package/lib/commonjs/locale/nb.json +306 -0
- package/lib/commonjs/locale/nl-be.json +306 -0
- package/lib/commonjs/locale/nl.json +306 -0
- package/lib/commonjs/locale/nn.json +306 -0
- package/lib/commonjs/locale/no.json +306 -0
- package/lib/commonjs/locale/pl.json +306 -0
- package/lib/commonjs/locale/pt-br.json +306 -0
- package/lib/commonjs/locale/pt.json +306 -0
- package/lib/commonjs/locale/ro.json +306 -0
- package/lib/commonjs/locale/ru.json +306 -0
- package/lib/commonjs/locale/sk.json +306 -0
- package/lib/commonjs/locale/sl.json +306 -0
- package/lib/commonjs/locale/sq.json +306 -0
- package/lib/commonjs/locale/sr.json +306 -0
- package/lib/commonjs/locale/sv.json +306 -0
- package/lib/commonjs/locale/th.json +306 -0
- package/lib/commonjs/locale/tl.json +306 -0
- package/lib/commonjs/locale/tr.json +306 -0
- package/lib/commonjs/locale/uk.json +306 -0
- package/lib/commonjs/locale/vi.json +306 -0
- package/lib/commonjs/locale/zh-hk.json +306 -0
- package/lib/commonjs/locale/zh-tw.json +306 -0
- package/lib/commonjs/locale/zh.json +306 -0
- package/lib/commonjs/locale/zu.json +306 -0
- package/lib/commonjs/native/OsanoCmp.js +33 -0
- package/lib/commonjs/native/OsanoCmp.js.map +1 -0
- package/lib/commonjs/services/consent.js +134 -0
- package/lib/commonjs/services/consent.js.map +1 -0
- package/lib/commonjs/services/disclosures.js +25 -0
- package/lib/commonjs/services/disclosures.js.map +1 -0
- package/lib/commonjs/services/locale.js +40 -0
- package/lib/commonjs/services/locale.js.map +1 -0
- package/lib/commonjs/store.js +558 -0
- package/lib/commonjs/store.js.map +1 -0
- package/lib/commonjs/styles.js +186 -0
- package/lib/commonjs/styles.js.map +1 -0
- package/lib/commonjs/types/consent-config.d.js +6 -0
- package/lib/commonjs/types/consent-config.d.js.map +1 -0
- package/lib/commonjs/types/env.d.js +2 -0
- package/lib/commonjs/types/env.d.js.map +1 -0
- package/lib/commonjs/types/index.d.js +6 -0
- package/lib/commonjs/types/index.d.js.map +1 -0
- package/lib/commonjs/types/store.d.js +6 -0
- package/lib/commonjs/types/store.d.js.map +1 -0
- package/lib/commonjs/utils/API.js +43 -0
- package/lib/commonjs/utils/API.js.map +1 -0
- package/lib/commonjs/utils/Color.js +99 -0
- package/lib/commonjs/utils/Color.js.map +1 -0
- package/lib/commonjs/utils/EventEmitter.js +53 -0
- package/lib/commonjs/utils/EventEmitter.js.map +1 -0
- package/lib/commonjs/utils/Translator.js +222 -0
- package/lib/commonjs/utils/Translator.js.map +1 -0
- package/lib/commonjs/utils/index.js +116 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/commonjs/views/Dialog/Buttons.js +76 -0
- package/lib/commonjs/views/Dialog/Buttons.js.map +1 -0
- package/lib/commonjs/views/Dialog/FirstLayerUsage.js +44 -0
- package/lib/commonjs/views/Dialog/FirstLayerUsage.js.map +1 -0
- package/lib/commonjs/views/Dialog/Message.js +30 -0
- package/lib/commonjs/views/Dialog/Message.js.map +1 -0
- package/lib/commonjs/views/Dialog/PreferenceManagementDeepLinks.js +46 -0
- package/lib/commonjs/views/Dialog/PreferenceManagementDeepLinks.js.map +1 -0
- package/lib/commonjs/views/Dialog/index.js +314 -0
- package/lib/commonjs/views/Dialog/index.js.map +1 -0
- package/lib/commonjs/views/Drawer/Drawer.ConsentCategories.js +627 -0
- package/lib/commonjs/views/Drawer/Drawer.ConsentCategories.js.map +1 -0
- package/lib/commonjs/views/Drawer/Drawer.Header.js +120 -0
- package/lib/commonjs/views/Drawer/Drawer.Header.js.map +1 -0
- package/lib/commonjs/views/Drawer/Drawer.Iab.Disclosures.js +311 -0
- package/lib/commonjs/views/Drawer/Drawer.Iab.Disclosures.js.map +1 -0
- package/lib/commonjs/views/Drawer/Drawer.Iab.Vendors.js +458 -0
- package/lib/commonjs/views/Drawer/Drawer.Iab.Vendors.js.map +1 -0
- package/lib/commonjs/views/Drawer/index.js +208 -0
- package/lib/commonjs/views/Drawer/index.js.map +1 -0
- package/lib/module/ConsentManager.js +520 -0
- package/lib/module/ConsentManager.js.map +1 -0
- package/lib/module/ConsentUiBuilder.js +66 -0
- package/lib/module/ConsentUiBuilder.js.map +1 -0
- package/lib/module/components/Button.js +205 -0
- package/lib/module/components/Button.js.map +1 -0
- package/lib/module/components/Checkbox.js +65 -0
- package/lib/module/components/Checkbox.js.map +1 -0
- package/lib/module/components/Divider.js +14 -0
- package/lib/module/components/Divider.js.map +1 -0
- package/lib/module/components/ExpansionPanel.js +60 -0
- package/lib/module/components/ExpansionPanel.js.map +1 -0
- package/lib/module/components/Link.js +42 -0
- package/lib/module/components/Link.js.map +1 -0
- package/lib/module/components/List.js +28 -0
- package/lib/module/components/List.js.map +1 -0
- package/lib/module/components/Locale.js +21 -0
- package/lib/module/components/Locale.js.map +1 -0
- package/lib/module/components/StoragePolicyLink.js +24 -0
- package/lib/module/components/StoragePolicyLink.js.map +1 -0
- package/lib/module/components/Toggle.js +103 -0
- package/lib/module/components/Toggle.js.map +1 -0
- package/lib/module/constants.js +31 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/context.js +33 -0
- package/lib/module/context.js.map +1 -0
- package/lib/module/flavors/five.json +11 -0
- package/lib/module/flavors/four.json +11 -0
- package/lib/module/flavors/index.js +26 -0
- package/lib/module/flavors/index.js.map +1 -0
- package/lib/module/flavors/one.json +11 -0
- package/lib/module/flavors/six.json +12 -0
- package/lib/module/flavors/three.json +11 -0
- package/lib/module/flavors/two.json +11 -0
- package/lib/module/hooks/useBoundCallback.js +25 -0
- package/lib/module/hooks/useBoundCallback.js.map +1 -0
- package/lib/module/hooks/useDeviceOrientation.js +13 -0
- package/lib/module/hooks/useDeviceOrientation.js.map +1 -0
- package/lib/module/hooks/usePrevious.js +9 -0
- package/lib/module/hooks/usePrevious.js.map +1 -0
- package/lib/module/hooks/useThunkReducer.js +54 -0
- package/lib/module/hooks/useThunkReducer.js.map +1 -0
- package/lib/module/iab/constants.js +2 -0
- package/lib/module/iab/constants.js.map +1 -0
- package/lib/module/iab/gpp/api.js +220 -0
- package/lib/module/iab/gpp/api.js.map +1 -0
- package/lib/module/iab/gpp/consent.js +89 -0
- package/lib/module/iab/gpp/consent.js.map +1 -0
- package/lib/module/iab/gpp/constants.js +50 -0
- package/lib/module/iab/gpp/constants.js.map +1 -0
- package/lib/module/iab/gpp/encoders/AbstractBase64UrlEncoder.js +132 -0
- package/lib/module/iab/gpp/encoders/AbstractBase64UrlEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/BooleanEncoder.js +39 -0
- package/lib/module/iab/gpp/encoders/BooleanEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/CompressedBase64UrlEncoder.js +38 -0
- package/lib/module/iab/gpp/encoders/CompressedBase64UrlEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/DatetimeEncoder.js +40 -0
- package/lib/module/iab/gpp/encoders/DatetimeEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/EncodableOptimizedFixedRange.js +177 -0
- package/lib/module/iab/gpp/encoders/EncodableOptimizedFixedRange.js.map +1 -0
- package/lib/module/iab/gpp/encoders/FibonacciIntegerEncoder.js +73 -0
- package/lib/module/iab/gpp/encoders/FibonacciIntegerEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/FibonacciIntegerRangeEncoder.js +96 -0
- package/lib/module/iab/gpp/encoders/FibonacciIntegerRangeEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/FixedBitfieldEncoder.js +48 -0
- package/lib/module/iab/gpp/encoders/FixedBitfieldEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/FixedIdBitMapEncoder.js +21 -0
- package/lib/module/iab/gpp/encoders/FixedIdBitMapEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/FixedIntegerEncoder.js +55 -0
- package/lib/module/iab/gpp/encoders/FixedIntegerEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/FixedIntegerListEncoder.js +63 -0
- package/lib/module/iab/gpp/encoders/FixedIntegerListEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/FixedIntegerRangeEncoder.js +80 -0
- package/lib/module/iab/gpp/encoders/FixedIntegerRangeEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/FixedStringEncoder.js +60 -0
- package/lib/module/iab/gpp/encoders/FixedStringEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/LICENSE-IABTechLab +176 -0
- package/lib/module/iab/gpp/encoders/TraditionalBase64UrlEncoder.js +35 -0
- package/lib/module/iab/gpp/encoders/TraditionalBase64UrlEncoder.js.map +1 -0
- package/lib/module/iab/gpp/encoders/errors.js +31 -0
- package/lib/module/iab/gpp/encoders/errors.js.map +1 -0
- package/lib/module/iab/gpp/encoders/index.js +15 -0
- package/lib/module/iab/gpp/encoders/index.js.map +1 -0
- package/lib/module/iab/gpp/encoders/types.js +2 -0
- package/lib/module/iab/gpp/encoders/types.js.map +1 -0
- package/lib/module/iab/gpp/index.js +9 -0
- package/lib/module/iab/gpp/index.js.map +1 -0
- package/lib/module/iab/gpp/reducer.js +6 -0
- package/lib/module/iab/gpp/reducer.js.map +1 -0
- package/lib/module/iab/gpp/selectors.js +14 -0
- package/lib/module/iab/gpp/selectors.js.map +1 -0
- package/lib/module/iab/gpp/types.js +2 -0
- package/lib/module/iab/gpp/types.js.map +1 -0
- package/lib/module/iab/gpp/v1/constants.js +10 -0
- package/lib/module/iab/gpp/v1/constants.js.map +1 -0
- package/lib/module/iab/gpp/v1/index.js +65 -0
- package/lib/module/iab/gpp/v1/index.js.map +1 -0
- package/lib/module/iab/tcf/actions.js +14 -0
- package/lib/module/iab/tcf/actions.js.map +1 -0
- package/lib/module/iab/tcf/consent.js +293 -0
- package/lib/module/iab/tcf/consent.js.map +1 -0
- package/lib/module/iab/tcf/constants.js +37 -0
- package/lib/module/iab/tcf/constants.js.map +1 -0
- package/lib/module/iab/tcf/index.js +7 -0
- package/lib/module/iab/tcf/index.js.map +1 -0
- package/lib/module/iab/tcf/reducer.js +51 -0
- package/lib/module/iab/tcf/reducer.js.map +1 -0
- package/lib/module/iab/tcf/selectors.js +124 -0
- package/lib/module/iab/tcf/selectors.js.map +1 -0
- package/lib/module/iab/tcf/tcfcav1-api.js +35 -0
- package/lib/module/iab/tcf/tcfcav1-api.js.map +1 -0
- package/lib/module/iab/tcf/tcfeuv2-api.js +251 -0
- package/lib/module/iab/tcf/tcfeuv2-api.js.map +1 -0
- package/lib/module/iab/tcf/types.js +2 -0
- package/lib/module/iab/tcf/types.js.map +1 -0
- package/lib/module/iab/tcf/v2.0/encoders.js +28 -0
- package/lib/module/iab/tcf/v2.0/encoders.js.map +1 -0
- package/lib/module/iab/tcf/v2.0/formatters.js +12 -0
- package/lib/module/iab/tcf/v2.0/formatters.js.map +1 -0
- package/lib/module/iab/tcf/v2.0/helpers.js +18 -0
- package/lib/module/iab/tcf/v2.0/helpers.js.map +1 -0
- package/lib/module/iab/tcf/v2.0/index.js +33 -0
- package/lib/module/iab/tcf/v2.0/index.js.map +1 -0
- package/lib/module/iab/tcf/v2.0/middleware.js +74 -0
- package/lib/module/iab/tcf/v2.0/middleware.js.map +1 -0
- package/lib/module/iab/tcf/v2.0/reducer.js +311 -0
- package/lib/module/iab/tcf/v2.0/reducer.js.map +1 -0
- package/lib/module/iab/tcf/v2.0/shared-constants.js +16 -0
- package/lib/module/iab/tcf/v2.0/shared-constants.js.map +1 -0
- package/lib/module/iab/tcf/v2.0/tcfcav1-constants.js +57 -0
- package/lib/module/iab/tcf/v2.0/tcfcav1-constants.js.map +1 -0
- package/lib/module/iab/tcf/v2.0/tcfeuv2-constants.js +85 -0
- package/lib/module/iab/tcf/v2.0/tcfeuv2-constants.js.map +1 -0
- package/lib/module/iab/types.js +2 -0
- package/lib/module/iab/types.js.map +1 -0
- package/lib/module/iab/usp/api.js +53 -0
- package/lib/module/iab/usp/api.js.map +1 -0
- package/lib/module/iab/usp/consent.js +129 -0
- package/lib/module/iab/usp/consent.js.map +1 -0
- package/lib/module/iab/usp/constants.js +38 -0
- package/lib/module/iab/usp/constants.js.map +1 -0
- package/lib/module/iab/usp/index.js +9 -0
- package/lib/module/iab/usp/index.js.map +1 -0
- package/lib/module/iab/usp/reducer.js +115 -0
- package/lib/module/iab/usp/reducer.js.map +1 -0
- package/lib/module/iab/usp/selectors.js +25 -0
- package/lib/module/iab/usp/selectors.js.map +1 -0
- package/lib/module/iab/usp/types.js +2 -0
- package/lib/module/iab/usp/types.js.map +1 -0
- package/lib/module/iab/usp/v1/constants.js +10 -0
- package/lib/module/iab/usp/v1/constants.js.map +1 -0
- package/lib/module/iab/usp/v1/index.js +51 -0
- package/lib/module/iab/usp/v1/index.js.map +1 -0
- package/lib/module/iab/utilities.js +9 -0
- package/lib/module/iab/utilities.js.map +1 -0
- package/lib/module/index.js +114 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/locale/af.json +306 -0
- package/lib/module/locale/ar.json +306 -0
- package/lib/module/locale/bg.json +306 -0
- package/lib/module/locale/ca.json +306 -0
- package/lib/module/locale/cs.json +306 -0
- package/lib/module/locale/da.json +306 -0
- package/lib/module/locale/de-at.json +306 -0
- package/lib/module/locale/de.json +306 -0
- package/lib/module/locale/el.json +306 -0
- package/lib/module/locale/en-au.json +306 -0
- package/lib/module/locale/en-ca.json +306 -0
- package/lib/module/locale/en-gb.json +306 -0
- package/lib/module/locale/en.json +306 -0
- package/lib/module/locale/es-mx.json +306 -0
- package/lib/module/locale/es.json +306 -0
- package/lib/module/locale/et.json +306 -0
- package/lib/module/locale/fa.json +306 -0
- package/lib/module/locale/fi.json +306 -0
- package/lib/module/locale/fr-ca.json +306 -0
- package/lib/module/locale/fr.json +306 -0
- package/lib/module/locale/gd.json +306 -0
- package/lib/module/locale/he.json +306 -0
- package/lib/module/locale/hi.json +306 -0
- package/lib/module/locale/hr.json +306 -0
- package/lib/module/locale/hu.json +306 -0
- package/lib/module/locale/hy.json +306 -0
- package/lib/module/locale/id.json +306 -0
- package/lib/module/locale/index.js +61 -0
- package/lib/module/locale/index.js.map +1 -0
- package/lib/module/locale/is.json +306 -0
- package/lib/module/locale/it.json +306 -0
- package/lib/module/locale/ja.json +306 -0
- package/lib/module/locale/kk.json +306 -0
- package/lib/module/locale/ko.json +306 -0
- package/lib/module/locale/lt.json +306 -0
- package/lib/module/locale/lv.json +306 -0
- package/lib/module/locale/mi.json +306 -0
- package/lib/module/locale/ms.json +306 -0
- package/lib/module/locale/nb.json +306 -0
- package/lib/module/locale/nl-be.json +306 -0
- package/lib/module/locale/nl.json +306 -0
- package/lib/module/locale/nn.json +306 -0
- package/lib/module/locale/no.json +306 -0
- package/lib/module/locale/pl.json +306 -0
- package/lib/module/locale/pt-br.json +306 -0
- package/lib/module/locale/pt.json +306 -0
- package/lib/module/locale/ro.json +306 -0
- package/lib/module/locale/ru.json +306 -0
- package/lib/module/locale/sk.json +306 -0
- package/lib/module/locale/sl.json +306 -0
- package/lib/module/locale/sq.json +306 -0
- package/lib/module/locale/sr.json +306 -0
- package/lib/module/locale/sv.json +306 -0
- package/lib/module/locale/th.json +306 -0
- package/lib/module/locale/tl.json +306 -0
- package/lib/module/locale/tr.json +306 -0
- package/lib/module/locale/uk.json +306 -0
- package/lib/module/locale/vi.json +306 -0
- package/lib/module/locale/zh-hk.json +306 -0
- package/lib/module/locale/zh-tw.json +306 -0
- package/lib/module/locale/zh.json +306 -0
- package/lib/module/locale/zu.json +306 -0
- package/lib/module/native/OsanoCmp.js +24 -0
- package/lib/module/native/OsanoCmp.js.map +1 -0
- package/lib/module/services/consent.js +123 -0
- package/lib/module/services/consent.js.map +1 -0
- package/lib/module/services/disclosures.js +18 -0
- package/lib/module/services/disclosures.js.map +1 -0
- package/lib/module/services/locale.js +32 -0
- package/lib/module/services/locale.js.map +1 -0
- package/lib/module/store.js +520 -0
- package/lib/module/store.js.map +1 -0
- package/lib/module/styles.js +178 -0
- package/lib/module/styles.js.map +1 -0
- package/lib/module/types/consent-config.d.js +2 -0
- package/lib/module/types/consent-config.d.js.map +1 -0
- package/lib/module/types/env.d.js +2 -0
- package/lib/module/types/env.d.js.map +1 -0
- package/lib/module/types/index.d.js +2 -0
- package/lib/module/types/index.d.js.map +1 -0
- package/lib/module/types/store.d.js +2 -0
- package/lib/module/types/store.d.js.map +1 -0
- package/lib/module/utils/API.js +37 -0
- package/lib/module/utils/API.js.map +1 -0
- package/lib/module/utils/Color.js +82 -0
- package/lib/module/utils/Color.js.map +1 -0
- package/lib/module/utils/EventEmitter.js +45 -0
- package/lib/module/utils/EventEmitter.js.map +1 -0
- package/lib/module/utils/Translator.js +215 -0
- package/lib/module/utils/Translator.js.map +1 -0
- package/lib/module/utils/index.js +107 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/views/Dialog/Buttons.js +67 -0
- package/lib/module/views/Dialog/Buttons.js.map +1 -0
- package/lib/module/views/Dialog/FirstLayerUsage.js +34 -0
- package/lib/module/views/Dialog/FirstLayerUsage.js.map +1 -0
- package/lib/module/views/Dialog/Message.js +20 -0
- package/lib/module/views/Dialog/Message.js.map +1 -0
- package/lib/module/views/Dialog/PreferenceManagementDeepLinks.js +36 -0
- package/lib/module/views/Dialog/PreferenceManagementDeepLinks.js.map +1 -0
- package/lib/module/views/Dialog/index.js +304 -0
- package/lib/module/views/Dialog/index.js.map +1 -0
- package/lib/module/views/Drawer/Drawer.ConsentCategories.js +617 -0
- package/lib/module/views/Drawer/Drawer.ConsentCategories.js.map +1 -0
- package/lib/module/views/Drawer/Drawer.Header.js +110 -0
- package/lib/module/views/Drawer/Drawer.Header.js.map +1 -0
- package/lib/module/views/Drawer/Drawer.Iab.Disclosures.js +301 -0
- package/lib/module/views/Drawer/Drawer.Iab.Disclosures.js.map +1 -0
- package/lib/module/views/Drawer/Drawer.Iab.Vendors.js +448 -0
- package/lib/module/views/Drawer/Drawer.Iab.Vendors.js.map +1 -0
- package/lib/module/views/Drawer/index.js +198 -0
- package/lib/module/views/Drawer/index.js.map +1 -0
- package/lib/typescript/src/ConsentManager.d.ts +123 -0
- package/lib/typescript/src/ConsentManager.d.ts.map +1 -0
- package/lib/typescript/src/ConsentUiBuilder.d.ts +13 -0
- package/lib/typescript/src/ConsentUiBuilder.d.ts.map +1 -0
- package/lib/typescript/src/components/Button.d.ts +22 -0
- package/lib/typescript/src/components/Button.d.ts.map +1 -0
- package/lib/typescript/src/components/Checkbox.d.ts +12 -0
- package/lib/typescript/src/components/Checkbox.d.ts.map +1 -0
- package/lib/typescript/src/components/Divider.d.ts +9 -0
- package/lib/typescript/src/components/Divider.d.ts.map +1 -0
- package/lib/typescript/src/components/ExpansionPanel.d.ts +10 -0
- package/lib/typescript/src/components/ExpansionPanel.d.ts.map +1 -0
- package/lib/typescript/src/components/Link.d.ts +9 -0
- package/lib/typescript/src/components/Link.d.ts.map +1 -0
- package/lib/typescript/src/components/List.d.ts +10 -0
- package/lib/typescript/src/components/List.d.ts.map +1 -0
- package/lib/typescript/src/components/Locale.d.ts +10 -0
- package/lib/typescript/src/components/Locale.d.ts.map +1 -0
- package/lib/typescript/src/components/StoragePolicyLink.d.ts +4 -0
- package/lib/typescript/src/components/StoragePolicyLink.d.ts.map +1 -0
- package/lib/typescript/src/components/Toggle.d.ts +12 -0
- package/lib/typescript/src/components/Toggle.d.ts.map +1 -0
- package/lib/typescript/src/constants.d.ts +17 -0
- package/lib/typescript/src/constants.d.ts.map +1 -0
- package/lib/typescript/src/context.d.ts +34 -0
- package/lib/typescript/src/context.d.ts.map +1 -0
- package/lib/typescript/src/flavors/index.d.ts +21 -0
- package/lib/typescript/src/flavors/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useBoundCallback.d.ts +17 -0
- package/lib/typescript/src/hooks/useBoundCallback.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useDeviceOrientation.d.ts +4 -0
- package/lib/typescript/src/hooks/useDeviceOrientation.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePrevious.d.ts +2 -0
- package/lib/typescript/src/hooks/usePrevious.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useThunkReducer.d.ts +23 -0
- package/lib/typescript/src/hooks/useThunkReducer.d.ts.map +1 -0
- package/lib/typescript/src/iab/constants.d.ts +2 -0
- package/lib/typescript/src/iab/constants.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts +28 -0
- package/lib/typescript/src/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/BooleanEncoder.d.ts +34 -0
- package/lib/typescript/src/iab/gpp/encoders/BooleanEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/CompressedBase64UrlEncoder.d.ts +28 -0
- package/lib/typescript/src/iab/gpp/encoders/CompressedBase64UrlEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/DatetimeEncoder.d.ts +28 -0
- package/lib/typescript/src/iab/gpp/encoders/DatetimeEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/EncodableOptimizedFixedRange.d.ts +16 -0
- package/lib/typescript/src/iab/gpp/encoders/EncodableOptimizedFixedRange.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/FibonacciIntegerEncoder.d.ts +28 -0
- package/lib/typescript/src/iab/gpp/encoders/FibonacciIntegerEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/FibonacciIntegerRangeEncoder.d.ts +28 -0
- package/lib/typescript/src/iab/gpp/encoders/FibonacciIntegerRangeEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedBitfieldEncoder.d.ts +28 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedBitfieldEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedIdBitMapEncoder.d.ts +6 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedIdBitMapEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedIntegerEncoder.d.ts +28 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedIntegerEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedIntegerListEncoder.d.ts +28 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedIntegerListEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedIntegerRangeEncoder.d.ts +28 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedIntegerRangeEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedStringEncoder.d.ts +26 -0
- package/lib/typescript/src/iab/gpp/encoders/FixedStringEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/TraditionalBase64UrlEncoder.d.ts +26 -0
- package/lib/typescript/src/iab/gpp/encoders/TraditionalBase64UrlEncoder.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/errors.d.ts +19 -0
- package/lib/typescript/src/iab/gpp/encoders/errors.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/index.d.ts +16 -0
- package/lib/typescript/src/iab/gpp/encoders/index.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/types.d.ts +5 -0
- package/lib/typescript/src/iab/gpp/encoders/types.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/types.d.ts +3 -0
- package/lib/typescript/src/iab/gpp/types.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/constants.d.ts +20 -0
- package/lib/typescript/src/iab/tcf/constants.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/types.d.ts +12 -0
- package/lib/typescript/src/iab/tcf/types.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/v2.0/encoders.d.ts +8 -0
- package/lib/typescript/src/iab/tcf/v2.0/encoders.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/v2.0/helpers.d.ts +5 -0
- package/lib/typescript/src/iab/tcf/v2.0/helpers.d.ts.map +1 -0
- package/lib/typescript/src/iab/types.d.ts +63 -0
- package/lib/typescript/src/iab/types.d.ts.map +1 -0
- package/lib/typescript/src/iab/usp/types.d.ts +5 -0
- package/lib/typescript/src/iab/usp/types.d.ts.map +1 -0
- package/lib/typescript/src/iab/utilities.d.ts +3 -0
- package/lib/typescript/src/iab/utilities.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/native/OsanoCmp.d.ts +5 -0
- package/lib/typescript/src/native/OsanoCmp.d.ts.map +1 -0
- package/lib/typescript/src/services/consent.d.ts +17 -0
- package/lib/typescript/src/services/consent.d.ts.map +1 -0
- package/lib/typescript/src/services/disclosures.d.ts +2 -0
- package/lib/typescript/src/services/disclosures.d.ts.map +1 -0
- package/lib/typescript/src/services/locale.d.ts +4 -0
- package/lib/typescript/src/services/locale.d.ts.map +1 -0
- package/lib/typescript/src/store.d.ts +55 -0
- package/lib/typescript/src/store.d.ts.map +1 -0
- package/lib/typescript/src/styles.d.ts +141 -0
- package/lib/typescript/src/styles.d.ts.map +1 -0
- package/lib/typescript/src/utils/API.d.ts +6 -0
- package/lib/typescript/src/utils/API.d.ts.map +1 -0
- package/lib/typescript/src/utils/Color.d.ts +12 -0
- package/lib/typescript/src/utils/Color.d.ts.map +1 -0
- package/lib/typescript/src/utils/EventEmitter.d.ts +15 -0
- package/lib/typescript/src/utils/EventEmitter.d.ts.map +1 -0
- package/lib/typescript/src/utils/Translator.d.ts +61 -0
- package/lib/typescript/src/utils/Translator.d.ts.map +1 -0
- package/lib/typescript/src/utils/index.d.ts +5 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/views/Dialog/Buttons.d.ts +5 -0
- package/lib/typescript/src/views/Dialog/Buttons.d.ts.map +1 -0
- package/lib/typescript/src/views/Dialog/FirstLayerUsage.d.ts +4 -0
- package/lib/typescript/src/views/Dialog/FirstLayerUsage.d.ts.map +1 -0
- package/lib/typescript/src/views/Dialog/Message.d.ts +4 -0
- package/lib/typescript/src/views/Dialog/Message.d.ts.map +1 -0
- package/lib/typescript/src/views/Dialog/PreferenceManagementDeepLinks.d.ts +4 -0
- package/lib/typescript/src/views/Dialog/PreferenceManagementDeepLinks.d.ts.map +1 -0
- package/lib/typescript/src/views/Dialog/index.d.ts +5 -0
- package/lib/typescript/src/views/Dialog/index.d.ts.map +1 -0
- package/lib/typescript/src/views/Drawer/Drawer.ConsentCategories.d.ts +4 -0
- package/lib/typescript/src/views/Drawer/Drawer.ConsentCategories.d.ts.map +1 -0
- package/lib/typescript/src/views/Drawer/Drawer.Header.d.ts +10 -0
- package/lib/typescript/src/views/Drawer/Drawer.Header.d.ts.map +1 -0
- package/lib/typescript/src/views/Drawer/Drawer.Iab.Disclosures.d.ts +4 -0
- package/lib/typescript/src/views/Drawer/Drawer.Iab.Disclosures.d.ts.map +1 -0
- package/lib/typescript/src/views/Drawer/Drawer.Iab.Vendors.d.ts +4 -0
- package/lib/typescript/src/views/Drawer/Drawer.Iab.Vendors.d.ts.map +1 -0
- package/lib/typescript/src/views/Drawer/index.d.ts +5 -0
- package/lib/typescript/src/views/Drawer/index.d.ts.map +1 -0
- package/osano-cmp-sdk.podspec +41 -0
- package/package.json +158 -0
- package/src/ConsentManager.ts +622 -0
- package/src/ConsentUiBuilder.tsx +117 -0
- package/src/components/Button.tsx +204 -0
- package/src/components/Checkbox.tsx +86 -0
- package/src/components/Divider.tsx +20 -0
- package/src/components/ExpansionPanel.tsx +72 -0
- package/src/components/Link.tsx +49 -0
- package/src/components/List.tsx +39 -0
- package/src/components/Locale.tsx +38 -0
- package/src/components/StoragePolicyLink.tsx +24 -0
- package/src/components/Toggle.tsx +165 -0
- package/src/constants.ts +34 -0
- package/src/context.ts +79 -0
- package/src/flavors/five.json +11 -0
- package/src/flavors/four.json +11 -0
- package/src/flavors/index.ts +38 -0
- package/src/flavors/one.json +11 -0
- package/src/flavors/six.json +12 -0
- package/src/flavors/three.json +11 -0
- package/src/flavors/two.json +11 -0
- package/src/hooks/useBoundCallback.ts +32 -0
- package/src/hooks/useDeviceOrientation.ts +14 -0
- package/src/hooks/usePrevious.ts +9 -0
- package/src/hooks/useThunkReducer.ts +124 -0
- package/src/iab/constants.ts +1 -0
- package/src/iab/gpp/api.js +253 -0
- package/src/iab/gpp/consent.js +114 -0
- package/src/iab/gpp/constants.js +49 -0
- package/src/iab/gpp/encoders/AbstractBase64UrlEncoder.ts +89 -0
- package/src/iab/gpp/encoders/BooleanEncoder.ts +39 -0
- package/src/iab/gpp/encoders/CompressedBase64UrlEncoder.ts +41 -0
- package/src/iab/gpp/encoders/DatetimeEncoder.ts +46 -0
- package/src/iab/gpp/encoders/EncodableOptimizedFixedRange.ts +213 -0
- package/src/iab/gpp/encoders/FibonacciIntegerEncoder.ts +81 -0
- package/src/iab/gpp/encoders/FibonacciIntegerRangeEncoder.ts +122 -0
- package/src/iab/gpp/encoders/FixedBitfieldEncoder.ts +59 -0
- package/src/iab/gpp/encoders/FixedIdBitMapEncoder.ts +30 -0
- package/src/iab/gpp/encoders/FixedIntegerEncoder.ts +61 -0
- package/src/iab/gpp/encoders/FixedIntegerListEncoder.ts +87 -0
- package/src/iab/gpp/encoders/FixedIntegerRangeEncoder.ts +102 -0
- package/src/iab/gpp/encoders/FixedStringEncoder.ts +74 -0
- package/src/iab/gpp/encoders/LICENSE-IABTechLab +176 -0
- package/src/iab/gpp/encoders/TraditionalBase64UrlEncoder.ts +39 -0
- package/src/iab/gpp/encoders/errors.ts +41 -0
- package/src/iab/gpp/encoders/index.ts +15 -0
- package/src/iab/gpp/encoders/types.ts +5 -0
- package/src/iab/gpp/index.js +9 -0
- package/src/iab/gpp/reducer.js +7 -0
- package/src/iab/gpp/selectors.js +21 -0
- package/src/iab/gpp/types.ts +3 -0
- package/src/iab/gpp/v1/constants.js +7 -0
- package/src/iab/gpp/v1/index.js +73 -0
- package/src/iab/tcf/actions.js +52 -0
- package/src/iab/tcf/consent.js +345 -0
- package/src/iab/tcf/constants.ts +51 -0
- package/src/iab/tcf/index.js +7 -0
- package/src/iab/tcf/reducer.js +59 -0
- package/src/iab/tcf/selectors.js +151 -0
- package/src/iab/tcf/tcfcav1-api.js +39 -0
- package/src/iab/tcf/tcfeuv2-api.js +264 -0
- package/src/iab/tcf/types.ts +13 -0
- package/src/iab/tcf/v2.0/encoders.ts +37 -0
- package/src/iab/tcf/v2.0/formatters.js +14 -0
- package/src/iab/tcf/v2.0/helpers.ts +23 -0
- package/src/iab/tcf/v2.0/index.js +36 -0
- package/src/iab/tcf/v2.0/middleware.js +72 -0
- package/src/iab/tcf/v2.0/reducer.js +327 -0
- package/src/iab/tcf/v2.0/shared-constants.js +17 -0
- package/src/iab/tcf/v2.0/tcfcav1-constants.js +115 -0
- package/src/iab/tcf/v2.0/tcfeuv2-constants.js +117 -0
- package/src/iab/types.ts +67 -0
- package/src/iab/usp/api.js +56 -0
- package/src/iab/usp/consent.js +150 -0
- package/src/iab/usp/constants.js +40 -0
- package/src/iab/usp/index.js +9 -0
- package/src/iab/usp/reducer.js +107 -0
- package/src/iab/usp/selectors.js +31 -0
- package/src/iab/usp/types.ts +4 -0
- package/src/iab/usp/v1/constants.js +10 -0
- package/src/iab/usp/v1/index.js +54 -0
- package/src/iab/utilities.ts +17 -0
- package/src/index.tsx +128 -0
- package/src/locale/af.json +306 -0
- package/src/locale/ar.json +306 -0
- package/src/locale/bg.json +306 -0
- package/src/locale/ca.json +306 -0
- package/src/locale/cs.json +306 -0
- package/src/locale/da.json +306 -0
- package/src/locale/de-at.json +306 -0
- package/src/locale/de.json +306 -0
- package/src/locale/el.json +306 -0
- package/src/locale/en-au.json +306 -0
- package/src/locale/en-ca.json +306 -0
- package/src/locale/en-gb.json +306 -0
- package/src/locale/en.json +306 -0
- package/src/locale/es-mx.json +306 -0
- package/src/locale/es.json +306 -0
- package/src/locale/et.json +306 -0
- package/src/locale/fa.json +306 -0
- package/src/locale/fi.json +306 -0
- package/src/locale/fr-ca.json +306 -0
- package/src/locale/fr.json +306 -0
- package/src/locale/gd.json +306 -0
- package/src/locale/he.json +306 -0
- package/src/locale/hi.json +306 -0
- package/src/locale/hr.json +306 -0
- package/src/locale/hu.json +306 -0
- package/src/locale/hy.json +306 -0
- package/src/locale/id.json +306 -0
- package/src/locale/index.js +60 -0
- package/src/locale/is.json +306 -0
- package/src/locale/it.json +306 -0
- package/src/locale/ja.json +306 -0
- package/src/locale/kk.json +306 -0
- package/src/locale/ko.json +306 -0
- package/src/locale/lt.json +306 -0
- package/src/locale/lv.json +306 -0
- package/src/locale/mi.json +306 -0
- package/src/locale/ms.json +306 -0
- package/src/locale/nb.json +306 -0
- package/src/locale/nl-be.json +306 -0
- package/src/locale/nl.json +306 -0
- package/src/locale/nn.json +306 -0
- package/src/locale/no.json +306 -0
- package/src/locale/pl.json +306 -0
- package/src/locale/pt-br.json +306 -0
- package/src/locale/pt.json +306 -0
- package/src/locale/ro.json +306 -0
- package/src/locale/ru.json +306 -0
- package/src/locale/sk.json +306 -0
- package/src/locale/sl.json +306 -0
- package/src/locale/sq.json +306 -0
- package/src/locale/sr.json +306 -0
- package/src/locale/sv.json +306 -0
- package/src/locale/th.json +306 -0
- package/src/locale/tl.json +306 -0
- package/src/locale/tr.json +306 -0
- package/src/locale/uk.json +306 -0
- package/src/locale/vi.json +306 -0
- package/src/locale/zh-hk.json +306 -0
- package/src/locale/zh-tw.json +306 -0
- package/src/locale/zh.json +306 -0
- package/src/locale/zu.json +306 -0
- package/src/native/OsanoCmp.ts +32 -0
- package/src/services/consent.ts +164 -0
- package/src/services/disclosures.ts +25 -0
- package/src/services/locale.ts +43 -0
- package/src/store.ts +602 -0
- package/src/styles.ts +203 -0
- package/src/types/consent-config.d.ts +72 -0
- package/src/types/env.d.ts +2 -0
- package/src/types/index.d.ts +18 -0
- package/src/types/store.d.ts +43 -0
- package/src/utils/API.ts +47 -0
- package/src/utils/Color.ts +127 -0
- package/src/utils/EventEmitter.ts +54 -0
- package/src/utils/Translator.ts +326 -0
- package/src/utils/index.ts +133 -0
- package/src/views/Dialog/Buttons.tsx +71 -0
- package/src/views/Dialog/FirstLayerUsage.tsx +33 -0
- package/src/views/Dialog/Message.tsx +37 -0
- package/src/views/Dialog/PreferenceManagementDeepLinks.tsx +33 -0
- package/src/views/Dialog/index.tsx +442 -0
- package/src/views/Drawer/Drawer.ConsentCategories.tsx +689 -0
- package/src/views/Drawer/Drawer.Header.tsx +138 -0
- package/src/views/Drawer/Drawer.Iab.Disclosures.tsx +386 -0
- package/src/views/Drawer/Drawer.Iab.Vendors.tsx +552 -0
- package/src/views/Drawer/index.tsx +294 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { ACCEPT, DENY, Locale } from '../../../constants';
|
|
2
|
+
import {
|
|
3
|
+
getPurposeIds,
|
|
4
|
+
getPurposeOptOuts,
|
|
5
|
+
getSpecialFeatureOptIns,
|
|
6
|
+
getVendorIds,
|
|
7
|
+
getVendorListVersion,
|
|
8
|
+
getVendorOptOuts,
|
|
9
|
+
getVendors,
|
|
10
|
+
} from '../selectors';
|
|
11
|
+
import {
|
|
12
|
+
setAllPurposeConsent,
|
|
13
|
+
setAllSpecialFeatureConsent,
|
|
14
|
+
setAllVendorConsent,
|
|
15
|
+
setPurposeConsent,
|
|
16
|
+
setSpecialFeatureConsent,
|
|
17
|
+
setVendorConsent,
|
|
18
|
+
updatePurposeList,
|
|
19
|
+
updateVendorListBegin,
|
|
20
|
+
updateVendorListFailure,
|
|
21
|
+
updateVendorListSuccess,
|
|
22
|
+
} from '../actions';
|
|
23
|
+
|
|
24
|
+
import { types as ActionTypes } from '../../../redux/actions';
|
|
25
|
+
import { genericReducer } from '../../../redux/helpers';
|
|
26
|
+
import { isSaved } from '../../../redux/selectors';
|
|
27
|
+
import { makeParseConsentString } from '../consent';
|
|
28
|
+
import { merge } from '../../../utils';
|
|
29
|
+
|
|
30
|
+
export const initialState = {
|
|
31
|
+
iab: {
|
|
32
|
+
tcf: {
|
|
33
|
+
v2: {
|
|
34
|
+
purposeOptouts: {},
|
|
35
|
+
specialFeatureOptins: {},
|
|
36
|
+
stacks: [],
|
|
37
|
+
vendorListError: null,
|
|
38
|
+
vendorListLoading: false,
|
|
39
|
+
vendorListLoaded: false,
|
|
40
|
+
vendorListVersion: 0,
|
|
41
|
+
vendors: {},
|
|
42
|
+
vendorOptouts: {},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const processPurposeList = (purposeList, language = 'en') => {
|
|
49
|
+
const lang = language.slice(0, 2);
|
|
50
|
+
const { purposes, specialPurposes, features, specialFeatures, stacks } =
|
|
51
|
+
purposeList || {};
|
|
52
|
+
Locale.override(
|
|
53
|
+
{
|
|
54
|
+
iab: {
|
|
55
|
+
v2: { purposes, specialPurposes, features, specialFeatures, stacks },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
lang,
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const updateOptions = (state, options) => {
|
|
63
|
+
const { iab = {} } = options || {};
|
|
64
|
+
const {
|
|
65
|
+
v2: {
|
|
66
|
+
vendorListVersion = getVendorListVersion(state),
|
|
67
|
+
purposes = getPurposeIds(state),
|
|
68
|
+
vendors = getVendors(state),
|
|
69
|
+
} = {},
|
|
70
|
+
} = iab;
|
|
71
|
+
|
|
72
|
+
const newState = merge(
|
|
73
|
+
{ ...state },
|
|
74
|
+
{
|
|
75
|
+
iab: {
|
|
76
|
+
tcf: {
|
|
77
|
+
v2: {
|
|
78
|
+
vendorListVersion,
|
|
79
|
+
vendor: {
|
|
80
|
+
consents: {},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
);
|
|
87
|
+
newState.iab.tcf.v2.vendors = vendors;
|
|
88
|
+
if (!isSaved(state)) {
|
|
89
|
+
// Only default the vendors to true if we have not already consented
|
|
90
|
+
newState.iab.tcf.v2.purposeOptouts = purposes.reduce((p, purposeId) => {
|
|
91
|
+
p[`${purposeId}`] = false;
|
|
92
|
+
return p;
|
|
93
|
+
}, {});
|
|
94
|
+
newState.iab.tcf.v2.vendorOptouts = Object.keys(vendors).reduce(
|
|
95
|
+
(v, vendorId) => {
|
|
96
|
+
v[`${vendorId}`] = false;
|
|
97
|
+
return v;
|
|
98
|
+
},
|
|
99
|
+
{},
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return newState;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const updateSpecialFeatureConsent = (
|
|
107
|
+
state,
|
|
108
|
+
specialFeatureIds,
|
|
109
|
+
acceptOrDeny,
|
|
110
|
+
) => {
|
|
111
|
+
const specialFeatureOptins = { ...getSpecialFeatureOptIns(state) };
|
|
112
|
+
for (const specialFeatureId of specialFeatureIds) {
|
|
113
|
+
if (acceptOrDeny === ACCEPT) {
|
|
114
|
+
specialFeatureOptins[`${specialFeatureId}`] = true;
|
|
115
|
+
} else {
|
|
116
|
+
delete specialFeatureOptins[`${specialFeatureId}`];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
const newState = merge(
|
|
120
|
+
{ ...state },
|
|
121
|
+
{
|
|
122
|
+
iab: {
|
|
123
|
+
tcf: {
|
|
124
|
+
v2: {
|
|
125
|
+
specialFeatureOptins: {},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
);
|
|
131
|
+
newState.iab.tcf.v2.specialFeatureOptins = specialFeatureOptins;
|
|
132
|
+
return newState;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const updatePurposeConsent = (state, purposeIds, acceptOrDeny) => {
|
|
136
|
+
const consents = { ...getPurposeOptOuts(state) };
|
|
137
|
+
// ACCEPT on "I Object" means OptOut is TRUE
|
|
138
|
+
for (const purposeId of purposeIds) {
|
|
139
|
+
if (acceptOrDeny === ACCEPT) {
|
|
140
|
+
consents[`${purposeId}`] = true;
|
|
141
|
+
} else {
|
|
142
|
+
delete consents[`${purposeId}`];
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const newState = merge(
|
|
146
|
+
{ ...state },
|
|
147
|
+
{
|
|
148
|
+
iab: {
|
|
149
|
+
tcf: {
|
|
150
|
+
v2: {
|
|
151
|
+
purposeOptouts: {},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
);
|
|
157
|
+
newState.iab.tcf.v2.purposeOptouts = consents;
|
|
158
|
+
return newState;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const updateVendorConsent = (state, vendorIds, acceptOrDeny) => {
|
|
162
|
+
const consents = { ...getVendorOptOuts(state) };
|
|
163
|
+
for (const vendorId of vendorIds) {
|
|
164
|
+
if (acceptOrDeny === DENY) {
|
|
165
|
+
consents[`${vendorId}`] = true;
|
|
166
|
+
} else {
|
|
167
|
+
delete consents[`${vendorId}`];
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
const newState = merge(
|
|
171
|
+
{ ...state },
|
|
172
|
+
{
|
|
173
|
+
iab: {
|
|
174
|
+
tcf: {
|
|
175
|
+
v2: {
|
|
176
|
+
vendorOptouts: {},
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
);
|
|
182
|
+
newState.iab.tcf.v2.vendorOptouts = consents;
|
|
183
|
+
return newState;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export default function makeReducer(initOptions) {
|
|
187
|
+
return genericReducer(initialState, {
|
|
188
|
+
[ActionTypes.init]: updateOptions,
|
|
189
|
+
[ActionTypes.updateConfig]: (state, config) =>
|
|
190
|
+
updateOptions(state, { config }),
|
|
191
|
+
[ActionTypes.setConsent]: (state, { category }) => {
|
|
192
|
+
/* "category" is a misleading name if it is an object. It is actually a
|
|
193
|
+
consent object and the manager middleware
|
|
194
|
+
(src/redux/middleware/manager.js) injects an IAB state so that it can be
|
|
195
|
+
serialized and saved to the user's device. */
|
|
196
|
+
if (typeof category === 'object') {
|
|
197
|
+
// We are only interested in this type for consent string parsing
|
|
198
|
+
const {
|
|
199
|
+
iab: {
|
|
200
|
+
v2: { p: purposeOptouts = {}, v: vendorOptouts = {} } = {},
|
|
201
|
+
euconsent: tcString,
|
|
202
|
+
} = {},
|
|
203
|
+
} = category;
|
|
204
|
+
const newState = merge(
|
|
205
|
+
{ ...state },
|
|
206
|
+
{
|
|
207
|
+
iab: {
|
|
208
|
+
tcf: {
|
|
209
|
+
v2: {
|
|
210
|
+
purposeOptouts,
|
|
211
|
+
vendorOptouts,
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
);
|
|
217
|
+
if (tcString && typeof tcString === 'string') {
|
|
218
|
+
const { specialFeatureOptins = {} } =
|
|
219
|
+
makeParseConsentString(initOptions)(tcString);
|
|
220
|
+
newState.iab.tcf.v2.specialFeatureOptins = specialFeatureOptins;
|
|
221
|
+
}
|
|
222
|
+
return newState;
|
|
223
|
+
}
|
|
224
|
+
return state;
|
|
225
|
+
},
|
|
226
|
+
[setSpecialFeatureConsent.type]: (
|
|
227
|
+
state,
|
|
228
|
+
{ specialFeatureId, acceptOrDeny },
|
|
229
|
+
) => {
|
|
230
|
+
return updateSpecialFeatureConsent(
|
|
231
|
+
state,
|
|
232
|
+
[specialFeatureId],
|
|
233
|
+
acceptOrDeny,
|
|
234
|
+
);
|
|
235
|
+
},
|
|
236
|
+
[setAllSpecialFeatureConsent.type]: (state, { acceptOrDeny }) => {
|
|
237
|
+
const specialFeatureIds = new Set(
|
|
238
|
+
Object.values(getVendors(state))
|
|
239
|
+
.map(vendor => vendor.specialPurposes)
|
|
240
|
+
.reduce((acc, ids) => acc.concat(ids), []),
|
|
241
|
+
);
|
|
242
|
+
return updateSpecialFeatureConsent(
|
|
243
|
+
state,
|
|
244
|
+
specialFeatureIds,
|
|
245
|
+
acceptOrDeny,
|
|
246
|
+
);
|
|
247
|
+
},
|
|
248
|
+
[setPurposeConsent.type]: (state, { purposeId, acceptOrDeny }) => {
|
|
249
|
+
return updatePurposeConsent(state, [purposeId], acceptOrDeny);
|
|
250
|
+
},
|
|
251
|
+
[setAllPurposeConsent.type]: (state, { acceptOrDeny }) => {
|
|
252
|
+
const purposeIds = getPurposeIds(state);
|
|
253
|
+
return updatePurposeConsent(state, purposeIds, acceptOrDeny);
|
|
254
|
+
},
|
|
255
|
+
[setVendorConsent.type]: (state, { vendorId, acceptOrDeny }) => {
|
|
256
|
+
return updateVendorConsent(state, [vendorId], acceptOrDeny);
|
|
257
|
+
},
|
|
258
|
+
[setAllVendorConsent.type]: (state, { acceptOrDeny }) => {
|
|
259
|
+
const vendorIds = getVendorIds(state);
|
|
260
|
+
return updateVendorConsent(state, vendorIds, acceptOrDeny);
|
|
261
|
+
},
|
|
262
|
+
[updatePurposeList.type]: (state, { purposeList, language = 'en' }) => {
|
|
263
|
+
processPurposeList(purposeList, language);
|
|
264
|
+
return state;
|
|
265
|
+
},
|
|
266
|
+
[updateVendorListBegin.type]: state => {
|
|
267
|
+
return merge(state, {
|
|
268
|
+
iab: {
|
|
269
|
+
tcf: {
|
|
270
|
+
v2: {
|
|
271
|
+
vendorListError: null,
|
|
272
|
+
vendorListLoading: true,
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
});
|
|
277
|
+
},
|
|
278
|
+
[updateVendorListSuccess.type]: (state, vendorList) => {
|
|
279
|
+
if (!vendorList) {
|
|
280
|
+
return state;
|
|
281
|
+
}
|
|
282
|
+
const { v2: settings = {} } = state?.iab?.tcf || {};
|
|
283
|
+
const {
|
|
284
|
+
vendorListVersion:
|
|
285
|
+
providedVendorListVersion = settings?.vendorListVersion,
|
|
286
|
+
vendors = {},
|
|
287
|
+
} = vendorList;
|
|
288
|
+
const parsedVendorListVersion = parseInt(providedVendorListVersion, 10);
|
|
289
|
+
const vendorListVersion = Math.max(
|
|
290
|
+
settings?.vendorListVersion || 0,
|
|
291
|
+
isNaN(parsedVendorListVersion) ? 0 : parsedVendorListVersion,
|
|
292
|
+
);
|
|
293
|
+
processPurposeList(vendorList);
|
|
294
|
+
const newState = merge(
|
|
295
|
+
{ ...state },
|
|
296
|
+
{
|
|
297
|
+
iab: {
|
|
298
|
+
tcf: {
|
|
299
|
+
v2: {
|
|
300
|
+
vendorListError: null,
|
|
301
|
+
vendorListLoading: false,
|
|
302
|
+
vendorListLoaded: true,
|
|
303
|
+
vendorListVersion,
|
|
304
|
+
vendors:
|
|
305
|
+
parsedVendorListVersion > vendorListVersion ? vendors : {},
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
);
|
|
311
|
+
return newState;
|
|
312
|
+
},
|
|
313
|
+
[updateVendorListFailure.type]: (state, { statusText = null } = {}) => {
|
|
314
|
+
return merge(state, {
|
|
315
|
+
iab: {
|
|
316
|
+
tcf: {
|
|
317
|
+
v2: {
|
|
318
|
+
vendorListError: statusText,
|
|
319
|
+
vendorListLoading: false,
|
|
320
|
+
vendorListLoaded: state?.iab?.tcf?.v2?.vendorListLoaded || false,
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
});
|
|
325
|
+
},
|
|
326
|
+
});
|
|
327
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CMP_ID } from '../../constants';
|
|
2
|
+
import { IAB_CMP_VERSION } from '@osano-cmp';
|
|
3
|
+
|
|
4
|
+
const version = '2.0';
|
|
5
|
+
/**
|
|
6
|
+
* We'll use this value of the GVL when the customer's config doesn't contain
|
|
7
|
+
* one. It's from March 2023.
|
|
8
|
+
*/
|
|
9
|
+
const FALLBACK_GVL_VERSION = 187;
|
|
10
|
+
|
|
11
|
+
export const baseInitOptions = {
|
|
12
|
+
version,
|
|
13
|
+
cmpId: CMP_ID,
|
|
14
|
+
cmpVersion: IAB_CMP_VERSION,
|
|
15
|
+
fallbackGvlVersion: FALLBACK_GVL_VERSION,
|
|
16
|
+
defaultTimestamp: Date.now(),
|
|
17
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BitEncoder,
|
|
3
|
+
DateEncoder,
|
|
4
|
+
EncodableOptimizedFixedRange,
|
|
5
|
+
IdBitMapEncoder,
|
|
6
|
+
IntEncoder,
|
|
7
|
+
LangEncoder,
|
|
8
|
+
} from './encoders';
|
|
9
|
+
import {
|
|
10
|
+
dateFormatter,
|
|
11
|
+
fixedValuesArrayFormatter,
|
|
12
|
+
idsOnlyArrayFormatter,
|
|
13
|
+
} from './formatters';
|
|
14
|
+
|
|
15
|
+
import { baseInitOptions } from './shared-constants';
|
|
16
|
+
import compressedBase64UrlEncoder from '../../gpp/encoders/CompressedBase64UrlEncoder';
|
|
17
|
+
import { createUTCTimestampInDeciseconds } from './helpers';
|
|
18
|
+
|
|
19
|
+
// gppSection is the key in redux state that stores the consent string.
|
|
20
|
+
const gppSection = 'tcfcav1';
|
|
21
|
+
/**
|
|
22
|
+
* This string is a stub with only the base values so that consent.js has a
|
|
23
|
+
* string to start with. Its values are essentially blank and will be replaced
|
|
24
|
+
* by real values when a string is created for the user.
|
|
25
|
+
*/
|
|
26
|
+
const BOOTSTRAP_TCSTRING = 'COsdsoAOsdsoAAAAAAAAAACAAAAAAAAAAAAAAAAA';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @typedef CoreField
|
|
30
|
+
* @type {array}
|
|
31
|
+
* @property {string} 0 - The name of the field in the GPPModel
|
|
32
|
+
* <https://github.com/IABTechLab/iabgpp-es/blob/42060d7ac2b6d0ee70fc1b5bcd33fc447bf5123c/README.md#fields>
|
|
33
|
+
* @property {number} 1 - The number of bits to encode the field
|
|
34
|
+
* @property {Encoder} 2 - The encoder to use for this field
|
|
35
|
+
* @property {string} 3 - The path to the value in our TCF object
|
|
36
|
+
* @property {string} [4] - The formatter to use for this field for the client API calls
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The core fields of the TCString for TCF-Canada v1.
|
|
41
|
+
* @type {CoreField[]}
|
|
42
|
+
*/
|
|
43
|
+
const coreFieldSequence = [
|
|
44
|
+
['Version', 6, IntEncoder, 'version'],
|
|
45
|
+
['Created', 36, DateEncoder, 'created', dateFormatter],
|
|
46
|
+
['LastUpdated', 36, DateEncoder, 'lastUpdated', dateFormatter],
|
|
47
|
+
['CmpId', 12, IntEncoder, 'cmpId'],
|
|
48
|
+
['CmpVersion', 12, IntEncoder, 'cmpVersion'],
|
|
49
|
+
['ConsentScreen', 6, IntEncoder, 'currentScreen'],
|
|
50
|
+
['ConsentLanguage', 12, LangEncoder, 'consentLanguage'],
|
|
51
|
+
['VendorListVersion', 12, IntEncoder, 'gvlVersion'],
|
|
52
|
+
['TcfPolicyVersion', 6, IntEncoder, 'tcfPolicyVersion'],
|
|
53
|
+
['UseNonStandardStacks', 1, BitEncoder, 'useNonStandardStacks'],
|
|
54
|
+
[
|
|
55
|
+
'SpecialFeatureExpressConsent',
|
|
56
|
+
12,
|
|
57
|
+
IdBitMapEncoder,
|
|
58
|
+
'specialFeatureOptins',
|
|
59
|
+
fixedValuesArrayFormatter,
|
|
60
|
+
],
|
|
61
|
+
[
|
|
62
|
+
'PurposesExpressConsent',
|
|
63
|
+
24,
|
|
64
|
+
IdBitMapEncoder,
|
|
65
|
+
'purpose.consents',
|
|
66
|
+
fixedValuesArrayFormatter,
|
|
67
|
+
],
|
|
68
|
+
[
|
|
69
|
+
'PurposesImpliedConsent',
|
|
70
|
+
24,
|
|
71
|
+
IdBitMapEncoder,
|
|
72
|
+
'purpose.legitimateInterests',
|
|
73
|
+
fixedValuesArrayFormatter,
|
|
74
|
+
],
|
|
75
|
+
// Vendor Consents
|
|
76
|
+
[
|
|
77
|
+
'VendorExpressConsent',
|
|
78
|
+
Number.POSITIVE_INFINITY,
|
|
79
|
+
EncodableOptimizedFixedRange,
|
|
80
|
+
'vendor.consents',
|
|
81
|
+
idsOnlyArrayFormatter,
|
|
82
|
+
],
|
|
83
|
+
// Vendor Legitimate Interests
|
|
84
|
+
[
|
|
85
|
+
'VendorImpliedConsent',
|
|
86
|
+
Number.POSITIVE_INFINITY,
|
|
87
|
+
EncodableOptimizedFixedRange,
|
|
88
|
+
'vendor.legitimateInterests',
|
|
89
|
+
idsOnlyArrayFormatter,
|
|
90
|
+
],
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
const version = parseInt(baseInitOptions.version, 10);
|
|
94
|
+
const staticFields = {
|
|
95
|
+
version,
|
|
96
|
+
cmpId: baseInitOptions.cmpId,
|
|
97
|
+
cmpVersion: baseInitOptions.cmpVersion,
|
|
98
|
+
tcfPolicyVersion: version,
|
|
99
|
+
useNonStandardStacks: true,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const dynamicFields = {
|
|
103
|
+
created: createUTCTimestampInDeciseconds,
|
|
104
|
+
lastUpdated: createUTCTimestampInDeciseconds,
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export const initOptions = {
|
|
108
|
+
...baseInitOptions,
|
|
109
|
+
coreFieldSequence,
|
|
110
|
+
gppSection,
|
|
111
|
+
tcString: BOOTSTRAP_TCSTRING,
|
|
112
|
+
staticFields,
|
|
113
|
+
dynamicFields,
|
|
114
|
+
encoder: compressedBase64UrlEncoder,
|
|
115
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BitEncoder,
|
|
3
|
+
DateEncoder,
|
|
4
|
+
EncodableOptimizedFixedRange,
|
|
5
|
+
IdBitMapEncoder,
|
|
6
|
+
IntEncoder,
|
|
7
|
+
LangEncoder,
|
|
8
|
+
} from './encoders';
|
|
9
|
+
|
|
10
|
+
import { baseInitOptions } from './shared-constants';
|
|
11
|
+
import { createUTCTimestampInDeciseconds } from './helpers';
|
|
12
|
+
import traditionalBase64UrlEncoder from '../../gpp/encoders/TraditionalBase64UrlEncoder';
|
|
13
|
+
|
|
14
|
+
export const apiName = '__tcfapi';
|
|
15
|
+
export const iframeName = '__tcfapiLocator';
|
|
16
|
+
|
|
17
|
+
// gppSection is the key in redux state that stores the consent string.
|
|
18
|
+
const gppSection = 'tcfeuv2';
|
|
19
|
+
/**
|
|
20
|
+
* This string is a stub with only the base values so that consent.js has a
|
|
21
|
+
* string to start with. It was generated with <https://iabtcf.com/>.
|
|
22
|
+
*
|
|
23
|
+
* Fields set:
|
|
24
|
+
* - CMP ID: 279
|
|
25
|
+
* - CMP Version: 1
|
|
26
|
+
* - Is Service Specific: true
|
|
27
|
+
* - Use Non-Standard Stacks: true
|
|
28
|
+
* - Purpose One Treatment: false
|
|
29
|
+
* - Purpose Consents: 1, 10
|
|
30
|
+
*
|
|
31
|
+
* All values will be overridden when a real string is created for the user.
|
|
32
|
+
*/
|
|
33
|
+
const BOOTSTRAP_TCSTRING = 'CPpshUAPpshUAEXABAENAACwAIBAAAAAAAAAAAAAAAAA';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @typedef CoreField
|
|
37
|
+
* @type {array}
|
|
38
|
+
* @property {string} 0 - The name of the field in the TCModel
|
|
39
|
+
* <https://github.com/InteractiveAdvertisingBureau/iabtcf-es/blob/e952844c689351a51b15d71b9dd43ee085c2f7f3/modules/core/src/TCModel.ts>
|
|
40
|
+
* @property {number} 1 - The number of bits to encode the field
|
|
41
|
+
* @property {Encoder} 2 - The encoder to use for this field
|
|
42
|
+
* @property {string} [3] - The path to the value in our TCF object if it is different from the TCModel
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The core fields of the TCString in the order they appear in the TCString
|
|
47
|
+
* Reference spec doc: https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20Consent%20string%20and%20vendor%20list%20formats%20v2.md#the-core-string
|
|
48
|
+
*
|
|
49
|
+
* Note: some field names conflict with the TCModel<https://github.com/IABTechLab/iabgpp-es/blob/42060d7ac2b6d0ee70fc1b5bcd33fc447bf5123c/modules/cmpapi/src/encoder/field/TcfEuV2Field.ts>. We may need to resolve these conflicts. See comments below for specific fields.
|
|
50
|
+
* @type {CoreField[]}
|
|
51
|
+
*/
|
|
52
|
+
const coreFieldSequence = [
|
|
53
|
+
['version', 6, IntEncoder],
|
|
54
|
+
['created', 36, DateEncoder],
|
|
55
|
+
['lastUpdated', 36, DateEncoder],
|
|
56
|
+
['cmpId', 12, IntEncoder],
|
|
57
|
+
['cmpVersion', 12, IntEncoder],
|
|
58
|
+
['consentScreen', 6, IntEncoder, 'currentScreen'],
|
|
59
|
+
['consentLanguage', 12, LangEncoder],
|
|
60
|
+
['vendorListVersion', 12, IntEncoder, 'gvlVersion'],
|
|
61
|
+
['policyVersion', 6, IntEncoder, 'tcfPolicyVersion'], // spec doc: "TcfPolicyVersion", TCModel: "PolicyVersion"
|
|
62
|
+
['isServiceSpecific', 1, BitEncoder],
|
|
63
|
+
['useNonStandardStacks', 1, BitEncoder],
|
|
64
|
+
['specialFeatureOptins', 12, IdBitMapEncoder],
|
|
65
|
+
['purposeConsents', 24, IdBitMapEncoder, 'purpose.consents'], // spec doc: "PurposesConsent", TCModel: "PurposeConsents"
|
|
66
|
+
[
|
|
67
|
+
'purposeLegitimateInterests',
|
|
68
|
+
24,
|
|
69
|
+
IdBitMapEncoder,
|
|
70
|
+
'purpose.legitimateInterests',
|
|
71
|
+
], // spec doc: "PurposesLITransparency", TCModel: "PurposeLegitimateInterests"
|
|
72
|
+
['purposeOneTreatment', 1, BitEncoder],
|
|
73
|
+
['publisherCountryCode', 12, LangEncoder, 'publisherCC'], // spec doc: "PublisherCC", TCModel: "PublisherCountryCode"
|
|
74
|
+
// Vendor Consents
|
|
75
|
+
[
|
|
76
|
+
'vendorConsents',
|
|
77
|
+
Number.POSITIVE_INFINITY,
|
|
78
|
+
EncodableOptimizedFixedRange,
|
|
79
|
+
'vendor.consents',
|
|
80
|
+
], // spec doc does not name this field
|
|
81
|
+
// Vendor Legitimate Interests
|
|
82
|
+
[
|
|
83
|
+
'vendorLegitimateInterests', // spec doc does not name this field
|
|
84
|
+
Number.POSITIVE_INFINITY,
|
|
85
|
+
EncodableOptimizedFixedRange,
|
|
86
|
+
'vendor.legitimateInterests',
|
|
87
|
+
],
|
|
88
|
+
// We do not (yet) support publisher restrictions so this field should always be 0
|
|
89
|
+
['numPubRestrictions', 12, IntEncoder], // This is a meta field and shouldn't be exposed directly via an API
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
const version = parseInt(baseInitOptions.version, 10);
|
|
93
|
+
const staticFields = {
|
|
94
|
+
version,
|
|
95
|
+
cmpId: baseInitOptions.cmpId,
|
|
96
|
+
cmpVersion: baseInitOptions.cmpVersion,
|
|
97
|
+
tcfPolicyVersion: version,
|
|
98
|
+
useNonStandardStacks: true,
|
|
99
|
+
isServiceSpecific: true,
|
|
100
|
+
purposeOneTreatment: false,
|
|
101
|
+
numPubRestrictions: 0,
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const dynamicFields = {
|
|
105
|
+
created: createUTCTimestampInDeciseconds,
|
|
106
|
+
lastUpdated: createUTCTimestampInDeciseconds,
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const initOptions = {
|
|
110
|
+
...baseInitOptions,
|
|
111
|
+
coreFieldSequence,
|
|
112
|
+
gppSection,
|
|
113
|
+
tcString: BOOTSTRAP_TCSTRING,
|
|
114
|
+
staticFields,
|
|
115
|
+
dynamicFields,
|
|
116
|
+
encoder: traditionalBase64UrlEncoder,
|
|
117
|
+
};
|
package/src/iab/types.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { Gpp_v2 } from './gpp/types';
|
|
2
|
+
import type { Tcf_v2 } from './tcf/types';
|
|
3
|
+
import type { Usp } from './usp/types';
|
|
4
|
+
|
|
5
|
+
type GvlVendor = {
|
|
6
|
+
// v2
|
|
7
|
+
id: number;
|
|
8
|
+
name: string;
|
|
9
|
+
purposes: number[];
|
|
10
|
+
legIntPurposes: number[];
|
|
11
|
+
flexiblePurposes: number[];
|
|
12
|
+
specialPurposes: number[];
|
|
13
|
+
features: number[];
|
|
14
|
+
specialFeatures: number[];
|
|
15
|
+
cookieMaxAgeSeconds: number;
|
|
16
|
+
usesCookies?: boolean;
|
|
17
|
+
cookieRefresh?: boolean;
|
|
18
|
+
usesNonCookieAccess?: boolean;
|
|
19
|
+
deviceStorageDisclosureUrl?: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type GvlUrl = {
|
|
23
|
+
langId: string;
|
|
24
|
+
privacy?: string;
|
|
25
|
+
legIntClaim?: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type GvlVendor_v2 = GvlVendor & {
|
|
29
|
+
policyUrl?: string;
|
|
30
|
+
};
|
|
31
|
+
export type GvlVendor_v3 = GvlVendor & {
|
|
32
|
+
overflow?: {
|
|
33
|
+
httpGetLimit: number;
|
|
34
|
+
};
|
|
35
|
+
urls?: GvlUrl[];
|
|
36
|
+
dataRetention?: {
|
|
37
|
+
stdRetention: number;
|
|
38
|
+
purposes: Record<string, number>;
|
|
39
|
+
specialPurposes: Record<string, number>;
|
|
40
|
+
};
|
|
41
|
+
dataDeclaration?: number[];
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type Iab = {
|
|
45
|
+
enabled?: boolean;
|
|
46
|
+
notified?: boolean;
|
|
47
|
+
signatory?: boolean;
|
|
48
|
+
hideOptOut?: boolean;
|
|
49
|
+
eu?: {
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
v2?: Tcf_v2;
|
|
52
|
+
vendors?: number[]; // The vendor ids that are enabled
|
|
53
|
+
};
|
|
54
|
+
gpp?: Gpp_v2;
|
|
55
|
+
tcf?: {
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
v2?: Tcf_v2;
|
|
58
|
+
};
|
|
59
|
+
usp?: Usp;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export type IabDisclosureType = {
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
descriptionLegal: string;
|
|
66
|
+
illustrations?: Record<string, string>;
|
|
67
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { getConsentDataObject, makeGetField } from './consent';
|
|
2
|
+
|
|
3
|
+
export default function makeApi(initOptions) {
|
|
4
|
+
function bind(store) {
|
|
5
|
+
/**
|
|
6
|
+
* USPAPI implementation
|
|
7
|
+
* @function
|
|
8
|
+
* @name __uspapi
|
|
9
|
+
* @param {string} command - The command to be executed by the API
|
|
10
|
+
* @param {number} version - The version number that the response should adhere to
|
|
11
|
+
* @param {requestCallback} callback - The callback method that should be called with the command result
|
|
12
|
+
* @param {string} [parameter] - Optional parameter to be passed to the `command`
|
|
13
|
+
*/
|
|
14
|
+
return function uspApi(command, version, callback, parameter) {
|
|
15
|
+
const state = store.getState();
|
|
16
|
+
const getField = makeGetField(initOptions);
|
|
17
|
+
|
|
18
|
+
const getUSPData = (
|
|
19
|
+
providedState,
|
|
20
|
+
apiVersion = initOptions.apiVersion,
|
|
21
|
+
) => {
|
|
22
|
+
try {
|
|
23
|
+
const consentData = getConsentDataObject({
|
|
24
|
+
...initOptions,
|
|
25
|
+
version: apiVersion,
|
|
26
|
+
})(providedState);
|
|
27
|
+
return consentData;
|
|
28
|
+
} catch (error) {
|
|
29
|
+
// Could not retrieve data
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
switch (command) {
|
|
35
|
+
case 'getUSPData': {
|
|
36
|
+
if (typeof callback === 'function') {
|
|
37
|
+
const uspData = getUSPData(state, version);
|
|
38
|
+
callback(uspData, !!uspData);
|
|
39
|
+
}
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
case 'getField': {
|
|
44
|
+
const field = parameter;
|
|
45
|
+
return getField(state, field);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
case 'getSection': {
|
|
49
|
+
return getUSPData(state, version);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return { bind };
|
|
56
|
+
}
|