@osano/osano-cmp-react-native 0.1.0 → 0.2.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.md +251 -0
- package/lib/commonjs/ConsentManager.js +209 -69
- package/lib/commonjs/ConsentManager.js.map +1 -1
- package/lib/commonjs/ConsentUiBuilder.js +2 -2
- package/lib/commonjs/ConsentUiBuilder.js.map +1 -1
- package/lib/commonjs/actions.js +84 -0
- package/lib/commonjs/actions.js.map +1 -0
- package/lib/commonjs/commands.js +63 -0
- package/lib/commonjs/commands.js.map +1 -0
- package/lib/commonjs/components/Button.js +35 -25
- package/lib/commonjs/components/Button.js.map +1 -1
- package/lib/commonjs/components/Locale.js +5 -3
- package/lib/commonjs/components/Locale.js.map +1 -1
- package/lib/commonjs/context.js +4 -3
- package/lib/commonjs/context.js.map +1 -1
- package/lib/commonjs/flavors/index.js +1 -1
- package/lib/commonjs/hooks/usePrevious.js +1 -1
- package/lib/commonjs/hooks/usePrevious.js.map +1 -1
- package/lib/commonjs/hooks/useThunkReducer.js +40 -15
- package/lib/commonjs/hooks/useThunkReducer.js.map +1 -1
- package/lib/commonjs/iab/actions.js +17 -0
- package/lib/commonjs/iab/actions.js.map +1 -0
- package/lib/commonjs/iab/constants.js +3 -1
- package/lib/commonjs/iab/constants.js.map +1 -1
- package/lib/commonjs/iab/gpp/encoders/FixedIntegerEncoder.js +1 -1
- package/lib/commonjs/iab/gpp/encoders/TraditionalBase64UrlEncoder.js.map +1 -1
- package/lib/commonjs/iab/index.js +33 -0
- package/lib/commonjs/iab/index.js.map +1 -0
- package/lib/commonjs/iab/reducer.js +46 -0
- package/lib/commonjs/iab/reducer.js.map +1 -0
- package/lib/commonjs/iab/tcf/actions.js +74 -14
- package/lib/commonjs/iab/tcf/actions.js.map +1 -1
- package/lib/commonjs/iab/tcf/consent.js +51 -87
- package/lib/commonjs/iab/tcf/consent.js.map +1 -1
- package/lib/commonjs/iab/tcf/constants.js +5 -5
- package/lib/commonjs/iab/tcf/constants.js.map +1 -1
- package/lib/commonjs/iab/tcf/helpers.js +72 -0
- package/lib/commonjs/iab/tcf/helpers.js.map +1 -0
- package/lib/commonjs/iab/tcf/index.js +5 -3
- package/lib/commonjs/iab/tcf/index.js.map +1 -1
- package/lib/commonjs/iab/tcf/middleware.js +172 -0
- package/lib/commonjs/iab/tcf/middleware.js.map +1 -0
- package/lib/commonjs/iab/tcf/reducer.js +225 -40
- package/lib/commonjs/iab/tcf/reducer.js.map +1 -1
- package/lib/commonjs/iab/tcf/selectors.js +60 -69
- package/lib/commonjs/iab/tcf/selectors.js.map +1 -1
- package/lib/commonjs/iab/tcf/v2.0/encoders.js +0 -8
- package/lib/commonjs/iab/tcf/v2.0/encoders.js.map +1 -1
- package/lib/commonjs/iab/tcf/v2.0/formatters.js +5 -7
- package/lib/commonjs/iab/tcf/v2.0/formatters.js.map +1 -1
- package/lib/commonjs/iab/tcf/v2.0/index.js +18 -16
- package/lib/commonjs/iab/tcf/v2.0/index.js.map +1 -1
- package/lib/commonjs/iab/tcf/v2.0/shared-constants.js +19 -3
- package/lib/commonjs/iab/tcf/v2.0/shared-constants.js.map +1 -1
- package/lib/commonjs/iab/tcf/v2.0/tcfcav1-constants.js +2 -14
- package/lib/commonjs/iab/tcf/v2.0/tcfcav1-constants.js.map +1 -1
- package/lib/commonjs/iab/tcf/v2.0/tcfeuv2-constants.js +2 -13
- package/lib/commonjs/iab/tcf/v2.0/tcfeuv2-constants.js.map +1 -1
- package/lib/commonjs/index.js +77 -30
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/reducer.js +366 -0
- package/lib/commonjs/reducer.js.map +1 -0
- package/lib/commonjs/selectors.js +83 -0
- package/lib/commonjs/selectors.js.map +1 -0
- package/lib/commonjs/services/consent.js +20 -4
- package/lib/commonjs/services/consent.js.map +1 -1
- package/lib/commonjs/styles.js +1 -1
- package/lib/commonjs/styles.js.map +1 -1
- package/lib/commonjs/utils/Translator.js +4 -2
- package/lib/commonjs/utils/Translator.js.map +1 -1
- package/lib/commonjs/utils/index.js +3 -16
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/types.js +2 -0
- package/lib/commonjs/utils/types.js.map +1 -0
- package/lib/commonjs/views/Dialog/Buttons.js +2 -2
- package/lib/commonjs/views/Dialog/Buttons.js.map +1 -1
- package/lib/commonjs/views/Dialog/Message.js +1 -1
- package/lib/commonjs/views/Dialog/Message.js.map +1 -1
- package/lib/commonjs/views/Dialog/PreferenceManagementDeepLinks.js +5 -5
- package/lib/commonjs/views/Dialog/PreferenceManagementDeepLinks.js.map +1 -1
- package/lib/commonjs/views/Dialog/index.js +15 -9
- package/lib/commonjs/views/Dialog/index.js.map +1 -1
- package/lib/commonjs/views/Drawer/Drawer.ConsentCategories.js +50 -22
- package/lib/commonjs/views/Drawer/Drawer.ConsentCategories.js.map +1 -1
- package/lib/commonjs/views/Drawer/Drawer.Header.js +1 -0
- package/lib/commonjs/views/Drawer/Drawer.Header.js.map +1 -1
- package/lib/commonjs/views/Drawer/Drawer.Iab.Disclosures.js +26 -14
- package/lib/commonjs/views/Drawer/Drawer.Iab.Disclosures.js.map +1 -1
- package/lib/commonjs/views/Drawer/Drawer.Iab.Vendors.js +60 -36
- package/lib/commonjs/views/Drawer/Drawer.Iab.Vendors.js.map +1 -1
- package/lib/commonjs/views/Drawer/index.js +11 -10
- package/lib/commonjs/views/Drawer/index.js.map +1 -1
- package/lib/module/ConsentManager.js +209 -71
- package/lib/module/ConsentManager.js.map +1 -1
- package/lib/module/ConsentUiBuilder.js +1 -1
- package/lib/module/ConsentUiBuilder.js.map +1 -1
- package/lib/module/actions.js +66 -0
- package/lib/module/actions.js.map +1 -0
- package/lib/module/commands.js +55 -0
- package/lib/module/commands.js.map +1 -0
- package/lib/module/components/Button.js +30 -20
- package/lib/module/components/Button.js.map +1 -1
- package/lib/module/components/Locale.js +5 -3
- package/lib/module/components/Locale.js.map +1 -1
- package/lib/module/context.js +3 -2
- package/lib/module/context.js.map +1 -1
- package/lib/module/flavors/index.js +1 -1
- package/lib/module/hooks/usePrevious.js +1 -1
- package/lib/module/hooks/usePrevious.js.map +1 -1
- package/lib/module/hooks/useThunkReducer.js +40 -16
- package/lib/module/hooks/useThunkReducer.js.map +1 -1
- package/lib/module/iab/actions.js +10 -0
- package/lib/module/iab/actions.js.map +1 -0
- package/lib/module/iab/constants.js +2 -0
- package/lib/module/iab/constants.js.map +1 -1
- package/lib/module/iab/gpp/encoders/FixedIntegerEncoder.js +1 -1
- package/lib/module/iab/gpp/encoders/FixedIntegerEncoder.js.map +1 -1
- package/lib/module/iab/gpp/encoders/TraditionalBase64UrlEncoder.js.map +1 -1
- package/lib/module/iab/index.js +26 -0
- package/lib/module/iab/index.js.map +1 -0
- package/lib/module/iab/reducer.js +39 -0
- package/lib/module/iab/reducer.js.map +1 -0
- package/lib/module/iab/tcf/actions.js +63 -13
- package/lib/module/iab/tcf/actions.js.map +1 -1
- package/lib/module/iab/tcf/consent.js +47 -84
- package/lib/module/iab/tcf/consent.js.map +1 -1
- package/lib/module/iab/tcf/constants.js +5 -5
- package/lib/module/iab/tcf/constants.js.map +1 -1
- package/lib/module/iab/tcf/helpers.js +62 -0
- package/lib/module/iab/tcf/helpers.js.map +1 -0
- package/lib/module/iab/tcf/index.js +3 -3
- package/lib/module/iab/tcf/index.js.map +1 -1
- package/lib/module/iab/tcf/middleware.js +164 -0
- package/lib/module/iab/tcf/middleware.js.map +1 -0
- package/lib/module/iab/tcf/reducer.js +223 -40
- package/lib/module/iab/tcf/reducer.js.map +1 -1
- package/lib/module/iab/tcf/selectors.js +45 -57
- package/lib/module/iab/tcf/selectors.js.map +1 -1
- package/lib/module/iab/tcf/v2.0/encoders.js +0 -9
- package/lib/module/iab/tcf/v2.0/encoders.js.map +1 -1
- package/lib/module/iab/tcf/v2.0/formatters.js +5 -7
- package/lib/module/iab/tcf/v2.0/formatters.js.map +1 -1
- package/lib/module/iab/tcf/v2.0/index.js +18 -16
- package/lib/module/iab/tcf/v2.0/index.js.map +1 -1
- package/lib/module/iab/tcf/v2.0/shared-constants.js +17 -3
- package/lib/module/iab/tcf/v2.0/shared-constants.js.map +1 -1
- package/lib/module/iab/tcf/v2.0/tcfcav1-constants.js +2 -14
- package/lib/module/iab/tcf/v2.0/tcfcav1-constants.js.map +1 -1
- package/lib/module/iab/tcf/v2.0/tcfeuv2-constants.js +2 -13
- package/lib/module/iab/tcf/v2.0/tcfeuv2-constants.js.map +1 -1
- package/lib/module/index.js +77 -29
- package/lib/module/index.js.map +1 -1
- package/lib/module/{store.js → reducer.js} +76 -238
- package/lib/module/reducer.js.map +1 -0
- package/lib/module/selectors.js +60 -0
- package/lib/module/selectors.js.map +1 -0
- package/lib/module/services/consent.js +20 -4
- package/lib/module/services/consent.js.map +1 -1
- package/lib/module/styles.js +1 -1
- package/lib/module/styles.js.map +1 -1
- package/lib/module/utils/Translator.js +4 -2
- package/lib/module/utils/Translator.js.map +1 -1
- package/lib/module/utils/index.js +3 -16
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/types.js +2 -0
- package/lib/module/utils/types.js.map +1 -0
- package/lib/module/views/Dialog/Buttons.js +1 -1
- package/lib/module/views/Dialog/Buttons.js.map +1 -1
- package/lib/module/views/Dialog/Message.js +1 -1
- package/lib/module/views/Dialog/Message.js.map +1 -1
- package/lib/module/views/Dialog/PreferenceManagementDeepLinks.js +4 -4
- package/lib/module/views/Dialog/PreferenceManagementDeepLinks.js.map +1 -1
- package/lib/module/views/Dialog/index.js +11 -5
- package/lib/module/views/Dialog/index.js.map +1 -1
- package/lib/module/views/Drawer/Drawer.ConsentCategories.js +41 -12
- package/lib/module/views/Drawer/Drawer.ConsentCategories.js.map +1 -1
- package/lib/module/views/Drawer/Drawer.Header.js +1 -0
- package/lib/module/views/Drawer/Drawer.Header.js.map +1 -1
- package/lib/module/views/Drawer/Drawer.Iab.Disclosures.js +24 -12
- package/lib/module/views/Drawer/Drawer.Iab.Disclosures.js.map +1 -1
- package/lib/module/views/Drawer/Drawer.Iab.Vendors.js +55 -31
- package/lib/module/views/Drawer/Drawer.Iab.Vendors.js.map +1 -1
- package/lib/module/views/Drawer/index.js +3 -1
- package/lib/module/views/Drawer/index.js.map +1 -1
- package/lib/typescript/babel.config.d.ts +2 -0
- package/lib/typescript/babel.config.d.ts.map +1 -0
- package/lib/typescript/documentation/babel.config.d.ts +2 -0
- package/lib/typescript/documentation/babel.config.d.ts.map +1 -0
- package/lib/typescript/documentation/docusaurus.config.d.ts +4 -0
- package/lib/typescript/documentation/docusaurus.config.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/ConsentManager.d.ts +190 -0
- package/lib/typescript/lib/commonjs/ConsentManager.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/ConsentUiBuilder.d.ts +3 -0
- package/lib/typescript/lib/commonjs/ConsentUiBuilder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/actions.d.ts +66 -0
- package/lib/typescript/lib/commonjs/actions.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/commands.d.ts +4 -0
- package/lib/typescript/lib/commonjs/commands.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/components/Button.d.ts +11 -0
- package/lib/typescript/lib/commonjs/components/Button.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/components/Checkbox.d.ts +4 -0
- package/lib/typescript/lib/commonjs/components/Checkbox.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/components/Divider.d.ts +3 -0
- package/lib/typescript/lib/commonjs/components/Divider.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/components/ExpansionPanel.d.ts +8 -0
- package/lib/typescript/lib/commonjs/components/ExpansionPanel.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/components/Link.d.ts +3 -0
- package/lib/typescript/lib/commonjs/components/Link.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/components/List.d.ts +3 -0
- package/lib/typescript/lib/commonjs/components/List.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/components/Locale.d.ts +6 -0
- package/lib/typescript/lib/commonjs/components/Locale.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/components/StoragePolicyLink.d.ts +4 -0
- package/lib/typescript/lib/commonjs/components/StoragePolicyLink.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/components/Toggle.d.ts +4 -0
- package/lib/typescript/lib/commonjs/components/Toggle.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/constants.d.ts +20 -0
- package/lib/typescript/lib/commonjs/constants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/context.d.ts +4 -0
- package/lib/typescript/lib/commonjs/context.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/flavors/index.d.ts +122 -0
- package/lib/typescript/lib/commonjs/flavors/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/hooks/useBoundCallback.d.ts +18 -0
- package/lib/typescript/lib/commonjs/hooks/useBoundCallback.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/hooks/useDeviceOrientation.d.ts +4 -0
- package/lib/typescript/lib/commonjs/hooks/useDeviceOrientation.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/hooks/usePrevious.d.ts +3 -0
- package/lib/typescript/lib/commonjs/hooks/usePrevious.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/hooks/useThunkReducer.d.ts +8 -0
- package/lib/typescript/lib/commonjs/hooks/useThunkReducer.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/actions.d.ts +10 -0
- package/lib/typescript/lib/commonjs/iab/actions.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/constants.d.ts +5 -0
- package/lib/typescript/lib/commonjs/iab/constants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/api.d.ts +30 -0
- package/lib/typescript/lib/commonjs/iab/gpp/api.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/consent.d.ts +25 -0
- package/lib/typescript/lib/commonjs/iab/gpp/consent.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/constants.d.ts +26 -0
- package/lib/typescript/lib/commonjs/iab/gpp/constants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts +9 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/BooleanEncoder.d.ts +32 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/BooleanEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/CompressedBase64UrlEncoder.d.ts +10 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/CompressedBase64UrlEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/DatetimeEncoder.d.ts +29 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/DatetimeEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/EncodableOptimizedFixedRange.d.ts +19 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/EncodableOptimizedFixedRange.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FibonacciIntegerEncoder.d.ts +29 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FibonacciIntegerEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FibonacciIntegerRangeEncoder.d.ts +29 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FibonacciIntegerRangeEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedBitfieldEncoder.d.ts +29 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedBitfieldEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedIdBitMapEncoder.d.ts +7 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedIdBitMapEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedIntegerEncoder.d.ts +29 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedIntegerEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedIntegerListEncoder.d.ts +29 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedIntegerListEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedIntegerRangeEncoder.d.ts +29 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedIntegerRangeEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedStringEncoder.d.ts +29 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/FixedStringEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/TraditionalBase64UrlEncoder.d.ts +10 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/TraditionalBase64UrlEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/errors.d.ts +17 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/errors.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/index.d.ts +16 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/types.d.ts +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/encoders/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/index.d.ts +9 -0
- package/lib/typescript/lib/commonjs/iab/gpp/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/reducer.d.ts +7 -0
- package/lib/typescript/lib/commonjs/iab/gpp/reducer.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/selectors.d.ts +7 -0
- package/lib/typescript/lib/commonjs/iab/gpp/selectors.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/types.d.ts +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/v1/constants.d.ts +13 -0
- package/lib/typescript/lib/commonjs/iab/gpp/v1/constants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/gpp/v1/index.d.ts +14 -0
- package/lib/typescript/lib/commonjs/iab/gpp/v1/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/index.d.ts +3 -0
- package/lib/typescript/lib/commonjs/iab/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/reducer.d.ts +6 -0
- package/lib/typescript/lib/commonjs/iab/reducer.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/actions.d.ts +64 -0
- package/lib/typescript/lib/commonjs/iab/tcf/actions.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/consent.d.ts +59 -0
- package/lib/typescript/lib/commonjs/iab/tcf/consent.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/constants.d.ts +22 -0
- package/lib/typescript/lib/commonjs/iab/tcf/constants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/helpers.d.ts +9 -0
- package/lib/typescript/lib/commonjs/iab/tcf/helpers.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/index.d.ts +4 -0
- package/lib/typescript/lib/commonjs/iab/tcf/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/middleware.d.ts +4 -0
- package/lib/typescript/lib/commonjs/iab/tcf/middleware.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/reducer.d.ts +22 -0
- package/lib/typescript/lib/commonjs/iab/tcf/reducer.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/selectors.d.ts +48 -0
- package/lib/typescript/lib/commonjs/iab/tcf/selectors.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/types.d.ts +2 -0
- package/lib/typescript/lib/commonjs/iab/tcf/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/encoders.d.ts +14 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/encoders.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/formatters.d.ts +5 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/formatters.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/index.d.ts +191 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/shared-constants.d.ts +32 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/shared-constants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/tcfcav1-constants.d.ts +43 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/tcfcav1-constants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/tcfeuv2-constants.d.ts +48 -0
- package/lib/typescript/lib/commonjs/iab/tcf/v2.0/tcfeuv2-constants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/types.d.ts +2 -0
- package/lib/typescript/lib/commonjs/iab/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/usp/api.d.ts +6 -0
- package/lib/typescript/lib/commonjs/iab/usp/api.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/usp/consent.d.ts +27 -0
- package/lib/typescript/lib/commonjs/iab/usp/consent.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/usp/constants.d.ts +109 -0
- package/lib/typescript/lib/commonjs/iab/usp/constants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/usp/index.d.ts +9 -0
- package/lib/typescript/lib/commonjs/iab/usp/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/usp/reducer.d.ts +14 -0
- package/lib/typescript/lib/commonjs/iab/usp/reducer.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/usp/selectors.d.ts +10 -0
- package/lib/typescript/lib/commonjs/iab/usp/selectors.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/usp/types.d.ts +1 -0
- package/lib/typescript/lib/commonjs/iab/usp/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/usp/v1/constants.d.ts +13 -0
- package/lib/typescript/lib/commonjs/iab/usp/v1/constants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/usp/v1/index.d.ts +12 -0
- package/lib/typescript/lib/commonjs/iab/usp/v1/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/iab/utilities.d.ts +3 -0
- package/lib/typescript/lib/commonjs/iab/utilities.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/index.d.ts +4 -0
- package/lib/typescript/lib/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/locale/index.d.ts +62 -0
- package/lib/typescript/lib/commonjs/locale/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/native/OsanoCmp.d.ts +6 -0
- package/lib/typescript/lib/commonjs/native/OsanoCmp.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/reducer.d.ts +29 -0
- package/lib/typescript/lib/commonjs/reducer.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/selectors.d.ts +16 -0
- package/lib/typescript/lib/commonjs/selectors.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/services/consent.d.ts +6 -0
- package/lib/typescript/lib/commonjs/services/consent.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/services/disclosures.d.ts +3 -0
- package/lib/typescript/lib/commonjs/services/disclosures.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/services/locale.d.ts +4 -0
- package/lib/typescript/lib/commonjs/services/locale.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/styles.d.ts +141 -0
- package/lib/typescript/lib/commonjs/styles.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/types/consent-config.d.d.ts +2 -0
- package/lib/typescript/lib/commonjs/types/consent-config.d.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/types/env.d.d.ts +1 -0
- package/lib/typescript/lib/commonjs/types/env.d.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/types/index.d.d.ts +2 -0
- package/lib/typescript/lib/commonjs/types/index.d.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/types/store.d.d.ts +2 -0
- package/lib/typescript/lib/commonjs/types/store.d.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/utils/API.d.ts +7 -0
- package/lib/typescript/lib/commonjs/utils/API.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/utils/Color.d.ts +13 -0
- package/lib/typescript/lib/commonjs/utils/Color.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/utils/EventEmitter.d.ts +16 -0
- package/lib/typescript/lib/commonjs/utils/EventEmitter.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/utils/Translator.d.ts +54 -0
- package/lib/typescript/lib/commonjs/utils/Translator.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/utils/index.d.ts +6 -0
- package/lib/typescript/lib/commonjs/utils/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/utils/types.d.ts +1 -0
- package/lib/typescript/lib/commonjs/utils/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/views/Dialog/Buttons.d.ts +4 -0
- package/lib/typescript/lib/commonjs/views/Dialog/Buttons.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/views/Dialog/FirstLayerUsage.d.ts +4 -0
- package/lib/typescript/lib/commonjs/views/Dialog/FirstLayerUsage.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/views/Dialog/Message.d.ts +4 -0
- package/lib/typescript/lib/commonjs/views/Dialog/Message.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/views/Dialog/PreferenceManagementDeepLinks.d.ts +4 -0
- package/lib/typescript/lib/commonjs/views/Dialog/PreferenceManagementDeepLinks.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/views/Dialog/index.d.ts +4 -0
- package/lib/typescript/lib/commonjs/views/Dialog/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.ConsentCategories.d.ts +4 -0
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.ConsentCategories.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.Header.d.ts +4 -0
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.Header.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.Iab.Disclosures.d.ts +4 -0
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.Iab.Disclosures.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.Iab.Vendors.d.ts +4 -0
- package/lib/typescript/lib/commonjs/views/Drawer/Drawer.Iab.Vendors.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/views/Drawer/index.d.ts +3 -0
- package/lib/typescript/lib/commonjs/views/Drawer/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/ConsentManager.d.ts +347 -0
- package/lib/typescript/lib/module/ConsentManager.d.ts.map +1 -0
- package/lib/typescript/lib/module/ConsentUiBuilder.d.ts +174 -0
- package/lib/typescript/lib/module/ConsentUiBuilder.d.ts.map +1 -0
- package/lib/typescript/lib/module/actions.d.ts +65 -0
- package/lib/typescript/lib/module/actions.d.ts.map +1 -0
- package/lib/typescript/lib/module/commands.d.ts +3 -0
- package/lib/typescript/lib/module/commands.d.ts.map +1 -0
- package/lib/typescript/lib/module/components/Button.d.ts +11 -0
- package/lib/typescript/lib/module/components/Button.d.ts.map +1 -0
- package/lib/typescript/lib/module/components/Checkbox.d.ts +4 -0
- package/lib/typescript/lib/module/components/Checkbox.d.ts.map +1 -0
- package/lib/typescript/lib/module/components/Divider.d.ts +4 -0
- package/lib/typescript/lib/module/components/Divider.d.ts.map +1 -0
- package/lib/typescript/lib/module/components/ExpansionPanel.d.ts +9 -0
- package/lib/typescript/lib/module/components/ExpansionPanel.d.ts.map +1 -0
- package/lib/typescript/lib/module/components/Link.d.ts +4 -0
- package/lib/typescript/lib/module/components/Link.d.ts.map +1 -0
- package/lib/typescript/lib/module/components/List.d.ts +4 -0
- package/lib/typescript/lib/module/components/List.d.ts.map +1 -0
- package/lib/typescript/lib/module/components/Locale.d.ts +5 -0
- package/lib/typescript/lib/module/components/Locale.d.ts.map +1 -0
- package/lib/typescript/lib/module/components/StoragePolicyLink.d.ts +4 -0
- package/lib/typescript/lib/module/components/StoragePolicyLink.d.ts.map +1 -0
- package/lib/typescript/lib/module/components/Toggle.d.ts +4 -0
- package/lib/typescript/lib/module/components/Toggle.d.ts.map +1 -0
- package/lib/typescript/lib/module/constants.d.ts +19 -0
- package/lib/typescript/lib/module/constants.d.ts.map +1 -0
- package/lib/typescript/lib/module/context.d.ts +185 -0
- package/lib/typescript/lib/module/context.d.ts.map +1 -0
- package/lib/typescript/lib/module/flavors/index.d.ts +17 -0
- package/lib/typescript/lib/module/flavors/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/hooks/useBoundCallback.d.ts +17 -0
- package/lib/typescript/lib/module/hooks/useBoundCallback.d.ts.map +1 -0
- package/lib/typescript/lib/module/hooks/useDeviceOrientation.d.ts +3 -0
- package/lib/typescript/lib/module/hooks/useDeviceOrientation.d.ts.map +1 -0
- package/lib/typescript/lib/module/hooks/usePrevious.d.ts +2 -0
- package/lib/typescript/lib/module/hooks/usePrevious.d.ts.map +1 -0
- package/lib/typescript/lib/module/hooks/useThunkReducer.d.ts +7 -0
- package/lib/typescript/lib/module/hooks/useThunkReducer.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/actions.d.ts +9 -0
- package/lib/typescript/lib/module/iab/actions.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/constants.d.ts +4 -0
- package/lib/typescript/lib/module/iab/constants.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/api.d.ts +28 -0
- package/lib/typescript/lib/module/iab/gpp/api.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/consent.d.ts +24 -0
- package/lib/typescript/lib/module/iab/gpp/consent.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/constants.d.ts +37 -0
- package/lib/typescript/lib/module/iab/gpp/constants.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts +8 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/BooleanEncoder.d.ts +8 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/BooleanEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/CompressedBase64UrlEncoder.d.ts +9 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/CompressedBase64UrlEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/DatetimeEncoder.d.ts +8 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/DatetimeEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/EncodableOptimizedFixedRange.d.ts +18 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/EncodableOptimizedFixedRange.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FibonacciIntegerEncoder.d.ts +8 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FibonacciIntegerEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FibonacciIntegerRangeEncoder.d.ts +8 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FibonacciIntegerRangeEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedBitfieldEncoder.d.ts +8 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedBitfieldEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedIdBitMapEncoder.d.ts +6 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedIdBitMapEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedIntegerEncoder.d.ts +8 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedIntegerEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedIntegerListEncoder.d.ts +8 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedIntegerListEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedIntegerRangeEncoder.d.ts +8 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedIntegerRangeEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedStringEncoder.d.ts +8 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/FixedStringEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/TraditionalBase64UrlEncoder.d.ts +9 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/TraditionalBase64UrlEncoder.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/errors.d.ts +16 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/errors.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/index.d.ts +15 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/types.d.ts +1 -0
- package/lib/typescript/lib/module/iab/gpp/encoders/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/index.d.ts +10 -0
- package/lib/typescript/lib/module/iab/gpp/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/reducer.d.ts +6 -0
- package/lib/typescript/lib/module/iab/gpp/reducer.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/selectors.d.ts +6 -0
- package/lib/typescript/lib/module/iab/gpp/selectors.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/types.d.ts +1 -0
- package/lib/typescript/lib/module/iab/gpp/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/v1/constants.d.ts +9 -0
- package/lib/typescript/lib/module/iab/gpp/v1/constants.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/gpp/v1/index.d.ts +19 -0
- package/lib/typescript/lib/module/iab/gpp/v1/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/index.d.ts +2 -0
- package/lib/typescript/lib/module/iab/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/reducer.d.ts +5 -0
- package/lib/typescript/lib/module/iab/reducer.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/actions.d.ts +63 -0
- package/lib/typescript/lib/module/iab/tcf/actions.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/consent.d.ts +58 -0
- package/lib/typescript/lib/module/iab/tcf/consent.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/constants.d.ts +21 -0
- package/lib/typescript/lib/module/iab/tcf/constants.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/helpers.d.ts +8 -0
- package/lib/typescript/lib/module/iab/tcf/helpers.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/index.d.ts +303 -0
- package/lib/typescript/lib/module/iab/tcf/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/middleware.d.ts +3 -0
- package/lib/typescript/lib/module/iab/tcf/middleware.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/reducer.d.ts +20 -0
- package/lib/typescript/lib/module/iab/tcf/reducer.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/selectors.d.ts +47 -0
- package/lib/typescript/lib/module/iab/tcf/selectors.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/types.d.ts +2 -0
- package/lib/typescript/lib/module/iab/tcf/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/encoders.d.ts +13 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/encoders.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/formatters.d.ts +4 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/formatters.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/index.d.ts +308 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/shared-constants.d.ts +80 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/shared-constants.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfcav1-constants.d.ts +104 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfcav1-constants.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfeuv2-constants.d.ts +103 -0
- package/lib/typescript/lib/module/iab/tcf/v2.0/tcfeuv2-constants.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/types.d.ts +2 -0
- package/lib/typescript/lib/module/iab/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/usp/api.d.ts +4 -0
- package/lib/typescript/lib/module/iab/usp/api.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/usp/consent.d.ts +13 -0
- package/lib/typescript/lib/module/iab/usp/consent.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/usp/constants.d.ts +77 -0
- package/lib/typescript/lib/module/iab/usp/constants.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/usp/index.d.ts +10 -0
- package/lib/typescript/lib/module/iab/usp/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/usp/reducer.d.ts +13 -0
- package/lib/typescript/lib/module/iab/usp/reducer.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/usp/selectors.d.ts +9 -0
- package/lib/typescript/lib/module/iab/usp/selectors.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/usp/types.d.ts +1 -0
- package/lib/typescript/lib/module/iab/usp/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/usp/v1/constants.d.ts +9 -0
- package/lib/typescript/lib/module/iab/usp/v1/constants.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/usp/v1/index.d.ts +16 -0
- package/lib/typescript/lib/module/iab/usp/v1/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/iab/utilities.d.ts +2 -0
- package/lib/typescript/lib/module/iab/utilities.d.ts.map +1 -0
- package/lib/typescript/lib/module/index.d.ts +4 -0
- package/lib/typescript/lib/module/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/locale/index.d.ts +61 -0
- package/lib/typescript/lib/module/locale/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/native/OsanoCmp.d.ts +5 -0
- package/lib/typescript/lib/module/native/OsanoCmp.d.ts.map +1 -0
- package/lib/typescript/lib/module/reducer.d.ts +28 -0
- package/lib/typescript/lib/module/reducer.d.ts.map +1 -0
- package/lib/typescript/lib/module/selectors.d.ts +15 -0
- package/lib/typescript/lib/module/selectors.d.ts.map +1 -0
- package/lib/typescript/lib/module/services/consent.d.ts +5 -0
- package/lib/typescript/lib/module/services/consent.d.ts.map +1 -0
- package/lib/typescript/lib/module/services/disclosures.d.ts +2 -0
- package/lib/typescript/lib/module/services/disclosures.d.ts.map +1 -0
- package/lib/typescript/lib/module/services/locale.d.ts +3 -0
- package/lib/typescript/lib/module/services/locale.d.ts.map +1 -0
- package/lib/typescript/lib/module/styles.d.ts +140 -0
- package/lib/typescript/lib/module/styles.d.ts.map +1 -0
- package/lib/typescript/lib/module/types/consent-config.d.d.ts +2 -0
- package/lib/typescript/lib/module/types/consent-config.d.d.ts.map +1 -0
- package/lib/typescript/lib/module/types/env.d.d.ts +1 -0
- package/lib/typescript/lib/module/types/env.d.d.ts.map +1 -0
- package/lib/typescript/lib/module/types/index.d.d.ts +2 -0
- package/lib/typescript/lib/module/types/index.d.d.ts.map +1 -0
- package/lib/typescript/lib/module/types/store.d.d.ts +2 -0
- package/lib/typescript/lib/module/types/store.d.d.ts.map +1 -0
- package/lib/typescript/lib/module/utils/API.d.ts +6 -0
- package/lib/typescript/lib/module/utils/API.d.ts.map +1 -0
- package/lib/typescript/lib/module/utils/Color.d.ts +12 -0
- package/lib/typescript/lib/module/utils/Color.d.ts.map +1 -0
- package/lib/typescript/lib/module/utils/EventEmitter.d.ts +15 -0
- package/lib/typescript/lib/module/utils/EventEmitter.d.ts.map +1 -0
- package/lib/typescript/lib/module/utils/Translator.d.ts +52 -0
- package/lib/typescript/lib/module/utils/Translator.d.ts.map +1 -0
- package/lib/typescript/lib/module/utils/index.d.ts +5 -0
- package/lib/typescript/lib/module/utils/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/utils/types.d.ts +1 -0
- package/lib/typescript/lib/module/utils/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/views/Dialog/Buttons.d.ts +5 -0
- package/lib/typescript/lib/module/views/Dialog/Buttons.d.ts.map +1 -0
- package/lib/typescript/lib/module/views/Dialog/FirstLayerUsage.d.ts +5 -0
- package/lib/typescript/lib/module/views/Dialog/FirstLayerUsage.d.ts.map +1 -0
- package/lib/typescript/lib/module/views/Dialog/Message.d.ts +4 -0
- package/lib/typescript/lib/module/views/Dialog/Message.d.ts.map +1 -0
- package/lib/typescript/lib/module/views/Dialog/PreferenceManagementDeepLinks.d.ts +6 -0
- package/lib/typescript/lib/module/views/Dialog/PreferenceManagementDeepLinks.d.ts.map +1 -0
- package/lib/typescript/lib/module/views/Dialog/index.d.ts +5 -0
- package/lib/typescript/lib/module/views/Dialog/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/views/Drawer/Drawer.ConsentCategories.d.ts +5 -0
- package/lib/typescript/lib/module/views/Drawer/Drawer.ConsentCategories.d.ts.map +1 -0
- package/lib/typescript/lib/module/views/Drawer/Drawer.Header.d.ts +5 -0
- package/lib/typescript/lib/module/views/Drawer/Drawer.Header.d.ts.map +1 -0
- package/lib/typescript/lib/module/views/Drawer/Drawer.Iab.Disclosures.d.ts +5 -0
- package/lib/typescript/lib/module/views/Drawer/Drawer.Iab.Disclosures.d.ts.map +1 -0
- package/lib/typescript/lib/module/views/Drawer/Drawer.Iab.Vendors.d.ts +5 -0
- package/lib/typescript/lib/module/views/Drawer/Drawer.Iab.Vendors.d.ts.map +1 -0
- package/lib/typescript/lib/module/views/Drawer/index.d.ts +4 -0
- package/lib/typescript/lib/module/views/Drawer/index.d.ts.map +1 -0
- package/lib/typescript/scripts/updateLocalization.d.ts +2 -0
- package/lib/typescript/scripts/updateLocalization.d.ts.map +1 -0
- package/lib/typescript/src/ConsentManager.d.ts +31 -16
- 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/actions.d.ts +42 -0
- package/lib/typescript/src/actions.d.ts.map +1 -0
- package/lib/typescript/src/commands.d.ts +14 -0
- package/lib/typescript/src/commands.d.ts.map +1 -0
- 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/Locale.d.ts +1 -0
- package/lib/typescript/src/components/Locale.d.ts.map +1 -1
- package/lib/typescript/src/context.d.ts +3 -3
- package/lib/typescript/src/context.d.ts.map +1 -1
- package/lib/typescript/src/flavors/index.d.ts +1 -1
- package/lib/typescript/src/hooks/usePrevious.d.ts +1 -1
- package/lib/typescript/src/hooks/usePrevious.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useThunkReducer.d.ts +6 -8
- package/lib/typescript/src/hooks/useThunkReducer.d.ts.map +1 -1
- package/lib/typescript/src/iab/actions.d.ts +7 -0
- package/lib/typescript/src/iab/actions.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 -1
- package/lib/typescript/src/iab/gpp/api.d.ts +28 -0
- package/lib/typescript/src/iab/gpp/api.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/consent.d.ts +24 -0
- package/lib/typescript/src/iab/gpp/consent.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/constants.d.ts +37 -0
- package/lib/typescript/src/iab/gpp/constants.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/encoders/BooleanEncoder.d.ts +2 -2
- package/lib/typescript/src/iab/gpp/encoders/TraditionalBase64UrlEncoder.d.ts +4 -2
- package/lib/typescript/src/iab/gpp/encoders/TraditionalBase64UrlEncoder.d.ts.map +1 -1
- package/lib/typescript/src/iab/gpp/index.d.ts +10 -0
- package/lib/typescript/src/iab/gpp/index.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/reducer.d.ts +6 -0
- package/lib/typescript/src/iab/gpp/reducer.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/selectors.d.ts +6 -0
- package/lib/typescript/src/iab/gpp/selectors.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/v1/constants.d.ts +9 -0
- package/lib/typescript/src/iab/gpp/v1/constants.d.ts.map +1 -0
- package/lib/typescript/src/iab/gpp/v1/index.d.ts +19 -0
- package/lib/typescript/src/iab/gpp/v1/index.d.ts.map +1 -0
- package/lib/typescript/src/iab/index.d.ts +5 -0
- package/lib/typescript/src/iab/index.d.ts.map +1 -0
- package/lib/typescript/src/iab/reducer.d.ts +6 -0
- package/lib/typescript/src/iab/reducer.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/actions.d.ts +35 -0
- package/lib/typescript/src/iab/tcf/actions.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/consent.d.ts +25 -0
- package/lib/typescript/src/iab/tcf/consent.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/constants.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/helpers.d.ts +15 -0
- package/lib/typescript/src/iab/tcf/helpers.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/index.d.ts +8 -0
- package/lib/typescript/src/iab/tcf/index.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/middleware.d.ts +4 -0
- package/lib/typescript/src/iab/tcf/middleware.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/reducer.d.ts +59 -0
- package/lib/typescript/src/iab/tcf/reducer.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/selectors.d.ts +52 -0
- package/lib/typescript/src/iab/tcf/selectors.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/types.d.ts +82 -4
- package/lib/typescript/src/iab/tcf/types.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/v2.0/encoders.d.ts +35 -6
- package/lib/typescript/src/iab/tcf/v2.0/encoders.d.ts.map +1 -1
- package/lib/typescript/src/iab/tcf/v2.0/formatters.d.ts +4 -0
- package/lib/typescript/src/iab/tcf/v2.0/formatters.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/v2.0/index.d.ts +7 -0
- package/lib/typescript/src/iab/tcf/v2.0/index.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/v2.0/shared-constants.d.ts +60 -0
- package/lib/typescript/src/iab/tcf/v2.0/shared-constants.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/v2.0/tcfcav1-constants.d.ts +77 -0
- package/lib/typescript/src/iab/tcf/v2.0/tcfcav1-constants.d.ts.map +1 -0
- package/lib/typescript/src/iab/tcf/v2.0/tcfeuv2-constants.d.ts +82 -0
- package/lib/typescript/src/iab/tcf/v2.0/tcfeuv2-constants.d.ts.map +1 -0
- package/lib/typescript/src/iab/types.d.ts +14 -5
- package/lib/typescript/src/iab/types.d.ts.map +1 -1
- package/lib/typescript/src/iab/usp/api.d.ts +4 -0
- package/lib/typescript/src/iab/usp/api.d.ts.map +1 -0
- package/lib/typescript/src/iab/usp/consent.d.ts +13 -0
- package/lib/typescript/src/iab/usp/consent.d.ts.map +1 -0
- package/lib/typescript/src/iab/usp/constants.d.ts +77 -0
- package/lib/typescript/src/iab/usp/constants.d.ts.map +1 -0
- package/lib/typescript/src/iab/usp/index.d.ts +10 -0
- package/lib/typescript/src/iab/usp/index.d.ts.map +1 -0
- package/lib/typescript/src/iab/usp/reducer.d.ts +13 -0
- package/lib/typescript/src/iab/usp/reducer.d.ts.map +1 -0
- package/lib/typescript/src/iab/usp/selectors.d.ts +9 -0
- package/lib/typescript/src/iab/usp/selectors.d.ts.map +1 -0
- package/lib/typescript/src/iab/usp/v1/constants.d.ts +9 -0
- package/lib/typescript/src/iab/usp/v1/constants.d.ts.map +1 -0
- package/lib/typescript/src/iab/usp/v1/index.d.ts +16 -0
- package/lib/typescript/src/iab/usp/v1/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/locale/index.d.ts +61 -0
- package/lib/typescript/src/locale/index.d.ts.map +1 -0
- package/lib/typescript/src/reducer.d.ts +7 -0
- package/lib/typescript/src/reducer.d.ts.map +1 -0
- package/lib/typescript/src/selectors.d.ts +19 -0
- package/lib/typescript/src/selectors.d.ts.map +1 -0
- package/lib/typescript/src/services/consent.d.ts.map +1 -1
- package/lib/typescript/src/styles.d.ts +2 -2
- package/lib/typescript/src/styles.d.ts.map +1 -1
- package/lib/typescript/src/utils/Translator.d.ts +1 -1
- package/lib/typescript/src/utils/Translator.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +2 -1
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/types.d.ts +5 -0
- package/lib/typescript/src/utils/types.d.ts.map +1 -0
- package/lib/typescript/src/views/Dialog/PreferenceManagementDeepLinks.d.ts.map +1 -1
- package/lib/typescript/src/views/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/src/views/Drawer/Drawer.ConsentCategories.d.ts.map +1 -1
- package/lib/typescript/src/views/Drawer/Drawer.Header.d.ts.map +1 -1
- package/lib/typescript/src/views/Drawer/Drawer.Iab.Disclosures.d.ts.map +1 -1
- package/lib/typescript/src/views/Drawer/Drawer.Iab.Vendors.d.ts.map +1 -1
- package/package.json +18 -38
- package/src/ConsentManager.ts +325 -120
- package/src/ConsentUiBuilder.tsx +2 -2
- package/src/actions.ts +80 -0
- package/src/commands.ts +96 -0
- package/src/components/Button.tsx +34 -27
- package/src/components/Locale.tsx +30 -16
- package/src/context.ts +12 -12
- package/src/flavors/index.ts +1 -1
- package/src/hooks/usePrevious.ts +1 -1
- package/src/hooks/useThunkReducer.ts +86 -54
- package/src/iab/actions.ts +19 -0
- package/src/iab/constants.ts +2 -0
- package/src/iab/gpp/encoders/FixedIntegerEncoder.ts +1 -1
- package/src/iab/gpp/encoders/TraditionalBase64UrlEncoder.ts +1 -2
- package/src/iab/index.ts +34 -0
- package/src/iab/reducer.ts +38 -0
- package/src/iab/tcf/actions.ts +116 -0
- package/src/iab/tcf/{consent.js → consent.ts} +143 -164
- package/src/iab/tcf/constants.ts +6 -6
- package/src/iab/tcf/helpers.ts +95 -0
- package/src/iab/tcf/index.ts +8 -0
- package/src/iab/tcf/middleware.ts +217 -0
- package/src/iab/tcf/reducer.ts +250 -0
- package/src/iab/tcf/selectors.ts +192 -0
- package/src/iab/tcf/types.ts +108 -4
- package/src/iab/tcf/v2.0/encoders.ts +7 -16
- package/src/iab/tcf/v2.0/formatters.ts +18 -0
- package/src/iab/tcf/v2.0/index.ts +40 -0
- package/src/iab/tcf/v2.0/shared-constants.ts +53 -0
- package/src/iab/tcf/v2.0/{tcfcav1-constants.js → tcfcav1-constants.ts} +4 -15
- package/src/iab/tcf/v2.0/{tcfeuv2-constants.js → tcfeuv2-constants.ts} +4 -14
- package/src/iab/types.ts +21 -5
- package/src/index.tsx +184 -99
- package/src/reducer.ts +416 -0
- package/src/selectors.ts +109 -0
- package/src/services/consent.ts +35 -12
- package/src/styles.ts +3 -5
- package/src/types/consent-config.d.ts +16 -12
- package/src/types/index.d.ts +21 -5
- package/src/types/store.d.ts +14 -4
- package/src/utils/Translator.ts +47 -43
- package/src/utils/index.ts +23 -27
- package/src/utils/types.ts +35 -0
- package/src/views/Dialog/Buttons.tsx +2 -2
- package/src/views/Dialog/Message.tsx +1 -1
- package/src/views/Dialog/PreferenceManagementDeepLinks.tsx +7 -5
- package/src/views/Dialog/index.tsx +22 -38
- package/src/views/Drawer/Drawer.ConsentCategories.tsx +84 -41
- package/src/views/Drawer/Drawer.Header.tsx +3 -2
- package/src/views/Drawer/Drawer.Iab.Disclosures.tsx +71 -41
- package/src/views/Drawer/Drawer.Iab.Vendors.tsx +78 -37
- package/src/views/Drawer/index.tsx +8 -8
- package/lib/commonjs/iab/tcf/tcfcav1-api.js +0 -41
- package/lib/commonjs/iab/tcf/tcfcav1-api.js.map +0 -1
- package/lib/commonjs/iab/tcf/tcfeuv2-api.js +0 -256
- package/lib/commonjs/iab/tcf/tcfeuv2-api.js.map +0 -1
- package/lib/commonjs/iab/tcf/v2.0/helpers.js +0 -25
- package/lib/commonjs/iab/tcf/v2.0/helpers.js.map +0 -1
- package/lib/commonjs/iab/tcf/v2.0/middleware.js +0 -80
- package/lib/commonjs/iab/tcf/v2.0/middleware.js.map +0 -1
- package/lib/commonjs/iab/tcf/v2.0/reducer.js +0 -318
- package/lib/commonjs/iab/tcf/v2.0/reducer.js.map +0 -1
- package/lib/commonjs/store.js +0 -558
- package/lib/commonjs/store.js.map +0 -1
- package/lib/module/iab/tcf/tcfcav1-api.js +0 -35
- package/lib/module/iab/tcf/tcfcav1-api.js.map +0 -1
- package/lib/module/iab/tcf/tcfeuv2-api.js +0 -251
- package/lib/module/iab/tcf/tcfeuv2-api.js.map +0 -1
- package/lib/module/iab/tcf/v2.0/helpers.js +0 -18
- package/lib/module/iab/tcf/v2.0/helpers.js.map +0 -1
- package/lib/module/iab/tcf/v2.0/middleware.js +0 -74
- package/lib/module/iab/tcf/v2.0/middleware.js.map +0 -1
- package/lib/module/iab/tcf/v2.0/reducer.js +0 -311
- package/lib/module/iab/tcf/v2.0/reducer.js.map +0 -1
- package/lib/module/store.js.map +0 -1
- package/lib/typescript/src/iab/tcf/v2.0/helpers.d.ts +0 -5
- package/lib/typescript/src/iab/tcf/v2.0/helpers.d.ts.map +0 -1
- package/lib/typescript/src/store.d.ts +0 -55
- package/lib/typescript/src/store.d.ts.map +0 -1
- package/src/iab/tcf/actions.js +0 -52
- package/src/iab/tcf/index.js +0 -7
- package/src/iab/tcf/reducer.js +0 -59
- package/src/iab/tcf/selectors.js +0 -151
- package/src/iab/tcf/tcfcav1-api.js +0 -39
- package/src/iab/tcf/tcfeuv2-api.js +0 -264
- package/src/iab/tcf/v2.0/formatters.js +0 -14
- package/src/iab/tcf/v2.0/helpers.ts +0 -23
- package/src/iab/tcf/v2.0/index.js +0 -36
- package/src/iab/tcf/v2.0/middleware.js +0 -72
- package/src/iab/tcf/v2.0/reducer.js +0 -327
- package/src/iab/tcf/v2.0/shared-constants.js +0 -17
- package/src/store.ts +0 -602
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.makeReadFromStorage = exports.makeParseConsentString = exports.makeGetField = exports.makeFormatConsentString = exports.makeConsentFromOptions = exports.getVendorLegitimateInterests = exports.getVendorConsents = exports.commonConsent = void 0;
|
|
7
7
|
var _constants = require("./constants");
|
|
8
|
-
var _constants2 = require("../../constants");
|
|
9
|
-
var _selectors = require("./selectors");
|
|
10
8
|
var _utils = require("../../utils");
|
|
11
|
-
var
|
|
9
|
+
var _selectors = require("./selectors");
|
|
10
|
+
// TODO: Look at these
|
|
11
|
+
// import { Locale, ScreenIds } from '../../constants';
|
|
12
|
+
|
|
12
13
|
const commonConsent = exports.commonConsent = {
|
|
13
14
|
consentLanguage: 'en',
|
|
14
15
|
cmpLoaded: true,
|
|
@@ -20,8 +21,8 @@ const commonConsent = exports.commonConsent = {
|
|
|
20
21
|
useNonStandardStacks: true,
|
|
21
22
|
purposeOneTreatment: false
|
|
22
23
|
};
|
|
23
|
-
const getVendorConsents = (state, apiVersion) => {
|
|
24
|
-
const vendors =
|
|
24
|
+
const getVendorConsents = (config, state, apiVersion) => {
|
|
25
|
+
const vendors = config.getVendors();
|
|
25
26
|
/*
|
|
26
27
|
* Unless a user has specifically opted out of a vendor, the consent
|
|
27
28
|
* is determined by purposes and specialFeatures.
|
|
@@ -32,10 +33,10 @@ const getVendorConsents = (state, apiVersion) => {
|
|
|
32
33
|
* If the user has consented to any vendor's purposes the consent
|
|
33
34
|
* is marked as true.
|
|
34
35
|
*/
|
|
35
|
-
const purposeConsent = (0, _constants.consentToPurpose)((0,
|
|
36
|
+
const purposeConsent = (0, _constants.consentToPurpose)((0, _selectors.getSavedConsent)(state) || (0, _selectors.getConsent)(state), apiVersion);
|
|
36
37
|
const consents = Object.entries(vendors).reduce((vendorConsents, [vendorId, {
|
|
37
38
|
purposes = [],
|
|
38
|
-
deletedDate
|
|
39
|
+
deletedDate = ''
|
|
39
40
|
} = {}]) => {
|
|
40
41
|
// We also need to apply IAB rules found here:
|
|
41
42
|
// https://github.com/InteractiveAdvertisingBureau/iabtcf-es/blob/dfc427d015d63d1f5d745c41e77eaae6c5dec2d4/modules/core/src/encoder/SemanticPreEncoder.ts
|
|
@@ -62,7 +63,7 @@ const getVendorConsents = (state, apiVersion) => {
|
|
|
62
63
|
return consents;
|
|
63
64
|
};
|
|
64
65
|
exports.getVendorConsents = getVendorConsents;
|
|
65
|
-
const getVendorLegitimateInterests = (state, apiVersion) => {
|
|
66
|
+
const getVendorLegitimateInterests = (config, state, apiVersion) => {
|
|
66
67
|
/*
|
|
67
68
|
* Unless a use has specifically opted out of a vendor, the consent
|
|
68
69
|
* is determined by LI.
|
|
@@ -74,13 +75,13 @@ const getVendorLegitimateInterests = (state, apiVersion) => {
|
|
|
74
75
|
* marked as true.
|
|
75
76
|
*/
|
|
76
77
|
const optOutPurposes = (0, _selectors.getPurposeOptOuts)(state, apiVersion);
|
|
77
|
-
const vendors =
|
|
78
|
+
const vendors = config.getVendors();
|
|
78
79
|
const vendorLegitimateInterests = {};
|
|
79
80
|
Object.entries(vendors).forEach(([vendorId, {
|
|
80
81
|
legIntPurposes = [],
|
|
81
82
|
purposes = [],
|
|
82
83
|
specialPurposes = [],
|
|
83
|
-
deletedDate
|
|
84
|
+
deletedDate = ''
|
|
84
85
|
} = {}]) => {
|
|
85
86
|
// We also need to apply IAB rules found here:
|
|
86
87
|
// https://github.com/InteractiveAdvertisingBureau/iabtcf-es/blob/dfc427d015d63d1f5d745c41e77eaae6c5dec2d4/modules/core/src/encoder/SemanticPreEncoder.ts
|
|
@@ -120,16 +121,14 @@ const makeParseConsentString = initOptions => tcString => {
|
|
|
120
121
|
coreFieldSequence,
|
|
121
122
|
version,
|
|
122
123
|
cmpId,
|
|
123
|
-
cmpVersion
|
|
124
|
-
specFieldMode = false
|
|
124
|
+
cmpVersion
|
|
125
125
|
} = initOptions;
|
|
126
126
|
const segments = tcString.split('.');
|
|
127
127
|
const coreSegment = decode(segments[0]);
|
|
128
|
-
const tcData =
|
|
128
|
+
const tcData = {
|
|
129
129
|
...commonConsent,
|
|
130
130
|
cmpId,
|
|
131
131
|
cmpVersion,
|
|
132
|
-
consentLanguage: _constants2.Locale.locale.slice(0, 2).toUpperCase(),
|
|
133
132
|
tcfPolicyVersion: parseInt(version, 10)
|
|
134
133
|
};
|
|
135
134
|
coreFieldSequence.reduce((startBit, [field, numBits, {
|
|
@@ -142,11 +141,7 @@ const makeParseConsentString = initOptions => tcString => {
|
|
|
142
141
|
bitLength,
|
|
143
142
|
value: decodedValue
|
|
144
143
|
} = decodeField(value, numBits);
|
|
145
|
-
|
|
146
|
-
// The TCF string spec uses PascalCase names for fields, but the TCData object uses camelCase
|
|
147
|
-
// Reference: https://github.com/IABTechLab/iabgpp-es/blob/42060d7ac2b6d0ee70fc1b5bcd33fc447bf5123c/modules/cmpapi/src/encoder/field/TcfEuV2Field.ts
|
|
148
|
-
const fieldName = specFieldMode ? field[0].toUpperCase() + field.substring(1) // Capitalize first letter
|
|
149
|
-
: dataField || field;
|
|
144
|
+
const fieldName = dataField || field;
|
|
150
145
|
(0, _utils.set)(tcData, fieldName, decodedValue);
|
|
151
146
|
return startBit + bitLength;
|
|
152
147
|
}, 0);
|
|
@@ -160,31 +155,25 @@ const makeGetField = initOptions => {
|
|
|
160
155
|
});
|
|
161
156
|
return (tcString, requestedField) => (0, _utils.get)(tcString ? parseConsentString(tcString) : {}, requestedField);
|
|
162
157
|
};
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* TCFAPI consentFromOptions implementation
|
|
166
|
-
* @function
|
|
167
|
-
* @param {import('./constants').IABInitOptions} initOptions
|
|
168
|
-
* @returns {import('./constants').TCDataDeterminateField} Properly formatted TCData object
|
|
169
|
-
*/
|
|
170
158
|
exports.makeGetField = makeGetField;
|
|
171
|
-
const makeConsentFromOptions = ({
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
159
|
+
const makeConsentFromOptions = initOptions => (config, state) => {
|
|
160
|
+
const {
|
|
161
|
+
version = '2.0',
|
|
162
|
+
cmpId,
|
|
163
|
+
cmpVersion,
|
|
164
|
+
fallbackGvlVersion,
|
|
165
|
+
gppSection,
|
|
166
|
+
staticFields,
|
|
167
|
+
dynamicFields = {}
|
|
168
|
+
} = initOptions;
|
|
180
169
|
const {
|
|
181
170
|
gdprApplies
|
|
182
|
-
} =
|
|
183
|
-
const publisherCC =
|
|
171
|
+
} = config;
|
|
172
|
+
const publisherCC = config.country;
|
|
184
173
|
const currentScreen = (0, _selectors.getCurrentScreen)(state);
|
|
185
|
-
const isShowingUi = currentScreen !==
|
|
186
|
-
const willShowUi = !(0,
|
|
187
|
-
const cmpStatus =
|
|
174
|
+
const isShowingUi = currentScreen !== 0;
|
|
175
|
+
const willShowUi = !(0, _selectors.isSaved)(state) || isShowingUi;
|
|
176
|
+
const cmpStatus = _constants.CMPStatusCodes.LOADED;
|
|
188
177
|
|
|
189
178
|
/**
|
|
190
179
|
* The vendor list version should be in the customer's config because
|
|
@@ -192,14 +181,14 @@ const makeConsentFromOptions = ({
|
|
|
192
181
|
* a way to know what it should be. The TCF spec doesn't cover this case
|
|
193
182
|
* and we can't encode 'undefined', so we'll use a fallback version.
|
|
194
183
|
*/
|
|
195
|
-
const gvlVersion =
|
|
184
|
+
const gvlVersion = config.vendorListVersion || fallbackGvlVersion;
|
|
196
185
|
|
|
197
186
|
/**
|
|
198
187
|
* Since `consentFromOptions` is used for multiple callbacks, all TCDataDeterminateField
|
|
199
188
|
* values should be set here.
|
|
200
189
|
*/
|
|
201
190
|
const dynamicConsent = Object.entries(dynamicFields).reduce((acc, [field, getter]) => {
|
|
202
|
-
acc[`${field}`] = getter(
|
|
191
|
+
acc[`${field}`] = getter(initOptions, state);
|
|
203
192
|
return acc;
|
|
204
193
|
}, {});
|
|
205
194
|
return {
|
|
@@ -214,13 +203,13 @@ const makeConsentFromOptions = ({
|
|
|
214
203
|
cmpId,
|
|
215
204
|
cmpVersion,
|
|
216
205
|
gvlVersion,
|
|
217
|
-
consentLanguage:
|
|
206
|
+
consentLanguage: config.language.slice(0, 2).toUpperCase(),
|
|
218
207
|
publisherCC,
|
|
219
208
|
tcfPolicyVersion: staticFields.tcfPolicyVersion,
|
|
220
|
-
gdprApplies
|
|
209
|
+
gdprApplies,
|
|
221
210
|
vendor: {
|
|
222
|
-
consents: getVendorConsents(state, version),
|
|
223
|
-
legitimateInterests: getVendorLegitimateInterests(state, version)
|
|
211
|
+
consents: getVendorConsents(config, state, version),
|
|
212
|
+
legitimateInterests: getVendorLegitimateInterests(config, state, version)
|
|
224
213
|
},
|
|
225
214
|
specialFeatureOptins: (0, _selectors.getSpecialFeatureOptIns)(state, version),
|
|
226
215
|
purpose: {
|
|
@@ -229,24 +218,18 @@ const makeConsentFromOptions = ({
|
|
|
229
218
|
}
|
|
230
219
|
};
|
|
231
220
|
};
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* TCFAPI formatConsentString implementation
|
|
235
|
-
* @function
|
|
236
|
-
* @param {Object} data
|
|
237
|
-
* @returns {string} Properly formatted TCFData string
|
|
238
|
-
*/
|
|
239
221
|
exports.makeConsentFromOptions = makeConsentFromOptions;
|
|
240
|
-
const makeFormatConsentString = initOptions => (
|
|
222
|
+
const makeFormatConsentString = initOptions => (config, state) => {
|
|
241
223
|
const {
|
|
242
224
|
encoder: {
|
|
243
225
|
encode
|
|
244
226
|
},
|
|
245
227
|
coreFieldSequence,
|
|
246
|
-
staticFields
|
|
228
|
+
staticFields,
|
|
229
|
+
tcString
|
|
247
230
|
} = initOptions;
|
|
248
|
-
const tcData = makeConsentFromOptions(initOptions)(
|
|
249
|
-
const segments =
|
|
231
|
+
const tcData = makeConsentFromOptions(initOptions)(config, state);
|
|
232
|
+
const segments = `${tcString}`.split('.').filter(Boolean);
|
|
250
233
|
// Only update the CORE string
|
|
251
234
|
segments.shift();
|
|
252
235
|
const [bitFields] = coreFieldSequence.reduce(([bitString, startBit], [key, numBits, {
|
|
@@ -260,6 +243,9 @@ const makeFormatConsentString = initOptions => (data, state) => {
|
|
|
260
243
|
} else {
|
|
261
244
|
value = (0, _utils.get)(tcData, dataField);
|
|
262
245
|
}
|
|
246
|
+
if (process.env.NODE_ENV === 'development') {
|
|
247
|
+
console.log(`TCString encode: ${dataField} -> ${JSON.stringify(value)} :: ${numBits} bits`);
|
|
248
|
+
}
|
|
263
249
|
const encodedValue = encodeField(value, numBits);
|
|
264
250
|
return [bitString + encodedValue, startBit + encodedValue.length];
|
|
265
251
|
}, ['', 0]);
|
|
@@ -267,40 +253,18 @@ const makeFormatConsentString = initOptions => (data, state) => {
|
|
|
267
253
|
segments.unshift(newCoreString);
|
|
268
254
|
return segments.join('.');
|
|
269
255
|
};
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* TCFAPI getConsentDataObject implementation
|
|
273
|
-
* @function
|
|
274
|
-
* @param {number} version
|
|
275
|
-
* @returns {import('./constants').TCData} Properly formatted TCData object
|
|
276
|
-
*/
|
|
277
256
|
exports.makeFormatConsentString = makeFormatConsentString;
|
|
278
|
-
const
|
|
257
|
+
const makeReadFromStorage = initOptions => {
|
|
279
258
|
const {
|
|
280
|
-
defaultTimestamp,
|
|
281
259
|
version
|
|
282
260
|
} = initOptions;
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
break;
|
|
261
|
+
return storage => {
|
|
262
|
+
return {
|
|
263
|
+
tcf: {
|
|
264
|
+
[`v${parseInt(version, 10)}`]: storage ?? {}
|
|
288
265
|
}
|
|
289
|
-
|
|
290
|
-
{
|
|
291
|
-
throw new Error('Unsupported version');
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
// `defaultTimestamp` will be used for the created and lastUpdated fields if
|
|
296
|
-
// a consent timestamp is not available yet.
|
|
297
|
-
const data = {
|
|
298
|
-
defaultTimestamp
|
|
299
|
-
};
|
|
300
|
-
return {
|
|
301
|
-
...makeConsentFromOptions(initOptions)(data, state),
|
|
302
|
-
tcString: makeFormatConsentString(initOptions)(data, state)
|
|
266
|
+
};
|
|
303
267
|
};
|
|
304
268
|
};
|
|
305
|
-
exports.
|
|
269
|
+
exports.makeReadFromStorage = makeReadFromStorage;
|
|
306
270
|
//# sourceMappingURL=consent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","
|
|
1
|
+
{"version":3,"names":["_constants","require","_utils","_selectors","commonConsent","exports","consentLanguage","cmpLoaded","cmpStatus","CMPStatusCodes","LOADED","eventStatus","CMPEventStatus","TC_LOADED","isServiceSpecific","useNonStandardStacks","purposeOneTreatment","getVendorConsents","config","state","apiVersion","vendors","getVendors","optOutVendors","getVendorOptOuts","purposeConsent","consentToPurpose","getSavedConsent","getConsent","consents","Object","entries","reduce","vendorConsents","vendorId","purposes","deletedDate","vendorHasConsent","length","every","purposeId","getVendorLegitimateInterests","optOutPurposes","getPurposeOptOuts","vendorLegitimateInterests","forEach","legIntPurposes","specialPurposes","vendorHasLegitimateInterest","some","makeParseConsentString","initOptions","tcString","encoder","decode","coreFieldSequence","version","cmpId","cmpVersion","segments","split","coreSegment","tcData","tcfPolicyVersion","parseInt","startBit","field","numBits","decodeField","dataField","value","isFinite","slice","bitLength","decodedValue","fieldName","set","makeGetField","parseConsentString","specFieldMode","requestedField","get","makeConsentFromOptions","fallbackGvlVersion","gppSection","staticFields","dynamicFields","gdprApplies","publisherCC","country","currentScreen","getCurrentScreen","isShowingUi","willShowUi","isSaved","gvlVersion","vendorListVersion","dynamicConsent","acc","getter","CMP_UI_SHOWN","hasActed","USER_ACTION_COMPLETE","displayStatus","DisplayStatusCodes","VISIBLE","HIDDEN","language","toUpperCase","vendor","legitimateInterests","specialFeatureOptins","getSpecialFeatureOptIns","purpose","getPurposeConsents","getPurposesLITransparency","makeFormatConsentString","encode","filter","Boolean","shift","bitFields","bitString","key","encodeField","hasOwnProperty","call","staticValue","process","env","NODE_ENV","console","log","JSON","stringify","encodedValue","newCoreString","unshift","join","makeReadFromStorage","storage","tcf"],"sourceRoot":"../../../../src","sources":["iab/tcf/consent.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAOA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,UAAA,GAAAF,OAAA;AAFA;AACA;;AAkBO,MAAMG,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC5BE,eAAe,EAAE,IAAI;EACrBC,SAAS,EAAE,IAAI;EACfC,SAAS,EAAEC,yBAAc,CAACC,MAAM;EAAE;EAClCC,WAAW,EAAEC,yBAAc,CAACC,SAAS;EAAE;EACvCC,iBAAiB,EAAE,IAAI;EACvBC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C;EACvC9D,QAAQ,CAAC8E,OAAO,CAACD,aAAa,CAAC;EAC/B,OAAO7E,QAAQ,CAAC+E,IAAI,CAAC,GAAG,CAAC;AAC1B,CAAC;AAACrI,OAAA,CAAA+G,uBAAA,GAAAA,uBAAA;AAEI,MAAMuB,mBAAmB,GAAIxF,WAA2B,IAAK;EACnE,MAAM;IAAEK;EAAQ,CAAC,GAAGL,WAAW;EAC/B,OAAQyF,OAAwB,IAAK;IACpC,OAAO;MACNC,GAAG,EAAE;QACJ,CAAE,IAAG7E,QAAQ,CAACR,OAAO,EAAE,EAAE,CAAE,EAAC,GAAGoF,OAAO,IAAI,CAAC;MAC5C;IACD,CAAC;EACF,CAAC;AACF,CAAC;AAACvI,OAAA,CAAAsI,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -20,13 +20,13 @@ const DisplayStatusCodes = exports.DisplayStatusCodes = {
|
|
|
20
20
|
HIDDEN: 'hidden',
|
|
21
21
|
DISABLED: 'disabled'
|
|
22
22
|
};
|
|
23
|
-
const purposeIds = exports.purposeIds = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
23
|
+
const purposeIds = exports.purposeIds = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
24
24
|
const purposeMap = exports.purposeMap = {
|
|
25
|
-
[_constants.ConsentCategory.ESSENTIAL]: [],
|
|
26
|
-
[_constants.ConsentCategory.ANALYTICS]: [8, 10],
|
|
25
|
+
[_constants.ConsentCategory.ESSENTIAL]: [1],
|
|
26
|
+
[_constants.ConsentCategory.ANALYTICS]: [7, 8, 9, 10],
|
|
27
27
|
[_constants.ConsentCategory.STORAGE]: [1],
|
|
28
|
-
[_constants.ConsentCategory.MARKETING]: [2,
|
|
29
|
-
[_constants.ConsentCategory.PERSONALIZATION]: [
|
|
28
|
+
[_constants.ConsentCategory.MARKETING]: [2, 3, 4],
|
|
29
|
+
[_constants.ConsentCategory.PERSONALIZATION]: [5, 6, 11],
|
|
30
30
|
[_constants.ConsentCategory.OPT_OUT]: []
|
|
31
31
|
};
|
|
32
32
|
const consentToPurpose = (consent = {}, apiVersion = '2') => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","CMPEventStatus","exports","TC_LOADED","CMP_UI_SHOWN","USER_ACTION_COMPLETE","CMPStatusCodes","STUB","LOADED","ERROR","DisplayStatusCodes","VISIBLE","HIDDEN","DISABLED","purposeIds","purposeMap","ConsentCategory","ESSENTIAL","ANALYTICS","STORAGE","MARKETING","PERSONALIZATION","OPT_OUT","consentToPurpose","consent","apiVersion","parseInt","Object","entries","reduce","consents","category","purposes","forEach","purpose"],"sourceRoot":"../../../../src","sources":["iab/tcf/constants.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAKO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC7BE,SAAS,EAAE,UAAU;EACrBC,YAAY,EAAE,YAAY;EAC1BC,oBAAoB,EAAE;AACvB,CAAC;AAEM,MAAMC,cAAc,GAAAJ,OAAA,CAAAI,cAAA,GAAG;EAC7BC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE;AACR,CAAC;AAEM,MAAMC,kBAAkB,GAAAR,OAAA,CAAAQ,kBAAA,GAAG;EACjCC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,QAAQ,EAAE;AACX,CAAC;AAEM,MAAMC,UAAU,GAAAZ,OAAA,CAAAY,UAAA,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;
|
|
1
|
+
{"version":3,"names":["_constants","require","CMPEventStatus","exports","TC_LOADED","CMP_UI_SHOWN","USER_ACTION_COMPLETE","CMPStatusCodes","STUB","LOADED","ERROR","DisplayStatusCodes","VISIBLE","HIDDEN","DISABLED","purposeIds","purposeMap","ConsentCategory","ESSENTIAL","ANALYTICS","STORAGE","MARKETING","PERSONALIZATION","OPT_OUT","consentToPurpose","consent","apiVersion","parseInt","Object","entries","reduce","consents","category","purposes","forEach","purpose"],"sourceRoot":"../../../../src","sources":["iab/tcf/constants.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAKO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC7BE,SAAS,EAAE,UAAU;EACrBC,YAAY,EAAE,YAAY;EAC1BC,oBAAoB,EAAE;AACvB,CAAC;AAEM,MAAMC,cAAc,GAAAJ,OAAA,CAAAI,cAAA,GAAG;EAC7BC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE;AACR,CAAC;AAEM,MAAMC,kBAAkB,GAAAR,OAAA,CAAAQ,kBAAA,GAAG;EACjCC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,QAAQ,EAAE;AACX,CAAC;AAEM,MAAMC,UAAU,GAAAZ,OAAA,CAAAY,UAAA,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC;AACtD,MAAMC,UAAiD,GAAAb,OAAA,CAAAa,UAAA,GAAG;EAChE,CAACC,0BAAe,CAACC,SAAS,GAAG,CAAC,CAAC,CAAC;EAChC,CAACD,0BAAe,CAACE,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;EAC1C,CAACF,0BAAe,CAACG,OAAO,GAAG,CAAC,CAAC,CAAC;EAC9B,CAACH,0BAAe,CAACI,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;EACtC,CAACJ,0BAAe,CAACK,eAAe,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;EAC7C,CAACL,0BAAe,CAACM,OAAO,GAAG;AAC5B,CAAC;AAEM,MAAMC,gBAAgB,GAAGA,CAC/BC,OAAsD,GAAG,CAAC,CAAC,EAC3DC,UAAU,GAAG,GAAG,KACZ;EACJ,IAAIC,QAAQ,CAACD,UAAU,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE;IAClC,OAAOE,MAAM,CAACC,OAAO,CAACb,UAAU,CAAC,CAACc,MAAM,CACvC,CAACC,QAAQ,EAAE,CAACC,QAAQ,EAAEC,QAAQ,CAAC,KAAK;MACnCA,QAAQ,CAACC,OAAO,CAAEC,OAAO,IAAK;QAC7BJ,QAAQ,CAAE,GAAEI,OAAQ,EAAC,CAAC,GACrB,CAAC,CAACV,OAAO,CAAE,GAAEO,QAAgC,EAAC,CAAC;MACjD,CAAC,CAAC;MACF,OAAOD,QAAQ;IAChB,CAAC,EACD,CAAC,CACF,CAAC;EACF;EACA,OAAO,CAAC,CAAC;AACV,CAAC;AAAC5B,OAAA,CAAAqB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.updateVendorOptOuts = exports.updateSpecialFeatureOptIns = exports.updatePurposeOptOuts = exports.idRecordToBinaryString = exports.createUTCTimestampInDeciseconds = void 0;
|
|
7
|
+
var _selectors = require("./selectors");
|
|
8
|
+
var _formatters = require("./v2.0/formatters");
|
|
9
|
+
var _selectors2 = require("../../selectors");
|
|
10
|
+
/*
|
|
11
|
+
* TCF Amendment - 21 December 2021
|
|
12
|
+
* Created and LastUpdated fields have been updated to have the same value
|
|
13
|
+
* corresponding to the ** day-level ** timestamp of when the TC String
|
|
14
|
+
* was last updated. Timestamp should maintain 36bit depth (deciseconds),
|
|
15
|
+
* but hours, minutes, seconds and milliseconds should be 0.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const createUTCTimestampInDeciseconds = ({
|
|
19
|
+
defaultTimestamp = 0
|
|
20
|
+
}, state) => {
|
|
21
|
+
const consentDate = new Date((0, _selectors2.getConsentTimestamp)(state) || defaultTimestamp);
|
|
22
|
+
const utc = Date.UTC(consentDate.getUTCFullYear(), consentDate.getUTCMonth(), consentDate.getUTCDate());
|
|
23
|
+
// Make sure the timestamp is > 0 otherwise the TCF Int parser fails
|
|
24
|
+
return Math.round(Math.max(0, utc) / 100);
|
|
25
|
+
};
|
|
26
|
+
exports.createUTCTimestampInDeciseconds = createUTCTimestampInDeciseconds;
|
|
27
|
+
const idRecordToBinaryString = records => (0, _formatters.fixedValuesArrayFormatter)(records, Object.keys(records).map(key => parseInt(key, 10)).reduce((a, b) => Math.max(a, b), 0)).map(value => value ? '1' : '0').join('');
|
|
28
|
+
exports.idRecordToBinaryString = idRecordToBinaryString;
|
|
29
|
+
const updateSpecialFeatureOptIns = (state, version, specialFeatureIds, acceptOrDeny) => {
|
|
30
|
+
const specialFeatureOptins = {
|
|
31
|
+
...(0, _selectors.getSpecialFeatureOptIns)(state, version)
|
|
32
|
+
};
|
|
33
|
+
for (const specialFeatureId of specialFeatureIds) {
|
|
34
|
+
if (acceptOrDeny) {
|
|
35
|
+
specialFeatureOptins[`${specialFeatureId}`] = true;
|
|
36
|
+
} else {
|
|
37
|
+
delete specialFeatureOptins[`${specialFeatureId}`];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return specialFeatureOptins;
|
|
41
|
+
};
|
|
42
|
+
exports.updateSpecialFeatureOptIns = updateSpecialFeatureOptIns;
|
|
43
|
+
const updatePurposeOptOuts = (state, version, purposeIds, acceptOrDeny) => {
|
|
44
|
+
const purposeOptOuts = {
|
|
45
|
+
...(0, _selectors.getPurposeOptOuts)(state, version)
|
|
46
|
+
};
|
|
47
|
+
// ACCEPT on "I Object" means OptOut is TRUE
|
|
48
|
+
for (const purposeId of purposeIds) {
|
|
49
|
+
if (acceptOrDeny) {
|
|
50
|
+
purposeOptOuts[`${purposeId}`] = true;
|
|
51
|
+
} else {
|
|
52
|
+
delete purposeOptOuts[`${purposeId}`];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return purposeOptOuts;
|
|
56
|
+
};
|
|
57
|
+
exports.updatePurposeOptOuts = updatePurposeOptOuts;
|
|
58
|
+
const updateVendorOptOuts = (state, version, vendorIds, acceptOrDeny) => {
|
|
59
|
+
const vendorOptOuts = {
|
|
60
|
+
...(0, _selectors.getVendorOptOuts)(state, version)
|
|
61
|
+
};
|
|
62
|
+
for (const vendorId of vendorIds) {
|
|
63
|
+
if (acceptOrDeny === false) {
|
|
64
|
+
vendorOptOuts[`${vendorId}`] = true;
|
|
65
|
+
} else {
|
|
66
|
+
delete vendorOptOuts[`${vendorId}`];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return vendorOptOuts;
|
|
70
|
+
};
|
|
71
|
+
exports.updateVendorOptOuts = updateVendorOptOuts;
|
|
72
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_selectors","require","_formatters","_selectors2","createUTCTimestampInDeciseconds","defaultTimestamp","state","consentDate","Date","getConsentTimestamp","utc","UTC","getUTCFullYear","getUTCMonth","getUTCDate","Math","round","max","exports","idRecordToBinaryString","records","fixedValuesArrayFormatter","Object","keys","map","key","parseInt","reduce","a","b","value","join","updateSpecialFeatureOptIns","version","specialFeatureIds","acceptOrDeny","specialFeatureOptins","getSpecialFeatureOptIns","specialFeatureId","updatePurposeOptOuts","purposeIds","purposeOptOuts","getPurposeOptOuts","purposeId","updateVendorOptOuts","vendorIds","vendorOptOuts","getVendorOptOuts","vendorId"],"sourceRoot":"../../../../src","sources":["iab/tcf/helpers.ts"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAQA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,WA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A","ignoreList":[]}
|
|
@@ -4,11 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var selectors = _interopRequireWildcard(require("./selectors"));
|
|
8
8
|
var _v = _interopRequireDefault(require("./v2.0"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
12
|
var _default = exports.default = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
..._v.default,
|
|
14
|
+
selectors
|
|
13
15
|
};
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["selectors","_interopRequireWildcard","require","_v","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_default","exports","versions"],"sourceRoot":"../../../../src","sources":["iab/tcf/index.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,EAAA,GAAAC,sBAAA,CAAAF,OAAA;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f;EACd,GAAGqB,UAAQ;EACX5B;AACD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.makeMiddleware = exports.default = void 0;
|
|
7
|
+
var _actions = require("../../actions");
|
|
8
|
+
var _actions2 = require("./actions");
|
|
9
|
+
var _actions3 = require("../actions");
|
|
10
|
+
var _OsanoCmp = require("../../native/OsanoCmp");
|
|
11
|
+
var _selectors = require("./selectors");
|
|
12
|
+
var _helpers = require("./helpers");
|
|
13
|
+
var _consent = require("./consent");
|
|
14
|
+
var _reactNative = require("react-native");
|
|
15
|
+
// @ts-nocheck
|
|
16
|
+
|
|
17
|
+
const makeMiddleware = initOptions => {
|
|
18
|
+
const {
|
|
19
|
+
createConsentPayload,
|
|
20
|
+
gppSection,
|
|
21
|
+
version
|
|
22
|
+
} = initOptions;
|
|
23
|
+
const parseConsentString = (0, _consent.makeParseConsentString)(initOptions);
|
|
24
|
+
const formatConsentString = (0, _consent.makeFormatConsentString)(initOptions);
|
|
25
|
+
return store => next => action => {
|
|
26
|
+
const oldState = store.getState();
|
|
27
|
+
const newState = next(action);
|
|
28
|
+
const {
|
|
29
|
+
type,
|
|
30
|
+
payload
|
|
31
|
+
} = action;
|
|
32
|
+
const {
|
|
33
|
+
config,
|
|
34
|
+
configId
|
|
35
|
+
} = newState;
|
|
36
|
+
newState.iab.tcf = newState.iab.tcf || {};
|
|
37
|
+
newState.iab.tcf.v2 = newState.iab.tcf.v2 || {};
|
|
38
|
+
switch (type) {
|
|
39
|
+
case _actions.RELOAD:
|
|
40
|
+
case _actions.SET_CONFIG:
|
|
41
|
+
{
|
|
42
|
+
const {
|
|
43
|
+
config
|
|
44
|
+
} = payload;
|
|
45
|
+
const resConsent = jsonString => {
|
|
46
|
+
let payload = createConsentPayload();
|
|
47
|
+
if (jsonString) {
|
|
48
|
+
try {
|
|
49
|
+
payload = JSON.parse(jsonString);
|
|
50
|
+
// Store the TcString
|
|
51
|
+
store.dispatch((0, _actions3.setConsentData)(gppSection, formatConsentString(config, newState)));
|
|
52
|
+
} catch (e) {
|
|
53
|
+
payload = createConsentPayload();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
store.dispatch((0, _actions2.setConsent)(payload));
|
|
57
|
+
};
|
|
58
|
+
switch (_reactNative.Platform.OS) {
|
|
59
|
+
case 'ios':
|
|
60
|
+
case 'android':
|
|
61
|
+
(0, _OsanoCmp.getStorage)(`${gppSection}_${configId}`).then(resConsent).catch(() => {
|
|
62
|
+
// Consent not found
|
|
63
|
+
(0, _OsanoCmp.clearStorage)(`${gppSection}_${configId}`);
|
|
64
|
+
});
|
|
65
|
+
break;
|
|
66
|
+
default:
|
|
67
|
+
try {
|
|
68
|
+
resConsent(window.localStorage.getItem(`${gppSection}_${configId}`));
|
|
69
|
+
} catch (e) {
|
|
70
|
+
window.localStorage.removeItem(`${gppSection}_${configId}`);
|
|
71
|
+
}
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
case _actions.CLEAR_CONSENT:
|
|
77
|
+
{
|
|
78
|
+
switch (_reactNative.Platform.OS) {
|
|
79
|
+
case 'ios':
|
|
80
|
+
case 'android':
|
|
81
|
+
(0, _OsanoCmp.clearStorage)(`${gppSection}_${configId}`);
|
|
82
|
+
break;
|
|
83
|
+
default:
|
|
84
|
+
try {
|
|
85
|
+
window.localStorage.removeItem(`${gppSection}_${configId}`);
|
|
86
|
+
} catch {}
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
store.dispatch((0, _actions3.setConsentData)(gppSection, ''));
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case _actions2.SET_ALL_PURPOSE_CONSENT:
|
|
93
|
+
{
|
|
94
|
+
const acceptOrDeny = payload;
|
|
95
|
+
const purposeIds = (0, _selectors.getPurposeIds)();
|
|
96
|
+
newState.iab.tcf.v2.purposeOptouts = (0, _helpers.updatePurposeOptOuts)(newState, version, purposeIds, acceptOrDeny);
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case _actions2.SET_ALL_SPECIAL_FEATURE_CONSENT:
|
|
100
|
+
{
|
|
101
|
+
const acceptOrDeny = payload;
|
|
102
|
+
const specialFeatureIds = new Set(Object.values(config?.getVendors() || {}).map(vendor => vendor.specialPurposes).reduce((acc, ids) => acc.concat(ids), []));
|
|
103
|
+
newState.iab.tcf.v2.specialFeatureOptins = (0, _helpers.updateSpecialFeatureOptIns)(newState, version, Array.from(specialFeatureIds), acceptOrDeny);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
case _actions2.SET_ALL_VENDOR_CONSENT:
|
|
107
|
+
{
|
|
108
|
+
const acceptOrDeny = payload;
|
|
109
|
+
const vendorIds = config?.getVendorIds() ?? [];
|
|
110
|
+
newState.iab.tcf.v2.vendorOptouts = (0, _helpers.updateVendorOptOuts)(newState, version, vendorIds, acceptOrDeny);
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
case _actions.CLOSE:
|
|
114
|
+
{
|
|
115
|
+
const {
|
|
116
|
+
config
|
|
117
|
+
} = payload;
|
|
118
|
+
store.dispatch((0, _actions3.setConsentData)(gppSection, formatConsentString(config, newState)));
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
case _actions3.SET_CONSENT_DATA:
|
|
122
|
+
{
|
|
123
|
+
// by the time we get here in the middleware, the reducers should have already set the tcString
|
|
124
|
+
const {
|
|
125
|
+
gppSection,
|
|
126
|
+
value
|
|
127
|
+
} = action.payload;
|
|
128
|
+
if (gppSection === initOptions.gppSection) {
|
|
129
|
+
const {
|
|
130
|
+
cmpId,
|
|
131
|
+
cmpVersion,
|
|
132
|
+
storageKey
|
|
133
|
+
} = initOptions;
|
|
134
|
+
const currentTcString = (0, _selectors.getConsentString)(oldState, initOptions);
|
|
135
|
+
if (value === currentTcString) {
|
|
136
|
+
// no change
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
console.log(`\nSetting new consent string\n -> ${value}`);
|
|
140
|
+
const consent = parseConsentString(value);
|
|
141
|
+
(0, _OsanoCmp.setStorage)(storageKey, value);
|
|
142
|
+
(0, _OsanoCmp.setStorage)('IABTCF_CmpSdkID', cmpId.toString());
|
|
143
|
+
(0, _OsanoCmp.setStorage)('IABTCF_CmpSdkVersion', cmpVersion.toString());
|
|
144
|
+
(0, _OsanoCmp.setStorage)('IABTCF_PolicyVersion', version);
|
|
145
|
+
(0, _OsanoCmp.setStorage)('IABTCF_PublisherCC', consent.publisherCC);
|
|
146
|
+
(0, _OsanoCmp.setStorage)('IABTCF_gdprApplies', consent.gdprApplies ? '1' : '0');
|
|
147
|
+
(0, _OsanoCmp.setStorage)('IABTCF_PurposeOneTreatment', consent.purposeOneTreatment ? '1' : '0');
|
|
148
|
+
(0, _OsanoCmp.setStorage)('IABTCF_UseNonStandardTexts', consent.useNonStandardStacks ? '1' : '0');
|
|
149
|
+
|
|
150
|
+
// The following all have to be binary strings
|
|
151
|
+
(0, _OsanoCmp.setStorage)('IABTCF_VendorConsents', (0, _helpers.idRecordToBinaryString)(consent.vendor.consents));
|
|
152
|
+
(0, _OsanoCmp.setStorage)('IABTCF_VendorLegitimateInterests', (0, _helpers.idRecordToBinaryString)(consent.vendor.legitimateInterests));
|
|
153
|
+
(0, _OsanoCmp.setStorage)('IABTCF_PurposeConsents', (0, _helpers.idRecordToBinaryString)(consent.purpose.consents));
|
|
154
|
+
(0, _OsanoCmp.setStorage)('IABTCF_PurposeLegitimateInterests', (0, _helpers.idRecordToBinaryString)(consent.purpose.legitimateInterests));
|
|
155
|
+
(0, _OsanoCmp.setStorage)('IABTCF_SpecialFeaturesOptIns', (0, _helpers.idRecordToBinaryString)(consent.specialFeatureOptins));
|
|
156
|
+
// Publisher restrictions are not yet supported
|
|
157
|
+
/*
|
|
158
|
+
'IABTCF_PublisherRestrictions',
|
|
159
|
+
'IABTCF_PublisherConsent'
|
|
160
|
+
'IABTCF_PublisherLegitimateInterests'
|
|
161
|
+
'IABTCF_PublisherCustomPurposesConsents'
|
|
162
|
+
'IABTCF_PublisherCustomPurposesLegitimateInterests'
|
|
163
|
+
*/
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return newState;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
exports.makeMiddleware = makeMiddleware;
|
|
171
|
+
var _default = exports.default = makeMiddleware;
|
|
172
|
+
//# sourceMappingURL=middleware.js.map
|