@carlonicora/nextjs-jsonapi 2.1.0 → 2.1.2

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.
@@ -48,7 +48,7 @@ import {
48
48
  TabsList,
49
49
  TabsTrigger,
50
50
  useCurrentUserContext
51
- } from "../chunk-A7AGXKZX.mjs";
51
+ } from "../chunk-B3ELVSTL.mjs";
52
52
  import {
53
53
  getRoleId,
54
54
  getStripePublishableKey
@@ -10165,7 +10165,7 @@ import { useRef as useRef17 } from "react";
10165
10165
  import dynamic from "next/dynamic";
10166
10166
  import React17 from "react";
10167
10167
  import { jsx as jsx86 } from "react/jsx-runtime";
10168
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-NXDUGMP7.mjs"), {
10168
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-DYQ5BLQI.mjs"), {
10169
10169
  ssr: false
10170
10170
  });
10171
10171
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -12177,6 +12177,7 @@ import { Battery, BatteryFull, BatteryLow, BatteryMedium, PlusCircle } from "luc
12177
12177
  import Link2 from "next/link";
12178
12178
  import { useTranslations as useTranslations34 } from "next-intl";
12179
12179
  import { jsx as jsx127, jsxs as jsxs75 } from "react/jsx-runtime";
12180
+ var asWholeCredits = /* @__PURE__ */ __name((value) => Math.trunc(value).toLocaleString(), "asWholeCredits");
12180
12181
  function TokenStatusIndicator({ className, size = "md", showExtraPages = true }) {
12181
12182
  const { company } = useCurrentUserContext();
12182
12183
  const t = useTranslations34();
@@ -12232,9 +12233,9 @@ function TokenStatusIndicator({ className, size = "md", showExtraPages = true })
12232
12233
  ":"
12233
12234
  ] }),
12234
12235
  /* @__PURE__ */ jsxs75("span", { className: cn("font-medium", getStatusColor()), children: [
12235
- availableMonthlyCredits,
12236
+ asWholeCredits(availableMonthlyCredits),
12236
12237
  " / ",
12237
- monthlyCredits
12238
+ asWholeCredits(monthlyCredits)
12238
12239
  ] })
12239
12240
  ] }),
12240
12241
  /* @__PURE__ */ jsxs75("div", { className: "flex items-center justify-between gap-4", children: [
@@ -12254,7 +12255,7 @@ function TokenStatusIndicator({ className, size = "md", showExtraPages = true })
12254
12255
  t("billing.tokens.available_extra", { defaultValue: "Extra Pages" }),
12255
12256
  ":"
12256
12257
  ] }),
12257
- /* @__PURE__ */ jsx127("span", { className: "font-medium text-blue-500", children: availableExtraCredits })
12258
+ /* @__PURE__ */ jsx127("span", { className: "font-medium text-blue-500", children: asWholeCredits(availableExtraCredits) })
12258
12259
  ] }),
12259
12260
  /* @__PURE__ */ jsx127(Link2, { href: "/settings/billing?action=subscribe", className: "w-full flex justify-end my-4", children: /* @__PURE__ */ jsx127(Button, { variant: "outline", size: "sm", children: t("billing.tokens.purchase_extra", { defaultValue: "Purchase additional analysis" }) }) })
12260
12261
  ] })
@@ -12267,10 +12268,10 @@ function TokenStatusIndicator({ className, size = "md", showExtraPages = true })
12267
12268
  "aria-label": t("billing.tokens.status", { defaultValue: "Page Status" }),
12268
12269
  children: [
12269
12270
  getBatteryIcon(),
12270
- /* @__PURE__ */ jsx127("span", { className: cn(textSize, "text-muted-foreground font-medium leading-none"), children: availableMonthlyCredits }),
12271
+ /* @__PURE__ */ jsx127("span", { className: cn(textSize, "text-muted-foreground font-medium leading-none"), children: asWholeCredits(availableMonthlyCredits) }),
12271
12272
  showExtraPages && availableExtraCredits > 0 && /* @__PURE__ */ jsxs75("span", { className: "inline-flex items-center gap-0.5", children: [
12272
12273
  /* @__PURE__ */ jsx127(PlusCircle, { className: cn(smallIconSize, "text-blue-500") }),
12273
- /* @__PURE__ */ jsx127("span", { className: cn(textSize, "text-blue-500 font-medium leading-none"), children: availableExtraCredits })
12274
+ /* @__PURE__ */ jsx127("span", { className: cn(textSize, "text-blue-500 font-medium leading-none"), children: asWholeCredits(availableExtraCredits) })
12274
12275
  ] })
12275
12276
  ]
12276
12277
  }
@@ -16889,7 +16890,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
16889
16890
  (props.functions || props.filters || allowSearch) && /* @__PURE__ */ jsxs102(Fragment28, { children: [
16890
16891
  props.functions,
16891
16892
  props.filters,
16892
- /* @__PURE__ */ jsx180(ContentTableSearch, { data })
16893
+ allowSearch !== false && /* @__PURE__ */ jsx180(ContentTableSearch, { data })
16893
16894
  ] })
16894
16895
  ] })
16895
16896
  }
@@ -24326,4 +24327,4 @@ export {
24326
24327
  useOAuthClients,
24327
24328
  useOAuthClient
24328
24329
  };
24329
- //# sourceMappingURL=chunk-A7AGXKZX.mjs.map
24330
+ //# sourceMappingURL=chunk-B3ELVSTL.mjs.map