extended-dynamic-forms 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -0
- package/dist/extended-dynamic-forms-vanilla.js +6 -6
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -260,6 +260,50 @@ const uiSchema = {
|
|
|
260
260
|
};
|
|
261
261
|
```
|
|
262
262
|
|
|
263
|
+
## Array Fields
|
|
264
|
+
|
|
265
|
+
Extended Dynamic Forms provides custom-styled array field templates using shadcn/ui components. Arrays automatically get styled add/remove buttons, reordering controls, and proper visual hierarchy.
|
|
266
|
+
|
|
267
|
+
### Basic Array Example
|
|
268
|
+
```tsx
|
|
269
|
+
const schema = {
|
|
270
|
+
type: 'object',
|
|
271
|
+
properties: {
|
|
272
|
+
directors: {
|
|
273
|
+
type: 'array',
|
|
274
|
+
title: 'Company Directors',
|
|
275
|
+
items: {
|
|
276
|
+
type: 'object',
|
|
277
|
+
properties: {
|
|
278
|
+
firstName: { type: 'string', title: 'First Name' },
|
|
279
|
+
lastName: { type: 'string', title: 'Last Name' },
|
|
280
|
+
email: { type: 'string', format: 'email', title: 'Email' }
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
const uiSchema = {
|
|
288
|
+
directors: {
|
|
289
|
+
'ui:options': {
|
|
290
|
+
orderable: true, // Enable move up/down buttons
|
|
291
|
+
addable: true, // Enable add button
|
|
292
|
+
removable: true // Enable remove button
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Array Features
|
|
299
|
+
- 🎨 **Styled with shadcn/ui Card components**: Clean, modern appearance
|
|
300
|
+
- ➕ **Add button**: Prominent "Add [Item]" button at the bottom
|
|
301
|
+
- 🗑️ **Remove buttons**: Individual remove buttons for each item
|
|
302
|
+
- 🔄 **Reordering**: Move items up/down with chevron buttons
|
|
303
|
+
- 📱 **Responsive**: Mobile-friendly controls
|
|
304
|
+
|
|
305
|
+
Arrays work seamlessly with all other custom widgets and fields in the library, including within nested structures.
|
|
306
|
+
|
|
263
307
|
## Central Event Orchestration System
|
|
264
308
|
|
|
265
309
|
The library features a comprehensive event orchestration system that captures all form field events and enables webhook integration.
|