@carlonicora/nextjs-jsonapi 1.101.4 → 1.102.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-YTSZZ27G.mjs"), {
9497
9513
  ssr: false
9498
9514
  });
9499
9515
  var BlockNoteEditorContainer = React14.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -22408,4 +22424,4 @@ export {
22408
22424
  useOAuthClients,
22409
22425
  useOAuthClient
22410
22426
  };
22411
- //# sourceMappingURL=chunk-V6ICQB5I.mjs.map
22427
+ //# sourceMappingURL=chunk-C2RBYYRW.mjs.map