@carlonicora/nextjs-jsonapi 6.29.1 → 6.30.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-K4HWQLPJ.js → BlockNoteEditor-FTRTY4YJ.js} +15 -15
- package/dist/{BlockNoteEditor-K4HWQLPJ.js.map → BlockNoteEditor-FTRTY4YJ.js.map} +1 -1
- package/dist/{BlockNoteEditor-TDX2RC7I.mjs → BlockNoteEditor-SQQF7OCY.mjs} +2 -2
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-OVSR72CZ.mjs → chunk-MNN6MTEN.mjs} +183 -178
- package/dist/{chunk-QI4SCGPB.js.map → chunk-MNN6MTEN.mjs.map} +1 -1
- package/dist/{chunk-QI4SCGPB.js → chunk-S4FSGMKX.js} +9 -4
- package/dist/chunk-S4FSGMKX.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/forms/CommonEditorButtons.d.ts.map +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/dist/email-automations/index.js +78 -78
- package/dist/email-automations/index.mjs +1 -1
- package/dist/features/analytics/index.js +107 -107
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/blog/index.js +93 -93
- package/dist/features/blog/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 +102 -102
- package/dist/features/tokenusage/index.mjs +1 -1
- package/messages/en.json +1 -0
- package/messages/it.json +1 -0
- package/package.json +1 -1
- package/src/components/forms/CommonEditorButtons.tsx +16 -2
- package/dist/chunk-OVSR72CZ.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-TDX2RC7I.mjs.map → BlockNoteEditor-SQQF7OCY.mjs.map} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { useTranslations } from "next-intl";
|
|
3
|
+
import { Loader2 } from "lucide-react";
|
|
3
4
|
import { Button } from "../../shadcnui";
|
|
4
5
|
|
|
5
6
|
type CommonEditorButtonsProps = {
|
|
@@ -22,6 +23,19 @@ export function CommonEditorButtons({
|
|
|
22
23
|
}: CommonEditorButtonsProps) {
|
|
23
24
|
const t = useTranslations();
|
|
24
25
|
|
|
26
|
+
const submitLabel: ReactNode = form.formState.isSubmitting ? (
|
|
27
|
+
<>
|
|
28
|
+
<Loader2 className="h-4 w-4 animate-spin" />
|
|
29
|
+
{t(`ui.buttons.saving`)}
|
|
30
|
+
</>
|
|
31
|
+
) : buttonTitle ? (
|
|
32
|
+
buttonTitle
|
|
33
|
+
) : isEdit ? (
|
|
34
|
+
t(`ui.buttons.confirm_update`)
|
|
35
|
+
) : (
|
|
36
|
+
t(`ui.buttons.confirm_create`)
|
|
37
|
+
);
|
|
38
|
+
|
|
25
39
|
if (centerButtons) {
|
|
26
40
|
return (
|
|
27
41
|
<div className="flex w-full items-center justify-between gap-x-2">
|
|
@@ -33,7 +47,7 @@ export function CommonEditorButtons({
|
|
|
33
47
|
|
|
34
48
|
{!hideSubmit ? (
|
|
35
49
|
<Button type="submit" disabled={form.formState.isSubmitting || disabled} data-testid={`modal-button-create`}>
|
|
36
|
-
{
|
|
50
|
+
{submitLabel}
|
|
37
51
|
</Button>
|
|
38
52
|
) : (
|
|
39
53
|
<div />
|
|
@@ -56,7 +70,7 @@ export function CommonEditorButtons({
|
|
|
56
70
|
|
|
57
71
|
{!hideSubmit && (
|
|
58
72
|
<Button type="submit" disabled={form.formState.isSubmitting || disabled} data-testid={`modal-button-create`}>
|
|
59
|
-
{
|
|
73
|
+
{submitLabel}
|
|
60
74
|
</Button>
|
|
61
75
|
)}
|
|
62
76
|
</div>
|