@carlonicora/nextjs-jsonapi 3.27.1 → 3.27.3

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 (32) hide show
  1. package/dist/{BlockNoteEditor-LP65KUXI.js → BlockNoteEditor-OPIE2D56.js} +9 -9
  2. package/dist/{BlockNoteEditor-LP65KUXI.js.map → BlockNoteEditor-OPIE2D56.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-5MF2AH2U.mjs → BlockNoteEditor-ZFMCSQ5X.mjs} +2 -2
  4. package/dist/billing/index.js +335 -335
  5. package/dist/billing/index.mjs +1 -1
  6. package/dist/{chunk-SVJ6UZPA.mjs → chunk-CIFCO74X.mjs} +24 -11
  7. package/dist/chunk-CIFCO74X.mjs.map +1 -0
  8. package/dist/{chunk-ZEEOY45J.js → chunk-GA6RXWN7.js} +446 -433
  9. package/dist/chunk-GA6RXWN7.js.map +1 -0
  10. package/dist/client/index.js +2 -2
  11. package/dist/client/index.mjs +1 -1
  12. package/dist/components/index.js +2 -2
  13. package/dist/components/index.mjs +1 -1
  14. package/dist/contexts/index.js +2 -2
  15. package/dist/contexts/index.mjs +1 -1
  16. package/dist/features/analytics/index.js +88 -88
  17. package/dist/features/analytics/index.mjs +1 -1
  18. package/dist/features/help/index.js +31 -31
  19. package/dist/features/help/index.mjs +1 -1
  20. package/dist/features/tokenusage/index.js +75 -75
  21. package/dist/features/tokenusage/index.mjs +1 -1
  22. package/package.json +1 -1
  23. package/src/components/tables/cells/cell.date.tsx +9 -3
  24. package/src/components/tables/cells/cell.dateTime.tsx +11 -5
  25. package/src/features/auth/components/two-factor/PasskeyList.tsx +3 -1
  26. package/src/features/auth/components/two-factor/TotpAuthenticatorList.tsx +3 -1
  27. package/src/features/notification/components/notifications/Notification.tsx +1 -1
  28. package/src/features/waitlist/hooks/useWaitlistTableStructure.tsx +5 -3
  29. package/src/shadcnui/ui/calendar.tsx +1 -1
  30. package/dist/chunk-SVJ6UZPA.mjs.map +0 -1
  31. package/dist/chunk-ZEEOY45J.js.map +0 -1
  32. /package/dist/{BlockNoteEditor-5MF2AH2U.mjs.map → BlockNoteEditor-ZFMCSQ5X.mjs.map} +0 -0
@@ -62,7 +62,7 @@ import {
62
62
  useCurrentUserContext,
63
63
  useDataListRetriever,
64
64
  usePageUrlGenerator
65
- } from "../chunk-SVJ6UZPA.mjs";
65
+ } from "../chunk-CIFCO74X.mjs";
66
66
  import {
67
67
  getRoleId,
68
68
  getStripePublishableKey,
@@ -704,7 +704,7 @@ function Calendar({
704
704
  ),
705
705
  captionLayout,
706
706
  formatters: {
707
- formatMonthDropdown: /* @__PURE__ */ __name((date) => date.toLocaleString("default", { month: "short" }), "formatMonthDropdown"),
707
+ formatMonthDropdown: /* @__PURE__ */ __name((date) => date.toLocaleString(props.locale?.code ?? "default", { month: "short" }), "formatMonthDropdown"),
708
708
  ...formatters
709
709
  },
710
710
  classNames: {
@@ -10437,7 +10437,7 @@ import { useRef as useRef17 } from "react";
10437
10437
  import dynamic from "next/dynamic";
10438
10438
  import React18 from "react";
10439
10439
  import { jsx as jsx90 } from "react/jsx-runtime";
10440
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-5MF2AH2U.mjs"), {
10440
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-ZFMCSQ5X.mjs"), {
10441
10441
  ssr: false
10442
10442
  });
10443
10443
  var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -13322,7 +13322,7 @@ function NotificationToast(notification, t, generateUrl, reouter) {
13322
13322
  title: data.title,
13323
13323
  message: notification.message ?? ""
13324
13324
  }) }),
13325
- /* @__PURE__ */ jsx144("div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
13325
+ /* @__PURE__ */ jsx144("div", { className: "text-muted-foreground mt-1 w-full text-xs", children: formatDate(new Date(notification.createdAt), "dateTime") })
13326
13326
  ] })
13327
13327
  ] }),
13328
13328
  action: data.url ? {
@@ -16680,6 +16680,11 @@ var cellComponent = /* @__PURE__ */ __name((params) => {
16680
16680
 
16681
16681
  // src/components/tables/cells/cell.date.tsx
16682
16682
  import { jsx as jsx179 } from "react/jsx-runtime";
16683
+ function DateCell({ date }) {
16684
+ const locale = useI18nLocale();
16685
+ return /* @__PURE__ */ jsx179("span", { className: "text-muted-foreground text-xs", children: date.toLocaleDateString(locale, { dateStyle: "medium" }) });
16686
+ }
16687
+ __name(DateCell, "DateCell");
16683
16688
  var cellDate = /* @__PURE__ */ __name((params) => {
16684
16689
  return {
16685
16690
  id: params.name,
@@ -16688,7 +16693,7 @@ var cellDate = /* @__PURE__ */ __name((params) => {
16688
16693
  cell: /* @__PURE__ */ __name(({ row }) => {
16689
16694
  const date = row.getValue(params.name);
16690
16695
  if (!date) return null;
16691
- return /* @__PURE__ */ jsx179("span", { className: "text-muted-foreground text-xs", children: date.toLocaleDateString("en", { dateStyle: "medium" }) });
16696
+ return /* @__PURE__ */ jsx179(DateCell, { date });
16692
16697
  }, "cell"),
16693
16698
  enableSorting: false,
16694
16699
  enableHiding: false
@@ -16697,6 +16702,11 @@ var cellDate = /* @__PURE__ */ __name((params) => {
16697
16702
 
16698
16703
  // src/components/tables/cells/cell.dateTime.tsx
16699
16704
  import { jsx as jsx180 } from "react/jsx-runtime";
16705
+ function DateTimeCell({ date }) {
16706
+ const locale = useI18nLocale();
16707
+ return /* @__PURE__ */ jsx180("span", { className: "text-muted-foreground text-xs", children: date.toLocaleString(locale, { dateStyle: "medium", timeStyle: "short", hour12: false }) });
16708
+ }
16709
+ __name(DateTimeCell, "DateTimeCell");
16700
16710
  var cellDateTime = /* @__PURE__ */ __name((params) => {
16701
16711
  return {
16702
16712
  id: params.name,
@@ -16705,7 +16715,7 @@ var cellDateTime = /* @__PURE__ */ __name((params) => {
16705
16715
  cell: /* @__PURE__ */ __name(({ row }) => {
16706
16716
  const date = row.getValue(params.name);
16707
16717
  if (!date) return null;
16708
- return /* @__PURE__ */ jsx180("span", { className: "text-muted-foreground text-xs", children: date.toLocaleString("en", { dateStyle: "medium", timeStyle: "short", hour12: false }) });
16718
+ return /* @__PURE__ */ jsx180(DateTimeCell, { date });
16709
16719
  }, "cell"),
16710
16720
  enableSorting: false,
16711
16721
  enableHiding: false
@@ -17415,6 +17425,7 @@ function parseQuestionnaire(questionnaire) {
17415
17425
  __name(parseQuestionnaire, "parseQuestionnaire");
17416
17426
  var useWaitlistTableStructure = /* @__PURE__ */ __name((params) => {
17417
17427
  const t = useTranslations59();
17428
+ const locale = useI18nLocale();
17418
17429
  const onInvite = params.context?.onInvite;
17419
17430
  const tableData = useMemo31(() => {
17420
17431
  return params.data.map((entry) => {
@@ -17460,7 +17471,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ __name((params) => {
17460
17471
  cell: /* @__PURE__ */ __name(({ row }) => {
17461
17472
  const entry = row.original.jsonApiData;
17462
17473
  if (!entry.createdAt) return "-";
17463
- return new Date(entry.createdAt).toLocaleDateString();
17474
+ return new Date(entry.createdAt).toLocaleDateString(locale);
17464
17475
  }, "cell"),
17465
17476
  enableSorting: false,
17466
17477
  enableHiding: false
@@ -17501,7 +17512,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ __name((params) => {
17501
17512
  ] });
17502
17513
  }
17503
17514
  if (entry.status === "invited" && entry.invitedAt) {
17504
- return /* @__PURE__ */ jsx189("span", { className: "text-muted-foreground text-xs", children: t("waitlist.admin.actions.invited_on", { date: new Date(entry.invitedAt).toLocaleDateString() }) });
17515
+ return /* @__PURE__ */ jsx189("span", { className: "text-muted-foreground text-xs", children: t("waitlist.admin.actions.invited_on", { date: new Date(entry.invitedAt).toLocaleDateString(locale) }) });
17505
17516
  }
17506
17517
  if (entry.status === "registered") {
17507
17518
  return /* @__PURE__ */ jsx189("span", { className: "text-muted-foreground text-sm", children: t("waitlist.admin.actions.registered") });
@@ -17514,7 +17525,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ __name((params) => {
17514
17525
  };
17515
17526
  const columns = useMemo31(() => {
17516
17527
  return params.fields.map((field) => fieldColumnMap[field]?.()).filter((col) => col !== void 0);
17517
- }, [params.fields, fieldColumnMap, t]);
17528
+ }, [params.fields, fieldColumnMap, t, locale]);
17518
17529
  return useMemo31(() => ({ data: tableData, columns }), [tableData, columns]);
17519
17530
  }, "useWaitlistTableStructure");
17520
17531
 
@@ -19163,6 +19174,7 @@ import { useState as useState68 } from "react";
19163
19174
  import { Fragment as Fragment34, jsx as jsx207, jsxs as jsxs116 } from "react/jsx-runtime";
19164
19175
  function PasskeyList({ passkeys, onRefresh }) {
19165
19176
  const t = useTranslations68();
19177
+ const locale = useI18nLocale();
19166
19178
  const [renameDialogOpen, setRenameDialogOpen] = useState68(false);
19167
19179
  const [selectedPasskey, setSelectedPasskey] = useState68(null);
19168
19180
  const [newName, setNewName] = useState68("");
@@ -19224,7 +19236,7 @@ function PasskeyList({ passkeys, onRefresh }) {
19224
19236
  /* @__PURE__ */ jsx207("p", { className: "font-medium", children: passkey.name }),
19225
19237
  /* @__PURE__ */ jsxs116("p", { className: "text-sm text-muted-foreground", children: [
19226
19238
  passkey.backedUp && "\u2601\uFE0F ",
19227
- passkey.lastUsedAt ? `${t("auth.two_factor.last_used")}: ${new Date(passkey.lastUsedAt).toLocaleDateString()}` : t("auth.two_factor.never_used")
19239
+ passkey.lastUsedAt ? `${t("auth.two_factor.last_used")}: ${new Date(passkey.lastUsedAt).toLocaleDateString(locale)}` : t("auth.two_factor.never_used")
19228
19240
  ] })
19229
19241
  ] })
19230
19242
  ] }),
@@ -19355,6 +19367,7 @@ import { useState as useState70 } from "react";
19355
19367
  import { jsx as jsx209, jsxs as jsxs118 } from "react/jsx-runtime";
19356
19368
  function TotpAuthenticatorList({ authenticators, onDelete }) {
19357
19369
  const t = useTranslations70();
19370
+ const locale = useI18nLocale();
19358
19371
  const [deletingId, setDeletingId] = useState70(null);
19359
19372
  const handleDelete = /* @__PURE__ */ __name(async (id) => {
19360
19373
  setDeletingId(id);
@@ -19381,7 +19394,7 @@ function TotpAuthenticatorList({ authenticators, onDelete }) {
19381
19394
  auth.lastUsedAt && /* @__PURE__ */ jsxs118("p", { className: "text-xs text-muted-foreground", children: [
19382
19395
  t("auth.two_factor.last_used"),
19383
19396
  ": ",
19384
- auth.lastUsedAt.toLocaleDateString()
19397
+ auth.lastUsedAt.toLocaleDateString(locale)
19385
19398
  ] })
19386
19399
  ] })
19387
19400
  ] }),
@@ -27754,4 +27767,4 @@ export {
27754
27767
  useOAuthClients,
27755
27768
  useOAuthClient
27756
27769
  };
27757
- //# sourceMappingURL=chunk-SVJ6UZPA.mjs.map
27770
+ //# sourceMappingURL=chunk-CIFCO74X.mjs.map