@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
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output, SimpleChange, ViewContainerRef, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule, NgIf, NgClass, NgFor } from '@angular/common';
|
|
4
|
+
import { fieldRegistry } from '@dynamic-field-kit/core';
|
|
5
|
+
export { fieldRegistry } from '@dynamic-field-kit/core';
|
|
6
|
+
|
|
7
|
+
class BaseInputComponent {
|
|
8
|
+
constructor(cdr) {
|
|
9
|
+
this.cdr = cdr;
|
|
10
|
+
// Add more from mplis as needed
|
|
11
|
+
this.valueChange = new EventEmitter();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
BaseInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BaseInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
+
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 });
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BaseInputComponent, decorators: [{
|
|
17
|
+
type: Component,
|
|
18
|
+
args: [{
|
|
19
|
+
template: ''
|
|
20
|
+
}]
|
|
21
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { value: [{
|
|
22
|
+
type: Input
|
|
23
|
+
}], label: [{
|
|
24
|
+
type: Input
|
|
25
|
+
}], placeholder: [{
|
|
26
|
+
type: Input
|
|
27
|
+
}], required: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}], disabled: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], options: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}], className: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}], description: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}], errorMessage: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], acceptFile: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], maxLength: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], minNumber: [{
|
|
44
|
+
type: Input
|
|
45
|
+
}], maxNumber: [{
|
|
46
|
+
type: Input
|
|
47
|
+
}], valueChange: [{
|
|
48
|
+
type: Output
|
|
49
|
+
}] } });
|
|
50
|
+
|
|
51
|
+
class DynamicInput extends BaseInputComponent {
|
|
52
|
+
constructor() {
|
|
53
|
+
super(...arguments);
|
|
54
|
+
this.valueChange = new EventEmitter();
|
|
55
|
+
this.onChange = new EventEmitter(); // backward compat
|
|
56
|
+
}
|
|
57
|
+
ngOnChanges(changes) {
|
|
58
|
+
if (changes["type"] && !changes["type"].firstChange && this.host) {
|
|
59
|
+
this.render();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (this.inputInstance) {
|
|
63
|
+
this.applyKnownProps(this.inputInstance);
|
|
64
|
+
const childChanges = {};
|
|
65
|
+
for (const prop in changes) {
|
|
66
|
+
childChanges[prop] = new SimpleChange(changes[prop].previousValue, changes[prop].currentValue, changes[prop].firstChange);
|
|
67
|
+
}
|
|
68
|
+
this.inputInstance.ngOnChanges?.(childChanges);
|
|
69
|
+
this.compRef?.changeDetectorRef.detectChanges();
|
|
70
|
+
}
|
|
71
|
+
else if (this.host) {
|
|
72
|
+
this.render();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
ngAfterViewInit() {
|
|
76
|
+
this.render();
|
|
77
|
+
}
|
|
78
|
+
render() {
|
|
79
|
+
const Renderer = fieldRegistry.get(this.type);
|
|
80
|
+
this.cleanupRenderedComponent();
|
|
81
|
+
this.host.clear();
|
|
82
|
+
if (!Renderer) {
|
|
83
|
+
const el = document.createElement("div");
|
|
84
|
+
el.textContent = `Unknown field type: ${this.type}`;
|
|
85
|
+
this.host.element.nativeElement.appendChild(el);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
const compType = Renderer;
|
|
90
|
+
const compRef = this.host.createComponent(compType);
|
|
91
|
+
const instance = compRef.instance;
|
|
92
|
+
if (!instance)
|
|
93
|
+
throw new Error(`Failed to create instance for ${this.type}`);
|
|
94
|
+
this.applyKnownProps(instance);
|
|
95
|
+
this.bindOutput(instance, "valueChange");
|
|
96
|
+
this.bindOutput(instance, "onValueChange");
|
|
97
|
+
instance.changeDetectorRef?.detectChanges();
|
|
98
|
+
this.compRef = compRef;
|
|
99
|
+
this.inputInstance = instance;
|
|
100
|
+
compRef.changeDetectorRef.detectChanges();
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
// Fallback to function renderer
|
|
104
|
+
try {
|
|
105
|
+
const props = {
|
|
106
|
+
value: this.value,
|
|
107
|
+
onValueChange: (v) => this.emitValue(v),
|
|
108
|
+
label: this.label,
|
|
109
|
+
placeholder: this.placeholder,
|
|
110
|
+
required: this.required,
|
|
111
|
+
options: this.options,
|
|
112
|
+
className: this.className,
|
|
113
|
+
description: this.description,
|
|
114
|
+
disabled: this.disabled,
|
|
115
|
+
errorMessage: this.errorMessage,
|
|
116
|
+
};
|
|
117
|
+
const out = Renderer(props);
|
|
118
|
+
if (typeof out === 'string') {
|
|
119
|
+
const el = document.createElement('div');
|
|
120
|
+
el.innerHTML = out;
|
|
121
|
+
this.host.element.nativeElement.appendChild(el);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
catch (e) {
|
|
125
|
+
const el = document.createElement('div');
|
|
126
|
+
el.textContent = `Failed to render field: ${this.type}`;
|
|
127
|
+
this.host.element.nativeElement.appendChild(el);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
applyKnownProps(instance) {
|
|
132
|
+
const knownProps = ["value", "label", "placeholder", "required", "disabled", "options", "className", "description", "errorMessage"];
|
|
133
|
+
for (const prop of knownProps) {
|
|
134
|
+
if (prop in this && prop in instance) {
|
|
135
|
+
instance[prop] = this[prop];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
bindOutput(instance, outputName) {
|
|
140
|
+
const output = instance?.[outputName];
|
|
141
|
+
if (!output || typeof output.subscribe !== "function")
|
|
142
|
+
return;
|
|
143
|
+
output.subscribe((value) => {
|
|
144
|
+
this.emitValue(value);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
emitValue(value) {
|
|
148
|
+
this.valueChange.emit(value);
|
|
149
|
+
this.onChange.emit(value);
|
|
150
|
+
}
|
|
151
|
+
cleanupRenderedComponent() {
|
|
152
|
+
this.compRef?.destroy();
|
|
153
|
+
this.compRef = undefined;
|
|
154
|
+
this.inputInstance = undefined;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
DynamicInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DynamicInput, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
158
|
+
DynamicInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DynamicInput, isStandalone: true, selector: "dfk-dynamic-input", inputs: { type: "type", value: "value", label: "label", placeholder: "placeholder", required: "required", options: "options", className: "className", description: "description" }, outputs: { valueChange: "valueChange", onChange: "onChange" }, viewQueries: [{ propertyName: "host", first: true, predicate: ["host"], descendants: true, read: ViewContainerRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `<div #host style="display: contents;"></div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DynamicInput, decorators: [{
|
|
160
|
+
type: Component,
|
|
161
|
+
args: [{
|
|
162
|
+
selector: "dfk-dynamic-input",
|
|
163
|
+
standalone: true,
|
|
164
|
+
imports: [CommonModule],
|
|
165
|
+
template: `<div #host style="display: contents;"></div>`,
|
|
166
|
+
}]
|
|
167
|
+
}], propDecorators: { type: [{
|
|
168
|
+
type: Input
|
|
169
|
+
}], value: [{
|
|
170
|
+
type: Input
|
|
171
|
+
}], label: [{
|
|
172
|
+
type: Input
|
|
173
|
+
}], placeholder: [{
|
|
174
|
+
type: Input
|
|
175
|
+
}], required: [{
|
|
176
|
+
type: Input
|
|
177
|
+
}], options: [{
|
|
178
|
+
type: Input
|
|
179
|
+
}], className: [{
|
|
180
|
+
type: Input
|
|
181
|
+
}], description: [{
|
|
182
|
+
type: Input
|
|
183
|
+
}], valueChange: [{
|
|
184
|
+
type: Output
|
|
185
|
+
}], onChange: [{
|
|
186
|
+
type: Output
|
|
187
|
+
}], host: [{
|
|
188
|
+
type: ViewChild,
|
|
189
|
+
args: ["host", { read: ViewContainerRef, static: false }]
|
|
190
|
+
}] } });
|
|
191
|
+
|
|
192
|
+
class FieldInput {
|
|
193
|
+
constructor() {
|
|
194
|
+
this.onValueChangeField = new EventEmitter();
|
|
195
|
+
}
|
|
196
|
+
getFieldValue() {
|
|
197
|
+
if (!this.fieldDescription || !this.renderInfos)
|
|
198
|
+
return undefined;
|
|
199
|
+
const value = this.renderInfos[this.fieldDescription.name];
|
|
200
|
+
if (value === undefined && this.fieldDescription.type === "text") {
|
|
201
|
+
return "";
|
|
202
|
+
}
|
|
203
|
+
return value;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
FieldInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FieldInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
207
|
+
FieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FieldInput, isStandalone: true, selector: "dfk-field-input", inputs: { fieldDescription: "fieldDescription", renderInfos: "renderInfos" }, outputs: { onValueChangeField: "onValueChangeField" }, ngImport: i0, template: `
|
|
208
|
+
<dfk-dynamic-input
|
|
209
|
+
*ngIf="fieldDescription && renderInfos"
|
|
210
|
+
[type]="fieldDescription!.type"
|
|
211
|
+
[value]="getFieldValue()"
|
|
212
|
+
[label]="fieldDescription!.label"
|
|
213
|
+
[placeholder]="fieldDescription!.placeholder"
|
|
214
|
+
[required]="fieldDescription!.required"
|
|
215
|
+
[description]="fieldDescription!.description"
|
|
216
|
+
[options]="fieldDescription!.options"
|
|
217
|
+
[className]="fieldDescription!.className"
|
|
218
|
+
(valueChange)="onValueChangeField.emit({ value: $event, key: fieldDescription!.name })"
|
|
219
|
+
[disabled]="false"
|
|
220
|
+
[errorMessage]="''"
|
|
221
|
+
></dfk-dynamic-input>
|
|
222
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DynamicInput, selector: "dfk-dynamic-input", inputs: ["type", "value", "label", "placeholder", "required", "options", "className", "description"], outputs: ["valueChange", "onChange"] }] });
|
|
223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FieldInput, decorators: [{
|
|
224
|
+
type: Component,
|
|
225
|
+
args: [{
|
|
226
|
+
selector: "dfk-field-input",
|
|
227
|
+
standalone: true,
|
|
228
|
+
imports: [NgIf, DynamicInput],
|
|
229
|
+
template: `
|
|
230
|
+
<dfk-dynamic-input
|
|
231
|
+
*ngIf="fieldDescription && renderInfos"
|
|
232
|
+
[type]="fieldDescription!.type"
|
|
233
|
+
[value]="getFieldValue()"
|
|
234
|
+
[label]="fieldDescription!.label"
|
|
235
|
+
[placeholder]="fieldDescription!.placeholder"
|
|
236
|
+
[required]="fieldDescription!.required"
|
|
237
|
+
[description]="fieldDescription!.description"
|
|
238
|
+
[options]="fieldDescription!.options"
|
|
239
|
+
[className]="fieldDescription!.className"
|
|
240
|
+
(valueChange)="onValueChangeField.emit({ value: $event, key: fieldDescription!.name })"
|
|
241
|
+
[disabled]="false"
|
|
242
|
+
[errorMessage]="''"
|
|
243
|
+
></dfk-dynamic-input>
|
|
244
|
+
`,
|
|
245
|
+
}]
|
|
246
|
+
}], propDecorators: { fieldDescription: [{
|
|
247
|
+
type: Input
|
|
248
|
+
}], renderInfos: [{
|
|
249
|
+
type: Input
|
|
250
|
+
}], onValueChangeField: [{
|
|
251
|
+
type: Output
|
|
252
|
+
}] } });
|
|
253
|
+
|
|
254
|
+
class MultiFieldInput {
|
|
255
|
+
constructor() {
|
|
256
|
+
this.fieldDescriptions = [];
|
|
257
|
+
this.onChange = new EventEmitter();
|
|
258
|
+
this.layout = "column";
|
|
259
|
+
this.data = {};
|
|
260
|
+
this.visibleFields = [];
|
|
261
|
+
}
|
|
262
|
+
trackByFn(index, field) {
|
|
263
|
+
return field.name || index;
|
|
264
|
+
}
|
|
265
|
+
ngOnInit() {
|
|
266
|
+
this.init();
|
|
267
|
+
}
|
|
268
|
+
ngOnChanges(_changes) {
|
|
269
|
+
this.init();
|
|
270
|
+
}
|
|
271
|
+
init() {
|
|
272
|
+
if (this.properties)
|
|
273
|
+
this.data = { ...this.properties };
|
|
274
|
+
this.updateVisibleFields();
|
|
275
|
+
}
|
|
276
|
+
updateVisibleFields() {
|
|
277
|
+
this.visibleFields = this.fieldDescriptions.filter((f) => !f.appearCondition || f.appearCondition(this.data));
|
|
278
|
+
}
|
|
279
|
+
onFieldChange(event) {
|
|
280
|
+
this.data = { ...this.data, [event.key]: event.value };
|
|
281
|
+
this.updateVisibleFields();
|
|
282
|
+
this.onChange.emit(this.data);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
MultiFieldInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MultiFieldInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
286
|
+
MultiFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MultiFieldInput, isStandalone: true, selector: "dfk-multi-field-input", inputs: { fieldDescriptions: "fieldDescriptions", properties: "properties", layout: "layout" }, outputs: { onChange: "onChange" }, usesOnChanges: true, ngImport: i0, template: `
|
|
287
|
+
<div class="flex flex-col gap-3 p-4 border rounded-lg bg-gray-50" [ngClass]="{
|
|
288
|
+
'flex-row gap-3': layout === 'row',
|
|
289
|
+
'grid grid-cols-2 gap-3': layout === 'grid'
|
|
290
|
+
}">
|
|
291
|
+
<dfk-field-input
|
|
292
|
+
*ngFor="let field of visibleFields; trackBy: trackByFn"
|
|
293
|
+
[fieldDescription]="field"
|
|
294
|
+
[renderInfos]="data"
|
|
295
|
+
(onValueChangeField)="onFieldChange($event)"
|
|
296
|
+
></dfk-field-input>
|
|
297
|
+
</div>
|
|
298
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: FieldInput, selector: "dfk-field-input", inputs: ["fieldDescription", "renderInfos"], outputs: ["onValueChangeField"] }] });
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MultiFieldInput, decorators: [{
|
|
300
|
+
type: Component,
|
|
301
|
+
args: [{
|
|
302
|
+
selector: "dfk-multi-field-input",
|
|
303
|
+
standalone: true,
|
|
304
|
+
imports: [NgClass, NgFor, FieldInput],
|
|
305
|
+
template: `
|
|
306
|
+
<div class="flex flex-col gap-3 p-4 border rounded-lg bg-gray-50" [ngClass]="{
|
|
307
|
+
'flex-row gap-3': layout === 'row',
|
|
308
|
+
'grid grid-cols-2 gap-3': layout === 'grid'
|
|
309
|
+
}">
|
|
310
|
+
<dfk-field-input
|
|
311
|
+
*ngFor="let field of visibleFields; trackBy: trackByFn"
|
|
312
|
+
[fieldDescription]="field"
|
|
313
|
+
[renderInfos]="data"
|
|
314
|
+
(onValueChangeField)="onFieldChange($event)"
|
|
315
|
+
></dfk-field-input>
|
|
316
|
+
</div>
|
|
317
|
+
`,
|
|
318
|
+
}]
|
|
319
|
+
}], propDecorators: { fieldDescriptions: [{
|
|
320
|
+
type: Input
|
|
321
|
+
}], properties: [{
|
|
322
|
+
type: Input
|
|
323
|
+
}], onChange: [{
|
|
324
|
+
type: Output
|
|
325
|
+
}], layout: [{
|
|
326
|
+
type: Input
|
|
327
|
+
}] } });
|
|
328
|
+
|
|
329
|
+
class ColumnLayout {
|
|
330
|
+
}
|
|
331
|
+
ColumnLayout.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ColumnLayout, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
332
|
+
ColumnLayout.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ColumnLayout, isStandalone: true, selector: "dfk-column-layout", ngImport: i0, template: `<div style="display:flex;flex-direction:column;gap:var(--dfk-gap,12px)"><ng-content></ng-content></div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ColumnLayout, decorators: [{
|
|
334
|
+
type: Component,
|
|
335
|
+
args: [{
|
|
336
|
+
selector: "dfk-column-layout",
|
|
337
|
+
standalone: true,
|
|
338
|
+
imports: [CommonModule],
|
|
339
|
+
template: `<div style="display:flex;flex-direction:column;gap:var(--dfk-gap,12px)"><ng-content></ng-content></div>`,
|
|
340
|
+
}]
|
|
341
|
+
}] });
|
|
342
|
+
class RowLayout {
|
|
343
|
+
}
|
|
344
|
+
RowLayout.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RowLayout, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
345
|
+
RowLayout.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RowLayout, isStandalone: true, selector: "dfk-row-layout", ngImport: i0, template: `<div style="display:flex;flex-direction:row;gap:var(--dfk-gap,12px)"><ng-content></ng-content></div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RowLayout, decorators: [{
|
|
347
|
+
type: Component,
|
|
348
|
+
args: [{
|
|
349
|
+
selector: "dfk-row-layout",
|
|
350
|
+
standalone: true,
|
|
351
|
+
imports: [CommonModule],
|
|
352
|
+
template: `<div style="display:flex;flex-direction:row;gap:var(--dfk-gap,12px)"><ng-content></ng-content></div>`,
|
|
353
|
+
}]
|
|
354
|
+
}] });
|
|
355
|
+
class GridLayout {
|
|
356
|
+
}
|
|
357
|
+
GridLayout.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridLayout, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
358
|
+
GridLayout.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GridLayout, isStandalone: true, selector: "dfk-grid-layout", ngImport: i0, template: `<div style="display:grid;grid-template-columns:repeat(var(--dfk-columns,2),1fr);gap:var(--dfk-gap,12px)"><ng-content></ng-content></div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridLayout, decorators: [{
|
|
360
|
+
type: Component,
|
|
361
|
+
args: [{
|
|
362
|
+
selector: "dfk-grid-layout",
|
|
363
|
+
standalone: true,
|
|
364
|
+
imports: [CommonModule],
|
|
365
|
+
template: `<div style="display:grid;grid-template-columns:repeat(var(--dfk-columns,2),1fr);gap:var(--dfk-gap,12px)"><ng-content></ng-content></div>`,
|
|
366
|
+
}]
|
|
367
|
+
}] });
|
|
368
|
+
|
|
369
|
+
class DynamicFieldKitModule {
|
|
370
|
+
}
|
|
371
|
+
DynamicFieldKitModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DynamicFieldKitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
372
|
+
DynamicFieldKitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DynamicFieldKitModule, imports: [CommonModule, DynamicInput, FieldInput, MultiFieldInput, ColumnLayout, RowLayout, GridLayout], exports: [DynamicInput, FieldInput, MultiFieldInput, ColumnLayout, RowLayout, GridLayout] });
|
|
373
|
+
DynamicFieldKitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DynamicFieldKitModule, imports: [CommonModule, DynamicInput, FieldInput, MultiFieldInput, ColumnLayout, RowLayout, GridLayout] });
|
|
374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DynamicFieldKitModule, decorators: [{
|
|
375
|
+
type: NgModule,
|
|
376
|
+
args: [{
|
|
377
|
+
imports: [CommonModule, DynamicInput, FieldInput, MultiFieldInput, ColumnLayout, RowLayout, GridLayout],
|
|
378
|
+
exports: [DynamicInput, FieldInput, MultiFieldInput, ColumnLayout, RowLayout, GridLayout],
|
|
379
|
+
}]
|
|
380
|
+
}] });
|
|
381
|
+
|
|
382
|
+
// public-api.ts
|
|
383
|
+
// Components
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Generated bundle index. Do not edit.
|
|
387
|
+
*/
|
|
388
|
+
|
|
389
|
+
export { BaseInputComponent, ColumnLayout, DynamicFieldKitModule, DynamicInput, FieldInput, GridLayout, MultiFieldInput, RowLayout };
|
|
390
|
+
//# sourceMappingURL=dynamic-field-kit-angular.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-field-kit-angular.mjs","sources":["../../src/components/BaseInput.ts","../../src/components/DynamicInput.ts","../../src/components/FieldInput.ts","../../src/components/MultiFieldInput.ts","../../src/layout/defaultLayouts.ts","../../src/lib/dynamic-field-kit.module.ts","../../src/public-api.ts","../../src/dynamic-field-kit-angular.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter, ChangeDetectorRef } from '@angular/core';\r\nimport { FieldRendererProps } from '@dynamic-field-kit/core';\r\n\r\n@Component({\r\n template: ''\r\n})\r\nexport abstract class BaseInputComponent {\r\n @Input() value?: any;\r\n @Input() label?: string;\r\n @Input() placeholder?: string;\r\n @Input() required?: boolean;\r\n @Input() disabled?: boolean;\r\n @Input() options?: any[];\r\n @Input() className?: string;\r\n @Input() description?: string;\r\n @Input() errorMessage?: string;\r\n @Input() acceptFile?: string;\r\n @Input() maxLength?: number;\r\n @Input() minNumber?: number;\r\n @Input() maxNumber?: number;\r\n // Add more from mplis as needed\r\n\r\n @Output() valueChange = new EventEmitter<any>();\r\n\r\n constructor(protected cdr: ChangeDetectorRef) {}\r\n}\r\n\r\n","import { CommonModule } from \"@angular/common\"\nimport { Component, ComponentRef, Input, Output, EventEmitter, ViewChild, ViewContainerRef, OnChanges, AfterViewInit, SimpleChanges, Type, SimpleChange } from \"@angular/core\"\nimport { fieldRegistry, FieldTypeKey } from \"@dynamic-field-kit/core\"\nimport { BaseInputComponent } from \"./BaseInput\"\n\n@Component({\n selector: \"dfk-dynamic-input\",\n standalone: true,\n imports: [CommonModule],\n template: `<div #host style=\"display: contents;\"></div>`,\n})\nexport class DynamicInput extends BaseInputComponent implements OnChanges, AfterViewInit {\n @Input() type!: FieldTypeKey\n @Input() value?: any\n @Input() label?: string\r\n @Input() placeholder?: string\r\n @Input() required?: boolean\r\n @Input() options?: any[]\n @Input() className?: string\n @Input() description?: any\n @Output() override valueChange = new EventEmitter<any>()\n @Output() onChange = new EventEmitter<any>() // backward compat\n\n @ViewChild(\"host\", { read: ViewContainerRef, static: false }) host!: ViewContainerRef\n private compRef?: ComponentRef<any>\n private inputInstance?: any\n\r\n ngOnChanges(changes: SimpleChanges) {\n if (changes[\"type\"] && !changes[\"type\"].firstChange && this.host) {\n this.render()\n return\n }\n\n if (this.inputInstance) {\n this.applyKnownProps(this.inputInstance)\n\n const childChanges: SimpleChanges = {}\n for (const prop in changes) {\n childChanges[prop] = new SimpleChange(\n changes[prop].previousValue,\n changes[prop].currentValue,\n changes[prop].firstChange\n )\n }\n\n this.inputInstance.ngOnChanges?.(childChanges)\n this.compRef?.changeDetectorRef.detectChanges()\n } else if (this.host) {\n this.render()\n }\n }\n\r\n ngAfterViewInit() {\r\n this.render();\r\n }\r\n\r\n private render() {\n const Renderer = fieldRegistry.get(this.type as FieldTypeKey)\n this.cleanupRenderedComponent()\n this.host.clear()\n if (!Renderer) {\n const el = document.createElement(\"div\")\n el.textContent = `Unknown field type: ${this.type}`\n this.host.element.nativeElement.appendChild(el)\n return\n }\n\n try {\n const compType = Renderer as unknown as Type<any>\n const compRef = this.host.createComponent(compType)\n const instance = compRef.instance\n if (!instance) throw new Error(`Failed to create instance for ${this.type}`)\n\n this.applyKnownProps(instance)\n\n this.bindOutput(instance, \"valueChange\")\n this.bindOutput(instance, \"onValueChange\")\n\n instance.changeDetectorRef?.detectChanges()\n this.compRef = compRef\n this.inputInstance = instance\n compRef.changeDetectorRef.detectChanges()\n } catch (err) {\n // Fallback to function renderer\n try {\n const props: any = {\n value: this.value,\n onValueChange: (v: any) => this.emitValue(v),\n label: this.label,\n placeholder: this.placeholder,\n required: this.required,\n options: this.options,\r\n className: this.className,\r\n description: this.description,\r\n disabled: this.disabled,\r\n errorMessage: this.errorMessage,\r\n }\n const out = (Renderer as Function)(props)\n if (typeof out === 'string') {\n const el = document.createElement('div')\n el.innerHTML = out\n this.host.element.nativeElement.appendChild(el)\n }\n } catch (e) {\n const el = document.createElement('div')\n el.textContent = `Failed to render field: ${this.type}`\n this.host.element.nativeElement.appendChild(el)\n }\n }\n }\n\n private applyKnownProps(instance: any) {\n const knownProps = [\"value\", \"label\", \"placeholder\", \"required\", \"disabled\", \"options\", \"className\", \"description\", \"errorMessage\"]\n for (const prop of knownProps) {\n if (prop in this && prop in instance) {\n instance[prop] = (this as any)[prop]\n }\n }\n }\n\n private bindOutput(instance: any, outputName: \"valueChange\" | \"onValueChange\") {\n const output = instance?.[outputName]\n if (!output || typeof output.subscribe !== \"function\") return;\n\n (output as EventEmitter<any>).subscribe((value) => {\n this.emitValue(value)\n })\n }\n\n private emitValue(value: any) {\n this.valueChange.emit(value)\n this.onChange.emit(value)\n }\n\n private cleanupRenderedComponent() {\n this.compRef?.destroy()\n this.compRef = undefined\n this.inputInstance = undefined\n }\n}\n","import { NgIf } from \"@angular/common\"\nimport { Component, Input, Output, EventEmitter } from \"@angular/core\"\nimport { DynamicInput } from './DynamicInput'\nimport { FieldDescription, Properties } from \"@dynamic-field-kit/core\"\n\n@Component({\n selector: \"dfk-field-input\",\n standalone: true,\n imports: [NgIf, DynamicInput],\n template: `\n <dfk-dynamic-input\n *ngIf=\"fieldDescription && renderInfos\"\n [type]=\"fieldDescription!.type\"\n [value]=\"getFieldValue()\"\n [label]=\"fieldDescription!.label\"\n [placeholder]=\"fieldDescription!.placeholder\"\n [required]=\"fieldDescription!.required\"\n [description]=\"fieldDescription!.description\"\r\n [options]=\"fieldDescription!.options\"\r\n [className]=\"fieldDescription!.className\"\r\n (valueChange)=\"onValueChangeField.emit({ value: $event, key: fieldDescription!.name })\"\r\n [disabled]=\"false\"\r\n [errorMessage]=\"''\"\r\n ></dfk-dynamic-input>\r\n `,\r\n})\r\nexport class FieldInput {\n @Input() fieldDescription?: FieldDescription\n @Input() renderInfos?: Properties\n @Output() onValueChangeField = new EventEmitter<{value: any, key: string}>()\n\n getFieldValue() {\n if (!this.fieldDescription || !this.renderInfos) return undefined\n\n const value = this.renderInfos[this.fieldDescription.name]\n if (value === undefined && this.fieldDescription.type === \"text\") {\n return \"\"\n }\n\n return value\n }\n}\n","import { NgClass, NgFor } from \"@angular/common\"\nimport { Component, Input, Output, EventEmitter, OnChanges, OnInit, SimpleChanges } from \"@angular/core\"\nimport { FieldDescription, Properties } from \"@dynamic-field-kit/core\"\nimport { FieldInput } from \"./FieldInput\"\nimport { LayoutConfig } from \"../types/layout\"\n\n@Component({\n selector: \"dfk-multi-field-input\",\n standalone: true,\n imports: [NgClass, NgFor, FieldInput],\n template: `\n <div class=\"flex flex-col gap-3 p-4 border rounded-lg bg-gray-50\" [ngClass]=\"{\n 'flex-row gap-3': layout === 'row',\n 'grid grid-cols-2 gap-3': layout === 'grid'\n }\">\n <dfk-field-input\n *ngFor=\"let field of visibleFields; trackBy: trackByFn\"\n [fieldDescription]=\"field\"\n [renderInfos]=\"data\"\n (onValueChangeField)=\"onFieldChange($event)\"\n ></dfk-field-input>\n </div>\n `,\n})\nexport class MultiFieldInput implements OnInit, OnChanges {\n @Input() fieldDescriptions: FieldDescription[] = []\n @Input() properties?: Properties\n @Output() onChange = new EventEmitter<Properties>()\n @Input() layout: LayoutConfig = \"column\"\n\n data: Properties = {}\n visibleFields: FieldDescription[] = []\n\n trackByFn(index: number, field: FieldDescription): string | number {\n return field.name || index;\n }\n\n ngOnInit() {\n this.init()\n }\n\n ngOnChanges(_changes: SimpleChanges) {\n this.init()\n }\n\n private init() {\n if (this.properties) this.data = { ...this.properties }\n this.updateVisibleFields()\n }\n\n private updateVisibleFields() {\n this.visibleFields = this.fieldDescriptions.filter(\n (f) => !f.appearCondition || f.appearCondition(this.data)\n )\n }\n\n onFieldChange(event: { value: any; key: string }) {\n this.data = { ...this.data, [event.key]: event.value }\n this.updateVisibleFields()\n this.onChange.emit(this.data)\n }\n}\n","import { Component } from \"@angular/core\"\nimport { CommonModule } from '@angular/common'\n\r\n@Component({\r\n selector: \"dfk-column-layout\",\r\n standalone: true,\r\n imports: [CommonModule],\r\n template: `<div style=\"display:flex;flex-direction:column;gap:var(--dfk-gap,12px)\"><ng-content></ng-content></div>`,\r\n})\r\nexport class ColumnLayout {}\r\n\r\n@Component({\r\n selector: \"dfk-row-layout\",\r\n standalone: true,\r\n imports: [CommonModule],\r\n template: `<div style=\"display:flex;flex-direction:row;gap:var(--dfk-gap,12px)\"><ng-content></ng-content></div>`,\r\n})\r\nexport class RowLayout {}\r\n\r\n@Component({\r\n selector: \"dfk-grid-layout\",\r\n standalone: true,\r\n imports: [CommonModule],\r\n template: `<div style=\"display:grid;grid-template-columns:repeat(var(--dfk-columns,2),1fr);gap:var(--dfk-gap,12px)\"><ng-content></ng-content></div>`,\r\n})\r\nexport class GridLayout {}\n","import { NgModule } from '@angular/core'\r\nimport { CommonModule } from '@angular/common'\r\n\r\nimport { DynamicInput } from '../components/DynamicInput'\r\nimport { FieldInput } from '../components/FieldInput'\r\nimport { MultiFieldInput } from '../components/MultiFieldInput'\r\n\r\nimport { ColumnLayout, RowLayout, GridLayout } from '../layout/defaultLayouts'\r\n\r\n@NgModule({\r\n imports: [CommonModule, DynamicInput, FieldInput, MultiFieldInput, ColumnLayout, RowLayout, GridLayout],\r\n exports: [DynamicInput, FieldInput, MultiFieldInput, ColumnLayout, RowLayout, GridLayout],\r\n})\r\nexport class DynamicFieldKitModule {}\r\n","// public-api.ts\r\n\r\n// Components\nexport * from './components/BaseInput';\nexport * from './components/DynamicInput';\nexport * from './components/FieldInput';\nexport * from './components/MultiFieldInput';\n\n// Layout\nexport * from './layout';\nexport * from './types/layout';\n\r\n// Module\r\nexport * from './lib/dynamic-field-kit.module';\r\n\r\n// Re-export types from core (only type, not export * )\r\nexport type {\r\n FieldTypeKey,\r\n FieldDescription,\r\n FieldRendererProps\r\n} from '@dynamic-field-kit/core';\r\n\r\n// Optional: expose registry for advanced use cases, but not required for basic usage\nexport { fieldRegistry } from '@dynamic-field-kit/core';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAMsB,kBAAkB,CAAA;AAkBtC,IAAA,WAAA,CAAsB,GAAsB,EAAA;QA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i0.ɵɵFactoryDeclaration<ColumnLayout, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ColumnLayout, "dfk-column-layout", never, {}, {}, never, ["*"], true, never>;
|
|
5
|
+
}
|
|
6
|
+
export declare class RowLayout {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RowLayout, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RowLayout, "dfk-row-layout", never, {}, {}, never, ["*"], true, never>;
|
|
9
|
+
}
|
|
10
|
+
export declare class GridLayout {
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GridLayout, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GridLayout, "dfk-grid-layout", never, {}, {}, never, ["*"], true, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./defaultLayouts";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/common";
|
|
3
|
+
import * as i2 from "../components/DynamicInput";
|
|
4
|
+
import * as i3 from "../components/FieldInput";
|
|
5
|
+
import * as i4 from "../components/MultiFieldInput";
|
|
6
|
+
import * as i5 from "../layout/defaultLayouts";
|
|
7
|
+
export declare class DynamicFieldKitModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFieldKitModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DynamicFieldKitModule, never, [typeof i1.CommonModule, typeof i2.DynamicInput, typeof i3.FieldInput, typeof i4.MultiFieldInput, typeof i5.ColumnLayout, typeof i5.RowLayout, typeof i5.GridLayout], [typeof i2.DynamicInput, typeof i3.FieldInput, typeof i4.MultiFieldInput, typeof i5.ColumnLayout, typeof i5.RowLayout, typeof i5.GridLayout]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DynamicFieldKitModule>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dynamic-field-kit/angular",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Angular renderer for dynamic-field-kit",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"private": false,
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"peerDependencies": {
|
|
12
|
+
"@angular/common": ">=13 <22",
|
|
13
|
+
"@angular/core": ">=13 <22",
|
|
14
|
+
"@dynamic-field-kit/core": "^1.0.7"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/vannt-dev/dynamic-field-kit.git"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"dynamic-field",
|
|
25
|
+
"dynamic-field-kit",
|
|
26
|
+
"dynamic-field-kit/angular"
|
|
27
|
+
],
|
|
28
|
+
"module": "fesm2015/dynamic-field-kit-angular.mjs",
|
|
29
|
+
"es2020": "fesm2020/dynamic-field-kit-angular.mjs",
|
|
30
|
+
"esm2020": "esm2020/dynamic-field-kit-angular.mjs",
|
|
31
|
+
"fesm2020": "fesm2020/dynamic-field-kit-angular.mjs",
|
|
32
|
+
"fesm2015": "fesm2015/dynamic-field-kit-angular.mjs",
|
|
33
|
+
"typings": "index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
"./package.json": {
|
|
36
|
+
"default": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
".": {
|
|
39
|
+
"types": "./index.d.ts",
|
|
40
|
+
"esm2020": "./esm2020/dynamic-field-kit-angular.mjs",
|
|
41
|
+
"es2020": "./fesm2020/dynamic-field-kit-angular.mjs",
|
|
42
|
+
"es2015": "./fesm2015/dynamic-field-kit-angular.mjs",
|
|
43
|
+
"node": "./fesm2015/dynamic-field-kit-angular.mjs",
|
|
44
|
+
"default": "./fesm2020/dynamic-field-kit-angular.mjs"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"tslib": "^2.3.0"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './components/BaseInput';
|
|
2
|
+
export * from './components/DynamicInput';
|
|
3
|
+
export * from './components/FieldInput';
|
|
4
|
+
export * from './components/MultiFieldInput';
|
|
5
|
+
export * from './layout';
|
|
6
|
+
export * from './types/layout';
|
|
7
|
+
export * from './lib/dynamic-field-kit.module';
|
|
8
|
+
export type { FieldTypeKey, FieldDescription, FieldRendererProps } from '@dynamic-field-kit/core';
|
|
9
|
+
export { fieldRegistry } from '@dynamic-field-kit/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type LayoutConfig = "column" | "row" | "grid";
|
package/package.json
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-field-kit/angular",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Angular renderer for dynamic-field-kit",
|
|
5
|
+
"license": "MIT",
|
|
4
6
|
"private": false,
|
|
5
|
-
"main": "dist/bundles/dynamic-field-kit-angular.umd.js",
|
|
6
|
-
"module": "dist/fesm2015/dynamic-field-kit-angular.js",
|
|
7
|
-
"es2015": "dist/esm2015/dynamic-field-kit-angular.js",
|
|
8
|
-
"typings": "dist/types/public_api.d.ts",
|
|
9
7
|
"sideEffects": false,
|
|
10
8
|
"files": [
|
|
11
9
|
"dist"
|
|
12
10
|
],
|
|
13
11
|
"peerDependencies": {
|
|
14
|
-
"@angular/common": "
|
|
15
|
-
"@angular/core": "
|
|
16
|
-
"@dynamic-field-kit/core": "
|
|
12
|
+
"@angular/common": ">=13 <22",
|
|
13
|
+
"@angular/core": ">=13 <22",
|
|
14
|
+
"@dynamic-field-kit/core": "^1.0.7"
|
|
17
15
|
},
|
|
18
16
|
"publishConfig": {
|
|
19
17
|
"access": "public"
|
|
@@ -27,7 +25,9 @@
|
|
|
27
25
|
"release:major": "npm version major && npm publish"
|
|
28
26
|
},
|
|
29
27
|
"devDependencies": {
|
|
30
|
-
"
|
|
28
|
+
"@angular/common": "^15.2.10",
|
|
29
|
+
"@angular/core": "^15.2.10",
|
|
30
|
+
"ng-packagr": "^15.2.2",
|
|
31
31
|
"rimraf": "^6.1.3"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|