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.
- package/dist/services/dumpers/agent-nodejs.d.ts.map +1 -1
- package/dist/services/dumpers/agent-nodejs.js +11 -4
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/back.hbs +1 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/back.js +154 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/component.js +154 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/data-map.css +416 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/data-map.hbs +99 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/data-map.js +243 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/demo-guide.css +278 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/demo-guide.hbs +38 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/demo-guide.js +353 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-activity.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-agent.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-ai.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-charts.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-collections.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-custom-components.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-inboxes.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-roles.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-segments.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-smart-actions.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-workflows.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature-workspaces.js +124 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature.css +1109 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/feature.hbs +286 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/go-to.hbs +4 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/go-to.js +217 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/kyc-flow.css +580 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/kyc-flow.hbs +80 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/kyc-flow.js +49 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/run-action.hbs +3 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/run-action.js +96 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/select-first.css +131 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/select-first.hbs +4 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/select-first.js +205 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/senior-guide.hbs +39 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/senior-guide.js +189 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/style.css +372 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/components/hub/template.hbs +83 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/forest-layout.json +52897 -8498
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/203696b1-e9ca-45f3-9bd3-5bc6fb4fd8c3.bpmn +161 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/2bc0c0ff-486c-44b1-ae31-3de204f7b14f.bpmn +107 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/4b37a274-117f-4c2d-96ad-21d1be4d0bc7.bpmn +159 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/56ff9484-8308-4971-9e02-3de5eea2e240.bpmn +67 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/619e3e88-4a9c-4f02-84fb-732c16f9b5bf.bpmn +43 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/76516b9e-aac0-4f7b-9794-8f86c529531b.bpmn +75 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/86b4fc1e-b10a-4906-9fd1-e601eaad83c0.bpmn +81 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/92b119e5-c908-48d1-9a0d-23173c57bd5b.bpmn +47 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/92c02240-9c8a-49e7-9993-077af3e1ddcc.bpmn +77 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/aac25aee-f626-40a8-9459-d2a933fb8446.bpmn +105 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/b269dbff-5fde-401f-a05b-76a7dac79387.bpmn +75 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/d8b208a9-fc71-4005-acb9-ba5fedd2499f.bpmn +73 -0
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/e3abab67-7bc6-4a44-9848-c7f83a55a56d.bpmn +71 -0
- package/dist/services/dumpers/templates/agent-nodejs/javascript/index.hbs +45 -4
- package/dist/services/dumpers/templates/agent-nodejs/typescript/index.hbs +45 -4
- package/oclif.manifest.json +376 -376
- package/package.json +6 -2
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/30d581e3-294e-4790-b723-0f16509ecae0.bpmn +0 -2
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/52e0acb4-6064-472a-9823-cdfd7fa7a3ab.bpmn +0 -2
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/71f692b4-fe4f-476d-8251-fdc5af1ec51e.bpmn +0 -2
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/9d564d80-19d1-4ce4-bb4b-aaf41e7ef5b6.bpmn +0 -2
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/c8ab4b5d-20df-4d28-9160-0d4376282c90.bpmn +0 -2
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/d0289f67-2c9e-4c69-b1ee-ecbbace841b3.bpmn +0 -2
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/d07aa5ee-9a49-4916-a1b5-1f953bfe9a8e.bpmn +0 -2
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/e25c6237-b882-498b-9655-b16b30131b10.bpmn +0 -2
- package/dist/services/dumpers/templates/agent-nodejs/common/workflows/f01b9e61-4156-47b8-b6a1-5c90adbcd2ba.bpmn +0 -2
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/* eslint-disable import/no-unresolved -- runs inside the Forest app, which provides these */
|
|
2
|
+
/* eslint-env browser */
|
|
3
|
+
/**
|
|
4
|
+
* Senior guide: a workspace Custom component for the senior officer's desk. It explains the
|
|
5
|
+
* "Senior sign-off" queue and follows the demo cases in it (KYC-DEMO-0003, -0004, then -0002 once
|
|
6
|
+
* sent from the KYC Case desk): each one waiting, decided, or not sent yet, read every POLL_MS from
|
|
7
|
+
* the agent's API chart `demo_guide?desk=senior`. Styled by demo-guide.css.
|
|
8
|
+
*
|
|
9
|
+
* Its three how-to steps tick themselves: a case taken (the desk's inbox, `?inbox=`, default
|
|
10
|
+
* SeniorInbox, has a record picked), Senior review running on it (Forest's workflow service), then
|
|
11
|
+
* Next ticket in the inbox banner (a second case decided).
|
|
12
|
+
*/
|
|
13
|
+
import { inject as service } from '@ember/service';
|
|
14
|
+
import { htmlSafe } from '@ember/template';
|
|
15
|
+
import Component from '@glimmer/component';
|
|
16
|
+
import { tracked } from '@glimmer/tracking';
|
|
17
|
+
|
|
18
|
+
const POLL_MS = 2000;
|
|
19
|
+
// Forest's grid cell, in px (WORKSPACE_GRID_CELL_WIDTH and _HEIGHT).
|
|
20
|
+
const CELL = 20;
|
|
21
|
+
// The guide's content is about this many lines of its base size tall, and this many wide.
|
|
22
|
+
const EM_TALL = 40;
|
|
23
|
+
const EM_WIDE = 32;
|
|
24
|
+
|
|
25
|
+
// Forest's own inbox banner, once a review is done.
|
|
26
|
+
const NEXT_TICKET_STEP = {
|
|
27
|
+
title: 'Click Next ticket',
|
|
28
|
+
detail: 'When a review ends, the inbox banner offers the next case: click Next ticket.',
|
|
29
|
+
};
|
|
30
|
+
const HOW = [
|
|
31
|
+
{
|
|
32
|
+
title: 'Click Start processing',
|
|
33
|
+
detail: 'The inbox hands you the oldest request first, and keeps it yours while you work.',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: 'Run ▶ Senior review',
|
|
37
|
+
detail:
|
|
38
|
+
'Read the risk, say why in one or two sentences, then approve, ask for a proof of funds, or reject.',
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
const WORKFLOW = 'Senior review';
|
|
43
|
+
const listOf = rows => (rows?.toArray ? rows.toArray() : Array.from(rows || []));
|
|
44
|
+
|
|
45
|
+
const STATES = {
|
|
46
|
+
waiting: ['Waiting', 'dg-chip dg-chip--waiting'],
|
|
47
|
+
later: ['Not sent yet', 'dg-chip dg-chip--later'],
|
|
48
|
+
decided: [null, 'dg-chip dg-chip--decided'],
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default class SeniorGuide extends Component {
|
|
52
|
+
@service lianaServerFetch;
|
|
53
|
+
|
|
54
|
+
@service store;
|
|
55
|
+
|
|
56
|
+
@service('feature/workflow') workflowFeature;
|
|
57
|
+
|
|
58
|
+
@tracked taken = false;
|
|
59
|
+
|
|
60
|
+
@tracked reviewing = false;
|
|
61
|
+
|
|
62
|
+
@tracked facts = null;
|
|
63
|
+
|
|
64
|
+
@tracked failed = false;
|
|
65
|
+
|
|
66
|
+
constructor(owner, args) {
|
|
67
|
+
super(owner, args);
|
|
68
|
+
this.timer = window.setInterval(() => this.refresh(), POLL_MS);
|
|
69
|
+
this.refresh();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
willDestroy(...args) {
|
|
73
|
+
super.willDestroy?.(...args);
|
|
74
|
+
window.clearInterval(this.timer);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async refresh() {
|
|
78
|
+
this.readDesk();
|
|
79
|
+
|
|
80
|
+
try {
|
|
81
|
+
const response = await this.lianaServerFetch.fetch(
|
|
82
|
+
'/forest/_charts/demo_guide?desk=senior',
|
|
83
|
+
{},
|
|
84
|
+
);
|
|
85
|
+
if (!response.ok) throw new Error(`agent answered ${response.status}`);
|
|
86
|
+
this.facts = await response.json();
|
|
87
|
+
this.failed = false;
|
|
88
|
+
} catch (error) {
|
|
89
|
+
this.failed = true;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** The case taken from the inbox, and Senior review running on it. */
|
|
94
|
+
async readDesk() {
|
|
95
|
+
const inbox = this.args.component?.getWorkspaceComponentFromName?.(
|
|
96
|
+
this.params.get('inbox') || 'SeniorInbox',
|
|
97
|
+
);
|
|
98
|
+
const record = inbox?.selectedRecord || null;
|
|
99
|
+
this.taken = Boolean(record);
|
|
100
|
+
|
|
101
|
+
if (!record) {
|
|
102
|
+
this.reviewing = false;
|
|
103
|
+
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
try {
|
|
108
|
+
const collection = listOf(this.store.peekAll('collection')).find(c => c.name === 'kyc_cases');
|
|
109
|
+
const workflow = listOf(collection?.workflows).find(w => w.name === WORKFLOW);
|
|
110
|
+
const runs = await this.workflowFeature.getStartedWorkflowRunsForRecord(
|
|
111
|
+
collection.id,
|
|
112
|
+
record.id,
|
|
113
|
+
);
|
|
114
|
+
this.reviewing = listOf(runs).some(r => String(r.workflowId) === String(workflow?.id));
|
|
115
|
+
} catch (error) {
|
|
116
|
+
this.reviewing = false;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
get params() {
|
|
121
|
+
const url = this.args.component?.options?.componentUrl || '';
|
|
122
|
+
|
|
123
|
+
return new URLSearchParams(url.split('?')[1] || '');
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** The how-to, each step done or not, the first open one marked as the current one. */
|
|
127
|
+
get how() {
|
|
128
|
+
const decided = Boolean(this.facts?.decided);
|
|
129
|
+
const steps = [...HOW, NEXT_TICKET_STEP];
|
|
130
|
+
const done = [this.taken || decided, this.reviewing || decided, (this.facts?.decided || 0) > 1];
|
|
131
|
+
const current = done.indexOf(false);
|
|
132
|
+
|
|
133
|
+
return steps.map((step, i) => {
|
|
134
|
+
let state = 'todo';
|
|
135
|
+
if (done[i]) state = 'done';
|
|
136
|
+
else if (i === current) state = 'current';
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
...step,
|
|
140
|
+
className: `dg-step dg-step--${state}`,
|
|
141
|
+
mark: done[i] ? '\u2713' : String(i + 1),
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
get cases() {
|
|
147
|
+
return (this.facts?.cases || []).map(c => {
|
|
148
|
+
const [label, className] = STATES[c.state] || STATES.later;
|
|
149
|
+
|
|
150
|
+
return {
|
|
151
|
+
...c,
|
|
152
|
+
chip: label || c.outcome,
|
|
153
|
+
chipClass: className,
|
|
154
|
+
rowClass: `dg-case dg-case--${c.state}`,
|
|
155
|
+
later:
|
|
156
|
+
c.state === 'later'
|
|
157
|
+
? 'Do case 2 on the KYC Case desk: its workflow sends it here.'
|
|
158
|
+
: null,
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
get progress() {
|
|
164
|
+
if (!this.facts) return null;
|
|
165
|
+
const total = this.facts.cases?.length || 0;
|
|
166
|
+
|
|
167
|
+
return `${this.facts.decided} of ${total} decided`;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
get end() {
|
|
171
|
+
if (!this.facts?.decided) return null;
|
|
172
|
+
|
|
173
|
+
return {
|
|
174
|
+
title: 'That’s four eyes on a medium risk!',
|
|
175
|
+
text:
|
|
176
|
+
'You’ve seen the whole path, from the first check to the senior’s sign-off. Back to ' +
|
|
177
|
+
'the Hub to explore the other desks.',
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** The base text size, from the box: the whole guide fits its height and its width. */
|
|
182
|
+
get rootStyle() {
|
|
183
|
+
const box = this.args.component?.displaySettings;
|
|
184
|
+
if (!box?.width || !box?.height) return null;
|
|
185
|
+
const size = Math.min((box.height * CELL) / EM_TALL, (box.width * CELL) / EM_WIDE);
|
|
186
|
+
|
|
187
|
+
return htmlSafe(`font-size:${Math.round(Math.max(11, Math.min(30, size)))}px`);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
/* The Hub, in Forest's brand: forest green, dark, chartreuse pop, lime, warm canvas. Every class
|
|
2
|
+
starts with hub- so nothing leaks into the app around it. Laid out in rows, top to bottom: the
|
|
3
|
+
welcome, the tour band, the explore band, the team desks, the features (grids of cards). */
|
|
4
|
+
.hub-page {
|
|
5
|
+
--hub-green: #3f5b1e;
|
|
6
|
+
--hub-dark: #262d1e;
|
|
7
|
+
--hub-darker: #1a2208;
|
|
8
|
+
--hub-pop: #ddf327;
|
|
9
|
+
--hub-soft-lime: #d0ee89;
|
|
10
|
+
--hub-lime: #e3f68b;
|
|
11
|
+
--hub-canvas: #f6f5ee;
|
|
12
|
+
--hub-band: #efede7;
|
|
13
|
+
--hub-zone: #ece9e0;
|
|
14
|
+
--hub-card: #e9e6df;
|
|
15
|
+
--hub-white: #ffffff;
|
|
16
|
+
--hub-label: #686c62;
|
|
17
|
+
--hub-disabled: #d9d9d9;
|
|
18
|
+
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
height: 100%;
|
|
21
|
+
overflow-y: auto;
|
|
22
|
+
padding: 32px;
|
|
23
|
+
background: var(--hub-canvas);
|
|
24
|
+
color: var(--hub-dark);
|
|
25
|
+
font-family: Matter, Inter, system-ui, sans-serif;
|
|
26
|
+
container: hub-page / inline-size;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
gap: 28px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.hub-page *,
|
|
33
|
+
.hub-back {
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.hub-page button {
|
|
38
|
+
font: inherit;
|
|
39
|
+
color: inherit;
|
|
40
|
+
text-align: left;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* 0. Welcome */
|
|
45
|
+
.hub-welcome {
|
|
46
|
+
display: grid;
|
|
47
|
+
grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: 32px;
|
|
50
|
+
background: var(--hub-band);
|
|
51
|
+
border-radius: 16px;
|
|
52
|
+
padding: 28px 32px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Narrow: the title above its text. */
|
|
56
|
+
@container hub-page (max-width: 900px) {
|
|
57
|
+
.hub-welcome {
|
|
58
|
+
grid-template-columns: minmax(0, 1fr);
|
|
59
|
+
gap: 12px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.hub-band {
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
align-items: flex-start;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.hub-eyebrow {
|
|
69
|
+
margin: 0 0 8px;
|
|
70
|
+
font-size: 13px;
|
|
71
|
+
font-weight: 600;
|
|
72
|
+
letter-spacing: 0.06em;
|
|
73
|
+
text-transform: uppercase;
|
|
74
|
+
color: var(--hub-green);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.hub-title {
|
|
78
|
+
margin: 0 0 12px;
|
|
79
|
+
font-size: 32px;
|
|
80
|
+
line-height: 1.15;
|
|
81
|
+
font-weight: 700;
|
|
82
|
+
color: var(--hub-darker);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.hub-lead {
|
|
86
|
+
margin: 0;
|
|
87
|
+
max-width: 760px;
|
|
88
|
+
font-size: 16px;
|
|
89
|
+
line-height: 1.55;
|
|
90
|
+
color: var(--hub-label);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.hub-section {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.hub-h2 {
|
|
99
|
+
margin: 0;
|
|
100
|
+
font-size: 22px;
|
|
101
|
+
font-weight: 700;
|
|
102
|
+
color: var(--hub-darker);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.hub-sub {
|
|
106
|
+
margin: 4px 0 16px;
|
|
107
|
+
font-size: 14px;
|
|
108
|
+
color: var(--hub-label);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* 1. Desks: one big card each, stacked. The name is the card's button, stretched over the whole
|
|
112
|
+
card. */
|
|
113
|
+
.hub-desks {
|
|
114
|
+
display: grid;
|
|
115
|
+
grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
|
|
116
|
+
gap: 12px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.hub-desk {
|
|
120
|
+
position: relative;
|
|
121
|
+
display: grid;
|
|
122
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
123
|
+
grid-template-areas:
|
|
124
|
+
'icon body arrow'
|
|
125
|
+
'icon counts arrow';
|
|
126
|
+
align-items: center;
|
|
127
|
+
column-gap: 20px;
|
|
128
|
+
row-gap: 10px;
|
|
129
|
+
width: 100%;
|
|
130
|
+
padding: 20px 24px;
|
|
131
|
+
background: var(--hub-white);
|
|
132
|
+
border: 1px solid var(--hub-card);
|
|
133
|
+
border-radius: 14px;
|
|
134
|
+
transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.hub-desk:hover,
|
|
138
|
+
.hub-desk:focus-within {
|
|
139
|
+
border-color: var(--hub-green);
|
|
140
|
+
box-shadow: 0 6px 18px rgba(38, 45, 30, 0.1);
|
|
141
|
+
transform: translateY(-1px);
|
|
142
|
+
outline: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.hub-desk-icon {
|
|
146
|
+
grid-area: icon;
|
|
147
|
+
align-self: start;
|
|
148
|
+
display: grid;
|
|
149
|
+
place-items: center;
|
|
150
|
+
width: 52px;
|
|
151
|
+
height: 52px;
|
|
152
|
+
border-radius: 12px;
|
|
153
|
+
background: var(--hub-zone);
|
|
154
|
+
font-size: 26px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.hub-desk-body {
|
|
158
|
+
flex: 1;
|
|
159
|
+
min-width: 0;
|
|
160
|
+
display: flex;
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
gap: 4px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.hub-page .hub-desk-name {
|
|
166
|
+
align-self: flex-start;
|
|
167
|
+
padding: 0;
|
|
168
|
+
border: none;
|
|
169
|
+
background: none;
|
|
170
|
+
font-size: 22px;
|
|
171
|
+
font-weight: 700;
|
|
172
|
+
color: var(--hub-darker);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.hub-page .hub-desk-open:focus-visible {
|
|
176
|
+
outline: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.hub-desk-open::after {
|
|
180
|
+
content: '';
|
|
181
|
+
position: absolute;
|
|
182
|
+
inset: 0;
|
|
183
|
+
border-radius: 14px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.hub-desk-desc {
|
|
187
|
+
font-size: 14px;
|
|
188
|
+
line-height: 1.45;
|
|
189
|
+
color: var(--hub-label);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.hub-desk-counts {
|
|
193
|
+
grid-area: counts;
|
|
194
|
+
display: flex;
|
|
195
|
+
flex-wrap: wrap;
|
|
196
|
+
gap: 8px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.hub-pill {
|
|
200
|
+
padding: 6px 12px;
|
|
201
|
+
border-radius: 999px;
|
|
202
|
+
background: var(--hub-lime);
|
|
203
|
+
color: var(--hub-darker);
|
|
204
|
+
font-size: 14px;
|
|
205
|
+
font-weight: 600;
|
|
206
|
+
white-space: nowrap;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.hub-pill-pop {
|
|
210
|
+
background: var(--hub-dark);
|
|
211
|
+
color: var(--hub-pop);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.hub-pill-muted {
|
|
215
|
+
background: var(--hub-zone);
|
|
216
|
+
color: var(--hub-label);
|
|
217
|
+
font-weight: 500;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.hub-desk-body {
|
|
221
|
+
grid-area: body;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.hub-desk-arrow {
|
|
225
|
+
grid-area: arrow;
|
|
226
|
+
flex: none;
|
|
227
|
+
font-size: 22px;
|
|
228
|
+
color: var(--hub-green);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* 2. Tour */
|
|
232
|
+
.hub-band {
|
|
233
|
+
display: flex;
|
|
234
|
+
align-items: center;
|
|
235
|
+
justify-content: space-between;
|
|
236
|
+
gap: 24px;
|
|
237
|
+
padding: 24px 32px;
|
|
238
|
+
border-radius: 16px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.hub-band-title {
|
|
242
|
+
margin: 0 0 6px;
|
|
243
|
+
font-size: 22px;
|
|
244
|
+
font-weight: 700;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.hub-band-sub {
|
|
248
|
+
margin: 0;
|
|
249
|
+
max-width: 900px;
|
|
250
|
+
font-size: 15px;
|
|
251
|
+
line-height: 1.45;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* The tour: dark, a chartreuse button. */
|
|
255
|
+
.hub-band-tour {
|
|
256
|
+
background: var(--hub-dark);
|
|
257
|
+
color: var(--hub-white);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.hub-band-tour .hub-band-sub {
|
|
261
|
+
color: var(--hub-soft-lime);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.hub-page .hub-band-button {
|
|
265
|
+
flex: none;
|
|
266
|
+
padding: 14px 28px;
|
|
267
|
+
border: none;
|
|
268
|
+
border-radius: 999px;
|
|
269
|
+
background: var(--hub-pop);
|
|
270
|
+
color: var(--hub-darker);
|
|
271
|
+
font-size: 16px;
|
|
272
|
+
font-weight: 700;
|
|
273
|
+
text-align: center;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.hub-page .hub-band-button:hover,
|
|
277
|
+
.hub-page .hub-band-button:focus-visible {
|
|
278
|
+
background: var(--hub-lime);
|
|
279
|
+
outline: none;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* Exploring: the same band, light, one dark button (the data model). */
|
|
283
|
+
.hub-band-explore {
|
|
284
|
+
border: 1px solid var(--hub-card);
|
|
285
|
+
border-left: 6px solid var(--hub-green);
|
|
286
|
+
background: var(--hub-white);
|
|
287
|
+
color: var(--hub-dark);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.hub-band-explore .hub-band-sub {
|
|
291
|
+
color: var(--hub-label);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.hub-page .hub-band-explore .hub-band-button {
|
|
295
|
+
background: var(--hub-dark);
|
|
296
|
+
color: var(--hub-white);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.hub-page .hub-band-explore .hub-band-button:hover,
|
|
300
|
+
.hub-page .hub-band-explore .hub-band-button:focus-visible {
|
|
301
|
+
background: var(--hub-green);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* 3. Feature map */
|
|
305
|
+
.hub-features {
|
|
306
|
+
display: grid;
|
|
307
|
+
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
|
|
308
|
+
gap: 12px;
|
|
309
|
+
padding: 16px;
|
|
310
|
+
border-radius: 16px;
|
|
311
|
+
background: var(--hub-zone);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.hub-feature {
|
|
315
|
+
display: flex;
|
|
316
|
+
flex-direction: column;
|
|
317
|
+
gap: 6px;
|
|
318
|
+
padding: 16px 18px;
|
|
319
|
+
border: 1px solid transparent;
|
|
320
|
+
border-radius: 12px;
|
|
321
|
+
background: var(--hub-white);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.hub-feature-link:hover,
|
|
325
|
+
.hub-feature-link:focus-visible {
|
|
326
|
+
border-color: var(--hub-green);
|
|
327
|
+
outline: none;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.hub-feature-name {
|
|
331
|
+
font-size: 16px;
|
|
332
|
+
font-weight: 700;
|
|
333
|
+
color: var(--hub-darker);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.hub-feature-arrow {
|
|
337
|
+
color: var(--hub-green);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.hub-feature-what {
|
|
341
|
+
font-size: 14px;
|
|
342
|
+
line-height: 1.45;
|
|
343
|
+
color: var(--hub-dark);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.hub-feature-where {
|
|
347
|
+
font-size: 13px;
|
|
348
|
+
line-height: 1.4;
|
|
349
|
+
color: var(--hub-label);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/* The "← Hub" button on each desk */
|
|
353
|
+
.hub-back {
|
|
354
|
+
width: 100%;
|
|
355
|
+
height: 100%;
|
|
356
|
+
min-height: 32px;
|
|
357
|
+
padding: 4px 12px;
|
|
358
|
+
border: 1px solid #e9e6df;
|
|
359
|
+
border-radius: 999px;
|
|
360
|
+
background: #e3f68b;
|
|
361
|
+
color: #1a2208;
|
|
362
|
+
font-family: Matter, Inter, system-ui, sans-serif;
|
|
363
|
+
font-size: 20px;
|
|
364
|
+
font-weight: 700;
|
|
365
|
+
cursor: pointer;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.hub-back:hover,
|
|
369
|
+
.hub-back:focus-visible {
|
|
370
|
+
background: #ddf327;
|
|
371
|
+
outline: none;
|
|
372
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<div class="hub-page">
|
|
2
|
+
<section class="hub-welcome">
|
|
3
|
+
<div class="hub-welcome-head">
|
|
4
|
+
<p class="hub-eyebrow">Forest demo · Hub</p>
|
|
5
|
+
<h1 class="hub-title">Welcome to the bank’s back office</h1>
|
|
6
|
+
</div>
|
|
7
|
+
<p class="hub-lead">
|
|
8
|
+
This is where the bank’s teams work every day, on its live data. Onboarding checks everyone
|
|
9
|
+
who opens an account: papers, ID, sanctions screening, risk. The alerts team clears AML and
|
|
10
|
+
fraud alerts, investigators build the cases and the MLRO files the suspicious activity
|
|
11
|
+
reports, payments validates the large transfers, disputes handles card chargebacks and SEPA
|
|
12
|
+
recalls. Each team works from its own desk: its queues, its next case, its actions and
|
|
13
|
+
workflows.
|
|
14
|
+
</p>
|
|
15
|
+
</section>
|
|
16
|
+
|
|
17
|
+
<section class="hub-band hub-band-tour">
|
|
18
|
+
<div class="hub-band-text">
|
|
19
|
+
<h2 class="hub-band-title">New to Forest? Take a tour!</h2>
|
|
20
|
+
<p class="hub-band-sub">Step by step, on a real desk: Smart Actions first, then a full KYC case, a workflow and a senior’s sign-off.</p>
|
|
21
|
+
</div>
|
|
22
|
+
<button type="button" class="hub-band-button" {{on "click" this.openTour}}>Start the tour →</button>
|
|
23
|
+
</section>
|
|
24
|
+
|
|
25
|
+
<section class="hub-band hub-band-explore">
|
|
26
|
+
<div class="hub-band-text">
|
|
27
|
+
<h2 class="hub-band-title">Already familiar? Explore on your own</h2>
|
|
28
|
+
<p class="hub-band-sub">Open the data in the left panel, try the pre-built desks below, and edit any workspace as you see fit: the pencil at the top of each page opens the layout editor.</p>
|
|
29
|
+
</div>
|
|
30
|
+
{{#if this.dataMapWorkspaceId}}
|
|
31
|
+
<button type="button" class="hub-band-button" {{on "click" this.openDataMap}}>See the data model →</button>
|
|
32
|
+
{{/if}}
|
|
33
|
+
</section>
|
|
34
|
+
|
|
35
|
+
<section class="hub-section">
|
|
36
|
+
<h2 class="hub-h2">Team desks</h2>
|
|
37
|
+
<p class="hub-sub">Live from the data: what waits for each team right now.</p>
|
|
38
|
+
<div class="hub-desks">
|
|
39
|
+
{{#each this.desks as |desk|}}
|
|
40
|
+
<div class="hub-desk">
|
|
41
|
+
<span class="hub-desk-icon">{{desk.icon}}</span>
|
|
42
|
+
<span class="hub-desk-body">
|
|
43
|
+
<button type="button" class="hub-desk-name hub-desk-open" {{on "click" (fn this.openWorkspace desk.workspaceId)}}>{{desk.name}}</button>
|
|
44
|
+
<span class="hub-desk-desc">{{desk.description}}</span>
|
|
45
|
+
</span>
|
|
46
|
+
<span class="hub-desk-counts">
|
|
47
|
+
{{#if desk.counts}}
|
|
48
|
+
<span class="hub-pill">{{desk.counts.waiting}} to review</span>
|
|
49
|
+
{{#if desk.counts.second}}
|
|
50
|
+
<span class="hub-pill hub-pill-pop">{{desk.counts.second}}</span>
|
|
51
|
+
{{/if}}
|
|
52
|
+
{{else}}
|
|
53
|
+
<span class="hub-pill hub-pill-muted">{{this.countsStatus}}</span>
|
|
54
|
+
{{/if}}
|
|
55
|
+
</span>
|
|
56
|
+
<span class="hub-desk-arrow" aria-hidden="true">→</span>
|
|
57
|
+
</div>
|
|
58
|
+
{{/each}}
|
|
59
|
+
</div>
|
|
60
|
+
</section>
|
|
61
|
+
|
|
62
|
+
<section class="hub-section">
|
|
63
|
+
<h2 class="hub-h2">Feature by feature</h2>
|
|
64
|
+
<p class="hub-sub">Click a feature: what it does, a picture of it, where to see it live here, and how to set it up.</p>
|
|
65
|
+
<div class="hub-features">
|
|
66
|
+
{{#each this.features as |feature|}}
|
|
67
|
+
{{#if feature.clickable}}
|
|
68
|
+
<button type="button" class="hub-feature hub-feature-link" {{on "click" (fn this.openFeature feature)}}>
|
|
69
|
+
<span class="hub-feature-name">{{feature.name}} <span class="hub-feature-arrow" aria-hidden="true">→</span></span>
|
|
70
|
+
<span class="hub-feature-what">{{feature.what}}</span>
|
|
71
|
+
<span class="hub-feature-where">{{feature.where}}</span>
|
|
72
|
+
</button>
|
|
73
|
+
{{else}}
|
|
74
|
+
<div class="hub-feature">
|
|
75
|
+
<span class="hub-feature-name">{{feature.name}}</span>
|
|
76
|
+
<span class="hub-feature-what">{{feature.what}}</span>
|
|
77
|
+
<span class="hub-feature-where">{{feature.where}}</span>
|
|
78
|
+
</div>
|
|
79
|
+
{{/if}}
|
|
80
|
+
{{/each}}
|
|
81
|
+
</div>
|
|
82
|
+
</section>
|
|
83
|
+
</div>
|