CQEN-QDCE / oca-react-native

A package for rendering Overlay Capture Architecture (OCA) form and credential in React Native.
1 stars 0 forks source link

img License


Logo du Ministère de la cybersécurité et du numérique

oca-react-native library

React Native library for Overlay Capture Architecture (OCA).

Installation

For now, you can only run the library locally. You need to clone the repository and do the installation. After, you can pack the library with the prepare command line.

npm install
npm run prepare

Examples

The code for the example is under the example/ directory. If you want to play with the oca components you can run the example project. Check example/ directory README for installation instructions.

Documentation

The library is principally an adaptation of oca.js-form-core and oca.js-form-html to be easily use in react native. For that, the library oca-react-native expose OcaCredential, OcaForm, createOcaStructure and getAttributes.

 OCA Credential

<OcaCredential
    oca,
    attributeValues,
    pageNumber,
    onError,
    language,
    width,
    height
/>

 OCA Form

<OcaForm 
    oca,
    language,
    attributeValues,
    stylingOptions,
    hideShowOptions,
    maxNumberOfAttributes
/>

  Create Oca Structure

createOcaStructure(oca): Promise<Structure | undefined>

  Get Attribute

getAttributes(attributesValues, language, structure): AttributesValues | object{name: string | undefined, ..., value: string | undefined}

Licence

Distribué sous Licence Libre du Québec – Réciprocité (LiLiQ-R). Voir LICENCE pour plus d'informations.