@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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useClient, useResourceClient } from "../../data/api-provider.js";
|
|
2
2
|
import { useAdminMeta, usePermissions } from "../meta-gate.js";
|
|
3
|
-
import { useToast } from "../../toasts/toast-provider.js";
|
|
4
3
|
import { useAppAddress } from "../use-app-address.js";
|
|
5
4
|
import { useProjectUi } from "./project-ui.js";
|
|
6
5
|
import { text } from "./messages.js";
|
|
6
|
+
import { useToast } from "../../toasts/toast-provider.js";
|
|
7
7
|
import { can } from "../permissions.js";
|
|
8
8
|
import { actionApplies } from "./action-when.js";
|
|
9
9
|
import { actionFor, linkTarget, openLink } from "./action-href.js";
|
|
@@ -40,9 +40,12 @@ const useActionRunner = (resource, scope, afterRun) => {
|
|
|
40
40
|
if ((kind === "update" || kind === "ai") && (!can(permissions, "update") || on?.permissions?.update === false)) return text("cannotChange");
|
|
41
41
|
if (action.run?.kind === "ai" && on?.permissions?.fields?.[action.run.writes] === "read") return text("cannotChange");
|
|
42
42
|
if (kind === "delete" && (!can(permissions, "delete") || on?.permissions?.delete === false)) return text("cannotDelete");
|
|
43
|
-
if (!action.run && !handlers?.[action.name]) return text("noHandler", action.name);
|
|
43
|
+
if (!action.run && !handlers?.[action.name]) return text("noHandler", { name: action.name });
|
|
44
44
|
const custom = action.inputs?.find((input) => input.kind === "custom" && !components?.[input.component ?? ""]);
|
|
45
|
-
if (custom) return text("noInputComponent",
|
|
45
|
+
if (custom) return text("noInputComponent", {
|
|
46
|
+
component: String(custom.component),
|
|
47
|
+
input: custom.name
|
|
48
|
+
});
|
|
46
49
|
};
|
|
47
50
|
const blocked = (action) => blockedOn(action, scope);
|
|
48
51
|
const execute = async (action, on, values) => {
|
|
@@ -71,7 +74,7 @@ const useActionRunner = (resource, scope, afterRun) => {
|
|
|
71
74
|
await refresh(resource);
|
|
72
75
|
toast.show({
|
|
73
76
|
state: "success",
|
|
74
|
-
title: text("done", action.label)
|
|
77
|
+
title: text("done", { label: action.label })
|
|
75
78
|
});
|
|
76
79
|
afterRun?.(action);
|
|
77
80
|
};
|
|
@@ -80,7 +83,7 @@ const useActionRunner = (resource, scope, afterRun) => {
|
|
|
80
83
|
setRunning(action.name);
|
|
81
84
|
await perform(action, on).catch((error) => toast.show({
|
|
82
85
|
state: "error",
|
|
83
|
-
title: text("failed", action.label),
|
|
86
|
+
title: text("failed", { label: action.label }),
|
|
84
87
|
description: message(error)
|
|
85
88
|
}));
|
|
86
89
|
setRunning(void 0);
|
|
@@ -97,7 +100,12 @@ const useActionRunner = (resource, scope, afterRun) => {
|
|
|
97
100
|
const outcome = await runEach(records, (on) => appliesOn(action, on), (on) => execute(action, on));
|
|
98
101
|
setRunning(void 0);
|
|
99
102
|
await refresh(resource);
|
|
100
|
-
const title = text("doneOn",
|
|
103
|
+
const title = text("doneOn", {
|
|
104
|
+
label: action.label,
|
|
105
|
+
done: outcome.done,
|
|
106
|
+
skipped: outcome.skipped + skipped,
|
|
107
|
+
failed: outcome.failed
|
|
108
|
+
});
|
|
101
109
|
toast.show(outcome.failed > 0 ? {
|
|
102
110
|
state: "error",
|
|
103
111
|
title,
|
|
@@ -125,7 +133,7 @@ const useRunAction = (resource, name, scope) => {
|
|
|
125
133
|
const action = runner.actions.find((entry) => entry.name === name);
|
|
126
134
|
return {
|
|
127
135
|
action,
|
|
128
|
-
blocked: action ? runner.blocked(action) : text("noAction", name),
|
|
136
|
+
blocked: action ? runner.blocked(action) : text("noAction", { name }),
|
|
129
137
|
running: runner.running === name,
|
|
130
138
|
run: () => action ? runner.run(action) : Promise.resolve(),
|
|
131
139
|
submit: (values) => action ? runner.submit(action, values) : Promise.resolve()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "../../lib/cn.js";
|
|
2
|
-
import { Input } from "../../primitives/input.js";
|
|
3
2
|
import { text } from "../messages.js";
|
|
3
|
+
import { Input } from "../../primitives/input.js";
|
|
4
4
|
import { useEffect, useId, useRef, useState } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/app/picker/picker-combobox.tsx
|
|
@@ -9,9 +9,15 @@ import { encodeKey } from "@protobase/schema/internal";
|
|
|
9
9
|
const dependencyRule = (model, bounds, title) => ({ order, index }) => {
|
|
10
10
|
const at = (key) => order.findIndex((entry) => encodeKey(recordKey(model, entry)) === key);
|
|
11
11
|
const above = bounds.after.find((bound) => at(bound.key) > index);
|
|
12
|
-
if (above) return text("dependsOn",
|
|
12
|
+
if (above) return text("dependsOn", {
|
|
13
|
+
record: title,
|
|
14
|
+
other: above.title
|
|
15
|
+
});
|
|
13
16
|
const below = bounds.before.find((bound) => at(bound.key) !== -1 && at(bound.key) < index);
|
|
14
|
-
return below ? text("dependsOn",
|
|
17
|
+
return below ? text("dependsOn", {
|
|
18
|
+
record: below.title,
|
|
19
|
+
other: title
|
|
20
|
+
}) : void 0;
|
|
15
21
|
};
|
|
16
22
|
//#endregion
|
|
17
23
|
export { dependencyRule };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/rank-after/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: { dependsOn: (record, other) => `${record} depends on ${other}.` },
|
|
5
|
-
nl: { dependsOn: (record, other) => `${record} hangt af van ${other}.` }
|
|
6
|
-
});
|
|
3
|
+
const text = messages("app/rank-after");
|
|
7
4
|
//#endregion
|
|
8
5
|
export { text };
|
|
@@ -23,7 +23,13 @@ const rankedPlace = ({ model, rank, rows, row, index, bounds, title }) => {
|
|
|
23
23
|
const mine = Number(ranked.get(encodeKey(recordKey(model, row.record))));
|
|
24
24
|
const above = bounds.after.filter((bound) => isRank(rankOf(bound)) && Number(rankOf(bound)) >= mine);
|
|
25
25
|
const below = bounds.before.find((bound) => isRank(rankOf(bound)) && Number(rankOf(bound)) <= mine);
|
|
26
|
-
const refusal = below ? text("dependsOn",
|
|
26
|
+
const refusal = below ? text("dependsOn", {
|
|
27
|
+
record: below.title,
|
|
28
|
+
other: title
|
|
29
|
+
}) : above[0] && text("dependsOn", {
|
|
30
|
+
record: title,
|
|
31
|
+
other: above[0].title
|
|
32
|
+
});
|
|
27
33
|
if (!refusal) return {
|
|
28
34
|
place: { index: at },
|
|
29
35
|
...reason !== void 0 && { reason }
|
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/record-chart/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
range: "Range",
|
|
6
|
-
hour: "Hour",
|
|
7
|
-
day: "Day",
|
|
8
|
-
week: "Week",
|
|
9
|
-
measure: "Per bucket",
|
|
10
|
-
average: "Average",
|
|
11
|
-
maximum: "Maximum",
|
|
12
|
-
noSamples: "No samples in this range.",
|
|
13
|
-
couldNotLoad: "Could not load the chart."
|
|
14
|
-
},
|
|
15
|
-
nl: {
|
|
16
|
-
range: "Periode",
|
|
17
|
-
hour: "Uur",
|
|
18
|
-
day: "Dag",
|
|
19
|
-
week: "Week",
|
|
20
|
-
measure: "Per interval",
|
|
21
|
-
average: "Gemiddelde",
|
|
22
|
-
maximum: "Maximum",
|
|
23
|
-
noSamples: "Geen metingen in deze periode.",
|
|
24
|
-
couldNotLoad: "Kon de grafiek niet laden."
|
|
25
|
-
}
|
|
26
|
-
});
|
|
3
|
+
const text = messages("app/record-chart");
|
|
27
4
|
//#endregion
|
|
28
5
|
export { text };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useAdminMeta } from "../meta-gate.js";
|
|
2
|
-
import { viewerZone } from "../../format/zone.js";
|
|
3
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
4
2
|
import { Section } from "../../record-view/section.js";
|
|
3
|
+
import { viewerZone } from "../../format/zone.js";
|
|
5
4
|
import { humanize } from "../../live/naming.js";
|
|
5
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
6
6
|
import { Segmented } from "../../primitives/segmented.js";
|
|
7
7
|
import { useAggregates } from "../../data/use-aggregates.js";
|
|
8
8
|
import { PeriodChart } from "../charts/period-chart.js";
|
|
@@ -20,7 +20,10 @@ const LineCell = ({ field, hints, label, lineNumber, resource, value, stored, re
|
|
|
20
20
|
/* @__PURE__ */ jsx("label", {
|
|
21
21
|
htmlFor: id,
|
|
22
22
|
className: "sr-only",
|
|
23
|
-
children: text("lineField",
|
|
23
|
+
children: text("lineField", {
|
|
24
|
+
label,
|
|
25
|
+
place: lineNumber
|
|
26
|
+
})
|
|
24
27
|
}),
|
|
25
28
|
/* @__PURE__ */ jsx(FieldEditor, {
|
|
26
29
|
field,
|
package/dist/app/record-lines.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useAdminMeta, usePermissions } from "./meta-gate.js";
|
|
2
|
-
import { lineTableMinWidth } from "../inline-child-table/columns.js";
|
|
3
|
-
import { InlineChildTable } from "../inline-child-table/inline-child-table.js";
|
|
4
|
-
import { formatInt } from "../format/number.js";
|
|
5
2
|
import { Section } from "../record-view/section.js";
|
|
3
|
+
import { formatInt } from "../format/number.js";
|
|
6
4
|
import { humanize } from "../live/naming.js";
|
|
7
5
|
import { recordTitle } from "../live/model-helpers.js";
|
|
8
6
|
import { isChosen, keyValue } from "./create/create-values.js";
|
|
9
7
|
import { can, rowAllows } from "./permissions.js";
|
|
10
8
|
import { text } from "./record-messages.js";
|
|
9
|
+
import { lineTableMinWidth } from "../inline-child-table/columns.js";
|
|
10
|
+
import { InlineChildTable } from "../inline-child-table/inline-child-table.js";
|
|
11
11
|
import { LineCell } from "./record-lines-cell.js";
|
|
12
12
|
import "./use-lines.js";
|
|
13
13
|
import { useState } from "react";
|
|
@@ -93,7 +93,7 @@ const RecordLines = ({ lines, editable, saving }) => {
|
|
|
93
93
|
help: text("linesHelp"),
|
|
94
94
|
children: [!data.complete && /* @__PURE__ */ jsx("p", {
|
|
95
95
|
className: "mb-2 text-muted-foreground",
|
|
96
|
-
children: text("tooManyLines", formatInt(1e3))
|
|
96
|
+
children: text("tooManyLines", { limit: formatInt(1e3) })
|
|
97
97
|
}), /* @__PURE__ */ jsx("div", {
|
|
98
98
|
className: "-mx-4 overflow-x-auto px-4 [-webkit-overflow-scrolling:touch] md:mx-0 md:px-0",
|
|
99
99
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -101,7 +101,7 @@ const RecordLines = ({ lines, editable, saving }) => {
|
|
|
101
101
|
children: /* @__PURE__ */ jsx(InlineChildTable, {
|
|
102
102
|
lines: draft.shown,
|
|
103
103
|
columns: tableColumns,
|
|
104
|
-
lineName: (line) => recordTitle(model, view, line.stored ?? {}, "") || text("lineNumber", placeOf(line)),
|
|
104
|
+
lineName: (line) => recordTitle(model, view, line.stored ?? {}, "") || text("lineNumber", { place: placeOf(line) }),
|
|
105
105
|
onReorder: (next) => draft.setOrder(next.map((line) => line.id)),
|
|
106
106
|
reorderable: canUpdate,
|
|
107
107
|
onAdd: canCreate ? () => void draft.add() : void 0,
|
|
@@ -1,86 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../locale/messages.js";
|
|
2
2
|
//#region src/app/record-messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
details: "Details",
|
|
6
|
-
history: "History",
|
|
7
|
-
comments: "Comments",
|
|
8
|
-
summary: "Summary",
|
|
9
|
-
loading: "Loading",
|
|
10
|
-
fetching: "Fetching the record.",
|
|
11
|
-
noRecord: "This record does not exist, or you cannot see it.",
|
|
12
|
-
openingElsewhere: "Opening the record in its organization.",
|
|
13
|
-
couldNotLoad: "Could not load the record",
|
|
14
|
-
someoneElse: "Someone else",
|
|
15
|
-
justNow: "just now",
|
|
16
|
-
saved: "Saved",
|
|
17
|
-
save: "Save",
|
|
18
|
-
cancel: "Cancel",
|
|
19
|
-
unsavedChanges: "Unsaved changes",
|
|
20
|
-
notSaved: "Not saved",
|
|
21
|
-
linesChanged: "The lines were changed by someone else",
|
|
22
|
-
linesReloaded: "The lines were reloaded. Your new order is kept: Save again to apply it.",
|
|
23
|
-
unsavedKept: "You have unsaved changes to this record.",
|
|
24
|
-
continueEditing: "Continue editing",
|
|
25
|
-
discard: "Discard",
|
|
26
|
-
unsavedRestored: "Your unsaved changes were restored.",
|
|
27
|
-
keep: "Keep",
|
|
28
|
-
savingSubject: (subject) => `Saving ${subject}...`,
|
|
29
|
-
subjectSaved: (subject) => `${subject} saved`,
|
|
30
|
-
changedBySomeoneElse: "Changed by someone else",
|
|
31
|
-
couldNotSave: "Could not save",
|
|
32
|
-
recordActions: "Record actions",
|
|
33
|
-
edit: "Edit",
|
|
34
|
-
delete: "Delete",
|
|
35
|
-
nothingYet: "Nothing here yet.",
|
|
36
|
-
couldNotLoadRelated: "Could not load",
|
|
37
|
-
relatedRecords: "Related records",
|
|
38
|
-
lines: "Lines",
|
|
39
|
-
linesHelp: "What the document bills for. Edit a line in place, add one, or drag the handle to change the order; Save applies it all.",
|
|
40
|
-
lineNumber: (place) => `Line ${place}`,
|
|
41
|
-
lineField: (label, place) => `${label}, line ${place}`,
|
|
42
|
-
tooManyLines: (limit) => `This record has more than ${limit} lines, so they show here read-only.`
|
|
43
|
-
},
|
|
44
|
-
nl: {
|
|
45
|
-
details: "Details",
|
|
46
|
-
history: "Geschiedenis",
|
|
47
|
-
comments: "Opmerkingen",
|
|
48
|
-
summary: "Overzicht",
|
|
49
|
-
loading: "Laden",
|
|
50
|
-
fetching: "Het record wordt opgehaald.",
|
|
51
|
-
noRecord: "Dit record bestaat niet, of je mag het niet zien.",
|
|
52
|
-
openingElsewhere: "Het record wordt in zijn organisatie geopend.",
|
|
53
|
-
couldNotLoad: "Kon het record niet laden",
|
|
54
|
-
someoneElse: "Iemand anders",
|
|
55
|
-
justNow: "zojuist",
|
|
56
|
-
saved: "Bewaard",
|
|
57
|
-
save: "Bewaren",
|
|
58
|
-
cancel: "Annuleren",
|
|
59
|
-
unsavedChanges: "Niet bewaarde wijzigingen",
|
|
60
|
-
notSaved: "Niet bewaard",
|
|
61
|
-
linesChanged: "De regels zijn door iemand anders gewijzigd",
|
|
62
|
-
linesReloaded: "De regels zijn opnieuw geladen. Je nieuwe volgorde is behouden: bewaar opnieuw om hem toe te passen.",
|
|
63
|
-
unsavedKept: "Je hebt niet bewaarde wijzigingen in dit record.",
|
|
64
|
-
continueEditing: "Verder bewerken",
|
|
65
|
-
discard: "Weggooien",
|
|
66
|
-
unsavedRestored: "Je niet bewaarde wijzigingen zijn teruggezet.",
|
|
67
|
-
keep: "Houden",
|
|
68
|
-
savingSubject: (subject) => `${subject} bewaren...`,
|
|
69
|
-
subjectSaved: (subject) => `${subject} bewaard`,
|
|
70
|
-
changedBySomeoneElse: "Gewijzigd door iemand anders",
|
|
71
|
-
couldNotSave: "Kon niet bewaren",
|
|
72
|
-
recordActions: "Recordacties",
|
|
73
|
-
edit: "Bewerken",
|
|
74
|
-
delete: "Verwijderen",
|
|
75
|
-
nothingYet: "Hier staat nog niets.",
|
|
76
|
-
couldNotLoadRelated: "Kon niet laden",
|
|
77
|
-
relatedRecords: "Gerelateerde records",
|
|
78
|
-
lines: "Regels",
|
|
79
|
-
linesHelp: "Waar het document voor factureert. Wijzig een regel ter plekke, voeg er een toe, of sleep de greep om de volgorde te wijzigen; Bewaren past alles toe.",
|
|
80
|
-
lineNumber: (place) => `Regel ${place}`,
|
|
81
|
-
lineField: (label, place) => `${label}, regel ${place}`,
|
|
82
|
-
tooManyLines: (limit) => `Dit record heeft meer dan ${limit} regels, dus ze staan hier alleen ter inzage.`
|
|
83
|
-
}
|
|
84
|
-
});
|
|
3
|
+
const text = messages("app/record");
|
|
85
4
|
//#endregion
|
|
86
5
|
export { text };
|
package/dist/app/record-page.js
CHANGED
|
@@ -5,26 +5,26 @@ import { useClient } from "../data/api-provider.js";
|
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
6
|
import { Notice, useAdminMeta, usePermissions } from "./meta-gate.js";
|
|
7
7
|
import { Button, buttonClass } from "../primitives/button.js";
|
|
8
|
-
import { Skeleton } from "../primitives/skeleton.js";
|
|
9
|
-
import { inApp } from "../app-shell/breadcrumb.js";
|
|
10
|
-
import { Field } from "../record-view/field.js";
|
|
11
|
-
import { Section } from "../record-view/section.js";
|
|
12
|
-
import { MetadataCard } from "../record-view/record-sidebar.js";
|
|
13
8
|
import { RecordHeader } from "../record-view/record-header.js";
|
|
9
|
+
import { Section } from "../record-view/section.js";
|
|
14
10
|
import { humanize } from "../live/naming.js";
|
|
15
11
|
import { markdownExcerpt } from "../markdown/markdown-excerpt.js";
|
|
16
12
|
import { isMarkdown } from "../markdown/markdown-hint.js";
|
|
17
13
|
import { contactFormat } from "../live/contact-links.js";
|
|
18
|
-
import {
|
|
14
|
+
import { valueTone } from "../live/value-color.js";
|
|
19
15
|
import { displayValue, valueTitle } from "../live/display-value.js";
|
|
20
16
|
import { filledFields } from "./filled-fields.js";
|
|
17
|
+
import { Skeleton } from "../primitives/skeleton.js";
|
|
18
|
+
import { inApp } from "../app-shell/breadcrumb.js";
|
|
21
19
|
import { text } from "./messages.js";
|
|
22
20
|
import { useNavigationGuard } from "./router.js";
|
|
23
21
|
import { AppLink, useAppAddress } from "./use-app-address.js";
|
|
24
22
|
import { GroupSection } from "../record-view/group-section.js";
|
|
25
23
|
import { RecordTabs } from "../record-view/record-tabs.js";
|
|
24
|
+
import { Field } from "../record-view/field.js";
|
|
26
25
|
import { SpecTable } from "../record-view/spec-table.js";
|
|
27
26
|
import { KeyFacts } from "../record-view/key-facts.js";
|
|
27
|
+
import { MetadataCard } from "../record-view/record-sidebar.js";
|
|
28
28
|
import { fromDraft, isRequiredOnEdit } from "../live/field-values.js";
|
|
29
29
|
import { fieldHelp, helpShown, recordShown, whenShown } from "./record-mode/record-mode.js";
|
|
30
30
|
import { isChosen, keyValue } from "./create/create-values.js";
|
|
@@ -107,7 +107,7 @@ const RecordPage = ({ resource, recordKey }) => {
|
|
|
107
107
|
const record = useOpenedRecord(resource, recordKey);
|
|
108
108
|
if (!model) return /* @__PURE__ */ jsx(Notice, {
|
|
109
109
|
title: text("notFound"),
|
|
110
|
-
children: text("noResource", resource)
|
|
110
|
+
children: text("noResource", { name: resource })
|
|
111
111
|
});
|
|
112
112
|
if (record.isPending) return /* @__PURE__ */ jsx(Notice, {
|
|
113
113
|
title: text$1("loading"),
|
|
@@ -484,7 +484,7 @@ const LoadedRecord = ({ model, recordKey, stored, preview }) => {
|
|
|
484
484
|
title,
|
|
485
485
|
status: status ? {
|
|
486
486
|
label: enumLabel(status, hint("status")?.valueLabels),
|
|
487
|
-
tone:
|
|
487
|
+
tone: valueTone(hint("status")?.valueColors, status)
|
|
488
488
|
} : void 0
|
|
489
489
|
}),
|
|
490
490
|
editor.message && /* @__PURE__ */ jsx("div", {
|
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/record-row/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
couldNotLoad: "Could not load",
|
|
6
|
-
noneMatch: (plural) => `No ${plural} match.`,
|
|
7
|
-
viewAll: "View all",
|
|
8
|
-
new: "New",
|
|
9
|
-
previous: (label) => `Previous ${label}`,
|
|
10
|
-
next: (label) => `Next ${label}`,
|
|
11
|
-
couldNotLoadYour: (plural) => `Could not load your ${plural}`,
|
|
12
|
-
noneYet: (plural) => `No ${plural} yet.`
|
|
13
|
-
},
|
|
14
|
-
nl: {
|
|
15
|
-
couldNotLoad: "Kon niet laden",
|
|
16
|
-
noneMatch: (plural) => `Geen ${plural} gevonden.`,
|
|
17
|
-
viewAll: "Alles bekijken",
|
|
18
|
-
new: "Nieuw",
|
|
19
|
-
previous: (label) => `Terug in ${label}`,
|
|
20
|
-
next: (label) => `Verder in ${label}`,
|
|
21
|
-
couldNotLoadYour: (plural) => `Kon je ${plural} niet laden`,
|
|
22
|
-
noneYet: (plural) => `Nog geen ${plural}.`
|
|
23
|
-
}
|
|
24
|
-
});
|
|
3
|
+
const text = messages("app/record-row");
|
|
25
4
|
//#endregion
|
|
26
5
|
export { text };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { formatTag } from "../../locale/active-locale.js";
|
|
2
2
|
import { useAdminMeta } from "../meta-gate.js";
|
|
3
3
|
import { useIsXs } from "../../lib/use-media-query.js";
|
|
4
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
5
4
|
import { humanize } from "../../live/naming.js";
|
|
6
5
|
import { displaysOf, loadedFields } from "../displays/list-displays.js";
|
|
7
6
|
import { defaultOrderBy } from "../list-order.js";
|
|
7
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
8
8
|
import { AppLink } from "../use-app-address.js";
|
|
9
9
|
import { ErrorBanner } from "../error-banner.js";
|
|
10
10
|
import { viewAllAddress } from "../embedded-list/embedded-display.js";
|
|
@@ -82,7 +82,7 @@ const RecordRowBody = ({ model, view, filter, sort = "", display: named, limit,
|
|
|
82
82
|
error: rows.error
|
|
83
83
|
}) : !source || source.total === 0 ? /* @__PURE__ */ jsx("p", {
|
|
84
84
|
className: "text-muted-foreground",
|
|
85
|
-
children: empty ?? text("noneMatch", plural.toLowerCase())
|
|
85
|
+
children: empty ?? text("noneMatch", { plural: plural.toLowerCase() })
|
|
86
86
|
}) : /* @__PURE__ */ jsx(RecordRow, {
|
|
87
87
|
model,
|
|
88
88
|
view,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
2
1
|
import { displayRow } from "../displays/list-displays.js";
|
|
2
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
3
3
|
import { usePagedRows } from "../../data-grid/use-paged-rows.js";
|
|
4
4
|
import { RecordCard } from "../displays/record-card.js";
|
|
5
5
|
import { rowOffset } from "./row-window.js";
|
|
@@ -70,7 +70,7 @@ const RecordRow = ({ model, view, display, source, label, isNew }) => {
|
|
|
70
70
|
}),
|
|
71
71
|
scroll.back && /* @__PURE__ */ jsx("button", {
|
|
72
72
|
type: "button",
|
|
73
|
-
"aria-label": text("previous", label.toLowerCase()),
|
|
73
|
+
"aria-label": text("previous", { label: label.toLowerCase() }),
|
|
74
74
|
onClick: () => scroll.page(-1),
|
|
75
75
|
className: `${arrowClass} -left-3`,
|
|
76
76
|
children: /* @__PURE__ */ jsx(ChevronLeft, {
|
|
@@ -80,7 +80,7 @@ const RecordRow = ({ model, view, display, source, label, isNew }) => {
|
|
|
80
80
|
}),
|
|
81
81
|
scroll.on && /* @__PURE__ */ jsx("button", {
|
|
82
82
|
type: "button",
|
|
83
|
-
"aria-label": text("next", label.toLowerCase()),
|
|
83
|
+
"aria-label": text("next", { label: label.toLowerCase() }),
|
|
84
84
|
onClick: () => scroll.page(1),
|
|
85
85
|
className: `${arrowClass} -right-3`,
|
|
86
86
|
children: /* @__PURE__ */ jsx(ChevronRight, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAdminMeta } from "../meta-gate.js";
|
|
2
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
3
2
|
import { humanize } from "../../live/naming.js";
|
|
4
3
|
import { listedResource } from "../current-address.js";
|
|
4
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
5
5
|
import { ErrorBanner } from "../error-banner.js";
|
|
6
6
|
import { savedScope } from "../saved/saved-records.js";
|
|
7
7
|
import { useSavedRecords } from "../saved/use-saved-records.js";
|
|
@@ -20,14 +20,14 @@ const SavedRecordRow = ({ model, view, empty, ...props }) => {
|
|
|
20
20
|
const plural = (view.names?.plural ?? humanize(model.name)).toLowerCase();
|
|
21
21
|
if (!listed.listOf) return null;
|
|
22
22
|
if (saved.error) return /* @__PURE__ */ jsx(ErrorBanner, {
|
|
23
|
-
title: text("couldNotLoadYour", plural),
|
|
23
|
+
title: text("couldNotLoadYour", { plural }),
|
|
24
24
|
error: saved.error
|
|
25
25
|
});
|
|
26
26
|
if (!saved.data) return /* @__PURE__ */ jsx(Skeleton, { className: "h-24" });
|
|
27
27
|
const scope = savedScope(listed.model, saved.data);
|
|
28
28
|
if (!scope) return /* @__PURE__ */ jsx("p", {
|
|
29
29
|
className: "text-muted-foreground",
|
|
30
|
-
children: empty ?? text("noneYet", plural)
|
|
30
|
+
children: empty ?? text("noneYet", { plural })
|
|
31
31
|
});
|
|
32
32
|
return /* @__PURE__ */ jsx(RecordRowBody, {
|
|
33
33
|
...props,
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/related-cards/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
showMore: "Show more",
|
|
6
|
-
showLess: "Show less",
|
|
7
|
-
couldNotLoad: "Could not load",
|
|
8
|
-
nothingYet: "Nothing here yet."
|
|
9
|
-
},
|
|
10
|
-
nl: {
|
|
11
|
-
showMore: "Meer tonen",
|
|
12
|
-
showLess: "Minder tonen",
|
|
13
|
-
couldNotLoad: "Kon niet laden",
|
|
14
|
-
nothingYet: "Hier staat nog niets."
|
|
15
|
-
}
|
|
16
|
-
});
|
|
3
|
+
const text = messages("app/related-cards");
|
|
17
4
|
//#endregion
|
|
18
5
|
export { text };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAdminMeta } from "../meta-gate.js";
|
|
2
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
3
2
|
import { recordKey } from "../../live/model-helpers.js";
|
|
3
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
4
4
|
import { AppLink } from "../use-app-address.js";
|
|
5
5
|
import { useRecordTitle } from "../titles/record-titles.js";
|
|
6
6
|
import { RecordScope } from "../pages/record-scope.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useIsXs } from "../../lib/use-media-query.js";
|
|
2
|
-
import { Skeleton } from "../../primitives/skeleton.js";
|
|
3
2
|
import { humanize } from "../../live/naming.js";
|
|
4
3
|
import { defaultOrderBy } from "../list-order.js";
|
|
4
|
+
import { Skeleton } from "../../primitives/skeleton.js";
|
|
5
5
|
import { AppLink } from "../use-app-address.js";
|
|
6
6
|
import { ErrorBanner } from "../error-banner.js";
|
|
7
7
|
import { scopeOf, useCount, useListPage } from "../pages/use-layout-data.js";
|
|
@@ -5,7 +5,7 @@ import { text } from "./messages.js";
|
|
|
5
5
|
* of the status's values, such as "4 tasks: 1 To do, 3 Done". "No tasks" without any.
|
|
6
6
|
*/
|
|
7
7
|
const dotsSummary = (statuses, { values, label, singular, plural }) => {
|
|
8
|
-
if (statuses.length === 0) return text("none", plural);
|
|
8
|
+
if (statuses.length === 0) return text("none", { plural });
|
|
9
9
|
const counts = /* @__PURE__ */ new Map();
|
|
10
10
|
for (const status of statuses) if (status !== null && status !== void 0) counts.set(String(status), (counts.get(String(status)) ?? 0) + 1);
|
|
11
11
|
const parts = [...values, ...[...counts.keys()].filter((value) => !values.includes(value))].filter((value) => counts.has(value)).map((value) => `${counts.get(value)} ${label(value)}`);
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/related-dots/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: { none: (plural) => `No ${plural}` },
|
|
5
|
-
nl: { none: (plural) => `Geen ${plural}` }
|
|
6
|
-
});
|
|
3
|
+
const text = messages("app/related-dots");
|
|
7
4
|
//#endregion
|
|
8
5
|
export { text };
|
|
@@ -2,11 +2,10 @@ import { cn } from "../../lib/cn.js";
|
|
|
2
2
|
import { toneDots } from "../../primitives/badge.js";
|
|
3
3
|
import { humanize } from "../../live/naming.js";
|
|
4
4
|
import { recordTitleField } from "../../live/model-helpers.js";
|
|
5
|
-
import {
|
|
5
|
+
import { valueColor, valueTone } from "../../live/value-color.js";
|
|
6
6
|
import { displayValue } from "../../live/display-value.js";
|
|
7
7
|
import { displayRow } from "../displays/list-displays.js";
|
|
8
8
|
import { AppLink } from "../use-app-address.js";
|
|
9
|
-
import { valueColor } from "../../live/value-color.js";
|
|
10
9
|
import { placeCard } from "./card-place.js";
|
|
11
10
|
import { dotCard } from "./dot-card.js";
|
|
12
11
|
import { dotsSummary } from "./dots-summary.js";
|
|
@@ -153,7 +152,7 @@ const RelatedDots = ({ column, records, target, view, wrap = false, Card }) => {
|
|
|
153
152
|
children: /* @__PURE__ */ jsx("span", {
|
|
154
153
|
"aria-hidden": true,
|
|
155
154
|
style: color === void 0 ? void 0 : { backgroundColor: color },
|
|
156
|
-
className: cn(dotMark, color === void 0 && toneDots[
|
|
155
|
+
className: cn(dotMark, color === void 0 && toneDots[valueTone(hints?.valueColors, value)], shown?.key === row.key && "ring-2 ring-foreground/30")
|
|
157
156
|
})
|
|
158
157
|
}, row.key);
|
|
159
158
|
}),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { keys } from "../data/query-keys.js";
|
|
2
2
|
import { useClient } from "../data/api-provider.js";
|
|
3
3
|
import { useAdminMeta, usePermissions } from "./meta-gate.js";
|
|
4
|
-
import { Skeleton } from "../primitives/skeleton.js";
|
|
5
4
|
import { Section } from "../record-view/section.js";
|
|
6
5
|
import { listColumnNames } from "../live/columns-from-model.js";
|
|
6
|
+
import { Skeleton } from "../primitives/skeleton.js";
|
|
7
7
|
import { ErrorBanner } from "./error-banner.js";
|
|
8
8
|
import { countQuery } from "./pages/use-layout-data.js";
|
|
9
9
|
import { RelatedCards } from "./related-cards/related-cards.js";
|
|
@@ -47,7 +47,7 @@ const RelationPicker = ({ target, view, value, label, chosen = [value], several
|
|
|
47
47
|
chosen,
|
|
48
48
|
several,
|
|
49
49
|
closedText: label ?? value,
|
|
50
|
-
placeholder: text("searchPlural", (view?.names?.plural ?? humanize(target.name)).toLowerCase()),
|
|
50
|
+
placeholder: text("searchPlural", { plural: (view?.names?.plural ?? humanize(target.name)).toLowerCase() }),
|
|
51
51
|
invalid,
|
|
52
52
|
paging: {
|
|
53
53
|
more: Boolean(rows.hasNextPage),
|
|
@@ -1,58 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { messages } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/runtime/messages.ts
|
|
3
|
-
const text =
|
|
4
|
-
en: {
|
|
5
|
-
immediate: "Updates as soon as a release is out",
|
|
6
|
-
weekly: "Updates at a set time every week",
|
|
7
|
-
scheduled: "Updates at the time set for this release",
|
|
8
|
-
manual: "Updates only when asked to",
|
|
9
|
-
job: "Preparing the update",
|
|
10
|
-
build: "Building",
|
|
11
|
-
updatingNow: "Updating now",
|
|
12
|
-
started: (stage, ago) => `${stage}, started ${ago}`,
|
|
13
|
-
nextOn: (policy, when) => `${policy}: next on ${when}`,
|
|
14
|
-
succeeded: (version, when) => `Updated to ${version} on ${when}`,
|
|
15
|
-
unchanged: (version, when) => `The update to ${version} on ${when} changed nothing`,
|
|
16
|
-
failed: (version, when) => `The update to ${version} failed on ${when}`,
|
|
17
|
-
alreadyLatest: "Already on the latest version, or an update is running.",
|
|
18
|
-
onlyAdmin: "Only an admin can update the runtime.",
|
|
19
|
-
couldNotStart: "The update could not be started. Try again later.",
|
|
20
|
-
runtimeUpdate: "Runtime update",
|
|
21
|
-
close: "Close",
|
|
22
|
-
updating: "Updating…",
|
|
23
|
-
updateNow: "Update now",
|
|
24
|
-
currentVersion: "Current version",
|
|
25
|
-
latestVersion: "Latest version",
|
|
26
|
-
checkFailed: "The status could not be checked again; this is the last one read.",
|
|
27
|
-
updateAvailable: "Update available",
|
|
28
|
-
update: "Update"
|
|
29
|
-
},
|
|
30
|
-
nl: {
|
|
31
|
-
immediate: "Werkt bij zodra er een release is",
|
|
32
|
-
weekly: "Werkt elke week op een vast moment bij",
|
|
33
|
-
scheduled: "Werkt bij op het moment dat voor deze release is ingesteld",
|
|
34
|
-
manual: "Werkt alleen bij als erom wordt gevraagd",
|
|
35
|
-
job: "De update voorbereiden",
|
|
36
|
-
build: "Bouwen",
|
|
37
|
-
updatingNow: "Nu aan het bijwerken",
|
|
38
|
-
started: (stage, ago) => `${stage}, begonnen ${ago}`,
|
|
39
|
-
nextOn: (policy, when) => `${policy}: volgende op ${when}`,
|
|
40
|
-
succeeded: (version, when) => `Bijgewerkt naar ${version} op ${when}`,
|
|
41
|
-
unchanged: (version, when) => `De update naar ${version} op ${when} veranderde niets`,
|
|
42
|
-
failed: (version, when) => `De update naar ${version} mislukte op ${when}`,
|
|
43
|
-
alreadyLatest: "Al op de nieuwste versie, of er loopt een update.",
|
|
44
|
-
onlyAdmin: "Alleen een beheerder kan de runtime bijwerken.",
|
|
45
|
-
couldNotStart: "De update kon niet worden gestart. Probeer het later opnieuw.",
|
|
46
|
-
runtimeUpdate: "Runtime-update",
|
|
47
|
-
close: "Sluiten",
|
|
48
|
-
updating: "Bijwerken…",
|
|
49
|
-
updateNow: "Nu bijwerken",
|
|
50
|
-
currentVersion: "Huidige versie",
|
|
51
|
-
latestVersion: "Nieuwste versie",
|
|
52
|
-
checkFailed: "De status kon niet opnieuw worden gecontroleerd; dit is de laatst gelezen.",
|
|
53
|
-
updateAvailable: "Update beschikbaar",
|
|
54
|
-
update: "Bijwerken"
|
|
55
|
-
}
|
|
56
|
-
});
|
|
3
|
+
const text = messages("app/runtime");
|
|
57
4
|
//#endregion
|
|
58
5
|
export { text };
|