@cxtms/cx-schema 1.0.0
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 +1523 -0
- package/dist/cli.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 +111 -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 +64 -0
- package/dist/validator.d.ts.map +1 -0
- package/dist/validator.js +380 -0
- package/dist/validator.js.map +1 -0
- package/dist/workflowValidator.d.ts +64 -0
- package/dist/workflowValidator.d.ts.map +1 -0
- package/dist/workflowValidator.js +410 -0
- package/dist/workflowValidator.js.map +1 -0
- package/package.json +50 -0
- package/schemas/actions/all.json +26 -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 +50 -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 +68 -0
- package/schemas/components/layout.json +69 -0
- package/schemas/components/module.json +138 -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/tab.json +34 -0
- package/schemas/components/tabs.json +35 -0
- package/schemas/components/timeline.json +172 -0
- package/schemas/components/timelineGrid.json +324 -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 +10492 -0
- package/schemas/schemas.json +598 -0
- package/schemas/workflows/activity.json +111 -0
- package/schemas/workflows/common/condition.json +48 -0
- package/schemas/workflows/common/expression.json +76 -0
- package/schemas/workflows/common/mapping.json +134 -0
- package/schemas/workflows/input.json +76 -0
- package/schemas/workflows/output.json +41 -0
- package/schemas/workflows/schedule.json +26 -0
- package/schemas/workflows/tasks/accounting-transaction.json +95 -0
- package/schemas/workflows/tasks/all.json +34 -0
- package/schemas/workflows/tasks/attachment.json +94 -0
- package/schemas/workflows/tasks/charge.json +90 -0
- package/schemas/workflows/tasks/commodity.json +89 -0
- package/schemas/workflows/tasks/contact.json +82 -0
- package/schemas/workflows/tasks/csv.json +79 -0
- package/schemas/workflows/tasks/document-render.json +105 -0
- package/schemas/workflows/tasks/document-send.json +84 -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/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 +119 -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/order.json +87 -0
- package/schemas/workflows/tasks/payment.json +85 -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/validation.json +90 -0
- package/schemas/workflows/tasks/while.json +53 -0
- package/schemas/workflows/tasks/workflow-execute.json +82 -0
- package/schemas/workflows/trigger.json +86 -0
- package/schemas/workflows/variable.json +46 -0
- package/schemas/workflows/workflow.json +172 -0
- package/scripts/postinstall.js +161 -0
- package/scripts/setup-vscode.js +80 -0
- package/templates/module.yaml +83 -0
- package/templates/workflow.yaml +100 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Button Component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"component": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"const": "button"
|
|
9
|
+
},
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Button name identifier"
|
|
13
|
+
},
|
|
14
|
+
"props": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"label": {
|
|
18
|
+
"oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }]
|
|
19
|
+
},
|
|
20
|
+
"icon": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Icon class name"
|
|
23
|
+
},
|
|
24
|
+
"size": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"description": "Responsive size configuration",
|
|
27
|
+
"additionalProperties": true
|
|
28
|
+
},
|
|
29
|
+
"options": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"description": "Button options. these are the same as the button component attributes ",
|
|
32
|
+
"properties": {
|
|
33
|
+
"type": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": ["submit", "reset", "button"]
|
|
36
|
+
},
|
|
37
|
+
"variant": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"enum": [
|
|
40
|
+
"primary",
|
|
41
|
+
"secondary",
|
|
42
|
+
"outline-primary",
|
|
43
|
+
"outline-secondary",
|
|
44
|
+
"danger",
|
|
45
|
+
"success",
|
|
46
|
+
"warning",
|
|
47
|
+
"info"
|
|
48
|
+
],
|
|
49
|
+
"description": "Button variant style"
|
|
50
|
+
},
|
|
51
|
+
"disabled": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"description": "Disable the button"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"additionalProperties": true
|
|
57
|
+
},
|
|
58
|
+
"onClick": {
|
|
59
|
+
"$ref": "../schemas.json#/definitions/actionsList"
|
|
60
|
+
},
|
|
61
|
+
"isHidden": {
|
|
62
|
+
"$ref": "../schemas.json#/definitions/templateExpression"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"required": ["component"],
|
|
68
|
+
"x-examples": [
|
|
69
|
+
{
|
|
70
|
+
"component": "button",
|
|
71
|
+
"name": "openDialog",
|
|
72
|
+
"props": {
|
|
73
|
+
"label": { "en-US": "New Order" },
|
|
74
|
+
"icon": "plus",
|
|
75
|
+
"options": { "variant": "primary", "type": "button" },
|
|
76
|
+
"onClick": [
|
|
77
|
+
{
|
|
78
|
+
"dialog": {
|
|
79
|
+
"name": "createOrder",
|
|
80
|
+
"props": { "title": { "en-US": "Create Order" } },
|
|
81
|
+
"component": { "component": "layout", "children": [{ "component": "Orders/CreateOrder" }] }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"component": "button",
|
|
89
|
+
"name": "submitFormBtn",
|
|
90
|
+
"props": {
|
|
91
|
+
"label": "Save",
|
|
92
|
+
"options": { "type": "submit", "variant": "success", "disabled": false }
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"component": "button",
|
|
97
|
+
"name": "export",
|
|
98
|
+
"props": {
|
|
99
|
+
"label": { "en-US": "Export" },
|
|
100
|
+
"icon": "download",
|
|
101
|
+
"options": { "variant": "outline-primary" },
|
|
102
|
+
"onClick": [
|
|
103
|
+
{
|
|
104
|
+
"workflow": {
|
|
105
|
+
"workflowId": "24f504ad-2ca3-4432-b2a4-c540c48fee31",
|
|
106
|
+
"inputs": { "exportName": "orders" }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"component": "button",
|
|
114
|
+
"name": "back",
|
|
115
|
+
"props": {
|
|
116
|
+
"label": "Back",
|
|
117
|
+
"options": { "type": "button", "variant": "secondary" },
|
|
118
|
+
"onClick": [{ "navigateBack": { "fallback": "/home" } }],
|
|
119
|
+
"isHidden": "{{ eval !canGoBack }}"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Calendar Component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"component": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"const": "calendar"
|
|
9
|
+
},
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Unique name identifier for the calendar"
|
|
13
|
+
},
|
|
14
|
+
"inputs": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"description": "Input parameters for the calendar"
|
|
17
|
+
},
|
|
18
|
+
"props": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"calendarId": {
|
|
22
|
+
"oneOf": [
|
|
23
|
+
{
|
|
24
|
+
"type": "number",
|
|
25
|
+
"description": "Unique integer identifier for the calendar instance"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "string",
|
|
29
|
+
"pattern": "\\{\\{.*\\}\\}",
|
|
30
|
+
"description": "Template expression that resolves to a calendar ID"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"x-example": "{{ number calendarId }}"
|
|
34
|
+
},
|
|
35
|
+
"toolbar": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"description": "Toolbar components",
|
|
38
|
+
"items": { "$ref": "../schemas.json#/definitions/component" }
|
|
39
|
+
},
|
|
40
|
+
"contextMenu": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"description": "Context menu (3-dots menu) configuration",
|
|
43
|
+
"properties": {
|
|
44
|
+
"icon": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "Icon for the menu trigger (default: 'ellipsis-v' or 'more-vert')",
|
|
47
|
+
"default": "ellipsis-v"
|
|
48
|
+
},
|
|
49
|
+
"position": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"enum": ["top-right", "top-left", "bottom-right", "bottom-left"],
|
|
52
|
+
"description": "Position of the menu icon",
|
|
53
|
+
"default": "top-right"
|
|
54
|
+
},
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"description": "Menu items to display",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"label": {
|
|
62
|
+
"oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }],
|
|
63
|
+
"description": "Display text for the menu item"
|
|
64
|
+
},
|
|
65
|
+
"icon": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "Optional icon for the menu item"
|
|
68
|
+
},
|
|
69
|
+
"divider": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"description": "Show as a divider instead of menu item"
|
|
72
|
+
},
|
|
73
|
+
"onClick": {
|
|
74
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
75
|
+
"description": "Actions to execute when item is clicked"
|
|
76
|
+
},
|
|
77
|
+
"permission": {
|
|
78
|
+
"$ref": "../schemas.json#/definitions/permissions",
|
|
79
|
+
"description": "Permission required to view this item"
|
|
80
|
+
},
|
|
81
|
+
"isHidden": {
|
|
82
|
+
"$ref": "../schemas.json#/definitions/templateExpression",
|
|
83
|
+
"description": "Conditionally hide this menu item"
|
|
84
|
+
},
|
|
85
|
+
"disabled": {
|
|
86
|
+
"$ref": "../schemas.json#/definitions/templateExpression",
|
|
87
|
+
"description": "Conditionally disable this menu item"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"initialView": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"enum": [
|
|
97
|
+
"dayGridMonth",
|
|
98
|
+
"timeGridWeek",
|
|
99
|
+
"timeGridDay",
|
|
100
|
+
"listWeek",
|
|
101
|
+
"listMonth",
|
|
102
|
+
"multiMonthYear",
|
|
103
|
+
"resourceTimeGridDay",
|
|
104
|
+
"resourceTimeGridWeek"
|
|
105
|
+
],
|
|
106
|
+
"default": "dayGridMonth",
|
|
107
|
+
"description": "Initial view to display when calendar loads",
|
|
108
|
+
"x-example": "dayGridMonth"
|
|
109
|
+
},
|
|
110
|
+
"height": {
|
|
111
|
+
"oneOf": [
|
|
112
|
+
{
|
|
113
|
+
"type": "number",
|
|
114
|
+
"description": "Calendar height in pixels"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "string",
|
|
118
|
+
"enum": ["auto"],
|
|
119
|
+
"description": "Auto height based on content"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"default": 600,
|
|
123
|
+
"x-example": 600
|
|
124
|
+
},
|
|
125
|
+
"aspectRatio": {
|
|
126
|
+
"type": "number",
|
|
127
|
+
"description": "Width-to-height ratio for the calendar",
|
|
128
|
+
"default": 1.35,
|
|
129
|
+
"x-example": 1.35
|
|
130
|
+
},
|
|
131
|
+
"options": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"description": "FullCalendar configuration options",
|
|
134
|
+
"properties": {
|
|
135
|
+
"headerToolbar": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"description": "Header toolbar configuration",
|
|
138
|
+
"properties": {
|
|
139
|
+
"left": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"description": "Left toolbar buttons",
|
|
142
|
+
"x-example": "prev,next today"
|
|
143
|
+
},
|
|
144
|
+
"center": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"description": "Center toolbar content",
|
|
147
|
+
"x-example": "title"
|
|
148
|
+
},
|
|
149
|
+
"right": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"description": "Right toolbar buttons",
|
|
152
|
+
"x-example": "dayGridMonth,timeGridWeek,timeGridDay"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"footerToolbar": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"description": "Footer toolbar configuration",
|
|
159
|
+
"properties": {
|
|
160
|
+
"left": { "type": "string" },
|
|
161
|
+
"center": { "type": "string" },
|
|
162
|
+
"right": { "type": "string" }
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"selectable": {
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"description": "Allow date/time selection",
|
|
168
|
+
"default": false,
|
|
169
|
+
"x-example": true
|
|
170
|
+
},
|
|
171
|
+
"selectMirror": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"description": "Show selection preview while selecting",
|
|
174
|
+
"default": false
|
|
175
|
+
},
|
|
176
|
+
"editable": {
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"description": "Allow event editing (drag/drop/resize)",
|
|
179
|
+
"default": false,
|
|
180
|
+
"x-example": true
|
|
181
|
+
},
|
|
182
|
+
"droppable": {
|
|
183
|
+
"type": "boolean",
|
|
184
|
+
"description": "Allow dropping external elements",
|
|
185
|
+
"default": false
|
|
186
|
+
},
|
|
187
|
+
"weekends": {
|
|
188
|
+
"type": "boolean",
|
|
189
|
+
"description": "Display weekends",
|
|
190
|
+
"default": true
|
|
191
|
+
},
|
|
192
|
+
"locale": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"description": "Language/locale setting",
|
|
195
|
+
"x-example": "en-US"
|
|
196
|
+
},
|
|
197
|
+
"timeZone": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"description": "Time zone setting",
|
|
200
|
+
"x-example": "America/New_York"
|
|
201
|
+
},
|
|
202
|
+
"nowIndicator": {
|
|
203
|
+
"type": "boolean",
|
|
204
|
+
"description": "Show current time indicator",
|
|
205
|
+
"default": false
|
|
206
|
+
},
|
|
207
|
+
"slotMinTime": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "Earliest time slot (HH:MM:SS format)",
|
|
210
|
+
"x-example": "06:00:00"
|
|
211
|
+
},
|
|
212
|
+
"slotMaxTime": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"description": "Latest time slot (HH:MM:SS format)",
|
|
215
|
+
"x-example": "22:00:00"
|
|
216
|
+
},
|
|
217
|
+
"slotDuration": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"description": "Duration of each time slot (HH:MM:SS format)",
|
|
220
|
+
"x-example": "00:30:00"
|
|
221
|
+
},
|
|
222
|
+
"eventDisplay": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"enum": ["auto", "block", "list-item", "background"],
|
|
225
|
+
"description": "How events are displayed",
|
|
226
|
+
"default": "auto"
|
|
227
|
+
},
|
|
228
|
+
"dayMaxEvents": {
|
|
229
|
+
"oneOf": [{ "type": "number" }, { "type": "boolean" }],
|
|
230
|
+
"description": "Maximum events per day before '+more' link",
|
|
231
|
+
"x-example": 3
|
|
232
|
+
},
|
|
233
|
+
"moreLinkClick": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"enum": ["popover", "week", "day"],
|
|
236
|
+
"description": "Action when clicking '+more' link"
|
|
237
|
+
},
|
|
238
|
+
"events": {
|
|
239
|
+
"type": "array",
|
|
240
|
+
"description": "Static event data",
|
|
241
|
+
"items": {
|
|
242
|
+
"$ref": "../schemas.json#/definitions/calendarEvent"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"eventSources": {
|
|
246
|
+
"type": "array",
|
|
247
|
+
"description": "Multiple event sources configuration",
|
|
248
|
+
"items": {
|
|
249
|
+
"type": "object",
|
|
250
|
+
"properties": {
|
|
251
|
+
"query": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"description": "GraphQL query configuration",
|
|
254
|
+
"properties": {
|
|
255
|
+
"command": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"description": "GraphQL query string"
|
|
258
|
+
},
|
|
259
|
+
"variables": {
|
|
260
|
+
"type": "object",
|
|
261
|
+
"description": "Query variables",
|
|
262
|
+
"additionalProperties": true
|
|
263
|
+
},
|
|
264
|
+
"path": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"description": "Path to extract data from query result"
|
|
267
|
+
},
|
|
268
|
+
"mapping": {
|
|
269
|
+
"type": "object",
|
|
270
|
+
"description": "Optional mapping transformation from each item to calendar event fields",
|
|
271
|
+
"additionalProperties": true,
|
|
272
|
+
"x-example": {
|
|
273
|
+
"id": "{{ item.calendarEventId }}",
|
|
274
|
+
"title": "{{ item.summary }}",
|
|
275
|
+
"start": "{{ item.start }}",
|
|
276
|
+
"end": "{{ item.end }}"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"required": ["command"],
|
|
281
|
+
"x-example": {
|
|
282
|
+
"command": "query GetCalendarEventsQuery($calendarId: Int!, $startDate: DateTime, $endDate: DateTime) { calendarEvents(calendarId: $calendarId, startDate: $startDate, endDate: $endDate) { items { calendarEventId summary description start end } } }",
|
|
283
|
+
"variables": {
|
|
284
|
+
"calendarId": "{{ number calendarId }}",
|
|
285
|
+
"startDate": "{{ startDate }}",
|
|
286
|
+
"endDate": "{{ endDate }}"
|
|
287
|
+
},
|
|
288
|
+
"path": "calendarEvents.items",
|
|
289
|
+
"mapping": {
|
|
290
|
+
"id": "{{ item.calendarEventId }}",
|
|
291
|
+
"title": "{{ item.summary }}",
|
|
292
|
+
"start": "{{ item.start }}",
|
|
293
|
+
"end": "{{ item.end }}"
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"events": {
|
|
298
|
+
"oneOf": [
|
|
299
|
+
{
|
|
300
|
+
"type": "array",
|
|
301
|
+
"items": {
|
|
302
|
+
"$ref": "../schemas.json#/definitions/calendarEvent"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"type": "string",
|
|
307
|
+
"description": "Template expression resolving to events array"
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
"color": {
|
|
312
|
+
"type": "string",
|
|
313
|
+
"description": "Default color for events from this source"
|
|
314
|
+
},
|
|
315
|
+
"textColor": {
|
|
316
|
+
"type": "string",
|
|
317
|
+
"description": "Default text color for events from this source"
|
|
318
|
+
},
|
|
319
|
+
"borderColor": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"description": "Default border color for events from this source"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"resources": {
|
|
327
|
+
"type": "array",
|
|
328
|
+
"description": "Resource definitions for resource-based calendars",
|
|
329
|
+
"items": {
|
|
330
|
+
"type": "object",
|
|
331
|
+
"properties": {
|
|
332
|
+
"id": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"description": "Unique resource identifier"
|
|
335
|
+
},
|
|
336
|
+
"title": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"description": "Resource display title"
|
|
339
|
+
},
|
|
340
|
+
"eventColor": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"description": "Default color for events in this resource"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"required": ["id", "title"]
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"eventContent": {
|
|
349
|
+
"$ref": "../schemas.json#/definitions/component",
|
|
350
|
+
"description": "Custom event content rendering using components"
|
|
351
|
+
},
|
|
352
|
+
"dayHeaderContent": {
|
|
353
|
+
"$ref": "../schemas.json#/definitions/component",
|
|
354
|
+
"description": "Custom day header content rendering"
|
|
355
|
+
},
|
|
356
|
+
"dayCellContent": {
|
|
357
|
+
"$ref": "../schemas.json#/definitions/component",
|
|
358
|
+
"description": "Custom day cell content rendering"
|
|
359
|
+
},
|
|
360
|
+
"moreLinkContent": {
|
|
361
|
+
"$ref": "../schemas.json#/definitions/component",
|
|
362
|
+
"description": "Custom 'more' link content rendering"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"events": {
|
|
367
|
+
"type": "object",
|
|
368
|
+
"description": "Event handlers for calendar interactions",
|
|
369
|
+
"properties": {
|
|
370
|
+
"onDateClick": {
|
|
371
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
372
|
+
"description": "Actions to execute when a date/time is clicked"
|
|
373
|
+
},
|
|
374
|
+
"onEventClick": {
|
|
375
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
376
|
+
"description": "Actions to execute when an event is clicked"
|
|
377
|
+
},
|
|
378
|
+
"onSelect": {
|
|
379
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
380
|
+
"description": "Actions to execute when a date/time range is selected"
|
|
381
|
+
},
|
|
382
|
+
"onUnselect": {
|
|
383
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
384
|
+
"description": "Actions to execute when selection is cleared"
|
|
385
|
+
},
|
|
386
|
+
"onEventDrop": {
|
|
387
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
388
|
+
"description": "Actions to execute when an event is dragged/dropped"
|
|
389
|
+
},
|
|
390
|
+
"onEventResize": {
|
|
391
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
392
|
+
"description": "Actions to execute when an event is resized"
|
|
393
|
+
},
|
|
394
|
+
"onEventChange": {
|
|
395
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
396
|
+
"description": "Actions to execute when an event is modified"
|
|
397
|
+
},
|
|
398
|
+
"onDatesSet": {
|
|
399
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
400
|
+
"description": "Actions to execute when view/date range changes"
|
|
401
|
+
},
|
|
402
|
+
"onLoading": {
|
|
403
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
404
|
+
"description": "Actions to execute when loading state changes"
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"isHidden": {
|
|
409
|
+
"$ref": "../schemas.json#/definitions/templateExpression",
|
|
410
|
+
"description": "Boolean expression for conditional rendering"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"required": ["calendarId"]
|
|
414
|
+
},
|
|
415
|
+
"children": {
|
|
416
|
+
"$ref": "../schemas.json#/definitions/componentChildren"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"required": ["component"],
|
|
420
|
+
"x-examples": [
|
|
421
|
+
{
|
|
422
|
+
"component": "calendar",
|
|
423
|
+
"name": "teamCalendar",
|
|
424
|
+
"props": {
|
|
425
|
+
"calendarId": "{{ number calendarId }}",
|
|
426
|
+
"initialView": "dayGridMonth",
|
|
427
|
+
"toolbar": [
|
|
428
|
+
{
|
|
429
|
+
"component": "button",
|
|
430
|
+
"props": {
|
|
431
|
+
"label": { "en-US": "New Event" },
|
|
432
|
+
"onClick": [{ "dialog": { "name": "createEvent", "component": { "component": "Events/Create" } } }]
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"component": "button",
|
|
437
|
+
"props": { "label": { "en-US": "Today" }, "onClick": [{ "refresh": "teamCalendar" }] }
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
"contextMenu": {
|
|
441
|
+
"icon": "ellipsis-v",
|
|
442
|
+
"position": "top-right",
|
|
443
|
+
"items": [
|
|
444
|
+
{
|
|
445
|
+
"label": { "en-US": "Export Calendar" },
|
|
446
|
+
"icon": "download",
|
|
447
|
+
"onClick": [
|
|
448
|
+
{ "action": "exportCalendar", "params": { "calendarId": "{{ number calendarId }}", "format": "ics" } }
|
|
449
|
+
]
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"label": { "en-US": "Print" },
|
|
453
|
+
"icon": "print",
|
|
454
|
+
"onClick": [
|
|
455
|
+
{ "action": "print", "params": { "target": "teamCalendar" } }
|
|
456
|
+
]
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"label": { "en-US": "Share" },
|
|
460
|
+
"icon": "share",
|
|
461
|
+
"onClick": [
|
|
462
|
+
{ "dialog": { "name": "shareCalendar", "component": { "component": "Calendar/Share" } } }
|
|
463
|
+
]
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"divider": true
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"label": { "en-US": "Settings" },
|
|
470
|
+
"icon": "cog",
|
|
471
|
+
"onClick": [
|
|
472
|
+
{ "dialog": { "name": "calendarSettings", "component": { "component": "Calendar/Settings" } } }
|
|
473
|
+
],
|
|
474
|
+
"permission": "calendar.settings"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"label": { "en-US": "Sync" },
|
|
478
|
+
"icon": "sync",
|
|
479
|
+
"onClick": [
|
|
480
|
+
{ "action": "syncCalendar", "params": { "calendarId": "{{ number calendarId }}" } },
|
|
481
|
+
{ "refresh": "teamCalendar" }
|
|
482
|
+
]
|
|
483
|
+
}
|
|
484
|
+
]
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
}
|