@carlonicora/nextjs-jsonapi 1.3.0 → 1.3.1

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.
Files changed (71) hide show
  1. package/dist/{BlockNoteEditor-CNXQ3WL3.js → BlockNoteEditor-7WYPN34K.js} +17 -17
  2. package/dist/{BlockNoteEditor-CNXQ3WL3.js.map → BlockNoteEditor-7WYPN34K.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-DC33K4IF.mjs → BlockNoteEditor-V625C23O.mjs} +7 -7
  4. package/dist/{JsonApiRequest-O7BGUMFO.mjs → JsonApiRequest-6UR7DIAR.mjs} +4 -2
  5. package/dist/JsonApiRequest-UJ7FGIVI.js +25 -0
  6. package/dist/JsonApiRequest-UJ7FGIVI.js.map +1 -0
  7. package/dist/{chunk-EZK3H6EJ.js → chunk-5IET37O4.js} +206 -206
  8. package/dist/{chunk-EZK3H6EJ.js.map → chunk-5IET37O4.js.map} +1 -1
  9. package/dist/{chunk-Y4XI3AZR.mjs → chunk-5QC7A6BL.mjs} +32 -20
  10. package/dist/chunk-5QC7A6BL.mjs.map +1 -0
  11. package/dist/{chunk-LJRD4SRV.js → chunk-DEYKTLA3.js} +6 -6
  12. package/dist/{chunk-LJRD4SRV.js.map → chunk-DEYKTLA3.js.map} +1 -1
  13. package/dist/{chunk-NPPQNSXN.mjs → chunk-FMBQZAIP.mjs} +3 -3
  14. package/dist/{chunk-MHVXFWZY.mjs → chunk-HTLEKZND.mjs} +3 -3
  15. package/dist/{chunk-74F6BBHH.mjs → chunk-IKBA4AHN.mjs} +2 -1
  16. package/dist/chunk-IKBA4AHN.mjs.map +1 -0
  17. package/dist/{chunk-JLN6UWII.mjs → chunk-JGFWIT2E.mjs} +2 -2
  18. package/dist/{chunk-KDFDGXCX.js → chunk-K2ANOT66.js} +576 -564
  19. package/dist/chunk-K2ANOT66.js.map +1 -0
  20. package/dist/{chunk-X53MF5ZN.mjs → chunk-P2F54I7Q.mjs} +2 -2
  21. package/dist/{chunk-5ZEADNNP.js → chunk-PMXG5WBC.js} +3 -2
  22. package/dist/chunk-PMXG5WBC.js.map +1 -0
  23. package/dist/{chunk-L6LH7WA4.js → chunk-PO5Q3H5I.js} +190 -190
  24. package/dist/{chunk-L6LH7WA4.js.map → chunk-PO5Q3H5I.js.map} +1 -1
  25. package/dist/{chunk-WZJDLITG.js → chunk-Q4FXESVT.js} +3 -3
  26. package/dist/{chunk-WZJDLITG.js.map → chunk-Q4FXESVT.js.map} +1 -1
  27. package/dist/client/index.js +7 -7
  28. package/dist/client/index.mjs +6 -6
  29. package/dist/components/index.js +7 -7
  30. package/dist/components/index.mjs +6 -6
  31. package/dist/contexts/index.js +7 -7
  32. package/dist/contexts/index.mjs +6 -6
  33. package/dist/core/index.js +2 -2
  34. package/dist/core/index.mjs +1 -1
  35. package/dist/features/index.js +4 -4
  36. package/dist/features/index.mjs +3 -3
  37. package/dist/hooks/index.js +7 -7
  38. package/dist/hooks/index.mjs +6 -6
  39. package/dist/index.d.mts +2 -1
  40. package/dist/index.d.ts +2 -1
  41. package/dist/index.js +5 -3
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.mjs +4 -2
  44. package/dist/shadcnui/index.js +4 -4
  45. package/dist/shadcnui/index.mjs +3 -3
  46. package/dist/utils/index.js +3 -3
  47. package/dist/utils/index.mjs +2 -2
  48. package/package.json +1 -1
  49. package/src/components/errors/ErrorDetails.tsx +2 -2
  50. package/src/features/auth/components/containers/AuthContainer.tsx +1 -1
  51. package/src/features/auth/components/details/LandingComponent.tsx +20 -1
  52. package/src/features/auth/components/forms/AcceptInvitation.tsx +1 -1
  53. package/src/features/auth/components/forms/ActivateAccount.tsx +1 -1
  54. package/src/features/auth/components/forms/ForgotPassword.tsx +1 -1
  55. package/src/features/auth/components/forms/Login.tsx +1 -1
  56. package/src/features/auth/components/forms/Register.tsx +1 -1
  57. package/src/features/auth/components/forms/ResetPassword.tsx +1 -1
  58. package/src/features/company/components/forms/CompanyLicense.tsx +1 -8
  59. package/src/unified/JsonApiRequest.ts +2 -2
  60. package/dist/JsonApiRequest-VARLNKAF.js +0 -23
  61. package/dist/JsonApiRequest-VARLNKAF.js.map +0 -1
  62. package/dist/chunk-5ZEADNNP.js.map +0 -1
  63. package/dist/chunk-74F6BBHH.mjs.map +0 -1
  64. package/dist/chunk-KDFDGXCX.js.map +0 -1
  65. package/dist/chunk-Y4XI3AZR.mjs.map +0 -1
  66. /package/dist/{BlockNoteEditor-DC33K4IF.mjs.map → BlockNoteEditor-V625C23O.mjs.map} +0 -0
  67. /package/dist/{JsonApiRequest-O7BGUMFO.mjs.map → JsonApiRequest-6UR7DIAR.mjs.map} +0 -0
  68. /package/dist/{chunk-NPPQNSXN.mjs.map → chunk-FMBQZAIP.mjs.map} +0 -0
  69. /package/dist/{chunk-MHVXFWZY.mjs.map → chunk-HTLEKZND.mjs.map} +0 -0
  70. /package/dist/{chunk-JLN6UWII.mjs.map → chunk-JGFWIT2E.mjs.map} +0 -0
  71. /package/dist/{chunk-X53MF5ZN.mjs.map → chunk-P2F54I7Q.mjs.map} +0 -0
@@ -94,11 +94,11 @@ import {
94
94
  TooltipTrigger,
95
95
  buttonVariants,
96
96
  useSidebar
97
- } from "./chunk-X53MF5ZN.mjs";
97
+ } from "./chunk-P2F54I7Q.mjs";
98
98
  import {
99
99
  cn,
100
100
  getIconByModule
101
- } from "./chunk-JLN6UWII.mjs";
101
+ } from "./chunk-JGFWIT2E.mjs";
102
102
  import {
103
103
  AuthService,
104
104
  CompanyService,
@@ -109,7 +109,7 @@ import {
109
109
  RoleService,
110
110
  S3Service,
111
111
  UserService
112
- } from "./chunk-MHVXFWZY.mjs";
112
+ } from "./chunk-HTLEKZND.mjs";
113
113
  import {
114
114
  getTokenHandler,
115
115
  useI18nDateFnsLocale,
@@ -118,9 +118,10 @@ import {
118
118
  useI18nTranslations
119
119
  } from "./chunk-SM63SZCP.mjs";
120
120
  import {
121
+ getApiUrl,
121
122
  getAppUrl,
122
123
  getTrackablePages
123
- } from "./chunk-74F6BBHH.mjs";
124
+ } from "./chunk-IKBA4AHN.mjs";
124
125
  import {
125
126
  getRoleId
126
127
  } from "./chunk-BLWVZK6J.mjs";
@@ -132,7 +133,7 @@ import {
132
133
  Modules,
133
134
  RehydrationFactory,
134
135
  rehydrate
135
- } from "./chunk-NPPQNSXN.mjs";
136
+ } from "./chunk-FMBQZAIP.mjs";
136
137
  import {
137
138
  checkPermissions
138
139
  } from "./chunk-HAG77QBV.mjs";
@@ -1984,7 +1985,7 @@ __name(AllowedUsersDetails, "AllowedUsersDetails");
1984
1985
  import dynamic from "next/dynamic";
1985
1986
  import React3 from "react";
1986
1987
  import { jsx as jsx29 } from "react/jsx-runtime";
1987
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-DC33K4IF.mjs"), {
1988
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-V625C23O.mjs"), {
1988
1989
  ssr: false
1989
1990
  });
1990
1991
  var BlockNoteEditorContainer = React3.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -1999,7 +2000,7 @@ function ErrorDetails({ title, message, code }) {
1999
2000
  return /* @__PURE__ */ jsx30("div", { className: "w-xl max-w-xl", children: /* @__PURE__ */ jsxs17(Card, { className: "w-full", children: [
2000
2001
  /* @__PURE__ */ jsxs17(CardHeader, { children: [
2001
2002
  /* @__PURE__ */ jsxs17(CardTitle, { className: "text-foreground flex flex-col items-center gap-y-4 pb-10 text-4xl", children: [
2002
- /* @__PURE__ */ jsx30(Image2, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
2003
+ /* @__PURE__ */ jsx30(Image2, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
2003
2004
  /* @__PURE__ */ jsx30("div", { children: "Unauthorised" })
2004
2005
  ] }),
2005
2006
  /* @__PURE__ */ jsx30(CardDescription, { className: "text-center text-lg", children: "We are sorry, but you are not allowed to access this content." })
@@ -2009,7 +2010,7 @@ function ErrorDetails({ title, message, code }) {
2009
2010
  return /* @__PURE__ */ jsx30("div", { className: "w-xl max-w-xl", children: /* @__PURE__ */ jsxs17(Card, { className: "w-full", children: [
2010
2011
  /* @__PURE__ */ jsxs17(CardHeader, { children: [
2011
2012
  /* @__PURE__ */ jsxs17(CardTitle, { className: "text-foreground flex flex-col items-center gap-y-4 pb-10 text-center text-4xl", children: [
2012
- /* @__PURE__ */ jsx30(Image2, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
2013
+ /* @__PURE__ */ jsx30(Image2, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
2013
2014
  /* @__PURE__ */ jsx30("div", { children: code }),
2014
2015
  /* @__PURE__ */ jsx30("div", { children: title })
2015
2016
  ] }),
@@ -3978,7 +3979,7 @@ function useJsonApiGet(params) {
3978
3979
  setLoading(true);
3979
3980
  setError(null);
3980
3981
  try {
3981
- const { JsonApiGet } = await import("./JsonApiRequest-O7BGUMFO.mjs");
3982
+ const { JsonApiGet } = await import("./JsonApiRequest-6UR7DIAR.mjs");
3982
3983
  const language = navigator.language.split("-")[0] || "en";
3983
3984
  const apiResponse = await JsonApiGet({
3984
3985
  classKey: params.classKey,
@@ -4083,7 +4084,7 @@ function useJsonApiMutation(config) {
4083
4084
  setLoading(true);
4084
4085
  setError(null);
4085
4086
  try {
4086
- const { JsonApiPost, JsonApiPut, JsonApiPatch, JsonApiDelete } = await import("./JsonApiRequest-O7BGUMFO.mjs");
4087
+ const { JsonApiPost, JsonApiPut, JsonApiPatch, JsonApiDelete } = await import("./JsonApiRequest-6UR7DIAR.mjs");
4087
4088
  const language = navigator.language.split("-")[0] || "en";
4088
4089
  let apiResponse;
4089
4090
  switch (config.method) {
@@ -4786,7 +4787,7 @@ function Register() {
4786
4787
  return /* @__PURE__ */ jsxs45(Fragment12, { children: [
4787
4788
  /* @__PURE__ */ jsxs45(CardHeader, { children: [
4788
4789
  /* @__PURE__ */ jsxs45(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
4789
- /* @__PURE__ */ jsx66(Image4, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
4790
+ /* @__PURE__ */ jsx66(Image4, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
4790
4791
  t(`foundations.auth.register`)
4791
4792
  ] }),
4792
4793
  /* @__PURE__ */ jsx66(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx66(Fragment12, { children: " " }) : /* @__PURE__ */ jsx66(Fragment12, { children: t(`foundations.auth.register_description`) }) })
@@ -4919,7 +4920,7 @@ __name(AuthContainer, "AuthContainer");
4919
4920
  function InnerAuthContainer() {
4920
4921
  const { activeComponent } = useAuthContext();
4921
4922
  if (activeComponent === null)
4922
- return /* @__PURE__ */ jsx68("div", { className: "max-w-sm", children: /* @__PURE__ */ jsx68(Image5, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, className: "animate-spin-slow", priority: true }) });
4923
+ return /* @__PURE__ */ jsx68("div", { className: "max-w-sm", children: /* @__PURE__ */ jsx68(Image5, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, className: "animate-spin-slow", priority: true }) });
4923
4924
  return /* @__PURE__ */ jsx68(Card, { className: "w-full max-w-md", children: activeComponent });
4924
4925
  }
4925
4926
  __name(InnerAuthContainer, "InnerAuthContainer");
@@ -4934,14 +4935,25 @@ function LandingComponent() {
4934
4935
  return /* @__PURE__ */ jsxs46(Fragment13, { children: [
4935
4936
  /* @__PURE__ */ jsxs46(CardHeader, { className: "mb-4", "data-testid": "page-pre-login-container", children: [
4936
4937
  /* @__PURE__ */ jsxs46(CardTitle, { className: "text-primary flex flex-col items-center gap-y-8 pb-8 text-4xl", children: [
4937
- /* @__PURE__ */ jsx69(Image6, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
4938
+ /* @__PURE__ */ jsx69(Image6, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
4938
4939
  t(`generic.title`)
4939
4940
  ] }),
4940
4941
  /* @__PURE__ */ jsx69(CardDescription, { className: "flex w-full justify-center text-center text-sm", children: t(`generic.description`) })
4941
4942
  ] }),
4942
4943
  /* @__PURE__ */ jsxs46(CardFooter, { className: "mt-4 flex w-full flex-col justify-between", children: [
4943
4944
  /* @__PURE__ */ jsx69(Link, { href: "#", className: "flex w-full justify-start", onClick: () => setComponentType(5 /* Register */), children: /* @__PURE__ */ jsx69(Button, { className: "mt-4 w-full", variant: `default`, children: t(`foundations.auth.buttons.register`) }) }),
4944
- /* @__PURE__ */ jsx69(Link, { href: "#", className: "flex w-full justify-end", onClick: () => setComponentType(0 /* Login */), children: /* @__PURE__ */ jsx69(Button, { className: "mt-4 w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: t(`foundations.auth.buttons.login`) }) })
4945
+ /* @__PURE__ */ jsx69(Link, { href: "#", className: "flex w-full justify-end", onClick: () => setComponentType(0 /* Login */), children: /* @__PURE__ */ jsx69(Button, { className: "mt-4 w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: t(`foundations.auth.buttons.login`) }) }),
4946
+ /* @__PURE__ */ jsx69(
4947
+ Button,
4948
+ {
4949
+ onClick: (e) => {
4950
+ e.preventDefault();
4951
+ window.location.href = `${getApiUrl()}auth/discord`;
4952
+ },
4953
+ className: `flex w-full justify-end`,
4954
+ children: /* @__PURE__ */ jsx69("div", { className: "text-sm font-medium leading-normal", children: "Discord" })
4955
+ }
4956
+ )
4945
4957
  ] })
4946
4958
  ] });
4947
4959
  }
@@ -5021,7 +5033,7 @@ function AcceptInvitation() {
5021
5033
  return /* @__PURE__ */ jsxs47(Fragment14, { children: [
5022
5034
  /* @__PURE__ */ jsxs47(CardHeader, { children: [
5023
5035
  /* @__PURE__ */ jsxs47(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5024
- /* @__PURE__ */ jsx70(Image7, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
5036
+ /* @__PURE__ */ jsx70(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
5025
5037
  t("foundations.auth.accept_invitation")
5026
5038
  ] }),
5027
5039
  /* @__PURE__ */ jsx70(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx70(Fragment14, { children: t("foundations.auth.errors.activating_account") }) : /* @__PURE__ */ jsx70(Fragment14, { children: t("foundations.auth.select_password") }) })
@@ -5092,7 +5104,7 @@ function ActivateAccount() {
5092
5104
  return /* @__PURE__ */ jsxs48(Fragment15, { children: [
5093
5105
  /* @__PURE__ */ jsxs48(CardHeader, { children: [
5094
5106
  /* @__PURE__ */ jsxs48(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5095
- /* @__PURE__ */ jsx71(Image8, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
5107
+ /* @__PURE__ */ jsx71(Image8, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
5096
5108
  t("foundations.auth.accept_invitation")
5097
5109
  ] }),
5098
5110
  /* @__PURE__ */ jsx71(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx71(Fragment15, { children: t("foundations.auth.errors.activating_account") }) : /* @__PURE__ */ jsx71(Fragment15, { children: " " }) })
@@ -5164,7 +5176,7 @@ function ForgotPassword() {
5164
5176
  return /* @__PURE__ */ jsxs49(Fragment16, { children: [
5165
5177
  /* @__PURE__ */ jsxs49(CardHeader, { "data-testid": "page-forgot-password-container", children: [
5166
5178
  /* @__PURE__ */ jsxs49(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5167
- /* @__PURE__ */ jsx72(Image9, { src: "/phlow-logo.webp", alt: "Phlows", width: 100, height: 100, priority: true }),
5179
+ /* @__PURE__ */ jsx72(Image9, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
5168
5180
  t("foundations.auth.forgot_password")
5169
5181
  ] }),
5170
5182
  /* @__PURE__ */ jsx72(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx72(Fragment16, { children: " " }) : /* @__PURE__ */ jsx72(Fragment16, { children: t(`foundations.auth.add_email_to_reset`) }) })
@@ -5242,7 +5254,7 @@ function Login() {
5242
5254
  return /* @__PURE__ */ jsxs50(Fragment17, { children: [
5243
5255
  /* @__PURE__ */ jsxs50(CardHeader, { "data-testid": "page-login-container", children: [
5244
5256
  /* @__PURE__ */ jsxs50(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5245
- /* @__PURE__ */ jsx73(Image10, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
5257
+ /* @__PURE__ */ jsx73(Image10, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
5246
5258
  t("foundations.auth.login")
5247
5259
  ] }),
5248
5260
  /* @__PURE__ */ jsx73(CardDescription, { className: "text-sm", children: t(`foundations.auth.login_description`) })
@@ -5419,7 +5431,7 @@ function ResetPassword() {
5419
5431
  return /* @__PURE__ */ jsxs51(Fragment19, { children: [
5420
5432
  /* @__PURE__ */ jsxs51(CardHeader, { children: [
5421
5433
  /* @__PURE__ */ jsxs51(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5422
- /* @__PURE__ */ jsx75(Image11, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
5434
+ /* @__PURE__ */ jsx75(Image11, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
5423
5435
  t(`foundations.auth.password_reset`)
5424
5436
  ] }),
5425
5437
  /* @__PURE__ */ jsx75(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx75(Fragment19, { children: t(`foundations.auth.errors.password_reset_error`) }) : /* @__PURE__ */ jsx75(Fragment19, { children: t(`foundations.auth.reset_password`) }) })
@@ -7968,4 +7980,4 @@ export {
7968
7980
  RolesList,
7969
7981
  UserRolesList
7970
7982
  };
7971
- //# sourceMappingURL=chunk-Y4XI3AZR.mjs.map
7983
+ //# sourceMappingURL=chunk-5QC7A6BL.mjs.map