@carlonicora/nextjs-jsonapi 1.54.1 → 1.55.1

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.
@@ -174,7 +174,8 @@ function useUrlRewriter() {
174
174
  id: params.id,
175
175
  childPage: params.childPage,
176
176
  childId: params.childId,
177
- language: locale
177
+ language: locale,
178
+ additionalParameters: params.additionalParameters
178
179
  })
179
180
  );
180
181
  },
@@ -8343,7 +8344,7 @@ __name(FormCheckbox, "FormCheckbox");
8343
8344
  import dynamic from "next/dynamic";
8344
8345
  import React14 from "react";
8345
8346
  import { jsx as jsx67 } from "react/jsx-runtime";
8346
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-Y5Q25O4P.mjs"), {
8347
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-IKOGDWDQ.mjs"), {
8347
8348
  ssr: false
8348
8349
  });
8349
8350
  var BlockNoteEditorContainer = React14.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -11814,11 +11815,16 @@ function RoundPageContainerTitle({
11814
11815
  __name(RoundPageContainerTitle, "RoundPageContainerTitle");
11815
11816
 
11816
11817
  // src/components/containers/RoundPageContainer.tsx
11818
+ import { useSearchParams } from "next/navigation";
11817
11819
  import { useState as useState39 } from "react";
11818
11820
  import { Fragment as Fragment16, jsx as jsx129, jsxs as jsxs75 } from "react/jsx-runtime";
11819
- function RoundPageContainer({ module, details, tabs, children, fullWidth }) {
11821
+ function RoundPageContainer({ module, id, details, tabs, children, fullWidth }) {
11820
11822
  const headerChildren = useHeaderChildren();
11821
11823
  const [showDetails, setShowDetails] = useState39(false);
11824
+ const searchParams = useSearchParams();
11825
+ const section = searchParams.get("section");
11826
+ const rewriteUrl = useUrlRewriter();
11827
+ const defaultValue = tabs ? section && tabs.find((i) => i.key?.name === section)?.key || tabs[0].key : void 0;
11822
11828
  return /* @__PURE__ */ jsxs75(Fragment16, { children: [
11823
11829
  /* @__PURE__ */ jsx129(Header, { className: "bg-sidebar border-0", children: headerChildren }),
11824
11830
  /* @__PURE__ */ jsx129("div", { className: "flex h-[calc(100vh-3rem)] w-full flex-col p-2 pt-0 pl-0", children: /* @__PURE__ */ jsx129("div", { className: "bg-background flex h-full w-full rounded-lg border p-0", children: /* @__PURE__ */ jsxs75("div", { className: "flex w-full flex-col", children: [
@@ -11832,10 +11838,18 @@ function RoundPageContainer({ module, details, tabs, children, fullWidth }) {
11832
11838
  }
11833
11839
  ),
11834
11840
  /* @__PURE__ */ jsxs75("div", { className: "flex h-full w-full overflow-hidden", children: [
11835
- tabs ? /* @__PURE__ */ jsxs75(Tabs, { defaultValue: tabs[0].label, className: "w-full", children: [
11836
- /* @__PURE__ */ jsx129("div", { className: "p-4", children: /* @__PURE__ */ jsx129(TabsList, { className: ``, children: tabs.map((tab) => /* @__PURE__ */ jsx129(TabsTrigger, { value: tab.label, className: `px-4`, children: tab.contentLabel ?? tab.label }, tab.label)) }) }),
11837
- /* @__PURE__ */ jsx129("div", { className: "flex w-full overflow-y-auto px-4", children: tabs.map((tab) => /* @__PURE__ */ jsx129(TabsContent, { value: tab.label, className: `pb-20`, children: tab.content }, tab.label)) })
11838
- ] }) : /* @__PURE__ */ jsx129(Fragment16, { children: children && /* @__PURE__ */ jsx129("div", { className: cn(`grow overflow-y-auto p-4`, fullWidth && `p-0`), children: /* @__PURE__ */ jsx129("div", { className: cn(`mx-auto max-w-6xl space-y-12 p-8`, fullWidth && `max-w-full w-full p-0`), children }) }) }),
11841
+ /* @__PURE__ */ jsx129("div", { className: cn(`grow overflow-y-auto p-4`, fullWidth && `p-0`), children: /* @__PURE__ */ jsx129("div", { className: cn(`mx-auto max-w-6xl space-y-12 p-8`, fullWidth && `max-w-full w-full p-0`), children: tabs ? /* @__PURE__ */ jsxs75(
11842
+ Tabs,
11843
+ {
11844
+ defaultValue,
11845
+ className: "w-full",
11846
+ onValueChange: (key) => module && id && rewriteUrl({ page: module, id, additionalParameters: { section: key } }),
11847
+ children: [
11848
+ /* @__PURE__ */ jsx129("div", { className: "p-4", children: /* @__PURE__ */ jsx129(TabsList, { className: ``, children: tabs.map((tab) => /* @__PURE__ */ jsx129(TabsTrigger, { value: tab.label, className: `px-4`, children: tab.contentLabel ?? tab.label }, tab.label)) }) }),
11849
+ /* @__PURE__ */ jsx129("div", { className: "flex w-full overflow-y-auto px-4", children: tabs.map((tab) => /* @__PURE__ */ jsx129(TabsContent, { value: tab.label, className: `pb-20`, children: tab.content }, tab.label)) })
11850
+ ]
11851
+ }
11852
+ ) : children }) }),
11839
11853
  details && /* @__PURE__ */ jsx129(
11840
11854
  "div",
11841
11855
  {
@@ -11906,7 +11920,7 @@ __name(TabsContainer, "TabsContainer");
11906
11920
  import { jsx as jsx131, jsxs as jsxs77 } from "react/jsx-runtime";
11907
11921
  function AttributeElement({ inline, title, value, className }) {
11908
11922
  return /* @__PURE__ */ jsxs77("div", { className: cn(`flex ${inline === true ? "flex-row" : "flex-col"} my-1 justify-start`, className), children: [
11909
- title && /* @__PURE__ */ jsx131("div", { className: `${inline === true ? "min-w-48 pr-4" : "w-full"} text-sm font-semibold`, children: title }),
11923
+ title && /* @__PURE__ */ jsx131("div", { className: `${inline === true ? "min-w-48 pr-4" : "w-full"} text-xs text-muted-foreground`, children: title }),
11910
11924
  value && /* @__PURE__ */ jsx131("div", { className: "flex w-full flex-col text-sm", children: value })
11911
11925
  ] });
11912
11926
  }
@@ -13633,7 +13647,7 @@ import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
13633
13647
  import { Loader2 as Loader24 } from "lucide-react";
13634
13648
  import { useTranslations as useTranslations49 } from "next-intl";
13635
13649
  import Image8 from "next/image";
13636
- import { useSearchParams } from "next/navigation";
13650
+ import { useSearchParams as useSearchParams2 } from "next/navigation";
13637
13651
  import { useEffect as useEffect42, useState as useState49 } from "react";
13638
13652
  import { useForm as useForm4 } from "react-hook-form";
13639
13653
  import { v4 as v44 } from "uuid";
@@ -13702,7 +13716,7 @@ __name(buildOAuthQueryParams, "buildOAuthQueryParams");
13702
13716
  function Register() {
13703
13717
  const t = useTranslations49();
13704
13718
  const { setComponentType } = useAuthContext();
13705
- const searchParams = useSearchParams();
13719
+ const searchParams = useSearchParams2();
13706
13720
  const inviteCode = searchParams.get("invite");
13707
13721
  const registrationMode = getRegistrationMode();
13708
13722
  const [showConfirmation, setShowConfirmation] = useState49(false);
@@ -15105,7 +15119,7 @@ __name(ForgotPassword, "ForgotPassword");
15105
15119
  import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
15106
15120
  import { useTranslations as useTranslations61 } from "next-intl";
15107
15121
  import Image14 from "next/image";
15108
- import { useRouter, useSearchParams as useSearchParams2 } from "next/navigation";
15122
+ import { useRouter, useSearchParams as useSearchParams3 } from "next/navigation";
15109
15123
  import { useEffect as useEffect48, useState as useState63 } from "react";
15110
15124
  import { useForm as useForm7 } from "react-hook-form";
15111
15125
  import { z as z7 } from "zod";
@@ -15117,7 +15131,7 @@ function Login() {
15117
15131
  const generateUrl = usePageUrlGenerator();
15118
15132
  const i18nRouter = useI18nRouter();
15119
15133
  const nativeRouter = useRouter();
15120
- const searchParams = useSearchParams2();
15134
+ const searchParams = useSearchParams3();
15121
15135
  const callbackUrl = searchParams.get("callbackUrl");
15122
15136
  const [referralCode, setReferralCode2] = useState63(null);
15123
15137
  useEffect48(() => {
@@ -15387,7 +15401,7 @@ __name(ResetPassword, "ResetPassword");
15387
15401
 
15388
15402
  // src/features/auth/components/forms/TwoFactorChallenge.tsx
15389
15403
  import { useTranslations as useTranslations64 } from "next-intl";
15390
- import { useRouter as useRouter2, useSearchParams as useSearchParams3 } from "next/navigation";
15404
+ import { useRouter as useRouter2, useSearchParams as useSearchParams4 } from "next/navigation";
15391
15405
  import { useState as useState66 } from "react";
15392
15406
  import { v4 as v49 } from "uuid";
15393
15407
 
@@ -15442,7 +15456,7 @@ function TwoFactorChallenge() {
15442
15456
  const generateUrl = usePageUrlGenerator();
15443
15457
  const i18nRouter = useI18nRouter();
15444
15458
  const nativeRouter = useRouter2();
15445
- const searchParams = useSearchParams3();
15459
+ const searchParams = useSearchParams4();
15446
15460
  const callbackUrl = searchParams.get("callbackUrl");
15447
15461
  const [isVerifying, setIsVerifying] = useState66(false);
15448
15462
  const [totpError, setTotpError] = useState66();
@@ -15954,7 +15968,7 @@ function PushNotificationProvider({ children }) {
15954
15968
  __name(PushNotificationProvider, "PushNotificationProvider");
15955
15969
 
15956
15970
  // src/features/referral/components/ReferralCodeCapture.tsx
15957
- import { useSearchParams as useSearchParams4 } from "next/navigation";
15971
+ import { useSearchParams as useSearchParams5 } from "next/navigation";
15958
15972
  import { useEffect as useEffect53 } from "react";
15959
15973
 
15960
15974
  // src/features/referral/utils/referral-cookie.ts
@@ -15979,7 +15993,7 @@ __name(getReferralCode2, "getReferralCode");
15979
15993
 
15980
15994
  // src/features/referral/components/ReferralCodeCapture.tsx
15981
15995
  function ReferralCodeCapture() {
15982
- const searchParams = useSearchParams4();
15996
+ const searchParams = useSearchParams5();
15983
15997
  useEffect53(() => {
15984
15998
  if (!isReferralEnabled()) {
15985
15999
  return;
@@ -18734,4 +18748,4 @@ export {
18734
18748
  useOAuthClients,
18735
18749
  useOAuthClient
18736
18750
  };
18737
- //# sourceMappingURL=chunk-MVAUGASJ.mjs.map
18751
+ //# sourceMappingURL=chunk-PHYEALSV.mjs.map