@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
|
@@ -89,7 +89,7 @@ const ColumnPicker = ({ fields, columns, onChange }) => {
|
|
|
89
89
|
size: "sm",
|
|
90
90
|
variant: "ghost",
|
|
91
91
|
className: "min-h-8 px-2",
|
|
92
|
-
"aria-label": text("moveUp", labels[name]),
|
|
92
|
+
"aria-label": text("moveUp", { label: labels[name] }),
|
|
93
93
|
disabled: index === 0,
|
|
94
94
|
onClick: () => onChange(move(columns, name, -1)),
|
|
95
95
|
children: /* @__PURE__ */ jsx(ArrowUp, { className: "size-3.5" })
|
|
@@ -97,7 +97,7 @@ const ColumnPicker = ({ fields, columns, onChange }) => {
|
|
|
97
97
|
size: "sm",
|
|
98
98
|
variant: "ghost",
|
|
99
99
|
className: "min-h-8 px-2",
|
|
100
|
-
"aria-label": text("moveDown", labels[name]),
|
|
100
|
+
"aria-label": text("moveDown", { label: labels[name] }),
|
|
101
101
|
disabled: index === columns.length - 1,
|
|
102
102
|
onClick: () => onChange(move(columns, name, 1)),
|
|
103
103
|
children: /* @__PURE__ */ jsx(ArrowDown, { className: "size-3.5" })
|
|
@@ -117,17 +117,20 @@ const ExportDialog = ({ plural, view, fields, initialColumns, count, selected, o
|
|
|
117
117
|
const [columns, setColumns] = useState(initialColumns);
|
|
118
118
|
const [mode, setMode] = useState("shown");
|
|
119
119
|
const limit = exportLimit(view, format);
|
|
120
|
-
const rows = scope === "selected" ? text("selectedRows",
|
|
120
|
+
const rows = scope === "selected" ? text("selectedRows", {
|
|
121
|
+
count: formatInt(selected ?? 0),
|
|
122
|
+
rows: selected ?? 0
|
|
123
|
+
}) : countText(count);
|
|
121
124
|
const overLimit = (scope === "selected" ? selected ?? 0 : countedRows(count) ?? 0) > limit;
|
|
122
125
|
const scopeOptions = [{
|
|
123
126
|
value: "list",
|
|
124
127
|
label: text("rowsInList")
|
|
125
128
|
}, {
|
|
126
129
|
value: "selected",
|
|
127
|
-
label: text("selected", formatInt(selected ?? 0))
|
|
130
|
+
label: text("selected", { count: formatInt(selected ?? 0) })
|
|
128
131
|
}];
|
|
129
132
|
return /* @__PURE__ */ jsx(ResponsiveDialog, {
|
|
130
|
-
title: text("exportPlural", plural),
|
|
133
|
+
title: text("exportPlural", { plural }),
|
|
131
134
|
open,
|
|
132
135
|
onClose,
|
|
133
136
|
actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
@@ -190,7 +193,7 @@ const ExportDialog = ({ plural, view, fields, initialColumns, count, selected, o
|
|
|
190
193
|
/* @__PURE__ */ jsxs("p", {
|
|
191
194
|
role: "status",
|
|
192
195
|
className: "text-muted-foreground",
|
|
193
|
-
children: [text("exports", rows), overLimit && text("overLimit", formatInt(limit))]
|
|
196
|
+
children: [text("exports", { rows }), overLimit && text("overLimit", { limit: formatInt(limit) })]
|
|
194
197
|
})
|
|
195
198
|
]
|
|
196
199
|
})
|
|
@@ -200,7 +203,7 @@ const ExportDialog = ({ plural, view, fields, initialColumns, count, selected, o
|
|
|
200
203
|
const ExportProgressDialog = ({ plural, done, total, onCancel }) => {
|
|
201
204
|
const share = total ? Math.min(1, done / total) : void 0;
|
|
202
205
|
return /* @__PURE__ */ jsx(ResponsiveDialog, {
|
|
203
|
-
title: text("exporting", plural),
|
|
206
|
+
title: text("exporting", { plural }),
|
|
204
207
|
open: true,
|
|
205
208
|
onClose: onCancel,
|
|
206
209
|
actions: /* @__PURE__ */ jsx(Button, {
|
|
@@ -222,7 +225,10 @@ const ExportProgressDialog = ({ plural, done, total, onCancel }) => {
|
|
|
222
225
|
})
|
|
223
226
|
}), /* @__PURE__ */ jsx("p", {
|
|
224
227
|
className: "text-muted-foreground",
|
|
225
|
-
children: total ? text("doneOf",
|
|
228
|
+
children: total ? text("doneOf", {
|
|
229
|
+
done: formatInt(done),
|
|
230
|
+
total: formatInt(total)
|
|
231
|
+
}) : text("done", { done: formatInt(done) })
|
|
226
232
|
})]
|
|
227
233
|
})
|
|
228
234
|
});
|
|
@@ -1,78 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/export/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
excel: "Excel (.xlsx)",
|
|
6
|
-
csv: "CSV",
|
|
7
|
-
asShown: "As shown",
|
|
8
|
-
rawValues: "Raw values",
|
|
9
|
-
shownHint: "Labels, dates and numbers as the list shows them.",
|
|
10
|
-
rawHint: "Values as they are stored, such as keys and codes.",
|
|
11
|
-
counting: "Counting rows…",
|
|
12
|
-
moreThan: "more than 10,000 rows",
|
|
13
|
-
columns: "Columns",
|
|
14
|
-
moveUp: (label) => `Move ${label} up`,
|
|
15
|
-
moveDown: (label) => `Move ${label} down`,
|
|
16
|
-
selectedRows: (count, rows) => `${count} selected ${rows === 1 ? "row" : "rows"}`,
|
|
17
|
-
rowsInList: "Rows in the list",
|
|
18
|
-
selected: (count) => `Selected (${count})`,
|
|
19
|
-
exportPlural: (plural) => `Export ${plural.toLowerCase()}`,
|
|
20
|
-
cancel: "Cancel",
|
|
21
|
-
export: "Export",
|
|
22
|
-
format: "Format",
|
|
23
|
-
rows: "Rows",
|
|
24
|
-
listHint: "With the list’s filters, search and sort.",
|
|
25
|
-
values: "Values",
|
|
26
|
-
exports: (rows) => `Exports ${rows}.`,
|
|
27
|
-
overLimit: (limit) => ` A file holds at most ${limit} rows; the rest are left out.`,
|
|
28
|
-
exporting: (plural) => `Exporting ${plural.toLowerCase()}`,
|
|
29
|
-
rowsExported: "Rows exported",
|
|
30
|
-
doneOf: (done, total) => `${done} of ${total} rows`,
|
|
31
|
-
done: (done) => `${done} rows`,
|
|
32
|
-
exported: (count, plural) => `Exported ${count} ${plural.toLowerCase()}`,
|
|
33
|
-
truncated: (name, count) => `${name}: the first ${count} rows, as many as a file holds.`,
|
|
34
|
-
couldNotExport: (plural) => `Could not export ${plural.toLowerCase()}`,
|
|
35
|
-
cancelled: "The export was cancelled",
|
|
36
|
-
couldNotBuild: (message) => `The export could not be built: ${message}`,
|
|
37
|
-
workbook: "Excel workbook",
|
|
38
|
-
csvFile: "CSV file"
|
|
39
|
-
},
|
|
40
|
-
nl: {
|
|
41
|
-
excel: "Excel (.xlsx)",
|
|
42
|
-
csv: "CSV",
|
|
43
|
-
asShown: "Zoals getoond",
|
|
44
|
-
rawValues: "Ruwe waarden",
|
|
45
|
-
shownHint: "Labels, datums en getallen zoals de lijst ze toont.",
|
|
46
|
-
rawHint: "Waarden zoals ze zijn opgeslagen, zoals sleutels en codes.",
|
|
47
|
-
counting: "Rijen tellen…",
|
|
48
|
-
moreThan: "meer dan 10.000 rijen",
|
|
49
|
-
columns: "Kolommen",
|
|
50
|
-
moveUp: (label) => `${label} omhoog`,
|
|
51
|
-
moveDown: (label) => `${label} omlaag`,
|
|
52
|
-
selectedRows: (count, rows) => `${count} geselecteerde ${rows === 1 ? "rij" : "rijen"}`,
|
|
53
|
-
rowsInList: "Rijen in de lijst",
|
|
54
|
-
selected: (count) => `Geselecteerd (${count})`,
|
|
55
|
-
exportPlural: (plural) => `${plural} exporteren`,
|
|
56
|
-
cancel: "Annuleren",
|
|
57
|
-
export: "Exporteren",
|
|
58
|
-
format: "Formaat",
|
|
59
|
-
rows: "Rijen",
|
|
60
|
-
listHint: "Met de filters, zoekopdracht en sortering van de lijst.",
|
|
61
|
-
values: "Waarden",
|
|
62
|
-
exports: (rows) => `Exporteert ${rows}.`,
|
|
63
|
-
overLimit: (limit) => ` Een bestand bevat hoogstens ${limit} rijen; de rest blijft weg.`,
|
|
64
|
-
exporting: (plural) => `${plural} exporteren`,
|
|
65
|
-
rowsExported: "Geëxporteerde rijen",
|
|
66
|
-
doneOf: (done, total) => `${done} van ${total} rijen`,
|
|
67
|
-
done: (done) => `${done} rijen`,
|
|
68
|
-
exported: (count, plural) => `${count} ${plural.toLowerCase()} geëxporteerd`,
|
|
69
|
-
truncated: (name, count) => `${name}: de eerste ${count} rijen, zoveel als een bestand bevat.`,
|
|
70
|
-
couldNotExport: (plural) => `Kon ${plural.toLowerCase()} niet exporteren`,
|
|
71
|
-
cancelled: "De export is geannuleerd",
|
|
72
|
-
couldNotBuild: (message) => `De export kon niet worden gemaakt: ${message}`,
|
|
73
|
-
workbook: "Excel-werkmap",
|
|
74
|
-
csvFile: "CSV-bestand"
|
|
75
|
-
}
|
|
76
|
-
});
|
|
3
|
+
const text = messages("app/export");
|
|
77
4
|
//#endregion
|
|
78
5
|
export { text };
|
|
@@ -91,15 +91,21 @@ const useExportFlow = ({ model, view, resources, views, plural, filter, orderBy,
|
|
|
91
91
|
});
|
|
92
92
|
toast.show({
|
|
93
93
|
state: "success",
|
|
94
|
-
title: text("exported",
|
|
95
|
-
|
|
94
|
+
title: text("exported", {
|
|
95
|
+
count: formatInt(result.rows),
|
|
96
|
+
plural
|
|
97
|
+
}),
|
|
98
|
+
description: result.truncated ? text("truncated", {
|
|
99
|
+
name,
|
|
100
|
+
count: formatInt(result.rows)
|
|
101
|
+
}) : name
|
|
96
102
|
});
|
|
97
103
|
} catch (error) {
|
|
98
104
|
if (error instanceof DOMException && error.name === "AbortError") return;
|
|
99
105
|
if (!isApiError(error)) throw error;
|
|
100
106
|
toast.show({
|
|
101
107
|
state: "error",
|
|
102
|
-
title: text("couldNotExport", plural),
|
|
108
|
+
title: text("couldNotExport", { plural }),
|
|
103
109
|
description: error.message
|
|
104
110
|
});
|
|
105
111
|
} finally {
|
package/dist/app/field-editor.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
2
|
import { buttonClass } from "../primitives/button.js";
|
|
3
|
-
import { useFieldControl } from "../primitives/field-control.js";
|
|
4
|
-
import { Input } from "../primitives/input.js";
|
|
5
3
|
import { humanize } from "../live/naming.js";
|
|
6
4
|
import { isMarkdown } from "../markdown/markdown-hint.js";
|
|
7
5
|
import { contactFormat, contactInputProps } from "../live/contact-links.js";
|
|
8
6
|
import { displayValue, valueTitle } from "../live/display-value.js";
|
|
9
7
|
import { text } from "./messages.js";
|
|
10
8
|
import { AppLink } from "./use-app-address.js";
|
|
9
|
+
import { useFieldControl } from "../primitives/field-control.js";
|
|
11
10
|
import { fromDraft, isEditable, toFieldDraft } from "../live/field-values.js";
|
|
12
11
|
import { Switch } from "../primitives/switch.js";
|
|
12
|
+
import { Input } from "../primitives/input.js";
|
|
13
13
|
import { Textarea } from "../primitives/textarea.js";
|
|
14
14
|
import { RelationPicker } from "./relation-picker.js";
|
|
15
15
|
import { SensitiveField } from "./sensitive-field.js";
|
|
@@ -66,7 +66,7 @@ const BuiltInEditor = ({ field, hints, value, stored, relationLabel, relationTo,
|
|
|
66
66
|
children: picker
|
|
67
67
|
}), /* @__PURE__ */ jsx(AppLink, {
|
|
68
68
|
to: relationTo,
|
|
69
|
-
"aria-label": text("openLabel", relationLabel ?? String(value)),
|
|
69
|
+
"aria-label": text("openLabel", { label: relationLabel ?? String(value) }),
|
|
70
70
|
title: text("open"),
|
|
71
71
|
className: cn(buttonClass({ variant: "ghost" }), "w-8 px-0"),
|
|
72
72
|
children: /* @__PURE__ */ jsx(ArrowUpRight, { className: "size-4" })
|
package/dist/app/field-errors.js
CHANGED
|
@@ -6,14 +6,22 @@ const numberIn = (params, key) => typeof params?.[key] === "number" ? params[key
|
|
|
6
6
|
const textMessage = (label, params) => {
|
|
7
7
|
const min = numberIn(params, "min");
|
|
8
8
|
const max = numberIn(params, "max");
|
|
9
|
-
if (min !== void 0) return text("atLeastCharacters",
|
|
10
|
-
|
|
9
|
+
if (min !== void 0) return text("atLeastCharacters", {
|
|
10
|
+
label,
|
|
11
|
+
count: formatInt(min),
|
|
12
|
+
n: min
|
|
13
|
+
});
|
|
14
|
+
if (max !== void 0) return text("atMostCharacters", {
|
|
15
|
+
label,
|
|
16
|
+
count: formatInt(max),
|
|
17
|
+
n: max
|
|
18
|
+
});
|
|
11
19
|
};
|
|
12
20
|
const wholeNumber = (params) => {
|
|
13
21
|
const min = numberIn(params, "min");
|
|
14
22
|
const max = numberIn(params, "max");
|
|
15
|
-
if (min !== void 0) return text("wholeNumberAtLeast", formatInt(min));
|
|
16
|
-
if (max !== void 0) return text("wholeNumberAtMost", formatInt(max));
|
|
23
|
+
if (min !== void 0) return text("wholeNumberAtLeast", { min: formatInt(min) });
|
|
24
|
+
if (max !== void 0) return text("wholeNumberAtMost", { max: formatInt(max) });
|
|
17
25
|
return text("wholeNumber");
|
|
18
26
|
};
|
|
19
27
|
const decimalMessage = (params) => {
|
|
@@ -21,7 +29,10 @@ const decimalMessage = (params) => {
|
|
|
21
29
|
const scale = numberIn(params, "scale");
|
|
22
30
|
if (precision === void 0 || scale === void 0) return text("number");
|
|
23
31
|
const below = formatInt(10 ** (precision - scale));
|
|
24
|
-
return scale === 0 ? text("wholeNumberBelow", below) : text("decimalsBelow",
|
|
32
|
+
return scale === 0 ? text("wholeNumberBelow", { below }) : text("decimalsBelow", {
|
|
33
|
+
scale,
|
|
34
|
+
below
|
|
35
|
+
});
|
|
25
36
|
};
|
|
26
37
|
/** What to say about a value of each field type the server turned down; without an entry, the server's message shows. */
|
|
27
38
|
const invalidValue = {
|
|
@@ -44,7 +55,7 @@ const invalidValue = {
|
|
|
44
55
|
* server words them.
|
|
45
56
|
*/
|
|
46
57
|
const fieldMessage = (field, label, error) => {
|
|
47
|
-
if (error.code === "required") return text("required", label);
|
|
58
|
+
if (error.code === "required") return text("required", { label });
|
|
48
59
|
if (error.code !== "invalid-value" || !field) return error.message;
|
|
49
60
|
return invalidValue[field.type]?.(label, error.params) ?? error.message;
|
|
50
61
|
};
|
|
@@ -64,7 +75,7 @@ const saveFailureDescription = (error) => {
|
|
|
64
75
|
const fields = new Set(error.errors.flatMap((entry) => entry.field && entry.field !== "_record" ? [entry.field] : []));
|
|
65
76
|
const record = error.errors.flatMap((entry) => entry.field === "_record" ? [entry.message] : []);
|
|
66
77
|
if (fields.size === 0 && record.length === 0) return error.message;
|
|
67
|
-
return [...fields.size === 0 ? [] : [fields.size === 1 ? text("checkField") : text("checkFields", fields.size)], ...record].join(" ");
|
|
78
|
+
return [...fields.size === 0 ? [] : [fields.size === 1 ? text("checkField") : text("checkFields", { count: fields.size })], ...record].join(" ");
|
|
68
79
|
};
|
|
69
80
|
//#endregion
|
|
70
81
|
export { fieldErrors, fieldMessage, saveFailureDescription };
|
|
@@ -1,48 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../locale/messages.js";
|
|
2
2
|
//#region src/app/field-messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
atLeastCharacters: (label, count, n) => `${label} needs at least ${count} character${n === 1 ? "" : "s"}`,
|
|
6
|
-
atMostCharacters: (label, count, n) => `${label} can have at most ${count} character${n === 1 ? "" : "s"}`,
|
|
7
|
-
wholeNumberAtLeast: (min) => `Enter a whole number of at least ${min}`,
|
|
8
|
-
wholeNumberAtMost: (max) => `Enter a whole number of at most ${max}`,
|
|
9
|
-
wholeNumber: "Enter a whole number",
|
|
10
|
-
number: "Enter a number",
|
|
11
|
-
wholeNumberBelow: (below) => `Enter a whole number below ${below}`,
|
|
12
|
-
decimalsBelow: (scale, below) => `Enter a number with at most ${scale} decimal${scale === 1 ? "" : "s"}, below ${below}`,
|
|
13
|
-
date: "Enter a date",
|
|
14
|
-
timestamp: "Enter a date and time",
|
|
15
|
-
country: "Enter a two-letter country code, such as NL",
|
|
16
|
-
currency: "Enter a three-letter currency code, such as EUR",
|
|
17
|
-
uuid: "Enter a valid ID",
|
|
18
|
-
enum: "Choose one of the options",
|
|
19
|
-
relation: "Choose a record",
|
|
20
|
-
json: "Enter valid JSON",
|
|
21
|
-
required: (label) => `${label} is required`,
|
|
22
|
-
checkField: "Check the marked field.",
|
|
23
|
-
checkFields: (count) => `Check ${count} fields.`
|
|
24
|
-
},
|
|
25
|
-
nl: {
|
|
26
|
-
atLeastCharacters: (label, count, n) => `${label} moet minstens ${count} ${n === 1 ? "teken" : "tekens"} hebben`,
|
|
27
|
-
atMostCharacters: (label, count, n) => `${label} mag hoogstens ${count} ${n === 1 ? "teken" : "tekens"} hebben`,
|
|
28
|
-
wholeNumberAtLeast: (min) => `Vul een geheel getal in van minstens ${min}`,
|
|
29
|
-
wholeNumberAtMost: (max) => `Vul een geheel getal in van hoogstens ${max}`,
|
|
30
|
-
wholeNumber: "Vul een geheel getal in",
|
|
31
|
-
number: "Vul een getal in",
|
|
32
|
-
wholeNumberBelow: (below) => `Vul een geheel getal in onder ${below}`,
|
|
33
|
-
decimalsBelow: (scale, below) => `Vul een getal in met hoogstens ${scale} ${scale === 1 ? "decimaal" : "decimalen"}, onder ${below}`,
|
|
34
|
-
date: "Vul een datum in",
|
|
35
|
-
timestamp: "Vul een datum en tijd in",
|
|
36
|
-
country: "Vul een landcode van twee letters in, zoals NL",
|
|
37
|
-
currency: "Vul een valutacode van drie letters in, zoals EUR",
|
|
38
|
-
uuid: "Vul een geldig ID in",
|
|
39
|
-
enum: "Kies een van de opties",
|
|
40
|
-
relation: "Kies een record",
|
|
41
|
-
json: "Vul geldige JSON in",
|
|
42
|
-
required: (label) => `${label} is verplicht`,
|
|
43
|
-
checkField: "Controleer het gemarkeerde veld.",
|
|
44
|
-
checkFields: (count) => `Controleer ${count} velden.`
|
|
45
|
-
}
|
|
46
|
-
});
|
|
3
|
+
const text = messages("app/field");
|
|
47
4
|
//#endregion
|
|
48
5
|
export { text };
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../../locale/messages.js";
|
|
2
2
|
//#region src/app/field-types/members/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
needsOrganizations: "Choosing members needs organizations: turn them on in the auth config.",
|
|
6
|
-
couldNotLoadMembers: "Could not load the members.",
|
|
7
|
-
unknownMember: "Unknown member",
|
|
8
|
-
searchMembers: "Search members"
|
|
9
|
-
},
|
|
10
|
-
nl: {
|
|
11
|
-
needsOrganizations: "Leden kiezen vraagt om organisaties: zet ze aan in de auth-configuratie.",
|
|
12
|
-
couldNotLoadMembers: "De leden konden niet worden geladen.",
|
|
13
|
-
unknownMember: "Onbekend lid",
|
|
14
|
-
searchMembers: "Leden zoeken"
|
|
15
|
-
}
|
|
16
|
-
});
|
|
3
|
+
const text = messages("app/field-types/members");
|
|
17
4
|
//#endregion
|
|
18
5
|
export { text };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/field-types/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: { fieldType: (name) => `The field type ${name}` },
|
|
5
|
-
nl: { fieldType: (name) => `Het veldtype ${name}` }
|
|
6
|
-
});
|
|
3
|
+
const text = messages("app/field-types");
|
|
7
4
|
//#endregion
|
|
8
5
|
export { text };
|
|
@@ -25,7 +25,7 @@ const WidgetPart = ({ fallback, ...rest }) => {
|
|
|
25
25
|
const element = partOf(rest);
|
|
26
26
|
if (!element) return fallback;
|
|
27
27
|
return /* @__PURE__ */ jsx(CustomBoundary, {
|
|
28
|
-
name: text("fieldType", rest.shown.name),
|
|
28
|
+
name: text("fieldType", { name: rest.shown.name }),
|
|
29
29
|
fallback,
|
|
30
30
|
children: element
|
|
31
31
|
});
|
package/dist/app/file-field.js
CHANGED
|
@@ -98,7 +98,7 @@ const FileField = ({ field, hints, resource, value, locked, invalid, onChange })
|
|
|
98
98
|
type: "file",
|
|
99
99
|
hidden: true,
|
|
100
100
|
accept: acceptOf(field),
|
|
101
|
-
"aria-label": text("chooseFileFor", label),
|
|
101
|
+
"aria-label": text("chooseFileFor", { label }),
|
|
102
102
|
onChange: (event) => choose(event.target.files)
|
|
103
103
|
});
|
|
104
104
|
const error = upload.error && /* @__PURE__ */ jsx("div", {
|
|
@@ -111,7 +111,7 @@ const FileField = ({ field, hints, resource, value, locked, invalid, onChange })
|
|
|
111
111
|
if (upload.isPending) return /* @__PURE__ */ jsxs("div", {
|
|
112
112
|
className: "py-1.5",
|
|
113
113
|
role: "status",
|
|
114
|
-
"aria-label": text("uploadingLabel", label),
|
|
114
|
+
"aria-label": text("uploadingLabel", { label }),
|
|
115
115
|
children: [/* @__PURE__ */ jsx("div", {
|
|
116
116
|
className: "h-1.5 overflow-hidden rounded-full bg-muted",
|
|
117
117
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -120,7 +120,7 @@ const FileField = ({ field, hints, resource, value, locked, invalid, onChange })
|
|
|
120
120
|
})
|
|
121
121
|
}), /* @__PURE__ */ jsx("span", {
|
|
122
122
|
className: "text-xs text-muted-foreground",
|
|
123
|
-
children: text("uploading", Math.round((progress ?? 0) * 100))
|
|
123
|
+
children: text("uploading", { percent: Math.round((progress ?? 0) * 100) })
|
|
124
124
|
})]
|
|
125
125
|
});
|
|
126
126
|
if (fileShown(value)) return /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cn } from "../../lib/cn.js";
|
|
2
2
|
import { useAdminMeta, usePermissions } from "../meta-gate.js";
|
|
3
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
4
3
|
import { Section } from "../../record-view/section.js";
|
|
5
4
|
import { shownImage } from "../../live/file-values.js";
|
|
6
5
|
import { humanize } from "../../live/naming.js";
|
|
6
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
7
7
|
import { ErrorBanner } from "../error-banner.js";
|
|
8
8
|
import { FileImage } from "../../live/file-image.js";
|
|
9
9
|
import { galleryTiles } from "./gallery-layout.js";
|
|
@@ -92,7 +92,10 @@ const GallerySection = ({ item, record, recordKey }) => {
|
|
|
92
92
|
const last = index === shown - 1 && more > 0;
|
|
93
93
|
return /* @__PURE__ */ jsxs("button", {
|
|
94
94
|
type: "button",
|
|
95
|
-
"aria-label": last ? text("showAll", count) : text("showPhoto",
|
|
95
|
+
"aria-label": last ? text("showAll", { count }) : text("showPhoto", {
|
|
96
|
+
index: index + 1,
|
|
97
|
+
count
|
|
98
|
+
}),
|
|
96
99
|
onClick: () => setOpen(index),
|
|
97
100
|
className: cn("group/tile relative overflow-hidden bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary", index === 0 ? "col-span-4 row-span-2" : "max-md:hidden", spans[shown][index]),
|
|
98
101
|
children: [
|
|
@@ -120,7 +123,7 @@ const GallerySection = ({ item, record, recordKey }) => {
|
|
|
120
123
|
onIndex: setOpen,
|
|
121
124
|
onClose: () => setOpen(void 0),
|
|
122
125
|
details,
|
|
123
|
-
detailsTitle: holder && text("holderDetails", holderView?.names?.singular ?? humanize(holder.name))
|
|
126
|
+
detailsTitle: holder && text("holderDetails", { singular: holderView?.names?.singular ?? humanize(holder.name) })
|
|
124
127
|
})]
|
|
125
128
|
});
|
|
126
129
|
};
|
|
@@ -1,30 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/gallery/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
couldNotLoad: "Could not load the photos",
|
|
6
|
-
showAll: (count) => `Show all ${count} photos`,
|
|
7
|
-
showPhoto: (index, count) => `Show photo ${index} of ${count}`,
|
|
8
|
-
details: "Details",
|
|
9
|
-
holderDetails: (singular) => `${singular} details`,
|
|
10
|
-
close: "Close",
|
|
11
|
-
previousPhoto: "Previous photo",
|
|
12
|
-
nextPhoto: "Next photo",
|
|
13
|
-
couldNotLoadOne: (singular) => `Could not load the ${singular}`,
|
|
14
|
-
open: (singular) => `Open ${singular}`
|
|
15
|
-
},
|
|
16
|
-
nl: {
|
|
17
|
-
couldNotLoad: "Kon de foto’s niet laden",
|
|
18
|
-
showAll: (count) => `Alle ${count} foto’s tonen`,
|
|
19
|
-
showPhoto: (index, count) => `Foto ${index} van ${count} tonen`,
|
|
20
|
-
details: "Gegevens",
|
|
21
|
-
holderDetails: (singular) => `Gegevens van ${singular.toLowerCase()}`,
|
|
22
|
-
close: "Sluiten",
|
|
23
|
-
previousPhoto: "Vorige foto",
|
|
24
|
-
nextPhoto: "Volgende foto",
|
|
25
|
-
couldNotLoadOne: (singular) => `Kon ${singular} niet laden`,
|
|
26
|
-
open: (singular) => `${singular} openen`
|
|
27
|
-
}
|
|
28
|
-
});
|
|
3
|
+
const text = messages("app/gallery");
|
|
29
4
|
//#endregion
|
|
30
5
|
export { text };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
2
1
|
import { humanize } from "../../live/naming.js";
|
|
2
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
3
3
|
import { AppLink } from "../use-app-address.js";
|
|
4
4
|
import { SpecTable } from "../../record-view/spec-table.js";
|
|
5
5
|
import { ErrorBanner } from "../error-banner.js";
|
|
@@ -18,7 +18,7 @@ const PhotoDetails = ({ model, view, photoKey, fields }) => {
|
|
|
18
18
|
const singular = (view?.names?.singular ?? humanize(model.name)).toLowerCase();
|
|
19
19
|
if (record.isPending) return /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-48" });
|
|
20
20
|
if (record.error) return /* @__PURE__ */ jsx(ErrorBanner, {
|
|
21
|
-
title: text("couldNotLoadOne", singular),
|
|
21
|
+
title: text("couldNotLoadOne", { singular }),
|
|
22
22
|
error: record.error
|
|
23
23
|
});
|
|
24
24
|
const shown = fields.filter((name) => fieldAccess(record.data.permissions, name) !== "hidden");
|
|
@@ -36,7 +36,7 @@ const PhotoDetails = ({ model, view, photoKey, fields }) => {
|
|
|
36
36
|
key: photoKey
|
|
37
37
|
},
|
|
38
38
|
className: "mt-3 inline-block font-medium text-primary-text hover:underline",
|
|
39
|
-
children: text("open", singular)
|
|
39
|
+
children: text("open", { singular })
|
|
40
40
|
})] });
|
|
41
41
|
};
|
|
42
42
|
//#endregion
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { useAdminMeta } from "../meta-gate.js";
|
|
2
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
3
2
|
import { recordKey, recordTitle } from "../../live/model-helpers.js";
|
|
4
3
|
import { loadedFields } from "../displays/list-displays.js";
|
|
4
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
5
5
|
import { useAppAddress } from "../use-app-address.js";
|
|
6
6
|
import { ErrorBanner } from "../error-banner.js";
|
|
7
7
|
import { useProjectUi } from "../pages/project-ui.js";
|
|
8
8
|
import { Problem } from "../pages/problem.js";
|
|
9
|
-
import { slotted } from "../../locale/slotted.js";
|
|
10
9
|
import { DataGrid } from "../../data-grid/data-grid.js";
|
|
11
10
|
import { text } from "./messages.js";
|
|
12
11
|
import { embeddedColumns } from "../embedded-list/embedded-columns.js";
|
|
@@ -60,7 +59,7 @@ const HandSortedList = ({ model, view, field, filter, columns, sort }) => {
|
|
|
60
59
|
total: rows.length,
|
|
61
60
|
rowAt: (index) => rows[index]
|
|
62
61
|
}, [rows]);
|
|
63
|
-
if (ruleName !== void 0 && !rule) return /* @__PURE__ */ jsx(Problem, { children:
|
|
62
|
+
if (ruleName !== void 0 && !rule) return /* @__PURE__ */ jsx(Problem, { children: text.rich("noRule", { rule: ruleName }) });
|
|
64
63
|
if (order.loading) return /* @__PURE__ */ jsx("div", {
|
|
65
64
|
className: "flex flex-col gap-2",
|
|
66
65
|
children: Array.from({ length: 3 }, (_, index) => /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" }, index))
|
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/hand-order/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
done: "Done",
|
|
6
|
-
reorder: "Reorder",
|
|
7
|
-
couldNotLoad: "Could not load",
|
|
8
|
-
nothingYet: "Nothing here yet.",
|
|
9
|
-
couldNotChange: "Could not change the order",
|
|
10
|
-
orderChanged: "Order changed",
|
|
11
|
-
undo: "Undo",
|
|
12
|
-
couldNotUndo: "Could not undo",
|
|
13
|
-
movedToPlace: (place) => `Moved to place ${place}`,
|
|
14
|
-
notMoved: "Left in its place",
|
|
15
|
-
noRule: "No drop rule is registered as {}. Give it in dropRules in protobase.ui.tsx, or load the plugin that provides it."
|
|
16
|
-
},
|
|
17
|
-
nl: {
|
|
18
|
-
done: "Klaar",
|
|
19
|
-
reorder: "Volgorde wijzigen",
|
|
20
|
-
couldNotLoad: "Kon niet laden",
|
|
21
|
-
nothingYet: "Hier staat nog niets.",
|
|
22
|
-
couldNotChange: "Kon de volgorde niet wijzigen",
|
|
23
|
-
orderChanged: "Volgorde gewijzigd",
|
|
24
|
-
undo: "Ongedaan maken",
|
|
25
|
-
couldNotUndo: "Kon niet ongedaan maken",
|
|
26
|
-
movedToPlace: (place) => `Verplaatst naar plaats ${place}`,
|
|
27
|
-
notMoved: "Op zijn plaats gelaten",
|
|
28
|
-
noRule: "Er is geen sleepregel geregistreerd als {}. Geef die in dropRules in protobase.ui.tsx, of laad de plug-in die haar levert."
|
|
29
|
-
}
|
|
30
|
-
});
|
|
3
|
+
const text = messages("app/hand-order");
|
|
31
4
|
//#endregion
|
|
32
5
|
export { text };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { keys } from "../../data/query-keys.js";
|
|
2
2
|
import { useClient } from "../../data/api-provider.js";
|
|
3
3
|
import { useAdminMeta } from "../meta-gate.js";
|
|
4
|
-
import { useToast } from "../../toasts/toast-provider.js";
|
|
5
4
|
import { recordId, recordKey, recordTitle } from "../../live/model-helpers.js";
|
|
6
5
|
import { refusalReason } from "../displays/board-columns.js";
|
|
7
6
|
import { displayRow } from "../displays/list-displays.js";
|
|
7
|
+
import { useToast } from "../../toasts/toast-provider.js";
|
|
8
8
|
import { useRefreshResource } from "../pages/use-layout-data.js";
|
|
9
9
|
import { listLabels, withLabels } from "../../live/relation-labels.js";
|
|
10
10
|
import { text } from "./messages.js";
|
|
@@ -156,7 +156,7 @@ const useHandOrder = ({ model, view, field, filter, fields, rule }) => {
|
|
|
156
156
|
const allowed = allowedDrop(rows.map((row) => displayRow(model, row).record), from, dropped, rule);
|
|
157
157
|
if (allowed.reason !== void 0) toast.show({
|
|
158
158
|
state: "warning",
|
|
159
|
-
title: allowed.to === from ? text("notMoved") : text("movedToPlace", allowed.to + 1),
|
|
159
|
+
title: allowed.to === from ? text("notMoved") : text("movedToPlace", { place: allowed.to + 1 }),
|
|
160
160
|
description: allowed.reason
|
|
161
161
|
});
|
|
162
162
|
return allowed.to;
|
|
@@ -5,7 +5,7 @@ import { text } from "./messages.js";
|
|
|
5
5
|
/** Who made a change: their name, else their id; a write from outside the app names the database role. */
|
|
6
6
|
const changedBy = (change) => {
|
|
7
7
|
if (change.actor) return change.actor.name ?? change.actor.id;
|
|
8
|
-
return change.databaseRole ? text("databaseRole", change.databaseRole) : text("database");
|
|
8
|
+
return change.databaseRole ? text("databaseRole", { role: change.databaseRole }) : text("database");
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* A change as the record page tells it: who, what they did, and for an update each changed field the model still has,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button } from "../../primitives/button.js";
|
|
2
|
+
import { Section } from "../../record-view/section.js";
|
|
2
3
|
import { formatDateTime, formatRelativeTime } from "../../format/date.js";
|
|
3
4
|
import { Skeleton } from "../../primitives/skeleton.js";
|
|
4
|
-
import { Section } from "../../record-view/section.js";
|
|
5
5
|
import { ErrorBanner } from "../error-banner.js";
|
|
6
6
|
import { describeChange } from "./describe-change.js";
|
|
7
7
|
import { useRecordHistory } from "./use-record-history.js";
|
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/history/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
create: "created this",
|
|
6
|
-
update: "changed",
|
|
7
|
-
delete: "deleted this",
|
|
8
|
-
undelete: "restored this",
|
|
9
|
-
database: "Database",
|
|
10
|
-
databaseRole: (role) => `Database (${role})`,
|
|
11
|
-
changed: "changed",
|
|
12
|
-
changedThis: "changed this",
|
|
13
|
-
couldNotLoad: "Could not load the history",
|
|
14
|
-
noChanges: "No changes kept yet.",
|
|
15
|
-
showMore: "Show more"
|
|
16
|
-
},
|
|
17
|
-
nl: {
|
|
18
|
-
create: "maakte dit",
|
|
19
|
-
update: "wijzigde",
|
|
20
|
-
delete: "verwijderde dit",
|
|
21
|
-
undelete: "zette dit terug",
|
|
22
|
-
database: "Database",
|
|
23
|
-
databaseRole: (role) => `Database (${role})`,
|
|
24
|
-
changed: "gewijzigd",
|
|
25
|
-
changedThis: "wijzigde dit",
|
|
26
|
-
couldNotLoad: "Kon de geschiedenis niet laden",
|
|
27
|
-
noChanges: "Nog geen wijzigingen bewaard.",
|
|
28
|
-
showMore: "Meer tonen"
|
|
29
|
-
}
|
|
30
|
-
});
|
|
3
|
+
const text = messages("app/history");
|
|
31
4
|
//#endregion
|
|
32
5
|
export { text };
|