@ai-matrx/records-ui 0.116.86 → 0.116.87
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 +7 -3
- package/dist/{SaveToTable-NJQZTAMX.js → SaveToTable-X2T2GDX7.js} +3 -3
- package/dist/{chunk-OBRFVN3V.js → chunk-ATBJZKUT.js} +3 -3
- package/dist/{chunk-NSRAGMZ2.js → chunk-HYC2SPZZ.js} +1 -1
- package/dist/chunk-HYC2SPZZ.js.map +1 -0
- package/dist/{chunk-7IBO6WSM.js → chunk-Y5UJD4FV.js} +2 -2
- package/dist/helpers.d.cts +17 -1
- package/dist/helpers.d.ts +17 -1
- package/dist/index.cjs +21 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -2
- package/dist/index.d.ts +18 -2
- package/dist/index.js +24 -8
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +2 -2
- package/package.json +4 -4
- package/dist/chunk-NSRAGMZ2.js.map +0 -1
- /package/dist/{SaveToTable-NJQZTAMX.js.map → SaveToTable-X2T2GDX7.js.map} +0 -0
- /package/dist/{chunk-OBRFVN3V.js.map → chunk-ATBJZKUT.js.map} +0 -0
- /package/dist/{chunk-7IBO6WSM.js.map → chunk-Y5UJD4FV.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
useRecordsUi,
|
|
28
28
|
useTableRights,
|
|
29
29
|
writeOnTheWinningVersion_exports
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-HYC2SPZZ.js";
|
|
31
31
|
import {
|
|
32
32
|
guessColumn,
|
|
33
33
|
readTableShapes,
|
|
@@ -5205,4 +5205,4 @@ export {
|
|
|
5205
5205
|
shapesOfSource,
|
|
5206
5206
|
SaveToTable
|
|
5207
5207
|
};
|
|
5208
|
-
//# sourceMappingURL=chunk-
|
|
5208
|
+
//# sourceMappingURL=chunk-Y5UJD4FV.js.map
|
package/dist/helpers.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _ai_matrx_records from '@ai-matrx/records';
|
|
|
2
2
|
import { Uuid, RecordsActor, RecordsDataSource, PermissionLevel as PermissionLevel$1, RecordScopeContext, Field, RowAction, RecordDocument, Table, ReadRow, RecordsErrorCode, RecordRead, RowAgentTarget, AggregateFilter, HistoryActor, FieldHistoryEntry, HiddenFieldNotice, TableDecorations, DashboardSummary, FieldSensitivity, RecordsError } from '@ai-matrx/records';
|
|
3
3
|
import { PermissionLevel, DeclarableFieldKind, NewerFieldKind, FieldKind, ParityFieldType } from '@ai-matrx/records/field-kinds';
|
|
4
4
|
export { DEFAULT_FIELDS, DeclareResult, NewFieldSpec, NewTableSpec, addFields, declareTable, fieldDeclarationFor, tokenFor } from '@ai-matrx/records/field-kinds';
|
|
5
|
-
import {
|
|
5
|
+
import { ComponentType, ReactNode, KeyboardEvent } from 'react';
|
|
6
6
|
import { ReversibleAnnouncement } from '@ai-matrx/kit/reversible';
|
|
7
7
|
import { Uuid as Uuid$1 } from '@ai-matrx/records/react';
|
|
8
8
|
import { TableStyle, GroupAggregateSpec, GroupOrder } from '@ai-matrx/design-system/data-table';
|
|
@@ -508,7 +508,23 @@ type SyncedCellOutcome = {
|
|
|
508
508
|
ok: false;
|
|
509
509
|
message: string;
|
|
510
510
|
};
|
|
511
|
+
/** The host's cost door: a quiet "Cost" link that reveals a price on click. Rows carry ready text (this package formats its own points). */
|
|
512
|
+
interface RecordsCostDoorProps {
|
|
513
|
+
rows: {
|
|
514
|
+
label: string;
|
|
515
|
+
text: string;
|
|
516
|
+
}[];
|
|
517
|
+
label?: string;
|
|
518
|
+
iconOnly?: boolean;
|
|
519
|
+
className?: string;
|
|
520
|
+
}
|
|
511
521
|
interface RecordsUiHost {
|
|
522
|
+
/**
|
|
523
|
+
* OPTIONAL. THE COST DOOR. A price is never printed on the page (owner ruling 2026-10-22): bound, the
|
|
524
|
+
* enrichment settings and the fill confirm show a quiet door that reveals it on click. Unbound, they
|
|
525
|
+
* show nothing for cost.
|
|
526
|
+
*/
|
|
527
|
+
CostDoor?: ComponentType<RecordsCostDoorProps> | undefined;
|
|
512
528
|
/**
|
|
513
529
|
* OPTIONAL. THE TABLE'S ASK BOX, ANSWERED BY AN AGENT. Bound, the box sends the typed line here and
|
|
514
530
|
* draws the answer, the records it cites and any edits it proposes (each applied by the person,
|
package/dist/helpers.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _ai_matrx_records from '@ai-matrx/records';
|
|
|
2
2
|
import { Uuid, RecordsActor, RecordsDataSource, PermissionLevel as PermissionLevel$1, RecordScopeContext, Field, RowAction, RecordDocument, Table, ReadRow, RecordsErrorCode, RecordRead, RowAgentTarget, AggregateFilter, HistoryActor, FieldHistoryEntry, HiddenFieldNotice, TableDecorations, DashboardSummary, FieldSensitivity, RecordsError } from '@ai-matrx/records';
|
|
3
3
|
import { PermissionLevel, DeclarableFieldKind, NewerFieldKind, FieldKind, ParityFieldType } from '@ai-matrx/records/field-kinds';
|
|
4
4
|
export { DEFAULT_FIELDS, DeclareResult, NewFieldSpec, NewTableSpec, addFields, declareTable, fieldDeclarationFor, tokenFor } from '@ai-matrx/records/field-kinds';
|
|
5
|
-
import {
|
|
5
|
+
import { ComponentType, ReactNode, KeyboardEvent } from 'react';
|
|
6
6
|
import { ReversibleAnnouncement } from '@ai-matrx/kit/reversible';
|
|
7
7
|
import { Uuid as Uuid$1 } from '@ai-matrx/records/react';
|
|
8
8
|
import { TableStyle, GroupAggregateSpec, GroupOrder } from '@ai-matrx/design-system/data-table';
|
|
@@ -508,7 +508,23 @@ type SyncedCellOutcome = {
|
|
|
508
508
|
ok: false;
|
|
509
509
|
message: string;
|
|
510
510
|
};
|
|
511
|
+
/** The host's cost door: a quiet "Cost" link that reveals a price on click. Rows carry ready text (this package formats its own points). */
|
|
512
|
+
interface RecordsCostDoorProps {
|
|
513
|
+
rows: {
|
|
514
|
+
label: string;
|
|
515
|
+
text: string;
|
|
516
|
+
}[];
|
|
517
|
+
label?: string;
|
|
518
|
+
iconOnly?: boolean;
|
|
519
|
+
className?: string;
|
|
520
|
+
}
|
|
511
521
|
interface RecordsUiHost {
|
|
522
|
+
/**
|
|
523
|
+
* OPTIONAL. THE COST DOOR. A price is never printed on the page (owner ruling 2026-10-22): bound, the
|
|
524
|
+
* enrichment settings and the fill confirm show a quiet door that reveals it on click. Unbound, they
|
|
525
|
+
* show nothing for cost.
|
|
526
|
+
*/
|
|
527
|
+
CostDoor?: ComponentType<RecordsCostDoorProps> | undefined;
|
|
512
528
|
/**
|
|
513
529
|
* OPTIONAL. THE TABLE'S ASK BOX, ANSWERED BY AN AGENT. Bound, the box sends the typed line here and
|
|
514
530
|
* draws the answer, the records it cites and any edits it proposes (each applied by the person,
|
package/dist/index.cjs
CHANGED
|
@@ -25893,6 +25893,7 @@ function fillCountFrom(text) {
|
|
|
25893
25893
|
function EnrichPanel({ tableId, fieldId, className }) {
|
|
25894
25894
|
const client = (0, import_react122.useRecordsClient)();
|
|
25895
25895
|
const host = useRecordsUi();
|
|
25896
|
+
const CostDoor = host.CostDoor;
|
|
25896
25897
|
const table = (0, import_react122.useTable)(tableId);
|
|
25897
25898
|
const fields = (0, import_react122.useFields)(tableId);
|
|
25898
25899
|
const rights = useTableRights(table.data);
|
|
@@ -26195,8 +26196,20 @@ function EnrichPanel({ tableId, fieldId, className }) {
|
|
|
26195
26196
|
] })
|
|
26196
26197
|
] }),
|
|
26197
26198
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
|
|
26198
|
-
row.runs === 0 ? "It has not run yet." : `${row.runs} run${row.runs === 1 ? "" : "s"}` + (
|
|
26199
|
-
row.enrichment?.model ? ` \xB7 ${row.enrichment.model}` : ""
|
|
26199
|
+
row.runs === 0 ? "It has not run yet." : `${row.runs} run${row.runs === 1 ? "" : "s"}` + (row.last_run_at ? ` \xB7 last ran ${ago(row.last_run_at)}` : ""),
|
|
26200
|
+
row.enrichment?.model ? ` \xB7 ${row.enrichment.model}` : "",
|
|
26201
|
+
CostDoor && row.runs > 0 && costInPoints(Number(row.cost_cents), host.pointsRate) !== null ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
26202
|
+
" \xB7 ",
|
|
26203
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
26204
|
+
CostDoor,
|
|
26205
|
+
{
|
|
26206
|
+
rows: [
|
|
26207
|
+
{ label: "So far", text: costInPoints(Number(row.cost_cents), host.pointsRate) ?? "\u2014" },
|
|
26208
|
+
{ label: "A row", text: row.cost_per_row_cents === null ? "\u2014" : costInPoints(Number(row.cost_per_row_cents), host.pointsRate) ?? "\u2014" }
|
|
26209
|
+
]
|
|
26210
|
+
}
|
|
26211
|
+
)
|
|
26212
|
+
] }) : null
|
|
26200
26213
|
] }),
|
|
26201
26214
|
rights.admin ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex flex-wrap gap-2", children: [
|
|
26202
26215
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
@@ -26320,7 +26333,11 @@ function EnrichPanel({ tableId, fieldId, className }) {
|
|
|
26320
26333
|
estimate: estimate?.key === key ? estimate.value : null,
|
|
26321
26334
|
rate: host.pointsRate
|
|
26322
26335
|
});
|
|
26323
|
-
|
|
26336
|
+
if (words2 === null) return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_design_system68.Skeleton, { className: "ml-1 inline-block h-3 w-16 align-middle" });
|
|
26337
|
+
return CostDoor ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
26338
|
+
" \xB7 ",
|
|
26339
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CostDoor, { rows: [{ label: "Estimate", text: words2 }] })
|
|
26340
|
+
] }) : null;
|
|
26324
26341
|
})()
|
|
26325
26342
|
] }),
|
|
26326
26343
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex gap-2", children: [
|
|
@@ -63892,7 +63909,6 @@ function RailFrame({
|
|
|
63892
63909
|
}
|
|
63893
63910
|
);
|
|
63894
63911
|
}
|
|
63895
|
-
var UUID_SHAPE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
63896
63912
|
var OUTPUT_ROWS_WORDS = "they were saved from it";
|
|
63897
63913
|
function filterInWords(filter, fields) {
|
|
63898
63914
|
const nameOf3 = (key) => {
|
|
@@ -63912,7 +63928,7 @@ function filterInWords(filter, fields) {
|
|
|
63912
63928
|
if (to !== "") return `${nameOf3(key)} up to ${to}`;
|
|
63913
63929
|
return `${nameOf3(key)} in a period nobody named`;
|
|
63914
63930
|
}
|
|
63915
|
-
if (typeof value === "string" &&
|
|
63931
|
+
if (typeof value === "string" && (0, import_uuid11.isUuidShape)(value)) return `${nameOf3(key)} is one particular record`;
|
|
63916
63932
|
return `${nameOf3(key)} is ${String(value)}`;
|
|
63917
63933
|
});
|
|
63918
63934
|
if (fromOutput) parts.unshift(OUTPUT_ROWS_WORDS);
|