@ai-matrx/records-ui 0.67.0 → 0.68.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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.68.0
4
+
5
+ **Two things a screen was still doing behind a person's back.** (lane TAILS-6, found while
6
+ proving 0.66.0 on the live seat.)
7
+
8
+ * **The engineer's line was being READ ALOUD.** `sr-only` does not hide a line — it hides it
9
+ from people with EYES and reads it to everybody else. So the one person who could not skim
10
+ past *"@ai-matrx/records never reached the store from checklistTemplates: TypeError: Failed
11
+ to fetch"* was the blind owner of the business, who had it announced in full underneath
12
+ "We could not reach your data". `RefusalNotice` now marks that line `aria-hidden`; it stays
13
+ in the DOM with the SQLSTATE on it, and on the notice's `title`, for whoever debugs it.
14
+ The guard asserts on what a screen reader would SAY, not on what the DOM contains.
15
+ * **The Group by picker contradicted the board beside it.** `offerableFields` answers what is
16
+ a SENSIBLE column to group by — Choice columns — and the select listed only those. A view,
17
+ or a `?group=` link from a dashboard number, can name a column outside that set: the board
18
+ grouped by it happily and the select fell back to its blank "Choose a field". Watched on
19
+ Rincon Plumbing Co's Jobs board with six columns headed RPC-1000, RPC-1001 … over a picker
20
+ saying nothing was chosen. The chosen column is now always in the list, named, and marked
21
+ "an unusual column to use here".
22
+
23
+ **Consumer action:** none.
24
+
3
25
  ## 0.67.0
4
26
 
5
27
  **The office can copy a waiting client's own link, from the panel where it invited them.**
package/dist/index.cjs CHANGED
@@ -1492,7 +1492,16 @@ function RefusalNotice({
1492
1492
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_design_system5.AlertDescription, { className: "space-y-1 text-xs", children: [
1493
1493
  plain.sentence.replace(/\.$/, "") === plain.title ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { children: plain.sentence }),
1494
1494
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "opacity-80", children: plain.remedy }),
1495
- plain.forEngineers ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "sr-only", ...error.sqlstate ? { "data-sqlstate": error.sqlstate } : {}, children: plain.forEngineers }) : null,
1495
+ plain.forEngineers ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1496
+ "p",
1497
+ {
1498
+ className: "sr-only",
1499
+ "aria-hidden": "true",
1500
+ "data-for-engineers": "",
1501
+ ...error.sqlstate ? { "data-sqlstate": error.sqlstate } : {},
1502
+ children: plain.forEngineers
1503
+ }
1504
+ ) : null,
1496
1505
  actions
1497
1506
  ] })
1498
1507
  ]
@@ -7429,7 +7438,9 @@ function FieldPicker({
7429
7438
  }) {
7430
7439
  const want = LAYOUT_FIELD_KIND[layout];
7431
7440
  const offerable = want ? offerableFields(all, want) : [];
7432
- if (offerable.length === 0) {
7441
+ const chosenField = chosen ? all.find((field) => field.key === chosen) : void 0;
7442
+ const unusual = chosenField && !offerable.some((field) => field.key === chosenField.key) ? chosenField : void 0;
7443
+ if (offerable.length === 0 && !unusual) {
7433
7444
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs text-muted-foreground", children: LAYOUT_NO_FIELD[layout] });
7434
7445
  }
7435
7446
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-1.5 text-xs", children: [
@@ -7444,7 +7455,11 @@ function FieldPicker({
7444
7455
  onChange: (event) => onPick(event.target.value === "" ? null : event.target.value),
7445
7456
  children: [
7446
7457
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: "", children: "Choose a field" }),
7447
- offerable.map((field) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: field.key, children: fieldName(field) }, field.key))
7458
+ offerable.map((field) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: field.key, children: fieldName(field) }, field.key)),
7459
+ unusual ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("option", { value: unusual.key, children: [
7460
+ fieldName(unusual),
7461
+ " \u2014 an unusual column to use here"
7462
+ ] }, unusual.key) : null
7448
7463
  ]
7449
7464
  }
7450
7465
  ),