create-pmos 0.419.0 → 0.421.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/package.json +25 -30
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/scripts/lane-defs.js +14 -1
- package/payload/scripts/workflow-state.js +2 -2
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-board-test.js +9 -13
- package/workspace/changelog.json +24 -0
- package/workspace/fixtures/report-api/draft.json +2 -1
- package/workspace/guide/briefing-premium.md +1 -1
- package/workspace/guide/home.md +3 -0
- package/workspace/home-other-product-test.js +18 -0
- package/workspace/home-rows-test.js +14 -0
- package/workspace/lib/board-premium.js +13 -3
- package/workspace/lib/brief.js +5 -0
- package/workspace/lib/briefing-premium-agent.js +8 -0
- package/workspace/lib/engine/lane-defs.js +14 -1
- package/workspace/lib/engine/workflow-state.js +2 -2
- package/workspace/lib/first-input.js +13 -6
- package/workspace/lib/hold-spans.js +64 -0
- package/workspace/lib/mention-store.js +49 -13
- package/workspace/lib/plan-tree.js +1 -1
- package/workspace/lib/report-draft.js +6 -0
- package/workspace/lib/routes-boards.js +22 -6
- package/workspace/lib/source-reads.js +5 -0
- package/workspace/lib/transcript-read.js +29 -1
- package/workspace/lib/vendor/scripts/lane-defs.js +14 -1
- package/workspace/lib/vendor/scripts/workflow-state.js +2 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-viewer-test.js +1 -1
- package/workspace/public/pm/bd-acts.js +49 -1
- package/workspace/public/pm/bd-ini-panel.js +15 -8
- package/workspace/public/pm/bd-next.js +119 -0
- package/workspace/public/pm/bd-prog.js +1 -1
- package/workspace/public/pm/bd-span.js +120 -22
- package/workspace/public/pm/bd-views.js +7 -5
- package/workspace/public/pm/cozy-board.css +54 -9
- package/workspace/public/pm/cozy-live-pill.js +1 -1
- package/workspace/public/pm/cozy-nav.js +1 -1
- package/workspace/public/pm/cozy-steps.js +1 -1
- package/workspace/public/pm/cozy-today.css +9 -0
- package/workspace/public/pm/cozy-viewer.js +7 -3
- package/workspace/public/pm/cozy-xv.js +1 -1
- package/workspace/public/pm/cozy.css +10 -0
- package/workspace/public/pm/home-app.js +39 -13
- package/workspace/public/pm/home-ask.js +7 -0
- package/workspace/public/pm/home-ini.js +44 -13
- package/workspace/public/pm/home-line.js +1 -1
- package/workspace/public/pm/home-list.js +22 -2
- package/workspace/public/pm/home-mentions.js +1 -1
- package/workspace/public/pm/home-today.js +13 -2
- package/workspace/public/pm/ini-tasks.js +363 -0
- package/workspace/public/pm/ini-view-model.js +19 -11
- package/workspace/public/pm/ini-view.css +160 -0
- package/workspace/public/pm/ini-view.js +40 -9
- package/workspace/public/pm/premium-board.js +54 -17
- package/workspace/public/pm/premium-insights.js +1 -1
- package/workspace/public/pm/premium-mtg-present.js +2 -2
- package/workspace/public/pm/premium-report-read.js +1 -1
- package/workspace/public/pm/premium-report-tab.js +1 -1
- package/workspace/public/pm/premium-viewer.js +3 -3
- package/workspace/public/pm/premium-vw-mtg.js +3 -1
- package/workspace/public/pm/premium-vw-open.js +1 -1
- package/workspace/public/pm/premium-vw-slides.js +1 -1
- package/workspace/public/pm/prog-order.js +1 -1
- package/workspace/public/pm/task-card.js +6 -0
- package/workspace/public/pm/tk-send.js +1 -1
- package/workspace/server.js +26 -2
- package/workspace/skills/day-check.skill +2 -2
- package/workspace/skills/morning-brief.skill +1 -1
- package/workspace/skills/sources-read.skill +8 -4
- package/workspace/task-press-test.js +120 -0
- package/workspace/task-views-test.js +245 -0
- package/workspace/test-lists/task-press.json +6 -0
- package/workspace/test-lists/task-views.json +6 -0
- package/workspace/test-lists/timeline-holds.json +6 -0
- package/workspace/timeline-holds-test.js +199 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* pm/bd-next.js — the Board's Next cell (batch 9 item 4; canvas XocA, XocAList, XocAPhone): one line that says what finishes the step next.
|
|
2
|
+
* The stage track, the List and the phone draw the same cell.
|
|
3
|
+
*
|
|
4
|
+
* nextOf(r, ctx) → { you, verb, obj, tail, tone, count, due, act } | null PURE. ctx: { self (a PMOS-self board: the stage moves with the files) }
|
|
5
|
+
* nextHtml(r, o) → the cell's markup. o: { self, icon (false on the phone), due (false in the List: Finish says the date) }
|
|
6
|
+
*
|
|
7
|
+
* The line is `[blue dot when it waits on the PM] <verb> <object in blue ink>`, the count muted on the right, and an icon action only where
|
|
8
|
+
* PMOS can do the step itself (draft with Claude, move the stage, add a stage task, link the epic, read Jira). The icon is a button with
|
|
9
|
+
* data-nx (draft | move | add | epic | jira) and data-nxrow (the row key); the page runs it. Nothing is invented: a step with no record
|
|
10
|
+
* behind it draws nothing (zero is silence), and the initiative's whole progress is never shown as the step's. */
|
|
11
|
+
import { esc } from './premium-shell.js';
|
|
12
|
+
import { sectionOf } from './ini-view-model.js';
|
|
13
|
+
|
|
14
|
+
const PF = 'product-feature';
|
|
15
|
+
const SV = (d) => `<svg viewBox="0 0 24 24" aria-hidden="true"><path d="${d}"/></svg>`;
|
|
16
|
+
const IC = {
|
|
17
|
+
draft: 'M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z', move: 'M5 12h14M13 6l6 6-6 6', add: 'M12 5v14M5 12h14',
|
|
18
|
+
epic: 'M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1', jira: 'M20 11a8 8 0 1 0-2.3 5.7M20 4v7h-7',
|
|
19
|
+
};
|
|
20
|
+
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
21
|
+
const dm = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] : ''; };
|
|
22
|
+
// a part's name as the line says it, and the verb that writes it ("Write the problem statement")
|
|
23
|
+
const PART = {
|
|
24
|
+
problem: ['Write the', 'problem statement'], users: ['Describe the', 'users'], evidence: ['Add the', 'evidence'], scope: ['Write the', 'scope'],
|
|
25
|
+
'success metric': ['Set the', 'success metric'], 'success measure': ['Set the', 'success measure'], risks: ['List the', 'risks'],
|
|
26
|
+
'business case': ['Write the', 'business case'], 'who asked': ['Name', 'who asked'], timeline: ['Set the', 'timeline'], tickets: ['Draft the', 'tickets'],
|
|
27
|
+
'KR or health budget': ['Pick the', 'KR or health budget'], rank: ['Rank it on the', 'roadmap'],
|
|
28
|
+
report: ['Draft the', 'outcome report'], evaluation: ['Write the', 'evaluation'], 'your verdict': ['Give', 'your verdict'],
|
|
29
|
+
};
|
|
30
|
+
// the parts PMOS can draft with Claude (a document's section); the others are the PM's or another tool's
|
|
31
|
+
const DRAFTS = new Set(['problem', 'users', 'evidence', 'scope', 'success metric', 'success measure', 'risks', 'business case', 'report', 'evaluation']);
|
|
32
|
+
const OUT = { triage: 'BRD', discover: 'PRD' };
|
|
33
|
+
const OPEN_TK = ['In review', 'In progress', 'To do'];
|
|
34
|
+
const CLOSED = new Set(['Done', "Won't do", 'Archived']);
|
|
35
|
+
|
|
36
|
+
/** The stage after the current one, by the row's own list of stage names (the ⋯ menu's Move to). */
|
|
37
|
+
function nextStage(r) {
|
|
38
|
+
const a = r.acts || {}, L = a.stages || [], i = L.indexOf(a.stage);
|
|
39
|
+
return i >= 0 && L[i + 1] ? L[i + 1] : null;
|
|
40
|
+
}
|
|
41
|
+
const canMove = (r, ctx) => !(ctx && ctx.self) && !(r.acts && r.acts.life);
|
|
42
|
+
function moveLine(r, ctx, count) {
|
|
43
|
+
const to = nextStage(r);
|
|
44
|
+
return to ? { you: true, verb: 'Move to', obj: to, count, act: canMove(r, ctx) ? { kind: 'move', label: 'Move to ' + to } : null } : null;
|
|
45
|
+
}
|
|
46
|
+
/** A part of the step's output, as the line: Write the <part>, or Review the <part> when the part waits on the PM. */
|
|
47
|
+
function partLine(p, count, draftable) {
|
|
48
|
+
const [verb, obj] = PART[p.name] || ['Finish the', p.name];
|
|
49
|
+
if (/verdict/.test(p.name)) return { you: true, verb: 'Give', obj: 'your verdict', count }; // the verdict is always the PM's
|
|
50
|
+
if (p.you && /^your /.test(p.name)) return { you: true, verb: 'Give', obj: p.name, count }; // "your review": Give your review
|
|
51
|
+
if (p.you) return { you: true, verb: 'Review the', obj, count };
|
|
52
|
+
return { verb, obj, count, act: draftable && DRAFTS.has(p.name) ? { kind: 'draft', label: 'Draft the ' + obj + ' with Claude', q: 'Draft the ' + obj } : null };
|
|
53
|
+
}
|
|
54
|
+
/** The open parts in the order the line reads them: one that waits on the PM first, then the first not done. */
|
|
55
|
+
const firstPart = (parts) => parts.find((p) => !p.done && p.you) || parts.find((p) => !p.done) || null;
|
|
56
|
+
/** A task title split into its verb and the rest: "Score vendor B's POC" → Score + vendor B's POC; a title that does not start with a word is finished. */
|
|
57
|
+
function taskLine(title) {
|
|
58
|
+
const m = /^([A-Z][a-z]+)\s+(\S.*)$/.exec(String(title || '').trim());
|
|
59
|
+
return m ? { verb: m[1], obj: m[2] } : { verb: 'Finish', obj: String(title || '').trim() };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function nextOf(r, ctx = {}) {
|
|
63
|
+
if (!r || (r.acts && (r.acts.life === 'cancelled' || r.acts.archived))) return null;
|
|
64
|
+
const t = r.track || {}, it = r.trail || {};
|
|
65
|
+
// another workflow: the first open task of its stage, by order
|
|
66
|
+
if (r.wf && r.wf.id && r.wf.id !== PF && r.wfStage) {
|
|
67
|
+
const st = r.wfStage, list = r.wfStages || [st];
|
|
68
|
+
const mine = (r.tasks || []).filter((k) => sectionOf(k, list) === st.key && k.status !== 'Archived')
|
|
69
|
+
.map((k, i) => ({ k, i })).sort((a, b) => (Number.isFinite(a.k.order) ? a.k.order : 1e9 + a.i) - (Number.isFinite(b.k.order) ? b.k.order : 1e9 + b.i)).map((x) => x.k);
|
|
70
|
+
const counted = mine.filter((k) => k.status !== "Won't do"), done = counted.filter((k) => k.status === 'Done').length;
|
|
71
|
+
if (!mine.length) return { verb: 'Add what finishes', obj: st.name, act: { kind: 'add', label: 'Add a task to ' + st.name, stage: st.key } };
|
|
72
|
+
const open = mine.find((k) => !CLOSED.has(k.status));
|
|
73
|
+
const count = counted.length ? done + '/' + counted.length + ' tasks' : '';
|
|
74
|
+
return open ? { ...taskLine(open.title), count } : moveLine(r, ctx, count);
|
|
75
|
+
}
|
|
76
|
+
const key = t.key;
|
|
77
|
+
if (!key) return null;
|
|
78
|
+
if (key === 'build' || key === 'deliver') {
|
|
79
|
+
const tk = t.tickets || [];
|
|
80
|
+
if (tk.length) {
|
|
81
|
+
const p = t.prog || {}, count = p.total ? p.done + '/' + p.total + (p.unit === 'pts' ? ' pts' : ' tickets') : '';
|
|
82
|
+
const open = tk.filter((k) => k.status !== 'Done');
|
|
83
|
+
const pick = open.find((k) => k.blocked) || OPEN_TK.map((s) => open.find((k) => !k.blocked && k.status === s)).find(Boolean);
|
|
84
|
+
if (pick) return { verb: 'Finish', obj: pick.key, tail: open.length > 1 ? (open.length - 1) + ' more' : '', tone: pick.blocked ? 'red' : '', count, title: pick.key + ' · ' + pick.title + (pick.blocked ? ' · blocked' : '') };
|
|
85
|
+
if (key === 'deliver') return { you: true, verb: 'Give your', obj: 'sign-off', count };
|
|
86
|
+
return moveLine(r, ctx, count);
|
|
87
|
+
}
|
|
88
|
+
const epic = (it.links && it.links.epic) || (r.epics || [])[0] || null;
|
|
89
|
+
return epic ? { verb: 'Read', obj: 'Jira', act: { kind: 'jira', label: 'Read Jira again for ' + epic } } : { verb: 'Link the', obj: 'Jira epic', act: { kind: 'epic', label: 'Link the Jira epic' } };
|
|
90
|
+
}
|
|
91
|
+
const due = (key === 'monitor' || key === 'evaluate') && r.end ? 'due ' + dm(r.end) : '';
|
|
92
|
+
if (key === 'monitor') return { verb: 'Draft the', obj: 'outcome report', due, act: { kind: 'draft', label: 'Draft the outcome report with Claude', q: 'Draft the outcome report' } };
|
|
93
|
+
// the parts of the step: the trail's (the documents' headings, the tickets drafted), else what the model counts (Prioritize's anchor and rank)
|
|
94
|
+
let parts = Array.isArray(it.parts) && it.parts.length ? it.parts : null;
|
|
95
|
+
if (!parts && (key === 'plan' || key === 'prioritize')) parts = (t.segs || []).filter((s) => s.st === 'done' || s.st === 'to do').map((s) => ({ name: key === 'prioritize' && /^kr/i.test(s.name) ? 'KR or health budget' : s.name.toLowerCase(), done: s.st === 'done' }));
|
|
96
|
+
if (!parts || !parts.length) return key === 'evaluate' ? { verb: 'Draft the', obj: 'outcome report', due, act: { kind: 'draft', label: 'Draft the outcome report with Claude', q: 'Draft the outcome report' } } : null;
|
|
97
|
+
// Plan's ticket part says how many: "3 tickets drafted, waiting on you" is the PM's Commit
|
|
98
|
+
parts = parts.map((p) => (/tickets/.test(p.name) ? { ...p, name: 'tickets', pushed: /pushed/.test(p.name) } : p));
|
|
99
|
+
const d = parts.filter((p) => p.done).length, n = parts.length;
|
|
100
|
+
const count = OUT[key] ? OUT[key] + ' ' + d + '/' + n : key === 'evaluate' ? '' : d + '/' + n + ' parts';
|
|
101
|
+
const p = firstPart(parts);
|
|
102
|
+
if (!p) return moveLine(r, ctx, count);
|
|
103
|
+
const L = partLine(p, count, true);
|
|
104
|
+
if (p.name === 'tickets' && p.you) { L.verb = 'Commit the'; L.obj = 'drafted tickets'; } else if (p.pushed) L.verb = 'Push the';
|
|
105
|
+
return { ...L, due };
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** The cell. The icon is ghosted and lights with the row's hover or focus; the phone draws no icon (the row opens the panel). */
|
|
109
|
+
export function nextHtml(r, o = {}) {
|
|
110
|
+
const x = nextOf(r, o);
|
|
111
|
+
if (!x) return '';
|
|
112
|
+
const words = (x.verb ? x.verb + ' ' : '') + x.obj + (x.tail ? ' · ' + x.tail : '');
|
|
113
|
+
const count = [x.count, o.due === false ? '' : x.due].filter(Boolean)[0] || '';
|
|
114
|
+
const act = x.act && o.icon !== false
|
|
115
|
+
? `<button type="button" class="bd-nxa" data-nx="${esc(x.act.kind)}" data-nxrow="${esc(r.key)}"${x.act.q ? ` data-q="${esc(x.act.q)}"` : ''}${x.act.stage ? ` data-stage="${esc(x.act.stage)}"` : ''} aria-label="${esc(x.act.label)}" title="${esc(x.act.label)}">${SV(IC[x.act.kind])}</button>` : '';
|
|
116
|
+
return `<div class="bd-nx">${x.you ? '<i class="cz-dot you" role="img" aria-label="Waits on you"></i>' : ''}`
|
|
117
|
+
+ `<span class="tx" title="${esc(x.title || words)}">${x.verb ? esc(x.verb) + ' ' : ''}<em${x.tone ? ` class="${x.tone}"` : ''}>${esc(x.obj)}</em>${x.tail ? ' · ' + esc(x.tail) : ''}</span>`
|
|
118
|
+
+ `${count ? `<span class="mu">${esc(count)}</span>` : ''}${act}</div>`;
|
|
119
|
+
}
|
|
@@ -155,7 +155,7 @@ export function bandHtml(g, st, o) {
|
|
|
155
155
|
const open2 = (st.milestones || []).filter((m) => !m.done).sort((a, b) => String(a.date || '9999').localeCompare(String(b.date || '9999')));
|
|
156
156
|
const nx = open2[0], af = open2[1];
|
|
157
157
|
const late = nx && nx.late;
|
|
158
|
-
const ms = nx ? `<div class="bd-pm${late ? ' late' : ''}"${nx.titles && nx.titles.length ? ` title="${esc('Waits on ' + nx.titles.join(' and ') + ' reaching Deliver')}"` : ''}><i class="bd-dm"></i><b>${esc(nx.name)}</b>${esc(nx.day || '')}${readyHtml(nx, whole(st))}</div>` : '
|
|
158
|
+
const ms = nx ? `<div class="bd-pm${late ? ' late' : ''}"${nx.titles && nx.titles.length ? ` title="${esc('Waits on ' + nx.titles.join(' and ') + ' reaching Deliver')}"` : ''}><i class="bd-dm"></i><b>${esc(nx.name)}</b>${esc(nx.day || '')}${readyHtml(nx, whole(st))}</div>` : ''; // no milestone: the Next cell is blank (XocA)
|
|
159
159
|
const tasks = (st.openTasks || []).length;
|
|
160
160
|
const t3 = [af ? `<i class="bd-dm o"></i>${esc(af.name + (af.day ? ' ' + af.day : ''))}` : '', tasks ? tasks + ' program ' + plural(tasks, 'task', 'tasks') : ''].filter(Boolean).join(' · ');
|
|
161
161
|
const meta = n > 1 ? n + ' products' : st.state;
|
|
@@ -14,7 +14,12 @@
|
|
|
14
14
|
* A phone draws the sprint's two weeks in the rows of the other spans.
|
|
15
15
|
* Milestones: a release's sign-off (◆ with its name), "Push tickets" where drafted tickets wait on the Commit, and "after <initiative>" where a
|
|
16
16
|
* dependency is not done. Program milestones closer than about 120 px merge into one counted diamond. A bar is drawn only from dates a record
|
|
17
|
-
* holds. Pure: rows and the model in, markup out.
|
|
17
|
+
* holds. Pure: rows and the model in, markup out.
|
|
18
|
+
* Idle time (feedback batch 9 item 8; XtiA1Desk, XtiA2Hold, XtiA4Long, XtiA3Phone, XtiAHard, XtiAGrill): a hold breaks the bar into a dotted gap with a
|
|
19
|
+
* ⏸ button where it stopped and the return date where it starts again (a phone keeps the ⏸ only); a stretch of 4 weeks or more with no dated work just
|
|
20
|
+
* breaks it. The done part fills the pieces in order and skips the gaps. No return date: dotted to today, the rest faded. Return date passed: dotted to
|
|
21
|
+
* today in the late colour. Return after Deliver: the ◇ turns amber and says so; no date is moved. A gap narrower than 8 px closes up. The program line
|
|
22
|
+
* is dotted where every member is on hold. */
|
|
18
23
|
import { esc } from './premium-shell.js';
|
|
19
24
|
import { mergeClose } from './program-model.js';
|
|
20
25
|
|
|
@@ -31,7 +36,7 @@ export const DRAWN = new Set(SPANS.map(([k]) => k));
|
|
|
31
36
|
const SV = (d) => `<svg viewBox="0 0 24 24" aria-hidden="true"><path d="${d}"/></svg>`;
|
|
32
37
|
const FLAG = 'M5 21V4M5 4h11l-2 4 2 4H5';
|
|
33
38
|
const LINK = 'M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1';
|
|
34
|
-
const CHL = 'M15 6l-6 6 6 6', CHR = 'M9 6l6 6-6 6';
|
|
39
|
+
const CHL = 'M15 6l-6 6 6 6', CHR = 'M9 6l6 6-6 6', PAUSE = 'M9 6v12M15 6v12';
|
|
35
40
|
|
|
36
41
|
/** The scale of each span from Quarter on (TsAllSpans): its column, and how many columns one screen shows on a desktop and on a phone. */
|
|
37
42
|
export const SCALE = { quarter: { unit: 'w', cols: 7, ph: 3 }, half: { unit: 'm', cols: 6, ph: 3 }, year: { unit: 'm', cols: 12, ph: 4 }, y2: { unit: 'q', cols: 8, ph: 4 }, y5: { unit: 'y', cols: 5, ph: 2 } };
|
|
@@ -77,27 +82,47 @@ const toneOf = (r) => (r.late ? 'late' : r.status === 'at risk' ? 'risk' : r.tra
|
|
|
77
82
|
const dated = (r) => day(r.start) || day(r.end) || (r.track && day(r.track.forecast));
|
|
78
83
|
/** Done work leaves no edge tab (TsCGrill 5): the initiative is past Deliver, or every part it counts is done. */
|
|
79
84
|
const isDone = (r) => !!(r.track && (r.track.k >= 6 || (r.track.prog && r.track.prog.total > 0 && r.track.prog.done >= r.track.prog.total)));
|
|
80
|
-
/**
|
|
85
|
+
/** A row's holds as spans on the bar: [{ a, b, kind, h, i }]. kind: past (resumed), open (the return date ahead), over (the return date passed:
|
|
86
|
+
* dotted on to today), none (no return date: dotted to today). Only the ones that touch the plan (XtiAHard). */
|
|
87
|
+
export function holdSpans(r, now) {
|
|
88
|
+
const s = day(r.start), e = day(r.end), out = [];
|
|
89
|
+
(Array.isArray(r.holds) ? r.holds : []).forEach((h, i) => {
|
|
90
|
+
const a = day(h.from); if (!a) return;
|
|
91
|
+
const to = day(h.to), back = day(h.back);
|
|
92
|
+
const kind = to ? 'past' : !back ? 'none' : back < now ? 'over' : 'open';
|
|
93
|
+
const b = to || (kind === 'open' ? back : now);
|
|
94
|
+
if (b <= a || (s && b <= s) || (e && a >= e)) return;
|
|
95
|
+
out.push({ a: s && a < s ? s : a, b, kind, h, i });
|
|
96
|
+
});
|
|
97
|
+
return out;
|
|
98
|
+
}
|
|
99
|
+
/** The open hold of a row whose return date is ahead (the edge tab and the clash flag read it), or null. */
|
|
100
|
+
const openBack = (r, now) => { const o = holdSpans(r, now).find((x) => x.kind === 'open'); return o ? o.b : null; };
|
|
101
|
+
/** Whether any of `rows` draws a hold (the legend's "On hold" key shows only then: zero is silence). */
|
|
102
|
+
export const hasHold = (rows, now = new Date()) => (rows || []).some((r) => day(r.start) && day(r.end) && holdSpans(r, now).length);
|
|
103
|
+
/** The first and last mark of a row: the plan, the forecast, a return date ahead, and today while it is over. */
|
|
81
104
|
function extentOf(r, now) {
|
|
82
105
|
const s = day(r.start), e = day(r.end), fc = r.track && day(r.track.forecast), ds = [s, e, fc].filter(Boolean);
|
|
106
|
+
const ob = openBack(r, now); if (ob && s) ds.push(ob);
|
|
83
107
|
if (r.over && e && now > e) ds.push(now);
|
|
84
108
|
return ds.length ? { a: new Date(Math.min(...ds)), b: new Date(Math.max(...ds)) } : null;
|
|
85
109
|
}
|
|
86
110
|
|
|
87
111
|
/** One initiative's marks: the plan with its done part, the days over, the forecast past the plan, and one label after the furthest mark. A
|
|
88
112
|
* date reads by the span's scale (o.fmt). */
|
|
89
|
-
function qBar(r, X, now, phone, fmt) {
|
|
113
|
+
function qBar(r, X, now, phone, fmt, pxPct) {
|
|
90
114
|
const s = day(r.start), e = day(r.end), fc = r.track && day(r.track.forecast), tone = toneOf(r);
|
|
91
|
-
let out = marks(r, X, now, phone);
|
|
115
|
+
let out = marks(r, X, now, phone), clash = null;
|
|
92
116
|
if (s && e) {
|
|
93
|
-
const
|
|
94
|
-
out +=
|
|
117
|
+
const g = gapsHtml(r, X, now, phone, fmt, pxPct || 0, s, e, tone);
|
|
118
|
+
out += g.html; clash = g.clash;
|
|
95
119
|
const over = r.over && now > e, late = fc && fc > e, words = [];
|
|
96
120
|
if (over) { out += `<span class="tg-over" style="left:${P(X(e))};width:${P(Math.max(0.1, X(now) - X(e)))}"></span>`; words.push(r.overDays + ' ' + (r.overDays === 1 ? 'day' : 'days') + ' over'); }
|
|
97
121
|
if (late) { out += `<span class="tg-fc" style="left:${P(X(e))};width:${P(X(fc) - X(e))}" title="Jira forecast ${esc(md(fc))}"></span>`; words.push('Jira forecast ' + fmt(fc)); }
|
|
98
122
|
// the committed end is the Deliver or Evaluate ◇ (PgTimeline), with its date right of it; filled while the initiative is at that milestone
|
|
99
|
-
out += `<i class="tg-end${r.track && r.track.ms ? ' ms' : ''}${over ? ' late' : ''}" style="left:${P(X(e))}" title="${esc((r.track && r.track.k >= 6 ? 'Committed evaluation date ' : 'Committed delivery date ') + md(e))}"></i>`;
|
|
100
|
-
if (
|
|
123
|
+
out += `<i class="tg-end${r.track && r.track.ms ? ' ms' : ''}${over || clash ? ' late' : ''}" style="left:${P(X(e))}" title="${esc((r.track && r.track.k >= 6 ? 'Committed evaluation date ' : 'Committed delivery date ') + md(e) + (clash ? '. ' + clash : ''))}"></i>`;
|
|
124
|
+
if (clash && !phone) out += `<span class="tg-lab late tg-clash" style="left:${P(X(e))}">${esc(fmt(e) + ' · ' + clash)}</span>`;
|
|
125
|
+
else if (words.length && !phone) out += `<span class="tg-lab ${over ? 'late' : 'fc'}" style="left:${P(Math.max(over ? X(now) : 0, late ? X(fc) : 0))}">${esc((over ? '' : fmt(e) + ' · ') + words.join(' · '))}</span>`;
|
|
101
126
|
else if (!phone) out += `<span class="tg-endl" style="left:${P(X(e))}">${esc(fmt(e))}</span>`;
|
|
102
127
|
} else if (fc) {
|
|
103
128
|
out += `<span class="tg-fc solo" style="left:${P(X(fc))};width:12px;margin-left:-12px" title="Jira forecast ${esc(md(fc))}"></span>${phone ? '' : `<span class="tg-lab fc" style="left:${P(X(fc))}">Jira forecast ${esc(fmt(fc))}</span>`}`;
|
|
@@ -107,6 +132,63 @@ function qBar(r, X, now, phone, fmt) {
|
|
|
107
132
|
return out;
|
|
108
133
|
}
|
|
109
134
|
|
|
135
|
+
const MIN_PX = 8; // a hold or a gap narrower than this closes up (XtiA4Long, XtiAGrill 12)
|
|
136
|
+
/** A hold's dates: "Oct 12 to Mar 1, 2027" (the year when it ends in another one). */
|
|
137
|
+
export const holdRange = (h) => { const a = day(h.from), b = day(h.to || h.back); return md(a) + (b ? ' to ' + md(b) + (b.getFullYear() !== a.getFullYear() ? ', ' + b.getFullYear() : '') : ''); };
|
|
138
|
+
/** A hold's words for its ⏸ button and its menu (XtiAGrill 18): "On hold, Oct 12 to Mar 1, 2027, waits on the SMS vendor contract". */
|
|
139
|
+
export function holdWords(x, now) {
|
|
140
|
+
const h = x.h, why = h.reason ? ', ' + h.reason.replace(/\.$/, '').replace(/^./, (c) => c.toLowerCase()) : '';
|
|
141
|
+
if (x.kind === 'past') return 'Was on hold, ' + holdRange(h) + why;
|
|
142
|
+
if (x.kind === 'none') return 'On hold since ' + md(day(h.from)) + ', no return date' + why;
|
|
143
|
+
if (x.kind === 'over') { const n = Math.round((now - day(h.back)) / 86400000); return 'On hold, ' + holdRange(h) + why + '. The return date passed ' + n + ' ' + (n === 1 ? 'day' : 'days') + ' ago'; }
|
|
144
|
+
return 'On hold, ' + holdRange(h) + why;
|
|
145
|
+
}
|
|
146
|
+
/** The plan bar cut by its holds and its plain gaps: the pieces (the done part fills them in order and skips the gaps), each hold's dotted line and ⏸,
|
|
147
|
+
* and the return date where the bar starts again. → { html, clash } — clash: the words when the return date falls after the end ◇. */
|
|
148
|
+
function gapsHtml(r, X, now, phone, fmt, pxPct, s, e, tone) {
|
|
149
|
+
const wide = (a, b) => !pxPct || (X(b) - X(a)) * pxPct >= MIN_PX;
|
|
150
|
+
// a resumed hold narrower than 8 px closes up; a hold still running always shows, so its ⏸ is there to press
|
|
151
|
+
const H = holdSpans(r, now), shown = H.filter((x) => x.kind !== 'past' || wide(x.a, x.b));
|
|
152
|
+
const cut = shown.map((x) => [x.a, x.b, x]);
|
|
153
|
+
// a plain gap that a hold covers in part keeps the part outside it: a hold with no return date runs to today, and the work dated after it
|
|
154
|
+
// starts where its tasks start, not today (feedback batch 10 item 3, Email OTP: the bar came back at today, months before its Build tasks)
|
|
155
|
+
for (const g of Array.isArray(r.gaps) ? r.gaps : []) {
|
|
156
|
+
let parts = [[day(g.from), day(g.to)]];
|
|
157
|
+
if (!parts[0][0] || !parts[0][1]) continue;
|
|
158
|
+
for (const x of H) parts = parts.flatMap(([a, b]) => (x.a < b && x.b > a ? [[a, x.a], [x.b, b]].filter(([p, q]) => q > p) : [[a, b]]));
|
|
159
|
+
for (const [a, b] of parts) if (b > s && a < e && wide(a, b)) cut.push([a < s ? s : a, b > e ? e : b, null]);
|
|
160
|
+
}
|
|
161
|
+
cut.sort((p, q) => p[0] - q[0]);
|
|
162
|
+
// the pieces: the plan minus the cuts; after a hold with no return date the rest of the plan is faded (nobody knows when it starts)
|
|
163
|
+
const pieces = []; let at = s, faded = false;
|
|
164
|
+
for (const [a, b, x] of cut) {
|
|
165
|
+
if (a > at) pieces.push([at, a < e ? a : e, faded]);
|
|
166
|
+
if (b > at) at = b;
|
|
167
|
+
if (x && x.kind === 'none') faded = true;
|
|
168
|
+
}
|
|
169
|
+
if (at < e) pieces.push([at, e, faded]);
|
|
170
|
+
const days = (p) => Math.max(0, (p[1] - p[0]) / 86400000), total = pieces.reduce((n, p) => n + days(p), 0);
|
|
171
|
+
let left = (doneOf(r) / 100) * total;
|
|
172
|
+
const hold = H.length ? '. ' + H.map((x) => holdWords(x, now)).join('. ') : '';
|
|
173
|
+
let html = pieces.map((p, i) => {
|
|
174
|
+
const d = days(p), f = d ? Math.max(0, Math.min(1, left / d)) : 0; left -= d;
|
|
175
|
+
const xl = i > 0 || p[0] > s ? ' xl' : '', xr = i < pieces.length - 1 || p[1] < e ? ' xr' : '';
|
|
176
|
+
return `<span class="tg-bar t-${tone}${xl}${xr}${p[2] ? ' fd' : ''}" data-key="${esc(r.key)}" style="left:${P(X(p[0]))};width:${P(Math.max(0.15, X(p[1]) - X(p[0])))}" title="${esc('PMOS plan ' + md(s) + ' to ' + md(e) + hold)}"><b style="width:${(f * 100).toFixed(1)}%"></b></span>`;
|
|
177
|
+
}).join('');
|
|
178
|
+
for (const x of shown) {
|
|
179
|
+
const late = x.kind === 'over' ? ' late' : '', l = X(x.a), w = X(x.b) - l, narrow = pxPct && w * pxPct < 34;
|
|
180
|
+
html += `<span class="tg-gap${late}" style="left:${P(l)};width:${P(w)}" aria-hidden="true"></span>`;
|
|
181
|
+
html += `<button type="button" class="tg-pz${late}${narrow ? ' sm' : ''}" data-hold="${esc(r.key)}" data-i="${x.i}" style="left:${narrow ? P(l + w / 2) : `calc(${P(l)} + 11px)`}" aria-label="${esc(holdWords(x, now) + (x.kind === 'none' ? '. Set a return date' : '. Open the hold'))}" aria-haspopup="dialog">${SV(PAUSE)}</button>`;
|
|
182
|
+
if (phone) continue;
|
|
183
|
+
if (x.kind === 'open' && x.b < e) html += `<span class="tg-hl" style="left:${P(X(x.b))}">${esc(fmt(x.b))}</span>`;
|
|
184
|
+
else if (x.kind === 'over') { const n = Math.round((now - day(x.h.back)) / 86400000); html += `<span class="tg-hl late" style="left:${P(X(x.b))}">${esc(md(day(x.h.back)) + ' · ' + n + ' ' + (n === 1 ? 'day' : 'days') + ' ago')}</span>`; }
|
|
185
|
+
else if (x.kind === 'none') html += `<span class="tg-hl" style="left:${P(X(x.b))}">no return date</span>`;
|
|
186
|
+
}
|
|
187
|
+
const ob = H.find((x) => x.kind === 'open' && x.b > e);
|
|
188
|
+
const clash = ob ? (r.track && r.track.k >= 6 ? 'Evaluate' : 'Deliver') + ' is before the return, ' + md(ob.b) : null;
|
|
189
|
+
return { html, clash };
|
|
190
|
+
}
|
|
191
|
+
|
|
110
192
|
/** A row's milestones: its release's sign-off (◆ at the release date), "Push tickets" where drafted tickets wait on your Commit (today), and
|
|
111
193
|
* "after <initiative>" at the plan start where a dependency is not done. Each one only from a record. */
|
|
112
194
|
function marks(r, X, now, phone) {
|
|
@@ -137,19 +219,20 @@ function overlay(W, X, now, sprint, rel) {
|
|
|
137
219
|
function edgeTabs(r, X, now, phone) {
|
|
138
220
|
const x = extentOf(r, now); if (!x) return '';
|
|
139
221
|
const a = X(x.a).toFixed(3), b = X(x.b).toFixed(3), e = day(r.end) || x.b, late = r.over && day(r.end) && now > day(r.end);
|
|
140
|
-
|
|
141
|
-
const
|
|
222
|
+
// ahead, a held row names its return date, not its start (XtiAGrill 11: "⏸ Mar ’27 ›")
|
|
223
|
+
const ob = openBack(r, now), lw = late ? r.overDays + ' ' + (r.overDays === 1 ? 'day' : 'days') + ' over' : my(e), rw = ob ? my(ob) : my(x.a);
|
|
224
|
+
const tab = (side, words, cls) => `<button type="button" class="tg-edge ${side}${cls}" data-edge="${side}" data-a="${a}" data-b="${b}" tabindex="-1" hidden aria-label="${esc(r.title + ': ' + (side === 'r' && ob ? 'back from hold ' : '') + words + '. Scroll to it')}">${side === 'l' ? SV(CHL) : ''}${side === 'r' && ob ? SV(PAUSE) : ''}<span>${esc(words)}</span>${side === 'r' ? SV(CHR) : ''}</button>`;
|
|
142
225
|
if (phone) return late ? tab('l', lw, ' late') : '';
|
|
143
226
|
return (isDone(r) ? '' : tab('l', lw, late ? ' late' : '')) + (isDone(r) ? '' : tab('r', rw, ''));
|
|
144
227
|
}
|
|
145
228
|
|
|
146
|
-
/** The legend (PgTimeline), in the chip row on every span from Quarter on: done, planned,
|
|
147
|
-
* program is drawn, Deliver or Evaluate, today. */
|
|
148
|
-
export const legendHtml = (prog) => `<span class="tg-lgd" role="group" aria-label="Legend"><span><i class="k dn"></i>Done in Jira</span><span><i class="k pl"></i>Planned</span><span><i class="k fc"></i>Jira forecast</span>${prog ? '<span><i class="k pdm"></i>Program milestone</span>' : ''}<span><i class="k dlv"></i>Deliver or Evaluate</span><span><i class="k td"></i>Today</span></span>`;
|
|
229
|
+
/** The legend (PgTimeline), in the chip row on every span from Quarter on: done, planned, on hold while a hold is drawn, the Jira forecast, a
|
|
230
|
+
* program milestone where a program is drawn, Deliver or Evaluate, today. */
|
|
231
|
+
export const legendHtml = (prog, hold) => `<span class="tg-lgd" role="group" aria-label="Legend"><span><i class="k dn"></i>Done in Jira</span><span><i class="k pl"></i>Planned</span>${hold ? '<span><i class="k ho"></i>On hold</span>' : ''}<span><i class="k fc"></i>Jira forecast</span>${prog ? '<span><i class="k pdm"></i>Program milestone</span>' : ''}<span><i class="k dlv"></i>Deliver or Evaluate</span><span><i class="k td"></i>Today</span></span>`;
|
|
149
232
|
|
|
150
233
|
/** The dates on record a window must hold: every shown row's plan and forecast, the programs' spans and milestones, the release. */
|
|
151
234
|
function datesOf(list, M, o) {
|
|
152
|
-
const ds = list.flatMap((r) => [day(r.start), day(r.end), r.track && day(r.track.forecast)]);
|
|
235
|
+
const ds = list.flatMap((r) => [day(r.start), day(r.end), r.track && day(r.track.forecast), day(r.start) ? openBack(r, o.now) : null]);
|
|
153
236
|
for (const { g, st } of progGroups(o)) { const sp = progSpan(g); if (sp) ds.push(sp.lo, sp.hi); for (const m of st.milestones || []) ds.push(day(m.date)); }
|
|
154
237
|
const rel = M.jira && M.jira.release; if (rel) ds.push(day(rel.iso));
|
|
155
238
|
return ds.filter(Boolean);
|
|
@@ -165,7 +248,7 @@ function scaled(rows, M, o) {
|
|
|
165
248
|
const days = (W.to - W.from) / 86400000, viewDays = W.fixed ? days : W.cols * COL_DAYS[W.unit];
|
|
166
249
|
const ratio = days / viewDays, tpx = Math.max(200, o.trackPx || (o.phone ? 340 : 1100)), pxDay = tpx / viewDays;
|
|
167
250
|
const reach = Math.max(W.fixed ? 1 : 2, Math.round(120 / pxDay)); // program milestones closer than ~120 px merge (TsCGrill 9)
|
|
168
|
-
const ov = overlay(W, X, now, sprint, rel);
|
|
251
|
+
const ov = overlay(W, X, now, sprint, rel), pxPct = (tpx * (W.fixed ? 1 : ratio)) / 100;
|
|
169
252
|
const ra = rel && day(rel.iso), sa = sprint && day(sprint.start), sb = sprint && day(sprint.end);
|
|
170
253
|
// an undated program member's track says so beside today, where the view opens
|
|
171
254
|
const ND = `<span class="tg-nd" style="left:${P(Math.min(90, Math.max(0, X(now))))}">No dates</span>`;
|
|
@@ -183,11 +266,11 @@ function scaled(rows, M, o) {
|
|
|
183
266
|
const ext = (r) => { const x = extentOf(r, now); return x ? ` data-a="${X(x.a).toFixed(3)}" data-b="${X(x.b).toFixed(3)}"` : ''; };
|
|
184
267
|
if (o.phone) {
|
|
185
268
|
// TsCPhone: each row carries its name above its bar; the name stays at the left while you swipe
|
|
186
|
-
const one = (r) => `<div class="tgq-r${o.sel === r.key ? ' sel' : ''}" data-row="${esc(r.key)}"><button type="button" class="tgq-n ini2" data-key="${esc(r.key)}" aria-label="${esc(r.title + ', ' + o.status(r).text)}"><i class="cz-dot ${toneOf(r)}" aria-hidden="true"></i><b>${esc(r.title)}</b></button><div class="tg-p"${ext(r)}>${ov}${dated(r) ? qBar(r, X, now, true, fmt) + edgeTabs(r, X, now, true) : ND}</div></div>`;
|
|
269
|
+
const one = (r) => `<div class="tgq-r${o.sel === r.key ? ' sel' : ''}" data-row="${esc(r.key)}"><button type="button" class="tgq-n ini2" data-key="${esc(r.key)}" aria-label="${esc(r.title + ', ' + o.status(r).text)}"><i class="cz-dot ${toneOf(r)}" aria-hidden="true"></i><b>${esc(r.title)}</b></button><div class="tg-p"${ext(r)}>${ov}${dated(r) ? qBar(r, X, now, true, fmt, pxPct) + edgeTabs(r, X, now, true) : ND}</div></div>`;
|
|
187
270
|
const body = G ? G.map((g) => {
|
|
188
271
|
if (g.kind !== 'program') return o.prodHtml(g) + (o.folded(g.key) ? '' : g.rows.map(one).join(''));
|
|
189
272
|
const st = o.progState(g.program), s2 = progSpan(g);
|
|
190
|
-
const br = s2 ?
|
|
273
|
+
const br = s2 ? progLine(g, s2, X, now) : '';
|
|
191
274
|
return `<div class="tgq-r tg-pg" data-prow="${esc(g.program.id)}"><div class="tgq-n tg-pgn">${progName(g, st, o)}</div><div class="tg-p">${ov}${br}${progMarks(g, st, X, W, reach, long ? my : null, true)}</div></div>` + (o.folded(g.key) ? '' : g.products.map((x) => x.rows.map(one).join('')).join(''));
|
|
192
275
|
}).join('') : list.map(one).join('');
|
|
193
276
|
const head = `<div class="tgq-h"><div class="tg-p">${ticks}${pill}</div></div>`;
|
|
@@ -197,12 +280,12 @@ function scaled(rows, M, o) {
|
|
|
197
280
|
const head = `<div class="tg-r tg-h"><div class="tg-n"><b>Initiative</b>${back}</div><div class="tg-p">${ticks}${pill}</div></div>`;
|
|
198
281
|
// one line per initiative (PgTimeline): its status dot and its name; the owner and the step stay in the row's title for a pointer and a reader
|
|
199
282
|
const one = (r, cls) => { const s = o.status(r), sub = [r.owner, r.track ? r.track.label : r.stage, s.text].filter(Boolean).join(' · ');
|
|
200
|
-
return `<div class="tg-r${cls || ''}${o.sel === r.key ? ' sel' : ''}" data-row="${esc(r.key)}"><button type="button" class="tg-n ini2" data-key="${esc(r.key)}" title="${esc(sub)}" aria-label="${esc(r.title + ', ' + sub)}"><i class="cz-dot ${toneOf(r)}${toneOf(r) === 'you' ? ' m-info' : toneOf(r) === 'late' || toneOf(r) === 'risk' ? ' m-warn' : ''}" aria-hidden="true"></i><b>${r.inProgram && o.memberIcon ? o.memberIcon(r.inProgram) : ''}${esc(r.title)}</b></button><div class="tg-p"${ext(r)}>${ov}${dated(r) ? qBar(r, X, now, false, fmt) + edgeTabs(r, X, now, false) : ND}</div></div>`; };
|
|
283
|
+
return `<div class="tg-r${cls || ''}${o.sel === r.key ? ' sel' : ''}" data-row="${esc(r.key)}"><button type="button" class="tg-n ini2" data-key="${esc(r.key)}" title="${esc(sub)}" aria-label="${esc(r.title + ', ' + sub)}"><i class="cz-dot ${toneOf(r)}${toneOf(r) === 'you' ? ' m-info' : toneOf(r) === 'late' || toneOf(r) === 'risk' ? ' m-warn' : ''}" aria-hidden="true"></i><b>${r.inProgram && o.memberIcon ? o.memberIcon(r.inProgram) : ''}${esc(r.title)}</b></button><div class="tg-p"${ext(r)}>${ov}${dated(r) ? qBar(r, X, now, false, fmt, pxPct) + edgeTabs(r, X, now, false) : ND}</div></div>`; };
|
|
201
284
|
// programs first, then the product (PgTimeline): the program's row brackets its initiatives' bars and draws its milestones as diamonds
|
|
202
285
|
const body = G ? G.map((g) => {
|
|
203
286
|
if (g.kind !== 'program') return o.prodHtml(g) + (o.folded(g.key) ? '' : g.rows.map((r) => one(r, ' tg-gr')).join(''));
|
|
204
287
|
const last = g.rows[g.rows.length - 1];
|
|
205
|
-
return progRow(g, o.progState(g.program), X, W, ov, o, reach, long ? my : null,
|
|
288
|
+
return progRow(g, o.progState(g.program), X, W, ov, o, reach, long ? my : null, pxPct, now) + (o.folded(g.key) ? '' : g.products.map((x) => (g.products.length > 1 ? o.subHtml(x.name) : '') + x.rows.map((r) => one(r, ' tg-kid' + (r === last ? ' last' : ''))).join('')).join(''));
|
|
206
289
|
}).join('') : list.map((r) => one(r)).join('');
|
|
207
290
|
// the sprint band and the release keep their labels under the axis on Quarter, where a week is wide enough to read them
|
|
208
291
|
const axl = sp === 'quarter' ? `${sa && sb && sb > W.from && sa < W.to ? `<span class="tg-axl sb" style="left:${P(X(sa))}">Jira ${esc(sprint.name.toLowerCase())} · ${esc(md(sa))} – ${esc(md(sb))}</span>` : ''}${ra && ra > W.from && ra < W.to ? `<span class="tg-axl rl" style="left:${P(X(ra))}">${SV(FLAG)}${esc(rel.name)} · ${esc(md(ra))}</span>` : ''}` : '';
|
|
@@ -213,11 +296,26 @@ function scaled(rows, M, o) {
|
|
|
213
296
|
|
|
214
297
|
/** A program's row (PgTimeline .r.pg): its tile, title and products; a thin span from the first start to the last end of its initiatives' dates
|
|
215
298
|
* on record; its milestones as diamonds, the close ones merged into one counted diamond; the next milestone ahead waits at the right edge. */
|
|
216
|
-
function progRow(g, st, X, W, ov, o, reach, fmt, pxPct) {
|
|
299
|
+
function progRow(g, st, X, W, ov, o, reach, fmt, pxPct, now) {
|
|
217
300
|
const p = g.program, sp = progSpan(g);
|
|
218
|
-
const br = sp && sp.hi > W.from && sp.lo < W.to ?
|
|
301
|
+
const br = sp && sp.hi > W.from && sp.lo < W.to ? progLine(g, sp, X, now || new Date()) : '';
|
|
219
302
|
return `<div class="tg-r tg-pg" data-prow="${esc(p.id)}"><div class="tg-n tg-pgn">${progName(g, st, o)}</div><div class="tg-p">${ov}${br}${progMarks(g, st, X, W, reach, fmt, false, pxPct)}</div></div>`;
|
|
220
303
|
}
|
|
304
|
+
/** A program's thin line, dotted where every member is on hold (XtiAGrill 14): the holds of the members, intersected. */
|
|
305
|
+
function progLine(g, sp, X, now) {
|
|
306
|
+
const seg = (a, b, cls) => `<span class="tg-span${cls}" style="left:${P(X(a))};width:${P(Math.max(0.3, X(b) - X(a)))}"></span>`;
|
|
307
|
+
let all = null;
|
|
308
|
+
for (const r of g.rows) {
|
|
309
|
+
const mine = holdSpans(r, now).map((x) => [x.a, x.b]);
|
|
310
|
+
all = all === null ? mine : all.flatMap(([a, b]) => mine.map(([c, d]) => [a > c ? a : c, b < d ? b : d]).filter(([x, y]) => y > x));
|
|
311
|
+
if (!all.length) break;
|
|
312
|
+
}
|
|
313
|
+
const cut = (all || []).map(([a, b]) => [a < sp.lo ? sp.lo : a, b > sp.hi ? sp.hi : b]).filter(([a, b]) => b > a).sort((x, y) => x[0] - y[0]);
|
|
314
|
+
if (!cut.length) return seg(sp.lo, sp.hi, '');
|
|
315
|
+
let out = '', at = sp.lo;
|
|
316
|
+
for (const [a, b] of cut) { if (a > at) out += seg(at, a, ''); out += seg(a > at ? a : at, b, ' ho'); if (b > at) at = b; }
|
|
317
|
+
return out + (at < sp.hi ? seg(at, sp.hi, '') : '');
|
|
318
|
+
}
|
|
221
319
|
/** The first start and the last end of a program's initiatives' dates on record (its own start and target where the charter holds them). */
|
|
222
320
|
function progSpan(g, own) {
|
|
223
321
|
const p = g.program, ds = g.rows.flatMap((r) => [day(r.start), day(r.end), r.track && day(r.track.forecast)]).filter(Boolean);
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Nothing here invents a value: what no record holds is shown as "—" or not drawn. */
|
|
11
11
|
import { esc } from './premium-shell.js';
|
|
12
12
|
import * as WF from './bd-wf.js';
|
|
13
|
+
import { nextHtml } from './bd-next.js';
|
|
13
14
|
|
|
14
15
|
let A = null; // the page: { M(), statusOf(r), usual(t), trail(r), docMeta(path, ws), sel(), groups(L), folded(key), laneHead(g), subTile(name), memberIcon(id), programOf(r), programs(),
|
|
15
16
|
// wf() → { list, cur, ended } the workflows on the board, the picked one (null for All) and the rows that ended (pm/bd-wf.js) }
|
|
@@ -47,7 +48,7 @@ export function outOf(r) {
|
|
|
47
48
|
}
|
|
48
49
|
/** A progress bar; a count (tickets, parts) is striped so it never reads as points (BdPanel). */
|
|
49
50
|
export const barHtml = (o, cls = '') => (o ? `<span class="bd-bar${cls ? ' ' + cls : ''}" role="img" aria-label="${esc(o.label || o.pct + '%')}${o.count ? ' (by count)' : ''}"><i class="${o.count ? 'cnt' : ''}" style="width:${Math.max(0, Math.min(100, o.pct))}%"></i></span>` : '<span class="bd-bar" aria-hidden="true"><i style="width:0"></i></span>');
|
|
50
|
-
const stepText = (r, days) => { const t = r.track || {}, w = WF.stageOfRow(r); return ((w && w.name) || t.label || r.stage || 'No stage') + (days && t.days
|
|
51
|
+
const stepText = (r, days) => { const t = r.track || {}, w = WF.stageOfRow(r); return ((w && w.name) || t.label || r.stage || 'No stage') + (days && t.days ? ' · ' + t.days + 'd' : ''); }; // "· 0d" is silence
|
|
51
52
|
const CAT_TONE = { todo: '', doing: 'y', done: 'ok', wontdo: '', archived: '' };
|
|
52
53
|
/** The category pill of the List (WfAElse): To do, In progress, Done, Won't do, Archived. */
|
|
53
54
|
const catPill = (r) => { const c = WF.catOfRow(r); return c ? `<span class="bd-pill${CAT_TONE[c] ? ' ' + CAT_TONE[c] : ''}">${esc(WF.catLabel(c))}</span>` : '<span class="bd-amut">—</span>'; };
|
|
@@ -57,7 +58,8 @@ const nextOf = (r) => { const t = r.track || {}; if (typeof t.next === 'string'
|
|
|
57
58
|
/* ── List (BdList) ───────────────────────────────────────────────────────────────────────────────────────────── */
|
|
58
59
|
let sortBy = null, meOpen = false; // null: by product with All products (PgList), else by need, until a column title is pressed
|
|
59
60
|
// the Kind column became Workflow, with Stage and Category after it (WfAElse)
|
|
60
|
-
|
|
61
|
+
// the Output bar column is gone (XocAList): Next says what finishes the step, with its count
|
|
62
|
+
const COLS = [['title', 'Initiative'], ['wf', 'Workflow'], ['stage', 'Stage'], ['cat', 'Category'], ['need', 'Status'], ['owner', 'Owner'], ['', 'Next'], ['finish', 'Finish'], ['', '']];
|
|
61
63
|
// with a program on the board (PgList): Product and Program after the initiative, both sortable; a row with no program leaves the cell empty
|
|
62
64
|
const PCOLS = [COLS[0], ['product', 'Product'], ['program', 'Program'], ...COLS.slice(1)];
|
|
63
65
|
const progOf = (r) => (A.programOf ? A.programOf(r) : null);
|
|
@@ -75,15 +77,15 @@ const SORTS = {
|
|
|
75
77
|
export function setSort(k) { if (SORTS[k]) sortBy = k; }
|
|
76
78
|
export function toggleME() { meOpen = !meOpen; }
|
|
77
79
|
function listRow(r, pg) {
|
|
78
|
-
const s = statusLine(r), sel = A.sel && A.sel() === r.key, finish = r.end ? r.finish : '
|
|
80
|
+
const s = statusLine(r), sel = A.sel && A.sel() === r.key, finish = r.end ? r.finish : '';
|
|
79
81
|
const p = pg ? progOf(r) : null, prod = pg ? r.product || A.product() : '';
|
|
80
82
|
const pcells = pg ? `<span role="cell" class="bd-pt">${A.tileHtml(prod, 'bd-ti s')}<span class="bd-ell">${esc(prod)}</span></span><span role="cell" class="bd-pt">${p ? A.progTile('bd-pti s') + `<span class="bd-ell">${esc(p.title)}</span>` : ''}</span>` : '';
|
|
81
83
|
return `<div class="bd-lt${sel ? ' sel' : ''}${r.acts && r.acts.life === 'hold' ? ' held' : ''}" role="row" data-row="${esc(r.key)}">`
|
|
82
84
|
+ `<button type="button" class="bd-ltn ini2" data-key="${esc(r.key)}" role="rowheader" aria-haspopup="dialog"><b>${esc(r.title)}</b></button>${pcells}`
|
|
83
85
|
+ `<span role="cell" class="bd-wfn">${WF.wfIcon(WF.wfOf(r), 18)}<span class="bd-ell">${esc(WF.wfOf(r).name)}</span></span><span role="cell">${(r.track || {}).ms ? '<i class="cz-ms" aria-hidden="true"></i>' : ''}${esc(stepText(r, true))}</span><span role="cell">${catPill(r)}</span>`
|
|
84
86
|
+ `<span role="cell" class="cs s-${s.tone}"><i class="cz-dot ${s.tone} ${s.mo || ''}"></i>${esc(s.text)}</span>`
|
|
85
|
-
+ `<span role="cell">${avatar(r.owner)}</span><span role="cell" class="bd-
|
|
86
|
-
+ `<span role="cell"${r.over ? ' class="bd-late"' : ''}>${esc(finish)}</span
|
|
87
|
+
+ `<span role="cell">${avatar(r.owner)}</span><span role="cell" class="bd-nxc">${nextHtml(r, { self: M().board.self, due: false })}</span>`
|
|
88
|
+
+ `<span role="cell"${r.over ? ' class="bd-late"' : ''}>${esc(finish)}</span>`
|
|
87
89
|
+ `<button type="button" class="bd-ib sm" data-rowmenu="${esc(r.key)}" aria-haspopup="menu" aria-expanded="false" aria-label="More for ${esc(r.title)}" title="Actions">${SV(MORE)}</button></div>`;
|
|
88
90
|
}
|
|
89
91
|
export function listHtml(L, filtered) {
|
|
@@ -139,7 +139,6 @@ body.bd-page main.bd-main { position: relative; max-width: none; margin: 16px; p
|
|
|
139
139
|
.bt-nmh { padding: 7px 14px; display: flex; align-items: flex-start; gap: 4px; line-height: 1.25; } /* top-aligned with the step names (AgBoard) */
|
|
140
140
|
.bt-nmh span { font-size: 12px; }
|
|
141
141
|
.bt-oh { padding: 7px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; line-height: 1.25; }
|
|
142
|
-
.bt-oh .lg { align-self: flex-end; padding-bottom: 1px; } /* the legend sits on the counts' line */
|
|
143
142
|
.lg { display: flex; gap: 8px; align-items: center; font-size: 11px; font-weight: 600; color: var(--cz-ink3); }
|
|
144
143
|
.lg i { display: inline-block; width: 10px; height: 6px; border-radius: 2px; margin-right: 4px; vertical-align: 1px; }
|
|
145
144
|
.lg i.dn { background: var(--bd-done); } .lg i.rv { background: var(--bd-rv); } .lg i.ip { background: var(--bd-ip); } .lg i.bl { background: var(--cz-dot-red); } .lg i.yo { background: var(--cz-blue); }
|
|
@@ -179,6 +178,19 @@ body.bd-page main.bd-main { position: relative; max-width: none; margin: 16px; p
|
|
|
179
178
|
.bt-dl .t3 { font-size: 11.5px; color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 14px; }
|
|
180
179
|
.bt-dl .t3 em, .pk-box em { font-style: normal; font-weight: 700; }
|
|
181
180
|
.seg5 { display: flex; gap: 3px; height: 8px; }
|
|
181
|
+
/* the Next cell (pm/bd-next.js; canvas XocA, XocAList, XocAPhone): verb in ink, the object in blue ink, the count muted on the right, the icon lit on the row's hover */
|
|
182
|
+
.bd-nx { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--cz-ink); white-space: nowrap; }
|
|
183
|
+
.bd-nx .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
184
|
+
.bd-nx em { font-style: normal; font-weight: 800; color: var(--cz-blueink); }
|
|
185
|
+
.bd-nx em.red { color: var(--cz-red); }
|
|
186
|
+
.bd-nx .cz-dot { width: 7px; height: 7px; }
|
|
187
|
+
.bd-nx .mu { margin-left: auto; flex: none; font-size: 11.5px; font-weight: 600; color: var(--cz-ink3); }
|
|
188
|
+
.bd-nxa { all: unset; box-sizing: border-box; flex: none; width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink3); border: 1px solid var(--cz-hair); cursor: pointer; }
|
|
189
|
+
.bd-nx .tx + .bd-nxa { margin-left: auto; }
|
|
190
|
+
.bd-nxa svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
|
|
191
|
+
.bt-l:hover .bd-nxa, .bd-lt:hover .bd-nxa, .bt-l:focus-within .bd-nxa, .bd-lt:focus-within .bd-nxa { background: var(--cz-bluebg); color: var(--cz-blueink); border-color: transparent; }
|
|
192
|
+
.bd-nxa:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
193
|
+
.bd-nxc { min-width: 0; }
|
|
182
194
|
.seg5.big { height: 8px; }
|
|
183
195
|
.seg5 > button, .seg5 > i { flex: 1; min-width: 3px; border-radius: 3px; border: 0; padding: 0; background: var(--bd-rail); }
|
|
184
196
|
.seg5 > button { cursor: pointer; }
|
|
@@ -526,8 +538,10 @@ button.tg-n:hover b { color: var(--cz-blueink); }
|
|
|
526
538
|
.sc.ms .cur u { width: 11px; height: 11px; }
|
|
527
539
|
.sc .cur small { display: none; }
|
|
528
540
|
.bt-dl { grid-area: dl; border: 0; padding: 9px 0 0; gap: 4px; }
|
|
529
|
-
.bt-dl
|
|
530
|
-
.bt-
|
|
541
|
+
.bt-dl:empty { display: none; }
|
|
542
|
+
.bt-l:has(.sc .eta) .bt-dl { padding-top: 20px; } /* the committed date under ◆ sits over the line's top */
|
|
543
|
+
.bt-dl .bd-nx { padding-top: 7px; border-top: 1px solid var(--cz-hair); font-size: 13px; }
|
|
544
|
+
.bd-nxa { display: none; }
|
|
531
545
|
.bt-tf { border: 0; background: none; padding: 4px; }
|
|
532
546
|
.bt-tf .dlink { min-height: 44px; }
|
|
533
547
|
.bt-srt { display: none; }
|
|
@@ -830,7 +844,7 @@ button.pk-jt:focus-visible { outline: 2px solid var(--cz-blue); outline-offset:
|
|
|
830
844
|
.bd-qc b { font-size: 14px; font-weight: 800; }
|
|
831
845
|
/* List (BdList) */
|
|
832
846
|
.bd-ltw { border: 1px solid var(--cz-hair); border-radius: 18px; overflow: hidden; background: var(--cz-card); }
|
|
833
|
-
.bd-lt { display: grid; grid-template-columns: minmax(170px, 1.5fr) 140px minmax(100px, .8fr) 100px minmax(130px, 1fr) 54px minmax(
|
|
847
|
+
.bd-lt { display: grid; grid-template-columns: minmax(170px, 1.5fr) 140px minmax(100px, .8fr) 100px minmax(130px, 1fr) 54px minmax(250px, 2.4fr) 70px 36px; gap: 0 12px; align-items: center; min-height: 52px; padding: 0 10px 0 16px; border-top: 1px solid var(--cz-hair); font-size: 13px; }
|
|
834
848
|
.bd-lt.h { border-top: 0; min-height: 40px; background: var(--cz-well); font-size: 12px; font-weight: 800; color: var(--cz-ink3); }
|
|
835
849
|
.bd-lt:hover:not(.h):not(.foot) { background: var(--bd-row); }
|
|
836
850
|
.bd-lt.sel { background: var(--cz-bluebg); }
|
|
@@ -934,8 +948,8 @@ button.sp-n:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: -
|
|
|
934
948
|
.bd-lrow .s.q { color: var(--cz-ink3); }
|
|
935
949
|
.bd-lrow .r { font-size: 12px; font-weight: 700; color: var(--cz-blueink); white-space: nowrap; }
|
|
936
950
|
@media (max-width: 1200px) and (min-width: 721px) {
|
|
937
|
-
.bd-lt { grid-template-columns: minmax(160px, 1.6fr) 120px minmax(100px, .9fr) minmax(120px, 1fr) 44px 70px
|
|
938
|
-
.bd-lt > :nth-child(4)
|
|
951
|
+
.bd-lt { grid-template-columns: minmax(160px, 1.6fr) 120px minmax(100px, .9fr) minmax(120px, 1fr) 44px minmax(140px, 1.4fr) 70px 36px; }
|
|
952
|
+
.bd-lt > :nth-child(4) { display: none; }
|
|
939
953
|
.bd-dt { grid-template-columns: 30px minmax(0, 1.5fr) minmax(0, 1fr) 150px 90px; }
|
|
940
954
|
.bd-dt > :nth-child(6) { display: none; }
|
|
941
955
|
}
|
|
@@ -1074,12 +1088,12 @@ html[data-theme="dark"] body.bd-page { --bd-prog: rgb(180,170,240); --bd-progbg:
|
|
|
1074
1088
|
.bd-sfoot { padding-left: 50px; }
|
|
1075
1089
|
|
|
1076
1090
|
/* List (PgList): Product and Program after the initiative */
|
|
1077
|
-
.bd-ltw.pg .bd-lt { grid-template-columns: minmax(150px, 1.
|
|
1091
|
+
.bd-ltw.pg .bd-lt { grid-template-columns: minmax(150px, 1.6fr) 120px 140px 128px minmax(90px, .8fr) 100px minmax(120px, 1.1fr) 54px minmax(250px, 2.6fr) 70px 36px; }
|
|
1078
1092
|
.bd-ltw.pg .bd-lt.foot { grid-template-columns: 1fr auto; }
|
|
1079
1093
|
.bd-pt { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-weight: 700; font-size: 12.5px; color: var(--cz-ink2); white-space: nowrap; overflow: hidden; }
|
|
1080
1094
|
@media (max-width: 1200px) and (min-width: 721px) {
|
|
1081
|
-
.bd-ltw.pg .bd-lt { grid-template-columns: minmax(150px, 1.6fr) 110px 130px minmax(100px, .9fr) minmax(120px, 1fr) 44px 70px
|
|
1082
|
-
.bd-ltw.pg .bd-lt > :nth-child(4), .bd-ltw.pg .bd-lt > :nth-child(6)
|
|
1095
|
+
.bd-ltw.pg .bd-lt { grid-template-columns: minmax(150px, 1.6fr) 110px 130px minmax(100px, .9fr) minmax(120px, 1fr) 44px minmax(140px, 1.3fr) 70px 36px; }
|
|
1096
|
+
.bd-ltw.pg .bd-lt > :nth-child(4), .bd-ltw.pg .bd-lt > :nth-child(6) { display: none; }
|
|
1083
1097
|
.bd-ltw.pg .bd-lt > :nth-child(2), .bd-ltw.pg .bd-lt > :nth-child(7) { display: inline-flex; }
|
|
1084
1098
|
}
|
|
1085
1099
|
|
|
@@ -1215,3 +1229,34 @@ body.bd-spick .bd-hd .bd-tools { margin-left: auto; }
|
|
|
1215
1229
|
.bd-lrow .wfi { margin-left: 2px; }
|
|
1216
1230
|
.bd-pmore { all: unset; box-sizing: border-box; cursor: pointer; align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; padding: 0 10px; font-size: 12.5px; font-weight: 700; color: var(--cz-ink3); }
|
|
1217
1231
|
.bd-pmore:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; border-radius: 8px; }
|
|
1232
|
+
/* idle time (feedback batch 9 item 8; XtiA1Desk, XtiA2Hold, XtiAHard, XtiA3Phone): a hold breaks the bar into a dotted gap with ⏸ where it stopped
|
|
1233
|
+
* and the return date where it starts again; a plain gap in the dates just breaks it. The pieces square off where they meet a gap. */
|
|
1234
|
+
.tg-bar.xl, .tg-bar.xl > b { border-top-left-radius: 0; border-bottom-left-radius: 0; }
|
|
1235
|
+
.tg-bar.xr { border-top-right-radius: 0; border-bottom-right-radius: 0; }
|
|
1236
|
+
.tg-bar.xr > b { border-top-right-radius: 0; border-bottom-right-radius: 0; }
|
|
1237
|
+
.tg-bar.fd { opacity: .45; }
|
|
1238
|
+
.tg-gap { position: absolute; top: 50%; height: 0; border-top: 2px dotted var(--cz-ink3); opacity: .75; z-index: 1; }
|
|
1239
|
+
.tg-gap.late { border-top-color: var(--cz-dot-late); opacity: 1; }
|
|
1240
|
+
.tg-pz { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--cz-card); border: 1.5px solid var(--cz-ink3); color: var(--cz-ink2); display: inline-flex; align-items: center; justify-content: center; z-index: 4; }
|
|
1241
|
+
.tg-pz.sm { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
|
|
1242
|
+
.tg-pz::after { content: ""; position: absolute; inset: -11px; } /* a 44 px press area around the small mark */
|
|
1243
|
+
.tg-pz svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
|
|
1244
|
+
.tg-pz.sm svg { width: 10px; height: 10px; }
|
|
1245
|
+
.tg-pz.late { border-color: var(--cz-dot-late); color: var(--cz-late); }
|
|
1246
|
+
.tg-pz:hover { background: var(--cz-well); }
|
|
1247
|
+
.tg-pz:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
1248
|
+
.tg-hl { position: absolute; bottom: calc(50% + 7px); transform: translateX(-50%); font-size: 11px; font-weight: 800; color: var(--cz-ink3); white-space: nowrap; z-index: 3; background: var(--cz-card); padding: 0 4px; border-radius: 6px; line-height: 15px; }
|
|
1249
|
+
.tg-hl.late { color: var(--cz-late); }
|
|
1250
|
+
.tg-lab.tg-clash { background: var(--cz-card); padding: 0 4px; border-radius: 6px; transform: translate(10px, -50%); }
|
|
1251
|
+
.tg-span.ho { height: 0; margin-top: 0; border-radius: 0; background: none; border-top: 3px dotted var(--bd-progsp); }
|
|
1252
|
+
.tg-lgd .k.ho { width: 18px; height: 0; border-radius: 0; border-top: 2px dotted var(--cz-ink3); vertical-align: 3px; }
|
|
1253
|
+
/* the ⏸ press (XtiA2Hold): how long, why, the dates; icons to resume now and to change the return date */
|
|
1254
|
+
.bd-hold h4 { margin: 0; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
|
|
1255
|
+
.bd-hold h4 svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
|
|
1256
|
+
.bd-hold p { margin: 0; font-size: 12.5px; color: var(--cz-ink2); line-height: 1.45; }
|
|
1257
|
+
.bd-hold p.late { color: var(--cz-late); }
|
|
1258
|
+
.bd-hold .acts { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
|
|
1259
|
+
.bd-hold .acts input[type="date"] { font: 600 13px var(--cz-sans); color: var(--cz-ink); background: var(--cz-well); border: 1px solid var(--cz-hair); border-radius: 10px; height: 36px; padding: 0 8px; margin-right: auto; }
|
|
1260
|
+
.bd-hold .bd-ib { width: 36px; height: 36px; background: var(--cz-well); }
|
|
1261
|
+
.bd-pp.bd-hold { padding: 14px 16px; gap: 8px; width: 300px; }
|
|
1262
|
+
.bd-pp.bd-hold.sheet { width: auto; }
|
|
@@ -18,7 +18,7 @@ import { onRecording } from './rec-state.js';
|
|
|
18
18
|
import { liveItems, keepOrder, pillLabel, rowLabel, clock, elapsed } from './live-model.js';
|
|
19
19
|
|
|
20
20
|
const esc = (v) => String(v == null ? '' : v).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
21
|
-
const SHEET = '
|
|
21
|
+
const SHEET = new URL('./cozy-live-pill.css', import.meta.url).href;
|
|
22
22
|
const CHECK = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg>';
|
|
23
23
|
const PHONE = '(max-width: 760px)';
|
|
24
24
|
const mac = () => { try { return /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent || ''); } catch { return false; } };
|
|
@@ -24,7 +24,7 @@ export const PLACES = [
|
|
|
24
24
|
export { fabLabel };
|
|
25
25
|
const THEME_KEY = 'pmos.c3.theme';
|
|
26
26
|
const THEMES = [['light', 'Light'], ['dark', 'Dark'], ['auto', 'Auto']];
|
|
27
|
-
const CSS = '
|
|
27
|
+
const CSS = new URL('./cozy-ev.css', import.meta.url).href;
|
|
28
28
|
const N = { news: 0, stale: null, here: 'home' };
|
|
29
29
|
|
|
30
30
|
const store = { get(k) { try { return localStorage.getItem(k); } catch { return null; } }, set(k, v) { try { if (v) localStorage.setItem(k, v); else localStorage.removeItem(k); } catch { /* a private window */ } } };
|
|
@@ -32,7 +32,7 @@ export function ensureCss() {
|
|
|
32
32
|
if (css || typeof document === 'undefined' || !document.head) return;
|
|
33
33
|
css = true;
|
|
34
34
|
if (document.querySelector('link[data-cz-steps-css]')) return;
|
|
35
|
-
const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = '
|
|
35
|
+
const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL('./cozy-steps.css', import.meta.url).href; l.dataset.czStepsCss = ''; document.head.appendChild(l);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/** The 8-tick spinner (it turns in steps; still under reduced motion). */
|