@xpert-ai/plugin-live-dashboard 0.3.1 → 0.4.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 (148) hide show
  1. package/.xpertai-plugin/plugin.json +10 -2
  2. package/README.md +6 -0
  3. package/assets/branding/cover-v1.prompt.txt +27 -0
  4. package/assets/branding/cover-v1.webp +0 -0
  5. package/assets/previews/customer-brief.png +0 -0
  6. package/assets/previews/profit-atlas.png +0 -0
  7. package/assets/previews/trend-workspace.png +0 -0
  8. package/dist/index.js +6 -3
  9. package/dist/lib/agent.schema.d.ts +43 -37
  10. package/dist/lib/agent.schema.js +2 -1
  11. package/dist/lib/app-config.d.ts +62 -0
  12. package/dist/lib/app-config.js +38 -0
  13. package/dist/lib/artifact-type.provider.d.ts +15 -0
  14. package/dist/lib/artifact-type.provider.js +78 -0
  15. package/dist/lib/assistant-template.d.ts +1 -2
  16. package/dist/lib/assistant-template.js +3 -52
  17. package/dist/lib/content.provider.js +13 -5
  18. package/dist/lib/dashboard-navigation.d.ts +58 -14
  19. package/dist/lib/dashboard-navigation.js +11 -10
  20. package/dist/lib/dashboard-view.schema.d.ts +197 -46
  21. package/dist/lib/dashboard-view.schema.js +8 -1
  22. package/dist/lib/dashboard.service.d.ts +39 -2
  23. package/dist/lib/dashboard.service.js +52 -28
  24. package/dist/lib/document-libraries.d.ts +1 -1
  25. package/dist/lib/document-libraries.js +3 -2
  26. package/dist/lib/document-network.d.ts +1 -1
  27. package/dist/lib/document-network.js +2 -6
  28. package/dist/lib/editing-feedback.d.ts +5 -0
  29. package/dist/lib/editing-feedback.js +19 -0
  30. package/dist/lib/editing-patch.d.ts +22 -0
  31. package/dist/lib/editing-patch.js +46 -0
  32. package/dist/lib/editing-session.d.ts +167 -0
  33. package/dist/lib/editing-session.js +53 -0
  34. package/dist/lib/editing.d.ts +92 -60
  35. package/dist/lib/editing.js +36 -24
  36. package/dist/lib/html-guidance.d.ts +1 -1
  37. package/dist/lib/html-guidance.js +1 -1
  38. package/dist/lib/middleware.js +42 -18
  39. package/dist/lib/monitor.d.ts +70 -0
  40. package/dist/lib/monitor.js +101 -0
  41. package/dist/lib/plugin.js +4 -1
  42. package/dist/lib/project.d.ts +106 -0
  43. package/dist/lib/project.js +17 -0
  44. package/dist/lib/projects.schema.d.ts +49 -0
  45. package/dist/lib/projects.schema.js +7 -0
  46. package/dist/lib/projects.service.d.ts +23 -0
  47. package/dist/lib/projects.service.js +65 -0
  48. package/dist/lib/resource-card.js +1 -1
  49. package/dist/lib/runtime-context.d.ts +3 -0
  50. package/dist/lib/runtime-context.js +13 -0
  51. package/dist/lib/save-evidence.d.ts +1 -1
  52. package/dist/lib/templates.d.ts +2 -0
  53. package/dist/lib/templates.js +55 -0
  54. package/dist/lib/view.provider.d.ts +97 -7
  55. package/dist/lib/view.provider.js +39 -10
  56. package/dist/libraries/TREND-WORKSPACE-ICONS-LICENSE.txt +43 -0
  57. package/dist/libraries/catalog.json +1 -1
  58. package/dist/remote/app.css +1 -1
  59. package/dist/remote/app.js +33 -33
  60. package/dist/remote/build-manifest.json +115 -32
  61. package/dist/sandbox-actions/action.json +1 -1
  62. package/dist/sandbox-actions/bundle/host.js +2 -2
  63. package/dist/sandbox-actions/bundle/resource-cache.mjs +2 -1
  64. package/dist/sandbox-actions/bundle/validate.mjs +1 -1
  65. package/docs/docs.json +7 -0
  66. package/docs/frontend-libraries.mdx +12 -4
  67. package/docs/html-mode.md +3 -3
  68. package/docs/quick-start-acceptance.mdx +50 -0
  69. package/docs/quick-start.mdx +64 -0
  70. package/docs/superstore.mdx +38 -0
  71. package/docs/team-sharing.mdx +6 -2
  72. package/docs/trend-workspace-acceptance.mdx +43 -0
  73. package/docs/trend-workspace.mdx +30 -0
  74. package/docs/verification.mdx +4 -2
  75. package/docs/visual-styles-acceptance.mdx +40 -0
  76. package/docs/visual-styles.mdx +46 -0
  77. package/package.json +23 -17
  78. package/skills/live-dashboard/SKILL.md +27 -3
  79. package/skills/live-dashboard/examples/README.md +25 -0
  80. package/skills/live-dashboard/examples/catalog.json +79 -0
  81. package/skills/live-dashboard/examples/production-quality/README.md +25 -0
  82. package/skills/live-dashboard/examples/production-quality/dashboard.html +129 -0
  83. package/skills/live-dashboard/examples/production-quality/definition.json +67 -0
  84. package/skills/live-dashboard/examples/production-quality/demo.csv +7 -0
  85. package/skills/live-dashboard/examples/production-quality/demo.json +44 -0
  86. package/skills/live-dashboard/examples/production-quality/expected.json +26 -0
  87. package/skills/live-dashboard/examples/production-quality/preview.png +0 -0
  88. package/skills/live-dashboard/examples/production-quality/query.json +53 -0
  89. package/skills/live-dashboard/examples/regional-sales/README.md +25 -0
  90. package/skills/live-dashboard/examples/regional-sales/dashboard-create.json +35 -0
  91. package/skills/live-dashboard/examples/regional-sales/definition.json +35 -0
  92. package/skills/live-dashboard/examples/regional-sales/demo.csv +5 -0
  93. package/skills/live-dashboard/examples/regional-sales/demo.json +18 -0
  94. package/skills/live-dashboard/examples/regional-sales/expected.json +19 -0
  95. package/skills/live-dashboard/examples/regional-sales/preview.png +0 -0
  96. package/skills/live-dashboard/examples/regional-sales/query.json +45 -0
  97. package/skills/live-dashboard/examples/sales-overview/README.md +25 -0
  98. package/skills/live-dashboard/examples/sales-overview/dashboard.html +129 -0
  99. package/skills/live-dashboard/examples/sales-overview/definition.json +57 -0
  100. package/skills/live-dashboard/examples/sales-overview/demo.csv +7 -0
  101. package/skills/live-dashboard/examples/sales-overview/demo.json +38 -0
  102. package/skills/live-dashboard/examples/sales-overview/expected.json +22 -0
  103. package/skills/live-dashboard/examples/sales-overview/preview.png +0 -0
  104. package/skills/live-dashboard/examples/sales-overview/query.json +52 -0
  105. package/skills/live-dashboard/examples/superstore/README.md +64 -0
  106. package/skills/live-dashboard/examples/superstore/THIRD_PARTY_LICENSE.txt +207 -0
  107. package/skills/live-dashboard/examples/superstore/build_data.py +155 -0
  108. package/skills/live-dashboard/examples/superstore/build_pages.py +129 -0
  109. package/skills/live-dashboard/examples/superstore/checks.json +104 -0
  110. package/skills/live-dashboard/examples/superstore/customers-mobile-dark.png +0 -0
  111. package/skills/live-dashboard/examples/superstore/customers-select.png +0 -0
  112. package/skills/live-dashboard/examples/superstore/customers.html +316 -0
  113. package/skills/live-dashboard/examples/superstore/customers.png +0 -0
  114. package/skills/live-dashboard/examples/superstore/customers.queries.json +512 -0
  115. package/skills/live-dashboard/examples/superstore/expected.json +4069 -0
  116. package/skills/live-dashboard/examples/superstore/import.json +200 -0
  117. package/skills/live-dashboard/examples/superstore/orders.csv +10195 -0
  118. package/skills/live-dashboard/examples/superstore/overview-mobile-dark.png +0 -0
  119. package/skills/live-dashboard/examples/superstore/overview-select.png +0 -0
  120. package/skills/live-dashboard/examples/superstore/overview.html +310 -0
  121. package/skills/live-dashboard/examples/superstore/overview.png +0 -0
  122. package/skills/live-dashboard/examples/superstore/overview.queries.json +636 -0
  123. package/skills/live-dashboard/examples/superstore/page.js +109 -0
  124. package/skills/live-dashboard/examples/superstore/profitability-mobile-dark.png +0 -0
  125. package/skills/live-dashboard/examples/superstore/profitability-select.png +0 -0
  126. package/skills/live-dashboard/examples/superstore/profitability.html +307 -0
  127. package/skills/live-dashboard/examples/superstore/profitability.png +0 -0
  128. package/skills/live-dashboard/examples/superstore/profitability.queries.json +334 -0
  129. package/skills/live-dashboard/examples/superstore/provenance.json +24 -0
  130. package/skills/live-dashboard/examples/superstore/semantic-model.json +220 -0
  131. package/skills/live-dashboard/examples/superstore/test_data.py +62 -0
  132. package/skills/live-dashboard/references/html-runtime.md +1 -1
  133. package/skills/live-dashboard/themes/README.md +50 -0
  134. package/skills/live-dashboard/themes/customer-brief/README.md +47 -0
  135. package/skills/live-dashboard/themes/customer-brief/charts.js +17 -0
  136. package/skills/live-dashboard/themes/customer-brief/layout.html +22 -0
  137. package/skills/live-dashboard/themes/customer-brief/theme.css +108 -0
  138. package/skills/live-dashboard/themes/profit-atlas/README.md +43 -0
  139. package/skills/live-dashboard/themes/profit-atlas/charts.js +30 -0
  140. package/skills/live-dashboard/themes/profit-atlas/layout.html +19 -0
  141. package/skills/live-dashboard/themes/profit-atlas/theme.css +75 -0
  142. package/skills/live-dashboard/themes/trend-workspace/ICON_LICENSE.txt +43 -0
  143. package/skills/live-dashboard/themes/trend-workspace/README.md +144 -0
  144. package/skills/live-dashboard/themes/trend-workspace/charts.js +60 -0
  145. package/skills/live-dashboard/themes/trend-workspace/icons.js +11 -0
  146. package/skills/live-dashboard/themes/trend-workspace/layout.html +45 -0
  147. package/skills/live-dashboard/themes/trend-workspace/select.js +127 -0
  148. package/skills/live-dashboard/themes/trend-workspace/theme.css +137 -0
@@ -0,0 +1,512 @@
1
+ {
2
+ "controls": [
3
+ {
4
+ "controlId": "year",
5
+ "label": "年份",
6
+ "type": "string",
7
+ "defaultValue": "",
8
+ "allowedValues": [
9
+ "",
10
+ "2021",
11
+ "2022",
12
+ "2023",
13
+ "2024"
14
+ ]
15
+ },
16
+ {
17
+ "controlId": "region",
18
+ "label": "区域",
19
+ "type": "string",
20
+ "defaultValue": "",
21
+ "allowedValues": [
22
+ "",
23
+ "Central",
24
+ "East",
25
+ "South",
26
+ "West"
27
+ ]
28
+ },
29
+ {
30
+ "controlId": "category",
31
+ "label": "品类",
32
+ "type": "string",
33
+ "defaultValue": "",
34
+ "allowedValues": [
35
+ "",
36
+ "Furniture",
37
+ "Office Supplies",
38
+ "Technology"
39
+ ]
40
+ }
41
+ ],
42
+ "bindings": [
43
+ {
44
+ "id": "summary",
45
+ "providerId": "data-xpert.ontology",
46
+ "operation": "action",
47
+ "contractVersion": 1,
48
+ "payload": {
49
+ "resourceId": "<discovered-resource-id>",
50
+ "actionTypeCode": "sql.query_cube_slice",
51
+ "target": {
52
+ "entityTypeCode": "semantic_cube",
53
+ "entityRef": "<published-model-id>::SuperstoreOrders"
54
+ },
55
+ "params": {
56
+ "dimensions": [],
57
+ "measures": [
58
+ "Sales",
59
+ "Orders",
60
+ "Customers",
61
+ "ReturnedOrders",
62
+ "ReturnedSales"
63
+ ],
64
+ "filters": [
65
+ {
66
+ "field": "OrderYear",
67
+ "op": "contains",
68
+ "value": ""
69
+ },
70
+ {
71
+ "field": "Region",
72
+ "op": "contains",
73
+ "value": ""
74
+ },
75
+ {
76
+ "field": "Category",
77
+ "op": "contains",
78
+ "value": ""
79
+ }
80
+ ],
81
+ "limit": 100
82
+ },
83
+ "parameterPaths": {
84
+ "year": [
85
+ "filters",
86
+ "0",
87
+ "value"
88
+ ],
89
+ "region": [
90
+ "filters",
91
+ "1",
92
+ "value"
93
+ ],
94
+ "category": [
95
+ "filters",
96
+ "2",
97
+ "value"
98
+ ]
99
+ }
100
+ },
101
+ "parameters": [
102
+ {
103
+ "name": "year",
104
+ "controlId": "year",
105
+ "type": "string",
106
+ "required": true,
107
+ "defaultValue": "",
108
+ "allowedValues": [
109
+ "",
110
+ "2021",
111
+ "2022",
112
+ "2023",
113
+ "2024"
114
+ ]
115
+ },
116
+ {
117
+ "name": "region",
118
+ "controlId": "region",
119
+ "type": "string",
120
+ "required": true,
121
+ "defaultValue": "",
122
+ "allowedValues": [
123
+ "",
124
+ "Central",
125
+ "East",
126
+ "South",
127
+ "West"
128
+ ]
129
+ },
130
+ {
131
+ "name": "category",
132
+ "controlId": "category",
133
+ "type": "string",
134
+ "required": true,
135
+ "defaultValue": "",
136
+ "allowedValues": [
137
+ "",
138
+ "Furniture",
139
+ "Office Supplies",
140
+ "Technology"
141
+ ]
142
+ }
143
+ ],
144
+ "output": {
145
+ "datasetId": "summary",
146
+ "fields": [
147
+ {
148
+ "id": "Sales",
149
+ "sourceField": "Sales",
150
+ "label": "Sales",
151
+ "logicalType": "decimal",
152
+ "role": "measure",
153
+ "nullable": true
154
+ },
155
+ {
156
+ "id": "Orders",
157
+ "sourceField": "Orders",
158
+ "label": "Orders",
159
+ "logicalType": "int64",
160
+ "role": "measure",
161
+ "nullable": false
162
+ },
163
+ {
164
+ "id": "Customers",
165
+ "sourceField": "Customers",
166
+ "label": "Customers",
167
+ "logicalType": "int64",
168
+ "role": "measure",
169
+ "nullable": false
170
+ },
171
+ {
172
+ "id": "ReturnedOrders",
173
+ "sourceField": "ReturnedOrders",
174
+ "label": "ReturnedOrders",
175
+ "logicalType": "int64",
176
+ "role": "measure",
177
+ "nullable": false
178
+ },
179
+ {
180
+ "id": "ReturnedSales",
181
+ "sourceField": "ReturnedSales",
182
+ "label": "ReturnedSales",
183
+ "logicalType": "decimal",
184
+ "role": "measure",
185
+ "nullable": true
186
+ }
187
+ ],
188
+ "grain": []
189
+ }
190
+ },
191
+ {
192
+ "id": "segments",
193
+ "providerId": "data-xpert.ontology",
194
+ "operation": "action",
195
+ "contractVersion": 1,
196
+ "payload": {
197
+ "resourceId": "<discovered-resource-id>",
198
+ "actionTypeCode": "sql.query_cube_slice",
199
+ "target": {
200
+ "entityTypeCode": "semantic_cube",
201
+ "entityRef": "<published-model-id>::SuperstoreOrders"
202
+ },
203
+ "params": {
204
+ "dimensions": [
205
+ "Segment"
206
+ ],
207
+ "measures": [
208
+ "Sales",
209
+ "Orders",
210
+ "Customers",
211
+ "ReturnedOrders",
212
+ "ReturnedSales"
213
+ ],
214
+ "filters": [
215
+ {
216
+ "field": "OrderYear",
217
+ "op": "contains",
218
+ "value": ""
219
+ },
220
+ {
221
+ "field": "Region",
222
+ "op": "contains",
223
+ "value": ""
224
+ },
225
+ {
226
+ "field": "Category",
227
+ "op": "contains",
228
+ "value": ""
229
+ }
230
+ ],
231
+ "limit": 100
232
+ },
233
+ "parameterPaths": {
234
+ "year": [
235
+ "filters",
236
+ "0",
237
+ "value"
238
+ ],
239
+ "region": [
240
+ "filters",
241
+ "1",
242
+ "value"
243
+ ],
244
+ "category": [
245
+ "filters",
246
+ "2",
247
+ "value"
248
+ ]
249
+ }
250
+ },
251
+ "parameters": [
252
+ {
253
+ "name": "year",
254
+ "controlId": "year",
255
+ "type": "string",
256
+ "required": true,
257
+ "defaultValue": "",
258
+ "allowedValues": [
259
+ "",
260
+ "2021",
261
+ "2022",
262
+ "2023",
263
+ "2024"
264
+ ]
265
+ },
266
+ {
267
+ "name": "region",
268
+ "controlId": "region",
269
+ "type": "string",
270
+ "required": true,
271
+ "defaultValue": "",
272
+ "allowedValues": [
273
+ "",
274
+ "Central",
275
+ "East",
276
+ "South",
277
+ "West"
278
+ ]
279
+ },
280
+ {
281
+ "name": "category",
282
+ "controlId": "category",
283
+ "type": "string",
284
+ "required": true,
285
+ "defaultValue": "",
286
+ "allowedValues": [
287
+ "",
288
+ "Furniture",
289
+ "Office Supplies",
290
+ "Technology"
291
+ ]
292
+ }
293
+ ],
294
+ "output": {
295
+ "datasetId": "segments",
296
+ "fields": [
297
+ {
298
+ "id": "Segment",
299
+ "sourceField": "Segment",
300
+ "label": "Segment",
301
+ "logicalType": "string",
302
+ "role": "dimension",
303
+ "nullable": false
304
+ },
305
+ {
306
+ "id": "Sales",
307
+ "sourceField": "Sales",
308
+ "label": "Sales",
309
+ "logicalType": "decimal",
310
+ "role": "measure",
311
+ "nullable": true
312
+ },
313
+ {
314
+ "id": "Orders",
315
+ "sourceField": "Orders",
316
+ "label": "Orders",
317
+ "logicalType": "int64",
318
+ "role": "measure",
319
+ "nullable": false
320
+ },
321
+ {
322
+ "id": "Customers",
323
+ "sourceField": "Customers",
324
+ "label": "Customers",
325
+ "logicalType": "int64",
326
+ "role": "measure",
327
+ "nullable": false
328
+ },
329
+ {
330
+ "id": "ReturnedOrders",
331
+ "sourceField": "ReturnedOrders",
332
+ "label": "ReturnedOrders",
333
+ "logicalType": "int64",
334
+ "role": "measure",
335
+ "nullable": false
336
+ },
337
+ {
338
+ "id": "ReturnedSales",
339
+ "sourceField": "ReturnedSales",
340
+ "label": "ReturnedSales",
341
+ "logicalType": "decimal",
342
+ "role": "measure",
343
+ "nullable": true
344
+ }
345
+ ],
346
+ "grain": [
347
+ "Segment"
348
+ ]
349
+ }
350
+ },
351
+ {
352
+ "id": "regions",
353
+ "providerId": "data-xpert.ontology",
354
+ "operation": "action",
355
+ "contractVersion": 1,
356
+ "payload": {
357
+ "resourceId": "<discovered-resource-id>",
358
+ "actionTypeCode": "sql.query_cube_slice",
359
+ "target": {
360
+ "entityTypeCode": "semantic_cube",
361
+ "entityRef": "<published-model-id>::SuperstoreOrders"
362
+ },
363
+ "params": {
364
+ "dimensions": [
365
+ "Region"
366
+ ],
367
+ "measures": [
368
+ "Sales",
369
+ "Orders",
370
+ "Customers",
371
+ "ReturnedOrders",
372
+ "ReturnedSales"
373
+ ],
374
+ "filters": [
375
+ {
376
+ "field": "OrderYear",
377
+ "op": "contains",
378
+ "value": ""
379
+ },
380
+ {
381
+ "field": "Region",
382
+ "op": "contains",
383
+ "value": ""
384
+ },
385
+ {
386
+ "field": "Category",
387
+ "op": "contains",
388
+ "value": ""
389
+ }
390
+ ],
391
+ "limit": 100
392
+ },
393
+ "parameterPaths": {
394
+ "year": [
395
+ "filters",
396
+ "0",
397
+ "value"
398
+ ],
399
+ "region": [
400
+ "filters",
401
+ "1",
402
+ "value"
403
+ ],
404
+ "category": [
405
+ "filters",
406
+ "2",
407
+ "value"
408
+ ]
409
+ }
410
+ },
411
+ "parameters": [
412
+ {
413
+ "name": "year",
414
+ "controlId": "year",
415
+ "type": "string",
416
+ "required": true,
417
+ "defaultValue": "",
418
+ "allowedValues": [
419
+ "",
420
+ "2021",
421
+ "2022",
422
+ "2023",
423
+ "2024"
424
+ ]
425
+ },
426
+ {
427
+ "name": "region",
428
+ "controlId": "region",
429
+ "type": "string",
430
+ "required": true,
431
+ "defaultValue": "",
432
+ "allowedValues": [
433
+ "",
434
+ "Central",
435
+ "East",
436
+ "South",
437
+ "West"
438
+ ]
439
+ },
440
+ {
441
+ "name": "category",
442
+ "controlId": "category",
443
+ "type": "string",
444
+ "required": true,
445
+ "defaultValue": "",
446
+ "allowedValues": [
447
+ "",
448
+ "Furniture",
449
+ "Office Supplies",
450
+ "Technology"
451
+ ]
452
+ }
453
+ ],
454
+ "output": {
455
+ "datasetId": "regions",
456
+ "fields": [
457
+ {
458
+ "id": "Region",
459
+ "sourceField": "Region",
460
+ "label": "Region",
461
+ "logicalType": "string",
462
+ "role": "dimension",
463
+ "nullable": false
464
+ },
465
+ {
466
+ "id": "Sales",
467
+ "sourceField": "Sales",
468
+ "label": "Sales",
469
+ "logicalType": "decimal",
470
+ "role": "measure",
471
+ "nullable": true
472
+ },
473
+ {
474
+ "id": "Orders",
475
+ "sourceField": "Orders",
476
+ "label": "Orders",
477
+ "logicalType": "int64",
478
+ "role": "measure",
479
+ "nullable": false
480
+ },
481
+ {
482
+ "id": "Customers",
483
+ "sourceField": "Customers",
484
+ "label": "Customers",
485
+ "logicalType": "int64",
486
+ "role": "measure",
487
+ "nullable": false
488
+ },
489
+ {
490
+ "id": "ReturnedOrders",
491
+ "sourceField": "ReturnedOrders",
492
+ "label": "ReturnedOrders",
493
+ "logicalType": "int64",
494
+ "role": "measure",
495
+ "nullable": false
496
+ },
497
+ {
498
+ "id": "ReturnedSales",
499
+ "sourceField": "ReturnedSales",
500
+ "label": "ReturnedSales",
501
+ "logicalType": "decimal",
502
+ "role": "measure",
503
+ "nullable": true
504
+ }
505
+ ],
506
+ "grain": [
507
+ "Region"
508
+ ]
509
+ }
510
+ }
511
+ ]
512
+ }