@ai-matrx/records-ui 0.115.95 → 0.115.96

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,6 +1,6 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
- ## 0.115.95
3
+ ## 0.115.96
4
4
 
5
5
  UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
6
6
  Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/records-ui/src`.
package/dist/index.cjs CHANGED
@@ -11157,11 +11157,14 @@ function ButtonValue({ field: field2, recordId, inCell }) {
11157
11157
  const tableId = field2.entity_definition_id;
11158
11158
  const press = async () => {
11159
11159
  if (!client || !recordId) return setSaid({ kind: "public" });
11160
- if (needs) return setSaid({ kind: "needs", says: needs });
11160
+ if (needs && b.do) return setSaid({ kind: "needs", says: needs });
11161
11161
  setBusy(true);
11162
11162
  const answered = await client.buttonPress({ record_id: recordId, field_id: field2.id });
11163
11163
  setBusy(false);
11164
- if (!answered.ok) return setSaid({ kind: "refused", error: answered.error });
11164
+ if (!answered.ok) {
11165
+ if (needs && (answered.error.sqlstate === "22023" || answered.error.code === "invalid_argument")) return setSaid({ kind: "needs", says: needs });
11166
+ return setSaid({ kind: "refused", error: answered.error });
11167
+ }
11165
11168
  const pressed = answered.data;
11166
11169
  if (pressed.do === "open_url") {
11167
11170
  const opened = typeof window !== "undefined" ? (0, import_outbound.openOutbound)(pressed.url, "_blank", "noopener") : null;