@makoai/app-sdk 2.29.1 → 2.30.2
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/README.md +64 -3
- package/components/period-picker.tsx +2 -2
- package/components/period.ts +10 -5
- package/index.js +1 -1
- package/locale.d.ts +64 -1
- package/locale.js +105 -8
- package/menu/filter-menu.tsx +4 -1
- package/package.json +1 -1
- package/tailwind.css +11 -0
- package/ui-core.js +56 -6
- package/ui.css +53 -20
- package/ui.d.ts +105 -1
- package/ui.js +280 -61
package/README.md
CHANGED
|
@@ -392,6 +392,8 @@ import {
|
|
|
392
392
|
`{ value, label, color }`, or groups with `children`; `showOnly` adds an
|
|
393
393
|
"Only" button per row. `FilterItems` is its rows alone. On
|
|
394
394
|
phones the menu is a bottom sheet. See "MultiSelect: the All rule" below.
|
|
395
|
+
`disabled` (2.30, on FilterMenu too) greys the trigger at 50% as shadcn's
|
|
396
|
+
Button does. It takes no clicks and no focus.
|
|
395
397
|
- `FreshnessBadge` — presentational: the app decides what fresh means and
|
|
396
398
|
passes `tone` (`ok` / `warn` / `bad`, or `green` / `amber` / `red`), a
|
|
397
399
|
`headline`, and per-source rows; `action` is a callout slot (e.g. a "Load
|
|
@@ -749,7 +751,7 @@ The components and their `labels` keys:
|
|
|
749
751
|
`label` is unset), `previous`, `next`, `menu`, `week`, `month`, `quarter`,
|
|
750
752
|
`year`, `custom`, `presets` (the presets tab), `inProgress`,
|
|
751
753
|
`inProgressTitle`, `from`, `to`, `apply`, `quarterLabel(q, year)` ("T4
|
|
752
|
-
2026" in French), `lastDays(n)`, `mtd`, `qtd`, `ytd
|
|
754
|
+
2026" in French), `lastDays(n)`, `mtd`, `qtd`, `ytd`, `allTime` (2.30). The period reads
|
|
753
755
|
"nov. 2026" in fr-CH and "16.–22. Nov 2026" in de-CH.
|
|
754
756
|
- **FilterBar** (`FilterBarLabels`): `filters` (chip, sheet title, aria-label),
|
|
755
757
|
`reset`, `resetTitle`, `done`.
|
|
@@ -758,6 +760,11 @@ The components and their `labels` keys:
|
|
|
758
760
|
`noMatch`, `groupAll(label)` ("Bots (tout)", FilterMenu's group row).
|
|
759
761
|
`allLabel` is optional on FilterMenu now.
|
|
760
762
|
- **Combobox** (`ComboboxLabels`): `placeholder`, `search`, `empty`.
|
|
763
|
+
- **RefreshAllButton** (2.30, `RefreshLabels`, `locale` only: its `labels`
|
|
764
|
+
prop stays the binding names' map): the button, the modal, each source's
|
|
765
|
+
state and stage, and the finish time. French reads "Actualiser".
|
|
766
|
+
- **FreshnessBadge** (2.30, `FreshnessLabels`, `locale` only): the panel's and
|
|
767
|
+
the source list's screen-reader names.
|
|
761
768
|
- **DataTable**: the `DataTableLabels` keys. A locale also formats the
|
|
762
769
|
footer's numbers and names the rows ("1–50 sur 312 lignes") while `noun` is
|
|
763
770
|
unset. `dataTableLabels(locale, labels)` returns the full set.
|
|
@@ -769,7 +776,10 @@ controls: `localeStrings("filterBar", "de-CH").reset` is "Zurücksetzen".
|
|
|
769
776
|
that end today: `"7d"`, `"28d"`, `"90d"`, `"365d"` (any `"<N>d"`) and `"mtd"`,
|
|
770
777
|
`"qtd"`, `"ytd"` (month, quarter and year to date). A pick emits
|
|
771
778
|
`presetPeriod(id)`: `{ unit: "custom", from, to: today, preset: "28d" }`. The
|
|
772
|
-
trigger reads the preset's name ("28 derniers jours").
|
|
779
|
+
trigger reads the preset's name ("28 derniers jours"). `"all"` (2.30) runs
|
|
780
|
+
from the picker's `min` to today and reads "All time" ("Toute la période").
|
|
781
|
+
It needs `min`, so it replaces an app's separate "any time" Select. Read it
|
|
782
|
+
from the URL with `presetPeriod(id, todayIso(), MIN)`. ‹ from a to-date
|
|
773
783
|
preset goes to the whole unit before it; from N days, to the N days before.
|
|
774
784
|
|
|
775
785
|
A preset keeps rolling only if the URL holds its id, not its dates. Write
|
|
@@ -936,6 +946,17 @@ missing rows. `byValue` sorts non-stacked rows highest first, missing last.
|
|
|
936
946
|
Both make the tooltip change height or order between buckets, so the house
|
|
937
947
|
rule is to leave them off.
|
|
938
948
|
|
|
949
|
+
**Rules and notes (2.30).** A row's `rule: true` draws a rule above it, such
|
|
950
|
+
as an "Ending MRR" line before the total. `note` adds a muted line under the
|
|
951
|
+
table, such as "Click to list the opportunities".
|
|
952
|
+
|
|
953
|
+
```tsx
|
|
954
|
+
<TableTooltip title={month} columns={["MRR", "Orgs"]}
|
|
955
|
+
rows={[...movements, { label: "Ending MRR", cells: [end, endOrgs], rule: true }]}
|
|
956
|
+
total={{ label: "Net MRR change", cells: [net, netOrgs] }}
|
|
957
|
+
note={drillable ? "Click to list the opportunities" : undefined} />
|
|
958
|
+
```
|
|
959
|
+
|
|
939
960
|
### Data tables: `DataTable` (2.11+)
|
|
940
961
|
|
|
941
962
|
`DataTable` is the table the best workspace dashboards converged on: a card
|
|
@@ -1114,9 +1135,49 @@ const COLUMNS: DataTableColumn<Customer>[] = [
|
|
|
1114
1135
|
totalRow={rs => ({ name: "Total", demos: sum(rs, "demos"), cash: sum(rs, "cash") })}
|
|
1115
1136
|
onTotalRowClick={() => openDrill(null)} />
|
|
1116
1137
|
```
|
|
1138
|
+
- **Server mode (2.30).** TanStack Table's props and state shapes. With
|
|
1139
|
+
`manualSorting` the table never reorders rows. With `manualPagination`,
|
|
1140
|
+
`rows` is the current page and `rowCount` the total, so the footer reads
|
|
1141
|
+
"51–100 of 312". `sorting` / `onSortingChange` take `[{ id, desc }]`.
|
|
1142
|
+
`pagination` / `onPaginationChange` take `{ pageIndex, pageSize }`,
|
|
1143
|
+
0-based. Both callbacks get the next value, so a `useState` setter works.
|
|
1144
|
+
`loading` fills an empty body with up to 10 skeleton rows and dims rows on
|
|
1145
|
+
screen. The CSV button is off in manual paging: export on the server.
|
|
1146
|
+
|
|
1147
|
+
```tsx
|
|
1148
|
+
const [sorting, setSorting] = useState<SortingState>([{ id: "renewal", desc: false }]);
|
|
1149
|
+
const [pagination, setPagination] = useState<PaginationState>({ pageIndex: 0, pageSize: 50 });
|
|
1150
|
+
const page = useDuckDB<Renewal>(pageSql(sorting, pagination));
|
|
1151
|
+
<DataTable rows={page.data ?? []} columns={COLUMNS} manualSorting manualPagination rowCount={total}
|
|
1152
|
+
sorting={sorting} onSortingChange={setSorting} pagination={pagination} onPaginationChange={setPagination}
|
|
1153
|
+
loading={page.loading} pageSizes={[50]} />
|
|
1154
|
+
```
|
|
1155
|
+
- **Column resizing (2.30).** `enableColumnResizing` puts a drag handle on
|
|
1156
|
+
each header's right edge. `columnResizeMode` is `"onEnd"` (TanStack's
|
|
1157
|
+
default: the width lands on release) or `"onChange"` (live). A column's
|
|
1158
|
+
`size` is its start width in px; `minSize` (default 20) and `maxSize`
|
|
1159
|
+
clamp the drag. `enableResizing: false` drops one column's handle. A double
|
|
1160
|
+
click resets a column. `columnSizing` + `onColumnSizingChange` keep the
|
|
1161
|
+
widths, e.g. per viewer in localStorage. Resizing is pointer only, as in
|
|
1162
|
+
TanStack: no keyboard.
|
|
1163
|
+
- **Section rows (2.30).** `isSectionRow(row)` marks a heading row. It spans
|
|
1164
|
+
every column and shows `renderSection(row)` (default the first column's
|
|
1165
|
+
cell). Rows sort inside their section. The pager, the footer, the CSV and
|
|
1166
|
+
`totalRow` skip section rows. A section repeats at the top of a page its
|
|
1167
|
+
rows continue on.
|
|
1168
|
+
|
|
1169
|
+
```tsx
|
|
1170
|
+
<DataTable rows={[{ kind: "section", label: "Inbound" }, ...inbound, { kind: "section", label: "Outbound" }, ...outbound]}
|
|
1171
|
+
columns={COLUMNS} isSectionRow={r => r.kind === "section"} />
|
|
1172
|
+
```
|
|
1173
|
+
- **Cell class and style (2.30).** A column's `cellClassName` and
|
|
1174
|
+
`cellStyle` take `(value, row)` and style each body cell, e.g. a heat cell:
|
|
1175
|
+
`cellStyle: v => ({ background: heat(v) })`. The total row keeps the
|
|
1176
|
+
column's own class.
|
|
1117
1177
|
- Pure helpers for custom tables: `sortRows`, `compareValues`, `nextSort`,
|
|
1118
1178
|
`pageSlice`, `pageToSync`, `toCsv`, `csvCell`, `csvDate`, `csvToTsv`,
|
|
1119
|
-
`columnLayout`, `columnGroupRuns
|
|
1179
|
+
`columnLayout`, `columnGroupRuns`, `resizeWidth`, `splitSections`,
|
|
1180
|
+
`fromSorting`, `toSorting`.
|
|
1120
1181
|
|
|
1121
1182
|
`ui.css` is plain CSS (no Tailwind needed; it coexists with Tailwind) and
|
|
1122
1183
|
every kit class is prefixed `mk-`. It also sets the house base: Inter 14px on
|
|
@@ -40,7 +40,7 @@ export interface PeriodPickerProps {
|
|
|
40
40
|
/**
|
|
41
41
|
* Mako thin prop (2.29): rolling windows in their own tab, first: "7d", "28d", "90d" (the last N days),
|
|
42
42
|
* "mtd", "qtd", "ytd" (month, quarter, year to date). A pick emits `presetPeriod(id)`: a custom range
|
|
43
|
-
* ending today with `preset: id`. Default none.
|
|
43
|
+
* ending today with `preset: id`. "all" (2.30): from `min` to today, "All time"; needs `min`. Default none.
|
|
44
44
|
*/
|
|
45
45
|
presets?: readonly PeriodPreset[]
|
|
46
46
|
/** Mako thin prop (2.27): classes on the stepper's frame, e.g. `w-full` in a phone sheet. */
|
|
@@ -127,7 +127,7 @@ function PickerMenu({ value, units, custom, min, max, today, L, locale, presets,
|
|
|
127
127
|
const asMonth = custom === "month"
|
|
128
128
|
const [from, setFrom] = React.useState(asMonth ? value.from.slice(0, 7) : value.from)
|
|
129
129
|
const [to, setTo] = React.useState(asMonth ? value.to.slice(0, 7) : value.to)
|
|
130
|
-
const list = tab === "custom" ? [] : tab === "presets" ? (rolling ?? []).flatMap(id => presetPeriod(id, today) ?? []) : (() => {
|
|
130
|
+
const list = tab === "custom" ? [] : tab === "presets" ? (rolling ?? []).flatMap(id => presetPeriod(id, today, min) ?? []) : (() => {
|
|
131
131
|
const out: Period[] = []
|
|
132
132
|
let p = periodOf(tab, max)
|
|
133
133
|
for (let i = 0; i < RECENT[tab] && (!min || p.to >= min); i++, p = shift(p, -1)) out.push(p)
|
package/components/period.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import { localeStrings } from "../locale.js";
|
|
7
7
|
|
|
8
8
|
export type Unit = "week" | "month" | "quarter" | "year";
|
|
9
|
-
/** A rolling preset (2.29): the last N days ("28d") or month, quarter, year to date. All end today. */
|
|
10
|
-
export type PeriodPreset = `${number}d` | "mtd" | "qtd" | "ytd";
|
|
9
|
+
/** A rolling preset (2.29): the last N days ("28d") or month, quarter, year to date; "all" (2.30) runs from the picker's `min`. All end today. */
|
|
10
|
+
export type PeriodPreset = `${number}d` | "mtd" | "qtd" | "ytd" | "all";
|
|
11
11
|
/** `preset` (2.29) marks a range picked as a rolling preset: write it to the URL as `period=28d`. */
|
|
12
12
|
export type Period = { unit: Unit | "custom"; from: string; to: string; preset?: PeriodPreset };
|
|
13
13
|
|
|
@@ -98,8 +98,12 @@ export const UNIT_LABEL: Record<Unit, string> = { week: "Week", month: "Month",
|
|
|
98
98
|
|
|
99
99
|
const TO_DATE = { mtd: "month", qtd: "quarter", ytd: "year" } as const;
|
|
100
100
|
|
|
101
|
-
/**
|
|
102
|
-
|
|
101
|
+
/**
|
|
102
|
+
* A preset's dates on `today`: `presetPeriod("28d")` is the 28 days ending today. Null for an unknown id.
|
|
103
|
+
* "all" (2.30) is `min` to today, so it needs `min` (the picker's): null without it.
|
|
104
|
+
*/
|
|
105
|
+
export function presetPeriod(id: string | null | undefined, today = todayIso(), min?: string): Period | null {
|
|
106
|
+
if (id === "all") return min ? { unit: "custom", from: min, to: today, preset: "all" } : null;
|
|
103
107
|
const days = /^([1-9]\d{0,3})d$/.exec(id ?? "");
|
|
104
108
|
const unit = TO_DATE[id as keyof typeof TO_DATE];
|
|
105
109
|
if (!days && !unit) return null;
|
|
@@ -108,8 +112,9 @@ export function presetPeriod(id: string | null | undefined, today = todayIso()):
|
|
|
108
112
|
}
|
|
109
113
|
|
|
110
114
|
/** A preset's name: "Last 28 days", "Month to date"; localized with `locale`. */
|
|
111
|
-
export function presetLabel(id: PeriodPreset, locale?: string, labels?: { lastDays?: (n: number) => string; mtd?: string; qtd?: string; ytd?: string }): string {
|
|
115
|
+
export function presetLabel(id: PeriodPreset, locale?: string, labels?: { lastDays?: (n: number) => string; mtd?: string; qtd?: string; ytd?: string; allTime?: string }): string {
|
|
112
116
|
const L = localeStrings("period", locale, labels);
|
|
117
|
+
if (id === "all") return L.allTime;
|
|
113
118
|
return /^\d+d$/.test(id) ? L.lastDays(Number(id.slice(0, -1))) : L[id as "mtd" | "qtd" | "ytd"];
|
|
114
119
|
}
|
|
115
120
|
|
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.
|
|
41
|
+
export const SDK_VERSION = "2.30.2";
|
|
42
42
|
if (typeof window !== "undefined") {
|
|
43
43
|
try {
|
|
44
44
|
window.__MAKO_APP_SDK__ = SDK_VERSION;
|
package/locale.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export interface PeriodPickerLabels {
|
|
|
40
40
|
mtd: string;
|
|
41
41
|
qtd: string;
|
|
42
42
|
ytd: string;
|
|
43
|
+
/** The "all" preset (2.30): from `min` to today. Default "All time". */
|
|
44
|
+
allTime: string;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
/** Every fixed text of FilterBar. */
|
|
@@ -101,6 +103,65 @@ export interface DataTableLocaleStrings {
|
|
|
101
103
|
expand: string;
|
|
102
104
|
collapse: string;
|
|
103
105
|
info: (label: string) => string;
|
|
106
|
+
/** A column resize handle's hover title (2.30). */
|
|
107
|
+
resizeHint: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** Every fixed text of RefreshAllButton (2.30), by `locale`. English: the texts it showed before. */
|
|
111
|
+
export interface RefreshLabels {
|
|
112
|
+
/** The idle button. Default "Refresh data". */
|
|
113
|
+
button: string;
|
|
114
|
+
/** The button while running. Default `Refreshing 2/7…`. */
|
|
115
|
+
running: (done: number, total: number) => string;
|
|
116
|
+
/** The button after a run with failures. Default `5/7 refreshed`. */
|
|
117
|
+
partial: (ok: number, total: number) => string;
|
|
118
|
+
/** The button after a clean run. Default `Refreshed 09:05`. */
|
|
119
|
+
doneAt: (at: string) => string;
|
|
120
|
+
/** The modal's title per state. */
|
|
121
|
+
titleIdle: string;
|
|
122
|
+
titleRunning: string;
|
|
123
|
+
titleFailed: string;
|
|
124
|
+
titleDone: string;
|
|
125
|
+
/** The modal's description per state; `schedule` follows the idle one. */
|
|
126
|
+
descIdle: (total: number, concurrency: number) => string;
|
|
127
|
+
descRunning: string;
|
|
128
|
+
descFailed: string;
|
|
129
|
+
descDone: (total: number, took: string) => string;
|
|
130
|
+
/** A source's state: queued, running (before its phase is known), done, failed. */
|
|
131
|
+
queued: string;
|
|
132
|
+
running1: string;
|
|
133
|
+
done1: string;
|
|
134
|
+
failed1: string;
|
|
135
|
+
/** Under the bar. Default `3 of 7 rebuilt`. */
|
|
136
|
+
progress: (done: number, total: number) => string;
|
|
137
|
+
/** The ✕ button's aria-label and the footer buttons. */
|
|
138
|
+
close: string;
|
|
139
|
+
cancel: string;
|
|
140
|
+
start: string;
|
|
141
|
+
hide: string;
|
|
142
|
+
again: string;
|
|
143
|
+
finish: string;
|
|
144
|
+
/** The button's hover title, idle and running. */
|
|
145
|
+
hint: string;
|
|
146
|
+
hintRunning: string;
|
|
147
|
+
/** A running source's stage (bindingPhaseLabel's stages). */
|
|
148
|
+
stageWaiting: string;
|
|
149
|
+
stageBuilding: string;
|
|
150
|
+
stageLinking: string;
|
|
151
|
+
stageDownloading: string;
|
|
152
|
+
stageLoading: string;
|
|
153
|
+
stageQuerying: string;
|
|
154
|
+
/** "Building from warehouse · 12,000 rows" and "Downloading · 1.2 MB of 3.4 MB". */
|
|
155
|
+
rowsWritten: (n: string) => string;
|
|
156
|
+
of: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** The screen-reader names of FreshnessBadge (2.30). */
|
|
160
|
+
export interface FreshnessLabels {
|
|
161
|
+
/** The panel. Default "Data freshness". */
|
|
162
|
+
dialog: string;
|
|
163
|
+
/** The source list. Default "Sources". */
|
|
164
|
+
sources: string;
|
|
104
165
|
}
|
|
105
166
|
|
|
106
167
|
export interface LocaleStrings {
|
|
@@ -108,13 +169,15 @@ export interface LocaleStrings {
|
|
|
108
169
|
filterBar: FilterBarLabels;
|
|
109
170
|
filter: FilterLabels;
|
|
110
171
|
combobox: ComboboxLabels;
|
|
172
|
+
refresh: RefreshLabels;
|
|
173
|
+
freshness: FreshnessLabels;
|
|
111
174
|
/** Absent in en: DataTable's English set is DATA_TABLE_LABELS. */
|
|
112
175
|
dataTable?: DataTableLocaleStrings;
|
|
113
176
|
}
|
|
114
177
|
/** The one strings table, by language. */
|
|
115
178
|
export const STRINGS: Readonly<Record<LocaleLang, LocaleStrings>>;
|
|
116
179
|
/** One section for a locale, with `labels` on top. */
|
|
117
|
-
export function localeStrings<K extends "period" | "filterBar" | "filter" | "combobox">(
|
|
180
|
+
export function localeStrings<K extends "period" | "filterBar" | "filter" | "combobox" | "refresh" | "freshness">(
|
|
118
181
|
section: K,
|
|
119
182
|
locale?: string | null,
|
|
120
183
|
labels?: Partial<LocaleStrings[K]> | null,
|
package/locale.js
CHANGED
|
@@ -19,11 +19,24 @@ 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",
|
|
22
|
+
lastDays: n => `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}` },
|
|
26
26
|
combobox: { placeholder: "Select...", search: "Search...", empty: "No results found." },
|
|
27
|
+
refresh: {
|
|
28
|
+
button: "Refresh data", running: (done, total) => `Refreshing ${done}/${total}…`, partial: (ok, total) => `${ok}/${total} refreshed`, doneAt: at => `Refreshed ${at}`,
|
|
29
|
+
titleIdle: "Refresh data", titleRunning: "Refreshing data…", titleFailed: "Refresh finished with errors", titleDone: "Data refreshed",
|
|
30
|
+
descIdle: (total, concurrency) => `Re-runs ${total} warehouse ${total === 1 ? "query" : "queries"} (${concurrency} at a time) and updates the app as each one lands.`,
|
|
31
|
+
descRunning: "You can close this — the refresh keeps running in the background.",
|
|
32
|
+
descFailed: "Failed sources keep serving their previous data.", descDone: (total, took) => `All ${total} sources rebuilt in ${took}.`,
|
|
33
|
+
queued: "Queued", running1: "Running", done1: "Done", failed1: "Failed", progress: (done, total) => `${done} of ${total} rebuilt`,
|
|
34
|
+
close: "Close", cancel: "Cancel", start: "Start refresh", hide: "Hide", again: "Refresh again", finish: "Done",
|
|
35
|
+
hint: "Re-runs every binding's warehouse query.", hintRunning: "Refresh in progress — click to see details.",
|
|
36
|
+
stageWaiting: "Contacting Mako", stageBuilding: "Building from warehouse", stageLinking: "Getting download link",
|
|
37
|
+
stageDownloading: "Downloading", stageLoading: "Loading into DuckDB", stageQuerying: "Running query", rowsWritten: n => `${n} rows`, of: "of",
|
|
38
|
+
},
|
|
39
|
+
freshness: { dialog: "Data freshness", sources: "Sources" },
|
|
27
40
|
// DataTable's English set is DATA_TABLE_LABELS in ui.js (its range is JSX).
|
|
28
41
|
};
|
|
29
42
|
|
|
@@ -34,11 +47,24 @@ const fr = {
|
|
|
34
47
|
inProgress: "en cours", inProgressTitle: "En cours : les chiffres ne sont pas encore définitifs",
|
|
35
48
|
from: "Du", to: "Au", apply: "Appliquer",
|
|
36
49
|
quarterLabel: (q, y) => `T${q} ${y}`,
|
|
37
|
-
lastDays: n => `${n} derniers jours`, mtd: "Ce mois-ci", qtd: "Ce trimestre", ytd: "Cette année",
|
|
50
|
+
lastDays: n => `${n} derniers jours`, mtd: "Ce mois-ci", qtd: "Ce trimestre", ytd: "Cette année", allTime: "Toute la période",
|
|
38
51
|
},
|
|
39
52
|
filterBar: { filters: "Filtres", reset: "Réinitialiser", resetTitle: "Revenir aux filtres par défaut", done: "Terminé" },
|
|
40
53
|
filter: { all: "Tous", none: "Aucun", many: n => `${n} sélectionnés`, only: "Seulement", search: "Rechercher", noMatch: "Aucun résultat", groupAll: label => `${label} (tout)` },
|
|
41
54
|
combobox: { placeholder: "Choisir…", search: "Rechercher…", empty: "Aucun résultat." },
|
|
55
|
+
refresh: {
|
|
56
|
+
button: "Actualiser", running: (done, total) => `Actualisation ${done}/${total}…`, partial: (ok, total) => `${ok}/${total} actualisées`, doneAt: at => `Actualisé à ${at}`,
|
|
57
|
+
titleIdle: "Actualiser les données", titleRunning: "Actualisation des données…", titleFailed: "Actualisation terminée avec des erreurs", titleDone: "Données actualisées",
|
|
58
|
+
descIdle: (total, concurrency) => `Relance ${total} ${total === 1 ? "requête" : "requêtes"} dans l'entrepôt (${concurrency} à la fois) et met l'app à jour à chaque résultat.`,
|
|
59
|
+
descRunning: "Vous pouvez fermer cette fenêtre. L'actualisation continue en arrière-plan.",
|
|
60
|
+
descFailed: "Les sources en échec gardent leurs données précédentes.", descDone: (total, took) => `${total} sources reconstruites en ${took}.`,
|
|
61
|
+
queued: "En attente", running1: "En cours", done1: "Terminé", failed1: "Échec", progress: (done, total) => `${done} sur ${total} reconstruites`,
|
|
62
|
+
close: "Fermer", cancel: "Annuler", start: "Lancer l'actualisation", hide: "Masquer", again: "Actualiser à nouveau", finish: "Terminé",
|
|
63
|
+
hint: "Relance la requête de chaque source dans l'entrepôt.", hintRunning: "Actualisation en cours. Cliquez pour voir le détail.",
|
|
64
|
+
stageWaiting: "Connexion à Mako", stageBuilding: "Construction dans l'entrepôt", stageLinking: "Lien de téléchargement",
|
|
65
|
+
stageDownloading: "Téléchargement", stageLoading: "Chargement dans DuckDB", stageQuerying: "Exécution de la requête", rowsWritten: n => `${n} lignes`, of: "sur",
|
|
66
|
+
},
|
|
67
|
+
freshness: { dialog: "Fraîcheur des données", sources: "Sources" },
|
|
42
68
|
dataTable: {
|
|
43
69
|
rows: "lignes", of: "sur", empty: "Aucune ligne pour ces filtres.",
|
|
44
70
|
page: (p, n) => `Page ${p} sur ${n}`, perPage: s => `${s} par page`, rowsPerPage: "Lignes par page",
|
|
@@ -47,6 +73,7 @@ const fr = {
|
|
|
47
73
|
exportTitle: "Exporter toutes les lignes de toutes les pages, dans l'ordre du tri",
|
|
48
74
|
exportFailed: "Le navigateur a bloqué le téléchargement. Ouvrez l'app dans un nouvel onglet et exportez à nouveau.",
|
|
49
75
|
expand: "Afficher le détail", collapse: "Masquer le détail", info: l => `À propos de ${l}`,
|
|
76
|
+
resizeHint: "Faire glisser pour redimensionner · double-clic pour réinitialiser",
|
|
50
77
|
},
|
|
51
78
|
};
|
|
52
79
|
|
|
@@ -57,11 +84,24 @@ const de = {
|
|
|
57
84
|
inProgress: "laufend", inProgressTitle: "Laufend: die Zahlen sind noch nicht endgültig",
|
|
58
85
|
from: "Von", to: "Bis", apply: "Anwenden",
|
|
59
86
|
quarterLabel: (q, y) => `Q${q} ${y}`,
|
|
60
|
-
lastDays: n => `Letzte ${n} Tage`, mtd: "Dieser Monat", qtd: "Dieses Quartal", ytd: "Dieses Jahr",
|
|
87
|
+
lastDays: n => `Letzte ${n} Tage`, mtd: "Dieser Monat", qtd: "Dieses Quartal", ytd: "Dieses Jahr", allTime: "Gesamter Zeitraum",
|
|
61
88
|
},
|
|
62
89
|
filterBar: { filters: "Filter", reset: "Zurücksetzen", resetTitle: "Zurück zu den Standardfiltern", done: "Fertig" },
|
|
63
90
|
filter: { all: "Alle", none: "Keine", many: n => `${n} ausgewählt`, only: "Nur", search: "Suchen", noMatch: "Keine Treffer", groupAll: label => `${label} (alle)` },
|
|
64
91
|
combobox: { placeholder: "Auswählen…", search: "Suchen…", empty: "Keine Ergebnisse." },
|
|
92
|
+
refresh: {
|
|
93
|
+
button: "Aktualisieren", running: (done, total) => `Aktualisiere ${done}/${total}…`, partial: (ok, total) => `${ok}/${total} aktualisiert`, doneAt: at => `Aktualisiert ${at}`,
|
|
94
|
+
titleIdle: "Daten aktualisieren", titleRunning: "Daten werden aktualisiert…", titleFailed: "Aktualisierung mit Fehlern beendet", titleDone: "Daten aktualisiert",
|
|
95
|
+
descIdle: (total, concurrency) => `Führt ${total} ${total === 1 ? "Abfrage" : "Abfragen"} im Warehouse erneut aus (${concurrency} gleichzeitig) und aktualisiert die App nach jedem Ergebnis.`,
|
|
96
|
+
descRunning: "Sie können dieses Fenster schließen. Die Aktualisierung läuft im Hintergrund weiter.",
|
|
97
|
+
descFailed: "Fehlgeschlagene Quellen behalten ihre bisherigen Daten.", descDone: (total, took) => `Alle ${total} Quellen in ${took} neu erstellt.`,
|
|
98
|
+
queued: "Wartet", running1: "Läuft", done1: "Fertig", failed1: "Fehlgeschlagen", progress: (done, total) => `${done} von ${total} neu erstellt`,
|
|
99
|
+
close: "Schließen", cancel: "Abbrechen", start: "Aktualisierung starten", hide: "Ausblenden", again: "Erneut aktualisieren", finish: "Fertig",
|
|
100
|
+
hint: "Führt die Warehouse-Abfrage jeder Quelle erneut aus.", hintRunning: "Aktualisierung läuft. Klicken für Details.",
|
|
101
|
+
stageWaiting: "Verbindung zu Mako", stageBuilding: "Aufbau im Warehouse", stageLinking: "Download-Link wird geholt",
|
|
102
|
+
stageDownloading: "Download", stageLoading: "Laden in DuckDB", stageQuerying: "Abfrage läuft", rowsWritten: n => `${n} Zeilen`, of: "von",
|
|
103
|
+
},
|
|
104
|
+
freshness: { dialog: "Datenaktualität", sources: "Quellen" },
|
|
65
105
|
dataTable: {
|
|
66
106
|
rows: "Zeilen", of: "von", empty: "Keine Zeilen für diese Filter.",
|
|
67
107
|
page: (p, n) => `Seite ${p} von ${n}`, perPage: s => `${s} pro Seite`, rowsPerPage: "Zeilen pro Seite",
|
|
@@ -70,6 +110,7 @@ const de = {
|
|
|
70
110
|
exportTitle: "Alle Zeilen aller Seiten exportieren, in der aktuellen Sortierung",
|
|
71
111
|
exportFailed: "Der Browser hat den Download blockiert. Öffnen Sie die App in einem neuen Tab und exportieren Sie erneut.",
|
|
72
112
|
expand: "Details anzeigen", collapse: "Details ausblenden", info: l => `Info zu ${l}`,
|
|
113
|
+
resizeHint: "Ziehen zum Ändern der Breite · Doppelklick zum Zurücksetzen",
|
|
73
114
|
},
|
|
74
115
|
};
|
|
75
116
|
|
|
@@ -80,11 +121,24 @@ const it = {
|
|
|
80
121
|
inProgress: "in corso", inProgressTitle: "In corso: i numeri non sono ancora definitivi",
|
|
81
122
|
from: "Da", to: "A", apply: "Applica",
|
|
82
123
|
quarterLabel: (q, y) => `T${q} ${y}`,
|
|
83
|
-
lastDays: n => `Ultimi ${n} giorni`, mtd: "Questo mese", qtd: "Questo trimestre", ytd: "Quest'anno",
|
|
124
|
+
lastDays: n => `Ultimi ${n} giorni`, mtd: "Questo mese", qtd: "Questo trimestre", ytd: "Quest'anno", allTime: "Tutto il periodo",
|
|
84
125
|
},
|
|
85
126
|
filterBar: { filters: "Filtri", reset: "Reimposta", resetTitle: "Torna ai filtri predefiniti", done: "Fatto" },
|
|
86
127
|
filter: { all: "Tutti", none: "Nessuno", many: n => `${n} selezionati`, only: "Solo", search: "Cerca", noMatch: "Nessun risultato", groupAll: label => `${label} (tutti)` },
|
|
87
128
|
combobox: { placeholder: "Seleziona…", search: "Cerca…", empty: "Nessun risultato." },
|
|
129
|
+
refresh: {
|
|
130
|
+
button: "Aggiorna", running: (done, total) => `Aggiornamento ${done}/${total}…`, partial: (ok, total) => `${ok}/${total} aggiornate`, doneAt: at => `Aggiornato alle ${at}`,
|
|
131
|
+
titleIdle: "Aggiorna i dati", titleRunning: "Aggiornamento dei dati…", titleFailed: "Aggiornamento concluso con errori", titleDone: "Dati aggiornati",
|
|
132
|
+
descIdle: (total, concurrency) => `Riesegue ${total} query sul warehouse (${concurrency} alla volta) e aggiorna l'app a ogni risultato.`,
|
|
133
|
+
descRunning: "Puoi chiudere questa finestra. L'aggiornamento continua in background.",
|
|
134
|
+
descFailed: "Le fonti non riuscite mantengono i dati precedenti.", descDone: (total, took) => `Tutte le ${total} fonti ricostruite in ${took}.`,
|
|
135
|
+
queued: "In coda", running1: "In corso", done1: "Fatto", failed1: "Non riuscito", progress: (done, total) => `${done} di ${total} ricostruite`,
|
|
136
|
+
close: "Chiudi", cancel: "Annulla", start: "Avvia l'aggiornamento", hide: "Nascondi", again: "Aggiorna di nuovo", finish: "Fatto",
|
|
137
|
+
hint: "Riesegue la query sul warehouse di ogni fonte.", hintRunning: "Aggiornamento in corso. Clicca per i dettagli.",
|
|
138
|
+
stageWaiting: "Connessione a Mako", stageBuilding: "Costruzione dal warehouse", stageLinking: "Link di download",
|
|
139
|
+
stageDownloading: "Download", stageLoading: "Caricamento in DuckDB", stageQuerying: "Esecuzione della query", rowsWritten: n => `${n} righe`, of: "di",
|
|
140
|
+
},
|
|
141
|
+
freshness: { dialog: "Aggiornamento dei dati", sources: "Fonti" },
|
|
88
142
|
dataTable: {
|
|
89
143
|
rows: "righe", of: "di", empty: "Nessuna riga per questi filtri.",
|
|
90
144
|
page: (p, n) => `Pagina ${p} di ${n}`, perPage: s => `${s} per pagina`, rowsPerPage: "Righe per pagina",
|
|
@@ -93,6 +147,7 @@ const it = {
|
|
|
93
147
|
exportTitle: "Esporta tutte le righe di tutte le pagine, nell'ordine attuale",
|
|
94
148
|
exportFailed: "Il browser ha bloccato il download. Apri l'app in una nuova scheda ed esporta di nuovo.",
|
|
95
149
|
expand: "Mostra dettagli", collapse: "Nascondi dettagli", info: l => `Info su ${l}`,
|
|
150
|
+
resizeHint: "Trascina per ridimensionare · doppio clic per ripristinare",
|
|
96
151
|
},
|
|
97
152
|
};
|
|
98
153
|
|
|
@@ -103,11 +158,24 @@ const es = {
|
|
|
103
158
|
inProgress: "en curso", inProgressTitle: "En curso: las cifras aún no son definitivas",
|
|
104
159
|
from: "Desde", to: "Hasta", apply: "Aplicar",
|
|
105
160
|
quarterLabel: (q, y) => `T${q} ${y}`,
|
|
106
|
-
lastDays: n => `Últimos ${n} días`, mtd: "Este mes", qtd: "Este trimestre", ytd: "Este año",
|
|
161
|
+
lastDays: n => `Últimos ${n} días`, mtd: "Este mes", qtd: "Este trimestre", ytd: "Este año", allTime: "Todo el periodo",
|
|
107
162
|
},
|
|
108
163
|
filterBar: { filters: "Filtros", reset: "Restablecer", resetTitle: "Volver a los filtros por defecto", done: "Listo" },
|
|
109
164
|
filter: { all: "Todos", none: "Ninguno", many: n => `${n} seleccionados`, only: "Solo", search: "Buscar", noMatch: "Sin resultados", groupAll: label => `${label} (todo)` },
|
|
110
165
|
combobox: { placeholder: "Seleccionar…", search: "Buscar…", empty: "Sin resultados." },
|
|
166
|
+
refresh: {
|
|
167
|
+
button: "Actualizar", running: (done, total) => `Actualizando ${done}/${total}…`, partial: (ok, total) => `${ok}/${total} actualizadas`, doneAt: at => `Actualizado a las ${at}`,
|
|
168
|
+
titleIdle: "Actualizar los datos", titleRunning: "Actualizando los datos…", titleFailed: "Actualización terminada con errores", titleDone: "Datos actualizados",
|
|
169
|
+
descIdle: (total, concurrency) => `Vuelve a ejecutar ${total} ${total === 1 ? "consulta" : "consultas"} en el warehouse (${concurrency} a la vez) y actualiza la app con cada resultado.`,
|
|
170
|
+
descRunning: "Puedes cerrar esta ventana. La actualización sigue en segundo plano.",
|
|
171
|
+
descFailed: "Las fuentes con error siguen mostrando sus datos anteriores.", descDone: (total, took) => `${total} fuentes reconstruidas en ${took}.`,
|
|
172
|
+
queued: "En cola", running1: "En curso", done1: "Hecho", failed1: "Error", progress: (done, total) => `${done} de ${total} reconstruidas`,
|
|
173
|
+
close: "Cerrar", cancel: "Cancelar", start: "Iniciar la actualización", hide: "Ocultar", again: "Actualizar de nuevo", finish: "Listo",
|
|
174
|
+
hint: "Vuelve a ejecutar la consulta de cada fuente en el warehouse.", hintRunning: "Actualización en curso. Haz clic para ver el detalle.",
|
|
175
|
+
stageWaiting: "Conectando con Mako", stageBuilding: "Construyendo en el warehouse", stageLinking: "Obteniendo el enlace",
|
|
176
|
+
stageDownloading: "Descargando", stageLoading: "Cargando en DuckDB", stageQuerying: "Ejecutando la consulta", rowsWritten: n => `${n} filas`, of: "de",
|
|
177
|
+
},
|
|
178
|
+
freshness: { dialog: "Actualidad de los datos", sources: "Fuentes" },
|
|
111
179
|
dataTable: {
|
|
112
180
|
rows: "filas", of: "de", empty: "Ninguna fila con estos filtros.",
|
|
113
181
|
page: (p, n) => `Página ${p} de ${n}`, perPage: s => `${s} por página`, rowsPerPage: "Filas por página",
|
|
@@ -116,6 +184,7 @@ const es = {
|
|
|
116
184
|
exportTitle: "Exportar todas las filas de todas las páginas, en el orden actual",
|
|
117
185
|
exportFailed: "El navegador bloqueó la descarga. Abre la app en una pestaña nueva y exporta de nuevo.",
|
|
118
186
|
expand: "Ver detalles", collapse: "Ocultar detalles", info: l => `Acerca de ${l}`,
|
|
187
|
+
resizeHint: "Arrastra para cambiar el ancho · doble clic para restablecer",
|
|
119
188
|
},
|
|
120
189
|
};
|
|
121
190
|
|
|
@@ -126,11 +195,24 @@ const pl = {
|
|
|
126
195
|
inProgress: "w toku", inProgressTitle: "W toku: liczby nie są jeszcze ostateczne",
|
|
127
196
|
from: "Od", to: "Do", apply: "Zastosuj",
|
|
128
197
|
quarterLabel: (q, y) => `Q${q} ${y}`,
|
|
129
|
-
lastDays: n => `Ostatnie ${n} dni`, mtd: "Ten miesiąc", qtd: "Ten kwartał", ytd: "Ten rok",
|
|
198
|
+
lastDays: n => `Ostatnie ${n} dni`, mtd: "Ten miesiąc", qtd: "Ten kwartał", ytd: "Ten rok", allTime: "Cały okres",
|
|
130
199
|
},
|
|
131
200
|
filterBar: { filters: "Filtry", reset: "Resetuj", resetTitle: "Przywróć domyślne filtry", done: "Gotowe" },
|
|
132
201
|
filter: { all: "Wszystkie", none: "Brak", many: n => `Wybrano: ${n}`, only: "Tylko", search: "Szukaj", noMatch: "Brak wyników", groupAll: label => `${label} (wszystko)` },
|
|
133
202
|
combobox: { placeholder: "Wybierz…", search: "Szukaj…", empty: "Brak wyników." },
|
|
203
|
+
refresh: {
|
|
204
|
+
button: "Odśwież", running: (done, total) => `Odświeżanie ${done}/${total}…`, partial: (ok, total) => `Odświeżono ${ok}/${total}`, doneAt: at => `Odświeżono ${at}`,
|
|
205
|
+
titleIdle: "Odśwież dane", titleRunning: "Odświeżanie danych…", titleFailed: "Odświeżanie zakończone z błędami", titleDone: "Dane odświeżone",
|
|
206
|
+
descIdle: (total, concurrency) => `Ponownie uruchamia zapytania w hurtowni (${total}, po ${concurrency} naraz) i aktualizuje aplikację po każdym wyniku.`,
|
|
207
|
+
descRunning: "Możesz zamknąć to okno. Odświeżanie trwa w tle.",
|
|
208
|
+
descFailed: "Źródła z błędem zachowują poprzednie dane.", descDone: (total, took) => `Odbudowano wszystkie źródła (${total}) w ${took}.`,
|
|
209
|
+
queued: "W kolejce", running1: "W toku", done1: "Gotowe", failed1: "Błąd", progress: (done, total) => `Odbudowano ${done} z ${total}`,
|
|
210
|
+
close: "Zamknij", cancel: "Anuluj", start: "Rozpocznij odświeżanie", hide: "Ukryj", again: "Odśwież ponownie", finish: "Gotowe",
|
|
211
|
+
hint: "Ponownie uruchamia zapytanie każdego źródła w hurtowni.", hintRunning: "Trwa odświeżanie. Kliknij, aby zobaczyć szczegóły.",
|
|
212
|
+
stageWaiting: "Łączenie z Mako", stageBuilding: "Budowanie w hurtowni", stageLinking: "Pobieranie linku",
|
|
213
|
+
stageDownloading: "Pobieranie", stageLoading: "Ładowanie do DuckDB", stageQuerying: "Wykonywanie zapytania", rowsWritten: n => `${n} wierszy`, of: "z",
|
|
214
|
+
},
|
|
215
|
+
freshness: { dialog: "Aktualność danych", sources: "Źródła" },
|
|
134
216
|
dataTable: {
|
|
135
217
|
rows: "wierszy", of: "z", empty: "Brak wierszy dla tych filtrów.",
|
|
136
218
|
page: (p, n) => `Strona ${p} z ${n}`, perPage: s => `${s} na stronę`, rowsPerPage: "Wierszy na stronę",
|
|
@@ -139,6 +221,7 @@ const pl = {
|
|
|
139
221
|
exportTitle: "Eksportuj wszystkie wiersze ze wszystkich stron, w bieżącej kolejności",
|
|
140
222
|
exportFailed: "Przeglądarka zablokowała pobieranie. Otwórz aplikację w nowej karcie i wyeksportuj ponownie.",
|
|
141
223
|
expand: "Pokaż szczegóły", collapse: "Ukryj szczegóły", info: l => `Informacje: ${l}`,
|
|
224
|
+
resizeHint: "Przeciągnij, aby zmienić szerokość · kliknij dwukrotnie, aby przywrócić",
|
|
142
225
|
},
|
|
143
226
|
};
|
|
144
227
|
|
|
@@ -149,11 +232,24 @@ const pt = {
|
|
|
149
232
|
inProgress: "em curso", inProgressTitle: "Em curso: os números ainda não são definitivos",
|
|
150
233
|
from: "De", to: "Até", apply: "Aplicar",
|
|
151
234
|
quarterLabel: (q, y) => `T${q} ${y}`,
|
|
152
|
-
lastDays: n => `Últimos ${n} dias`, mtd: "Este mês", qtd: "Este trimestre", ytd: "Este ano",
|
|
235
|
+
lastDays: n => `Últimos ${n} dias`, mtd: "Este mês", qtd: "Este trimestre", ytd: "Este ano", allTime: "Todo o período",
|
|
153
236
|
},
|
|
154
237
|
filterBar: { filters: "Filtros", reset: "Repor", resetTitle: "Voltar aos filtros predefinidos", done: "Concluído" },
|
|
155
238
|
filter: { all: "Todos", none: "Nenhum", many: n => `${n} selecionados`, only: "Apenas", search: "Procurar", noMatch: "Sem resultados", groupAll: label => `${label} (tudo)` },
|
|
156
239
|
combobox: { placeholder: "Selecionar…", search: "Procurar…", empty: "Sem resultados." },
|
|
240
|
+
refresh: {
|
|
241
|
+
button: "Atualizar", running: (done, total) => `A atualizar ${done}/${total}…`, partial: (ok, total) => `${ok}/${total} atualizadas`, doneAt: at => `Atualizado às ${at}`,
|
|
242
|
+
titleIdle: "Atualizar os dados", titleRunning: "A atualizar os dados…", titleFailed: "Atualização concluída com erros", titleDone: "Dados atualizados",
|
|
243
|
+
descIdle: (total, concurrency) => `Volta a executar ${total} ${total === 1 ? "consulta" : "consultas"} no warehouse (${concurrency} de cada vez) e atualiza a app a cada resultado.`,
|
|
244
|
+
descRunning: "Pode fechar esta janela. A atualização continua em segundo plano.",
|
|
245
|
+
descFailed: "As fontes com erro mantêm os dados anteriores.", descDone: (total, took) => `${total} fontes reconstruídas em ${took}.`,
|
|
246
|
+
queued: "Em fila", running1: "Em curso", done1: "Concluído", failed1: "Falhou", progress: (done, total) => `${done} de ${total} reconstruídas`,
|
|
247
|
+
close: "Fechar", cancel: "Cancelar", start: "Iniciar a atualização", hide: "Ocultar", again: "Atualizar de novo", finish: "Concluído",
|
|
248
|
+
hint: "Volta a executar a consulta de cada fonte no warehouse.", hintRunning: "Atualização em curso. Clique para ver o detalhe.",
|
|
249
|
+
stageWaiting: "A ligar ao Mako", stageBuilding: "A construir no warehouse", stageLinking: "A obter a ligação",
|
|
250
|
+
stageDownloading: "A transferir", stageLoading: "A carregar no DuckDB", stageQuerying: "A executar a consulta", rowsWritten: n => `${n} linhas`, of: "de",
|
|
251
|
+
},
|
|
252
|
+
freshness: { dialog: "Atualidade dos dados", sources: "Fontes" },
|
|
157
253
|
dataTable: {
|
|
158
254
|
rows: "linhas", of: "de", empty: "Nenhuma linha com estes filtros.",
|
|
159
255
|
page: (p, n) => `Página ${p} de ${n}`, perPage: s => `${s} por página`, rowsPerPage: "Linhas por página",
|
|
@@ -162,10 +258,11 @@ const pt = {
|
|
|
162
258
|
exportTitle: "Exportar todas as linhas de todas as páginas, pela ordem atual",
|
|
163
259
|
exportFailed: "O navegador bloqueou a transferência. Abra a app num novo separador e exporte de novo.",
|
|
164
260
|
expand: "Ver detalhes", collapse: "Ocultar detalhes", info: l => `Sobre ${l}`,
|
|
261
|
+
resizeHint: "Arraste para redimensionar · duplo clique para repor",
|
|
165
262
|
},
|
|
166
263
|
};
|
|
167
264
|
|
|
168
|
-
/** Every language's strings, by section: period, filterBar, filter, combobox, dataTable (not in en). */
|
|
265
|
+
/** Every language's strings, by section: period, filterBar, filter, combobox, refresh, freshness (2.30), dataTable (not in en). */
|
|
169
266
|
export const STRINGS = { en, fr, de, it, es, pl, pt };
|
|
170
267
|
|
|
171
268
|
/**
|
package/menu/filter-menu.tsx
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
//
|
|
14
14
|
// 2.29: `locale` and `labels` translate All, None, Only, "All <group>" and
|
|
15
15
|
// "N selected" from the SDK's strings table (../locale.js).
|
|
16
|
+
// 2.30: `disabled` on FilterMenu passes to the Radix trigger.
|
|
16
17
|
import * as React from "react";
|
|
17
18
|
import { ChevronDown, ChevronRight } from "lucide-react";
|
|
18
19
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
@@ -277,6 +278,8 @@ export interface FilterMenuProps extends Omit<FilterMenuItemsProps, "none" | "on
|
|
|
277
278
|
sizeTo?: readonly string[];
|
|
278
279
|
/** Menu alignment against the trigger. Default "start". */
|
|
279
280
|
align?: "start" | "center" | "end";
|
|
281
|
+
/** Mako thin prop (2.30): disables the trigger (Radix Trigger's `disabled`): half opacity, no pointer, out of the tab order. */
|
|
282
|
+
disabled?: boolean;
|
|
280
283
|
}
|
|
281
284
|
|
|
282
285
|
/** The filter dropdown: the kit's trigger (`mk-ms-trigger`) over FilterMenuItems. */
|
|
@@ -296,7 +299,7 @@ export function FilterMenu(props: FilterMenuProps) {
|
|
|
296
299
|
else setNone(false);
|
|
297
300
|
}}
|
|
298
301
|
>
|
|
299
|
-
<DropdownMenuTrigger asChild>
|
|
302
|
+
<DropdownMenuTrigger asChild disabled={props.disabled}>
|
|
300
303
|
<button type="button" className={`mk-ms-trigger ${props.triggerClassName ?? ""}`} aria-label={props.label} title={text}>
|
|
301
304
|
<span className="mk-ms-value">
|
|
302
305
|
<span className="mk-ms-fit">
|
package/package.json
CHANGED
package/tailwind.css
CHANGED
|
@@ -58,3 +58,14 @@
|
|
|
58
58
|
}
|
|
59
59
|
[data-slot] table { border-collapse: collapse; }
|
|
60
60
|
}
|
|
61
|
+
|
|
62
|
+
/* FilterField in the phone sheet (2.30): the field already stretches its
|
|
63
|
+
direct child; the trigger inside it stretches too, whatever wraps it
|
|
64
|
+
(MultiSelect's .mk-ms, a Select, a FilterMenu). One rule here, none per
|
|
65
|
+
control. Unlayered, so it outranks a control's own `w-fit`. */
|
|
66
|
+
@media (width < 769px) {
|
|
67
|
+
[data-slot="filter-bar"][data-open] [data-slot="filter-field"] :is(.mk-ms-trigger, [data-slot="select-trigger"], [data-slot="combobox-trigger"]) {
|
|
68
|
+
width: 100%;
|
|
69
|
+
max-width: none;
|
|
70
|
+
}
|
|
71
|
+
}
|
package/ui-core.js
CHANGED
|
@@ -224,23 +224,73 @@ export function columnGroupRuns(columns) {
|
|
|
224
224
|
* (default `defaultColumnWidth`). The flexible columns (`grow: true`, else the
|
|
225
225
|
* first column) take the space left when the card is wider than the sum; their
|
|
226
226
|
* floor is `minWidth`, else their width. Widths never depend on the rows, so
|
|
227
|
-
* sorting, filtering and paging never move a column.
|
|
228
|
-
*
|
|
227
|
+
* sorting, filtering and paging never move a column. A column's `size`
|
|
228
|
+
* (TanStack's name, px) is its width when `width` is unset. `sizing` (2.30,
|
|
229
|
+
* TanStack's ColumnSizingState, `{ [id]: px }`) holds dragged widths: they win,
|
|
230
|
+
* and a dragged growing column stops growing (`fixed: true` once none grows).
|
|
231
|
+
* Returns `{ cols: [{ id, width: CSS length | null (flexible) }], minWidth, fixed? }`.
|
|
229
232
|
*/
|
|
230
|
-
export function columnLayout(columns) {
|
|
233
|
+
export function columnLayout(columns, sizing) {
|
|
231
234
|
const anyGrow = columns.some(c => c.grow);
|
|
232
235
|
let px = 0;
|
|
236
|
+
let flexible = 0;
|
|
233
237
|
const other = [];
|
|
234
238
|
const cols = columns.map((c, i) => {
|
|
235
|
-
const
|
|
236
|
-
const
|
|
239
|
+
const sized = sizing?.[c.id];
|
|
240
|
+
const grow = (anyGrow ? !!c.grow : i === 0) && sized == null;
|
|
241
|
+
const base = sized ?? c.width ?? c.size ?? defaultColumnWidth(c, i);
|
|
237
242
|
const floor = grow ? (c.minWidth ?? base) : base;
|
|
243
|
+
if (grow) flexible += 1;
|
|
238
244
|
if (typeof floor === "number") px += floor;
|
|
239
245
|
else other.push(floor);
|
|
240
246
|
return { id: c.id, width: grow ? null : cssLength(base) };
|
|
241
247
|
});
|
|
242
248
|
const minWidth = other.length ? `calc(${[`${px}px`, ...other].join(" + ")})` : `${px}px`;
|
|
243
|
-
|
|
249
|
+
// A dragged growing column is a fixed one: the table is then exactly the sum.
|
|
250
|
+
return sizing && !flexible ? { cols, minWidth, fixed: true } : { cols, minWidth };
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* A column width after a drag (2.30, TanStack Table's sizes): the start width
|
|
255
|
+
* plus the pointer's travel, rounded, within `minSize` (default 20, as
|
|
256
|
+
* TanStack) and `maxSize` (default none).
|
|
257
|
+
*/
|
|
258
|
+
export function resizeWidth(column, startWidth, delta) {
|
|
259
|
+
const min = column?.minSize ?? 20;
|
|
260
|
+
const max = column?.maxSize ?? Infinity;
|
|
261
|
+
return Math.min(max, Math.max(min, Math.round(startWidth + delta)));
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Section rows (2.30): splits `rows` at each row `isSection` flags. Returns
|
|
266
|
+
* `[{ section: row | null, rows: [data rows] }]` in the given order; rows
|
|
267
|
+
* before the first section sit in a run with `section: null`.
|
|
268
|
+
*/
|
|
269
|
+
export function splitSections(rows, isSection) {
|
|
270
|
+
const runs = [];
|
|
271
|
+
let run = null;
|
|
272
|
+
for (const row of rows) {
|
|
273
|
+
if (isSection(row)) {
|
|
274
|
+
run = { section: row, rows: [] };
|
|
275
|
+
runs.push(run);
|
|
276
|
+
} else {
|
|
277
|
+
if (!run) {
|
|
278
|
+
run = { section: null, rows: [] };
|
|
279
|
+
runs.push(run);
|
|
280
|
+
}
|
|
281
|
+
run.rows.push(row);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return runs;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/** TanStack Table's SortingState (`[{ id, desc }]`) as a DataTable sort, and back. Only the first entry counts. */
|
|
288
|
+
export function fromSorting(sorting) {
|
|
289
|
+
const s = sorting?.[0];
|
|
290
|
+
return s ? { id: s.id, dir: s.desc ? "desc" : "asc" } : null;
|
|
291
|
+
}
|
|
292
|
+
export function toSorting(sort) {
|
|
293
|
+
return sort ? [{ id: sort.id, desc: sort.dir === "desc" }] : [];
|
|
244
294
|
}
|
|
245
295
|
|
|
246
296
|
/**
|