@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
@@ -1199,7 +1199,7 @@ function _temp5(e) {
1199
1199
  e.currentTarget.style.display = "none";
1200
1200
  }
1201
1201
  function AdminSidebar(t0) {
1202
- const $ = c(93);
1202
+ const $ = c(98);
1203
1203
  const { LinkComponent, activeRoute, basePath: t1, brandName: brandNameProp, className, renderBrand, renderNavItem, footer, onSearchOpen, afterBrand, beforeFooter, theme, setTheme, showThemeToggle, useActiveProps: t2 } = t0;
1204
1204
  const basePath = t1 === void 0 ? "/admin" : t1;
1205
1205
  const useActiveProps = t2 === void 0 ? true : t2;
@@ -1210,6 +1210,7 @@ function AdminSidebar(t0) {
1210
1210
  $[1] = t3;
1211
1211
  } else t3 = $[1];
1212
1212
  const { navigation, brandName } = useSidebarProps(t3);
1213
+ const { t } = useTranslation();
1213
1214
  const { state, isMobile, setOpenMobile, toggleSidebar } = useSidebar();
1214
1215
  const collapsed = state === "collapsed";
1215
1216
  const currentActiveRoute = activeRoute ?? (typeof window !== "undefined" ? window.location.pathname : void 0);
@@ -1315,43 +1316,44 @@ function AdminSidebar(t0) {
1315
1316
  } else t14 = $[28];
1316
1317
  const brandLink = t14;
1317
1318
  let t15;
1318
- if ($[29] !== onSearchOpen) {
1319
+ if ($[29] !== onSearchOpen || $[30] !== t) {
1319
1320
  t15 = onSearchOpen && /* @__PURE__ */ jsx(Button, {
1320
1321
  type: "button",
1321
1322
  variant: "ghost",
1322
1323
  size: "icon-xs",
1323
1324
  className: "text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",
1324
1325
  onClick: onSearchOpen,
1325
- title: "Search",
1326
- "aria-label": "Search",
1326
+ title: t("common.search"),
1327
+ "aria-label": t("common.search"),
1327
1328
  children: /* @__PURE__ */ jsx(Icon, { icon: "ph:magnifying-glass" })
1328
1329
  });
1329
1330
  $[29] = onSearchOpen;
1330
- $[30] = t15;
1331
- } else t15 = $[30];
1331
+ $[30] = t;
1332
+ $[31] = t15;
1333
+ } else t15 = $[31];
1332
1334
  let t16;
1333
- if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
1335
+ if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
1334
1336
  t16 = /* @__PURE__ */ jsx(SidebarTrigger, { className: "text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground" });
1335
- $[31] = t16;
1336
- } else t16 = $[31];
1337
+ $[32] = t16;
1338
+ } else t16 = $[32];
1337
1339
  let t17;
1338
- if ($[32] !== t15) {
1340
+ if ($[33] !== t15) {
1339
1341
  t17 = /* @__PURE__ */ jsxs("div", {
1340
1342
  className: "qa-sidebar__header-actions flex shrink-0 items-center gap-1",
1341
1343
  children: [t15, t16]
1342
1344
  });
1343
- $[32] = t15;
1344
- $[33] = t17;
1345
- } else t17 = $[33];
1345
+ $[33] = t15;
1346
+ $[34] = t17;
1347
+ } else t17 = $[34];
1346
1348
  const sidebarActions = t17;
1347
1349
  let t18;
1348
- if ($[34] !== className) {
1350
+ if ($[35] !== className) {
1349
1351
  t18 = cn("qa-sidebar bg-sidebar relative border-none", className);
1350
- $[34] = className;
1351
- $[35] = t18;
1352
- } else t18 = $[35];
1352
+ $[35] = className;
1353
+ $[36] = t18;
1354
+ } else t18 = $[36];
1353
1355
  let t19;
1354
- if ($[36] !== LinkComponent || $[37] !== basePath || $[38] !== brandLink || $[39] !== brandName || $[40] !== collapsed || $[41] !== isMobile || $[42] !== renderBrandContent) {
1356
+ if ($[37] !== LinkComponent || $[38] !== basePath || $[39] !== brandLink || $[40] !== brandName || $[41] !== collapsed || $[42] !== isMobile || $[43] !== renderBrandContent) {
1355
1357
  t19 = collapsed && !isMobile ? /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx(LinkComponent, {
1356
1358
  to: basePath,
1357
1359
  className: cn("flex items-center gap-2 rounded-md p-2 transition-[background-color,color,transform] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] active:scale-[0.96] motion-reduce:transition-none motion-reduce:active:scale-100", "hover:bg-sidebar-accent", "justify-center"),
@@ -1360,17 +1362,17 @@ function AdminSidebar(t0) {
1360
1362
  side: "right",
1361
1363
  children: brandName
1362
1364
  })] }) : brandLink;
1363
- $[36] = LinkComponent;
1364
- $[37] = basePath;
1365
- $[38] = brandLink;
1366
- $[39] = brandName;
1367
- $[40] = collapsed;
1368
- $[41] = isMobile;
1369
- $[42] = renderBrandContent;
1370
- $[43] = t19;
1371
- } else t19 = $[43];
1365
+ $[37] = LinkComponent;
1366
+ $[38] = basePath;
1367
+ $[39] = brandLink;
1368
+ $[40] = brandName;
1369
+ $[41] = collapsed;
1370
+ $[42] = isMobile;
1371
+ $[43] = renderBrandContent;
1372
+ $[44] = t19;
1373
+ } else t19 = $[44];
1372
1374
  let t20;
1373
- if ($[44] !== handleBrandClick || $[45] !== t19) {
1375
+ if ($[45] !== handleBrandClick || $[46] !== t19) {
1374
1376
  t20 = /* @__PURE__ */ jsx(SidebarMenu, {
1375
1377
  className: "min-w-0 flex-1",
1376
1378
  children: /* @__PURE__ */ jsx(SidebarMenuItem, {
@@ -1378,23 +1380,23 @@ function AdminSidebar(t0) {
1378
1380
  children: t19
1379
1381
  })
1380
1382
  });
1381
- $[44] = handleBrandClick;
1382
- $[45] = t19;
1383
- $[46] = t20;
1384
- } else t20 = $[46];
1383
+ $[45] = handleBrandClick;
1384
+ $[46] = t19;
1385
+ $[47] = t20;
1386
+ } else t20 = $[47];
1385
1387
  const t21 = !collapsed && sidebarActions;
1386
1388
  let t22;
1387
- if ($[47] !== t20 || $[48] !== t21) {
1389
+ if ($[48] !== t20 || $[49] !== t21) {
1388
1390
  t22 = /* @__PURE__ */ jsxs(SidebarHeader, {
1389
1391
  className: "qa-sidebar__header h-auto flex-row items-center gap-2 border-none px-3 pt-3 pb-1",
1390
1392
  children: [t20, t21]
1391
1393
  });
1392
- $[47] = t20;
1393
- $[48] = t21;
1394
- $[49] = t22;
1395
- } else t22 = $[49];
1394
+ $[48] = t20;
1395
+ $[49] = t21;
1396
+ $[50] = t22;
1397
+ } else t22 = $[50];
1396
1398
  let t23;
1397
- if ($[50] !== collapsed || $[51] !== isMobile || $[52] !== onSearchOpen || $[53] !== toggleSidebar) {
1399
+ if ($[51] !== collapsed || $[52] !== isMobile || $[53] !== onSearchOpen || $[54] !== t || $[55] !== toggleSidebar) {
1398
1400
  t23 = collapsed && !isMobile && /* @__PURE__ */ jsxs("div", {
1399
1401
  className: "qa-sidebar__collapsed-peek group/peek absolute top-4 -right-3 z-50 flex items-center",
1400
1402
  children: [/* @__PURE__ */ jsx(Button, {
@@ -1403,46 +1405,53 @@ function AdminSidebar(t0) {
1403
1405
  size: "icon-xs",
1404
1406
  className: "border-sidebar-border/70 bg-sidebar text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground h-8 w-3 rounded-l-none rounded-r-md border border-l-0 p-0 shadow-[var(--floating-shadow)]",
1405
1407
  onClick: toggleSidebar,
1406
- "aria-label": "Expand sidebar",
1408
+ "aria-label": t("ui.expandSidebar"),
1407
1409
  children: /* @__PURE__ */ jsx("span", { className: "h-3 w-0.5 rounded-full bg-current opacity-55" })
1408
1410
  }), /* @__PURE__ */ jsxs("div", {
1409
1411
  className: "floating-surface ml-1 flex scale-95 items-center gap-1 p-1 opacity-0 transition-[opacity,transform] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-enter)] group-focus-within/peek:scale-100 group-focus-within/peek:opacity-100 group-hover/peek:scale-100 group-hover/peek:opacity-100 motion-reduce:scale-100 motion-reduce:transition-none",
1410
1412
  children: [/* @__PURE__ */ jsx(SidebarTrigger, {
1411
1413
  className: "text-muted-foreground hover:bg-muted hover:text-foreground",
1412
- "aria-label": "Expand sidebar"
1414
+ "aria-label": t("ui.expandSidebar")
1413
1415
  }), onSearchOpen && /* @__PURE__ */ jsx(Button, {
1414
1416
  type: "button",
1415
1417
  variant: "ghost",
1416
1418
  size: "icon-sm",
1417
1419
  className: "text-muted-foreground hover:bg-muted hover:text-foreground",
1418
1420
  onClick: onSearchOpen,
1419
- title: "Search",
1420
- "aria-label": "Search",
1421
+ title: t("common.search"),
1422
+ "aria-label": t("common.search"),
1421
1423
  children: /* @__PURE__ */ jsx(Icon, { icon: "ph:magnifying-glass" })
1422
1424
  })]
1423
1425
  })]
1424
1426
  });
1425
- $[50] = collapsed;
1426
- $[51] = isMobile;
1427
- $[52] = onSearchOpen;
1428
- $[53] = toggleSidebar;
1429
- $[54] = t23;
1430
- } else t23 = $[54];
1427
+ $[51] = collapsed;
1428
+ $[52] = isMobile;
1429
+ $[53] = onSearchOpen;
1430
+ $[54] = t;
1431
+ $[55] = toggleSidebar;
1432
+ $[56] = t23;
1433
+ } else t23 = $[56];
1431
1434
  let t24;
1432
- if ($[55] !== afterBrand || $[56] !== collapsed) {
1435
+ if ($[57] !== afterBrand || $[58] !== collapsed) {
1433
1436
  t24 = afterBrand && !collapsed && /* @__PURE__ */ jsx("div", {
1434
1437
  className: "qa-sidebar__after-brand border-sidebar-border/70 border-b px-3 py-2",
1435
1438
  children: afterBrand
1436
1439
  });
1437
- $[55] = afterBrand;
1438
- $[56] = collapsed;
1439
- $[57] = t24;
1440
- } else t24 = $[57];
1440
+ $[57] = afterBrand;
1441
+ $[58] = collapsed;
1442
+ $[59] = t24;
1443
+ } else t24 = $[59];
1441
1444
  let t25;
1442
- if ($[58] !== LinkComponent || $[59] !== basePath || $[60] !== currentActiveRoute || $[61] !== effectiveRenderNavItem || $[62] !== isSectionCollapsed || $[63] !== navigation || $[64] !== toggleSection || $[65] !== useActiveProps) {
1443
- let t26$1;
1444
- if ($[67] !== LinkComponent || $[68] !== basePath || $[69] !== currentActiveRoute || $[70] !== effectiveRenderNavItem || $[71] !== isSectionCollapsed || $[72] !== toggleSection || $[73] !== useActiveProps) {
1445
- t26$1 = (group, index) => /* @__PURE__ */ jsx(NavGroup, {
1445
+ if ($[60] !== t) {
1446
+ t25 = t("nav.adminNavigation");
1447
+ $[60] = t;
1448
+ $[61] = t25;
1449
+ } else t25 = $[61];
1450
+ let t26;
1451
+ if ($[62] !== LinkComponent || $[63] !== basePath || $[64] !== currentActiveRoute || $[65] !== effectiveRenderNavItem || $[66] !== isSectionCollapsed || $[67] !== navigation || $[68] !== toggleSection || $[69] !== useActiveProps) {
1452
+ let t27$1;
1453
+ if ($[71] !== LinkComponent || $[72] !== basePath || $[73] !== currentActiveRoute || $[74] !== effectiveRenderNavItem || $[75] !== isSectionCollapsed || $[76] !== toggleSection || $[77] !== useActiveProps) {
1454
+ t27$1 = (group, index) => /* @__PURE__ */ jsx(NavGroup, {
1446
1455
  group,
1447
1456
  activeRoute: currentActiveRoute,
1448
1457
  LinkComponent,
@@ -1452,65 +1461,66 @@ function AdminSidebar(t0) {
1452
1461
  isSectionCollapsed,
1453
1462
  toggleSection
1454
1463
  }, group.id ?? `group-${index}`);
1455
- $[67] = LinkComponent;
1456
- $[68] = basePath;
1457
- $[69] = currentActiveRoute;
1458
- $[70] = effectiveRenderNavItem;
1459
- $[71] = isSectionCollapsed;
1460
- $[72] = toggleSection;
1461
- $[73] = useActiveProps;
1462
- $[74] = t26$1;
1463
- } else t26$1 = $[74];
1464
- t25 = navigation.map(t26$1);
1465
- $[58] = LinkComponent;
1466
- $[59] = basePath;
1467
- $[60] = currentActiveRoute;
1468
- $[61] = effectiveRenderNavItem;
1469
- $[62] = isSectionCollapsed;
1470
- $[63] = navigation;
1471
- $[64] = toggleSection;
1472
- $[65] = useActiveProps;
1473
- $[66] = t25;
1474
- } else t25 = $[66];
1475
- let t26;
1476
- if ($[75] !== t25) {
1477
- t26 = /* @__PURE__ */ jsx(SidebarContent, {
1464
+ $[71] = LinkComponent;
1465
+ $[72] = basePath;
1466
+ $[73] = currentActiveRoute;
1467
+ $[74] = effectiveRenderNavItem;
1468
+ $[75] = isSectionCollapsed;
1469
+ $[76] = toggleSection;
1470
+ $[77] = useActiveProps;
1471
+ $[78] = t27$1;
1472
+ } else t27$1 = $[78];
1473
+ t26 = navigation.map(t27$1);
1474
+ $[62] = LinkComponent;
1475
+ $[63] = basePath;
1476
+ $[64] = currentActiveRoute;
1477
+ $[65] = effectiveRenderNavItem;
1478
+ $[66] = isSectionCollapsed;
1479
+ $[67] = navigation;
1480
+ $[68] = toggleSection;
1481
+ $[69] = useActiveProps;
1482
+ $[70] = t26;
1483
+ } else t26 = $[70];
1484
+ let t27;
1485
+ if ($[79] !== t25 || $[80] !== t26) {
1486
+ t27 = /* @__PURE__ */ jsx(SidebarContent, {
1478
1487
  className: "qa-sidebar__content gap-3 px-2 py-3 group-data-[collapsible=icon]:gap-2",
1479
1488
  children: /* @__PURE__ */ jsx("nav", {
1480
- "aria-label": "Admin navigation",
1489
+ "aria-label": t25,
1481
1490
  className: "qa-sidebar__nav",
1482
- children: t25
1491
+ children: t26
1483
1492
  })
1484
1493
  });
1485
- $[75] = t25;
1486
- $[76] = t26;
1487
- } else t26 = $[76];
1488
- let t27;
1489
- if ($[77] !== beforeFooter || $[78] !== collapsed) {
1490
- t27 = beforeFooter && !collapsed && /* @__PURE__ */ jsx("div", {
1494
+ $[79] = t25;
1495
+ $[80] = t26;
1496
+ $[81] = t27;
1497
+ } else t27 = $[81];
1498
+ let t28;
1499
+ if ($[82] !== beforeFooter || $[83] !== collapsed) {
1500
+ t28 = beforeFooter && !collapsed && /* @__PURE__ */ jsx("div", {
1491
1501
  className: "qa-sidebar__before-footer border-sidebar-border/70 border-t px-3 py-2",
1492
1502
  children: beforeFooter
1493
1503
  });
1494
- $[77] = beforeFooter;
1495
- $[78] = collapsed;
1496
- $[79] = t27;
1497
- } else t27 = $[79];
1498
- let t28;
1499
- if ($[80] !== footer || $[81] !== setTheme || $[82] !== showThemeToggle || $[83] !== theme) {
1500
- t28 = footer ?? /* @__PURE__ */ jsx(UserFooter, {
1504
+ $[82] = beforeFooter;
1505
+ $[83] = collapsed;
1506
+ $[84] = t28;
1507
+ } else t28 = $[84];
1508
+ let t29;
1509
+ if ($[85] !== footer || $[86] !== setTheme || $[87] !== showThemeToggle || $[88] !== theme) {
1510
+ t29 = footer ?? /* @__PURE__ */ jsx(UserFooter, {
1501
1511
  theme,
1502
1512
  setTheme,
1503
1513
  showThemeToggle
1504
1514
  });
1505
- $[80] = footer;
1506
- $[81] = setTheme;
1507
- $[82] = showThemeToggle;
1508
- $[83] = theme;
1509
- $[84] = t28;
1510
- } else t28 = $[84];
1511
- let t29;
1512
- if ($[85] !== t18 || $[86] !== t22 || $[87] !== t23 || $[88] !== t24 || $[89] !== t26 || $[90] !== t27 || $[91] !== t28) {
1513
- t29 = /* @__PURE__ */ jsxs(Sidebar, {
1515
+ $[85] = footer;
1516
+ $[86] = setTheme;
1517
+ $[87] = showThemeToggle;
1518
+ $[88] = theme;
1519
+ $[89] = t29;
1520
+ } else t29 = $[89];
1521
+ let t30;
1522
+ if ($[90] !== t18 || $[91] !== t22 || $[92] !== t23 || $[93] !== t24 || $[94] !== t27 || $[95] !== t28 || $[96] !== t29) {
1523
+ t30 = /* @__PURE__ */ jsxs(Sidebar, {
1514
1524
  collapsible: "icon",
1515
1525
  variant: "inset",
1516
1526
  className: t18,
@@ -1518,21 +1528,21 @@ function AdminSidebar(t0) {
1518
1528
  t22,
1519
1529
  t23,
1520
1530
  t24,
1521
- t26,
1522
1531
  t27,
1523
- t28
1532
+ t28,
1533
+ t29
1524
1534
  ]
1525
1535
  });
1526
- $[85] = t18;
1527
- $[86] = t22;
1528
- $[87] = t23;
1529
- $[88] = t24;
1530
- $[89] = t26;
1531
- $[90] = t27;
1532
- $[91] = t28;
1533
- $[92] = t29;
1534
- } else t29 = $[92];
1535
- return t29;
1536
+ $[90] = t18;
1537
+ $[91] = t22;
1538
+ $[92] = t23;
1539
+ $[93] = t24;
1540
+ $[94] = t27;
1541
+ $[95] = t28;
1542
+ $[96] = t29;
1543
+ $[97] = t30;
1544
+ } else t30 = $[97];
1545
+ return t30;
1536
1546
  }
1537
1547
 
1538
1548
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime11 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime12 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/client/views/pages/login-page.d.ts
5
5
 
@@ -64,6 +64,6 @@ declare function LoginPage({
64
64
  signUpPath,
65
65
  showForgotPassword,
66
66
  showSignUp
67
- }: LoginPageProps): react_jsx_runtime11.JSX.Element;
67
+ }: LoginPageProps): react_jsx_runtime12.JSX.Element;
68
68
  //#endregion
69
69
  export { LoginPage };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime12 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/client/views/pages/reset-password-page.d.ts
5
5
 
@@ -58,6 +58,6 @@ declare function ResetPasswordPage({
58
58
  loginPath,
59
59
  minPasswordLength,
60
60
  getToken
61
- }: ResetPasswordPageProps): react_jsx_runtime12.JSX.Element;
61
+ }: ResetPasswordPageProps): react_jsx_runtime11.JSX.Element;
62
62
  //#endregion
63
63
  export { ResetPasswordPage };
@@ -1,3 +1,4 @@
1
+ import { useTranslation } from "../../i18n/hooks.mjs";
1
2
  import { selectBasePath, selectBrandName, selectClient, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
2
3
  import { AuthDefaultLogo, AuthLayout } from "../auth/auth-layout.mjs";
3
4
  import { SetupForm } from "../auth/setup-form.mjs";
@@ -28,19 +29,18 @@ import { jsx, jsxs } from "react/jsx-runtime";
28
29
  * ```
29
30
  */
30
31
  function SetupPage(t0) {
31
- const $ = c(24);
32
- const { title: t1, description: t2, logo, redirectTo, loginPath, showLoginLink: t3 } = t0;
33
- const title = t1 === void 0 ? "Welcome" : t1;
34
- const description = t2 === void 0 ? "Create your admin account to get started" : t2;
35
- const showLoginLink = t3 === void 0 ? true : t3;
32
+ const $ = c(32);
33
+ const { title, description, logo, redirectTo, loginPath, showLoginLink: t1 } = t0;
34
+ const showLoginLink = t1 === void 0 ? true : t1;
35
+ const { t } = useTranslation();
36
36
  const client = useAdminStore(selectClient);
37
37
  const navigate = useAdminStore(selectNavigate);
38
38
  const basePath = useAdminStore(selectBasePath);
39
39
  const brandName = useAdminStore(selectBrandName);
40
40
  const [error, setError] = React.useState(null);
41
- let t4;
42
- if ($[0] !== basePath || $[1] !== client || $[2] !== navigate || $[3] !== redirectTo) {
43
- t4 = async (values) => {
41
+ let t2;
42
+ if ($[0] !== basePath || $[1] !== client || $[2] !== navigate || $[3] !== redirectTo || $[4] !== t) {
43
+ t2 = async (values) => {
44
44
  setError(null);
45
45
  const successRedirect = redirectTo !== void 0 ? redirectTo : `${basePath}/login`;
46
46
  try {
@@ -51,87 +51,103 @@ function SetupPage(t0) {
51
51
  });
52
52
  if (!result.success) {
53
53
  if (result.error) setError(result.error);
54
- else setError("Failed to create admin account");
54
+ else setError(t("error.failedToCreateAdminAccount"));
55
55
  return;
56
56
  }
57
57
  navigate(successRedirect);
58
- } catch (t5$1) {
59
- const err = t5$1;
58
+ } catch (t3$1) {
59
+ const err = t3$1;
60
60
  if (err instanceof Error) setError(err.message);
61
- else setError("An error occurred");
61
+ else setError(t("error.anErrorOccurred"));
62
62
  }
63
63
  };
64
64
  $[0] = basePath;
65
65
  $[1] = client;
66
66
  $[2] = navigate;
67
67
  $[3] = redirectTo;
68
- $[4] = t4;
69
- } else t4 = $[4];
70
- const handleSubmit = t4;
71
- let t5;
72
- if ($[5] !== basePath || $[6] !== loginPath || $[7] !== navigate) {
73
- t5 = () => {
68
+ $[4] = t;
69
+ $[5] = t2;
70
+ } else t2 = $[5];
71
+ const handleSubmit = t2;
72
+ let t3;
73
+ if ($[6] !== basePath || $[7] !== loginPath || $[8] !== navigate) {
74
+ t3 = () => {
74
75
  navigate(loginPath ?? `${basePath}/login`);
75
76
  };
76
- $[5] = basePath;
77
- $[6] = loginPath;
78
- $[7] = navigate;
79
- $[8] = t5;
80
- } else t5 = $[8];
81
- const handleLoginClick = t5;
77
+ $[6] = basePath;
78
+ $[7] = loginPath;
79
+ $[8] = navigate;
80
+ $[9] = t3;
81
+ } else t3 = $[9];
82
+ const handleLoginClick = t3;
83
+ let t4;
84
+ if ($[10] !== t || $[11] !== title) {
85
+ t4 = title ?? t("auth.createFirstAdmin");
86
+ $[10] = t;
87
+ $[11] = title;
88
+ $[12] = t4;
89
+ } else t4 = $[12];
90
+ let t5;
91
+ if ($[13] !== description || $[14] !== t) {
92
+ t5 = description ?? t("auth.createAccountDescription");
93
+ $[13] = description;
94
+ $[14] = t;
95
+ $[15] = t5;
96
+ } else t5 = $[15];
82
97
  let t6;
83
- if ($[9] !== brandName || $[10] !== logo) {
98
+ if ($[16] !== brandName || $[17] !== logo) {
84
99
  t6 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
85
- $[9] = brandName;
86
- $[10] = logo;
87
- $[11] = t6;
88
- } else t6 = $[11];
100
+ $[16] = brandName;
101
+ $[17] = logo;
102
+ $[18] = t6;
103
+ } else t6 = $[18];
89
104
  let t7;
90
- if ($[12] !== handleLoginClick || $[13] !== showLoginLink) {
105
+ if ($[19] !== handleLoginClick || $[20] !== showLoginLink || $[21] !== t) {
91
106
  t7 = showLoginLink && /* @__PURE__ */ jsxs("p", {
92
107
  className: "text-muted-foreground text-center text-xs",
93
108
  children: [
94
- "Already have an account?",
109
+ t("auth.alreadyHaveAccount"),
95
110
  " ",
96
111
  /* @__PURE__ */ jsx("button", {
97
112
  type: "button",
98
113
  onClick: handleLoginClick,
99
114
  className: "text-foreground underline-offset-4 hover:underline",
100
- children: "Sign in"
115
+ children: t("auth.signIn")
101
116
  })
102
117
  ]
103
118
  });
104
- $[12] = handleLoginClick;
105
- $[13] = showLoginLink;
106
- $[14] = t7;
107
- } else t7 = $[14];
119
+ $[19] = handleLoginClick;
120
+ $[20] = showLoginLink;
121
+ $[21] = t;
122
+ $[22] = t7;
123
+ } else t7 = $[22];
108
124
  let t8;
109
- if ($[15] !== error || $[16] !== handleSubmit) {
125
+ if ($[23] !== error || $[24] !== handleSubmit) {
110
126
  t8 = /* @__PURE__ */ jsx(SetupForm, {
111
127
  onSubmit: handleSubmit,
112
128
  error
113
129
  });
114
- $[15] = error;
115
- $[16] = handleSubmit;
116
- $[17] = t8;
117
- } else t8 = $[17];
130
+ $[23] = error;
131
+ $[24] = handleSubmit;
132
+ $[25] = t8;
133
+ } else t8 = $[25];
118
134
  let t9;
119
- if ($[18] !== description || $[19] !== t6 || $[20] !== t7 || $[21] !== t8 || $[22] !== title) {
135
+ if ($[26] !== t4 || $[27] !== t5 || $[28] !== t6 || $[29] !== t7 || $[30] !== t8) {
120
136
  t9 = /* @__PURE__ */ jsx(AuthLayout, {
121
- title,
122
- description,
137
+ title: t4,
138
+ description: t5,
123
139
  logo: t6,
124
140
  className: "qa-setup-page",
125
141
  footer: t7,
126
142
  children: t8
127
143
  });
128
- $[18] = description;
129
- $[19] = t6;
130
- $[20] = t7;
131
- $[21] = t8;
132
- $[22] = title;
133
- $[23] = t9;
134
- } else t9 = $[23];
144
+ $[26] = t4;
145
+ $[27] = t5;
146
+ $[28] = t6;
147
+ $[29] = t7;
148
+ $[30] = t8;
149
+ $[31] = t9;
150
+ } else t9 = $[31];
135
151
  return t9;
136
152
  }
137
153
 
@@ -1,5 +1,5 @@
1
1
  import { messages } from "./messages/index.mjs";
2
- import { validationMessagesEN, validationMessagesSK } from "questpie/shared";
2
+ import { validationMessagesCS, validationMessagesDE, validationMessagesEN, validationMessagesES, validationMessagesFR, validationMessagesPL, validationMessagesPT, validationMessagesSK } from "questpie/shared";
3
3
 
4
4
  //#region src/server/i18n/index.ts
5
5
  /**
@@ -16,14 +16,20 @@ import { validationMessagesEN, validationMessagesSK } from "questpie/shared";
16
16
  */
17
17
  const adminMessagesEN = messages.en;
18
18
  const adminMessagesSK = messages.sk;
19
- messages.cs;
20
- messages.de;
21
- messages.fr;
22
- messages.es;
23
- messages.pt;
24
- messages.pl;
19
+ const adminMessagesCS = messages.cs;
20
+ const adminMessagesDE = messages.de;
21
+ const adminMessagesFR = messages.fr;
22
+ const adminMessagesES = messages.es;
23
+ const adminMessagesPT = messages.pt;
24
+ const adminMessagesPL = messages.pl;
25
25
  const validationMessagesByLocale = {
26
+ cs: validationMessagesCS,
27
+ de: validationMessagesDE,
26
28
  en: validationMessagesEN,
29
+ es: validationMessagesES,
30
+ fr: validationMessagesFR,
31
+ pl: validationMessagesPL,
32
+ pt: validationMessagesPT,
27
33
  sk: validationMessagesSK
28
34
  };
29
35
  function getValidationMessagesForLocale(locale) {