@raintonic/formaui 0.2.1 → 0.3.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/CHANGELOG.md +100 -3
- package/LICENSE +21 -0
- package/README.md +80 -26
- package/fesm2022/raintonic-formaui-components-accordion.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-accordion.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-alert.mjs +24 -5
- package/fesm2022/raintonic-formaui-components-alert.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs +38 -9
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-badge.mjs +45 -31
- package/fesm2022/raintonic-formaui-components-badge.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-big-menu.mjs +23 -5
- package/fesm2022/raintonic-formaui-components-big-menu.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs +24 -7
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-button-group.mjs +6 -6
- package/fesm2022/raintonic-formaui-components-button-group.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-button.mjs +63 -17
- package/fesm2022/raintonic-formaui-components-button.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-card.mjs +8 -8
- package/fesm2022/raintonic-formaui-components-card.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-checkbox.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-checkbox.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-data-table.mjs +67 -9
- package/fesm2022/raintonic-formaui-components-data-table.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-date-picker.mjs +63 -16
- package/fesm2022/raintonic-formaui-components-date-picker.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-drawer.mjs +19 -4
- package/fesm2022/raintonic-formaui-components-drawer.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-file-upload.mjs +25 -5
- package/fesm2022/raintonic-formaui-components-file-upload.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-form-field.mjs +21 -6
- package/fesm2022/raintonic-formaui-components-form-field.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-icon.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-icon.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-input.mjs +1 -1
- package/fesm2022/raintonic-formaui-components-input.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-list.mjs +4 -4
- package/fesm2022/raintonic-formaui-components-list.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-menu.mjs +4 -4
- package/fesm2022/raintonic-formaui-components-menu.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-number-input.mjs +20 -5
- package/fesm2022/raintonic-formaui-components-number-input.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-paginator.mjs +27 -7
- package/fesm2022/raintonic-formaui-components-paginator.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-password-input.mjs +23 -5
- package/fesm2022/raintonic-formaui-components-password-input.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-popover.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-popover.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-progressbar.mjs +32 -7
- package/fesm2022/raintonic-formaui-components-progressbar.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-radio.mjs +6 -5
- package/fesm2022/raintonic-formaui-components-radio.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-select.mjs +19 -4
- package/fesm2022/raintonic-formaui-components-select.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-side-panel.mjs +19 -4
- package/fesm2022/raintonic-formaui-components-side-panel.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-sidebar.mjs +23 -5
- package/fesm2022/raintonic-formaui-components-sidebar.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-skeleton.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-skeleton.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-slider.mjs +23 -5
- package/fesm2022/raintonic-formaui-components-slider.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-spinner.mjs +24 -7
- package/fesm2022/raintonic-formaui-components-spinner.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-stepper.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-stepper.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-tab.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-tab.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-tag.mjs +21 -4
- package/fesm2022/raintonic-formaui-components-tag.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-time-picker.mjs +26 -7
- package/fesm2022/raintonic-formaui-components-time-picker.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-toggle.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-toggle.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-toolbar.mjs +41 -7
- package/fesm2022/raintonic-formaui-components-toolbar.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-tooltip.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-tooltip.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-tree-table.mjs +35 -6
- package/fesm2022/raintonic-formaui-components-tree-table.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-tree.mjs +23 -5
- package/fesm2022/raintonic-formaui-components-tree.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-core.mjs +25 -1
- package/fesm2022/raintonic-formaui-core.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-services-dialog.mjs +3 -3
- package/fesm2022/raintonic-formaui-services-dialog.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-services-notification.mjs +2 -2
- package/fesm2022/raintonic-formaui-services-notification.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-services-theme.mjs +3 -3
- package/fesm2022/raintonic-formaui-services-theme.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-test-utils.mjs +21 -16
- package/fesm2022/raintonic-formaui-test-utils.mjs.map +1 -1
- package/fesm2022/raintonic-formaui.mjs +1 -1
- package/fesm2022/raintonic-formaui.mjs.map +1 -1
- package/llms-full.txt +34 -25
- package/llms.txt +1 -2
- package/package.json +1 -5
- package/styles/index.scss +2 -2
- package/styles/partials/_motion.scss +25 -0
- package/styles/partials/_theme.scss +6 -5
- package/styles/partials/components/_button.scss +361 -367
- package/styles/partials/themes/_dark.scss +14 -0
- package/styles/partials/themes/_light.scss +14 -0
- package/types/raintonic-formaui-components-alert.d.ts +11 -1
- package/types/raintonic-formaui-components-alert.d.ts.map +1 -1
- package/types/raintonic-formaui-components-autocomplete.d.ts +25 -7
- package/types/raintonic-formaui-components-autocomplete.d.ts.map +1 -1
- package/types/raintonic-formaui-components-badge.d.ts +20 -9
- package/types/raintonic-formaui-components-badge.d.ts.map +1 -1
- package/types/raintonic-formaui-components-big-menu.d.ts +12 -1
- package/types/raintonic-formaui-components-big-menu.d.ts.map +1 -1
- package/types/raintonic-formaui-components-breadcrumb.d.ts +11 -2
- package/types/raintonic-formaui-components-breadcrumb.d.ts.map +1 -1
- package/types/raintonic-formaui-components-button-group.d.ts +6 -6
- package/types/raintonic-formaui-components-button.d.ts +9 -7
- package/types/raintonic-formaui-components-button.d.ts.map +1 -1
- package/types/raintonic-formaui-components-card.d.ts +4 -4
- package/types/raintonic-formaui-components-checkbox.d.ts +1 -1
- package/types/raintonic-formaui-components-data-table.d.ts +56 -16
- package/types/raintonic-formaui-components-data-table.d.ts.map +1 -1
- package/types/raintonic-formaui-components-date-picker.d.ts +32 -4
- package/types/raintonic-formaui-components-date-picker.d.ts.map +1 -1
- package/types/raintonic-formaui-components-drawer.d.ts +10 -1
- package/types/raintonic-formaui-components-drawer.d.ts.map +1 -1
- package/types/raintonic-formaui-components-file-upload.d.ts +12 -1
- package/types/raintonic-formaui-components-file-upload.d.ts.map +1 -1
- package/types/raintonic-formaui-components-form-field.d.ts +12 -2
- package/types/raintonic-formaui-components-form-field.d.ts.map +1 -1
- package/types/raintonic-formaui-components-input.d.ts +1 -1
- package/types/raintonic-formaui-components-number-input.d.ts +11 -2
- package/types/raintonic-formaui-components-number-input.d.ts.map +1 -1
- package/types/raintonic-formaui-components-paginator.d.ts +13 -1
- package/types/raintonic-formaui-components-paginator.d.ts.map +1 -1
- package/types/raintonic-formaui-components-password-input.d.ts +12 -2
- package/types/raintonic-formaui-components-password-input.d.ts.map +1 -1
- package/types/raintonic-formaui-components-progressbar.d.ts +14 -1
- package/types/raintonic-formaui-components-progressbar.d.ts.map +1 -1
- package/types/raintonic-formaui-components-radio.d.ts +2 -1
- package/types/raintonic-formaui-components-radio.d.ts.map +1 -1
- package/types/raintonic-formaui-components-select.d.ts.map +1 -1
- package/types/raintonic-formaui-components-side-panel.d.ts +10 -1
- package/types/raintonic-formaui-components-side-panel.d.ts.map +1 -1
- package/types/raintonic-formaui-components-sidebar.d.ts +12 -1
- package/types/raintonic-formaui-components-sidebar.d.ts.map +1 -1
- package/types/raintonic-formaui-components-slider.d.ts +12 -1
- package/types/raintonic-formaui-components-slider.d.ts.map +1 -1
- package/types/raintonic-formaui-components-spinner.d.ts +12 -2
- package/types/raintonic-formaui-components-spinner.d.ts.map +1 -1
- package/types/raintonic-formaui-components-tag.d.ts +10 -1
- package/types/raintonic-formaui-components-tag.d.ts.map +1 -1
- package/types/raintonic-formaui-components-time-picker.d.ts +14 -2
- package/types/raintonic-formaui-components-time-picker.d.ts.map +1 -1
- package/types/raintonic-formaui-components-toggle.d.ts +1 -1
- package/types/raintonic-formaui-components-toolbar.d.ts +22 -4
- package/types/raintonic-formaui-components-toolbar.d.ts.map +1 -1
- package/types/raintonic-formaui-components-tree-table.d.ts +29 -4
- package/types/raintonic-formaui-components-tree-table.d.ts.map +1 -1
- package/types/raintonic-formaui-components-tree.d.ts +12 -1
- package/types/raintonic-formaui-components-tree.d.ts.map +1 -1
- package/types/raintonic-formaui-core.d.ts +19 -2
- package/types/raintonic-formaui-core.d.ts.map +1 -1
- package/types/raintonic-formaui-services-dialog.d.ts +1 -1
- package/types/raintonic-formaui-services-theme.d.ts +3 -3
- package/types/raintonic-formaui-test-utils.d.ts +15 -2
- package/types/raintonic-formaui-test-utils.d.ts.map +1 -1
- package/types/raintonic-formaui.d.ts +1 -1
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs +0 -266
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs.map +0 -1
- package/types/raintonic-formaui-components-dynamic-form.d.ts +0 -412
- package/types/raintonic-formaui-components-dynamic-form.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raintonic-formaui-test-utils.d.ts","sources":["../../../lib/test-utils/a11y-test.util.ts","../../../lib/test-utils/keyboard-test.util.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"raintonic-formaui-test-utils.d.ts","sources":["../../../lib/test-utils/a11y-test.util.ts","../../../lib/test-utils/keyboard-test.util.ts"],"mappings":";;UAEiB,mBAAmB;AAClC;;;;;AAKG;AACH;AACD;AAED;;;;;;AAMG;AACH,iBAAsB,YAAY,UACvB,WAAW,YACX,mBAAwB,GAChC,OAAO,CAAC,GAAG,CAAC,MAAM;;ACtBrB,iBAAgB,QAAQ,UACb,WAAW;;;;AAE0C;AAahE,iBAAgB,QAAQ,UAAU,WAAW;AAI7C,iBAAgB,cAAc,UAAU,WAAW;AAInD,iBAAgB,YAAY,UAAU,WAAW;AAIjD,iBAAgB,UAAU,UAAU,WAAW;AAI/C,iBAAgB,UAAU,UAAU,WAAW;AAI/C,iBAAgB,WAAW,UAAU,WAAW;AAIhD,iBAAgB,SAAS,UAAU,WAAW;AAI9C,iBAAgB,QAAQ,UAAU,WAAW;;;;","names":[]}
|
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i2 from '@angular/forms';
|
|
6
|
-
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import { FuiFormFieldComponent, FuiLabelComponent, FuiErrorComponent, FuiHintComponent, FuiPrefixDirective, FuiSuffixDirective } from '@raintonic/formaui/components/form-field';
|
|
8
|
-
import { FuiInputDirective } from '@raintonic/formaui/components/input';
|
|
9
|
-
import { FuiSelectComponent, FuiOptionComponent } from '@raintonic/formaui/components/select';
|
|
10
|
-
import { FuiAutocompleteComponent } from '@raintonic/formaui/components/autocomplete';
|
|
11
|
-
import { FuiCheckboxComponent } from '@raintonic/formaui/components/checkbox';
|
|
12
|
-
import { FuiIconComponent } from '@raintonic/formaui/components/icon';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* # DynamicFormRenderer Component
|
|
16
|
-
*
|
|
17
|
-
* A component that automatically renders forms based on a JSON configuration.
|
|
18
|
-
* It takes a FormGroup and a configuration object that specifies the form structure.
|
|
19
|
-
*
|
|
20
|
-
* ## Features
|
|
21
|
-
* - Supports multiple field types: input, select, autocomplete, textarea, file, checkbox
|
|
22
|
-
* - Flexible row-based layout with configurable column spans
|
|
23
|
-
* - Section grouping with customizable titles
|
|
24
|
-
* - Empty area/spacer support for layout control
|
|
25
|
-
* - Full integration with Angular reactive forms
|
|
26
|
-
* - Responsive design with mobile-first approach
|
|
27
|
-
*
|
|
28
|
-
* ## Usage
|
|
29
|
-
*
|
|
30
|
-
* ### Basic Form
|
|
31
|
-
* ```typescript
|
|
32
|
-
* @Component({
|
|
33
|
-
* template: `
|
|
34
|
-
* <fui-dynamic-form-renderer
|
|
35
|
-
* [formGroup]="myForm"
|
|
36
|
-
* [config]="formConfig"
|
|
37
|
-
* ></fui-dynamic-form-renderer>
|
|
38
|
-
* `
|
|
39
|
-
* })
|
|
40
|
-
* export class MyComponent {
|
|
41
|
-
* myForm = new FormGroup({
|
|
42
|
-
* firstName: new FormControl(''),
|
|
43
|
-
* lastName: new FormControl(''),
|
|
44
|
-
* email: new FormControl(''),
|
|
45
|
-
* });
|
|
46
|
-
*
|
|
47
|
-
* formConfig: DynamicFormConfig = {
|
|
48
|
-
* sections: [{
|
|
49
|
-
* title: { text: 'Personal Information', importance: 'h3' },
|
|
50
|
-
* rows: [
|
|
51
|
-
* {
|
|
52
|
-
* fields: [
|
|
53
|
-
* { key: 'firstName', type: 'input', label: 'First Name', colSpan: 6 },
|
|
54
|
-
* { key: 'lastName', type: 'input', label: 'Last Name', colSpan: 6 },
|
|
55
|
-
* ]
|
|
56
|
-
* },
|
|
57
|
-
* {
|
|
58
|
-
* fields: [
|
|
59
|
-
* { key: 'email', type: 'input', inputType: 'email', label: 'Email', colSpan: 12 },
|
|
60
|
-
* ]
|
|
61
|
-
* }
|
|
62
|
-
* ]
|
|
63
|
-
* }]
|
|
64
|
-
* };
|
|
65
|
-
* }
|
|
66
|
-
* ```
|
|
67
|
-
*
|
|
68
|
-
* ### With Validation Errors
|
|
69
|
-
* ```typescript
|
|
70
|
-
* formConfig: DynamicFormConfig = {
|
|
71
|
-
* sections: [{
|
|
72
|
-
* rows: [{
|
|
73
|
-
* fields: [{
|
|
74
|
-
* key: 'email',
|
|
75
|
-
* type: 'input',
|
|
76
|
-
* inputType: 'email',
|
|
77
|
-
* label: 'Email',
|
|
78
|
-
* errors: {
|
|
79
|
-
* required: 'Email is required',
|
|
80
|
-
* email: 'Please enter a valid email'
|
|
81
|
-
* }
|
|
82
|
-
* }]
|
|
83
|
-
* }]
|
|
84
|
-
* }]
|
|
85
|
-
* };
|
|
86
|
-
* ```
|
|
87
|
-
*
|
|
88
|
-
* ### With Select and Autocomplete
|
|
89
|
-
* ```typescript
|
|
90
|
-
* formConfig: DynamicFormConfig = {
|
|
91
|
-
* sections: [{
|
|
92
|
-
* rows: [{
|
|
93
|
-
* fields: [
|
|
94
|
-
* {
|
|
95
|
-
* key: 'country',
|
|
96
|
-
* type: 'select',
|
|
97
|
-
* label: 'Country',
|
|
98
|
-
* options: [
|
|
99
|
-
* { value: 'us', label: 'United States' },
|
|
100
|
-
* { value: 'ca', label: 'Canada' },
|
|
101
|
-
* ],
|
|
102
|
-
* colSpan: 6
|
|
103
|
-
* },
|
|
104
|
-
* {
|
|
105
|
-
* key: 'city',
|
|
106
|
-
* type: 'autocomplete',
|
|
107
|
-
* label: 'City',
|
|
108
|
-
* options: [
|
|
109
|
-
* { value: 'nyc', label: 'New York' },
|
|
110
|
-
* { value: 'la', label: 'Los Angeles' },
|
|
111
|
-
* ],
|
|
112
|
-
* showAddButton: true,
|
|
113
|
-
* colSpan: 6
|
|
114
|
-
* }
|
|
115
|
-
* ]
|
|
116
|
-
* }]
|
|
117
|
-
* }]
|
|
118
|
-
* };
|
|
119
|
-
* ```
|
|
120
|
-
*/
|
|
121
|
-
class FuiDynamicFormRendererComponent {
|
|
122
|
-
/**
|
|
123
|
-
* The FormGroup instance to bind the form to
|
|
124
|
-
*/
|
|
125
|
-
formGroup = input.required(...(ngDevMode ? [{ debugName: "formGroup" }] : /* istanbul ignore next */ []));
|
|
126
|
-
/**
|
|
127
|
-
* The configuration object that defines the form structure
|
|
128
|
-
*/
|
|
129
|
-
config = input.required(...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
130
|
-
/**
|
|
131
|
-
* Emitted when an autocomplete action (add/refresh) is triggered
|
|
132
|
-
*/
|
|
133
|
-
autocompleteAction = output();
|
|
134
|
-
/**
|
|
135
|
-
* Emitted when a file input changes
|
|
136
|
-
*/
|
|
137
|
-
fileChange = output();
|
|
138
|
-
/**
|
|
139
|
-
* Default comparison function for select components
|
|
140
|
-
*/
|
|
141
|
-
defaultCompareWith = (o1, o2) => o1 === o2;
|
|
142
|
-
/**
|
|
143
|
-
* Gets a FormControl from the FormGroup by key
|
|
144
|
-
* @param key The control name/key
|
|
145
|
-
* @returns The FormControl instance
|
|
146
|
-
*/
|
|
147
|
-
getControl(key) {
|
|
148
|
-
const control = this.formGroup().get(key);
|
|
149
|
-
if (!control) {
|
|
150
|
-
// Control not found - return empty control to prevent errors
|
|
151
|
-
return new FormControl(); // Return empty control to prevent errors
|
|
152
|
-
}
|
|
153
|
-
return control;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Converts error object entries to array for iteration
|
|
157
|
-
* @param errors The errors object from field config
|
|
158
|
-
* @returns Array of key-value pairs
|
|
159
|
-
*/
|
|
160
|
-
getErrorEntries(errors) {
|
|
161
|
-
return Object.entries(errors).map(([key, value]) => ({ key, value }));
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Gets CSS align-items value from row align setting
|
|
165
|
-
* @param align The row alignment setting
|
|
166
|
-
* @returns CSS align-items value
|
|
167
|
-
*/
|
|
168
|
-
getAlignItems(align) {
|
|
169
|
-
switch (align) {
|
|
170
|
-
case 'start':
|
|
171
|
-
return 'flex-start';
|
|
172
|
-
case 'center':
|
|
173
|
-
return 'center';
|
|
174
|
-
case 'end':
|
|
175
|
-
return 'flex-end';
|
|
176
|
-
case 'stretch':
|
|
177
|
-
return 'stretch';
|
|
178
|
-
default:
|
|
179
|
-
return 'flex-start';
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Gets CSS justify-content value from row justify setting
|
|
184
|
-
* @param justify The row justification setting
|
|
185
|
-
* @returns CSS justify-content value
|
|
186
|
-
*/
|
|
187
|
-
getJustifyContent(justify) {
|
|
188
|
-
switch (justify) {
|
|
189
|
-
case 'start':
|
|
190
|
-
return 'flex-start';
|
|
191
|
-
case 'center':
|
|
192
|
-
return 'center';
|
|
193
|
-
case 'end':
|
|
194
|
-
return 'flex-end';
|
|
195
|
-
case 'between':
|
|
196
|
-
return 'space-between';
|
|
197
|
-
case 'around':
|
|
198
|
-
return 'space-around';
|
|
199
|
-
case 'evenly':
|
|
200
|
-
return 'space-evenly';
|
|
201
|
-
default:
|
|
202
|
-
return 'flex-start';
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Handles autocomplete add/refresh button clicks
|
|
207
|
-
* @param fieldKey The field key that triggered the action
|
|
208
|
-
* @param action The action type ('add' or 'refresh')
|
|
209
|
-
*/
|
|
210
|
-
onAutocompleteAction(fieldKey, action) {
|
|
211
|
-
this.autocompleteAction.emit({ fieldKey, action });
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Handles file input changes
|
|
215
|
-
* @param event The input change event
|
|
216
|
-
* @param fieldKey The field key
|
|
217
|
-
*/
|
|
218
|
-
onFileChange(event, fieldKey) {
|
|
219
|
-
const input = event.target;
|
|
220
|
-
this.fileChange.emit({ fieldKey, files: input.files });
|
|
221
|
-
// Also update the form control if it exists
|
|
222
|
-
const control = this.formGroup().get(fieldKey);
|
|
223
|
-
if (control) {
|
|
224
|
-
control.setValue(input.files);
|
|
225
|
-
control.markAsTouched();
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Type guard to check if a field is not a spacer
|
|
230
|
-
* @param field The field configuration
|
|
231
|
-
* @returns Whether the field has a key
|
|
232
|
-
*/
|
|
233
|
-
isFieldWithKey(field) {
|
|
234
|
-
return field.type !== 'spacer' || !!field.key;
|
|
235
|
-
}
|
|
236
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiDynamicFormRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
237
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: FuiDynamicFormRendererComponent, isStandalone: true, selector: "fui-dynamic-form-renderer", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { autocompleteAction: "autocompleteAction", fileChange: "fileChange" }, host: { classAttribute: "fui-dynamic-form-renderer" }, ngImport: i0, template: "<div class=\"fui-dynamic-form\" [class]=\"config().className\">\r\n @for (section of config().sections; track $index) {\r\n <div\r\n class=\"fui-dynamic-form__section\"\r\n [class]=\"section.className\"\r\n [style.--section-row-gap]=\"section.rowGap ? 'var(--fui-spacing-' + section.rowGap + ')' : null\"\r\n >\r\n @if (section.title) {\r\n <div class=\"fui-dynamic-form__title-wrapper\" [class]=\"section.title.className\">\r\n @switch (section.title.importance) {\r\n @case ('h1') {\r\n <h1 class=\"fui-dynamic-form__title fui-display-xl fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h1>\r\n }\r\n @case ('h2') {\r\n <h2 class=\"fui-dynamic-form__title fui-display-lg fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h2>\r\n }\r\n @case ('h3') {\r\n <h3 class=\"fui-dynamic-form__title fui-display-md fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h3>\r\n }\r\n @case ('h4') {\r\n <h4 class=\"fui-dynamic-form__title fui-display-sm fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h4>\r\n }\r\n @case ('h5') {\r\n <h5 class=\"fui-dynamic-form__title fui-display-xs fui-font-medium\">\r\n {{ section.title.text }}\r\n </h5>\r\n }\r\n @case ('h6') {\r\n <h6 class=\"fui-dynamic-form__title fui-text-xl fui-font-medium\">{{ section.title.text }}</h6>\r\n }\r\n }\r\n @if (section.title.description) {\r\n <p class=\"fui-dynamic-form__description fui-text-md\">{{ section.title.description }}</p>\r\n }\r\n </div>\r\n }\r\n\r\n @for (row of section.rows; track $index) {\r\n <div\r\n class=\"fui-dynamic-form__row\"\r\n [class]=\"row.className\"\r\n [style.--row-gap]=\"row.gap ? 'var(--fui-spacing-' + row.gap + ')' : null\"\r\n [style.align-items]=\"getAlignItems(row.align)\"\r\n [style.justify-content]=\"getJustifyContent(row.justify)\"\r\n >\r\n @for (field of row.fields; track field.key ?? $index) {\r\n <div class=\"fui-dynamic-form__field\" [class]=\"field.className\" [style.--field-col-span]=\"field.colSpan\">\r\n @switch (field.type) {\r\n @case ('input') {\r\n <ng-container *ngTemplateOutlet=\"inputTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('textarea') {\r\n <ng-container *ngTemplateOutlet=\"textareaTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('select') {\r\n <ng-container *ngTemplateOutlet=\"selectTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('autocomplete') {\r\n <ng-container *ngTemplateOutlet=\"autocompleteTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('checkbox') {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('file') {\r\n <ng-container *ngTemplateOutlet=\"fileTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('spacer') {\r\n <div class=\"fui-dynamic-form__spacer\"></div>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<!-- Input Template -->\r\n<ng-template #inputTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n @if (field.prefixIcon) {\r\n <fui-icon fuiPrefix [name]=\"field.prefixIcon\"></fui-icon>\r\n }\r\n <input\r\n fuiInput\r\n [type]=\"field.inputType || 'text'\"\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [readonly]=\"field.readonly || false\"\r\n [maxlength]=\"field.maxLength\"\r\n [minlength]=\"field.minLength\"\r\n [pattern]=\"field.pattern\"\r\n [min]=\"field.min\"\r\n [max]=\"field.max\"\r\n [step]=\"field.step\"\r\n />\r\n @if (field.suffixIcon) {\r\n <fui-icon fuiSuffix [name]=\"field.suffixIcon\"></fui-icon>\r\n }\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Textarea Template -->\r\n<ng-template #textareaTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n <textarea\r\n fuiInput\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [readonly]=\"field.readonly || false\"\r\n [rows]=\"field.rows || 3\"\r\n [maxlength]=\"field.maxLength\"\r\n [minlength]=\"field.minLength\"\r\n ></textarea>\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Select Template -->\r\n<ng-template #selectTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n @if (field.prefixIcon) {\r\n <fui-icon fuiPrefix [name]=\"field.prefixIcon\"></fui-icon>\r\n }\r\n <fui-select\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [multiple]=\"field.multiple || false\"\r\n [compareWith]=\"field.compareWith || defaultCompareWith\"\r\n >\r\n @for (option of field.options; track option.value) {\r\n <fui-option [value]=\"option.value\" [disabled]=\"option.disabled || false\">\r\n {{ option.label }}\r\n </fui-option>\r\n }\r\n </fui-select>\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Autocomplete Template -->\r\n<ng-template #autocompleteTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n <fui-autocomplete\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [showAddButton]=\"field.showAddButton || false\"\r\n [showRefreshButton]=\"field.showRefreshButton || false\"\r\n [addButtonLabel]=\"field.addButtonLabel || 'Add New'\"\r\n [refreshButtonLabel]=\"field.refreshButtonLabel || 'Refresh'\"\r\n [noOptionsText]=\"field.noOptionsText || 'No options found'\"\r\n [searchPlaceholder]=\"field.searchPlaceholder || 'Search...'\"\r\n (addNew)=\"onAutocompleteAction(field.key, 'add')\"\r\n (refresh)=\"onAutocompleteAction(field.key, 'refresh')\"\r\n ></fui-autocomplete>\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate let-field>\r\n <div class=\"fui-dynamic-form__checkbox-wrapper\">\r\n <fui-checkbox [formControl]=\"getControl(field.key)\" [labelPosition]=\"field.labelPosition || 'after'\">\r\n {{ field.label }}\r\n </fui-checkbox>\r\n @if (field.hint) {\r\n <div class=\"fui-dynamic-form__checkbox-hint fui-text-sm\">{{ field.hint }}</div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<!-- File Template -->\r\n<ng-template #fileTemplate let-field>\r\n <div class=\"fui-dynamic-form__file-field\">\r\n @if (field.label && !field.hideLabel) {\r\n <label class=\"fui-dynamic-form__file-label fui-text-sm\">{{ field.label }}</label>\r\n }\r\n <input\r\n type=\"file\"\r\n class=\"fui-dynamic-form__file-input\"\r\n [accept]=\"field.fileConfig?.accept\"\r\n [multiple]=\"field.fileConfig?.multiple || false\"\r\n [disabled]=\"field.disabled || false\"\r\n (change)=\"onFileChange($event, field.key)\"\r\n />\r\n @if (field.hint) {\r\n <div class=\"fui-dynamic-form__file-hint fui-text-sm\">{{ field.hint }}</div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Errors Template -->\r\n<ng-template #errorsTemplate let-field>\r\n @if (field.errors && getControl(field.key)) {\r\n @for (errorEntry of getErrorEntries(field.errors); track errorEntry.key) {\r\n @if (getControl(field.key).hasError(errorEntry.key)) {\r\n <fui-error>{{ errorEntry.value }}</fui-error>\r\n }\r\n }\r\n }\r\n</ng-template>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-dynamic-form{display:flex;flex-direction:column;gap:var(--fui-spacing-07);width:100%}.fui-dynamic-form__section{display:flex;flex-direction:column;gap:var(--section-row-gap, var(--fui-spacing-05))}.fui-dynamic-form__title-wrapper{display:flex;flex-direction:column;gap:var(--fui-spacing-02);margin-bottom:var(--fui-spacing-03)}.fui-dynamic-form__title{margin:0;padding:0;color:var(--fui-text-primary)}.fui-dynamic-form__description{margin:0;padding:0;color:var(--fui-text-secondary)}.fui-dynamic-form__row{display:flex;flex-wrap:wrap;gap:var(--row-gap, var(--fui-spacing-05));width:100%}.fui-dynamic-form__field{flex:1 1 auto;min-width:0}.fui-dynamic-form__field[style*=\"--field-col-span: 1\"]{flex:0 0 calc(1 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(1 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 2\"]{flex:0 0 calc(2 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(2 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 3\"]{flex:0 0 calc(3 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(3 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 4\"]{flex:0 0 calc(4 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(4 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 5\"]{flex:0 0 calc(5 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(5 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 6\"]{flex:0 0 calc(6 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(6 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 7\"]{flex:0 0 calc(7 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(7 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 8\"]{flex:0 0 calc(8 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(8 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 9\"]{flex:0 0 calc(9 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(9 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 10\"]{flex:0 0 calc(10 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(10 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 11\"]{flex:0 0 calc(11 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(11 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 12\"]{flex:0 0 calc(12 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(12 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 12\"]{flex:0 0 100%;max-width:100%}.fui-dynamic-form__spacer{width:100%;height:1px;visibility:hidden}.fui-dynamic-form__checkbox-wrapper{display:flex;flex-direction:column;gap:var(--fui-spacing-02);padding-top:var(--fui-spacing-06)}.fui-dynamic-form__checkbox-hint{color:var(--fui-text-secondary);margin-left:calc(1.125rem + var(--fui-spacing-03))}.fui-dynamic-form__file-field{display:flex;flex-direction:column;gap:var(--fui-spacing-02)}.fui-dynamic-form__file-label{color:var(--fui-text-primary);font-weight:var(--fui-font-weight-medium)}.fui-dynamic-form__file-input{padding:var(--fui-spacing-03);border:1px solid var(--fui-border-color);border-radius:var(--fui-border-radius-sm);background-color:var(--fui-surface-00);font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02)}.fui-dynamic-form__file-input:focus{outline:none;border-color:var(--fui-primary);box-shadow:0 0 0 4px var(--fui-primary-20)}.fui-dynamic-form__file-input:disabled{opacity:.5;cursor:not-allowed}.fui-dynamic-form__file-input::file-selector-button{padding:var(--fui-spacing-02) var(--fui-spacing-04);margin-right:var(--fui-spacing-03);border:1px solid var(--fui-border-color);border-radius:var(--fui-border-radius-sm);background-color:var(--fui-surface-01);color:var(--fui-text-primary);font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);cursor:pointer;transition:background-color,border-color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-dynamic-form__file-input::file-selector-button:hover{background-color:var(--fui-surface-02)}.fui-dynamic-form__file-hint{color:var(--fui-text-secondary)}@media(max-width:768px){.fui-dynamic-form__row{flex-direction:column}.fui-dynamic-form__field{flex:0 0 100%!important;max-width:100%!important}.fui-dynamic-form__checkbox-wrapper{padding-top:0}}:host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FuiFormFieldComponent, selector: "fui-form-field", inputs: ["readOnly", "appearance", "hideRequiredMarker", "hideSubscript"] }, { kind: "component", type: FuiLabelComponent, selector: "fui-label" }, { kind: "component", type: FuiErrorComponent, selector: "fui-error", inputs: ["key"] }, { kind: "component", type: FuiHintComponent, selector: "fui-hint" }, { kind: "directive", type: FuiPrefixDirective, selector: "[fuiPrefix]" }, { kind: "directive", type: FuiSuffixDirective, selector: "[fuiSuffix]" }, { kind: "directive", type: FuiInputDirective, selector: "input[fuiInput], textarea[fuiInput], select[fuiInput]", inputs: ["type", "placeholder", "readonly", "maxlength", "minlength", "pattern", "errorStateMatcher", "disabledInput"], outputs: ["valueChange"] }, { kind: "component", type: FuiSelectComponent, selector: "fui-select", inputs: ["placeholder", "disabled", "readonly", "multiple", "errorStateMatcher", "compareWith"], outputs: ["valueChange", "selectionChange", "openedChange"] }, { kind: "component", type: FuiOptionComponent, selector: "fui-option", inputs: ["value", "disabled"], outputs: ["selectionChange"] }, { kind: "component", type: FuiAutocompleteComponent, selector: "fui-autocomplete", inputs: ["placeholder", "disabled", "readonly", "showAddButton", "showRefreshButton", "addButtonLabel", "refreshButtonLabel", "noOptionsText", "searchPlaceholder", "errorStateMatcher", "compareWith"], outputs: ["valueChange", "selectionChange", "openedChange", "addNew", "refresh", "searchChange"] }, { kind: "component", type: FuiCheckboxComponent, selector: "fui-checkbox", inputs: ["readonly", "checked", "disabled", "indeterminate", "required", "labelPosition", "name", "value", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "errorStateMatcher"], outputs: ["change", "indeterminateChange"] }, { kind: "component", type: FuiIconComponent, selector: "fui-icon", inputs: ["name", "size", "weight", "color", "ariaLabel", "spin", "pulse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
238
|
-
}
|
|
239
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiDynamicFormRendererComponent, decorators: [{
|
|
240
|
-
type: Component,
|
|
241
|
-
args: [{ selector: 'fui-dynamic-form-renderer', standalone: true, imports: [
|
|
242
|
-
CommonModule,
|
|
243
|
-
ReactiveFormsModule,
|
|
244
|
-
FuiFormFieldComponent,
|
|
245
|
-
FuiLabelComponent,
|
|
246
|
-
FuiErrorComponent,
|
|
247
|
-
FuiHintComponent,
|
|
248
|
-
FuiPrefixDirective,
|
|
249
|
-
FuiSuffixDirective,
|
|
250
|
-
FuiInputDirective,
|
|
251
|
-
FuiSelectComponent,
|
|
252
|
-
FuiOptionComponent,
|
|
253
|
-
FuiAutocompleteComponent,
|
|
254
|
-
FuiCheckboxComponent,
|
|
255
|
-
FuiIconComponent,
|
|
256
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
257
|
-
class: 'fui-dynamic-form-renderer',
|
|
258
|
-
}, template: "<div class=\"fui-dynamic-form\" [class]=\"config().className\">\r\n @for (section of config().sections; track $index) {\r\n <div\r\n class=\"fui-dynamic-form__section\"\r\n [class]=\"section.className\"\r\n [style.--section-row-gap]=\"section.rowGap ? 'var(--fui-spacing-' + section.rowGap + ')' : null\"\r\n >\r\n @if (section.title) {\r\n <div class=\"fui-dynamic-form__title-wrapper\" [class]=\"section.title.className\">\r\n @switch (section.title.importance) {\r\n @case ('h1') {\r\n <h1 class=\"fui-dynamic-form__title fui-display-xl fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h1>\r\n }\r\n @case ('h2') {\r\n <h2 class=\"fui-dynamic-form__title fui-display-lg fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h2>\r\n }\r\n @case ('h3') {\r\n <h3 class=\"fui-dynamic-form__title fui-display-md fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h3>\r\n }\r\n @case ('h4') {\r\n <h4 class=\"fui-dynamic-form__title fui-display-sm fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h4>\r\n }\r\n @case ('h5') {\r\n <h5 class=\"fui-dynamic-form__title fui-display-xs fui-font-medium\">\r\n {{ section.title.text }}\r\n </h5>\r\n }\r\n @case ('h6') {\r\n <h6 class=\"fui-dynamic-form__title fui-text-xl fui-font-medium\">{{ section.title.text }}</h6>\r\n }\r\n }\r\n @if (section.title.description) {\r\n <p class=\"fui-dynamic-form__description fui-text-md\">{{ section.title.description }}</p>\r\n }\r\n </div>\r\n }\r\n\r\n @for (row of section.rows; track $index) {\r\n <div\r\n class=\"fui-dynamic-form__row\"\r\n [class]=\"row.className\"\r\n [style.--row-gap]=\"row.gap ? 'var(--fui-spacing-' + row.gap + ')' : null\"\r\n [style.align-items]=\"getAlignItems(row.align)\"\r\n [style.justify-content]=\"getJustifyContent(row.justify)\"\r\n >\r\n @for (field of row.fields; track field.key ?? $index) {\r\n <div class=\"fui-dynamic-form__field\" [class]=\"field.className\" [style.--field-col-span]=\"field.colSpan\">\r\n @switch (field.type) {\r\n @case ('input') {\r\n <ng-container *ngTemplateOutlet=\"inputTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('textarea') {\r\n <ng-container *ngTemplateOutlet=\"textareaTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('select') {\r\n <ng-container *ngTemplateOutlet=\"selectTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('autocomplete') {\r\n <ng-container *ngTemplateOutlet=\"autocompleteTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('checkbox') {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('file') {\r\n <ng-container *ngTemplateOutlet=\"fileTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('spacer') {\r\n <div class=\"fui-dynamic-form__spacer\"></div>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<!-- Input Template -->\r\n<ng-template #inputTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n @if (field.prefixIcon) {\r\n <fui-icon fuiPrefix [name]=\"field.prefixIcon\"></fui-icon>\r\n }\r\n <input\r\n fuiInput\r\n [type]=\"field.inputType || 'text'\"\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [readonly]=\"field.readonly || false\"\r\n [maxlength]=\"field.maxLength\"\r\n [minlength]=\"field.minLength\"\r\n [pattern]=\"field.pattern\"\r\n [min]=\"field.min\"\r\n [max]=\"field.max\"\r\n [step]=\"field.step\"\r\n />\r\n @if (field.suffixIcon) {\r\n <fui-icon fuiSuffix [name]=\"field.suffixIcon\"></fui-icon>\r\n }\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Textarea Template -->\r\n<ng-template #textareaTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n <textarea\r\n fuiInput\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [readonly]=\"field.readonly || false\"\r\n [rows]=\"field.rows || 3\"\r\n [maxlength]=\"field.maxLength\"\r\n [minlength]=\"field.minLength\"\r\n ></textarea>\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Select Template -->\r\n<ng-template #selectTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n @if (field.prefixIcon) {\r\n <fui-icon fuiPrefix [name]=\"field.prefixIcon\"></fui-icon>\r\n }\r\n <fui-select\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [multiple]=\"field.multiple || false\"\r\n [compareWith]=\"field.compareWith || defaultCompareWith\"\r\n >\r\n @for (option of field.options; track option.value) {\r\n <fui-option [value]=\"option.value\" [disabled]=\"option.disabled || false\">\r\n {{ option.label }}\r\n </fui-option>\r\n }\r\n </fui-select>\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Autocomplete Template -->\r\n<ng-template #autocompleteTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n <fui-autocomplete\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [showAddButton]=\"field.showAddButton || false\"\r\n [showRefreshButton]=\"field.showRefreshButton || false\"\r\n [addButtonLabel]=\"field.addButtonLabel || 'Add New'\"\r\n [refreshButtonLabel]=\"field.refreshButtonLabel || 'Refresh'\"\r\n [noOptionsText]=\"field.noOptionsText || 'No options found'\"\r\n [searchPlaceholder]=\"field.searchPlaceholder || 'Search...'\"\r\n (addNew)=\"onAutocompleteAction(field.key, 'add')\"\r\n (refresh)=\"onAutocompleteAction(field.key, 'refresh')\"\r\n ></fui-autocomplete>\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate let-field>\r\n <div class=\"fui-dynamic-form__checkbox-wrapper\">\r\n <fui-checkbox [formControl]=\"getControl(field.key)\" [labelPosition]=\"field.labelPosition || 'after'\">\r\n {{ field.label }}\r\n </fui-checkbox>\r\n @if (field.hint) {\r\n <div class=\"fui-dynamic-form__checkbox-hint fui-text-sm\">{{ field.hint }}</div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<!-- File Template -->\r\n<ng-template #fileTemplate let-field>\r\n <div class=\"fui-dynamic-form__file-field\">\r\n @if (field.label && !field.hideLabel) {\r\n <label class=\"fui-dynamic-form__file-label fui-text-sm\">{{ field.label }}</label>\r\n }\r\n <input\r\n type=\"file\"\r\n class=\"fui-dynamic-form__file-input\"\r\n [accept]=\"field.fileConfig?.accept\"\r\n [multiple]=\"field.fileConfig?.multiple || false\"\r\n [disabled]=\"field.disabled || false\"\r\n (change)=\"onFileChange($event, field.key)\"\r\n />\r\n @if (field.hint) {\r\n <div class=\"fui-dynamic-form__file-hint fui-text-sm\">{{ field.hint }}</div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Errors Template -->\r\n<ng-template #errorsTemplate let-field>\r\n @if (field.errors && getControl(field.key)) {\r\n @for (errorEntry of getErrorEntries(field.errors); track errorEntry.key) {\r\n @if (getControl(field.key).hasError(errorEntry.key)) {\r\n <fui-error>{{ errorEntry.value }}</fui-error>\r\n }\r\n }\r\n }\r\n</ng-template>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-dynamic-form{display:flex;flex-direction:column;gap:var(--fui-spacing-07);width:100%}.fui-dynamic-form__section{display:flex;flex-direction:column;gap:var(--section-row-gap, var(--fui-spacing-05))}.fui-dynamic-form__title-wrapper{display:flex;flex-direction:column;gap:var(--fui-spacing-02);margin-bottom:var(--fui-spacing-03)}.fui-dynamic-form__title{margin:0;padding:0;color:var(--fui-text-primary)}.fui-dynamic-form__description{margin:0;padding:0;color:var(--fui-text-secondary)}.fui-dynamic-form__row{display:flex;flex-wrap:wrap;gap:var(--row-gap, var(--fui-spacing-05));width:100%}.fui-dynamic-form__field{flex:1 1 auto;min-width:0}.fui-dynamic-form__field[style*=\"--field-col-span: 1\"]{flex:0 0 calc(1 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(1 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 2\"]{flex:0 0 calc(2 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(2 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 3\"]{flex:0 0 calc(3 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(3 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 4\"]{flex:0 0 calc(4 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(4 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 5\"]{flex:0 0 calc(5 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(5 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 6\"]{flex:0 0 calc(6 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(6 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 7\"]{flex:0 0 calc(7 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(7 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 8\"]{flex:0 0 calc(8 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(8 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 9\"]{flex:0 0 calc(9 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(9 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 10\"]{flex:0 0 calc(10 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(10 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 11\"]{flex:0 0 calc(11 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(11 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 12\"]{flex:0 0 calc(12 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)));max-width:calc(12 / 12 * 100% - var(--row-gap, var(--fui-spacing-05)))}.fui-dynamic-form__field[style*=\"--field-col-span: 12\"]{flex:0 0 100%;max-width:100%}.fui-dynamic-form__spacer{width:100%;height:1px;visibility:hidden}.fui-dynamic-form__checkbox-wrapper{display:flex;flex-direction:column;gap:var(--fui-spacing-02);padding-top:var(--fui-spacing-06)}.fui-dynamic-form__checkbox-hint{color:var(--fui-text-secondary);margin-left:calc(1.125rem + var(--fui-spacing-03))}.fui-dynamic-form__file-field{display:flex;flex-direction:column;gap:var(--fui-spacing-02)}.fui-dynamic-form__file-label{color:var(--fui-text-primary);font-weight:var(--fui-font-weight-medium)}.fui-dynamic-form__file-input{padding:var(--fui-spacing-03);border:1px solid var(--fui-border-color);border-radius:var(--fui-border-radius-sm);background-color:var(--fui-surface-00);font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02)}.fui-dynamic-form__file-input:focus{outline:none;border-color:var(--fui-primary);box-shadow:0 0 0 4px var(--fui-primary-20)}.fui-dynamic-form__file-input:disabled{opacity:.5;cursor:not-allowed}.fui-dynamic-form__file-input::file-selector-button{padding:var(--fui-spacing-02) var(--fui-spacing-04);margin-right:var(--fui-spacing-03);border:1px solid var(--fui-border-color);border-radius:var(--fui-border-radius-sm);background-color:var(--fui-surface-01);color:var(--fui-text-primary);font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);cursor:pointer;transition:background-color,border-color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-dynamic-form__file-input::file-selector-button:hover{background-color:var(--fui-surface-02)}.fui-dynamic-form__file-hint{color:var(--fui-text-secondary)}@media(max-width:768px){.fui-dynamic-form__row{flex-direction:column}.fui-dynamic-form__field{flex:0 0 100%!important;max-width:100%!important}.fui-dynamic-form__checkbox-wrapper{padding-top:0}}:host{display:block;width:100%}\n"] }]
|
|
259
|
-
}], propDecorators: { formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], autocompleteAction: [{ type: i0.Output, args: ["autocompleteAction"] }], fileChange: [{ type: i0.Output, args: ["fileChange"] }] } });
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Generated bundle index. Do not edit.
|
|
263
|
-
*/
|
|
264
|
-
|
|
265
|
-
export { FuiDynamicFormRendererComponent };
|
|
266
|
-
//# sourceMappingURL=raintonic-formaui-components-dynamic-form.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"raintonic-formaui-components-dynamic-form.mjs","sources":["../../../lib/components/dynamic-form/dynamic-form-renderer.component.ts","../../../lib/components/dynamic-form/dynamic-form-renderer.component.html","../../../lib/components/dynamic-form/raintonic-formaui-components-dynamic-form.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n input,\r\n InputSignal,\r\n output,\r\n OutputEmitterRef,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport {\r\n FuiFormFieldComponent,\r\n FuiLabelComponent,\r\n FuiErrorComponent,\r\n FuiHintComponent,\r\n FuiPrefixDirective,\r\n FuiSuffixDirective,\r\n} from '@raintonic/formaui/components/form-field';\r\nimport { FuiInputDirective } from '@raintonic/formaui/components/input';\r\nimport { FuiSelectComponent, FuiOptionComponent } from '@raintonic/formaui/components/select';\r\nimport { FuiAutocompleteComponent } from '@raintonic/formaui/components/autocomplete';\r\nimport { FuiCheckboxComponent } from '@raintonic/formaui/components/checkbox';\r\nimport { FuiIconComponent } from '@raintonic/formaui/components/icon';\r\n\r\nimport {\r\n DynamicFormConfig,\r\n DynamicFormField,\r\n DynamicFormRow,\r\n DynamicFormAutocompleteEvent,\r\n DynamicFormFileEvent,\r\n} from './dynamic-form.types';\r\n\r\n/**\r\n * # DynamicFormRenderer Component\r\n *\r\n * A component that automatically renders forms based on a JSON configuration.\r\n * It takes a FormGroup and a configuration object that specifies the form structure.\r\n *\r\n * ## Features\r\n * - Supports multiple field types: input, select, autocomplete, textarea, file, checkbox\r\n * - Flexible row-based layout with configurable column spans\r\n * - Section grouping with customizable titles\r\n * - Empty area/spacer support for layout control\r\n * - Full integration with Angular reactive forms\r\n * - Responsive design with mobile-first approach\r\n *\r\n * ## Usage\r\n *\r\n * ### Basic Form\r\n * ```typescript\r\n * @Component({\r\n * template: `\r\n * <fui-dynamic-form-renderer\r\n * [formGroup]=\"myForm\"\r\n * [config]=\"formConfig\"\r\n * ></fui-dynamic-form-renderer>\r\n * `\r\n * })\r\n * export class MyComponent {\r\n * myForm = new FormGroup({\r\n * firstName: new FormControl(''),\r\n * lastName: new FormControl(''),\r\n * email: new FormControl(''),\r\n * });\r\n *\r\n * formConfig: DynamicFormConfig = {\r\n * sections: [{\r\n * title: { text: 'Personal Information', importance: 'h3' },\r\n * rows: [\r\n * {\r\n * fields: [\r\n * { key: 'firstName', type: 'input', label: 'First Name', colSpan: 6 },\r\n * { key: 'lastName', type: 'input', label: 'Last Name', colSpan: 6 },\r\n * ]\r\n * },\r\n * {\r\n * fields: [\r\n * { key: 'email', type: 'input', inputType: 'email', label: 'Email', colSpan: 12 },\r\n * ]\r\n * }\r\n * ]\r\n * }]\r\n * };\r\n * }\r\n * ```\r\n *\r\n * ### With Validation Errors\r\n * ```typescript\r\n * formConfig: DynamicFormConfig = {\r\n * sections: [{\r\n * rows: [{\r\n * fields: [{\r\n * key: 'email',\r\n * type: 'input',\r\n * inputType: 'email',\r\n * label: 'Email',\r\n * errors: {\r\n * required: 'Email is required',\r\n * email: 'Please enter a valid email'\r\n * }\r\n * }]\r\n * }]\r\n * }]\r\n * };\r\n * ```\r\n *\r\n * ### With Select and Autocomplete\r\n * ```typescript\r\n * formConfig: DynamicFormConfig = {\r\n * sections: [{\r\n * rows: [{\r\n * fields: [\r\n * {\r\n * key: 'country',\r\n * type: 'select',\r\n * label: 'Country',\r\n * options: [\r\n * { value: 'us', label: 'United States' },\r\n * { value: 'ca', label: 'Canada' },\r\n * ],\r\n * colSpan: 6\r\n * },\r\n * {\r\n * key: 'city',\r\n * type: 'autocomplete',\r\n * label: 'City',\r\n * options: [\r\n * { value: 'nyc', label: 'New York' },\r\n * { value: 'la', label: 'Los Angeles' },\r\n * ],\r\n * showAddButton: true,\r\n * colSpan: 6\r\n * }\r\n * ]\r\n * }]\r\n * }]\r\n * };\r\n * ```\r\n */\r\n@Component({\r\n selector: 'fui-dynamic-form-renderer',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FuiFormFieldComponent,\r\n FuiLabelComponent,\r\n FuiErrorComponent,\r\n FuiHintComponent,\r\n FuiPrefixDirective,\r\n FuiSuffixDirective,\r\n FuiInputDirective,\r\n FuiSelectComponent,\r\n FuiOptionComponent,\r\n FuiAutocompleteComponent,\r\n FuiCheckboxComponent,\r\n FuiIconComponent,\r\n ],\r\n templateUrl: './dynamic-form-renderer.component.html',\r\n styleUrls: ['./dynamic-form-renderer.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'fui-dynamic-form-renderer',\r\n },\r\n})\r\nexport class FuiDynamicFormRendererComponent {\r\n /**\r\n * The FormGroup instance to bind the form to\r\n */\r\n readonly formGroup: InputSignal<FormGroup> = input.required<FormGroup>();\r\n\r\n /**\r\n * The configuration object that defines the form structure\r\n */\r\n readonly config: InputSignal<DynamicFormConfig> = input.required<DynamicFormConfig>();\r\n\r\n /**\r\n * Emitted when an autocomplete action (add/refresh) is triggered\r\n */\r\n readonly autocompleteAction: OutputEmitterRef<DynamicFormAutocompleteEvent> = output<DynamicFormAutocompleteEvent>();\r\n\r\n /**\r\n * Emitted when a file input changes\r\n */\r\n readonly fileChange: OutputEmitterRef<DynamicFormFileEvent> = output<DynamicFormFileEvent>();\r\n\r\n /**\r\n * Default comparison function for select components\r\n */\r\n readonly defaultCompareWith = (o1: unknown, o2: unknown): boolean => o1 === o2;\r\n\r\n /**\r\n * Gets a FormControl from the FormGroup by key\r\n * @param key The control name/key\r\n * @returns The FormControl instance\r\n */\r\n getControl(key: string): FormControl {\r\n const control = this.formGroup().get(key);\r\n if (!control) {\r\n // Control not found - return empty control to prevent errors\r\n return new FormControl(); // Return empty control to prevent errors\r\n }\r\n return control as FormControl;\r\n }\r\n\r\n /**\r\n * Converts error object entries to array for iteration\r\n * @param errors The errors object from field config\r\n * @returns Array of key-value pairs\r\n */\r\n getErrorEntries(errors: Record<string, string>): { key: string; value: string }[] {\r\n return Object.entries(errors).map(([key, value]) => ({ key, value }));\r\n }\r\n\r\n /**\r\n * Gets CSS align-items value from row align setting\r\n * @param align The row alignment setting\r\n * @returns CSS align-items value\r\n */\r\n getAlignItems(align?: DynamicFormRow['align']): string {\r\n switch (align) {\r\n case 'start':\r\n return 'flex-start';\r\n case 'center':\r\n return 'center';\r\n case 'end':\r\n return 'flex-end';\r\n case 'stretch':\r\n return 'stretch';\r\n default:\r\n return 'flex-start';\r\n }\r\n }\r\n\r\n /**\r\n * Gets CSS justify-content value from row justify setting\r\n * @param justify The row justification setting\r\n * @returns CSS justify-content value\r\n */\r\n getJustifyContent(justify?: DynamicFormRow['justify']): string {\r\n switch (justify) {\r\n case 'start':\r\n return 'flex-start';\r\n case 'center':\r\n return 'center';\r\n case 'end':\r\n return 'flex-end';\r\n case 'between':\r\n return 'space-between';\r\n case 'around':\r\n return 'space-around';\r\n case 'evenly':\r\n return 'space-evenly';\r\n default:\r\n return 'flex-start';\r\n }\r\n }\r\n\r\n /**\r\n * Handles autocomplete add/refresh button clicks\r\n * @param fieldKey The field key that triggered the action\r\n * @param action The action type ('add' or 'refresh')\r\n */\r\n onAutocompleteAction(fieldKey: string, action: 'add' | 'refresh'): void {\r\n this.autocompleteAction.emit({ fieldKey, action });\r\n }\r\n\r\n /**\r\n * Handles file input changes\r\n * @param event The input change event\r\n * @param fieldKey The field key\r\n */\r\n onFileChange(event: Event, fieldKey: string): void {\r\n const input = event.target as HTMLInputElement;\r\n this.fileChange.emit({ fieldKey, files: input.files });\r\n\r\n // Also update the form control if it exists\r\n const control = this.formGroup().get(fieldKey);\r\n if (control) {\r\n control.setValue(input.files);\r\n control.markAsTouched();\r\n }\r\n }\r\n\r\n /**\r\n * Type guard to check if a field is not a spacer\r\n * @param field The field configuration\r\n * @returns Whether the field has a key\r\n */\r\n isFieldWithKey(field: DynamicFormField): field is Exclude<DynamicFormField, { type: 'spacer' }> {\r\n return field.type !== 'spacer' || !!field.key;\r\n }\r\n}\r\n","<div class=\"fui-dynamic-form\" [class]=\"config().className\">\r\n @for (section of config().sections; track $index) {\r\n <div\r\n class=\"fui-dynamic-form__section\"\r\n [class]=\"section.className\"\r\n [style.--section-row-gap]=\"section.rowGap ? 'var(--fui-spacing-' + section.rowGap + ')' : null\"\r\n >\r\n @if (section.title) {\r\n <div class=\"fui-dynamic-form__title-wrapper\" [class]=\"section.title.className\">\r\n @switch (section.title.importance) {\r\n @case ('h1') {\r\n <h1 class=\"fui-dynamic-form__title fui-display-xl fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h1>\r\n }\r\n @case ('h2') {\r\n <h2 class=\"fui-dynamic-form__title fui-display-lg fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h2>\r\n }\r\n @case ('h3') {\r\n <h3 class=\"fui-dynamic-form__title fui-display-md fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h3>\r\n }\r\n @case ('h4') {\r\n <h4 class=\"fui-dynamic-form__title fui-display-sm fui-font-semibold\">\r\n {{ section.title.text }}\r\n </h4>\r\n }\r\n @case ('h5') {\r\n <h5 class=\"fui-dynamic-form__title fui-display-xs fui-font-medium\">\r\n {{ section.title.text }}\r\n </h5>\r\n }\r\n @case ('h6') {\r\n <h6 class=\"fui-dynamic-form__title fui-text-xl fui-font-medium\">{{ section.title.text }}</h6>\r\n }\r\n }\r\n @if (section.title.description) {\r\n <p class=\"fui-dynamic-form__description fui-text-md\">{{ section.title.description }}</p>\r\n }\r\n </div>\r\n }\r\n\r\n @for (row of section.rows; track $index) {\r\n <div\r\n class=\"fui-dynamic-form__row\"\r\n [class]=\"row.className\"\r\n [style.--row-gap]=\"row.gap ? 'var(--fui-spacing-' + row.gap + ')' : null\"\r\n [style.align-items]=\"getAlignItems(row.align)\"\r\n [style.justify-content]=\"getJustifyContent(row.justify)\"\r\n >\r\n @for (field of row.fields; track field.key ?? $index) {\r\n <div class=\"fui-dynamic-form__field\" [class]=\"field.className\" [style.--field-col-span]=\"field.colSpan\">\r\n @switch (field.type) {\r\n @case ('input') {\r\n <ng-container *ngTemplateOutlet=\"inputTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('textarea') {\r\n <ng-container *ngTemplateOutlet=\"textareaTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('select') {\r\n <ng-container *ngTemplateOutlet=\"selectTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('autocomplete') {\r\n <ng-container *ngTemplateOutlet=\"autocompleteTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('checkbox') {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('file') {\r\n <ng-container *ngTemplateOutlet=\"fileTemplate; context: { $implicit: field }\"></ng-container>\r\n }\r\n @case ('spacer') {\r\n <div class=\"fui-dynamic-form__spacer\"></div>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<!-- Input Template -->\r\n<ng-template #inputTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n @if (field.prefixIcon) {\r\n <fui-icon fuiPrefix [name]=\"field.prefixIcon\"></fui-icon>\r\n }\r\n <input\r\n fuiInput\r\n [type]=\"field.inputType || 'text'\"\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [readonly]=\"field.readonly || false\"\r\n [maxlength]=\"field.maxLength\"\r\n [minlength]=\"field.minLength\"\r\n [pattern]=\"field.pattern\"\r\n [min]=\"field.min\"\r\n [max]=\"field.max\"\r\n [step]=\"field.step\"\r\n />\r\n @if (field.suffixIcon) {\r\n <fui-icon fuiSuffix [name]=\"field.suffixIcon\"></fui-icon>\r\n }\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Textarea Template -->\r\n<ng-template #textareaTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n <textarea\r\n fuiInput\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [readonly]=\"field.readonly || false\"\r\n [rows]=\"field.rows || 3\"\r\n [maxlength]=\"field.maxLength\"\r\n [minlength]=\"field.minLength\"\r\n ></textarea>\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Select Template -->\r\n<ng-template #selectTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n @if (field.prefixIcon) {\r\n <fui-icon fuiPrefix [name]=\"field.prefixIcon\"></fui-icon>\r\n }\r\n <fui-select\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [multiple]=\"field.multiple || false\"\r\n [compareWith]=\"field.compareWith || defaultCompareWith\"\r\n >\r\n @for (option of field.options; track option.value) {\r\n <fui-option [value]=\"option.value\" [disabled]=\"option.disabled || false\">\r\n {{ option.label }}\r\n </fui-option>\r\n }\r\n </fui-select>\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Autocomplete Template -->\r\n<ng-template #autocompleteTemplate let-field>\r\n <fui-form-field>\r\n @if (field.label && !field.hideLabel) {\r\n <fui-label>{{ field.label }}</fui-label>\r\n }\r\n <fui-autocomplete\r\n [formControl]=\"getControl(field.key)\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [showAddButton]=\"field.showAddButton || false\"\r\n [showRefreshButton]=\"field.showRefreshButton || false\"\r\n [addButtonLabel]=\"field.addButtonLabel || 'Add New'\"\r\n [refreshButtonLabel]=\"field.refreshButtonLabel || 'Refresh'\"\r\n [noOptionsText]=\"field.noOptionsText || 'No options found'\"\r\n [searchPlaceholder]=\"field.searchPlaceholder || 'Search...'\"\r\n (addNew)=\"onAutocompleteAction(field.key, 'add')\"\r\n (refresh)=\"onAutocompleteAction(field.key, 'refresh')\"\r\n ></fui-autocomplete>\r\n @if (field.hint) {\r\n <fui-hint>{{ field.hint }}</fui-hint>\r\n }\r\n <ng-container *ngTemplateOutlet=\"errorsTemplate; context: { $implicit: field }\"></ng-container>\r\n </fui-form-field>\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate let-field>\r\n <div class=\"fui-dynamic-form__checkbox-wrapper\">\r\n <fui-checkbox [formControl]=\"getControl(field.key)\" [labelPosition]=\"field.labelPosition || 'after'\">\r\n {{ field.label }}\r\n </fui-checkbox>\r\n @if (field.hint) {\r\n <div class=\"fui-dynamic-form__checkbox-hint fui-text-sm\">{{ field.hint }}</div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<!-- File Template -->\r\n<ng-template #fileTemplate let-field>\r\n <div class=\"fui-dynamic-form__file-field\">\r\n @if (field.label && !field.hideLabel) {\r\n <label class=\"fui-dynamic-form__file-label fui-text-sm\">{{ field.label }}</label>\r\n }\r\n <input\r\n type=\"file\"\r\n class=\"fui-dynamic-form__file-input\"\r\n [accept]=\"field.fileConfig?.accept\"\r\n [multiple]=\"field.fileConfig?.multiple || false\"\r\n [disabled]=\"field.disabled || false\"\r\n (change)=\"onFileChange($event, field.key)\"\r\n />\r\n @if (field.hint) {\r\n <div class=\"fui-dynamic-form__file-hint fui-text-sm\">{{ field.hint }}</div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Errors Template -->\r\n<ng-template #errorsTemplate let-field>\r\n @if (field.errors && getControl(field.key)) {\r\n @for (errorEntry of getErrorEntries(field.errors); track errorEntry.key) {\r\n @if (getControl(field.key).hasError(errorEntry.key)) {\r\n <fui-error>{{ errorEntry.value }}</fui-error>\r\n }\r\n }\r\n }\r\n</ng-template>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAkCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GG;MA4BU,+BAA+B,CAAA;AAC1C;;AAEG;AACM,IAAA,SAAS,GAA2B,KAAK,CAAC,QAAQ,+EAAa;AAExE;;AAEG;AACM,IAAA,MAAM,GAAmC,KAAK,CAAC,QAAQ,4EAAqB;AAErF;;AAEG;IACM,kBAAkB,GAAmD,MAAM,EAAgC;AAEpH;;AAEG;IACM,UAAU,GAA2C,MAAM,EAAwB;AAE5F;;AAEG;IACM,kBAAkB,GAAG,CAAC,EAAW,EAAE,EAAW,KAAc,EAAE,KAAK,EAAE;AAE9E;;;;A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