@carlonicora/nextjs-jsonapi 1.132.0 → 1.133.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.
@@ -10080,7 +10080,7 @@ import { useRef as useRef17 } from "react";
10080
10080
  import dynamic from "next/dynamic";
10081
10081
  import React17 from "react";
10082
10082
  import { jsx as jsx85 } from "react/jsx-runtime";
10083
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-WZFEJS2B.mjs"), {
10083
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-VXK7INMR.mjs"), {
10084
10084
  ssr: false
10085
10085
  });
10086
10086
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -16492,12 +16492,23 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
16492
16492
  list.push(row);
16493
16493
  }
16494
16494
  }
16495
- const sortedKeys = [...groupMap.keys()].sort((a, b) => a.localeCompare(b));
16495
+ const order = props.groupOrder;
16496
+ const sortedKeys = [...groupMap.keys()].sort((a, b) => {
16497
+ if (order) {
16498
+ const ia = order.indexOf(a);
16499
+ const ib = order.indexOf(b);
16500
+ if (ia === -1 && ib === -1) return a.localeCompare(b);
16501
+ if (ia === -1) return 1;
16502
+ if (ib === -1) return -1;
16503
+ return ia - ib;
16504
+ }
16505
+ return a.localeCompare(b);
16506
+ });
16496
16507
  return sortedKeys.map((groupKey) => ({
16497
16508
  groupKey,
16498
16509
  rows: groupMap.get(groupKey)
16499
16510
  }));
16500
- }, [props.groupBy, rowModel]);
16511
+ }, [props.groupBy, props.groupOrder, rowModel]);
16501
16512
  const showFooter = !!(data.next || data.previous);
16502
16513
  return /* @__PURE__ */ jsx176("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx176("div", { className: cn(`overflow-clip`, fullWidth ? `` : `rounded-md border`), children: /* @__PURE__ */ jsxs101(Table, { children: [
16503
16514
  /* @__PURE__ */ jsxs101(TableHeader, { className: "bg-muted font-semibold", children: [
@@ -16534,20 +16545,13 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
16534
16545
  ] })
16535
16546
  }
16536
16547
  ) }),
16537
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx176(TableRow, { children: headerGroup.headers.map((header) => {
16548
+ !props.hideHeader && table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx176(TableRow, { children: headerGroup.headers.map((header) => {
16538
16549
  const meta = header.column.columnDef.meta;
16539
16550
  return /* @__PURE__ */ jsx176(TableHead, { className: meta?.className, children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
16540
16551
  }) }, headerGroup.id))
16541
16552
  ] }),
16542
16553
  /* @__PURE__ */ jsx176(TableBody, { children: rowModel && rowModel.rows?.length ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ jsxs101(React28.Fragment, { children: [
16543
- /* @__PURE__ */ jsx176(TableRow, { children: /* @__PURE__ */ jsx176(
16544
- TableCell,
16545
- {
16546
- colSpan: tableColumns.length,
16547
- className: "bg-muted text-muted-foreground px-4 py-2 text-sm font-semibold",
16548
- children: group.groupKey
16549
- }
16550
- ) }),
16554
+ /* @__PURE__ */ jsx176(TableRow, { children: /* @__PURE__ */ jsx176(TableCell, { colSpan: tableColumns.length, className: "bg-muted px-4 py-2", children: /* @__PURE__ */ jsx176(MicroLabel, { children: props.groupLabel?.(group.groupKey) ?? group.groupKey }) }) }),
16551
16555
  group.rows.map((row) => /* @__PURE__ */ jsx176(
16552
16556
  TableRow,
16553
16557
  {
@@ -23621,4 +23625,4 @@ export {
23621
23625
  useOAuthClients,
23622
23626
  useOAuthClient
23623
23627
  };
23624
- //# sourceMappingURL=chunk-67LIVKYU.mjs.map
23628
+ //# sourceMappingURL=chunk-WEDLGKSS.mjs.map