@osano/osano-cmp-react-native 0.1.0 → 0.3.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 +53 -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 +365 -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 +27 -25
- 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 +2 -1
- 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 +57 -39
- 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 +49 -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/reducer.js +357 -0
- 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 +23 -21
- 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 +2 -1
- 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 +53 -35
- 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 +414 -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 +32 -51
- package/src/views/Drawer/Drawer.ConsentCategories.tsx +84 -41
- package/src/views/Drawer/Drawer.Header.tsx +4 -3
- package/src/views/Drawer/Drawer.Iab.Disclosures.tsx +71 -41
- package/src/views/Drawer/Drawer.Iab.Vendors.tsx +74 -46
- 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 +0 -520
- 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
package/src/iab/tcf/actions.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createActionCreator,
|
|
3
|
-
namedParameters,
|
|
4
|
-
noParameters,
|
|
5
|
-
singleParameter,
|
|
6
|
-
} from '../../redux/helpers';
|
|
7
|
-
|
|
8
|
-
const prefix = 'OsanoCMP_IAB-TCF';
|
|
9
|
-
export const setPurposeConsent = createActionCreator(
|
|
10
|
-
`${prefix}/SET_PURPOSE_CONSENT`,
|
|
11
|
-
namedParameters('purposeId', 'acceptOrDeny'),
|
|
12
|
-
);
|
|
13
|
-
export const setAllPurposeConsent = createActionCreator(
|
|
14
|
-
`${prefix}/SET_ALL_PURPOSE_CONSENT`,
|
|
15
|
-
namedParameters('acceptOrDeny'),
|
|
16
|
-
);
|
|
17
|
-
export const setVendorConsent = createActionCreator(
|
|
18
|
-
`${prefix}/SET_VENDOR_CONSENT`,
|
|
19
|
-
namedParameters('vendorId', 'acceptOrDeny'),
|
|
20
|
-
);
|
|
21
|
-
export const setAllVendorConsent = createActionCreator(
|
|
22
|
-
`${prefix}/SET_ALL_VENDOR_CONSENT`,
|
|
23
|
-
namedParameters('acceptOrDeny'),
|
|
24
|
-
);
|
|
25
|
-
export const setSpecialFeatureConsent = createActionCreator(
|
|
26
|
-
`${prefix}/SET_SPECIAL_FEATURE_CONSENT`,
|
|
27
|
-
namedParameters('specialFeatureId', 'acceptOrDeny'),
|
|
28
|
-
);
|
|
29
|
-
export const setAllSpecialFeatureConsent = createActionCreator(
|
|
30
|
-
`${prefix}/SET_ALL_SPECIAL_FEATURE_CONSENT`,
|
|
31
|
-
namedParameters('acceptOrDeny'),
|
|
32
|
-
);
|
|
33
|
-
export const setGdprApplies = createActionCreator(
|
|
34
|
-
`${prefix}/SET_GDPR_APPLIES`,
|
|
35
|
-
singleParameter,
|
|
36
|
-
);
|
|
37
|
-
export const updatePurposeList = createActionCreator(
|
|
38
|
-
`${prefix}/UPDATE_PURPOSE_LIST`,
|
|
39
|
-
namedParameters('purposeList', 'language'),
|
|
40
|
-
);
|
|
41
|
-
export const updateVendorListBegin = createActionCreator(
|
|
42
|
-
`${prefix}/UPDATE_VENDOR_LIST_BEGIN`,
|
|
43
|
-
noParameters,
|
|
44
|
-
);
|
|
45
|
-
export const updateVendorListSuccess = createActionCreator(
|
|
46
|
-
`${prefix}/UPDATE_VENDOR_LIST_SUCCESS`,
|
|
47
|
-
singleParameter,
|
|
48
|
-
);
|
|
49
|
-
export const updateVendorListFailure = createActionCreator(
|
|
50
|
-
`${prefix}/UPDATE_VENDOR_LIST_FAILURE`,
|
|
51
|
-
singleParameter,
|
|
52
|
-
);
|
package/src/iab/tcf/index.js
DELETED
package/src/iab/tcf/reducer.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { types as ActionTypes } from '../../redux/actions';
|
|
2
|
-
import { genericReducer } from '../../redux/helpers';
|
|
3
|
-
import { merge } from '../../utils';
|
|
4
|
-
import { setGdprApplies } from './actions';
|
|
5
|
-
import { initialState as v2_initialState } from './v2.0/reducer';
|
|
6
|
-
|
|
7
|
-
export const initialState = merge({}, v2_initialState);
|
|
8
|
-
|
|
9
|
-
const updateOptions = (state, options) => {
|
|
10
|
-
const { config } = options || {};
|
|
11
|
-
const {
|
|
12
|
-
config: {
|
|
13
|
-
gdprApplies: providedGdprApplies,
|
|
14
|
-
iabEnabled: providedIABEnabled,
|
|
15
|
-
} = {},
|
|
16
|
-
} = state;
|
|
17
|
-
const { gdprApplies = providedGdprApplies, iabEnabled = providedIABEnabled } =
|
|
18
|
-
config || {};
|
|
19
|
-
const newState = merge(
|
|
20
|
-
{ ...state },
|
|
21
|
-
{
|
|
22
|
-
iab: {
|
|
23
|
-
tcf: {
|
|
24
|
-
enabled:
|
|
25
|
-
typeof iabEnabled === 'string'
|
|
26
|
-
? iabEnabled === 'true'
|
|
27
|
-
: !!iabEnabled,
|
|
28
|
-
gdprApplies:
|
|
29
|
-
typeof gdprApplies === 'string'
|
|
30
|
-
? gdprApplies === 'true'
|
|
31
|
-
: !!gdprApplies,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
);
|
|
36
|
-
return newState;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export default genericReducer(initialState, {
|
|
40
|
-
[ActionTypes.init]: updateOptions,
|
|
41
|
-
[ActionTypes.updateConfig]: (state, config) =>
|
|
42
|
-
updateOptions(state, { config }),
|
|
43
|
-
[setGdprApplies.type]: (state, gdprApplies) => {
|
|
44
|
-
const newState = merge(
|
|
45
|
-
{ ...state },
|
|
46
|
-
{
|
|
47
|
-
iab: {
|
|
48
|
-
tcf: {
|
|
49
|
-
gdprApplies:
|
|
50
|
-
typeof gdprApplies === 'string'
|
|
51
|
-
? gdprApplies === 'true'
|
|
52
|
-
: !!gdprApplies,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
);
|
|
57
|
-
return newState;
|
|
58
|
-
},
|
|
59
|
-
});
|
package/src/iab/tcf/selectors.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { consentToPurpose, purposeIds } from './constants';
|
|
2
|
-
import {
|
|
3
|
-
getConsent,
|
|
4
|
-
getCountryCode,
|
|
5
|
-
getSavedConsent,
|
|
6
|
-
} from '../../redux/selectors';
|
|
7
|
-
|
|
8
|
-
import { GDPR_COUNTRIES } from '@osano-cmp';
|
|
9
|
-
import { ScreenIds } from '../../constants';
|
|
10
|
-
import { get } from '../../utils';
|
|
11
|
-
import { isBrowsingFrom } from '../gpp/selectors';
|
|
12
|
-
|
|
13
|
-
export const DOMAIN = 'iab.tcf';
|
|
14
|
-
|
|
15
|
-
export const isIABEnabled = state => !!get(state, 'config.iabEnabled');
|
|
16
|
-
|
|
17
|
-
export const getStore = state => get(state, DOMAIN, {});
|
|
18
|
-
export const getApiData = (state, apiVersion = 2) =>
|
|
19
|
-
get(getStore(state), [`v${parseInt(apiVersion, 10)}`], {});
|
|
20
|
-
|
|
21
|
-
export const getCurrentScreen = state =>
|
|
22
|
-
get(state, 'ui.currentScreen', ScreenIds.None);
|
|
23
|
-
|
|
24
|
-
// Expects that `iab.tcf.gdprApplies` will always be a boolean under real usage.
|
|
25
|
-
// The fallback (`GDPR_COUNTRIES.includes`) is meant ONLY for preview (webapp).
|
|
26
|
-
export const doesGDPRApply = state =>
|
|
27
|
-
!!get(
|
|
28
|
-
getStore(state),
|
|
29
|
-
'gdprApplies',
|
|
30
|
-
GDPR_COUNTRIES.includes(getCountryCode(state)),
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
export const getConsentLanguage = state => {
|
|
34
|
-
return get(state, 'config.lang', 'en').slice(0, 2).toUpperCase();
|
|
35
|
-
};
|
|
36
|
-
export const getConsentString = (state, { gppSection, tcString }) => {
|
|
37
|
-
return get(state, ['iab', 'consentStrings', gppSection], tcString);
|
|
38
|
-
};
|
|
39
|
-
export const getPublisherCountryCode = state =>
|
|
40
|
-
// This must be a Two-Letter code
|
|
41
|
-
(
|
|
42
|
-
get(getStore(state), 'publisherCC') ||
|
|
43
|
-
getCountryCode(state) ||
|
|
44
|
-
'US'
|
|
45
|
-
).toUpperCase();
|
|
46
|
-
|
|
47
|
-
// API Specific Data
|
|
48
|
-
export const getPublisherLegitimateInterests = (/* state, apiVersion */) => {
|
|
49
|
-
// Placeholder
|
|
50
|
-
return {};
|
|
51
|
-
};
|
|
52
|
-
export const getPurposeIds = () => [...purposeIds];
|
|
53
|
-
export const getPurposeOptOuts = (state, apiVersion) =>
|
|
54
|
-
get(getApiData(state, apiVersion), 'purposeOptouts') || {};
|
|
55
|
-
export const getPurposeConsents = (state, apiVersion) => {
|
|
56
|
-
const consent = getSavedConsent(state) || getConsent(state);
|
|
57
|
-
const optOutPurposes = getPurposeOptOuts(state, apiVersion);
|
|
58
|
-
return Object.entries(consentToPurpose(consent, apiVersion)).reduce(
|
|
59
|
-
(purposeConsents, [purposeId, hasConsented]) => {
|
|
60
|
-
purposeConsents[`${purposeId}`] =
|
|
61
|
-
hasConsented && !optOutPurposes[`${purposeId}`];
|
|
62
|
-
return purposeConsents;
|
|
63
|
-
},
|
|
64
|
-
{},
|
|
65
|
-
);
|
|
66
|
-
};
|
|
67
|
-
// Established legitimate interest per purpose
|
|
68
|
-
export const getPurposesLITransparency = (state, apiVersion) => {
|
|
69
|
-
/*
|
|
70
|
-
* PurposesLITransparency
|
|
71
|
-
* For the purposes of a TCString, this indicates that the end user
|
|
72
|
-
* has been given notification of the consent purposes and the
|
|
73
|
-
* opportunity to accept or deny them, or object individually.
|
|
74
|
-
*/
|
|
75
|
-
const purposeConsents = getPurposeConsents(state, apiVersion);
|
|
76
|
-
const purposeLITransparency = {};
|
|
77
|
-
const optOutPurposes = getPurposeOptOuts(state, apiVersion);
|
|
78
|
-
Object.entries(purposeConsents).forEach(([purposeId]) => {
|
|
79
|
-
// We are only indicating that the user has been given transparency
|
|
80
|
-
if (!optOutPurposes[`${purposeId}`]) {
|
|
81
|
-
// If a user has not specifically objected, we mark the purpose true
|
|
82
|
-
purposeLITransparency[`${purposeId}`] = true;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
/**
|
|
86
|
-
* Purpose 1 is never allowed to be true for legitimate interest transparency
|
|
87
|
-
*/
|
|
88
|
-
delete purposeLITransparency[`${1}`];
|
|
89
|
-
return purposeLITransparency;
|
|
90
|
-
};
|
|
91
|
-
export const getSpecialFeatureOptIns = (state, apiVersion) =>
|
|
92
|
-
get(getApiData(state, apiVersion), 'specialFeatureOptins') || {};
|
|
93
|
-
export const getVendors = (state, apiVersion) =>
|
|
94
|
-
get(getApiData(state, apiVersion), 'vendors') || {};
|
|
95
|
-
export const getVendorData = (state, { apiVersion, vendorId }) =>
|
|
96
|
-
get(getVendors(state, apiVersion), `${vendorId}`) || {};
|
|
97
|
-
export const getVendorIds = (state, apiVersion) =>
|
|
98
|
-
Object.keys(getVendors(state, apiVersion)).map(vendorId =>
|
|
99
|
-
parseInt(vendorId, 10),
|
|
100
|
-
) || [];
|
|
101
|
-
export const getVendorOptOuts = (state, apiVersion) =>
|
|
102
|
-
get(getApiData(state, apiVersion), 'vendorOptouts') || {};
|
|
103
|
-
export const getVendorListError = (state, apiVersion) =>
|
|
104
|
-
get(getApiData(state, apiVersion), 'vendorListError', 0);
|
|
105
|
-
export const getVendorListVersion = (state, apiVersion) =>
|
|
106
|
-
get(getApiData(state, apiVersion), 'vendorListVersion');
|
|
107
|
-
|
|
108
|
-
// This is the same value as v2.0/constants.js/gppSection but duplicating it
|
|
109
|
-
// prevents having to import that file which keeps the bundle size a lot
|
|
110
|
-
// smaller.
|
|
111
|
-
const TCF_GPP_SECTION = 'tcfeuv2';
|
|
112
|
-
export const getStorageConsent = state => {
|
|
113
|
-
return {
|
|
114
|
-
iab: {
|
|
115
|
-
v2: {
|
|
116
|
-
p: getPurposeOptOuts(state, '2.0'),
|
|
117
|
-
v: getVendorOptOuts(state, '2.0'),
|
|
118
|
-
},
|
|
119
|
-
// If we rename this property, we need to update the reducer
|
|
120
|
-
// (src/iab/tcf/v2.0/reducer.js) for `setConsent` which extracts it
|
|
121
|
-
// so that we honor previously-saved values.
|
|
122
|
-
euconsent: getConsentString(state, { gppSection: TCF_GPP_SECTION }),
|
|
123
|
-
},
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Indicates if any action has been taken by the user in regards to consent
|
|
129
|
-
*
|
|
130
|
-
* @param {import('../../redux/selectors.js').ReduxState} state
|
|
131
|
-
* @param {string} gppSection The gppSection location in Redux that we store the TCString in.
|
|
132
|
-
* @returns {boolean} TRUE if a consent action has been taken, FALSE if it has not
|
|
133
|
-
*/
|
|
134
|
-
export const hasActed = (state, gppSection) =>
|
|
135
|
-
!!get(state, ['iab', 'hasActed', gppSection]);
|
|
136
|
-
export const hasConsentedToSpecialFeature = (
|
|
137
|
-
state,
|
|
138
|
-
{ apiVersion, specialFeatureId },
|
|
139
|
-
) => !!getSpecialFeatureOptIns(state, apiVersion)[`${specialFeatureId}`];
|
|
140
|
-
export const hasOptedOutOfVendor = (state, { apiVersion, vendorId }) =>
|
|
141
|
-
!!getVendorOptOuts(state, apiVersion)[`${vendorId}`];
|
|
142
|
-
export const hasOptedOutOfPurpose = (state, { apiVersion, purposeId }) =>
|
|
143
|
-
!!getPurposeOptOuts(state, apiVersion)[`${purposeId}`];
|
|
144
|
-
|
|
145
|
-
export const isTcfApplicable = state =>
|
|
146
|
-
(doesGDPRApply(state) || isBrowsingFrom(state, 'ca')) &&
|
|
147
|
-
!!get(getStore(state), 'enabled', isIABEnabled(state));
|
|
148
|
-
export const isVendorListLoaded = (state, apiVersion) =>
|
|
149
|
-
!!get(getApiData(state, apiVersion), 'vendorListLoaded');
|
|
150
|
-
export const isVendorListLoading = (state, apiVersion) =>
|
|
151
|
-
!!get(getApiData(state, apiVersion), 'vendorListLoading');
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { get } from '../../utils';
|
|
2
|
-
import { makeGetConsentDataObject } from './consent';
|
|
3
|
-
|
|
4
|
-
export default function makeApi(initOptions) {
|
|
5
|
-
const getConsentDataObject = makeGetConsentDataObject(initOptions);
|
|
6
|
-
const buildTcData = state => {
|
|
7
|
-
const consentDataObj = getConsentDataObject(state);
|
|
8
|
-
return initOptions.coreFieldSequence.reduce(
|
|
9
|
-
(tcData, [tcDataField, length, , consentDataField, formatter]) => {
|
|
10
|
-
const value = get(consentDataObj, consentDataField);
|
|
11
|
-
tcData[`${tcDataField}`] = formatter ? formatter(value, length) : value;
|
|
12
|
-
return tcData;
|
|
13
|
-
},
|
|
14
|
-
{},
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
function bind(store) {
|
|
19
|
-
return function tcfApi(command, callback, parameter) {
|
|
20
|
-
const state = store.getState();
|
|
21
|
-
switch (command) {
|
|
22
|
-
case 'getField': {
|
|
23
|
-
const field = parameter;
|
|
24
|
-
const tcData = buildTcData(state);
|
|
25
|
-
return tcData[`${field}`];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
case 'getSection': {
|
|
29
|
-
const tcData = buildTcData(state);
|
|
30
|
-
return tcData;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
bind,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { makeGetConsentDataObject, makeGetField } from './consent';
|
|
2
|
-
|
|
3
|
-
import { MAX_DATE } from '../../constants';
|
|
4
|
-
import { getConsentString } from './selectors';
|
|
5
|
-
import { setGdprApplies } from './actions';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Extracts the TCData fields from a consentDataObj
|
|
9
|
-
* @param {object} consentDataObj - Data object returned from getConsentDataObject()
|
|
10
|
-
*/
|
|
11
|
-
function consentToTcData(consentDataObj) {
|
|
12
|
-
const {
|
|
13
|
-
tcString,
|
|
14
|
-
tcfPolicyVersion,
|
|
15
|
-
cmpVersion,
|
|
16
|
-
cmpId,
|
|
17
|
-
gdprApplies,
|
|
18
|
-
cmpLoaded,
|
|
19
|
-
eventStatus,
|
|
20
|
-
cmpStatus,
|
|
21
|
-
displayStatus,
|
|
22
|
-
isServiceSpecific,
|
|
23
|
-
purposeOneTreatment,
|
|
24
|
-
useNonStandardStacks,
|
|
25
|
-
publisherCC,
|
|
26
|
-
purpose,
|
|
27
|
-
vendor,
|
|
28
|
-
specialFeatureOptins,
|
|
29
|
-
publisher,
|
|
30
|
-
} = consentDataObj;
|
|
31
|
-
return gdprApplies
|
|
32
|
-
? {
|
|
33
|
-
tcString,
|
|
34
|
-
tcfPolicyVersion,
|
|
35
|
-
cmpVersion,
|
|
36
|
-
cmpId,
|
|
37
|
-
gdprApplies,
|
|
38
|
-
cmpLoaded,
|
|
39
|
-
eventStatus,
|
|
40
|
-
cmpStatus,
|
|
41
|
-
displayStatus,
|
|
42
|
-
isServiceSpecific,
|
|
43
|
-
purposeOneTreatment,
|
|
44
|
-
useNonStandardStacks,
|
|
45
|
-
publisherCC: `${publisherCC}`.toUpperCase(),
|
|
46
|
-
purpose,
|
|
47
|
-
vendor,
|
|
48
|
-
specialFeatureOptins,
|
|
49
|
-
publisher,
|
|
50
|
-
}
|
|
51
|
-
: {
|
|
52
|
-
tcfPolicyVersion,
|
|
53
|
-
cmpVersion,
|
|
54
|
-
cmpId,
|
|
55
|
-
gdprApplies,
|
|
56
|
-
eventStatus,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const callbacks = {};
|
|
61
|
-
|
|
62
|
-
const makeDispatch = apiVersion =>
|
|
63
|
-
function dispatch(data) {
|
|
64
|
-
const tcData = consentToTcData(data);
|
|
65
|
-
Object.entries(callbacks).forEach(([listenerId, { version, callback }]) => {
|
|
66
|
-
parseInt(apiVersion, 10) === parseInt(version, 10) &&
|
|
67
|
-
callback(
|
|
68
|
-
{
|
|
69
|
-
...tcData,
|
|
70
|
-
listenerId: parseInt(listenerId, 10),
|
|
71
|
-
},
|
|
72
|
-
true,
|
|
73
|
-
);
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* TCFAPI implementation
|
|
79
|
-
* @function
|
|
80
|
-
* @name __tcfapi
|
|
81
|
-
* @param {string} command - The command to be executed by the API
|
|
82
|
-
* @param {string} [parameter] - Optional parameter to be passed to the `command`
|
|
83
|
-
* @param {number} version - The version number that the response should adhere to
|
|
84
|
-
* @param {requestCallback} callback - The callback method that should be called with the command result
|
|
85
|
-
*/
|
|
86
|
-
export default function makeApi(initOptions) {
|
|
87
|
-
const getTCData = (state, version) => {
|
|
88
|
-
try {
|
|
89
|
-
const consentDataObj = makeGetConsentDataObject({
|
|
90
|
-
...initOptions,
|
|
91
|
-
version,
|
|
92
|
-
})(state);
|
|
93
|
-
return consentToTcData(consentDataObj);
|
|
94
|
-
} catch {
|
|
95
|
-
// could not retrieve data
|
|
96
|
-
return undefined;
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const getField = makeGetField(initOptions);
|
|
101
|
-
|
|
102
|
-
function bind(store) {
|
|
103
|
-
return function tcfApi(...args) {
|
|
104
|
-
const state = store.getState();
|
|
105
|
-
const [command] = args;
|
|
106
|
-
const [, requestedApiVersion] = args;
|
|
107
|
-
let apiVersion =
|
|
108
|
-
requestedApiVersion === null
|
|
109
|
-
? initOptions.version
|
|
110
|
-
: parseFloat(`${requestedApiVersion}`);
|
|
111
|
-
if (typeof apiVersion === 'number') {
|
|
112
|
-
// Floating point precision for numeric requests
|
|
113
|
-
if (isNaN(apiVersion)) {
|
|
114
|
-
apiVersion = 0;
|
|
115
|
-
} else {
|
|
116
|
-
const apiString = `${apiVersion}`.split('.');
|
|
117
|
-
apiVersion =
|
|
118
|
-
apiString.length === 1
|
|
119
|
-
? `${apiVersion}.0`
|
|
120
|
-
: `${apiString[0]}.${apiString[1][0]}`;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
const version = parseInt(apiVersion, 10);
|
|
124
|
-
|
|
125
|
-
switch (command) {
|
|
126
|
-
case 'setGdprApplies': {
|
|
127
|
-
/**
|
|
128
|
-
* shortcut to set gdprApplies if the publisher
|
|
129
|
-
* knows that they apply GDPR rules to all
|
|
130
|
-
* traffic (see the section on "What does the
|
|
131
|
-
* gdprApplies value mean" for more
|
|
132
|
-
*/
|
|
133
|
-
let [, , callback, gdprApplies] = args;
|
|
134
|
-
if (typeof callback === 'function') {
|
|
135
|
-
switch (version) {
|
|
136
|
-
case 2: {
|
|
137
|
-
// Version 2
|
|
138
|
-
if (args.length > 3 && typeof gdprApplies === 'boolean') {
|
|
139
|
-
store.dispatch(setGdprApplies(gdprApplies));
|
|
140
|
-
callback('set', true);
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
callback(undefined, false);
|
|
146
|
-
}
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
case 'ping': {
|
|
151
|
-
const [, , callback] = args;
|
|
152
|
-
if (typeof callback === 'function') {
|
|
153
|
-
try {
|
|
154
|
-
const {
|
|
155
|
-
cmpId,
|
|
156
|
-
cmpLoaded,
|
|
157
|
-
cmpStatus,
|
|
158
|
-
cmpVersion,
|
|
159
|
-
displayStatus,
|
|
160
|
-
gdprApplies,
|
|
161
|
-
gvlVersion,
|
|
162
|
-
tcfPolicyVersion,
|
|
163
|
-
} = makeGetConsentDataObject({
|
|
164
|
-
...initOptions,
|
|
165
|
-
version: apiVersion,
|
|
166
|
-
})(state);
|
|
167
|
-
callback({
|
|
168
|
-
// Returned apiVersion is a string
|
|
169
|
-
apiVersion: `${apiVersion}`,
|
|
170
|
-
cmpId,
|
|
171
|
-
cmpLoaded,
|
|
172
|
-
cmpStatus,
|
|
173
|
-
cmpVersion,
|
|
174
|
-
displayStatus,
|
|
175
|
-
gdprApplies,
|
|
176
|
-
gvlVersion,
|
|
177
|
-
tcfPolicyVersion,
|
|
178
|
-
});
|
|
179
|
-
} catch (error) {
|
|
180
|
-
// Could not retrieve data
|
|
181
|
-
callback(undefined, false);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
case 'getField': {
|
|
188
|
-
const consentString = getConsentString(state, initOptions);
|
|
189
|
-
const [, , , field] = args;
|
|
190
|
-
// The spec uses 'TcfPolicyVersion' but the GPP reference
|
|
191
|
-
// implementation uses 'PolicyVersion' for tcfeuv2 and
|
|
192
|
-
// TcfPolicyVersion for tcfcav1. We support both.
|
|
193
|
-
if (field === 'TcfPolicyVersion') {
|
|
194
|
-
return getField(consentString, 'PolicyVersion');
|
|
195
|
-
}
|
|
196
|
-
return getField(consentString, field);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
case 'getSection': {
|
|
200
|
-
return getTCData(state, apiVersion);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
case 'getTCData': {
|
|
204
|
-
const [, , callback] = args;
|
|
205
|
-
if (typeof callback === 'function') {
|
|
206
|
-
const tcData = getTCData(state, apiVersion);
|
|
207
|
-
callback(tcData, !!tcData);
|
|
208
|
-
}
|
|
209
|
-
break;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
case 'addEventListener': {
|
|
213
|
-
const [, , callback] = args;
|
|
214
|
-
if (typeof callback === 'function') {
|
|
215
|
-
try {
|
|
216
|
-
let inc = 0;
|
|
217
|
-
// listenerId must be a number: https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#tcdata
|
|
218
|
-
let listenerId = MAX_DATE - Date.now();
|
|
219
|
-
do {
|
|
220
|
-
listenerId -= inc++;
|
|
221
|
-
} while (callbacks[`${listenerId}`]);
|
|
222
|
-
|
|
223
|
-
callbacks[`${listenerId}`] = { version, callback };
|
|
224
|
-
const consentDataObj = makeGetConsentDataObject({
|
|
225
|
-
...initOptions,
|
|
226
|
-
version: apiVersion,
|
|
227
|
-
})(state);
|
|
228
|
-
const returnObject = {
|
|
229
|
-
...consentToTcData(consentDataObj),
|
|
230
|
-
listenerId,
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
callback(returnObject, true);
|
|
234
|
-
} catch (error) {
|
|
235
|
-
// Could not retrieve data
|
|
236
|
-
callback(undefined, false);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
case 'removeEventListener': {
|
|
243
|
-
const [, , callback, listenerId] = args;
|
|
244
|
-
delete callbacks[`${listenerId}`];
|
|
245
|
-
if (typeof callback === 'function') {
|
|
246
|
-
callback(true);
|
|
247
|
-
}
|
|
248
|
-
break;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
return {
|
|
255
|
-
bind,
|
|
256
|
-
dispatch: makeDispatch(initOptions.version),
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* This callback is part of __tcfapi API
|
|
261
|
-
* @callback __tcfapi~requestCallback
|
|
262
|
-
* @param {import('./constants').TCFData} uspData
|
|
263
|
-
* @param {boolean} success
|
|
264
|
-
*/
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const idsOnlyArrayFormatter = value =>
|
|
2
|
-
Object.entries(value)
|
|
3
|
-
.filter(([, v]) => v)
|
|
4
|
-
.map(([k]) => parseInt(k, 10));
|
|
5
|
-
|
|
6
|
-
export const fixedValuesArrayFormatter = (idValueMap, length) => {
|
|
7
|
-
const array = Array.from({ length }).fill(false);
|
|
8
|
-
Object.entries(idValueMap).forEach(([k, v]) => {
|
|
9
|
-
array[k - 1] = v;
|
|
10
|
-
});
|
|
11
|
-
return array;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const dateFormatter = timestamp => new Date(timestamp * 100);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* TCF Amendment - 21 December 2021
|
|
3
|
-
* Created and LastUpdated fields have been updated to have the same value
|
|
4
|
-
* corresponding to the ** day-level ** timestamp of when the TC String
|
|
5
|
-
* was last updated. Timestamp should maintain 36bit depth (deciseconds),
|
|
6
|
-
* but hours, minutes, seconds and milliseconds should be 0.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Creates a timestamp in deciseconds
|
|
11
|
-
*/
|
|
12
|
-
export const createUTCTimestampInDeciseconds = (
|
|
13
|
-
timestamp: number | string | Date,
|
|
14
|
-
) => {
|
|
15
|
-
const consentDate = new Date(timestamp);
|
|
16
|
-
const utc = Date.UTC(
|
|
17
|
-
consentDate.getUTCFullYear(),
|
|
18
|
-
consentDate.getUTCMonth(),
|
|
19
|
-
consentDate.getUTCDate(),
|
|
20
|
-
);
|
|
21
|
-
// Make sure the timestamp is > 0 otherwise the TCF Int parser fails
|
|
22
|
-
return Math.round(Math.max(0, utc) / 100);
|
|
23
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
apiName,
|
|
3
|
-
iframeName,
|
|
4
|
-
initOptions as tcfeuv2InitOptions,
|
|
5
|
-
} from './tcfeuv2-constants';
|
|
6
|
-
|
|
7
|
-
import makeCreateMiddleware from './middleware';
|
|
8
|
-
import makeReducer from './reducer';
|
|
9
|
-
import makeTcfcav1Api from '../tcfcav1-api';
|
|
10
|
-
import makeTcfeuv2Api from '../tcfeuv2-api';
|
|
11
|
-
import postMessageEventHandler from '../../iframe';
|
|
12
|
-
import { initOptions as tcfcav1InitOptions } from './tcfcav1-constants';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* TCF-Canada v1 is nearly identical to TCF-EU v2, just with a few fields left
|
|
16
|
-
* out and some renamed. As such, it makes use of the same state data as
|
|
17
|
-
* tcfeuv2, so there is an implicit dependency on tcfeuv2's reducer.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
const tcfeuv2 = {
|
|
21
|
-
api: makeTcfeuv2Api(tcfeuv2InitOptions),
|
|
22
|
-
apiName,
|
|
23
|
-
createMiddleware: makeCreateMiddleware(tcfeuv2InitOptions),
|
|
24
|
-
gppSection: tcfeuv2InitOptions.gppSection,
|
|
25
|
-
iframeName,
|
|
26
|
-
postMessageEventHandler: postMessageEventHandler(apiName, true),
|
|
27
|
-
reducer: makeReducer(tcfeuv2InitOptions),
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const tcfcav1 = {
|
|
31
|
-
api: makeTcfcav1Api(tcfcav1InitOptions),
|
|
32
|
-
createMiddleware: makeCreateMiddleware(tcfcav1InitOptions),
|
|
33
|
-
gppSection: tcfcav1InitOptions.gppSection,
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default { tcfeuv2, tcfcav1 };
|