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,477 @@
|
|
|
1
|
+
# Specialized Components
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
- Calendar component
|
|
5
|
+
- Notes component
|
|
6
|
+
- Dashboard component
|
|
7
|
+
- DashboardWidget component
|
|
8
|
+
- Widget component
|
|
9
|
+
- Timeline component
|
|
10
|
+
- TimelineGrid component
|
|
11
|
+
- OAuth2 component
|
|
12
|
+
|
|
13
|
+
## calendar
|
|
14
|
+
|
|
15
|
+
FullCalendar integration with GraphQL event sources, timezone support, and programmatic control.
|
|
16
|
+
|
|
17
|
+
**Props:**
|
|
18
|
+
| Prop | Type | Default | Description |
|
|
19
|
+
|------|------|---------|-------------|
|
|
20
|
+
| `calendarId` | `string` | — | Calendar ID (template-parsed), used for timezone fetch |
|
|
21
|
+
| `initialView` | `string` | `dayGridMonth` | View: `dayGridMonth`, `timeGridWeek`, `timeGridDay`, `listMonth` |
|
|
22
|
+
| `height` | `number` | `600` | Calendar height |
|
|
23
|
+
| `aspectRatio` | `number` | `1.35` | Calendar aspect ratio |
|
|
24
|
+
| `options.headerToolbar` | `object` | — | FullCalendar header toolbar config |
|
|
25
|
+
| `options.selectable` | `boolean` | — | Enable date selection |
|
|
26
|
+
| `options.editable` | `boolean` | — | Enable drag/resize events |
|
|
27
|
+
| `options.weekends` | `boolean` | — | Show weekends |
|
|
28
|
+
| `options.nowIndicator` | `boolean` | — | Show current time line |
|
|
29
|
+
| `options.eventDisplay` | `string` | — | Event display style |
|
|
30
|
+
| `options.eventSources` | `EventSource[]` | — | Event data sources |
|
|
31
|
+
|
|
32
|
+
**EventSource definition:**
|
|
33
|
+
| Prop | Type | Description |
|
|
34
|
+
|------|------|-------------|
|
|
35
|
+
| `query.command` | `string` | GraphQL query |
|
|
36
|
+
| `query.variables` | `object` | Query variables |
|
|
37
|
+
| `query.path` | `string` | Path to events in response |
|
|
38
|
+
| `query.mapping` | `object` | Field mapping for events |
|
|
39
|
+
| `color` | `string` | Event background color |
|
|
40
|
+
| `textColor` | `string` | Event text color |
|
|
41
|
+
|
|
42
|
+
**Events:**
|
|
43
|
+
| Event | Data | Description |
|
|
44
|
+
|-------|------|-------------|
|
|
45
|
+
| `onDateClick` | `date, dateStr, allDay, view` | Date cell clicked |
|
|
46
|
+
| `onEventClick` | `event{id,title,start,end,allDay,extendedProps}, view` | Event clicked |
|
|
47
|
+
| `onSelect` | `start, end, startStr, endStr, allDay, view` | Date range selected |
|
|
48
|
+
| `onEventDrop` | `event, oldEvent, delta, revert` | Event drag-dropped |
|
|
49
|
+
| `onEventResize` | `event, oldEvent, revert` | Event resized |
|
|
50
|
+
| `onDatesSet` | `start, end, startStr, endStr, view` | Visible range changed |
|
|
51
|
+
|
|
52
|
+
**Store API:** Stores `calendar_{calendarId}` in context store with: `refresh()`, `changeView()`, `gotoDate()`, `prev()`, `next()`, `today()`.
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
component: calendar
|
|
56
|
+
name: shipmentCalendar
|
|
57
|
+
props:
|
|
58
|
+
calendarId: "{{ calendarId }}"
|
|
59
|
+
initialView: dayGridMonth
|
|
60
|
+
height: 700
|
|
61
|
+
options:
|
|
62
|
+
selectable: true
|
|
63
|
+
editable: true
|
|
64
|
+
weekends: true
|
|
65
|
+
nowIndicator: true
|
|
66
|
+
headerToolbar:
|
|
67
|
+
left: prev,next,today
|
|
68
|
+
center: title
|
|
69
|
+
right: dayGridMonth,timeGridWeek,timeGridDay
|
|
70
|
+
eventSources:
|
|
71
|
+
- query:
|
|
72
|
+
command: |
|
|
73
|
+
query($start: DateTime!, $end: DateTime!) {
|
|
74
|
+
shipments(startDate: $start, endDate: $end) {
|
|
75
|
+
id title startDate endDate status
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
variables:
|
|
79
|
+
start: "{{ startStr }}"
|
|
80
|
+
end: "{{ endStr }}"
|
|
81
|
+
path: shipments
|
|
82
|
+
mapping:
|
|
83
|
+
id: id
|
|
84
|
+
title: title
|
|
85
|
+
start: startDate
|
|
86
|
+
end: endDate
|
|
87
|
+
color: "#1976d2"
|
|
88
|
+
events:
|
|
89
|
+
onEventClick:
|
|
90
|
+
- navigate: "shipments/{{ event.id }}"
|
|
91
|
+
onDateClick:
|
|
92
|
+
- dialog:
|
|
93
|
+
component: Shipments/CreateShipment
|
|
94
|
+
props:
|
|
95
|
+
date: "{{ dateStr }}"
|
|
96
|
+
onSelect:
|
|
97
|
+
- dialog:
|
|
98
|
+
component: Shipments/CreateShipment
|
|
99
|
+
props:
|
|
100
|
+
startDate: "{{ startStr }}"
|
|
101
|
+
endDate: "{{ endStr }}"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## notes
|
|
107
|
+
|
|
108
|
+
Rich-text notes/comments component with TipTap editor, message threading, and pagination.
|
|
109
|
+
|
|
110
|
+
**Props:**
|
|
111
|
+
| Prop | Type | Default | Description |
|
|
112
|
+
|------|------|---------|-------------|
|
|
113
|
+
| `threadName` | `string` | — | Thread identifier (template-parsed) |
|
|
114
|
+
| `title` | `ILocalizeString` | `Notes` | Card title |
|
|
115
|
+
| `height` | `number` | `400` | Card max height |
|
|
116
|
+
| `placeholder` | `string` | — | Editor placeholder |
|
|
117
|
+
| `readonly` | `boolean \| string` | — | Hide input area |
|
|
118
|
+
| `options.allowAttachments` | `boolean` | `true` | Show attach button |
|
|
119
|
+
| `options.showTimestamps` | `boolean` | `true` | Show relative times |
|
|
120
|
+
| `options.showAuthor` | `boolean` | `true` | Show author info |
|
|
121
|
+
| `options.inputPosition` | `top \| bottom` | `top` | Input placement |
|
|
122
|
+
| `options.autoScroll` | `boolean` | `true` | Auto-scroll to latest |
|
|
123
|
+
| `pagination.pageSize` | `number` | `20` | Notes per page |
|
|
124
|
+
| `pagination.orderBy` | `string` | `created` | Sort field |
|
|
125
|
+
| `pagination.orderDirection` | `ASC \| DESC` | `DESC` | Sort direction |
|
|
126
|
+
| `pagination.loadMoreMode` | `button \| auto \| disabled` | `button` | Load more behavior |
|
|
127
|
+
| `permissions.create` | `string` | — | Create permission |
|
|
128
|
+
| `permissions.edit` | `string` | — | Edit permission |
|
|
129
|
+
| `permissions.delete` | `string` | — | Delete permission |
|
|
130
|
+
|
|
131
|
+
**Events:**
|
|
132
|
+
| Event | Description |
|
|
133
|
+
|-------|-------------|
|
|
134
|
+
| `onNoteCreated` | After note created |
|
|
135
|
+
| `onNoteUpdated` | After note updated |
|
|
136
|
+
| `onNoteDeleted` | After note deleted |
|
|
137
|
+
|
|
138
|
+
**Features:** Enter to send, Shift+Enter for newline. Message grouping (5 min window). Date separators. Long message collapse (>500 chars). Edit/delete on hover.
|
|
139
|
+
|
|
140
|
+
```yaml
|
|
141
|
+
component: notes
|
|
142
|
+
name: orderNotes
|
|
143
|
+
props:
|
|
144
|
+
threadName: "order-{{ orderId }}"
|
|
145
|
+
title: { en-US: "Order Notes" }
|
|
146
|
+
height: 500
|
|
147
|
+
placeholder: "Add a note..."
|
|
148
|
+
options:
|
|
149
|
+
allowAttachments: true
|
|
150
|
+
inputPosition: top
|
|
151
|
+
autoScroll: true
|
|
152
|
+
pagination:
|
|
153
|
+
pageSize: 30
|
|
154
|
+
orderDirection: DESC
|
|
155
|
+
loadMoreMode: button
|
|
156
|
+
permissions:
|
|
157
|
+
create: "Orders/CreateNote"
|
|
158
|
+
edit: "Orders/EditNote"
|
|
159
|
+
delete: "Orders/DeleteNote"
|
|
160
|
+
events:
|
|
161
|
+
onNoteCreated:
|
|
162
|
+
- refresh: orderActivity
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## dashboard
|
|
168
|
+
|
|
169
|
+
CSS Grid-based dashboard with draggable/resizable widgets.
|
|
170
|
+
|
|
171
|
+
**Props:**
|
|
172
|
+
| Prop | Type | Default | Description |
|
|
173
|
+
|------|------|---------|-------------|
|
|
174
|
+
| `toolbar` | `component[]` | — | Filter/form fields in header |
|
|
175
|
+
| `options.rows` | `number` | `12` | Grid rows |
|
|
176
|
+
| `options.columns` | `number` | `12` | Grid columns |
|
|
177
|
+
| `options.gridGap` | `number` | `16` | Gap between cells (px) |
|
|
178
|
+
| `options.allowEdit` | `boolean` | `false` | Enable edit mode (drag/resize/add/remove) |
|
|
179
|
+
| `options.showGridLines` | `boolean` | `true` | Grid background in edit mode |
|
|
180
|
+
| `options.autoSave` | `boolean` | `false` | Auto-save layout |
|
|
181
|
+
| `options.title` | `string` | — | Dashboard title |
|
|
182
|
+
| `options.height` | `string` | — | Container height |
|
|
183
|
+
|
|
184
|
+
**Children:** `dashboard-widget` components only.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## dashboard-widget
|
|
189
|
+
|
|
190
|
+
Positioned widget card inside a dashboard. Supports drag-to-move and resize in edit mode.
|
|
191
|
+
|
|
192
|
+
**Props (under `options`):**
|
|
193
|
+
| Prop | Type | Default | Description |
|
|
194
|
+
|------|------|---------|-------------|
|
|
195
|
+
| `row` | `number` | `1` | Grid row start |
|
|
196
|
+
| `col` | `number` | `1` | Grid column start |
|
|
197
|
+
| `rowSpan` | `number` | `1` | Rows spanned |
|
|
198
|
+
| `colSpan` | `number` | `1` | Columns spanned |
|
|
199
|
+
| `title` | `string` | — | Widget header title |
|
|
200
|
+
| `showHeader` | `boolean` | `true` | Show card header |
|
|
201
|
+
| `minRowSpan` / `maxRowSpan` | `number` | — | Size constraints |
|
|
202
|
+
| `minColSpan` / `maxColSpan` | `number` | — | Size constraints |
|
|
203
|
+
| `allowScroll` | `boolean` | `false` | Allow content scroll |
|
|
204
|
+
|
|
205
|
+
**Children:** Yes — any components.
|
|
206
|
+
|
|
207
|
+
```yaml
|
|
208
|
+
# Dashboard with widgets
|
|
209
|
+
component: dashboard
|
|
210
|
+
name: operationsDashboard
|
|
211
|
+
props:
|
|
212
|
+
options:
|
|
213
|
+
rows: 8
|
|
214
|
+
columns: 12
|
|
215
|
+
gridGap: 16
|
|
216
|
+
allowEdit: true
|
|
217
|
+
title: "Operations Dashboard"
|
|
218
|
+
toolbar:
|
|
219
|
+
- component: field
|
|
220
|
+
name: dateRange
|
|
221
|
+
props: { type: rangedatetime, label: { en-US: "Date Range" } }
|
|
222
|
+
children:
|
|
223
|
+
- component: dashboard-widget
|
|
224
|
+
name: revenueWidget
|
|
225
|
+
props:
|
|
226
|
+
options:
|
|
227
|
+
row: 1
|
|
228
|
+
col: 1
|
|
229
|
+
rowSpan: 3
|
|
230
|
+
colSpan: 6
|
|
231
|
+
title: "Revenue"
|
|
232
|
+
children:
|
|
233
|
+
- component: widget
|
|
234
|
+
name: revenueChart
|
|
235
|
+
props:
|
|
236
|
+
type: chart
|
|
237
|
+
queries:
|
|
238
|
+
- name: getRevenue
|
|
239
|
+
query:
|
|
240
|
+
command: "query { monthlyRevenue { month amount } }"
|
|
241
|
+
|
|
242
|
+
- component: dashboard-widget
|
|
243
|
+
name: statsWidget
|
|
244
|
+
props:
|
|
245
|
+
options:
|
|
246
|
+
row: 1
|
|
247
|
+
col: 7
|
|
248
|
+
rowSpan: 3
|
|
249
|
+
colSpan: 6
|
|
250
|
+
title: "Quick Stats"
|
|
251
|
+
children:
|
|
252
|
+
- component: widget
|
|
253
|
+
name: orderStats
|
|
254
|
+
props:
|
|
255
|
+
type: stats
|
|
256
|
+
queries:
|
|
257
|
+
- name: getStats
|
|
258
|
+
query:
|
|
259
|
+
command: "query { orderStats { total pending completed } }"
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## widget
|
|
265
|
+
|
|
266
|
+
Data-driven widget that delegates to sub-components by type.
|
|
267
|
+
|
|
268
|
+
**Props:**
|
|
269
|
+
| Prop | Type | Description |
|
|
270
|
+
|------|------|-------------|
|
|
271
|
+
| `type` | `stats \| chart \| kpi \| metric \| table` | **Required.** Widget type |
|
|
272
|
+
| `initialValues` | `object` | Data loading config (like form) |
|
|
273
|
+
| `queries` | `object` | Named GraphQL queries |
|
|
274
|
+
| `data` | `object` | Static data |
|
|
275
|
+
| `refreshHandler` | `string` | Refresh handler |
|
|
276
|
+
|
|
277
|
+
**Events:** `onLoading`, `onSuccess` (data: `loadedData`), `onError` (data: `error`)
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## timeline
|
|
282
|
+
|
|
283
|
+
MUI Lab Timeline for displaying events chronologically. Horizontal or vertical orientation.
|
|
284
|
+
|
|
285
|
+
**Props:**
|
|
286
|
+
| Prop | Type | Default | Description |
|
|
287
|
+
|------|------|---------|-------------|
|
|
288
|
+
| `orientation` | `horizontal \| vertical` | `horizontal` | Layout mode |
|
|
289
|
+
| `view` | `day \| week \| month \| year` | `week` | Time view |
|
|
290
|
+
| `startDate` / `endDate` | `string` | — | Initial date range |
|
|
291
|
+
| `eventSources` | `EventSource[]` | — | Same pattern as calendar |
|
|
292
|
+
| `eventTemplate` | `ComponentProps` | — | Custom event template |
|
|
293
|
+
| `options.height` | `string \| number` | `400` | Component height |
|
|
294
|
+
| `options.showTodayMarker` | `boolean` | `true` | Today marker |
|
|
295
|
+
| `options.enableZoom` | `boolean` | `true` | View switcher |
|
|
296
|
+
| `options.enableNavigation` | `boolean` | `true` | Prev/next/today buttons |
|
|
297
|
+
| `options.alternating` | `boolean` | `true` | Alternate sides (vertical) |
|
|
298
|
+
| `options.dateFormat` | `string` | `MMM DD` | Date format |
|
|
299
|
+
|
|
300
|
+
**Events:** `onEventClick` (data: `event`)
|
|
301
|
+
|
|
302
|
+
```yaml
|
|
303
|
+
component: timeline
|
|
304
|
+
name: orderTimeline
|
|
305
|
+
props:
|
|
306
|
+
orientation: vertical
|
|
307
|
+
view: month
|
|
308
|
+
options:
|
|
309
|
+
enableNavigation: true
|
|
310
|
+
alternating: true
|
|
311
|
+
eventSources:
|
|
312
|
+
- query:
|
|
313
|
+
command: "query($id: Int!) { orderHistory(orderId: $id) { id title date type } }"
|
|
314
|
+
variables: { id: "{{ number orderId }}" }
|
|
315
|
+
path: orderHistory
|
|
316
|
+
eventTemplate:
|
|
317
|
+
component: card
|
|
318
|
+
name: eventCard
|
|
319
|
+
props:
|
|
320
|
+
options:
|
|
321
|
+
variant: outlined
|
|
322
|
+
header:
|
|
323
|
+
title: "{{ item.title }}"
|
|
324
|
+
subheader: "{{ format item.date LLL }}"
|
|
325
|
+
events:
|
|
326
|
+
onEventClick:
|
|
327
|
+
- dialog:
|
|
328
|
+
component: Orders/EventDetail
|
|
329
|
+
props: { eventId: "{{ event.id }}" }
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## timeline-grid
|
|
335
|
+
|
|
336
|
+
CSS Grid-based timeline with swim lanes, drill-down, and virtual scrolling.
|
|
337
|
+
|
|
338
|
+
**Props:**
|
|
339
|
+
| Prop | Type | Default | Description |
|
|
340
|
+
|------|------|---------|-------------|
|
|
341
|
+
| `view` | `day \| week \| month \| year` | `week` | Time view |
|
|
342
|
+
| `startDate` / `endDate` | `string` | — | Date range |
|
|
343
|
+
| `eventSources` | `EventSource[]` | — | Event data sources |
|
|
344
|
+
| `eventSources[].query.name` | `string` | `query1`, `query2`... | Source name, used as key in `summaryComponent` `dataSources` |
|
|
345
|
+
| `eventTemplate` | `ComponentProps` | — | Custom event template |
|
|
346
|
+
| `summaryComponent` | `ComponentProps` | — | Custom component rendered per column in the summary row. Replaces numeric totals when set. |
|
|
347
|
+
| `options.height` | `string \| number` | `600` | Container height |
|
|
348
|
+
| `options.cellHeight` | `number` | `60/100` | Cell height (px) |
|
|
349
|
+
| `options.groupBy` | `string` | — | Field for swim lane grouping |
|
|
350
|
+
| `options.showTodayMarker` | `boolean` | `true` | Today marker |
|
|
351
|
+
| `options.enableNavigation` | `boolean` | `true` | Nav controls |
|
|
352
|
+
| `options.virtualScroll` | `boolean` | `true` | Virtual scrolling |
|
|
353
|
+
| `options.hourInterval` | `15 \| 30 \| 60` | `60` | Time intervals (day/week) |
|
|
354
|
+
| `options.showWeekends` | `boolean` | `true` | Show weekends |
|
|
355
|
+
| `options.showTotalCount` | `boolean` | `false` | Show event totals |
|
|
356
|
+
|
|
357
|
+
**Summary component variables** (available when `summaryComponent` is set):
|
|
358
|
+
| Variable | Type | Description |
|
|
359
|
+
|----------|------|-------------|
|
|
360
|
+
| `dataSources` | `Record<string, TimelineEvent[]>` | Per-source events filtered to the column, keyed by `query.name` |
|
|
361
|
+
| `column` | `ColumnDefinition` | Column metadata (`id`, `label`, `date`, `startDate`, `endDate`) |
|
|
362
|
+
| `columnIndex` | `number` | Zero-based column index |
|
|
363
|
+
| `totalCount` | `number` | Total event count for the column across all sources |
|
|
364
|
+
|
|
365
|
+
**Events:**
|
|
366
|
+
| Event | Data | Description |
|
|
367
|
+
|-------|------|-------------|
|
|
368
|
+
| `onEventClick` | `item, view` | Event clicked |
|
|
369
|
+
| `onCellClick` | `column, row, date, view` | Empty cell clicked |
|
|
370
|
+
| `onViewChange` | `previousView, newView, startDate, endDate` | View changed |
|
|
371
|
+
| `onNavigate` | `direction, view, startDate, endDate` | Navigation |
|
|
372
|
+
| `onEventsLoaded` | `events, eventCount, view, dataRange` | Data loaded |
|
|
373
|
+
| `onLoad` | `view, startDate, endDate, options` | Initial mount |
|
|
374
|
+
|
|
375
|
+
**Column drill-down:** Click column header: year->month, month->week, week->day.
|
|
376
|
+
|
|
377
|
+
```yaml
|
|
378
|
+
component: timeline-grid
|
|
379
|
+
name: scheduleGrid
|
|
380
|
+
props:
|
|
381
|
+
view: week
|
|
382
|
+
options:
|
|
383
|
+
height: 700
|
|
384
|
+
cellHeight: 80
|
|
385
|
+
groupBy: assignee
|
|
386
|
+
showWeekends: false
|
|
387
|
+
hourInterval: 30
|
|
388
|
+
showTotalCount: true
|
|
389
|
+
enableNavigation: true
|
|
390
|
+
eventSources:
|
|
391
|
+
- query:
|
|
392
|
+
command: |
|
|
393
|
+
query($start: DateTime!, $end: DateTime!) {
|
|
394
|
+
scheduleEvents(start: $start, end: $end) {
|
|
395
|
+
id title startDate endDate assignee status
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
path: scheduleEvents
|
|
399
|
+
events:
|
|
400
|
+
onEventClick:
|
|
401
|
+
- dialog:
|
|
402
|
+
component: Schedule/EventDetail
|
|
403
|
+
props: { eventId: "{{ item.id }}" }
|
|
404
|
+
onCellClick:
|
|
405
|
+
- dialog:
|
|
406
|
+
component: Schedule/CreateEvent
|
|
407
|
+
props: { date: "{{ date }}", assignee: "{{ row }}" }
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
**Summary component example** (per-source breakdown per column):
|
|
411
|
+
```yaml
|
|
412
|
+
component: timeline-grid
|
|
413
|
+
props:
|
|
414
|
+
view: week
|
|
415
|
+
options: { height: 600, enableNavigation: true }
|
|
416
|
+
eventSources:
|
|
417
|
+
- query:
|
|
418
|
+
name: ups
|
|
419
|
+
command: "query($s:String!,$e:String!){ upsShipments(start:$s,end:$e){ id date title } }"
|
|
420
|
+
variables: { s: "{{ startDate }}", e: "{{ endDate }}" }
|
|
421
|
+
path: upsShipments
|
|
422
|
+
- query:
|
|
423
|
+
name: fedex
|
|
424
|
+
command: "query($s:String!,$e:String!){ fedexShipments(start:$s,end:$e){ id date title } }"
|
|
425
|
+
variables: { s: "{{ startDate }}", e: "{{ endDate }}" }
|
|
426
|
+
path: fedexShipments
|
|
427
|
+
summaryComponent:
|
|
428
|
+
component: layout
|
|
429
|
+
props:
|
|
430
|
+
direction: column
|
|
431
|
+
children:
|
|
432
|
+
- component: text
|
|
433
|
+
props: { value: "UPS: {{ dataSources.ups.length }}" }
|
|
434
|
+
- component: text
|
|
435
|
+
props: { value: "FedEx: {{ dataSources.fedex.length }}" }
|
|
436
|
+
- component: text
|
|
437
|
+
props: { value: "Total: {{ totalCount }}" }
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
## oauth2
|
|
443
|
+
|
|
444
|
+
OAuth2 authorization flow button. Opens popup for auth, exchanges code for token.
|
|
445
|
+
|
|
446
|
+
**Props:**
|
|
447
|
+
| Prop | Type | Description |
|
|
448
|
+
|------|------|-------------|
|
|
449
|
+
| `clientId` | `string` | OAuth2 client ID (template-parsed) |
|
|
450
|
+
| `clientSecret` | `string` | OAuth2 client secret (template-parsed) |
|
|
451
|
+
| `authorizationUrl` | `string` | Authorization endpoint |
|
|
452
|
+
| `tokenUrl` | `string` | Token exchange endpoint |
|
|
453
|
+
| `scopes` | `string[]` | Requested scopes |
|
|
454
|
+
| `additionalParams` | `Record<string, string>` | Extra auth URL params |
|
|
455
|
+
| `additionalHeaders` | `object` | Extra token request headers |
|
|
456
|
+
| `label` | `ILocalizeString` | Button label (default: `Authorize`) |
|
|
457
|
+
| `className` | `string` | Button CSS class |
|
|
458
|
+
|
|
459
|
+
**Events:** `onToken` — fires with `{ token }` when OAuth completes.
|
|
460
|
+
|
|
461
|
+
```yaml
|
|
462
|
+
component: oauth2
|
|
463
|
+
name: intuitAuth
|
|
464
|
+
props:
|
|
465
|
+
label: { en-US: "Connect QuickBooks" }
|
|
466
|
+
clientId: "{{ quickbooksClientId }}"
|
|
467
|
+
clientSecret: "{{ quickbooksClientSecret }}"
|
|
468
|
+
authorizationUrl: "https://appcenter.intuit.com/connect/oauth2"
|
|
469
|
+
tokenUrl: "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer"
|
|
470
|
+
scopes:
|
|
471
|
+
- com.intuit.quickbooks.accounting
|
|
472
|
+
onToken:
|
|
473
|
+
- mutation:
|
|
474
|
+
command: "mutation($token: String!) { saveOAuthToken(token: $token) { success } }"
|
|
475
|
+
variables: { token: "{{ token }}" }
|
|
476
|
+
- notification: { message: { en-US: "Connected!" }, type: success }
|
|
477
|
+
```
|