robobyte-front-builder 1.0.26 → 1.0.28

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 (88) hide show
  1. package/INTEGRATION.md +6 -0
  2. package/LICENSE +65 -0
  3. package/README.md +166 -21
  4. package/docs/ReportViewer.md +581 -0
  5. package/docs/fetchReportData.md +379 -0
  6. package/docs/printLayout.md +405 -0
  7. package/package.json +29 -1
  8. package/src/lib/index.js +14 -0
  9. package/src/lib/muiTheme.js +655 -0
  10. package/src/lib/providers/RoboByteFrontBuilderProvider.jsx +45 -1
  11. package/src/pages/_app.js +1 -0
  12. package/src/pages/printBuilder/index.jsx +26 -19
  13. package/src/pages/viewBuilder/index.jsx +29 -19
  14. package/training/00-index.md +168 -0
  15. package/training/01-input.md +144 -0
  16. package/training/02-checkbox.md +107 -0
  17. package/training/03-dropdown.md +135 -0
  18. package/training/04-datepicker.md +139 -0
  19. package/training/05-radio.md +123 -0
  20. package/training/06-number.md +133 -0
  21. package/training/07-textarea.md +114 -0
  22. package/training/08-richtext.md +112 -0
  23. package/training/09-tag.md +110 -0
  24. package/training/10-time.md +107 -0
  25. package/training/11-toggle.md +108 -0
  26. package/training/12-signature.md +107 -0
  27. package/training/13-autocomplete.md +134 -0
  28. package/training/14-button.md +168 -0
  29. package/training/15-label.md +138 -0
  30. package/training/16-header.md +128 -0
  31. package/training/17-divider.md +96 -0
  32. package/training/18-image.md +105 -0
  33. package/training/19-link.md +108 -0
  34. package/training/20-banner.md +122 -0
  35. package/training/21-progress-circle.md +101 -0
  36. package/training/22-progress-line.md +93 -0
  37. package/training/23-menu.md +139 -0
  38. package/training/24-popover.md +114 -0
  39. package/training/25-layout.md +116 -0
  40. package/training/26-layout-cell.md +143 -0
  41. package/training/27-card.md +87 -0
  42. package/training/28-wizard.md +126 -0
  43. package/training/29-wizard-step.md +92 -0
  44. package/training/30-repeater.md +123 -0
  45. package/training/31-dialog.md +131 -0
  46. package/training/32-breadcrumb.md +121 -0
  47. package/training/33-dataGrid.md +129 -0
  48. package/training/34-dataTableViewer.md +115 -0
  49. package/training/35-reportViewer.md +673 -0
  50. package/training/36-viewRenderer.md +110 -0
  51. package/training/37-treeView.md +170 -0
  52. package/training/38-kpi-metric.md +148 -0
  53. package/training/39-kpi-trend.md +105 -0
  54. package/training/40-kpi-badge.md +112 -0
  55. package/training/41-kpi-statusDot.md +118 -0
  56. package/training/42-kpi-iconBox.md +114 -0
  57. package/training/43-kpi-gauge.md +143 -0
  58. package/training/44-kpi-bulletChart.md +126 -0
  59. package/training/45-kpi-colorScale.md +143 -0
  60. package/training/46-kpi-rating.md +125 -0
  61. package/training/47-kpi-countdown.md +151 -0
  62. package/training/48-fetchReportData.md +276 -0
  63. package/training/49-printLayout.md +215 -0
  64. package/training/examples/01-login-form.json +176 -0
  65. package/training/examples/02-contact-form.json +141 -0
  66. package/training/examples/03-kpi-cards-row.json +123 -0
  67. package/training/examples/04-settings-toggles.json +153 -0
  68. package/training/examples/05-user-profile-card.json +136 -0
  69. package/training/examples/06-date-range-filter.json +108 -0
  70. package/training/examples/07-search-bar-results.json +130 -0
  71. package/training/examples/08-notification-settings.json +131 -0
  72. package/training/examples/09-employee-profile-form.json +259 -0
  73. package/training/examples/10-invoice-form.json +241 -0
  74. package/training/examples/11-dashboard-overview.json +251 -0
  75. package/training/examples/12-registration-wizard.json +154 -0
  76. package/training/examples/13-product-catalog.json +168 -0
  77. package/training/examples/14-data-table-with-filters.json +180 -0
  78. package/training/examples/15-tabbed-profile.json +92 -0
  79. package/training/examples/16-kpi-full-row.json +203 -0
  80. package/training/examples/17-tree-detail-view.json +139 -0
  81. package/training/examples/18-employee-management.json +233 -0
  82. package/training/examples/19-sales-dashboard.json +272 -0
  83. package/training/examples/20-checkout-wizard.json +225 -0
  84. package/training/examples/21-analytics-page.json +222 -0
  85. package/training/examples/22-hr-onboarding.json +222 -0
  86. package/training/examples/23-document-browser.json +241 -0
  87. package/training/examples/24-order-management.json +290 -0
  88. package/training/examples/25-crm-contact-page.json +272 -0
@@ -0,0 +1,112 @@
1
+ # Component: richtext
2
+
3
+ A WYSIWYG rich text editor (SunEditor). Supports bold, italic, lists, tables, and custom toolbars. Value is stored as HTML string.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Unique identifier. Value stored as HTML string in `data[key]` and `form[key]`. |
12
+ | `label` | expression | Label text. |
13
+ | `labelPosition` | select | `top` · `left` · `right` · `none` |
14
+ | `required` | boolean | Marks field required. |
15
+ | `value` | expression | Controlled HTML value, e.g. `data.article.body`. |
16
+ | `placeholder` | text | Hint shown when editor is empty. |
17
+ | `disabled` | boolean | Disables the editor. |
18
+ | `enabled` | boolean | Enable/disable from an expression. |
19
+ | `height` | text | Editor height including toolbar, e.g. `"300px"`, `"500px"`. |
20
+ | `mode` | select | `classic` — full toolbar above. `inline` — toolbar appears on text selection. `balloon` — compact balloon toolbar on selection. `balloon-always` — balloon always visible. |
21
+ | `toolbar` | expression | Array of toolbar button names to include. If blank, shows default full toolbar. E.g. `['bold', 'italic', 'list', 'table']`. |
22
+ | `resizingBar` | boolean | Shows a draggable bar at the bottom to resize the editor height. |
23
+ | `showPathLabel` | boolean | Shows the HTML path breadcrumb at the bottom. |
24
+ | `charCounter` | boolean | Displays a character count indicator. |
25
+ | `maxCharCount` | expression | Maximum allowed characters. Enforces a hard limit when set. |
26
+
27
+ ---
28
+
29
+ ## Props — Style Tab
30
+
31
+ Uses common input style fields:
32
+
33
+ | Prop | Type | Options / Notes |
34
+ |------|------|-----------------|
35
+ | `color` | select | `default` · `primary` · `secondary` · `error` · `warning` · `info` · `success` |
36
+ | `display` | expression | CSS display. |
37
+ | `width` | expression | Field width. |
38
+ | `height` | expression | Wrapper height. |
39
+ | `margin` | expression | Outer spacing. |
40
+ | `padding` | expression | Inner padding. |
41
+
42
+ ---
43
+
44
+ ## Props — Actions Tab
45
+
46
+ No actions defined for richtext by default. Use the `onChange` pattern via a wrapping form or custom logic.
47
+
48
+ ---
49
+
50
+ ## Use Cases
51
+
52
+ **When to use:**
53
+ - Article body, blog post content, email templates.
54
+ - Product descriptions needing formatting.
55
+ - Policy/documentation editors.
56
+ - Any case where HTML output is needed.
57
+
58
+ **When NOT to use:**
59
+ - Plain text notes → use `textarea`.
60
+ - Code entry → use a code editor field.
61
+ - Short single-line text → use `input`.
62
+
63
+ ---
64
+
65
+ ## Schema Examples
66
+
67
+ ### Full classic editor
68
+ ```json
69
+ {
70
+ "type": "richtext",
71
+ "props": {
72
+ "key": "articleBody",
73
+ "label": "Article Body",
74
+ "required": true,
75
+ "height": "400px",
76
+ "mode": "classic",
77
+ "resizingBar": true,
78
+ "charCounter": true,
79
+ "maxCharCount": 5000
80
+ },
81
+ "style": { "width": "100%" }
82
+ }
83
+ ```
84
+
85
+ ### Inline mode with minimal toolbar
86
+ ```json
87
+ {
88
+ "type": "richtext",
89
+ "props": {
90
+ "key": "emailTemplate",
91
+ "label": "Email Body",
92
+ "height": "250px",
93
+ "mode": "inline",
94
+ "toolbar": "['bold', 'italic', 'underline', 'list', 'link']",
95
+ "showPathLabel": false
96
+ }
97
+ }
98
+ ```
99
+
100
+ ### Read-only display (disabled)
101
+ ```json
102
+ {
103
+ "type": "richtext",
104
+ "props": {
105
+ "key": "policyContent",
106
+ "label": "Policy",
107
+ "value": "data.policy.content",
108
+ "disabled": true,
109
+ "height": "300px"
110
+ }
111
+ }
112
+ ```
@@ -0,0 +1,110 @@
1
+ # Component: tag
2
+
3
+ A multi-value chip/tag input. Users can select from a predefined list and/or type custom tags (freeSolo mode). Value is an array.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Unique identifier. Value stored as an array in `data[key]`. |
12
+ | `label` | expression | Label text. |
13
+ | `labelPosition` | select | `top` · `left` · `right` · `none` |
14
+ | `required` | boolean | Marks field required. |
15
+ | `value` | expression | Controlled array value, e.g. `data.selectedTags`. |
16
+ | `placeholder` | text | Hint shown when no tags selected. |
17
+ | `size` | select | `small` · `medium` · `large` |
18
+ | `disabled` | boolean | Disables the tag input. |
19
+ | `enabled` | boolean | Enable/disable from an expression. |
20
+ | `options` | options-editor | Predefined `{ label, value }` pairs to suggest. Can also be bound to `data.tagList`. |
21
+ | `freeSolo` | boolean | `true` allows users to type and add arbitrary tags not in the options list. |
22
+
23
+ ---
24
+
25
+ ## Props — Style Tab
26
+
27
+ | Prop | Type | Options / Notes |
28
+ |------|------|-----------------|
29
+ | `color` | select | `default` · `primary` · `secondary` · `error` · `warning` · `info` · `success` |
30
+ | `display` | expression | CSS display. |
31
+ | `width` | expression | Field width. |
32
+ | `height` | expression | Wrapper height. |
33
+ | `margin` | expression | Outer spacing. |
34
+ | `padding` | expression | Inner padding. |
35
+ | `flexDirection` | select | `row` · `column` · `row-reverse` · `column-reverse` |
36
+ | `justifyContent` | select | `flex-start` · `center` · `flex-end` · `space-between` · `space-around` · `space-evenly` |
37
+ | `alignItems` | select | `flex-start` · `center` · `flex-end` · `stretch` · `baseline` |
38
+ | `gap` | expression | Gap between elements. |
39
+
40
+ ---
41
+
42
+ ## Props — Actions Tab
43
+
44
+ | Event | Type | Notes |
45
+ |-------|------|-------|
46
+ | `onChange` | action (custom) | Fires when tags are added or removed. New array in `form[key]`. |
47
+
48
+ ---
49
+
50
+ ## Use Cases
51
+
52
+ **When to use:**
53
+ - Multi-value selection where values render as chips: skills, categories, labels, interests.
54
+ - Keyword/tag fields where users define custom values (`freeSolo: true`).
55
+ - Filtering systems with multiple concurrent tags.
56
+
57
+ **When NOT to use:**
58
+ - Single selection → use `dropdown`.
59
+ - Mutually exclusive options → use `radio`.
60
+ - Large structured lists → use `autocomplete` or `dropdown multiple`.
61
+
62
+ ---
63
+
64
+ ## Schema Examples
65
+
66
+ ### Tag field with predefined options
67
+ ```json
68
+ {
69
+ "type": "tag",
70
+ "props": {
71
+ "key": "skills",
72
+ "label": "Skills",
73
+ "options": [
74
+ { "label": "JavaScript", "value": "js" },
75
+ { "label": "Python", "value": "py" },
76
+ { "label": "React", "value": "react" },
77
+ { "label": "SQL", "value": "sql" }
78
+ ],
79
+ "placeholder": "Select skills..."
80
+ },
81
+ "style": { "width": "100%" }
82
+ }
83
+ ```
84
+
85
+ ### Free-text tags (no predefined list)
86
+ ```json
87
+ {
88
+ "type": "tag",
89
+ "props": {
90
+ "key": "keywords",
91
+ "label": "Keywords",
92
+ "freeSolo": true,
93
+ "placeholder": "Type and press Enter to add"
94
+ }
95
+ }
96
+ ```
97
+
98
+ ### Pre-filled with data
99
+ ```json
100
+ {
101
+ "type": "tag",
102
+ "props": {
103
+ "key": "categories",
104
+ "label": "Categories",
105
+ "value": "data.item.categories",
106
+ "options": "data.allCategories",
107
+ "size": "small"
108
+ }
109
+ }
110
+ ```
@@ -0,0 +1,107 @@
1
+ # Component: time
2
+
3
+ A time picker field with clock popup. Supports 12-hour AM/PM and 24-hour formats, and configurable minute steps.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Unique identifier. Value stored as time string in `data[key]`. |
12
+ | `label` | expression | Label text. |
13
+ | `labelPosition` | select | `top` · `left` · `right` · `none` |
14
+ | `required` | boolean | Marks field required. |
15
+ | `value` | expression | Controlled value, e.g. `data.appointmentTime`. |
16
+ | `placeholder` | text | Hint shown when empty, e.g. `"HH:MM"`. |
17
+ | `size` | select | `small` · `medium` · `large` |
18
+ | `disabled` | boolean | Disables the field. |
19
+ | `enabled` | boolean | Enable/disable from an expression. |
20
+ | `ampm` | boolean | `true` shows 12-hour clock with AM/PM. `false` (default) uses 24-hour. |
21
+ | `minutesStep` | expression | Step size for minute selection, e.g. `5`, `15`, `30`. Default: `1`. |
22
+ | `readOnly` | boolean | Displays value but prevents editing. |
23
+
24
+ ---
25
+
26
+ ## Props — Style Tab
27
+
28
+ | Prop | Type | Options / Notes |
29
+ |------|------|-----------------|
30
+ | `color` | select | `default` · `primary` · `secondary` · `error` · `warning` · `info` · `success` |
31
+ | `display` | expression | CSS display. |
32
+ | `width` | expression | Field width. |
33
+ | `height` | expression | Height override. |
34
+ | `margin` | expression | Outer spacing. |
35
+ | `padding` | expression | Inner padding. |
36
+ | `flexDirection` | select | `row` · `column` · `row-reverse` · `column-reverse` |
37
+ | `justifyContent` | select | `flex-start` · `center` · `flex-end` · `space-between` · `space-around` · `space-evenly` |
38
+ | `alignItems` | select | `flex-start` · `center` · `flex-end` · `stretch` · `baseline` |
39
+ | `gap` | expression | Gap between elements. |
40
+
41
+ ---
42
+
43
+ ## Props — Actions Tab
44
+
45
+ | Event | Type | Notes |
46
+ |-------|------|-------|
47
+ | `onChange` | action (custom) | Fires when the time changes. New value in `form[key]`. |
48
+
49
+ ---
50
+
51
+ ## Use Cases
52
+
53
+ **When to use:**
54
+ - Appointment time, shift start/end, schedule entry fields.
55
+ - Time-only selection when date is handled separately.
56
+ - Meeting booking with quarter-hour steps (`minutesStep: 15`).
57
+
58
+ **When NOT to use:**
59
+ - Date-only → use `datepicker`.
60
+ - Duration entry (hours + minutes as a number) → use `number`.
61
+
62
+ ---
63
+
64
+ ## Schema Examples
65
+
66
+ ### 24-hour time field
67
+ ```json
68
+ {
69
+ "type": "time",
70
+ "props": {
71
+ "key": "startTime",
72
+ "label": "Start Time",
73
+ "required": true,
74
+ "ampm": false,
75
+ "minutesStep": 15,
76
+ "placeholder": "HH:MM"
77
+ }
78
+ }
79
+ ```
80
+
81
+ ### 12-hour AM/PM
82
+ ```json
83
+ {
84
+ "type": "time",
85
+ "props": {
86
+ "key": "appointmentTime",
87
+ "label": "Appointment Time",
88
+ "ampm": true,
89
+ "minutesStep": 30
90
+ },
91
+ "style": { "width": "200px" }
92
+ }
93
+ ```
94
+
95
+ ### Read-only
96
+ ```json
97
+ {
98
+ "type": "time",
99
+ "props": {
100
+ "key": "closingTime",
101
+ "label": "Closing Time",
102
+ "value": "data.store.closingTime",
103
+ "readOnly": true,
104
+ "ampm": false
105
+ }
106
+ }
107
+ ```
@@ -0,0 +1,108 @@
1
+ # Component: toggle
2
+
3
+ A Material UI Switch rendered as a sliding toggle. Boolean on/off, with color variants.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Unique identifier. Value stored as boolean in `data[key]`. |
12
+ | `label` | expression | Label text shown next to the toggle. |
13
+ | `labelPosition` | select | `top` · `left` · `right` · `none` |
14
+ | `required` | boolean | Marks field required. |
15
+ | `value` | expression | Controlled boolean value, e.g. `data.settings.darkMode`. |
16
+ | `size` | select | `small` · `medium` · `large` |
17
+ | `color` | select | `default` · `primary` · `secondary` · `error` · `warning` · `info` · `success` — Color of the toggle when ON. |
18
+ | `disabled` | boolean | Prevents toggling. |
19
+ | `enabled` | boolean | Enable/disable from an expression. |
20
+
21
+ ---
22
+
23
+ ## Props — Style Tab
24
+
25
+ | Prop | Type | Options / Notes |
26
+ |------|------|-----------------|
27
+ | `color` | select | `default` · `primary` · `secondary` · `error` · `warning` · `info` · `success` |
28
+ | `display` | expression | CSS display. |
29
+ | `width` | expression | Wrapper width. |
30
+ | `height` | expression | Wrapper height. |
31
+ | `margin` | expression | Outer spacing. |
32
+ | `padding` | expression | Inner padding. |
33
+ | `flexDirection` | select | `row` · `column` · `row-reverse` · `column-reverse` |
34
+ | `justifyContent` | select | `flex-start` · `center` · `flex-end` · `space-between` · `space-around` · `space-evenly` |
35
+ | `alignItems` | select | `flex-start` · `center` · `flex-end` · `stretch` · `baseline` |
36
+ | `gap` | expression | Gap between elements. |
37
+
38
+ ---
39
+
40
+ ## Props — Actions Tab
41
+
42
+ | Event | Type | Notes |
43
+ |-------|------|-------|
44
+ | `onChange` | action (custom) | Fires when the toggle state changes. New boolean value in `form[key]`. |
45
+
46
+ ---
47
+
48
+ ## Use Cases
49
+
50
+ **When to use:**
51
+ - On/Off feature flags: dark mode, notifications, maintenance mode.
52
+ - Settings panels with instant effect toggles.
53
+ - Any boolean that benefits from the visual "switch" metaphor over a checkbox.
54
+
55
+ **When NOT to use:**
56
+ - Needs confirmation before applying → use `checkbox` + a save button.
57
+ - Multiple mutually exclusive options → use `radio`.
58
+ - Multi-select → use `tag` or `dropdown multiple`.
59
+
60
+ ---
61
+
62
+ ## Schema Examples
63
+
64
+ ### Feature toggle
65
+ ```json
66
+ {
67
+ "type": "toggle",
68
+ "props": {
69
+ "key": "notifications",
70
+ "label": "Enable Notifications",
71
+ "color": "primary",
72
+ "size": "medium",
73
+ "value": "data.settings.notifications"
74
+ }
75
+ }
76
+ ```
77
+
78
+ ### With onChange (immediate effect)
79
+ ```json
80
+ {
81
+ "type": "toggle",
82
+ "props": {
83
+ "key": "darkMode",
84
+ "label": "Dark Mode",
85
+ "color": "secondary"
86
+ },
87
+ "actions": {
88
+ "onChange": {
89
+ "type": "custom",
90
+ "code": "setTheme(form.darkMode ? 'dark' : 'light')"
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ ### Disabled read-only status
97
+ ```json
98
+ {
99
+ "type": "toggle",
100
+ "props": {
101
+ "key": "isVerified",
102
+ "label": "Verified",
103
+ "value": "data.user.isVerified",
104
+ "color": "success",
105
+ "disabled": true
106
+ }
107
+ }
108
+ ```
@@ -0,0 +1,107 @@
1
+ # Component: signature
2
+
3
+ A canvas-based signature pad. Users draw their signature with a mouse or stylus. Value is stored as a base64 PNG data URL.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Unique identifier. Value stored as base64 PNG string in `data[key]`. |
12
+ | `label` | expression | Label text shown above the signature canvas. |
13
+ | `labelPosition` | select | `top` · `left` · `right` · `none` |
14
+ | `required` | boolean | Marks field required. |
15
+ | `value` | expression | Controlled value (base64 PNG). Pass to pre-fill with existing signature. |
16
+ | `width` | number | Canvas width in pixels. Default: `500`. |
17
+ | `height` | number | Canvas height in pixels. Default: `200`. |
18
+ | `backgroundColor` | text | Canvas background color. Default: `"#ffffff"`. |
19
+ | `penColor` | text | Ink color. Default: `"#000000"`. Accepts any CSS color. |
20
+ | `minWidth` | number | Minimum pen stroke width for thin lines. Default: `0.5`. |
21
+ | `maxWidth` | number | Maximum pen stroke width for thick lines. Default: `2.5`. |
22
+ | `disabled` | boolean | Renders canvas as read-only (no drawing allowed). |
23
+ | `enabled` | boolean | Enable/disable from an expression. |
24
+
25
+ ---
26
+
27
+ ## Props — Style Tab
28
+
29
+ Uses common input style fields.
30
+
31
+ | Prop | Type | Options / Notes |
32
+ |------|------|-----------------|
33
+ | `display` | expression | CSS display. |
34
+ | `width` | expression | Wrapper width. |
35
+ | `margin` | expression | Outer spacing. |
36
+ | `padding` | expression | Inner padding. |
37
+
38
+ ---
39
+
40
+ ## Props — Actions Tab
41
+
42
+ No dedicated action events. Use `onChange` pattern via form submission or a save button.
43
+
44
+ ---
45
+
46
+ ## Use Cases
47
+
48
+ **When to use:**
49
+ - Legal forms, contracts, consent forms.
50
+ - Delivery confirmation signatures.
51
+ - HR onboarding forms.
52
+ - Any scenario requiring a handwritten signature captured digitally.
53
+
54
+ **When NOT to use:**
55
+ - Text-based initials or typed signatures → use `input`.
56
+ - Image upload from file → use an image-upload component.
57
+
58
+ ---
59
+
60
+ ## Schema Examples
61
+
62
+ ### Standard signature field
63
+ ```json
64
+ {
65
+ "type": "signature",
66
+ "props": {
67
+ "key": "customerSignature",
68
+ "label": "Customer Signature",
69
+ "required": true,
70
+ "width": 500,
71
+ "height": 200,
72
+ "backgroundColor": "#f9f9f9",
73
+ "penColor": "#1a237e"
74
+ }
75
+ }
76
+ ```
77
+
78
+ ### Compact signature pad
79
+ ```json
80
+ {
81
+ "type": "signature",
82
+ "props": {
83
+ "key": "driverSignature",
84
+ "label": "Driver Signature",
85
+ "width": 360,
86
+ "height": 140,
87
+ "penColor": "#000000",
88
+ "minWidth": 1,
89
+ "maxWidth": 3
90
+ }
91
+ }
92
+ ```
93
+
94
+ ### Read-only display of existing signature
95
+ ```json
96
+ {
97
+ "type": "signature",
98
+ "props": {
99
+ "key": "approvalSignature",
100
+ "label": "Approved By",
101
+ "value": "data.document.approvalSignature",
102
+ "disabled": true,
103
+ "width": 400,
104
+ "height": 160
105
+ }
106
+ }
107
+ ```
@@ -0,0 +1,134 @@
1
+ # Component: autocomplete
2
+
3
+ A searchable select input with async fetch support, grouping, multi-select, and free-text entry. More powerful than `dropdown` for large datasets.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Unique identifier. Value stored in `data[key]`. |
12
+ | `label` | expression | Label text. |
13
+ | `labelPosition` | select | `top` · `left` · `right` · `none` |
14
+ | `required` | boolean | Marks field required. |
15
+ | `placeholder` | text | Hint shown in the search input. |
16
+ | `size` | select | `small` · `medium` · `large` |
17
+ | `disabled` | boolean | Disables the field. |
18
+ | `enabled` | boolean | Enable/disable from an expression. |
19
+ | `fullWidth` | boolean | Stretches to fill container. |
20
+ | `options` | options-editor | Static options list `{ label, value }`. For async, leave empty and use `asyncFetchOptions`. |
21
+ | `isSingle` | boolean | `true` for single-select. `false` (default) for multi-select (value is an array). |
22
+ | `freeSolo` | boolean | Allows users to enter values not in the options list. |
23
+ | `clearable` | boolean | Pressing Escape clears the selection. |
24
+ | `disableCloseOnSelect` | boolean | Keeps the dropdown open after selecting an option (useful for multi-select). |
25
+ | `fetchOnOpen` | boolean | Triggers `asyncFetchOptions` when the dropdown opens. |
26
+ | `labelField` | expression | Field path within each option object to use as the display label, e.g. `"name"`. |
27
+ | `groupByField` | expression | Field path to group options by, e.g. `"department"`. |
28
+ | `targetValue` | expression | Path to extract the stored value from a selected option object, e.g. `"id"`. |
29
+ | `targetValues` | expression | Map of field paths to extract multiple values from the selected option. |
30
+ | `asyncFetchOptions` | expression | Expression/function to fetch options dynamically. Receives the typed search string. |
31
+
32
+ ---
33
+
34
+ ## Props — Style Tab
35
+
36
+ Same as common input style fields.
37
+
38
+ | Prop | Type | Options / Notes |
39
+ |------|------|-----------------|
40
+ | `color` | select | `default` · `primary` · `secondary` · `error` · `warning` · `info` · `success` |
41
+ | `width` | expression | Field width. |
42
+ | `margin` | expression | Outer spacing. |
43
+ | `padding` | expression | Inner padding. |
44
+
45
+ ---
46
+
47
+ ## Props — Actions Tab
48
+
49
+ No dedicated actions. Results write to `data[key]` automatically. Use `onChange` wrapper if needed.
50
+
51
+ ---
52
+
53
+ ## Use Cases
54
+
55
+ **When to use:**
56
+ - Large option sets where typing to filter is essential (hundreds of entries).
57
+ - Server-side search/autocomplete: type to fetch matching records from an API.
58
+ - Multi-select with search capability.
59
+ - Grouped options (by category, department, etc.).
60
+ - Fields where user may enter a custom value not in the list (`freeSolo`).
61
+
62
+ **When NOT to use:**
63
+ - Small static list (< 10 items) → use `dropdown` for simplicity.
64
+ - Exact yes/no → use `toggle` or `checkbox`.
65
+
66
+ ---
67
+
68
+ ## Schema Examples
69
+
70
+ ### Single-select from static list
71
+ ```json
72
+ {
73
+ "type": "autocomplete",
74
+ "props": {
75
+ "key": "country",
76
+ "label": "Country",
77
+ "isSingle": true,
78
+ "options": "data.countries",
79
+ "labelField": "name",
80
+ "targetValue": "code",
81
+ "placeholder": "Search countries...",
82
+ "fullWidth": true
83
+ }
84
+ }
85
+ ```
86
+
87
+ ### Async server search
88
+ ```json
89
+ {
90
+ "type": "autocomplete",
91
+ "props": {
92
+ "key": "userId",
93
+ "label": "Assign To",
94
+ "isSingle": true,
95
+ "fetchOnOpen": true,
96
+ "asyncFetchOptions": "searchUsers",
97
+ "labelField": "fullName",
98
+ "targetValue": "id",
99
+ "placeholder": "Type to search users..."
100
+ }
101
+ }
102
+ ```
103
+
104
+ ### Multi-select with groups
105
+ ```json
106
+ {
107
+ "type": "autocomplete",
108
+ "props": {
109
+ "key": "permissions",
110
+ "label": "Permissions",
111
+ "isSingle": false,
112
+ "options": "data.allPermissions",
113
+ "labelField": "name",
114
+ "groupByField": "module",
115
+ "disableCloseOnSelect": true,
116
+ "fullWidth": true
117
+ }
118
+ }
119
+ ```
120
+
121
+ ### Free-text multi with suggestions
122
+ ```json
123
+ {
124
+ "type": "autocomplete",
125
+ "props": {
126
+ "key": "tags",
127
+ "label": "Tags",
128
+ "isSingle": false,
129
+ "freeSolo": true,
130
+ "options": "data.suggestedTags",
131
+ "placeholder": "Type to add tags"
132
+ }
133
+ }
134
+ ```