@qbs-origin/origin-form 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,24 +1,123 @@
1
- # OriginForm
1
+ # @qbs-origin/origin-form
2
2
 
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.
3
+ Angular library for dynamic form generation with formly integration.
4
4
 
5
- ## Code scaffolding
5
+ ## Installation
6
6
 
7
- Run `ng generate component component-name --project origin-form` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project origin-form`.
8
- > Note: Don't forget to add `--project origin-form` or else it will be added to the default project in your `angular.json` file.
7
+ ### Using Angular CLI (Recommended)
9
8
 
10
- ## Build
9
+ ```bash
10
+ ng add @qbs-origin/origin-form
11
+ ```
11
12
 
12
- Run `ng build origin-form` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+ This will automatically install the package and all required peer dependencies.
13
14
 
14
- ## Publishing
15
+ ### Using npm
15
16
 
16
- After building your library with `ng build origin-form`, go to the dist folder `cd dist/origin-form` and run `npm publish`.
17
+ ```bash
18
+ npm install @qbs-origin/origin-form
19
+ ```
17
20
 
18
- ## Running unit tests
21
+ ## Dependencies
19
22
 
20
- Run `ng test origin-form` to execute the unit tests via [Karma](https://karma-runner.github.io).
23
+ The following packages are installed automatically with this library:
24
+ - `@qbs-origin/sign-lib` - Digital signature functionality
25
+ - `@ekyc_qoobiss/qbs-ect-cmp` - eKYC components
21
26
 
22
- ## Further help
27
+ ## Peer Dependencies
23
28
 
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
29
+ This library requires the following peer dependencies (you need to install them in your project):
30
+
31
+ ```bash
32
+ 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
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ Import the `OriginFormModule` in your Angular module:
38
+
39
+ ```typescript
40
+ import { OriginFormModule } from '@qbs-origin/origin-form';
41
+
42
+ @NgModule({
43
+ imports: [
44
+ OriginFormModule
45
+ ]
46
+ })
47
+ export class AppModule { }
48
+ ```
49
+
50
+ ## Component Usage
51
+
52
+ Use the `OriginFormComponent` in your template:
53
+
54
+ ```html
55
+ <app-origin-form
56
+ [configComponent]="config"
57
+ [configUuid]="uuid"
58
+ [currentLanguageIso]="'en'"
59
+ [showLanguageSelector]="true"
60
+ (event)="onFormEvent($event)">
61
+ </app-origin-form>
62
+ ```
63
+
64
+ ## Configuration
65
+
66
+ ### InputConfig Interface
67
+
68
+ The `configComponent` input accepts an `InputConfig` object:
69
+
70
+ ```typescript
71
+ import { InputConfig } from '@qbs-origin/origin-form';
72
+
73
+ const config: InputConfig = {
74
+ Token: 'your-auth-token',
75
+ RefreshToken: 'your-refresh-token',
76
+ BaseUrlGateway: 'https://api.example.com/gateway',
77
+ BaseUrlAuthenticator: 'https://api.example.com/auth',
78
+ BaseUrlInfrastructure: 'https://api.example.com/infrastructure',
79
+ BaseUrlPublicInfrastructure: 'https://api.example.com/public',
80
+ BaseUrlDocuments: 'https://api.example.com/documents',
81
+ BaseUrlBusiness: 'https://api.example.com/business',
82
+ BaseUrlSmartAccounts: 'https://api.example.com/smart-accounts',
83
+ ClientId: 'your-client-id'
84
+ };
85
+ ```
86
+
87
+ ### Component Inputs
88
+
89
+ | Input | Type | Description |
90
+ |-------|------|-------------|
91
+ | `configComponent` | `InputConfig` | Configuration object with API URLs and authentication |
92
+ | `configUuid` | `string` | Unique identifier for the form configuration |
93
+ | `currentStepId` | `string` | Current step identifier (optional) |
94
+ | `appModel` | `FormModel` | Form model data (optional) |
95
+ | `currentLanguageIso` | `string` | Language ISO code (e.g., 'en', 'ro') |
96
+ | `showLanguageSelector` | `boolean` | Show/hide language selector (default: true) |
97
+ | `showDisplayMode` | `boolean` | Enable display mode (default: false) |
98
+ | `isDemoMode` | `boolean` | Enable demo mode (default: false) |
99
+ | `fillData` | `any` | Pre-fill form data (optional) |
100
+ | `env` | `string` | Environment type (optional) |
101
+
102
+ ### Component Outputs
103
+
104
+ | Output | Type | Description |
105
+ |--------|------|-------------|
106
+ | `event` | `EventEmitter` | Emits form events (success, error, step changes, etc.) |
107
+
108
+ ## Exported Services
109
+
110
+ The library exports the following services that can be injected:
111
+
112
+ - `ConfigService` - Manage application configuration
113
+ - `OriginFormAuthService` - Handle authentication
114
+ - `ApplicationDataService` - Manage application data
115
+ - `FormsService` - Form operations
116
+ - `LanguageService` - Language management
117
+ - `DictionaryService` - Dictionary/lookup data
118
+ - `TranslationService` - Translations
119
+ - `DialogService` - Dialog/modal management
120
+
121
+ ## License
122
+
123
+ Proprietary - Qoobiss
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "@qbs-origin/origin-form",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
+ "dependencies": {
5
+ "@qbs-origin/sign-lib": "^2.1.22",
6
+ "@ekyc_qoobiss/qbs-ect-cmp": "^4.7.4",
7
+ "tslib": "^2.8.1"
8
+ },
4
9
  "peerDependencies": {
5
10
  "@angular/cdk": "^18.1.5",
6
11
  "@angular/common": "^18.2.13",
@@ -17,7 +22,6 @@
17
22
  "ng2-pdf-viewer": "^10.4.0",
18
23
  "ngx-markdown": "^18.1.0",
19
24
  "ngx-scrollbar": "^14.0.0",
20
- "@qbs-origin/sign-lib": "^2.1.22",
21
25
  "ts-md5": "^1.3.1",
22
26
  "uuid": "^11.1.0"
23
27
  },
@@ -35,8 +39,5 @@
35
39
  "esm": "./esm2022/qbs-origin-origin-form.mjs",
36
40
  "default": "./fesm2022/qbs-origin-origin-form.mjs"
37
41
  }
38
- },
39
- "dependencies": {
40
- "tslib": "^2.8.1"
41
42
  }
42
43
  }
@@ -17,6 +17,7 @@ function readHostPackageJson(tree) {
17
17
  function ngAdd() {
18
18
  return (tree, context) => {
19
19
  context.logger.info('Adding peer dependencies for origin-form...');
20
+ // Note: @qbs-origin/sign-lib and @ekyc_qoobiss/qbs-ect-cmp are installed automatically as dependencies
20
21
  const peerDependencies = [
21
22
  { type: dependencies_1.NodeDependencyType.Default, name: '@angular/cdk', version: '^18.1.5' },
22
23
  { type: dependencies_1.NodeDependencyType.Default, name: '@angular/common', version: '^18.2.13' },
@@ -33,7 +34,6 @@ function ngAdd() {
33
34
  { type: dependencies_1.NodeDependencyType.Default, name: 'ng2-pdf-viewer', version: '^10.4.0' },
34
35
  { type: dependencies_1.NodeDependencyType.Default, name: 'ngx-markdown', version: '^18.1.0' },
35
36
  { type: dependencies_1.NodeDependencyType.Default, name: 'ngx-scrollbar', version: '^14.0.0' },
36
- { type: dependencies_1.NodeDependencyType.Default, name: 'sign-lib', version: '^2.1.19' },
37
37
  { type: dependencies_1.NodeDependencyType.Default, name: 'ts-md5', version: '^1.3.1' },
38
38
  { type: dependencies_1.NodeDependencyType.Default, name: 'tslib', version: '^2.8.1' },
39
39
  { type: dependencies_1.NodeDependencyType.Default, name: 'uuid', version: '^11.1.0' },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/origin-form/schematics/ng-add/index.ts"],"names":[],"mappings":";;;AACA,4DAA0E;AAC1E,2EAIkD;AAElD,SAAS,mBAAmB,CAAC,IAAU;IACrC,MAAM,WAAW,GAAG,eAAe,CAAC;IACpC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,oHAAoH,CAAC,CAAC;IACxI,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM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