@ai-matrx/records-ui 0.116.42 → 0.116.43
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 +11 -1
- package/dist/{SaveToTable-T2CMF2SK.js → SaveToTable-4B67TPSC.js} +3 -3
- package/dist/{chunk-5IHVQ5MS.js → chunk-KEILC5XG.js} +14 -3
- package/dist/chunk-KEILC5XG.js.map +1 -0
- package/dist/{chunk-U7SHCLTY.js → chunk-OKAAPN6O.js} +2 -2
- package/dist/{chunk-JKM6DDSD.js → chunk-THRMANHB.js} +3 -3
- package/dist/index.cjs +22 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +13 -2
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-5IHVQ5MS.js.map +0 -1
- /package/dist/{SaveToTable-T2CMF2SK.js.map → SaveToTable-4B67TPSC.js.map} +0 -0
- /package/dist/{chunk-U7SHCLTY.js.map → chunk-OKAAPN6O.js.map} +0 -0
- /package/dist/{chunk-JKM6DDSD.js.map → chunk-THRMANHB.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1822,7 +1822,7 @@ declare function GridCell({ field, row, editing, canWrite, whyNot, format, onAsk
|
|
|
1822
1822
|
declare function hintIsMachineIdentity(hint: string): boolean;
|
|
1823
1823
|
/** The hint a PERSON should read, or null when it is written for an engineer. */
|
|
1824
1824
|
declare function hintForAPerson(hint: string | null | undefined): string | null;
|
|
1825
|
-
declare function RefusalNotice({ error, className, actions, onKeepEditing, onDiscard, }: {
|
|
1825
|
+
declare function RefusalNotice({ error, className, actions, onKeepEditing, onDiscard, onRetry, }: {
|
|
1826
1826
|
error: RecordsError;
|
|
1827
1827
|
className?: string | undefined;
|
|
1828
1828
|
actions?: ReactNode | undefined;
|
|
@@ -1836,6 +1836,11 @@ declare function RefusalNotice({ error, className, actions, onKeepEditing, onDis
|
|
|
1836
1836
|
*/
|
|
1837
1837
|
onKeepEditing?: (() => void) | undefined;
|
|
1838
1838
|
onDiscard?: (() => void) | undefined;
|
|
1839
|
+
/**
|
|
1840
|
+
* TRY AGAIN (AT-SLOW-2, 2026-10-19): the press that failed, run again. Pass it where the refused act
|
|
1841
|
+
* is safe to repeat as it was (ViewNeeds reads the table first, so a declare that landed is never made twice).
|
|
1842
|
+
*/
|
|
1843
|
+
onRetry?: (() => void) | undefined;
|
|
1839
1844
|
}): react.JSX.Element;
|
|
1840
1845
|
/** A small inline one, for a cell or a field where a block would break the layout. */
|
|
1841
1846
|
declare function RefusalLine({ error, className }: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1822,7 +1822,7 @@ declare function GridCell({ field, row, editing, canWrite, whyNot, format, onAsk
|
|
|
1822
1822
|
declare function hintIsMachineIdentity(hint: string): boolean;
|
|
1823
1823
|
/** The hint a PERSON should read, or null when it is written for an engineer. */
|
|
1824
1824
|
declare function hintForAPerson(hint: string | null | undefined): string | null;
|
|
1825
|
-
declare function RefusalNotice({ error, className, actions, onKeepEditing, onDiscard, }: {
|
|
1825
|
+
declare function RefusalNotice({ error, className, actions, onKeepEditing, onDiscard, onRetry, }: {
|
|
1826
1826
|
error: RecordsError;
|
|
1827
1827
|
className?: string | undefined;
|
|
1828
1828
|
actions?: ReactNode | undefined;
|
|
@@ -1836,6 +1836,11 @@ declare function RefusalNotice({ error, className, actions, onKeepEditing, onDis
|
|
|
1836
1836
|
*/
|
|
1837
1837
|
onKeepEditing?: (() => void) | undefined;
|
|
1838
1838
|
onDiscard?: (() => void) | undefined;
|
|
1839
|
+
/**
|
|
1840
|
+
* TRY AGAIN (AT-SLOW-2, 2026-10-19): the press that failed, run again. Pass it where the refused act
|
|
1841
|
+
* is safe to repeat as it was (ViewNeeds reads the table first, so a declare that landed is never made twice).
|
|
1842
|
+
*/
|
|
1843
|
+
onRetry?: (() => void) | undefined;
|
|
1839
1844
|
}): react.JSX.Element;
|
|
1840
1845
|
/** A small inline one, for a cell or a field where a block would break the layout. */
|
|
1841
1846
|
declare function RefusalLine({ error, className }: {
|
package/dist/index.js
CHANGED
|
@@ -182,7 +182,7 @@ import {
|
|
|
182
182
|
withoutAddition,
|
|
183
183
|
withoutLeadingBlank,
|
|
184
184
|
workedOutErrorFor
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-THRMANHB.js";
|
|
186
186
|
import {
|
|
187
187
|
CHART_PLOT_PX,
|
|
188
188
|
EMBEDDED_ROW_PX,
|
|
@@ -293,7 +293,7 @@ import {
|
|
|
293
293
|
visibilityLaneFor,
|
|
294
294
|
whyNotAskable,
|
|
295
295
|
writeOnTheWinningVersion_exports
|
|
296
|
-
} from "./chunk-
|
|
296
|
+
} from "./chunk-OKAAPN6O.js";
|
|
297
297
|
import {
|
|
298
298
|
ACTION_CHECKING_ACCESS_REASON,
|
|
299
299
|
ACTION_NOT_HERE_REASON,
|
|
@@ -400,7 +400,7 @@ import {
|
|
|
400
400
|
useRowRights,
|
|
401
401
|
useTableRights,
|
|
402
402
|
withoutInternalCodes
|
|
403
|
-
} from "./chunk-
|
|
403
|
+
} from "./chunk-KEILC5XG.js";
|
|
404
404
|
import {
|
|
405
405
|
FEWEST_KEY_VALUE_PAIRS,
|
|
406
406
|
FEWEST_LIST_ITEMS,
|
|
@@ -23036,8 +23036,14 @@ function ViewNeeds({ layout, tableId, fields, onMade, className }) {
|
|
|
23036
23036
|
const choices = options.map((o) => o.trim()).filter((o) => o !== "");
|
|
23037
23037
|
const suggestion = need.ask(name, choices);
|
|
23038
23038
|
const make = async () => {
|
|
23039
|
+
const retrying = refused !== null || mutation.error !== null;
|
|
23039
23040
|
setRefused(null);
|
|
23040
|
-
|
|
23041
|
+
let already = null;
|
|
23042
|
+
if (retrying && !pendingId) {
|
|
23043
|
+
const now = await client.fields({ table_id: tableId });
|
|
23044
|
+
if (now.ok) already = now.data.find((f) => fieldName(f) === name && !fields.some((g) => g.id === f.id))?.id ?? null;
|
|
23045
|
+
}
|
|
23046
|
+
const made = pendingId ?? already ?? await mutation.declare({
|
|
23041
23047
|
table_id: tableId,
|
|
23042
23048
|
spec: columnDeclarationFor(need, name, choices, fields)
|
|
23043
23049
|
});
|
|
@@ -23117,8 +23123,8 @@ function ViewNeeds({ layout, tableId, fields, onMade, className }) {
|
|
|
23117
23123
|
children: rights.structure ? `${need.missing} ${need.does(name)}` : need.missing
|
|
23118
23124
|
}
|
|
23119
23125
|
),
|
|
23120
|
-
mutation.error ? /* @__PURE__ */ jsx77(RefusalNotice, { error: mutation.error }) : null,
|
|
23121
|
-
refused ? /* @__PURE__ */ jsx77(RefusalNotice, { error: refused }) : null,
|
|
23126
|
+
mutation.error ? /* @__PURE__ */ jsx77(RefusalNotice, { error: mutation.error, onRetry: rights.structure ? () => void make() : void 0 }) : null,
|
|
23127
|
+
refused ? /* @__PURE__ */ jsx77(RefusalNotice, { error: refused, onRetry: rights.structure ? () => void make() : void 0 }) : null,
|
|
23122
23128
|
pendingId ? /* @__PURE__ */ jsx77("p", { className: "mt-2 text-xs text-muted-foreground", children: "The column was accepted but the table does not show it yet. Press Make it work again to look for it \u2014 it will not be added twice." }) : null
|
|
23123
23129
|
] });
|
|
23124
23130
|
}
|