@qbs-origin/origin-form 0.6.0 → 0.6.1

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.
Files changed (2) hide show
  1. package/README.md +96 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,24 +1,107 @@
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
+ ```bash
8
+ npm install @qbs-origin/origin-form
9
+ ```
9
10
 
10
- ## Build
11
+ ## Peer Dependencies
11
12
 
12
- Run `ng build origin-form` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+ This library requires the following peer dependencies:
13
14
 
14
- ## Publishing
15
+ ```bash
16
+ 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 @qbs-origin/sign-lib ts-md5 uuid
17
+ ```
15
18
 
16
- After building your library with `ng build origin-form`, go to the dist folder `cd dist/origin-form` and run `npm publish`.
19
+ ## Usage
17
20
 
18
- ## Running unit tests
21
+ Import the `OriginFormModule` in your Angular module:
19
22
 
20
- Run `ng test origin-form` to execute the unit tests via [Karma](https://karma-runner.github.io).
23
+ ```typescript
24
+ import { OriginFormModule } from '@qbs-origin/origin-form';
21
25
 
22
- ## Further help
26
+ @NgModule({
27
+ imports: [
28
+ OriginFormModule
29
+ ]
30
+ })
31
+ export class AppModule { }
32
+ ```
23
33
 
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.
34
+ ## Component Usage
35
+
36
+ Use the `OriginFormComponent` in your template:
37
+
38
+ ```html
39
+ <app-origin-form
40
+ [configComponent]="config"
41
+ [configUuid]="uuid"
42
+ [currentLanguageIso]="'en'"
43
+ [showLanguageSelector]="true"
44
+ (event)="onFormEvent($event)">
45
+ </app-origin-form>
46
+ ```
47
+
48
+ ## Configuration
49
+
50
+ ### InputConfig Interface
51
+
52
+ The `configComponent` input accepts an `InputConfig` object:
53
+
54
+ ```typescript
55
+ import { InputConfig } from '@qbs-origin/origin-form';
56
+
57
+ const config: InputConfig = {
58
+ Token: 'your-auth-token',
59
+ RefreshToken: 'your-refresh-token',
60
+ BaseUrlGateway: 'https://api.example.com/gateway',
61
+ BaseUrlAuthenticator: 'https://api.example.com/auth',
62
+ BaseUrlInfrastructure: 'https://api.example.com/infrastructure',
63
+ BaseUrlPublicInfrastructure: 'https://api.example.com/public',
64
+ BaseUrlDocuments: 'https://api.example.com/documents',
65
+ BaseUrlBusiness: 'https://api.example.com/business',
66
+ BaseUrlSmartAccounts: 'https://api.example.com/smart-accounts',
67
+ ClientId: 'your-client-id'
68
+ };
69
+ ```
70
+
71
+ ### Component Inputs
72
+
73
+ | Input | Type | Description |
74
+ |-------|------|-------------|
75
+ | `configComponent` | `InputConfig` | Configuration object with API URLs and authentication |
76
+ | `configUuid` | `string` | Unique identifier for the form configuration |
77
+ | `currentStepId` | `string` | Current step identifier (optional) |
78
+ | `appModel` | `FormModel` | Form model data (optional) |
79
+ | `currentLanguageIso` | `string` | Language ISO code (e.g., 'en', 'ro') |
80
+ | `showLanguageSelector` | `boolean` | Show/hide language selector (default: true) |
81
+ | `showDisplayMode` | `boolean` | Enable display mode (default: false) |
82
+ | `isDemoMode` | `boolean` | Enable demo mode (default: false) |
83
+ | `fillData` | `any` | Pre-fill form data (optional) |
84
+ | `env` | `string` | Environment type (optional) |
85
+
86
+ ### Component Outputs
87
+
88
+ | Output | Type | Description |
89
+ |--------|------|-------------|
90
+ | `event` | `EventEmitter` | Emits form events (success, error, step changes, etc.) |
91
+
92
+ ## Exported Services
93
+
94
+ The library exports the following services that can be injected:
95
+
96
+ - `ConfigService` - Manage application configuration
97
+ - `OriginFormAuthService` - Handle authentication
98
+ - `ApplicationDataService` - Manage application data
99
+ - `FormsService` - Form operations
100
+ - `LanguageService` - Language management
101
+ - `DictionaryService` - Dictionary/lookup data
102
+ - `TranslationService` - Translations
103
+ - `DialogService` - Dialog/modal management
104
+
105
+ ## License
106
+
107
+ Proprietary - Qoobiss
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qbs-origin/origin-form",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^18.1.5",
6
6
  "@angular/common": "^18.2.13",