8.9.113 • Published 10 months ago

@taktikorg/tempore-veniam-in v8.9.113

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

publish workflow Test Coverage npm version MIT License

@taktikorg/tempore-veniam-in

React consent management solution and banner for cookies, local storage, session storage and (external) scripts.

@taktikorg/tempore-veniam-in Screenshot

Demo

Check out the CodeSandbox for a working example.

Documentation

Features

  • Provides the consent context to components
  • Loads (external) scripts based on consent state
  • Deletes cookies, local storage and session storage when consent declined
  • Hook to retrieve and change the current consent
  • Optional Banner with detailed settings to approve / decline consent
  • Persists the selection to local storage
  • Ready for Next.js
  • Dark and light mode
  • Styling via css

Installation

yarn add @taktikorg/tempore-veniam-in

# or

npm install @taktikorg/tempore-veniam-in

Basic usage

Wrap the application in the ConsentProvider. Provide settings via the options prop. Optionally use the ConsentBanner component to display a consent banner to the user.

/*
 * index.tsx
 */

import { ConsentBanner, ConsentProvider } from '@taktikorg/tempore-veniam-in';

// styling
import '@taktikorg/tempore-veniam-in/dist/styles/style.css';

// ...
<ConsentProvider
    options={{
        services: [
            {
                id: 'myid',
                name: 'MyName',
                scripts: [
                    { id: 'external-script', src: 'https://myscript.com/script.js' },
                    { id: 'inline-code', code: `alert("I am a JavaScript code");` },
                ],
                cookies: [{ pattern: 'cookie-name' }, { pattern: /regex/ }],
                localStorage: ['local-storage-key'],
                sessionStorage: ['session-storage-key'],
                mandatory: true,
            },
        ],
        // customHash: 'my-custom-hash', // optional, e.g. when changing the options based on language
        theme: 'light',
    }}
>
    <App />
    <ConsentBanner
        settings={{ hidden: false, label: 'More', modal: { title: 'Modal title' } }}
        decline={{ hidden: false, label: 'No' }}
        approve={{ label: 'Yes' }}
    >
        <>
            Can we use cookies and external services according to our <a href="test">privacy policy</a> to improve the
            browsing experience?
        </>
    </ConsentBanner>
</ConsentProvider>;
// ...
util.inspectdeepcopyopenRxJSrequirematchesiterationjavascriptdatastructureairbnbminimalWeakSet_.extendbuffersl10ncircularroutesameValueZerotoolkitloggingconcurrencyxtermemrglobreact-hook-formobjcloudwatchJSON-SchemaarktypeloadbalancingIteratorfromhas-ownregexYAMLdataviewdeletesuperagenttakeassertES6less mixinseslintinstallerdefinePropertypreserve-symlinksArray.prototype.findLastIndexarraybufferconcatMapes5bundlerdebugger[[Prototype]]symbolFunction.prototype.nametypedarraysstartertestingstringkeyendpointargvthroatdescriptionsafecharacterscss-in-jseslint-pluginbreakstdlibtappropertiescomputed-typesStyleSheetpackagetddfast-deep-clonekoreantypeerroransisharedarraybuffercommandequalitymodulefoldercloudformationeslintconfigagentstyleguidelockfileparentsECMAScript 7positiveponyfillwhatwgprivatecensortypedarrayfastclonecloudsearchiteratechromiumcss lessCSSrecursiveconnectshamregularReflect.getPrototypeOfString.prototype.matchAllhttpsObject.definePropertycloudtrailmixinsRxtostringtagtoolseslintpluginfiltermetadataqueueMicrotasknumbercssschemareusepushstylesroutingBigInt64Arraygetoptexpressionless compilerarthttpMapBigUint64ArraybrowserslistjsxURLArray.prototype.flatMapcloudfrontes2018immerdiffes7shebangObject.fromEntriesprettyomittypesrobustwgetES2018setteramazonvariables in csslistenersawesomesauceloggerroute53full-widthStreamsratehardlinksutilitypatchdotenvtapetouchdeep-cloneRegExp#flagswaitvestclassnamesfseventsmakeECMAScript 2019workerinternal slotrapidredactes2015enderfile systemeventDispatcherxhrbusyescapejasminetermautoscalingavapackage.jsonenumerableduplexttyTypeScriptcodestslibcopynodejsInt8Arrayspeedconsolelazytypesafedeepclonebddflat__proto__jsdomhashsyntaxSetcolumnECMAScript 6Array.prototype.flattenfetchsyntaxerrorlinewrapbootstrap lessasyncboundWeakMapeventstelephoneES7definechromepropertyfastnodefullwidthtoArraywidthschemeweaksetspinnerprogressreducergraphqlglacierelmfast-deep-copythrottlemake dirimmutablegradients css3a11yUint16Arrayfastifyawss3class-validatorelbreplayfspostcss-pluginECMAScript 3rmcommand-lineclassesnamestrimLeftES3core-jsreal-timeUint8ClampedArrayReactiveXbatchObject.entriestypeofdynamodbtoSortedprototypecorefindLastcreateformat-0extensionCSSStyleDeclarationstoragegatewayrandomObject.assigndataclientphonemkdirp@@toStringTagECMAScript 2022hotpropfindLastIndexparsejQuerydeterministicECMAScript 5shrinkwrap0requestnested cssshelllanguageasciinpmprotocol-buffersmochabrowserlistieES5queueinstylesheetbindpicomatchvaluesparserresolvefullredux-toolkitmkdirObject.valuesless cssdebugbrowserajaxString.prototype.trimvaliddirpackagesisConcatSpreadablemimetypessymbolswhichformstrimRightFloat32ArraydirectoryObjectelasticachees2016walkstreamgroupBytestdom-testing-librarymatchlrureduxgetOwnPropertyDescriptorredirectrmdirwarningstringifypnpm9stableECMAScript 2016callbackcrypthasOwncheckyupcolourspinnerscharacterserializationutilitiesjsonpathES2017preprocessoremitwordwrapcachesesshimastfastcopydateclihaselectronpromiseses6watchFileruntimecall-boundoutputArray.prototype.filter
@taktikorg/ab-laudantium@taktikorg/accusantium-cum@taktikorg/ad-id@taktikorg/accusamus-quod-debitis@taktikorg/accusantium-possimus@taktikorg/adipisci-quia@taktikorg/ad-ipsa@taktikorg/asperiores-distinctio@taktikorg/asperiores-doloribus@taktikorg/ab-deserunt@taktikorg/alias-asperiores-non@taktikorg/aliquid-rerum-voluptate@taktikorg/alias-suscipit@taktikorg/architecto-nobis@taktikorg/aperiam-iure@taktikorg/amet-dolore-eius@taktikorg/amet-odio@taktikorg/animi-nihil@taktikorg/aperiam-dolores-dolor@taktikorg/amet-hic-culpa@taktikorg/atque-repudiandae@taktikorg/atque-tempore-provident@taktikorg/aspernatur-dolorem@taktikorg/saepe-culpa-pariatur@taktikorg/rerum-quod@taktikorg/sapiente-officiis@taktikorg/soluta-dolores-exercitationem@taktikorg/sunt-nulla-ad@taktikorg/sunt-velit@taktikorg/tenetur-et-modi@taktikorg/tenetur-incidunt-minus@taktikorg/vel-illo@taktikorg/vel-deleniti@taktikorg/voluptate-vitae-aspernatur@taktikorg/sapiente-cupiditate@taktikorg/similique-adipisci@taktikorg/similique-porro-et@taktikorg/sit-maiores@taktikorg/sit-ut@taktikorg/sint-sequi-velit@taktikorg/temporibus-iure@taktikorg/vel-nihil-aliquam@taktikorg/sed-cupiditate-vero@taktikorg/suscipit-nesciunt-itaque@taktikorg/tempore-occaecati@taktikorg/veritatis-laboriosam@taktikorg/velit-perspiciatis@taktikorg/vitae-a@taktikorg/veritatis-officia@taktikorg/voluptatibus-error@taktikorg/voluptatem-pariatur-tenetur@taktikorg/voluptatem-nostrum@taktikorg/voluptatibus-dolor@taktikorg/voluptates-quo@taktikorg/voluptatem-nesciunt@taktikorg/dolorem-ducimus@taktikorg/dolores-recusandae-excepturi@taktikorg/dolores-totam@taktikorg/doloribus-quos@taktikorg/dolorum-assumenda@taktikorg/esse-totam@taktikorg/esse-nihil@taktikorg/eum-debitis-fugiat@taktikorg/eveniet-ipsum@taktikorg/facilis-itaque-ut@taktikorg/facere-nemo-enim@taktikorg/fuga-inventore@taktikorg/illo-excepturi-at@taktikorg/natus-enim-non@taktikorg/nemo-magnam@taktikorg/necessitatibus-sunt@taktikorg/natus-fugit@taktikorg/natus-officiis@taktikorg/nihil-itaque-nesciunt@taktikorg/quae-dolorem-eum@taktikorg/quae-ab@taktikorg/quaerat-nulla-nesciunt@taktikorg/quas-eveniet-explicabo@taktikorg/quisquam-temporibus@taktikorg/cumque-repudiandae-veritatis@taktikorg/eos-iure@taktikorg/eos-asperiores@taktikorg/exercitationem-quae-recusandae@taktikorg/expedita-assumenda-temporibus@taktikorg/expedita-corporis@taktikorg/excepturi-neque@taktikorg/exercitationem-deserunt@taktikorg/ex-voluptatibus@taktikorg/id-adipisci@taktikorg/harum-reprehenderit-perferendis@taktikorg/hic-officia@taktikorg/harum-eum@taktikorg/illum-molestiae-placeat@taktikorg/ipsum-magni@taktikorg/ipsum-aperiam@taktikorg/iste-doloremque-a@taktikorg/ipsa-voluptatibus@taktikorg/ipsa-totam-aperiam@taktikorg/perspiciatis-iste@taktikorg/qui-tempore
7.7.90

11 months ago

3.2.35

1 year ago

3.2.34

1 year ago

3.2.37

1 year ago

3.2.36

1 year ago

6.3.67

12 months ago

3.2.33

1 year ago

3.2.32

1 year ago

4.3.47

1 year ago

8.9.113

10 months ago

6.4.67

12 months ago

8.9.112

10 months ago

3.1.30

1 year ago

8.9.111

10 months ago

8.9.110

10 months ago

3.1.32

1 year ago

3.1.31

1 year ago

6.6.80

12 months ago

6.6.81

12 months ago

6.6.82

11 months ago

6.6.83

11 months ago

6.6.84

11 months ago

6.6.85

11 months ago

6.6.77

12 months ago

6.6.78

12 months ago

6.6.79

12 months ago

8.7.103

11 months ago

5.3.61

1 year ago

8.7.102

11 months ago

5.3.60

1 year ago

8.7.101

11 months ago

8.7.100

11 months ago

8.7.107

11 months ago

8.7.106

11 months ago

7.6.87

11 months ago

8.7.105

11 months ago

7.6.86

11 months ago

8.7.104

11 months ago

7.6.85

11 months ago

4.2.42

1 year ago

4.2.43

1 year ago

4.2.44

1 year ago

4.2.45

1 year ago

4.2.40

1 year ago

4.2.41

1 year ago

5.3.67

12 months ago

5.3.66

12 months ago

5.3.65

1 year ago

4.2.46

1 year ago

5.3.64

1 year ago

4.2.47

1 year ago

5.3.63

1 year ago

5.3.62

1 year ago

5.3.50

1 year ago

5.3.59

1 year ago

5.3.58

1 year ago

4.2.39

1 year ago

5.3.57

1 year ago

5.3.56

1 year ago

5.3.55

1 year ago

5.3.54

1 year ago

5.3.53

1 year ago

5.3.52

1 year ago

4.2.37

1 year ago

5.3.51

1 year ago

4.2.38

1 year ago

3.0.27

1 year ago

3.0.28

1 year ago

3.0.26

1 year ago

6.5.77

12 months ago

6.5.76

12 months ago

2.0.16

1 year ago

6.5.71

12 months ago

6.5.70

12 months ago

6.5.73

12 months ago

6.5.72

12 months ago

6.5.75

12 months ago

5.3.49

1 year ago

6.5.74

12 months ago

5.3.48

1 year ago

5.3.47

1 year ago

8.8.110

10 months ago

8.7.98

11 months ago

8.7.99

11 months ago

8.7.96

11 months ago

8.7.97

11 months ago

8.7.94

11 months ago

8.7.95

11 months ago

8.7.92

11 months ago

8.7.93

11 months ago

8.7.90

11 months ago

6.5.68

12 months ago

8.7.91

11 months ago

6.5.67

12 months ago

7.7.89

11 months ago

3.0.30

1 year ago

2.0.19

1 year ago

7.7.88

11 months ago

6.5.69

12 months ago

7.7.87

11 months ago

2.0.17

1 year ago

2.0.18

1 year ago

2.0.26

1 year ago

2.0.24

1 year ago

2.0.25

1 year ago

8.8.108

10 months ago

2.0.22

1 year ago

8.8.107

11 months ago

2.0.23

1 year ago

2.0.20

1 year ago

8.8.109

10 months ago

2.0.21

1 year ago

3.0.29

1 year ago

2.0.15

1 year ago

2.0.14

1 year ago

2.0.13

1 year ago

2.0.11

1 year ago

2.0.12

1 year ago

2.0.10

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago