cxtms 1.9.13
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 +384 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +4784 -0
- package/dist/cli.js.map +1 -0
- package/dist/extractUtils.d.ts +11 -0
- package/dist/extractUtils.d.ts.map +1 -0
- package/dist/extractUtils.js +19 -0
- package/dist/extractUtils.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +129 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/schemaLoader.d.ts +17 -0
- package/dist/utils/schemaLoader.d.ts.map +1 -0
- package/dist/utils/schemaLoader.js +134 -0
- package/dist/utils/schemaLoader.js.map +1 -0
- package/dist/validator.d.ts +72 -0
- package/dist/validator.d.ts.map +1 -0
- package/dist/validator.js +432 -0
- package/dist/validator.js.map +1 -0
- package/dist/workflowValidator.d.ts +103 -0
- package/dist/workflowValidator.d.ts.map +1 -0
- package/dist/workflowValidator.js +753 -0
- package/dist/workflowValidator.js.map +1 -0
- package/package.json +51 -0
- package/schemas/actions/all.json +27 -0
- package/schemas/actions/clipboard.json +46 -0
- package/schemas/actions/confirm.json +21 -0
- package/schemas/actions/consoleLog.json +16 -0
- package/schemas/actions/dialog.json +25 -0
- package/schemas/actions/fileDownload.json +16 -0
- package/schemas/actions/forEach.json +31 -0
- package/schemas/actions/if.json +12 -0
- package/schemas/actions/mutation.json +25 -0
- package/schemas/actions/navigate.json +18 -0
- package/schemas/actions/navigateBack.json +22 -0
- package/schemas/actions/navigateBackOrClose.json +21 -0
- package/schemas/actions/notification.json +19 -0
- package/schemas/actions/openBarcodeScanner.json +104 -0
- package/schemas/actions/query.json +32 -0
- package/schemas/actions/refresh.json +13 -0
- package/schemas/actions/resetDirtyState.json +22 -0
- package/schemas/actions/setFields.json +21 -0
- package/schemas/actions/setStore.json +13 -0
- package/schemas/actions/validateForm.json +15 -0
- package/schemas/actions/workflow.json +24 -0
- package/schemas/components/README.md +147 -0
- package/schemas/components/appComponent.json +58 -0
- package/schemas/components/barcodeScanner.json +69 -0
- package/schemas/components/button.json +123 -0
- package/schemas/components/calendar.json +489 -0
- package/schemas/components/card.json +176 -0
- package/schemas/components/collection.json +54 -0
- package/schemas/components/dataGrid.json +119 -0
- package/schemas/components/datasource.json +151 -0
- package/schemas/components/dropdown.json +57 -0
- package/schemas/components/field-collection.json +618 -0
- package/schemas/components/field.json +265 -0
- package/schemas/components/form.json +234 -0
- package/schemas/components/index.json +71 -0
- package/schemas/components/layout.json +69 -0
- package/schemas/components/module.json +167 -0
- package/schemas/components/navDropdown.json +36 -0
- package/schemas/components/navbar.json +78 -0
- package/schemas/components/navbarItem.json +28 -0
- package/schemas/components/navbarLink.json +36 -0
- package/schemas/components/row.json +31 -0
- package/schemas/components/slot.json +30 -0
- package/schemas/components/tab.json +34 -0
- package/schemas/components/tabs.json +35 -0
- package/schemas/components/timeline.json +172 -0
- package/schemas/components/timelineGrid.json +328 -0
- package/schemas/fields/README.md +66 -0
- package/schemas/fields/attachment.json +156 -0
- package/schemas/fields/autocomplete-googleplaces.json +130 -0
- package/schemas/fields/checkbox.json +82 -0
- package/schemas/fields/date.json +88 -0
- package/schemas/fields/datetime.json +75 -0
- package/schemas/fields/email.json +75 -0
- package/schemas/fields/index.json +53 -0
- package/schemas/fields/number.json +91 -0
- package/schemas/fields/password.json +70 -0
- package/schemas/fields/radio.json +94 -0
- package/schemas/fields/rangedatetime.json +56 -0
- package/schemas/fields/select-async.json +334 -0
- package/schemas/fields/select.json +115 -0
- package/schemas/fields/tel.json +79 -0
- package/schemas/fields/text.json +86 -0
- package/schemas/fields/textarea.json +95 -0
- package/schemas/fields/time.json +91 -0
- package/schemas/fields/url.json +74 -0
- package/schemas/schema.graphql +12248 -0
- package/schemas/schemas.json +610 -0
- package/schemas/workflows/activity.json +96 -0
- package/schemas/workflows/common/condition.json +48 -0
- package/schemas/workflows/common/expression.json +76 -0
- package/schemas/workflows/common/mapping.json +173 -0
- package/schemas/workflows/common/step.json +38 -0
- package/schemas/workflows/flow/aggregation.json +44 -0
- package/schemas/workflows/flow/entity.json +129 -0
- package/schemas/workflows/flow/state.json +105 -0
- package/schemas/workflows/flow/transition.json +143 -0
- package/schemas/workflows/input.json +122 -0
- package/schemas/workflows/output.json +61 -0
- package/schemas/workflows/schedule.json +26 -0
- package/schemas/workflows/tasks/accounting-transaction.json +95 -0
- package/schemas/workflows/tasks/action-event.json +65 -0
- package/schemas/workflows/tasks/all.json +152 -0
- package/schemas/workflows/tasks/appmodule.json +56 -0
- package/schemas/workflows/tasks/attachment.json +97 -0
- package/schemas/workflows/tasks/authentication.json +86 -0
- package/schemas/workflows/tasks/caching.json +68 -0
- package/schemas/workflows/tasks/charge.json +92 -0
- package/schemas/workflows/tasks/commodity.json +92 -0
- package/schemas/workflows/tasks/contact-address.json +72 -0
- package/schemas/workflows/tasks/contact-payment-method.json +72 -0
- package/schemas/workflows/tasks/contact.json +82 -0
- package/schemas/workflows/tasks/csv.json +81 -0
- package/schemas/workflows/tasks/document-render.json +105 -0
- package/schemas/workflows/tasks/document-send.json +84 -0
- package/schemas/workflows/tasks/edi.json +157 -0
- package/schemas/workflows/tasks/email-send.json +110 -0
- package/schemas/workflows/tasks/error.json +72 -0
- package/schemas/workflows/tasks/export.json +90 -0
- package/schemas/workflows/tasks/filetransfer.json +102 -0
- package/schemas/workflows/tasks/flow-transition.json +68 -0
- package/schemas/workflows/tasks/foreach.json +69 -0
- package/schemas/workflows/tasks/generic.json +47 -0
- package/schemas/workflows/tasks/graphql.json +78 -0
- package/schemas/workflows/tasks/httpRequest.json +161 -0
- package/schemas/workflows/tasks/import.json +64 -0
- package/schemas/workflows/tasks/inventory.json +67 -0
- package/schemas/workflows/tasks/job.json +88 -0
- package/schemas/workflows/tasks/log.json +73 -0
- package/schemas/workflows/tasks/map.json +58 -0
- package/schemas/workflows/tasks/movement.json +54 -0
- package/schemas/workflows/tasks/note.json +59 -0
- package/schemas/workflows/tasks/number.json +65 -0
- package/schemas/workflows/tasks/order-tracking-event.json +109 -0
- package/schemas/workflows/tasks/order.json +139 -0
- package/schemas/workflows/tasks/payment.json +85 -0
- package/schemas/workflows/tasks/pdf-document.json +60 -0
- package/schemas/workflows/tasks/postal-codes.json +92 -0
- package/schemas/workflows/tasks/resolve-timezone.json +65 -0
- package/schemas/workflows/tasks/setVariable.json +76 -0
- package/schemas/workflows/tasks/switch.json +75 -0
- package/schemas/workflows/tasks/template.json +73 -0
- package/schemas/workflows/tasks/tracking-event.json +137 -0
- package/schemas/workflows/tasks/transmission.json +185 -0
- package/schemas/workflows/tasks/unzip-file.json +68 -0
- package/schemas/workflows/tasks/user.json +70 -0
- package/schemas/workflows/tasks/validation.json +99 -0
- package/schemas/workflows/tasks/while.json +53 -0
- package/schemas/workflows/tasks/workflow-execute.json +82 -0
- package/schemas/workflows/trigger.json +90 -0
- package/schemas/workflows/variable.json +46 -0
- package/schemas/workflows/workflow.json +335 -0
- package/scripts/postinstall.js +291 -0
- package/scripts/setup-vscode.js +80 -0
- package/skills/cxtms-developer/SKILL.md +118 -0
- package/skills/cxtms-developer/ref-cli-auth.md +120 -0
- package/skills/cxtms-developer/ref-entity-accounting.md +180 -0
- package/skills/cxtms-developer/ref-entity-commodity.md +239 -0
- package/skills/cxtms-developer/ref-entity-contact.md +163 -0
- package/skills/cxtms-developer/ref-entity-geography.md +154 -0
- package/skills/cxtms-developer/ref-entity-job.md +77 -0
- package/skills/cxtms-developer/ref-entity-notification.md +85 -0
- package/skills/cxtms-developer/ref-entity-order-sub.md +160 -0
- package/skills/cxtms-developer/ref-entity-order.md +183 -0
- package/skills/cxtms-developer/ref-entity-organization.md +41 -0
- package/skills/cxtms-developer/ref-entity-rate.md +182 -0
- package/skills/cxtms-developer/ref-entity-shared.md +176 -0
- package/skills/cxtms-developer/ref-entity-warehouse.md +115 -0
- package/skills/cxtms-developer/ref-graphql-query.md +309 -0
- package/skills/cxtms-module-builder/SKILL.md +477 -0
- package/skills/cxtms-module-builder/ref-components-data.md +293 -0
- package/skills/cxtms-module-builder/ref-components-display.md +411 -0
- package/skills/cxtms-module-builder/ref-components-forms.md +369 -0
- package/skills/cxtms-module-builder/ref-components-interactive.md +317 -0
- package/skills/cxtms-module-builder/ref-components-layout.md +390 -0
- package/skills/cxtms-module-builder/ref-components-specialized.md +477 -0
- package/skills/cxtms-workflow-builder/SKILL.md +438 -0
- package/skills/cxtms-workflow-builder/ref-accounting.md +66 -0
- package/skills/cxtms-workflow-builder/ref-communication.md +169 -0
- package/skills/cxtms-workflow-builder/ref-entity.md +342 -0
- package/skills/cxtms-workflow-builder/ref-expressions-ncalc.md +128 -0
- package/skills/cxtms-workflow-builder/ref-expressions-template.md +161 -0
- package/skills/cxtms-workflow-builder/ref-filetransfer.md +80 -0
- package/skills/cxtms-workflow-builder/ref-flow.md +210 -0
- package/skills/cxtms-workflow-builder/ref-other.md +157 -0
- package/skills/cxtms-workflow-builder/ref-query.md +105 -0
- package/skills/cxtms-workflow-builder/ref-utilities.md +417 -0
- package/templates/module-configuration.yaml +44 -0
- package/templates/module-form.yaml +152 -0
- package/templates/module-grid.yaml +229 -0
- package/templates/module-select.yaml +139 -0
- package/templates/module.yaml +84 -0
- package/templates/workflow-api-tracking.yaml +189 -0
- package/templates/workflow-basic.yaml +76 -0
- package/templates/workflow-document.yaml +155 -0
- package/templates/workflow-entity-trigger.yaml +90 -0
- package/templates/workflow-ftp-edi.yaml +158 -0
- package/templates/workflow-ftp-tracking.yaml +161 -0
- package/templates/workflow-mcp-tool.yaml +112 -0
- package/templates/workflow-public-api.yaml +135 -0
- package/templates/workflow-scheduled-execute.yaml +75 -0
- package/templates/workflow-scheduled.yaml +125 -0
- package/templates/workflow-utility.yaml +96 -0
- package/templates/workflow-webhook.yaml +128 -0
- package/templates/workflow.yaml +140 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
# Data & Collection Components
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
- Collection component
|
|
5
|
+
- List component
|
|
6
|
+
- ListItem component
|
|
7
|
+
- Datasource component
|
|
8
|
+
- Script component
|
|
9
|
+
|
|
10
|
+
## collection
|
|
11
|
+
|
|
12
|
+
Iterates over data items and renders children as templates. Supports drag-and-drop reordering.
|
|
13
|
+
|
|
14
|
+
**Props:**
|
|
15
|
+
| Prop | Type | Default | Description |
|
|
16
|
+
|------|------|---------|-------------|
|
|
17
|
+
| `items` | `any` | — | Data source: array, template string, or query ref |
|
|
18
|
+
| `itemName` | `string` | `item` | Variable name for current item in templates |
|
|
19
|
+
| `itemProps` | `string` | — | Template to transform each item |
|
|
20
|
+
| `itemSize` | `number \| {xs,sm,md,lg,xl}` | `{xs:12}` | MUI Grid size per item |
|
|
21
|
+
| `itemOffset` | `number \| breakpoints` | — | Grid offset per item |
|
|
22
|
+
| `itemOrder` | `number \| breakpoints` | — | Grid order per item |
|
|
23
|
+
| `itemSx` | `SxProps` | — | MUI sx per item |
|
|
24
|
+
| `itemTag` | `string` | `div` | HTML element wrapping item children |
|
|
25
|
+
| `spacing` | `number` | `3` | Grid spacing |
|
|
26
|
+
| `columns` | `number` | `12` | Grid column count |
|
|
27
|
+
| `containerSx` | `SxProps` | — | Container sx styles |
|
|
28
|
+
| `childClassName` | `string` | — | CSS class per item |
|
|
29
|
+
| `enableSorting` | `boolean` | — | Enable drag-and-drop reordering |
|
|
30
|
+
| `refreshHandler` | `string` | — | Refresh handler name |
|
|
31
|
+
| `emptyMessage` | `string` | — | Shown when empty |
|
|
32
|
+
|
|
33
|
+
**Children:** Yes — each child is rendered per item. Variables: `{itemName}` = current item, `{itemName}Index` = index.
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
# Basic collection with cards
|
|
37
|
+
component: collection
|
|
38
|
+
name: contactCards
|
|
39
|
+
props:
|
|
40
|
+
items: "{{ contacts }}"
|
|
41
|
+
itemName: contact
|
|
42
|
+
itemSize: { xs: 12, md: 6, lg: 4 }
|
|
43
|
+
spacing: 2
|
|
44
|
+
emptyMessage: "No contacts found"
|
|
45
|
+
children:
|
|
46
|
+
- component: card
|
|
47
|
+
name: contactCard
|
|
48
|
+
props:
|
|
49
|
+
options:
|
|
50
|
+
header:
|
|
51
|
+
title: "{{ contact.name }}"
|
|
52
|
+
subheader: "{{ contact.email }}"
|
|
53
|
+
children:
|
|
54
|
+
- component: text
|
|
55
|
+
name: phone
|
|
56
|
+
props: { value: "{{ contact.phone }}", type: p }
|
|
57
|
+
|
|
58
|
+
# Collection with drag-and-drop sorting
|
|
59
|
+
component: collection
|
|
60
|
+
name: sortableItems
|
|
61
|
+
props:
|
|
62
|
+
items: "{{ orderItems }}"
|
|
63
|
+
itemName: item
|
|
64
|
+
enableSorting: true
|
|
65
|
+
children:
|
|
66
|
+
- component: row
|
|
67
|
+
name: itemRow
|
|
68
|
+
children:
|
|
69
|
+
- component: text
|
|
70
|
+
name: itemName
|
|
71
|
+
props: { value: "{{ item.name }}" }
|
|
72
|
+
- component: text
|
|
73
|
+
name: itemQty
|
|
74
|
+
props: { value: "Qty: {{ item.quantity }}" }
|
|
75
|
+
|
|
76
|
+
# Collection from query
|
|
77
|
+
component: collection
|
|
78
|
+
name: recentOrders
|
|
79
|
+
props:
|
|
80
|
+
itemName: order
|
|
81
|
+
itemSize: 12
|
|
82
|
+
refreshHandler: orders
|
|
83
|
+
queries:
|
|
84
|
+
- name: getRecentOrders
|
|
85
|
+
query:
|
|
86
|
+
command: "query { recentOrders { id orderNumber status } }"
|
|
87
|
+
children:
|
|
88
|
+
- component: text
|
|
89
|
+
name: orderLabel
|
|
90
|
+
props: { value: "#{{ order.orderNumber }} - {{ order.status }}" }
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## list
|
|
96
|
+
|
|
97
|
+
MUI List with auto-generated or custom item rendering. Supports selection modes.
|
|
98
|
+
|
|
99
|
+
**Props:**
|
|
100
|
+
| Prop | Type | Default | Description |
|
|
101
|
+
|------|------|---------|-------------|
|
|
102
|
+
| `items` | `any` | — | Data source |
|
|
103
|
+
| `itemName` | `string` | `item` | Variable name per item |
|
|
104
|
+
| `dividers` | `boolean` | `false` | Show dividers between items |
|
|
105
|
+
| `dense` | `boolean` | `false` | Dense list mode |
|
|
106
|
+
| `disablePadding` | `boolean` | `false` | Remove padding |
|
|
107
|
+
| `primaryField` | `string` | — | Field for primary text (auto-render) |
|
|
108
|
+
| `secondaryField` | `string` | — | Field for secondary text (auto-render) |
|
|
109
|
+
| `avatarField` | `string` | — | Field for avatar image URL |
|
|
110
|
+
| `icon` | `string` | — | Icon for all items |
|
|
111
|
+
| `enableSelect` | `Single \| Multiple` | — | Selection mode (Multiple = checkboxes) |
|
|
112
|
+
| `emptyMessage` | `string` | — | Empty state message |
|
|
113
|
+
| `containerSx` / `itemSx` | `SxProps` | — | Styles |
|
|
114
|
+
| `refreshHandler` | `string` | — | Refresh handler |
|
|
115
|
+
|
|
116
|
+
**Events:** `onClick` — per item, with item data in variables.
|
|
117
|
+
|
|
118
|
+
**Children:** Optional — when provided, renders per item (like collection). When omitted, auto-generates from `primaryField`/`secondaryField`.
|
|
119
|
+
|
|
120
|
+
```yaml
|
|
121
|
+
# Auto-generated list
|
|
122
|
+
component: list
|
|
123
|
+
name: contactList
|
|
124
|
+
props:
|
|
125
|
+
items: "{{ contacts }}"
|
|
126
|
+
itemName: contact
|
|
127
|
+
primaryField: contactName
|
|
128
|
+
secondaryField: email
|
|
129
|
+
avatarField: avatarUrl
|
|
130
|
+
dividers: true
|
|
131
|
+
onClick:
|
|
132
|
+
- navigate: "contacts/{{ contact.contactId }}"
|
|
133
|
+
|
|
134
|
+
# List with selection
|
|
135
|
+
component: list
|
|
136
|
+
name: selectableItems
|
|
137
|
+
props:
|
|
138
|
+
items: "{{ availableItems }}"
|
|
139
|
+
itemName: item
|
|
140
|
+
primaryField: name
|
|
141
|
+
secondaryField: description
|
|
142
|
+
enableSelect: Multiple
|
|
143
|
+
dense: true
|
|
144
|
+
|
|
145
|
+
# List with custom children
|
|
146
|
+
component: list
|
|
147
|
+
name: customList
|
|
148
|
+
props:
|
|
149
|
+
items: "{{ notifications }}"
|
|
150
|
+
itemName: notif
|
|
151
|
+
dividers: true
|
|
152
|
+
children:
|
|
153
|
+
- component: row
|
|
154
|
+
name: notifRow
|
|
155
|
+
props: { spacing: 1, alignItems: center }
|
|
156
|
+
children:
|
|
157
|
+
- component: icon
|
|
158
|
+
name: notifIcon
|
|
159
|
+
props: { icon: "{{ notif.icon }}", color: "{{ notif.color }}" }
|
|
160
|
+
- component: text
|
|
161
|
+
name: notifText
|
|
162
|
+
props: { value: "{{ notif.message }}", type: span }
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## listItem
|
|
168
|
+
|
|
169
|
+
Composable MUI ListItem with component slots and built-in popover menu.
|
|
170
|
+
|
|
171
|
+
**Props:**
|
|
172
|
+
| Prop | Type | Description |
|
|
173
|
+
|------|------|-------------|
|
|
174
|
+
| `primaryComponent` | `ComponentProps` | Primary text area component |
|
|
175
|
+
| `secondaryComponent` | `ComponentProps` | Secondary text area component |
|
|
176
|
+
| `avatarComponent` | `ComponentProps` | Avatar slot component |
|
|
177
|
+
| `secondaryAction` | `ComponentProps` | Right-side action component |
|
|
178
|
+
| `selected` | `boolean` | Visual selection state |
|
|
179
|
+
| `disabled` | `boolean` | Disabled state |
|
|
180
|
+
| `divider` | `boolean` | Bottom divider |
|
|
181
|
+
| `button` | `boolean` | Render as ListItemButton |
|
|
182
|
+
| `sx` | `object` | MUI styles |
|
|
183
|
+
| `menu.icon` | `string` | Menu trigger icon (default: `ellipsis-vertical`) |
|
|
184
|
+
| `menu.items[]` | `{label, icon, onClick, disabled}` | Menu items |
|
|
185
|
+
|
|
186
|
+
**Events:** `onClick`, `menu.items[].onClick`
|
|
187
|
+
|
|
188
|
+
**Children:** Fallback — rendered when no primary/secondary components.
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
component: listItem
|
|
192
|
+
name: orderItem
|
|
193
|
+
props:
|
|
194
|
+
button: true
|
|
195
|
+
primaryComponent:
|
|
196
|
+
component: text
|
|
197
|
+
name: orderNum
|
|
198
|
+
props: { value: "Order #{{ item.orderNumber }}", type: span }
|
|
199
|
+
secondaryComponent:
|
|
200
|
+
component: text
|
|
201
|
+
name: orderDate
|
|
202
|
+
props: { value: "{{ format item.created LL }}", type: span, color: text.secondary }
|
|
203
|
+
menu:
|
|
204
|
+
items:
|
|
205
|
+
- label: "Edit"
|
|
206
|
+
icon: edit
|
|
207
|
+
onClick:
|
|
208
|
+
- navigate: "orders/{{ item.id }}"
|
|
209
|
+
- label: "Delete"
|
|
210
|
+
icon: trash
|
|
211
|
+
disabled: "{{ eval item.status === 'Completed' }}"
|
|
212
|
+
onClick:
|
|
213
|
+
- confirm: { title: { en-US: "Delete?" } }
|
|
214
|
+
onClick:
|
|
215
|
+
- navigate: "orders/{{ item.id }}"
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## datasource
|
|
221
|
+
|
|
222
|
+
Headless data-loading wrapper. Renders children only after queries complete.
|
|
223
|
+
|
|
224
|
+
**Props:**
|
|
225
|
+
| Prop | Type | Description |
|
|
226
|
+
|------|------|-------------|
|
|
227
|
+
| `queries` | `QueryDef[]` | Query definitions |
|
|
228
|
+
| `refreshHandler` | `string` | Refresh handler name |
|
|
229
|
+
|
|
230
|
+
**Events:**
|
|
231
|
+
| Event | Data | Description |
|
|
232
|
+
|-------|------|-------------|
|
|
233
|
+
| `onLoading` | — | Fires when loading starts |
|
|
234
|
+
| `onSuccess` | `loadedResult` | Fires when data loads |
|
|
235
|
+
| `onError` | `error` | Fires on failure |
|
|
236
|
+
|
|
237
|
+
**Children:** Yes — rendered after all queries complete. Children get loaded data in variables.
|
|
238
|
+
|
|
239
|
+
```yaml
|
|
240
|
+
component: datasource
|
|
241
|
+
name: orderData
|
|
242
|
+
props:
|
|
243
|
+
refreshHandler: orderDetails
|
|
244
|
+
queries:
|
|
245
|
+
- name: getOrderDetails
|
|
246
|
+
query:
|
|
247
|
+
command: |
|
|
248
|
+
query($id: Int!) {
|
|
249
|
+
orderDetails(id: $id) {
|
|
250
|
+
id orderNumber items { name quantity }
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
variables:
|
|
254
|
+
id: "{{ number id }}"
|
|
255
|
+
onSuccess:
|
|
256
|
+
- consoleLog: { message: "Order loaded: {{ loadedResult.orderNumber }}" }
|
|
257
|
+
children:
|
|
258
|
+
- component: text
|
|
259
|
+
name: orderTitle
|
|
260
|
+
props: { value: "Order: {{ getOrderDetails.orderNumber }}", type: h3 }
|
|
261
|
+
- component: collection
|
|
262
|
+
name: itemsList
|
|
263
|
+
props:
|
|
264
|
+
items: "{{ getOrderDetails.items }}"
|
|
265
|
+
itemName: lineItem
|
|
266
|
+
children:
|
|
267
|
+
- component: text
|
|
268
|
+
name: lineLabel
|
|
269
|
+
props: { value: "{{ lineItem.name }} x{{ lineItem.quantity }}" }
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## script
|
|
275
|
+
|
|
276
|
+
External script loader. Headless — renders nothing. Deduplicates across instances.
|
|
277
|
+
|
|
278
|
+
**Props:**
|
|
279
|
+
| Prop | Type | Default | Description |
|
|
280
|
+
|------|------|---------|-------------|
|
|
281
|
+
| `src` | `string` | — | **Required.** Script URL |
|
|
282
|
+
| `globalCheck` | `string` | — | Global variable to check (e.g., `google.maps`) |
|
|
283
|
+
| `removeOnUnmount` | `boolean` | `false` | Remove script on unmount |
|
|
284
|
+
|
|
285
|
+
**Known auto-detected globals:** Google Maps, jQuery, Stripe, PayPal, YouTube, Facebook, Twitter.
|
|
286
|
+
|
|
287
|
+
```yaml
|
|
288
|
+
component: script
|
|
289
|
+
name: googleMaps
|
|
290
|
+
props:
|
|
291
|
+
src: "https://maps.googleapis.com/maps/api/js?key={{ mapsApiKey }}"
|
|
292
|
+
globalCheck: "google.maps"
|
|
293
|
+
```
|
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
# Data Display Components
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
- DataGrid component
|
|
5
|
+
- Text component
|
|
6
|
+
- Markup component
|
|
7
|
+
- Badge component
|
|
8
|
+
- Icon component
|
|
9
|
+
- Image component
|
|
10
|
+
- Photo component
|
|
11
|
+
- Summary component
|
|
12
|
+
- Diff component
|
|
13
|
+
- Viewer component
|
|
14
|
+
- Embed component
|
|
15
|
+
|
|
16
|
+
## dataGrid
|
|
17
|
+
|
|
18
|
+
Full-featured data table with views, filtering, sorting, pagination, and row actions.
|
|
19
|
+
|
|
20
|
+
**Props:**
|
|
21
|
+
| Prop | Type | Description |
|
|
22
|
+
|------|------|-------------|
|
|
23
|
+
| `toolbar` | `component[]` | Header toolbar components |
|
|
24
|
+
| `dotsMenu` | `{items[]}` | Three-dot menu per row |
|
|
25
|
+
| `dotsMenu.items[]` | `{label, icon, onClick, permission, isHidden, disabled}` | Menu item |
|
|
26
|
+
| `views` | `ITableViewProps[]` | View definitions |
|
|
27
|
+
| `enableSelect` | `Single \| Multiple` | Row selection mode |
|
|
28
|
+
| `isInDialog` | `boolean` | Optimize for dialog (10 rows) |
|
|
29
|
+
| `refreshHandler` | `string` | Refresh handler name |
|
|
30
|
+
|
|
31
|
+
**Options (under `props.options`):**
|
|
32
|
+
| Prop | Type | Default | Description |
|
|
33
|
+
|------|------|---------|-------------|
|
|
34
|
+
| `query` | `string` | — | **Required.** GraphQL entity name |
|
|
35
|
+
| `rootEntityName` | `string` | — | **Required.** Entity name for dynamic grid |
|
|
36
|
+
| `entityKeys` | `string[]` | — | **Required.** Primary key fields |
|
|
37
|
+
| `navigationType` | `navigate \| dialog \| store` | — | **Required.** Row click behavior |
|
|
38
|
+
| `enableDynamicGrid` | `boolean` | — | Enable dynamic columns |
|
|
39
|
+
| `enableViews` | `boolean` | — | Show view selector |
|
|
40
|
+
| `enableSearch` | `boolean` | — | Show search input |
|
|
41
|
+
| `enablePagination` | `boolean` | — | Show pagination |
|
|
42
|
+
| `enableColumns` | `boolean` | — | Show column selector |
|
|
43
|
+
| `enableFilter` | `boolean` | — | Show filter panel |
|
|
44
|
+
| `defaultView` | `string` | — | Default view name |
|
|
45
|
+
| `defaultPageSize` | `number` | `20` | Rows per page |
|
|
46
|
+
| `enableRefresh` | `boolean` | — | Auto-refresh |
|
|
47
|
+
| `refreshInterval` | `number` | `30000` | Auto-refresh polling interval (ms) |
|
|
48
|
+
| `enableChangeTracking` | `boolean` | `true` | Track data changes |
|
|
49
|
+
| `highlightNew` | `boolean` | `true` | Highlight newly added rows |
|
|
50
|
+
| `highlightUpdated` | `boolean` | `true` | Highlight rows with updated values |
|
|
51
|
+
| `highlightForRefreshes` | `number` | `1` | Per-row TTL — refresh cycles a highlight persists |
|
|
52
|
+
| `onRowClick` | `action[]` | — | Default row click action |
|
|
53
|
+
| `onDataLoad` | `action[]` | — | Action after data loads |
|
|
54
|
+
| `items` | `any` | — | Static data (instead of query) |
|
|
55
|
+
|
|
56
|
+
**View definition:**
|
|
57
|
+
| Prop | Type | Description |
|
|
58
|
+
|------|------|-------------|
|
|
59
|
+
| `name` | `string` | View identifier |
|
|
60
|
+
| `displayName` | `ILocalizeString` | View label |
|
|
61
|
+
| `columns` | `IColumn[]` | Column definitions |
|
|
62
|
+
| `filter` | `string` | View-level filter |
|
|
63
|
+
| `orderBy` | `{name, direction}[]` | Default sort |
|
|
64
|
+
| `onRowClick` | `action[]` | Per-view row click |
|
|
65
|
+
| `enableSelect` | `Single \| Multiple` | Per-view selection |
|
|
66
|
+
| `childViews` | `object` | Expandable child views |
|
|
67
|
+
|
|
68
|
+
**Column definition:**
|
|
69
|
+
| Prop | Type | Description |
|
|
70
|
+
|------|------|-------------|
|
|
71
|
+
| `name` | `string` | Field name |
|
|
72
|
+
| `label` | `ILocalizeString` | Column header |
|
|
73
|
+
| `isHidden` | `boolean` | Hidden column |
|
|
74
|
+
| `showAs` | `{component, props}` | Custom cell renderer |
|
|
75
|
+
| `width` | `number` | Column width |
|
|
76
|
+
| `sticky` | `left \| right` | Pin column |
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
component: dataGrid
|
|
80
|
+
name: ordersGrid
|
|
81
|
+
props:
|
|
82
|
+
refreshHandler: orders
|
|
83
|
+
dotsMenu:
|
|
84
|
+
items:
|
|
85
|
+
- label: { en-US: "Edit" }
|
|
86
|
+
onClick:
|
|
87
|
+
- navigate: "orders/{{ id }}"
|
|
88
|
+
- label: { en-US: "Delete" }
|
|
89
|
+
onClick:
|
|
90
|
+
- confirm:
|
|
91
|
+
title: { en-US: "Delete?" }
|
|
92
|
+
message: { en-US: "Are you sure?" }
|
|
93
|
+
- mutation:
|
|
94
|
+
command: "mutation($id: Int!) { deleteOrder(id: $id) { success } }"
|
|
95
|
+
variables: { id: "{{ number id }}" }
|
|
96
|
+
- refresh: orders
|
|
97
|
+
views:
|
|
98
|
+
- name: all
|
|
99
|
+
displayName: { en-US: "All Orders" }
|
|
100
|
+
columns:
|
|
101
|
+
- name: id
|
|
102
|
+
isHidden: true
|
|
103
|
+
- name: orderNumber
|
|
104
|
+
label: { en-US: "Order #" }
|
|
105
|
+
- name: customerName
|
|
106
|
+
label: { en-US: "Customer" }
|
|
107
|
+
- name: status
|
|
108
|
+
label: { en-US: "Status" }
|
|
109
|
+
showAs:
|
|
110
|
+
component: Badges/StatusesBadge
|
|
111
|
+
- name: created
|
|
112
|
+
label: { en-US: "Created" }
|
|
113
|
+
showAs:
|
|
114
|
+
component: text
|
|
115
|
+
props:
|
|
116
|
+
value: "{{ format created L }}"
|
|
117
|
+
orderBy:
|
|
118
|
+
- name: created
|
|
119
|
+
direction: DESC
|
|
120
|
+
- name: active
|
|
121
|
+
displayName: { en-US: "Active" }
|
|
122
|
+
filter: "status:Active"
|
|
123
|
+
columns:
|
|
124
|
+
- name: id
|
|
125
|
+
isHidden: true
|
|
126
|
+
- name: orderNumber
|
|
127
|
+
label: { en-US: "Order #" }
|
|
128
|
+
- name: customerName
|
|
129
|
+
label: { en-US: "Customer" }
|
|
130
|
+
options:
|
|
131
|
+
query: orders
|
|
132
|
+
rootEntityName: Order
|
|
133
|
+
entityKeys: [id]
|
|
134
|
+
navigationType: navigate
|
|
135
|
+
enableDynamicGrid: true
|
|
136
|
+
enableViews: true
|
|
137
|
+
enableSearch: true
|
|
138
|
+
enablePagination: true
|
|
139
|
+
enableColumns: true
|
|
140
|
+
enableFilter: true
|
|
141
|
+
defaultView: all
|
|
142
|
+
onRowClick:
|
|
143
|
+
- navigate: "orders/{{ id }}"
|
|
144
|
+
toolbar:
|
|
145
|
+
- component: dropdown
|
|
146
|
+
props:
|
|
147
|
+
label: { en-US: "Actions" }
|
|
148
|
+
icon: activity
|
|
149
|
+
items:
|
|
150
|
+
- label: { en-US: "Export" }
|
|
151
|
+
onClick:
|
|
152
|
+
- notification: { message: { en-US: "Exporting..." }, type: success }
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## text
|
|
158
|
+
|
|
159
|
+
Typography text display with template interpolation.
|
|
160
|
+
|
|
161
|
+
**Props:**
|
|
162
|
+
| Prop | Type | Default | Description |
|
|
163
|
+
|------|------|---------|-------------|
|
|
164
|
+
| `value` | `string` | — | Text content (template-parsed, localized) |
|
|
165
|
+
| `type` | `h1-h6 \| p \| span \| block` | `span` | HTML element / MUI variant |
|
|
166
|
+
| `color` | `string` | `text` | MUI color |
|
|
167
|
+
| `options` | `object` | — | Additional MUI Typography props |
|
|
168
|
+
| `stopPropagation` | `boolean` | — | Stop click propagation |
|
|
169
|
+
|
|
170
|
+
**Events:** `onClick`
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
- component: text
|
|
174
|
+
name: orderTitle
|
|
175
|
+
props:
|
|
176
|
+
value: "Order #{{ orderNumber }}"
|
|
177
|
+
type: h4
|
|
178
|
+
color: primary
|
|
179
|
+
|
|
180
|
+
- component: text
|
|
181
|
+
name: statusLabel
|
|
182
|
+
props:
|
|
183
|
+
value: "{{ format lastModified LLL }}"
|
|
184
|
+
type: span
|
|
185
|
+
color: text.secondary
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## markup
|
|
191
|
+
|
|
192
|
+
Markdown renderer using ReactMarkdown with GitHub Flavored Markdown.
|
|
193
|
+
|
|
194
|
+
**Props:**
|
|
195
|
+
| Prop | Type | Default | Description |
|
|
196
|
+
|------|------|---------|-------------|
|
|
197
|
+
| `content` | `string` | — | Markdown content (template-parsed) |
|
|
198
|
+
| `options.className` | `string` | `markup-content` | Wrapper CSS class |
|
|
199
|
+
| `options.wrapper` | `string` | `div` | Wrapper HTML element |
|
|
200
|
+
|
|
201
|
+
```yaml
|
|
202
|
+
component: markup
|
|
203
|
+
name: description
|
|
204
|
+
props:
|
|
205
|
+
content: |
|
|
206
|
+
## Instructions
|
|
207
|
+
- Step 1: Fill in the form
|
|
208
|
+
- Step 2: Click **Save**
|
|
209
|
+
- Step 3: Review the results
|
|
210
|
+
options:
|
|
211
|
+
className: help-text
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## badge
|
|
217
|
+
|
|
218
|
+
Colored chip/badge with dot indicator.
|
|
219
|
+
|
|
220
|
+
**Props:**
|
|
221
|
+
| Prop | Type | Description |
|
|
222
|
+
|------|------|-------------|
|
|
223
|
+
| `label` | `string` | Badge text (template-parsed) |
|
|
224
|
+
| `colorKey` | `string` | Color lookup key (template-parsed; defaults to lowercased label) |
|
|
225
|
+
| `options.colors` | `Record<string, {label, bgcolor, dot}>` | Color map (must include `default`) |
|
|
226
|
+
|
|
227
|
+
```yaml
|
|
228
|
+
component: badge
|
|
229
|
+
name: statusBadge
|
|
230
|
+
props:
|
|
231
|
+
label: "{{ status }}"
|
|
232
|
+
options:
|
|
233
|
+
colors:
|
|
234
|
+
active: { label: "Active", bgcolor: "#e8f5e9", dot: "#4caf50" }
|
|
235
|
+
inactive: { label: "Inactive", bgcolor: "#fce4ec", dot: "#f44336" }
|
|
236
|
+
default: { label: "Unknown", bgcolor: "#f5f5f5", dot: "#9e9e9e" }
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## icon
|
|
242
|
+
|
|
243
|
+
Icon renderer. Supports FontAwesome, Tabler, and Feather icons.
|
|
244
|
+
|
|
245
|
+
**Props:**
|
|
246
|
+
| Prop | Type | Description |
|
|
247
|
+
|------|------|-------------|
|
|
248
|
+
| `icon` | `string` | Icon name: FontAwesome name, `tabler-*` class, or `activity` |
|
|
249
|
+
| `color` | `string` | MUI palette color (e.g., `primary`, `error.light`) or CSS color |
|
|
250
|
+
| `iconColor` | `string` | Higher-priority color override |
|
|
251
|
+
| `style` | `object` | Inline styles |
|
|
252
|
+
|
|
253
|
+
```yaml
|
|
254
|
+
component: icon
|
|
255
|
+
name: statusIcon
|
|
256
|
+
props:
|
|
257
|
+
icon: check-circle
|
|
258
|
+
color: success
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## image
|
|
264
|
+
|
|
265
|
+
Simple responsive image.
|
|
266
|
+
|
|
267
|
+
**Props:**
|
|
268
|
+
| Prop | Type | Default | Description |
|
|
269
|
+
|------|------|---------|-------------|
|
|
270
|
+
| `url` | `string` | — | Image URL (template-parsed) |
|
|
271
|
+
| `alt` | `string` | `image` | Alt text |
|
|
272
|
+
| `sx` | `SxProps` | `{maxWidth:'100%', height:'auto'}` | Styles |
|
|
273
|
+
| `className` | `string` | — | CSS class |
|
|
274
|
+
|
|
275
|
+
```yaml
|
|
276
|
+
component: image
|
|
277
|
+
name: logo
|
|
278
|
+
props:
|
|
279
|
+
url: "{{ logoUrl }}"
|
|
280
|
+
alt: "Company Logo"
|
|
281
|
+
sx: { maxWidth: 200, borderRadius: 1 }
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## photo
|
|
287
|
+
|
|
288
|
+
Camera capture component. Opens device camera, captures photos, uploads to S3.
|
|
289
|
+
|
|
290
|
+
**Props:**
|
|
291
|
+
| Prop | Type | Description |
|
|
292
|
+
|------|------|-------------|
|
|
293
|
+
| `onTakePhoto` | `action[]` | Action after capture+upload (data: `fileUrl`, `fileName`) |
|
|
294
|
+
| `onClosePhoto` | `action[]` | Action on Save & Close |
|
|
295
|
+
|
|
296
|
+
```yaml
|
|
297
|
+
component: photo
|
|
298
|
+
name: itemPhoto
|
|
299
|
+
props:
|
|
300
|
+
onTakePhoto:
|
|
301
|
+
- setFields:
|
|
302
|
+
photoUrl: "{{ fileUrl }}"
|
|
303
|
+
- notification: { message: { en-US: "Photo captured" }, type: success }
|
|
304
|
+
onClosePhoto:
|
|
305
|
+
- refresh: photos
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## summary
|
|
311
|
+
|
|
312
|
+
Expandable accordion with summary items (icon + label + value) in header.
|
|
313
|
+
|
|
314
|
+
**Props:**
|
|
315
|
+
| Prop | Type | Description |
|
|
316
|
+
|------|------|-------------|
|
|
317
|
+
| `label` | `string` | Heading text |
|
|
318
|
+
| `items` | `{label, value, icon?, iconColor?}[]` | Summary data (values template-parsed) |
|
|
319
|
+
| `options.allowExpand` | `boolean` | Enable expand/collapse |
|
|
320
|
+
| `options.defaultExpanded` | `boolean` | Start expanded |
|
|
321
|
+
| `refreshHandler` | `string` | Refresh handler |
|
|
322
|
+
|
|
323
|
+
**Children:** Yes — rendered in AccordionDetails when `allowExpand: true`.
|
|
324
|
+
|
|
325
|
+
```yaml
|
|
326
|
+
component: summary
|
|
327
|
+
name: orderSummary
|
|
328
|
+
props:
|
|
329
|
+
label: "Order Summary"
|
|
330
|
+
items:
|
|
331
|
+
- { label: "Total", value: "{{ totalAmount }}", icon: "dollar-sign", iconColor: "primary" }
|
|
332
|
+
- { label: "Items", value: "{{ itemCount }}", icon: "package" }
|
|
333
|
+
- { label: "Status", value: "{{ status }}", icon: "activity" }
|
|
334
|
+
options:
|
|
335
|
+
allowExpand: true
|
|
336
|
+
defaultExpanded: false
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## diff
|
|
342
|
+
|
|
343
|
+
Side-by-side diff viewer for comparing text.
|
|
344
|
+
|
|
345
|
+
**Props:**
|
|
346
|
+
| Prop | Type | Default | Description |
|
|
347
|
+
|------|------|---------|-------------|
|
|
348
|
+
| `oldValue` | `string` | — | Before text (template-parsed) |
|
|
349
|
+
| `newValue` | `string` | — | After text (template-parsed) |
|
|
350
|
+
| `leftTitle` | `string` | `Old` | Left pane title |
|
|
351
|
+
| `rightTitle` | `string` | `New` | Right pane title |
|
|
352
|
+
| `useDarkTheme` | `boolean` | auto | Dark theme (auto-detects from MUI) |
|
|
353
|
+
|
|
354
|
+
```yaml
|
|
355
|
+
component: diff
|
|
356
|
+
name: configDiff
|
|
357
|
+
props:
|
|
358
|
+
oldValue: "{{ previousConfig }}"
|
|
359
|
+
newValue: "{{ currentConfig }}"
|
|
360
|
+
leftTitle: "Previous Version"
|
|
361
|
+
rightTitle: "Current Version"
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## viewer
|
|
367
|
+
|
|
368
|
+
PDF/image document viewer with optional download.
|
|
369
|
+
|
|
370
|
+
**Props:**
|
|
371
|
+
| Prop | Type | Default | Description |
|
|
372
|
+
|------|------|---------|-------------|
|
|
373
|
+
| `url` | `string` | — | File URL (template-parsed) |
|
|
374
|
+
| `type` | `pdf \| image` | auto | File type (auto-detects from extension) |
|
|
375
|
+
| `options.enableDownload` | `boolean` | — | Show download button |
|
|
376
|
+
| `options.fileName` | `string` | — | Download filename |
|
|
377
|
+
| `options.title` | `ILocalizeString` | — | Viewer title |
|
|
378
|
+
| `options.height` | `string` | `600px` | Container height |
|
|
379
|
+
| `options.width` | `string` | `100%` | Container width |
|
|
380
|
+
|
|
381
|
+
```yaml
|
|
382
|
+
component: viewer
|
|
383
|
+
name: documentViewer
|
|
384
|
+
props:
|
|
385
|
+
url: "{{ documentUrl }}"
|
|
386
|
+
options:
|
|
387
|
+
title: { en-US: "Invoice Document" }
|
|
388
|
+
enableDownload: true
|
|
389
|
+
fileName: "invoice-{{ orderNumber }}.pdf"
|
|
390
|
+
height: "800px"
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## embed
|
|
396
|
+
|
|
397
|
+
Iframe embed for external URLs.
|
|
398
|
+
|
|
399
|
+
**Props:**
|
|
400
|
+
| Prop | Type | Description |
|
|
401
|
+
|------|------|-------------|
|
|
402
|
+
| `url` | `string` | Iframe source URL (template-parsed) |
|
|
403
|
+
| `className` | `string` | Wrapper CSS class |
|
|
404
|
+
|
|
405
|
+
```yaml
|
|
406
|
+
component: embed
|
|
407
|
+
name: externalReport
|
|
408
|
+
props:
|
|
409
|
+
url: "https://reports.example.com/dashboard?id={{ reportId }}"
|
|
410
|
+
className: "full-width-embed"
|
|
411
|
+
```
|