@carlonicora/nextjs-jsonapi 1.29.5 → 1.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-C25QYFYD.mjs → BlockNoteEditor-CEJE3YHQ.mjs} +4 -4
- package/dist/{BlockNoteEditor-6U5KIP4Q.js → BlockNoteEditor-TUJ3VCS3.js} +14 -14
- package/dist/{BlockNoteEditor-6U5KIP4Q.js.map → BlockNoteEditor-TUJ3VCS3.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-CYZZ3E33.js → chunk-BHKXZF2I.js} +493 -501
- package/dist/chunk-BHKXZF2I.js.map +1 -0
- package/dist/{chunk-GR4QPP36.mjs → chunk-C62JXXUX.mjs} +1 -1
- 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-XY6HEWHI.mjs} +28 -36
- package/dist/chunk-XY6HEWHI.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/containers/ReactMarkdownContainer.tsx +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/ForgotPassword.tsx +1 -1
- package/src/features/auth/components/forms/Login.tsx +4 -4
- package/src/features/auth/components/forms/Register.tsx +1 -1
- package/src/features/auth/components/forms/ResetPassword.tsx +2 -2
- package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +3 -3
- package/src/features/company/components/forms/CompanyDeleter.tsx +1 -1
- 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/features/user/components/widgets/UserSearchPopover.tsx +1 -1
- 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-CEJE3YHQ.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();
|
|
@@ -9872,7 +9869,7 @@ function CompanyConfigurationEditorInternal({ company }) {
|
|
|
9872
9869
|
/* @__PURE__ */ jsx101(DialogTrigger, { children: /* @__PURE__ */ jsx101(Button, { size: "sm", variant: `ghost`, className: "cursor-pointer", children: /* @__PURE__ */ jsx101(Settings2Icon, { className: "h-3.5 w-3.5" }) }) }),
|
|
9873
9870
|
/* @__PURE__ */ jsxs58(DialogContent, { className: `flex max-h-[70vh] max-w-4xl flex-col overflow-y-auto`, children: [
|
|
9874
9871
|
/* @__PURE__ */ jsxs58(DialogHeader, { children: [
|
|
9875
|
-
/* @__PURE__ */ jsx101(DialogTitle, { children: t(`entities.
|
|
9872
|
+
/* @__PURE__ */ jsx101(DialogTitle, { children: t(`entities.configurations`, { count: 2 }) }),
|
|
9876
9873
|
/* @__PURE__ */ jsx101(DialogDescription, { className: "text-destructive", children: t(`features.configuration.warning_description`) })
|
|
9877
9874
|
] }),
|
|
9878
9875
|
/* @__PURE__ */ jsx101(Form, { ...form, children: /* @__PURE__ */ jsxs58("form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
|
|
@@ -9966,7 +9963,7 @@ function CompanyDeleterInternal({ company }) {
|
|
|
9966
9963
|
variant: "destructive",
|
|
9967
9964
|
disabled: company.name !== companyName || isDeleting,
|
|
9968
9965
|
children: isDeleting ? /* @__PURE__ */ jsxs59(Fragment10, { children: [
|
|
9969
|
-
t(`ui.buttons.
|
|
9966
|
+
t(`ui.buttons.deleting`),
|
|
9970
9967
|
/* @__PURE__ */ jsx102(LoaderCircleIcon2, { className: "animate-spin-slow h-5 w-5" })
|
|
9971
9968
|
] }) : t(`ui.buttons.delete`)
|
|
9972
9969
|
}
|
|
@@ -11004,7 +11001,7 @@ function ReactMarkdownContainer({
|
|
|
11004
11001
|
initialLines = 4,
|
|
11005
11002
|
size = "normal"
|
|
11006
11003
|
}) {
|
|
11007
|
-
const t = useTranslations40("
|
|
11004
|
+
const t = useTranslations40("ui.buttons");
|
|
11008
11005
|
const [isExpanded, setIsExpanded] = useState36(false);
|
|
11009
11006
|
const [showExpandButton, setShowExpandButton] = useState36(false);
|
|
11010
11007
|
const contentRef = useRef13(null);
|
|
@@ -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-CEJE3YHQ.mjs"), {
|
|
11150
11147
|
ssr: false
|
|
11151
11148
|
});
|
|
11152
11149
|
var BlockNoteEditorContainer = React15.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -12485,7 +12482,7 @@ function Register() {
|
|
|
12485
12482
|
/* @__PURE__ */ jsxs78(CardHeader, { children: [
|
|
12486
12483
|
/* @__PURE__ */ jsxs78(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
12487
12484
|
/* @__PURE__ */ jsx136(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
12488
|
-
t(`auth.register`)
|
|
12485
|
+
t(`auth.buttons.register`)
|
|
12489
12486
|
] }),
|
|
12490
12487
|
/* @__PURE__ */ jsx136(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx136(Fragment19, { children: " " }) : /* @__PURE__ */ jsx136(Fragment19, { children: t(`auth.register_description`) }) })
|
|
12491
12488
|
] }),
|
|
@@ -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(() => {
|
|
@@ -12874,7 +12869,7 @@ function ForgotPassword() {
|
|
|
12874
12869
|
/* @__PURE__ */ jsxs82(CardHeader, { "data-testid": "page-forgot-password-container", children: [
|
|
12875
12870
|
/* @__PURE__ */ jsxs82(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
12876
12871
|
/* @__PURE__ */ jsx142(Image12, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
12877
|
-
t("auth.forgot_password")
|
|
12872
|
+
t("auth.buttons.forgot_password")
|
|
12878
12873
|
] }),
|
|
12879
12874
|
/* @__PURE__ */ jsx142(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx142(Fragment23, { children: " " }) : /* @__PURE__ */ jsx142(Fragment23, { children: t(`auth.add_email_to_reset`) }) })
|
|
12880
12875
|
] }),
|
|
@@ -12952,7 +12947,7 @@ function Login() {
|
|
|
12952
12947
|
/* @__PURE__ */ jsxs83(CardHeader, { "data-testid": "page-login-container", children: [
|
|
12953
12948
|
/* @__PURE__ */ jsxs83(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
12954
12949
|
/* @__PURE__ */ jsx143(Image13, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
12955
|
-
t("auth.login")
|
|
12950
|
+
t("auth.buttons.login")
|
|
12956
12951
|
] }),
|
|
12957
12952
|
/* @__PURE__ */ jsx143(CardDescription, { className: "text-sm", children: t(`auth.login_description`) })
|
|
12958
12953
|
] }),
|
|
@@ -12979,7 +12974,7 @@ function Login() {
|
|
|
12979
12974
|
testId: "form-login-input-password"
|
|
12980
12975
|
}
|
|
12981
12976
|
),
|
|
12982
|
-
/* @__PURE__ */ jsx143(Button, { className: "mt-4 w-full", type: "submit", "data-testid": "form-login-button-submit", children: t(`auth.login`) })
|
|
12977
|
+
/* @__PURE__ */ jsx143(Button, { className: "mt-4 w-full", type: "submit", "data-testid": "form-login-button-submit", children: t(`auth.buttons.login`) })
|
|
12983
12978
|
] }) }),
|
|
12984
12979
|
/* @__PURE__ */ jsxs83(CardFooter, { className: "flex w-full flex-col gap-y-4 mt-4", children: [
|
|
12985
12980
|
isDiscordAuthEnabled() && /* @__PURE__ */ jsx143(Link, { href: `${getApiUrl()}auth/discord`, className: "flex w-full justify-end", children: /* @__PURE__ */ jsx143(Button, { className: "w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: "Login with Discord" }) }),
|
|
@@ -12990,7 +12985,7 @@ function Login() {
|
|
|
12990
12985
|
href: "#",
|
|
12991
12986
|
className: "flex w-full justify-start",
|
|
12992
12987
|
onClick: () => setComponentType(5 /* Register */),
|
|
12993
|
-
children: t(`auth.register`)
|
|
12988
|
+
children: t(`auth.buttons.register`)
|
|
12994
12989
|
}
|
|
12995
12990
|
),
|
|
12996
12991
|
/* @__PURE__ */ jsx143(
|
|
@@ -13000,7 +12995,7 @@ function Login() {
|
|
|
13000
12995
|
className: "flex w-full justify-end",
|
|
13001
12996
|
onClick: () => setComponentType(1 /* ForgotPassword */),
|
|
13002
12997
|
"data-testid": "form-login-link-forgot-password",
|
|
13003
|
-
children: t(`auth.forgot_password`)
|
|
12998
|
+
children: t(`auth.buttons.forgot_password`)
|
|
13004
12999
|
}
|
|
13005
13000
|
)
|
|
13006
13001
|
] })
|
|
@@ -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-XY6HEWHI.mjs.map
|