@carlonicora/nextjs-jsonapi 1.84.0 → 1.86.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.
Files changed (45) hide show
  1. package/dist/{BlockNoteEditor-ZNACEXKX.mjs → BlockNoteEditor-7TZA4XEN.mjs} +3 -3
  2. package/dist/{BlockNoteEditor-PJWPR4IU.js → BlockNoteEditor-KRDP6OSE.js} +7 -7
  3. package/dist/{BlockNoteEditor-PJWPR4IU.js.map → BlockNoteEditor-KRDP6OSE.js.map} +1 -1
  4. package/dist/billing/index.js +303 -303
  5. package/dist/billing/index.mjs +2 -2
  6. package/dist/{chunk-ZEJSPTHS.js → chunk-2AK4GRIB.js} +19 -11
  7. package/dist/chunk-2AK4GRIB.js.map +1 -0
  8. package/dist/{chunk-B7ZH2R62.js → chunk-AMP2ZDAV.js} +93 -83
  9. package/dist/chunk-AMP2ZDAV.js.map +1 -0
  10. package/dist/{chunk-CPXN5OGI.mjs → chunk-CZ56O6JZ.mjs} +22 -12
  11. package/dist/chunk-CZ56O6JZ.mjs.map +1 -0
  12. package/dist/{chunk-PV5V6CVW.mjs → chunk-NEJ7CDM3.mjs} +9 -1
  13. package/dist/chunk-NEJ7CDM3.mjs.map +1 -0
  14. package/dist/client/index.d.mts +1 -1
  15. package/dist/client/index.d.ts +1 -1
  16. package/dist/client/index.js +5 -3
  17. package/dist/client/index.js.map +1 -1
  18. package/dist/client/index.mjs +4 -2
  19. package/dist/components/index.d.mts +4 -2
  20. package/dist/components/index.d.ts +4 -2
  21. package/dist/components/index.js +3 -3
  22. package/dist/components/index.mjs +2 -2
  23. package/dist/{config-B5oBQVEA.d.ts → config-CLQynoaa.d.ts} +15 -1
  24. package/dist/{config-Bx_uh22h.d.mts → config-k61pe_o2.d.mts} +15 -1
  25. package/dist/contexts/index.js +3 -3
  26. package/dist/contexts/index.mjs +2 -2
  27. package/dist/index.d.mts +1 -1
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.js +4 -2
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +3 -1
  32. package/package.json +1 -1
  33. package/src/client/config.ts +20 -0
  34. package/src/components/forms/CommonEditorButtons.tsx +7 -4
  35. package/src/components/forms/EditorSheet.tsx +9 -1
  36. package/src/features/auth/components/buttons/GoogleSignInButton.tsx +2 -2
  37. package/src/features/auth/components/details/LandingComponent.tsx +2 -2
  38. package/src/features/auth/components/forms/Login.tsx +2 -2
  39. package/src/features/auth/components/forms/Register.tsx +3 -3
  40. package/src/index.ts +8 -1
  41. package/dist/chunk-B7ZH2R62.js.map +0 -1
  42. package/dist/chunk-CPXN5OGI.mjs.map +0 -1
  43. package/dist/chunk-PV5V6CVW.mjs.map +0 -1
  44. package/dist/chunk-ZEJSPTHS.js.map +0 -1
  45. /package/dist/{BlockNoteEditor-ZNACEXKX.mjs.map → BlockNoteEditor-7TZA4XEN.mjs.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ACTION_TYPES,
3
3
  RbacService,
4
- getApiUrl,
5
4
  getAppUrl,
6
5
  getI18nLink,
6
+ getPublicApiUrl,
7
7
  getReferralConfig,
8
8
  getRegistrationMode,
9
9
  getRoleId,
@@ -20,7 +20,7 @@ import {
20
20
  useI18nLocale,
21
21
  useI18nRouter,
22
22
  useI18nTranslations
23
- } from "./chunk-PV5V6CVW.mjs";
23
+ } from "./chunk-NEJ7CDM3.mjs";
24
24
  import {
25
25
  AVAILABLE_OAUTH_SCOPES,
26
26
  AssistantMessage,
@@ -8415,7 +8415,7 @@ __name(CommonDeleter, "CommonDeleter");
8415
8415
  // src/components/forms/CommonEditorButtons.tsx
8416
8416
  import { useTranslations as useTranslations9 } from "next-intl";
8417
8417
  import { jsx as jsx64, jsxs as jsxs36 } from "react/jsx-runtime";
8418
- function CommonEditorButtons({ isEdit, form, disabled, setOpen }) {
8418
+ function CommonEditorButtons({ isEdit, form, disabled, setOpen, hideSubmit }) {
8419
8419
  const t = useTranslations9();
8420
8420
  return /* @__PURE__ */ jsxs36("div", { className: "flex justify-end", children: [
8421
8421
  /* @__PURE__ */ jsx64(
@@ -8429,7 +8429,7 @@ function CommonEditorButtons({ isEdit, form, disabled, setOpen }) {
8429
8429
  children: t(`ui.buttons.cancel`)
8430
8430
  }
8431
8431
  ),
8432
- /* @__PURE__ */ jsx64(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) })
8432
+ !hideSubmit && /* @__PURE__ */ jsx64(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) })
8433
8433
  ] });
8434
8434
  }
8435
8435
  __name(CommonEditorButtons, "CommonEditorButtons");
@@ -8580,6 +8580,7 @@ function EditorSheet({
8580
8580
  onNavigate,
8581
8581
  size = "xl",
8582
8582
  disabled,
8583
+ hideSubmit,
8583
8584
  trigger,
8584
8585
  forceShow,
8585
8586
  onClose,
@@ -8649,7 +8650,16 @@ function EditorSheet({
8649
8650
  ] }),
8650
8651
  /* @__PURE__ */ jsx68(Form, { ...form, children: /* @__PURE__ */ jsxs39("form", { onSubmit: form.handleSubmit(wrappedOnSubmit), className: "flex min-h-0 flex-1 flex-col", children: [
8651
8652
  /* @__PURE__ */ jsx68("div", { className: "flex-1 overflow-y-auto px-6 py-4", children }),
8652
- /* @__PURE__ */ jsx68(SheetFooter, { className: "shrink-0 border-t px-6 py-4", children: /* @__PURE__ */ jsx68(CommonEditorButtons, { form, setOpen: handleOpenChange, isEdit, disabled }) })
8653
+ /* @__PURE__ */ jsx68(SheetFooter, { className: "shrink-0 border-t px-6 py-4", children: /* @__PURE__ */ jsx68(
8654
+ CommonEditorButtons,
8655
+ {
8656
+ form,
8657
+ setOpen: handleOpenChange,
8658
+ isEdit,
8659
+ disabled,
8660
+ hideSubmit
8661
+ }
8662
+ ) })
8653
8663
  ] }) })
8654
8664
  ] })
8655
8665
  ] }),
@@ -9200,7 +9210,7 @@ __name(FormCheckbox, "FormCheckbox");
9200
9210
  import dynamic from "next/dynamic";
9201
9211
  import React14 from "react";
9202
9212
  import { jsx as jsx73 } from "react/jsx-runtime";
9203
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-ZNACEXKX.mjs"), {
9213
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-7TZA4XEN.mjs"), {
9204
9214
  ssr: false
9205
9215
  });
9206
9216
  var BlockNoteEditorContainer = React14.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -15155,7 +15165,7 @@ function Register() {
15155
15165
  isGoogleAuthEnabled() && /* @__PURE__ */ jsx165(
15156
15166
  Link,
15157
15167
  {
15158
- href: `${getApiUrl()}auth/google${buildOAuthQueryParams(inviteCode, referralCode)}`,
15168
+ href: `${getPublicApiUrl()}auth/google${buildOAuthQueryParams(inviteCode, referralCode)}`,
15159
15169
  className: "flex w-full",
15160
15170
  children: /* @__PURE__ */ jsxs98(
15161
15171
  Button,
@@ -15203,7 +15213,7 @@ function Register() {
15203
15213
  isDiscordAuthEnabled() && /* @__PURE__ */ jsx165(
15204
15214
  Link,
15205
15215
  {
15206
- href: `${getApiUrl()}auth/discord${buildOAuthQueryParams(inviteCode, referralCode)}`,
15216
+ href: `${getPublicApiUrl()}auth/discord${buildOAuthQueryParams(inviteCode, referralCode)}`,
15207
15217
  className: "flex w-full",
15208
15218
  children: /* @__PURE__ */ jsxs98(Button, { className: "w-full", variant: "outline", type: "button", children: [
15209
15219
  /* @__PURE__ */ jsx165("svg", { className: "mr-2 h-5 w-5", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx165("path", { d: "M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z" }) }),
@@ -16036,7 +16046,7 @@ function GoogleSignInButton({ referralCode }) {
16036
16046
  return null;
16037
16047
  }
16038
16048
  const buildGoogleOAuthUrl = /* @__PURE__ */ __name(() => {
16039
- const baseUrl = `${getApiUrl()}auth/google`;
16049
+ const baseUrl = `${getPublicApiUrl()}auth/google`;
16040
16050
  if (!referralCode) return baseUrl;
16041
16051
  return `${baseUrl}?referral=${encodeURIComponent(referralCode)}`;
16042
16052
  }, "buildGoogleOAuthUrl");
@@ -16111,7 +16121,7 @@ function LandingComponent() {
16111
16121
  /* @__PURE__ */ jsx178(Link, { href: "#", className: "flex w-full justify-end", onClick: () => setComponentType(0 /* Login */), children: /* @__PURE__ */ jsx178(Button, { className: "w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: t(`auth.buttons.login`) }) })
16112
16122
  ] }),
16113
16123
  isGoogleAuthEnabled() && /* @__PURE__ */ jsx178(GoogleSignInButton, {}),
16114
- isDiscordAuthEnabled() && /* @__PURE__ */ jsx178(Link, { href: `${getApiUrl()}auth/discord`, className: "flex w-full justify-end", children: /* @__PURE__ */ jsx178(Button, { className: "w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: "Login with Discord" }) })
16124
+ isDiscordAuthEnabled() && /* @__PURE__ */ jsx178(Link, { href: `${getPublicApiUrl()}auth/discord`, className: "flex w-full justify-end", children: /* @__PURE__ */ jsx178(Button, { className: "w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: "Login with Discord" }) })
16115
16125
  ] })
16116
16126
  ] });
16117
16127
  }
@@ -16396,7 +16406,7 @@ function Login() {
16396
16406
  }
16397
16407
  }, []);
16398
16408
  const buildDiscordOAuthUrl = /* @__PURE__ */ __name(() => {
16399
- const baseUrl = `${getApiUrl()}auth/discord`;
16409
+ const baseUrl = `${getPublicApiUrl()}auth/discord`;
16400
16410
  if (!referralCode) return baseUrl;
16401
16411
  return `${baseUrl}?referral=${encodeURIComponent(referralCode)}`;
16402
16412
  }, "buildDiscordOAuthUrl");
@@ -21621,4 +21631,4 @@ export {
21621
21631
  useOAuthClients,
21622
21632
  useOAuthClient
21623
21633
  };
21624
- //# sourceMappingURL=chunk-CPXN5OGI.mjs.map
21634
+ //# sourceMappingURL=chunk-CZ56O6JZ.mjs.map