dynamic-mui 2.5.0 → 2.5.2

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 (85) hide show
  1. package/README.md +61 -0
  2. package/dist/AIForm-CAlzDffx.js +44 -0
  3. package/dist/{AIForm-Czsvpf7g.mjs → AIForm-DhR29Z6d.mjs} +2712 -2521
  4. package/dist/{accordion-8p1FoyfL.js → accordion-B1Laqpu6.js} +1 -1
  5. package/dist/{accordion-CQ4Vldth.mjs → accordion-DRo0ZP5u.mjs} +1 -1
  6. package/dist/{addressfield-N7DifI3i.mjs → addressfield-1Ht4A4u9.mjs} +1 -1
  7. package/dist/{addressfield-T4e_d87q.js → addressfield-DEu_5gQv.js} +1 -1
  8. package/dist/ai/index.cjs +1 -1
  9. package/dist/ai/index.mjs +1 -1
  10. package/dist/{asyncautocomplete-BB_MyjIj.mjs → asyncautocomplete-BPTtLquY.mjs} +1 -1
  11. package/dist/{asyncautocomplete-CpO6EO3W.js → asyncautocomplete-DPn-jVl4.js} +1 -1
  12. package/dist/{bar-BOse0ZkP.js → bar-CEFjy1KY.js} +1 -1
  13. package/dist/{bar-CbpJ-MEV.mjs → bar-CkCZunh6.mjs} +1 -1
  14. package/dist/{cascadeselect-PzCw6JHX.mjs → cascadeselect-BKqX6e3j.mjs} +1 -1
  15. package/dist/{cascadeselect-C30RVgmc.js → cascadeselect-DCMmaKxY.js} +1 -1
  16. package/dist/collection-B6mXg1EE.js +1 -0
  17. package/dist/collection-D6iGJnXe.mjs +1157 -0
  18. package/dist/{colorpicker-CMhVJNQT.mjs → colorpicker-DRC4NHgd.mjs} +1 -1
  19. package/dist/{colorpicker-DoNrfUY7.js → colorpicker-VOk6ZC89.js} +1 -1
  20. package/dist/components/controls/Collection/CollectionList.d.ts +22 -0
  21. package/dist/components/controls/Collection/ItemDialog.d.ts +20 -0
  22. package/dist/components/controls/Collection/collection.d.ts +9 -0
  23. package/dist/components/controls/Collection/parts.d.ts +39 -0
  24. package/dist/components/controls/Collection/tree.d.ts +18 -0
  25. package/dist/components/controls/Collection/ui.d.ts +49 -0
  26. package/dist/components/controls/index.d.ts +1 -0
  27. package/dist/{consentfield-Bp1dXs7L.js → consentfield-Bogbxanw.js} +1 -1
  28. package/dist/{consentfield-DIa3sXrr.mjs → consentfield-DHIVXzhj.mjs} +1 -1
  29. package/dist/{datatable-CO0Iv6R6.mjs → datatable-DU0W9LHs.mjs} +1 -1
  30. package/dist/{datatable-CyfyY3Wh.js → datatable-DUdM8xtY.js} +1 -1
  31. package/dist/dynamic-mui.cjs +1 -1
  32. package/dist/dynamic-mui.mjs +2 -2
  33. package/dist/{editabletable-C_MA7QEb.mjs → editabletable-D801lgHY.mjs} +1 -1
  34. package/dist/{editabletable-CCDJ2BPB.js → editabletable-De_BiNVx.js} +1 -1
  35. package/dist/{fileupload-DX3dxKFN.mjs → fileupload-CozsBlXX.mjs} +1 -1
  36. package/dist/{fileupload-WV5shCIK.js → fileupload-YGYUpPXo.js} +1 -1
  37. package/dist/{formrepeater-D5K8qgAA.mjs → formrepeater-LXzfFY3V.mjs} +1 -1
  38. package/dist/{formrepeater-Cxu8Dk8P.js → formrepeater-iD9e1ow4.js} +1 -1
  39. package/dist/{formwizard-B-HCfrnp.mjs → formwizard-Bb0LOmIN.mjs} +1 -1
  40. package/dist/{formwizard-HRF3hTyF.js → formwizard-CuDayHm6.js} +1 -1
  41. package/dist/{geofield-DlqMZ_hl.mjs → geofield-B22-bJ0f.mjs} +1 -1
  42. package/dist/{geofield-0k7PkHRa.js → geofield-DkB-js8Y.js} +1 -1
  43. package/dist/{group-BFDXdAfg.mjs → group-B5vjjzsk.mjs} +1 -1
  44. package/dist/{group-mONe185y.js → group-B_WI43pI.js} +1 -1
  45. package/dist/{intlphone-zZ0xd-DG.js → intlphone-CkHQ2YvK.js} +1 -1
  46. package/dist/{intlphone-Bbk2UF9T.mjs → intlphone-DnqGCNdx.mjs} +1 -1
  47. package/dist/{keyvaluefield-B6oRZzic.js → keyvaluefield-CX97ykNT.js} +1 -1
  48. package/dist/{keyvaluefield-BynOkgTq.mjs → keyvaluefield-Dm5dRen5.mjs} +1 -1
  49. package/dist/{line-ChQNdVfl.js → line-CjQk91Nq.js} +1 -1
  50. package/dist/{line-DebtzkF3.mjs → line-pFBz6CTL.mjs} +1 -1
  51. package/dist/{lineitemlist-CjFNpqI5.mjs → lineitemlist-B5JJqhjg.mjs} +1 -1
  52. package/dist/{lineitemlist-CI0LwIUz.js → lineitemlist-C39r0qRM.js} +1 -1
  53. package/dist/{list-B5wBsflP.mjs → list-73Pemuh_.mjs} +1 -1
  54. package/dist/{list-CJFKxKyN.js → list-CkVSoMPM.js} +1 -1
  55. package/dist/{locationfield-CrOMF7jt.js → locationfield-DLFggIVT.js} +1 -1
  56. package/dist/{locationfield-DQj3yDCa.mjs → locationfield-DY8wZ-Vv.mjs} +1 -1
  57. package/dist/{markdowneditor-Jaz7uTyZ.js → markdowneditor-BtF43ekZ.js} +1 -1
  58. package/dist/{markdowneditor-emqJhQV7.mjs → markdowneditor-VfwnN9cX.mjs} +1 -1
  59. package/dist/{matrixfield-j5mf9lh5.mjs → matrixfield-BIKQg7FM.mjs} +1 -1
  60. package/dist/{matrixfield-BPJsawGk.js → matrixfield-BjdsHrtX.js} +1 -1
  61. package/dist/{multitextbox-DQbcEqkM.js → multitextbox-BNZ6kVPG.js} +1 -1
  62. package/dist/{multitextbox-CyZiTd_E.mjs → multitextbox-DqLIw1i-.mjs} +1 -1
  63. package/dist/{npsscale-oUUyPdxP.js → npsscale-B2JYIHr8.js} +1 -1
  64. package/dist/{npsscale-BIkJMD4Z.mjs → npsscale-CWFVm0wp.mjs} +1 -1
  65. package/dist/{numberstepper-DRIvgtcH.js → numberstepper-Cpb7ceR4.js} +1 -1
  66. package/dist/{numberstepper-thjufBMI.mjs → numberstepper-DLwZsyV1.mjs} +1 -1
  67. package/dist/{pie-4SHUYmRs.mjs → pie-AC1_bQ6M.mjs} +1 -1
  68. package/dist/{pie-COA-uozf.js → pie-BZhroZyG.js} +1 -1
  69. package/dist/{richtexteditor-CvZ3Y7X1.mjs → richtexteditor-Bwn62mA-.mjs} +1 -1
  70. package/dist/{richtexteditor-BSV7hG6d.js → richtexteditor-DDIzZxki.js} +1 -1
  71. package/dist/schema.d.ts +10 -2
  72. package/dist/{signature-6QvVbfkT.js → signature-DtXYAy1a.js} +1 -1
  73. package/dist/{signature-DeDxnc8U.mjs → signature-z2PB3zv7.mjs} +1 -1
  74. package/dist/{stepper-Sx3SWXTM.mjs → stepper-B8Blpvp8.mjs} +1 -1
  75. package/dist/{stepper-CDsErlLH.js → stepper-o3Ef6Czl.js} +1 -1
  76. package/dist/{summaryfield-DxzQ3g6Z.js → summaryfield-2t_sXF8P.js} +1 -1
  77. package/dist/{summaryfield-CAJjGmE2.mjs → summaryfield-CTQL3W7R.mjs} +1 -1
  78. package/dist/{tabs-CnDP2ngC.js → tabs-DlIOUQ5z.js} +1 -1
  79. package/dist/{tabs-CvHNZU5o.mjs → tabs-lqveygGh.mjs} +1 -1
  80. package/dist/{tagsinput-bWU3Mem0.mjs → tagsinput-C2awcyJT.mjs} +1 -1
  81. package/dist/{tagsinput-DZcLPuX1.js → tagsinput-g_-HLhtt.js} +1 -1
  82. package/dist/types.d.ts +188 -0
  83. package/dist/util/collection.d.ts +83 -0
  84. package/package.json +1 -1
  85. package/dist/AIForm-LoeI18mO.js +0 -43
package/README.md CHANGED
@@ -352,6 +352,67 @@ alert · divider · typography · charts (bar / line / pie / mixed), and more.
352
352
  Each control is configured through `props` (its `MuiAttributes` /
353
353
  `MuiBoxAttributes` map straight onto the underlying MUI component).
354
354
 
355
+ ### Nested collections (`collection`)
356
+
357
+ One-to-many data entry: records are added and edited in a pop-up form, and each
358
+ record can own nested lists, to any depth. For example **Customer Locations →
359
+ Services + Backflow assemblies**. By default it stays simple: each customer is a
360
+ plain card (name, status, address, its facts as label → value with a small icon),
361
+ and its services and backflows are plain tables with an "+ Add Service" button,
362
+ one row per item and Edit / Delete on each row. On phones, table rows stack.
363
+ Everything — content, layout, wording and styling — is controlled from the JSON:
364
+
365
+ ```js
366
+ {
367
+ type: 'collection',
368
+ props: {
369
+ id: 'customerLocations',
370
+ itemLabel: 'Customer Location', // → "Add Customer Location"
371
+ icon: 'location_on',
372
+ fields: [/* the dialog's FormField[] */],
373
+ display: {
374
+ title: 'customerName',
375
+ subtitle: '{address}, {city}, {state} {zip}',
376
+ subtitleIcon: 'place',
377
+ badge: { field: 'status', colors: { active: 'success', pending: 'warning' } },
378
+ details: [ // label → value, small icon in front
379
+ { field: 'accountNumber', label: 'Account #', icon: 'tag' },
380
+ { field: 'phone', label: 'Phone', icon: 'call' },
381
+ ],
382
+ },
383
+ collections: [ // nested lists, same options
384
+ {
385
+ id: 'services', itemLabel: 'Service', icon: 'water_drop', min: 1,
386
+ fields: [/* … */],
387
+ display: { title: 'serviceType', titleLabel: 'Service type', details: ['meterNumber', 'meterSize'] },
388
+ },
389
+ { id: 'backflows', itemLabel: 'Backflow', icon: 'plumbing', fields: [/* … */] },
390
+ ],
391
+ },
392
+ rules: { validation: [{ rule: 'mandatory', message: 'Add at least one customer location' }] },
393
+ }
394
+ ```
395
+
396
+ | Option | What it controls |
397
+ | --- | --- |
398
+ | `layout` | `cards` (top-level default) or `table` (nested default: one row per item, one column per detail; stacked rows on phones). |
399
+ | `display` | Title / subtitle (field id, `'{a}, {b}'` template or id list), `subtitleIcon`, status `badge` (`{ field, label, colors }`), `avatar` (`none` by default), `titleLabel` (table heading of the title column), and the `details` shown as label → value — table columns too (`{ field, label, icon, span }`, `detailsLayout` `grid` · `list` · `inline`, `columns`, `minColumnWidth`, `showIcons`). Without `details`, every other field is shown. |
400
+ | `addButton` | `position` (`header` default · `footer` · `both` · `none`), `variant` (`contained` top-level default · `outlined` nested default · `text` · `soft` · `dashed`), `icon`, `size`, `fullWidth`. |
401
+ | `actions` | `edit` and `delete` (on by default); `duplicate`, `move` and `collapse` (opt-in). |
402
+ | `texts` | Every label, button, aria-label and message (placeholders `{label}`, `{labelLower}`, `{plural}`, `{title}`, `{parent}`…). Nested levels inherit them, except the empty-state copy. |
403
+ | `styles` | An MUI `sx` override per part, merged over the built-in look: `root`, `header`, `headerIcon`, `headerTitle`, `headerCount`, `headerDescription`, `error`, `list`, `addButton`, `empty`, `emptyTitle`, `emptyText`, `item`, `itemHeader`, `avatar`, `itemTitle`, `badge`, `subtitle`, `actions`, `actionButton`, `counts`, `details`, `detail`, `detailIcon`, `detailLabel`, `detailValue`, `sections`, `section`, `table`, `tableHead`, `tableHeadCell`, `tableRow`, `tableCell`, `rowActions`, `mobileRow`, `dialog`, `dialogHeader`, `dialogTitle`, `dialogDescription`, `dialogContext`, `dialogContent`, `dialogActions`, `dialogCancel`, `dialogSaveAnother`, `dialogSave`, `menu`, `menuItem`, `confirm`, `confirmTitle`, `confirmText`, `confirmCancel`, `confirmDelete`. |
404
+ | `variant`, `color`, `icon`, `sectionColumns` | Card look (`outlined` default · `card` · `flat`), accent colour for buttons (palette name or any CSS colour), icon, and how many nested sections sit side by side (default 1). |
405
+ | `dialog` | `maxWidth`, `description`, `addAnother`, `fullScreen` (`'mobile'` · `true` · `false`), `spacing`. |
406
+ | `min`, `max`, `minMessage`, `maxMessage`, `confirmDelete`, `defaultCollapsed` | Validation and behaviour. |
407
+
408
+ The value is plain JSON:
409
+ `[{ customerName, address, …, services: [{ … }], backflows: [{ … }] }]`.
410
+ It can be passed back in with `patch`. `min` / `max` are checked on submit at
411
+ every level. The delete confirmation lists the nested items it will remove, the
412
+ add dialog has "Save & add another", and `reviewMode` / print / PDF list every
413
+ nested record. A complete, ready-to-use schema plus sample data is in
414
+ [`examples/collection-customer-locations.json`](examples/collection-customer-locations.json).
415
+
355
416
  ### Theming
356
417
 
357
418
  Controls render under **your** MUI theme. Date/time pickers automatically match