@byline/admin 4.14.1 → 4.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abilities.js +2 -0
- package/dist/forms/document-actions.d.ts +16 -1
- package/dist/forms/document-actions.js +43 -1
- package/dist/forms/form-renderer.d.ts +6 -1
- package/dist/forms/form-renderer.js +39 -36
- package/dist/forms/form-renderer.module.js +2 -0
- package/dist/forms/form-renderer_module.css +7 -1
- package/dist/forms/form-status-display.d.ts +10 -1
- package/dist/forms/form-status-display.js +4 -2
- package/dist/forms/scheduled-publication-control.d.ts +56 -0
- package/dist/forms/scheduled-publication-control.js +376 -0
- package/dist/forms/scheduled-publication-control.module.js +25 -0
- package/dist/forms/scheduled-publication-control_module.css +95 -0
- package/dist/forms/scheduled-publication-state.d.ts +83 -0
- package/dist/forms/scheduled-publication-state.js +41 -0
- package/dist/forms/scheduled-publication-state.test.node.d.ts +8 -0
- package/dist/forms/scheduled-publication-time.d.ts +57 -0
- package/dist/forms/scheduled-publication-time.js +113 -0
- package/dist/forms/scheduled-publication-time.test.node.d.ts +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/modules/analytics/abilities.d.ts +14 -0
- package/dist/modules/analytics/abilities.js +21 -0
- package/dist/modules/analytics/components/dashboard.d.ts +20 -0
- package/dist/modules/analytics/components/dashboard.js +308 -0
- package/dist/modules/analytics/components/dashboard.module.js +29 -0
- package/dist/modules/analytics/components/dashboard.test.node.d.ts +8 -0
- package/dist/modules/analytics/components/dashboard_module.css +268 -0
- package/dist/modules/analytics/components/timeseries.d.ts +59 -0
- package/dist/modules/analytics/components/timeseries.js +253 -0
- package/dist/modules/analytics/components/timeseries.module.js +17 -0
- package/dist/modules/analytics/components/timeseries_module.css +126 -0
- package/dist/modules/analytics/index.d.ts +9 -0
- package/dist/modules/analytics/index.js +1 -0
- package/dist/modules/analytics/types.d.ts +20 -0
- package/dist/modules/analytics/types.js +1 -0
- package/dist/react.d.ts +1 -0
- package/dist/react.js +1 -0
- package/package.json +23 -7
- package/src/abilities.ts +2 -0
- package/src/forms/document-actions.tsx +73 -0
- package/src/forms/form-renderer.module.css +15 -0
- package/src/forms/form-renderer.tsx +59 -64
- package/src/forms/form-status-display.tsx +12 -0
- package/src/forms/path-widget.test.tsx +20 -8
- package/src/forms/scheduled-publication-control.module.css +149 -0
- package/src/forms/scheduled-publication-control.tsx +590 -0
- package/src/forms/scheduled-publication-datepicker.test.tsx +89 -0
- package/src/forms/scheduled-publication-state.test.node.ts +190 -0
- package/src/forms/scheduled-publication-state.ts +146 -0
- package/src/forms/scheduled-publication-time.test.node.ts +86 -0
- package/src/forms/scheduled-publication-time.ts +218 -0
- package/src/index.ts +1 -0
- package/src/modules/analytics/abilities.ts +33 -0
- package/src/modules/analytics/components/dashboard.module.css +330 -0
- package/src/modules/analytics/components/dashboard.test.node.ts +193 -0
- package/src/modules/analytics/components/dashboard.tsx +371 -0
- package/src/modules/analytics/components/timeseries.module.css +151 -0
- package/src/modules/analytics/components/timeseries.tsx +332 -0
- package/src/modules/analytics/index.ts +14 -0
- package/src/modules/analytics/types.ts +31 -0
- package/src/react.ts +3 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scheduled publication — editor surfaces.
|
|
3
|
+
*
|
|
4
|
+
* Override handles:
|
|
5
|
+
*
|
|
6
|
+
* .byline-scheduled-publication-cell — armed schedule's status-bar cell
|
|
7
|
+
* .byline-scheduled-publication-cell-value — the instant + zone within it
|
|
8
|
+
* .byline-scheduled-publication-notice — needs-reconfirm / overdue Alert
|
|
9
|
+
* .byline-scheduled-publication-notice-actions — that Alert's action row
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* ---------------------------------------------------------------------------
|
|
13
|
+
Status-bar cell — deliberately matches .byline-form-status-cell so an armed
|
|
14
|
+
schedule reads as one more fact about the document, not as a control.
|
|
15
|
+
--------------------------------------------------------------------------- */
|
|
16
|
+
|
|
17
|
+
/* Sits inside the status cell, continuing the line that starts "Status: Draft".
|
|
18
|
+
The success colour carries the meaning: among facts reporting what the
|
|
19
|
+
document already is, this is the one reporting what it is about to do.
|
|
20
|
+
`--text-success` is defined for both themes, so no dark-mode override.
|
|
21
|
+
|
|
22
|
+
Wraps rather than ellipsizing — the instant and its IANA zone are the whole
|
|
23
|
+
message, and half a zone name is worse than a second line. */
|
|
24
|
+
.cell {
|
|
25
|
+
/* Own line while the meta row is stacked. Sharing one line with the status
|
|
26
|
+
value at narrow widths starved it — the ellipsis fell on "Draft" itself,
|
|
27
|
+
which is the last thing that should be abbreviated. */
|
|
28
|
+
flex-basis: 100%;
|
|
29
|
+
color: var(--text-success);
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
overflow-wrap: anywhere;
|
|
32
|
+
white-space: normal;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (min-width: 66rem) {
|
|
36
|
+
/* Once the meta row lays out horizontally there is room to sit on the same
|
|
37
|
+
line as the status, continuing its sentence. */
|
|
38
|
+
.cell {
|
|
39
|
+
flex-basis: auto;
|
|
40
|
+
margin-left: var(--spacing-4);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* When the phrase runs to a second line, "Status: Draft" belongs level with
|
|
44
|
+
its first line — centring leaves the label floating against the middle of
|
|
45
|
+
a two-line block. Scoped with :has so the timestamp cells, which never
|
|
46
|
+
wrap, keep their existing alignment. */
|
|
47
|
+
:global(.byline-form-status-cell):has(> .cell) {
|
|
48
|
+
align-items: flex-start;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* ---------------------------------------------------------------------------
|
|
53
|
+
Notice — the escalated states. Sits below the sticky status bar, full width.
|
|
54
|
+
--------------------------------------------------------------------------- */
|
|
55
|
+
|
|
56
|
+
.notice {
|
|
57
|
+
margin-top: var(--spacing-8);
|
|
58
|
+
margin-bottom: var(--spacing-8);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.notice-body,
|
|
62
|
+
.notice-instant,
|
|
63
|
+
.notice-attempts,
|
|
64
|
+
.notice-error {
|
|
65
|
+
margin: 0 0 var(--spacing-4);
|
|
66
|
+
font-size: var(--font-size-sm);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.notice-instant {
|
|
70
|
+
font-weight: 600;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.notice-attempts {
|
|
74
|
+
color: var(--gray-500);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.notice-error {
|
|
78
|
+
font-family: var(--font-family-mono, monospace);
|
|
79
|
+
overflow-wrap: anywhere;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.notice-actions {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-wrap: wrap;
|
|
85
|
+
align-items: center;
|
|
86
|
+
gap: var(--spacing-8);
|
|
87
|
+
margin-top: var(--spacing-8);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* ---------------------------------------------------------------------------
|
|
91
|
+
Schedule / reschedule modal
|
|
92
|
+
--------------------------------------------------------------------------- */
|
|
93
|
+
|
|
94
|
+
.modalHead {
|
|
95
|
+
padding-top: 1rem;
|
|
96
|
+
margin-bottom: var(--spacing-8);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.modalTitle {
|
|
100
|
+
margin: 0 0 var(--spacing-8) 0;
|
|
101
|
+
font-size: var(--font-size-2xl);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.field {
|
|
105
|
+
display: block;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.help,
|
|
109
|
+
.validation,
|
|
110
|
+
.warningText {
|
|
111
|
+
font-size: var(--font-size-sm);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Belongs to the field above it — the zone qualifies every time shown in the
|
|
115
|
+
picker, so it sits tight under the input and reads at full strength rather
|
|
116
|
+
than as an aside. */
|
|
117
|
+
.help {
|
|
118
|
+
margin: var(--spacing-4) 0 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Standing guidance, not a warning about anything that has happened yet, so it
|
|
122
|
+
is muted rather than claiming an alert colour. */
|
|
123
|
+
.warningText {
|
|
124
|
+
margin: var(--spacing-12) 0 0;
|
|
125
|
+
color: var(--gray-500);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.validation {
|
|
129
|
+
margin: var(--spacing-8) 0 0;
|
|
130
|
+
color: var(--red-600);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.choice {
|
|
134
|
+
margin-top: var(--spacing-12);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* The offset chooser only appears for a daylight-saving overlap, and its two
|
|
138
|
+
options carry the whole decision — give it room to show them rather than
|
|
139
|
+
collapsing to a bare chevron. */
|
|
140
|
+
.choice-select {
|
|
141
|
+
min-width: 16rem;
|
|
142
|
+
max-width: 100%;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:is([data-theme="dark"], :global(.dark)) {
|
|
146
|
+
.validation {
|
|
147
|
+
color: var(--red-400, #f87171);
|
|
148
|
+
}
|
|
149
|
+
}
|