@ai-matrx/records-ui 0.115.102 → 0.115.104
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 +22 -1
- package/dist/first-page.cjs +1 -1
- package/dist/first-page.cjs.map +1 -1
- package/dist/first-page.js +1 -1
- package/dist/first-page.js.map +1 -1
- package/dist/helpers.cjs +10 -11
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +9 -8
- package/dist/helpers.d.ts +9 -8
- package/dist/helpers.js +2 -2
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +464 -430
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +52 -18
- package/dist/index.js.map +1 -1
- package/dist/object-actions.cjs +6 -6
- package/dist/object-actions.cjs.map +1 -1
- package/dist/object-actions.d.cts +2 -1
- package/dist/object-actions.d.ts +2 -1
- package/dist/object-actions.js +2 -2
- package/dist/object-actions.js.map +1 -1
- package/dist/{objectActions-Ds2NA5Jn.d.cts → objectActions-CfzhrXHK.d.cts} +3 -2
- package/dist/{objectActions-Ds2NA5Jn.d.ts → objectActions-CfzhrXHK.d.ts} +3 -2
- package/dist/pickers.cjs +247 -213
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +49 -15
- package/dist/pickers.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, KeyboardEvent, ReactElement, ComponentType, RefObject, SVGAttributes } from 'react';
|
|
3
3
|
import * as _ai_matrx_records from '@ai-matrx/records';
|
|
4
|
-
import { Uuid, RowAction, Field, RowActionStep, RecordScopeContext, EnrichCell, RecordsError, RecordDocument, Table, ReadRow, PermissionLevel, RecordRead, RowAgentTarget, AggregateFilter, RelationDisplay, WriteConflict,
|
|
4
|
+
import { Uuid, RowAction, Field, RowActionStep, RecordScopeContext, EnrichCell, RecordsError, RecordDocument, Table, ReadRow, PermissionLevel, RecordRead, RowAgentTarget, AggregateFilter, RelationDisplay, WriteConflict, StoreFilter as StoreFilter$1, ImportRun, NewFieldDeclaration, RuleExpression, ChoiceRehome, FieldOptionEdit, StoredRecord, ChoiceNudge, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, MigrationEntry, PortalCard, PortalPrincipal, PortalPreviewRow, PortalAccent, PublicPicture, PortalStyle, RecordFilter, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, AggregateGroupValue, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, DashboardRunResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsActor, RecordsDataSource, RecordsConfig, TableDuplicated, HistoryActor, FieldHistoryEntry, DrillDefinition, DrillSource, DrillLane, DrillQuestion, TableDuplicateProgress, TableArchiveProgress } from '@ai-matrx/records';
|
|
5
5
|
import { ReversibleAnnouncement } from '@ai-matrx/kit/reversible';
|
|
6
|
-
import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-
|
|
7
|
-
export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-
|
|
6
|
+
import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-CfzhrXHK.cjs';
|
|
7
|
+
export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-CfzhrXHK.cjs';
|
|
8
8
|
import { Uuid as Uuid$1, Table as Table$1, Field as Field$1, ReadRow as ReadRow$1, StoreFilter, useRecordsClient } from '@ai-matrx/records/react';
|
|
9
9
|
import * as _ai_matrx_records_core from '@ai-matrx/records/core';
|
|
10
|
-
import { RecordsClient, ParsedImport, NewFieldSpec } from '@ai-matrx/records/core';
|
|
10
|
+
import { RecordsClient, Field as Field$2, TableDecorations, ParsedImport, DeclarableFieldKind, NewerFieldKind, ParityFieldType, FieldKind, NewFieldSpec } from '@ai-matrx/records/core';
|
|
11
11
|
export { DEFAULT_FIELDS, DeclareResult, NewFieldSpec, NewTableSpec, addFields, declareTable, fieldDeclarationFor, tokenFor } from '@ai-matrx/records/core';
|
|
12
12
|
import { FieldFormatConfig } from '@ai-matrx/design-system/field-formats';
|
|
13
13
|
import { RecordVersions } from '@ai-matrx/records/versions';
|
|
@@ -1894,7 +1894,7 @@ declare function parseGridPresentation(raw: unknown): GridPresentation;
|
|
|
1894
1894
|
declare function presentationIsEmpty(p: GridPresentation): boolean;
|
|
1895
1895
|
/** The string a view record stores. Empty string for "this view styles nothing". */
|
|
1896
1896
|
declare function presentationDocument(p: GridPresentation): string;
|
|
1897
|
-
declare function formatForField(field: Field): FieldFormatConfig | undefined;
|
|
1897
|
+
declare function formatForField(field: Field$2): FieldFormatConfig | undefined;
|
|
1898
1898
|
declare function currencyCodeFor(unit: string | null | undefined): string;
|
|
1899
1899
|
/**
|
|
1900
1900
|
* The color a value paints with when a view colors BY a column.
|
|
@@ -1921,7 +1921,7 @@ declare const colorFromTheValue: ChoiceColorLookup;
|
|
|
1921
1921
|
* longer resolves to a key) is dropped rather than crashing the whole style — a defect in
|
|
1922
1922
|
* one rule costs that rule, never the read.
|
|
1923
1923
|
*/
|
|
1924
|
-
declare function styleFromDecorations(decorations: TableDecorations | null | undefined, fields: readonly Field[]): TableStyle;
|
|
1924
|
+
declare function styleFromDecorations(decorations: TableDecorations | null | undefined, fields: readonly Field$2[]): TableStyle;
|
|
1925
1925
|
/**
|
|
1926
1926
|
* THE ONE PRESENTATION RESOLVER every colored surface in this package reads —
|
|
1927
1927
|
* `Grid`, and (via `Card`) the kanban board, the calendar and the gallery.
|
|
@@ -1943,7 +1943,7 @@ declare function styleFromDecorations(decorations: TableDecorations | null | und
|
|
|
1943
1943
|
* table rule it meant to replace. Per-piece, never all-or-nothing, because a view is a
|
|
1944
1944
|
* LOOK on top of the table, not a wholesale substitute for it.
|
|
1945
1945
|
*/
|
|
1946
|
-
declare function resolveTableStyle(decorations: TableDecorations | null | undefined, fields: readonly Field[], viewStyle: TableStyle | undefined): TableStyle;
|
|
1946
|
+
declare function resolveTableStyle(decorations: TableDecorations | null | undefined, fields: readonly Field$2[], viewStyle: TableStyle | undefined): TableStyle;
|
|
1947
1947
|
|
|
1948
1948
|
/** THE DECLARATIVE SPEC, with this package's grid look. */
|
|
1949
1949
|
type SavedViewSpec = base.SavedViewSpec<GridPresentation>;
|
|
@@ -3606,7 +3606,7 @@ type EditorKind = FieldKind;
|
|
|
3606
3606
|
* It is `fieldKindFor` with this package's kernel ids bound. Nothing here
|
|
3607
3607
|
* decides anything the core does not.
|
|
3608
3608
|
*/
|
|
3609
|
-
declare function editorKindFor(field: Field): EditorKind;
|
|
3609
|
+
declare function editorKindFor(field: Field$2): EditorKind;
|
|
3610
3610
|
/**
|
|
3611
3611
|
* WHICH KIND A PERSON PICKED, read back off the Field the store keeps — the ONE reader every
|
|
3612
3612
|
* "what does this column hold" answer goes through (the Settings column list, the column panel).
|
|
@@ -3620,13 +3620,13 @@ declare function editorKindFor(field: Field): EditorKind;
|
|
|
3620
3620
|
*
|
|
3621
3621
|
* `undefined` when the Field is none of the kinds the menu offers.
|
|
3622
3622
|
*/
|
|
3623
|
-
declare function pickableTypeOf(field: Field): PickableFieldType | undefined;
|
|
3623
|
+
declare function pickableTypeOf(field: Field$2): PickableFieldType | undefined;
|
|
3624
3624
|
/**
|
|
3625
3625
|
* The type word a person sees in a header or a settings row — and it is the
|
|
3626
3626
|
* SAME word the field panel offers, read from `FIELD_TYPE_CHOICES`, so a column
|
|
3627
3627
|
* added as "Money" is never described anywhere else as "Currency".
|
|
3628
3628
|
*/
|
|
3629
|
-
declare function fieldTypeLabel(field: Field): string;
|
|
3629
|
+
declare function fieldTypeLabel(field: Field$2): string;
|
|
3630
3630
|
|
|
3631
3631
|
/** The one token form, written the way the store's own pattern reads it. */
|
|
3632
3632
|
declare function fieldToken(fieldId: Uuid): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, KeyboardEvent, ReactElement, ComponentType, RefObject, SVGAttributes } from 'react';
|
|
3
3
|
import * as _ai_matrx_records from '@ai-matrx/records';
|
|
4
|
-
import { Uuid, RowAction, Field, RowActionStep, RecordScopeContext, EnrichCell, RecordsError, RecordDocument, Table, ReadRow, PermissionLevel, RecordRead, RowAgentTarget, AggregateFilter, RelationDisplay, WriteConflict,
|
|
4
|
+
import { Uuid, RowAction, Field, RowActionStep, RecordScopeContext, EnrichCell, RecordsError, RecordDocument, Table, ReadRow, PermissionLevel, RecordRead, RowAgentTarget, AggregateFilter, RelationDisplay, WriteConflict, StoreFilter as StoreFilter$1, ImportRun, NewFieldDeclaration, RuleExpression, ChoiceRehome, FieldOptionEdit, StoredRecord, ChoiceNudge, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, MigrationEntry, PortalCard, PortalPrincipal, PortalPreviewRow, PortalAccent, PublicPicture, PortalStyle, RecordFilter, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, AggregateGroupValue, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, DashboardRunResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsActor, RecordsDataSource, RecordsConfig, TableDuplicated, HistoryActor, FieldHistoryEntry, DrillDefinition, DrillSource, DrillLane, DrillQuestion, TableDuplicateProgress, TableArchiveProgress } from '@ai-matrx/records';
|
|
5
5
|
import { ReversibleAnnouncement } from '@ai-matrx/kit/reversible';
|
|
6
|
-
import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-
|
|
7
|
-
export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-
|
|
6
|
+
import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-CfzhrXHK.js';
|
|
7
|
+
export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-CfzhrXHK.js';
|
|
8
8
|
import { Uuid as Uuid$1, Table as Table$1, Field as Field$1, ReadRow as ReadRow$1, StoreFilter, useRecordsClient } from '@ai-matrx/records/react';
|
|
9
9
|
import * as _ai_matrx_records_core from '@ai-matrx/records/core';
|
|
10
|
-
import { RecordsClient, ParsedImport, NewFieldSpec } from '@ai-matrx/records/core';
|
|
10
|
+
import { RecordsClient, Field as Field$2, TableDecorations, ParsedImport, DeclarableFieldKind, NewerFieldKind, ParityFieldType, FieldKind, NewFieldSpec } from '@ai-matrx/records/core';
|
|
11
11
|
export { DEFAULT_FIELDS, DeclareResult, NewFieldSpec, NewTableSpec, addFields, declareTable, fieldDeclarationFor, tokenFor } from '@ai-matrx/records/core';
|
|
12
12
|
import { FieldFormatConfig } from '@ai-matrx/design-system/field-formats';
|
|
13
13
|
import { RecordVersions } from '@ai-matrx/records/versions';
|
|
@@ -1894,7 +1894,7 @@ declare function parseGridPresentation(raw: unknown): GridPresentation;
|
|
|
1894
1894
|
declare function presentationIsEmpty(p: GridPresentation): boolean;
|
|
1895
1895
|
/** The string a view record stores. Empty string for "this view styles nothing". */
|
|
1896
1896
|
declare function presentationDocument(p: GridPresentation): string;
|
|
1897
|
-
declare function formatForField(field: Field): FieldFormatConfig | undefined;
|
|
1897
|
+
declare function formatForField(field: Field$2): FieldFormatConfig | undefined;
|
|
1898
1898
|
declare function currencyCodeFor(unit: string | null | undefined): string;
|
|
1899
1899
|
/**
|
|
1900
1900
|
* The color a value paints with when a view colors BY a column.
|
|
@@ -1921,7 +1921,7 @@ declare const colorFromTheValue: ChoiceColorLookup;
|
|
|
1921
1921
|
* longer resolves to a key) is dropped rather than crashing the whole style — a defect in
|
|
1922
1922
|
* one rule costs that rule, never the read.
|
|
1923
1923
|
*/
|
|
1924
|
-
declare function styleFromDecorations(decorations: TableDecorations | null | undefined, fields: readonly Field[]): TableStyle;
|
|
1924
|
+
declare function styleFromDecorations(decorations: TableDecorations | null | undefined, fields: readonly Field$2[]): TableStyle;
|
|
1925
1925
|
/**
|
|
1926
1926
|
* THE ONE PRESENTATION RESOLVER every colored surface in this package reads —
|
|
1927
1927
|
* `Grid`, and (via `Card`) the kanban board, the calendar and the gallery.
|
|
@@ -1943,7 +1943,7 @@ declare function styleFromDecorations(decorations: TableDecorations | null | und
|
|
|
1943
1943
|
* table rule it meant to replace. Per-piece, never all-or-nothing, because a view is a
|
|
1944
1944
|
* LOOK on top of the table, not a wholesale substitute for it.
|
|
1945
1945
|
*/
|
|
1946
|
-
declare function resolveTableStyle(decorations: TableDecorations | null | undefined, fields: readonly Field[], viewStyle: TableStyle | undefined): TableStyle;
|
|
1946
|
+
declare function resolveTableStyle(decorations: TableDecorations | null | undefined, fields: readonly Field$2[], viewStyle: TableStyle | undefined): TableStyle;
|
|
1947
1947
|
|
|
1948
1948
|
/** THE DECLARATIVE SPEC, with this package's grid look. */
|
|
1949
1949
|
type SavedViewSpec = base.SavedViewSpec<GridPresentation>;
|
|
@@ -3606,7 +3606,7 @@ type EditorKind = FieldKind;
|
|
|
3606
3606
|
* It is `fieldKindFor` with this package's kernel ids bound. Nothing here
|
|
3607
3607
|
* decides anything the core does not.
|
|
3608
3608
|
*/
|
|
3609
|
-
declare function editorKindFor(field: Field): EditorKind;
|
|
3609
|
+
declare function editorKindFor(field: Field$2): EditorKind;
|
|
3610
3610
|
/**
|
|
3611
3611
|
* WHICH KIND A PERSON PICKED, read back off the Field the store keeps — the ONE reader every
|
|
3612
3612
|
* "what does this column hold" answer goes through (the Settings column list, the column panel).
|
|
@@ -3620,13 +3620,13 @@ declare function editorKindFor(field: Field): EditorKind;
|
|
|
3620
3620
|
*
|
|
3621
3621
|
* `undefined` when the Field is none of the kinds the menu offers.
|
|
3622
3622
|
*/
|
|
3623
|
-
declare function pickableTypeOf(field: Field): PickableFieldType | undefined;
|
|
3623
|
+
declare function pickableTypeOf(field: Field$2): PickableFieldType | undefined;
|
|
3624
3624
|
/**
|
|
3625
3625
|
* The type word a person sees in a header or a settings row — and it is the
|
|
3626
3626
|
* SAME word the field panel offers, read from `FIELD_TYPE_CHOICES`, so a column
|
|
3627
3627
|
* added as "Money" is never described anywhere else as "Currency".
|
|
3628
3628
|
*/
|
|
3629
|
-
declare function fieldTypeLabel(field: Field): string;
|
|
3629
|
+
declare function fieldTypeLabel(field: Field$2): string;
|
|
3630
3630
|
|
|
3631
3631
|
/** The one token form, written the way the store's own pattern reads it. */
|
|
3632
3632
|
declare function fieldToken(fieldId: Uuid): string;
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
26
26
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
27
27
|
|
|
28
28
|
// src/rights.ts
|
|
29
|
-
import { atLeast } from "@ai-matrx/records";
|
|
29
|
+
import { atLeast } from "@ai-matrx/records/core";
|
|
30
30
|
function levelNeededFor(what) {
|
|
31
31
|
return NEEDS[what];
|
|
32
32
|
}
|
|
@@ -504,7 +504,7 @@ var init_plainWords = __esm({
|
|
|
504
504
|
});
|
|
505
505
|
|
|
506
506
|
// src/choiceLooks.ts
|
|
507
|
-
import { newerKindOf } from "@ai-matrx/records";
|
|
507
|
+
import { newerKindOf } from "@ai-matrx/records/core";
|
|
508
508
|
import { CHOICE_CHIP_CLASS, NEUTRAL_CHIP_CLASS, STYLE_COLORS } from "@ai-matrx/design-system/data-table/table-style";
|
|
509
509
|
function displayFormatOf(field2) {
|
|
510
510
|
const raw = field2.display_format;
|
|
@@ -618,7 +618,7 @@ var init_docs = __esm({
|
|
|
618
618
|
});
|
|
619
619
|
|
|
620
620
|
// src/fieldTypes.ts
|
|
621
|
-
import { DECLARABLE_FIELD_KINDS, NEWER_FIELD_KINDS, PARITY_FIELD_TYPES } from "@ai-matrx/records";
|
|
621
|
+
import { DECLARABLE_FIELD_KINDS, NEWER_FIELD_KINDS, PARITY_FIELD_TYPES } from "@ai-matrx/records/core";
|
|
622
622
|
function declaredAsLook(kind2) {
|
|
623
623
|
return kind2 in LOOK_KINDS && !storePublishesKind(kind2);
|
|
624
624
|
}
|
|
@@ -722,8 +722,8 @@ import {
|
|
|
722
722
|
PARITY_FIELD_TYPES as PARITY_FIELD_TYPES2,
|
|
723
723
|
fieldKindFor,
|
|
724
724
|
newerKindOf as newerKindOf2
|
|
725
|
-
} from "@ai-matrx/records";
|
|
726
|
-
import { isButtonField } from "@ai-matrx/records";
|
|
725
|
+
} from "@ai-matrx/records/core";
|
|
726
|
+
import { isButtonField } from "@ai-matrx/records/core";
|
|
727
727
|
import { humanizeIdentifier as humanizeIdentifier2 } from "@ai-matrx/kit/text-case";
|
|
728
728
|
function editorKindFor(field2) {
|
|
729
729
|
return fieldKindFor(field2, KERNEL);
|
|
@@ -10295,7 +10295,7 @@ init_parity();
|
|
|
10295
10295
|
init_dates();
|
|
10296
10296
|
import { COLOR_ROTATION, parseTableStyle, tableStyleIsEmpty } from "@ai-matrx/design-system/data-table/table-style";
|
|
10297
10297
|
import { getFieldFormat } from "@ai-matrx/design-system/field-formats";
|
|
10298
|
-
import { newerKindOf as newerKindOf3, ratingMaxOf } from "@ai-matrx/records";
|
|
10298
|
+
import { newerKindOf as newerKindOf3, ratingMaxOf } from "@ai-matrx/records/core";
|
|
10299
10299
|
function parseGanttLook(raw) {
|
|
10300
10300
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return void 0;
|
|
10301
10301
|
const v = raw;
|
|
@@ -12016,6 +12016,11 @@ import { useCallback as useCallback12, useEffect as useEffect25, useState as use
|
|
|
12016
12016
|
import { Button as Button24 } from "@ai-matrx/design-system";
|
|
12017
12017
|
import { tableShapeChanged as tableShapeChanged4, useRecordsClient as useRecordsClient17 } from "@ai-matrx/records/react";
|
|
12018
12018
|
|
|
12019
|
+
// src/leadingBlank.ts
|
|
12020
|
+
function withoutLeadingBlank(text) {
|
|
12021
|
+
return text.replace(/^\s+/, "");
|
|
12022
|
+
}
|
|
12023
|
+
|
|
12019
12024
|
// src/values.tsx
|
|
12020
12025
|
init_personChip();
|
|
12021
12026
|
import { SWATCH_CLASS as SWATCH_CLASS2, formatColumnValue } from "@ai-matrx/design-system/data-table";
|
|
@@ -13709,9 +13714,9 @@ function RecordsTable({ items }) {
|
|
|
13709
13714
|
const pictureFirst = [...keys].sort((a, b) => rank(a, items) - rank(b, items)).slice(0, TABLE_COLUMNS);
|
|
13710
13715
|
const shown5 = all ? items : items.slice(0, TABLE_ROWS);
|
|
13711
13716
|
return /* @__PURE__ */ jsxs38("div", { className: "min-w-0", "data-records-structured": "table", children: [
|
|
13712
|
-
/* @__PURE__ */ jsx43("div", { className: "max-w-full overflow-x-auto rounded-md border border-border", children: /* @__PURE__ */ jsxs38("table", { className: "w-full border-collapse text-xs", children: [
|
|
13717
|
+
/* @__PURE__ */ jsx43("div", { className: "max-w-full overflow-x-auto rounded-md border border-border", "data-records-structured-table-frame": "", children: /* @__PURE__ */ jsxs38("table", { className: "w-full border-collapse text-xs", children: [
|
|
13713
13718
|
/* @__PURE__ */ jsx43("thead", { className: "bg-muted/60 text-left", children: /* @__PURE__ */ jsx43("tr", { children: pictureFirst.map((k) => /* @__PURE__ */ jsx43("th", { scope: "col", className: "whitespace-nowrap px-2 py-1 font-medium text-muted-foreground", children: keyWords(k) }, k)) }) }),
|
|
13714
|
-
/* @__PURE__ */ jsx43("tbody", { children: shown5.map((item, i) => /* @__PURE__ */ jsx43("tr", { className: "border-t border-border/60 align-top", children: pictureFirst.map((k) => /* @__PURE__ */ jsx43("td", { className: "min-w-[
|
|
13719
|
+
/* @__PURE__ */ jsx43("tbody", { children: shown5.map((item, i) => /* @__PURE__ */ jsx43("tr", { className: "border-t border-border/60 align-top", children: pictureFirst.map((k) => /* @__PURE__ */ jsx43("td", { className: "min-w-[4rem] max-w-[18rem] break-words px-2 py-1 [overflow-wrap:anywhere]", children: k in item ? /* @__PURE__ */ jsx43(Nested, { value: item[k], keyName: k, dense: true }) : /* @__PURE__ */ jsx43("span", { className: "text-muted-foreground", children: "\u2014" }) }, k)) }, i)) })
|
|
13715
13720
|
] }) }),
|
|
13716
13721
|
items.length > TABLE_ROWS ? /* @__PURE__ */ jsx43(Button23, { type: "button", variant: "ghost", size: "sm", className: "mt-1 h-6 px-2 text-xs", onClick: (e) => {
|
|
13717
13722
|
stop(e);
|
|
@@ -14122,7 +14127,7 @@ function scalarText(field2, value, labels, stillWaitingFor) {
|
|
|
14122
14127
|
}
|
|
14123
14128
|
if (Array.isArray(value)) return value.length === 0 ? "" : structuredSummary(value);
|
|
14124
14129
|
if (typeof value === "object") return structuredOf(value) ? structuredSummary(value) : "\u2026";
|
|
14125
|
-
return String(value);
|
|
14130
|
+
return typeof value === "string" ? withoutLeadingBlank(value) : String(value);
|
|
14126
14131
|
}
|
|
14127
14132
|
function ProvenanceBadge({ document: document2, fieldKey }) {
|
|
14128
14133
|
const envelope = envelopeFor(document2, fieldKey);
|
|
@@ -14172,7 +14177,7 @@ function RecordValue({
|
|
|
14172
14177
|
}
|
|
14173
14178
|
if (inCell && ui.grid === "merged" && ui.renderText && typeof value === "string" && value.trim() !== "" && editorKindFor(field2) === "long_text" && !shownAsOf(field2) && !wholeValueOf(document2, field2.key) && !envelopeFor(document2, field2.key)?.absent && // A long-text cell holding a kind is drawn by the kind system below, not as markdown.
|
|
14174
14179
|
!kindValueOf(value)) {
|
|
14175
|
-
return /* @__PURE__ */ jsx44("span", { className: "block h-[1.5em] min-w-0 overflow-hidden whitespace-normal [[data-matrx-cell-lines]:not([data-matrx-cell-lines=one])_&]:h-auto", "data-records-cell-text": "", children: ui.renderText(value, "cell") });
|
|
14180
|
+
return /* @__PURE__ */ jsx44("span", { className: "block h-[1.5em] min-w-0 overflow-hidden whitespace-normal [[data-matrx-cell-lines]:not([data-matrx-cell-lines=one])_&]:h-auto", "data-records-cell-text": "", children: ui.renderText(withoutLeadingBlank(value), "cell") });
|
|
14176
14181
|
}
|
|
14177
14182
|
if (isSignatureField(field2) && value !== null && value !== void 0 && value !== "") {
|
|
14178
14183
|
return /* @__PURE__ */ jsx44(SignatureValue, { value, inCell, recordId, fieldKey: field2.key, document: document2 });
|
|
@@ -16992,12 +16997,39 @@ function buttonPressWords(label, pressed) {
|
|
|
16992
16997
|
}
|
|
16993
16998
|
var POLL_EVERY_MS = 1200;
|
|
16994
16999
|
var POLL_FOR_MS = 12e4;
|
|
16995
|
-
|
|
17000
|
+
var RUN_BOOKKEEPING = /* @__PURE__ */ new Set(["run_id", "conversation_id"]);
|
|
17001
|
+
function answerOf(output) {
|
|
17002
|
+
const raw = (output ?? "").trim();
|
|
17003
|
+
if (raw === "") return { words: "" };
|
|
17004
|
+
let parsed;
|
|
17005
|
+
try {
|
|
17006
|
+
parsed = JSON.parse(raw);
|
|
17007
|
+
} catch {
|
|
17008
|
+
return { words: raw };
|
|
17009
|
+
}
|
|
17010
|
+
if (typeof parsed === "string") return { words: parsed.trim() };
|
|
17011
|
+
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
|
|
17012
|
+
const shown5 = Object.fromEntries(Object.entries(parsed).filter(([k]) => !RUN_BOOKKEEPING.has(k)));
|
|
17013
|
+
const keys = Object.keys(shown5);
|
|
17014
|
+
if (keys.length === 1 && typeof shown5.text === "string") return { words: shown5.text.trim() };
|
|
17015
|
+
const value2 = structuredOf(shown5);
|
|
17016
|
+
return value2 ? { words: "", value: value2 } : { words: raw };
|
|
17017
|
+
}
|
|
17018
|
+
const value = structuredOf(parsed);
|
|
17019
|
+
return value ? { words: "", value } : { words: raw };
|
|
17020
|
+
}
|
|
17021
|
+
function runAnswer(label, run) {
|
|
16996
17022
|
const steps = run.steps ?? [];
|
|
16997
17023
|
const failedStep = [...steps].reverse().find((s) => s.status === "failed");
|
|
16998
|
-
if (run.status === "failed")
|
|
16999
|
-
|
|
17000
|
-
|
|
17024
|
+
if (run.status === "failed") {
|
|
17025
|
+
const failed = answerOf(failedStep?.output_text).words || failedStep?.says;
|
|
17026
|
+
return { words: [failed, run.says].filter((t, i, all) => t && all.indexOf(t) === i).join(" ") || `${label} failed.` };
|
|
17027
|
+
}
|
|
17028
|
+
for (const step2 of [...steps].reverse()) {
|
|
17029
|
+
const answered = answerOf(step2.output_text);
|
|
17030
|
+
if (answered.words !== "" || answered.value) return answered;
|
|
17031
|
+
}
|
|
17032
|
+
return { words: run.says || `${label} ran.` };
|
|
17001
17033
|
}
|
|
17002
17034
|
var stop2 = (event) => event.stopPropagation();
|
|
17003
17035
|
function ButtonValue({ field: field2, recordId, inCell }) {
|
|
@@ -17044,7 +17076,8 @@ function ButtonValue({ field: field2, recordId, inCell }) {
|
|
|
17044
17076
|
const run = runs.data.runs.find((r) => r.run_id === pressed.run_id);
|
|
17045
17077
|
if (run && run.status !== "waiting") {
|
|
17046
17078
|
setBusy(false);
|
|
17047
|
-
|
|
17079
|
+
const answer = runAnswer(b.label, run);
|
|
17080
|
+
return setSaid(run.status === "ran" ? { kind: "ran", says: answer.words, value: answer.value } : { kind: "failed", says: answer.words });
|
|
17048
17081
|
}
|
|
17049
17082
|
if (Date.now() > until) {
|
|
17050
17083
|
setBusy(false);
|
|
@@ -17093,7 +17126,8 @@ function ButtonValue({ field: field2, recordId, inCell }) {
|
|
|
17093
17126
|
said2?.kind === "waiting" ? /* @__PURE__ */ jsx53("p", { className: "matrx-shimmer rounded px-1 py-0.5", role: "status", "aria-live": "polite", children: said2.says }) : null,
|
|
17094
17127
|
said2?.kind === "failed" ? /* @__PURE__ */ jsx53("p", { className: "break-words text-destructive", role: "alert", children: said2.says }) : null,
|
|
17095
17128
|
said2?.kind === "public" ? /* @__PURE__ */ jsx53("p", { children: "Buttons run for signed-in people." }) : null,
|
|
17096
|
-
said2?.kind === "ran" ? /* @__PURE__ */ jsxs48("
|
|
17129
|
+
said2?.kind === "ran" ? /* @__PURE__ */ jsxs48("div", { className: "break-words", children: [
|
|
17130
|
+
said2.value ? /* @__PURE__ */ jsx53(StructuredValueView, { structured: said2.value, label: b.label }) : null,
|
|
17097
17131
|
said2.says,
|
|
17098
17132
|
" ",
|
|
17099
17133
|
said2.link ? /* @__PURE__ */ jsx53(OutboundLink7, { href: said2.link, className: "text-primary underline", children: said2.link }) : null
|
|
@@ -23799,7 +23833,7 @@ function WholeTextDialog({
|
|
|
23799
23833
|
/* @__PURE__ */ jsx77(Button44, { size: "sm", variant: reading ? "ghost" : "secondary", role: "tab", "aria-selected": !reading, onClick: () => setReading(false), "data-records-whole-text-mode": "words", children: mayWrite ? "Edit" : "Words" }),
|
|
23800
23834
|
/* @__PURE__ */ jsx77(Button44, { size: "sm", variant: reading ? "secondary" : "ghost", role: "tab", "aria-selected": reading, onClick: () => setReading(true), "data-records-whole-text-mode": "preview", children: "Preview" })
|
|
23801
23835
|
] }) : null,
|
|
23802
|
-
ready && reading && renderText ? /* @__PURE__ */ jsx77("div", { className: "max-h-[60vh] min-h-[8rem] overflow-auto rounded-md border px-3 py-2 text-sm", "data-records-whole-text-preview": "", children: draft ? renderText(draft, "cell") : /* @__PURE__ */ jsx77("span", { className: "text-muted-foreground", children: "\u2014" }) }) : ready && textBox ? (
|
|
23836
|
+
ready && reading && renderText ? /* @__PURE__ */ jsx77("div", { className: "max-h-[60vh] min-h-[8rem] overflow-auto rounded-md border px-3 py-2 text-sm", "data-records-whole-text-preview": "", children: draft ? renderText(withoutLeadingBlank(draft), "cell") : /* @__PURE__ */ jsx77("span", { className: "text-muted-foreground", children: "\u2014" }) }) : ready && textBox ? (
|
|
23803
23837
|
// THE HOST'S TEXT BOX (`textBox`): the same words, with its "…" menu (Clean up, Help with
|
|
23804
23838
|
// this…, Copy, Save, Share). What its menu puts in the box is unsaved until Save.
|
|
23805
23839
|
/* @__PURE__ */ jsx77("div", { "data-records-whole-text-box": "", children: textBox({
|
|
@@ -57942,7 +57976,7 @@ function TablePage({
|
|
|
57942
57976
|
// `min-w-9`: never narrower than the layout toolbar's folded "…" (36 px) — a row too
|
|
57943
57977
|
// narrow for its pinned controls folds them behind that "…" (design-system
|
|
57944
57978
|
// `usePinnedFold`), and the "…" itself is never cut (merged-grid leftovers, 2026-09-28).
|
|
57945
|
-
"flex min-w-9 flex-1 items-center overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
57979
|
+
"flex min-w-9 flex-1 items-center overflow-x-auto whitespace-nowrap [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
57946
57980
|
slotClipped === "end" && "[mask-image:linear-gradient(to_right,black_calc(100%_-_2rem),transparent)]",
|
|
57947
57981
|
slotClipped === "start" && "[mask-image:linear-gradient(to_left,black_calc(100%_-_2rem),transparent)]",
|
|
57948
57982
|
slotClipped === "both" && "[mask-image:linear-gradient(to_right,transparent,black_2rem,black_calc(100%_-_2rem),transparent)]",
|