@questpie/admin 3.0.4 → 3.0.5

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.
Files changed (58) hide show
  1. package/dist/client/components/blocks/block-editor-layout.mjs +2 -2
  2. package/dist/client/components/blocks/block-library-sidebar.mjs +89 -61
  3. package/dist/client/components/media/media-grid.mjs +95 -78
  4. package/dist/client/components/primitives/select-multi.mjs +388 -368
  5. package/dist/client/components/primitives/select-single.mjs +344 -331
  6. package/dist/client/components/widgets/chart-widget.mjs +78 -62
  7. package/dist/client/components/widgets/progress-widget.mjs +39 -37
  8. package/dist/client/components/widgets/quick-actions-widget.mjs +111 -90
  9. package/dist/client/components/widgets/recent-items-widget.mjs +40 -38
  10. package/dist/client/components/widgets/table-widget.mjs +4 -3
  11. package/dist/client/components/widgets/timeline-widget.mjs +92 -74
  12. package/dist/client/components/widgets/value-widget.mjs +164 -144
  13. package/dist/client/hooks/use-server-actions.mjs +21 -16
  14. package/dist/client/preview/block-scope-context.d.mts +2 -2
  15. package/dist/client/preview/preview-banner.d.mts +2 -2
  16. package/dist/client/preview/preview-banner.mjs +75 -46
  17. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  18. package/dist/client/views/auth/auth-layout.d.mts +2 -2
  19. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  20. package/dist/client/views/auth/login-form.d.mts +2 -2
  21. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  22. package/dist/client/views/auth/setup-form.d.mts +2 -2
  23. package/dist/client/views/collection/table-view.mjs +26 -26
  24. package/dist/client/views/layout/admin-layout.mjs +151 -131
  25. package/dist/client/views/layout/admin-router.mjs +297 -180
  26. package/dist/client/views/layout/admin-sidebar.mjs +126 -116
  27. package/dist/client/views/pages/login-page.d.mts +2 -2
  28. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  29. package/dist/client/views/pages/setup-page.mjs +67 -51
  30. package/dist/server/i18n/index.mjs +13 -7
  31. package/dist/server/i18n/messages/cs.mjs +391 -1
  32. package/dist/server/i18n/messages/de.mjs +389 -1
  33. package/dist/server/i18n/messages/en.mjs +102 -0
  34. package/dist/server/i18n/messages/es.mjs +389 -1
  35. package/dist/server/i18n/messages/fr.mjs +389 -1
  36. package/dist/server/i18n/messages/pl.mjs +393 -1
  37. package/dist/server/i18n/messages/pt.mjs +386 -1
  38. package/dist/server/i18n/messages/sk.mjs +133 -1
  39. package/dist/server/modules/admin/collections/account.d.mts +50 -50
  40. package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
  41. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  42. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +41 -41
  43. package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
  44. package/dist/server/modules/admin/collections/assets.d.mts +20 -20
  45. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  46. package/dist/server/modules/admin/collections/user.d.mts +32 -32
  47. package/dist/server/modules/admin/collections/verification.d.mts +36 -36
  48. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  49. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  50. package/dist/server/modules/admin/routes/execute-action.mjs +34 -28
  51. package/dist/server/modules/admin/routes/i18n-helpers.mjs +34 -0
  52. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  53. package/dist/server/modules/admin/routes/preview.mjs +25 -17
  54. package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
  55. package/dist/server/modules/admin/routes/setup.mjs +10 -7
  56. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  57. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
  58. package/package.json +3 -3
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
 
3
+ import { useSafeI18n } from "../i18n/hooks.mjs";
3
4
  import { c } from "react/compiler-runtime";
4
5
  import "react";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -32,14 +33,22 @@ import { jsx, jsxs } from "react/jsx-runtime";
32
33
  * ```
33
34
  */
34
35
  function PreviewBanner(t0) {
35
- const $ = c(9);
36
+ const $ = c(19);
36
37
  const { isPreviewMode, className, exitPreviewUrl: t1 } = t0;
37
38
  const exitPreviewUrl = t1 === void 0 ? "/api/preview?disable=true" : t1;
38
- if (!isPreviewMode) return null;
39
+ const i18n = useSafeI18n();
39
40
  let t2;
41
+ if ($[0] !== i18n) {
42
+ t2 = (key, fallback) => i18n?.t(key) ?? fallback;
43
+ $[0] = i18n;
44
+ $[1] = t2;
45
+ } else t2 = $[1];
46
+ const t = t2;
47
+ if (!isPreviewMode) return null;
40
48
  let t3;
41
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
42
- t2 = {
49
+ let t4;
50
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
51
+ t3 = {
43
52
  position: "sticky",
44
53
  top: 0,
45
54
  left: 0,
@@ -56,35 +65,47 @@ function PreviewBanner(t0) {
56
65
  fontWeight: 500,
57
66
  borderBottom: "1px solid var(--border)"
58
67
  };
59
- t3 = {
68
+ t4 = {
60
69
  display: "flex",
61
70
  alignItems: "center",
62
71
  gap: "0.5rem"
63
72
  };
64
- $[0] = t2;
65
- $[1] = t3;
73
+ $[2] = t3;
74
+ $[3] = t4;
66
75
  } else {
67
- t2 = $[0];
68
- t3 = $[1];
76
+ t3 = $[2];
77
+ t4 = $[3];
69
78
  }
70
- let t4;
71
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
72
- t4 = /* @__PURE__ */ jsxs("div", {
73
- style: t3,
74
- children: [/* @__PURE__ */ jsxs("svg", {
75
- xmlns: "http://www.w3.org/2000/svg",
76
- width: "16",
77
- height: "16",
78
- viewBox: "0 0 256 256",
79
- fill: "currentColor",
80
- children: [/* @__PURE__ */ jsx("title", { children: "Eye icon" }), /* @__PURE__ */ jsx("path", { d: "M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z" })]
81
- }), /* @__PURE__ */ jsx("span", { children: "Preview Mode" })]
82
- });
83
- $[2] = t4;
84
- } else t4 = $[2];
85
79
  let t5;
86
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
87
- t5 = {
80
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
81
+ t5 = /* @__PURE__ */ jsxs("svg", {
82
+ xmlns: "http://www.w3.org/2000/svg",
83
+ width: "16",
84
+ height: "16",
85
+ viewBox: "0 0 256 256",
86
+ fill: "currentColor",
87
+ children: [/* @__PURE__ */ jsx("title", { children: "Eye icon" }), /* @__PURE__ */ jsx("path", { d: "M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z" })]
88
+ });
89
+ $[4] = t5;
90
+ } else t5 = $[4];
91
+ let t6;
92
+ if ($[5] !== t) {
93
+ t6 = t("preview.mode", "Preview Mode");
94
+ $[5] = t;
95
+ $[6] = t6;
96
+ } else t6 = $[6];
97
+ let t7;
98
+ if ($[7] !== t6) {
99
+ t7 = /* @__PURE__ */ jsxs("div", {
100
+ style: t4,
101
+ children: [t5, /* @__PURE__ */ jsx("span", { children: t6 })]
102
+ });
103
+ $[7] = t6;
104
+ $[8] = t7;
105
+ } else t7 = $[8];
106
+ let t8;
107
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
108
+ t8 = {
88
109
  padding: "0.25rem 0.75rem",
89
110
  backgroundColor: "rgba(255, 255, 255, 0.2)",
90
111
  border: "1px solid rgba(255, 255, 255, 0.3)",
@@ -96,32 +117,40 @@ function PreviewBanner(t0) {
96
117
  cursor: "pointer",
97
118
  transition: "background-color 0.2s"
98
119
  };
99
- $[3] = t5;
100
- } else t5 = $[3];
101
- let t6;
102
- if ($[4] !== exitPreviewUrl) {
103
- t6 = /* @__PURE__ */ jsx("a", {
120
+ $[9] = t8;
121
+ } else t8 = $[9];
122
+ let t9;
123
+ if ($[10] !== t) {
124
+ t9 = t("preview.exitPreview", "Exit Preview");
125
+ $[10] = t;
126
+ $[11] = t9;
127
+ } else t9 = $[11];
128
+ let t10;
129
+ if ($[12] !== exitPreviewUrl || $[13] !== t9) {
130
+ t10 = /* @__PURE__ */ jsx("a", {
104
131
  href: exitPreviewUrl,
105
- style: t5,
132
+ style: t8,
106
133
  onMouseEnter: _temp,
107
134
  onMouseLeave: _temp2,
108
- children: "Exit Preview"
135
+ children: t9
109
136
  });
110
- $[4] = exitPreviewUrl;
111
- $[5] = t6;
112
- } else t6 = $[5];
113
- let t7;
114
- if ($[6] !== className || $[7] !== t6) {
115
- t7 = /* @__PURE__ */ jsxs("div", {
137
+ $[12] = exitPreviewUrl;
138
+ $[13] = t9;
139
+ $[14] = t10;
140
+ } else t10 = $[14];
141
+ let t11;
142
+ if ($[15] !== className || $[16] !== t10 || $[17] !== t7) {
143
+ t11 = /* @__PURE__ */ jsxs("div", {
116
144
  className,
117
- style: t2,
118
- children: [t4, t6]
145
+ style: t3,
146
+ children: [t7, t10]
119
147
  });
120
- $[6] = className;
121
- $[7] = t6;
122
- $[8] = t7;
123
- } else t7 = $[8];
124
- return t7;
148
+ $[15] = className;
149
+ $[16] = t10;
150
+ $[17] = t7;
151
+ $[18] = t11;
152
+ } else t11 = $[18];
153
+ return t11;
125
154
  }
126
155
  function _temp2(e_0) {
127
156
  e_0.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.2)";
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/accept-invite-form.d.ts
4
4
  /**
@@ -67,6 +67,6 @@ declare function AcceptInviteForm({
67
67
  className,
68
68
  error,
69
69
  minPasswordLength
70
- }: AcceptInviteFormProps): react_jsx_runtime0.JSX.Element;
70
+ }: AcceptInviteFormProps): react_jsx_runtime2.JSX.Element;
71
71
  //#endregion
72
72
  export { AcceptInviteForm };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime1 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/client/views/auth/auth-layout.d.ts
5
5
 
@@ -45,6 +45,6 @@ type AuthLayoutProps = {
45
45
  * </AuthLayout>
46
46
  * ```
47
47
  */
48
- declare function AuthLayout(props: AuthLayoutProps): react_jsx_runtime1.JSX.Element;
48
+ declare function AuthLayout(props: AuthLayoutProps): react_jsx_runtime0.JSX.Element;
49
49
  //#endregion
50
50
  export { AuthLayout, AuthLayoutProps };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/forgot-password-form.d.ts
4
4
  /**
@@ -53,6 +53,6 @@ declare function ForgotPasswordForm({
53
53
  defaultValues,
54
54
  className,
55
55
  error
56
- }: ForgotPasswordFormProps): react_jsx_runtime3.JSX.Element;
56
+ }: ForgotPasswordFormProps): react_jsx_runtime4.JSX.Element;
57
57
  //#endregion
58
58
  export { ForgotPasswordForm };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime4 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/login-form.d.ts
4
4
  /**
@@ -70,6 +70,6 @@ declare function LoginForm({
70
70
  className,
71
71
  error,
72
72
  minPasswordLength
73
- }: LoginFormProps): react_jsx_runtime4.JSX.Element;
73
+ }: LoginFormProps): react_jsx_runtime3.JSX.Element;
74
74
  //#endregion
75
75
  export { LoginForm };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/reset-password-form.d.ts
4
4
  /**
@@ -60,6 +60,6 @@ declare function ResetPasswordForm({
60
60
  minPasswordLength,
61
61
  className,
62
62
  error
63
- }: ResetPasswordFormProps): react_jsx_runtime5.JSX.Element;
63
+ }: ResetPasswordFormProps): react_jsx_runtime6.JSX.Element;
64
64
  //#endregion
65
65
  export { ResetPasswordForm };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime6 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/setup-form.d.ts
4
4
  /**
@@ -55,6 +55,6 @@ declare function SetupForm({
55
55
  className,
56
56
  error,
57
57
  minPasswordLength
58
- }: SetupFormProps): react_jsx_runtime6.JSX.Element;
58
+ }: SetupFormProps): react_jsx_runtime5.JSX.Element;
59
59
  //#endregion
60
60
  export { SetupForm, SetupFormValues };
@@ -298,9 +298,9 @@ function mapListSchemaToConfig(list) {
298
298
  config.actions = mapListActionsToDefinitions(list.actions);
299
299
  return config;
300
300
  }
301
- function stringifyGroupValue(value, field, resolveText) {
302
- if (value === null || value === void 0 || value === "") return "No value";
303
- if (Array.isArray(value)) return value.length > 0 ? value.map((item) => stringifyGroupValue(item, field, resolveText)).join(", ") : "No value";
301
+ function stringifyGroupValue(value, field, resolveText, noValueLabel = "No value") {
302
+ if (value === null || value === void 0 || value === "") return noValueLabel;
303
+ if (Array.isArray(value)) return value.length > 0 ? value.map((item) => stringifyGroupValue(item, field, resolveText, noValueLabel)).join(", ") : noValueLabel;
304
304
  const options = field?.options?.options;
305
305
  if (options) {
306
306
  const option = flattenOptions(options).find((item) => String(item.value) === String(value));
@@ -1061,9 +1061,9 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1061
1061
  const hasActiveFilters = viewState.config.filters.length > 0;
1062
1062
  const isOrderSortActive = canUseOrderableSort && effectiveSort?.field === orderField && (effectiveSort.direction ?? "asc") === orderDirection;
1063
1063
  const hasMultiplePages = !isSearching && (listData?.totalPages ?? 1) > 1;
1064
- const reorderHardBlocker = !isOrderableEnabled ? "Enable orderable before reordering" : !hasOrderField ? "Add a numeric order field before reordering" : isSearching ? "Clear search to reorder" : viewState.config.groupBy ? "Remove grouping to reorder" : hasActiveFilters ? "Clear filters to reorder" : hasMultiplePages ? "Show one page of items to reorder" : null;
1065
- const reorderTooltip = reorderHardBlocker ?? (isOrderSortActive ? isReorderMode ? "Exit reorder mode" : "Reorder items" : `Switch to ${orderField} sort and reorder`);
1066
- const reorderAriaLabel = reorderHardBlocker ? `Reorder unavailable: ${reorderHardBlocker}` : isReorderMode ? "Exit reorder mode" : "Enter reorder mode";
1064
+ const reorderHardBlocker = !isOrderableEnabled ? t("collection.reorderEnableOrderable") : !hasOrderField ? t("collection.reorderAddOrderField") : isSearching ? t("collection.reorderClearSearch") : viewState.config.groupBy ? t("collection.reorderRemoveGrouping") : hasActiveFilters ? t("collection.reorderClearFilters") : hasMultiplePages ? t("collection.reorderShowOnePage") : null;
1065
+ const reorderTooltip = reorderHardBlocker ?? (isOrderSortActive ? isReorderMode ? t("collection.reorderExitMode") : t("collection.reorderItems") : t("collection.reorderSwitchSort", { field: orderField }));
1066
+ const reorderAriaLabel = reorderHardBlocker ? t("collection.reorderUnavailable", { reason: reorderHardBlocker }) : isReorderMode ? t("collection.reorderExitMode") : t("collection.reorderEnterMode");
1067
1067
  const canReorder = isOrderableEnabled && !reorderHardBlocker;
1068
1068
  const handleReorderToggle = React.useCallback(() => {
1069
1069
  if (!canReorder) return;
@@ -1170,11 +1170,11 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1170
1170
  id: String(row_6.id),
1171
1171
  data: { [orderField]: (index + 1) * orderStep }
1172
1172
  })) });
1173
- actionHelpers.toast.success("Order saved");
1173
+ actionHelpers.toast.success(t("collection.orderSaved"));
1174
1174
  } catch (error) {
1175
1175
  clearReorderOverlay();
1176
1176
  setOptimisticOrderIds(previousOrderIds);
1177
- actionHelpers.toast.error(error instanceof Error ? error.message : "Could not save order");
1177
+ actionHelpers.toast.error(error instanceof Error ? error.message : t("collection.orderSaveFailed"));
1178
1178
  }
1179
1179
  }, [
1180
1180
  sortableRowIds,
@@ -1182,6 +1182,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1182
1182
  updateBatchMutation,
1183
1183
  orderField,
1184
1184
  orderStep,
1185
+ t,
1185
1186
  actionHelpers.toast,
1186
1187
  clearReorderOverlay
1187
1188
  ]);
@@ -1198,7 +1199,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1198
1199
  if (serverGroups?.length) {
1199
1200
  const rowsById_0 = new Map(rows.map((row_8) => [row_8.id, row_8]));
1200
1201
  return serverGroups.flatMap((group) => {
1201
- const label = stringifyGroupValue(group.value, groupField, resolveText);
1202
+ const label = stringifyGroupValue(group.value, groupField, resolveText, t("common.noValue"));
1202
1203
  const groupKey = `${groupBy_0}:${label}`;
1203
1204
  const collapsed = collapsedGroups.has(groupKey);
1204
1205
  const groupRows = (group.docs ?? []).map((doc) => rowsById_0.get(String(doc.id))).filter(Boolean);
@@ -1216,7 +1217,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1216
1217
  }
1217
1218
  const groups = /* @__PURE__ */ new Map();
1218
1219
  for (const row_10 of rows) {
1219
- const valueLabel = stringifyGroupValue(row_10.original?.[groupBy_0], groupField, resolveText);
1220
+ const valueLabel = stringifyGroupValue(row_10.original?.[groupBy_0], groupField, resolveText, t("common.noValue"));
1220
1221
  const groupKey_0 = `${groupBy_0}:${valueLabel}`;
1221
1222
  const group_0 = groups.get(groupKey_0);
1222
1223
  if (group_0) {
@@ -1249,7 +1250,8 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1249
1250
  groupableFields,
1250
1251
  isSearching,
1251
1252
  listData?.groups,
1252
- resolveText
1253
+ resolveText,
1254
+ t
1253
1255
  ]);
1254
1256
  const handleSaveView = (name, config_0) => {
1255
1257
  saveViewMutation.mutate({
@@ -1427,24 +1429,21 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1427
1429
  }),
1428
1430
  /* @__PURE__ */ jsx("span", {
1429
1431
  className: "text-foreground font-medium",
1430
- children: "Reorder mode"
1432
+ children: t("collection.reorderMode")
1431
1433
  }),
1432
- /* @__PURE__ */ jsxs("span", {
1434
+ /* @__PURE__ */ jsx("span", {
1433
1435
  className: "hidden sm:inline",
1434
- children: [
1435
- "Sorted by ",
1436
- orderField,
1437
- " ",
1438
- orderDirection,
1439
- "."
1440
- ]
1436
+ children: t("collection.sortedByField", {
1437
+ field: orderField,
1438
+ direction: orderDirection
1439
+ })
1441
1440
  })
1442
1441
  ]
1443
1442
  }), /* @__PURE__ */ jsx(Button, {
1444
1443
  variant: "ghost",
1445
1444
  size: "xs",
1446
1445
  onClick: () => setIsReorderMode(false),
1447
- children: "Done"
1446
+ children: t("common.done")
1448
1447
  })]
1449
1448
  }),
1450
1449
  /* @__PURE__ */ jsx(BulkActionToolbar, {
@@ -1635,13 +1634,14 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1635
1634
  children: [/* @__PURE__ */ jsxs("span", { children: [
1636
1635
  filteredItems.length > 0 ? `${((viewState.config.pagination?.page ?? 1) - 1) * (viewState.config.pagination?.pageSize ?? 25) + 1}-${Math.min(((viewState.config.pagination?.page ?? 1) - 1) * (viewState.config.pagination?.pageSize ?? 25) + (viewState.config.pagination?.pageSize ?? 25), listData?.totalDocs ?? filteredItems.length)}` : "0",
1637
1636
  " ",
1638
- "of ",
1637
+ t("table.of"),
1638
+ " ",
1639
1639
  listData?.totalDocs ?? 0
1640
1640
  ] }), /* @__PURE__ */ jsxs("div", {
1641
1641
  className: "flex items-center gap-2",
1642
1642
  children: [/* @__PURE__ */ jsx("span", {
1643
1643
  className: "text-muted-foreground",
1644
- children: "Show"
1644
+ children: t("table.show")
1645
1645
  }), /* @__PURE__ */ jsxs(Select, {
1646
1646
  value: String(viewState.config.pagination?.pageSize ?? 25),
1647
1647
  onValueChange: (value_0) => viewState.setPageSize(Number(value_0)),
@@ -1671,7 +1671,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1671
1671
  className: "size-8 p-0",
1672
1672
  disabled: (viewState.config.pagination?.page ?? 1) <= 1,
1673
1673
  onClick: () => viewState.setPage((viewState.config.pagination?.page ?? 1) - 1),
1674
- "aria-label": "Previous page",
1674
+ "aria-label": t("table.previousPage"),
1675
1675
  children: /* @__PURE__ */ jsx(Icon, {
1676
1676
  icon: "ph:caret-left",
1677
1677
  className: "size-4"
@@ -1690,7 +1690,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1690
1690
  size: "sm",
1691
1691
  className: "size-8 min-w-[32px] p-0 tabular-nums",
1692
1692
  onClick: () => viewState.setPage(pageNum),
1693
- "aria-label": `Page ${pageNum}`,
1693
+ "aria-label": t("table.page", { page: pageNum }),
1694
1694
  "aria-current": currentPage === pageNum ? "page" : void 0,
1695
1695
  children: pageNum
1696
1696
  }, pageNum);
@@ -1701,7 +1701,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1701
1701
  className: "size-8 p-0",
1702
1702
  disabled: (viewState.config.pagination?.page ?? 1) >= (listData?.totalPages ?? 1),
1703
1703
  onClick: () => viewState.setPage((viewState.config.pagination?.page ?? 1) + 1),
1704
- "aria-label": "Next page",
1704
+ "aria-label": t("table.nextPage"),
1705
1705
  children: /* @__PURE__ */ jsx(Icon, {
1706
1706
  icon: "ph:caret-right",
1707
1707
  className: "size-4"