@qbs-origin/origin-form
v0.6.4
Published
Angular library for dynamic form generation with formly integration.
Readme
@qbs-origin/origin-form
Angular library for dynamic form generation with formly integration.
Installation
Using Angular CLI (Recommended)
ng add @qbs-origin/origin-formThis will automatically install the package and all required peer dependencies.
Using npm
npm install @qbs-origin/origin-formDependencies
The following packages are installed automatically with this library:
@qbs-origin/sign-lib- Digital signature functionality@ekyc_qoobiss/qbs-ect-cmp- eKYC components
Peer Dependencies
This library requires the following peer dependencies (you need to install them in your project):
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 uuidUsage
Import the OriginFormModule in your Angular module:
import { OriginFormModule } from '@qbs-origin/origin-form';
@NgModule({
imports: [
OriginFormModule
]
})
export class AppModule { }Component Usage
Use the OriginFormComponent in your template:
<app-origin-form
[configComponent]="config"
[configUuid]="uuid"
[currentLanguageIso]="'en'"
[showLanguageSelector]="true"
(event)="onFormEvent($event)">
</app-origin-form>Configuration
InputConfig Interface
The configComponent input accepts an InputConfig object:
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'
};Component Inputs
| 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) |
Component Outputs
| Output | Type | Description |
|--------|------|-------------|
| event | EventEmitter | Emits form events (success, error, step changes, etc.) |
Exported Services
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
License
Proprietary - Qoobiss
