@dynamic-field-kit/angular 1.0.1 → 1.2.0
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 +118 -60
- package/dist/README.md +118 -60
- package/dist/components/BaseInput.d.ts +22 -0
- package/dist/components/DynamicInput.d.ts +28 -0
- package/dist/components/FieldInput.d.ts +14 -0
- package/dist/components/MultiFieldInput.d.ts +23 -0
- package/dist/esm2020/components/BaseInput.mjs +46 -0
- package/dist/esm2020/components/DynamicInput.mjs +146 -0
- package/dist/esm2020/components/FieldInput.mjs +66 -0
- package/dist/esm2020/components/MultiFieldInput.mjs +79 -0
- package/dist/esm2020/dynamic-field-kit-angular.mjs +5 -0
- package/dist/esm2020/layout/defaultLayouts.mjs +43 -0
- package/dist/esm2020/layout/index.mjs +2 -0
- package/dist/esm2020/lib/dynamic-field-kit.module.mjs +20 -0
- package/dist/esm2020/public-api.mjs +14 -0
- package/dist/esm2020/types/layout.mjs +2 -0
- package/dist/fesm2015/dynamic-field-kit-angular.mjs +393 -0
- package/dist/fesm2015/dynamic-field-kit-angular.mjs.map +1 -0
- package/dist/fesm2020/dynamic-field-kit-angular.mjs +390 -0
- package/dist/fesm2020/dynamic-field-kit-angular.mjs.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/layout/defaultLayouts.d.ts +13 -0
- package/dist/layout/index.d.ts +1 -0
- package/dist/lib/dynamic-field-kit.module.d.ts +11 -0
- package/dist/package.json +50 -0
- package/dist/public-api.d.ts +9 -0
- package/dist/types/layout.d.ts +1 -0
- package/package.json +9 -9
- package/dist/fesm2022/dynamic-field-kit-angular.mjs +0 -266
- package/dist/fesm2022/dynamic-field-kit-angular.mjs.map +0 -1
- package/dist/types/dynamic-field-kit-angular.d.ts +0 -70
package/README.md
CHANGED
|
@@ -1,65 +1,123 @@
|
|
|
1
|
-
# @dynamic-field-kit/angular
|
|
2
|
-
|
|
3
|
-
Lightweight Angular adapters for `@dynamic-field-kit/core`.
|
|
4
|
-
|
|
5
|
-
This package
|
|
6
|
-
|
|
7
|
-
Quick overview
|
|
8
|
-
- Exports
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
# @dynamic-field-kit/angular
|
|
2
|
+
|
|
3
|
+
Lightweight Angular adapters for `@dynamic-field-kit/core`.
|
|
4
|
+
|
|
5
|
+
This package exposes Angular components and a convenience NgModule that integrate with the shared `fieldRegistry` from `@dynamic-field-kit/core`.
|
|
6
|
+
|
|
7
|
+
Quick overview
|
|
8
|
+
- Exports `DynamicInput`, `FieldInput`, `MultiFieldInput`, layout components, and `DynamicFieldKitModule`.
|
|
9
|
+
- Uses the shared `fieldRegistry` from `@dynamic-field-kit/core` to resolve Angular field renderers at runtime.
|
|
10
|
+
- Can be consumed as a packaged library, or linked locally from `packages/angular/dist` during development.
|
|
11
|
+
- `MultiFieldInput` currently supports `column`, `row`, and `grid` layout values.
|
|
12
|
+
|
|
13
|
+
Usage (consumer Angular app)
|
|
14
|
+
|
|
15
|
+
1. Install the packages:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @dynamic-field-kit/core @dynamic-field-kit/angular
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
2. Import `DynamicFieldKitModule` in your Angular module:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { DynamicFieldKitModule } from '@dynamic-field-kit/angular'
|
|
24
25
|
|
|
25
26
|
@NgModule({
|
|
26
27
|
imports: [BrowserModule, DynamicFieldKitModule],
|
|
27
28
|
})
|
|
28
|
-
export class AppModule {}
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
3. Register Angular
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
// src/main.ts
|
|
35
|
-
import '
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
29
|
+
export class AppModule {}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. Register your Angular field components in the shared registry before bootstrap:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
// src/main.ts
|
|
36
|
+
import 'zone.js'
|
|
37
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
|
|
38
|
+
import { fieldRegistry } from '@dynamic-field-kit/angular'
|
|
39
|
+
import { AppModule } from './app/app.module'
|
|
40
|
+
import { TextFieldComponent } from './app/components/text-field.component'
|
|
41
|
+
import { NumberFieldComponent } from './app/components/number-field.component'
|
|
42
|
+
|
|
43
|
+
fieldRegistry.register('text', TextFieldComponent as any)
|
|
44
|
+
fieldRegistry.register('number', NumberFieldComponent as any)
|
|
45
|
+
|
|
46
|
+
platformBrowserDynamic()
|
|
47
|
+
.bootstrapModule(AppModule)
|
|
48
|
+
.catch((err) => console.error(err))
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
4. Render fields in a template:
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<dfk-multi-field-input
|
|
55
|
+
[fieldDescriptions]="fields"
|
|
56
|
+
[properties]="data"
|
|
57
|
+
(onChange)="onChange($event)"
|
|
58
|
+
></dfk-multi-field-input>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
5. Example component state:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import { Component } from '@angular/core'
|
|
65
|
+
import { FieldDescription } from '@dynamic-field-kit/core'
|
|
66
|
+
|
|
67
|
+
@Component({
|
|
68
|
+
selector: 'app-root',
|
|
69
|
+
templateUrl: './app.component.html',
|
|
70
|
+
})
|
|
71
|
+
export class AppComponent {
|
|
72
|
+
fields: FieldDescription[] = [
|
|
73
|
+
{ name: 'name', type: 'text', label: 'Name' },
|
|
74
|
+
{ name: 'age', type: 'number', label: 'Age' },
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
data: any = {}
|
|
78
|
+
|
|
79
|
+
onChange(data: any) {
|
|
80
|
+
this.data = data
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Local development
|
|
86
|
+
- During local development, point your Angular app at the built package output instead of importing from `src/`:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"@dynamic-field-kit/core": "file:../../packages/core",
|
|
92
|
+
"@dynamic-field-kit/angular": "file:../../packages/angular/dist"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- When using a local `file:` dependency on Windows or via symlinked installs, set `preserveSymlinks: true` in the Angular builder options to avoid runtime issues with linked packages.
|
|
98
|
+
|
|
99
|
+
Build & publish
|
|
100
|
+
- Build locally with `ng-packagr`:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
cd packages/angular
|
|
104
|
+
npm run build
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
- Publish to npm:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
cd packages/angular
|
|
111
|
+
npm publish --access public
|
|
50
112
|
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
Examples & docs
|
|
64
|
-
- See `example/angular-instructions.md` for detailed wiring steps.
|
|
65
|
-
- Try the local scaffold at `example/angular-app/` for a hands-on demo.
|
|
113
|
+
|
|
114
|
+
Notes & caveats
|
|
115
|
+
- Register Angular component classes in `fieldRegistry`. Do not register React or Vue renderers when using the Angular adapter.
|
|
116
|
+
- `DynamicFieldKitModule` is the recommended integration path for consumer apps.
|
|
117
|
+
- Standalone exports are still available for advanced composition, but most apps should start with the module.
|
|
118
|
+
- Text fields default to an empty string when no value is present, so empty controls render as blank instead of `undefined`.
|
|
119
|
+
- Supported `layout` values are `column`, `row`, and `grid`.
|
|
120
|
+
|
|
121
|
+
Examples & docs
|
|
122
|
+
- See `example/angular-instructions.md` for detailed wiring steps.
|
|
123
|
+
- Try the local scaffold at `example/angular-app/` for a hands-on demo.
|
package/dist/README.md
CHANGED
|
@@ -1,65 +1,123 @@
|
|
|
1
|
-
# @dynamic-field-kit/angular
|
|
2
|
-
|
|
3
|
-
Lightweight Angular adapters for `@dynamic-field-kit/core`.
|
|
4
|
-
|
|
5
|
-
This package
|
|
6
|
-
|
|
7
|
-
Quick overview
|
|
8
|
-
- Exports
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
# @dynamic-field-kit/angular
|
|
2
|
+
|
|
3
|
+
Lightweight Angular adapters for `@dynamic-field-kit/core`.
|
|
4
|
+
|
|
5
|
+
This package exposes Angular components and a convenience NgModule that integrate with the shared `fieldRegistry` from `@dynamic-field-kit/core`.
|
|
6
|
+
|
|
7
|
+
Quick overview
|
|
8
|
+
- Exports `DynamicInput`, `FieldInput`, `MultiFieldInput`, layout components, and `DynamicFieldKitModule`.
|
|
9
|
+
- Uses the shared `fieldRegistry` from `@dynamic-field-kit/core` to resolve Angular field renderers at runtime.
|
|
10
|
+
- Can be consumed as a packaged library, or linked locally from `packages/angular/dist` during development.
|
|
11
|
+
- `MultiFieldInput` currently supports `column`, `row`, and `grid` layout values.
|
|
12
|
+
|
|
13
|
+
Usage (consumer Angular app)
|
|
14
|
+
|
|
15
|
+
1. Install the packages:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @dynamic-field-kit/core @dynamic-field-kit/angular
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
2. Import `DynamicFieldKitModule` in your Angular module:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { DynamicFieldKitModule } from '@dynamic-field-kit/angular'
|
|
24
25
|
|
|
25
26
|
@NgModule({
|
|
26
27
|
imports: [BrowserModule, DynamicFieldKitModule],
|
|
27
28
|
})
|
|
28
|
-
export class AppModule {}
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
3. Register Angular
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
// src/main.ts
|
|
35
|
-
import '
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
29
|
+
export class AppModule {}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. Register your Angular field components in the shared registry before bootstrap:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
// src/main.ts
|
|
36
|
+
import 'zone.js'
|
|
37
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
|
|
38
|
+
import { fieldRegistry } from '@dynamic-field-kit/angular'
|
|
39
|
+
import { AppModule } from './app/app.module'
|
|
40
|
+
import { TextFieldComponent } from './app/components/text-field.component'
|
|
41
|
+
import { NumberFieldComponent } from './app/components/number-field.component'
|
|
42
|
+
|
|
43
|
+
fieldRegistry.register('text', TextFieldComponent as any)
|
|
44
|
+
fieldRegistry.register('number', NumberFieldComponent as any)
|
|
45
|
+
|
|
46
|
+
platformBrowserDynamic()
|
|
47
|
+
.bootstrapModule(AppModule)
|
|
48
|
+
.catch((err) => console.error(err))
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
4. Render fields in a template:
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<dfk-multi-field-input
|
|
55
|
+
[fieldDescriptions]="fields"
|
|
56
|
+
[properties]="data"
|
|
57
|
+
(onChange)="onChange($event)"
|
|
58
|
+
></dfk-multi-field-input>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
5. Example component state:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import { Component } from '@angular/core'
|
|
65
|
+
import { FieldDescription } from '@dynamic-field-kit/core'
|
|
66
|
+
|
|
67
|
+
@Component({
|
|
68
|
+
selector: 'app-root',
|
|
69
|
+
templateUrl: './app.component.html',
|
|
70
|
+
})
|
|
71
|
+
export class AppComponent {
|
|
72
|
+
fields: FieldDescription[] = [
|
|
73
|
+
{ name: 'name', type: 'text', label: 'Name' },
|
|
74
|
+
{ name: 'age', type: 'number', label: 'Age' },
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
data: any = {}
|
|
78
|
+
|
|
79
|
+
onChange(data: any) {
|
|
80
|
+
this.data = data
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Local development
|
|
86
|
+
- During local development, point your Angular app at the built package output instead of importing from `src/`:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"@dynamic-field-kit/core": "file:../../packages/core",
|
|
92
|
+
"@dynamic-field-kit/angular": "file:../../packages/angular/dist"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- When using a local `file:` dependency on Windows or via symlinked installs, set `preserveSymlinks: true` in the Angular builder options to avoid runtime issues with linked packages.
|
|
98
|
+
|
|
99
|
+
Build & publish
|
|
100
|
+
- Build locally with `ng-packagr`:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
cd packages/angular
|
|
104
|
+
npm run build
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
- Publish to npm:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
cd packages/angular
|
|
111
|
+
npm publish --access public
|
|
50
112
|
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
Examples & docs
|
|
64
|
-
- See `example/angular-instructions.md` for detailed wiring steps.
|
|
65
|
-
- Try the local scaffold at `example/angular-app/` for a hands-on demo.
|
|
113
|
+
|
|
114
|
+
Notes & caveats
|
|
115
|
+
- Register Angular component classes in `fieldRegistry`. Do not register React or Vue renderers when using the Angular adapter.
|
|
116
|
+
- `DynamicFieldKitModule` is the recommended integration path for consumer apps.
|
|
117
|
+
- Standalone exports are still available for advanced composition, but most apps should start with the module.
|
|
118
|
+
- Text fields default to an empty string when no value is present, so empty controls render as blank instead of `undefined`.
|
|
119
|
+
- Supported `layout` values are `column`, `row`, and `grid`.
|
|
120
|
+
|
|
121
|
+
Examples & docs
|
|
122
|
+
- See `example/angular-instructions.md` for detailed wiring steps.
|
|
123
|
+
- Try the local scaffold at `example/angular-app/` for a hands-on demo.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EventEmitter, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare abstract class BaseInputComponent {
|
|
4
|
+
protected cdr: ChangeDetectorRef;
|
|
5
|
+
value?: any;
|
|
6
|
+
label?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
options?: any[];
|
|
11
|
+
className?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
errorMessage?: string;
|
|
14
|
+
acceptFile?: string;
|
|
15
|
+
maxLength?: number;
|
|
16
|
+
minNumber?: number;
|
|
17
|
+
maxNumber?: number;
|
|
18
|
+
valueChange: EventEmitter<any>;
|
|
19
|
+
constructor(cdr: ChangeDetectorRef);
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseInputComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseInputComponent, "ng-component", never, { "value": "value"; "label": "label"; "placeholder": "placeholder"; "required": "required"; "disabled": "disabled"; "options": "options"; "className": "className"; "description": "description"; "errorMessage": "errorMessage"; "acceptFile": "acceptFile"; "maxLength": "maxLength"; "minNumber": "minNumber"; "maxNumber": "maxNumber"; }, { "valueChange": "valueChange"; }, never, never, false, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EventEmitter, ViewContainerRef, OnChanges, AfterViewInit, SimpleChanges } from "@angular/core";
|
|
2
|
+
import { FieldTypeKey } from "@dynamic-field-kit/core";
|
|
3
|
+
import { BaseInputComponent } from "./BaseInput";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DynamicInput extends BaseInputComponent implements OnChanges, AfterViewInit {
|
|
6
|
+
type: FieldTypeKey;
|
|
7
|
+
value?: any;
|
|
8
|
+
label?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
options?: any[];
|
|
12
|
+
className?: string;
|
|
13
|
+
description?: any;
|
|
14
|
+
valueChange: EventEmitter<any>;
|
|
15
|
+
onChange: EventEmitter<any>;
|
|
16
|
+
host: ViewContainerRef;
|
|
17
|
+
private compRef?;
|
|
18
|
+
private inputInstance?;
|
|
19
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
20
|
+
ngAfterViewInit(): void;
|
|
21
|
+
private render;
|
|
22
|
+
private applyKnownProps;
|
|
23
|
+
private bindOutput;
|
|
24
|
+
private emitValue;
|
|
25
|
+
private cleanupRenderedComponent;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicInput, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicInput, "dfk-dynamic-input", never, { "type": "type"; "value": "value"; "label": "label"; "placeholder": "placeholder"; "required": "required"; "options": "options"; "className": "className"; "description": "description"; }, { "valueChange": "valueChange"; "onChange": "onChange"; }, never, never, true, never>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import { FieldDescription, Properties } from "@dynamic-field-kit/core";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FieldInput {
|
|
5
|
+
fieldDescription?: FieldDescription;
|
|
6
|
+
renderInfos?: Properties;
|
|
7
|
+
onValueChangeField: EventEmitter<{
|
|
8
|
+
value: any;
|
|
9
|
+
key: string;
|
|
10
|
+
}>;
|
|
11
|
+
getFieldValue(): any;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldInput, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldInput, "dfk-field-input", never, { "fieldDescription": "fieldDescription"; "renderInfos": "renderInfos"; }, { "onValueChangeField": "onValueChangeField"; }, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from "@angular/core";
|
|
2
|
+
import { FieldDescription, Properties } from "@dynamic-field-kit/core";
|
|
3
|
+
import { LayoutConfig } from "../types/layout";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class MultiFieldInput implements OnInit, OnChanges {
|
|
6
|
+
fieldDescriptions: FieldDescription[];
|
|
7
|
+
properties?: Properties;
|
|
8
|
+
onChange: EventEmitter<Properties>;
|
|
9
|
+
layout: LayoutConfig;
|
|
10
|
+
data: Properties;
|
|
11
|
+
visibleFields: FieldDescription[];
|
|
12
|
+
trackByFn(index: number, field: FieldDescription): string | number;
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
ngOnChanges(_changes: SimpleChanges): void;
|
|
15
|
+
private init;
|
|
16
|
+
private updateVisibleFields;
|
|
17
|
+
onFieldChange(event: {
|
|
18
|
+
value: any;
|
|
19
|
+
key: string;
|
|
20
|
+
}): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MultiFieldInput, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MultiFieldInput, "dfk-multi-field-input", never, { "fieldDescriptions": "fieldDescriptions"; "properties": "properties"; "layout": "layout"; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class BaseInputComponent {
|
|
4
|
+
constructor(cdr) {
|
|
5
|
+
this.cdr = cdr;
|
|
6
|
+
// Add more from mplis as needed
|
|
7
|
+
this.valueChange = new EventEmitter();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
BaseInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BaseInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
+
BaseInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: BaseInputComponent, selector: "ng-component", inputs: { value: "value", label: "label", placeholder: "placeholder", required: "required", disabled: "disabled", options: "options", className: "className", description: "description", errorMessage: "errorMessage", acceptFile: "acceptFile", maxLength: "maxLength", minNumber: "minNumber", maxNumber: "maxNumber" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: '', isInline: true });
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BaseInputComponent, decorators: [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{
|
|
15
|
+
template: ''
|
|
16
|
+
}]
|
|
17
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { value: [{
|
|
18
|
+
type: Input
|
|
19
|
+
}], label: [{
|
|
20
|
+
type: Input
|
|
21
|
+
}], placeholder: [{
|
|
22
|
+
type: Input
|
|
23
|
+
}], required: [{
|
|
24
|
+
type: Input
|
|
25
|
+
}], disabled: [{
|
|
26
|
+
type: Input
|
|
27
|
+
}], options: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}], className: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], description: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}], errorMessage: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}], acceptFile: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}], maxLength: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], minNumber: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], maxNumber: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], valueChange: [{
|
|
44
|
+
type: Output
|
|
45
|
+
}] } });
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQmFzZUlucHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQmFzZUlucHV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxZQUFZLEVBQXFCLE1BQU0sZUFBZSxDQUFDOztBQU0xRixNQUFNLE9BQWdCLGtCQUFrQjtJQWtCdEMsWUFBc0IsR0FBc0I7UUFBdEIsUUFBRyxHQUFILEdBQUcsQ0FBbUI7UUFKNUMsZ0NBQWdDO1FBRXRCLGdCQUFXLEdBQUcsSUFBSSxZQUFZLEVBQU8sQ0FBQztJQUVELENBQUM7O2dIQWxCNUIsa0JBQWtCO29HQUFsQixrQkFBa0IseVpBRjVCLEVBQUU7NEZBRVEsa0JBQWt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