borisous-lib
v0.0.95
Published
# 1 - Instal packages ``` npm i @fad-producto/generic-forms-lib ``` *"Requires access token configuration for private FAD repositories."
Downloads
1,245
Readme
Generic Forms Library
1 - Instal packages
```
npm i @fad-producto/generic-forms-lib
```
*"Requires access token configuration for private FAD repositories."
2 - Import component - app.module.ts
import { GenericFormsLibModule } from 'generic-forms-lib';
@NgModule({ imports: [ GenericFormsLibModule,
3 - Component Inputs & Outputs
Inputs
<lib-generic-forms
[configuration]="configuration"
(results)="results($event)"
></lib-generic-forms>
| Name | Type | Required | Default | Description |
| ------------------------ | ----------------------------------- | -------- | -------- | ---------------------------- |
| configuration | GenericFormsConfigurationInterface | true | | sets component configuration |
class GenericFormsConfigurationInterface
| Name | Type | Required | Default | Description |
| --------------- | -------------------------------------- | -------- | -------- | ------------------------------------- |
| authUri | string | true | NA | Generic forms uri |
| clientId | string | true | NA | Client id, auth for generic forms |
| clientSecret | string | true | NA | Client secret, auth for generic forms |
| formId | string | true | NA | ID of the form to be displayed |
| key | string | true | NA | antitamper key, generic forms |
| iv | string | true | NA | antitamper vector, generic forms |
| validationType | 'NAVIGATION', 'SUBMIT', 'ALL', 'NONE' | true | NA | type of buttons validation |
Outputs
results($event) {
console.log('Scanner result: ', $event);
}
$event: dynamic array, it is assembled according to the consulted form
##############################################
Error in project: global is not defined
Add in polyfills.ts
(window as any).global = window;