@carlonicora/nextjs-jsonapi 1.91.0 → 1.92.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-IQAOVSUT.js → BlockNoteEditor-GSASQXY2.js} +9 -9
- package/dist/{BlockNoteEditor-IQAOVSUT.js.map → BlockNoteEditor-GSASQXY2.js.map} +1 -1
- package/dist/{BlockNoteEditor-S3MWGDLG.mjs → BlockNoteEditor-O2MMPJGR.mjs} +2 -2
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-GNKC2ZRU.js → chunk-2KX3OXHE.js} +192 -122
- package/dist/chunk-2KX3OXHE.js.map +1 -0
- package/dist/{chunk-WHZMP3ZF.mjs → chunk-QO267HMI.mjs} +92 -22
- package/dist/chunk-QO267HMI.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +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/package.json +1 -1
- package/src/components/containers/RoundPageContainer.tsx +108 -34
- package/src/components/containers/RoundPageContainerTitle.tsx +11 -8
- package/src/components/navigations/Breadcrumb.tsx +66 -4
- package/src/components/navigations/Header.tsx +6 -4
- package/dist/chunk-GNKC2ZRU.js.map +0 -1
- package/dist/chunk-WHZMP3ZF.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-S3MWGDLG.mjs.map → BlockNoteEditor-O2MMPJGR.mjs.map} +0 -0
|
@@ -9211,7 +9211,7 @@ __name(FormCheckbox, "FormCheckbox");
|
|
|
9211
9211
|
import dynamic from "next/dynamic";
|
|
9212
9212
|
import React14 from "react";
|
|
9213
9213
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
9214
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
9214
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-O2MMPJGR.mjs"), {
|
|
9215
9215
|
ssr: false
|
|
9216
9216
|
});
|
|
9217
9217
|
var BlockNoteEditorContainer = React14.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -13069,11 +13069,14 @@ __name(TableCellAvatar, "TableCellAvatar");
|
|
|
13069
13069
|
// src/components/navigations/Breadcrumb.tsx
|
|
13070
13070
|
import { useTranslations as useTranslations48 } from "next-intl";
|
|
13071
13071
|
import { Fragment as Fragment20, useState as useState42 } from "react";
|
|
13072
|
+
import { ChevronDownIcon as ChevronDownIcon8 } from "lucide-react";
|
|
13072
13073
|
import { Fragment as Fragment21, jsx as jsx138, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
13073
13074
|
var ITEMS_TO_DISPLAY = 4;
|
|
13074
|
-
function
|
|
13075
|
-
|
|
13076
|
-
|
|
13075
|
+
function BreadcrumbDesktop({
|
|
13076
|
+
items,
|
|
13077
|
+
generateUrl,
|
|
13078
|
+
t
|
|
13079
|
+
}) {
|
|
13077
13080
|
const [open, setOpen] = useState42(false);
|
|
13078
13081
|
return /* @__PURE__ */ jsx138(Breadcrumb, { children: /* @__PURE__ */ jsxs79(BreadcrumbList, { children: [
|
|
13079
13082
|
/* @__PURE__ */ jsx138(BreadcrumbItem, { children: /* @__PURE__ */ jsx138(Link, { href: generateUrl({ page: `/` }), children: t(`common.home`) }) }),
|
|
@@ -13096,6 +13099,36 @@ function BreadcrumbNavigation({ items }) {
|
|
|
13096
13099
|
] }, index)) })
|
|
13097
13100
|
] }) });
|
|
13098
13101
|
}
|
|
13102
|
+
__name(BreadcrumbDesktop, "BreadcrumbDesktop");
|
|
13103
|
+
function BreadcrumbMobile({
|
|
13104
|
+
items,
|
|
13105
|
+
generateUrl,
|
|
13106
|
+
t
|
|
13107
|
+
}) {
|
|
13108
|
+
const [open, setOpen] = useState42(false);
|
|
13109
|
+
const lastItem = items[items.length - 1];
|
|
13110
|
+
const allItems = [{ name: t(`common.home`), href: generateUrl({ page: `/` }) }, ...items];
|
|
13111
|
+
if (!lastItem && items.length === 0) {
|
|
13112
|
+
return /* @__PURE__ */ jsx138(Breadcrumb, { children: /* @__PURE__ */ jsx138(BreadcrumbList, { children: /* @__PURE__ */ jsx138(BreadcrumbItem, { children: /* @__PURE__ */ jsx138(Link, { href: generateUrl({ page: `/` }), children: t(`common.home`) }) }) }) });
|
|
13113
|
+
}
|
|
13114
|
+
return /* @__PURE__ */ jsxs79(DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
13115
|
+
/* @__PURE__ */ jsxs79(DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
|
|
13116
|
+
lastItem?.name,
|
|
13117
|
+
/* @__PURE__ */ jsx138(ChevronDownIcon8, { className: "text-muted-foreground size-3.5" })
|
|
13118
|
+
] }),
|
|
13119
|
+
/* @__PURE__ */ jsx138(DropdownMenuContent, { align: "start", children: allItems.map((item, index) => /* @__PURE__ */ jsx138(DropdownMenuItem, { children: item.href ? /* @__PURE__ */ jsx138(Link, { href: item.href, children: item.name }) : /* @__PURE__ */ jsx138(Fragment21, { children: item.name }) }, index)) })
|
|
13120
|
+
] });
|
|
13121
|
+
}
|
|
13122
|
+
__name(BreadcrumbMobile, "BreadcrumbMobile");
|
|
13123
|
+
function BreadcrumbNavigation({ items }) {
|
|
13124
|
+
const generateUrl = usePageUrlGenerator();
|
|
13125
|
+
const t = useTranslations48();
|
|
13126
|
+
const isMobile = useIsMobile();
|
|
13127
|
+
if (isMobile) {
|
|
13128
|
+
return /* @__PURE__ */ jsx138(BreadcrumbMobile, { items, generateUrl, t });
|
|
13129
|
+
}
|
|
13130
|
+
return /* @__PURE__ */ jsx138(BreadcrumbDesktop, { items, generateUrl, t });
|
|
13131
|
+
}
|
|
13099
13132
|
__name(BreadcrumbNavigation, "BreadcrumbNavigation");
|
|
13100
13133
|
|
|
13101
13134
|
// src/components/navigations/ContentTitle.tsx
|
|
@@ -13135,11 +13168,12 @@ __name(ContentTitle, "ContentTitle");
|
|
|
13135
13168
|
import { jsx as jsx140, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
13136
13169
|
function Header({ children, leftContent, className }) {
|
|
13137
13170
|
const { breadcrumbs } = useSharedContext();
|
|
13171
|
+
const isMobile = useIsMobile();
|
|
13138
13172
|
return /* @__PURE__ */ jsx140("header", { className: `sticky top-0 z-10 flex h-12 flex-col items-center justify-start gap-x-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxs81("div", { className: "bg-sidebar flex h-12 w-full flex-row items-center justify-between pl-2 pr-4", children: [
|
|
13139
13173
|
/* @__PURE__ */ jsx140(SidebarTrigger, { "aria-label": "Toggle sidebar", id: "sidebar-trigger" }),
|
|
13140
13174
|
leftContent,
|
|
13141
13175
|
/* @__PURE__ */ jsx140("div", { className: "flex w-full flex-row items-center justify-start", children: /* @__PURE__ */ jsx140(BreadcrumbNavigation, { items: breadcrumbs }) }),
|
|
13142
|
-
/* @__PURE__ */ jsx140("div", { className: "flex w-64 flex-row items-center justify-end gap-x-4 whitespace-nowrap", children: /* @__PURE__ */ jsx140("div", { className: "flex flex-row items-center justify-end gap-x-4 whitespace-nowrap", children
|
|
13176
|
+
!isMobile && children && /* @__PURE__ */ jsx140("div", { className: "flex w-64 flex-row items-center justify-end gap-x-4 whitespace-nowrap", children: /* @__PURE__ */ jsx140("div", { className: "flex flex-row items-center justify-end gap-x-4 whitespace-nowrap", children }) })
|
|
13143
13177
|
] }) });
|
|
13144
13178
|
}
|
|
13145
13179
|
__name(Header, "Header");
|
|
@@ -13158,7 +13192,7 @@ function ModeToggleSwitch() {
|
|
|
13158
13192
|
__name(ModeToggleSwitch, "ModeToggleSwitch");
|
|
13159
13193
|
|
|
13160
13194
|
// src/components/navigations/PageSection.tsx
|
|
13161
|
-
import { ChevronDownIcon as
|
|
13195
|
+
import { ChevronDownIcon as ChevronDownIcon9, ChevronRightIcon as ChevronRightIcon6 } from "lucide-react";
|
|
13162
13196
|
import { useEffect as useEffect36, useState as useState44 } from "react";
|
|
13163
13197
|
import { v4 as v44 } from "uuid";
|
|
13164
13198
|
import { jsx as jsx142, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
@@ -13191,7 +13225,7 @@ function PageSection({ children, title, options, open, small, onToggle }) {
|
|
|
13191
13225
|
className: `${isOpen ? "mb-4" : "mb-0"} flex w-full justify-between border-b ${small ? `border-muted` : `border-primary`} pb-1`,
|
|
13192
13226
|
children: [
|
|
13193
13227
|
/* @__PURE__ */ jsxs82("div", { className: "flex w-full cursor-pointer items-center justify-start gap-x-2", onClick: toggleOpen, children: [
|
|
13194
|
-
isOpen ? /* @__PURE__ */ jsx142(
|
|
13228
|
+
isOpen ? /* @__PURE__ */ jsx142(ChevronDownIcon9, { className: `text-primary h-4 w-4` }) : /* @__PURE__ */ jsx142(ChevronRightIcon6, { className: "text-primary h-4 w-4" }),
|
|
13195
13229
|
/* @__PURE__ */ jsx142("h2", { className: `flex w-full ${small === true ? `text-sm` : `text-lg`} text-primary font-semibold`, children: title })
|
|
13196
13230
|
] }),
|
|
13197
13231
|
options && /* @__PURE__ */ jsx142("div", { className: "flex gap-2", children: options })
|
|
@@ -13332,8 +13366,9 @@ function RoundPageContainerTitle({
|
|
|
13332
13366
|
setShowDetails
|
|
13333
13367
|
}) {
|
|
13334
13368
|
const { title } = useSharedContext();
|
|
13335
|
-
|
|
13336
|
-
|
|
13369
|
+
const isMobile = useIsMobile();
|
|
13370
|
+
return /* @__PURE__ */ jsxs86("div", { className: cn(`flex w-full flex-row items-center border-b p-4`, isMobile ? `justify-end` : `justify-between`), children: [
|
|
13371
|
+
!isMobile && /* @__PURE__ */ jsxs86("div", { className: "flex w-full gap-x-4", children: [
|
|
13337
13372
|
/* @__PURE__ */ jsxs86("div", { className: "text-muted-foreground flex items-center gap-x-2 text-lg font-light whitespace-nowrap", children: [
|
|
13338
13373
|
module && module.icon ? /* @__PURE__ */ jsx146(module.icon, { className: "text-primary h-6 w-6" }) : title.icon,
|
|
13339
13374
|
title.type
|
|
@@ -13378,10 +13413,15 @@ function RoundPageContainer({
|
|
|
13378
13413
|
const headerChildren = useHeaderChildren();
|
|
13379
13414
|
const headerLeftContent = useHeaderLeftContent();
|
|
13380
13415
|
const [showDetails, setShowDetailsState] = useState46(false);
|
|
13416
|
+
const isMobile = useIsMobile();
|
|
13417
|
+
const [mounted, setMounted] = useState46(false);
|
|
13381
13418
|
useEffect38(() => {
|
|
13382
13419
|
const match = document.cookie.split("; ").find((row) => row.startsWith(`${DETAILS_COOKIE_NAME}=`));
|
|
13383
13420
|
if (match?.split("=")[1] === "true") setShowDetailsState(true);
|
|
13384
13421
|
}, []);
|
|
13422
|
+
useEffect38(() => {
|
|
13423
|
+
setMounted(true);
|
|
13424
|
+
}, []);
|
|
13385
13425
|
const setShowDetails = useCallback26((value) => {
|
|
13386
13426
|
setShowDetailsState(value);
|
|
13387
13427
|
document.cookie = `${DETAILS_COOKIE_NAME}=${value}; path=/; max-age=${DETAILS_COOKIE_MAX_AGE}`;
|
|
@@ -13399,10 +13439,24 @@ function RoundPageContainer({
|
|
|
13399
13439
|
}
|
|
13400
13440
|
}
|
|
13401
13441
|
}, [section, tabs]);
|
|
13442
|
+
const handleTabChange = useCallback26(
|
|
13443
|
+
(key) => {
|
|
13444
|
+
setActiveTab(key);
|
|
13445
|
+
if (module && id) rewriteUrl({ page: module, id, additionalParameters: { section: key } });
|
|
13446
|
+
},
|
|
13447
|
+
[module, id, rewriteUrl]
|
|
13448
|
+
);
|
|
13402
13449
|
const activeFillHeight = tabs?.find((t) => (t.key?.name ?? t.label) === activeTab)?.fillHeight === true;
|
|
13450
|
+
const isReady = mounted && isMobile !== void 0;
|
|
13451
|
+
if (!isReady) {
|
|
13452
|
+
return /* @__PURE__ */ jsxs87(Fragment22, { children: [
|
|
13453
|
+
/* @__PURE__ */ jsx147(Header, { leftContent: headerLeftContent, className: "bg-sidebar border-0", children: headerChildren }),
|
|
13454
|
+
/* @__PURE__ */ jsx147("div", { className: cn("flex h-[calc(100vh-3rem)] w-full flex-col", isMobile ? "" : "p-2 pt-0 pl-0"), children: /* @__PURE__ */ jsx147("div", { className: cn("bg-background flex h-full w-full", isMobile ? "" : "rounded-lg border p-0"), children: /* @__PURE__ */ jsx147("div", { className: "flex w-full flex-col" }) }) })
|
|
13455
|
+
] });
|
|
13456
|
+
}
|
|
13403
13457
|
return /* @__PURE__ */ jsxs87(Fragment22, { children: [
|
|
13404
13458
|
/* @__PURE__ */ jsx147(Header, { leftContent: headerLeftContent, className: "bg-sidebar border-0", children: headerChildren }),
|
|
13405
|
-
/* @__PURE__ */ jsx147("div", { className:
|
|
13459
|
+
/* @__PURE__ */ jsx147("div", { className: cn(`flex h-[calc(100vh-3rem)] w-full flex-col`, isMobile ? "p-1 pt-0" : "p-2 pt-0 pl-0"), children: /* @__PURE__ */ jsx147("div", { className: "bg-background flex h-full w-full rounded-lg border p-0", children: /* @__PURE__ */ jsxs87("div", { className: "flex w-full flex-col", children: [
|
|
13406
13460
|
(!fullWidth || forceHeader) && /* @__PURE__ */ jsx147(
|
|
13407
13461
|
RoundPageContainerTitle,
|
|
13408
13462
|
{
|
|
@@ -13418,7 +13472,8 @@ function RoundPageContainer({
|
|
|
13418
13472
|
"div",
|
|
13419
13473
|
{
|
|
13420
13474
|
className: cn(
|
|
13421
|
-
`grow
|
|
13475
|
+
`grow`,
|
|
13476
|
+
isMobile ? `p-2` : `p-4`,
|
|
13422
13477
|
activeFillHeight ? `flex flex-col overflow-hidden` : `overflow-y-auto`,
|
|
13423
13478
|
fullWidth && `p-0`
|
|
13424
13479
|
),
|
|
@@ -13436,17 +13491,29 @@ function RoundPageContainer({
|
|
|
13436
13491
|
{
|
|
13437
13492
|
value: activeTab,
|
|
13438
13493
|
className: cn(`w-full`, activeFillHeight && `flex flex-1 min-h-0 flex-col`),
|
|
13439
|
-
onValueChange:
|
|
13440
|
-
setActiveTab(key);
|
|
13441
|
-
if (module && id)
|
|
13442
|
-
rewriteUrl({ page: module, id, additionalParameters: { section: key } });
|
|
13443
|
-
},
|
|
13494
|
+
onValueChange: handleTabChange,
|
|
13444
13495
|
children: [
|
|
13445
|
-
/* @__PURE__ */ jsx147("div", { className: "p-
|
|
13496
|
+
isMobile ? /* @__PURE__ */ jsx147("div", { className: "p-0", children: /* @__PURE__ */ jsxs87(
|
|
13497
|
+
Select,
|
|
13498
|
+
{
|
|
13499
|
+
value: activeTab,
|
|
13500
|
+
onValueChange: (value) => {
|
|
13501
|
+
if (value) handleTabChange(value);
|
|
13502
|
+
},
|
|
13503
|
+
children: [
|
|
13504
|
+
/* @__PURE__ */ jsx147(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx147(SelectValue, {}) }),
|
|
13505
|
+
/* @__PURE__ */ jsx147(SelectContent, { children: tabs.map((tab) => /* @__PURE__ */ jsx147(SelectItem, { value: tab.key?.name ?? tab.label, children: tab.contentLabel ?? tab.label }, tab.label)) })
|
|
13506
|
+
]
|
|
13507
|
+
}
|
|
13508
|
+
) }) : /* @__PURE__ */ jsx147("div", { className: "p-4", children: /* @__PURE__ */ jsx147(TabsList, { children: tabs.map((tab) => /* @__PURE__ */ jsx147(TabsTrigger, { value: tab.key?.name ?? tab.label, className: "px-4", children: tab.contentLabel ?? tab.label }, tab.label)) }) }),
|
|
13446
13509
|
/* @__PURE__ */ jsx147(
|
|
13447
13510
|
"div",
|
|
13448
13511
|
{
|
|
13449
|
-
className: cn(
|
|
13512
|
+
className: cn(
|
|
13513
|
+
`flex w-full `,
|
|
13514
|
+
isMobile ? `` : `px-4`,
|
|
13515
|
+
activeFillHeight ? `flex-1 min-h-0` : `overflow-y-auto`
|
|
13516
|
+
),
|
|
13450
13517
|
children: tabs.map((tab) => /* @__PURE__ */ jsx147(
|
|
13451
13518
|
TabsContent,
|
|
13452
13519
|
{
|
|
@@ -13461,13 +13528,16 @@ function RoundPageContainer({
|
|
|
13461
13528
|
]
|
|
13462
13529
|
}
|
|
13463
13530
|
),
|
|
13464
|
-
children && /* @__PURE__ */ jsx147("div", { className:
|
|
13531
|
+
children && /* @__PURE__ */ jsx147("div", { className: cn(`flex`, isMobile ? `px-2` : `px-4`), children })
|
|
13465
13532
|
] }) : children
|
|
13466
13533
|
}
|
|
13467
13534
|
)
|
|
13468
13535
|
}
|
|
13469
13536
|
),
|
|
13470
|
-
details && /* @__PURE__ */ jsx147(
|
|
13537
|
+
details && (isMobile ? /* @__PURE__ */ jsx147(Sheet, { open: showDetails, onOpenChange: setShowDetails, children: /* @__PURE__ */ jsxs87(SheetContent, { side: "right", children: [
|
|
13538
|
+
/* @__PURE__ */ jsx147(SheetHeader, { children: /* @__PURE__ */ jsx147(SheetTitle, { children: "Details" }) }),
|
|
13539
|
+
/* @__PURE__ */ jsx147("div", { className: "overflow-y-auto p-6 pt-0", children: details })
|
|
13540
|
+
] }) }) : /* @__PURE__ */ jsx147(
|
|
13471
13541
|
"div",
|
|
13472
13542
|
{
|
|
13473
13543
|
className: cn(
|
|
@@ -13476,7 +13546,7 @@ function RoundPageContainer({
|
|
|
13476
13546
|
),
|
|
13477
13547
|
children: details
|
|
13478
13548
|
}
|
|
13479
|
-
)
|
|
13549
|
+
))
|
|
13480
13550
|
] })
|
|
13481
13551
|
] }) }) })
|
|
13482
13552
|
] });
|
|
@@ -21902,4 +21972,4 @@ export {
|
|
|
21902
21972
|
useOAuthClients,
|
|
21903
21973
|
useOAuthClient
|
|
21904
21974
|
};
|
|
21905
|
-
//# sourceMappingURL=chunk-
|
|
21975
|
+
//# sourceMappingURL=chunk-QO267HMI.mjs.map
|