@umriss-ui/core 0.50.0 → 0.52.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/de.d.ts CHANGED
@@ -110,7 +110,11 @@ declare interface Wording {
110
110
  /** A value the multi-select took or gave away where no checkbox had the
111
111
  focus to say it - Enter in the search, a chip, Backspace. */
112
112
  optionAdded: (label: string) => string;
113
+ /** The last row of a creatable combobox: the typed text, offered as the value. */
114
+ createOption: (text: string) => string;
113
115
  optionRemoved: (label: string) => string;
116
+ /** Said after a bulk action of the panel: how many values are chosen now. */
117
+ selectionCount: (count: number) => string;
114
118
  /** What stands in the empty field. */
115
119
  palettePlaceholder: string;
116
120
  /** Accessible name of the field. Deliberately kept apart from the
@@ -178,6 +182,9 @@ declare interface Wording {
178
182
  /** Header of the two time columns in the range with time of day. */
179
183
  sideFrom: string;
180
184
  sideTo: string;
185
+ /** Accessible names of the two thumbs of a RangeSlider. */
186
+ rangeSliderFrom: string;
187
+ rangeSliderTo: string;
181
188
  /** Accessible name of the time fields, per side. */
182
189
  startHour: string;
183
190
  startMinute: string;
@@ -188,6 +195,8 @@ declare interface Wording {
188
195
  /** Stepper buttons of a time field; the label comes from above. */
189
196
  timeFieldIncrease: (feld: string) => string;
190
197
  timeFieldDecrease: (feld: string) => string;
198
+ /** Said when a picker takes a new value; the text is the value as the field shows it. */
199
+ pickerPicked: (value: string) => string;
191
200
  /** Footer of the range panels. */
192
201
  chooseStartDate: string;
193
202
  chooseEndDate: string;
@@ -229,6 +238,8 @@ declare interface Wording {
229
238
  pagination: string;
230
239
  rows: string;
231
240
  rowsPerPage: string;
241
+ /** The page-size choice that leaves the page to the frame. */
242
+ fit: string;
232
243
  /** "Page 2 of 7". `formatted` carries both numbers in the provider's
233
244
  formats, where the caller has them - a table over a server has "Page 1 of
234
245
  100,000". */
@@ -236,8 +247,18 @@ declare interface Wording {
236
247
  page: string;
237
248
  total: string;
238
249
  }) => string;
250
+ /** "13–24 of 120" in the pagination bar. `formatted` carries the three
251
+ numbers in the provider's formats, where the caller has them. */
252
+ pageRange: (from: number, to: number, total: number, formatted?: {
253
+ from: string;
254
+ to: string;
255
+ total: string;
256
+ }) => string;
257
+ /** The names of the four steps of the pagination bar. */
258
+ firstPage: string;
239
259
  previousPage: string;
240
260
  nextPage: string;
261
+ lastPage: string;
241
262
  /** The two buttons in the column filter's footer. */
242
263
  filterReset: string;
243
264
  filterDone: string;
@@ -285,6 +306,18 @@ declare interface Wording {
285
306
  selectRow: (row: string) => string;
286
307
  /** Said after the user changes the selection of a table in grid mode: the count. */
287
308
  tableSelectedCount: (count: number) => string;
309
+ /** Said after the user sorts by a column: "Sorted by Name, ascending". */
310
+ sortedAscending: (column: string) => string;
311
+ sortedDescending: (column: string) => string;
312
+ /** Said when a column's sort is taken away. */
313
+ sortRemoved: (column: string) => string;
314
+ /** Said after the user folds or opens a group: "Berlin folded". */
315
+ groupFolded: (name: string) => string;
316
+ groupOpened: (name: string) => string;
317
+ /** Said when the file of an export has been handed over. */
318
+ exportDone: string;
319
+ /** The name of a term of the text filter: "Term 1". */
320
+ filterTerm: (index: number) => string;
288
321
  /** The selection of every row in the filtered set. */
289
322
  selectAllRows: string;
290
323
  /** The same checkbox in server mode, where the table holds one page of a server's. */
@@ -349,6 +382,8 @@ declare interface Wording {
349
382
  not `expandRowNamed`, which names the row detail's expander on the same row. */
350
383
  foldBranch: (row: string) => string;
351
384
  unfoldBranch: (row: string) => string;
385
+ /** The line under a branch whose rows are being loaded - also announced. */
386
+ branchLoading: (row: string) => string;
352
387
  /** The first column of a tree's export. */
353
388
  levelColumn: string;
354
389
  /** A row shown only because a descendant matches the search or a filter. */
@@ -365,6 +400,8 @@ declare interface Wording {
365
400
  entries: (count: number, formatted: string) => string;
366
401
  /** "3 selected" in the pagination bar and the table toolbar. */
367
402
  selectedCount: (count: number, formatted: string) => string;
403
+ /** The count a bulk action names when it acts on fewer of the selected rows than are ticked, in its label: "2 of 3". */
404
+ ofSelected: (count: string, total: string) => string;
368
405
  /** The first sentence of the offer in a server-mode table, once the page is ticked: "All 50 on this page are selected." */
369
406
  selectedOnPage: (count: number, formatted: string) => string;
370
407
  /** The button after it, for the rows the server holds: "Select all 12,400 that match". */
@@ -422,7 +459,7 @@ declare interface Wording {
422
459
  /** The button under a server-mode table's error that sends the request once more. */
423
460
  tryAgain: string;
424
461
  /** "43 of 1.204" - the numbers come from the formats. */
425
- filteredOfTotal: (matches: string, total: string) => string;
462
+ filteredOfTotal: (matches: string, total: string, count: number) => string;
426
463
  /** The four outcomes of an assessment, as a word beside the value. Colour
427
464
  alone carries no meaning - the word stands here for that reason. */
428
465
  verdictOk: string;
@@ -453,10 +490,13 @@ declare interface Wording {
453
490
  asOfAgo: (duration: string) => string;
454
491
  close: string;
455
492
  closeToast: string;
456
- /** The count on the front toast of a closed deck; pressing it shows them all. */
493
+ /** The count on the front toast of a closed deck; pressing it shows them all.
494
+ The name starts with the visible text "1 / n". */
457
495
  toastDeckCount: (count: number) => string;
458
496
  /** The name of the toasts' region, which Alt+T moves the focus into. */
459
497
  toastRegion: string;
498
+ /** The visible hint at an open deck that Alt+T moves the focus into it. */
499
+ toastShortcutHint: string;
460
500
  confirm: string;
461
501
  cancel: string;
462
502
  loading: string;
@@ -583,6 +623,8 @@ declare interface Wording {
583
623
  /** At the top of the menu, and in the name of a head the arrow keys move. */
584
624
  dashboardPlace: (place: number, of: number) => string;
585
625
  dashboardHead: (title: string, place: number, of: number) => string;
626
+ /** The description of a head in the editing mode: what the arrow keys do. */
627
+ dashboardHeadHint: string;
586
628
  /** The name of the head of a locked widget in the editing mode. */
587
629
  dashboardHeadLocked: (title: string, place: number, of: number) => string;
588
630
  /** The word beside a locked widget's size in the mode. */
@@ -604,8 +646,8 @@ declare interface Wording {
604
646
  full: string;
605
647
  };
606
648
  /** A size's entry in a widget's menu: its name and its share of the width
607
- (`share` is "¼" or "5/12", empty for the whole width); `current` marks the size the widget stands at. */
608
- dashboardSizeEntry: (size: string, share: string, current: boolean) => string;
649
+ (`share` is "¼" or "5/12", empty for the whole width); `current` marks the size the widget stands at (no longer worded: the menu's radio state says it, so an entry may ignore it). */
650
+ dashboardSizeEntry: (size: string, share: string, current?: boolean) => string;
609
651
  /** The built-in heading type: its name, its sentence in the catalogue, the
610
652
  text a new heading starts with and the label of its text field. */
611
653
  dashboardHeadingLabel: string;
@@ -658,6 +700,8 @@ declare interface Wording {
658
700
  /** Why a quantity has no number - the label is the given at the root of it,
659
701
  or the divisor that is zero. */
660
702
  calculationMissing: (label: string) => string;
703
+ /** The same for several: every missing given, as a list. */
704
+ calculationMissingAll: (labels: readonly string[]) => string;
661
705
  calculationDivisionByZero: (label: string) => string;
662
706
  /** The target beside the result, with the target's number and unit. */
663
707
  calculationAboveTarget: (target: string) => string;
@@ -0,0 +1,104 @@
1
+ function P(t, n, o) {
2
+ if (o === "percent") return t.percent(n);
3
+ if (o === "count") return t.count(n);
4
+ if (o === void 0) return t.number(n);
5
+ const { decimals: i, ...m } = o;
6
+ return Object.keys(m).length === 0 ? t.number(n, i) : t.numberWith(
7
+ n,
8
+ i === void 0 ? m : { minimumFractionDigits: i, maximumFractionDigits: i, ...m }
9
+ );
10
+ }
11
+ const w = 10, l = [
12
+ ["day", 86400],
13
+ ["hour", 3600],
14
+ ["minute", 60]
15
+ ];
16
+ function v(t, n) {
17
+ const o = `${t}|${n ?? ""}`;
18
+ let i = T.get(o);
19
+ if (!i) {
20
+ i = x(t, n), T.set(o, i);
21
+ for (const m of L) A.add(i[m]);
22
+ }
23
+ return i;
24
+ }
25
+ const T = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new WeakSet(), L = ["date", "dateShort", "month", "dateLong", "time", "dateTime", "offset", "timeZoneName"];
26
+ function M(t) {
27
+ const n = new Intl.Locale(t);
28
+ return n.getWeekInfo?.().firstDay ?? n.weekInfo?.firstDay ?? 1;
29
+ }
30
+ function x(t, n) {
31
+ const o = "gregory", i = new Intl.DateTimeFormat(t, { calendar: o, timeZone: n, day: "2-digit", month: "2-digit", year: "numeric" }), m = new Intl.DateTimeFormat(t, { calendar: o, timeZone: n, day: "2-digit", month: "2-digit" }), I = new Intl.DateTimeFormat(t, { calendar: o, timeZone: n, month: "long", year: "numeric" }), y = new Intl.DateTimeFormat(t, { calendar: o, month: "long" }), D = new Intl.DateTimeFormat(t, {
32
+ calendar: o,
33
+ timeZone: n,
34
+ weekday: "long",
35
+ day: "numeric",
36
+ month: "long",
37
+ year: "numeric"
38
+ }), c = { timeZone: n, hour: "2-digit", minute: "2-digit", hour12: !1, hourCycle: "h23" }, f = {
39
+ without: new Intl.DateTimeFormat(t, c),
40
+ with: new Intl.DateTimeFormat(t, { ...c, second: "2-digit" })
41
+ }, d = {
42
+ without: new Intl.DateTimeFormat(t, { calendar: o, day: "2-digit", month: "2-digit", year: "numeric", ...c }),
43
+ with: new Intl.DateTimeFormat(t, {
44
+ calendar: o,
45
+ day: "2-digit",
46
+ month: "2-digit",
47
+ year: "numeric",
48
+ ...c,
49
+ second: "2-digit"
50
+ })
51
+ }, p = new Intl.DateTimeFormat(t, { timeZone: n, timeZoneName: "shortOffset" }), N = new Intl.DateTimeFormat(t, { timeZone: n, timeZoneName: "shortGeneric" }), F = /* @__PURE__ */ new Map(), u = { signDisplay: "negative" }, g = /* @__PURE__ */ new Map(), b = new Intl.NumberFormat(t, { ...u, notation: "scientific", maximumSignificantDigits: 10 }), S = new Intl.NumberFormat(t, u), E = new Intl.NumberFormat(t, { ...u, style: "percent", maximumFractionDigits: 0 }), k = new Intl.Collator(t), h = new Intl.RelativeTimeFormat(t, { numeric: "auto" });
52
+ return {
53
+ locale: t,
54
+ timeZone: n,
55
+ weekStart: M(t),
56
+ timeZoneName: (e) => N.formatToParts(e).find((r) => r.type === "timeZoneName")?.value ?? "",
57
+ date: (e) => i.format(e),
58
+ dateShort: (e) => m.format(e),
59
+ month: (e) => I.format(e),
60
+ monthName: (e) => y.format(e),
61
+ dateLong: (e) => D.format(e),
62
+ time: (e, r) => (r ? f.with : f.without).format(e),
63
+ dateTime: (e, r) => (r ? d.with : d.without).format(e),
64
+ offset: (e) => p.formatToParts(e).find((r) => r.type === "timeZoneName")?.value ?? "",
65
+ number: (e, r) => {
66
+ if (r === void 0 && e !== 0 && Math.abs(e) < 0.5 * 10 ** -w) return b.format(e).replace("×10^", "E");
67
+ let a = F.get(r);
68
+ return a || (a = new Intl.NumberFormat(t, {
69
+ ...u,
70
+ minimumFractionDigits: r,
71
+ maximumFractionDigits: r ?? w
72
+ }), F.set(r, a)), a.format(e);
73
+ },
74
+ numberWith: (e, r) => {
75
+ const a = JSON.stringify(r);
76
+ let s = g.get(a);
77
+ return s || (s = new Intl.NumberFormat(t, { ...u, ...r }), g.set(a, s)), s.format(e);
78
+ },
79
+ count: (e) => S.format(e),
80
+ percent: (e) => E.format(e),
81
+ compareText: (e, r) => k.compare(e, r),
82
+ relative: (e) => {
83
+ const r = Math.max(0, Math.round(e / 1e3));
84
+ for (const [a, s] of l)
85
+ if (r >= s) return h.format(-Math.floor(r / s), a);
86
+ return h.format(-r, "second");
87
+ }
88
+ };
89
+ }
90
+ const O = /* @__PURE__ */ v("en-GB");
91
+ function R(t) {
92
+ const n = [...t.number(12345675e-1, 1).replace(/[\d\-\u2212]/g, "")], o = n[n.length - 1] ?? ".";
93
+ return { group: n.length > 1 ? n[0] : "", decimal: o };
94
+ }
95
+ const _ = /* @__PURE__ */ R(O);
96
+ export {
97
+ O as D,
98
+ L as I,
99
+ _ as a,
100
+ A as b,
101
+ v as f,
102
+ R as s,
103
+ P as w
104
+ };