@terpjs/react-core 0.31.0 → 0.33.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/src/uiText.tsx CHANGED
@@ -193,8 +193,29 @@ export interface TerpStrings {
193
193
  statUnfavourable: string;
194
194
  /** A figure's sparkline as text; `{points}` is the listed points, each a label and a value. */
195
195
  statTrend: string;
196
- /** The admin hub: names the total on the users and groups cards. */
196
+ /**
197
+ * Named the total on the admin hub's users and groups cards until the hub became a dashboard,
198
+ * whose figures name what they count. Not read by the framework since; kept because a
199
+ * catalog that leaves out a framework string, or carries one the framework does not know, is
200
+ * refused, so an app's catalog written for 0.31.0 still loads.
201
+ */
197
202
  adminHubTotal: string;
203
+ /** The admin hub's headline figure: the accounts that can sign in. */
204
+ adminHubActiveAccounts: string;
205
+ /** Under that figure; `{count}` is the number of deactivated accounts. */
206
+ adminHubDeactivated: string;
207
+ /** The admin hub's figure for the audit trail's last days; `{count}` is how many. */
208
+ adminHubChangesWeek: string;
209
+ /** What that figure's change is measured against. */
210
+ adminHubVsWeekBefore: string;
211
+ /** The admin hub's chart of the trail per day. */
212
+ adminHubChangesPerDay: string;
213
+ /** That chart's series; `{count}` is how many days it draws. */
214
+ adminHubLastDays: string;
215
+ /** That chart's comparison, drawn dashed; `{count}` is how many days it covers. */
216
+ adminHubDaysBefore: string;
217
+ /** The admin hub's share of each kind of change; `{count}` is how many days it covers. */
218
+ adminHubChangesByKind: string;
198
219
  /** A status history read out; `{label}` is what ran and `{runs}` the listed runs, each a label and its ending. */
199
220
  statusHistoryRuns: string;
200
221
  /** A record's own history, from the audit trail, on its admin screen: the section's title. */
@@ -552,6 +573,14 @@ export const DEFAULT_STRINGS: TerpStrings = {
552
573
  statUnfavourable: "unfavourable",
553
574
  statTrend: "Over time: {points}",
554
575
  adminHubTotal: "Total",
576
+ adminHubActiveAccounts: "Active accounts",
577
+ adminHubDeactivated: "{count} deactivated",
578
+ adminHubChangesWeek: "Changes, last {count} days",
579
+ adminHubVsWeekBefore: "vs the week before",
580
+ adminHubChangesPerDay: "Changes per day",
581
+ adminHubLastDays: "Last {count} days",
582
+ adminHubDaysBefore: "The {count} days before",
583
+ adminHubChangesByKind: "Changes by kind, last {count} days",
555
584
  statusHistoryRuns: "{label}, oldest first: {runs}",
556
585
  recordHistory: "History",
557
586
  auditActionCreated: "Created",
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The viewer's own time zone, as an IANA name, or `UTC` where the host cannot say.
3
+ *
4
+ * The one question about the host the app has no answer of its own for. Dates are formatted in
5
+ * the app's locale everywhere, but a calendar day is the viewer's: the admin hub counts the
6
+ * audit trail in the days of whoever is looking at it (ADR 0171). Its own module so the
7
+ * locale gate's allowance covers this one read and nothing that might format beside it.
8
+ */
9
+ export function viewerTimeZone(): string {
10
+ try {
11
+ return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
12
+ } catch {
13
+ return "UTC";
14
+ }
15
+ }