@osano/osano-cmp-react-native 0.12.0 → 0.13.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/README.dev.md +216 -1
- package/README.md +2 -268
- package/android/src/main/java/com/OsanoCMPSDK/OsanoCMPSDKModule.kt +41 -0
- package/ios/OsanoCmpSDK.mm +42 -0
- package/lib/commonjs/ConsentManager.js +57 -14
- package/lib/commonjs/ConsentManager.js.map +1 -1
- package/lib/commonjs/ConsentUiBuilder.js +10 -7
- package/lib/commonjs/ConsentUiBuilder.js.map +1 -1
- package/lib/commonjs/commands.js +10 -5
- package/lib/commonjs/commands.js.map +1 -1
- package/lib/commonjs/components/Button.js +6 -7
- package/lib/commonjs/components/Button.js.map +1 -1
- package/lib/commonjs/components/Checkbox.js +1 -2
- package/lib/commonjs/components/Checkbox.js.map +1 -1
- package/lib/commonjs/components/ExpansionPanel.js +1 -2
- package/lib/commonjs/components/ExpansionPanel.js.map +1 -1
- package/lib/commonjs/components/Link.js +1 -2
- package/lib/commonjs/components/Link.js.map +1 -1
- package/lib/commonjs/components/StoragePolicyLink.js +1 -2
- package/lib/commonjs/components/StoragePolicyLink.js.map +1 -1
- package/lib/commonjs/components/Toggle.js +1 -2
- package/lib/commonjs/components/Toggle.js.map +1 -1
- package/lib/commonjs/context.js +5 -4
- package/lib/commonjs/context.js.map +1 -1
- package/lib/commonjs/iab/tcf/constants.js +34 -1
- package/lib/commonjs/iab/tcf/constants.js.map +1 -1
- package/lib/commonjs/iab/tcf/iab-storage-utils.js +102 -0
- package/lib/commonjs/iab/tcf/iab-storage-utils.js.map +1 -0
- package/lib/commonjs/iab/tcf/index.js +1 -2
- package/lib/commonjs/iab/tcf/index.js.map +1 -1
- package/lib/commonjs/iab/tcf/middleware.js +33 -35
- package/lib/commonjs/iab/tcf/middleware.js.map +1 -1
- package/lib/commonjs/iab/tcf/selectors.js +1 -1
- package/lib/commonjs/iab/tcf/selectors.js.map +1 -1
- package/lib/commonjs/iab/tcf/v2.0/shared-constants.js +1 -2
- package/lib/commonjs/iab/tcf/v2.0/shared-constants.js.map +1 -1
- package/lib/commonjs/index.js +29 -9
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/locale/af.json +342 -323
- package/lib/commonjs/locale/ar.json +342 -323
- package/lib/commonjs/locale/bg.json +342 -323
- package/lib/commonjs/locale/ca.json +342 -323
- package/lib/commonjs/locale/cs.json +342 -323
- package/lib/commonjs/locale/da.json +342 -323
- package/lib/commonjs/locale/de-at.json +342 -323
- package/lib/commonjs/locale/de.json +342 -323
- package/lib/commonjs/locale/el.json +342 -323
- package/lib/commonjs/locale/en-au.json +342 -323
- package/lib/commonjs/locale/en-ca.json +342 -323
- package/lib/commonjs/locale/en-gb.json +342 -323
- package/lib/commonjs/locale/en.json +342 -323
- package/lib/commonjs/locale/es-mx.json +342 -323
- package/lib/commonjs/locale/es.json +342 -323
- package/lib/commonjs/locale/et.json +342 -323
- package/lib/commonjs/locale/fa.json +342 -323
- package/lib/commonjs/locale/fi.json +342 -323
- package/lib/commonjs/locale/fr-ca.json +342 -323
- package/lib/commonjs/locale/fr.json +342 -323
- package/lib/commonjs/locale/gd.json +342 -323
- package/lib/commonjs/locale/he.json +342 -323
- package/lib/commonjs/locale/hi.json +342 -323
- package/lib/commonjs/locale/hr.json +342 -323
- package/lib/commonjs/locale/hu.json +342 -323
- package/lib/commonjs/locale/hy.json +342 -323
- package/lib/commonjs/locale/id.json +342 -323
- package/lib/commonjs/locale/is.json +342 -323
- package/lib/commonjs/locale/it.json +342 -323
- package/lib/commonjs/locale/ja.json +342 -323
- package/lib/commonjs/locale/kk.json +342 -323
- package/lib/commonjs/locale/ko.json +342 -323
- package/lib/commonjs/locale/lt.json +342 -323
- package/lib/commonjs/locale/lv.json +342 -323
- package/lib/commonjs/locale/mi.json +342 -323
- package/lib/commonjs/locale/ms.json +342 -323
- package/lib/commonjs/locale/nb.json +342 -323
- package/lib/commonjs/locale/nl-be.json +342 -323
- package/lib/commonjs/locale/nl.json +342 -323
- package/lib/commonjs/locale/nn.json +342 -323
- package/lib/commonjs/locale/no.json +342 -323
- package/lib/commonjs/locale/pl.json +342 -323
- package/lib/commonjs/locale/pt-br.json +342 -323
- package/lib/commonjs/locale/pt.json +342 -323
- package/lib/commonjs/locale/ro.json +342 -323
- package/lib/commonjs/locale/ru.json +342 -323
- package/lib/commonjs/locale/sk.json +342 -323
- package/lib/commonjs/locale/sl.json +342 -323
- package/lib/commonjs/locale/sq.json +342 -323
- package/lib/commonjs/locale/sr.json +342 -323
- package/lib/commonjs/locale/sv.json +342 -323
- package/lib/commonjs/locale/th.json +342 -323
- package/lib/commonjs/locale/tl.json +342 -323
- package/lib/commonjs/locale/tr.json +342 -323
- package/lib/commonjs/locale/uk.json +342 -323
- package/lib/commonjs/locale/vi.json +342 -323
- package/lib/commonjs/locale/zh-hk.json +342 -323
- package/lib/commonjs/locale/zh-tw.json +342 -323
- package/lib/commonjs/locale/zh.json +342 -323
- package/lib/commonjs/locale/zu.json +342 -323
- package/lib/commonjs/native/OsanoCmp.js +16 -0
- package/lib/commonjs/native/OsanoCmp.js.map +1 -1
- package/lib/commonjs/services/consent.js +6 -5
- package/lib/commonjs/services/consent.js.map +1 -1
- package/lib/commonjs/services/google-consent-mode-mapper.js +109 -0
- package/lib/commonjs/services/google-consent-mode-mapper.js.map +1 -0
- package/lib/commonjs/types/google-consent-mode.js +73 -0
- package/lib/commonjs/types/google-consent-mode.js.map +1 -0
- package/lib/commonjs/utils/OsanoLogger.js +51 -0
- package/lib/commonjs/utils/OsanoLogger.js.map +1 -0
- package/lib/commonjs/utils/index.js +7 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/views/Dialog/Buttons.js +1 -2
- package/lib/commonjs/views/Dialog/Buttons.js.map +1 -1
- package/lib/commonjs/views/Dialog/FirstLayerUsage.js +1 -2
- package/lib/commonjs/views/Dialog/FirstLayerUsage.js.map +1 -1
- package/lib/commonjs/views/Dialog/Message.js +1 -2
- package/lib/commonjs/views/Dialog/Message.js.map +1 -1
- package/lib/commonjs/views/Dialog/PreferenceManagementDeepLinks.js +1 -2
- package/lib/commonjs/views/Dialog/PreferenceManagementDeepLinks.js.map +1 -1
- package/lib/commonjs/views/Dialog/index.js +1 -2
- package/lib/commonjs/views/Dialog/index.js.map +1 -1
- package/lib/commonjs/views/Drawer/Drawer.ConsentCategories.js +1 -2
- package/lib/commonjs/views/Drawer/Drawer.ConsentCategories.js.map +1 -1
- package/lib/commonjs/views/Drawer/Drawer.Header.js +1 -2
- package/lib/commonjs/views/Drawer/Drawer.Header.js.map +1 -1
- package/lib/commonjs/views/Drawer/Drawer.Iab.Disclosures.js +1 -2
- package/lib/commonjs/views/Drawer/Drawer.Iab.Disclosures.js.map +1 -1
- package/lib/commonjs/views/Drawer/Drawer.Iab.Vendors.js +1 -2
- package/lib/commonjs/views/Drawer/Drawer.Iab.Vendors.js.map +1 -1
- package/lib/commonjs/views/Drawer/index.js +1 -2
- package/lib/commonjs/views/Drawer/index.js.map +1 -1
- package/lib/module/ConsentManager.js +56 -12
- package/lib/module/ConsentManager.js.map +1 -1
- package/lib/module/ConsentUiBuilder.js +9 -5
- package/lib/module/ConsentUiBuilder.js.map +1 -1
- package/lib/module/commands.js +10 -5
- package/lib/module/commands.js.map +1 -1
- package/lib/module/components/Button.js +5 -5
- package/lib/module/components/Button.js.map +1 -1
- package/lib/module/context.js +5 -4
- package/lib/module/context.js.map +1 -1
- package/lib/module/iab/tcf/constants.js +32 -0
- package/lib/module/iab/tcf/constants.js.map +1 -1
- package/lib/module/iab/tcf/iab-storage-utils.js +89 -0
- package/lib/module/iab/tcf/iab-storage-utils.js.map +1 -0
- package/lib/module/iab/tcf/middleware.js +25 -27
- package/lib/module/iab/tcf/middleware.js.map +1 -1
- package/lib/module/iab/tcf/selectors.js +1 -1
- package/lib/module/iab/tcf/selectors.js.map +1 -1
- package/lib/module/index.js +22 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/locale/af.json +342 -323
- package/lib/module/locale/ar.json +342 -323
- package/lib/module/locale/bg.json +342 -323
- package/lib/module/locale/ca.json +342 -323
- package/lib/module/locale/cs.json +342 -323
- package/lib/module/locale/da.json +342 -323
- package/lib/module/locale/de-at.json +342 -323
- package/lib/module/locale/de.json +342 -323
- package/lib/module/locale/el.json +342 -323
- package/lib/module/locale/en-au.json +342 -323
- package/lib/module/locale/en-ca.json +342 -323
- package/lib/module/locale/en-gb.json +342 -323
- package/lib/module/locale/en.json +342 -323
- package/lib/module/locale/es-mx.json +342 -323
- package/lib/module/locale/es.json +342 -323
- package/lib/module/locale/et.json +342 -323
- package/lib/module/locale/fa.json +342 -323
- package/lib/module/locale/fi.json +342 -323
- package/lib/module/locale/fr-ca.json +342 -323
- package/lib/module/locale/fr.json +342 -323
- package/lib/module/locale/gd.json +342 -323
- package/lib/module/locale/he.json +342 -323
- package/lib/module/locale/hi.json +342 -323
- package/lib/module/locale/hr.json +342 -323
- package/lib/module/locale/hu.json +342 -323
- package/lib/module/locale/hy.json +342 -323
- package/lib/module/locale/id.json +342 -323
- package/lib/module/locale/is.json +342 -323
- package/lib/module/locale/it.json +342 -323
- package/lib/module/locale/ja.json +342 -323
- package/lib/module/locale/kk.json +342 -323
- package/lib/module/locale/ko.json +342 -323
- package/lib/module/locale/lt.json +342 -323
- package/lib/module/locale/lv.json +342 -323
- package/lib/module/locale/mi.json +342 -323
- package/lib/module/locale/ms.json +342 -323
- package/lib/module/locale/nb.json +342 -323
- package/lib/module/locale/nl-be.json +342 -323
- package/lib/module/locale/nl.json +342 -323
- package/lib/module/locale/nn.json +342 -323
- package/lib/module/locale/no.json +342 -323
- package/lib/module/locale/pl.json +342 -323
- package/lib/module/locale/pt-br.json +342 -323
- package/lib/module/locale/pt.json +342 -323
- package/lib/module/locale/ro.json +342 -323
- package/lib/module/locale/ru.json +342 -323
- package/lib/module/locale/sk.json +342 -323
- package/lib/module/locale/sl.json +342 -323
- package/lib/module/locale/sq.json +342 -323
- package/lib/module/locale/sr.json +342 -323
- package/lib/module/locale/sv.json +342 -323
- package/lib/module/locale/th.json +342 -323
- package/lib/module/locale/tl.json +342 -323
- package/lib/module/locale/tr.json +342 -323
- package/lib/module/locale/uk.json +342 -323
- package/lib/module/locale/vi.json +342 -323
- package/lib/module/locale/zh-hk.json +342 -323
- package/lib/module/locale/zh-tw.json +342 -323
- package/lib/module/locale/zh.json +342 -323
- package/lib/module/locale/zu.json +342 -323
- package/lib/module/native/OsanoCmp.js +12 -0
- package/lib/module/native/OsanoCmp.js.map +1 -1
- package/lib/module/services/consent.js +6 -6
- package/lib/module/services/consent.js.map +1 -1
- package/lib/module/services/google-consent-mode-mapper.js +103 -0
- package/lib/module/services/google-consent-mode-mapper.js.map +1 -0
- package/lib/module/types/google-consent-mode.js +70 -0
- package/lib/module/types/google-consent-mode.js.map +1 -0
- package/lib/module/utils/OsanoLogger.js +44 -0
- package/lib/module/utils/OsanoLogger.js.map +1 -0
- package/lib/module/utils/index.js +1 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/lib/commonjs/ConsentManager.d.ts +15 -0
- package/lib/typescript/lib/commonjs/ConsentManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ConsentUiBuilder.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/commands.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/components/Button.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/components/Checkbox.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/components/ExpansionPanel.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/components/Link.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/components/StoragePolicyLink.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/components/Toggle.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/constants.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/gpp/api.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/gpp/consent.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/gpp/v1/index.d.ts +1 -3
- package/lib/typescript/lib/commonjs/iab/gpp/v1/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/consent.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/constants.d.ts +41 -1
- package/lib/typescript/lib/commonjs/iab/tcf/constants.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/iab-storage-utils.d.ts +9 -0
- package/lib/typescript/lib/commonjs/iab/tcf/iab-storage-utils.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/middleware.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/reducer.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/selectors.d.ts +0 -1
- package/lib/typescript/lib/commonjs/iab/tcf/selectors.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/shared-constants.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/usp/api.d.ts +1 -1
- package/lib/typescript/lib/commonjs/iab/usp/api.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/usp/consent.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/usp/selectors.d.ts +1 -4
- package/lib/typescript/lib/commonjs/iab/usp/selectors.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/iab/usp/v1/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/index.d.ts +2 -0
- package/lib/typescript/lib/commonjs/native/OsanoCmp.d.ts +4 -0
- package/lib/typescript/lib/commonjs/native/OsanoCmp.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/reducer.d.ts +7 -1
- package/lib/typescript/lib/commonjs/reducer.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/services/consent.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/services/google-consent-mode-mapper.d.ts +72 -0
- package/lib/typescript/lib/commonjs/services/google-consent-mode-mapper.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/types/google-consent-mode.d.ts +32 -0
- package/lib/typescript/lib/commonjs/types/google-consent-mode.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/utils/OsanoLogger.d.ts +16 -0
- package/lib/typescript/lib/commonjs/utils/OsanoLogger.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/utils/Translator.d.ts +1 -1
- package/lib/typescript/lib/commonjs/utils/Translator.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/utils/index.d.ts +2 -0
- package/lib/typescript/lib/commonjs/utils/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/views/Dialog/Buttons.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/views/Dialog/FirstLayerUsage.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/views/Dialog/Message.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/views/Dialog/PreferenceManagementDeepLinks.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/views/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.ConsentCategories.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.Header.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.Iab.Disclosures.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.Iab.Vendors.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/views/Drawer/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/ConsentManager.d.ts +17 -2
- package/lib/typescript/lib/module/ConsentManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/ConsentUiBuilder.d.ts +1 -0
- package/lib/typescript/lib/module/ConsentUiBuilder.d.ts.map +1 -1
- package/lib/typescript/lib/module/actions.d.ts.map +1 -1
- package/lib/typescript/lib/module/commands.d.ts +1 -1
- package/lib/typescript/lib/module/commands.d.ts.map +1 -1
- package/lib/typescript/lib/module/components/Button.d.ts.map +1 -1
- package/lib/typescript/lib/module/constants.d.ts.map +1 -1
- package/lib/typescript/lib/module/context.d.ts +9 -1
- package/lib/typescript/lib/module/context.d.ts.map +1 -1
- package/lib/typescript/lib/module/flavors/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/constants.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/gpp/api.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/gpp/consent.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/gpp/v1/constants.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/gpp/v1/index.d.ts +1 -3
- package/lib/typescript/lib/module/iab/gpp/v1/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/consent.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/constants.d.ts +41 -1
- package/lib/typescript/lib/module/iab/tcf/constants.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/iab-storage-utils.d.ts +8 -0
- package/lib/typescript/lib/module/iab/tcf/iab-storage-utils.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/index.d.ts +0 -2
- package/lib/typescript/lib/module/iab/tcf/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/middleware.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/reducer.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/selectors.d.ts +0 -1
- package/lib/typescript/lib/module/iab/tcf/selectors.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/v2.0/index.d.ts +0 -2
- package/lib/typescript/lib/module/iab/tcf/v2.0/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/v2.0/shared-constants.d.ts +0 -1
- package/lib/typescript/lib/module/iab/tcf/v2.0/shared-constants.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfcav1-constants.d.ts +5 -2
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfcav1-constants.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfeuv2-constants.d.ts +0 -1
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfeuv2-constants.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/usp/api.d.ts +1 -1
- package/lib/typescript/lib/module/iab/usp/api.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/usp/consent.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/usp/selectors.d.ts +1 -4
- package/lib/typescript/lib/module/iab/usp/selectors.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/usp/v1/constants.d.ts.map +1 -1
- package/lib/typescript/lib/module/iab/usp/v1/index.d.ts +1 -1
- package/lib/typescript/lib/module/iab/usp/v1/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/index.d.ts +1 -0
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/native/OsanoCmp.d.ts +4 -0
- package/lib/typescript/lib/module/native/OsanoCmp.d.ts.map +1 -1
- package/lib/typescript/lib/module/reducer.d.ts +7 -1
- package/lib/typescript/lib/module/reducer.d.ts.map +1 -1
- package/lib/typescript/lib/module/services/google-consent-mode-mapper.d.ts +71 -0
- package/lib/typescript/lib/module/services/google-consent-mode-mapper.d.ts.map +1 -0
- package/lib/typescript/lib/module/types/google-consent-mode.d.ts +38 -0
- package/lib/typescript/lib/module/types/google-consent-mode.d.ts.map +1 -0
- package/lib/typescript/lib/module/utils/OsanoLogger.d.ts +15 -0
- package/lib/typescript/lib/module/utils/OsanoLogger.d.ts.map +1 -0
- package/lib/typescript/lib/module/utils/Translator.d.ts +1 -1
- package/lib/typescript/lib/module/utils/Translator.d.ts.map +1 -1
- package/lib/typescript/lib/module/utils/index.d.ts +1 -0
- package/lib/typescript/src/ConsentManager.d.ts +23 -7
- package/lib/typescript/src/ConsentManager.d.ts.map +1 -1
- package/lib/typescript/src/ConsentUiBuilder.d.ts +1 -1
- package/lib/typescript/src/ConsentUiBuilder.d.ts.map +1 -1
- package/lib/typescript/src/commands.d.ts.map +1 -1
- package/lib/typescript/src/components/Button.d.ts +1 -1
- package/lib/typescript/src/components/Button.d.ts.map +1 -1
- package/lib/typescript/src/components/Divider.d.ts.map +1 -1
- package/lib/typescript/src/components/ExpansionPanel.d.ts.map +1 -1
- package/lib/typescript/src/components/Link.d.ts.map +1 -1
- package/lib/typescript/src/components/Locale.d.ts.map +1 -1
- package/lib/typescript/src/components/StoragePolicyLink.d.ts.map +1 -1
- package/lib/typescript/src/components/Toggle.d.ts.map +1 -1
- package/lib/typescript/src/context.d.ts +4 -2
- package/lib/typescript/src/context.d.ts.map +1 -1
- package/lib/typescript/src/iab/actions.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/api.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/consent.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/encoders/BooleanEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/encoders/DatetimeEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/encoders/FibonacciIntegerEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/encoders/FibonacciIntegerRangeEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/encoders/FixedBitfieldEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/encoders/FixedIntegerEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/encoders/FixedIntegerListEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/encoders/FixedIntegerRangeEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/encoders/FixedStringEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/v1/constants.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/v1/index.d.ts +1 -3
- package/lib/typescript/src/iab/gpp/v1/index.d.ts.map +1 -1
- package/lib/typescript/src/iab/index.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/actions.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/consent.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/constants.d.ts +32 -0
- package/lib/typescript/src/iab/tcf/constants.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/helpers.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/iab-storage-utils.d.ts +24 -0
- package/lib/typescript/src/iab/tcf/iab-storage-utils.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/middleware.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/reducer.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/selectors.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/v2.0/formatters.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/v2.0/shared-constants.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/v2.0/tcfcav1-constants.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/v2.0/tcfeuv2-constants.d.ts.map +1 -1
- package/lib/typescript/src/iab/usp/api.d.ts +1 -1
- package/lib/typescript/src/iab/usp/api.d.ts.map +1 -1
- package/lib/typescript/src/iab/usp/consent.d.ts.map +1 -1
- package/lib/typescript/src/iab/usp/selectors.d.ts +1 -4
- package/lib/typescript/src/iab/usp/selectors.d.ts.map +1 -1
- package/lib/typescript/src/iab/usp/v1/constants.d.ts.map +1 -1
- package/lib/typescript/src/iab/usp/v1/index.d.ts +1 -1
- package/lib/typescript/src/iab/usp/v1/index.d.ts.map +1 -1
- package/lib/typescript/src/iab/utilities.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/OsanoCmp.d.ts +4 -0
- package/lib/typescript/src/native/OsanoCmp.d.ts.map +1 -1
- package/lib/typescript/src/reducer.d.ts.map +1 -1
- package/lib/typescript/src/selectors.d.ts.map +1 -1
- package/lib/typescript/src/services/consent.d.ts +1 -1
- package/lib/typescript/src/services/consent.d.ts.map +1 -1
- package/lib/typescript/src/services/google-consent-mode-mapper.d.ts +66 -0
- package/lib/typescript/src/services/google-consent-mode-mapper.d.ts.map +1 -0
- package/lib/typescript/src/styles.d.ts.map +1 -1
- package/lib/typescript/src/types/google-consent-mode.d.ts +77 -0
- package/lib/typescript/src/types/google-consent-mode.d.ts.map +1 -0
- package/lib/typescript/src/utils/Color.d.ts.map +1 -1
- package/lib/typescript/src/utils/OsanoLogger.d.ts +15 -0
- package/lib/typescript/src/utils/OsanoLogger.d.ts.map +1 -0
- package/lib/typescript/src/utils/index.d.ts +1 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/ConsentManager.ts +93 -25
- package/src/ConsentUiBuilder.tsx +23 -13
- package/src/commands.ts +11 -8
- package/src/components/Button.tsx +17 -17
- package/src/context.ts +6 -3
- package/src/iab/tcf/constants.ts +46 -0
- package/src/iab/tcf/iab-storage-utils.ts +166 -0
- package/src/iab/tcf/middleware.ts +43 -51
- package/src/index.tsx +35 -8
- package/src/locale/af.json +342 -323
- package/src/locale/ar.json +342 -323
- package/src/locale/bg.json +342 -323
- package/src/locale/ca.json +342 -323
- package/src/locale/cs.json +342 -323
- package/src/locale/da.json +342 -323
- package/src/locale/de-at.json +342 -323
- package/src/locale/de.json +342 -323
- package/src/locale/el.json +342 -323
- package/src/locale/en-au.json +342 -323
- package/src/locale/en-ca.json +342 -323
- package/src/locale/en-gb.json +342 -323
- package/src/locale/en.json +342 -323
- package/src/locale/es-mx.json +342 -323
- package/src/locale/es.json +342 -323
- package/src/locale/et.json +342 -323
- package/src/locale/fa.json +342 -323
- package/src/locale/fi.json +342 -323
- package/src/locale/fr-ca.json +342 -323
- package/src/locale/fr.json +342 -323
- package/src/locale/gd.json +342 -323
- package/src/locale/he.json +342 -323
- package/src/locale/hi.json +342 -323
- package/src/locale/hr.json +342 -323
- package/src/locale/hu.json +342 -323
- package/src/locale/hy.json +342 -323
- package/src/locale/id.json +342 -323
- package/src/locale/is.json +342 -323
- package/src/locale/it.json +342 -323
- package/src/locale/ja.json +342 -323
- package/src/locale/kk.json +342 -323
- package/src/locale/ko.json +342 -323
- package/src/locale/lt.json +342 -323
- package/src/locale/lv.json +342 -323
- package/src/locale/mi.json +342 -323
- package/src/locale/ms.json +342 -323
- package/src/locale/nb.json +342 -323
- package/src/locale/nl-be.json +342 -323
- package/src/locale/nl.json +342 -323
- package/src/locale/nn.json +342 -323
- package/src/locale/no.json +342 -323
- package/src/locale/pl.json +342 -323
- package/src/locale/pt-br.json +342 -323
- package/src/locale/pt.json +342 -323
- package/src/locale/ro.json +342 -323
- package/src/locale/ru.json +342 -323
- package/src/locale/sk.json +342 -323
- package/src/locale/sl.json +342 -323
- package/src/locale/sq.json +342 -323
- package/src/locale/sr.json +342 -323
- package/src/locale/sv.json +342 -323
- package/src/locale/th.json +342 -323
- package/src/locale/tl.json +342 -323
- package/src/locale/tr.json +342 -323
- package/src/locale/uk.json +342 -323
- package/src/locale/vi.json +342 -323
- package/src/locale/zh-hk.json +342 -323
- package/src/locale/zh-tw.json +342 -323
- package/src/locale/zh.json +342 -323
- package/src/locale/zu.json +342 -323
- package/src/native/OsanoCmp.ts +29 -0
- package/src/services/consent.ts +9 -8
- package/src/services/google-consent-mode-mapper.ts +122 -0
- package/src/types/google-consent-mode.ts +122 -0
- package/src/types/index.d.ts +4 -2
- package/src/utils/OsanoLogger.ts +53 -0
- package/src/utils/index.ts +2 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { CLEAR_CONSENT, CLOSE, RELOAD, SET_CONFIG } from '../../actions';
|
|
3
|
-
import { SET_ALL_PURPOSE_CONSENT, SET_ALL_SPECIAL_FEATURE_CONSENT, SET_ALL_VENDOR_CONSENT, setConsent } from './actions';
|
|
4
|
-
import { SET_CONSENT_DATA, setConsentData } from '../actions';
|
|
5
3
|
import { clearStorage, getStorage, setStorage } from '../../native/OsanoCmp';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { osanoLogger } from '../../utils/OsanoLogger';
|
|
5
|
+
import { SET_CONSENT_DATA, setConsentData } from '../actions';
|
|
6
|
+
import { SET_ALL_PURPOSE_CONSENT, SET_ALL_SPECIAL_FEATURE_CONSENT, SET_ALL_VENDOR_CONSENT, setConsent } from './actions';
|
|
8
7
|
import { makeFormatConsentString, makeParseConsentString } from './consent';
|
|
8
|
+
import { idRecordToBinaryString, updatePurposeOptOuts, updateSpecialFeatureOptIns, updateVendorOptOuts } from './helpers';
|
|
9
|
+
import { clearAllIABKeys, setAllIABKeys } from './iab-storage-utils';
|
|
10
|
+
import { getConsentString, getPurposeIds } from './selectors';
|
|
9
11
|
import { Platform } from 'react-native';
|
|
10
12
|
export const makeMiddleware = initOptions => {
|
|
11
13
|
const {
|
|
@@ -72,6 +74,7 @@ export const makeMiddleware = initOptions => {
|
|
|
72
74
|
case 'ios':
|
|
73
75
|
case 'android':
|
|
74
76
|
clearStorage(`${gppSection}_${configId}`);
|
|
77
|
+
clearAllIABKeys();
|
|
75
78
|
break;
|
|
76
79
|
default:
|
|
77
80
|
try {
|
|
@@ -129,31 +132,26 @@ export const makeMiddleware = initOptions => {
|
|
|
129
132
|
// no change
|
|
130
133
|
break;
|
|
131
134
|
}
|
|
132
|
-
|
|
135
|
+
osanoLogger.info(`Setting new consent string -> ${value}`);
|
|
133
136
|
const consent = parseConsentString(value);
|
|
134
137
|
setStorage(storageKey, value);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
'IABTCF_PublisherConsent'
|
|
153
|
-
'IABTCF_PublisherLegitimateInterests'
|
|
154
|
-
'IABTCF_PublisherCustomPurposesConsents'
|
|
155
|
-
'IABTCF_PublisherCustomPurposesLegitimateInterests'
|
|
156
|
-
*/
|
|
138
|
+
const consentData = {
|
|
139
|
+
tcString: value,
|
|
140
|
+
cmpId,
|
|
141
|
+
cmpVersion,
|
|
142
|
+
policyVersion: version,
|
|
143
|
+
publisherCC: consent.publisherCC,
|
|
144
|
+
gdprApplies: consent.gdprApplies,
|
|
145
|
+
purposeOneTreatment: consent.purposeOneTreatment,
|
|
146
|
+
useNonStandardStacks: consent.useNonStandardStacks,
|
|
147
|
+
vendorConsentsString: idRecordToBinaryString(consent.vendor.consents),
|
|
148
|
+
vendorLegitimateInterestsString: idRecordToBinaryString(consent.vendor.legitimateInterests),
|
|
149
|
+
purposeConsentsString: idRecordToBinaryString(consent.purpose.consents),
|
|
150
|
+
purposeLegitimateInterestsString: idRecordToBinaryString(consent.purpose.legitimateInterests),
|
|
151
|
+
specialFeatureOptinsString: idRecordToBinaryString(consent.specialFeatureOptins),
|
|
152
|
+
enableAdvertiserConsentMode: config?.googleConsent && config?.tcfIsApplicable
|
|
153
|
+
};
|
|
154
|
+
setAllIABKeys(consentData);
|
|
157
155
|
}
|
|
158
156
|
}
|
|
159
157
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CLEAR_CONSENT","CLOSE","RELOAD","SET_CONFIG","
|
|
1
|
+
{"version":3,"names":["CLEAR_CONSENT","CLOSE","RELOAD","SET_CONFIG","clearStorage","getStorage","setStorage","osanoLogger","SET_CONSENT_DATA","setConsentData","SET_ALL_PURPOSE_CONSENT","SET_ALL_SPECIAL_FEATURE_CONSENT","SET_ALL_VENDOR_CONSENT","setConsent","makeFormatConsentString","makeParseConsentString","idRecordToBinaryString","updatePurposeOptOuts","updateSpecialFeatureOptIns","updateVendorOptOuts","clearAllIABKeys","setAllIABKeys","getConsentString","getPurposeIds","Platform","makeMiddleware","initOptions","createConsentPayload","gppSection","version","parseConsentString","formatConsentString","store","next","action","oldState","getState","newState","type","payload","config","configId","iab","tcf","v2","resConsent","jsonString","JSON","parse","dispatch","e","OS","then","catch","window","localStorage","getItem","removeItem","acceptOrDeny","purposeIds","purposeOptouts","specialFeatureIds","Set","Object","values","getVendors","map","vendor","specialPurposes","reduce","acc","ids","concat","specialFeatureOptins","Array","from","vendorIds","getVendorIds","vendorOptouts","value","cmpId","cmpVersion","storageKey","currentTcString","info","consent","consentData","tcString","policyVersion","publisherCC","gdprApplies","purposeOneTreatment","useNonStandardStacks","vendorConsentsString","consents","vendorLegitimateInterestsString","legitimateInterests","purposeConsentsString","purpose","purposeLegitimateInterestsString","specialFeatureOptinsString","enableAdvertiserConsentMode","googleConsent","tcfIsApplicable"],"sourceRoot":"../../../../src","sources":["iab/tcf/middleware.ts"],"mappings":"AAAA;AACA,SAASA,aAAa,EAAEC,KAAK,EAAEC,MAAM,EAAEC,UAAU,QAAQ,eAAe;AACxE,SAASC,YAAY,EAAEC,UAAU,EAAEC,UAAU,QAAQ,uBAAuB;AAE5E,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,gBAAgB,EAAEC,cAAc,QAAQ,YAAY;AAC7D,SACCC,uBAAuB,EACvBC,+BAA+B,EAC/BC,sBAAsB,EACtBC,UAAU,QACJ,WAAW;AAClB,SAASC,uBAAuB,EAAEC,sBAAsB,QAAQ,WAAW;AAC3E,SACCC,sBAAsB,EACtBC,oBAAoB,EACpBC,0BAA0B,EAC1BC,mBAAmB,QACb,WAAW;AAClB,SAASC,eAAe,EAAEC,aAAa,QAAQ,qBAAqB;AACpE,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,aAAa;AAG7D,SAASC,QAAQ,QAAQ,cAA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EAChB,CAAC;AACH,CAAC;AAED,eAAeZ,cAAc","ignoreList":[]}
|
|
@@ -22,7 +22,7 @@ export const getConsentString = (state, {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
// API Specific Data
|
|
25
|
-
export const getPublisherLegitimateInterests = (
|
|
25
|
+
export const getPublisherLegitimateInterests = (/* state, apiVersion */
|
|
26
26
|
) => {
|
|
27
27
|
// Placeholder
|
|
28
28
|
return {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["consentToPurpose","purposeIds","ConsentCategory","get","initialState","isBrowsingFrom","DOMAIN","doesGDPRApply","config","apiVersion","getConfigData","getStore","isIABEnabled","iab","enabled","parseInt","getStateData","state","getCurrentScreen","Math","max","stack","length","getConsentString","gppSection","tcString","consentStrings","getPublisherLegitimateInterests","getPurposeIds","getPurposeOptOuts","getPurposeConsents","consent","getSavedConsent","getConsent","optOutPurposes","Object","entries","reduce","purposeConsents","purposeId","hasConsented","getPurposesLITransparency","purposeLITransparency","forEach","getSpecialFeatureOptIns","getVendors","getVendorData","vendorId","getVendorIds","keys","map","Number","getVendorOptOuts","getVendorListError","getVendorListVersion","hasActed","hasConsentedToSpecialFeature","specialFeatureId","hasOptedOutOfVendor","hasOptedOutOfPurpose","isTcfApplicable","isVendorListLoaded","isVendorListLoading","getCountryCode","country","substring","toUpperCase","isSaved","getFinalOptOutValue","pendingNewValue","undefined","existingOptOut","OPT_OUT"],"sourceRoot":"../../../../src","sources":["iab/tcf/selectors.ts"],"mappings":"AACA,SAASA,gBAAgB,EAAEC,UAAU,QAAQ,aAAa;AAG1D,SAASC,eAAe,QAAQ,iBAAiB;AAGjD,SAASC,GAAG,QAAQ,aAAa;AACjC,SAASC,YAAY,QAAQ,eAAe;AAC5C,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,MAAMC,MAAM,GAAG,SAAS;;AAExB;AACA,OAAO,MAAMC,aAAa,GAAGA,CAACC,MAAc,EAAEC,UAA2B,KAAK;EAC7E,OAAO,CAAC,CAACN,GAAG,CAACO,aAAa,CAACF,MAAM,EAAEC,UAAU,CAAC,EAAE,aAAa,CAAC,IAAI,KAAK;AACxE,CAAC;AACD,OAAO,MAAME,QAAQ,GAAIH,MAAc,IAAKL,GAAG,CAACK,MAAM,EAAEF,MAAM,EAAE,CAAC,CAAC,CAAC;AACnE,OAAO,MAAMM,YAAY,GAAIJ,MAAc,IAAKA,MAAM,CAACK,GAAG,CAACC,OAAO,IAAI,KAAK;AAE3E,OAAO,MAAMJ,aAAa,GAAGA,CAACF,MAAc,EAAEC,UAAU,GAAG,GAAG,KAC7DN,GAAG,CAACK,MAAM,EAAE,GAAGF,MAAM,KAAKS,QAAQ,CAACN,UAAU,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC1D,OAAO,MAAMO,YAAY,GAAGA,CAC3BC,KAAwB,EACxBR,UAAc,KAEdN,GAAG,CACFc,KAAK,EACL,GAAGX,MAAM,KAAKS,QAAQ,CAACN,UAAU,IAAI,GAAG,EAAE,EAAE,CAAC,EAAE,EAC/C,CAAC,CACF,CAAkB;AAEnB,OAAO,MAAMS,gBAAgB,GAAID,KAAiB,IACjDE,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,KAAK,CAACI,KAAK,CAACC,MAAM,GAAG,CAAC,CAAC;AAEpC,OAAO,MAAMC,gBAAgB,GAAGA,CAC/BN,KAAe,EACf;EAAEO,UAAU;EAAEC,QAAQ,GAAG;AAA+C,CAAC,GAAG,CAAC,CAAC,KAC1E;EACJ,OACED,UAAU,IACVP,KAAK,CAACJ,GAAG,CAACa,cAAc,IACxBT,KAAK,CAACJ,GAAG,CAACa,cAAc,CAACF,UAAU,CAAC,IACrCC,QAAQ;AAEV,CAAC;;AAED;AACA,OAAO,MAAME,+BAA+B,GAAGA,
|
|
1
|
+
{"version":3,"names":["consentToPurpose","purposeIds","ConsentCategory","get","initialState","isBrowsingFrom","DOMAIN","doesGDPRApply","config","apiVersion","getConfigData","getStore","isIABEnabled","iab","enabled","parseInt","getStateData","state","getCurrentScreen","Math","max","stack","length","getConsentString","gppSection","tcString","consentStrings","getPublisherLegitimateInterests","getPurposeIds","getPurposeOptOuts","getPurposeConsents","consent","getSavedConsent","getConsent","optOutPurposes","Object","entries","reduce","purposeConsents","purposeId","hasConsented","getPurposesLITransparency","purposeLITransparency","forEach","getSpecialFeatureOptIns","getVendors","getVendorData","vendorId","getVendorIds","keys","map","Number","getVendorOptOuts","getVendorListError","getVendorListVersion","hasActed","hasConsentedToSpecialFeature","specialFeatureId","hasOptedOutOfVendor","hasOptedOutOfPurpose","isTcfApplicable","isVendorListLoaded","isVendorListLoading","getCountryCode","country","substring","toUpperCase","isSaved","getFinalOptOutValue","pendingNewValue","undefined","existingOptOut","OPT_OUT"],"sourceRoot":"../../../../src","sources":["iab/tcf/selectors.ts"],"mappings":"AACA,SAASA,gBAAgB,EAAEC,UAAU,QAAQ,aAAa;AAG1D,SAASC,eAAe,QAAQ,iBAAiB;AAGjD,SAASC,GAAG,QAAQ,aAAa;AACjC,SAASC,YAAY,QAAQ,eAAe;AAC5C,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,MAAMC,MAAM,GAAG,SAAS;;AAExB;AACA,OAAO,MAAMC,aAAa,GAAGA,CAACC,MAAc,EAAEC,UAA2B,KAAK;EAC7E,OAAO,CAAC,CAACN,GAAG,CAACO,aAAa,CAACF,MAAM,EAAEC,UAAU,CAAC,EAAE,aAAa,CAAC,IAAI,KAAK;AACxE,CAAC;AACD,OAAO,MAAME,QAAQ,GAAIH,MAAc,IAAKL,GAAG,CAACK,MAAM,EAAEF,MAAM,EAAE,CAAC,CAAC,CAAC;AACnE,OAAO,MAAMM,YAAY,GAAIJ,MAAc,IAAKA,MAAM,CAACK,GAAG,CAACC,OAAO,IAAI,KAAK;AAE3E,OAAO,MAAMJ,aAAa,GAAGA,CAACF,MAAc,EAAEC,UAAU,GAAG,GAAG,KAC7DN,GAAG,CAACK,MAAM,EAAE,GAAG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OAAO,GAAIlD,KAAiB,IAAK,CAAC,CAACe,eAAe,CAACf,KAAK,CAAC;AAEtE,OAAO,MAAMmD,mBAAmB,GAAGA,CAClCnD,KAAkB,EAClBoD,eAAyB,KACrB;EACJ,IAAIA,eAAe,KAAK,IAAI,EAAE;IAC7B,OAAO,IAAI;EACZ,CAAC,MAAM,IAAIA,eAAe,KAAKC,SAAS,EAAE;IACzC,MAAMC,cAAc,GACnBpE,GAAG,CAACc,KAAK,EAAE,CAAC,SAAS,EAAEf,eAAe,CAACsE,OAAO,CAAC,CAAC,IAChDpE,YAAY,CAAC2B,OAAO,CAAC7B,eAAe,CAACsE,OAAO,CAAC;IAC9C,OAAOD,cAAc;EACtB;EAEA,OAAO,KAAK;AACb,CAAC;AAED,OAAO,MAAMtC,UAAU,GAAIhB,KAAkB,IAAK;EACjD,MAAMc,OAAqD,GAAG;IAC7D,IAAI5B,GAAG,CAACc,KAAK,EAAE,SAAS,CAAC,IAAIb,YAAY,CAAC2B,OAAO;EAClD,CAAC;EACD;EACA;EACAA,OAAO,CAAC7B,eAAe,CAACsE,OAAO,CAAC,GAAGJ,mBAAmB,CAACnD,KAAK,CAAC;EAC7D,OAAOc,OAAO;AACf,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { OsanoCategories, init, reducer } from './reducer';
|
|
2
|
-
import { Platform, UIManager } from 'react-native';
|
|
3
1
|
import React, { memo, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
2
|
+
import { Platform, UIManager } from 'react-native';
|
|
4
3
|
import { CLEAR_CONSENT, reload, setConfig, setLocale, showDialog, showDrawer } from './actions';
|
|
5
|
-
import {
|
|
4
|
+
import { OsanoCategories, init, reducer } from './reducer';
|
|
6
5
|
import { ConsentManager } from './ConsentManager';
|
|
7
6
|
import { ConsentUiBuilder } from './ConsentUiBuilder';
|
|
7
|
+
import { ConsentCategory } from './constants';
|
|
8
8
|
import { OsanoPublicContext } from './context';
|
|
9
|
+
import { usePrevious } from './hooks/usePrevious';
|
|
10
|
+
import useThunkReducer from './hooks/useThunkReducer';
|
|
9
11
|
import { addIabReducers } from './iab';
|
|
10
12
|
import { getConsent } from './selectors';
|
|
11
13
|
import { recordConsent } from './services/consent';
|
|
12
|
-
import
|
|
13
|
-
import { usePrevious } from './hooks/usePrevious';
|
|
14
|
+
import { osanoLogger as OsanoLogger } from './utils/OsanoLogger';
|
|
14
15
|
export { OsanoPublicContext as OsanoContext } from './context';
|
|
16
|
+
export { GoogleConsentModeMapper } from './services/google-consent-mode-mapper';
|
|
15
17
|
if (Platform.OS === 'android') {
|
|
16
18
|
if (UIManager.setLayoutAnimationEnabledExperimental) {
|
|
17
19
|
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
@@ -27,14 +29,19 @@ export const Osano = /*#__PURE__*/memo(props => {
|
|
|
27
29
|
onConfigLoadSuccess,
|
|
28
30
|
onLangLoadFailure,
|
|
29
31
|
onLangLoadSuccess,
|
|
32
|
+
onGoogleConsentUpdate,
|
|
30
33
|
overrides,
|
|
31
|
-
extUsrData
|
|
34
|
+
extUsrData,
|
|
35
|
+
setLoggingEnabled = true
|
|
32
36
|
} = props;
|
|
33
37
|
const {
|
|
34
38
|
flavor,
|
|
35
39
|
iabEnabled
|
|
36
40
|
} = overrides || {};
|
|
37
41
|
const consentManager = useRef(new ConsentManager(overrides, extUsrData));
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
OsanoLogger.setEnabled(setLoggingEnabled);
|
|
44
|
+
}, [setLoggingEnabled]);
|
|
38
45
|
const [_state, store] = useThunkReducer(reducer, {
|
|
39
46
|
configId,
|
|
40
47
|
customerId
|
|
@@ -68,6 +75,7 @@ export const Osano = /*#__PURE__*/memo(props => {
|
|
|
68
75
|
dispatch({
|
|
69
76
|
type: CLEAR_CONSENT
|
|
70
77
|
});
|
|
78
|
+
consentManager.current.triggerGoogleConsentUpdate([ConsentCategory.ESSENTIAL]);
|
|
71
79
|
}, []);
|
|
72
80
|
const retryWithBackoff = async (callback, retries, delay) => {
|
|
73
81
|
for (let attempt = 1; attempt <= retries; attempt++) {
|
|
@@ -132,6 +140,13 @@ export const Osano = /*#__PURE__*/memo(props => {
|
|
|
132
140
|
useEffect(() => {
|
|
133
141
|
consentManager.current.config.type = flavor;
|
|
134
142
|
}, [flavor]);
|
|
143
|
+
|
|
144
|
+
// Set up Google Consent Mode callback if provided
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
if (onGoogleConsentUpdate) {
|
|
147
|
+
consentManager.current.setGoogleConsentModeCallback(onGoogleConsentUpdate);
|
|
148
|
+
}
|
|
149
|
+
}, [onGoogleConsentUpdate]);
|
|
135
150
|
const iabLoaded = useRef(false);
|
|
136
151
|
const iabChanged = usePrevious(iabEnabled) !== iabEnabled;
|
|
137
152
|
useEffect(() => {
|
|
@@ -177,6 +192,6 @@ export const Osano = /*#__PURE__*/memo(props => {
|
|
|
177
192
|
flavor: nextFlavor,
|
|
178
193
|
iabEnabled: nextIabEnabled
|
|
179
194
|
} = next.overrides || {};
|
|
180
|
-
return prev.configId === next.configId && prev.customerId === next.customerId && prev.hideUI === next.hideUI && prev.hideDisclosures === next.hideDisclosures && prev.children === next.children && flavor === nextFlavor && iabEnabled === nextIabEnabled;
|
|
195
|
+
return prev.configId === next.configId && prev.customerId === next.customerId && prev.hideUI === next.hideUI && prev.hideDisclosures === next.hideDisclosures && prev.children === next.children && prev.setLoggingEnabled === next.setLoggingEnabled && flavor === nextFlavor && iabEnabled === nextIabEnabled;
|
|
181
196
|
});
|
|
182
197
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","memo","useCallback","useEffect","useMemo","useRef","Platform","UIManager","CLEAR_CONSENT","reload","setConfig","setLocale","showDialog","showDrawer","OsanoCategories","init","reducer","ConsentManager","ConsentUiBuilder","ConsentCategory","OsanoPublicContext","usePrevious","useThunkReducer","addIabReducers","getConsent","recordConsent","osanoLogger","OsanoLogger","OsanoContext","GoogleConsentModeMapper","OS","setLayoutAnimationEnabledExperimental","Osano","props","configId","customerId","hideUI","hideDisclosures","onConfigLoadFailure","onConfigLoadSuccess","onLangLoadFailure","onLangLoadSuccess","onGoogleConsentUpdate","overrides","extUsrData","setLoggingEnabled","flavor","iabEnabled","consentManager","setEnabled","_state","store","current","middleware","addMiddleware","dispatch","getState","removeMiddleware","handleGetConsent","category","hasConsent","consent","ESSENTIAL","handleRecordConsent","consentedCategories","undefined","categories","Array","isArray","filter","cat","includes","handleClearConsent","type","triggerGoogleConsentUpdate","retryWithBackoff","callback","retries","delay","attempt","loaded","Error","error","Promise","resolve","setTimeout","handleShowDialog","handleShowDrawer","handleSetLocale","value","translator","load","then","handleGetDeviceId","deviceId","context","reloadProps","catch","locale","getDeviceId","clearConsent","showBanner","isReady","config","setGoogleConsentModeCallback","iabLoaded","iabChanged","frameworks","tcfController","push","versions","length","createElement","Provider","children","cmp","prev","next","nextFlavor","nextIabEnabled"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAC5E,SAASC,QAAQ,EAAEC,SAAS,QAAQ,cAAc;AAClD,SACCC,aAAa,EACbC,MAAM,EACNC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,UAAU,QACJ,WAAW;AAClB,SAASC,eAAe,EAAEC,IAAI,EAAEC,OAAO,QAAQ,WAAW;AAG1D,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,eAAe,QAAQ,aAAa;AAC7C,SAASC,kBAAkB,QAAQ,WAAW;AAC9C,SAASC,WAAW,QAAQ,qBAAqB;AACjD,OAAOC,eAAe,MAAsB,yBAAyB;AACrE,SAASC,cAAc,QAAQ,OAAO;AA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