@raintonic/formaui 0.2.1 → 0.3.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.
Files changed (169) hide show
  1. package/CHANGELOG.md +100 -3
  2. package/LICENSE +21 -0
  3. package/README.md +80 -26
  4. package/fesm2022/raintonic-formaui-components-accordion.mjs +2 -2
  5. package/fesm2022/raintonic-formaui-components-accordion.mjs.map +1 -1
  6. package/fesm2022/raintonic-formaui-components-alert.mjs +24 -5
  7. package/fesm2022/raintonic-formaui-components-alert.mjs.map +1 -1
  8. package/fesm2022/raintonic-formaui-components-autocomplete.mjs +38 -9
  9. package/fesm2022/raintonic-formaui-components-autocomplete.mjs.map +1 -1
  10. package/fesm2022/raintonic-formaui-components-badge.mjs +45 -31
  11. package/fesm2022/raintonic-formaui-components-badge.mjs.map +1 -1
  12. package/fesm2022/raintonic-formaui-components-big-menu.mjs +23 -5
  13. package/fesm2022/raintonic-formaui-components-big-menu.mjs.map +1 -1
  14. package/fesm2022/raintonic-formaui-components-breadcrumb.mjs +24 -7
  15. package/fesm2022/raintonic-formaui-components-breadcrumb.mjs.map +1 -1
  16. package/fesm2022/raintonic-formaui-components-button-group.mjs +6 -6
  17. package/fesm2022/raintonic-formaui-components-button-group.mjs.map +1 -1
  18. package/fesm2022/raintonic-formaui-components-button.mjs +63 -17
  19. package/fesm2022/raintonic-formaui-components-button.mjs.map +1 -1
  20. package/fesm2022/raintonic-formaui-components-card.mjs +8 -8
  21. package/fesm2022/raintonic-formaui-components-card.mjs.map +1 -1
  22. package/fesm2022/raintonic-formaui-components-checkbox.mjs +2 -2
  23. package/fesm2022/raintonic-formaui-components-checkbox.mjs.map +1 -1
  24. package/fesm2022/raintonic-formaui-components-data-table.mjs +67 -9
  25. package/fesm2022/raintonic-formaui-components-data-table.mjs.map +1 -1
  26. package/fesm2022/raintonic-formaui-components-date-picker.mjs +63 -16
  27. package/fesm2022/raintonic-formaui-components-date-picker.mjs.map +1 -1
  28. package/fesm2022/raintonic-formaui-components-drawer.mjs +19 -4
  29. package/fesm2022/raintonic-formaui-components-drawer.mjs.map +1 -1
  30. package/fesm2022/raintonic-formaui-components-file-upload.mjs +25 -5
  31. package/fesm2022/raintonic-formaui-components-file-upload.mjs.map +1 -1
  32. package/fesm2022/raintonic-formaui-components-form-field.mjs +21 -6
  33. package/fesm2022/raintonic-formaui-components-form-field.mjs.map +1 -1
  34. package/fesm2022/raintonic-formaui-components-icon.mjs +2 -2
  35. package/fesm2022/raintonic-formaui-components-icon.mjs.map +1 -1
  36. package/fesm2022/raintonic-formaui-components-input.mjs +1 -1
  37. package/fesm2022/raintonic-formaui-components-input.mjs.map +1 -1
  38. package/fesm2022/raintonic-formaui-components-list.mjs +4 -4
  39. package/fesm2022/raintonic-formaui-components-list.mjs.map +1 -1
  40. package/fesm2022/raintonic-formaui-components-menu.mjs +4 -4
  41. package/fesm2022/raintonic-formaui-components-menu.mjs.map +1 -1
  42. package/fesm2022/raintonic-formaui-components-number-input.mjs +20 -5
  43. package/fesm2022/raintonic-formaui-components-number-input.mjs.map +1 -1
  44. package/fesm2022/raintonic-formaui-components-paginator.mjs +27 -7
  45. package/fesm2022/raintonic-formaui-components-paginator.mjs.map +1 -1
  46. package/fesm2022/raintonic-formaui-components-password-input.mjs +23 -5
  47. package/fesm2022/raintonic-formaui-components-password-input.mjs.map +1 -1
  48. package/fesm2022/raintonic-formaui-components-popover.mjs +2 -2
  49. package/fesm2022/raintonic-formaui-components-popover.mjs.map +1 -1
  50. package/fesm2022/raintonic-formaui-components-progressbar.mjs +32 -7
  51. package/fesm2022/raintonic-formaui-components-progressbar.mjs.map +1 -1
  52. package/fesm2022/raintonic-formaui-components-radio.mjs +4 -4
  53. package/fesm2022/raintonic-formaui-components-radio.mjs.map +1 -1
  54. package/fesm2022/raintonic-formaui-components-select.mjs +19 -4
  55. package/fesm2022/raintonic-formaui-components-select.mjs.map +1 -1
  56. package/fesm2022/raintonic-formaui-components-side-panel.mjs +19 -4
  57. package/fesm2022/raintonic-formaui-components-side-panel.mjs.map +1 -1
  58. package/fesm2022/raintonic-formaui-components-sidebar.mjs +23 -5
  59. package/fesm2022/raintonic-formaui-components-sidebar.mjs.map +1 -1
  60. package/fesm2022/raintonic-formaui-components-skeleton.mjs +2 -2
  61. package/fesm2022/raintonic-formaui-components-skeleton.mjs.map +1 -1
  62. package/fesm2022/raintonic-formaui-components-slider.mjs +23 -5
  63. package/fesm2022/raintonic-formaui-components-slider.mjs.map +1 -1
  64. package/fesm2022/raintonic-formaui-components-spinner.mjs +24 -7
  65. package/fesm2022/raintonic-formaui-components-spinner.mjs.map +1 -1
  66. package/fesm2022/raintonic-formaui-components-stepper.mjs +2 -2
  67. package/fesm2022/raintonic-formaui-components-stepper.mjs.map +1 -1
  68. package/fesm2022/raintonic-formaui-components-tab.mjs +2 -2
  69. package/fesm2022/raintonic-formaui-components-tab.mjs.map +1 -1
  70. package/fesm2022/raintonic-formaui-components-tag.mjs +21 -4
  71. package/fesm2022/raintonic-formaui-components-tag.mjs.map +1 -1
  72. package/fesm2022/raintonic-formaui-components-time-picker.mjs +26 -7
  73. package/fesm2022/raintonic-formaui-components-time-picker.mjs.map +1 -1
  74. package/fesm2022/raintonic-formaui-components-toggle.mjs +2 -2
  75. package/fesm2022/raintonic-formaui-components-toggle.mjs.map +1 -1
  76. package/fesm2022/raintonic-formaui-components-toolbar.mjs +41 -7
  77. package/fesm2022/raintonic-formaui-components-toolbar.mjs.map +1 -1
  78. package/fesm2022/raintonic-formaui-components-tooltip.mjs +2 -2
  79. package/fesm2022/raintonic-formaui-components-tooltip.mjs.map +1 -1
  80. package/fesm2022/raintonic-formaui-components-tree-table.mjs +35 -6
  81. package/fesm2022/raintonic-formaui-components-tree-table.mjs.map +1 -1
  82. package/fesm2022/raintonic-formaui-components-tree.mjs +23 -5
  83. package/fesm2022/raintonic-formaui-components-tree.mjs.map +1 -1
  84. package/fesm2022/raintonic-formaui-core.mjs +25 -1
  85. package/fesm2022/raintonic-formaui-core.mjs.map +1 -1
  86. package/fesm2022/raintonic-formaui-services-dialog.mjs +3 -3
  87. package/fesm2022/raintonic-formaui-services-dialog.mjs.map +1 -1
  88. package/fesm2022/raintonic-formaui-services-notification.mjs +2 -2
  89. package/fesm2022/raintonic-formaui-services-notification.mjs.map +1 -1
  90. package/fesm2022/raintonic-formaui-services-theme.mjs +3 -3
  91. package/fesm2022/raintonic-formaui-services-theme.mjs.map +1 -1
  92. package/fesm2022/raintonic-formaui-test-utils.mjs +21 -16
  93. package/fesm2022/raintonic-formaui-test-utils.mjs.map +1 -1
  94. package/fesm2022/raintonic-formaui.mjs +1 -1
  95. package/fesm2022/raintonic-formaui.mjs.map +1 -1
  96. package/llms-full.txt +33 -25
  97. package/llms.txt +1 -2
  98. package/package.json +1 -5
  99. package/styles/index.scss +2 -2
  100. package/styles/partials/_motion.scss +25 -0
  101. package/styles/partials/_theme.scss +6 -5
  102. package/styles/partials/components/_button.scss +361 -367
  103. package/styles/partials/themes/_dark.scss +14 -0
  104. package/styles/partials/themes/_light.scss +14 -0
  105. package/types/raintonic-formaui-components-alert.d.ts +11 -1
  106. package/types/raintonic-formaui-components-alert.d.ts.map +1 -1
  107. package/types/raintonic-formaui-components-autocomplete.d.ts +25 -7
  108. package/types/raintonic-formaui-components-autocomplete.d.ts.map +1 -1
  109. package/types/raintonic-formaui-components-badge.d.ts +20 -9
  110. package/types/raintonic-formaui-components-badge.d.ts.map +1 -1
  111. package/types/raintonic-formaui-components-big-menu.d.ts +12 -1
  112. package/types/raintonic-formaui-components-big-menu.d.ts.map +1 -1
  113. package/types/raintonic-formaui-components-breadcrumb.d.ts +11 -2
  114. package/types/raintonic-formaui-components-breadcrumb.d.ts.map +1 -1
  115. package/types/raintonic-formaui-components-button-group.d.ts +6 -6
  116. package/types/raintonic-formaui-components-button.d.ts +9 -7
  117. package/types/raintonic-formaui-components-button.d.ts.map +1 -1
  118. package/types/raintonic-formaui-components-card.d.ts +4 -4
  119. package/types/raintonic-formaui-components-checkbox.d.ts +1 -1
  120. package/types/raintonic-formaui-components-data-table.d.ts +56 -16
  121. package/types/raintonic-formaui-components-data-table.d.ts.map +1 -1
  122. package/types/raintonic-formaui-components-date-picker.d.ts +32 -4
  123. package/types/raintonic-formaui-components-date-picker.d.ts.map +1 -1
  124. package/types/raintonic-formaui-components-drawer.d.ts +10 -1
  125. package/types/raintonic-formaui-components-drawer.d.ts.map +1 -1
  126. package/types/raintonic-formaui-components-file-upload.d.ts +12 -1
  127. package/types/raintonic-formaui-components-file-upload.d.ts.map +1 -1
  128. package/types/raintonic-formaui-components-form-field.d.ts +12 -2
  129. package/types/raintonic-formaui-components-form-field.d.ts.map +1 -1
  130. package/types/raintonic-formaui-components-input.d.ts +1 -1
  131. package/types/raintonic-formaui-components-number-input.d.ts +11 -2
  132. package/types/raintonic-formaui-components-number-input.d.ts.map +1 -1
  133. package/types/raintonic-formaui-components-paginator.d.ts +13 -1
  134. package/types/raintonic-formaui-components-paginator.d.ts.map +1 -1
  135. package/types/raintonic-formaui-components-password-input.d.ts +12 -2
  136. package/types/raintonic-formaui-components-password-input.d.ts.map +1 -1
  137. package/types/raintonic-formaui-components-progressbar.d.ts +14 -1
  138. package/types/raintonic-formaui-components-progressbar.d.ts.map +1 -1
  139. package/types/raintonic-formaui-components-select.d.ts.map +1 -1
  140. package/types/raintonic-formaui-components-side-panel.d.ts +10 -1
  141. package/types/raintonic-formaui-components-side-panel.d.ts.map +1 -1
  142. package/types/raintonic-formaui-components-sidebar.d.ts +12 -1
  143. package/types/raintonic-formaui-components-sidebar.d.ts.map +1 -1
  144. package/types/raintonic-formaui-components-slider.d.ts +12 -1
  145. package/types/raintonic-formaui-components-slider.d.ts.map +1 -1
  146. package/types/raintonic-formaui-components-spinner.d.ts +12 -2
  147. package/types/raintonic-formaui-components-spinner.d.ts.map +1 -1
  148. package/types/raintonic-formaui-components-tag.d.ts +10 -1
  149. package/types/raintonic-formaui-components-tag.d.ts.map +1 -1
  150. package/types/raintonic-formaui-components-time-picker.d.ts +14 -2
  151. package/types/raintonic-formaui-components-time-picker.d.ts.map +1 -1
  152. package/types/raintonic-formaui-components-toggle.d.ts +1 -1
  153. package/types/raintonic-formaui-components-toolbar.d.ts +22 -4
  154. package/types/raintonic-formaui-components-toolbar.d.ts.map +1 -1
  155. package/types/raintonic-formaui-components-tree-table.d.ts +29 -4
  156. package/types/raintonic-formaui-components-tree-table.d.ts.map +1 -1
  157. package/types/raintonic-formaui-components-tree.d.ts +12 -1
  158. package/types/raintonic-formaui-components-tree.d.ts.map +1 -1
  159. package/types/raintonic-formaui-core.d.ts +19 -2
  160. package/types/raintonic-formaui-core.d.ts.map +1 -1
  161. package/types/raintonic-formaui-services-dialog.d.ts +1 -1
  162. package/types/raintonic-formaui-services-theme.d.ts +3 -3
  163. package/types/raintonic-formaui-test-utils.d.ts +15 -2
  164. package/types/raintonic-formaui-test-utils.d.ts.map +1 -1
  165. package/types/raintonic-formaui.d.ts +1 -1
  166. package/fesm2022/raintonic-formaui-components-dynamic-form.mjs +0 -266
  167. package/fesm2022/raintonic-formaui-components-dynamic-form.mjs.map +0 -1
  168. package/types/raintonic-formaui-components-dynamic-form.d.ts +0 -412
  169. package/types/raintonic-formaui-components-dynamic-form.d.ts.map +0 -1
@@ -1,412 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InputSignal, OutputEmitterRef } from '@angular/core';
3
- import { FormGroup, FormControl } from '@angular/forms';
4
-
5
- /**
6
- * Input types supported by the dynamic form renderer
7
- */
8
- type DynamicFormInputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'date' | 'time' | 'datetime-local';
9
- /**
10
- * Field types supported by the dynamic form renderer
11
- */
12
- type DynamicFormFieldType = 'input' | 'select' | 'autocomplete' | 'textarea' | 'file' | 'checkbox' | 'spacer';
13
- /**
14
- * Title importance levels - maps to typography classes
15
- * - h1: fui-display-xl (largest)
16
- * - h2: fui-display-lg
17
- * - h3: fui-display-md
18
- * - h4: fui-display-sm
19
- * - h5: fui-display-xs
20
- * - h6: fui-text-xl (smallest heading)
21
- */
22
- type DynamicFormTitleImportance = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
23
- /**
24
- * Option for select/autocomplete fields
25
- */
26
- interface DynamicFormOption {
27
- value: unknown;
28
- label: string;
29
- disabled?: boolean;
30
- group?: string;
31
- }
32
- /**
33
- * Configuration for file input fields
34
- */
35
- interface DynamicFormFileConfig {
36
- accept?: string;
37
- multiple?: boolean;
38
- maxSize?: number;
39
- }
40
- /**
41
- * Base configuration for all field types
42
- */
43
- interface DynamicFormFieldBase {
44
- /** Form control name - must match the key in the FormGroup */
45
- key: string;
46
- /** Field type */
47
- type: DynamicFormFieldType;
48
- /** Label text */
49
- label?: string;
50
- /** Placeholder text */
51
- placeholder?: string;
52
- /** Hint/helper text displayed below the field */
53
- hint?: string;
54
- /** Error messages mapped to validation error keys */
55
- errors?: Record<string, string>;
56
- /** Whether the field is disabled */
57
- disabled?: boolean;
58
- /** Whether the field is readonly */
59
- readonly?: boolean;
60
- /** Custom CSS class(es) for the field container */
61
- className?: string;
62
- /** Whether to hide the label */
63
- hideLabel?: boolean;
64
- /** Column span in a flex row (1-12, default: auto) */
65
- colSpan?: number;
66
- /** Prefix icon name */
67
- prefixIcon?: string;
68
- /** Suffix icon name */
69
- suffixIcon?: string;
70
- }
71
- /**
72
- * Configuration for input fields
73
- */
74
- interface DynamicFormInputField extends DynamicFormFieldBase {
75
- type: 'input';
76
- /** HTML input type */
77
- inputType?: DynamicFormInputType;
78
- /** Maximum length for text inputs */
79
- maxLength?: number;
80
- /** Minimum length for text inputs */
81
- minLength?: number;
82
- /** Pattern for text validation */
83
- pattern?: string;
84
- /** Minimum value for number inputs */
85
- min?: number;
86
- /** Maximum value for number inputs */
87
- max?: number;
88
- /** Step value for number inputs */
89
- step?: number;
90
- }
91
- /**
92
- * Configuration for textarea fields
93
- */
94
- interface DynamicFormTextareaField extends DynamicFormFieldBase {
95
- type: 'textarea';
96
- /** Number of rows */
97
- rows?: number;
98
- /** Maximum length */
99
- maxLength?: number;
100
- /** Minimum length */
101
- minLength?: number;
102
- /** Whether to auto-resize based on content */
103
- autoResize?: boolean;
104
- }
105
- /**
106
- * Configuration for select fields
107
- */
108
- interface DynamicFormSelectField extends DynamicFormFieldBase {
109
- type: 'select';
110
- /** Options for the select */
111
- options: DynamicFormOption[];
112
- /** Allow multiple selection */
113
- multiple?: boolean;
114
- /** Custom comparison function for value equality */
115
- compareWith?: (o1: unknown, o2: unknown) => boolean;
116
- }
117
- /**
118
- * Configuration for autocomplete fields
119
- */
120
- interface DynamicFormAutocompleteField extends DynamicFormFieldBase {
121
- type: 'autocomplete';
122
- /** Options for the autocomplete (can use FuiAutocompleteOption for groups) */
123
- options: DynamicFormOption[];
124
- /** Show add new button */
125
- showAddButton?: boolean;
126
- /** Show refresh button */
127
- showRefreshButton?: boolean;
128
- /** Label for add button */
129
- addButtonLabel?: string;
130
- /** Label for refresh button */
131
- refreshButtonLabel?: string;
132
- /** Text to show when no options match */
133
- noOptionsText?: string;
134
- /** Placeholder for search input */
135
- searchPlaceholder?: string;
136
- }
137
- /**
138
- * Configuration for file input fields
139
- */
140
- interface DynamicFormFileField extends DynamicFormFieldBase {
141
- type: 'file';
142
- /** File configuration */
143
- fileConfig?: DynamicFormFileConfig;
144
- }
145
- /**
146
- * Configuration for checkbox fields
147
- */
148
- interface DynamicFormCheckboxField extends DynamicFormFieldBase {
149
- type: 'checkbox';
150
- /** Label position relative to checkbox */
151
- labelPosition?: 'before' | 'after';
152
- }
153
- /**
154
- * Configuration for spacer (empty area)
155
- */
156
- interface DynamicFormSpacerField extends Omit<DynamicFormFieldBase, 'key' | 'label' | 'placeholder' | 'hint' | 'errors' | 'disabled' | 'readonly' | 'prefixIcon' | 'suffixIcon'> {
157
- type: 'spacer';
158
- key?: string;
159
- }
160
- /**
161
- * Union type for all field configurations
162
- */
163
- type DynamicFormField = DynamicFormInputField | DynamicFormTextareaField | DynamicFormSelectField | DynamicFormAutocompleteField | DynamicFormFileField | DynamicFormCheckboxField | DynamicFormSpacerField;
164
- /**
165
- * Configuration for a row of fields
166
- */
167
- interface DynamicFormRow {
168
- /** Fields in this row */
169
- fields: DynamicFormField[];
170
- /** Gap between fields (uses spacing tokens, e.g., '03' for spacing-03) */
171
- gap?: string;
172
- /** Custom CSS class(es) for the row */
173
- className?: string;
174
- /** Alignment of items in the row */
175
- align?: 'start' | 'center' | 'end' | 'stretch';
176
- /** Justification of items in the row */
177
- justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
178
- }
179
- /**
180
- * Configuration for a section title
181
- */
182
- interface DynamicFormTitle {
183
- /** Title text */
184
- text: string;
185
- /** Importance level (h1-h6) */
186
- importance: DynamicFormTitleImportance;
187
- /** Custom CSS class(es) for the title */
188
- className?: string;
189
- /** Description/subtitle text */
190
- description?: string;
191
- }
192
- /**
193
- * Configuration for a section (group of rows with optional title)
194
- */
195
- interface DynamicFormSection {
196
- /** Optional section title */
197
- title?: DynamicFormTitle;
198
- /** Rows in this section */
199
- rows: DynamicFormRow[];
200
- /** Custom CSS class(es) for the section */
201
- className?: string;
202
- /** Gap between rows (uses spacing tokens, e.g., '05' for spacing-05) */
203
- rowGap?: string;
204
- }
205
- /**
206
- * Complete form configuration
207
- */
208
- interface DynamicFormConfig {
209
- /** Sections of the form */
210
- sections: DynamicFormSection[];
211
- /** Global gap between sections (uses spacing tokens) */
212
- sectionGap?: string;
213
- /** Custom CSS class(es) for the form container */
214
- className?: string;
215
- }
216
- /**
217
- * Event emitted when an autocomplete action is triggered
218
- */
219
- interface DynamicFormAutocompleteEvent {
220
- fieldKey: string;
221
- action: 'add' | 'refresh';
222
- }
223
- /**
224
- * Event emitted when a file is selected
225
- */
226
- interface DynamicFormFileEvent {
227
- fieldKey: string;
228
- files: FileList | null;
229
- }
230
-
231
- /**
232
- * # DynamicFormRenderer Component
233
- *
234
- * A component that automatically renders forms based on a JSON configuration.
235
- * It takes a FormGroup and a configuration object that specifies the form structure.
236
- *
237
- * ## Features
238
- * - Supports multiple field types: input, select, autocomplete, textarea, file, checkbox
239
- * - Flexible row-based layout with configurable column spans
240
- * - Section grouping with customizable titles
241
- * - Empty area/spacer support for layout control
242
- * - Full integration with Angular reactive forms
243
- * - Responsive design with mobile-first approach
244
- *
245
- * ## Usage
246
- *
247
- * ### Basic Form
248
- * ```typescript
249
- * @Component({
250
- * template: `
251
- * <fui-dynamic-form-renderer
252
- * [formGroup]="myForm"
253
- * [config]="formConfig"
254
- * ></fui-dynamic-form-renderer>
255
- * `
256
- * })
257
- * export class MyComponent {
258
- * myForm = new FormGroup({
259
- * firstName: new FormControl(''),
260
- * lastName: new FormControl(''),
261
- * email: new FormControl(''),
262
- * });
263
- *
264
- * formConfig: DynamicFormConfig = {
265
- * sections: [{
266
- * title: { text: 'Personal Information', importance: 'h3' },
267
- * rows: [
268
- * {
269
- * fields: [
270
- * { key: 'firstName', type: 'input', label: 'First Name', colSpan: 6 },
271
- * { key: 'lastName', type: 'input', label: 'Last Name', colSpan: 6 },
272
- * ]
273
- * },
274
- * {
275
- * fields: [
276
- * { key: 'email', type: 'input', inputType: 'email', label: 'Email', colSpan: 12 },
277
- * ]
278
- * }
279
- * ]
280
- * }]
281
- * };
282
- * }
283
- * ```
284
- *
285
- * ### With Validation Errors
286
- * ```typescript
287
- * formConfig: DynamicFormConfig = {
288
- * sections: [{
289
- * rows: [{
290
- * fields: [{
291
- * key: 'email',
292
- * type: 'input',
293
- * inputType: 'email',
294
- * label: 'Email',
295
- * errors: {
296
- * required: 'Email is required',
297
- * email: 'Please enter a valid email'
298
- * }
299
- * }]
300
- * }]
301
- * }]
302
- * };
303
- * ```
304
- *
305
- * ### With Select and Autocomplete
306
- * ```typescript
307
- * formConfig: DynamicFormConfig = {
308
- * sections: [{
309
- * rows: [{
310
- * fields: [
311
- * {
312
- * key: 'country',
313
- * type: 'select',
314
- * label: 'Country',
315
- * options: [
316
- * { value: 'us', label: 'United States' },
317
- * { value: 'ca', label: 'Canada' },
318
- * ],
319
- * colSpan: 6
320
- * },
321
- * {
322
- * key: 'city',
323
- * type: 'autocomplete',
324
- * label: 'City',
325
- * options: [
326
- * { value: 'nyc', label: 'New York' },
327
- * { value: 'la', label: 'Los Angeles' },
328
- * ],
329
- * showAddButton: true,
330
- * colSpan: 6
331
- * }
332
- * ]
333
- * }]
334
- * }]
335
- * };
336
- * ```
337
- */
338
- declare class FuiDynamicFormRendererComponent {
339
- /**
340
- * The FormGroup instance to bind the form to
341
- */
342
- readonly formGroup: InputSignal<FormGroup>;
343
- /**
344
- * The configuration object that defines the form structure
345
- */
346
- readonly config: InputSignal<DynamicFormConfig>;
347
- /**
348
- * Emitted when an autocomplete action (add/refresh) is triggered
349
- */
350
- readonly autocompleteAction: OutputEmitterRef<DynamicFormAutocompleteEvent>;
351
- /**
352
- * Emitted when a file input changes
353
- */
354
- readonly fileChange: OutputEmitterRef<DynamicFormFileEvent>;
355
- /**
356
- * Default comparison function for select components
357
- */
358
- readonly defaultCompareWith: (o1: unknown, o2: unknown) => boolean;
359
- /**
360
- * Gets a FormControl from the FormGroup by key
361
- * @param key The control name/key
362
- * @returns The FormControl instance
363
- */
364
- getControl(key: string): FormControl;
365
- /**
366
- * Converts error object entries to array for iteration
367
- * @param errors The errors object from field config
368
- * @returns Array of key-value pairs
369
- */
370
- getErrorEntries(errors: Record<string, string>): {
371
- key: string;
372
- value: string;
373
- }[];
374
- /**
375
- * Gets CSS align-items value from row align setting
376
- * @param align The row alignment setting
377
- * @returns CSS align-items value
378
- */
379
- getAlignItems(align?: DynamicFormRow['align']): string;
380
- /**
381
- * Gets CSS justify-content value from row justify setting
382
- * @param justify The row justification setting
383
- * @returns CSS justify-content value
384
- */
385
- getJustifyContent(justify?: DynamicFormRow['justify']): string;
386
- /**
387
- * Handles autocomplete add/refresh button clicks
388
- * @param fieldKey The field key that triggered the action
389
- * @param action The action type ('add' or 'refresh')
390
- */
391
- onAutocompleteAction(fieldKey: string, action: 'add' | 'refresh'): void;
392
- /**
393
- * Handles file input changes
394
- * @param event The input change event
395
- * @param fieldKey The field key
396
- */
397
- onFileChange(event: Event, fieldKey: string): void;
398
- /**
399
- * Type guard to check if a field is not a spacer
400
- * @param field The field configuration
401
- * @returns Whether the field has a key
402
- */
403
- isFieldWithKey(field: DynamicFormField): field is Exclude<DynamicFormField, {
404
- type: 'spacer';
405
- }>;
406
- static ɵfac: i0.ɵɵFactoryDeclaration<FuiDynamicFormRendererComponent, never>;
407
- static ɵcmp: i0.ɵɵComponentDeclaration<FuiDynamicFormRendererComponent, "fui-dynamic-form-renderer", never, { "formGroup": { "alias": "formGroup"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "autocompleteAction": "autocompleteAction"; "fileChange": "fileChange"; }, never, never, true, never>;
408
- }
409
-
410
- export { FuiDynamicFormRendererComponent };
411
- export type { DynamicFormAutocompleteEvent, DynamicFormAutocompleteField, DynamicFormCheckboxField, DynamicFormConfig, DynamicFormField, DynamicFormFieldBase, DynamicFormFieldType, DynamicFormFileConfig, DynamicFormFileEvent, DynamicFormFileField, DynamicFormInputField, DynamicFormInputType, DynamicFormOption, DynamicFormRow, DynamicFormSection, DynamicFormSelectField, DynamicFormSpacerField, DynamicFormTextareaField, DynamicFormTitle, DynamicFormTitleImportance };
412
- //# sourceMappingURL=raintonic-formaui-components-dynamic-form.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"raintonic-formaui-components-dynamic-form.d.ts","sources":["../../../lib/components/dynamic-form/dynamic-form.types.ts","../../../lib/components/dynamic-form/dynamic-form-renderer.component.ts"],"mappings":";;;;AAAA;;AAEG;AACG,KAAM,oBAAoB;AAYhC;;AAEG;KACS,oBAAoB;AAEhC;;;;;;;;AAQG;AACG,KAAM,0BAA0B;AAEtC;;AAEG;UACc,iBAAiB;;;;;AAKjC;AAED;;AAEG;UACc,qBAAqB;;;;AAIrC;AAED;;AAEG;UACc,oBAAoB;;;;UAI7B,oB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