@carlonicora/nextjs-jsonapi 1.58.1 → 1.58.3
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-I7N4N6MZ.mjs → BlockNoteEditor-N4ZQEQKQ.mjs} +2 -2
- package/dist/{BlockNoteEditor-LPMGYNE7.js → BlockNoteEditor-VZLCGW5U.js} +6 -6
- package/dist/{BlockNoteEditor-LPMGYNE7.js.map → BlockNoteEditor-VZLCGW5U.js.map} +1 -1
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-74TRO667.js → chunk-ASLPUCP2.js} +35 -65
- package/dist/chunk-ASLPUCP2.js.map +1 -0
- package/dist/{chunk-OAJFQZXY.mjs → chunk-EA3LXVPR.mjs} +35 -65
- package/dist/chunk-EA3LXVPR.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -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/package.json +1 -1
- package/src/components/forms/FormDate.tsx +17 -80
- package/src/components/forms/FormInput.tsx +16 -2
- package/src/components/tables/__tests__/ContentListTable.test.tsx +3 -2
- package/dist/chunk-74TRO667.js.map +0 -1
- package/dist/chunk-OAJFQZXY.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-I7N4N6MZ.mjs.map → BlockNoteEditor-N4ZQEQKQ.mjs.map} +0 -0
|
@@ -8368,7 +8368,7 @@ __name(FormCheckbox, "FormCheckbox");
|
|
|
8368
8368
|
import dynamic from "next/dynamic";
|
|
8369
8369
|
import React14 from "react";
|
|
8370
8370
|
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
8371
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
8371
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-N4ZQEQKQ.mjs"), {
|
|
8372
8372
|
ssr: false
|
|
8373
8373
|
});
|
|
8374
8374
|
var BlockNoteEditorContainer = React14.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -8463,15 +8463,6 @@ function FormDate({
|
|
|
8463
8463
|
const currentValue = form.getValues(id);
|
|
8464
8464
|
return currentValue ? formatDate(currentValue) : "";
|
|
8465
8465
|
});
|
|
8466
|
-
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
8467
|
-
const yearOptions = Array.from({ length: currentYear - 1900 + 1 }, (_, i) => 1900 + i);
|
|
8468
|
-
const monthNames = useMemo10(() => {
|
|
8469
|
-
const formatter = new Intl.DateTimeFormat(locale, { month: "long" });
|
|
8470
|
-
return Array.from({ length: 12 }, (_, i) => {
|
|
8471
|
-
const monthName = formatter.format(new Date(2e3, i, 1));
|
|
8472
|
-
return monthName.charAt(0).toUpperCase() + monthName.slice(1);
|
|
8473
|
-
});
|
|
8474
|
-
}, [locale]);
|
|
8475
8466
|
const handleInputChange = /* @__PURE__ */ __name((value, field) => {
|
|
8476
8467
|
setInputValue(value);
|
|
8477
8468
|
const parsedDate = parse2(value, dateFormatPattern, /* @__PURE__ */ new Date());
|
|
@@ -8521,58 +8512,25 @@ function FormDate({
|
|
|
8521
8512
|
)
|
|
8522
8513
|
] })
|
|
8523
8514
|
] }),
|
|
8524
|
-
/* @__PURE__ */ jsx71(PopoverContent, { className: "w-auto p-0", align: "
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
Select,
|
|
8544
|
-
{
|
|
8545
|
-
value: displayMonth.getFullYear().toString(),
|
|
8546
|
-
onValueChange: (value) => {
|
|
8547
|
-
if (!value) return;
|
|
8548
|
-
const newYear = parseInt(value);
|
|
8549
|
-
const newDate = new Date(newYear, displayMonth.getMonth(), 1);
|
|
8550
|
-
setDisplayMonth(newDate);
|
|
8551
|
-
},
|
|
8552
|
-
children: [
|
|
8553
|
-
/* @__PURE__ */ jsx71(SelectTrigger, { className: "w-[80px]", children: /* @__PURE__ */ jsx71(SelectValue, {}) }),
|
|
8554
|
-
/* @__PURE__ */ jsx71(SelectContent, { children: yearOptions.reverse().map((year) => /* @__PURE__ */ jsx71(SelectItem, { value: year.toString(), children: year }, year)) })
|
|
8555
|
-
]
|
|
8556
|
-
}
|
|
8557
|
-
)
|
|
8558
|
-
] }),
|
|
8559
|
-
/* @__PURE__ */ jsx71(
|
|
8560
|
-
Calendar,
|
|
8561
|
-
{
|
|
8562
|
-
mode: "single",
|
|
8563
|
-
selected: field.value,
|
|
8564
|
-
onSelect: (e) => {
|
|
8565
|
-
handleCalendarSelect(e, field);
|
|
8566
|
-
setOpen(false);
|
|
8567
|
-
},
|
|
8568
|
-
disabled: (date) => minDate && date < minDate ? true : false,
|
|
8569
|
-
locale: dateFnsLocale,
|
|
8570
|
-
weekStartsOn: 1,
|
|
8571
|
-
month: displayMonth,
|
|
8572
|
-
onMonthChange: setDisplayMonth
|
|
8573
|
-
}
|
|
8574
|
-
)
|
|
8575
|
-
] }) })
|
|
8515
|
+
/* @__PURE__ */ jsx71(PopoverContent, { className: "w-auto p-0", align: "end", children: /* @__PURE__ */ jsx71(
|
|
8516
|
+
Calendar,
|
|
8517
|
+
{
|
|
8518
|
+
mode: "single",
|
|
8519
|
+
captionLayout: "dropdown",
|
|
8520
|
+
selected: field.value,
|
|
8521
|
+
onSelect: (e) => {
|
|
8522
|
+
handleCalendarSelect(e, field);
|
|
8523
|
+
setOpen(false);
|
|
8524
|
+
},
|
|
8525
|
+
disabled: (date) => minDate && date < minDate ? true : false,
|
|
8526
|
+
locale: dateFnsLocale,
|
|
8527
|
+
weekStartsOn: 1,
|
|
8528
|
+
month: displayMonth,
|
|
8529
|
+
onMonthChange: setDisplayMonth,
|
|
8530
|
+
startMonth: new Date(1900, 0),
|
|
8531
|
+
endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 11)
|
|
8532
|
+
}
|
|
8533
|
+
) })
|
|
8576
8534
|
] }) }) });
|
|
8577
8535
|
}
|
|
8578
8536
|
__name(FormDate, "FormDate");
|
|
@@ -8789,10 +8747,21 @@ function FormInput({
|
|
|
8789
8747
|
field.onBlur();
|
|
8790
8748
|
}, "handleBlur");
|
|
8791
8749
|
const handleChange = /* @__PURE__ */ __name((e) => {
|
|
8792
|
-
if (type === "number"
|
|
8750
|
+
if (type === "number") {
|
|
8793
8751
|
const value = e.target.value.replace(/[^0-9]/g, "");
|
|
8794
8752
|
field.onChange(+value);
|
|
8795
8753
|
if (onChange) onChange(+value);
|
|
8754
|
+
} else if (type === "currency") {
|
|
8755
|
+
let value = e.target.value.replace(/[^0-9.,]/g, "");
|
|
8756
|
+
const firstSep = value.search(/[.,]/);
|
|
8757
|
+
if (firstSep !== -1) {
|
|
8758
|
+
const sep = value[firstSep];
|
|
8759
|
+
const before = value.slice(0, firstSep);
|
|
8760
|
+
const after = value.slice(firstSep + 1).replace(/[.,]/g, "");
|
|
8761
|
+
value = before + sep + after;
|
|
8762
|
+
}
|
|
8763
|
+
field.onChange(value);
|
|
8764
|
+
if (onChange) onChange(value);
|
|
8796
8765
|
} else {
|
|
8797
8766
|
field.onChange(e.target.value);
|
|
8798
8767
|
if (onChange) onChange(e.target.value);
|
|
@@ -8801,7 +8770,8 @@ function FormInput({
|
|
|
8801
8770
|
const inputProps = {
|
|
8802
8771
|
...field,
|
|
8803
8772
|
autoFocus: autoFocus === true,
|
|
8804
|
-
type: type === "
|
|
8773
|
+
type: type === "password" ? "password" : "text",
|
|
8774
|
+
inputMode: type === "number" || type === "currency" ? "decimal" : void 0,
|
|
8805
8775
|
className: `w-full ${type === "number" || type === "currency" ? "text-end" : ""}`,
|
|
8806
8776
|
disabled: disabled === true || form.formState.isSubmitting,
|
|
8807
8777
|
placeholder: placeholder || "",
|
|
@@ -18836,4 +18806,4 @@ export {
|
|
|
18836
18806
|
useOAuthClients,
|
|
18837
18807
|
useOAuthClient
|
|
18838
18808
|
};
|
|
18839
|
-
//# sourceMappingURL=chunk-
|
|
18809
|
+
//# sourceMappingURL=chunk-EA3LXVPR.mjs.map
|