@makoai/app-sdk 2.30.2 → 2.30.3

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.
@@ -51,7 +51,7 @@ export interface PeriodPickerProps {
51
51
  export function PeriodPicker({ value, onChange, units = ["month", "quarter", "year"], custom = "month", min, max, label: labelProp, locale, labels, presets, className }: PeriodPickerProps) {
52
52
  const L = localeStrings("period", locale, labels)
53
53
  const label = labelProp ?? L.time
54
- const text = periodLabel(value, locale)
54
+ const text = periodLabel(value, locale, labels)
55
55
  const wide = !!(locale || presets?.length)
56
56
  const today = todayIso()
57
57
  const hi = max ?? today
@@ -166,7 +166,7 @@ function PickerMenu({ value, units, custom, min, max, today, L, locale, presets,
166
166
  on ? "border-brand bg-[color-mix(in_srgb,var(--brand)_8%,transparent)] font-semibold" : "hover:bg-accent",
167
167
  )}
168
168
  onClick={() => onPick(p)}>
169
- {periodLabel(p, locale)}{live && <small className="text-[10px] font-normal text-muted-foreground">{L.inProgress}</small>}
169
+ {periodLabel(p, locale, L)}{live && <small className="text-[10px] font-normal text-muted-foreground">{L.inProgress}</small>}
170
170
  </button>
171
171
  )
172
172
  })}
@@ -78,8 +78,8 @@ const month = (s: string, withYear = true) => `${MON[Number(s.slice(5, 7)) - 1]}
78
78
  * With a `locale` (2.29) the month names come from Intl in that language
79
79
  * ("nov. 2026", "16.–22. Nov 2026"). A preset reads as its name: "Last 28 days", "28 derniers jours".
80
80
  */
81
- export function periodLabel(p: Period, locale?: string): string {
82
- if (p.preset) return presetLabel(p.preset, locale);
81
+ export function periodLabel(p: Period, locale?: string, labels?: Parameters<typeof presetLabel>[2]): string {
82
+ if (p.preset) return presetLabel(p.preset, locale, labels);
83
83
  if (locale) return localLabel(p, locale);
84
84
  if (p.unit === "year") return p.from.slice(0, 4);
85
85
  if (p.unit === "quarter") return `Q${Math.floor(Number(p.from.slice(5, 7)) / 3) + 1} ${p.from.slice(0, 4)}`;
package/index.js CHANGED
@@ -38,7 +38,7 @@ import {
38
38
  * in a page (or this export) says which SDK a deployed app actually runs.
39
39
  * Kept in step with package.json by snapshot.test.mjs.
40
40
  */
41
- export const SDK_VERSION = "2.30.2";
41
+ export const SDK_VERSION = "2.30.3";
42
42
  if (typeof window !== "undefined") {
43
43
  try {
44
44
  window.__MAKO_APP_SDK__ = SDK_VERSION;
package/locale.js CHANGED
@@ -19,7 +19,7 @@ const en = {
19
19
  inProgress: "in progress", inProgressTitle: "In progress: the numbers are not final yet",
20
20
  from: "From", to: "To", apply: "Apply",
21
21
  quarterLabel: (q, y) => `Q${q} ${y}`,
22
- lastDays: n => `Last ${n} days`, mtd: "Month to date", qtd: "Quarter to date", ytd: "Year to date", allTime: "All time",
22
+ lastDays: n => (n === 1 ? "Today" : `Last ${n} days`), mtd: "Month to date", qtd: "Quarter to date", ytd: "Year to date", allTime: "All time",
23
23
  },
24
24
  filterBar: { filters: "Filters", reset: "Reset", resetTitle: "Back to the default filters", done: "Done" },
25
25
  filter: { all: "All", none: "None", many: n => `${n} selected`, only: "Only", search: "Search", noMatch: "No match", groupAll: label => `All ${label}` },
@@ -47,7 +47,7 @@ const fr = {
47
47
  inProgress: "en cours", inProgressTitle: "En cours : les chiffres ne sont pas encore définitifs",
48
48
  from: "Du", to: "Au", apply: "Appliquer",
49
49
  quarterLabel: (q, y) => `T${q} ${y}`,
50
- lastDays: n => `${n} derniers jours`, mtd: "Ce mois-ci", qtd: "Ce trimestre", ytd: "Cette année", allTime: "Toute la période",
50
+ lastDays: n => (n === 1 ? "Aujourd'hui" : `${n} derniers jours`), mtd: "Ce mois-ci", qtd: "Ce trimestre", ytd: "Cette année", allTime: "Toute la période",
51
51
  },
52
52
  filterBar: { filters: "Filtres", reset: "Réinitialiser", resetTitle: "Revenir aux filtres par défaut", done: "Terminé" },
53
53
  filter: { all: "Tous", none: "Aucun", many: n => `${n} sélectionnés`, only: "Seulement", search: "Rechercher", noMatch: "Aucun résultat", groupAll: label => `${label} (tout)` },
@@ -84,7 +84,7 @@ const de = {
84
84
  inProgress: "laufend", inProgressTitle: "Laufend: die Zahlen sind noch nicht endgültig",
85
85
  from: "Von", to: "Bis", apply: "Anwenden",
86
86
  quarterLabel: (q, y) => `Q${q} ${y}`,
87
- lastDays: n => `Letzte ${n} Tage`, mtd: "Dieser Monat", qtd: "Dieses Quartal", ytd: "Dieses Jahr", allTime: "Gesamter Zeitraum",
87
+ lastDays: n => (n === 1 ? "Heute" : `Letzte ${n} Tage`), mtd: "Dieser Monat", qtd: "Dieses Quartal", ytd: "Dieses Jahr", allTime: "Gesamter Zeitraum",
88
88
  },
89
89
  filterBar: { filters: "Filter", reset: "Zurücksetzen", resetTitle: "Zurück zu den Standardfiltern", done: "Fertig" },
90
90
  filter: { all: "Alle", none: "Keine", many: n => `${n} ausgewählt`, only: "Nur", search: "Suchen", noMatch: "Keine Treffer", groupAll: label => `${label} (alle)` },
@@ -121,7 +121,7 @@ const it = {
121
121
  inProgress: "in corso", inProgressTitle: "In corso: i numeri non sono ancora definitivi",
122
122
  from: "Da", to: "A", apply: "Applica",
123
123
  quarterLabel: (q, y) => `T${q} ${y}`,
124
- lastDays: n => `Ultimi ${n} giorni`, mtd: "Questo mese", qtd: "Questo trimestre", ytd: "Quest'anno", allTime: "Tutto il periodo",
124
+ lastDays: n => (n === 1 ? "Oggi" : `Ultimi ${n} giorni`), mtd: "Questo mese", qtd: "Questo trimestre", ytd: "Quest'anno", allTime: "Tutto il periodo",
125
125
  },
126
126
  filterBar: { filters: "Filtri", reset: "Reimposta", resetTitle: "Torna ai filtri predefiniti", done: "Fatto" },
127
127
  filter: { all: "Tutti", none: "Nessuno", many: n => `${n} selezionati`, only: "Solo", search: "Cerca", noMatch: "Nessun risultato", groupAll: label => `${label} (tutti)` },
@@ -158,7 +158,7 @@ const es = {
158
158
  inProgress: "en curso", inProgressTitle: "En curso: las cifras aún no son definitivas",
159
159
  from: "Desde", to: "Hasta", apply: "Aplicar",
160
160
  quarterLabel: (q, y) => `T${q} ${y}`,
161
- lastDays: n => `Últimos ${n} días`, mtd: "Este mes", qtd: "Este trimestre", ytd: "Este año", allTime: "Todo el periodo",
161
+ lastDays: n => (n === 1 ? "Hoy" : `Últimos ${n} días`), mtd: "Este mes", qtd: "Este trimestre", ytd: "Este año", allTime: "Todo el periodo",
162
162
  },
163
163
  filterBar: { filters: "Filtros", reset: "Restablecer", resetTitle: "Volver a los filtros por defecto", done: "Listo" },
164
164
  filter: { all: "Todos", none: "Ninguno", many: n => `${n} seleccionados`, only: "Solo", search: "Buscar", noMatch: "Sin resultados", groupAll: label => `${label} (todo)` },
@@ -195,7 +195,7 @@ const pl = {
195
195
  inProgress: "w toku", inProgressTitle: "W toku: liczby nie są jeszcze ostateczne",
196
196
  from: "Od", to: "Do", apply: "Zastosuj",
197
197
  quarterLabel: (q, y) => `Q${q} ${y}`,
198
- lastDays: n => `Ostatnie ${n} dni`, mtd: "Ten miesiąc", qtd: "Ten kwartał", ytd: "Ten rok", allTime: "Cały okres",
198
+ lastDays: n => (n === 1 ? "Dzisiaj" : `Ostatnie ${n} dni`), mtd: "Ten miesiąc", qtd: "Ten kwartał", ytd: "Ten rok", allTime: "Cały okres",
199
199
  },
200
200
  filterBar: { filters: "Filtry", reset: "Resetuj", resetTitle: "Przywróć domyślne filtry", done: "Gotowe" },
201
201
  filter: { all: "Wszystkie", none: "Brak", many: n => `Wybrano: ${n}`, only: "Tylko", search: "Szukaj", noMatch: "Brak wyników", groupAll: label => `${label} (wszystko)` },
@@ -232,7 +232,7 @@ const pt = {
232
232
  inProgress: "em curso", inProgressTitle: "Em curso: os números ainda não são definitivos",
233
233
  from: "De", to: "Até", apply: "Aplicar",
234
234
  quarterLabel: (q, y) => `T${q} ${y}`,
235
- lastDays: n => `Últimos ${n} dias`, mtd: "Este mês", qtd: "Este trimestre", ytd: "Este ano", allTime: "Todo o período",
235
+ lastDays: n => (n === 1 ? "Hoje" : `Últimos ${n} dias`), mtd: "Este mês", qtd: "Este trimestre", ytd: "Este ano", allTime: "Todo o período",
236
236
  },
237
237
  filterBar: { filters: "Filtros", reset: "Repor", resetTitle: "Voltar aos filtros predefinidos", done: "Concluído" },
238
238
  filter: { all: "Todos", none: "Nenhum", many: n => `${n} selecionados`, only: "Apenas", search: "Procurar", noMatch: "Sem resultados", groupAll: label => `${label} (tudo)` },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makoai/app-sdk",
3
- "version": "2.30.2",
3
+ "version": "2.30.3",
4
4
  "description": "Mako app SDK: data bindings (useQuery/useDuckDB), URL state, theme, and the house dashboard kit (/ui).",
5
5
  "license": "MIT",
6
6
  "repository": {