@carlonicora/nextjs-jsonapi 1.101.4 → 1.103.0

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.
@@ -8691,8 +8691,22 @@ __name(CommonDeleter, "CommonDeleter");
8691
8691
  // src/components/forms/CommonEditorButtons.tsx
8692
8692
  import { useTranslations as useTranslations9 } from "next-intl";
8693
8693
  import { jsx as jsx64, jsxs as jsxs36 } from "react/jsx-runtime";
8694
- function CommonEditorButtons({ isEdit, form, disabled, setOpen, hideSubmit }) {
8694
+ function CommonEditorButtons({
8695
+ isEdit,
8696
+ form,
8697
+ disabled,
8698
+ setOpen,
8699
+ hideSubmit,
8700
+ centerButtons
8701
+ }) {
8695
8702
  const t = useTranslations9();
8703
+ if (centerButtons) {
8704
+ return /* @__PURE__ */ jsxs36("div", { className: "flex w-full items-center justify-between gap-x-2", children: [
8705
+ /* @__PURE__ */ jsx64(Button, { variant: "outline", type: `button`, onClick: () => setOpen(false), "data-testid": `modal-button-cancel`, children: t(`ui.buttons.cancel`) }),
8706
+ /* @__PURE__ */ jsx64("div", { className: "flex flex-1 justify-center gap-x-2", children: centerButtons }),
8707
+ !hideSubmit ? /* @__PURE__ */ jsx64(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) }) : /* @__PURE__ */ jsx64("div", {})
8708
+ ] });
8709
+ }
8696
8710
  return /* @__PURE__ */ jsxs36("div", { className: "flex justify-end", children: [
8697
8711
  /* @__PURE__ */ jsx64(
8698
8712
  Button,
@@ -8858,6 +8872,7 @@ function EditorSheet({
8858
8872
  size = "xl",
8859
8873
  disabled,
8860
8874
  hideSubmit,
8875
+ centerButtons,
8861
8876
  trigger,
8862
8877
  forceShow,
8863
8878
  onClose,
@@ -8937,7 +8952,8 @@ function EditorSheet({
8937
8952
  setOpen: handleOpenChange,
8938
8953
  isEdit,
8939
8954
  disabled,
8940
- hideSubmit
8955
+ hideSubmit,
8956
+ centerButtons
8941
8957
  }
8942
8958
  ) })
8943
8959
  ] }) })
@@ -9493,7 +9509,7 @@ import { useRef as useRef15 } from "react";
9493
9509
  import dynamic from "next/dynamic";
9494
9510
  import React14 from "react";
9495
9511
  import { jsx as jsx73 } from "react/jsx-runtime";
9496
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-ONFPSFHP.mjs"), {
9512
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-HXQIR3MJ.mjs"), {
9497
9513
  ssr: false
9498
9514
  });
9499
9515
  var BlockNoteEditorContainer = React14.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -13756,7 +13772,8 @@ function RoundPageContainer({
13756
13772
  tabs,
13757
13773
  children,
13758
13774
  fullWidth,
13759
- forceHeader
13775
+ forceHeader,
13776
+ header
13760
13777
  }) {
13761
13778
  const headerChildren = useHeaderChildren();
13762
13779
  const headerLeftContent = useHeaderLeftContent();
@@ -13825,7 +13842,7 @@ function RoundPageContainer({
13825
13842
  activeFillHeight ? `flex flex-col overflow-hidden` : `overflow-y-auto`,
13826
13843
  fullWidth && `p-0`
13827
13844
  ),
13828
- children: /* @__PURE__ */ jsx147(
13845
+ children: /* @__PURE__ */ jsxs87(
13829
13846
  "div",
13830
13847
  {
13831
13848
  className: cn(
@@ -13833,51 +13850,54 @@ function RoundPageContainer({
13833
13850
  activeFillHeight && `flex w-full flex-1 min-h-0 flex-col space-y-0`,
13834
13851
  fullWidth && `max-w-full w-full p-0 h-full`
13835
13852
  ),
13836
- children: tabs ? /* @__PURE__ */ jsxs87(Fragment22, { children: [
13837
- /* @__PURE__ */ jsxs87(
13838
- Tabs,
13839
- {
13840
- value: activeTab,
13841
- className: cn(`w-full`, activeFillHeight && `flex flex-1 min-h-0 flex-col`),
13842
- onValueChange: handleTabChange,
13843
- children: [
13844
- isMobile ? /* @__PURE__ */ jsx147("div", { className: "p-0", children: /* @__PURE__ */ jsxs87(
13845
- Select,
13846
- {
13847
- value: activeTab,
13848
- onValueChange: (value) => {
13849
- if (value) handleTabChange(value);
13850
- },
13851
- children: [
13852
- /* @__PURE__ */ jsx147(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx147(SelectValue, {}) }),
13853
- /* @__PURE__ */ jsx147(SelectContent, { children: tabs.map((tab) => /* @__PURE__ */ jsx147(SelectItem, { value: tab.key?.name ?? tab.label, children: tab.contentLabel ?? tab.label }, tab.label)) })
13854
- ]
13855
- }
13856
- ) }) : /* @__PURE__ */ jsx147("div", { className: "p-4", children: /* @__PURE__ */ jsx147(TabsList, { children: tabs.map((tab) => /* @__PURE__ */ jsx147(TabsTrigger, { value: tab.key?.name ?? tab.label, className: "px-4", children: tab.contentLabel ?? tab.label }, tab.label)) }) }),
13857
- /* @__PURE__ */ jsx147(
13858
- "div",
13859
- {
13860
- className: cn(
13861
- `flex w-full `,
13862
- isMobile ? `` : `px-4`,
13863
- activeFillHeight ? `flex-1 min-h-0` : `overflow-y-auto`
13864
- ),
13865
- children: tabs.map((tab) => /* @__PURE__ */ jsx147(
13866
- TabsContent,
13867
- {
13868
- value: tab.key?.name ?? tab.label,
13869
- className: tab.fillHeight ? `flex flex-1 min-h-0 w-full flex-col` : `pb-20`,
13870
- children: tab.content
13853
+ children: [
13854
+ header,
13855
+ tabs ? /* @__PURE__ */ jsxs87(Fragment22, { children: [
13856
+ /* @__PURE__ */ jsxs87(
13857
+ Tabs,
13858
+ {
13859
+ value: activeTab,
13860
+ className: cn(`w-full`, activeFillHeight && `flex flex-1 min-h-0 flex-col`),
13861
+ onValueChange: handleTabChange,
13862
+ children: [
13863
+ isMobile ? /* @__PURE__ */ jsx147("div", { className: "p-0", children: /* @__PURE__ */ jsxs87(
13864
+ Select,
13865
+ {
13866
+ value: activeTab,
13867
+ onValueChange: (value) => {
13868
+ if (value) handleTabChange(value);
13871
13869
  },
13872
- tab.label
13873
- ))
13874
- }
13875
- )
13876
- ]
13877
- }
13878
- ),
13879
- children && /* @__PURE__ */ jsx147("div", { className: cn(`flex`, isMobile ? `px-2` : `px-4`), children })
13880
- ] }) : children
13870
+ children: [
13871
+ /* @__PURE__ */ jsx147(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx147(SelectValue, {}) }),
13872
+ /* @__PURE__ */ jsx147(SelectContent, { children: tabs.map((tab) => /* @__PURE__ */ jsx147(SelectItem, { value: tab.key?.name ?? tab.label, children: tab.contentLabel ?? tab.label }, tab.label)) })
13873
+ ]
13874
+ }
13875
+ ) }) : /* @__PURE__ */ jsx147("div", { className: "p-4", children: /* @__PURE__ */ jsx147(TabsList, { children: tabs.map((tab) => /* @__PURE__ */ jsx147(TabsTrigger, { value: tab.key?.name ?? tab.label, className: "px-4", children: tab.contentLabel ?? tab.label }, tab.label)) }) }),
13876
+ /* @__PURE__ */ jsx147(
13877
+ "div",
13878
+ {
13879
+ className: cn(
13880
+ `flex w-full `,
13881
+ isMobile ? `` : `px-4`,
13882
+ activeFillHeight ? `flex-1 min-h-0` : `overflow-y-auto`
13883
+ ),
13884
+ children: tabs.map((tab) => /* @__PURE__ */ jsx147(
13885
+ TabsContent,
13886
+ {
13887
+ value: tab.key?.name ?? tab.label,
13888
+ className: tab.fillHeight ? `flex flex-1 min-h-0 w-full flex-col` : `pb-20`,
13889
+ children: tab.content
13890
+ },
13891
+ tab.label
13892
+ ))
13893
+ }
13894
+ )
13895
+ ]
13896
+ }
13897
+ ),
13898
+ children && /* @__PURE__ */ jsx147("div", { className: cn(`flex`, isMobile ? `px-2` : `px-4`), children })
13899
+ ] }) : children
13900
+ ]
13881
13901
  }
13882
13902
  )
13883
13903
  }
@@ -22408,4 +22428,4 @@ export {
22408
22428
  useOAuthClients,
22409
22429
  useOAuthClient
22410
22430
  };
22411
- //# sourceMappingURL=chunk-V6ICQB5I.mjs.map
22431
+ //# sourceMappingURL=chunk-7ATJEPFQ.mjs.map