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,390 @@
|
|
|
1
|
+
# Layout & Structure Components
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
- Layout component
|
|
5
|
+
- Row component
|
|
6
|
+
- Col component
|
|
7
|
+
- Header component
|
|
8
|
+
- Tabs component
|
|
9
|
+
- Toolbar component
|
|
10
|
+
- Card component
|
|
11
|
+
- Line component
|
|
12
|
+
- Slot component
|
|
13
|
+
|
|
14
|
+
## layout
|
|
15
|
+
|
|
16
|
+
General-purpose container. Renders MUI Grid or Box with flexbox.
|
|
17
|
+
|
|
18
|
+
**Props:**
|
|
19
|
+
| Prop | Type | Default | Description |
|
|
20
|
+
|------|------|---------|-------------|
|
|
21
|
+
| `orientation` | `horizontal \| vertical \| flex` | — | Grid direction |
|
|
22
|
+
| `cols` | `number` | — | Equal-width columns (`12/cols` per child) |
|
|
23
|
+
| `columns` | `number \| {xs,sm,md,lg,xl}` | — | Responsive column count |
|
|
24
|
+
| `spacing` | `number` | `3` | Grid gap spacing |
|
|
25
|
+
| `containerTag` | `grid \| box` | `grid` | Grid container vs flexbox Box |
|
|
26
|
+
| `containerSx` | `SxProps` | — | MUI sx styles on container |
|
|
27
|
+
| `className` | `string` | — | CSS class (template-parsed) |
|
|
28
|
+
| `id` | `string` | — | Element ID (template-parsed) |
|
|
29
|
+
| `direction` | `row \| column` | — | Explicit flex direction |
|
|
30
|
+
| `justifyContent` | `string` | — | Flexbox main-axis alignment |
|
|
31
|
+
| `alignItems` | `string` | — | Flexbox cross-axis alignment |
|
|
32
|
+
| `refreshHandler` | `string` | — | Remounts on refresh event |
|
|
33
|
+
| `permission` | `string` | — | Permission gate |
|
|
34
|
+
| `title` | `ILocalizeString` | — | Layout title |
|
|
35
|
+
| `icon` | `string` | — | Layout icon |
|
|
36
|
+
| `toolbar` | `component[]` | — | Toolbar components |
|
|
37
|
+
| `itemDefaults` | `{size?,offset?,order?,sx?}` | — | Default Grid item props for all children |
|
|
38
|
+
|
|
39
|
+
**Events:** `onClick`
|
|
40
|
+
|
|
41
|
+
**Children:** Yes — each child rendered via ComponentRender, wrapped in Grid item.
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
# Basic 2-column layout
|
|
45
|
+
component: layout
|
|
46
|
+
name: detailLayout
|
|
47
|
+
props:
|
|
48
|
+
cols: 2
|
|
49
|
+
spacing: 2
|
|
50
|
+
title:
|
|
51
|
+
en-US: "Detail View"
|
|
52
|
+
icon: file-text
|
|
53
|
+
permission: "Module/Read"
|
|
54
|
+
children:
|
|
55
|
+
- component: field
|
|
56
|
+
name: firstName
|
|
57
|
+
props: { type: text, label: { en-US: "First Name" } }
|
|
58
|
+
- component: field
|
|
59
|
+
name: lastName
|
|
60
|
+
props: { type: text, label: { en-US: "Last Name" } }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
# Horizontal flex layout with toolbar
|
|
65
|
+
component: layout
|
|
66
|
+
name: pageLayout
|
|
67
|
+
props:
|
|
68
|
+
orientation: vertical
|
|
69
|
+
toolbar:
|
|
70
|
+
- component: button
|
|
71
|
+
name: saveBtn
|
|
72
|
+
props:
|
|
73
|
+
label: { en-US: "Save" }
|
|
74
|
+
icon: check
|
|
75
|
+
options: { type: submit, variant: primary }
|
|
76
|
+
children:
|
|
77
|
+
- component: form
|
|
78
|
+
name: myForm
|
|
79
|
+
# ...
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## row
|
|
85
|
+
|
|
86
|
+
Horizontal MUI Grid row. Simpler alternative to layout for single rows.
|
|
87
|
+
|
|
88
|
+
**Props:**
|
|
89
|
+
| Prop | Type | Default | Description |
|
|
90
|
+
|------|------|---------|-------------|
|
|
91
|
+
| `spacing` | `number` | `3` | Grid spacing |
|
|
92
|
+
| `columns` | `number` | — | Grid columns |
|
|
93
|
+
| `direction` | `row \| column` | `row` | Grid direction |
|
|
94
|
+
| `sx` | `SxProps` | — | MUI sx styles |
|
|
95
|
+
| `className` | `string` | — | CSS class |
|
|
96
|
+
| `alignItems` | `string` | — | Cross-axis alignment |
|
|
97
|
+
| `justifyContent` | `string` | — | Main-axis alignment |
|
|
98
|
+
|
|
99
|
+
**Children:** Yes — rendered without Grid item wrapper (use `col` children).
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
component: row
|
|
103
|
+
name: headerRow
|
|
104
|
+
props:
|
|
105
|
+
spacing: 2
|
|
106
|
+
alignItems: center
|
|
107
|
+
children:
|
|
108
|
+
- component: col
|
|
109
|
+
name: leftCol
|
|
110
|
+
props: { size: 6 }
|
|
111
|
+
children:
|
|
112
|
+
- component: text
|
|
113
|
+
name: title
|
|
114
|
+
props: { value: "Header", type: h3 }
|
|
115
|
+
- component: col
|
|
116
|
+
name: rightCol
|
|
117
|
+
props: { size: 6 }
|
|
118
|
+
children:
|
|
119
|
+
- component: button
|
|
120
|
+
name: actionBtn
|
|
121
|
+
props: { label: { en-US: "Action" } }
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## col
|
|
127
|
+
|
|
128
|
+
Grid column item. Child of `row` or `layout`.
|
|
129
|
+
|
|
130
|
+
**Props:**
|
|
131
|
+
| Prop | Type | Description |
|
|
132
|
+
|------|------|-------------|
|
|
133
|
+
| `size` | `number \| {xs,sm,md,lg,xl}` | Responsive column width (plain number = xs) |
|
|
134
|
+
| `offset` | `number \| {xs,sm,md,lg,xl}` | Responsive column offset |
|
|
135
|
+
| `order` | `number \| {xs,sm,md,lg,xl}` | CSS order for reordering |
|
|
136
|
+
| `sx` | `SxProps` | MUI sx styles |
|
|
137
|
+
| `className` | `string` | CSS class |
|
|
138
|
+
| `alignSelf` | `string` | CSS align-self |
|
|
139
|
+
|
|
140
|
+
**Children:** Yes.
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
component: col
|
|
144
|
+
name: mainContent
|
|
145
|
+
props:
|
|
146
|
+
size: { xs: 12, md: 8 }
|
|
147
|
+
offset: { md: 2 }
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## header
|
|
153
|
+
|
|
154
|
+
Section header with title and optional subtitle.
|
|
155
|
+
|
|
156
|
+
**Props:**
|
|
157
|
+
| Prop | Type | Description |
|
|
158
|
+
|------|------|-------------|
|
|
159
|
+
| `title` | `string` | Rendered as `<h3>` |
|
|
160
|
+
| `subtitle` | `string` | Rendered as `<h4>` with divider |
|
|
161
|
+
| `className` | `string` | Additional CSS class |
|
|
162
|
+
|
|
163
|
+
**Children:** Yes.
|
|
164
|
+
|
|
165
|
+
```yaml
|
|
166
|
+
component: header
|
|
167
|
+
name: sectionHeader
|
|
168
|
+
props:
|
|
169
|
+
title: "Contact Information"
|
|
170
|
+
subtitle: "Primary contact details"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## tabs
|
|
176
|
+
|
|
177
|
+
Tabbed interface with MUI TabContext. Tab state stored in URL params.
|
|
178
|
+
|
|
179
|
+
**Props:**
|
|
180
|
+
| Prop | Type | Description |
|
|
181
|
+
|------|------|-------------|
|
|
182
|
+
| `options` | `object` | Additional props spread to Tab elements |
|
|
183
|
+
| `toolbar` | `component[]` | Action components next to tab list |
|
|
184
|
+
| `useNavigationForTabs` | `boolean` | Push to history instead of replace |
|
|
185
|
+
|
|
186
|
+
**Tab children props:**
|
|
187
|
+
| Prop | Type | Description |
|
|
188
|
+
|------|------|-------------|
|
|
189
|
+
| `label` | `ILocalizeString` | Tab label (localized, template-parsed) |
|
|
190
|
+
| `isVisible` | `string` | Template expression — show when truthy |
|
|
191
|
+
| `isHidden` | `string` | Template expression — hide when truthy |
|
|
192
|
+
| `options` | `object` | Additional Tab element props |
|
|
193
|
+
|
|
194
|
+
**Children:** Each child = one tab. Content rendered inside TabPanel via LayoutComponent.
|
|
195
|
+
|
|
196
|
+
```yaml
|
|
197
|
+
component: tabs
|
|
198
|
+
name: detailTabs
|
|
199
|
+
props:
|
|
200
|
+
toolbar:
|
|
201
|
+
- component: button
|
|
202
|
+
name: refreshBtn
|
|
203
|
+
props: { label: { en-US: "Refresh" }, icon: refresh-cw }
|
|
204
|
+
children:
|
|
205
|
+
- name: general
|
|
206
|
+
props:
|
|
207
|
+
label: { en-US: "General" }
|
|
208
|
+
children:
|
|
209
|
+
- component: field
|
|
210
|
+
name: name
|
|
211
|
+
props: { type: text, label: { en-US: "Name" } }
|
|
212
|
+
- name: advanced
|
|
213
|
+
props:
|
|
214
|
+
label: { en-US: "Advanced" }
|
|
215
|
+
isHidden: "{{ eval !isAdmin }}"
|
|
216
|
+
children:
|
|
217
|
+
- component: field
|
|
218
|
+
name: config
|
|
219
|
+
props: { type: textarea, label: { en-US: "Config" } }
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## toolbar
|
|
225
|
+
|
|
226
|
+
Nav-style toolbar with title and action buttons.
|
|
227
|
+
|
|
228
|
+
**Props:**
|
|
229
|
+
| Prop | Type | Description |
|
|
230
|
+
|------|------|-------------|
|
|
231
|
+
| `title` | `ILocalizeString` | Toolbar title (navbar brand) |
|
|
232
|
+
| `buttons` | `component[]` | Action components (right-aligned) |
|
|
233
|
+
|
|
234
|
+
**Children:** No — uses `buttons` prop.
|
|
235
|
+
|
|
236
|
+
```yaml
|
|
237
|
+
component: toolbar
|
|
238
|
+
name: pageToolbar
|
|
239
|
+
props:
|
|
240
|
+
title: { en-US: "Order Management" }
|
|
241
|
+
buttons:
|
|
242
|
+
- component: button
|
|
243
|
+
name: exportBtn
|
|
244
|
+
props: { label: { en-US: "Export" }, icon: download }
|
|
245
|
+
- component: button
|
|
246
|
+
name: createBtn
|
|
247
|
+
props: { label: { en-US: "Create" }, icon: plus, options: { variant: primary } }
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## card
|
|
253
|
+
|
|
254
|
+
MUI Card container with optional header, content, and actions.
|
|
255
|
+
|
|
256
|
+
**Props (under `options`):**
|
|
257
|
+
| Prop | Type | Default | Description |
|
|
258
|
+
|------|------|---------|-------------|
|
|
259
|
+
| `variant` | `elevation \| outlined` | — | MUI Card variant |
|
|
260
|
+
| `elevation` | `number` | — | Shadow depth |
|
|
261
|
+
| `sx` | `SxProps` | — | Card sx styles |
|
|
262
|
+
| `className` | `string` | — | Additional CSS class |
|
|
263
|
+
| `bgcolor` | `string` | — | Background color |
|
|
264
|
+
| `color` | `string` | — | Text color |
|
|
265
|
+
| `header` | `{title?, subheader?, sx?}` | — | Renders MUI CardHeader |
|
|
266
|
+
| `disableContentWrapper` | `boolean` | `false` | Skip CardContent wrapper |
|
|
267
|
+
| `contentSx` | `SxProps` | — | CardContent styles |
|
|
268
|
+
| `contentClassName` | `string` | `card-content` | CardContent CSS class |
|
|
269
|
+
|
|
270
|
+
**Children:** Yes — wrapped in CardContent (unless `disableContentWrapper`).
|
|
271
|
+
|
|
272
|
+
```yaml
|
|
273
|
+
component: card
|
|
274
|
+
name: summaryCard
|
|
275
|
+
props:
|
|
276
|
+
options:
|
|
277
|
+
variant: outlined
|
|
278
|
+
header:
|
|
279
|
+
title: "Summary"
|
|
280
|
+
subheader: "Last updated today"
|
|
281
|
+
contentSx:
|
|
282
|
+
padding: 2
|
|
283
|
+
children:
|
|
284
|
+
- component: text
|
|
285
|
+
name: total
|
|
286
|
+
props: { value: "Total: {{ totalAmount }}", type: h4 }
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## slot
|
|
292
|
+
|
|
293
|
+
Extension point that renders dynamically registered components targeting a named slot. Enables cross-module UI extensions without modifying the original layout.
|
|
294
|
+
|
|
295
|
+
**Props:**
|
|
296
|
+
| Prop | Type | Default | Description |
|
|
297
|
+
|------|------|---------|-------------|
|
|
298
|
+
| `name` | `string` | — | Slot name to match. Supports templates: `TMS/{{entityType}}/Actions` |
|
|
299
|
+
| `itemTag` | `string` | `React.Fragment` | HTML element to wrap each extension (`div`, `li`, etc.) |
|
|
300
|
+
|
|
301
|
+
**Children:** No — extensions are loaded from the database at runtime.
|
|
302
|
+
|
|
303
|
+
Extension components must define `props.targetSlot` matching the slot name, `props.order` for sort order, and a `layout` object.
|
|
304
|
+
|
|
305
|
+
```yaml
|
|
306
|
+
# Define a slot extension point
|
|
307
|
+
component: slot
|
|
308
|
+
props:
|
|
309
|
+
name: "TMS/ShipmentDashboard/Tabs"
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
```yaml
|
|
313
|
+
# Extension component (registered via another module's appComponents)
|
|
314
|
+
name: "TMS/ShipmentDashboard/TrackingTab"
|
|
315
|
+
props:
|
|
316
|
+
targetSlot: "TMS/ShipmentDashboard/Tabs"
|
|
317
|
+
order: 10
|
|
318
|
+
layout:
|
|
319
|
+
component: tab
|
|
320
|
+
props:
|
|
321
|
+
label: { en-US: "Tracking" }
|
|
322
|
+
children:
|
|
323
|
+
- component: layout
|
|
324
|
+
props:
|
|
325
|
+
component: "TMS/Tracking/Panel"
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Naming convention:** `{Module}/{Entity}/{Location}` (e.g., `TMS/OrderDetail/Actions`)
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## line
|
|
333
|
+
|
|
334
|
+
Simple `<hr>` horizontal divider.
|
|
335
|
+
|
|
336
|
+
**Props:**
|
|
337
|
+
| Prop | Type | Default | Description |
|
|
338
|
+
|------|------|---------|-------------|
|
|
339
|
+
| `options.style` | `CSSProperties` | `margin: 0.5rem 0` | Inline styles |
|
|
340
|
+
|
|
341
|
+
```yaml
|
|
342
|
+
component: line
|
|
343
|
+
name: divider
|
|
344
|
+
props:
|
|
345
|
+
options:
|
|
346
|
+
style: { margin: "1rem 0" }
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## slot
|
|
352
|
+
|
|
353
|
+
Extension point that renders UI elements injected by other modules (via `appComponent` with `targetSlot`). Slots render extensions from the database — they have no YAML `children`.
|
|
354
|
+
|
|
355
|
+
**Props:**
|
|
356
|
+
| Prop | Type | Required | Description |
|
|
357
|
+
|------|------|----------|-------------|
|
|
358
|
+
| `name` | `string` | Yes | Slot name to match against. Extension components target this name via `targetSlot`. Supports template expressions. |
|
|
359
|
+
| `itemTag` | `string` | No | HTML element type to wrap each extension (e.g., `li`, `div`) |
|
|
360
|
+
|
|
361
|
+
**Children:** No — slots render extension components registered in the database, not YAML children.
|
|
362
|
+
|
|
363
|
+
**Naming convention:** Use `Module/Entity/Location` pattern for slot names to avoid collisions (e.g., `Orders/Detail/Sidebar`, `Contacts/Form/Actions`).
|
|
364
|
+
|
|
365
|
+
```yaml
|
|
366
|
+
# Basic slot — extension point in a layout
|
|
367
|
+
component: slot
|
|
368
|
+
name: sidebarSlot
|
|
369
|
+
props:
|
|
370
|
+
name: "Orders/Detail/Sidebar"
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
```yaml
|
|
374
|
+
# Dynamic slot name using template expression
|
|
375
|
+
component: slot
|
|
376
|
+
name: entitySlot
|
|
377
|
+
props:
|
|
378
|
+
name: "{{ eval `Orders/${entityType}/Actions` }}"
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
```yaml
|
|
382
|
+
# Slot with itemTag for list-style extensions
|
|
383
|
+
component: slot
|
|
384
|
+
name: menuSlot
|
|
385
|
+
props:
|
|
386
|
+
name: "Navigation/MainMenu/Items"
|
|
387
|
+
itemTag: li
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
**How extensions target slots:** Other modules register extension components using `appComponent` with `targetSlot` and optional `order` to control rendering position within the slot. See `appComponent.json` schema for details.
|