yaml-flow 5.1.0 → 5.2.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/{examples/example-board/reusable-server-runtime.js → board-livecards-server-runtime.js} +42 -20
- package/{examples/example-board/reusable-board-runtime-client.js → browser/board-livecards-runtime-client.js} +6 -2
- package/browser/{board-livegraph-runtime.js → board-livegraph-engine.js} +212 -16
- package/browser/board-livegraph-engine.js.map +1 -0
- package/browser/live-cards.js +362 -38
- package/browser/live-cards.schema.json +20 -4
- package/dist/board-livegraph-runtime/index.cjs +210 -14
- package/dist/board-livegraph-runtime/index.cjs.map +1 -1
- package/dist/board-livegraph-runtime/index.d.cts +49 -5
- package/dist/board-livegraph-runtime/index.d.ts +49 -5
- package/dist/board-livegraph-runtime/index.js +209 -15
- package/dist/board-livegraph-runtime/index.js.map +1 -1
- package/dist/card-compute/index.cjs +63 -7
- package/dist/card-compute/index.cjs.map +1 -1
- package/dist/card-compute/index.d.cts +2 -2
- package/dist/card-compute/index.d.ts +2 -2
- package/dist/card-compute/index.js +63 -7
- package/dist/card-compute/index.js.map +1 -1
- package/dist/cli/board-live-cards-cli.cjs +664 -75
- package/dist/cli/board-live-cards-cli.cjs.map +1 -1
- package/dist/cli/board-live-cards-cli.d.cts +33 -5
- package/dist/cli/board-live-cards-cli.d.ts +33 -5
- package/dist/cli/board-live-cards-cli.js +661 -76
- package/dist/cli/board-live-cards-cli.js.map +1 -1
- package/dist/{constants-ozjf1Ejw.d.cts → constants-BzZUyYlp.d.cts} +1 -1
- package/dist/{constants-DuzE5n03.d.ts → constants-oCEbNpul.d.ts} +1 -1
- package/dist/continuous-event-graph/index.cjs +47 -14
- package/dist/continuous-event-graph/index.cjs.map +1 -1
- package/dist/continuous-event-graph/index.d.cts +9 -9
- package/dist/continuous-event-graph/index.d.ts +9 -9
- package/dist/continuous-event-graph/index.js +47 -14
- package/dist/continuous-event-graph/index.js.map +1 -1
- package/dist/event-graph/index.cjs +29 -12
- package/dist/event-graph/index.cjs.map +1 -1
- package/dist/event-graph/index.d.cts +5 -5
- package/dist/event-graph/index.d.ts +5 -5
- package/dist/event-graph/index.js +29 -12
- package/dist/event-graph/index.js.map +1 -1
- package/dist/index.cjs +93 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +93 -20
- package/dist/index.js.map +1 -1
- package/dist/inference/index.cjs +29 -12
- package/dist/inference/index.cjs.map +1 -1
- package/dist/inference/index.d.cts +2 -2
- package/dist/inference/index.d.ts +2 -2
- package/dist/inference/index.js +29 -12
- package/dist/inference/index.js.map +1 -1
- package/dist/{journal-NLYuqege.d.ts → journal-9HEgs7dU.d.ts} +1 -1
- package/dist/{journal-DRfJiheM.d.cts → journal-B-JCfQnh.d.cts} +1 -1
- package/dist/{live-cards-bridge-Or7fdEJV.d.ts → live-cards-bridge-CeNxiVcm.d.ts} +6 -2
- package/dist/{live-cards-bridge-vGJ6tMzN.d.cts → live-cards-bridge-z_rJCSbi.d.cts} +6 -2
- package/dist/{schedule-CMcZe5Ny.d.ts → schedule-Cszq9LYY.d.ts} +1 -1
- package/dist/{schedule-CiucyCan.d.cts → schedule-qWNL0RQh.d.cts} +1 -1
- package/dist/{types-CMFSIjpc.d.cts → types-BBhqYGhE.d.cts} +4 -0
- package/dist/{types-CMFSIjpc.d.ts → types-BBhqYGhE.d.ts} +4 -0
- package/dist/{types-BzLD8bjb.d.cts → types-CHSdoAAA.d.cts} +1 -1
- package/dist/{types-C2eJ7DAV.d.ts → types-CoW0gQl3.d.ts} +1 -1
- package/dist/{validate-DJQTQ6bP.d.ts → validate-BAVzUJWa.d.ts} +1 -1
- package/dist/{validate-ke92Cleg.d.cts → validate-Dbu7ygys.d.cts} +1 -1
- package/examples/browser/boards/portfolio-tracker/cards/portfolio-risk-assessment.json +28 -0
- package/examples/browser/boards/portfolio-tracker/cards/rebalancing-strategy.json +28 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-inference-adapter.js +187 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker.js +139 -5
- package/examples/example-board/agent-instructions-cardlayout.md +28 -0
- package/examples/example-board/agent-instructions.md +603 -0
- package/examples/example-board/cards/card-concentration.json +42 -0
- package/examples/example-board/cards/card-market-prices.json +51 -0
- package/examples/example-board/cards/card-portfolio-action.json +19 -0
- package/examples/example-board/cards/card-portfolio-risks.json +19 -0
- package/examples/example-board/cards/card-portfolio-value.json +62 -0
- package/examples/example-board/cards/card-portfolio.json +44 -0
- package/examples/example-board/demo-chat-handler.js +373 -33
- package/examples/example-board/demo-server-config.json +0 -2
- package/examples/example-board/demo-server.js +46 -7
- package/examples/example-board/demo-shell-browser.html +75 -207
- package/examples/example-board/demo-shell-with-server.html +14 -9
- package/examples/example-board/demo-shell.html +1 -1
- package/examples/example-board/demo-task-executor.js +259 -41
- package/package.json +6 -2
- package/schema/live-cards.schema.json +20 -4
- package/browser/board-livegraph-runtime.js.map +0 -1
- package/examples/example-board/board.yaml +0 -23
- package/examples/example-board/bootstrap_payload.json +0 -1
- package/examples/example-board/cards/card-chain-region-alert.json +0 -39
- package/examples/example-board/cards/card-chain-region-totals.json +0 -26
- package/examples/example-board/cards/card-chain-top-region.json +0 -24
- package/examples/example-board/cards/card-ex-actions.json +0 -32
- package/examples/example-board/cards/card-ex-chart.json +0 -30
- package/examples/example-board/cards/card-ex-filter.json +0 -36
- package/examples/example-board/cards/card-ex-filtered-by-preference.json +0 -59
- package/examples/example-board/cards/card-ex-form.json +0 -91
- package/examples/example-board/cards/card-ex-list.json +0 -22
- package/examples/example-board/cards/card-ex-markdown.json +0 -17
- package/examples/example-board/cards/card-ex-metric.json +0 -19
- package/examples/example-board/cards/card-ex-narrative.json +0 -36
- package/examples/example-board/cards/card-ex-source-http.json +0 -28
- package/examples/example-board/cards/card-ex-source.json +0 -21
- package/examples/example-board/cards/card-ex-status.json +0 -35
- package/examples/example-board/cards/card-ex-table.json +0 -30
- package/examples/example-board/cards/card-ex-todo.json +0 -29
- package/examples/example-board/mock.db +0 -15
- package/examples/example-board/reusable-runtime-artifacts-adapter.js +0 -233
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-actions",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Action Router",
|
|
5
|
-
"tags": ["actions", "interactive"],
|
|
6
|
-
"desc": "Simple button actions routed through board-level handler"
|
|
7
|
-
},
|
|
8
|
-
"view": {
|
|
9
|
-
"elements": [
|
|
10
|
-
{
|
|
11
|
-
"kind": "actions",
|
|
12
|
-
"label": "Workflow Actions",
|
|
13
|
-
"data": {
|
|
14
|
-
"buttons": [
|
|
15
|
-
{ "id": "approve", "label": "Approve", "style": "success" },
|
|
16
|
-
{ "id": "needs-review", "label": "Needs Review", "style": "warning" },
|
|
17
|
-
{ "id": "escalate", "label": "Escalate", "style": "danger" }
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"kind": "text",
|
|
23
|
-
"label": "Last Action",
|
|
24
|
-
"data": { "bind": "card_data.lastActionText", "style": "muted" }
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"layout": { "board": { "col": 4, "order": 14 }, "canvas": { "x": 980, "y": 320, "w": 260, "h": 180 } }
|
|
28
|
-
},
|
|
29
|
-
"card_data": {
|
|
30
|
-
"lastActionText": "No action yet"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-chart",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Orders by Region",
|
|
5
|
-
"tags": [],
|
|
6
|
-
"desc": "Bar chart — JSONata group-by region with count aggregation"
|
|
7
|
-
},
|
|
8
|
-
"requires": ["orders"],
|
|
9
|
-
"compute": [
|
|
10
|
-
{
|
|
11
|
-
"bindTo": "regionCounts",
|
|
12
|
-
"expr": "$each($reduce(requires.orders, function($acc, $v){ $merge([$acc, { $v.region: ($lookup($acc, $v.region) ? $lookup($acc, $v.region) + 1 : 1) }]) }, {}), function($v, $k){ { 'region': $k, 'count': $v } })"
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"view": {
|
|
16
|
-
"elements": [
|
|
17
|
-
{
|
|
18
|
-
"kind": "chart",
|
|
19
|
-
"label": "Orders by Region",
|
|
20
|
-
"data": {
|
|
21
|
-
"bind": "computed_values.regionCounts",
|
|
22
|
-
"chartType": "bar",
|
|
23
|
-
"chartOptions": { "indexAxis": "x" }
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"layout": { "board": { "col": 6, "order": 6 }, "canvas": { "x": 50, "y": 530, "w": 350, "h": 220 } }
|
|
28
|
-
},
|
|
29
|
-
"card_data": {}
|
|
30
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-filter",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Filters",
|
|
5
|
-
"tags": [],
|
|
6
|
-
"desc": "Interactive filter controls — user selects region and product"
|
|
7
|
-
},
|
|
8
|
-
"requires": ["orders"],
|
|
9
|
-
"provides": [{ "bindTo": "selections", "src": "card_data.fieldValues" }],
|
|
10
|
-
"compute": [
|
|
11
|
-
{ "bindTo": "region", "expr": "$sort($distinct(requires.orders.region))" },
|
|
12
|
-
{ "bindTo": "product", "expr": "$sort($distinct(requires.orders.product))" }
|
|
13
|
-
],
|
|
14
|
-
"view": {
|
|
15
|
-
"elements": [
|
|
16
|
-
{
|
|
17
|
-
"kind": "filter",
|
|
18
|
-
"data": {
|
|
19
|
-
"bind": "computed_values",
|
|
20
|
-
"writeTo": "card_data.fieldValues",
|
|
21
|
-
"fields": {
|
|
22
|
-
"type": "object",
|
|
23
|
-
"properties": {
|
|
24
|
-
"region": { "type": "string", "title": "Region" },
|
|
25
|
-
"product": { "type": "string", "title": "Product" }
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"layout": { "board": { "col": 4, "order": 3 }, "canvas": { "x": 50, "y": 320, "w": 220, "h": 160 } }
|
|
32
|
-
},
|
|
33
|
-
"card_data": {
|
|
34
|
-
"fieldValues": {}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-filtered-by-preference",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Orders by Favorite Product",
|
|
5
|
-
"tags": ["filtered", "computed"],
|
|
6
|
-
"desc": "Shows orders filtered by the Favorite Product selected in the preferences form. Demonstrates cascading updates: when form changes, this card auto-recomputes."
|
|
7
|
-
},
|
|
8
|
-
"requires": ["orders", "card-ex-form"],
|
|
9
|
-
"compute": [
|
|
10
|
-
{
|
|
11
|
-
"bindTo": "favoriteProduct",
|
|
12
|
-
"expr": "($lookup(requires, 'card-ex-form').preferences.favoriteProduct) ? $lookup(requires, 'card-ex-form').preferences.favoriteProduct : 'Widget A'"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"bindTo": "filteredOrders",
|
|
16
|
-
"expr": "$filter(requires.orders, function($v){ $v.product = computed_values.favoriteProduct })"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"bindTo": "filteredCount",
|
|
20
|
-
"expr": "$count(computed_values.filteredOrders)"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"bindTo": "filteredRevenue",
|
|
24
|
-
"expr": "$round($sum(computed_values.filteredOrders.amount), 2)"
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"view": {
|
|
28
|
-
"elements": [
|
|
29
|
-
{
|
|
30
|
-
"kind": "metric",
|
|
31
|
-
"label": "Filtered Product",
|
|
32
|
-
"data": { "bind": "computed_values.favoriteProduct" }
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"kind": "metric",
|
|
36
|
-
"label": "Order Count",
|
|
37
|
-
"data": { "bind": "computed_values.filteredCount" }
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"kind": "metric",
|
|
41
|
-
"label": "Total Revenue",
|
|
42
|
-
"data": { "bind": "computed_values.filteredRevenue" }
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"kind": "list",
|
|
46
|
-
"label": "Orders",
|
|
47
|
-
"data": {
|
|
48
|
-
"bind": "computed_values.filteredOrders",
|
|
49
|
-
"template": "{id} | {product} | Qty {quantity} | ${amount} | {region}"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"layout": {
|
|
54
|
-
"board": { "col": 4, "order": 13 },
|
|
55
|
-
"canvas": { "x": 920, "y": 400, "w": 300, "h": 250 }
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"card_data": {}
|
|
59
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-form",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Widget Preferences",
|
|
5
|
-
"tags": [
|
|
6
|
-
"form",
|
|
7
|
-
"settings"
|
|
8
|
-
],
|
|
9
|
-
"desc": "Form to update user preferences — demonstrates bidirectional data flow and card state mutations"
|
|
10
|
-
},
|
|
11
|
-
"provides": [
|
|
12
|
-
{
|
|
13
|
-
"bindTo": "card-ex-form",
|
|
14
|
-
"src": "card_data"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"view": {
|
|
18
|
-
"elements": [
|
|
19
|
-
{
|
|
20
|
-
"kind": "form",
|
|
21
|
-
"label": "Update Preferences",
|
|
22
|
-
"data": {
|
|
23
|
-
"writeTo": "card_data.preferences",
|
|
24
|
-
"fields": {
|
|
25
|
-
"type": "object",
|
|
26
|
-
"title": "Widget Preferences",
|
|
27
|
-
"properties": {
|
|
28
|
-
"favoriteProduct": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"title": "Favorite Product",
|
|
31
|
-
"enum": [
|
|
32
|
-
"Widget A",
|
|
33
|
-
"Widget B",
|
|
34
|
-
"Widget C"
|
|
35
|
-
],
|
|
36
|
-
"description": "Your preferred widget type"
|
|
37
|
-
},
|
|
38
|
-
"preferredRegion": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"title": "Preferred Region",
|
|
41
|
-
"enum": [
|
|
42
|
-
"North",
|
|
43
|
-
"South",
|
|
44
|
-
"East",
|
|
45
|
-
"West"
|
|
46
|
-
],
|
|
47
|
-
"description": "Your sales region"
|
|
48
|
-
},
|
|
49
|
-
"discountThreshold": {
|
|
50
|
-
"type": "number",
|
|
51
|
-
"title": "Discount Threshold ($)",
|
|
52
|
-
"minimum": 0,
|
|
53
|
-
"maximum": 100000,
|
|
54
|
-
"description": "Minimum order amount for discounts"
|
|
55
|
-
},
|
|
56
|
-
"enableNotifications": {
|
|
57
|
-
"type": "boolean",
|
|
58
|
-
"title": "Enable Email Notifications",
|
|
59
|
-
"description": "Receive alerts for order updates"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"required": [
|
|
63
|
-
"favoriteProduct",
|
|
64
|
-
"preferredRegion"
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"layout": {
|
|
71
|
-
"board": {
|
|
72
|
-
"col": 4,
|
|
73
|
-
"order": 12
|
|
74
|
-
},
|
|
75
|
-
"canvas": {
|
|
76
|
-
"x": 600,
|
|
77
|
-
"y": 400,
|
|
78
|
-
"w": 280,
|
|
79
|
-
"h": 200
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"card_data": {
|
|
84
|
-
"preferences": {
|
|
85
|
-
"favoriteProduct": "Widget C",
|
|
86
|
-
"preferredRegion": "North",
|
|
87
|
-
"discountThreshold": 5000,
|
|
88
|
-
"enableNotifications": true
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-list",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Top 5 Products",
|
|
5
|
-
"tags": [],
|
|
6
|
-
"desc": "Ranked list — JSONata sort by revenue descending, slice top 5"
|
|
7
|
-
},
|
|
8
|
-
"requires": ["orders"],
|
|
9
|
-
"compute": [
|
|
10
|
-
{
|
|
11
|
-
"bindTo": "topProducts",
|
|
12
|
-
"expr": "requires.orders^(>amount)#$i[$i<5].(product & ' — $' & $string(amount))"
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"view": {
|
|
16
|
-
"elements": [
|
|
17
|
-
{ "kind": "list", "data": { "bind": "computed_values.topProducts" } }
|
|
18
|
-
],
|
|
19
|
-
"layout": { "board": { "col": 3, "order": 5 }, "canvas": { "x": 550, "y": 320, "w": 220, "h": 180 } }
|
|
20
|
-
},
|
|
21
|
-
"card_data": {}
|
|
22
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-markdown",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Board Notes",
|
|
5
|
-
"tags": [],
|
|
6
|
-
"desc": "Free-text markdown notes — no source or compute"
|
|
7
|
-
},
|
|
8
|
-
"view": {
|
|
9
|
-
"elements": [
|
|
10
|
-
{ "kind": "markdown", "data": { "bind": "card_data.content" } }
|
|
11
|
-
],
|
|
12
|
-
"layout": { "board": { "col": 4, "order": 9 }, "canvas": { "x": 700, "y": 530, "w": 260, "h": 200 } }
|
|
13
|
-
},
|
|
14
|
-
"card_data": {
|
|
15
|
-
"content": "## Quick Notes\n\n- Review regional targets quarterly\n- Check supplier delivery SLAs\n- Update pricing model before next sprint"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-metric",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Total Revenue",
|
|
5
|
-
"tags": [],
|
|
6
|
-
"desc": "Single KPI — sum of all order amounts via JSONata $sum"
|
|
7
|
-
},
|
|
8
|
-
"requires": ["orders"],
|
|
9
|
-
"compute": [
|
|
10
|
-
{ "bindTo": "totalRevenue", "expr": "$round($sum(requires.orders.amount), 2)" }
|
|
11
|
-
],
|
|
12
|
-
"view": {
|
|
13
|
-
"elements": [
|
|
14
|
-
{ "kind": "metric", "label": "Revenue", "data": { "bind": "computed_values.totalRevenue" } }
|
|
15
|
-
],
|
|
16
|
-
"layout": { "board": { "col": 3, "order": 4 }, "canvas": { "x": 320, "y": 320, "w": 180, "h": 120 } }
|
|
17
|
-
},
|
|
18
|
-
"card_data": {}
|
|
19
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-narrative",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Sales Insight",
|
|
5
|
-
"tags": [],
|
|
6
|
-
"desc": "AI-generated narrative from Copilot source execution"
|
|
7
|
-
},
|
|
8
|
-
"requires": ["orders", "prices"],
|
|
9
|
-
"compute": [
|
|
10
|
-
{
|
|
11
|
-
"bindTo": "orderCount",
|
|
12
|
-
"expr": "$count(requires.orders)"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"bindTo": "totalRevenue",
|
|
16
|
-
"expr": "$sum(requires.orders.amount)"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"sources": [
|
|
20
|
-
{
|
|
21
|
-
"bindTo": "raw",
|
|
22
|
-
"outputFile": "card-ex-narrative-raw.json",
|
|
23
|
-
"copilot": {
|
|
24
|
-
"prompt_template": "You are a concise sales analyst. Write 5-7 bullet points about business signals to monitor this week for a small B2B widget company. Keep it under 120 words."
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"view": {
|
|
29
|
-
"elements": [
|
|
30
|
-
{ "kind": "narrative", "data": { "bind": "fetched_sources.raw" } }
|
|
31
|
-
],
|
|
32
|
-
"layout": { "board": { "col": 6, "order": 10 }, "canvas": { "x": 600, "y": 800, "w": 350, "h": 250 } },
|
|
33
|
-
"features": { "refresh": true, "chat": true }
|
|
34
|
-
},
|
|
35
|
-
"card_data": {}
|
|
36
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-source-http",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Product Prices",
|
|
5
|
-
"tags": ["data", "linked"],
|
|
6
|
-
"desc": "Fetches pricing for products derived from upstream order data"
|
|
7
|
-
},
|
|
8
|
-
"requires": ["orders"],
|
|
9
|
-
"provides": [{ "bindTo": "prices", "src": "fetched_sources.raw" }],
|
|
10
|
-
"sources": [{
|
|
11
|
-
"bindTo": "raw",
|
|
12
|
-
"outputFile": "card-ex-source-http-raw.json",
|
|
13
|
-
"mock": "prices"
|
|
14
|
-
}],
|
|
15
|
-
"compute": [
|
|
16
|
-
{
|
|
17
|
-
"bindTo": "PRODUCT_LIST",
|
|
18
|
-
"expr": "$join($distinct(requires.orders.product), ',')"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"view": {
|
|
22
|
-
"elements": [
|
|
23
|
-
{ "kind": "table", "data": { "bind": "fetched_sources.raw", "columns": ["product", "price", "currency"], "sortable": true } }
|
|
24
|
-
],
|
|
25
|
-
"layout": { "board": { "col": 6, "order": 2 }, "canvas": { "x": 450, "y": 50, "w": 350, "h": 220 } }
|
|
26
|
-
},
|
|
27
|
-
"card_data": {}
|
|
28
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-source",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Order Data",
|
|
5
|
-
"tags": ["data"],
|
|
6
|
-
"desc": "Root data source — fetches order records via a script"
|
|
7
|
-
},
|
|
8
|
-
"provides": [{ "bindTo": "orders", "src": "fetched_sources.raw" }],
|
|
9
|
-
"sources": [{
|
|
10
|
-
"bindTo": "raw",
|
|
11
|
-
"outputFile": "card-ex-source-raw.json",
|
|
12
|
-
"mock": "orders"
|
|
13
|
-
}],
|
|
14
|
-
"view": {
|
|
15
|
-
"elements": [
|
|
16
|
-
{ "kind": "table", "data": { "bind": "fetched_sources.raw", "columns": ["id", "product", "quantity", "amount", "region"], "maxRows": 10 } }
|
|
17
|
-
],
|
|
18
|
-
"layout": { "board": { "col": 6, "order": 1 }, "canvas": { "x": 50, "y": 50, "w": 350, "h": 220 } }
|
|
19
|
-
},
|
|
20
|
-
"card_data": {}
|
|
21
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-status",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Revenue Health",
|
|
5
|
-
"tags": [],
|
|
6
|
-
"desc": "Status badge with threshold logic — JSONata ternary for green/amber/red"
|
|
7
|
-
},
|
|
8
|
-
"requires": ["orders"],
|
|
9
|
-
"compute": [
|
|
10
|
-
{ "bindTo": "totalRevenue", "expr": "$sum(requires.orders.amount)" },
|
|
11
|
-
{ "bindTo": "orderCount", "expr": "$count(requires.orders)" },
|
|
12
|
-
{
|
|
13
|
-
"bindTo": "health",
|
|
14
|
-
"expr": "computed_values.totalRevenue > 100000 ? { 'label': 'Healthy', 'value': computed_values.totalRevenue, 'orders': computed_values.orderCount } : computed_values.totalRevenue > 50000 ? { 'label': 'Moderate', 'value': computed_values.totalRevenue, 'orders': computed_values.orderCount } : { 'label': 'Low', 'value': computed_values.totalRevenue, 'orders': computed_values.orderCount }"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"view": {
|
|
18
|
-
"elements": [
|
|
19
|
-
{
|
|
20
|
-
"kind": "badge",
|
|
21
|
-
"data": {
|
|
22
|
-
"bind": "computed_values.health.label",
|
|
23
|
-
"colorMap": { "Healthy": "success", "Moderate": "warning", "Low": "danger" }
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"kind": "metric",
|
|
28
|
-
"label": "Revenue",
|
|
29
|
-
"data": { "bind": "computed_values.health.value" }
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
"layout": { "board": { "col": 3, "order": 8 }, "canvas": { "x": 450, "y": 530, "w": 200, "h": 170 } }
|
|
33
|
-
},
|
|
34
|
-
"card_data": {}
|
|
35
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-table",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Order Details",
|
|
5
|
-
"tags": [],
|
|
6
|
-
"desc": "Filtered and sorted table — combines source data with user filter selections"
|
|
7
|
-
},
|
|
8
|
-
"requires": ["orders", "selections"],
|
|
9
|
-
"compute": [
|
|
10
|
-
{
|
|
11
|
-
"bindTo": "filtered",
|
|
12
|
-
"expr": "[$filter(requires.orders, function($v){ ($exists(requires.selections.region) ? $v.region = requires.selections.region : true) and ($exists(requires.selections.product) ? $v.product = requires.selections.product : true) })^(>amount)#$i[$i<20]]"
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"view": {
|
|
16
|
-
"elements": [
|
|
17
|
-
{
|
|
18
|
-
"kind": "table",
|
|
19
|
-
"data": {
|
|
20
|
-
"bind": "computed_values.filtered",
|
|
21
|
-
"columns": ["id", "product", "quantity", "amount", "region"],
|
|
22
|
-
"sortable": true,
|
|
23
|
-
"maxRows": 20
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"layout": { "board": { "col": 8, "order": 7 }, "canvas": { "x": 50, "y": 800, "w": 500, "h": 250 } }
|
|
28
|
-
},
|
|
29
|
-
"card_data": {}
|
|
30
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "card-ex-todo",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Action Items",
|
|
5
|
-
"tags": [],
|
|
6
|
-
"desc": "Interactive todo list — persistent user input via writeTo"
|
|
7
|
-
},
|
|
8
|
-
"view": {
|
|
9
|
-
"elements": [
|
|
10
|
-
{
|
|
11
|
-
"kind": "todo",
|
|
12
|
-
"label": "Tasks",
|
|
13
|
-
"data": {
|
|
14
|
-
"bind": "card_data.items",
|
|
15
|
-
"writeTo": "card_data.items",
|
|
16
|
-
"placeholder": "No tasks yet — add one above"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
"layout": { "board": { "col": 4, "order": 11 }, "canvas": { "x": 700, "y": 320, "w": 260, "h": 180 } }
|
|
21
|
-
},
|
|
22
|
-
"card_data": {
|
|
23
|
-
"items": [
|
|
24
|
-
{ "text": "Set up task-executor for your data sources", "done": false },
|
|
25
|
-
{ "text": "Configure board.yaml connections", "done": false },
|
|
26
|
-
{ "text": "Run board-live-cards-cli init", "done": false }
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"orders": [
|
|
3
|
-
{ "id": "ORD-1001", "product": "Widget A", "quantity": 3, "amount": 12400, "region": "North" },
|
|
4
|
-
{ "id": "ORD-1002", "product": "Widget B", "quantity": 2, "amount": 8700, "region": "South" },
|
|
5
|
-
{ "id": "ORD-1003", "product": "Widget A", "quantity": 4, "amount": 15200, "region": "East" },
|
|
6
|
-
{ "id": "ORD-1004", "product": "Widget C", "quantity": 1, "amount": 6300, "region": "West" },
|
|
7
|
-
{ "id": "ORD-1005", "product": "Widget B", "quantity": 2, "amount": 9100, "region": "North" },
|
|
8
|
-
{ "id": "ORD-1006", "product": "Widget C", "quantity": 3, "amount": 9800, "region": "South" }
|
|
9
|
-
],
|
|
10
|
-
"prices": [
|
|
11
|
-
{ "product": "Widget A", "price": 4133.33, "currency": "USD" },
|
|
12
|
-
{ "product": "Widget B", "price": 4450.0, "currency": "USD" },
|
|
13
|
-
{ "product": "Widget C", "price": 3266.67, "currency": "USD" }
|
|
14
|
-
]
|
|
15
|
-
}
|