Document Signature (WebComponents)
This is a web component to display and sign documents.
Develop
To start a local version of the document-signature
component you need to execute the following commands:
npm install
npm start
This command should open a page in the browser with the url http://localhost:3000
Deployment
This component can be deployed to any web page by adding the script and link tags to the HTML file, like so:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Document Signature</title>
<link rel="stylesheet" href="document-signature.css">
</head>
<body>
<document-signature
endpoint="https://documents.gw2.alvarium.io"
alvariumEndpoint="https://alvdev.gw2.alvarium.io"
token="<API_TOKEN>"
locale="es"
documentTypeId="<DOCUMENT_TYPE_ID>"
entity="documentSignature"
contractUserSignatureId="874a02aa-c7a1-4054-b2fc-f85d1dad94e8"
>
</document-signature>
<script type="module" src="document-signature.js"></script>
</body>
</html>
Then simply add the component wherever you want as so:
<document-signature></document-signature>
Props
-
endpoint
(string): The endpoint of the document service. -
alvariumEndpoint
(string): The endpoint of the Alvarium service. -
token
(string): The token for the document service. -
locale
(string): The language in which the document should be displayed. -
documentTypeId
(string): The id of the document type to display and sign. -
entity
(string, optional): The entity that is signing the document. -
contractUserSignatureId
(string): The id of the contract user signature.
License
This project is licensed under the MIT License.