@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/dist/index.js CHANGED
@@ -1240,7 +1240,16 @@ function RefusalNotice({
1240
1240
  /* @__PURE__ */ jsxs5(AlertDescription, { className: "space-y-1 text-xs", children: [
1241
1241
  plain.sentence.replace(/\.$/, "") === plain.title ? null : /* @__PURE__ */ jsx6("p", { children: plain.sentence }),
1242
1242
  /* @__PURE__ */ jsx6("p", { className: "opacity-80", children: plain.remedy }),
1243
- plain.forEngineers ? /* @__PURE__ */ jsx6("p", { className: "sr-only", ...error.sqlstate ? { "data-sqlstate": error.sqlstate } : {}, children: plain.forEngineers }) : null,
1243
+ plain.forEngineers ? /* @__PURE__ */ jsx6(
1244
+ "p",
1245
+ {
1246
+ className: "sr-only",
1247
+ "aria-hidden": "true",
1248
+ "data-for-engineers": "",
1249
+ ...error.sqlstate ? { "data-sqlstate": error.sqlstate } : {},
1250
+ children: plain.forEngineers
1251
+ }
1252
+ ) : null,
1244
1253
  actions
1245
1254
  ] })
1246
1255
  ]
@@ -7239,7 +7248,9 @@ function FieldPicker({
7239
7248
  }) {
7240
7249
  const want = LAYOUT_FIELD_KIND[layout];
7241
7250
  const offerable = want ? offerableFields(all, want) : [];
7242
- if (offerable.length === 0) {
7251
+ const chosenField = chosen ? all.find((field) => field.key === chosen) : void 0;
7252
+ const unusual = chosenField && !offerable.some((field) => field.key === chosenField.key) ? chosenField : void 0;
7253
+ if (offerable.length === 0 && !unusual) {
7243
7254
  return /* @__PURE__ */ jsx26("p", { className: "text-xs text-muted-foreground", children: LAYOUT_NO_FIELD[layout] });
7244
7255
  }
7245
7256
  return /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-1.5 text-xs", children: [
@@ -7254,7 +7265,11 @@ function FieldPicker({
7254
7265
  onChange: (event) => onPick(event.target.value === "" ? null : event.target.value),
7255
7266
  children: [
7256
7267
  /* @__PURE__ */ jsx26("option", { value: "", children: "Choose a field" }),
7257
- offerable.map((field) => /* @__PURE__ */ jsx26("option", { value: field.key, children: fieldName(field) }, field.key))
7268
+ offerable.map((field) => /* @__PURE__ */ jsx26("option", { value: field.key, children: fieldName(field) }, field.key)),
7269
+ unusual ? /* @__PURE__ */ jsxs22("option", { value: unusual.key, children: [
7270
+ fieldName(unusual),
7271
+ " \u2014 an unusual column to use here"
7272
+ ] }, unusual.key) : null
7258
7273
  ]
7259
7274
  }
7260
7275
  ),