@protobase/ui 0.63.5 → 0.65.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/bottom-bar-from-meta.js +2 -3
- 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/menu-icons.js +10 -3
- package/dist/app/messages.js +2 -139
- package/dist/app/meta-gate-messages.js +2 -13
- package/dist/app/nav-from-meta.js +8 -9
- 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/user-menu-from-meta.js +2 -3
- 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-BOuBCV1m.js +8 -0
- package/dist/shell/assets/{calls-CPiQcC70.js → calls-C22bYKio.js} +2 -2
- package/dist/shell/assets/export-worker-ClXdfeuq.js +15 -0
- package/dist/shell/assets/{index-_ZpZ2ro0.js → index-G0fdUd70.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-BtWK38Kn.js} +2 -2
- package/dist/shell/assets/shared-protobase-ui-xqMMtr7u.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-BOuBCV1m.js.map +1 -0
- package/dist/shell-source-maps/assets/{calls-CPiQcC70.js.map → calls-C22bYKio.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-G0fdUd70.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-BtWK38Kn.js.map} +1 -1
- package/dist/shell-source-maps/assets/shared-protobase-ui-xqMMtr7u.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/icons.js +0 -27
- 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
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 };
|
|
@@ -2,11 +2,10 @@ import { allowEverything } from "../data/meta-data.js";
|
|
|
2
2
|
import { humanize } from "../live/naming.js";
|
|
3
3
|
import { text } from "./messages.js";
|
|
4
4
|
import { text as text$1 } from "./create/messages.js";
|
|
5
|
-
import {
|
|
6
|
-
import { menuIcon } from "./menu-icons.js";
|
|
5
|
+
import { menuIcon, resourceIcon } from "./menu-icons.js";
|
|
7
6
|
import { createOffered } from "./create/create-offered.js";
|
|
8
7
|
import { userMenuResources } from "./user-menu-from-meta.js";
|
|
9
|
-
import { LayoutDashboard } from "lucide-react";
|
|
8
|
+
import { LayoutDashboard, Table2 } from "lucide-react";
|
|
10
9
|
import { appPath } from "@protobase/schema";
|
|
11
10
|
//#region src/app/nav-from-meta.ts
|
|
12
11
|
/** The sidebar item of a resource's list, or of one of its named lists. */
|
|
@@ -28,7 +27,7 @@ const schemaGroup = (schema = "public") => {
|
|
|
28
27
|
const createLink = (meta, view, nav, singular, basePath) => {
|
|
29
28
|
if (!nav?.create || !createOffered(view, meta.pages, meta.permissions[view.resource] ?? allowEverything)) return {};
|
|
30
29
|
return { create: {
|
|
31
|
-
label: nav.create === true ? text$1("title", singular) : nav.create.label,
|
|
30
|
+
label: nav.create === true ? text$1("title", { noun: singular }) : nav.create.label,
|
|
32
31
|
href: appPath({
|
|
33
32
|
kind: "create",
|
|
34
33
|
resource: view.resource
|
|
@@ -82,7 +81,7 @@ const navFromMeta = (meta, basePath = "", recent = {}) => {
|
|
|
82
81
|
if (!view.nav?.hidden) add(defaultGroup, {
|
|
83
82
|
id: navItemId(model.name),
|
|
84
83
|
label: view.names?.plural ?? humanize(model.name),
|
|
85
|
-
icon:
|
|
84
|
+
icon: resourceIcon(meta, model.name),
|
|
86
85
|
href: appPath({
|
|
87
86
|
kind: "list",
|
|
88
87
|
resource: model.name
|
|
@@ -95,7 +94,7 @@ const navFromMeta = (meta, basePath = "", recent = {}) => {
|
|
|
95
94
|
add(named.nav?.group ?? defaultGroup, {
|
|
96
95
|
id: navItemId(model.name, named.name),
|
|
97
96
|
label: named.names.plural,
|
|
98
|
-
icon:
|
|
97
|
+
icon: resourceIcon(meta, model.name),
|
|
99
98
|
href: appPath({
|
|
100
99
|
kind: "list",
|
|
101
100
|
resource: model.name,
|
|
@@ -115,7 +114,7 @@ const navFromMeta = (meta, basePath = "", recent = {}) => {
|
|
|
115
114
|
group.items.push({
|
|
116
115
|
id: entry.resource,
|
|
117
116
|
label: entry.names?.plural ?? humanize(entry.resource),
|
|
118
|
-
icon:
|
|
117
|
+
icon: resourceIcon(meta, entry.resource),
|
|
119
118
|
href: appPath({
|
|
120
119
|
kind: "list",
|
|
121
120
|
resource: entry.resource
|
|
@@ -133,12 +132,12 @@ const navFromMeta = (meta, basePath = "", recent = {}) => {
|
|
|
133
132
|
for (const resource of status.source.resources) group.items.push({
|
|
134
133
|
id: resource,
|
|
135
134
|
label: humanize(resource),
|
|
136
|
-
icon:
|
|
135
|
+
icon: Table2,
|
|
137
136
|
href: appPath({
|
|
138
137
|
kind: "list",
|
|
139
138
|
resource
|
|
140
139
|
}, basePath),
|
|
141
|
-
problem: text("cannotReach", status.source.label)
|
|
140
|
+
problem: text("cannotReach", { label: status.source.label })
|
|
142
141
|
});
|
|
143
142
|
groups.set(status.source.label, group);
|
|
144
143
|
}
|
|
@@ -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
|
|
@@ -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,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),
|
|
@@ -40,9 +40,12 @@ const useActionRunner = (resource, scope, afterRun) => {
|
|
|
40
40
|
if ((kind === "update" || kind === "ai") && (!can(permissions, "update") || on?.permissions?.update === false)) return text("cannotChange");
|
|
41
41
|
if (action.run?.kind === "ai" && on?.permissions?.fields?.[action.run.writes] === "read") return text("cannotChange");
|
|
42
42
|
if (kind === "delete" && (!can(permissions, "delete") || on?.permissions?.delete === false)) return text("cannotDelete");
|
|
43
|
-
if (!action.run && !handlers?.[action.name]) return text("noHandler", action.name);
|
|
43
|
+
if (!action.run && !handlers?.[action.name]) return text("noHandler", { name: action.name });
|
|
44
44
|
const custom = action.inputs?.find((input) => input.kind === "custom" && !components?.[input.component ?? ""]);
|
|
45
|
-
if (custom) return text("noInputComponent",
|
|
45
|
+
if (custom) return text("noInputComponent", {
|
|
46
|
+
component: String(custom.component),
|
|
47
|
+
input: custom.name
|
|
48
|
+
});
|
|
46
49
|
};
|
|
47
50
|
const blocked = (action) => blockedOn(action, scope);
|
|
48
51
|
const execute = async (action, on, values) => {
|
|
@@ -71,7 +74,7 @@ const useActionRunner = (resource, scope, afterRun) => {
|
|
|
71
74
|
await refresh(resource);
|
|
72
75
|
toast.show({
|
|
73
76
|
state: "success",
|
|
74
|
-
title: text("done", action.label)
|
|
77
|
+
title: text("done", { label: action.label })
|
|
75
78
|
});
|
|
76
79
|
afterRun?.(action);
|
|
77
80
|
};
|
|
@@ -80,7 +83,7 @@ const useActionRunner = (resource, scope, afterRun) => {
|
|
|
80
83
|
setRunning(action.name);
|
|
81
84
|
await perform(action, on).catch((error) => toast.show({
|
|
82
85
|
state: "error",
|
|
83
|
-
title: text("failed", action.label),
|
|
86
|
+
title: text("failed", { label: action.label }),
|
|
84
87
|
description: message(error)
|
|
85
88
|
}));
|
|
86
89
|
setRunning(void 0);
|
|
@@ -97,7 +100,12 @@ const useActionRunner = (resource, scope, afterRun) => {
|
|
|
97
100
|
const outcome = await runEach(records, (on) => appliesOn(action, on), (on) => execute(action, on));
|
|
98
101
|
setRunning(void 0);
|
|
99
102
|
await refresh(resource);
|
|
100
|
-
const title = text("doneOn",
|
|
103
|
+
const title = text("doneOn", {
|
|
104
|
+
label: action.label,
|
|
105
|
+
done: outcome.done,
|
|
106
|
+
skipped: outcome.skipped + skipped,
|
|
107
|
+
failed: outcome.failed
|
|
108
|
+
});
|
|
101
109
|
toast.show(outcome.failed > 0 ? {
|
|
102
110
|
state: "error",
|
|
103
111
|
title,
|
|
@@ -125,7 +133,7 @@ const useRunAction = (resource, name, scope) => {
|
|
|
125
133
|
const action = runner.actions.find((entry) => entry.name === name);
|
|
126
134
|
return {
|
|
127
135
|
action,
|
|
128
|
-
blocked: action ? runner.blocked(action) : text("noAction", name),
|
|
136
|
+
blocked: action ? runner.blocked(action) : text("noAction", { name }),
|
|
129
137
|
running: runner.running === name,
|
|
130
138
|
run: () => action ? runner.run(action) : Promise.resolve(),
|
|
131
139
|
submit: (values) => action ? runner.submit(action, values) : Promise.resolve()
|
|
@@ -9,9 +9,15 @@ import { encodeKey } from "@protobase/schema/internal";
|
|
|
9
9
|
const dependencyRule = (model, bounds, title) => ({ order, index }) => {
|
|
10
10
|
const at = (key) => order.findIndex((entry) => encodeKey(recordKey(model, entry)) === key);
|
|
11
11
|
const above = bounds.after.find((bound) => at(bound.key) > index);
|
|
12
|
-
if (above) return text("dependsOn",
|
|
12
|
+
if (above) return text("dependsOn", {
|
|
13
|
+
record: title,
|
|
14
|
+
other: above.title
|
|
15
|
+
});
|
|
13
16
|
const below = bounds.before.find((bound) => at(bound.key) !== -1 && at(bound.key) < index);
|
|
14
|
-
return below ? text("dependsOn",
|
|
17
|
+
return below ? text("dependsOn", {
|
|
18
|
+
record: below.title,
|
|
19
|
+
other: title
|
|
20
|
+
}) : void 0;
|
|
15
21
|
};
|
|
16
22
|
//#endregion
|
|
17
23
|
export { dependencyRule };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/rank-after/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: { dependsOn: (record, other) => `${record} depends on ${other}.` },
|
|
5
|
-
nl: { dependsOn: (record, other) => `${record} hangt af van ${other}.` }
|
|
6
|
-
});
|
|
3
|
+
const text = messages("app/rank-after");
|
|
7
4
|
//#endregion
|
|
8
5
|
export { text };
|
|
@@ -23,7 +23,13 @@ const rankedPlace = ({ model, rank, rows, row, index, bounds, title }) => {
|
|
|
23
23
|
const mine = Number(ranked.get(encodeKey(recordKey(model, row.record))));
|
|
24
24
|
const above = bounds.after.filter((bound) => isRank(rankOf(bound)) && Number(rankOf(bound)) >= mine);
|
|
25
25
|
const below = bounds.before.find((bound) => isRank(rankOf(bound)) && Number(rankOf(bound)) <= mine);
|
|
26
|
-
const refusal = below ? text("dependsOn",
|
|
26
|
+
const refusal = below ? text("dependsOn", {
|
|
27
|
+
record: below.title,
|
|
28
|
+
other: title
|
|
29
|
+
}) : above[0] && text("dependsOn", {
|
|
30
|
+
record: title,
|
|
31
|
+
other: above[0].title
|
|
32
|
+
});
|
|
27
33
|
if (!refusal) return {
|
|
28
34
|
place: { index: at },
|
|
29
35
|
...reason !== void 0 && { reason }
|
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/record-chart/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
range: "Range",
|
|
6
|
-
hour: "Hour",
|
|
7
|
-
day: "Day",
|
|
8
|
-
week: "Week",
|
|
9
|
-
measure: "Per bucket",
|
|
10
|
-
average: "Average",
|
|
11
|
-
maximum: "Maximum",
|
|
12
|
-
noSamples: "No samples in this range.",
|
|
13
|
-
couldNotLoad: "Could not load the chart."
|
|
14
|
-
},
|
|
15
|
-
nl: {
|
|
16
|
-
range: "Periode",
|
|
17
|
-
hour: "Uur",
|
|
18
|
-
day: "Dag",
|
|
19
|
-
week: "Week",
|
|
20
|
-
measure: "Per interval",
|
|
21
|
-
average: "Gemiddelde",
|
|
22
|
-
maximum: "Maximum",
|
|
23
|
-
noSamples: "Geen metingen in deze periode.",
|
|
24
|
-
couldNotLoad: "Kon de grafiek niet laden."
|
|
25
|
-
}
|
|
26
|
-
});
|
|
3
|
+
const text = messages("app/record-chart");
|
|
27
4
|
//#endregion
|
|
28
5
|
export { text };
|
|
@@ -20,7 +20,10 @@ const LineCell = ({ field, hints, label, lineNumber, resource, value, stored, re
|
|
|
20
20
|
/* @__PURE__ */ jsx("label", {
|
|
21
21
|
htmlFor: id,
|
|
22
22
|
className: "sr-only",
|
|
23
|
-
children: text("lineField",
|
|
23
|
+
children: text("lineField", {
|
|
24
|
+
label,
|
|
25
|
+
place: lineNumber
|
|
26
|
+
})
|
|
24
27
|
}),
|
|
25
28
|
/* @__PURE__ */ jsx(FieldEditor, {
|
|
26
29
|
field,
|
package/dist/app/record-lines.js
CHANGED
|
@@ -93,7 +93,7 @@ const RecordLines = ({ lines, editable, saving }) => {
|
|
|
93
93
|
help: text("linesHelp"),
|
|
94
94
|
children: [!data.complete && /* @__PURE__ */ jsx("p", {
|
|
95
95
|
className: "mb-2 text-muted-foreground",
|
|
96
|
-
children: text("tooManyLines", formatInt(1e3))
|
|
96
|
+
children: text("tooManyLines", { limit: formatInt(1e3) })
|
|
97
97
|
}), /* @__PURE__ */ jsx("div", {
|
|
98
98
|
className: "-mx-4 overflow-x-auto px-4 [-webkit-overflow-scrolling:touch] md:mx-0 md:px-0",
|
|
99
99
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -101,7 +101,7 @@ const RecordLines = ({ lines, editable, saving }) => {
|
|
|
101
101
|
children: /* @__PURE__ */ jsx(InlineChildTable, {
|
|
102
102
|
lines: draft.shown,
|
|
103
103
|
columns: tableColumns,
|
|
104
|
-
lineName: (line) => recordTitle(model, view, line.stored ?? {}, "") || text("lineNumber", placeOf(line)),
|
|
104
|
+
lineName: (line) => recordTitle(model, view, line.stored ?? {}, "") || text("lineNumber", { place: placeOf(line) }),
|
|
105
105
|
onReorder: (next) => draft.setOrder(next.map((line) => line.id)),
|
|
106
106
|
reorderable: canUpdate,
|
|
107
107
|
onAdd: canCreate ? () => void draft.add() : void 0,
|