@carlonicora/nextjs-jsonapi 3.20.0 → 3.21.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-CTRQ6JWE.mjs → BlockNoteEditor-CSLA3M32.mjs} +2 -2
- package/dist/{BlockNoteEditor-2WFPGK64.js → BlockNoteEditor-NRI2TZXY.js} +9 -9
- package/dist/{BlockNoteEditor-2WFPGK64.js.map → BlockNoteEditor-NRI2TZXY.js.map} +1 -1
- package/dist/billing/index.js +335 -335
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-CJHBL5AN.mjs → chunk-HSVAW3DQ.mjs} +45 -19
- package/dist/chunk-HSVAW3DQ.mjs.map +1 -0
- package/dist/{chunk-IQMJAYCJ.js → chunk-U32IWQZM.js} +144 -118
- package/dist/chunk-U32IWQZM.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +7 -1
- package/dist/components/index.d.ts +7 -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/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +75 -75
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/tables/ContentListTable.tsx +86 -26
- package/src/components/tables/__tests__/ContentListTable.spec.tsx +133 -10
- package/src/shadcnui/ui/badge.tsx +2 -0
- package/dist/chunk-CJHBL5AN.mjs.map +0 -1
- package/dist/chunk-IQMJAYCJ.js.map +0 -1
- /package/dist/{BlockNoteEditor-CTRQ6JWE.mjs.map → BlockNoteEditor-CSLA3M32.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -531,6 +531,8 @@ var badgeVariants = cva3(
|
|
|
531
531
|
softGray: "bg-gray-500/10 text-gray-700 dark:bg-gray-500/15 dark:text-gray-400",
|
|
532
532
|
softOrange: "bg-orange-500/10 text-orange-700 dark:bg-orange-500/15 dark:text-orange-400",
|
|
533
533
|
softAmber: "bg-amber-500/10 text-amber-700 dark:bg-amber-500/15 dark:text-amber-400",
|
|
534
|
+
softEmerald: "bg-emerald-500/10 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-400",
|
|
535
|
+
softPurple: "bg-purple-500/10 text-purple-700 dark:bg-purple-500/15 dark:text-purple-400",
|
|
534
536
|
blue: "bg-sky-500 text-primary-foreground [a]:hover:bg-sky-500/80",
|
|
535
537
|
green: "bg-emerald-500 text-primary-foreground [a]:hover:bg-emerald-500/80",
|
|
536
538
|
red: "bg-red-500 text-primary-foreground [a]:hover:bg-red-500/80",
|
|
@@ -10393,7 +10395,7 @@ import { useRef as useRef17 } from "react";
|
|
|
10393
10395
|
import dynamic from "next/dynamic";
|
|
10394
10396
|
import React18 from "react";
|
|
10395
10397
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
10396
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10398
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-CSLA3M32.mjs"), {
|
|
10397
10399
|
ssr: false
|
|
10398
10400
|
});
|
|
10399
10401
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -17661,6 +17663,18 @@ function getGroupKeys(item, field) {
|
|
|
17661
17663
|
return [String(value ?? "")];
|
|
17662
17664
|
}
|
|
17663
17665
|
__name(getGroupKeys, "getGroupKeys");
|
|
17666
|
+
var isClassComponent = /* @__PURE__ */ __name((component) => typeof component === "function" && !!component.prototype?.isReactComponent, "isClassComponent");
|
|
17667
|
+
function StableCell({ render, context }) {
|
|
17668
|
+
return /* @__PURE__ */ jsx191(Fragment28, { children: render(context) });
|
|
17669
|
+
}
|
|
17670
|
+
__name(StableCell, "StableCell");
|
|
17671
|
+
function renderCell(cellDef, context) {
|
|
17672
|
+
if (typeof cellDef === "function" && !isClassComponent(cellDef)) {
|
|
17673
|
+
return /* @__PURE__ */ jsx191(StableCell, { render: cellDef, context });
|
|
17674
|
+
}
|
|
17675
|
+
return flexRender(cellDef, context);
|
|
17676
|
+
}
|
|
17677
|
+
__name(renderCell, "renderCell");
|
|
17664
17678
|
var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(props) {
|
|
17665
17679
|
const { data, fields, checkedIds, toggleId, allowSearch, filters: _filters, fullWidth, onRowClick } = props;
|
|
17666
17680
|
const t = useTranslations61();
|
|
@@ -17693,6 +17707,14 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
17693
17707
|
data: tableData,
|
|
17694
17708
|
columns: tableColumns,
|
|
17695
17709
|
getCoreRowModel: getCoreRowModel(),
|
|
17710
|
+
...props.renderExpandedRow && {
|
|
17711
|
+
getExpandedRowModel: getExpandedRowModel(),
|
|
17712
|
+
// Key rows by record id so an expansion stays with its record when a search or filter reorders the rows.
|
|
17713
|
+
getRowId: /* @__PURE__ */ __name((row, index) => row.jsonApiData?.id ?? String(index), "getRowId"),
|
|
17714
|
+
getRowCanExpand: /* @__PURE__ */ __name(() => true, "getRowCanExpand"),
|
|
17715
|
+
onExpandedChange: setExpanded,
|
|
17716
|
+
state: { expanded }
|
|
17717
|
+
},
|
|
17696
17718
|
...props.expandable && {
|
|
17697
17719
|
getExpandedRowModel: getExpandedRowModel(),
|
|
17698
17720
|
getSubRows: props.getSubRows,
|
|
@@ -17779,30 +17801,34 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
17779
17801
|
] }),
|
|
17780
17802
|
/* @__PURE__ */ jsx191(TableBody, { children: rowModel && rowModel.rows?.length ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ jsxs103(React31.Fragment, { children: [
|
|
17781
17803
|
/* @__PURE__ */ jsx191(TableRow, { children: /* @__PURE__ */ jsx191(TableCell, { colSpan: tableColumns.length, className: "bg-muted px-4 py-2", children: /* @__PURE__ */ jsx191(MicroLabel, { children: props.groupLabel?.(group.groupKey) ?? group.groupKey }) }) }),
|
|
17782
|
-
group.rows.map((row) => /* @__PURE__ */
|
|
17804
|
+
group.rows.map((row) => /* @__PURE__ */ jsxs103(React31.Fragment, { children: [
|
|
17805
|
+
/* @__PURE__ */ jsx191(
|
|
17806
|
+
TableRow,
|
|
17807
|
+
{
|
|
17808
|
+
onClick: () => onRowClick?.(row.original.jsonApiData),
|
|
17809
|
+
className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
|
|
17810
|
+
children: row.getVisibleCells().map((cell) => {
|
|
17811
|
+
const meta = cell.column.columnDef.meta;
|
|
17812
|
+
return /* @__PURE__ */ jsx191(TableCell, { className: meta?.className, children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
17813
|
+
})
|
|
17814
|
+
}
|
|
17815
|
+
),
|
|
17816
|
+
props.renderExpandedRow && row.getIsExpanded() && /* @__PURE__ */ jsx191(TableRow, { "data-testid": "content-list-table-expanded-row", children: /* @__PURE__ */ jsx191(TableCell, { colSpan: tableColumns.length, className: "bg-muted/30 px-4 py-3", children: props.renderExpandedRow(row.original.jsonApiData) }) })
|
|
17817
|
+
] }, row.id))
|
|
17818
|
+
] }, group.groupKey)) : rowModel.rows.map((row) => /* @__PURE__ */ jsxs103(React31.Fragment, { children: [
|
|
17819
|
+
/* @__PURE__ */ jsx191(
|
|
17783
17820
|
TableRow,
|
|
17784
17821
|
{
|
|
17785
17822
|
onClick: () => onRowClick?.(row.original.jsonApiData),
|
|
17786
17823
|
className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
|
|
17787
17824
|
children: row.getVisibleCells().map((cell) => {
|
|
17788
17825
|
const meta = cell.column.columnDef.meta;
|
|
17789
|
-
return /* @__PURE__ */ jsx191(TableCell, { className: meta?.className, children:
|
|
17826
|
+
return /* @__PURE__ */ jsx191(TableCell, { className: meta?.className, children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
17790
17827
|
})
|
|
17791
|
-
}
|
|
17792
|
-
|
|
17793
|
-
))
|
|
17794
|
-
] },
|
|
17795
|
-
TableRow,
|
|
17796
|
-
{
|
|
17797
|
-
onClick: () => onRowClick?.(row.original.jsonApiData),
|
|
17798
|
-
className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
|
|
17799
|
-
children: row.getVisibleCells().map((cell) => {
|
|
17800
|
-
const meta = cell.column.columnDef.meta;
|
|
17801
|
-
return /* @__PURE__ */ jsx191(TableCell, { className: meta?.className, children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
17802
|
-
})
|
|
17803
|
-
},
|
|
17804
|
-
row.id
|
|
17805
|
-
)) : /* @__PURE__ */ jsx191(TableRow, { children: /* @__PURE__ */ jsx191(TableCell, { colSpan: tableColumns.length, className: "h-24 text-center", children: props.emptyState ?? (t.has("ui.empty_states.no_results") ? t("ui.empty_states.no_results") : "No results.") }) }) }),
|
|
17828
|
+
}
|
|
17829
|
+
),
|
|
17830
|
+
props.renderExpandedRow && row.getIsExpanded() && /* @__PURE__ */ jsx191(TableRow, { "data-testid": "content-list-table-expanded-row", children: /* @__PURE__ */ jsx191(TableCell, { colSpan: tableColumns.length, className: "bg-muted/30 px-4 py-3", children: props.renderExpandedRow(row.original.jsonApiData) }) })
|
|
17831
|
+
] }, row.id)) : /* @__PURE__ */ jsx191(TableRow, { children: /* @__PURE__ */ jsx191(TableCell, { colSpan: tableColumns.length, className: "h-24 text-center", children: props.emptyState ?? (t.has("ui.empty_states.no_results") ? t("ui.empty_states.no_results") : "No results.") }) }) }),
|
|
17806
17832
|
showFooter && /* @__PURE__ */ jsx191(TableFooter, { children: /* @__PURE__ */ jsx191(TableRow, { children: /* @__PURE__ */ jsx191(TableCell, { colSpan: tableColumns.length, className: "bg-card py-4 text-end", children: /* @__PURE__ */ jsxs103("div", { className: "flex items-center justify-end space-x-2", children: [
|
|
17807
17833
|
/* @__PURE__ */ jsx191(
|
|
17808
17834
|
Button,
|
|
@@ -27247,4 +27273,4 @@ export {
|
|
|
27247
27273
|
useOAuthClients,
|
|
27248
27274
|
useOAuthClient
|
|
27249
27275
|
};
|
|
27250
|
-
//# sourceMappingURL=chunk-
|
|
27276
|
+
//# sourceMappingURL=chunk-HSVAW3DQ.mjs.map
|