forest-cli 5.24.4 → 5.25.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 (66) hide show
  1. package/dist/services/dumpers/agent-nodejs.d.ts.map +1 -1
  2. package/dist/services/dumpers/agent-nodejs.js +11 -4
  3. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/back.hbs +1 -0
  4. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/back.js +154 -0
  5. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/component.js +154 -0
  6. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/data-map.css +416 -0
  7. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/data-map.hbs +99 -0
  8. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/data-map.js +243 -0
  9. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/demo-guide.css +278 -0
  10. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/demo-guide.hbs +38 -0
  11. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/demo-guide.js +353 -0
  12. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-activity.js +124 -0
  13. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-agent.js +124 -0
  14. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-ai.js +124 -0
  15. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-charts.js +124 -0
  16. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-collections.js +124 -0
  17. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-custom-components.js +124 -0
  18. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-inboxes.js +124 -0
  19. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-roles.js +124 -0
  20. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-segments.js +124 -0
  21. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-smart-actions.js +124 -0
  22. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-workflows.js +124 -0
  23. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-workspaces.js +124 -0
  24. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature.css +1109 -0
  25. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature.hbs +286 -0
  26. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/go-to.hbs +4 -0
  27. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/go-to.js +217 -0
  28. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/kyc-flow.css +580 -0
  29. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/kyc-flow.hbs +80 -0
  30. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/kyc-flow.js +49 -0
  31. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/run-action.hbs +3 -0
  32. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/run-action.js +96 -0
  33. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/select-first.css +131 -0
  34. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/select-first.hbs +4 -0
  35. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/select-first.js +205 -0
  36. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/senior-guide.hbs +39 -0
  37. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/senior-guide.js +189 -0
  38. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/style.css +372 -0
  39. package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/template.hbs +83 -0
  40. package/dist/services/dumpers/templates/agent-nodejs/common/forest-layout.json +52897 -8498
  41. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/203696b1-e9ca-45f3-9bd3-5bc6fb4fd8c3.bpmn +161 -0
  42. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/2bc0c0ff-486c-44b1-ae31-3de204f7b14f.bpmn +107 -0
  43. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/4b37a274-117f-4c2d-96ad-21d1be4d0bc7.bpmn +159 -0
  44. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/56ff9484-8308-4971-9e02-3de5eea2e240.bpmn +67 -0
  45. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/619e3e88-4a9c-4f02-84fb-732c16f9b5bf.bpmn +43 -0
  46. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/76516b9e-aac0-4f7b-9794-8f86c529531b.bpmn +75 -0
  47. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/86b4fc1e-b10a-4906-9fd1-e601eaad83c0.bpmn +81 -0
  48. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/92b119e5-c908-48d1-9a0d-23173c57bd5b.bpmn +47 -0
  49. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/92c02240-9c8a-49e7-9993-077af3e1ddcc.bpmn +77 -0
  50. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/aac25aee-f626-40a8-9459-d2a933fb8446.bpmn +105 -0
  51. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/b269dbff-5fde-401f-a05b-76a7dac79387.bpmn +75 -0
  52. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/d8b208a9-fc71-4005-acb9-ba5fedd2499f.bpmn +73 -0
  53. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/e3abab67-7bc6-4a44-9848-c7f83a55a56d.bpmn +71 -0
  54. package/dist/services/dumpers/templates/agent-nodejs/javascript/index.hbs +45 -4
  55. package/dist/services/dumpers/templates/agent-nodejs/typescript/index.hbs +45 -4
  56. package/oclif.manifest.json +376 -376
  57. package/package.json +6 -2
  58. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/30d581e3-294e-4790-b723-0f16509ecae0.bpmn +0 -2
  59. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/52e0acb4-6064-472a-9823-cdfd7fa7a3ab.bpmn +0 -2
  60. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/71f692b4-fe4f-476d-8251-fdc5af1ec51e.bpmn +0 -2
  61. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/9d564d80-19d1-4ce4-bb4b-aaf41e7ef5b6.bpmn +0 -2
  62. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/c8ab4b5d-20df-4d28-9160-0d4376282c90.bpmn +0 -2
  63. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/d0289f67-2c9e-4c69-b1ee-ecbbace841b3.bpmn +0 -2
  64. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/d07aa5ee-9a49-4916-a1b5-1f953bfe9a8e.bpmn +0 -2
  65. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/e25c6237-b882-498b-9655-b16b30131b10.bpmn +0 -2
  66. package/dist/services/dumpers/templates/agent-nodejs/common/workflows/f01b9e61-4156-47b8-b6a1-5c90adbcd2ba.bpmn +0 -2
@@ -0,0 +1,243 @@
1
+ /* eslint-disable import/no-unresolved -- runs inside the Forest app, which provides these */
2
+ /* eslint-env browser */
3
+ /**
4
+ * Data map: a workspace Custom component that shows the bank's data model to a demo visitor, by
5
+ * domain: what each table holds, how the tables link, which Smart Actions run on them, and how
6
+ * many rows they have. Everything comes from the agent's API chart `data_map` (data-map.js), read
7
+ * live from the agent's own schema. Click a domain, then a table; its links jump to the linked
8
+ * table, and "Open in Forest" opens its list. Generated as hub/data-map.{hbs,js,css}.
9
+ */
10
+ import { action } from '@ember/object';
11
+ import { inject as service } from '@ember/service';
12
+ import { htmlSafe } from '@ember/template';
13
+ import Component from '@glimmer/component';
14
+ import { tracked } from '@glimmer/tracking';
15
+
16
+ const REFRESH_MS = 60 * 1000;
17
+ // Forest's grid cell, in px (WORKSPACE_GRID_CELL_WIDTH and _HEIGHT).
18
+ const CELL = 20;
19
+ const EM_TALL = 52;
20
+ const EM_WIDE = 96;
21
+ // The domain map's drawing box (an SVG viewBox), and a table's box in it.
22
+ const MAP = { width: 1000, height: 250, nodeHeight: 34 };
23
+ // A table's box fits its name: about 7.6 drawing units a character at 13, plus margins.
24
+ const nodeWidthOf = label => Math.max(100, Math.round(label.length * 7.6 + 26));
25
+ const TYPES = {
26
+ String: 'text',
27
+ Number: 'number',
28
+ Boolean: 'yes / no',
29
+ Date: 'date',
30
+ Dateonly: 'date',
31
+ Enum: 'list',
32
+ Uuid: 'id',
33
+ Json: 'data',
34
+ Point: 'place',
35
+ };
36
+
37
+ const number = n => (n === null || n === undefined ? '—' : Number(n).toLocaleString('en-GB'));
38
+ const plural = (n, word) => `${n} ${word}${n === 1 ? '' : 's'}`;
39
+
40
+ export default class DataMap extends Component {
41
+ @service lianaServerFetch;
42
+
43
+ @service router;
44
+
45
+ @tracked map = null;
46
+
47
+ @tracked failed = false;
48
+
49
+ @tracked domainIndex = 0;
50
+
51
+ @tracked tableName = null;
52
+
53
+ constructor(owner, args) {
54
+ super(owner, args);
55
+ this.timer = window.setInterval(() => this.load(), REFRESH_MS);
56
+ this.load();
57
+ }
58
+
59
+ willDestroy(...args) {
60
+ super.willDestroy?.(...args);
61
+ window.clearInterval(this.timer);
62
+ }
63
+
64
+ async load() {
65
+ try {
66
+ const response = await this.lianaServerFetch.fetch('/forest/_charts/data_map', {});
67
+ if (!response.ok) throw new Error(`agent answered ${response.status}`);
68
+ this.map = await response.json();
69
+ this.failed = false;
70
+ } catch (error) {
71
+ this.failed = true;
72
+ }
73
+ }
74
+
75
+ get stats() {
76
+ const s = this.map?.stats;
77
+ if (!s) return [];
78
+
79
+ return [
80
+ [s.domains, 'domains'],
81
+ [s.tables, 'tables'],
82
+ [s.links, 'links between them'],
83
+ [s.actions, 'Smart Actions'],
84
+ [number(s.rows), 'rows, live'],
85
+ ].map(([value, label]) => ({ value, label }));
86
+ }
87
+
88
+ get domains() {
89
+ return (this.map?.domains || []).map((d, i) => {
90
+ const actions = d.tables.reduce((n, t) => n + t.actions.length, 0);
91
+
92
+ return {
93
+ ...d,
94
+ index: i,
95
+ className: i === this.domainIndex ? 'dm-domain dm-domain--on' : 'dm-domain',
96
+ meta: `${plural(d.tables.filter(t => !t.hidden).length, 'table')}${
97
+ actions ? ` · ⚡ ${actions}` : ''
98
+ }`,
99
+ };
100
+ });
101
+ }
102
+
103
+ get domain() {
104
+ return this.domains[this.domainIndex] || null;
105
+ }
106
+
107
+ get cards() {
108
+ return (this.domain?.tables || []).map(t => ({
109
+ ...t,
110
+ className: t.hidden ? 'dm-card dm-card--link' : 'dm-card',
111
+ rowsText: `${number(t.rows)} rows`,
112
+ meta: [
113
+ plural(t.fields.length + t.computed.length, 'field'),
114
+ plural(t.belongsTo.length + t.hasMany.length, 'link'),
115
+ t.actions.length ? `⚡ ${plural(t.actions.length, 'action')}` : null,
116
+ ]
117
+ .filter(Boolean)
118
+ .join(' · '),
119
+ }));
120
+ }
121
+
122
+ /** The domain's tables on an ellipse, and a line for each link between two of them. */
123
+ get mapView() {
124
+ const tables = (this.domain?.tables || []).filter(t => !t.hidden);
125
+ const { width, height, nodeHeight } = MAP;
126
+ const n = tables.length;
127
+ // The ellipse leaves room for the widest box.
128
+ const nodeWidth = Math.max(100, ...tables.map(t => nodeWidthOf(t.label)));
129
+ const at = {};
130
+ tables.forEach((t, i) => {
131
+ const angle = n === 1 ? 0 : (2 * Math.PI * i) / n - Math.PI / 2;
132
+ const rx = n === 1 ? 0 : (width - nodeWidth) / 2 - 6;
133
+ const ry = n === 1 ? 0 : (height - nodeHeight) / 2 - 6;
134
+ at[t.name] = { x: width / 2 + rx * Math.cos(angle), y: height / 2 + ry * Math.sin(angle) };
135
+ });
136
+ const seen = new Set();
137
+ const lines = [];
138
+
139
+ const draw = (a, b) => {
140
+ const pair = [a, b].sort().join('|');
141
+ if (!at[a] || !at[b] || a === b || seen.has(pair)) return;
142
+ seen.add(pair);
143
+ lines.push({ x1: at[a].x, y1: at[a].y, x2: at[b].x, y2: at[b].y });
144
+ };
145
+
146
+ (this.domain?.tables || []).forEach(t => {
147
+ if (at[t.name]) {
148
+ t.belongsTo.forEach(link => draw(t.name, link.table));
149
+ } else {
150
+ // A link table (not drawn) joins the tables it points to: draw a line between them.
151
+ const ends = t.belongsTo.map(link => link.table).filter(name => at[name]);
152
+ ends.forEach((a, i) => ends.slice(i + 1).forEach(b => draw(a, b)));
153
+ }
154
+ });
155
+ const outside = new Set();
156
+ (this.domain?.tables || []).forEach(t =>
157
+ [...t.belongsTo, ...t.hasMany].forEach(link => {
158
+ if (!(this.domain.tables || []).some(x => x.name === link.table)) outside.add(link.table);
159
+ }),
160
+ );
161
+
162
+ return {
163
+ viewBox: `0 0 ${width} ${height}`,
164
+ lines,
165
+ nodes: tables.map(t => ({
166
+ name: t.name,
167
+ label: t.label,
168
+ x: at[t.name].x - nodeWidthOf(t.label) / 2,
169
+ y: at[t.name].y - nodeHeight / 2,
170
+ tx: at[t.name].x,
171
+ ty: at[t.name].y + 5,
172
+ width: nodeWidthOf(t.label),
173
+ height: nodeHeight,
174
+ className: t.name === this.tableName ? 'dm-node dm-node--on' : 'dm-node',
175
+ })),
176
+ outside: outside.size,
177
+ };
178
+ }
179
+
180
+ get table() {
181
+ const t = (this.domain?.tables || []).find(x => x.name === this.tableName);
182
+ if (!t) return null;
183
+ const link = l => ({ ...l, label: this.labelOf(l.table) });
184
+
185
+ return {
186
+ ...t,
187
+ rowsText: number(t.rows),
188
+ fields: t.fields.map(f => ({ ...f, typeText: f.key ? 'key' : TYPES[f.type] || f.type })),
189
+ computed: t.computed.map(f => ({ ...f, typeText: TYPES[f.type] || f.type })),
190
+ belongsTo: t.belongsTo.map(link),
191
+ hasMany: t.hasMany.map(link),
192
+ };
193
+ }
194
+
195
+ labelOf(name) {
196
+ const t = (this.map?.domains || []).flatMap(d => d.tables).find(x => x.name === name);
197
+
198
+ return t?.label || name;
199
+ }
200
+
201
+ @action
202
+ pickDomain(index) {
203
+ this.domainIndex = index;
204
+ this.tableName = null;
205
+ }
206
+
207
+ @action
208
+ pickTable(name) {
209
+ const index = (this.map?.domains || []).findIndex(d => d.tables.some(t => t.name === name));
210
+ if (index < 0) return;
211
+ this.domainIndex = index;
212
+ this.tableName = name;
213
+ }
214
+
215
+ @action
216
+ closeTable() {
217
+ this.tableName = null;
218
+ }
219
+
220
+ /** The table's list in Forest: /<project>/<environment>/<team>/data/<table>/index. */
221
+ @action
222
+ openInForest(name) {
223
+ const [project, environment, team] = window.location.pathname.split('/').filter(Boolean);
224
+ const path = `/${project}/${environment}/${team}/data/${name}/index`;
225
+
226
+ try {
227
+ const transition = this.router.transitionTo(path);
228
+ transition?.catch?.(error => {
229
+ if (error?.name !== 'TransitionAborted') window.location.assign(path);
230
+ });
231
+ } catch (error) {
232
+ window.location.assign(path);
233
+ }
234
+ }
235
+
236
+ get rootStyle() {
237
+ const box = this.args.component?.displaySettings;
238
+ if (!box?.width || !box?.height) return null;
239
+ const size = Math.min((box.height * CELL) / EM_TALL, (box.width * CELL) / EM_WIDE);
240
+
241
+ return htmlSafe(`font-size:${Math.round(Math.max(11, Math.min(26, size)))}px`);
242
+ }
243
+ }
@@ -0,0 +1,278 @@
1
+ /* Demo guide (demo-guide.js), in Forest's brand. Forest adds this file to the page as a global
2
+ style element: every class starts with dg. Sizes are in em of the root, whose font size the
3
+ component sets from its box. */
4
+ .dg {
5
+ --dg-dark: #262d1e;
6
+ --dg-green: #3f5b1e;
7
+ --dg-pop: #ddf327;
8
+ --dg-tint: #f2f8d4;
9
+ --dg-zone: #ece9e0;
10
+ --dg-label: #686c62;
11
+ --dg-clay: #b5482e;
12
+
13
+ box-sizing: border-box;
14
+ height: 100%;
15
+ overflow: hidden;
16
+ padding: 0.9em 1em;
17
+ border-radius: 12px;
18
+ background: #ffffff;
19
+ color: var(--dg-dark);
20
+ font-family: Matter, Inter, system-ui, sans-serif;
21
+ font-size: 16px;
22
+ line-height: 1.3;
23
+ }
24
+
25
+ .dg * {
26
+ box-sizing: border-box;
27
+ margin: 0;
28
+ padding: 0;
29
+ }
30
+
31
+ .dg .dg-head {
32
+ display: flex;
33
+ align-items: center;
34
+ gap: 0.6em;
35
+ }
36
+
37
+ .dg .dg-badge {
38
+ display: inline-block;
39
+ padding: 0.2em 0.6em;
40
+ border-radius: 999px;
41
+ background: var(--dg-pop);
42
+ color: var(--dg-dark);
43
+ font-size: 0.75em;
44
+ font-weight: 700;
45
+ letter-spacing: 0.06em;
46
+ text-transform: uppercase;
47
+ }
48
+
49
+ .dg .dg-ref {
50
+ color: var(--dg-label);
51
+ font-size: 0.8em;
52
+ font-weight: 600;
53
+ }
54
+
55
+ .dg .dg-title {
56
+ margin-top: 0.35em;
57
+ font-size: 1.35em;
58
+ font-weight: 800;
59
+ line-height: 1.15;
60
+ }
61
+
62
+ .dg .dg-intro {
63
+ margin-top: 0.4em;
64
+ color: var(--dg-label);
65
+ font-size: 0.85em;
66
+ }
67
+
68
+ .dg .dg-steps {
69
+ margin-top: 0.8em;
70
+ list-style: none;
71
+ }
72
+
73
+ .dg .dg-step {
74
+ display: flex;
75
+ gap: 0.7em;
76
+ align-items: flex-start;
77
+ margin-top: 0.35em;
78
+ padding: 0.45em 0.6em;
79
+ border-left: 0.25em solid transparent;
80
+ border-radius: 8px;
81
+ }
82
+
83
+ .dg .dg-mark {
84
+ display: inline-flex;
85
+ flex: none;
86
+ align-items: center;
87
+ justify-content: center;
88
+ width: 1.6em;
89
+ height: 1.6em;
90
+ border: 2px solid var(--dg-zone);
91
+ border-radius: 50%;
92
+ color: var(--dg-label);
93
+ font-size: 0.85em;
94
+ font-weight: 700;
95
+ }
96
+
97
+ .dg .dg-body {
98
+ display: flex;
99
+ flex-direction: column;
100
+ gap: 0.1em;
101
+ }
102
+
103
+ .dg .dg-step-title {
104
+ font-weight: 700;
105
+ }
106
+
107
+ .dg .dg-detail {
108
+ color: var(--dg-label);
109
+ font-size: 0.8em;
110
+ }
111
+
112
+ .dg .dg-warn {
113
+ margin-top: 0.2em;
114
+ color: var(--dg-clay);
115
+ font-size: 0.8em;
116
+ font-weight: 600;
117
+ }
118
+
119
+ /* Done: a dark disc with a lime tick, the text calmer. */
120
+ .dg .dg-step--done .dg-mark {
121
+ border-color: var(--dg-dark);
122
+ background: var(--dg-dark);
123
+ color: var(--dg-pop);
124
+ }
125
+
126
+ .dg .dg-step--done .dg-step-title {
127
+ color: var(--dg-green);
128
+ }
129
+
130
+ /* Current: the one to do now. */
131
+ .dg .dg-step--current {
132
+ border-left-color: var(--dg-pop);
133
+ background: var(--dg-tint);
134
+ }
135
+
136
+ .dg .dg-step--current .dg-mark {
137
+ border-color: var(--dg-green);
138
+ color: var(--dg-green);
139
+ }
140
+
141
+ .dg .dg-step--todo {
142
+ opacity: 0.55;
143
+ }
144
+
145
+ .dg .dg-btn {
146
+ align-self: flex-start;
147
+ margin-top: 0.45em;
148
+ padding: 0.45em 1em;
149
+ border: 0;
150
+ border-radius: 8px;
151
+ background: var(--dg-dark);
152
+ color: var(--dg-pop);
153
+ font: inherit;
154
+ font-size: 0.9em;
155
+ font-weight: 700;
156
+ cursor: pointer;
157
+ }
158
+
159
+ .dg .dg-btn:hover {
160
+ background: var(--dg-green);
161
+ color: #ffffff;
162
+ }
163
+
164
+ .dg .dg-btn[disabled] {
165
+ cursor: progress;
166
+ opacity: 0.6;
167
+ }
168
+
169
+ .dg .dg-end {
170
+ display: flex;
171
+ flex-direction: column;
172
+ gap: 0.2em;
173
+ margin-top: 0.8em;
174
+ padding: 0.7em 0.9em;
175
+ border-radius: 10px;
176
+ background: var(--dg-dark);
177
+ color: var(--dg-pop);
178
+ }
179
+
180
+ .dg .dg-end-title {
181
+ font-size: 1.1em;
182
+ font-weight: 800;
183
+ }
184
+
185
+ .dg .dg-end-text {
186
+ color: #ffffff;
187
+ font-size: 0.9em;
188
+ }
189
+
190
+ .dg .dg-failed {
191
+ margin-top: 0.6em;
192
+ color: var(--dg-clay);
193
+ font-size: 0.75em;
194
+ }
195
+
196
+ .dg .dg-empty {
197
+ display: flex;
198
+ flex-direction: column;
199
+ gap: 0.6em;
200
+ align-items: flex-start;
201
+ padding-top: 0.4em;
202
+ color: var(--dg-label);
203
+ font-size: 1.05em;
204
+ }
205
+
206
+ /* The senior's guide (senior-guide.js): the how-to steps stay readable, then the queue's cases. */
207
+ .dg .dg-step--how {
208
+ opacity: 1;
209
+ }
210
+
211
+ .dg .dg-queue-title {
212
+ margin-top: 0.9em;
213
+ font-size: 1.05em;
214
+ font-weight: 800;
215
+ }
216
+
217
+ .dg .dg-queue {
218
+ margin-top: 0.3em;
219
+ list-style: none;
220
+ }
221
+
222
+ .dg .dg-case {
223
+ display: flex;
224
+ flex-direction: column;
225
+ gap: 0.15em;
226
+ margin-top: 0.35em;
227
+ padding: 0.5em 0.7em;
228
+ border-left: 0.25em solid var(--dg-zone);
229
+ border-radius: 8px;
230
+ background: #faf9f5;
231
+ }
232
+
233
+ .dg .dg-case--waiting {
234
+ border-left-color: var(--dg-pop);
235
+ background: var(--dg-tint);
236
+ }
237
+
238
+ .dg .dg-case--decided {
239
+ border-left-color: var(--dg-dark);
240
+ }
241
+
242
+ .dg .dg-case--later {
243
+ opacity: 0.6;
244
+ }
245
+
246
+ .dg .dg-case-head {
247
+ display: flex;
248
+ align-items: center;
249
+ justify-content: space-between;
250
+ gap: 0.6em;
251
+ }
252
+
253
+ .dg .dg-case-ref {
254
+ font-weight: 700;
255
+ }
256
+
257
+ .dg .dg-chip {
258
+ padding: 0.15em 0.6em;
259
+ border-radius: 999px;
260
+ font-size: 0.75em;
261
+ font-weight: 700;
262
+ white-space: nowrap;
263
+ }
264
+
265
+ .dg .dg-chip--waiting {
266
+ background: var(--dg-pop);
267
+ color: var(--dg-dark);
268
+ }
269
+
270
+ .dg .dg-chip--later {
271
+ background: var(--dg-zone);
272
+ color: var(--dg-label);
273
+ }
274
+
275
+ .dg .dg-chip--decided {
276
+ background: var(--dg-dark);
277
+ color: var(--dg-pop);
278
+ }
@@ -0,0 +1,38 @@
1
+ <div class="dg" style={{this.rootStyle}}>
2
+ {{#if this.guide}}
3
+ <div class="dg-head">
4
+ <span class="dg-badge">{{this.guide.badge}}</span>
5
+ <span class="dg-ref">{{this.reference}}</span>
6
+ </div>
7
+ <div class="dg-title">{{this.guide.title}}</div>
8
+ <p class="dg-intro">{{this.guide.intro}}</p>
9
+ <ol class="dg-steps">
10
+ {{#each this.steps as |step|}}
11
+ <li class={{step.className}}>
12
+ <span class="dg-mark">{{step.mark}}</span>
13
+ <span class="dg-body">
14
+ <span class="dg-step-title">{{step.title}}</span>
15
+ <span class="dg-detail">{{step.detail}}</span>
16
+ {{#if step.warn}}<span class="dg-warn">{{step.warn}}</span>{{/if}}
17
+ {{#if step.button}}
18
+ <button type="button" class="dg-btn" disabled={{this.starting}} {{on "click" this.startWorkflow}}>{{if this.starting this.startLabel step.button}}</button>
19
+ {{/if}}
20
+ </span>
21
+ </li>
22
+ {{/each}}
23
+ </ol>
24
+ {{#if this.end}}
25
+ <div class="dg-end">
26
+ <span class="dg-end-title">{{this.end.title}}</span>
27
+ <span class="dg-end-text">{{this.end.text}}</span>
28
+ </div>
29
+ {{/if}}
30
+ {{#if this.workflowNote}}<p class="dg-failed">{{this.workflowNote}}</p>{{/if}}
31
+ {{#if this.failed}}<p class="dg-failed">The agent does not answer: are the ticks late? Is it running?</p>{{/if}}
32
+ {{else}}
33
+ <div class="dg-empty">
34
+ <span class="dg-badge">Guide</span>
35
+ <p>{{this.empty}}</p>
36
+ </div>
37
+ {{/if}}
38
+ </div>