@carlonicora/nextjs-jsonapi 1.29.5 → 1.29.6
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-C25QYFYD.mjs → BlockNoteEditor-4NQ5LSD6.mjs} +4 -4
- package/dist/{BlockNoteEditor-6U5KIP4Q.js → BlockNoteEditor-AZNYW5Y7.js} +14 -14
- package/dist/{BlockNoteEditor-6U5KIP4Q.js.map → BlockNoteEditor-AZNYW5Y7.js.map} +1 -1
- package/dist/billing/index.js +335 -335
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-UYBCHXXL.js → chunk-5KQXRLK3.js} +25 -2
- package/dist/chunk-5KQXRLK3.js.map +1 -0
- package/dist/{chunk-GR4QPP36.mjs → chunk-C62JXXUX.mjs} +1 -1
- package/dist/{chunk-CYZZ3E33.js → chunk-CWRYS2F3.js} +484 -492
- package/dist/chunk-CWRYS2F3.js.map +1 -0
- package/dist/{chunk-EW6QPMN3.js → chunk-OR5NPUWF.js} +1 -1
- package/dist/{chunk-EW6QPMN3.js.map → chunk-OR5NPUWF.js.map} +1 -1
- package/dist/{chunk-NYNLJEPF.mjs → chunk-WQ3KF6BG.mjs} +24 -1
- package/dist/chunk-WQ3KF6BG.mjs.map +1 -0
- package/dist/{chunk-QFN6RG6A.mjs → chunk-ZQEFAWFP.mjs} +19 -27
- package/dist/chunk-ZQEFAWFP.mjs.map +1 -0
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.js +4 -4
- package/dist/components/index.mjs +3 -3
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +25 -2
- package/dist/core/index.d.ts +25 -2
- package/dist/core/index.js +10 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +9 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/errors/errorToast.ts +2 -4
- package/src/components/forms/CommonAssociationForm.tsx +3 -3
- package/src/components/forms/FileUploader.tsx +4 -4
- package/src/features/auth/components/forms/AcceptInvitation.tsx +2 -2
- package/src/features/auth/components/forms/ActivateAccount.tsx +2 -2
- package/src/features/auth/components/forms/ResetPassword.tsx +2 -2
- package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +2 -2
- package/src/features/notification/components/modals/NotificationModal.tsx +2 -2
- package/src/features/role/components/forms/UserRoleAdd.tsx +2 -2
- package/src/features/user/components/forms/UserResentInvitationEmail.tsx +2 -2
- package/src/index.ts +3 -0
- package/src/shadcnui/ui/sonner.tsx +13 -23
- package/src/utils/index.ts +3 -0
- package/src/utils/toast.ts +39 -0
- package/dist/chunk-CYZZ3E33.js.map +0 -1
- package/dist/chunk-NYNLJEPF.mjs.map +0 -1
- package/dist/chunk-QFN6RG6A.mjs.map +0 -1
- package/dist/chunk-UYBCHXXL.js.map +0 -1
- /package/dist/{BlockNoteEditor-C25QYFYD.mjs.map → BlockNoteEditor-4NQ5LSD6.mjs.map} +0 -0
- /package/dist/{chunk-GR4QPP36.mjs.map → chunk-C62JXXUX.mjs.map} +0 -0
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
useI18nLocale,
|
|
13
13
|
useI18nRouter,
|
|
14
14
|
useI18nTranslations
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-C62JXXUX.mjs";
|
|
16
16
|
import {
|
|
17
17
|
AVAILABLE_OAUTH_SCOPES,
|
|
18
18
|
AuthService,
|
|
@@ -35,9 +35,11 @@ import {
|
|
|
35
35
|
getIconByModule,
|
|
36
36
|
getTokenHandler,
|
|
37
37
|
rehydrate,
|
|
38
|
+
showError,
|
|
39
|
+
showToast,
|
|
38
40
|
useComposedRefs,
|
|
39
41
|
useIsMobile
|
|
40
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-WQ3KF6BG.mjs";
|
|
41
43
|
import {
|
|
42
44
|
JsonApiContext
|
|
43
45
|
} from "./chunk-VOXD3ZLY.mjs";
|
|
@@ -7158,7 +7160,6 @@ import { useWatch as useWatch2 } from "react-hook-form";
|
|
|
7158
7160
|
// src/components/forms/CommonAssociationForm.tsx
|
|
7159
7161
|
import { useTranslations as useTranslations5 } from "next-intl";
|
|
7160
7162
|
import { useCallback as useCallback9, useEffect as useEffect11, useRef as useRef7, useState as useState10 } from "react";
|
|
7161
|
-
import { toast } from "sonner";
|
|
7162
7163
|
import { jsx as jsx54, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
7163
7164
|
function CommonAssociationTrigger({
|
|
7164
7165
|
sourceType,
|
|
@@ -7230,7 +7231,7 @@ function CommonAssociationCommandDialog({
|
|
|
7230
7231
|
__name(CommonAssociationCommandDialog, "CommonAssociationCommandDialog");
|
|
7231
7232
|
var triggerAssociationToast = /* @__PURE__ */ __name((params) => {
|
|
7232
7233
|
if (params.level) {
|
|
7233
|
-
|
|
7234
|
+
showToast(
|
|
7234
7235
|
params.t(`common.association.label`, {
|
|
7235
7236
|
source: params.source,
|
|
7236
7237
|
destination: params.destination
|
|
@@ -7246,7 +7247,7 @@ var triggerAssociationToast = /* @__PURE__ */ __name((params) => {
|
|
|
7246
7247
|
}
|
|
7247
7248
|
);
|
|
7248
7249
|
} else {
|
|
7249
|
-
|
|
7250
|
+
showToast(
|
|
7250
7251
|
params.t(`common.association.label`, {
|
|
7251
7252
|
source: params.source,
|
|
7252
7253
|
destination: params.destination
|
|
@@ -7297,9 +7298,8 @@ function ErrorDetails({ title, message, code }) {
|
|
|
7297
7298
|
__name(ErrorDetails, "ErrorDetails");
|
|
7298
7299
|
|
|
7299
7300
|
// src/components/errors/errorToast.ts
|
|
7300
|
-
import { toast as toast2 } from "sonner";
|
|
7301
7301
|
function errorToast(params) {
|
|
7302
|
-
|
|
7302
|
+
showError(params?.title ?? "Error", {
|
|
7303
7303
|
description: params.error instanceof Error ? params.error.message : String(params.error)
|
|
7304
7304
|
});
|
|
7305
7305
|
}
|
|
@@ -7681,7 +7681,6 @@ import {
|
|
|
7681
7681
|
useState as useState14
|
|
7682
7682
|
} from "react";
|
|
7683
7683
|
import { useDropzone } from "react-dropzone";
|
|
7684
|
-
import { toast as toast3 } from "sonner";
|
|
7685
7684
|
import { jsx as jsx62, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7686
7685
|
var FileUploaderContext = createContext8(null);
|
|
7687
7686
|
var useFileUpload = /* @__PURE__ */ __name(() => {
|
|
@@ -7750,7 +7749,7 @@ var FileUploader = forwardRef4(
|
|
|
7750
7749
|
(acceptedFiles, rejectedFiles) => {
|
|
7751
7750
|
const files = acceptedFiles;
|
|
7752
7751
|
if (!files) {
|
|
7753
|
-
|
|
7752
|
+
showError(t("common.errors.file"), {
|
|
7754
7753
|
description: t("common.errors.file_large")
|
|
7755
7754
|
});
|
|
7756
7755
|
return;
|
|
@@ -7768,13 +7767,13 @@ var FileUploader = forwardRef4(
|
|
|
7768
7767
|
if (rejectedFiles.length > 0) {
|
|
7769
7768
|
for (let i = 0; i < rejectedFiles.length; i++) {
|
|
7770
7769
|
if (rejectedFiles[i].errors[0]?.code === "file-too-large") {
|
|
7771
|
-
|
|
7770
|
+
showError(t("common.errors.file"), {
|
|
7772
7771
|
description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
|
|
7773
7772
|
});
|
|
7774
7773
|
break;
|
|
7775
7774
|
}
|
|
7776
7775
|
if (rejectedFiles[i].errors[0]?.message) {
|
|
7777
|
-
|
|
7776
|
+
showError(t(`common.errors.file`), {
|
|
7778
7777
|
description: rejectedFiles[i].errors[0].message
|
|
7779
7778
|
});
|
|
7780
7779
|
break;
|
|
@@ -9009,7 +9008,6 @@ __name(UserReactivator, "UserReactivator");
|
|
|
9009
9008
|
import { MailIcon } from "lucide-react";
|
|
9010
9009
|
import { useTranslations as useTranslations13 } from "next-intl";
|
|
9011
9010
|
import { useState as useState22 } from "react";
|
|
9012
|
-
import { toast as toast4 } from "sonner";
|
|
9013
9011
|
import { jsx as jsx79, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9014
9012
|
function UserResentInvitationEmailInternal({ user }) {
|
|
9015
9013
|
const [open, setOpen] = useState22(false);
|
|
@@ -9018,7 +9016,7 @@ function UserResentInvitationEmailInternal({ user }) {
|
|
|
9018
9016
|
try {
|
|
9019
9017
|
await UserService.sendInvitation({ userId: user.id, companyId: user.company.id });
|
|
9020
9018
|
setOpen(false);
|
|
9021
|
-
|
|
9019
|
+
showToast(t(`user.resend_activation.email_sent`), {
|
|
9022
9020
|
description: t(`user.resend_activation.email_sent_description`, { email: user.email })
|
|
9023
9021
|
});
|
|
9024
9022
|
} catch (error) {
|
|
@@ -9750,7 +9748,6 @@ import { Settings2Icon } from "lucide-react";
|
|
|
9750
9748
|
import { useTranslations as useTranslations28 } from "next-intl";
|
|
9751
9749
|
import { useEffect as useEffect19, useMemo as useMemo11, useState as useState25 } from "react";
|
|
9752
9750
|
import { useForm as useForm2 } from "react-hook-form";
|
|
9753
|
-
import { toast as toast5 } from "sonner";
|
|
9754
9751
|
import z2 from "zod";
|
|
9755
9752
|
|
|
9756
9753
|
// src/features/company/components/forms/CompanyConfigurationSecurityForm.tsx
|
|
@@ -9857,7 +9854,7 @@ function CompanyConfigurationEditorInternal({ company }) {
|
|
|
9857
9854
|
if (fullUser) {
|
|
9858
9855
|
setUser(fullUser);
|
|
9859
9856
|
}
|
|
9860
|
-
|
|
9857
|
+
showToast("Configurations Updated", {
|
|
9861
9858
|
description: `The system configurations have been updated successfully.`
|
|
9862
9859
|
});
|
|
9863
9860
|
close();
|
|
@@ -11146,7 +11143,7 @@ __name(AllowedUsersDetails, "AllowedUsersDetails");
|
|
|
11146
11143
|
import dynamic from "next/dynamic";
|
|
11147
11144
|
import React15 from "react";
|
|
11148
11145
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
11149
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
11146
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-4NQ5LSD6.mjs"), {
|
|
11150
11147
|
ssr: false
|
|
11151
11148
|
});
|
|
11152
11149
|
var BlockNoteEditorContainer = React15.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -12662,7 +12659,6 @@ import { useTranslations as useTranslations49 } from "next-intl";
|
|
|
12662
12659
|
import Image10 from "next/image";
|
|
12663
12660
|
import { useEffect as useEffect39, useState as useState47 } from "react";
|
|
12664
12661
|
import { useForm as useForm5 } from "react-hook-form";
|
|
12665
|
-
import { toast as toast6 } from "sonner";
|
|
12666
12662
|
import { z as z5 } from "zod";
|
|
12667
12663
|
import { Fragment as Fragment21, jsx as jsx140, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
12668
12664
|
function AcceptInvitation() {
|
|
@@ -12716,7 +12712,7 @@ function AcceptInvitation() {
|
|
|
12716
12712
|
};
|
|
12717
12713
|
await AuthService.acceptInvitation(payload);
|
|
12718
12714
|
setShowConfirmation(true);
|
|
12719
|
-
|
|
12715
|
+
showToast(t("auth.account_activated"), {
|
|
12720
12716
|
description: t("auth.account_activated_description")
|
|
12721
12717
|
});
|
|
12722
12718
|
setTimeout(() => {
|
|
@@ -12764,7 +12760,6 @@ __name(AcceptInvitation, "AcceptInvitation");
|
|
|
12764
12760
|
import { useTranslations as useTranslations50 } from "next-intl";
|
|
12765
12761
|
import Image11 from "next/image";
|
|
12766
12762
|
import { useEffect as useEffect40, useState as useState48 } from "react";
|
|
12767
|
-
import { toast as toast7 } from "sonner";
|
|
12768
12763
|
import { Fragment as Fragment22, jsx as jsx141, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
12769
12764
|
function ActivateAccount() {
|
|
12770
12765
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
@@ -12780,7 +12775,7 @@ function ActivateAccount() {
|
|
|
12780
12775
|
await AuthService.activate(payload);
|
|
12781
12776
|
setShowConfirmation(true);
|
|
12782
12777
|
setParams(void 0);
|
|
12783
|
-
|
|
12778
|
+
showToast(t("auth.account_activated"), {
|
|
12784
12779
|
description: t("auth.account_activated_description")
|
|
12785
12780
|
});
|
|
12786
12781
|
setTimeout(() => {
|
|
@@ -13062,7 +13057,6 @@ import { useTranslations as useTranslations53 } from "next-intl";
|
|
|
13062
13057
|
import Image14 from "next/image";
|
|
13063
13058
|
import { useEffect as useEffect44, useState as useState51 } from "react";
|
|
13064
13059
|
import { useForm as useForm8 } from "react-hook-form";
|
|
13065
|
-
import { toast as toast8 } from "sonner";
|
|
13066
13060
|
import { z as z8 } from "zod";
|
|
13067
13061
|
import { Fragment as Fragment26, jsx as jsx145, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
13068
13062
|
function ResetPassword() {
|
|
@@ -13116,7 +13110,7 @@ function ResetPassword() {
|
|
|
13116
13110
|
};
|
|
13117
13111
|
await AuthService.resetPassword(payload);
|
|
13118
13112
|
setShowConfirmation(true);
|
|
13119
|
-
|
|
13113
|
+
showToast(t(`auth.reset_success`), {
|
|
13120
13114
|
description: t(`auth.reset_success_description`)
|
|
13121
13115
|
});
|
|
13122
13116
|
setTimeout(() => {
|
|
@@ -13353,7 +13347,6 @@ __name(NotificationsListContainer, "NotificationsListContainer");
|
|
|
13353
13347
|
import { BellIcon } from "lucide-react";
|
|
13354
13348
|
import { useTranslations as useTranslations59 } from "next-intl";
|
|
13355
13349
|
import { Fragment as Fragment28, useCallback as useCallback21, useEffect as useEffect45, useMemo as useMemo21, useRef as useRef18, useState as useState52 } from "react";
|
|
13356
|
-
import { toast as toast9 } from "sonner";
|
|
13357
13350
|
import { jsx as jsx152, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
13358
13351
|
function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
13359
13352
|
const instanceId = useRef18(Math.random().toString(36).substr(2, 9));
|
|
@@ -13428,7 +13421,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
13428
13421
|
batch.forEach((notification) => {
|
|
13429
13422
|
addNotification(notification);
|
|
13430
13423
|
const toastNotification = generateToastNotification(notification, t, generateUrl);
|
|
13431
|
-
|
|
13424
|
+
showToast(toastNotification.title, {
|
|
13432
13425
|
description: toastNotification.description,
|
|
13433
13426
|
action: toastNotification.action
|
|
13434
13427
|
});
|
|
@@ -13658,7 +13651,6 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
13658
13651
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
13659
13652
|
import { useTranslations as useTranslations63 } from "next-intl";
|
|
13660
13653
|
import { useCallback as useCallback22, useEffect as useEffect47, useRef as useRef19, useState as useState54 } from "react";
|
|
13661
|
-
import { toast as toast10 } from "sonner";
|
|
13662
13654
|
import { Fragment as Fragment32, jsx as jsx158, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
13663
13655
|
function UserRoleAdd({ user, refresh }) {
|
|
13664
13656
|
const [open, setOpen] = useState54(false);
|
|
@@ -13672,7 +13664,7 @@ function UserRoleAdd({ user, refresh }) {
|
|
|
13672
13664
|
userId: user.id
|
|
13673
13665
|
});
|
|
13674
13666
|
setRoles(roles.filter((u) => u.id !== role.id));
|
|
13675
|
-
|
|
13667
|
+
showToast(
|
|
13676
13668
|
t(`common.association.label`, {
|
|
13677
13669
|
source: t(`entities.roles`, { count: 1 }),
|
|
13678
13670
|
destination: t(`entities.users`, { count: 1 })
|
|
@@ -15101,4 +15093,4 @@ export {
|
|
|
15101
15093
|
useOAuthClients,
|
|
15102
15094
|
useOAuthClient
|
|
15103
15095
|
};
|
|
15104
|
-
//# sourceMappingURL=chunk-
|
|
15096
|
+
//# sourceMappingURL=chunk-ZQEFAWFP.mjs.map
|