@carlonicora/nextjs-jsonapi 1.124.0 → 1.124.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.
@@ -47,7 +47,7 @@ import {
47
47
  TabsList,
48
48
  TabsTrigger,
49
49
  useCurrentUserContext
50
- } from "../chunk-RSIVJ3VJ.mjs";
50
+ } from "../chunk-5FQJB5QR.mjs";
51
51
  import {
52
52
  getRoleId,
53
53
  getStripePublishableKey
@@ -9363,15 +9363,15 @@ function useEditorDialog(isFormDirty, options) {
9363
9363
  setOpen(options.dialogOpen);
9364
9364
  }
9365
9365
  }, [options?.dialogOpen]);
9366
+ const onDialogOpenChangeRef = useRef13(options?.onDialogOpenChange);
9367
+ onDialogOpenChangeRef.current = options?.onDialogOpenChange;
9366
9368
  useEffect20(() => {
9367
9369
  if (syncingFromProp.current) {
9368
9370
  syncingFromProp.current = false;
9369
9371
  return;
9370
9372
  }
9371
- if (typeof options?.onDialogOpenChange === "function") {
9372
- options.onDialogOpenChange(open);
9373
- }
9374
- }, [open, options?.onDialogOpenChange]);
9373
+ onDialogOpenChangeRef.current?.(open);
9374
+ }, [open]);
9375
9375
  useEffect20(() => {
9376
9376
  if (options?.forceShow) setOpen(true);
9377
9377
  }, [options?.forceShow]);
@@ -9485,7 +9485,7 @@ function EditorSheet({
9485
9485
  await onSuccess();
9486
9486
  } else if (result) {
9487
9487
  onRevalidate?.(generateUrl({ page: module, id: result.id, language: "[locale]" }));
9488
- if (isEdit && propagateChanges) {
9488
+ if (propagateChanges) {
9489
9489
  propagateChanges(result);
9490
9490
  } else {
9491
9491
  onNavigate?.(generateUrl({ page: module, id: result.id }));
@@ -10056,7 +10056,7 @@ import { useRef as useRef17 } from "react";
10056
10056
  import dynamic from "next/dynamic";
10057
10057
  import React17 from "react";
10058
10058
  import { jsx as jsx78 } from "react/jsx-runtime";
10059
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-JSY65RSG.mjs"), {
10059
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-4HYQUEYC.mjs"), {
10060
10060
  ssr: false
10061
10061
  });
10062
10062
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -14655,19 +14655,19 @@ function RoundPageContainer({
14655
14655
  }
14656
14656
  return /* @__PURE__ */ jsxs92(Fragment23, { children: [
14657
14657
  /* @__PURE__ */ jsx154(Header, { leftContent: headerLeftContent, className: "bg-sidebar border-0", children: headerChildren }),
14658
- /* @__PURE__ */ jsx154("div", { className: cn(`flex h-[calc(100vh-3rem)] w-full flex-col`, isMobile ? "p-1 pt-0" : "p-2 pt-0 pl-0"), children: /* @__PURE__ */ jsx154("div", { className: "bg-background flex h-full w-full rounded-lg border p-0", children: /* @__PURE__ */ jsxs92("div", { className: "flex w-full flex-col", children: [
14659
- (!fullWidth || forceHeader) && /* @__PURE__ */ jsx154(
14660
- RoundPageContainerTitle,
14661
- {
14662
- module,
14663
- details,
14664
- showDetails,
14665
- setShowDetails,
14666
- fullWidth
14667
- }
14668
- ),
14669
- /* @__PURE__ */ jsxs92("div", { className: "flex h-full w-full overflow-hidden", children: [
14670
- layout2 === "rail" && tabs ? (
14658
+ /* @__PURE__ */ jsx154("div", { className: cn(`flex h-[calc(100vh-3rem)] w-full flex-col`, isMobile ? "p-1 pt-0" : "p-2 pt-0 pl-0"), children: /* @__PURE__ */ jsxs92("div", { className: "bg-background flex h-full w-full rounded-lg border p-0", children: [
14659
+ /* @__PURE__ */ jsxs92("div", { className: "flex w-full flex-col", children: [
14660
+ (!fullWidth || forceHeader) && /* @__PURE__ */ jsx154(
14661
+ RoundPageContainerTitle,
14662
+ {
14663
+ module,
14664
+ details,
14665
+ showDetails,
14666
+ setShowDetails,
14667
+ fullWidth
14668
+ }
14669
+ ),
14670
+ /* @__PURE__ */ jsx154("div", { className: "flex h-full w-full overflow-hidden", children: layout2 === "rail" && tabs ? (
14671
14671
  // Rail layout: the vertical-tab navigation is a flush-left
14672
14672
  // sidebar of the card and the content fills the full remaining
14673
14673
  // width (like `fullWidth`) — NOT the centred max-w-6xl column.
@@ -14814,22 +14814,22 @@ function RoundPageContainer({
14814
14814
  }
14815
14815
  )
14816
14816
  }
14817
- ),
14818
- details && (isMobile ? /* @__PURE__ */ jsx154(Sheet, { open: showDetails, onOpenChange: setShowDetails, children: /* @__PURE__ */ jsxs92(SheetContent, { side: "right", children: [
14819
- /* @__PURE__ */ jsx154(SheetHeader, { children: /* @__PURE__ */ jsx154(SheetTitle, { children: "Details" }) }),
14820
- /* @__PURE__ */ jsx154("div", { className: "overflow-y-auto p-6 pt-0", children: details })
14821
- ] }) }) : /* @__PURE__ */ jsx154(
14822
- "div",
14823
- {
14824
- className: cn(
14825
- "h-full shrink-0 overflow-hidden overflow-y-auto transition-all duration-300 ease-in-out",
14826
- showDetails ? "w-96 border-l p-4 opacity-100" : "ml-0 w-0 border-l-0 p-0 opacity-0"
14827
- ),
14828
- children: details
14829
- }
14830
- ))
14831
- ] })
14832
- ] }) }) })
14817
+ ) })
14818
+ ] }),
14819
+ details && (isMobile ? /* @__PURE__ */ jsx154(Sheet, { open: showDetails, onOpenChange: setShowDetails, children: /* @__PURE__ */ jsxs92(SheetContent, { side: "right", children: [
14820
+ /* @__PURE__ */ jsx154(SheetHeader, { children: /* @__PURE__ */ jsx154(SheetTitle, { children: "Details" }) }),
14821
+ /* @__PURE__ */ jsx154("div", { className: "overflow-y-auto p-6 pt-0", children: details })
14822
+ ] }) }) : /* @__PURE__ */ jsx154(
14823
+ "div",
14824
+ {
14825
+ className: cn(
14826
+ "h-full shrink-0 overflow-hidden overflow-y-auto transition-all duration-300 ease-in-out",
14827
+ showDetails ? "w-96 border-l p-4 opacity-100" : "ml-0 w-0 border-l-0 p-0 opacity-0"
14828
+ ),
14829
+ children: details
14830
+ }
14831
+ ))
14832
+ ] }) })
14833
14833
  ] });
14834
14834
  }
14835
14835
  __name(RoundPageContainer, "RoundPageContainer");
@@ -23400,4 +23400,4 @@ export {
23400
23400
  useOAuthClients,
23401
23401
  useOAuthClient
23402
23402
  };
23403
- //# sourceMappingURL=chunk-RSIVJ3VJ.mjs.map
23403
+ //# sourceMappingURL=chunk-5FQJB5QR.mjs.map