@carlonicora/nextjs-jsonapi 1.121.0 → 1.122.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.
@@ -9023,6 +9023,7 @@ function EditorSheet({
9023
9023
  dialogOpen,
9024
9024
  onDialogOpenChange,
9025
9025
  renderFooter,
9026
+ actions,
9026
9027
  children
9027
9028
  }) {
9028
9029
  const t = useTranslations13();
@@ -9070,6 +9071,8 @@ function EditorSheet({
9070
9071
  },
9071
9072
  [onSubmit, setOpen, onSuccess, onSaved, onRevalidate, onNavigate, generateUrl, module, isEdit, propagateChanges, t]
9072
9073
  );
9074
+ const headerTitle = titleOverride ?? (isEdit ? t("common.edit.update.title", { type: entityType }) : t("common.edit.create.title", { type: entityType }));
9075
+ const headerDescription = descriptionOverride ?? (isEdit ? t("common.edit.update.description", { type: entityType, name: entityName ?? "" }) : t("common.edit.create.description", { type: entityType }));
9073
9076
  return /* @__PURE__ */ jsxs41(Fragment9, { children: [
9074
9077
  /* @__PURE__ */ jsxs41(Sheet, { open, onOpenChange: handleOpenChange, children: [
9075
9078
  dialogOpen === void 0 && forceShow === void 0 && (trigger ? (
@@ -9091,10 +9094,19 @@ function EditorSheet({
9091
9094
  }
9092
9095
  ) : /* @__PURE__ */ jsx71(Button, { render: /* @__PURE__ */ jsx71("div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("ui.buttons.create") }) })),
9093
9096
  /* @__PURE__ */ jsxs41(SheetContent, { side: "right", className: sizeClasses[size], children: [
9094
- /* @__PURE__ */ jsxs41(SheetHeader, { className: "border-b px-6 py-4", children: [
9095
- /* @__PURE__ */ jsx71(SheetTitle, { children: titleOverride ?? (isEdit ? t("common.edit.update.title", { type: entityType }) : t("common.edit.create.title", { type: entityType })) }),
9096
- /* @__PURE__ */ jsx71(SheetDescription, { children: descriptionOverride ?? (isEdit ? t("common.edit.update.description", { type: entityType, name: entityName ?? "" }) : t("common.edit.create.description", { type: entityType })) })
9097
- ] }),
9097
+ /* @__PURE__ */ jsx71(SheetHeader, { className: "border-b px-6 py-4", children: actions ? (
9098
+ // pr-10 clears the SheetContent close button (absolute top-4 right-4).
9099
+ /* @__PURE__ */ jsxs41("div", { className: "flex items-start justify-between gap-x-4 pr-10", children: [
9100
+ /* @__PURE__ */ jsxs41("div", { className: "flex min-w-0 flex-col gap-y-1.5", children: [
9101
+ /* @__PURE__ */ jsx71(SheetTitle, { children: headerTitle }),
9102
+ /* @__PURE__ */ jsx71(SheetDescription, { children: headerDescription })
9103
+ ] }),
9104
+ /* @__PURE__ */ jsx71("div", { className: "flex shrink-0 items-center gap-x-2", children: actions })
9105
+ ] })
9106
+ ) : /* @__PURE__ */ jsxs41(Fragment9, { children: [
9107
+ /* @__PURE__ */ jsx71(SheetTitle, { children: headerTitle }),
9108
+ /* @__PURE__ */ jsx71(SheetDescription, { children: headerDescription })
9109
+ ] }) }),
9098
9110
  /* @__PURE__ */ jsx71(Form, { ...form, children: /* @__PURE__ */ jsxs41(
9099
9111
  "form",
9100
9112
  {
@@ -9801,7 +9813,7 @@ import { useRef as useRef15 } from "react";
9801
9813
  import dynamic from "next/dynamic";
9802
9814
  import React17 from "react";
9803
9815
  import { jsx as jsx77 } from "react/jsx-runtime";
9804
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-ZDSKVOWD.mjs"), {
9816
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-AY23XLHO.mjs"), {
9805
9817
  ssr: false
9806
9818
  });
9807
9819
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -10661,7 +10673,7 @@ function FormSelect({
10661
10673
  field.onChange(actual);
10662
10674
  if (onChange) onChange(actual);
10663
10675
  },
10664
- value: field.value || (allowEmpty ? EMPTY_VALUE : field.value),
10676
+ value: field.value || (allowEmpty ? EMPTY_VALUE : ""),
10665
10677
  disabled,
10666
10678
  "data-testid": testId,
10667
10679
  children: [
@@ -23107,4 +23119,4 @@ export {
23107
23119
  useOAuthClients,
23108
23120
  useOAuthClient
23109
23121
  };
23110
- //# sourceMappingURL=chunk-DMG6R3Y4.mjs.map
23122
+ //# sourceMappingURL=chunk-IRVHKT5I.mjs.map