@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.
- package/dist/{BlockNoteEditor-BXA6SDVC.mjs → BlockNoteEditor-BYMRWUVG.mjs} +2 -2
- package/dist/{BlockNoteEditor-BWC7JDVK.js → BlockNoteEditor-USRMFZGP.js} +9 -9
- package/dist/{BlockNoteEditor-BWC7JDVK.js.map → BlockNoteEditor-USRMFZGP.js.map} +1 -1
- package/dist/billing/index.js +333 -333
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-PXXVAY7N.js → chunk-5WFYQE22.js} +232 -232
- package/dist/chunk-5WFYQE22.js.map +1 -0
- package/dist/{chunk-JBTGGZ3K.mjs → chunk-CFZW6GU4.mjs} +12 -12
- package/dist/chunk-CFZW6GU4.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +26 -1
- package/dist/components/index.d.ts +26 -1
- package/dist/components/index.js +4 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +75 -75
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/forms/DateRangeSelector.tsx +36 -12
- package/src/components/forms/__tests__/DateRangeSelector.spec.ts +77 -0
- package/dist/chunk-JBTGGZ3K.mjs.map +0 -1
- package/dist/chunk-PXXVAY7N.js.map +0 -1
- /package/dist/{BlockNoteEditor-BXA6SDVC.mjs.map → BlockNoteEditor-BYMRWUVG.mjs.map} +0 -0
|
@@ -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
|
-
|
|
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-
|
|
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-
|
|
25445
|
+
//# sourceMappingURL=chunk-CFZW6GU4.mjs.map
|