@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
package/src/store.ts
DELETED
|
@@ -1,602 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ConsentCategory,
|
|
3
|
-
ConsentCategory as ConsentCategoryType,
|
|
4
|
-
} from './constants';
|
|
5
|
-
import { ConsentConfig, ConsentManager } from './ConsentManager';
|
|
6
|
-
import type { Disclosure, OsanoAction, OsanoState } from './types/store';
|
|
7
|
-
import { get, merge } from './utils';
|
|
8
|
-
|
|
9
|
-
import type { AsyncAction } from './hooks/useThunkReducer';
|
|
10
|
-
import { fetchDisclosures } from './services/disclosures';
|
|
11
|
-
import { recordConsent } from './services/consent';
|
|
12
|
-
|
|
13
|
-
export type GenericCommand<T> = (
|
|
14
|
-
payload?: T
|
|
15
|
-
) => AsyncAction<OsanoState, OsanoAction>;
|
|
16
|
-
|
|
17
|
-
export type ConfigUpdateCommand = {
|
|
18
|
-
config: ConsentConfig;
|
|
19
|
-
customerId: string;
|
|
20
|
-
configId: string;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const OsanoCategories = Object.values(ConsentCategory);
|
|
24
|
-
|
|
25
|
-
export const SHOW_DIALOG = 'DIALOG';
|
|
26
|
-
export const SHOW_DRAWER = 'DRAWER';
|
|
27
|
-
export const SHOW_IAB_DISCLOSURES = 'IAB_DISCLOSURES';
|
|
28
|
-
export const SHOW_IAB_VENDORS = 'IAB_VENDORS';
|
|
29
|
-
|
|
30
|
-
const CLOSE = 'CLOSE';
|
|
31
|
-
const GO_BACK = 'GO_BACK';
|
|
32
|
-
const RELOAD = 'RELOAD';
|
|
33
|
-
const SET_LOCALE = 'SET_LOCALE';
|
|
34
|
-
const SAVE_BEGIN = '@async-SAVE-begin';
|
|
35
|
-
const SAVE_SUCCESS = 'SAVE_SUCCESS';
|
|
36
|
-
const SAVE_FAILURE = 'SAVE_FAILURE';
|
|
37
|
-
const TOGGLE_CATEGORY = 'TOGGLE_CATEGORY';
|
|
38
|
-
const SET_ALL_CONSENT = 'SET_ALL_CONSENT';
|
|
39
|
-
const FETCH_DISCLOSURES_BEGIN = 'FETCH_DISCLOSURES_BEGIN';
|
|
40
|
-
const FETCH_DISCLOSURES_SUCCESS = 'FETCH_DISCLOSURES_SUCCESS';
|
|
41
|
-
const FETCH_DISCLOSURES_FAILURE = 'FETCH_DISCLOSURES_FAILURE';
|
|
42
|
-
|
|
43
|
-
const SET_CONFIG = 'SET_CONFIG';
|
|
44
|
-
|
|
45
|
-
export const initialState: OsanoState = {
|
|
46
|
-
config: undefined,
|
|
47
|
-
configId: '',
|
|
48
|
-
consent: {
|
|
49
|
-
[ConsentCategory.ESSENTIAL]: true,
|
|
50
|
-
[ConsentCategory.STORAGE]: false,
|
|
51
|
-
[ConsentCategory.MARKETING]: false,
|
|
52
|
-
[ConsentCategory.PERSONALIZATION]: false,
|
|
53
|
-
[ConsentCategory.ANALYTICS]: false,
|
|
54
|
-
[ConsentCategory.OPT_OUT]: false,
|
|
55
|
-
} as Record<ConsentCategoryType, boolean | undefined>,
|
|
56
|
-
customerId: '',
|
|
57
|
-
dialogOpen: false,
|
|
58
|
-
disclosures: {
|
|
59
|
-
fetched: [],
|
|
60
|
-
loading: false,
|
|
61
|
-
results: {},
|
|
62
|
-
},
|
|
63
|
-
locale: 'en',
|
|
64
|
-
scrollToType: '',
|
|
65
|
-
scrollToId: -1,
|
|
66
|
-
stack: [],
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export const init = (initialArgs: OsanoState & any): OsanoState => {
|
|
70
|
-
const newState = merge(initialState, initialArgs) as OsanoState;
|
|
71
|
-
return newState;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const setAllConsent = (acceptOrDeny: boolean) => (state: OsanoState) => {
|
|
75
|
-
function formatStatus(category: ConsentCategoryType, status: boolean) {
|
|
76
|
-
switch (category) {
|
|
77
|
-
case 'ESSENTIAL': {
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
case 'OPT_OUT': {
|
|
81
|
-
// This is inverted because we would assume consent to all would be DENY for OPT_OUT
|
|
82
|
-
return shouldUseGPCOptOut(state, !status) || !status;
|
|
83
|
-
}
|
|
84
|
-
case 'MARKETING': {
|
|
85
|
-
// Never set marketing to true if OPT_OUT is true
|
|
86
|
-
return status && !state.consent[ConsentCategory.OPT_OUT];
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return status;
|
|
90
|
-
}
|
|
91
|
-
return {
|
|
92
|
-
...state,
|
|
93
|
-
consent: {
|
|
94
|
-
...state.consent,
|
|
95
|
-
...OsanoCategories.reduce(
|
|
96
|
-
(consent, category) => {
|
|
97
|
-
const status = formatStatus(category, acceptOrDeny);
|
|
98
|
-
if (status) {
|
|
99
|
-
consent[`${category}`] = status;
|
|
100
|
-
}
|
|
101
|
-
return consent;
|
|
102
|
-
},
|
|
103
|
-
{} as Record<ConsentCategoryType, boolean | undefined>
|
|
104
|
-
),
|
|
105
|
-
} as Record<ConsentCategoryType, boolean | undefined>,
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export function reducer(state: OsanoState, action: OsanoAction): OsanoState {
|
|
110
|
-
switch (action.type) {
|
|
111
|
-
case RELOAD:
|
|
112
|
-
return init(action.payload);
|
|
113
|
-
case SET_CONFIG: {
|
|
114
|
-
const { config, customerId, configId } = action.payload;
|
|
115
|
-
const consentConfig: ConsentConfig = config;
|
|
116
|
-
// Validate that this is the correct config for this customer.
|
|
117
|
-
if (
|
|
118
|
-
consentConfig.customerId !== customerId ||
|
|
119
|
-
consentConfig.configId !== configId
|
|
120
|
-
) {
|
|
121
|
-
return state;
|
|
122
|
-
}
|
|
123
|
-
return init({
|
|
124
|
-
...state,
|
|
125
|
-
config: consentConfig,
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
case SET_LOCALE:
|
|
129
|
-
return {
|
|
130
|
-
...state,
|
|
131
|
-
locale: action.payload,
|
|
132
|
-
};
|
|
133
|
-
case SAVE_SUCCESS: {
|
|
134
|
-
const consentedCategories: ConsentCategoryType[] = action.payload;
|
|
135
|
-
return {
|
|
136
|
-
...state,
|
|
137
|
-
consent: OsanoCategories.reduce(
|
|
138
|
-
(consent, category) => {
|
|
139
|
-
consent[`${category}`] =
|
|
140
|
-
consentedCategories.includes(category);
|
|
141
|
-
return consent;
|
|
142
|
-
},
|
|
143
|
-
{} as Record<ConsentCategoryType, boolean | undefined>
|
|
144
|
-
),
|
|
145
|
-
dialogOpen: false,
|
|
146
|
-
stack: [],
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
case SET_ALL_CONSENT: {
|
|
150
|
-
const acceptOrDeny = action.payload;
|
|
151
|
-
return setAllConsent(acceptOrDeny)(state);
|
|
152
|
-
}
|
|
153
|
-
case TOGGLE_CATEGORY: {
|
|
154
|
-
const { category, value } = action.payload;
|
|
155
|
-
if (typeof category !== 'string') {
|
|
156
|
-
return state;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// don't turn MARKETING on if OPT_OUT is already on
|
|
160
|
-
if (
|
|
161
|
-
category === ConsentCategory.MARKETING &&
|
|
162
|
-
state.consent[ConsentCategory.OPT_OUT] === true
|
|
163
|
-
) {
|
|
164
|
-
return state;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// turn MARKETING off if turning on OPT_OUT
|
|
168
|
-
if (
|
|
169
|
-
category === ConsentCategory.OPT_OUT &&
|
|
170
|
-
value === true &&
|
|
171
|
-
state.consent[ConsentCategory.MARKETING]
|
|
172
|
-
) {
|
|
173
|
-
return {
|
|
174
|
-
...state,
|
|
175
|
-
consent: {
|
|
176
|
-
...state.consent,
|
|
177
|
-
[ConsentCategory.MARKETING]: false,
|
|
178
|
-
[category as ConsentCategoryType]: value,
|
|
179
|
-
},
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
if (typeof value === 'boolean') {
|
|
184
|
-
return {
|
|
185
|
-
...state,
|
|
186
|
-
consent: {
|
|
187
|
-
...state.consent,
|
|
188
|
-
[category as ConsentCategoryType]: value,
|
|
189
|
-
},
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
if (state.consent[category as ConsentCategoryType] !== undefined) {
|
|
193
|
-
return {
|
|
194
|
-
...state,
|
|
195
|
-
consent: {
|
|
196
|
-
...state.consent,
|
|
197
|
-
[category as ConsentCategoryType]:
|
|
198
|
-
!state.consent[category as ConsentCategoryType],
|
|
199
|
-
},
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
return {
|
|
203
|
-
...state,
|
|
204
|
-
consent: {
|
|
205
|
-
...state.consent,
|
|
206
|
-
[category as ConsentCategoryType]: true,
|
|
207
|
-
},
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
case SHOW_DIALOG:
|
|
211
|
-
return {
|
|
212
|
-
...state,
|
|
213
|
-
dialogOpen: true,
|
|
214
|
-
stack: [],
|
|
215
|
-
};
|
|
216
|
-
case SHOW_DRAWER:
|
|
217
|
-
return {
|
|
218
|
-
...state,
|
|
219
|
-
stack: [action.type],
|
|
220
|
-
};
|
|
221
|
-
case SHOW_IAB_DISCLOSURES:
|
|
222
|
-
return {
|
|
223
|
-
...state,
|
|
224
|
-
scrollToType:
|
|
225
|
-
(action.payload?.id && action.payload?.type) || '',
|
|
226
|
-
scrollToId: (action.payload?.type && action.payload?.id) || -1,
|
|
227
|
-
stack: [...state.stack, action.type],
|
|
228
|
-
};
|
|
229
|
-
case SHOW_IAB_VENDORS:
|
|
230
|
-
return {
|
|
231
|
-
...state,
|
|
232
|
-
scrollToType: (action.payload?.id && 'vendor') || '',
|
|
233
|
-
scrollToId: action.payload?.id || -1,
|
|
234
|
-
stack: [...state.stack, action.type],
|
|
235
|
-
};
|
|
236
|
-
case GO_BACK: {
|
|
237
|
-
if (state.stack.length === 1) {
|
|
238
|
-
return {
|
|
239
|
-
...state,
|
|
240
|
-
stack: [],
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
return {
|
|
244
|
-
...state,
|
|
245
|
-
stack: state.stack.slice(0, state.stack.length - 1),
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
case CLOSE: {
|
|
249
|
-
const cmp = action.payload as ConsentManager;
|
|
250
|
-
const consent = Object.keys(state.consent).reduce(
|
|
251
|
-
(newConsent, category) => {
|
|
252
|
-
newConsent[`${category as ConsentCategoryType}`] =
|
|
253
|
-
cmp.consent?.includes(category as ConsentCategoryType);
|
|
254
|
-
return newConsent;
|
|
255
|
-
},
|
|
256
|
-
{} as Record<ConsentCategoryType, boolean | undefined>
|
|
257
|
-
);
|
|
258
|
-
if (state.stack.length > 0) {
|
|
259
|
-
return {
|
|
260
|
-
...state,
|
|
261
|
-
consent,
|
|
262
|
-
stack: [],
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
return {
|
|
266
|
-
...state,
|
|
267
|
-
dialogOpen: false,
|
|
268
|
-
consent,
|
|
269
|
-
stack: [],
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
case FETCH_DISCLOSURES_BEGIN: {
|
|
273
|
-
const category = action.payload;
|
|
274
|
-
return {
|
|
275
|
-
...state,
|
|
276
|
-
disclosures: {
|
|
277
|
-
...state.disclosures,
|
|
278
|
-
loading:
|
|
279
|
-
state.disclosures.fetched.indexOf(category) >= 0
|
|
280
|
-
? false
|
|
281
|
-
: true,
|
|
282
|
-
},
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
case FETCH_DISCLOSURES_FAILURE: {
|
|
286
|
-
const { category } = action.payload;
|
|
287
|
-
return {
|
|
288
|
-
...state,
|
|
289
|
-
disclosures: {
|
|
290
|
-
...state.disclosures,
|
|
291
|
-
loading: false,
|
|
292
|
-
fetched: state.disclosures.fetched.filter(
|
|
293
|
-
(cat) => cat !== category
|
|
294
|
-
),
|
|
295
|
-
},
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
case FETCH_DISCLOSURES_SUCCESS: {
|
|
299
|
-
const {
|
|
300
|
-
disclosures,
|
|
301
|
-
category,
|
|
302
|
-
}: { disclosures: Disclosure[]; category: ConsentCategoryType } =
|
|
303
|
-
action.payload;
|
|
304
|
-
const {
|
|
305
|
-
disclosures: { results, fetched: currentlyFetched = [] },
|
|
306
|
-
} = state;
|
|
307
|
-
const fetched = category
|
|
308
|
-
? [...currentlyFetched]
|
|
309
|
-
: Object.values(ConsentCategory);
|
|
310
|
-
const disclosuresByCategory: Partial<
|
|
311
|
-
Record<ConsentCategoryType, Disclosure[]>
|
|
312
|
-
> = disclosures.reduce<
|
|
313
|
-
Partial<Record<ConsentCategoryType, Disclosure[]>>
|
|
314
|
-
>(
|
|
315
|
-
(
|
|
316
|
-
categories: Partial<
|
|
317
|
-
Record<ConsentCategoryType, Disclosure[]>
|
|
318
|
-
>,
|
|
319
|
-
disclosure: Disclosure
|
|
320
|
-
) => {
|
|
321
|
-
const { classification: categoryName } = disclosure || {};
|
|
322
|
-
if (!disclosure || !categoryName) {
|
|
323
|
-
return categories;
|
|
324
|
-
}
|
|
325
|
-
const categoryDisclosures =
|
|
326
|
-
categories[`${categoryName as ConsentCategoryType}`] ||
|
|
327
|
-
[];
|
|
328
|
-
categories[`${categoryName as ConsentCategoryType}`] =
|
|
329
|
-
categoryDisclosures;
|
|
330
|
-
categoryDisclosures.push({ type: 'cookie', ...disclosure });
|
|
331
|
-
return categories;
|
|
332
|
-
},
|
|
333
|
-
{ ...results }
|
|
334
|
-
);
|
|
335
|
-
const newResults = Object.entries(disclosuresByCategory)
|
|
336
|
-
.filter(([cat]) => fetched.push(cat as ConsentCategoryType))
|
|
337
|
-
.reduce(
|
|
338
|
-
(validCategories, [cat, categoryDisclosures]) => {
|
|
339
|
-
const lookup: Record<string, boolean> = {};
|
|
340
|
-
validCategories[`${cat as ConsentCategoryType}`] =
|
|
341
|
-
categoryDisclosures
|
|
342
|
-
.filter((disclosure) => {
|
|
343
|
-
if (!disclosure) {
|
|
344
|
-
return false;
|
|
345
|
-
}
|
|
346
|
-
const { name, type = 'cookie' } =
|
|
347
|
-
disclosure;
|
|
348
|
-
const uuid = `${type}:${name}`;
|
|
349
|
-
return !lookup[`${uuid}`]
|
|
350
|
-
? ((lookup[`${uuid}`] = true), true)
|
|
351
|
-
: false;
|
|
352
|
-
})
|
|
353
|
-
.sort((a, b) =>
|
|
354
|
-
`${a.type}:${a.name}`.localeCompare(
|
|
355
|
-
`${b.type}:${b.name}`
|
|
356
|
-
)
|
|
357
|
-
);
|
|
358
|
-
return validCategories;
|
|
359
|
-
},
|
|
360
|
-
{} as Record<ConsentCategoryType, Disclosure[]>
|
|
361
|
-
);
|
|
362
|
-
return {
|
|
363
|
-
...state,
|
|
364
|
-
disclosures: {
|
|
365
|
-
...state.disclosures,
|
|
366
|
-
results: newResults,
|
|
367
|
-
fetched: fetched.filter(
|
|
368
|
-
(cat, index, list) => list.indexOf(cat) === index
|
|
369
|
-
),
|
|
370
|
-
loading: false,
|
|
371
|
-
},
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
default:
|
|
375
|
-
return state;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
// THUNK COMMANDS
|
|
380
|
-
|
|
381
|
-
export const reload: GenericCommand<OsanoState & any> =
|
|
382
|
-
(initialArgs) => (dispatch) => {
|
|
383
|
-
dispatch({ type: RELOAD, payload: init(initialArgs) });
|
|
384
|
-
};
|
|
385
|
-
|
|
386
|
-
export const showDialog: AsyncAction<OsanoState, OsanoAction> = (dispatch) =>
|
|
387
|
-
dispatch({ type: SHOW_DIALOG });
|
|
388
|
-
|
|
389
|
-
export const showDrawer: AsyncAction<OsanoState, OsanoAction> = (dispatch) => {
|
|
390
|
-
// LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
391
|
-
dispatch({ type: SHOW_DRAWER });
|
|
392
|
-
};
|
|
393
|
-
|
|
394
|
-
export const setLocale: GenericCommand<string> = (payload) => (dispatch) => {
|
|
395
|
-
dispatch({ type: SET_LOCALE, payload });
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
export const setConfig: GenericCommand<ConfigUpdateCommand> =
|
|
399
|
-
(payload) => (dispatch) => {
|
|
400
|
-
dispatch({ type: SET_CONFIG, payload });
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
export const showIabDisclosures: GenericCommand<any> =
|
|
404
|
-
(payload) => (dispatch) => {
|
|
405
|
-
// LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
406
|
-
dispatch({ type: SHOW_IAB_DISCLOSURES, payload });
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
export const showIabVendors: GenericCommand<any> = (payload) => (dispatch) => {
|
|
410
|
-
// LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
411
|
-
dispatch({ type: SHOW_IAB_VENDORS, payload });
|
|
412
|
-
};
|
|
413
|
-
|
|
414
|
-
export const toggleCategory: GenericCommand<any> = (payload) => (dispatch) =>
|
|
415
|
-
dispatch({ type: TOGGLE_CATEGORY, payload });
|
|
416
|
-
|
|
417
|
-
export const toggleDisclosure: GenericCommand<any> =
|
|
418
|
-
(payload) => (dispatch, getState) => {
|
|
419
|
-
const state = getState();
|
|
420
|
-
const { category = '', configId = '', customerId = '' } = payload;
|
|
421
|
-
const shouldLoad =
|
|
422
|
-
!isLoadingDisclosures(state) &&
|
|
423
|
-
!hasFetchedDisclosuresForCategory(state, category);
|
|
424
|
-
if (shouldLoad) {
|
|
425
|
-
// TODO: Fetch only specific category disclosures when API is ready, commenting out category for now
|
|
426
|
-
dispatch({ type: FETCH_DISCLOSURES_BEGIN /* payload: category */ });
|
|
427
|
-
fetchDisclosures(
|
|
428
|
-
customerId,
|
|
429
|
-
configId,
|
|
430
|
-
undefined /* category */,
|
|
431
|
-
state.locale
|
|
432
|
-
)
|
|
433
|
-
.then((response) => {
|
|
434
|
-
const disclosureResults = response || [];
|
|
435
|
-
dispatch({
|
|
436
|
-
type: FETCH_DISCLOSURES_SUCCESS,
|
|
437
|
-
payload: {
|
|
438
|
-
disclosures: disclosureResults /* category */,
|
|
439
|
-
},
|
|
440
|
-
});
|
|
441
|
-
return response;
|
|
442
|
-
})
|
|
443
|
-
.catch((error) => {
|
|
444
|
-
dispatch({
|
|
445
|
-
type: FETCH_DISCLOSURES_FAILURE,
|
|
446
|
-
payload: { error /* category */ },
|
|
447
|
-
});
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
};
|
|
451
|
-
|
|
452
|
-
export const toggleIabSpecialFeature: GenericCommand<any> = (payload) => () => {
|
|
453
|
-
console.log(
|
|
454
|
-
`TODO: toggleIabSpecialFeature ${JSON.stringify(payload, null, 2)}`
|
|
455
|
-
);
|
|
456
|
-
};
|
|
457
|
-
export const toggleIabPurposeOptOut: GenericCommand<{
|
|
458
|
-
id: number;
|
|
459
|
-
value: boolean;
|
|
460
|
-
}> = (payload) => () => {
|
|
461
|
-
const { id, value } = payload || {};
|
|
462
|
-
console.log(`TODO: toggleIabPurposeOptOut ${id} ${value}`);
|
|
463
|
-
};
|
|
464
|
-
export const toggleIabVendorOptOut: GenericCommand<{
|
|
465
|
-
id: number;
|
|
466
|
-
value: boolean;
|
|
467
|
-
}> = (payload) => () => {
|
|
468
|
-
const { id, value } = payload || {};
|
|
469
|
-
console.log(`TODO: toggleIabVendorOptOut ${id} ${value}`);
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
export const acceptAll: AsyncAction<OsanoState, OsanoAction> = (dispatch) => {
|
|
473
|
-
dispatch({ type: SET_ALL_CONSENT, payload: true });
|
|
474
|
-
};
|
|
475
|
-
|
|
476
|
-
export const denyAll: AsyncAction<OsanoState, OsanoAction> = (dispatch) => {
|
|
477
|
-
dispatch({ type: SET_ALL_CONSENT, payload: false });
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
export const goBack: AsyncAction<OsanoState, OsanoAction> = (dispatch) => {
|
|
481
|
-
// LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
482
|
-
dispatch({ type: GO_BACK });
|
|
483
|
-
};
|
|
484
|
-
|
|
485
|
-
export const close: GenericCommand<ConsentManager> = (cmp) => (dispatch) => {
|
|
486
|
-
// LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
487
|
-
dispatch({ type: CLOSE, payload: cmp });
|
|
488
|
-
};
|
|
489
|
-
|
|
490
|
-
export const saveConsent: GenericCommand<ConsentManager> =
|
|
491
|
-
(cmp) => (dispatch, getState) => {
|
|
492
|
-
if (!cmp) {
|
|
493
|
-
return;
|
|
494
|
-
}
|
|
495
|
-
const state = getState();
|
|
496
|
-
const oldConsent = cmp?.consent;
|
|
497
|
-
const consent = getConsent(state);
|
|
498
|
-
dispatch({ type: SAVE_BEGIN });
|
|
499
|
-
return recordConsent(cmp, consent)
|
|
500
|
-
.then((newConsent: ConsentCategoryType[] | null) =>
|
|
501
|
-
dispatch({ type: SAVE_SUCCESS, payload: newConsent })
|
|
502
|
-
)
|
|
503
|
-
.catch(() => {
|
|
504
|
-
dispatch({ type: SAVE_FAILURE, payload: oldConsent });
|
|
505
|
-
});
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
// SELECTORS
|
|
509
|
-
export const isCategoryAccepted = (
|
|
510
|
-
state: OsanoState,
|
|
511
|
-
category: ConsentCategoryType
|
|
512
|
-
) => getConsent(state).includes(category);
|
|
513
|
-
|
|
514
|
-
export const isCategoryDisabled = (
|
|
515
|
-
state: OsanoState,
|
|
516
|
-
category: ConsentCategoryType
|
|
517
|
-
) =>
|
|
518
|
-
category === ConsentCategory.ESSENTIAL ||
|
|
519
|
-
(category === ConsentCategory.OPT_OUT && isGPCSupportEnabled(state)) ||
|
|
520
|
-
(category === ConsentCategory.MARKETING &&
|
|
521
|
-
(state.config?.shouldRenderOptOut || isGPCSupportEnabled(state)) &&
|
|
522
|
-
isCategoryAccepted(state, ConsentCategory.OPT_OUT));
|
|
523
|
-
|
|
524
|
-
export const isDrawerOpen = (state: OsanoState) => state.stack.length > 0;
|
|
525
|
-
export const isDialogOpen = (state: OsanoState) =>
|
|
526
|
-
state.dialogOpen && !isDrawerOpen(state);
|
|
527
|
-
|
|
528
|
-
export const isGPCSupportEnabled = (state: OsanoState) =>
|
|
529
|
-
!!state.config?.gpcSupport &&
|
|
530
|
-
// Native browser support uses Navigator.prototype
|
|
531
|
-
(Object.hasOwnProperty.call(navigator, 'globalPrivacyControl') ||
|
|
532
|
-
// Browser extension support uses the Navigator instance on window
|
|
533
|
-
Object.hasOwnProperty.call(window?.navigator, 'globalPrivacyControl'));
|
|
534
|
-
export const shouldUseGPCOptOut = (state: OsanoState, acceptOrDeny: boolean) =>
|
|
535
|
-
isGPCSupportEnabled(state)
|
|
536
|
-
? Object.hasOwn(window.navigator, 'globalPrivacyControl')
|
|
537
|
-
? true
|
|
538
|
-
: false
|
|
539
|
-
: acceptOrDeny;
|
|
540
|
-
|
|
541
|
-
export function getConsent(state: OsanoState): ConsentCategoryType[];
|
|
542
|
-
export function getConsent(
|
|
543
|
-
state: OsanoState,
|
|
544
|
-
category: ConsentCategoryType
|
|
545
|
-
): boolean;
|
|
546
|
-
export function getConsent(state: OsanoState, category?: ConsentCategoryType) {
|
|
547
|
-
if (typeof category === 'string') {
|
|
548
|
-
return state.consent[category];
|
|
549
|
-
}
|
|
550
|
-
return Object.entries(state.consent)
|
|
551
|
-
.filter(([_key, value]) => value)
|
|
552
|
-
.map(([key]) => key);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
// Array Constants for common disclosures
|
|
556
|
-
const loadingDisclosures: Disclosure[] = [];
|
|
557
|
-
const noDisclosures: Disclosure[] = [
|
|
558
|
-
{ type: 'no-results', name: 'disclosure.none' },
|
|
559
|
-
];
|
|
560
|
-
|
|
561
|
-
export const isLoadingDisclosures = (state: OsanoState) => {
|
|
562
|
-
return state.disclosures.loading;
|
|
563
|
-
};
|
|
564
|
-
export const hasFetchedDisclosuresForCategory = (
|
|
565
|
-
state: OsanoState,
|
|
566
|
-
category: ConsentCategoryType
|
|
567
|
-
) => {
|
|
568
|
-
const fetched = category ? state.disclosures.fetched || [] : [];
|
|
569
|
-
if (fetched.indexOf(category) >= 0) {
|
|
570
|
-
return true;
|
|
571
|
-
}
|
|
572
|
-
return false;
|
|
573
|
-
};
|
|
574
|
-
export const getCategoryDisclosures = (
|
|
575
|
-
state: OsanoState,
|
|
576
|
-
category: ConsentCategoryType
|
|
577
|
-
): Disclosure[] => {
|
|
578
|
-
const disclosures: Disclosure[] =
|
|
579
|
-
get(state, `disclosures.results.${category}`) || [];
|
|
580
|
-
if (disclosures.length) {
|
|
581
|
-
return disclosures;
|
|
582
|
-
}
|
|
583
|
-
const loading =
|
|
584
|
-
isLoadingDisclosures(state) &&
|
|
585
|
-
!hasFetchedDisclosuresForCategory(state, category);
|
|
586
|
-
return loading ? loadingDisclosures : noDisclosures;
|
|
587
|
-
};
|
|
588
|
-
|
|
589
|
-
export function getStack(state: OsanoState): string[];
|
|
590
|
-
export function getStack(state: OsanoState, index: number): string | undefined;
|
|
591
|
-
export function getStack(state: OsanoState, index?: number) {
|
|
592
|
-
if (typeof index === 'number') {
|
|
593
|
-
if (index < 0) {
|
|
594
|
-
if (index >= -state.stack.length) {
|
|
595
|
-
return state.stack[state.stack.length + index];
|
|
596
|
-
}
|
|
597
|
-
return undefined;
|
|
598
|
-
}
|
|
599
|
-
return state.stack[index];
|
|
600
|
-
}
|
|
601
|
-
return state.stack;
|
|
602
|
-
}
|