@ai-matrx/records-ui 0.58.0 → 0.59.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/CHANGELOG.md +24 -0
- package/dist/index.cjs +46 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +46 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2275,6 +2275,16 @@ declare function ChecklistTemplateEditor({ aboutTableId, templateId, onDone, cla
|
|
|
2275
2275
|
className?: string | undefined;
|
|
2276
2276
|
}): react.JSX.Element;
|
|
2277
2277
|
|
|
2278
|
+
/** Can somebody with no account and no membership answer this question? */
|
|
2279
|
+
declare function publiclyAnswerable(field: Field): boolean;
|
|
2280
|
+
/** The Fields a public page may ask for, in the Table's own order. */
|
|
2281
|
+
declare function askableFields(fields: readonly Field[], hidden?: readonly string[]): Field[];
|
|
2282
|
+
/**
|
|
2283
|
+
* THE ONES LEFT OUT, NAMED. Absent is fine; absent and unexplained is the dead
|
|
2284
|
+
* end this package does not ship. Returns null when nothing was left out.
|
|
2285
|
+
*/
|
|
2286
|
+
declare function whyNotAskable(fields: readonly Field[], hidden?: readonly string[]): string | null;
|
|
2287
|
+
|
|
2278
2288
|
/**
|
|
2279
2289
|
* THE THREE THE STORE FILLS IN. Named here so this screen never offers them —
|
|
2280
2290
|
* `custom.booking_declare` refuses a question naming any of the three, and a
|
|
@@ -2814,4 +2824,4 @@ interface PipelineBoardProps {
|
|
|
2814
2824
|
}
|
|
2815
2825
|
declare function PipelineBoard({ tableId, rows, measure, onMeasureChange, onOpenRecord, onMoved, className, }: PipelineBoardProps): react.JSX.Element;
|
|
2816
2826
|
|
|
2817
|
-
export { ACTION_KINDS, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, BookingBuilder, type BookingBuilderProps, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CONDITION_OPS, type Capability, type CaptureMode, type CaptureQueuePort, CaptureRun, type CaptureRunProps, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartConfig, ChartFrame, type ChartKind, ChartLegendContent, type ChartSpec, ChartTooltipContent, ChecklistRunner, type ChecklistRunnerProps, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DashboardCanvas, type DashboardCanvasProps, type DeclareResult, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORM_FLOWS, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, Grid, GridCell, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, type LabelLookup, MACHINE_IDENTITY, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, NO_CHAT_REASON, NO_COLUMNS_WHY, NO_COLUMNS_YET, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_OPEN_RECORDS_REASON, NO_REASK_REASON, NO_RIGHTS, NO_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PARITY_LABEL, PARITY_MADE_OF, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type ResolveName, SAVED_VIEWS_UNAVAILABLE, SERIES_COLORS, SOMEBODY, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, SignBlock, type SignBlockProps, StageRulesSection, type StageRulesSectionProps, StepRow, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, TablePage, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VIEW_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, type WhatYouMayDo, type WhoChanged, WhoChangedSource, actorBadge, actorWords, addFields, blockFromSpec, bodyForReading, bodyFromKeys, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldDeclarationFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDeclareArgs, formFromSummary, formPresentation, formatForField, groupLabel, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isId, isMachineIdentity, isPlainFieldType, isRelationFieldType, isSignatureField, keyFor, laneFor, lastChangeSentence, machineIdentityIn, memberName, nextInWords, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, recordName, recordsDataSource, refusalForAPerson, refusalLineForAPerson, renderValue, revokeConsequence, rowName, scalarText, shareUnavailableReason, specFromBlock, storeDecidesRights, submissionStamp, surfaceChosen, tableName, tableRightsAt, tokenFor, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useViewRecords, useWhoChanged, viewDocument, viewFromRecord, viewPatchDocument, whatIsMissing, whatYouMayDo, whatYouMayDoWithTable, whenWords };
|
|
2827
|
+
export { ACTION_KINDS, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, BookingBuilder, type BookingBuilderProps, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CONDITION_OPS, type Capability, type CaptureMode, type CaptureQueuePort, CaptureRun, type CaptureRunProps, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartConfig, ChartFrame, type ChartKind, ChartLegendContent, type ChartSpec, ChartTooltipContent, ChecklistRunner, type ChecklistRunnerProps, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DashboardCanvas, type DashboardCanvasProps, type DeclareResult, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORM_FLOWS, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, Grid, GridCell, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, type LabelLookup, MACHINE_IDENTITY, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, NO_CHAT_REASON, NO_COLUMNS_WHY, NO_COLUMNS_YET, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_OPEN_RECORDS_REASON, NO_REASK_REASON, NO_RIGHTS, NO_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PARITY_LABEL, PARITY_MADE_OF, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type ResolveName, SAVED_VIEWS_UNAVAILABLE, SERIES_COLORS, SOMEBODY, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, SignBlock, type SignBlockProps, StageRulesSection, type StageRulesSectionProps, StepRow, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, TablePage, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VIEW_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, type WhatYouMayDo, type WhoChanged, WhoChangedSource, actorBadge, actorWords, addFields, askableFields, blockFromSpec, bodyForReading, bodyFromKeys, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldDeclarationFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDeclareArgs, formFromSummary, formPresentation, formatForField, groupLabel, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isId, isMachineIdentity, isPlainFieldType, isRelationFieldType, isSignatureField, keyFor, laneFor, lastChangeSentence, machineIdentityIn, memberName, nextInWords, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, publiclyAnswerable, recordName, recordsDataSource, refusalForAPerson, refusalLineForAPerson, renderValue, revokeConsequence, rowName, scalarText, shareUnavailableReason, specFromBlock, storeDecidesRights, submissionStamp, surfaceChosen, tableName, tableRightsAt, tokenFor, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useViewRecords, useWhoChanged, viewDocument, viewFromRecord, viewPatchDocument, whatIsMissing, whatYouMayDo, whatYouMayDoWithTable, whenWords, whyNotAskable };
|
package/dist/index.d.ts
CHANGED
|
@@ -2275,6 +2275,16 @@ declare function ChecklistTemplateEditor({ aboutTableId, templateId, onDone, cla
|
|
|
2275
2275
|
className?: string | undefined;
|
|
2276
2276
|
}): react.JSX.Element;
|
|
2277
2277
|
|
|
2278
|
+
/** Can somebody with no account and no membership answer this question? */
|
|
2279
|
+
declare function publiclyAnswerable(field: Field): boolean;
|
|
2280
|
+
/** The Fields a public page may ask for, in the Table's own order. */
|
|
2281
|
+
declare function askableFields(fields: readonly Field[], hidden?: readonly string[]): Field[];
|
|
2282
|
+
/**
|
|
2283
|
+
* THE ONES LEFT OUT, NAMED. Absent is fine; absent and unexplained is the dead
|
|
2284
|
+
* end this package does not ship. Returns null when nothing was left out.
|
|
2285
|
+
*/
|
|
2286
|
+
declare function whyNotAskable(fields: readonly Field[], hidden?: readonly string[]): string | null;
|
|
2287
|
+
|
|
2278
2288
|
/**
|
|
2279
2289
|
* THE THREE THE STORE FILLS IN. Named here so this screen never offers them —
|
|
2280
2290
|
* `custom.booking_declare` refuses a question naming any of the three, and a
|
|
@@ -2814,4 +2824,4 @@ interface PipelineBoardProps {
|
|
|
2814
2824
|
}
|
|
2815
2825
|
declare function PipelineBoard({ tableId, rows, measure, onMeasureChange, onOpenRecord, onMoved, className, }: PipelineBoardProps): react.JSX.Element;
|
|
2816
2826
|
|
|
2817
|
-
export { ACTION_KINDS, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, BookingBuilder, type BookingBuilderProps, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CONDITION_OPS, type Capability, type CaptureMode, type CaptureQueuePort, CaptureRun, type CaptureRunProps, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartConfig, ChartFrame, type ChartKind, ChartLegendContent, type ChartSpec, ChartTooltipContent, ChecklistRunner, type ChecklistRunnerProps, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DashboardCanvas, type DashboardCanvasProps, type DeclareResult, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORM_FLOWS, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, Grid, GridCell, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, type LabelLookup, MACHINE_IDENTITY, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, NO_CHAT_REASON, NO_COLUMNS_WHY, NO_COLUMNS_YET, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_OPEN_RECORDS_REASON, NO_REASK_REASON, NO_RIGHTS, NO_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PARITY_LABEL, PARITY_MADE_OF, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type ResolveName, SAVED_VIEWS_UNAVAILABLE, SERIES_COLORS, SOMEBODY, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, SignBlock, type SignBlockProps, StageRulesSection, type StageRulesSectionProps, StepRow, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, TablePage, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VIEW_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, type WhatYouMayDo, type WhoChanged, WhoChangedSource, actorBadge, actorWords, addFields, blockFromSpec, bodyForReading, bodyFromKeys, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldDeclarationFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDeclareArgs, formFromSummary, formPresentation, formatForField, groupLabel, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isId, isMachineIdentity, isPlainFieldType, isRelationFieldType, isSignatureField, keyFor, laneFor, lastChangeSentence, machineIdentityIn, memberName, nextInWords, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, recordName, recordsDataSource, refusalForAPerson, refusalLineForAPerson, renderValue, revokeConsequence, rowName, scalarText, shareUnavailableReason, specFromBlock, storeDecidesRights, submissionStamp, surfaceChosen, tableName, tableRightsAt, tokenFor, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useViewRecords, useWhoChanged, viewDocument, viewFromRecord, viewPatchDocument, whatIsMissing, whatYouMayDo, whatYouMayDoWithTable, whenWords };
|
|
2827
|
+
export { ACTION_KINDS, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, BookingBuilder, type BookingBuilderProps, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CONDITION_OPS, type Capability, type CaptureMode, type CaptureQueuePort, CaptureRun, type CaptureRunProps, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartConfig, ChartFrame, type ChartKind, ChartLegendContent, type ChartSpec, ChartTooltipContent, ChecklistRunner, type ChecklistRunnerProps, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DashboardCanvas, type DashboardCanvasProps, type DeclareResult, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORM_FLOWS, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, Grid, GridCell, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, type LabelLookup, MACHINE_IDENTITY, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, NO_CHAT_REASON, NO_COLUMNS_WHY, NO_COLUMNS_YET, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_OPEN_RECORDS_REASON, NO_REASK_REASON, NO_RIGHTS, NO_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PARITY_LABEL, PARITY_MADE_OF, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type ResolveName, SAVED_VIEWS_UNAVAILABLE, SERIES_COLORS, SOMEBODY, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, SignBlock, type SignBlockProps, StageRulesSection, type StageRulesSectionProps, StepRow, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, TablePage, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VIEW_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, type WhatYouMayDo, type WhoChanged, WhoChangedSource, actorBadge, actorWords, addFields, askableFields, blockFromSpec, bodyForReading, bodyFromKeys, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldDeclarationFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDeclareArgs, formFromSummary, formPresentation, formatForField, groupLabel, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isId, isMachineIdentity, isPlainFieldType, isRelationFieldType, isSignatureField, keyFor, laneFor, lastChangeSentence, machineIdentityIn, memberName, nextInWords, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, publiclyAnswerable, recordName, recordsDataSource, refusalForAPerson, refusalLineForAPerson, renderValue, revokeConsequence, rowName, scalarText, shareUnavailableReason, specFromBlock, storeDecidesRights, submissionStamp, surfaceChosen, tableName, tableRightsAt, tokenFor, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useViewRecords, useWhoChanged, viewDocument, viewFromRecord, viewPatchDocument, whatIsMissing, whatYouMayDo, whatYouMayDoWithTable, whenWords, whyNotAskable };
|
package/dist/index.js
CHANGED
|
@@ -10469,6 +10469,28 @@ function Question({
|
|
|
10469
10469
|
] });
|
|
10470
10470
|
}
|
|
10471
10471
|
|
|
10472
|
+
// src/publicQuestions.ts
|
|
10473
|
+
var CANNOT_ASK = {
|
|
10474
|
+
relation: "points at a record in another table, and somebody with no account cannot see that table to pick from it",
|
|
10475
|
+
member: "is a person in this organization, and somebody outside it has no way to choose one",
|
|
10476
|
+
attachment: "holds a file in your own store, and a public page has nowhere to put one yet",
|
|
10477
|
+
formula: "is worked out by the store, so there is nothing for anybody to answer",
|
|
10478
|
+
lookup: "is read through a relation, so the store fills it in",
|
|
10479
|
+
rollup: "is added up by the store, so there is nothing for anybody to answer"
|
|
10480
|
+
};
|
|
10481
|
+
function publiclyAnswerable(field) {
|
|
10482
|
+
return !(field.type in CANNOT_ASK);
|
|
10483
|
+
}
|
|
10484
|
+
function askableFields(fields, hidden = []) {
|
|
10485
|
+
return fields.filter((f) => publiclyAnswerable(f) && !hidden.includes(f.key));
|
|
10486
|
+
}
|
|
10487
|
+
function whyNotAskable(fields, hidden = []) {
|
|
10488
|
+
const left = fields.filter((f) => !publiclyAnswerable(f) && !hidden.includes(f.key));
|
|
10489
|
+
if (left.length === 0) return null;
|
|
10490
|
+
const said = left.map((f) => `${f.label || f.key} ${CANNOT_ASK[f.type]}`);
|
|
10491
|
+
return said.length === 1 ? `${said[0]}, so it is not offered here.` : `These are not offered here: ${said.join("; ")}.`;
|
|
10492
|
+
}
|
|
10493
|
+
|
|
10472
10494
|
// src/FormBuilder.tsx
|
|
10473
10495
|
import { Fragment as Fragment18, jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
10474
10496
|
function FormBuilder({ tableId, seed, activeFormId, onActiveForm, className }) {
|
|
@@ -10701,7 +10723,7 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, className }) {
|
|
|
10701
10723
|
" fields"
|
|
10702
10724
|
] })
|
|
10703
10725
|
] }),
|
|
10704
|
-
(fields.data ?? []).map((field) => {
|
|
10726
|
+
askableFields(fields.data ?? []).map((field) => {
|
|
10705
10727
|
const index = draft.questions.findIndex((q) => q.field === field.key);
|
|
10706
10728
|
const asked = index >= 0;
|
|
10707
10729
|
const question = asked ? draft.questions[index] : null;
|
|
@@ -10753,6 +10775,7 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, className }) {
|
|
|
10753
10775
|
] }) : null
|
|
10754
10776
|
] }, field.id);
|
|
10755
10777
|
}),
|
|
10778
|
+
whyNotAskable(fields.data ?? []) ? /* @__PURE__ */ jsx39("p", { className: "text-xs text-muted-foreground", children: whyNotAskable(fields.data ?? []) }) : null,
|
|
10756
10779
|
draft.questions.filter((q) => !byKey.has(q.field)).map((q) => /* @__PURE__ */ jsxs35("p", { className: "text-xs text-destructive", children: [
|
|
10757
10780
|
'This form asks for "',
|
|
10758
10781
|
q.field,
|
|
@@ -12430,6 +12453,7 @@ var DAYS = [
|
|
|
12430
12453
|
{ weekday: 0, label: "Sun" }
|
|
12431
12454
|
];
|
|
12432
12455
|
var LENGTHS = [15, 20, 30, 45, 60, 90, 120];
|
|
12456
|
+
var WORKING_WEEK = /* @__PURE__ */ new Set([1, 2, 3, 4, 5]);
|
|
12433
12457
|
function draftWindows(availability) {
|
|
12434
12458
|
return DAYS.map((day) => {
|
|
12435
12459
|
const found = availability?.windows.find((w) => w.weekday === day.weekday);
|
|
@@ -12437,7 +12461,7 @@ function draftWindows(availability) {
|
|
|
12437
12461
|
weekday: day.weekday,
|
|
12438
12462
|
from: found?.from ?? "09:00",
|
|
12439
12463
|
to: found?.to ?? "17:00",
|
|
12440
|
-
on: Boolean(found)
|
|
12464
|
+
on: availability ? Boolean(found) : WORKING_WEEK.has(day.weekday)
|
|
12441
12465
|
};
|
|
12442
12466
|
});
|
|
12443
12467
|
}
|
|
@@ -12466,9 +12490,11 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, className }) {
|
|
|
12466
12490
|
const [formId, setFormId] = useState43(bookingId ?? null);
|
|
12467
12491
|
const publicOrigin = host.publicOrigin ?? (typeof window === "undefined" ? "" : window.location.origin);
|
|
12468
12492
|
const askable = useMemo28(
|
|
12469
|
-
() => (fields.data ?? [])
|
|
12470
|
-
|
|
12471
|
-
|
|
12493
|
+
() => askableFields(fields.data ?? [], STORE_ANSWERS_THESE),
|
|
12494
|
+
[fields.data]
|
|
12495
|
+
);
|
|
12496
|
+
const leftOut = useMemo28(
|
|
12497
|
+
() => whyNotAskable(fields.data ?? [], STORE_ANSWERS_THESE),
|
|
12472
12498
|
[fields.data]
|
|
12473
12499
|
);
|
|
12474
12500
|
const load = useCallback29(async () => {
|
|
@@ -12494,6 +12520,15 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, className }) {
|
|
|
12494
12520
|
if (!existing) return;
|
|
12495
12521
|
setMinutes(existing.slot_minutes);
|
|
12496
12522
|
}, [existing]);
|
|
12523
|
+
useEffect33(() => {
|
|
12524
|
+
if (!offer) return;
|
|
12525
|
+
setWindows(draftWindows(offer));
|
|
12526
|
+
setMinutes(offer.slot_minutes);
|
|
12527
|
+
setBuffer(offer.buffer_minutes);
|
|
12528
|
+
setLead(offer.lead_minutes);
|
|
12529
|
+
setPerDay(offer.max_per_day);
|
|
12530
|
+
setDays(offer.days);
|
|
12531
|
+
}, [offer]);
|
|
12497
12532
|
const availability = useCallback29(
|
|
12498
12533
|
() => ({
|
|
12499
12534
|
slot_minutes: minutes,
|
|
@@ -12681,7 +12716,8 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, className }) {
|
|
|
12681
12716
|
),
|
|
12682
12717
|
fieldName(f)
|
|
12683
12718
|
] }, f.key)) }),
|
|
12684
|
-
/* @__PURE__ */ jsx48("p", { className: "text-xs text-muted-foreground", children: "The time, whether it is booked or cancelled, and who it is with are filled in by the store \u2014 a booking page cannot ask a visitor for any of the three." })
|
|
12719
|
+
/* @__PURE__ */ jsx48("p", { className: "text-xs text-muted-foreground", children: "The time, whether it is booked or cancelled, and who it is with are filled in by the store \u2014 a booking page cannot ask a visitor for any of the three." }),
|
|
12720
|
+
leftOut ? /* @__PURE__ */ jsx48("p", { className: "text-xs text-muted-foreground", children: leftOut }) : null
|
|
12685
12721
|
] }),
|
|
12686
12722
|
/* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
|
|
12687
12723
|
/* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "What they see after booking" }),
|
|
@@ -14615,6 +14651,7 @@ export {
|
|
|
14615
14651
|
actorBadge,
|
|
14616
14652
|
actorWords,
|
|
14617
14653
|
addFields,
|
|
14654
|
+
askableFields,
|
|
14618
14655
|
blockFromSpec,
|
|
14619
14656
|
bodyForReading,
|
|
14620
14657
|
bodyFromKeys,
|
|
@@ -14667,6 +14704,7 @@ export {
|
|
|
14667
14704
|
presentationDocument,
|
|
14668
14705
|
presentationIsEmpty,
|
|
14669
14706
|
previewLine,
|
|
14707
|
+
publiclyAnswerable,
|
|
14670
14708
|
recordName,
|
|
14671
14709
|
recordsDataSource,
|
|
14672
14710
|
refusalForAPerson,
|
|
@@ -14703,6 +14741,7 @@ export {
|
|
|
14703
14741
|
whatIsMissing,
|
|
14704
14742
|
whatYouMayDo,
|
|
14705
14743
|
whatYouMayDoWithTable,
|
|
14706
|
-
whenWords
|
|
14744
|
+
whenWords,
|
|
14745
|
+
whyNotAskable
|
|
14707
14746
|
};
|
|
14708
14747
|
//# sourceMappingURL=index.js.map
|