17.1.6 • Published 26 days ago

@financial-times/n-profile-ui v17.1.6

Weekly downloads
115
License
ISC
Repository
github
Last release
26 days ago

n-profile-ui

UI handlebars templates for GDPR consent

If you want to integrate a consent form into your Next app, please see this wiki guide.

Your app should render the element and required hidden fields detailed in the guide.

Then include the consent.html template from n-profile-ui

If you want to render a 'changes saved' message, a partial is available to include in your app page

Helper functions

buildConsentRecord

Accepts some user consent data (eg submitted from a form), a form of words ID and a consent source (the system code of the application sending the data eg 'next-signup'), and returns a consent record suitable for saving to the single consent store.

populateConsentModel

This works in the opposite direction to 'buildConsentRecord' - given a user's consent record (from the single consent store), plus form of words, this function will construct a view-model suitable for rendering out the consent template detailed above.

extractMetaFromString

Given a string like 'lbi-categoryName-channelName' used as the name attribute of a consent form control, this will return an object keyed by the parts of that string.

getFormOfWords

Accepts a form of words ID (and optionally, a scope eg FTPINK), and returns the form of words for it from the Form of Words API. Note - this helper requires that the FOW_API_HOST environment variable is set.

Client-side helpers

If your consent form should 'auto-save' each Yes/No consent option as soon as it's changed:

LiveUpdateConsent - a class to provide 'auto-save' functionality for a consent form. See Privacy settings for a working example, and the GDPR wiki for notes on how to implement.

alternatively, if the consent form will save when its submit button is clicked, use:

UpdateOnSave - helpers to validate and extract consent values to be merged into a form payload.

ConsentMessage - a simple helper class to show / hide a message on a consent form.

17.1.6

26 days ago

17.1.5

3 months ago

17.1.5-beta.3

3 months ago

17.1.5-beta.2

3 months ago

17.1.5-beta.1

3 months ago

17.1.4

3 months ago

17.1.3

3 months ago

17.0.0

9 months ago

15.1.0

10 months ago

17.1.2

6 months ago

17.1.1

6 months ago

16.0.0

9 months ago

14.1.2

1 year ago

15.0.0

12 months ago

14.1.0

1 year ago

14.1.1

1 year ago

14.0.6

1 year ago

14.0.5

2 years ago

14.0.3

2 years ago

14.0.4

2 years ago

14.0.1

2 years ago

14.0.2

2 years ago

14.0.0-beta.8

2 years ago

14.0.0-beta.7

2 years ago

14.0.0-beta.6

2 years ago

14.0.0-beta.5

2 years ago

14.0.0

2 years ago

13.1.10

2 years ago

14.0.0-beta.3

2 years ago

14.0.0-beta.2

2 years ago

14.0.0-beta.1

2 years ago

14.0.0-beta.4

2 years ago

13.1.9

3 years ago

13.1.8

3 years ago

13.1.7

3 years ago

13.1.5

3 years ago

13.1.6

3 years ago

13.1.4

3 years ago

13.0.2

3 years ago

13.0.0

3 years ago

13.0.1

3 years ago

13.0.0-beta.2

4 years ago

13.0.0-beta.1

4 years ago

12.0.2

4 years ago

12.0.1

4 years ago

12.0.0

4 years ago

11.0.13

4 years ago

11.0.12

4 years ago

11.0.11

4 years ago

11.0.10

4 years ago

11.0.9

4 years ago

11.0.8

4 years ago

11.0.7

4 years ago

11.0.6

4 years ago

11.0.5

4 years ago

11.0.4

4 years ago

11.0.3

4 years ago

11.0.2

4 years ago

11.0.1

4 years ago

11.0.0

4 years ago

10.25.0

5 years ago

10.24.0

6 years ago

10.23.0

6 years ago

10.22.0

6 years ago

10.21.0

6 years ago

10.20.0

6 years ago

10.19.0

6 years ago

10.18.0

6 years ago

10.17.0

6 years ago

10.16.0

6 years ago

10.15.0

6 years ago

10.14.0

6 years ago

10.13.0

6 years ago

10.12.0

6 years ago

10.11.0

6 years ago

10.10.0

6 years ago

10.9.0

6 years ago

10.8.0

6 years ago

10.7.0

6 years ago

10.6.0

6 years ago

10.5.0

6 years ago

10.4.0

6 years ago

10.3.0

6 years ago

10.2.0

6 years ago

10.1.0

6 years ago

10.0.2

6 years ago

10.0.1

6 years ago

10.0.0

6 years ago

9.0.7

6 years ago

9.0.6

6 years ago

9.0.5

6 years ago

9.0.4

6 years ago

9.0.3

6 years ago

9.0.2

6 years ago

9.0.1

6 years ago

9.0.0

6 years ago

8.0.0

6 years ago

7.6.5

6 years ago

7.6.4

6 years ago

7.6.3

6 years ago

7.6.2

6 years ago

7.6.1

6 years ago

7.6.0

6 years ago

7.4.5

6 years ago

7.4.5-beta.3

6 years ago

7.4.5-beta.1

6 years ago

7.4.4

6 years ago

7.4.3

6 years ago

7.4.2

6 years ago

7.4.1

6 years ago

7.4.0

6 years ago

7.3.4

6 years ago

7.3.3

6 years ago

7.3.2

6 years ago

7.3.1

6 years ago

7.3.0

6 years ago

7.2.9

6 years ago

7.2.8

6 years ago

7.2.7

6 years ago

7.2.6

6 years ago

7.2.5

6 years ago

7.2.4

6 years ago

7.2.3

6 years ago

2.2.3

6 years ago

7.2.2

6 years ago

7.2.1

6 years ago

7.2.0

6 years ago

7.1.0

6 years ago

7.0.0

6 years ago

6.1.0

6 years ago

6.0.0

6 years ago

5.0.0

6 years ago

4.1.0

6 years ago

4.0.0

6 years ago

3.0.0

6 years ago

2.2.0

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.9.0

6 years ago

1.8.0

6 years ago

1.7.0

6 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago