@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.
- package/README.md +96 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,107 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @qbs-origin/origin-form
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Angular library for dynamic form generation with formly integration.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install @qbs-origin/origin-form
|
|
9
|
+
```
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Peer Dependencies
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
This library requires the following peer dependencies:
|
|
13
14
|
|
|
14
|
-
|
|
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
|
-
|
|
19
|
+
## Usage
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
Import the `OriginFormModule` in your Angular module:
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
```typescript
|
|
24
|
+
import { OriginFormModule } from '@qbs-origin/origin-form';
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
@NgModule({
|
|
27
|
+
imports: [
|
|
28
|
+
OriginFormModule
|
|
29
|
+
]
|
|
30
|
+
})
|
|
31
|
+
export class AppModule { }
|
|
32
|
+
```
|
|
23
33
|
|
|
24
|
-
|
|
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
|