@carlonicora/nextjs-jsonapi 3.3.5 → 3.3.7

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.
@@ -9351,6 +9351,13 @@ import { CalendarIcon as CalendarIcon2 } from "lucide-react";
9351
9351
  import { useTranslations as useTranslations15 } from "next-intl";
9352
9352
  import { useEffect as useEffect15, useState as useState21 } from "react";
9353
9353
  import { Fragment as Fragment9, jsx as jsx84, jsxs as jsxs47 } from "react/jsx-runtime";
9354
+ function nextDateRange(params) {
9355
+ const { current, computed, triggerDate } = params;
9356
+ if (!computed) return void 0;
9357
+ if (current?.from && current?.to) return { from: triggerDate, to: void 0 };
9358
+ return computed;
9359
+ }
9360
+ __name(nextDateRange, "nextDateRange");
9354
9361
  function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth }) {
9355
9362
  const t = useTranslations15();
9356
9363
  const dateFnsLocale = useI18nDateFnsLocale();
@@ -9373,16 +9380,8 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9373
9380
  setOpen(false);
9374
9381
  }
9375
9382
  }, [date, prevRange, onDateChange]);
9376
- const handleSelect = /* @__PURE__ */ __name((range) => {
9377
- if (!range) {
9378
- setDate(void 0);
9379
- return;
9380
- }
9381
- if (range.from && (!date?.from || range.from.getTime() !== date.from.getTime())) {
9382
- setDate({ from: range.from, to: void 0 });
9383
- } else {
9384
- setDate(range);
9385
- }
9383
+ const handleSelect = /* @__PURE__ */ __name((range, triggerDate) => {
9384
+ setDate(nextDateRange({ current: date, computed: range, triggerDate }));
9386
9385
  }, "handleSelect");
9387
9386
  if (!mounted) {
9388
9387
  return /* @__PURE__ */ jsx84("div", { className: cn("grid gap-2"), children: /* @__PURE__ */ jsxs47(
@@ -10227,7 +10226,7 @@ import { useRef as useRef17 } from "react";
10227
10226
  import dynamic from "next/dynamic";
10228
10227
  import React17 from "react";
10229
10228
  import { jsx as jsx88 } from "react/jsx-runtime";
10230
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-BXA6SDVC.mjs"), {
10229
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-BYMRWUVG.mjs"), {
10231
10230
  ssr: false
10232
10231
  });
10233
10232
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -25245,6 +25244,7 @@ export {
25245
25244
  CommonAddTrigger,
25246
25245
  CurrencyInput,
25247
25246
  DatePickerPopover,
25247
+ nextDateRange,
25248
25248
  DateRangeSelector,
25249
25249
  useEditorDialog,
25250
25250
  EditorSheet,
@@ -25442,4 +25442,4 @@ export {
25442
25442
  useOAuthClients,
25443
25443
  useOAuthClient
25444
25444
  };
25445
- //# sourceMappingURL=chunk-JBTGGZ3K.mjs.map
25445
+ //# sourceMappingURL=chunk-CFZW6GU4.mjs.map