@protobase/ui 0.63.5 → 0.64.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/account/change-email-dialog.js +1 -1
- package/dist/account/devices-section.js +11 -5
- package/dist/account/messages.js +2 -333
- package/dist/account/passkeys-section.js +2 -2
- package/dist/account/password-change-dialog.js +3 -3
- package/dist/account/sign-in-policy-form.js +6 -3
- package/dist/account/sign-in-providers-section.js +1 -1
- package/dist/account/staff-sign-in-log.js +4 -4
- package/dist/action-card/messages.js +2 -5
- package/dist/activity-chart/activity-chart.js +4 -6
- package/dist/activity-chart/messages.js +2 -11
- package/dist/app/app.js +1 -2
- package/dist/app/batch-failure.js +5 -1
- package/dist/app/change-confirm/messages.js +2 -13
- package/dist/app/change-confirm/use-change-confirm.js +1 -1
- package/dist/app/charts/chart-groups.js +3 -1
- package/dist/app/charts/group-bars.js +1 -1
- package/dist/app/charts/messages.js +2 -23
- package/dist/app/charts/period-chart.js +1 -1
- package/dist/app/comments/messages.js +2 -19
- package/dist/app/confirm-sign-in-messages.js +2 -19
- package/dist/app/confirm-sign-in.js +1 -1
- package/dist/app/create/create-page.js +3 -3
- package/dist/app/create/create-record-form.js +2 -2
- package/dist/app/create/create-route.js +1 -1
- package/dist/app/create/messages.js +2 -29
- package/dist/app/custom-section.js +1 -2
- package/dist/app/delete/blocked-delete.js +5 -2
- package/dist/app/delete/dialogs.js +21 -8
- package/dist/app/delete/messages.js +2 -63
- package/dist/app/delete/use-delete-flow.js +5 -4
- package/dist/app/displays/board-column.js +1 -1
- package/dist/app/displays/board-columns.js +1 -1
- package/dist/app/displays/board-display.js +21 -9
- package/dist/app/displays/calendar-display.js +15 -6
- package/dist/app/displays/cards-display.js +1 -1
- package/dist/app/displays/custom-display.js +1 -2
- package/dist/app/displays/list-cards.js +1 -1
- package/dist/app/displays/map-display.js +19 -6
- package/dist/app/displays/messages.js +2 -147
- package/dist/app/displays/period-controls.js +2 -2
- package/dist/app/displays/timeline-display.js +15 -6
- package/dist/app/displays/timeline-range.js +1 -1
- package/dist/app/displays/use-board-move.js +3 -3
- package/dist/app/displays/use-calendar-move.js +1 -1
- package/dist/app/document-title.js +1 -1
- package/dist/app/embedded-list/cut-off-note.js +7 -1
- package/dist/app/embedded-list/embedded-row-targets.js +3 -3
- package/dist/app/embedded-list/messages.js +2 -21
- package/dist/app/export/builder-port.js +1 -1
- package/dist/app/export/export-dialog.js +14 -8
- package/dist/app/export/messages.js +2 -75
- package/dist/app/export/use-export-flow.js +9 -3
- package/dist/app/field-editor.js +2 -2
- package/dist/app/field-errors.js +18 -7
- package/dist/app/field-messages.js +2 -45
- package/dist/app/field-types/members/messages.js +2 -15
- package/dist/app/field-types/messages.js +2 -5
- package/dist/app/field-types/widget-part.js +1 -1
- package/dist/app/file-field.js +3 -3
- package/dist/app/gallery/gallery-section.js +5 -2
- package/dist/app/gallery/messages.js +2 -27
- package/dist/app/gallery/photo-details.js +2 -2
- package/dist/app/hand-order/hand-sorted-list.js +1 -2
- package/dist/app/hand-order/messages.js +2 -29
- package/dist/app/hand-order/use-hand-order.js +1 -1
- package/dist/app/history/describe-change.js +1 -1
- package/dist/app/history/messages.js +2 -29
- package/dist/app/import/convert.js +19 -10
- package/dist/app/import/import-check-step.js +5 -5
- package/dist/app/import/import-dialog.js +5 -2
- package/dist/app/import/import-file-step.js +1 -1
- package/dist/app/import/import-mapping-step.js +3 -3
- package/dist/app/import/messages.js +2 -197
- package/dist/app/import/prepare-rows.js +11 -4
- package/dist/app/import/sheet-cell.js +1 -1
- package/dist/app/import/xlsx-reader.js +2 -2
- package/dist/app/import/zip-reader.js +4 -1
- package/dist/app/list-actions/use-list-actions.js +4 -1
- package/dist/app/list-edit/messages.js +2 -11
- package/dist/app/list-empty-state.js +7 -4
- package/dist/app/list-group-chart.js +1 -1
- package/dist/app/list-messages.js +2 -53
- package/dist/app/list-page.js +9 -9
- package/dist/app/live-update/messages.js +2 -11
- package/dist/app/map/messages.js +2 -11
- package/dist/app/messages.js +2 -139
- package/dist/app/meta-gate-messages.js +2 -13
- package/dist/app/nav-from-meta.js +2 -2
- package/dist/app/new-version/messages.js +2 -21
- package/dist/app/new-version/new-version-banner.js +1 -2
- package/dist/app/pages/action-inputs/action-inputs-dialog.js +1 -1
- package/dist/app/pages/action-inputs/input-answers.js +1 -1
- package/dist/app/pages/blocks/modal-form.js +1 -1
- package/dist/app/pages/blocks/settings.js +1 -1
- package/dist/app/pages/blocks/tabs.js +1 -1
- package/dist/app/pages/composed-page.js +1 -2
- package/dist/app/pages/custom-boundary.js +1 -2
- package/dist/app/pages/messages.js +2 -79
- package/dist/app/pages/render-node.js +2 -3
- package/dist/app/pages/use-run-action.js +14 -6
- package/dist/app/rank-after/dependency-rule.js +8 -2
- package/dist/app/rank-after/messages.js +2 -5
- package/dist/app/rank-after/ranked-place.js +7 -1
- package/dist/app/record-chart/messages.js +2 -25
- package/dist/app/record-lines-cell.js +4 -1
- package/dist/app/record-lines.js +2 -2
- package/dist/app/record-messages.js +2 -83
- package/dist/app/record-page.js +3 -3
- package/dist/app/record-row/messages.js +2 -23
- package/dist/app/record-row/record-row-body.js +1 -1
- package/dist/app/record-row/record-row.js +2 -2
- package/dist/app/record-row/saved-record-row.js +2 -2
- package/dist/app/related-cards/messages.js +2 -15
- package/dist/app/related-dots/dots-summary.js +1 -1
- package/dist/app/related-dots/messages.js +2 -5
- package/dist/app/related-dots/related-dots.js +2 -3
- package/dist/app/relation-picker.js +1 -1
- package/dist/app/runtime/messages.js +2 -55
- package/dist/app/runtime/runtime-status.js +12 -3
- package/dist/app/saved/messages.js +2 -19
- package/dist/app/saved/saved-list.js +2 -2
- package/dist/app/search/messages.js +2 -19
- package/dist/app/search/navigation-hits.js +1 -1
- package/dist/app/search/search-model.js +9 -3
- package/dist/app/searches/messages.js +2 -93
- package/dist/app/searches/save-search-button.js +3 -3
- package/dist/app/searches/saved-search-rows.js +2 -2
- package/dist/app/searches/saved-search-section.js +3 -3
- package/dist/app/searches/saved-searches.js +13 -11
- package/dist/app/searches/search-controls.js +1 -1
- package/dist/app/searches/search-diff.js +8 -2
- package/dist/app/searches/update-search-dialog.js +9 -3
- package/dist/app/searches/use-save-search.js +1 -1
- package/dist/app/searches/use-search-row.js +2 -2
- package/dist/app/sensitive-field.js +3 -3
- package/dist/app/source-notice.js +3 -3
- package/dist/app/staff-banner.js +12 -8
- package/dist/app/use-live-save.js +2 -2
- package/dist/app/value-badge.js +3 -4
- package/dist/app-shell/global-search.js +2 -2
- package/dist/app-shell/messages.js +2 -63
- package/dist/app-shell/sidebar-group.js +2 -2
- package/dist/app-shell/sidebar.js +1 -2
- package/dist/app-shell/top-bar.js +1 -1
- package/dist/assistant-dock/messages.js +2 -23
- package/dist/auth/auth-gate.js +1 -1
- package/dist/auth/auth-messages.js +9 -88
- package/dist/auth/email-code-form.js +2 -3
- package/dist/auth/forgot-password-form.js +2 -3
- package/dist/auth/messages.js +2 -203
- package/dist/auth/provider-sign-in-page.js +3 -3
- package/dist/auth/resend-code-button.js +1 -1
- package/dist/auth/reset-password-form.js +1 -1
- package/dist/auth/reset-password-page.js +1 -1
- package/dist/auth/sign-in-form.js +2 -2
- package/dist/auth/sign-up-code-form.js +2 -3
- package/dist/auth/sign-up-details-form.js +3 -4
- package/dist/auth/staff-sign-in-form.js +3 -3
- package/dist/calls/call-guests-panel.js +1 -1
- package/dist/calls/call-lobby-notice.js +1 -1
- package/dist/calls/call-mark.js +1 -1
- package/dist/calls/call-people.js +1 -1
- package/dist/calls/call-tile.js +2 -2
- package/dist/calls/messages.js +2 -139
- package/dist/carousel/carousel-controls.js +4 -1
- package/dist/carousel/messages.js +2 -13
- package/dist/chat/messages.js +2 -19
- package/dist/compact-table/compact-table.js +1 -1
- package/dist/compact-table/messages.js +2 -15
- package/dist/data-grid/cell-text.js +6 -5
- package/dist/data-grid/cells.js +7 -4
- package/dist/data-grid/grid-footer.js +1 -1
- package/dist/data-grid/grid-row.js +1 -1
- package/dist/data-grid/header-menu.js +1 -1
- package/dist/data-grid/messages.js +2 -49
- package/dist/data-grid/resize-handle.js +1 -1
- package/dist/data-grid/row-reorder.js +20 -5
- package/dist/filter-panel/active-filter-chips.js +1 -1
- package/dist/filter-panel/date-presets.js +2 -2
- package/dist/filter-panel/facet-combobox.js +1 -1
- package/dist/filter-panel/facet-group.js +1 -1
- package/dist/filter-panel/messages.js +2 -49
- package/dist/filter-panel/range-filter.js +1 -1
- package/dist/format/date.js +4 -4
- package/dist/format/messages.js +2 -21
- package/dist/format/money.js +1 -1
- package/dist/format/number.js +5 -2
- package/dist/forms/messages.js +2 -21
- package/dist/inline-child-table/inline-child-table.js +19 -4
- package/dist/inline-child-table/line-row.js +2 -2
- package/dist/inline-child-table/messages.js +2 -35
- package/dist/invitations/link-notice.js +2 -3
- package/dist/invitations/messages.js +2 -21
- package/dist/invitations/pending-invitation-row.js +1 -1
- package/dist/lists/messages.js +2 -5
- package/dist/live/columns-from-model.js +14 -31
- package/dist/live/display-value.js +1 -1
- package/dist/live/messages.js +2 -15
- package/dist/live/value-color.js +13 -3
- package/dist/live/view-fields.js +4 -2
- package/dist/locale/en.js +1399 -0
- package/dist/locale/messages.js +38 -7
- package/dist/locale/nl.js +1399 -0
- package/dist/markdown/messages.js +2 -13
- package/dist/mentions/messages.js +2 -13
- package/dist/notifications/bell/messages.js +2 -35
- package/dist/notifications/bell/unread-label.js +1 -1
- package/dist/organizations/invitation-page.js +31 -13
- package/dist/organizations/invitations-page.js +1 -1
- package/dist/organizations/members-page.js +2 -2
- package/dist/organizations/messages.js +2 -187
- package/dist/organizations/organization-page.js +4 -4
- package/dist/organizations/organizations-page.js +1 -1
- package/dist/package.js +1 -1
- package/dist/plugins/load-plugin.js +2 -2
- package/dist/plugins/messages.js +2 -33
- package/dist/plugins/plugin-notice.js +7 -5
- package/dist/primitives/badge.d.ts +2 -1
- package/dist/primitives/messages.js +2 -13
- package/dist/primitives/token.js +1 -1
- package/dist/record-view/field.js +2 -2
- package/dist/record-view/messages.js +2 -33
- package/dist/record-view/record-header.js +2 -2
- package/dist/roles/messages.js +2 -11
- package/dist/shell/assets/app-CN_7en9q.js +8 -0
- package/dist/shell/assets/{calls-CPiQcC70.js → calls-D5RK7EJu.js} +2 -2
- package/dist/shell/assets/export-worker-ClXdfeuq.js +15 -0
- package/dist/shell/assets/{index-_ZpZ2ro0.js → index-DMaCBpbN.js} +2 -2
- package/dist/shell/assets/{maplibre-CjNYwEqW.js → maplibre-CRmpQfDl.js} +3 -3
- package/dist/shell/assets/parse-worker-DxsmAjef.js +18 -0
- package/dist/shell/assets/preload-helper-BgLOXTzV.js +2 -0
- package/dist/shell/assets/{record-map-DjqQGqZ2.js → record-map-DsP4sXes.js} +2 -2
- package/dist/shell/assets/{records-map-DU29d6QK.js → records-map-WFMHgKdf.js} +2 -2
- package/dist/shell/assets/shared-protobase-ui-CP2mMFbh.js +2 -0
- package/dist/shell/assets/vendor-Kvdo8Jrw.js +73 -0
- package/dist/shell/index.html +5 -5
- package/dist/shell/protobase.shell.json +2 -2
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/app-CN_7en9q.js.map +1 -0
- package/dist/shell-source-maps/assets/{calls-CPiQcC70.js.map → calls-D5RK7EJu.js.map} +1 -1
- package/dist/shell-source-maps/assets/export-worker-ClXdfeuq.js.map +1 -0
- package/dist/shell-source-maps/assets/{index-_ZpZ2ro0.js.map → index-DMaCBpbN.js.map} +1 -1
- package/dist/shell-source-maps/assets/{maplibre-CjNYwEqW.js.map → maplibre-CRmpQfDl.js.map} +1 -1
- package/dist/shell-source-maps/assets/parse-worker-DxsmAjef.js.map +1 -0
- package/dist/shell-source-maps/assets/preload-helper-BgLOXTzV.js.map +1 -0
- package/dist/shell-source-maps/assets/{record-map-DjqQGqZ2.js.map → record-map-DsP4sXes.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-DU29d6QK.js.map → records-map-WFMHgKdf.js.map} +1 -1
- package/dist/shell-source-maps/assets/shared-protobase-ui-CP2mMFbh.js.map +1 -0
- package/dist/shell-source-maps/assets/vendor-Kvdo8Jrw.js.map +1 -0
- package/dist/side-panel/messages.js +2 -5
- package/dist/status/messages.js +2 -59
- package/dist/toasts/messages.js +2 -5
- package/dist/users/create-user-form.js +1 -1
- package/dist/users/messages.js +2 -49
- package/package.json +5 -4
- package/dist/app-shell/nav.js +0 -85
- package/dist/locale/slotted.js +0 -14
- package/dist/mocks/activity.js +0 -24
- package/dist/mocks/rng.js +0 -20
- package/dist/mocks/users.js +0 -63
- package/dist/shell/assets/app-BPv_SjnU.js +0 -9
- package/dist/shell/assets/export-worker-3e4Zsv0a.js +0 -3
- package/dist/shell/assets/parse-worker-UhbwEjS0.js +0 -6
- package/dist/shell/assets/preload-helper-SYSsmQ2O.js +0 -2
- package/dist/shell/assets/shared-protobase-ui-Cab5nqST.js +0 -2
- package/dist/shell/assets/vendor-iwLB0x-s.js +0 -63
- package/dist/shell-source-maps/assets/app-BPv_SjnU.js.map +0 -1
- package/dist/shell-source-maps/assets/export-worker-3e4Zsv0a.js.map +0 -1
- package/dist/shell-source-maps/assets/parse-worker-UhbwEjS0.js.map +0 -1
- package/dist/shell-source-maps/assets/preload-helper-SYSsmQ2O.js.map +0 -1
- package/dist/shell-source-maps/assets/shared-protobase-ui-Cab5nqST.js.map +0 -1
- package/dist/shell-source-maps/assets/vendor-iwLB0x-s.js.map +0 -1
|
@@ -63,8 +63,15 @@ const foundOne = (context, finding) => {
|
|
|
63
63
|
const keys = context.lookups.keysOf(finding.model.name, finding.field, finding.value);
|
|
64
64
|
const named = `${fieldLabel(context.views[finding.model.name], finding.field).toLowerCase()} “${String(finding.value)}”`;
|
|
65
65
|
if (keys.length === 1) return { key: keys[0] };
|
|
66
|
-
if (keys.length === 0) return { none: text("noneHas",
|
|
67
|
-
|
|
66
|
+
if (keys.length === 0) return { none: text("noneHas", {
|
|
67
|
+
singular: singularOf(context.views, finding.model.name),
|
|
68
|
+
named
|
|
69
|
+
}) };
|
|
70
|
+
return { several: text("severalHave", {
|
|
71
|
+
count: keys.length,
|
|
72
|
+
plural: pluralOf(context.views, finding.model.name),
|
|
73
|
+
named
|
|
74
|
+
}) };
|
|
68
75
|
};
|
|
69
76
|
const isBlank = (row) => row.cells.every(isEmptyCell);
|
|
70
77
|
/**
|
|
@@ -97,8 +104,8 @@ const prepareRows = async (rows, plan, context) => {
|
|
|
97
104
|
else problems.push(`${fieldLabel(views[model.name], field)}: ${found.none ?? found.several}`);
|
|
98
105
|
}
|
|
99
106
|
const existing = match && foundOne(context, match);
|
|
100
|
-
if (existing?.several) problems.push(text("notOneRecord", existing.several));
|
|
101
|
-
if (existing?.none && plan.mode === "update") problems.push(text("nothingToUpdate", existing.none));
|
|
107
|
+
if (existing?.several) problems.push(text("notOneRecord", { found: existing.several }));
|
|
108
|
+
if (existing?.none && plan.mode === "update") problems.push(text("nothingToUpdate", { found: existing.none }));
|
|
102
109
|
const prepared = {
|
|
103
110
|
line: row.line,
|
|
104
111
|
cells: row.cells,
|
|
@@ -13,6 +13,6 @@ const cellText = (cell) => {
|
|
|
13
13
|
/** A column's letters as a spreadsheet names it: 0 is A, 27 is AB. */
|
|
14
14
|
const columnLetters = (index) => index < 26 ? String.fromCharCode(65 + index) : columnLetters(Math.floor(index / 26) - 1) + columnLetters(index % 26);
|
|
15
15
|
/** How the import names a column: its header, or "Column C" when the header cell is empty. */
|
|
16
|
-
const columnName = (headers, index) => headers[index]?.trim() ? headers[index] : text("column", columnLetters(index));
|
|
16
|
+
const columnName = (headers, index) => headers[index]?.trim() ? headers[index] : text("column", { letters: columnLetters(index) });
|
|
17
17
|
//#endregion
|
|
18
18
|
export { cellText, columnLetters, columnName, isEmptyCell, isSheetDate };
|
|
@@ -4,7 +4,7 @@ import { zipEntries, zipText, zipTextChunks } from "./zip-reader.js";
|
|
|
4
4
|
//#region src/app/import/xlsx-reader.ts
|
|
5
5
|
const part = (entries, name) => {
|
|
6
6
|
const entry = entries.get(name);
|
|
7
|
-
if (!entry) throw new Error(text("notWorkbook", name));
|
|
7
|
+
if (!entry) throw new Error(text("notWorkbook", { part: name }));
|
|
8
8
|
return entry;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
@@ -25,7 +25,7 @@ const openWorkbook = async (blob) => {
|
|
|
25
25
|
};
|
|
26
26
|
async function* rows(name) {
|
|
27
27
|
const sheet = sheets.find((candidate) => candidate.name === name);
|
|
28
|
-
if (!sheet) throw new Error(text("noSheetCalled", name));
|
|
28
|
+
if (!sheet) throw new Error(text("noSheetCalled", { name }));
|
|
29
29
|
const shared = context ?? await sheetContext();
|
|
30
30
|
const scan = createRowScanner();
|
|
31
31
|
let line = 0;
|
|
@@ -48,7 +48,10 @@ const zipEntryStream = async (blob, entry) => {
|
|
|
48
48
|
const raw = blob.slice(dataStart, dataStart + entry.size).stream();
|
|
49
49
|
if (entry.method === 0) return raw;
|
|
50
50
|
if (entry.method === 8) return raw.pipeThrough(new DecompressionStream("deflate-raw"));
|
|
51
|
-
throw new Error(text("compression",
|
|
51
|
+
throw new Error(text("compression", {
|
|
52
|
+
part: entry.name,
|
|
53
|
+
method: entry.method
|
|
54
|
+
}));
|
|
52
55
|
};
|
|
53
56
|
/** The entry's content as text, decoded as UTF-8 a chunk at a time. */
|
|
54
57
|
async function* zipTextChunks(blob, entry) {
|
|
@@ -54,7 +54,10 @@ const useListActions = (model) => {
|
|
|
54
54
|
};
|
|
55
55
|
}),
|
|
56
56
|
bulkActions: listed.filter((action) => action.bulk && action.run?.kind !== "link").map((action) => ({
|
|
57
|
-
label: (count) => text("actionCount",
|
|
57
|
+
label: (count) => text("actionCount", {
|
|
58
|
+
label: action.label,
|
|
59
|
+
count
|
|
60
|
+
}),
|
|
58
61
|
destructive: isDanger(action),
|
|
59
62
|
available: (row) => runner.appliesOn(action, rowRecord(model, row)),
|
|
60
63
|
onRun: (rows, skipped) => start({
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/list-edit/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
changedBySomeoneElse: "Changed by someone else",
|
|
6
|
-
couldNotSave: "Could not save"
|
|
7
|
-
},
|
|
8
|
-
nl: {
|
|
9
|
-
changedBySomeoneElse: "Gewijzigd door iemand anders",
|
|
10
|
-
couldNotSave: "Kon niet bewaren"
|
|
11
|
-
}
|
|
12
|
-
});
|
|
3
|
+
const text = messages("app/list-edit");
|
|
13
4
|
//#endregion
|
|
14
5
|
export { text };
|
|
@@ -3,25 +3,28 @@ import { text } from "./list-messages.js";
|
|
|
3
3
|
/** Why a list has no rows, and the buttons that help: clear the search, clear the filters, or create the first record. */
|
|
4
4
|
const listEmptyState = ({ plural, search, filtered, scoped, canCreate }) => {
|
|
5
5
|
if (search) return {
|
|
6
|
-
message: text("noMatchSearch",
|
|
6
|
+
message: text("noMatchSearch", {
|
|
7
|
+
plural,
|
|
8
|
+
search
|
|
9
|
+
}),
|
|
7
10
|
clearSearch: true,
|
|
8
11
|
clearFilters: filtered,
|
|
9
12
|
create: false
|
|
10
13
|
};
|
|
11
14
|
if (filtered) return {
|
|
12
|
-
message: text("noMatchFilters", plural),
|
|
15
|
+
message: text("noMatchFilters", { plural }),
|
|
13
16
|
clearSearch: false,
|
|
14
17
|
clearFilters: true,
|
|
15
18
|
create: false
|
|
16
19
|
};
|
|
17
20
|
if (scoped) return {
|
|
18
|
-
message: text("noMatch", plural),
|
|
21
|
+
message: text("noMatch", { plural }),
|
|
19
22
|
clearSearch: false,
|
|
20
23
|
clearFilters: false,
|
|
21
24
|
create: false
|
|
22
25
|
};
|
|
23
26
|
return {
|
|
24
|
-
message: text("noneYet", plural),
|
|
27
|
+
message: text("noneYet", { plural }),
|
|
25
28
|
clearSearch: false,
|
|
26
29
|
clearFilters: false,
|
|
27
30
|
create: canCreate
|
|
@@ -7,7 +7,7 @@ const measureTitle = (chart, view, plural) => {
|
|
|
7
7
|
const name = chart.sum ?? chart.average;
|
|
8
8
|
if (name === void 0) return plural;
|
|
9
9
|
const label = view?.fields[name]?.label ?? humanize(name);
|
|
10
|
-
return chart.sum !== void 0 ? `${label}` : text("average", label);
|
|
10
|
+
return chart.sum !== void 0 ? `${label}` : text("average", { label });
|
|
11
11
|
};
|
|
12
12
|
/** The view's chart per value of a field, above the list and following its filter. */
|
|
13
13
|
const ListGroupChart = ({ model, view, chart, plural, filter }) => {
|
|
@@ -1,56 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../locale/messages.js";
|
|
2
2
|
//#region src/app/list-messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
noList: (name) => `There is no list called ${name}.`,
|
|
6
|
-
searchPlural: (plural) => `Search ${plural.toLowerCase()}`,
|
|
7
|
-
search: "Search",
|
|
8
|
-
sort: "Sort",
|
|
9
|
-
filters: "Filters",
|
|
10
|
-
filtersCount: (count) => `Filters (${count})`,
|
|
11
|
-
newRecord: (singular) => `New ${singular.toLowerCase()}`,
|
|
12
|
-
export: "Export",
|
|
13
|
-
openRecord: (singular) => `Open ${singular.toLowerCase()}`,
|
|
14
|
-
delete: "Delete",
|
|
15
|
-
exportCount: (count) => `Export ${count}`,
|
|
16
|
-
deleteCount: (count) => `Delete ${count}`,
|
|
17
|
-
actionCount: (label, count) => `${label} (${count})`,
|
|
18
|
-
dragToSort: "Drag a row by its handle to move it. Every move is saved as you drop it.",
|
|
19
|
-
unreadableFilter: "The filter in the address could not be read",
|
|
20
|
-
couldNotLoadRows: "Could not load rows",
|
|
21
|
-
created: (plural) => `${plural} created`,
|
|
22
|
-
noMatchSearch: (plural, search) => `No ${plural.toLowerCase()} match “${search}”.`,
|
|
23
|
-
noMatchFilters: (plural) => `No ${plural.toLowerCase()} match these filters.`,
|
|
24
|
-
noMatch: (plural) => `No ${plural.toLowerCase()} match.`,
|
|
25
|
-
noneYet: (plural) => `No ${plural.toLowerCase()} yet.`,
|
|
26
|
-
clearSearch: "Clear search",
|
|
27
|
-
clearFilters: "Clear filters"
|
|
28
|
-
},
|
|
29
|
-
nl: {
|
|
30
|
-
noList: (name) => `Er is geen lijst met de naam ${name}.`,
|
|
31
|
-
searchPlural: (plural) => `Zoeken in ${plural.toLowerCase()}`,
|
|
32
|
-
search: "Zoeken",
|
|
33
|
-
sort: "Sorteren",
|
|
34
|
-
filters: "Filters",
|
|
35
|
-
filtersCount: (count) => `Filters (${count})`,
|
|
36
|
-
newRecord: (singular) => `${singular} toevoegen`,
|
|
37
|
-
export: "Exporteren",
|
|
38
|
-
openRecord: (singular) => `${singular} openen`,
|
|
39
|
-
delete: "Verwijderen",
|
|
40
|
-
exportCount: (count) => `${count} exporteren`,
|
|
41
|
-
deleteCount: (count) => `${count} verwijderen`,
|
|
42
|
-
actionCount: (label, count) => `${label} (${count})`,
|
|
43
|
-
dragToSort: "Sleep een rij aan de greep om hem te verplaatsen. Elke verplaatsing wordt bewaard zodra je loslaat.",
|
|
44
|
-
unreadableFilter: "Het filter in het adres kon niet worden gelezen",
|
|
45
|
-
couldNotLoadRows: "Kon de rijen niet laden",
|
|
46
|
-
created: (plural) => `${plural} aangemaakt`,
|
|
47
|
-
noMatchSearch: (plural, search) => `Geen ${plural.toLowerCase()} gevonden voor “${search}”.`,
|
|
48
|
-
noMatchFilters: (plural) => `Geen ${plural.toLowerCase()} gevonden met deze filters.`,
|
|
49
|
-
noMatch: (plural) => `Geen ${plural.toLowerCase()} gevonden.`,
|
|
50
|
-
noneYet: (plural) => `Nog geen ${plural.toLowerCase()}.`,
|
|
51
|
-
clearSearch: "Zoekopdracht wissen",
|
|
52
|
-
clearFilters: "Filters wissen"
|
|
53
|
-
}
|
|
54
|
-
});
|
|
3
|
+
const text = messages("app/list");
|
|
55
4
|
//#endregion
|
|
56
5
|
export { text };
|
package/dist/app/list-page.js
CHANGED
|
@@ -88,12 +88,12 @@ const ListPage = ({ address }) => {
|
|
|
88
88
|
prompt: prompt.signIn
|
|
89
89
|
}) : /* @__PURE__ */ jsx(Notice, {
|
|
90
90
|
title: text("notFound"),
|
|
91
|
-
children: text("noResource", address.resource)
|
|
91
|
+
children: text("noResource", { name: address.resource })
|
|
92
92
|
});
|
|
93
93
|
const view = viewOfList(views[address.resource], address.list);
|
|
94
94
|
if (address.list !== void 0 && !view) return /* @__PURE__ */ jsx(Notice, {
|
|
95
95
|
title: text("notFound"),
|
|
96
|
-
children: text$1("noList", address.list)
|
|
96
|
+
children: text$1("noList", { name: address.list })
|
|
97
97
|
});
|
|
98
98
|
if (view?.searchesOf) return /* @__PURE__ */ jsx(SavedSearches, {
|
|
99
99
|
model,
|
|
@@ -227,7 +227,7 @@ const LoadedList = ({ model, address, scope, heading }) => {
|
|
|
227
227
|
const searchBox = model.search?.length ? /* @__PURE__ */ jsx(ListSearch, {
|
|
228
228
|
value: search?.kind === "search" ? search.text : "",
|
|
229
229
|
onCommit: commitSearch,
|
|
230
|
-
placeholder: text$1("searchPlural", plural),
|
|
230
|
+
placeholder: text$1("searchPlural", { plural }),
|
|
231
231
|
className: desktop ? void 0 : "min-h-11"
|
|
232
232
|
}) : null;
|
|
233
233
|
const panel = /* @__PURE__ */ jsx(FilterPanel, {
|
|
@@ -269,7 +269,7 @@ const LoadedList = ({ model, address, scope, heading }) => {
|
|
|
269
269
|
className: "min-h-11",
|
|
270
270
|
onClick: () => setSheetOpen(true),
|
|
271
271
|
"aria-haspopup": "dialog",
|
|
272
|
-
children: [/* @__PURE__ */ jsx(SlidersHorizontal, { className: "size-3.5" }), chips.length > 0 ? text$1("filtersCount", chips.length) : text$1("filters")]
|
|
272
|
+
children: [/* @__PURE__ */ jsx(SlidersHorizontal, { className: "size-3.5" }), chips.length > 0 ? text$1("filtersCount", { count: chips.length }) : text$1("filters")]
|
|
273
273
|
}), searchBox ?? /* @__PURE__ */ jsx("div", {
|
|
274
274
|
className: "min-w-0 flex-1",
|
|
275
275
|
children: chipsRow
|
|
@@ -297,7 +297,7 @@ const LoadedList = ({ model, address, scope, heading }) => {
|
|
|
297
297
|
resource
|
|
298
298
|
},
|
|
299
299
|
className: buttonClass({ variant: "primary" }),
|
|
300
|
-
children: [/* @__PURE__ */ jsx(Plus, { className: "size-3.5" }), text$1("newRecord", singular)]
|
|
300
|
+
children: [/* @__PURE__ */ jsx(Plus, { className: "size-3.5" }), text$1("newRecord", { singular })]
|
|
301
301
|
});
|
|
302
302
|
const saveSearch = view?.saveSearch && !scope && parsed.ok && filterText && /* @__PURE__ */ jsx(SaveSearchButton, {
|
|
303
303
|
model,
|
|
@@ -366,7 +366,7 @@ const LoadedList = ({ model, address, scope, heading }) => {
|
|
|
366
366
|
onScrollIndex: scroll.remember,
|
|
367
367
|
rowActions: [
|
|
368
368
|
{
|
|
369
|
-
label: text$1("openRecord", singular),
|
|
369
|
+
label: text$1("openRecord", { singular }),
|
|
370
370
|
onSelect: openRecord
|
|
371
371
|
},
|
|
372
372
|
...named.rowActions,
|
|
@@ -379,12 +379,12 @@ const LoadedList = ({ model, address, scope, heading }) => {
|
|
|
379
379
|
],
|
|
380
380
|
bulkActions: [
|
|
381
381
|
...exportOffered(view) && exportsSelection(model) ? [{
|
|
382
|
-
label: (count) => text$1("exportCount", count),
|
|
382
|
+
label: (count) => text$1("exportCount", { count }),
|
|
383
383
|
onRun: (rows) => exportFlow.open(rows)
|
|
384
384
|
}] : [],
|
|
385
385
|
...named.bulkActions,
|
|
386
386
|
...can(permissions, "delete") ? [{
|
|
387
|
-
label: (count) => text$1("deleteCount", count),
|
|
387
|
+
label: (count) => text$1("deleteCount", { count }),
|
|
388
388
|
destructive: true,
|
|
389
389
|
onRun: (rows) => remove.startBulk(rows.map(target))
|
|
390
390
|
}] : []
|
|
@@ -523,7 +523,7 @@ const LoadedList = ({ model, address, scope, heading }) => {
|
|
|
523
523
|
}) : /* @__PURE__ */ jsx(ListChart, {
|
|
524
524
|
resource,
|
|
525
525
|
chart: view.chart,
|
|
526
|
-
title: text$1("created", plural),
|
|
526
|
+
title: text$1("created", { plural }),
|
|
527
527
|
noun: plural.toLowerCase(),
|
|
528
528
|
filter: loadFilter
|
|
529
529
|
})),
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/live-update/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
holdTitle: "Updating the app",
|
|
6
|
-
holdLine: "The new version is downloading. The app opens it in a moment."
|
|
7
|
-
},
|
|
8
|
-
nl: {
|
|
9
|
-
holdTitle: "De app wordt bijgewerkt",
|
|
10
|
-
holdLine: "De nieuwe versie wordt gedownload. De app opent die zo."
|
|
11
|
-
}
|
|
12
|
-
});
|
|
3
|
+
const text = messages("app/live-update");
|
|
13
4
|
//#endregion
|
|
14
5
|
export { text };
|
package/dist/app/map/messages.js
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/map/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
mapLayer: "Map layer",
|
|
6
|
-
map: "Map"
|
|
7
|
-
},
|
|
8
|
-
nl: {
|
|
9
|
-
mapLayer: "Kaartlaag",
|
|
10
|
-
map: "Kaart"
|
|
11
|
-
}
|
|
12
|
-
});
|
|
3
|
+
const text = messages("app/map");
|
|
13
4
|
//#endregion
|
|
14
5
|
export { text };
|
package/dist/app/messages.js
CHANGED
|
@@ -1,142 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../locale/messages.js";
|
|
2
2
|
//#region src/app/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
notFound: "Not found",
|
|
6
|
-
noResource: (name) => `There is no resource called ${name}.`,
|
|
7
|
-
somethingWentWrong: "Something went wrong",
|
|
8
|
-
signInPolicy: "Sign-in policy",
|
|
9
|
-
adminsOnly: "Admins only",
|
|
10
|
-
onlyAdminPolicy: "Only an admin can change how people sign in.",
|
|
11
|
-
ownersOnly: "Owners and admins only",
|
|
12
|
-
onlyOwners: "Only the organization's owners and admins manage its members.",
|
|
13
|
-
chooseResource: "Choose a resource",
|
|
14
|
-
pickFromSidebar: "Pick one from the sidebar.",
|
|
15
|
-
nothingHere: "There is nothing at this address.",
|
|
16
|
-
noPage: "There is no page called {}.",
|
|
17
|
-
assistant: "Assistant",
|
|
18
|
-
operationFailed: (index, label, message) => `Operation ${index} (${label}) failed: ${message} Nothing was saved.`,
|
|
19
|
-
nothingSaved: (message) => `${message} Nothing was saved.`,
|
|
20
|
-
admin: "Admin",
|
|
21
|
-
new: "New",
|
|
22
|
-
loadingRecord: "Loading record",
|
|
23
|
-
noComponent: "No component is registered as {}. Export it from protobase.ui.tsx, or load the plugin that provides it.",
|
|
24
|
-
choose: "Choose...",
|
|
25
|
-
fileMissing: "The file is missing from storage",
|
|
26
|
-
chooseFileFor: (label) => `Choose a file for ${label}`,
|
|
27
|
-
notUploaded: "Not uploaded",
|
|
28
|
-
uploadingLabel: (label) => `Uploading ${label}`,
|
|
29
|
-
uploading: (percent) => `Uploading… ${percent}%`,
|
|
30
|
-
replace: "Replace",
|
|
31
|
-
remove: "Remove",
|
|
32
|
-
dropFile: "Drop a file here or",
|
|
33
|
-
chooseFile: "Choose a file",
|
|
34
|
-
average: (label) => `Average ${label.toLowerCase()}`,
|
|
35
|
-
pages: "Pages",
|
|
36
|
-
account: "Account",
|
|
37
|
-
sales: "Sales",
|
|
38
|
-
crm: "CRM",
|
|
39
|
-
catalog: "Catalog",
|
|
40
|
-
inventory: "Inventory",
|
|
41
|
-
hr: "HR",
|
|
42
|
-
cannotReach: (label) => `Cannot reach ${label}`,
|
|
43
|
-
searchPlural: (plural) => `Search ${plural}`,
|
|
44
|
-
couldNotLoadOptions: "Could not load the options",
|
|
45
|
-
noMatches: "No matches",
|
|
46
|
-
loading: "Loading",
|
|
47
|
-
leaveTitle: "Leave without saving?",
|
|
48
|
-
leaveDescription: "You have unsaved changes on this page. They stay in this browser, and come back when you open the record again.",
|
|
49
|
-
leaveInputLost: "You have unsaved changes on this page. They are lost when you leave.",
|
|
50
|
-
stay: "Stay",
|
|
51
|
-
leave: "Leave",
|
|
52
|
-
reloadTitle: "Reload without saving?",
|
|
53
|
-
reloadDraftKept: "You have unsaved changes on this page. They stay in this browser, and come back after the page reloads.",
|
|
54
|
-
reloadInputLost: "You have unsaved changes on this page. They are lost when the page reloads.",
|
|
55
|
-
keepEditing: "Keep editing",
|
|
56
|
-
reload: "Reload",
|
|
57
|
-
show: (label) => `Show ${label}`,
|
|
58
|
-
hide: (label) => `Hide ${label}`,
|
|
59
|
-
couldNotShow: (label) => `Could not show the ${label}`,
|
|
60
|
-
setNewValue: "Set a new value",
|
|
61
|
-
noAnswer: "It did not answer.",
|
|
62
|
-
signInRefused: (message) => `It did not accept your sign-in: ${message}`,
|
|
63
|
-
loadingFrom: (label) => `Loading from ${label}`,
|
|
64
|
-
restWorks: "The rest of the app works as before.",
|
|
65
|
-
tryAgain: "Try again",
|
|
66
|
-
staffSession: "Staff session",
|
|
67
|
-
staffSignedIn: "{} is signed in as {} until {}. Reason: {}",
|
|
68
|
-
stopStaffSession: "Stop staff session",
|
|
69
|
-
open: "Open",
|
|
70
|
-
openLabel: (label) => `Open ${label}`
|
|
71
|
-
},
|
|
72
|
-
nl: {
|
|
73
|
-
notFound: "Niet gevonden",
|
|
74
|
-
noResource: (name) => `Er is geen onderdeel met de naam ${name}.`,
|
|
75
|
-
somethingWentWrong: "Er ging iets mis",
|
|
76
|
-
signInPolicy: "Inlogbeleid",
|
|
77
|
-
adminsOnly: "Alleen beheerders",
|
|
78
|
-
onlyAdminPolicy: "Alleen een beheerder kan wijzigen hoe mensen inloggen.",
|
|
79
|
-
ownersOnly: "Alleen eigenaren en beheerders",
|
|
80
|
-
onlyOwners: "Alleen de eigenaren en beheerders van de organisatie beheren de leden.",
|
|
81
|
-
chooseResource: "Kies een onderdeel",
|
|
82
|
-
pickFromSidebar: "Kies er een in de zijbalk.",
|
|
83
|
-
nothingHere: "Er is niets op dit adres.",
|
|
84
|
-
noPage: "Er is geen pagina met de naam {}.",
|
|
85
|
-
assistant: "Assistent",
|
|
86
|
-
operationFailed: (index, label, message) => `Bewerking ${index} (${label}) mislukte: ${message} Er is niets bewaard.`,
|
|
87
|
-
nothingSaved: (message) => `${message} Er is niets bewaard.`,
|
|
88
|
-
admin: "Beheer",
|
|
89
|
-
new: "Nieuw",
|
|
90
|
-
loadingRecord: "Record laden",
|
|
91
|
-
noComponent: "Er is geen component geregistreerd als {}. Exporteer die uit protobase.ui.tsx, of laad de plug-in die haar levert.",
|
|
92
|
-
choose: "Kiezen...",
|
|
93
|
-
fileMissing: "Het bestand ontbreekt in de opslag",
|
|
94
|
-
chooseFileFor: (label) => `Kies een bestand voor ${label}`,
|
|
95
|
-
notUploaded: "Niet geüpload",
|
|
96
|
-
uploadingLabel: (label) => `${label} uploaden`,
|
|
97
|
-
uploading: (percent) => `Uploaden… ${percent}%`,
|
|
98
|
-
replace: "Vervangen",
|
|
99
|
-
remove: "Verwijderen",
|
|
100
|
-
dropFile: "Zet hier een bestand neer of",
|
|
101
|
-
chooseFile: "Kies een bestand",
|
|
102
|
-
average: (label) => `${label}, gemiddeld`,
|
|
103
|
-
pages: "Pagina's",
|
|
104
|
-
account: "Account",
|
|
105
|
-
sales: "Verkoop",
|
|
106
|
-
crm: "CRM",
|
|
107
|
-
catalog: "Catalogus",
|
|
108
|
-
inventory: "Voorraad",
|
|
109
|
-
hr: "HR",
|
|
110
|
-
cannotReach: (label) => `Kan ${label} niet bereiken`,
|
|
111
|
-
searchPlural: (plural) => `${plural} zoeken`,
|
|
112
|
-
couldNotLoadOptions: "Kon de keuzes niet laden",
|
|
113
|
-
noMatches: "Niets gevonden",
|
|
114
|
-
loading: "Laden",
|
|
115
|
-
leaveTitle: "Weggaan zonder te bewaren?",
|
|
116
|
-
leaveDescription: "Je hebt niet-bewaarde wijzigingen op deze pagina. Ze blijven in deze browser, en komen terug als je het record weer opent.",
|
|
117
|
-
leaveInputLost: "Je hebt niet-bewaarde wijzigingen op deze pagina. Ze gaan verloren als je weggaat.",
|
|
118
|
-
stay: "Blijven",
|
|
119
|
-
leave: "Weggaan",
|
|
120
|
-
reloadTitle: "Opnieuw laden zonder op te slaan?",
|
|
121
|
-
reloadDraftKept: "Er zijn niet-opgeslagen wijzigingen op deze pagina. Ze blijven bewaard in deze browser en komen terug zodra de pagina opnieuw is geladen.",
|
|
122
|
-
reloadInputLost: "Er zijn niet-opgeslagen wijzigingen op deze pagina. Ze gaan verloren als de pagina opnieuw wordt geladen.",
|
|
123
|
-
keepEditing: "Verder bewerken",
|
|
124
|
-
reload: "Opnieuw laden",
|
|
125
|
-
show: (label) => `${label} tonen`,
|
|
126
|
-
hide: (label) => `${label} verbergen`,
|
|
127
|
-
couldNotShow: (label) => `Kon ${label} niet tonen`,
|
|
128
|
-
setNewValue: "Nieuwe waarde instellen",
|
|
129
|
-
noAnswer: "Het antwoordde niet.",
|
|
130
|
-
signInRefused: (message) => `Het accepteerde je inlog niet: ${message}`,
|
|
131
|
-
loadingFrom: (label) => `Laden van ${label}`,
|
|
132
|
-
restWorks: "De rest van de app werkt zoals eerst.",
|
|
133
|
-
tryAgain: "Opnieuw proberen",
|
|
134
|
-
staffSession: "Sessie van een medewerker",
|
|
135
|
-
staffSignedIn: "{} is ingelogd als {} tot {}. Reden: {}",
|
|
136
|
-
stopStaffSession: "Sessie van medewerker stoppen",
|
|
137
|
-
open: "Openen",
|
|
138
|
-
openLabel: (label) => `${label} openen`
|
|
139
|
-
}
|
|
140
|
-
});
|
|
3
|
+
const text = messages("app");
|
|
141
4
|
//#endregion
|
|
142
5
|
export { text };
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../locale/messages.js";
|
|
2
2
|
//#region src/app/meta-gate-messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
loading: "Loading",
|
|
6
|
-
cannotReach: "Cannot reach the API",
|
|
7
|
-
noAnswer: "The server did not answer. Is it running?"
|
|
8
|
-
},
|
|
9
|
-
nl: {
|
|
10
|
-
loading: "Laden",
|
|
11
|
-
cannotReach: "De API is niet bereikbaar",
|
|
12
|
-
noAnswer: "De server gaf geen antwoord. Draait hij?"
|
|
13
|
-
}
|
|
14
|
-
});
|
|
3
|
+
const text = messages("app/meta-gate");
|
|
15
4
|
//#endregion
|
|
16
5
|
export { text };
|
|
@@ -28,7 +28,7 @@ const schemaGroup = (schema = "public") => {
|
|
|
28
28
|
const createLink = (meta, view, nav, singular, basePath) => {
|
|
29
29
|
if (!nav?.create || !createOffered(view, meta.pages, meta.permissions[view.resource] ?? allowEverything)) return {};
|
|
30
30
|
return { create: {
|
|
31
|
-
label: nav.create === true ? text$1("title", singular) : nav.create.label,
|
|
31
|
+
label: nav.create === true ? text$1("title", { noun: singular }) : nav.create.label,
|
|
32
32
|
href: appPath({
|
|
33
33
|
kind: "create",
|
|
34
34
|
resource: view.resource
|
|
@@ -138,7 +138,7 @@ const navFromMeta = (meta, basePath = "", recent = {}) => {
|
|
|
138
138
|
kind: "list",
|
|
139
139
|
resource
|
|
140
140
|
}, basePath),
|
|
141
|
-
problem: text("cannotReach", status.source.label)
|
|
141
|
+
problem: text("cannotReach", { label: status.source.label })
|
|
142
142
|
});
|
|
143
143
|
groups.set(status.source.label, group);
|
|
144
144
|
}
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/new-version/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
title: "This app has been updated",
|
|
6
|
-
description: "Reload the page to use the new version, when it suits you.",
|
|
7
|
-
reload: "Reload",
|
|
8
|
-
reloadPage: "Reload page",
|
|
9
|
-
reloadPageHint: "Reload page to use the new version",
|
|
10
|
-
bannerTitle: "{} updated",
|
|
11
|
-
bannerLine: "Save your work, then click here to reload. You may see errors until you do."
|
|
12
|
-
},
|
|
13
|
-
nl: {
|
|
14
|
-
title: "Deze app is bijgewerkt",
|
|
15
|
-
description: "Laad de pagina opnieuw voor de nieuwe versie, wanneer het uitkomt.",
|
|
16
|
-
reload: "Opnieuw laden",
|
|
17
|
-
reloadPage: "Opnieuw laden",
|
|
18
|
-
reloadPageHint: "Opnieuw laden om de nieuwe versie te gebruiken",
|
|
19
|
-
bannerTitle: "{} bijgewerkt",
|
|
20
|
-
bannerLine: "Sla je werk op en klik hier om te herladen. Tot dan kunnen er fouten optreden."
|
|
21
|
-
}
|
|
22
|
-
});
|
|
3
|
+
const text = messages("app/new-version");
|
|
23
4
|
//#endregion
|
|
24
5
|
export { text };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useAdminMeta } from "../meta-gate.js";
|
|
2
2
|
import { useRouter } from "../router.js";
|
|
3
|
-
import { slotted } from "../../locale/slotted.js";
|
|
4
3
|
import { text } from "./messages.js";
|
|
5
4
|
import { RotateCw } from "lucide-react";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -25,7 +24,7 @@ const NewVersionBanner = () => {
|
|
|
25
24
|
className: "flex min-w-0 flex-col gap-0.5",
|
|
26
25
|
children: [/* @__PURE__ */ jsx("span", {
|
|
27
26
|
className: "break-words font-semibold",
|
|
28
|
-
children: appName ?
|
|
27
|
+
children: appName ? text.rich("bannerTitle", { app: appName }) : text("title")
|
|
29
28
|
}), /* @__PURE__ */ jsx("span", {
|
|
30
29
|
className: "text-xs",
|
|
31
30
|
children: text("bannerLine")
|
|
@@ -91,7 +91,7 @@ const ActionInputsDialog = ({ action, label, danger, onCancel, onSubmit }) => {
|
|
|
91
91
|
submit();
|
|
92
92
|
},
|
|
93
93
|
children: [failure !== void 0 && Object.keys(errors).length === 0 && /* @__PURE__ */ jsx(ErrorBanner, {
|
|
94
|
-
title: text("failed", label),
|
|
94
|
+
title: text("failed", { label }),
|
|
95
95
|
error: failure
|
|
96
96
|
}), action.inputs.filter((input) => shown.has(input.name)).map((input) => /* @__PURE__ */ jsx(Field, {
|
|
97
97
|
label: input.label,
|
|
@@ -77,7 +77,7 @@ const refusal = (input, value) => {
|
|
|
77
77
|
if (input.kind === "integer" && !Number.isInteger(value)) return text("wholeNumber");
|
|
78
78
|
if (input.kind === "decimal" && !decimal.test(String(value))) return text("number");
|
|
79
79
|
if (input.kind === "date" && !date.test(String(value))) return text("dateFormat");
|
|
80
|
-
if (input.max !== void 0 && String(value).length > input.max) return text("atMost", input.max);
|
|
80
|
+
if (input.max !== void 0 && String(value).length > input.max) return text("atMost", { max: input.max });
|
|
81
81
|
};
|
|
82
82
|
/** What is wrong with the answers that show, by input name: one left empty that is required, a number that is none, a text too long. */
|
|
83
83
|
const refusedAnswers = (inputs, values) => Object.fromEntries(inputs.flatMap((input) => {
|
|
@@ -44,7 +44,7 @@ const ModalFormDialog = ({ model, record, mode, label, title, fields, values, on
|
|
|
44
44
|
await refresh(model.name);
|
|
45
45
|
toast.show({
|
|
46
46
|
state: "success",
|
|
47
|
-
title: text("saved", title ?? label)
|
|
47
|
+
title: text("saved", { label: title ?? label })
|
|
48
48
|
});
|
|
49
49
|
onClose();
|
|
50
50
|
}, (error) => {
|
|
@@ -69,7 +69,7 @@ const SettingsForm = ({ model, fields, title, description, stored: loaded }) =>
|
|
|
69
69
|
await refresh(model.name);
|
|
70
70
|
toast.show({
|
|
71
71
|
state: "success",
|
|
72
|
-
title: text("saved", title ?? text("settings"))
|
|
72
|
+
title: text("saved", { label: title ?? text("settings") })
|
|
73
73
|
});
|
|
74
74
|
}, (error) => {
|
|
75
75
|
setErrors((current) => ({
|
|
@@ -46,7 +46,7 @@ const TabsBlock = ({ node, children }) => {
|
|
|
46
46
|
}) }, tab.name))
|
|
47
47
|
})
|
|
48
48
|
}),
|
|
49
|
-
shown ? /* @__PURE__ */ jsx(Fragment, { children: children[tabs.indexOf(shown)] }, shown.name) : /* @__PURE__ */ jsx(Problem, { children: text("noTab", named ?? "") })
|
|
49
|
+
shown ? /* @__PURE__ */ jsx(Fragment, { children: children[tabs.indexOf(shown)] }, shown.name) : /* @__PURE__ */ jsx(Problem, { children: text("noTab", { name: named ?? "" }) })
|
|
50
50
|
]
|
|
51
51
|
});
|
|
52
52
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Notice, useAdminMeta } from "../meta-gate.js";
|
|
2
2
|
import { PageTabsProvider } from "./page-tabs.js";
|
|
3
|
-
import { slotted } from "../../locale/slotted.js";
|
|
4
3
|
import { text } from "./messages.js";
|
|
5
4
|
import { RenderNode } from "./render-node.js";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -11,7 +10,7 @@ const ComposedPage = ({ name, tab }) => {
|
|
|
11
10
|
const page = useAdminMeta().pages[name];
|
|
12
11
|
if (!page) return /* @__PURE__ */ jsx(Notice, {
|
|
13
12
|
title: text("notFound"),
|
|
14
|
-
children:
|
|
13
|
+
children: text.rich("noPage", { page: name })
|
|
15
14
|
});
|
|
16
15
|
const pathOf = (shown) => appPath({
|
|
17
16
|
kind: "page",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { reportRenderError } from "../error-reporting.js";
|
|
2
2
|
import { Problem } from "./problem.js";
|
|
3
|
-
import { slotted } from "../../locale/slotted.js";
|
|
4
3
|
import { text } from "./messages.js";
|
|
5
4
|
import { Component } from "react";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -16,7 +15,7 @@ var CustomBoundary = class extends Component {
|
|
|
16
15
|
}
|
|
17
16
|
render() {
|
|
18
17
|
if (!this.state.failed) return this.props.children;
|
|
19
|
-
return this.props.fallback === void 0 ? /* @__PURE__ */ jsx(Problem, { children:
|
|
18
|
+
return this.props.fallback === void 0 ? /* @__PURE__ */ jsx(Problem, { children: text.rich("couldNotDraw", { name: this.props.name }) }) : this.props.fallback;
|
|
20
19
|
}
|
|
21
20
|
};
|
|
22
21
|
//#endregion
|