@carlonicora/nextjs-jsonapi 1.140.2 → 1.141.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.
- package/dist/{BlockNoteEditor-WLZU6FDU.js → BlockNoteEditor-HTTA7FIH.js} +9 -9
- package/dist/{BlockNoteEditor-WLZU6FDU.js.map → BlockNoteEditor-HTTA7FIH.js.map} +1 -1
- package/dist/{BlockNoteEditor-5ZEC7GOM.mjs → BlockNoteEditor-UNYOBY7K.mjs} +2 -2
- package/dist/billing/index.js +310 -310
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-LB5B5KYF.mjs → chunk-7TKD4SMQ.mjs} +32 -10
- package/dist/chunk-7TKD4SMQ.mjs.map +1 -0
- package/dist/{chunk-B6YG6SJ6.js → chunk-QCLR35VY.js} +31 -9
- package/dist/chunk-QCLR35VY.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +8 -1
- package/dist/components/index.d.ts +8 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -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/package.json +1 -1
- package/src/components/forms/FileUploader.tsx +46 -8
- package/dist/chunk-B6YG6SJ6.js.map +0 -1
- package/dist/chunk-LB5B5KYF.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-5ZEC7GOM.mjs.map → BlockNoteEditor-UNYOBY7K.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -9842,7 +9842,10 @@ import {
|
|
|
9842
9842
|
useRef as useRef16,
|
|
9843
9843
|
useState as useState24
|
|
9844
9844
|
} from "react";
|
|
9845
|
-
import {
|
|
9845
|
+
import {
|
|
9846
|
+
ErrorCode,
|
|
9847
|
+
useDropzone
|
|
9848
|
+
} from "react-dropzone";
|
|
9846
9849
|
import { jsx as jsx85, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
9847
9850
|
var FileUploaderContext = createContext11(null);
|
|
9848
9851
|
var useFileUpload = /* @__PURE__ */ __name(() => {
|
|
@@ -9853,7 +9856,18 @@ var useFileUpload = /* @__PURE__ */ __name(() => {
|
|
|
9853
9856
|
return context;
|
|
9854
9857
|
}, "useFileUpload");
|
|
9855
9858
|
var FileUploader = forwardRef6(
|
|
9856
|
-
({
|
|
9859
|
+
({
|
|
9860
|
+
className,
|
|
9861
|
+
dropzoneOptions,
|
|
9862
|
+
value,
|
|
9863
|
+
onValueChange,
|
|
9864
|
+
reSelect,
|
|
9865
|
+
orientation = "vertical",
|
|
9866
|
+
children,
|
|
9867
|
+
dir,
|
|
9868
|
+
onFilesRejected,
|
|
9869
|
+
...props
|
|
9870
|
+
}, ref) => {
|
|
9857
9871
|
const [isFileTooBig, setIsFileTooBig] = useState24(false);
|
|
9858
9872
|
const [isLOF, setIsLOF] = useState24(false);
|
|
9859
9873
|
const [activeIndex, setActiveIndex] = useState24(-1);
|
|
@@ -9920,12 +9934,20 @@ var FileUploader = forwardRef6(
|
|
|
9920
9934
|
if (reSelectAll) {
|
|
9921
9935
|
newValues.splice(0, newValues.length);
|
|
9922
9936
|
}
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
});
|
|
9937
|
+
const remaining = Math.max(0, maxFiles - newValues.length);
|
|
9938
|
+
const admitted = files.slice(0, remaining);
|
|
9939
|
+
const overflow = files.slice(remaining);
|
|
9940
|
+
admitted.forEach((file) => newValues.push(file));
|
|
9928
9941
|
onValueChange(newValues);
|
|
9942
|
+
if (onFilesRejected) {
|
|
9943
|
+
const overflowRejections = overflow.map((file) => ({
|
|
9944
|
+
file,
|
|
9945
|
+
errors: [{ code: ErrorCode.TooManyFiles, message: `Too many files. Only ${maxFiles} allowed.` }]
|
|
9946
|
+
}));
|
|
9947
|
+
const allRejections = [...rejectedFiles, ...overflowRejections];
|
|
9948
|
+
if (allRejections.length > 0) onFilesRejected(allRejections);
|
|
9949
|
+
return;
|
|
9950
|
+
}
|
|
9929
9951
|
if (rejectedFiles.length > 0) {
|
|
9930
9952
|
for (let i = 0; i < rejectedFiles.length; i++) {
|
|
9931
9953
|
if (rejectedFiles[i].errors[0]?.code === "file-too-large") {
|
|
@@ -9943,7 +9965,7 @@ var FileUploader = forwardRef6(
|
|
|
9943
9965
|
}
|
|
9944
9966
|
}
|
|
9945
9967
|
},
|
|
9946
|
-
[reSelectAll, value]
|
|
9968
|
+
[reSelectAll, value, maxFiles, maxSize, onValueChange, onFilesRejected, t]
|
|
9947
9969
|
);
|
|
9948
9970
|
useEffect19(() => {
|
|
9949
9971
|
if (!value) return;
|
|
@@ -10131,7 +10153,7 @@ import { useRef as useRef17 } from "react";
|
|
|
10131
10153
|
import dynamic from "next/dynamic";
|
|
10132
10154
|
import React17 from "react";
|
|
10133
10155
|
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
10134
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10156
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-UNYOBY7K.mjs"), {
|
|
10135
10157
|
ssr: false
|
|
10136
10158
|
});
|
|
10137
10159
|
var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -23917,4 +23939,4 @@ export {
|
|
|
23917
23939
|
useOAuthClients,
|
|
23918
23940
|
useOAuthClient
|
|
23919
23941
|
};
|
|
23920
|
-
//# sourceMappingURL=chunk-
|
|
23942
|
+
//# sourceMappingURL=chunk-7TKD4SMQ.mjs.map
|