@protobase/ui 0.63.4 → 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 +12 -6
- package/dist/account/messages.js +2 -333
- package/dist/account/passkeys-section.js +3 -3
- 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 +5 -5
- package/dist/action-card/messages.js +2 -5
- package/dist/activity-chart/activity-chart.js +5 -7
- package/dist/activity-chart/activity-tooltip.js +1 -1
- package/dist/activity-chart/messages.js +2 -11
- package/dist/app/app.js +2 -3
- 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 +15 -18
- package/dist/app/charts/chart-groups.js +3 -1
- package/dist/app/charts/chart-view.js +1 -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/comment-composer.js +1 -1
- package/dist/app/comments/comments-section.js +2 -2
- 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 +3 -3
- package/dist/app/create/create-route.js +1 -1
- package/dist/app/create/messages.js +2 -29
- package/dist/app/custom-section.js +2 -3
- 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 +6 -5
- package/dist/app/displays/board-column.js +2 -2
- 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 +16 -7
- package/dist/app/displays/cards-display.js +2 -2
- package/dist/app/displays/custom-display.js +1 -2
- package/dist/app/displays/list-cards.js +2 -2
- 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 +16 -7
- package/dist/app/displays/timeline-range.js +1 -1
- package/dist/app/displays/use-board-move.js +4 -4
- package/dist/app/displays/use-calendar-move.js +2 -2
- 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-list.js +1 -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 +3 -3
- 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 +6 -3
- package/dist/app/gallery/messages.js +2 -27
- package/dist/app/gallery/photo-details.js +3 -3
- package/dist/app/hand-order/hand-sorted-list.js +2 -3
- package/dist/app/hand-order/messages.js +2 -29
- package/dist/app/hand-order/use-hand-order.js +2 -2
- package/dist/app/history/describe-change.js +1 -1
- package/dist/app/history/history-section.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/incoming-card.js +1 -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-edit/use-list-edits.js +1 -1
- 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/new-version/new-version-toast.js +1 -1
- 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/field.js +1 -1
- package/dist/app/pages/blocks/modal-form.js +3 -3
- package/dist/app/pages/blocks/settings.js +3 -3
- 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/record-actions.js +1 -1
- package/dist/app/pages/render-node.js +2 -3
- package/dist/app/pages/use-run-action.js +15 -7
- package/dist/app/picker/picker-combobox.js +1 -1
- 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-chart/record-chart-section.js +2 -2
- package/dist/app/record-lines-cell.js +4 -1
- package/dist/app/record-lines.js +5 -5
- package/dist/app/record-messages.js +2 -83
- package/dist/app/record-page.js +8 -8
- package/dist/app/record-row/messages.js +2 -23
- package/dist/app/record-row/record-row-body.js +2 -2
- package/dist/app/record-row/record-row.js +3 -3
- package/dist/app/record-row/saved-record-row.js +3 -3
- package/dist/app/related-cards/messages.js +2 -15
- package/dist/app/related-cards/related-card.js +1 -1
- package/dist/app/related-cards/related-cards.js +1 -1
- 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/related-section.js +1 -1
- 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 +3 -3
- 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 +3 -3
- package/dist/app/searches/saved-search-section.js +4 -4
- package/dist/app/searches/saved-searches.js +14 -12
- package/dist/app/searches/search-controls.js +2 -2
- package/dist/app/searches/search-diff.js +8 -2
- package/dist/app/searches/update-search-dialog.js +10 -4
- package/dist/app/searches/use-save-search.js +2 -2
- 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/profile-menu.js +2 -2
- 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 +3 -4
- 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 +3 -3
- 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 +2 -2
- 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-rings.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/chat-message.js +1 -1
- 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 +8 -7
- package/dist/data-grid/cells.js +9 -6
- package/dist/data-grid/grid-footer.js +1 -1
- package/dist/data-grid/grid-row.js +2 -2
- 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/forms/public-form-page.js +1 -1
- package/dist/index.js +3 -3
- 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 -51
- 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/notification-item.js +1 -1
- package/dist/notifications/bell/unread-label.js +1 -1
- package/dist/organizations/invitation-page.js +32 -14
- 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/dialog.d.ts +7 -2
- package/dist/primitives/dialog.js +9 -4
- package/dist/primitives/messages.js +2 -13
- package/dist/primitives/token.js +1 -1
- package/dist/record-view/field.js +3 -3
- package/dist/record-view/messages.js +2 -37
- package/dist/record-view/record-header.js +4 -4
- package/dist/roles/messages.js +2 -11
- package/dist/shell/assets/app-CN_7en9q.js +8 -0
- package/dist/shell/assets/{calls-BIXaKTs0.js → calls-D5RK7EJu.js} +2 -2
- package/dist/shell/assets/export-worker-ClXdfeuq.js +15 -0
- package/dist/shell/assets/{index-BshKxX1Z.js → index-DMaCBpbN.js} +2 -2
- package/dist/shell/assets/index-Or2wt-ck.css +2 -0
- 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-D1SJKyvj.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 +6 -6
- 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-BIXaKTs0.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-BshKxX1Z.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-D1SJKyvj.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/status/status-dialog.js +1 -1
- 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-CBYlZ19-.js +0 -9
- package/dist/shell/assets/export-worker-3e4Zsv0a.js +0 -3
- package/dist/shell/assets/index-BvT0X9o1.css +0 -2
- 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-DibYt-TM.js +0 -2
- package/dist/shell/assets/vendor-xNCj9Gc_.js +0 -63
- package/dist/shell-source-maps/assets/app-CBYlZ19-.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-DibYt-TM.js.map +0 -1
- package/dist/shell-source-maps/assets/vendor-xNCj9Gc_.js.map +0 -1
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")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAdminMeta } from "../meta-gate.js";
|
|
2
|
-
import { useToast } from "../../toasts/toast-provider.js";
|
|
3
2
|
import { useRouter } from "../router.js";
|
|
3
|
+
import { useToast } from "../../toasts/toast-provider.js";
|
|
4
4
|
import { text } from "./messages.js";
|
|
5
5
|
import { useModalOpen } from "./use-modal-open.js";
|
|
6
6
|
import { useEffect, useState } from "react";
|
|
@@ -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) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAdminMeta } from "../../meta-gate.js";
|
|
2
|
-
import { Skeleton } from "../../../primitives/skeleton.js";
|
|
3
2
|
import { humanize } from "../../../live/naming.js";
|
|
3
|
+
import { Skeleton } from "../../../primitives/skeleton.js";
|
|
4
4
|
import { useLayoutRecord } from "../record-scope.js";
|
|
5
5
|
import { propsOf } from "./block-props.js";
|
|
6
6
|
import { FieldValue } from "../field-value.js";
|
|
@@ -2,15 +2,15 @@ import { useClient } from "../../../data/api-provider.js";
|
|
|
2
2
|
import { useAdminMeta, usePermissions } from "../../meta-gate.js";
|
|
3
3
|
import { Button } from "../../../primitives/button.js";
|
|
4
4
|
import { Dialog } from "../../../primitives/dialog.js";
|
|
5
|
-
import { useToast } from "../../../toasts/toast-provider.js";
|
|
6
|
-
import { Field } from "../../../record-view/field.js";
|
|
7
5
|
import { humanize } from "../../../live/naming.js";
|
|
8
6
|
import { useNavigationGuard } from "../../router.js";
|
|
7
|
+
import { Field } from "../../../record-view/field.js";
|
|
9
8
|
import { createBody, isChosen } from "../../create/create-values.js";
|
|
10
9
|
import { ErrorBanner } from "../../error-banner.js";
|
|
11
10
|
import { text } from "../messages.js";
|
|
12
11
|
import { FieldEditor } from "../../field-editor.js";
|
|
13
12
|
import { useLayoutRecord } from "../record-scope.js";
|
|
13
|
+
import { useToast } from "../../../toasts/toast-provider.js";
|
|
14
14
|
import { can } from "../../permissions.js";
|
|
15
15
|
import { useFirstRecord, useRefreshResource } from "../use-layout-data.js";
|
|
16
16
|
import { propsOf } from "./block-props.js";
|
|
@@ -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) => {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useClient } from "../../../data/api-provider.js";
|
|
2
2
|
import { useAdminMeta, usePermissions } from "../../meta-gate.js";
|
|
3
3
|
import { Button } from "../../../primitives/button.js";
|
|
4
|
+
import { humanize } from "../../../live/naming.js";
|
|
4
5
|
import { Skeleton } from "../../../primitives/skeleton.js";
|
|
5
|
-
import { useToast } from "../../../toasts/toast-provider.js";
|
|
6
6
|
import { Field } from "../../../record-view/field.js";
|
|
7
|
-
import { humanize } from "../../../live/naming.js";
|
|
8
7
|
import { differs } from "../../../live/field-values.js";
|
|
9
8
|
import { createBody } from "../../create/create-values.js";
|
|
10
9
|
import { ErrorBanner } from "../../error-banner.js";
|
|
11
10
|
import { text } from "../messages.js";
|
|
12
11
|
import { FieldEditor } from "../../field-editor.js";
|
|
12
|
+
import { useToast } from "../../../toasts/toast-provider.js";
|
|
13
13
|
import { can } from "../../permissions.js";
|
|
14
14
|
import { scopeOf, useFirstRecord, useRefreshResource } from "../use-layout-data.js";
|
|
15
15
|
import { propsOf } from "./block-props.js";
|
|
@@ -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
|
|
@@ -1,82 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/pages/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
notFound: "Not found",
|
|
6
|
-
noPage: "There is no page called {}.",
|
|
7
|
-
tabs: "Tabs",
|
|
8
|
-
noTab: (name) => `This page has no tab called ${name}.`,
|
|
9
|
-
cancel: "Cancel",
|
|
10
|
-
couldNotDraw: "{} could not be drawn.",
|
|
11
|
-
noComponent: "No component is registered as {}. Export it from protobase.ui.tsx, or load the plugin that provides it.",
|
|
12
|
-
unknownBlock: "{} is not a block this version of the app knows.",
|
|
13
|
-
somethingWrong: "Something went wrong",
|
|
14
|
-
needsRecord: "Needs a record",
|
|
15
|
-
cannotChange: "You cannot change this record",
|
|
16
|
-
cannotDelete: "You cannot delete this record",
|
|
17
|
-
doesNotApply: "Does not apply to this record",
|
|
18
|
-
noHandler: (name) => `The app has no handler for "${name}"`,
|
|
19
|
-
noInputComponent: (component, input) => `The app has no component "${component}" for input "${input}"`,
|
|
20
|
-
done: (label) => `${label}: done`,
|
|
21
|
-
doneOn: (label, done, skipped, failed) => [
|
|
22
|
-
`${label}: done on ${done}`,
|
|
23
|
-
...skipped > 0 ? [`skipped ${skipped} it does not apply to`] : [],
|
|
24
|
-
...failed > 0 ? [`failed on ${failed}`] : []
|
|
25
|
-
].join(", "),
|
|
26
|
-
failed: (label) => `${label} failed`,
|
|
27
|
-
noAction: (name) => `No action "${name}"`,
|
|
28
|
-
couldNotLoad: "Could not load",
|
|
29
|
-
nothingYet: "Nothing here yet.",
|
|
30
|
-
saved: (label) => `${label}: saved`,
|
|
31
|
-
create: "Create",
|
|
32
|
-
save: "Save",
|
|
33
|
-
notSaved: "Not saved",
|
|
34
|
-
settings: "Settings",
|
|
35
|
-
couldNotCount: "Could not count",
|
|
36
|
-
required: "Required",
|
|
37
|
-
wholeNumber: "A whole number",
|
|
38
|
-
number: "A number",
|
|
39
|
-
dateFormat: "A date as YYYY-MM-DD",
|
|
40
|
-
atMost: (max) => `At most ${max} characters`
|
|
41
|
-
},
|
|
42
|
-
nl: {
|
|
43
|
-
notFound: "Niet gevonden",
|
|
44
|
-
noPage: "Er is geen pagina met de naam {}.",
|
|
45
|
-
tabs: "Tabbladen",
|
|
46
|
-
noTab: (name) => `Deze pagina heeft geen tabblad met de naam ${name}.`,
|
|
47
|
-
cancel: "Annuleren",
|
|
48
|
-
couldNotDraw: "{} kon niet worden getekend.",
|
|
49
|
-
noComponent: "Er is geen component geregistreerd als {}. Exporteer die uit protobase.ui.tsx, of laad de plug-in die haar levert.",
|
|
50
|
-
unknownBlock: "{} is geen blok dat deze versie van de app kent.",
|
|
51
|
-
somethingWrong: "Er ging iets mis",
|
|
52
|
-
needsRecord: "Vraagt een record",
|
|
53
|
-
cannotChange: "Je kunt dit record niet wijzigen",
|
|
54
|
-
cannotDelete: "Je kunt dit record niet verwijderen",
|
|
55
|
-
doesNotApply: "Geldt niet voor dit record",
|
|
56
|
-
noHandler: (name) => `De app heeft geen handler voor "${name}"`,
|
|
57
|
-
noInputComponent: (component, input) => `De app heeft geen component "${component}" voor invoer "${input}"`,
|
|
58
|
-
done: (label) => `${label}: klaar`,
|
|
59
|
-
doneOn: (label, done, skipped, failed) => [
|
|
60
|
-
`${label}: klaar voor ${done}`,
|
|
61
|
-
...skipped > 0 ? [`${skipped} overgeslagen waarvoor het niet geldt`] : [],
|
|
62
|
-
...failed > 0 ? [`mislukt voor ${failed}`] : []
|
|
63
|
-
].join(", "),
|
|
64
|
-
failed: (label) => `${label} mislukt`,
|
|
65
|
-
noAction: (name) => `Geen actie "${name}"`,
|
|
66
|
-
couldNotLoad: "Kon niet laden",
|
|
67
|
-
nothingYet: "Hier staat nog niets.",
|
|
68
|
-
saved: (label) => `${label}: bewaard`,
|
|
69
|
-
create: "Maken",
|
|
70
|
-
save: "Bewaren",
|
|
71
|
-
notSaved: "Niet bewaard",
|
|
72
|
-
settings: "Instellingen",
|
|
73
|
-
couldNotCount: "Kon niet tellen",
|
|
74
|
-
required: "Verplicht",
|
|
75
|
-
wholeNumber: "Een geheel getal",
|
|
76
|
-
number: "Een getal",
|
|
77
|
-
dateFormat: "Een datum als JJJJ-MM-DD",
|
|
78
|
-
atMost: (max) => `Hoogstens ${max} tekens`
|
|
79
|
-
}
|
|
80
|
-
});
|
|
3
|
+
const text = messages("app/pages");
|
|
81
4
|
//#endregion
|
|
82
5
|
export { text };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ActionRail } from "../../record-view/action-rail.js";
|
|
2
1
|
import { RouteLink } from "../../primitives/route-link.js";
|
|
3
2
|
import { AppLink, useAppAddress } from "../use-app-address.js";
|
|
3
|
+
import { ActionRail } from "../../record-view/action-rail.js";
|
|
4
4
|
import { ActionMenu } from "../../record-view/action-menu.js";
|
|
5
5
|
import { ActionPrompt, asksFirst, isDanger } from "./action-prompt.js";
|
|
6
6
|
import { useActionRunner } from "./use-run-action.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useProjectUi } from "./project-ui.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 { CustomBoundary } from "./custom-boundary.js";
|
|
6
5
|
import { ActionBlock } from "./blocks/action.js";
|
|
@@ -93,7 +92,7 @@ const RenderNode = ({ node }) => {
|
|
|
93
92
|
const { components } = useProjectUi();
|
|
94
93
|
if (node.custom) {
|
|
95
94
|
const Custom = components?.[node.type];
|
|
96
|
-
if (!Custom) return /* @__PURE__ */ jsx(Problem, { children:
|
|
95
|
+
if (!Custom) return /* @__PURE__ */ jsx(Problem, { children: text.rich("noComponent", { component: node.type }) });
|
|
97
96
|
return /* @__PURE__ */ jsx(CustomBoundary, {
|
|
98
97
|
name: node.type,
|
|
99
98
|
children: /* @__PURE__ */ jsx(Custom, {
|
|
@@ -103,7 +102,7 @@ const RenderNode = ({ node }) => {
|
|
|
103
102
|
});
|
|
104
103
|
}
|
|
105
104
|
const Block = blocks[node.type];
|
|
106
|
-
if (!Block) return /* @__PURE__ */ jsx(Problem, { children:
|
|
105
|
+
if (!Block) return /* @__PURE__ */ jsx(Problem, { children: text.rich("unknownBlock", { type: node.type }) });
|
|
107
106
|
return /* @__PURE__ */ jsx(Block, {
|
|
108
107
|
node,
|
|
109
108
|
slots: renderSlots(node),
|