@ai-matrx/records-ui 0.93.63 → 0.93.64

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.93.64
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/records-ui/v0.93.63..npm/records-ui/v0.93.64 -- apps/shared/records-ui`).
7
+ No source changes intended and no consumer action required.
8
+
3
9
  ## 0.93.63
4
10
  ### Unreleased
5
11
 
package/dist/index.cjs CHANGED
@@ -18773,15 +18773,19 @@ function Kanban({
18773
18773
  }) {
18774
18774
  const groupFields = (0, import_react102.useMemo)(() => [groupField], [groupField]);
18775
18775
  const labels = useRecordLabels(groupFields);
18776
+ const options = useChoiceOptions(groupFields, isChoiceField(groupField) ? [groupField.key] : []).get(groupField.key);
18776
18777
  const columns = (0, import_react102.useMemo)(() => {
18777
18778
  const map = /* @__PURE__ */ new Map();
18779
+ const order = (options ?? []).map((o) => o.label);
18780
+ for (const label of order) map.set(label, []);
18778
18781
  for (const row of rows) {
18779
18782
  const raw = (row.document ?? {})[groupField.key];
18780
18783
  const key = raw === null || raw === void 0 || raw === "" ? "No value" : scalarText(groupField, raw, labels);
18781
18784
  map.set(key, [...map.get(key) ?? [], row]);
18782
18785
  }
18783
- return [...map.entries()].sort((a, b) => a[0] === "No value" ? 1 : b[0] === "No value" ? -1 : a[0].localeCompare(b[0]));
18784
- }, [rows, groupField, labels]);
18786
+ const rank = (name) => name === "No value" ? Number.MAX_SAFE_INTEGER : order.includes(name) ? order.indexOf(name) : order.length;
18787
+ return [...map.entries()].sort((a, b) => rank(a[0]) - rank(b[0]) || a[0].localeCompare(b[0]));
18788
+ }, [rows, groupField, labels, options]);
18785
18789
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex min-h-0 flex-col gap-2", children: [
18786
18790
  /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Note, { children: note }),
18787
18791
  /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "flex min-h-0 gap-2 overflow-x-auto pb-2", children: columns.map(([name, cards]) => /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("section", { className: "flex w-64 shrink-0 flex-col rounded border bg-muted/30", children: [