1.5.0 • Published 1 year ago

tenerity-cookie-popup-mobile-sdk v1.5.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

gce-mobile-app-cookie-popup-react-native is a library that pulls in a configurable OneTrust template

Pull in with :

npm install tenerity-cookie-popup-mobile-sdk

yarn add tenerity-cookie-popup-mobile-sdk

To use this library:

 import { CookiePopup, TemplateProvider } from "tenerity-cookie-popup-mobile-sdk";

You must wrap your App.js in the TemplateContext for the context to work:

 <TemplateProvider></TemplateProvider>

Initialize with font (accepts two arguments fontFamily, fontWeight), applicationId, sdkVerasion, language and the callback after user has accepted Cookies:

const font = {fontFamily: "RN House Sans Light", fontWeight: "400"}

<CookiePopup
    font={font}
    applicationID="5df24d64-a26d-47a4-a661-b7aa65648909-test"
    sdkVersion="6.14.0"
    language="en-gb"
    website="idprotect.de"
    onAcceptCookiesCB={(cookies) => console.log(cookies)}
 />

You can post to onetrust the username on login, in order to save consets:

OneTrust.getInstance().postConsents("test@email.com");

To deplay just the Cookie Preferences page (There is no need to pass the inialization parameters), but you can still pass the onAcceptCookiesCB if you wish to retrieve that data. Here is an example of how you might open and close the popup.

{showConsents && (
    <CookiePopup
      presentModal={true}
      onAcceptCookiesCB={(cookies) => { setShowConsents(false); console.log(cookies);}}
    />
  )}

onAcceptCookiesCB is a callback that returns an array of cookie IDs that have been accepted by the user.

OPTIONAL: Font can be passed through and will apply to all text within the library. It accepts a dictionary that can contain fontFamily and fontWeight.

OPTIONAL: Website can be passed through and will stop all cookie popups and pass consents to that url using apps consentID. URL MUST BE PASSED without https or www to allow for all subdomains: idprotect.de

SDK version is the SDK version used by onetrust on the UI

language is the lanugage wanted to be displayed from the onetrust categorization section

applicationID is the applicationID used by onetrust

This library should meet double AA accessibility standards if it does not please contact mobile development team.

To Work on this library:

Add the node module to a project of your choice and work directly in the node module after installation and publish to repo and npm from there

Check confluence for details on npm login

1.5.0

1 year ago

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.3.2

2 years ago

1.4.0

2 years ago

1.4.9

2 years ago

1.4.8

2 years ago

1.4.7

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago