@almadar/std 14.8.0 → 14.9.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.
Files changed (57) hide show
  1. package/behaviors/registry/app/organisms/std-api-gateway.orb +1167 -4114
  2. package/behaviors/registry/app/organisms/std-booking-system.orb +2627 -4281
  3. package/behaviors/registry/app/organisms/std-cicd-pipeline.orb +1313 -3724
  4. package/behaviors/registry/app/organisms/std-cms.orb +1658 -4903
  5. package/behaviors/registry/app/organisms/std-coding-academy.orb +686 -1238
  6. package/behaviors/registry/app/organisms/std-crm.orb +1778 -5995
  7. package/behaviors/registry/app/organisms/std-devops-dashboard.orb +1918 -5539
  8. package/behaviors/registry/app/organisms/std-finance-tracker.orb +1064 -3721
  9. package/behaviors/registry/app/organisms/std-healthcare.orb +2810 -7215
  10. package/behaviors/registry/app/organisms/std-helpdesk.orb +1065 -4161
  11. package/behaviors/registry/app/organisms/std-hr-portal.orb +2300 -6322
  12. package/behaviors/registry/app/organisms/std-iot-dashboard.orb +1582 -3721
  13. package/behaviors/registry/app/organisms/std-lms.orb +1885 -3952
  14. package/behaviors/registry/app/organisms/std-project-manager.orb +1226 -5123
  15. package/behaviors/registry/app/organisms/std-realtime-chat.orb +1147 -3794
  16. package/behaviors/registry/app/organisms/std-social-feed.orb +1044 -1728
  17. package/behaviors/registry/app/organisms/std-trading-dashboard.orb +1208 -3186
  18. package/behaviors/registry/core/atoms/std-graphs.orb +40 -41
  19. package/behaviors/registry/core/atoms/std-stats.orb +131 -110
  20. package/behaviors/registry/service/atoms/std-service-custom-bearer.orb +351 -345
  21. package/behaviors/registry/service/atoms/std-service-email.orb +334 -328
  22. package/behaviors/registry/service/atoms/std-service-github.orb +308 -365
  23. package/behaviors/registry/service/atoms/std-service-llm.orb +329 -437
  24. package/behaviors/registry/service/atoms/std-service-oauth.orb +261 -564
  25. package/behaviors/registry/service/atoms/std-service-redis.orb +299 -405
  26. package/behaviors/registry/service/atoms/std-service-storage.orb +293 -505
  27. package/behaviors/registry/service/atoms/std-service-twilio.orb +315 -393
  28. package/behaviors/registry/service/atoms/std-service-youtube.orb +266 -547
  29. package/dist/behaviors/registry/app/organisms/std-api-gateway.orb +1167 -4114
  30. package/dist/behaviors/registry/app/organisms/std-booking-system.orb +2627 -4281
  31. package/dist/behaviors/registry/app/organisms/std-cicd-pipeline.orb +1313 -3724
  32. package/dist/behaviors/registry/app/organisms/std-cms.orb +1658 -4903
  33. package/dist/behaviors/registry/app/organisms/std-coding-academy.orb +686 -1238
  34. package/dist/behaviors/registry/app/organisms/std-crm.orb +1778 -5995
  35. package/dist/behaviors/registry/app/organisms/std-devops-dashboard.orb +1918 -5539
  36. package/dist/behaviors/registry/app/organisms/std-finance-tracker.orb +1064 -3721
  37. package/dist/behaviors/registry/app/organisms/std-healthcare.orb +2810 -7215
  38. package/dist/behaviors/registry/app/organisms/std-helpdesk.orb +1065 -4161
  39. package/dist/behaviors/registry/app/organisms/std-hr-portal.orb +2300 -6322
  40. package/dist/behaviors/registry/app/organisms/std-iot-dashboard.orb +1582 -3721
  41. package/dist/behaviors/registry/app/organisms/std-lms.orb +1885 -3952
  42. package/dist/behaviors/registry/app/organisms/std-project-manager.orb +1226 -5123
  43. package/dist/behaviors/registry/app/organisms/std-realtime-chat.orb +1147 -3794
  44. package/dist/behaviors/registry/app/organisms/std-social-feed.orb +1044 -1728
  45. package/dist/behaviors/registry/app/organisms/std-trading-dashboard.orb +1208 -3186
  46. package/dist/behaviors/registry/core/atoms/std-graphs.orb +40 -41
  47. package/dist/behaviors/registry/core/atoms/std-stats.orb +131 -110
  48. package/dist/behaviors/registry/service/atoms/std-service-custom-bearer.orb +351 -345
  49. package/dist/behaviors/registry/service/atoms/std-service-email.orb +334 -328
  50. package/dist/behaviors/registry/service/atoms/std-service-github.orb +308 -365
  51. package/dist/behaviors/registry/service/atoms/std-service-llm.orb +329 -437
  52. package/dist/behaviors/registry/service/atoms/std-service-oauth.orb +261 -564
  53. package/dist/behaviors/registry/service/atoms/std-service-redis.orb +299 -405
  54. package/dist/behaviors/registry/service/atoms/std-service-storage.orb +293 -505
  55. package/dist/behaviors/registry/service/atoms/std-service-twilio.orb +315 -393
  56. package/dist/behaviors/registry/service/atoms/std-service-youtube.orb +266 -547
  57. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-service-email",
3
- "version": "1.0.0",
4
- "description": "std-service-email as a Function",
3
+ "version": "2.0.0",
4
+ "description": "std-service-email Email send service. Bind via `uses Email from \"std/behaviors/std-service-email\"` and configure `to` / `subject` / `body` / `from` / `replyTo` / `templateId` / `htmlBody` at the call site. Pass `uiTrait: \"@trait.YourEmailForm\"` to inject your own composer; leave unset to render the atom's default test form (standalone surface).",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "ServiceEmailOrbital",
@@ -11,45 +11,43 @@
11
11
  "fields": [
12
12
  {
13
13
  "name": "id",
14
- "type": "string"
15
- },
16
- {
17
- "name": "name",
18
- "type": "string"
14
+ "type": "string",
15
+ "required": true
19
16
  },
20
17
  {
21
- "name": "description",
22
- "type": "string"
18
+ "name": "to",
19
+ "type": "string",
20
+ "default": ""
23
21
  },
24
22
  {
25
- "name": "status",
23
+ "name": "subject",
26
24
  "type": "string",
27
- "default": "active",
28
- "values": [
29
- "active",
30
- "inactive",
31
- "pending"
32
- ]
25
+ "default": ""
33
26
  },
34
27
  {
35
- "name": "createdAt",
36
- "type": "string"
28
+ "name": "body",
29
+ "type": "string",
30
+ "default": ""
37
31
  },
38
32
  {
39
- "name": "to",
40
- "type": "string"
33
+ "name": "from",
34
+ "type": "string",
35
+ "default": ""
41
36
  },
42
37
  {
43
- "name": "subject",
44
- "type": "string"
38
+ "name": "replyTo",
39
+ "type": "string",
40
+ "default": ""
45
41
  },
46
42
  {
47
- "name": "body",
48
- "type": "string"
43
+ "name": "templateId",
44
+ "type": "string",
45
+ "default": ""
49
46
  },
50
47
  {
51
- "name": "from",
52
- "type": "string"
48
+ "name": "htmlBody",
49
+ "type": "string",
50
+ "default": ""
53
51
  },
54
52
  {
55
53
  "name": "sendStatus",
@@ -58,15 +56,141 @@
58
56
  },
59
57
  {
60
58
  "name": "messageId",
61
- "type": "string"
59
+ "type": "string",
60
+ "default": ""
62
61
  },
63
62
  {
64
63
  "name": "error",
64
+ "type": "string",
65
+ "default": ""
66
+ },
67
+ {
68
+ "name": "name",
69
+ "type": "string"
70
+ },
71
+ {
72
+ "name": "description",
73
+ "type": "string"
74
+ },
75
+ {
76
+ "name": "status",
77
+ "type": "string",
78
+ "default": "active",
79
+ "values": [
80
+ "active",
81
+ "inactive",
82
+ "pending"
83
+ ]
84
+ },
85
+ {
86
+ "name": "createdAt",
65
87
  "type": "string"
66
88
  }
67
89
  ]
68
90
  },
69
91
  "traits": [
92
+ {
93
+ "name": "ServiceEmailDefaultForm",
94
+ "category": "interaction",
95
+ "emits": [
96
+ {
97
+ "event": "SEND",
98
+ "scope": "external",
99
+ "payloadSchema": [
100
+ {
101
+ "name": "source",
102
+ "type": "string"
103
+ }
104
+ ]
105
+ }
106
+ ],
107
+ "stateMachine": {
108
+ "states": [
109
+ {
110
+ "name": "ready",
111
+ "isInitial": true
112
+ }
113
+ ],
114
+ "events": [
115
+ {
116
+ "key": "INIT",
117
+ "name": "Initialize"
118
+ },
119
+ {
120
+ "key": "SEND",
121
+ "name": "Send"
122
+ }
123
+ ],
124
+ "transitions": [
125
+ {
126
+ "from": "ready",
127
+ "to": "ready",
128
+ "event": "INIT",
129
+ "effects": [
130
+ [
131
+ "render-ui",
132
+ "main",
133
+ {
134
+ "children": [
135
+ {
136
+ "children": [
137
+ {
138
+ "type": "icon",
139
+ "name": "mail"
140
+ },
141
+ {
142
+ "content": "Email",
143
+ "variant": "h2",
144
+ "type": "typography"
145
+ }
146
+ ],
147
+ "gap": "md",
148
+ "type": "stack",
149
+ "align": "center",
150
+ "direction": "horizontal"
151
+ },
152
+ {
153
+ "type": "divider"
154
+ },
155
+ {
156
+ "type": "stack",
157
+ "gap": "md",
158
+ "direction": "vertical",
159
+ "children": [
160
+ {
161
+ "placeholder": "recipient@example.com",
162
+ "type": "input"
163
+ },
164
+ {
165
+ "type": "input",
166
+ "placeholder": "Email subject"
167
+ },
168
+ {
169
+ "placeholder": "Write your message...",
170
+ "type": "textarea"
171
+ }
172
+ ]
173
+ },
174
+ {
175
+ "icon": "send",
176
+ "action": "SEND",
177
+ "type": "button",
178
+ "label": "Send",
179
+ "variant": "primary"
180
+ }
181
+ ],
182
+ "align": "stretch",
183
+ "direction": "vertical",
184
+ "type": "stack",
185
+ "gap": "lg"
186
+ }
187
+ ]
188
+ ]
189
+ }
190
+ ]
191
+ },
192
+ "scope": "instance"
193
+ },
70
194
  {
71
195
  "name": "ServiceEmailEmail",
72
196
  "category": "interaction",
@@ -93,12 +217,12 @@
93
217
  ]
94
218
  },
95
219
  {
96
- "event": "ServiceEmailEmailCompleted",
220
+ "event": "EmailSent",
97
221
  "scope": "external",
98
222
  "payloadSchema": [
99
223
  {
100
- "name": "result",
101
- "type": "object"
224
+ "name": "id",
225
+ "type": "string"
102
226
  }
103
227
  ]
104
228
  },
@@ -115,6 +239,26 @@
115
239
  "type": "string"
116
240
  }
117
241
  ]
242
+ },
243
+ {
244
+ "event": "FAILED",
245
+ "payloadSchema": [
246
+ {
247
+ "name": "error",
248
+ "type": "string",
249
+ "required": true
250
+ }
251
+ ]
252
+ }
253
+ ],
254
+ "listens": [
255
+ {
256
+ "event": "SEND",
257
+ "triggers": "SEND",
258
+ "source": {
259
+ "kind": "trait",
260
+ "trait": "ServiceEmailDefaultForm"
261
+ }
118
262
  }
119
263
  ],
120
264
  "stateMachine": {
@@ -143,107 +287,49 @@
143
287
  "name": "Send"
144
288
  },
145
289
  {
146
- "key": "SENT",
147
- "name": "Sent",
290
+ "key": "ServiceEmailLoaded",
291
+ "name": "ServiceEmail loaded",
148
292
  "payloadSchema": [
149
293
  {
150
- "name": "messageId",
294
+ "name": "id",
151
295
  "type": "string"
152
296
  }
153
297
  ]
154
298
  },
155
299
  {
156
- "key": "FAILED",
157
- "name": "Failed",
300
+ "key": "ServiceEmailLoadFailed",
301
+ "name": "ServiceEmail load failed",
158
302
  "payloadSchema": [
159
303
  {
160
- "name": "error",
161
- "type": "string",
162
- "required": true
304
+ "name": "message",
305
+ "type": "string"
163
306
  }
164
307
  ]
165
308
  },
166
309
  {
167
- "key": "RESET",
168
- "name": "Reset"
169
- },
170
- {
171
- "key": "RETRY",
172
- "name": "Retry"
173
- },
174
- {
175
- "key": "ServiceEmailLoaded",
176
- "name": "ServiceEmail loaded",
310
+ "key": "EmailSent",
311
+ "name": "Email sent",
177
312
  "payloadSchema": [
178
313
  {
179
314
  "name": "id",
180
315
  "type": "string"
181
- },
182
- {
183
- "name": "name",
184
- "type": "string"
185
- },
186
- {
187
- "name": "description",
188
- "type": "string"
189
- },
190
- {
191
- "name": "status",
192
- "type": "string"
193
- },
194
- {
195
- "name": "createdAt",
196
- "type": "string"
197
- },
198
- {
199
- "name": "to",
200
- "type": "string"
201
- },
202
- {
203
- "name": "subject",
204
- "type": "string"
205
- },
206
- {
207
- "name": "body",
208
- "type": "string"
209
- },
210
- {
211
- "name": "from",
212
- "type": "string"
213
- },
214
- {
215
- "name": "sendStatus",
216
- "type": "string"
217
- },
218
- {
219
- "name": "messageId",
220
- "type": "string"
221
- },
222
- {
223
- "name": "error",
224
- "type": "string"
225
316
  }
226
317
  ]
227
318
  },
228
319
  {
229
- "key": "ServiceEmailLoadFailed",
230
- "name": "ServiceEmail load failed",
320
+ "key": "FAILED",
321
+ "name": "Failed",
231
322
  "payloadSchema": [
232
323
  {
233
- "name": "message",
234
- "type": "string"
324
+ "name": "error",
325
+ "type": "string",
326
+ "required": true
235
327
  }
236
328
  ]
237
329
  },
238
330
  {
239
- "key": "ServiceEmailEmailCompleted",
240
- "name": "ServiceEmail email completed",
241
- "payloadSchema": [
242
- {
243
- "name": "result",
244
- "type": "object"
245
- }
246
- ]
331
+ "key": "RESET",
332
+ "name": "Reset"
247
333
  },
248
334
  {
249
335
  "key": "ServiceEmailEmailFailed",
@@ -258,6 +344,10 @@
258
344
  "type": "string"
259
345
  }
260
346
  ]
347
+ },
348
+ {
349
+ "key": "RETRY",
350
+ "name": "Retry"
261
351
  }
262
352
  ],
263
353
  "transitions": [
@@ -268,26 +358,46 @@
268
358
  "effects": [
269
359
  [
270
360
  "set",
271
- "@entity.body",
272
- ""
361
+ "@entity.to",
362
+ "@config.recipient"
273
363
  ],
274
364
  [
275
365
  "set",
276
366
  "@entity.subject",
277
- ""
367
+ "@config.subject"
278
368
  ],
279
369
  [
280
370
  "set",
281
- "@entity.to",
282
- ""
371
+ "@entity.body",
372
+ "@config.body"
373
+ ],
374
+ [
375
+ "set",
376
+ "@entity.from",
377
+ "@config.sender"
378
+ ],
379
+ [
380
+ "set",
381
+ "@entity.replyTo",
382
+ "@config.replyTo"
383
+ ],
384
+ [
385
+ "set",
386
+ "@entity.templateId",
387
+ "@config.templateId"
388
+ ],
389
+ [
390
+ "set",
391
+ "@entity.htmlBody",
392
+ "@config.htmlBody"
283
393
  ],
284
394
  [
285
395
  "fetch",
286
396
  "ServiceEmail",
287
397
  {
288
398
  "emit": {
289
- "failure": "ServiceEmailLoadFailed",
290
- "success": "ServiceEmailLoaded"
399
+ "success": "ServiceEmailLoaded",
400
+ "failure": "ServiceEmailLoadFailed"
291
401
  }
292
402
  }
293
403
  ],
@@ -295,51 +405,12 @@
295
405
  "render-ui",
296
406
  "main",
297
407
  {
408
+ "gap": "md",
298
409
  "children": [
299
- {
300
- "direction": "horizontal",
301
- "align": "center",
302
- "children": [
303
- {
304
- "name": "mail",
305
- "type": "icon"
306
- },
307
- {
308
- "variant": "h2",
309
- "content": "ServiceEmail Email",
310
- "type": "typography"
311
- }
312
- ],
313
- "gap": "md",
314
- "type": "stack"
315
- },
316
- {
317
- "type": "divider"
318
- },
319
- {
320
- "type": "input",
321
- "placeholder": "recipient@example.com"
322
- },
323
- {
324
- "type": "input",
325
- "placeholder": "Email subject"
326
- },
327
- {
328
- "type": "textarea",
329
- "placeholder": "Write your message..."
330
- },
331
- {
332
- "type": "button",
333
- "icon": "send",
334
- "variant": "primary",
335
- "label": "Send",
336
- "action": "SEND"
337
- }
410
+ "@config.uiTrait"
338
411
  ],
339
- "gap": "lg",
340
- "direction": "vertical",
341
412
  "type": "stack",
342
- "align": "stretch"
413
+ "direction": "vertical"
343
414
  }
344
415
  ]
345
416
  ]
@@ -355,7 +426,7 @@
355
426
  {
356
427
  "type": "loading-state",
357
428
  "title": "Sending email...",
358
- "message": "Delivering serviceemail email..."
429
+ "message": "Delivering your message."
359
430
  }
360
431
  ],
361
432
  [
@@ -363,55 +434,80 @@
363
434
  "email",
364
435
  "send",
365
436
  {
366
- "body": "@entity.body",
367
- "to": "@entity.to",
368
- "subject": "@entity.subject"
437
+ "replyTo": "@config.replyTo",
438
+ "body": "@config.body",
439
+ "to": "@config.recipient",
440
+ "subject": "@config.subject",
441
+ "from": "@config.sender",
442
+ "htmlBody": "@config.htmlBody",
443
+ "templateId": "@config.templateId"
369
444
  },
370
445
  {
371
446
  "emit": {
372
- "success": "ServiceEmailEmailCompleted",
373
- "failure": "ServiceEmailEmailFailed"
447
+ "success": "EmailSent",
448
+ "failure": "FAILED"
374
449
  }
375
450
  }
376
451
  ]
377
452
  ]
378
453
  },
454
+ {
455
+ "from": "idle",
456
+ "to": "idle",
457
+ "event": "ServiceEmailLoaded"
458
+ },
459
+ {
460
+ "from": "idle",
461
+ "to": "idle",
462
+ "event": "ServiceEmailLoadFailed"
463
+ },
379
464
  {
380
465
  "from": "sending",
381
466
  "to": "sent",
382
- "event": "SENT",
467
+ "event": "EmailSent",
383
468
  "effects": [
384
469
  [
385
470
  "set",
386
471
  "@entity.sendStatus",
387
472
  "sent"
388
473
  ],
474
+ [
475
+ "set",
476
+ "@entity.messageId",
477
+ "@payload.id"
478
+ ],
389
479
  [
390
480
  "render-ui",
391
481
  "main",
392
482
  {
393
483
  "direction": "vertical",
394
- "align": "center",
484
+ "type": "stack",
395
485
  "children": [
396
486
  {
397
487
  "type": "icon",
398
488
  "name": "check-circle"
399
489
  },
400
490
  {
401
- "message": "Email sent successfully",
402
491
  "type": "alert",
492
+ "message": "Email sent successfully",
403
493
  "variant": "success"
404
494
  },
405
495
  {
406
- "type": "button",
407
- "variant": "ghost",
408
- "action": "RESET",
496
+ "variant": "body",
497
+ "content": "@entity.messageId",
498
+ "color": "muted",
499
+ "type": "typography"
500
+ },
501
+ {
502
+ "label": "Send Another",
409
503
  "icon": "rotate-ccw",
410
- "label": "Send Another"
504
+ "action": "RESET",
505
+ "type": "button",
506
+ "variant": "ghost"
411
507
  }
412
508
  ],
413
- "type": "stack",
414
- "gap": "lg"
509
+ "gap": "lg",
510
+ "align": "center"
415
511
  }
416
512
  ]
417
513
  ]
@@ -426,44 +522,27 @@
426
522
  "@entity.sendStatus",
427
523
  "error"
428
524
  ],
525
+ [
526
+ "set",
527
+ "@entity.error",
528
+ "@payload.error"
529
+ ],
530
+ [
531
+ "emit",
532
+ "ServiceEmailEmailFailed",
533
+ {
534
+ "code": "send_email_failed",
535
+ "error": "@entity.error"
536
+ }
537
+ ],
429
538
  [
430
539
  "render-ui",
431
540
  "main",
432
541
  {
433
- "gap": "lg",
434
- "align": "center",
435
- "type": "stack",
436
- "direction": "vertical",
437
- "children": [
438
- {
439
- "type": "error-state",
440
- "title": "Send Failed",
441
- "onRetry": "RETRY",
442
- "message": "Could not deliver the email."
443
- },
444
- {
445
- "children": [
446
- {
447
- "label": "Retry",
448
- "action": "RETRY",
449
- "type": "button",
450
- "variant": "primary",
451
- "icon": "refresh-cw"
452
- },
453
- {
454
- "variant": "ghost",
455
- "icon": "rotate-ccw",
456
- "label": "Reset",
457
- "action": "RESET",
458
- "type": "button"
459
- }
460
- ],
461
- "gap": "sm",
462
- "direction": "horizontal",
463
- "type": "stack",
464
- "justify": "center"
465
- }
466
- ]
542
+ "type": "error-state",
543
+ "title": "Send Failed",
544
+ "message": "@entity.error",
545
+ "onRetry": "RETRY"
467
546
  }
468
547
  ]
469
548
  ]
@@ -482,55 +561,26 @@
482
561
  "render-ui",
483
562
  "main",
484
563
  {
564
+ "gap": "md",
485
565
  "type": "stack",
486
- "align": "stretch",
487
566
  "children": [
488
- {
489
- "children": [
490
- {
491
- "name": "mail",
492
- "type": "icon"
493
- },
494
- {
495
- "content": "ServiceEmail Email",
496
- "type": "typography",
497
- "variant": "h2"
498
- }
499
- ],
500
- "type": "stack",
501
- "align": "center",
502
- "gap": "md",
503
- "direction": "horizontal"
504
- },
505
- {
506
- "type": "divider"
507
- },
508
- {
509
- "type": "input",
510
- "placeholder": "recipient@example.com"
511
- },
512
- {
513
- "type": "input",
514
- "placeholder": "Email subject"
515
- },
516
- {
517
- "type": "textarea",
518
- "placeholder": "Write your message..."
519
- },
520
- {
521
- "type": "button",
522
- "label": "Send",
523
- "variant": "primary",
524
- "action": "SEND",
525
- "icon": "send"
526
- }
567
+ "@config.uiTrait"
527
568
  ],
528
- "direction": "vertical",
529
- "gap": "lg"
569
+ "direction": "vertical"
530
570
  }
531
571
  ]
532
572
  ]
533
573
  },
574
+ {
575
+ "from": "sent",
576
+ "to": "sent",
577
+ "event": "EmailSent"
578
+ },
579
+ {
580
+ "from": "error",
581
+ "to": "error",
582
+ "event": "ServiceEmailEmailFailed"
583
+ },
534
584
  {
535
585
  "from": "error",
536
586
  "to": "idle",
@@ -540,51 +590,12 @@
540
590
  "render-ui",
541
591
  "main",
542
592
  {
543
- "align": "stretch",
544
593
  "children": [
545
- {
546
- "gap": "md",
547
- "children": [
548
- {
549
- "type": "icon",
550
- "name": "mail"
551
- },
552
- {
553
- "type": "typography",
554
- "content": "ServiceEmail Email",
555
- "variant": "h2"
556
- }
557
- ],
558
- "direction": "horizontal",
559
- "type": "stack",
560
- "align": "center"
561
- },
562
- {
563
- "type": "divider"
564
- },
565
- {
566
- "type": "input",
567
- "placeholder": "recipient@example.com"
568
- },
569
- {
570
- "type": "input",
571
- "placeholder": "Email subject"
572
- },
573
- {
574
- "type": "textarea",
575
- "placeholder": "Write your message..."
576
- },
577
- {
578
- "type": "button",
579
- "label": "Send",
580
- "action": "SEND",
581
- "variant": "primary",
582
- "icon": "send"
583
- }
594
+ "@config.uiTrait"
584
595
  ],
585
596
  "type": "stack",
586
597
  "direction": "vertical",
587
- "gap": "lg"
598
+ "gap": "md"
588
599
  }
589
600
  ]
590
601
  ]
@@ -603,57 +614,52 @@
603
614
  "render-ui",
604
615
  "main",
605
616
  {
606
- "type": "stack",
607
- "align": "stretch",
608
617
  "direction": "vertical",
609
- "gap": "lg",
610
618
  "children": [
611
- {
612
- "direction": "horizontal",
613
- "children": [
614
- {
615
- "name": "mail",
616
- "type": "icon"
617
- },
618
- {
619
- "type": "typography",
620
- "content": "ServiceEmail Email",
621
- "variant": "h2"
622
- }
623
- ],
624
- "gap": "md",
625
- "type": "stack",
626
- "align": "center"
627
- },
628
- {
629
- "type": "divider"
630
- },
631
- {
632
- "type": "input",
633
- "placeholder": "recipient@example.com"
634
- },
635
- {
636
- "type": "input",
637
- "placeholder": "Email subject"
638
- },
639
- {
640
- "type": "textarea",
641
- "placeholder": "Write your message..."
642
- },
643
- {
644
- "icon": "send",
645
- "type": "button",
646
- "label": "Send",
647
- "variant": "primary",
648
- "action": "SEND"
649
- }
650
- ]
619
+ "@config.uiTrait"
620
+ ],
621
+ "type": "stack",
622
+ "gap": "md"
651
623
  }
652
624
  ]
653
625
  ]
654
626
  }
655
627
  ]
656
628
  },
629
+ "config": {
630
+ "recipient": {
631
+ "type": "string",
632
+ "default": ""
633
+ },
634
+ "templateId": {
635
+ "type": "string",
636
+ "default": ""
637
+ },
638
+ "uiTrait": {
639
+ "type": "trait",
640
+ "default": "@trait.ServiceEmailDefaultForm"
641
+ },
642
+ "body": {
643
+ "type": "string",
644
+ "default": ""
645
+ },
646
+ "replyTo": {
647
+ "type": "string",
648
+ "default": ""
649
+ },
650
+ "htmlBody": {
651
+ "type": "string",
652
+ "default": ""
653
+ },
654
+ "sender": {
655
+ "type": "string",
656
+ "default": ""
657
+ },
658
+ "subject": {
659
+ "type": "string",
660
+ "default": ""
661
+ }
662
+ },
657
663
  "scope": "instance"
658
664
  }
659
665
  ],