create-pmos 0.637.0 → 0.639.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 +20 -14
- 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 +19 -0
- package/workspace/guide/intelligence-okr-goals.md +5 -1
- package/workspace/guide/layout.md +2 -0
- package/workspace/guide/routine.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/pm/cozy-events-view.js +26 -26
- package/workspace/public/pm/cozy-events.css +124 -123
- package/workspace/public/pm/cozy-events.js +3 -3
- package/workspace/public/pm/cozy-goals.css +79 -148
- package/workspace/public/pm/cozy-insights.css +412 -408
- package/workspace/public/pm/cozy-routine.css +77 -64
- package/workspace/public/pm/cozy-routine.js +18 -14
- 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/premium-events.html +16 -13
- package/workspace/public/premium-goals.html +15 -10
- package/workspace/public/premium-intelligence.html +17 -11
- package/workspace/public/premium-routine.html +11 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.639.0",
|
|
4
4
|
"description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -33,6 +33,25 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.639.0",
|
|
38
|
+
"at": "2026-11-20T01:31:43.688Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1422,
|
|
43
|
+
"t": "Events and Routine are drawn from the PMOS design system",
|
|
44
|
+
"s": "Events and Routine are drawn from the PMOS design system",
|
|
45
|
+
"k": "new"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1424,
|
|
49
|
+
"t": "Goals and Intelligence on the PMOS design system",
|
|
50
|
+
"s": "Goals and Intelligence on the PMOS design system",
|
|
51
|
+
"k": "new"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
36
55
|
{
|
|
37
56
|
"v": "0.637.0",
|
|
38
57
|
"at": "2026-11-20T00:56:06.689Z",
|
|
@@ -327,19 +346,6 @@
|
|
|
327
346
|
"k": "fix"
|
|
328
347
|
}
|
|
329
348
|
]
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
"v": "0.615.0",
|
|
333
|
-
"at": "2026-11-19T03:31:44.083Z",
|
|
334
|
-
"f": 4,
|
|
335
|
-
"prs": [
|
|
336
|
-
{
|
|
337
|
-
"n": 1394,
|
|
338
|
-
"t": "Events audit round 2: product names, report names, old drafts, people's names",
|
|
339
|
-
"s": "Events audit round 2: product names, report names, old drafts, people's names",
|
|
340
|
-
"k": "fix"
|
|
341
|
-
}
|
|
342
|
-
]
|
|
343
349
|
}
|
|
344
350
|
]
|
|
345
351
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-20T01:31:39Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-20T01:31:39Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-20T01:31:39Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -145,11 +145,11 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
145
145
|
|
|
146
146
|
/* G1 the Goals table (re-pointed back, batch 18 item 11 gap: the agreed goals dashboard is Iq8Overview again, GcJ2FirstMonday and GcJ4Full;
|
|
147
147
|
* the budget over its cap also keeps the one red, pulsing dot of a broken limit) */
|
|
148
|
-
{ const g = await p.evaluate(() => { const r = [...document.querySelectorAll('#goalTbl .ins-grp')].map((x) => x.textContent.replace(/\s+/g, ' ').trim()), a = document.querySelector('#goalTbl [data-goal="krm-act"]'); return { groups: r, title: a.querySelector('.nm b').textContent, type: a.querySelector('.ins-type').textContent, sub: a.querySelector('.ins-sub').textContent, val: a.querySelector('.val b').textContent, of: a.querySelector('.val .note').textContent, today: !!a.querySelector('.ins-bar1 .today'), spark: !!a.querySelector('svg.ins-spark .pj'), pace: a.querySelector('.pace').textContent, moves: [...a.querySelectorAll('.ins-ini')].map((m) => m.querySelector('.n').textContent + ':' + m.querySelectorAll('.ins-trk i').length + ':' + [...m.querySelectorAll('.ins-trk i')].findIndex((i) => i.classList.contains('c')) + ':' + m.querySelectorAll('.ins-trk i.m').length + ':' + ((m.querySelector('.
|
|
148
|
+
{ const g = await p.evaluate(() => { const r = [...document.querySelectorAll('#goalTbl .ins-grp')].map((x) => x.textContent.replace(/\s+/g, ' ').trim()), a = document.querySelector('#goalTbl [data-goal="krm-act"]'); return { groups: r, title: a.querySelector('.nm b').textContent, type: a.querySelector('.ins-type').textContent, sub: a.querySelector('.ins-sub').textContent, val: a.querySelector('.val b').textContent, of: a.querySelector('.val .note').textContent, today: !!a.querySelector('.ins-bar1 .today'), spark: !!a.querySelector('svg.ins-spark .pj'), pace: a.querySelector('.pace').textContent, moves: [...a.querySelectorAll('.ins-ini')].map((m) => m.querySelector('.n').textContent + ':' + m.querySelectorAll('.ins-trk i').length + ':' + [...m.querySelectorAll('.ins-trk i')].findIndex((i) => i.classList.contains('c')) + ':' + m.querySelectorAll('.ins-trk i.m').length + ':' + ((m.querySelector('.pm-badge') || {}).textContent || '')) }; });
|
|
149
149
|
ok('G1 key results are grouped by objective, then Health budgets; Delivery trends moved to ⋯ (Iq8Overview)', g.groups.length === 3 && /^Objective 1 · Growth Q4 2026/.test(g.groups[0]) && /3 of 3 behind/.test(g.groups[0]) && /^Objective 2 · Reliability/.test(g.groups[1]) && /^Health budgets always on, judged every week/.test(g.groups[2]), JSON.stringify(g.groups));
|
|
150
150
|
ok('G1 a goal row has its type, direction and start, value of target with the today mark, the so-far line with its pace, and the pace said by its date', g.title === 'Partner activation' && g.type === 'Percentage' && g.sub === 'up is better · from 20% on Jul 1' && g.val === '28%' && g.of === 'of 50%' && g.today && g.spark && /^≈34% by Dec 31/.test(g.pace) && /16 pts short at this pace/.test(g.pace), JSON.stringify(g));
|
|
151
151
|
ok('G1 what moves it is on the lifecycle track with its milestones, and its pill is a delivery fact (ships soon, days over)', g.moves.join() === 'SSO for partners:8:5:2:Ships in 5 days,Self-serve onboarding v2:8:4:2:8 days over', JSON.stringify(g.moves));
|
|
152
|
-
const pills = await p.evaluate(() => Object.fromEntries([...document.querySelectorAll('#goalTbl .ins-ini')].map((m) => [m.querySelector('.n').textContent, (m.querySelector('.
|
|
152
|
+
const pills = await p.evaluate(() => Object.fromEntries([...document.querySelectorAll('#goalTbl .ins-ini')].map((m) => [m.querySelector('.n').textContent, (m.querySelector('.pm-badge') || {}).textContent || ''])));
|
|
153
153
|
ok('G1 an initiative with no owner says No owner; one that has shipped is not "days over" and never "in -N days"', pills['First call kit'] === 'No owner' && pills['Audit log export'] === 'On track' && !Object.values(pills).some((x) => /-\d/.test(x)), JSON.stringify(pills));
|
|
154
154
|
const leg = await p.evaluate(() => document.querySelector('#goalTbl .ins-th .ins-mvh').textContent.replace(/\s+/g, ' '));
|
|
155
155
|
ok('G1 the Moved by header carries the legend: skipped and milestone', /Skipped/.test(leg) && /Milestone/.test(leg), leg);
|
|
@@ -479,7 +479,7 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
479
479
|
const m = await q.evaluate(() => { const vis = (b) => !b.closest('[hidden]') && b.getBoundingClientRect().height > 0; /* re-pointed (insights fix, AgInsPhone): a control keeps the design's size and its 44 px hit area is its ::after */
|
|
480
480
|
const hit = (b) => Math.max(b.getBoundingClientRect().height, parseFloat(getComputedStyle(b, '::after').height) || 0);
|
|
481
481
|
const small = [...document.querySelectorAll('#insBar button, #askWhy, #goalCards .ins-card, #czFab')].filter((b) => vis(b) && hit(b) < 44).map((b) => (b.id || b.className) + ':' + Math.round(hit(b)));
|
|
482
|
-
return { over: document.documentElement.scrollWidth > innerWidth + 1, small, table: getComputedStyle(document.querySelector('#goalTbl')).display, cards: [...document.querySelectorAll('#goalCards .ins-card')].map((c) => c.dataset.goal + ':' + ((c.querySelector('.ins-ch .
|
|
482
|
+
return { over: document.documentElement.scrollWidth > innerWidth + 1, small, table: getComputedStyle(document.querySelector('#goalTbl')).display, cards: [...document.querySelectorAll('#goalCards .ins-card')].map((c) => c.dataset.goal + ':' + ((c.querySelector('.ins-ch .pm-badge') || {}).textContent || '')).join() }; });
|
|
483
483
|
ok(`I11 at 390 px (${theme}) the goals are cards with their status, the table is hidden, there is no sideways scroll and every control is 44 px`, !m.over && m.small.length === 0 && m.table === 'none' && m.cards === 'krm-act:Behind,krm-up:Ahead,krm-ttfc:Behind,krm-nps:Behind', JSON.stringify(m)); // re-pointed (U3): krm-churn has no reading, so it is in the waiting list, not a card
|
|
484
484
|
await R.ctx.close();
|
|
485
485
|
}
|
|
@@ -597,13 +597,13 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
597
597
|
await R.ctx.close();
|
|
598
598
|
}
|
|
599
599
|
|
|
600
|
-
/* I11 fidelity to the Agreed design (AgInsGoals, AgInsPhone): Plus Jakarta Sans, the cozy panel, the pill tabs, the table, the strip and the six tiles */
|
|
600
|
+
/* I11 fidelity to the Agreed design (AgInsGoals, AgInsPhone): Plus Jakarta Sans, the cozy panel, the pill tabs, the table, the strip (the design system's well, #F4F2EE) and the six tiles */
|
|
601
601
|
for (const [w, h] of [[1440, 900], [390, 844]]) {
|
|
602
602
|
const R = await open({ w, h }); await sleep(300);
|
|
603
603
|
const f = await R.page.evaluate(() => { const cs = (s) => getComputedStyle(document.querySelector(s)); const main = cs('main.ins'), tab = cs('#viewChip'), strip = cs('#insHero'), row = document.querySelector('#goalTbl .ins-row').getBoundingClientRect();
|
|
604
604
|
return { font: cs('body').fontFamily, radius: main.borderTopLeftRadius, bg: main.backgroundColor, tabBg: tab.backgroundColor, tabR: tab.borderTopLeftRadius, tabW: tab.fontWeight, stripR: strip.borderTopLeftRadius, stripBg: strip.backgroundColor, rowH: Math.round(row.height), over: document.documentElement.scrollWidth > innerWidth, fab: document.querySelector('#czFab').getBoundingClientRect().width, rail: document.querySelector('#czMenu.ev-rail') ? Math.round(document.querySelector('#czMenu.ev-rail').getBoundingClientRect().width) : 0, fabX: Math.round(document.querySelector('#czFab').getBoundingClientRect().left) }; });
|
|
605
605
|
const phone = w < 720;
|
|
606
|
-
ok(`I11 the page wears the Agreed design at ${w} px: Plus Jakarta Sans, the white panel, the pill View chip, the well strip, the 44 px ⋯ at the top right on a phone (phone design, Ph2_menu), the 72 px rail of places on a desktop (slice 1)`, /^"?Plus Jakarta Sans/.test(f.font) && f.radius === (phone ? '0px' : '28px') && (phone || f.bg === 'rgb(255, 255, 255)') && f.tabBg === 'rgb(244, 243, 240)' && f.tabR === '999px' && +f.tabW >= 600 && (phone || (f.stripR === '16px' && f.stripBg === 'rgb(244,
|
|
606
|
+
ok(`I11 the page wears the Agreed design at ${w} px: Plus Jakarta Sans, the white panel, the pill View chip, the well strip, the 44 px ⋯ at the top right on a phone (phone design, Ph2_menu), the 72 px rail of places on a desktop (slice 1)`, /^"?Plus Jakarta Sans/.test(f.font) && f.radius === (phone ? '0px' : '28px') && (phone || f.bg === 'rgb(255, 255, 255)') && f.tabBg === 'rgb(244, 243, 240)' && f.tabR === '999px' && +f.tabW >= 600 && (phone || (f.stripR === '16px' && f.stripBg === 'rgb(244, 242, 238)' && f.rowH >= 60)) && !f.over && (phone ? f.fab === 44 && f.fabX > 300 : f.rail === 72), JSON.stringify(f));
|
|
607
607
|
if (!phone) {
|
|
608
608
|
await toTrends(R.page);
|
|
609
609
|
const t = await R.page.evaluate(() => { const tiles = [...document.querySelectorAll('#bmBody [data-tile]')].map((x) => x.getBoundingClientRect()); return { n: tiles.length, tileH: tiles.length ? Math.round(tiles[0].height) : 0, over: document.documentElement.scrollWidth > innerWidth }; });
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.639.0",
|
|
4
|
+
"at": "2026-11-20T01:31:43.688Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1422,
|
|
9
|
+
"t": "Events and Routine are drawn from the PMOS design system",
|
|
10
|
+
"s": "Events and Routine are drawn from the PMOS design system",
|
|
11
|
+
"k": "new"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1424,
|
|
15
|
+
"t": "Goals and Intelligence on the PMOS design system",
|
|
16
|
+
"s": "Goals and Intelligence on the PMOS design system",
|
|
17
|
+
"k": "new"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
2
21
|
{
|
|
3
22
|
"v": "0.637.0",
|
|
4
23
|
"at": "2026-11-20T00:56:06.689Z",
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Intelligence: goals, forecasts and the Horizon scan"
|
|
4
4
|
description: "The goal list from the OKR file, what waits on a source, what the numbers mean, forecasts, and the Horizon scan of the portfolio."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-20
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Intelligence
|
|
9
9
|
|
|
10
10
|
Intelligence (`/premium-intelligence.html`) uses the OKR file of a product as its goal list. It reads `pmos/planning/okrs/okrs-*.md` in the product repository, or `planning/okrs/` in PMOS itself. When a file says `Supersedes x.md`, Intelligence does not read `x.md`.
|
|
11
11
|
|
|
12
|
+
## How Goals and Intelligence look
|
|
13
|
+
|
|
14
|
+
Goals and Intelligence use the PMOS design system (see [Layout](layout.md#the-design-system)). On Goals, the North Star is one block. When PMOS drafted it, the draft is a suggestion with ✓ and ✕. The goals are one table: objective, key result, actual and target, days left, levers and initiative. On a phone, the table becomes a list under each objective. On both pages, red means late or at risk, blue means PMOS speaks or waits on you, and a goal on track has no colour.
|
|
15
|
+
|
|
12
16
|
## The goal list
|
|
13
17
|
|
|
14
18
|
- **The period.** The first period in the period chip is the period of the OKR file, for example H2 2026. It is the default, so a filter for one quarter does not hide a goal of the half.
|
|
@@ -125,6 +125,8 @@ The **Product** and **Program** facts go one level up. A program or a product op
|
|
|
125
125
|
|
|
126
126
|
## Events
|
|
127
127
|
|
|
128
|
+
Events is drawn from the PMOS design system. Each group (Late, Today, Coming up) is one card. A suggestion sits in a blue box with ✓ and ✕. Today's date in the small month has a green ring. Undo is the arrow in the toast at the bottom.
|
|
129
|
+
|
|
128
130
|
Events is one page for everything with a date, from every source PMOS reads: your meetings and focus time from the calendar (the same calendar as Today), the milestones and planned finish dates of every initiative and program, your tasks in PMOS and your Jira tickets with a due day, the days a report goes out, and the dates people state in your sources. A date stated in a source is, for example, an ask with a deadline in Slack or email, a date decided in meeting notes, or a release date in Jira or Confluence. PMOS keeps such a date only when the text states the day ("30 Nov"). It does not guess a day from "Friday" or "next week".
|
|
129
131
|
|
|
130
132
|
- Each row starts its grey line with its type: **Meeting**, **Focus time**, **Milestone**, **Task**, **Report** or **Deadline**. A deadline names its source, for example "From Slack · Ang, 18 Nov". Press it to see the line that states the date, with a link to the source.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Routine: everything that repeats"
|
|
4
|
-
timestamp: 2026-11-
|
|
4
|
+
timestamp: 2026-11-20
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Routine: everything that repeats
|
|
@@ -10,6 +10,8 @@ Routine is the place for everything PMOS does by itself on a schedule, and for y
|
|
|
10
10
|
|
|
11
11
|
## The table
|
|
12
12
|
|
|
13
|
+
Routine is drawn from the PMOS design system. A switch that is on is green. A late Next shows as a rust-coloured label. Undo is the arrow in the toast at the bottom.
|
|
14
|
+
|
|
13
15
|
Routine is one table. Each row has these columns:
|
|
14
16
|
|
|
15
17
|
| Column | What it shows |
|
|
@@ -102,7 +102,7 @@ const FINDING = { id: 'rf-0123456789', name: 'Partner numbers to Lee', why: 'You
|
|
|
102
102
|
/* ── H: the header icon and its menu ── */
|
|
103
103
|
const A = await open();
|
|
104
104
|
const p = A.page;
|
|
105
|
-
const hd = await p.evaluate(() => { const ids = [...document.querySelectorAll('#insBar .ins-tools button.
|
|
105
|
+
const hd = await p.evaluate(() => { const ids = [...document.querySelectorAll('#insBar .ins-tools button.pm-btn')].map((b) => b.id); const b = document.querySelector('#repB'); return { ids, label: b && b.getAttribute('aria-label'), text: b && b.textContent.trim(), svg: !!(b && b.querySelector('svg[aria-hidden="true"]')) }; });
|
|
106
106
|
ok('H the report icon sits between Filter and +, icon-only with a label', hd.ids.indexOf('repB') === hd.ids.indexOf('filtB') + 1 && hd.ids.indexOf('newB') === hd.ids.indexOf('repB') + 1 && hd.label === 'Make a report from this' && !hd.text && hd.svg, JSON.stringify(hd));
|
|
107
107
|
await p.click('#repB');
|
|
108
108
|
const mn = await p.evaluate(() => [...document.querySelectorAll('#repMenu [role="menuitem"]')].map((x) => x.querySelector('span').firstChild.textContent));
|
|
@@ -91,15 +91,15 @@ const WEEKLY = { view: 'view', weeks: 3, day: 'Mon', opens: 4 };
|
|
|
91
91
|
const p = A.page;
|
|
92
92
|
// the ✦ line about the goals comes first (batch 16 item 6, GsM1–M5); the finding with its drafted move is the next page
|
|
93
93
|
await until(() => p.evaluate(() => !!document.querySelector('#insPg [data-ins="1"]')), 5000); await p.click('#insPg [data-ins="1"]');
|
|
94
|
-
const s0 = await until(() => p.evaluate(() => { const m = document.querySelector('#insMv'); const b = document.querySelector('#insAct [data-mv="apply"]'); return m && !m.hidden && b ? { mv: m.textContent, label: b.getAttribute('aria-label'), text: b.textContent.trim(), solid: b.classList.contains('
|
|
95
|
-
ok('S the drafted move is said under the finding, with a
|
|
94
|
+
const s0 = await until(() => p.evaluate(() => { const m = document.querySelector('#insMv'); const b = document.querySelector('#insAct [data-mv="apply"]'); return m && !m.hidden && b ? { mv: m.textContent, label: b.getAttribute('aria-label'), text: b.textContent.trim(), solid: b.classList.contains('primary'), two: document.querySelector('#insHero').classList.contains('mv') } : null; }), 5000);
|
|
95
|
+
ok('S the drafted move is said under the finding, with a primary ✓ that is icon-only', !!s0 && s0.mv === MOVE.text && s0.label === MOVE.label && !s0.text && s0.solid && s0.two, JSON.stringify(s0));
|
|
96
96
|
await shot(p, 'gap1-strip-move', '#insHero');
|
|
97
97
|
await p.click('#insAct [data-mv="apply"]');
|
|
98
98
|
await until(() => A.posts.some((x) => x.path === '/api/insight-moves/apply'), 3000);
|
|
99
99
|
const ap = A.posts.find((x) => x.path === '/api/insight-moves/apply');
|
|
100
100
|
ok('S ✓ posts the move\'s sig only, with the product', !!ap && ap.body.sig === MOVE.sig && ap.body.ws === MODEL.board.ws && Object.keys(ap.body).sort().join() === 'board,sig,ws', JSON.stringify(ap));
|
|
101
101
|
ok('S the toast says what changed, with Undo', await until(() => p.evaluate((said) => { const t = document.querySelector('#toast'); return t && t.textContent.includes(said) && /Undo/.test(t.textContent); }, MOVE.said), 3000));
|
|
102
|
-
const s1 = await until(() => p.evaluate(() => { const u = document.querySelector('#insAct [data-mv="undo"]'); return u ? { pill: (document.querySelector('#insAct .
|
|
102
|
+
const s1 = await until(() => p.evaluate(() => { const u = document.querySelector('#insAct [data-mv="undo"]'); return u ? { pill: (document.querySelector('#insAct .pm-badge') || {}).textContent, dn: document.querySelector('#insMv').classList.contains('dn'), apply: !!document.querySelector('#insAct [data-mv="apply"]') } : null; }), 4000);
|
|
103
103
|
ok('S read again, the move is Done with Undo and no ✓', !!s1 && s1.pill === 'Done' && s1.dn && !s1.apply, JSON.stringify(s1));
|
|
104
104
|
await shot(p, 'gap1-strip-done', '#insHero');
|
|
105
105
|
await p.click('#insAct [data-mv="undo"]');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.639.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.639.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -41,7 +41,7 @@ const MONTH = ['January', 'February', 'March', 'April', 'May', 'June', 'July', '
|
|
|
41
41
|
const WD = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
42
42
|
|
|
43
43
|
export const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
44
|
-
const svg = (d, w = 16) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
|
|
44
|
+
const svg = (d, w = 16) => `<svg class="pm-ic" aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
|
|
45
45
|
export const ICON = {
|
|
46
46
|
yes: 'M5 12.5l4.5 4.5L19 7.5', no: 'M6 6l12 12M18 6L6 18', go: 'M9 6l6 6-6 6', back: 'M15 6l-6 6 6 6', plus: 'M12 5v14M5 12h14',
|
|
47
47
|
lock: 'M7 11V8a5 5 0 0 1 10 0v3M5.5 11h13v9h-13z', date: 'M7 5.5h10a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3v-8a3 3 0 0 1 3-3zM4 10h16M8.5 3.5v4M15.5 3.5v4',
|
|
@@ -99,34 +99,34 @@ export function rowHtml(x, o = {}) {
|
|
|
99
99
|
let a = '';
|
|
100
100
|
if (x.suggest) {
|
|
101
101
|
const s = x.suggest;
|
|
102
|
-
a = `<span class="evp-sg"><i class="evp-sp" aria-hidden="true">${svg(ICON.spark, 14)}</i><span title="${esc(s.why || '')}">${esc(s.text)}</span></span>`
|
|
103
|
-
+ `<button type="button" class="evp-ib evp-yes" data-evp-yes aria-label="Yes: ${esc(s.text)}" title="Yes">${svg(ICON.yes, 15)}</button>`
|
|
104
|
-
+ `<button type="button" class="evp-ib" data-evp-no aria-label="No: ${esc(s.text)}" title="No">${svg(ICON.no, 15)}</button>`;
|
|
102
|
+
a = `<span class="evp-sg"><i class="evp-sp pm-star" aria-hidden="true">${svg(ICON.spark, 14)}</i><span class="say" title="${esc(s.why || '')}">${esc(s.text)}</span></span>`
|
|
103
|
+
+ `<button type="button" class="evp-ib evp-yes pm-btn primary" data-evp-yes aria-label="Yes: ${esc(s.text)}" title="Yes">${svg(ICON.yes, 15)}</button>`
|
|
104
|
+
+ `<button type="button" class="evp-ib pm-btn outline" data-evp-no aria-label="No: ${esc(s.text)}" title="No">${svg(ICON.no, 15)}</button>`;
|
|
105
105
|
} else if (x.act && x.act.href) {
|
|
106
|
-
a = `<a class="evp-go" href="${esc(x.act.href)}">${esc(x.act.label)}${svg(ICON.go, 14)}</a>`;
|
|
106
|
+
a = `<a class="evp-go pm-chip" href="${esc(x.act.href)}">${esc(x.act.label)}${svg(ICON.go, 14)}</a>`;
|
|
107
107
|
} else if (x.group === 'today' && x.kind === 'meeting' && x.work && x.work.title) {
|
|
108
108
|
// a meeting or focus time about a piece of work: one press to that work (no record says more, so PMOS does not name the act)
|
|
109
|
-
a = `<button type="button" class="evp-go" data-evp-open aria-label="Open the work: ${esc(x.work.title)}">Open the work${svg(ICON.go, 14)}</button>`;
|
|
109
|
+
a = `<button type="button" class="evp-go pm-chip" data-evp-open aria-label="Open the work: ${esc(x.work.title)}">Open the work${svg(ICON.go, 14)}</button>`;
|
|
110
110
|
} else if (x.group === 'today' && (x.task || x.own)) {
|
|
111
|
-
a = `<button type="button" class="evp-ib" data-evp-done aria-label="Mark it done: ${esc(x.title)}" title="Mark it done">${svg(ICON.done, 16)}</button>`;
|
|
111
|
+
a = `<button type="button" class="evp-ib pm-btn" data-evp-done aria-label="Mark it done: ${esc(x.title)}" title="Mark it done">${svg(ICON.done, 16)}</button>`;
|
|
112
112
|
}
|
|
113
113
|
// the tools show on a row you point at or step to: a new day (edit in place) and Fixed
|
|
114
|
-
const tools = (x.editable && !(x.fixed && x.kind === 'milestone') ? `<label class="evp-ib evp-dt" title="Set a date"><span class="vh">Set a date for ${esc(x.title)}</span>${svg(ICON.date, 15)}<input type="date" data-evp-date value="${esc(x.date)}" /></label>` : '')
|
|
115
|
-
+ (x.canFix ? `<button type="button" class="evp-ib evp-fx" data-evp-fix aria-pressed="${x.fixed ? 'true' : 'false'}" aria-label="${x.fixed ? 'Fixed date. Press to let PMOS suggest a new date' : 'Mark as a fixed date'}" title="${x.fixed ? 'Fixed date' : 'Fixed date: never move it'}">${svg(ICON.lock, 15)}</button>` : '');
|
|
114
|
+
const tools = (x.editable && !(x.fixed && x.kind === 'milestone') ? `<label class="evp-ib evp-dt pm-btn" title="Set a date"><span class="vh">Set a date for ${esc(x.title)}</span>${svg(ICON.date, 15)}<input type="date" data-evp-date value="${esc(x.date)}" /></label>` : '')
|
|
115
|
+
+ (x.canFix ? `<button type="button" class="evp-ib evp-fx pm-btn" data-evp-fix aria-pressed="${x.fixed ? 'true' : 'false'}" aria-label="${x.fixed ? 'Fixed date. Press to let PMOS suggest a new date' : 'Mark as a fixed date'}" title="${x.fixed ? 'Fixed date' : 'Fixed date: never move it'}">${svg(ICON.lock, 15)}</button>` : '');
|
|
116
116
|
// a date stated in a source opens the line that states it, under the row: who said it, when, and a link to the source
|
|
117
117
|
// the sentence from the source only when it says more than the title; else who and when, and the link (say it once)
|
|
118
118
|
const said = x.source && x.source.text && x.source.text.trim().toLowerCase() !== String(x.title).trim().toLowerCase() ? `<q>${esc(x.source.text)}</q>` : '';
|
|
119
119
|
const src = srcOpen ? `<div class="evp-src" data-key="${esc(x.key)}">${said}<span>${esc([x.source.who, x.source.said ? shortDay(x.source.said, today) : ''].filter(Boolean).join(', '))}</span>`
|
|
120
|
-
+ (x.source.link ? `<a class="evp-go" href="${esc(x.source.link)}" target="_blank" rel="noopener">Open in ${esc(x.source.from)}${svg(ICON.go, 14)}</a>` : '')
|
|
121
|
-
+ (x.work ? `<button type="button" class="evp-go" data-evp-open>Open the work${svg(ICON.go, 14)}</button>` : '') + '</div>' : '';
|
|
122
|
-
return `<div class="evp-r${o.child ? ' evp-kid' : ''}${x.fixed ? ' fixed' : ''}${o.busy && o.busy.has(x.key) ? ' busy' : ''}" data-key="${esc(x.key)}" data-kind="${esc(x.kind)}" data-type="${esc(typeOf(x))}" aria-label="${esc(kindWord)}">`
|
|
120
|
+
+ (x.source.link ? `<a class="evp-go pm-chip" href="${esc(x.source.link)}" target="_blank" rel="noopener">Open in ${esc(x.source.from)}${svg(ICON.go, 14)}</a>` : '')
|
|
121
|
+
+ (x.work ? `<button type="button" class="evp-go pm-chip" data-evp-open>Open the work${svg(ICON.go, 14)}</button>` : '') + '</div>' : '';
|
|
122
|
+
return `<div class="evp-r${o.child ? ' evp-kid' : ''}${x.fixed ? ' fixed' : ''}${o.busy && o.busy.has(x.key) ? ' busy' : ''} pm-li" data-key="${esc(x.key)}" data-kind="${esc(x.kind)}" data-type="${esc(typeOf(x))}" aria-label="${esc(kindWord)}">`
|
|
123
123
|
+ `<span class="evp-d ${x.tone || ''}"><b>${esc(d.b)}</b><small>${esc(d.s)}${x.fixed ? ' · fixed' : ''}</small></span>${markHtml(x)}${t}`
|
|
124
|
-
+ `<span class="evp-a">${a}</span><span class="evp-tl">${tools}</span></div>${src}`;
|
|
124
|
+
+ `<span class="evp-a${x.suggest ? ' pm-sug' : ''}">${a}</span><span class="evp-tl">${tools}</span></div>${src}`;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
function groupHtml(key, label, rows, o, head = '', tail = '', n = rows.length, body = null) {
|
|
128
128
|
if (!rows.length) return ''; // zero is silence
|
|
129
|
-
return `<section class="evp-g evp-${key}" aria-label="${esc(label)}"><h2>${esc(label)}<small>${n}</small>${head}</
|
|
129
|
+
return `<section class="evp-g evp-${key} pm-block list" aria-label="${esc(label)}"><div class="head"><h2 class="pm-h">${esc(label)}<small>${n}</small></h2><span class="sp"></span>${head}</div><div class="evp-b rows">${body != null ? body : rows.map((x) => rowHtml(x, o)).join('')}</div>${tail}</section>`;
|
|
130
130
|
}
|
|
131
131
|
const isMeet = (x) => x.kind === 'meeting';
|
|
132
132
|
/** Coming up: a day with BUSY meetings or more is one line, "Fri 20 Nov · 5 meetings", that opens them; every other date keeps its row. */
|
|
@@ -143,7 +143,7 @@ function comingBody(rows, o) {
|
|
|
143
143
|
done.add(x.date);
|
|
144
144
|
const k = 'day:' + x.date, isOpen = open.has(k), dayRows = rows.filter((y) => y.date === x.date && isMeet(y));
|
|
145
145
|
const word = dayRows.every((y) => typeOf(y) === 'focus') ? plural(n, 'focus time', 'focus times') : plural(n, 'meeting', 'meetings');
|
|
146
|
-
html += `<button type="button" class="evp-r evp-day" data-evp-fold="${esc(k)}" aria-expanded="${isOpen ? 'true' : 'false'}"><span class="evp-d"><b>${esc(shortDay(x.date, o.today))}</b><small>${esc(weekday(x.date))}</small></span>${markOf('meeting')}<span class="evp-t"><b>${esc(weekday(x.date) + ' ' + shortDay(x.date, o.today))} · ${n} ${word}</b><small>${esc(dayRows.slice(0, 3).map((y) => (y.time ? y.time + ' ' : '') + y.title).join(', ') + (n > 3 ? ', …' : ''))}</small></span><i class="evp-fi" aria-hidden="true">${svg(ICON.go, 14)}</i></button>`;
|
|
146
|
+
html += `<button type="button" class="evp-r evp-day pm-li" data-evp-fold="${esc(k)}" aria-expanded="${isOpen ? 'true' : 'false'}"><span class="evp-d"><b>${esc(shortDay(x.date, o.today))}</b><small>${esc(weekday(x.date))}</small></span>${markOf('meeting')}<span class="evp-t"><b>${esc(weekday(x.date) + ' ' + shortDay(x.date, o.today))} · ${n} ${word}</b><small>${esc(dayRows.slice(0, 3).map((y) => (y.time ? y.time + ' ' : '') + y.title).join(', ') + (n > 3 ? ', …' : ''))}</small></span><i class="evp-fi" aria-hidden="true">${svg(ICON.go, 14)}</i></button>`;
|
|
147
147
|
if (isOpen) html += dayRows.map((y) => rowHtml(y, { ...o, child: true })).join('');
|
|
148
148
|
}
|
|
149
149
|
return html;
|
|
@@ -164,7 +164,7 @@ export function hiddenHtml(items, o = {}) {
|
|
|
164
164
|
const what = tw + (scoped ? ' of ' + o.scopeWords : '') + (typesCut && onL.length > 3 ? '' : ' only');
|
|
165
165
|
return `<p class="evp-hid" role="status">Showing ${esc(what)} · ${hidden} more hidden · <button type="button" data-evp-showall>Show all</button></p>`;
|
|
166
166
|
}
|
|
167
|
-
const fold = (key, open, text) => `<button type="button" class="evp-fold" data-evp-fold="${key}" aria-expanded="${open ? 'true' : 'false'}"><i aria-hidden="true">${svg(ICON.go, 14)}</i><span>${text}</span></button>`;
|
|
167
|
+
const fold = (key, open, text) => `<button type="button" class="evp-fold pm-fold" data-evp-fold="${key}" aria-expanded="${open ? 'true' : 'false'}"><i aria-hidden="true">${svg(ICON.go, 14)}</i><span>${text}</span></button>`;
|
|
168
168
|
|
|
169
169
|
/** The late rows in view: the newest LATE_SHOWN while the rest are folded, else all. Yes to all takes these. */
|
|
170
170
|
export function lateInView(model, o = {}) {
|
|
@@ -178,7 +178,7 @@ export function listHtml(model, o = {}) {
|
|
|
178
178
|
const open = o.open || new Set();
|
|
179
179
|
// Yes to all says yes only to what is in view: "Yes to these 5" while the older late rows are folded (as the Backlog does)
|
|
180
180
|
const seen = lateInView(model, o), yes = seen.filter((x) => x.suggest).length, folded = seen.length < G.late.length;
|
|
181
|
-
const all = yes > 1 ? `<button type="button" class="evp-all" data-evp-all>${folded ? 'Yes to these' : 'Yes to all'} ${yes}</button>` : '';
|
|
181
|
+
const all = yes > 1 ? `<button type="button" class="evp-all pm-chip" data-evp-all>${folded ? 'Yes to these' : 'Yes to all'} ${yes}</button>` : '';
|
|
182
182
|
const ro = { today, busy: o.busy, open };
|
|
183
183
|
let later = '';
|
|
184
184
|
const on = new Set(o.show || TYPES);
|
|
@@ -189,7 +189,7 @@ export function listHtml(model, o = {}) {
|
|
|
189
189
|
const far = G.later.filter((x) => x.kind === 'milestone'), n = far.length, nx = far[0];
|
|
190
190
|
const years = [...new Set(far.map((x) => x.date.slice(0, 4)))], year = years.length === 1 && years[0] !== String(today).slice(0, 4) ? years[0] : null;
|
|
191
191
|
later = fold('later', open.has('later'), `${n} ${plural(n, 'delivery milestone', 'delivery milestones')} ${year ? 'in ' + esc(year) : 'after the next 30 days'}. The next is ${esc(year ? shortDay(nx.date) : shortDay(nx.date, today))}: ${esc(nx.title)}`)
|
|
192
|
-
+ (open.has('later') && far.length ? `<div class="evp-b evp-far">${far.map((x) => rowHtml(x, ro)).join('')}</div>` : '');
|
|
192
|
+
+ (open.has('later') && far.length ? `<div class="evp-b evp-far pm-block list"><div class="rows">${far.map((x) => rowHtml(x, ro)).join('')}</div></div>` : '');
|
|
193
193
|
}
|
|
194
194
|
// Late: the newest first (the model sorts them), LATE_SHOWN of them, then one line that opens the rest
|
|
195
195
|
let lateRows = G.late, lateTail = '';
|
|
@@ -200,8 +200,8 @@ export function listHtml(model, o = {}) {
|
|
|
200
200
|
}
|
|
201
201
|
const body = groupHtml('late', 'Late', lateRows, ro, all, lateTail, G.late.length) + groupHtml('now', 'Today', G.today, ro) + groupHtml('coming', 'Coming up', G.coming, ro, '', '', G.coming.length, o.day ? null : comingBody(G.coming, ro)) + later;
|
|
202
202
|
if (body) return body;
|
|
203
|
-
if (o.day) return `<p class="evp-quiet">Nothing has a date on ${esc(weekday(o.day) + ' ' + shortDay(o.day, today))}.</p>`;
|
|
204
|
-
return '<p class="evp-quiet">Nothing is late, and nothing has a date in the next 30 days.</p>';
|
|
203
|
+
if (o.day) return `<p class="evp-quiet pm-meta">Nothing has a date on ${esc(weekday(o.day) + ' ' + shortDay(o.day, today))}.</p>`;
|
|
204
|
+
return '<p class="evp-quiet pm-meta">Nothing is late, and nothing has a date in the next 30 days.</p>';
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
/** 'YYYY-MM' moved by n months. */
|
|
@@ -228,7 +228,7 @@ export function monthHtml(ym, items, o = {}) {
|
|
|
228
228
|
const lab = `${t.getUTCDate()} ${MONTH[t.getUTCMonth()]}${xs.length ? ', ' + xs.length + ' ' + plural(xs.length, 'date', 'dates') : ''}`;
|
|
229
229
|
cells += `<button type="button" class="evp-md${out ? ' out' : ''}${k === o.today ? ' now' : ''}${k === o.day ? ' on' : ''}" data-evp-day="${k}" aria-pressed="${k === o.day ? 'true' : 'false'}" aria-label="${esc(lab)}">${t.getUTCDate()}<em>${marks.join('')}</em></button>`;
|
|
230
230
|
}
|
|
231
|
-
return `<div class="evp-mt-top"><button type="button" class="evp-mn" data-evp-full aria-label="${MONTH[m - 1]} ${y}. Open the full calendar">${MONTH[m - 1]} ${y}</button><button type="button" class="evp-ib" data-evp-month="-1" aria-label="The month before" title="The month before">${svg(ICON.back, 16)}</button><button type="button" class="evp-ib" data-evp-month="1" aria-label="The month after" title="The month after">${svg(ICON.go, 16)}</button></div>`
|
|
231
|
+
return `<div class="evp-mt-top"><button type="button" class="evp-mn" data-evp-full aria-label="${MONTH[m - 1]} ${y}. Open the full calendar">${MONTH[m - 1]} ${y}</button><button type="button" class="evp-ib pm-btn" data-evp-month="-1" aria-label="The month before" title="The month before">${svg(ICON.back, 16)}</button><button type="button" class="evp-ib pm-btn" data-evp-month="1" aria-label="The month after" title="The month after">${svg(ICON.go, 16)}</button></div>`
|
|
232
232
|
+ `<div class="evp-mg" role="group" aria-label="${MONTH[m - 1]} ${y}">${cells}</div>`;
|
|
233
233
|
}
|
|
234
234
|
|
|
@@ -240,7 +240,7 @@ export function showHtml(show, o = {}) {
|
|
|
240
240
|
if (unread[k] && !counts[k]) return `<button type="button" class="evp-un" data-evp-connect aria-label="${esc(TYPE_LABEL[k])}: ${esc(unread[k])}. Open Connectors">${markOf(k)}<span>${esc(TYPE_LABEL[k])} · ${esc(unread[k])}</span><span class="evp-on" aria-hidden="true">${svg(ICON.go, 14)}</span></button>`;
|
|
241
241
|
return `<button type="button" data-evp-show="${k}" aria-pressed="${on.has(k) ? 'true' : 'false'}">${markOf(k)}${esc(TYPE_LABEL[k])}${counts[k] ? `<small>${counts[k]}</small>` : ''}<span class="evp-on" aria-hidden="true">${on.has(k) ? svg(ICON.yes, 14) : ''}</span></button>`;
|
|
242
242
|
});
|
|
243
|
-
return `<h3 class="evp-sh">Show</h3><div class="evp-f" role="group" aria-label="Show">${rows.join('')}</div>`
|
|
243
|
+
return `<h3 class="evp-sh pm-h-sm">Show</h3><div class="evp-f" role="group" aria-label="Show">${rows.join('')}</div>`
|
|
244
244
|
+ '<div class="evp-key"><span><i class="evp-k evp-rd late" aria-hidden="true"></i>Late</span><span><i class="evp-k evp-rd risk" aria-hidden="true"></i>At risk</span></div>';
|
|
245
245
|
}
|
|
246
246
|
/** How many dates of each type the page lists (Late, Today, Coming up and the far milestones), under the chip. */
|
|
@@ -264,8 +264,8 @@ export function calHtml(model, o = {}) {
|
|
|
264
264
|
const today = model.today, view = o.view === 'week' ? 'week' : 'month';
|
|
265
265
|
const byDay = new Map();
|
|
266
266
|
for (const x of visible(model.items, o)) { if (!byDay.has(x.date)) byDay.set(x.date, []); byDay.get(x.date).push(x); }
|
|
267
|
-
const seg = `<div class="
|
|
268
|
-
const back = `<button type="button" class="evp-ib" data-evp-list aria-label="Back to the list" title="Back to the list">${svg(ICON.back, 18)}</button>`;
|
|
267
|
+
const seg = `<div class="pm-tabs evp-seg" role="group" aria-label="Calendar view">${['month', 'week'].map((v) => `<button type="button" class="pm-tab" data-evp-view="${v}" aria-pressed="${v === view ? 'true' : 'false'}">${v === 'month' ? 'Month' : 'Week'}</button>`).join('')}</div>`;
|
|
268
|
+
const back = `<button type="button" class="evp-ib pm-btn" data-evp-list aria-label="Back to the list" title="Back to the list">${svg(ICON.back, 18)}</button>`;
|
|
269
269
|
const dayBtn = (k, label) => `<button type="button" class="evp-cd${k === today ? ' now' : ''}" data-evp-day="${k}" aria-label="${esc(label)}. See only this day">${new Date(ms(k)).getUTCDate()}</button>`;
|
|
270
270
|
if (view === 'week') {
|
|
271
271
|
const mon = weekOf(o.day || today);
|
|
@@ -275,7 +275,7 @@ export function calHtml(model, o = {}) {
|
|
|
275
275
|
cols.push(`<div class="evp-wc${k === today ? ' now' : ''}"><div class="evp-wh"><span>${WD[(i + 1) % 7]}</span>${dayBtn(k, weekday(k) + ' ' + shortDay(k, today))}</div>${xs.map(chipHtml).join('')}</div>`);
|
|
276
276
|
}
|
|
277
277
|
const end = addDays(mon, 6);
|
|
278
|
-
return `<div class="evp-ch">${back}<h2>${esc(shortDay(mon, today))} to ${esc(shortDay(end, today))}</h2><button type="button" class="evp-ib" data-evp-week="-1" aria-label="The week before" title="The week before">${svg(ICON.back, 16)}</button><button type="button" class="evp-ib" data-evp-week="1" aria-label="The week after" title="The week after">${svg(ICON.go, 16)}</button>${seg}</div>`
|
|
278
|
+
return `<div class="evp-ch">${back}<h2 class="pm-h">${esc(shortDay(mon, today))} to ${esc(shortDay(end, today))}</h2><button type="button" class="evp-ib pm-btn" data-evp-week="-1" aria-label="The week before" title="The week before">${svg(ICON.back, 16)}</button><button type="button" class="evp-ib pm-btn" data-evp-week="1" aria-label="The week after" title="The week after">${svg(ICON.go, 16)}</button>${seg}</div>`
|
|
279
279
|
+ `<div class="evp-wk" role="group" aria-label="The week of ${esc(shortDay(mon, today))}">${cols.join('')}</div>`;
|
|
280
280
|
}
|
|
281
281
|
const ym = o.ym || String(today).slice(0, 7);
|
|
@@ -288,6 +288,6 @@ export function calHtml(model, o = {}) {
|
|
|
288
288
|
const more = xs.length > 3 ? `<button type="button" class="evp-cm" data-evp-day="${k}">${xs.length - 3} more</button>` : '';
|
|
289
289
|
cells += `<div class="evp-mc${t.getUTCMonth() !== m - 1 ? ' out' : ''}${k === today ? ' now' : ''}">${dayBtn(k, t.getUTCDate() + ' ' + MONTH[t.getUTCMonth()] + (xs.length ? ', ' + xs.length + ' ' + plural(xs.length, 'date', 'dates') : ''))}${xs.slice(0, 3).map(chipHtml).join('')}${more}</div>`;
|
|
290
290
|
}
|
|
291
|
-
return `<div class="evp-ch">${back}<h2>${MONTH[m - 1]} ${y}</h2><button type="button" class="evp-ib" data-evp-month="-1" aria-label="The month before" title="The month before">${svg(ICON.back, 16)}</button><button type="button" class="evp-ib" data-evp-month="1" aria-label="The month after" title="The month after">${svg(ICON.go, 16)}</button>${seg}</div>`
|
|
291
|
+
return `<div class="evp-ch">${back}<h2 class="pm-h">${MONTH[m - 1]} ${y}</h2><button type="button" class="evp-ib pm-btn" data-evp-month="-1" aria-label="The month before" title="The month before">${svg(ICON.back, 16)}</button><button type="button" class="evp-ib pm-btn" data-evp-month="1" aria-label="The month after" title="The month after">${svg(ICON.go, 16)}</button>${seg}</div>`
|
|
292
292
|
+ `<div class="evp-fm" role="group" aria-label="${MONTH[m - 1]} ${y}">${cells}</div>`;
|
|
293
293
|
}
|