Angular library for dynamic form generation with formly integration.
npm install @qbs-origin/origin-formAngular library for dynamic form generation with formly integration.
``bash`
ng add @qbs-origin/origin-form
This will automatically install the package and all required peer dependencies.
`bash`
npm install @qbs-origin/origin-form
The following packages are installed automatically with this library:
- @qbs-origin/sign-lib - Digital signature functionality@ekyc_qoobiss/qbs-ect-cmp
- - eKYC components
This library requires the following peer dependencies (you need to install them in your project):
`bash`
npm install @angular/cdk @angular/material @ngx-formly/core @ngx-formly/material @ngx-translate/core @ngx-translate/http-loader @microsoft/signalr file-saver lodash ng2-pdf-viewer ngx-markdown ngx-scrollbar ts-md5 uuid
Import the OriginFormModule in your Angular module:
`typescript
import { OriginFormModule } from '@qbs-origin/origin-form';
@NgModule({
imports: [
OriginFormModule
]
})
export class AppModule { }
`
Use the OriginFormComponent in your template:
`html`
[configUuid]="uuid"
[currentLanguageIso]="'en'"
[showLanguageSelector]="true"
(event)="onFormEvent($event)">
The configComponent input accepts an InputConfig object:
`typescript
import { InputConfig } from '@qbs-origin/origin-form';
const config: InputConfig = {
Token: 'your-auth-token',
RefreshToken: 'your-refresh-token',
BaseUrlGateway: 'https://api.example.com/gateway',
BaseUrlAuthenticator: 'https://api.example.com/auth',
BaseUrlInfrastructure: 'https://api.example.com/infrastructure',
BaseUrlPublicInfrastructure: 'https://api.example.com/public',
BaseUrlDocuments: 'https://api.example.com/documents',
BaseUrlBusiness: 'https://api.example.com/business',
BaseUrlSmartAccounts: 'https://api.example.com/smart-accounts',
ClientId: 'your-client-id'
};
`
| Input | Type | Description |
|-------|------|-------------|
| configComponent | InputConfig | Configuration object with API URLs and authentication |configUuid
| | string | Unique identifier for the form configuration |currentStepId
| | string | Current step identifier (optional) |appModel
| | FormModel | Form model data (optional) |currentLanguageIso
| | string | Language ISO code (e.g., 'en', 'ro') |showLanguageSelector
| | boolean | Show/hide language selector (default: true) |showDisplayMode
| | boolean | Enable display mode (default: false) |isDemoMode
| | boolean | Enable demo mode (default: false) |fillData
| | any | Pre-fill form data (optional) |env
| | string | Environment type (optional) |
| Output | Type | Description |
|--------|------|-------------|
| event | EventEmitter | Emits form events (success, error, step changes, etc.) |
The library exports the following services that can be injected:
- ConfigService - Manage application configurationOriginFormAuthService
- - Handle authenticationApplicationDataService
- - Manage application dataFormsService
- - Form operationsLanguageService
- - Language managementDictionaryService
- - Dictionary/lookup dataTranslationService
- - TranslationsDialogService` - Dialog/modal management
-
Proprietary - Qoobiss