create-pmos 0.638.0 → 0.640.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 +15 -3
- 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/state/discoveries.md +1 -1
- package/workspace/briefing-premium-insights-test.js +5 -5
- package/workspace/changelog.json +14 -2
- package/workspace/guide/intelligence-okr-goals.md +5 -1
- package/workspace/guide/layout.md +3 -1
- package/workspace/intel-report-ui-test.js +1 -1
- package/workspace/intelligence-gaps-ui-test.js +3 -3
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/capture.html +8 -9
- package/workspace/public/pm/buddy-core.js +3 -3
- package/workspace/public/pm/c3-capture.css +21 -23
- package/workspace/public/pm/c3-capture.js +35 -24
- package/workspace/public/pm/cozy-aud.css +10 -6
- package/workspace/public/pm/cozy-buddy.css +33 -34
- package/workspace/public/pm/cozy-buddy.js +1 -1
- package/workspace/public/pm/cozy-goals.css +79 -148
- package/workspace/public/pm/cozy-insights.css +412 -408
- package/workspace/public/pm/cozy-rec-tab.css +43 -41
- package/workspace/public/pm/cozy-rec-tab.js +1 -0
- package/workspace/public/pm/cozy-welcome.css +145 -0
- package/workspace/public/pm/ds-bridge.css +19 -0
- package/workspace/public/pm/premium-goals.js +48 -34
- package/workspace/public/pm/premium-insights.js +50 -50
- package/workspace/public/pm/premium-report-intel.css +30 -30
- package/workspace/public/pm/premium-welcome.js +6 -1
- package/workspace/public/premium-aud.html +9 -4
- package/workspace/public/premium-buddy.html +10 -5
- package/workspace/public/premium-goals.html +15 -10
- package/workspace/public/premium-intelligence.html +17 -11
- package/workspace/public/premium-rec.html +8 -3
- package/workspace/public/premium-welcome.html +14 -8
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
/* pm/cozy-rec-tab.css — the recording tab (batch 12 item 1; canvas In development, XrtA1Tab, XrtA7Room, XrtA6States, XrtA5PhoneRec).
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* On the PMOS design system (design-system-meeting-pages): body.pm-ds, a single column of blocks with the system's 12px gutter, panel
|
|
3
|
+
* corner and raise. The dark stage is only for a shared screen: cozy-rec-tab.js then makes .rt-main a Dark-theme island (pm-ds dark),
|
|
4
|
+
* so every token inside it is the dark one; in the room the page stays light. Only system tokens and type roles. Motion: the red dot
|
|
5
|
+
* breathes while recording; nothing else moves but the clock. */
|
|
4
6
|
body.rt-page { height: 100vh; overflow: hidden; }
|
|
5
|
-
.rt { box-sizing: border-box; height: 100vh; padding:
|
|
6
|
-
.rt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius:
|
|
7
|
-
.rt-side { width: 400px; flex: none; border-radius:
|
|
7
|
+
.rt { box-sizing: border-box; height: 100vh; padding: var(--space-12); display: flex; gap: var(--space-12); }
|
|
8
|
+
.rt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: var(--radius-panel); background: var(--card); color: var(--ink); box-shadow: var(--raise); padding: 14px 20px 18px; box-sizing: border-box; }
|
|
9
|
+
.rt-side { width: 400px; flex: none; border-radius: var(--radius-panel); background: var(--card); box-shadow: var(--raise); overflow: auto; }
|
|
8
10
|
.rt-side[hidden], .rt-ask[hidden], .rt-line[hidden], .rt-bar[hidden], .rt-msg[hidden], .rt-alert[hidden], .rt-past[hidden] { display: none; }
|
|
9
11
|
|
|
10
12
|
/* the dark stage: only while a screen is shared */
|
|
11
|
-
.rt[data-mode="screen"] .rt-main { background: var(--
|
|
13
|
+
.rt[data-mode="screen"] .rt-main { background: var(--ground); color: var(--ink); } /* .rt-main is pm-ds dark here: the dark ground */
|
|
12
14
|
|
|
13
15
|
.rt-hd { display: flex; align-items: center; gap: 10px; min-height: 40px; }
|
|
14
|
-
.rt-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--
|
|
15
|
-
.rt[data-mode="screen"] .rt-dot, .rt[data-mode="room"] .rt-dot { background: var(--
|
|
16
|
-
.rt-clock { font-size: var(--fs-row); font-weight: var(--fw-strong); font-variant-numeric: tabular-nums; color: var(--
|
|
17
|
-
.rt[data-mode="screen"] .rt-clock, .rt[data-mode="room"] .rt-clock { color: var(--
|
|
18
|
-
.rt.late .rt-clock, .rt-past { color: var(--
|
|
16
|
+
.rt-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
|
|
17
|
+
.rt[data-mode="screen"] .rt-dot, .rt[data-mode="room"] .rt-dot { background: var(--alert); animation: rt-breathe 2.4s ease-in-out infinite; }
|
|
18
|
+
.rt-clock { font-size: var(--fs-row); font-weight: var(--fw-strong); font-variant-numeric: tabular-nums; color: var(--muted); line-height: var(--lh-row); }
|
|
19
|
+
.rt[data-mode="screen"] .rt-clock, .rt[data-mode="room"] .rt-clock { color: var(--alert); }
|
|
20
|
+
.rt.late .rt-clock, .rt-past { color: var(--alert); }
|
|
19
21
|
.rt-title { margin: 0; font-size: var(--fs-row); font-weight: var(--fw-strong); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: var(--lh-row); }
|
|
20
22
|
.rt-past { font-size: var(--fs-row); font-weight: var(--fw-strong); line-height: var(--lh-row); }
|
|
21
23
|
.rt-ad { display: inline-flex; align-items: center; flex: none; } /* Adler with headphones (AdH5) */
|
|
@@ -23,63 +25,63 @@ body.rt-page { height: 100vh; overflow: hidden; }
|
|
|
23
25
|
@keyframes rt-breathe { 0%, 100% { opacity: 1 } 50% { opacity: .45 } }
|
|
24
26
|
@media (prefers-reduced-motion: reduce) { .rt-dot { animation: none !important; } }
|
|
25
27
|
|
|
26
|
-
.rt-alert { margin: 6px 0 0; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius:
|
|
28
|
+
.rt-alert { margin: 6px 0 0; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: var(--radius-md); background: var(--alert-tint); color: var(--alert); font-weight: var(--fw-strong); font-size: var(--fs-row); line-height: var(--lh-row); }
|
|
27
29
|
.rt-alert span { flex: 1; }
|
|
28
30
|
|
|
29
31
|
.rt-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 10px; position: relative; }
|
|
30
32
|
.rt-own { flex: 1; min-height: 0; display: flex; }
|
|
31
33
|
.rt-own:empty { display: none; }
|
|
32
|
-
.rt-scr { flex: 1; min-height: 0; border-radius:
|
|
34
|
+
.rt-scr { flex: 1; min-height: 0; border-radius: var(--radius-md); background: var(--ground-night); display: flex; align-items: center; justify-content: center; overflow: hidden; }
|
|
33
35
|
.rt-scr video { max-width: 100%; max-height: 100%; display: block; }
|
|
34
|
-
.rt-scr.off { flex-direction: column; gap:
|
|
35
|
-
.rt-scr.off p { margin: 0; font-size: var(--fs-row); font-weight: var(--fw-strong); color: var(--
|
|
36
|
+
.rt-scr.off { flex-direction: column; gap: var(--space-12); background: var(--card); }
|
|
37
|
+
.rt-scr.off p { margin: 0; font-size: var(--fs-row); font-weight: var(--fw-strong); color: var(--muted); line-height: var(--lh-row); }
|
|
36
38
|
.rt-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
|
|
37
39
|
.rt-wait h2 { margin: 0; font-size: var(--fs-panel); font-weight: var(--fw-strong); line-height: var(--lh-panel); }
|
|
38
|
-
.rt-wait p { margin: 0 0 8px; font-size: var(--fs-body); color: var(--
|
|
40
|
+
.rt-wait p { margin: 0 0 8px; font-size: var(--fs-body); color: var(--muted); max-width: 420px; line-height: var(--lh-body); }
|
|
39
41
|
|
|
40
42
|
/* the meeting so far: one mark per highlight, a card with the moment on hover or focus */
|
|
41
43
|
.rt-line { position: relative; height: 28px; margin: 12px 4px 0; }
|
|
42
|
-
.rt-track { position: absolute; left: 0; right: 0; top: 13px; height: 3px; border-radius: 2px; background: var(--
|
|
43
|
-
.rt-track::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--rt-now, 0%); border-radius: 2px; background: color-mix(in srgb, var(--
|
|
44
|
-
.rt-nowmark { position: absolute; left: var(--rt-now, 0%); top: 4px; width: 2px; height: 20px; border-radius: 1px; background: var(--
|
|
44
|
+
.rt-track { position: absolute; left: 0; right: 0; top: 13px; height: 3px; border-radius: 2px; background: var(--line); }
|
|
45
|
+
.rt-track::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--rt-now, 0%); border-radius: 2px; background: color-mix(in srgb, var(--blue) 70%, transparent); }
|
|
46
|
+
.rt-nowmark { position: absolute; left: var(--rt-now, 0%); top: 4px; width: 2px; height: 20px; border-radius: 1px; background: var(--alert); }
|
|
45
47
|
.rt-mk { position: absolute; left: var(--rt-x); top: 0; transform: translateX(-50%); }
|
|
46
|
-
.rt-star { width: 28px; height: 28px; border: 0; padding: 0; border-radius: 50%; background: transparent; color: var(--
|
|
48
|
+
.rt-star { width: 28px; height: 28px; border: 0; padding: 0; border-radius: 50%; background: transparent; color: var(--blue); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
|
|
47
49
|
.rt-star svg { fill: currentColor; stroke: none; }
|
|
48
|
-
.rt-star:focus-visible { outline:
|
|
49
|
-
.rt-hv { display: none; position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); width: 240px; padding: 10px; border-radius:
|
|
50
|
-
.rt-hv b { font-size: var(--fs-meta); color: var(--
|
|
51
|
-
.rt-hv img { width: 100%; border-radius:
|
|
50
|
+
.rt-star:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
51
|
+
.rt-hv { display: none; position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); width: 240px; padding: 10px; border-radius: var(--radius-md); background: var(--card); color: var(--ink); box-shadow: var(--lift); font-size: var(--fs-body); z-index: 3; flex-direction: column; gap: 4px; line-height: var(--lh-body); }
|
|
52
|
+
.rt-hv b { font-size: var(--fs-meta); color: var(--muted); line-height: var(--lh-meta); }
|
|
53
|
+
.rt-hv img { width: 100%; border-radius: var(--radius-sm); margin-top: 4px; display: block; }
|
|
52
54
|
.rt-mk:hover .rt-hv, .rt-mk:focus-within .rt-hv { display: flex; }
|
|
53
55
|
|
|
54
|
-
.rt-msg { margin: 8px 0 0; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--
|
|
55
|
-
.rt[data-mode="screen"] .rt-msg { color: var(--cz-c-9ea4ad); }
|
|
56
|
+
.rt-msg { margin: 8px 0 0; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--muted); text-align: center; line-height: var(--lh-label); }
|
|
56
57
|
|
|
57
58
|
/* the bar: icon only; Stop is the one red press */
|
|
58
|
-
.rt-bar { display: flex; align-items: center; justify-content: center; gap:
|
|
59
|
+
.rt-bar { display: flex; align-items: center; justify-content: center; gap: var(--space-12); margin-top: var(--space-12); }
|
|
59
60
|
.rt-slot { display: contents; }
|
|
60
|
-
.rt-b { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--
|
|
61
|
+
.rt-b { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
|
|
61
62
|
.rt-b svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
62
|
-
.rt-b.on { background: var(--
|
|
63
|
-
.rt-b.dark { background: var(--
|
|
63
|
+
.rt-b.on { background: var(--ink); color: var(--card); }
|
|
64
|
+
.rt-b.dark { background: var(--ink); color: var(--card); border-color: transparent; }
|
|
64
65
|
.rt-b.dark svg { fill: currentColor; }
|
|
65
|
-
.rt-b.red { width: 64px; border-radius:
|
|
66
|
+
.rt-b.red { width: 64px; border-radius: var(--radius-pill); background: var(--alert); color: var(--card); border-color: transparent; margin-left: var(--space-12); }
|
|
66
67
|
.rt-b.red svg { fill: currentColor; stroke: none; }
|
|
67
68
|
.rt-b.big { width: 64px; height: 64px; border-radius: 50%; margin: 0; }
|
|
68
|
-
.rt-b:focus-visible, .rt-t:focus-visible { outline:
|
|
69
|
+
.rt-b:focus-visible, .rt-t:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
69
70
|
.rt-b:disabled { opacity: .5; cursor: default; }
|
|
70
|
-
.rt[data-mode="screen"] .rt-b:not(.red):not(.on) { background: var(--
|
|
71
|
+
.rt[data-mode="screen"] .rt-b:not(.red):not(.on) { background: var(--card); color: var(--ink); border-color: transparent; }
|
|
71
72
|
.rt-alert .rt-b { width: 36px; height: 36px; background: transparent; border: 0; color: inherit; }
|
|
72
|
-
.rt-scr.off .rt-b { background: var(--
|
|
73
|
+
.rt-scr.off .rt-b { background: var(--ink); color: var(--ground); }
|
|
73
74
|
|
|
74
75
|
/* Stop asks first; the next meeting asks once */
|
|
75
|
-
.rt-ask { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--
|
|
76
|
-
.rt-askc { width: min(420px, calc(100vw - 32px)); box-sizing: border-box; padding: 20px; border-radius:
|
|
76
|
+
.rt-ask { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--ground-night) 35%, transparent); z-index: 5; }
|
|
77
|
+
.rt-askc { width: min(420px, calc(100vw - 32px)); box-sizing: border-box; padding: 20px; border-radius: var(--radius-card); background: var(--card); color: var(--ink); box-shadow: var(--lift); }
|
|
77
78
|
.rt-askc b { font-size: var(--fs-body); line-height: var(--lh-body); }
|
|
78
|
-
.rt-askc p { margin:
|
|
79
|
-
.rt-acts { display: flex; justify-content: flex-end; gap:
|
|
80
|
-
|
|
81
|
-
.rt-t
|
|
82
|
-
.rt-t.
|
|
79
|
+
.rt-askc p { margin: var(--space-8) 0 0; font-size: var(--fs-body); color: var(--ink); line-height: var(--lh-body); }
|
|
80
|
+
.rt-acts { display: flex; justify-content: flex-end; gap: var(--space-8); margin-top: var(--space-16); }
|
|
81
|
+
/* the two answers are the system's Yes / No pair: outline + one filled answer, with words because Stop cannot be undone */
|
|
82
|
+
.rt-t { min-height: 40px; padding: 0 var(--space-16); border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); color: var(--ink); font: var(--fw-strong) var(--fs-row)/var(--lh-row) var(--font-sans); cursor: pointer; }
|
|
83
|
+
.rt-t.red { background: var(--alert); color: var(--card); border-color: transparent; }
|
|
84
|
+
.rt-t.blue { background: var(--blue); color: var(--on-blue); border-color: transparent; }
|
|
83
85
|
|
|
84
86
|
/* a phone: the recording view in the same tab; the side card goes under the stage */
|
|
85
87
|
@media (max-width: 760px) {
|
|
@@ -105,6 +105,7 @@ function drawStage() {
|
|
|
105
105
|
const own = mine || Object.assign(document.createElement('div'), { className: 'rt-own' });
|
|
106
106
|
if (!mine) st.prepend(own);
|
|
107
107
|
$('rt').dataset.mode = S.mode;
|
|
108
|
+
{ const main = $('rt').querySelector('.rt-main'); if (main) main.classList.toggle('dark', S.mode === 'screen'); } // a shared screen: the stage is a Dark-theme island (pm-ds dark)
|
|
108
109
|
const scr = C.screen();
|
|
109
110
|
if (S.mode === 'screen') {
|
|
110
111
|
if (scr.track) {
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/* pm/cozy-welcome.css — the Welcome page (premium-welcome.html, premium-welcome.js; initiative premium-welcome), on the PMOS design
|
|
2
|
+
* system (design-system-meeting-pages). The page no longer loads premium.css: body.pm-ds, the single-column layout, one pm-block per
|
|
3
|
+
* step, the system's inputs and Bar. Every colour, corner, space and shadow is a system token; sizes and weights are the type roles.
|
|
4
|
+
* The step buttons keep their words: a first-run step needs to say where it goes (Next, Import 12 initiatives, Open Home). The
|
|
5
|
+
* Claude-setup panel (cozy-claude-setup.js, cs-*) is drawn here too, so its rules moved with the page. */
|
|
6
|
+
body.pm-ds.wl-page { min-height: 100vh; font-variant-numeric: tabular-nums; overflow-x: hidden; }
|
|
7
|
+
.wl-page h1, .wl-page h2, .wl-page h3, .wl-page p { margin: 0; }
|
|
8
|
+
:where(.wl-page) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
|
|
9
|
+
.wl-page :focus-visible { outline: none; box-shadow: var(--glow); }
|
|
10
|
+
.wl-page .i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
11
|
+
.wl-page .note { font-size: var(--fs-meta); color: var(--muted); line-height: var(--lh-meta); }
|
|
12
|
+
.wl-page .mono, .wl-page code { font-family: var(--font-mono); }
|
|
13
|
+
.wl-page .chip { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--space-8); border-radius: var(--radius-pill); background: var(--well); color: var(--muted); font-size: var(--fs-badge); font-weight: var(--fw-regular); line-height: var(--lh-badge); white-space: nowrap; }
|
|
14
|
+
|
|
15
|
+
/* the toast: the system's Toast, ink on the page */
|
|
16
|
+
.wl-page .toast { position: fixed; z-index: 50; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 24px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: var(--space-12); padding: 10px var(--space-16); border-radius: var(--radius-md); background: var(--ink); color: var(--card); box-shadow: var(--lift); font-size: var(--fs-meta); line-height: var(--lh-meta); transition: opacity var(--duration-enter) var(--ease-out), transform var(--duration-enter) var(--ease-out); }
|
|
17
|
+
.wl-page .toast:empty { display: none; }
|
|
18
|
+
.wl-page .toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
|
|
19
|
+
.wl-page .toast span { overflow-wrap: anywhere; }
|
|
20
|
+
|
|
21
|
+
/* the column */
|
|
22
|
+
.wl-in { position: relative; max-width: 700px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top, 0px)) var(--space-16) calc(40px + env(safe-area-inset-bottom, 0px)); }
|
|
23
|
+
.wl-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); }
|
|
24
|
+
.wl-brand { height: 44px; display: inline-flex; align-items: center; gap: var(--space-12); font-weight: var(--fw-strong); }
|
|
25
|
+
.wl-brand small { font-size: var(--fs-meta); font-weight: var(--fw-regular); line-height: var(--lh-meta); color: var(--muted); }
|
|
26
|
+
|
|
27
|
+
/* the step buttons: primary blue, outline for the second choice, quiet for Not now and Back */
|
|
28
|
+
.wl-page .wl-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); height: 40px; padding: 0 var(--space-16); border-radius: var(--radius-sm); background: var(--blue); color: var(--on-blue); font-size: var(--fs-row); font-weight: var(--fw-strong); line-height: var(--lh-row); white-space: nowrap; transition: background var(--duration-quick) var(--ease-out); }
|
|
29
|
+
.wl-page .wl-btn:active { transform: translateY(1px); }
|
|
30
|
+
.wl-page .wl-btn:disabled { opacity: .4; pointer-events: none; }
|
|
31
|
+
.wl-page .wl-btn.alt { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
|
|
32
|
+
.wl-page .wl-btn.quiet { background: none; color: var(--ink); padding: 0 var(--space-12); }
|
|
33
|
+
@media (hover: hover) { .wl-page .wl-btn.alt:hover, .wl-page .wl-btn.quiet:hover { background: var(--well); } }
|
|
34
|
+
.wl-page .wl-btn svg { width: 16px; height: 16px; }
|
|
35
|
+
|
|
36
|
+
/* the steps: the system's Bar, one per step; the step you are on is the one lit (leaf) */
|
|
37
|
+
.wl-steps { display: flex; gap: var(--space-8); list-style: none; margin: var(--space-24) 0 0; padding: 0; }
|
|
38
|
+
.wl-steps li { flex: 1; min-width: 0; }
|
|
39
|
+
.wl-steps b { display: block; height: 4px; border-radius: var(--radius-pill); background: var(--well); margin-bottom: var(--space-8); overflow: hidden; }
|
|
40
|
+
.wl-steps b i { display: block; height: 100%; width: 0; background: var(--muted); border-radius: var(--radius-pill); transition: width var(--duration-leaf) var(--ease-drift); }
|
|
41
|
+
.wl-steps li[data-s="done"] b i { width: 100%; background: var(--muted); }
|
|
42
|
+
.wl-steps li[data-s="now"] b i { width: 100%; background: var(--leaf); }
|
|
43
|
+
.wl-steps span { display: block; font-size: var(--fs-label); font-weight: var(--fw-strong); line-height: var(--lh-label); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
44
|
+
.wl-steps li[data-s="now"] span { color: var(--ink); }
|
|
45
|
+
@media (prefers-reduced-motion: reduce) { .wl-steps b i { transition: none; } }
|
|
46
|
+
|
|
47
|
+
/* the step: one block */
|
|
48
|
+
.pm-ds .wl-card.pm-block { margin-top: var(--space-16); padding: var(--space-32); display: block; }
|
|
49
|
+
.wl-card h1 { font-size: var(--fs-page); line-height: var(--lh-page); font-weight: var(--fw-strong); text-wrap: balance; }
|
|
50
|
+
.wl-lede { margin-top: 10px; color: var(--muted); max-width: 56ch; text-wrap: pretty; }
|
|
51
|
+
.wl-lede:empty { display: none; }
|
|
52
|
+
.wl-sec { display: flex; align-items: center; gap: 10px; margin: var(--space-32) 0 10px; font-size: var(--fs-section); font-weight: var(--fw-strong); line-height: var(--lh-section); color: var(--ink); }
|
|
53
|
+
.wl-sec .chip { margin-left: auto; }
|
|
54
|
+
.wl-sec0 { margin: 0; }
|
|
55
|
+
|
|
56
|
+
/* fields: the system's Input */
|
|
57
|
+
.wl-f { display: grid; gap: var(--space-16); margin-top: var(--space-24); }
|
|
58
|
+
.wl-f label, .wl-edit label { display: grid; gap: 6px; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--ink); line-height: var(--lh-label); }
|
|
59
|
+
.wl-f label em { font-style: normal; font-weight: var(--fw-regular); color: var(--muted); margin-left: 4px; }
|
|
60
|
+
.wl-f input, .wl-f select, .wl-f textarea, .wl-edit input, .wl-edit select, .wl-q select, .wl-q input, .wl-first-task input {
|
|
61
|
+
height: 40px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); padding: 0 var(--space-12); font: inherit; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink); min-width: 0; width: 100%; }
|
|
62
|
+
.wl-f textarea { height: auto; min-height: 118px; padding: var(--space-12); resize: vertical; }
|
|
63
|
+
.wl-f input:focus, .wl-f select:focus, .wl-f textarea:focus, .wl-edit input:focus, .wl-edit select:focus, .wl-q select:focus, .wl-q input:focus, .wl-first-task input:focus { outline: none; box-shadow: var(--glow); }
|
|
64
|
+
@media (pointer: coarse) { .wl-f input, .wl-f select, .wl-edit input, .wl-edit select, .wl-q select, .wl-q input, .wl-first-task input { font-size: var(--fs-field); min-height: 44px; } }
|
|
65
|
+
|
|
66
|
+
/* rows: the system's ListRow on the well */
|
|
67
|
+
.wl-list { display: grid; gap: var(--space-8); list-style: none; margin: 0; padding: 0; }
|
|
68
|
+
.wl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px var(--space-16); border-radius: var(--radius-md); background: var(--well); width: 100%; text-align: left; }
|
|
69
|
+
@media (hover: hover) { button.wl-row:hover { box-shadow: inset 0 0 0 1px var(--line); } }
|
|
70
|
+
.wl-row > .wl-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--ink); }
|
|
71
|
+
.wl-row b { display: block; font-weight: var(--fw-strong); overflow-wrap: anywhere; }
|
|
72
|
+
.wl-row small { display: block; margin-top: 2px; font-size: var(--fs-meta); color: var(--muted); line-height: var(--lh-meta); }
|
|
73
|
+
.wl-row .path { font: var(--fw-regular) var(--fs-meta)/var(--lh-meta) var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
|
|
74
|
+
.wl-row.off { opacity: .62; }
|
|
75
|
+
.wl-page .wl-tog { min-height: 32px; padding: 0 var(--space-12); border-radius: var(--radius-pill); display: inline-flex; align-items: center; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-label); font-weight: var(--fw-strong); line-height: var(--lh-label); white-space: nowrap; }
|
|
76
|
+
button.wl-row[aria-pressed="true"] .wl-tog { background: var(--leaf); color: var(--card); box-shadow: none; } /* chosen: the switch's leaf */
|
|
77
|
+
.wl-n, .wl-row .wl-ic.wl-n { font: var(--fw-strong) var(--fs-label)/var(--lh-label) var(--font-mono); color: var(--ink); }
|
|
78
|
+
.wl-edit { display: grid; gap: 10px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); margin: 10px 0 0; }
|
|
79
|
+
.wl-ed { background: var(--well); border-radius: var(--radius-md); padding: 14px var(--space-16); }
|
|
80
|
+
.wl-ed .wl-row { padding: 0; background: none; border-radius: 0; }
|
|
81
|
+
.wl-ed .acts { display: flex; gap: 6px; align-items: center; }
|
|
82
|
+
.wl-ed.off b { text-decoration: line-through; text-decoration-color: var(--muted); }
|
|
83
|
+
.wl-page .wl-ed .wgo, .wl-page .wl-q .wgo { flex: none; white-space: nowrap; min-height: 32px; padding: 0 var(--space-12); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-label); font-weight: var(--fw-strong); line-height: var(--lh-label); }
|
|
84
|
+
@media (pointer: coarse) { .wl-ed .wgo, .wl-q .wgo { min-height: 44px; padding: 0 var(--space-16); } .wl-page .wl-btn.quiet { min-height: 44px; } }
|
|
85
|
+
|
|
86
|
+
/* what PMOS will set: the Detail block's fields, flat and dashed (later) */
|
|
87
|
+
.wl-def { margin-top: var(--space-24); border-radius: var(--radius-md); border: 1px dashed var(--line); padding: var(--space-16) 18px; }
|
|
88
|
+
.wl-def dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; margin: 10px 0 0; font-size: var(--fs-meta); line-height: var(--lh-meta); }
|
|
89
|
+
.wl-def dt { color: var(--muted); font-weight: var(--fw-regular); }
|
|
90
|
+
.wl-def dd { margin: 0; color: var(--ink); }
|
|
91
|
+
|
|
92
|
+
.wl-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: var(--space-32); flex-wrap: wrap; }
|
|
93
|
+
.wl-foot .r { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
|
|
94
|
+
.wl-lock { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; }
|
|
95
|
+
.wl-lock svg { width: 16px; height: 16px; margin-top: 2px; }
|
|
96
|
+
.wl-scan { display: grid; gap: var(--space-12); margin-top: var(--space-24); }
|
|
97
|
+
.wl-scan div { display: flex; gap: var(--space-12); align-items: center; color: var(--ink); }
|
|
98
|
+
.wl-scan svg { width: 18px; height: 18px; color: var(--muted); }
|
|
99
|
+
.wl-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--blue); animation: wl-spin .8s linear infinite; flex: none; } /* PMOS working: the one loop allowed */
|
|
100
|
+
@keyframes wl-spin { to { transform: rotate(360deg); } }
|
|
101
|
+
@media (prefers-reduced-motion: reduce) { .wl-spin { animation: none; } }
|
|
102
|
+
.wl-about { margin-top: 18px; }
|
|
103
|
+
.wl-about summary { cursor: pointer; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--ink); padding: var(--space-8) 0; line-height: var(--lh-label); }
|
|
104
|
+
.wl-about ul { margin: var(--space-8) 0 0; padding-left: 18px; font-size: var(--fs-meta); color: var(--muted); line-height: var(--lh-meta); display: grid; gap: 6px; }
|
|
105
|
+
.wl-about code { font: var(--fw-regular) var(--fs-meta)/var(--lh-meta) var(--font-mono); }
|
|
106
|
+
.wl-first { margin-top: var(--space-24); }
|
|
107
|
+
.wl-first-note { margin: var(--space-12) 0 14px; }
|
|
108
|
+
.wl-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
|
|
109
|
+
.wl-err, .wl-bad, .wl-first-err { color: var(--alert); font-size: var(--fs-meta); line-height: var(--lh-meta); margin: var(--space-12) 0 0; }
|
|
110
|
+
.wl-add { margin-top: 10px; }
|
|
111
|
+
.wl-bh { display: flex; align-items: center; gap: 10px; margin: 14px 0 var(--space-8); }
|
|
112
|
+
.wl-qs { display: grid; gap: 14px; margin-top: 14px; }
|
|
113
|
+
.wl-q { display: grid; gap: var(--space-8); }
|
|
114
|
+
.wl-q .wgo { justify-self: start; }
|
|
115
|
+
.wl-in h1:focus { outline: none; box-shadow: none; }
|
|
116
|
+
.wl-ad { max-width: 420px; margin: 0 0 var(--space-12); }
|
|
117
|
+
.wl-hi { margin: 0 0 6px; font-weight: var(--fw-strong); color: var(--ink); }
|
|
118
|
+
.wl-first-task { display: grid; gap: var(--space-12); margin: var(--space-16) 0; }
|
|
119
|
+
.wl-first-task label { display: grid; gap: 6px; }
|
|
120
|
+
.wl-source-progress { margin: var(--space-12) 0; }
|
|
121
|
+
|
|
122
|
+
/* the Claude-setup panel (cozy-claude-setup.js), drawn inside a step */
|
|
123
|
+
.cs-panel { display: grid; gap: 14px; max-width: 100%; }
|
|
124
|
+
.cs-panel p { margin: 0; }
|
|
125
|
+
.cs-label { display: grid; gap: 6px; }
|
|
126
|
+
.cs-label select { max-width: 100%; min-height: 44px; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-8); font: inherit; }
|
|
127
|
+
.cs-actions { display: flex; flex-wrap: wrap; gap: var(--space-8); }
|
|
128
|
+
.cs-term { height: 320px; width: 100%; min-width: 0; overflow: hidden; border-radius: var(--radius-md); }
|
|
129
|
+
.cs-term .xterm { height: 100%; }
|
|
130
|
+
.cs-checklist { padding: var(--space-16); margin: var(--space-8); border: 1px solid var(--line); border-radius: var(--radius-md); font-size: var(--fs-body); line-height: var(--lh-body); }
|
|
131
|
+
.cs-checklist p { margin: var(--space-8) 0; }
|
|
132
|
+
.cs-checklist a { display: inline-block; min-height: 44px; padding: 10px 0; color: var(--blue); text-decoration: underline; }
|
|
133
|
+
|
|
134
|
+
@media (max-width: 640px) {
|
|
135
|
+
.pm-ds .wl-card.pm-block { padding: 22px 18px; border-radius: var(--radius-card); }
|
|
136
|
+
.wl-brand small { display: none; }
|
|
137
|
+
.wl-edit { grid-template-columns: minmax(0, 1fr); }
|
|
138
|
+
.wl-row { grid-template-columns: auto minmax(0, 1fr); }
|
|
139
|
+
.wl-row > :nth-child(3) { grid-column: 2; justify-self: start; }
|
|
140
|
+
.wl-row > :nth-child(3):empty { display: none; }
|
|
141
|
+
.wl-foot { position: sticky; bottom: 0; margin: 28px -18px -22px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--card); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-card) var(--radius-card); z-index: 2; }
|
|
142
|
+
.wl-foot .r { flex: 1; justify-content: flex-end; }
|
|
143
|
+
.wl-foot .wl-btn { flex: 1; }
|
|
144
|
+
.wl-foot .wl-btn.quiet { flex: 0 0 auto; }
|
|
145
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* ds-bridge.css: the bridge from the cozy tokens to the PMOS design system (initiative design-system-meeting-pages).
|
|
2
|
+
* A page that has moved to the system loads brand.css, charts.css and komorebi.css, puts pm-ds on its root, then loads this sheet.
|
|
3
|
+
* Shared modules (rows, sheets, the nav, the presenter) still name the old --cz-* tokens. Here those names point at the system's
|
|
4
|
+
* tokens, so what the shared modules draw on a moved page follows the system too. Only on body.pm-ds: a page without pm-ds is
|
|
5
|
+
* unchanged. Selectors are one step stronger than cozy.css's dark block so the bridge holds in both themes. Remove a name when no
|
|
6
|
+
* shared module uses it any more. */
|
|
7
|
+
:root body.pm-ds, :root body.pm-ds .cz, :root body.pm-ds .pm-ds { /* a nested pm-ds (a Dark-theme island) resolves the names again */
|
|
8
|
+
--cz-ink: var(--ink); --cz-ink2: var(--ink); --cz-ink3: var(--muted);
|
|
9
|
+
--cz-card: var(--card); --cz-well: var(--well); --cz-well2: var(--well); --cz-hair: var(--line);
|
|
10
|
+
--cz-blue: var(--blue); --cz-blueink: var(--blue); --cz-bluebg: var(--blue-tint);
|
|
11
|
+
--cz-late: var(--alert); --cz-latebg: var(--alert-tint); --cz-risk: var(--alert); --cz-riskbg: var(--alert-tint);
|
|
12
|
+
--cz-red: var(--alert); --cz-redbg: var(--alert-tint); --cz-ok: var(--muted); --cz-okbg: var(--well);
|
|
13
|
+
--cz-dot-late: var(--alert); --cz-dot-risk: var(--alert); --cz-dot-red: var(--alert); --cz-dot-ok: var(--muted); --cz-dot-q: var(--line);
|
|
14
|
+
--cz-ground: var(--ground);
|
|
15
|
+
--cz-lift: var(--lift); --cz-float: var(--lift); --cz-sheet: var(--lift); --cz-vlift: var(--raise);
|
|
16
|
+
--cz-sans: var(--font-sans); --cz-mono: var(--font-mono);
|
|
17
|
+
--cz-done: var(--blue); --cz-bubble: var(--blue-tint); --cz-solid: var(--blue); --cz-onsolid: var(--on-blue);
|
|
18
|
+
}
|
|
19
|
+
:root body.pm-ds :focus-visible { outline: none; box-shadow: var(--glow); }
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Search opens Search with Goals' own rows first; Filter shows All, Slipping, Not read or Read (remembered on this device, 'pmos.goals.filt').
|
|
11
11
|
* ⋯ › Charts and dashboards opens the Intelligence page, where the readings, charts and dashboards stay; ⋯ › Export CSV saves the table.
|
|
12
12
|
* Reads GET /api/insights-premium?ws= and GET /api/metric-drafts?ws=&scope=product&id= for each ticked product, again when the tab comes back after a
|
|
13
|
-
* minute. Writes only the North Star draft's ✓ (POST /api/metric-drafts/keep, Undo /undo) and ✕ (/drop).
|
|
13
|
+
* minute. Writes only the North Star draft's ✓ (POST /api/metric-drafts/keep, Undo /undo) and ✕ (/drop).
|
|
14
|
+
*
|
|
15
|
+
* Drawn from the PMOS design system's parts (komorebi.css, scope .pm-ds; design-system/ui/pages.md, Goals): the North Star is a Number block,
|
|
16
|
+
* PMOS's draft of it a Suggestion (✓ ✕), the hierarchy one Table inside a list Block, the menus Menu, the tools icon-only Buttons. */
|
|
14
17
|
import './fetch-share.js';
|
|
15
18
|
import { pmGet, pmPost } from './http.js';
|
|
16
19
|
import { mountNav } from './cozy-nav.js';
|
|
@@ -24,8 +27,9 @@ import { undoToast } from './hi-pop.js';
|
|
|
24
27
|
import { productName, whenNames } from './scope-chip.js'; // names, not ids: the product's display name (IDPF), not its folder name
|
|
25
28
|
|
|
26
29
|
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
27
|
-
const SVG = (d, w =
|
|
30
|
+
const SVG = (d, w = 16) => `<svg class="pm-ic" aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24"><path d="${d}"/></svg>`;
|
|
28
31
|
const I = { check: 'M5 12.5l4.5 4.5L19 7.5', x: 'M6 6l12 12M18 6L6 18', cal: 'M4 5.5h16v14H4zM4 10h16M9 3.5v4M15 3.5v4', spark: 'M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z' };
|
|
32
|
+
const STAR = (w = 16) => `<svg class="pm-ic pm-star" aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24"><path d="${I.spark}"/></svg>`;
|
|
29
33
|
const store = { get(k) { try { return localStorage.getItem(k); } catch { return null; } }, set(k, v) { try { localStorage.setItem(k, v); } catch { /* a private window */ } } };
|
|
30
34
|
const todayIso = () => { const d = new Date(); return d.getFullYear() + '-' + String(d.getMonth() + 1).padStart(2, '0') + '-' + String(d.getDate()).padStart(2, '0'); };
|
|
31
35
|
const FILT = GM.FILTERS.map((f) => f[0]);
|
|
@@ -58,54 +62,64 @@ function drawPer() {
|
|
|
58
62
|
const x = S.list.find((p) => p.model && p.model.okrFile && p.model.okrFile.period);
|
|
59
63
|
const per = x ? GM.periodOf(x.model.okrFile) : null, el = $('glPer');
|
|
60
64
|
el.hidden = !per;
|
|
61
|
-
if (per) el.innerHTML = `${SVG(I.cal, 16)}<b>${esc(per.label)}</b>${per.sub ? `<span>${esc(per.sub)}</span>` : ''}`;
|
|
65
|
+
if (per) el.innerHTML = `${SVG(I.cal, 16)}<b>${esc(per.label)}</b>${per.sub ? `<span class="gl-pers">${esc(per.sub)}</span>` : ''}`;
|
|
62
66
|
}
|
|
63
67
|
|
|
64
|
-
/* ── the North Star
|
|
68
|
+
/* ── the North Star: a Number block once it is set, else PMOS's Suggestion (its draft with ✓ ✕, or ✦ to draft one) ── */
|
|
65
69
|
function nsHtml(p) {
|
|
66
70
|
const ns = p.ns;
|
|
67
|
-
if (ns.state === 'set') return `<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
if (ns.state === 'set') return `<section class="pm-block gl-ns" aria-label="North Star"><div class="head"><h3 class="pm-h-sm">North Star</h3></div><div class="heading">${esc(ns.title)}</div><p class="pm-meta gl-m0">${esc(ns.sub)}</p></section>`;
|
|
72
|
+
const head = `<div class="head"><h3 class="pm-h-sm pm-row">${STAR()}North Star</h3><span class="sp"></span><span class="pm-meta">not set in your OKR file</span></div>`;
|
|
73
|
+
if (ns.state === 'draft') return `<section class="pm-block gl-ns" aria-label="North Star">${head}<div class="pm-sug" role="group" aria-label="PMOS suggests"><span class="say"><b>${esc(ns.title)}</b><br>${esc(ns.sub)}</span>`
|
|
74
|
+
+ `<button type="button" class="pm-btn primary" data-gl-nskeep="${esc(p.ws)}" aria-label="Approve this North Star" title="Approve this North Star">${SVG(I.check)}</button><button type="button" class="pm-btn outline" data-gl-nsdrop="${esc(p.ws)}" aria-label="No, drop this North Star" title="No">${SVG(I.x)}</button></div></section>`;
|
|
75
|
+
return `<section class="pm-block gl-ns" aria-label="North Star">${head}<div class="pm-sug" role="group" aria-label="PMOS suggests"><span class="say"><b>${esc(ns.title)}</b><br>${esc(ns.sub)}</span>`
|
|
76
|
+
+ `<button type="button" class="pm-btn primary" data-gl-setup="${esc(p.ws)}" aria-label="Ask PMOS to draft the North Star" title="Ask PMOS to draft the North Star">${SVG(I.spark)}</button></div></section>`;
|
|
72
77
|
}
|
|
73
78
|
|
|
74
|
-
/* ── the
|
|
75
|
-
const dm = (k) => (k ? `<i class="gl-dm
|
|
76
|
-
const iniHtml = (p, i) => `<button type="button" class="gl-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
79
|
+
/* ── the hierarchy: one Table (rowspans hold an objective's name, its levers and its initiatives beside its key results) ── */
|
|
80
|
+
const dm = (k) => (k ? `<i class="gl-dm${k === 'rd' ? ' rd' : ''}" aria-hidden="true"></i>` : '');
|
|
81
|
+
const iniHtml = (p, i) => `<button type="button" class="gl-hit" data-gl-ws="${esc(p.ws)}" data-gl-ini="${esc(i.id)}"${i.verdict ? ' data-gl-verdict' : ''}><b>${esc(i.title)}</b>${i.line ? `<span class="pm-meta${i.tone ? ' gl-al' : ''}">${dm(i.dm)}${esc(i.line)}</span>` : ''}</button>`;
|
|
82
|
+
const inis = (p, items) => `<div class="gl-inis">${items.map((i) => iniHtml(p, i)).join('')}</div>`;
|
|
83
|
+
const rs = (n) => (n > 1 ? ` rowspan="${n}"` : '');
|
|
84
|
+
function krCells(p, k) {
|
|
85
|
+
const act = k.act ? `<b class="${k.tone ? 'gl-al' : ''}">${esc(k.act)}</b>` : '<span class="pm-meta">—</span>';
|
|
86
|
+
return `<td class="gl-kr"><button type="button" class="gl-hit" data-gl-ws="${esc(p.ws)}" data-gl-kr="${esc(k.key)}" aria-label="${esc(k.token + ' ' + k.title + '. ' + (k.act ? 'Now ' + k.act : 'No reading') + '. ' + k.sub)}">`
|
|
87
|
+
+ `<span><span class="pm-meta gl-tok">${esc(k.token)}</span>${esc(k.title)}</span><span class="pm-meta gl-sub">${esc(k.sub)}</span></button></td>`
|
|
88
|
+
+ `<td class="gl-act">${act}${k.target ? `<span class="pm-meta"> / ${esc(k.target)}</span>` : ''}</td><td class="gl-left pm-meta">${esc(k.left)}</td>`;
|
|
89
|
+
}
|
|
90
|
+
function objRows(p, o) {
|
|
84
91
|
const n = o.krs.length;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
return o.krs.map((k, i) => {
|
|
93
|
+
let h = '';
|
|
94
|
+
if (i === 0) h += `<th scope="rowgroup" class="gl-obj"${rs(n)}><b>${esc(o.label)}</b>${o.title ? `<span class="pm-meta">${esc(o.title)}</span>` : ''}${o.slip ? `<span class="pm-badge alert">${esc(o.slip)}</span>` : ''}</th>`;
|
|
95
|
+
h += krCells(p, k);
|
|
96
|
+
if (i === 0) h += `<td class="gl-lv"${rs(n)}>${o.levers.map((l) => `<div><b>${esc(l.title)}</b><span class="pm-meta${l.tone ? ' gl-al' : ''}">${esc(l.txt)}</span></div>`).join('')}</td>`;
|
|
97
|
+
const c = o.inis.find((x) => x.from === i + 1);
|
|
98
|
+
if (c) h += `<td class="gl-in"${rs(c.span)}>${inis(p, c.items)}</td>`;
|
|
99
|
+
else if (!o.inis.some((x) => i + 1 > x.from && i + 1 < x.from + x.span)) h += '<td class="gl-in"></td>';
|
|
100
|
+
return `<tr${i === 0 ? ' class="gl-first"' : ''}>${h}</tr>`;
|
|
101
|
+
}).join('');
|
|
102
|
+
}
|
|
103
|
+
const wideRow = (head, tone, line, say, items, p) => `<tbody><tr class="gl-first"><th scope="row" class="gl-obj"><b>${esc(head)}</b>${line ? `<span class="pm-meta${tone ? ' gl-al' : ''}">${esc(line)}</span>` : ''}</th>`
|
|
104
|
+
+ `<td class="gl-wide" colspan="4">${say}</td><td class="gl-in">${inis(p, items)}</td></tr></tbody>`;
|
|
91
105
|
function tableHtml(p) {
|
|
92
106
|
const T = p.T;
|
|
93
|
-
if (!p.model.okrFile) return `<p class="gl-none">No OKR file was found for ${esc(nm(p))}, so there is no key result to show. Goals reads the OKR file in planning/okrs/.</p>`;
|
|
94
|
-
if (!T.objectives.length && S.filter !== 'all') return `<p class="gl-none">No key result is ${esc((GM.FILTERS.find((f) => f[0] === S.filter) || [])[1] || '').toLowerCase()} in ${esc(nm(p))}.</p>`;
|
|
95
|
-
const hd = '<
|
|
96
|
-
const bud = T.budgets.map((b) =>
|
|
97
|
-
const un = T.unlinked.length ?
|
|
98
|
-
return `<div class="gl-
|
|
107
|
+
if (!p.model.okrFile) return `<p class="pm-meta gl-none">No OKR file was found for ${esc(nm(p))}, so there is no key result to show. Goals reads the OKR file in planning/okrs/.</p>`;
|
|
108
|
+
if (!T.objectives.length && S.filter !== 'all') return `<p class="pm-meta gl-none">No key result is ${esc((GM.FILTERS.find((f) => f[0] === S.filter) || [])[1] || '').toLowerCase()} in ${esc(nm(p))}.</p>`;
|
|
109
|
+
const hd = '<thead><tr><th scope="col">Objective</th><th scope="col">Key result</th><th scope="col" class="gl-act">Actual / target</th><th scope="col" class="gl-left">Left</th><th scope="col" class="gl-lv">Levers</th><th scope="col">Initiative</th></tr></thead>';
|
|
110
|
+
const bud = T.budgets.map((b) => wideRow('Budget', b.over, b.label + (b.share ? ' · ' + b.share : ''), `<b>No key result: a budget that is always on</b>${b.covers ? `<span class="pm-meta">${esc(b.covers)}</span>` : ''}`, b.items, p)).join('');
|
|
111
|
+
const un = T.unlinked.length ? wideRow('Unlinked', false, '', `<span class="pm-meta">${T.unlinked.length === 1 ? 'An initiative with no key result named' : T.unlinked.length + ' initiatives with no key result named'}</span>`, T.unlinked, p) : '';
|
|
112
|
+
return `<div class="pm-block list gl-tb"><table class="pm-table" aria-label="Goals of ${esc(nm(p))}">${hd}${T.objectives.map((o) => `<tbody>${objRows(p, o)}</tbody>`).join('')}${bud}${un}</table></div>`;
|
|
99
113
|
}
|
|
100
114
|
function draw() {
|
|
101
|
-
if (!S.list.length) { body.innerHTML = `<p class="gl-none">${esc(S.error ? 'Goals could not be read: ' + S.error + '.' : 'No product is ticked. Tick one in the product choice.')}</p>`; $('glNote').hidden = true; return; }
|
|
115
|
+
if (!S.list.length) { body.innerHTML = `<p class="pm-meta gl-none">${esc(S.error ? 'Goals could not be read: ' + S.error + '.' : 'No product is ticked. Tick one in the product choice.')}</p>`; $('glNote').hidden = true; return; }
|
|
102
116
|
const today = todayIso(), many = S.list.length > 1;
|
|
103
117
|
let h = '';
|
|
104
118
|
for (const p of S.list) {
|
|
105
|
-
if (!p.model) { h += `<section class="gl-p">${many ? `<h2 class="
|
|
119
|
+
if (!p.model) { h += `<section class="gl-p">${many ? `<h2 class="pm-h">${esc(nm(p))}</h2>` : ''}<p class="pm-meta gl-none">${esc(nm(p))} could not be read: ${esc(p.error || 'the server did not answer')}.</p></section>`; continue; }
|
|
106
120
|
p.T = GM.tableOf(p.model, today, S.filter);
|
|
107
121
|
p.ns = GM.northStarOf(p.model, p.drafts);
|
|
108
|
-
h += `<section class="gl-p" aria-label="${esc(nm(p))}">${many ? `<h2 class="
|
|
122
|
+
h += `<section class="gl-p" aria-label="${esc(nm(p))}">${many ? `<h2 class="pm-h">${esc(nm(p))}</h2>` : ''}${p.model.okrFile ? nsHtml(p) : ''}${tableHtml(p)}</section>`;
|
|
109
123
|
}
|
|
110
124
|
body.innerHTML = h;
|
|
111
125
|
$('glNote').hidden = false;
|