@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
|
@@ -9,7 +9,11 @@ const label = (op) => {
|
|
|
9
9
|
const describeBatchFailure = (error, ops) => {
|
|
10
10
|
const index = error.operation;
|
|
11
11
|
const op = index === void 0 ? void 0 : ops[index];
|
|
12
|
-
return op ? text("operationFailed",
|
|
12
|
+
return op ? text("operationFailed", {
|
|
13
|
+
index: index + 1,
|
|
14
|
+
label: label(op),
|
|
15
|
+
message: error.message
|
|
16
|
+
}) : text("nothingSaved", { message: error.message });
|
|
13
17
|
};
|
|
14
18
|
/** The same error with the failing operation named in its message, keeping its class so a 412 stays a 412. */
|
|
15
19
|
const nameFailingOperation = (error, ops) => {
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/change-confirm/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
title: (label) => `Change ${label}?`,
|
|
6
|
-
change: "Change",
|
|
7
|
-
cancel: "Cancel"
|
|
8
|
-
},
|
|
9
|
-
nl: {
|
|
10
|
-
title: (label) => `${label} wijzigen?`,
|
|
11
|
-
change: "Wijzigen",
|
|
12
|
-
cancel: "Annuleren"
|
|
13
|
-
}
|
|
14
|
-
});
|
|
3
|
+
const text = messages("app/change-confirm");
|
|
15
4
|
//#endregion
|
|
16
5
|
export { text };
|
|
@@ -5,13 +5,12 @@ import { asksToConfirm } from "./asks-to-confirm.js";
|
|
|
5
5
|
import { text } from "./messages.js";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { createPortal } from "react-dom";
|
|
9
8
|
//#region src/app/change-confirm/use-change-confirm.tsx
|
|
10
9
|
/**
|
|
11
10
|
* Whether `node` sits in the question a change asks. The dialog is portalled to the body, so a list cell does not clip
|
|
12
11
|
* it, while its events still bubble through the editor that asked it.
|
|
13
12
|
*/
|
|
14
|
-
const inChangeConfirm = (node) => node instanceof Element && node.closest("[data-change-confirm]") !== null;
|
|
13
|
+
const inChangeConfirm = (node) => node instanceof Element && node.closest("[data-dialog=\"change-confirm\"]") !== null;
|
|
15
14
|
/**
|
|
16
15
|
* The field's `onChange`, asking the view's `.confirm()` question before it hands on a change that `asksToConfirm`
|
|
17
16
|
* picks out, and the dialog that asks it. Cancelling drops the change, so the field keeps its value.
|
|
@@ -29,22 +28,20 @@ const useChangeConfirm = ({ field, hints, value, stored, onChange }) => {
|
|
|
29
28
|
};
|
|
30
29
|
return {
|
|
31
30
|
onChange: change,
|
|
32
|
-
dialog: pending &&
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
})
|
|
47
|
-
}), document.body)
|
|
31
|
+
dialog: pending && /* @__PURE__ */ jsx(Dialog, {
|
|
32
|
+
name: "change-confirm",
|
|
33
|
+
title: text("title", { label: hints?.label ?? humanize(field.name) }),
|
|
34
|
+
description: hints?.confirm,
|
|
35
|
+
onClose: cancel,
|
|
36
|
+
actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
37
|
+
onClick: cancel,
|
|
38
|
+
children: text("cancel")
|
|
39
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
40
|
+
variant: "primary",
|
|
41
|
+
onClick: confirm,
|
|
42
|
+
children: text("change")
|
|
43
|
+
})] })
|
|
44
|
+
})
|
|
48
45
|
};
|
|
49
46
|
};
|
|
50
47
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { formatTag } from "../../locale/active-locale.js";
|
|
2
|
+
import { valueColor } from "../../live/value-color.js";
|
|
2
3
|
import { text } from "./messages.js";
|
|
3
4
|
import { createWhere, enumLabel, printFilter } from "@protobase/schema";
|
|
4
5
|
//#region src/app/charts/chart-groups.ts
|
|
@@ -7,7 +8,8 @@ const slot = (index) => index >= 0 && index < 8 ? `var(--chart-${index + 1})` :
|
|
|
7
8
|
const colorOf = (field, hints, value, index) => {
|
|
8
9
|
const key = String(value);
|
|
9
10
|
if (value === null) return "var(--faint-foreground)";
|
|
10
|
-
|
|
11
|
+
const color = valueColor(hints?.valueColors, value);
|
|
12
|
+
if (color !== void 0) return color;
|
|
11
13
|
if (field.type === "enum") return slot(field.enumValues?.indexOf(key) ?? -1);
|
|
12
14
|
if (field.type === "boolean") return slot(value ? 0 : 1);
|
|
13
15
|
return slot(index);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAdminMeta } from "../meta-gate.js";
|
|
2
2
|
import { viewerZone } from "../../format/zone.js";
|
|
3
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
4
3
|
import { labelFieldOf } from "../../live/model-helpers.js";
|
|
4
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
5
5
|
import { useAggregate } from "../../data/use-aggregates.js";
|
|
6
6
|
import { text } from "./messages.js";
|
|
7
7
|
import { periodPoints, valueSlices } from "./chart-groups.js";
|
|
@@ -17,7 +17,7 @@ const GroupBars = ({ resource, view, slices, measure }) => {
|
|
|
17
17
|
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(AppLink, {
|
|
18
18
|
to: filteredListAddress(view, resource, slice.filter),
|
|
19
19
|
className: "group grid grid-cols-[minmax(6rem,35%)_1fr_auto] items-center gap-3 rounded-md px-1 py-1 hover:bg-muted",
|
|
20
|
-
title: measure.kind === "count" ? void 0 : text("records", measureText(slice.count, { kind: "count" })),
|
|
20
|
+
title: measure.kind === "count" ? void 0 : text("records", { count: measureText(slice.count, { kind: "count" }) }),
|
|
21
21
|
children: [
|
|
22
22
|
/* @__PURE__ */ jsx("span", {
|
|
23
23
|
className: "truncate group-hover:text-primary-text",
|
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/charts/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
notSet: "Not set",
|
|
6
|
-
yes: "Yes",
|
|
7
|
-
no: "No",
|
|
8
|
-
nothingYet: "Nothing to chart yet.",
|
|
9
|
-
couldNotLoad: "Could not load the chart.",
|
|
10
|
-
weekOf: (day) => `Week of ${day}`,
|
|
11
|
-
other: "Other",
|
|
12
|
-
records: (count) => `${count} records`
|
|
13
|
-
},
|
|
14
|
-
nl: {
|
|
15
|
-
notSet: "Niet ingevuld",
|
|
16
|
-
yes: "Ja",
|
|
17
|
-
no: "Nee",
|
|
18
|
-
nothingYet: "Nog niets om in een grafiek te zetten.",
|
|
19
|
-
couldNotLoad: "Kon de grafiek niet laden.",
|
|
20
|
-
weekOf: (day) => `Week van ${day}`,
|
|
21
|
-
other: "Overig",
|
|
22
|
-
records: (count) => `${count} records`
|
|
23
|
-
}
|
|
24
|
-
});
|
|
3
|
+
const text = messages("app/charts");
|
|
25
4
|
//#endregion
|
|
26
5
|
export { text };
|
|
@@ -86,7 +86,7 @@ const PointTooltip = ({ active, payload, measure, bucket, series }) => {
|
|
|
86
86
|
children: [
|
|
87
87
|
/* @__PURE__ */ jsx("div", {
|
|
88
88
|
className: "text-muted-foreground",
|
|
89
|
-
children: bucket === "week" ? text("weekOf", formatterOf(tooltipFormats[bucket])(point.at)) : formatterOf(tooltipFormats[bucket])(point.at)
|
|
89
|
+
children: bucket === "week" ? text("weekOf", { day: formatterOf(tooltipFormats[bucket])(point.at) }) : formatterOf(tooltipFormats[bucket])(point.at)
|
|
90
90
|
}),
|
|
91
91
|
series?.map((part) => /* @__PURE__ */ jsxs("div", {
|
|
92
92
|
className: "flex items-center gap-2",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useClient } from "../../data/api-provider.js";
|
|
2
2
|
import { Button } from "../../primitives/button.js";
|
|
3
|
-
import { useToast } from "../../toasts/toast-provider.js";
|
|
4
3
|
import { refusalReason } from "../displays/board-columns.js";
|
|
5
4
|
import { useNavigationGuard } from "../router.js";
|
|
5
|
+
import { useToast } from "../../toasts/toast-provider.js";
|
|
6
6
|
import { mentionedIds } from "../../mentions/mention-text.js";
|
|
7
7
|
import { MentionBox, emptyDraft } from "../../mentions/mention-box.js";
|
|
8
8
|
import { usePostComment } from "./use-post-comment.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Button } from "../../primitives/button.js";
|
|
2
|
-
import { formatDateTime, formatRelativeTime } from "../../format/date.js";
|
|
3
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
4
2
|
import { Avatar } from "../../primitives/avatar.js";
|
|
5
3
|
import { Section } from "../../record-view/section.js";
|
|
4
|
+
import { formatDateTime, formatRelativeTime } from "../../format/date.js";
|
|
5
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
6
6
|
import { ErrorBanner } from "../error-banner.js";
|
|
7
7
|
import { hueOf, initialsOf } from "../../auth/user-to-shell.js";
|
|
8
8
|
import { CommentBody } from "./comment-body.js";
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/comments/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
couldNotPost: "Could not post the comment",
|
|
6
|
-
comment: "Comment",
|
|
7
|
-
placeholder: "Write a comment, @ to mention someone",
|
|
8
|
-
couldNotLoad: "Could not load the comments",
|
|
9
|
-
showEarlier: "Show earlier comments",
|
|
10
|
-
noComments: "No comments yet."
|
|
11
|
-
},
|
|
12
|
-
nl: {
|
|
13
|
-
couldNotPost: "Kon de opmerking niet plaatsen",
|
|
14
|
-
comment: "Opmerking",
|
|
15
|
-
placeholder: "Schrijf een opmerking, @ om iemand te noemen",
|
|
16
|
-
couldNotLoad: "Kon de opmerkingen niet laden",
|
|
17
|
-
showEarlier: "Eerdere opmerkingen tonen",
|
|
18
|
-
noComments: "Nog geen opmerkingen."
|
|
19
|
-
}
|
|
20
|
-
});
|
|
3
|
+
const text = messages("app/comments");
|
|
21
4
|
//#endregion
|
|
22
5
|
export { text };
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../locale/messages.js";
|
|
2
2
|
//#region src/app/confirm-sign-in-messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
confirmTitle: "Confirm it's you",
|
|
6
|
-
confirmWhy: (minutes) => `Showing this needs a passkey or your authenticator app in the last ${minutes} minutes.`,
|
|
7
|
-
usePasskey: "Use a passkey",
|
|
8
|
-
authenticatorCode: "Code from your authenticator app",
|
|
9
|
-
confirm: "Confirm",
|
|
10
|
-
nothingToConfirmWith: "Add a passkey or an authenticator app on your account page first."
|
|
11
|
-
},
|
|
12
|
-
nl: {
|
|
13
|
-
confirmTitle: "Bevestig dat jij het bent",
|
|
14
|
-
confirmWhy: (minutes) => `Dit tonen vraagt in de laatste ${minutes} minuten een passkey of je authenticator-app.`,
|
|
15
|
-
usePasskey: "Passkey gebruiken",
|
|
16
|
-
authenticatorCode: "Code uit je authenticator-app",
|
|
17
|
-
confirm: "Bevestigen",
|
|
18
|
-
nothingToConfirmWith: "Voeg eerst een passkey of een authenticator-app toe op je accountpagina."
|
|
19
|
-
}
|
|
20
|
-
});
|
|
3
|
+
const text = messages("app/confirm-sign-in");
|
|
21
4
|
//#endregion
|
|
22
5
|
export { text };
|
|
@@ -42,7 +42,7 @@ const ConfirmSignIn = ({ minutes, onConfirmed }) => {
|
|
|
42
42
|
}),
|
|
43
43
|
/* @__PURE__ */ jsx("p", {
|
|
44
44
|
className: "text-muted-foreground",
|
|
45
|
-
children: text("confirmWhy", minutes)
|
|
45
|
+
children: text("confirmWhy", { minutes })
|
|
46
46
|
}),
|
|
47
47
|
account && account.passkeys > 0 && /* @__PURE__ */ jsx(Button, {
|
|
48
48
|
variant: "primary",
|
|
@@ -27,11 +27,11 @@ const CreatePage = ({ resource, values }) => {
|
|
|
27
27
|
const permissions = usePermissions(resource);
|
|
28
28
|
if (!model) return /* @__PURE__ */ jsx(Notice, {
|
|
29
29
|
title: text("notFound"),
|
|
30
|
-
children: text("noResource", resource)
|
|
30
|
+
children: text("noResource", { name: resource })
|
|
31
31
|
});
|
|
32
32
|
if (!can(permissions, "create")) return /* @__PURE__ */ jsx(Notice, {
|
|
33
33
|
title: text$1("notAllowed"),
|
|
34
|
-
children: text$1("cannotCreate", meta.views[resource]?.names?.plural.toLowerCase() ?? resource)
|
|
34
|
+
children: text$1("cannotCreate", { plural: meta.views[resource]?.names?.plural.toLowerCase() ?? resource })
|
|
35
35
|
});
|
|
36
36
|
return /* @__PURE__ */ jsx(LoadedCreate, {
|
|
37
37
|
resource,
|
|
@@ -46,7 +46,7 @@ const LoadedCreate = ({ resource, values }) => {
|
|
|
46
46
|
const queryClient = useQueryClient();
|
|
47
47
|
const { go } = useAppAddress();
|
|
48
48
|
const noun = view?.names?.singular ?? humanize(resource);
|
|
49
|
-
const feedback = useLiveSave(view?.saveFeedback ?? "toast", text$1("subject", noun));
|
|
49
|
+
const feedback = useLiveSave(view?.saveFeedback ?? "toast", text$1("subject", { noun }));
|
|
50
50
|
const sections = createSections(model, view);
|
|
51
51
|
const [draft, setDraft] = useState(() => initialDraft(model, sections, values));
|
|
52
52
|
const [errors, setErrors] = useState({});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Field } from "../../record-view/field.js";
|
|
2
1
|
import { Section } from "../../record-view/section.js";
|
|
2
|
+
import { Field } from "../../record-view/field.js";
|
|
3
3
|
import { text } from "./messages.js";
|
|
4
4
|
import { Form } from "./form.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -7,9 +7,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
7
7
|
/** The presentation of "New <thing>": the view's sections, each field with its editor, and Create or Cancel. */
|
|
8
8
|
const CreateRecordForm = ({ noun, collection, sections, saving, message, onSubmit, onCancel, ref }) => /* @__PURE__ */ jsx(Form, {
|
|
9
9
|
ref,
|
|
10
|
-
title: text("title", noun),
|
|
10
|
+
title: text("title", { noun }),
|
|
11
11
|
eyebrow: collection,
|
|
12
|
-
submit: text("submit", noun),
|
|
12
|
+
submit: text("submit", { noun }),
|
|
13
13
|
saving,
|
|
14
14
|
error: message ? new Error(message) : void 0,
|
|
15
15
|
errorTitle: text("notCreated"),
|
|
@@ -18,7 +18,7 @@ const CreateRoute = ({ resource, values }) => {
|
|
|
18
18
|
}, new URLSearchParams(values).toString());
|
|
19
19
|
if (!meta.pages[view.create.page]) return /* @__PURE__ */ jsx(Notice, {
|
|
20
20
|
title: text("notAllowed"),
|
|
21
|
-
children: text("cannotCreate", view.names?.plural.toLowerCase() ?? humanize(resource))
|
|
21
|
+
children: text("cannotCreate", { plural: view.names?.plural.toLowerCase() ?? humanize(resource) })
|
|
22
22
|
});
|
|
23
23
|
return /* @__PURE__ */ jsx(ComposedPage, { name: view.create.page });
|
|
24
24
|
};
|
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/create/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
title: (noun) => `New ${noun.toLowerCase()}`,
|
|
6
|
-
subject: (noun) => `New ${noun.toLowerCase()}`,
|
|
7
|
-
submit: (noun) => `Create ${noun.toLowerCase()}`,
|
|
8
|
-
notCreated: "Not created",
|
|
9
|
-
notSaved: "Not saved",
|
|
10
|
-
cancel: "Cancel",
|
|
11
|
-
setByDatabase: "Set by the database",
|
|
12
|
-
details: "Details",
|
|
13
|
-
otherFields: "Other fields",
|
|
14
|
-
notAllowed: "Not allowed",
|
|
15
|
-
cannotCreate: (plural) => `You cannot create ${plural}.`
|
|
16
|
-
},
|
|
17
|
-
nl: {
|
|
18
|
-
title: (noun) => `${noun} toevoegen`,
|
|
19
|
-
subject: (noun) => noun,
|
|
20
|
-
submit: (noun) => `${noun} aanmaken`,
|
|
21
|
-
notCreated: "Niet aangemaakt",
|
|
22
|
-
notSaved: "Niet bewaard",
|
|
23
|
-
cancel: "Annuleren",
|
|
24
|
-
setByDatabase: "Ingevuld door de database",
|
|
25
|
-
details: "Details",
|
|
26
|
-
otherFields: "Overige velden",
|
|
27
|
-
notAllowed: "Niet toegestaan",
|
|
28
|
-
cannotCreate: (plural) => `Je mag geen ${plural} aanmaken.`
|
|
29
|
-
}
|
|
30
|
-
});
|
|
3
|
+
const text = messages("app/create");
|
|
31
4
|
//#endregion
|
|
32
5
|
export { text };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Section } from "../record-view/section.js";
|
|
2
|
-
import { SidebarCard } from "../record-view/record-sidebar.js";
|
|
3
2
|
import { text } from "./messages.js";
|
|
3
|
+
import { SidebarCard } from "../record-view/record-sidebar.js";
|
|
4
4
|
import { useProjectUi } from "./pages/project-ui.js";
|
|
5
5
|
import { Problem } from "./pages/problem.js";
|
|
6
|
-
import { slotted } from "../locale/slotted.js";
|
|
7
6
|
import { CustomBoundary } from "./pages/custom-boundary.js";
|
|
8
7
|
import { RecordScope } from "./pages/record-scope.js";
|
|
9
8
|
import { unmarkFieldRefs } from "@protobase/schema/internal";
|
|
@@ -22,7 +21,7 @@ const CustomSection = ({ item, scope }) => {
|
|
|
22
21
|
name: item.component,
|
|
23
22
|
children: /* @__PURE__ */ jsx(Component, { ...unmarkFieldRefs(item.props ?? {}) })
|
|
24
23
|
})
|
|
25
|
-
}) : /* @__PURE__ */ jsx(Problem, { children:
|
|
24
|
+
}) : /* @__PURE__ */ jsx(Problem, { children: text.rich("noComponent", { component: item.component }) });
|
|
26
25
|
if (item.sidebar) return item.title ? /* @__PURE__ */ jsx(SidebarCard, {
|
|
27
26
|
title: item.title,
|
|
28
27
|
children: body
|
|
@@ -4,7 +4,10 @@ import { createWhere, printFilter } from "@protobase/schema";
|
|
|
4
4
|
//#region src/app/delete/blocked-delete.ts
|
|
5
5
|
const where$1 = createWhere();
|
|
6
6
|
/** What a delete other records still point at says, such as "Orders still point at this company." */
|
|
7
|
-
const blockedDeleteText = ({ blockingPlural, noun }) => text("stillPointAt",
|
|
7
|
+
const blockedDeleteText = ({ blockingPlural, noun }) => text("stillPointAt", {
|
|
8
|
+
plural: blockingPlural,
|
|
9
|
+
noun
|
|
10
|
+
});
|
|
8
11
|
/**
|
|
9
12
|
* Why the delete was refused, naming the records that point at it by their view's plural, and, when the server names
|
|
10
13
|
* the field pointing at it, a link to their list filtered to those records. `undefined` for a resource the app does not show.
|
|
@@ -26,7 +29,7 @@ const blockedDelete = ({ blockedBy, resources, views, noun, key }) => {
|
|
|
26
29
|
return {
|
|
27
30
|
text: text$1,
|
|
28
31
|
link: {
|
|
29
|
-
label: text("show", plural),
|
|
32
|
+
label: text("show", { plural }),
|
|
30
33
|
to: list
|
|
31
34
|
}
|
|
32
35
|
};
|
|
@@ -4,8 +4,11 @@ import { text } from "./messages.js";
|
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/app/delete/dialogs.tsx
|
|
6
6
|
const ConfirmDeleteDialog = ({ title, noun, busy, onConfirm, onCancel }) => /* @__PURE__ */ jsx(Dialog, {
|
|
7
|
-
title: text("confirmTitle", title),
|
|
8
|
-
description: text("confirmDescription",
|
|
7
|
+
title: text("confirmTitle", { title }),
|
|
8
|
+
description: text("confirmDescription", {
|
|
9
|
+
noun,
|
|
10
|
+
title
|
|
11
|
+
}),
|
|
9
12
|
onClose: onCancel,
|
|
10
13
|
actions: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
|
|
11
14
|
onClick: onCancel,
|
|
@@ -19,7 +22,7 @@ const ConfirmDeleteDialog = ({ title, noun, busy, onConfirm, onCancel }) => /* @
|
|
|
19
22
|
})] })
|
|
20
23
|
});
|
|
21
24
|
const ConflictDialog = ({ title, changes, busy, onReview, onDeleteAnyway, onCancel }) => /* @__PURE__ */ jsx(Dialog, {
|
|
22
|
-
title: text("changedTitle", title),
|
|
25
|
+
title: text("changedTitle", { title }),
|
|
23
26
|
description: text("changedDescription"),
|
|
24
27
|
onClose: onCancel,
|
|
25
28
|
actions: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
|
|
@@ -58,7 +61,11 @@ const ConflictDialog = ({ title, changes, busy, onReview, onDeleteAnyway, onCanc
|
|
|
58
61
|
});
|
|
59
62
|
const BulkDeleteDialog = (props) => {
|
|
60
63
|
if (props.stage === "confirm") return /* @__PURE__ */ jsx(Dialog, {
|
|
61
|
-
title: text("bulkConfirmTitle",
|
|
64
|
+
title: text("bulkConfirmTitle", {
|
|
65
|
+
count: props.count,
|
|
66
|
+
noun: props.noun,
|
|
67
|
+
plural: props.plural
|
|
68
|
+
}),
|
|
62
69
|
description: text("bulkConfirmDescription"),
|
|
63
70
|
onClose: props.onCancel,
|
|
64
71
|
actions: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
|
|
@@ -68,12 +75,15 @@ const BulkDeleteDialog = (props) => {
|
|
|
68
75
|
variant: "primary",
|
|
69
76
|
className: "bg-danger hover:bg-danger/90",
|
|
70
77
|
onClick: props.onConfirm,
|
|
71
|
-
children: text("deleteCount", props.count)
|
|
78
|
+
children: text("deleteCount", { count: props.count })
|
|
72
79
|
})] })
|
|
73
80
|
});
|
|
74
81
|
if (props.stage === "running") return /* @__PURE__ */ jsx(Dialog, {
|
|
75
82
|
title: text("deleting"),
|
|
76
|
-
description: text("progress",
|
|
83
|
+
description: text("progress", {
|
|
84
|
+
done: props.done,
|
|
85
|
+
total: props.total
|
|
86
|
+
}),
|
|
77
87
|
onClose: () => void 0,
|
|
78
88
|
actions: /* @__PURE__ */ jsx(Button, {
|
|
79
89
|
loading: true,
|
|
@@ -83,8 +93,11 @@ const BulkDeleteDialog = (props) => {
|
|
|
83
93
|
});
|
|
84
94
|
const deleted = props.total - props.failures.length;
|
|
85
95
|
return /* @__PURE__ */ jsx(Dialog, {
|
|
86
|
-
title: props.failures.length === 0 ? text("deleted", deleted) : text("deletedOf",
|
|
87
|
-
|
|
96
|
+
title: props.failures.length === 0 ? text("deleted", { count: deleted }) : text("deletedOf", {
|
|
97
|
+
count: deleted,
|
|
98
|
+
total: props.total
|
|
99
|
+
}),
|
|
100
|
+
description: props.failures.length === 0 ? void 0 : text("kept", { count: props.failures.length }),
|
|
88
101
|
onClose: props.onClose,
|
|
89
102
|
actions: /* @__PURE__ */ jsx(Button, {
|
|
90
103
|
variant: "primary",
|
|
@@ -1,66 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/delete/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
confirmTitle: (title) => `Delete ${title}?`,
|
|
6
|
-
confirmDescription: (noun, _title) => `This ${noun.toLowerCase()} will be removed. This cannot be undone.`,
|
|
7
|
-
cancel: "Cancel",
|
|
8
|
-
delete: "Delete",
|
|
9
|
-
changedTitle: (title) => `${title} was changed since you opened it`,
|
|
10
|
-
changedDescription: "Someone saved this record in the meantime. Review what changed before you delete it.",
|
|
11
|
-
reviewChanges: "Review changes",
|
|
12
|
-
deleteAnyway: "Delete anyway",
|
|
13
|
-
noVisibleChanges: "No visible fields differ; the record was saved again with the same values.",
|
|
14
|
-
bulkConfirmTitle: (count, plural) => `Delete ${count} ${count === 1 ? plural.replace(/s$/, "") : plural.toLowerCase()}?`,
|
|
15
|
-
bulkConfirmDescription: "This cannot be undone. Each record is deleted only if it has not changed since the list loaded; anything that changed is reported and kept.",
|
|
16
|
-
deleteCount: (count) => `Delete ${count}`,
|
|
17
|
-
deleting: "Deleting",
|
|
18
|
-
progress: (done, total) => `${done} of ${total} done`,
|
|
19
|
-
working: "Working",
|
|
20
|
-
deleted: (count) => `Deleted ${count}`,
|
|
21
|
-
deletedOf: (count, total) => `Deleted ${count} of ${total}`,
|
|
22
|
-
kept: (count) => `${count} could not be deleted and were kept.`,
|
|
23
|
-
done: "Done",
|
|
24
|
-
deletedToast: (title) => `${title} deleted`,
|
|
25
|
-
undo: "Undo",
|
|
26
|
-
restored: (title) => `${title} restored`,
|
|
27
|
-
alreadyBack: (title) => `${title} is already back`,
|
|
28
|
-
couldNotRestore: (title) => `Could not restore ${title}`,
|
|
29
|
-
couldNotDelete: (title) => `Could not delete ${title}`,
|
|
30
|
-
changedSinceLoaded: "Changed since the list loaded, so it was kept.",
|
|
31
|
-
stillPointAt: (plural, noun) => `${plural} still point at this ${noun.toLowerCase()}.`,
|
|
32
|
-
show: (plural) => `Show ${plural.toLowerCase()}`
|
|
33
|
-
},
|
|
34
|
-
nl: {
|
|
35
|
-
confirmTitle: (title) => `${title} verwijderen?`,
|
|
36
|
-
confirmDescription: (_noun, title) => `${title} wordt verwijderd. Dit kan niet ongedaan worden gemaakt.`,
|
|
37
|
-
cancel: "Annuleren",
|
|
38
|
-
delete: "Verwijderen",
|
|
39
|
-
changedTitle: (title) => `${title} is gewijzigd sinds je het opende`,
|
|
40
|
-
changedDescription: "Iemand heeft dit record intussen bewaard. Bekijk wat er veranderde voordat je het verwijdert.",
|
|
41
|
-
reviewChanges: "Wijzigingen bekijken",
|
|
42
|
-
deleteAnyway: "Toch verwijderen",
|
|
43
|
-
noVisibleChanges: "Geen zichtbaar veld verschilt; het record is opnieuw bewaard met dezelfde waarden.",
|
|
44
|
-
bulkConfirmTitle: (count, plural) => count === 1 ? "Eén record verwijderen?" : `${count} ${plural.toLowerCase()} verwijderen?`,
|
|
45
|
-
bulkConfirmDescription: "Dit kan niet ongedaan worden gemaakt. Elk record wordt alleen verwijderd als het niet is gewijzigd sinds de lijst laadde; wat wel is gewijzigd, wordt gemeld en behouden.",
|
|
46
|
-
deleteCount: (count) => `${count} verwijderen`,
|
|
47
|
-
deleting: "Verwijderen",
|
|
48
|
-
progress: (done, total) => `${done} van ${total} klaar`,
|
|
49
|
-
working: "Bezig",
|
|
50
|
-
deleted: (count) => `${count} verwijderd`,
|
|
51
|
-
deletedOf: (count, total) => `${count} van ${total} verwijderd`,
|
|
52
|
-
kept: (count) => `${count} kon${count === 1 ? "" : "den"} niet worden verwijderd en ${count === 1 ? "is" : "zijn"} behouden.`,
|
|
53
|
-
done: "Klaar",
|
|
54
|
-
deletedToast: (title) => `${title} verwijderd`,
|
|
55
|
-
undo: "Ongedaan maken",
|
|
56
|
-
restored: (title) => `${title} teruggezet`,
|
|
57
|
-
alreadyBack: (title) => `${title} is al terug`,
|
|
58
|
-
couldNotRestore: (title) => `Kon ${title} niet terugzetten`,
|
|
59
|
-
couldNotDelete: (title) => `Kon ${title} niet verwijderen`,
|
|
60
|
-
changedSinceLoaded: "Gewijzigd sinds de lijst laadde, dus behouden.",
|
|
61
|
-
stillPointAt: (plural, _noun) => `${plural} verwijzen hier nog naar.`,
|
|
62
|
-
show: (plural) => `${plural} tonen`
|
|
63
|
-
}
|
|
64
|
-
});
|
|
3
|
+
const text = messages("app/delete");
|
|
65
4
|
//#endregion
|
|
66
5
|
export { text };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useClient } from "../../data/api-provider.js";
|
|
2
2
|
import { useAdminMeta } from "../meta-gate.js";
|
|
3
|
-
import { useToast } from "../../toasts/toast-provider.js";
|
|
4
3
|
import { humanize } from "../../live/naming.js";
|
|
5
4
|
import { useAppAddress } from "../use-app-address.js";
|
|
5
|
+
import { useToast } from "../../toasts/toast-provider.js";
|
|
6
6
|
import { text } from "./messages.js";
|
|
7
7
|
import { blockedDelete } from "./blocked-delete.js";
|
|
8
8
|
import { BulkDeleteDialog, ConfirmDeleteDialog, ConflictDialog } from "./dialogs.js";
|
|
@@ -63,7 +63,7 @@ const useDeleteFlow = ({ model, view, onDeleted, onReview, restore }) => {
|
|
|
63
63
|
onDeleted?.(target);
|
|
64
64
|
toast.show({
|
|
65
65
|
state: "success",
|
|
66
|
-
title: text("deletedToast", target.title),
|
|
66
|
+
title: text("deletedToast", { title: target.title }),
|
|
67
67
|
...model.softDelete && restore && { action: {
|
|
68
68
|
label: text("undo"),
|
|
69
69
|
onClick: () => {
|
|
@@ -71,14 +71,14 @@ const useDeleteFlow = ({ model, view, onDeleted, onReview, restore }) => {
|
|
|
71
71
|
refresh();
|
|
72
72
|
toast.show({
|
|
73
73
|
state: "success",
|
|
74
|
-
title: text("restored", target.title)
|
|
74
|
+
title: text("restored", { title: target.title })
|
|
75
75
|
});
|
|
76
76
|
}, (error) => {
|
|
77
77
|
if (!isApiError(error)) throw error;
|
|
78
78
|
refresh();
|
|
79
79
|
toast.show({
|
|
80
80
|
state: error.status === 409 ? "success" : "error",
|
|
81
|
-
title: error.status === 409 ? text("alreadyBack", target.title) : text("couldNotRestore", target.title),
|
|
81
|
+
title: error.status === 409 ? text("alreadyBack", { title: target.title }) : text("couldNotRestore", { title: target.title }),
|
|
82
82
|
description: error.status === 409 ? void 0 : error.message
|
|
83
83
|
});
|
|
84
84
|
});
|
|
@@ -103,7 +103,7 @@ const useDeleteFlow = ({ model, view, onDeleted, onReview, restore }) => {
|
|
|
103
103
|
const why = blocked(error, target);
|
|
104
104
|
toast.show({
|
|
105
105
|
state: "error",
|
|
106
|
-
title: text("couldNotDelete", target.title),
|
|
106
|
+
title: text("couldNotDelete", { title: target.title }),
|
|
107
107
|
description: why?.text ?? error.message,
|
|
108
108
|
...why?.link && { action: {
|
|
109
109
|
label: why.link.label,
|
|
@@ -182,6 +182,7 @@ const useDeleteFlow = ({ model, view, onDeleted, onReview, restore }) => {
|
|
|
182
182
|
flow.kind === "bulk-confirm" && /* @__PURE__ */ jsx(BulkDeleteDialog, {
|
|
183
183
|
stage: "confirm",
|
|
184
184
|
count: flow.targets.length,
|
|
185
|
+
noun,
|
|
185
186
|
plural,
|
|
186
187
|
onCancel: close,
|
|
187
188
|
onConfirm: () => void runBulk(flow.targets)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { formatTag } from "../../locale/active-locale.js";
|
|
2
2
|
import { cn } from "../../lib/cn.js";
|
|
3
3
|
import { Button } from "../../primitives/button.js";
|
|
4
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
5
4
|
import { humanize } from "../../live/naming.js";
|
|
6
5
|
import { text } from "./messages.js";
|
|
7
6
|
import { boardCard } from "./board-columns.js";
|
|
7
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
8
8
|
import { ErrorBanner } from "../error-banner.js";
|
|
9
9
|
import { rowAllows } from "../permissions.js";
|
|
10
10
|
import { ValueBadge } from "../value-badge.js";
|
|
@@ -80,7 +80,7 @@ const BoardColumnView = ({ model, view, display, column, fields, filter, orderBy
|
|
|
80
80
|
error: list.error
|
|
81
81
|
}) : rows.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
82
82
|
className: "px-1 py-4 text-center text-xs text-muted-foreground",
|
|
83
|
-
children: text("noPlural", plural)
|
|
83
|
+
children: text("noPlural", { plural })
|
|
84
84
|
}) : /* @__PURE__ */ jsx(SortableContext, {
|
|
85
85
|
id: columnId(column.value),
|
|
86
86
|
items: rows.map((row) => row.key),
|
|
@@ -19,7 +19,7 @@ const boardColumns = (model, view, display) => {
|
|
|
19
19
|
if (!field.nullable) return values;
|
|
20
20
|
return [...values, {
|
|
21
21
|
value: null,
|
|
22
|
-
label: text("noValue", hints?.label ?? humanize(display.by))
|
|
22
|
+
label: text("noValue", { label: hints?.label ?? humanize(display.by) })
|
|
23
23
|
}];
|
|
24
24
|
};
|
|
25
25
|
/** The field a board orders each column by: the resource's `.position()`, when its records are ordered as one rather than within a parent. */
|