@fayz-ai/admin 0.14.0 → 0.16.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/dist/{CommandPalette-U7MMA2WH.js → CommandPalette-XY3VOEAV.js} +23 -13
- package/dist/CommandPalette-XY3VOEAV.js.map +1 -0
- package/dist/{ScheduleEditor-S3QI5MHO.js → ScheduleEditor-A3SX6AYD.js} +4 -4
- package/dist/{ScheduleEditor-S3QI5MHO.js.map → ScheduleEditor-A3SX6AYD.js.map} +1 -1
- package/dist/SubscriptionPage-FE2B5ZXF.js +7 -0
- package/dist/{SubscriptionPage-4KP7DKA2.js.map → SubscriptionPage-FE2B5ZXF.js.map} +1 -1
- package/dist/app/AdminShell.d.ts +11 -1
- package/dist/app/AdminShell.d.ts.map +1 -1
- package/dist/app/admin-app.d.ts.map +1 -1
- package/dist/app/bottom-nav.d.ts +24 -0
- package/dist/app/bottom-nav.d.ts.map +1 -0
- package/dist/app/config.d.ts +34 -3
- package/dist/app/config.d.ts.map +1 -1
- package/dist/app/core-entities.d.ts.map +1 -1
- package/dist/app/derive-contract.d.ts.map +1 -1
- package/dist/app/scaffold.d.ts.map +1 -1
- package/dist/{chunk-B6NVEKAJ.js → chunk-IPWXA46H.js} +3 -3
- package/dist/{chunk-B6NVEKAJ.js.map → chunk-IPWXA46H.js.map} +1 -1
- package/dist/{chunk-PNAJODZM.js → chunk-OB7ZSTQD.js} +13 -3
- package/dist/chunk-OB7ZSTQD.js.map +1 -0
- package/dist/{chunk-OI7RYSTM.js → chunk-OOWP6W2I.js} +33 -7
- package/dist/chunk-OOWP6W2I.js.map +1 -0
- package/dist/components/AskAI.d.ts +71 -0
- package/dist/components/AskAI.d.ts.map +1 -0
- package/dist/components/RightRail.d.ts +10 -2
- package/dist/components/RightRail.d.ts.map +1 -1
- package/dist/components/RightRailPage.d.ts +30 -0
- package/dist/components/RightRailPage.d.ts.map +1 -0
- package/dist/components/chat/AgentAvatar.d.ts +43 -0
- package/dist/components/chat/AgentAvatar.d.ts.map +1 -0
- package/dist/components/chat/AgentIntro.d.ts +25 -0
- package/dist/components/chat/AgentIntro.d.ts.map +1 -0
- package/dist/components/chat/AssistantActivityBar.d.ts +7 -2
- package/dist/components/chat/AssistantActivityBar.d.ts.map +1 -1
- package/dist/components/chat/AssistantRecordingView.d.ts +16 -0
- package/dist/components/chat/AssistantRecordingView.d.ts.map +1 -0
- package/dist/components/chat/ChatAttachments.d.ts +12 -1
- package/dist/components/chat/ChatAttachments.d.ts.map +1 -1
- package/dist/components/chat/ChatComposer.d.ts +5 -4
- package/dist/components/chat/ChatComposer.d.ts.map +1 -1
- package/dist/components/chat/ChatConversation.d.ts +1 -1
- package/dist/components/chat/ChatConversation.d.ts.map +1 -1
- package/dist/components/chat/ChatFab.d.ts +1 -5
- package/dist/components/chat/ChatFab.d.ts.map +1 -1
- package/dist/components/chat/ChatHistory.d.ts.map +1 -1
- package/dist/components/chat/ChatMessages.d.ts +1 -1
- package/dist/components/chat/ChatMessages.d.ts.map +1 -1
- package/dist/components/chat/ChatSuggestions.d.ts.map +1 -1
- package/dist/components/chat/ChoiceCard.d.ts +23 -0
- package/dist/components/chat/ChoiceCard.d.ts.map +1 -0
- package/dist/components/chat/ConnectorSuggestionCard.d.ts +3 -0
- package/dist/components/chat/ConnectorSuggestionCard.d.ts.map +1 -1
- package/dist/components/chat/RecordChip.d.ts.map +1 -1
- package/dist/components/chat/StaffHireView.d.ts +21 -0
- package/dist/components/chat/StaffHireView.d.ts.map +1 -0
- package/dist/components/chat/StaffPitchCard.d.ts +15 -0
- package/dist/components/chat/StaffPitchCard.d.ts.map +1 -0
- package/dist/components/chat/StaffSwitcher.d.ts +23 -0
- package/dist/components/chat/StaffSwitcher.d.ts.map +1 -0
- package/dist/components/chat/activity-icons.d.ts +16 -0
- package/dist/components/chat/activity-icons.d.ts.map +1 -0
- package/dist/components/chat/index.d.ts +2 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/connect/ConnectConsentPage.d.ts.map +1 -1
- package/dist/components/connect/ConnectorDetail.d.ts.map +1 -1
- package/dist/components/connect/ConnectorRuns.d.ts.map +1 -1
- package/dist/components/connect/ConnectorsPanel.d.ts.map +1 -1
- package/dist/components/connect/ConnectorsTab.d.ts.map +1 -1
- package/dist/components/connect/connector-map.generated.d.ts.map +1 -1
- package/dist/components/connect/index.d.ts +3 -0
- package/dist/components/connect/index.d.ts.map +1 -1
- package/dist/components/connect/model.d.ts +55 -0
- package/dist/components/connect/model.d.ts.map +1 -1
- package/dist/components/connect/useConnectors.d.ts.map +1 -1
- package/dist/components/layout/CommandPalette.d.ts.map +1 -1
- package/dist/components/organization/PermissionMatrixEditor.d.ts.map +1 -1
- package/dist/components/organization/PermissionProfilesTab.d.ts.map +1 -1
- package/dist/components/organization/TeamTab.d.ts.map +1 -1
- package/dist/components/organization/index.d.ts +0 -2
- package/dist/components/organization/index.d.ts.map +1 -1
- package/dist/components/plugins/PluginSettingsPanel.d.ts +1 -2
- package/dist/components/plugins/PluginSettingsPanel.d.ts.map +1 -1
- package/dist/components/plugins/SettingsTabs.d.ts +33 -0
- package/dist/components/plugins/SettingsTabs.d.ts.map +1 -0
- package/dist/components/rail-pages.d.ts +17 -0
- package/dist/components/rail-pages.d.ts.map +1 -0
- package/dist/components/right-rail.d.ts +95 -1
- package/dist/components/right-rail.d.ts.map +1 -1
- package/dist/components/settings/ConnectedCompanySettings.d.ts.map +1 -1
- package/dist/components/settings/ConnectedUserProfile.d.ts.map +1 -1
- package/dist/components/settings/LocationsCrudPage.d.ts.map +1 -1
- package/dist/components/settings/MyRecordPanel.d.ts +3 -0
- package/dist/components/settings/MyRecordPanel.d.ts.map +1 -0
- package/dist/components/settings/MyWorkspaceCard.d.ts +3 -0
- package/dist/components/settings/MyWorkspaceCard.d.ts.map +1 -0
- package/dist/components/settings/SettingsPage.d.ts +9 -1
- package/dist/components/settings/SettingsPage.d.ts.map +1 -1
- package/dist/components/shared/ContactPicker.d.ts +26 -12
- package/dist/components/shared/ContactPicker.d.ts.map +1 -1
- package/dist/components/shared/RecordPickerModal.d.ts.map +1 -1
- package/dist/crud/CrudAgentSurface.d.ts +27 -0
- package/dist/crud/CrudAgentSurface.d.ts.map +1 -0
- package/dist/crud/CrudDetailPage.d.ts +19 -1
- package/dist/crud/CrudDetailPage.d.ts.map +1 -1
- package/dist/crud/CrudFormPage.d.ts +43 -2
- package/dist/crud/CrudFormPage.d.ts.map +1 -1
- package/dist/crud/CrudListView.d.ts +32 -14
- package/dist/crud/CrudListView.d.ts.map +1 -1
- package/dist/crud/CrudPage.d.ts +13 -2
- package/dist/crud/CrudPage.d.ts.map +1 -1
- package/dist/crud/CrudRecordModal.d.ts +17 -3
- package/dist/crud/CrudRecordModal.d.ts.map +1 -1
- package/dist/crud/CrudSkeletons.d.ts +7 -3
- package/dist/crud/CrudSkeletons.d.ts.map +1 -1
- package/dist/crud/LookupCreateInline.d.ts +15 -0
- package/dist/crud/LookupCreateInline.d.ts.map +1 -0
- package/dist/crud/archetype-lookup.d.ts +19 -6
- package/dist/crud/archetype-lookup.d.ts.map +1 -1
- package/dist/crud/archetypes/AddressesTab.d.ts.map +1 -1
- package/dist/crud/archetypes/LocationDetailTabs.d.ts +3 -2
- package/dist/crud/archetypes/LocationDetailTabs.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderDetailView.d.ts +13 -1
- package/dist/crud/archetypes/OrderDetailView.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderFormView.d.ts +13 -2
- package/dist/crud/archetypes/OrderFormView.d.ts.map +1 -1
- package/dist/crud/archetypes/PersonDetailTabs.d.ts +2 -1
- package/dist/crud/archetypes/PersonDetailTabs.d.ts.map +1 -1
- package/dist/crud/archetypes/PersonFormLayout.d.ts.map +1 -1
- package/dist/crud/archetypes/PersonPicker.d.ts.map +1 -1
- package/dist/crud/createCrudPage.d.ts +4 -1
- package/dist/crud/createCrudPage.d.ts.map +1 -1
- package/dist/crud/index.d.ts +2 -0
- package/dist/crud/index.d.ts.map +1 -1
- package/dist/crud/useLookupCreate.d.ts +30 -0
- package/dist/crud/useLookupCreate.d.ts.map +1 -0
- package/dist/crud/write-errors.d.ts +24 -0
- package/dist/crud/write-errors.d.ts.map +1 -0
- package/dist/data/client.d.ts +10 -0
- package/dist/data/client.d.ts.map +1 -1
- package/dist/hooks/useAITools.d.ts +1 -0
- package/dist/hooks/useAITools.d.ts.map +1 -1
- package/dist/hooks/useAppConfig.d.ts +20 -0
- package/dist/hooks/useAppConfig.d.ts.map +1 -0
- package/dist/hooks/useChat.d.ts.map +1 -1
- package/dist/hooks/useLayout.d.ts +1 -0
- package/dist/hooks/useLayout.d.ts.map +1 -1
- package/dist/hooks/useTenantPlugins.d.ts.map +1 -1
- package/dist/index.d.ts +31 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15914 -8099
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-staff.d.ts +117 -0
- package/dist/lib/agent-staff.d.ts.map +1 -0
- package/dist/lib/agent-surface.d.ts +4 -0
- package/dist/lib/agent-surface.d.ts.map +1 -1
- package/dist/lib/agent-threads.d.ts +15 -0
- package/dist/lib/agent-threads.d.ts.map +1 -0
- package/dist/lib/ai-tool-handlers.d.ts.map +1 -1
- package/dist/lib/assistant-activity.d.ts +47 -4
- package/dist/lib/assistant-activity.d.ts.map +1 -1
- package/dist/lib/assistant-invite.d.ts +20 -1
- package/dist/lib/assistant-invite.d.ts.map +1 -1
- package/dist/lib/assistant-text.d.ts +9 -0
- package/dist/lib/assistant-text.d.ts.map +1 -0
- package/dist/lib/attachments.d.ts +34 -0
- package/dist/lib/attachments.d.ts.map +1 -1
- package/dist/lib/chat-upload.d.ts +12 -0
- package/dist/lib/chat-upload.d.ts.map +1 -0
- package/dist/lib/choice-cards.d.ts +16 -0
- package/dist/lib/choice-cards.d.ts.map +1 -0
- package/dist/lib/core-ai-tools.d.ts +17 -0
- package/dist/lib/core-ai-tools.d.ts.map +1 -1
- package/dist/lib/fayz-agent.d.ts +9 -0
- package/dist/lib/fayz-agent.d.ts.map +1 -1
- package/dist/lib/fayz-events.d.ts.map +1 -1
- package/dist/lib/reveal-page.d.ts +19 -0
- package/dist/lib/reveal-page.d.ts.map +1 -0
- package/dist/lib/staff-cards.d.ts +11 -0
- package/dist/lib/staff-cards.d.ts.map +1 -0
- package/dist/lib/unit-ai-handlers.d.ts +2 -0
- package/dist/lib/unit-ai-handlers.d.ts.map +1 -0
- package/dist/lib/unit-ai-tools.d.ts +3 -0
- package/dist/lib/unit-ai-tools.d.ts.map +1 -0
- package/dist/onboarding/GettingStartedWidget.d.ts +13 -0
- package/dist/onboarding/GettingStartedWidget.d.ts.map +1 -0
- package/dist/onboarding/WorkspaceSetupFlow.d.ts +24 -0
- package/dist/onboarding/WorkspaceSetupFlow.d.ts.map +1 -0
- package/dist/onboarding/WorkspaceSetupGate.d.ts +25 -0
- package/dist/onboarding/WorkspaceSetupGate.d.ts.map +1 -0
- package/dist/onboarding/analyze-site.d.ts +23 -0
- package/dist/onboarding/analyze-site.d.ts.map +1 -0
- package/dist/onboarding/backend.d.ts +44 -0
- package/dist/onboarding/backend.d.ts.map +1 -0
- package/dist/onboarding/checklist.d.ts +55 -0
- package/dist/onboarding/checklist.d.ts.map +1 -0
- package/dist/onboarding/connector-options.d.ts +52 -0
- package/dist/onboarding/connector-options.d.ts.map +1 -0
- package/dist/onboarding/decide.d.ts +36 -0
- package/dist/onboarding/decide.d.ts.map +1 -0
- package/dist/onboarding/index.d.ts +19 -0
- package/dist/onboarding/index.d.ts.map +1 -0
- package/dist/onboarding/infer-vertical.d.ts +2 -0
- package/dist/onboarding/infer-vertical.d.ts.map +1 -0
- package/dist/onboarding/packs/beauty.d.ts +4 -0
- package/dist/onboarding/packs/beauty.d.ts.map +1 -0
- package/dist/onboarding/packs/food.d.ts +4 -0
- package/dist/onboarding/packs/food.d.ts.map +1 -0
- package/dist/onboarding/packs/index.d.ts +17 -0
- package/dist/onboarding/packs/index.d.ts.map +1 -0
- package/dist/onboarding/packs/retail.d.ts +8 -0
- package/dist/onboarding/packs/retail.d.ts.map +1 -0
- package/dist/onboarding/questions.d.ts +41 -0
- package/dist/onboarding/questions.d.ts.map +1 -0
- package/dist/onboarding/resolve.d.ts +12 -0
- package/dist/onboarding/resolve.d.ts.map +1 -0
- package/dist/onboarding/steps.d.ts +31 -0
- package/dist/onboarding/steps.d.ts.map +1 -0
- package/dist/onboarding/store.d.ts +17 -0
- package/dist/onboarding/store.d.ts.map +1 -0
- package/dist/onboarding/submit.d.ts +25 -0
- package/dist/onboarding/submit.d.ts.map +1 -0
- package/dist/onboarding/tasks.d.ts +28 -0
- package/dist/onboarding/tasks.d.ts.map +1 -0
- package/dist/onboarding/types.d.ts +39 -0
- package/dist/onboarding/types.d.ts.map +1 -0
- package/dist/onboarding/useWorkspaceSetupGate.d.ts +36 -0
- package/dist/onboarding/useWorkspaceSetupGate.d.ts.map +1 -0
- package/dist/org/context.d.ts +10 -0
- package/dist/org/context.d.ts.map +1 -1
- package/dist/org/index.js +2 -2
- package/dist/org/self.d.ts +50 -0
- package/dist/org/self.d.ts.map +1 -0
- package/dist/plugins/ModuleActionBar.d.ts +16 -9
- package/dist/plugins/ModuleActionBar.d.ts.map +1 -1
- package/dist/plugins/PageActions.d.ts +16 -0
- package/dist/plugins/PageActions.d.ts.map +1 -0
- package/dist/plugins/QuickActionsButton.d.ts.map +1 -1
- package/dist/plugins/header-actions.d.ts +11 -0
- package/dist/plugins/header-actions.d.ts.map +1 -0
- package/dist/stores/app-config.store.d.ts +27 -0
- package/dist/stores/app-config.store.d.ts.map +1 -0
- package/dist/stores/chat.store.d.ts +194 -3
- package/dist/stores/chat.store.d.ts.map +1 -1
- package/dist/tasks/TasksRailPanel.d.ts +4 -0
- package/dist/tasks/TasksRailPanel.d.ts.map +1 -0
- package/dist/tasks/components/TaskCard.d.ts +11 -0
- package/dist/tasks/components/TaskCard.d.ts.map +1 -0
- package/dist/tasks/components/TaskDetail.d.ts +5 -0
- package/dist/tasks/components/TaskDetail.d.ts.map +1 -0
- package/dist/tasks/components/TaskLabelBadge.d.ts +9 -0
- package/dist/tasks/components/TaskLabelBadge.d.ts.map +1 -0
- package/dist/tasks/components/TaskPriorityBadge.d.ts +7 -0
- package/dist/tasks/components/TaskPriorityBadge.d.ts.map +1 -0
- package/dist/tasks/components/TaskQuickAdd.d.ts +5 -0
- package/dist/tasks/components/TaskQuickAdd.d.ts.map +1 -0
- package/dist/tasks/components/TaskSourceBadge.d.ts +5 -0
- package/dist/tasks/components/TaskSourceBadge.d.ts.map +1 -0
- package/dist/tasks/components/TaskStatusGroup.d.ts +17 -0
- package/dist/tasks/components/TaskStatusGroup.d.ts.map +1 -0
- package/dist/tasks/components/TasksFilterBar.d.ts +3 -0
- package/dist/tasks/components/TasksFilterBar.d.ts.map +1 -0
- package/dist/tasks/components/TasksPanel.d.ts +14 -0
- package/dist/tasks/components/TasksPanel.d.ts.map +1 -0
- package/dist/tasks/data/mock.d.ts +3 -0
- package/dist/tasks/data/mock.d.ts.map +1 -0
- package/dist/tasks/data/supabase.d.ts +3 -0
- package/dist/tasks/data/supabase.d.ts.map +1 -0
- package/dist/tasks/entity.d.ts +11 -0
- package/dist/tasks/entity.d.ts.map +1 -0
- package/dist/tasks/index.d.ts +17 -0
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/tasks/registry.d.ts +3 -0
- package/dist/tasks/registry.d.ts.map +1 -0
- package/dist/tasks/store.d.ts +34 -0
- package/dist/tasks/store.d.ts.map +1 -0
- package/dist/tasks/types.d.ts +89 -0
- package/dist/tasks/types.d.ts.map +1 -0
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/utils.d.ts +14 -0
- package/dist/theme/utils.d.ts.map +1 -1
- package/dist/timeline/PersonTimeline.d.ts.map +1 -1
- package/dist/types/crud.d.ts +10 -0
- package/dist/types/crud.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +3 -0
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/units/MemberAccessRailPage.d.ts +19 -0
- package/dist/units/MemberAccessRailPage.d.ts.map +1 -0
- package/dist/units/MemberUnitsCell.d.ts +11 -0
- package/dist/units/MemberUnitsCell.d.ts.map +1 -0
- package/dist/units/PersonUnitsTab.d.ts +5 -0
- package/dist/units/PersonUnitsTab.d.ts.map +1 -0
- package/dist/units/UnitMembersTab.d.ts +5 -0
- package/dist/units/UnitMembersTab.d.ts.map +1 -0
- package/dist/units/UnitMenuSection.d.ts +15 -0
- package/dist/units/UnitMenuSection.d.ts.map +1 -0
- package/dist/units/UnitModeCard.d.ts +3 -0
- package/dist/units/UnitModeCard.d.ts.map +1 -0
- package/dist/units/UnitRailPage.d.ts +10 -0
- package/dist/units/UnitRailPage.d.ts.map +1 -0
- package/dist/units/UnitSwitcher.d.ts +5 -0
- package/dist/units/UnitSwitcher.d.ts.map +1 -0
- package/dist/units/UnitsSettingsPage.d.ts +3 -0
- package/dist/units/UnitsSettingsPage.d.ts.map +1 -0
- package/dist/units/cache.d.ts +26 -0
- package/dist/units/cache.d.ts.map +1 -0
- package/dist/units/data.d.ts +118 -0
- package/dist/units/data.d.ts.map +1 -0
- package/dist/units/device.d.ts +26 -0
- package/dist/units/device.d.ts.map +1 -0
- package/dist/units/entry.d.ts +52 -0
- package/dist/units/entry.d.ts.map +1 -0
- package/dist/units/geo.d.ts +18 -0
- package/dist/units/geo.d.ts.map +1 -0
- package/dist/units/index.d.ts +18 -0
- package/dist/units/index.d.ts.map +1 -0
- package/dist/units/store.d.ts +32 -0
- package/dist/units/store.d.ts.map +1 -0
- package/dist/units/useUnitBootstrap.d.ts +10 -0
- package/dist/units/useUnitBootstrap.d.ts.map +1 -0
- package/package.json +7 -7
- package/dist/CommandPalette-U7MMA2WH.js.map +0 -1
- package/dist/SubscriptionPage-4KP7DKA2.js +0 -7
- package/dist/chunk-OI7RYSTM.js.map +0 -1
- package/dist/chunk-PNAJODZM.js.map +0 -1
- package/dist/components/organization/OrgInitializer.d.ts +0 -7
- package/dist/components/organization/OrgInitializer.d.ts.map +0 -1
- package/dist/components/organization/OrgSwitcher.d.ts +0 -7
- package/dist/components/organization/OrgSwitcher.d.ts.map +0 -1
- package/dist/components/organization/TenantOnboarding.d.ts +0 -9
- package/dist/components/organization/TenantOnboarding.d.ts.map +0 -1
- package/dist/components/shared/create-person.d.ts +0 -20
- package/dist/components/shared/create-person.d.ts.map +0 -1
- package/dist/types/entity-lookup.d.ts +0 -27
- package/dist/types/entity-lookup.d.ts.map +0 -1
|
@@ -7,6 +7,18 @@ export interface RightRailPanelDef {
|
|
|
7
7
|
icon?: React.ComponentType<{
|
|
8
8
|
className?: string;
|
|
9
9
|
}>;
|
|
10
|
+
/** The icon is already a mark of its own (a portrait) — render it bare
|
|
11
|
+
* instead of inside the tinted square a glyph needs. */
|
|
12
|
+
iconBare?: boolean;
|
|
13
|
+
/** Glyph after the label, saying the tab does more than select itself — the
|
|
14
|
+
* assistant's chevron, which says the name on it can be changed. */
|
|
15
|
+
trailing?: React.ComponentType<{
|
|
16
|
+
className?: string;
|
|
17
|
+
}>;
|
|
18
|
+
/** What the panel IS, after what it is called — the colleague's job title
|
|
19
|
+
* beside their name. Shown only where the header has room for it: the
|
|
20
|
+
* identity row, never the tab strip. */
|
|
21
|
+
sublabel?: string;
|
|
10
22
|
/** Lower sorts first. Default 100. */
|
|
11
23
|
order?: number;
|
|
12
24
|
/** Count chip on the tab. Hidden when count is 0. `destructive` renders the
|
|
@@ -19,6 +31,37 @@ export interface RightRailPanelDef {
|
|
|
19
31
|
* renders it far from where it was registered. */
|
|
20
32
|
Component: React.ComponentType;
|
|
21
33
|
}
|
|
34
|
+
/** An internal page inside the active panel: the header stops being a tab strip
|
|
35
|
+
* and becomes "← Voltar | <title>" for as long as one is open. */
|
|
36
|
+
export interface RightRailDrill {
|
|
37
|
+
title: string;
|
|
38
|
+
back: () => void;
|
|
39
|
+
/** Names where back goes ("Voltar ao Chat"). Defaults to a plain "Voltar" —
|
|
40
|
+
* worth setting when the page came from somewhere else in the app and the
|
|
41
|
+
* destination is not obvious from where you are standing. */
|
|
42
|
+
backLabel?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Keep the panel's own controls in the header instead of clearing it.
|
|
45
|
+
*
|
|
46
|
+
* Off by default, and that is right for a page from ELSEWHERE: nothing of the
|
|
47
|
+
* chat's applies to a connector's settings. A panel drilling into its own
|
|
48
|
+
* view is the other case — the conversation is still the chat, and taking
|
|
49
|
+
* away "nova conversa" while you are in one is taking away the way out.
|
|
50
|
+
*/
|
|
51
|
+
keepActions?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* A face to put before the title.
|
|
54
|
+
*
|
|
55
|
+
* The centred title answers "what am I looking at"; when the answer is a
|
|
56
|
+
* PERSON, the name alone is the weaker half of it — the portrait is how the
|
|
57
|
+
* colleague is recognised everywhere else in the panel, and dropping it here
|
|
58
|
+
* made the header of a conversation look like the header of a settings page.
|
|
59
|
+
*/
|
|
60
|
+
avatar?: {
|
|
61
|
+
name: string;
|
|
62
|
+
src?: string;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
22
65
|
interface RightRailState {
|
|
23
66
|
/** A shell able to render the rail is mounted. Contributors read this to
|
|
24
67
|
* decide between the rail and their own fallback surface. */
|
|
@@ -32,6 +75,17 @@ interface RightRailState {
|
|
|
32
75
|
close: () => void;
|
|
33
76
|
/** Same tab closes, a different tab switches. */
|
|
34
77
|
togglePanel: (id: string) => void;
|
|
78
|
+
/**
|
|
79
|
+
* The active tab was clicked again.
|
|
80
|
+
*
|
|
81
|
+
* Selecting what is already selected is normally nothing, but a tab that
|
|
82
|
+
* carries an identity — the assistant's face and name — is also the natural
|
|
83
|
+
* place to change that identity. The rail does not know what that means, so
|
|
84
|
+
* it just counts the click and the panel decides (see useRightRailReselect).
|
|
85
|
+
*/
|
|
86
|
+
reselects: number;
|
|
87
|
+
reselectId: string | null;
|
|
88
|
+
reselect: (id: string) => void;
|
|
35
89
|
registerPanel: (panel: RightRailPanelDef) => void;
|
|
36
90
|
unregisterPanel: (id: string) => void;
|
|
37
91
|
/** Badge-only update. Separate from `registerPanel` on purpose: a badge
|
|
@@ -42,17 +96,57 @@ interface RightRailState {
|
|
|
42
96
|
/** Label/icon change without a lifecycle event — same reasoning as the badge.
|
|
43
97
|
* The chat panel renames itself to the persona the current screen invited
|
|
44
98
|
* ("Growth Analyst"), and re-registering for that would close the open rail. */
|
|
45
|
-
updateMeta: (id: string, meta: Partial<Pick<RightRailPanelDef, 'label' | 'icon'>>) => void;
|
|
99
|
+
updateMeta: (id: string, meta: Partial<Pick<RightRailPanelDef, 'label' | 'icon' | 'iconBare' | 'trailing' | 'sublabel'>>) => void;
|
|
46
100
|
/** Distance (px) from the viewport's right edge to the open column's left
|
|
47
101
|
* edge — MEASURED from the rendered card, so clamps and drags are included.
|
|
48
102
|
* The FAB reads it to stay anchored to the CONTENT's bottom-right corner. */
|
|
49
103
|
width: number;
|
|
50
104
|
setWidth: (width: number) => void;
|
|
105
|
+
/** Set by whatever owns the header while an internal page is open. */
|
|
106
|
+
drill: RightRailDrill | null;
|
|
107
|
+
setDrill: (drill: RightRailDrill | null) => void;
|
|
108
|
+
pageSlot: HTMLElement | null;
|
|
109
|
+
setPageSlot: (element: HTMLElement | null) => void;
|
|
110
|
+
/** A page is occupying the column; the active panel stays mounted behind it. */
|
|
111
|
+
pageOpen: boolean;
|
|
112
|
+
/** Opens the column if it was closed — clicking a deal should show the deal. */
|
|
113
|
+
showPage: () => void;
|
|
114
|
+
/**
|
|
115
|
+
* Leaving the page CLOSES the column.
|
|
116
|
+
*
|
|
117
|
+
* It used to only drop the page, which handed the column back to the chat —
|
|
118
|
+
* so saving a booking, or simply navigating to another screen, left the
|
|
119
|
+
* assistant open on top of a screen that never asked for it. The column was
|
|
120
|
+
* opened to show the page; with the page gone it has nothing to show.
|
|
121
|
+
*/
|
|
122
|
+
closePage: () => void;
|
|
51
123
|
}
|
|
52
124
|
export declare const useRightRailStore: import("zustand").UseBoundStore<import("zustand").StoreApi<RightRailState>>;
|
|
53
125
|
/** Register a panel while the caller is mounted. `Component` must be
|
|
54
126
|
* referentially stable or the panel remounts on every parent render. */
|
|
55
127
|
export declare function useRightRailPanel(panel: RightRailPanelDef | null): void;
|
|
128
|
+
export declare const RightRailActionsSlotProvider: React.Provider<HTMLElement | null>;
|
|
129
|
+
export declare function RightRailActions({ children }: {
|
|
130
|
+
children: React.ReactNode;
|
|
131
|
+
}): React.JSX.Element;
|
|
132
|
+
export declare const RightRailLeadingSlotProvider: React.Provider<HTMLElement | null>;
|
|
133
|
+
export declare function RightRailLeading({ children }: {
|
|
134
|
+
children: React.ReactNode;
|
|
135
|
+
}): React.JSX.Element;
|
|
136
|
+
/** Run `handler` when the user clicks the tab of a panel that is already open.
|
|
137
|
+
* Counts, not booleans: two clicks in a row are two events. */
|
|
138
|
+
export declare function useRightRailReselect(id: string, handler: () => void): void;
|
|
139
|
+
/** A shell able to host the rail is mounted, so a panel's chrome (its header,
|
|
140
|
+
* its back link) belongs to the rail rather than to the panel itself. */
|
|
141
|
+
export declare function useRightRailHosted(): boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Give the rail's header to an internal page: "← Voltar | <title>" replaces the
|
|
144
|
+
* tab strip until the page closes.
|
|
145
|
+
*
|
|
146
|
+
* Pass null when there is no internal page open. `back` is read through a ref,
|
|
147
|
+
* so a caller does not have to memoise it to avoid re-registering.
|
|
148
|
+
*/
|
|
149
|
+
export declare function useRightRailDrill(drill: RightRailDrill | null): void;
|
|
56
150
|
/** No panels registered means no column and no divider. */
|
|
57
151
|
export declare function useHasRightRail(): boolean;
|
|
58
152
|
/** The user's dragged width, remembered per browser. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"right-rail.d.ts","sourceRoot":"","sources":["../../src/components/right-rail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,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":"
|
|
1
|
+
{"version":3,"file":"ConnectedCompanySettings.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ConnectedCompanySettings.tsx"],"names":[],"mappings":"AA2BA,wBAAgB,wBAAwB,gCA8CvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectedUserProfile.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ConnectedUserProfile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ConnectedUserProfile.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ConnectedUserProfile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAqB9B,wBAAgB,oBAAoB,sBA0GnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocationsCrudPage.d.ts","sourceRoot":"","sources":["../../../src/components/settings/LocationsCrudPage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"LocationsCrudPage.d.ts","sourceRoot":"","sources":["../../../src/components/settings/LocationsCrudPage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,iBAAiB,EAAE,SA+D/B,CAAA;AAED,eAAO,MAAM,iBAAiB;;CAAoC,CAEjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyRecordPanel.d.ts","sourceRoot":"","sources":["../../../src/components/settings/MyRecordPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgD9B,wBAAgB,aAAa,6BA8G5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyWorkspaceCard.d.ts","sourceRoot":"","sources":["../../../src/components/settings/MyWorkspaceCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA2D9B,wBAAgB,eAAe,6BAyL9B"}
|
|
@@ -43,7 +43,15 @@ interface SettingsPageProps {
|
|
|
43
43
|
* self-managed behaviour used by standalone <SettingsPage> mounts.
|
|
44
44
|
* `null` means the URL is at bare /settings: show the index, not a tab. */
|
|
45
45
|
activeTabId?: string | null;
|
|
46
|
+
/** The shell's page band is already drawing a back affordance for this route.
|
|
47
|
+
* Set explicitly rather than inferred from `controlled`: the band renders on
|
|
48
|
+
* its own conditions, and guessing produced two "← Configurações" rows, one
|
|
49
|
+
* under the other, on every settings tab. */
|
|
50
|
+
hideBack?: boolean;
|
|
51
|
+
/** The shell's page band already names the screen. Without this the index at
|
|
52
|
+
* /settings prints "Configurações" twice, one line under the other. */
|
|
53
|
+
hideTitle?: boolean;
|
|
46
54
|
}
|
|
47
|
-
export declare function SettingsPage({ tabs, extraTabs, defaultTab, className, beforeContent, afterContent, showCompany, showBranding, hideNav, activeTabId, }: SettingsPageProps): React.JSX.Element;
|
|
55
|
+
export declare function SettingsPage({ tabs, extraTabs, defaultTab, className, beforeContent, afterContent, showCompany, showBranding, hideNav, activeTabId, hideBack, hideTitle, }: SettingsPageProps): React.JSX.Element;
|
|
48
56
|
export {};
|
|
49
57
|
//# sourceMappingURL=SettingsPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsPage.d.ts","sourceRoot":"","sources":["../../../src/components/settings/SettingsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"SettingsPage.d.ts","sourceRoot":"","sources":["../../../src/components/settings/SettingsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAY9B,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,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GACV,EAAE,iBAAiB,qBA0MnB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type EntityDef } from '@fayz-ai/core';
|
|
2
3
|
import { type EntityLookup } from '../../crud/archetype-lookup';
|
|
3
4
|
export interface ContactPickerValue {
|
|
4
5
|
/** Person id — undefined while the user has only typed a name. */
|
|
@@ -10,13 +11,8 @@ export interface ContactPickerValue {
|
|
|
10
11
|
export interface ContactPickerProps {
|
|
11
12
|
value: ContactPickerValue | null;
|
|
12
13
|
onChange: (value: ContactPickerValue | null) => void;
|
|
13
|
-
/**
|
|
14
|
-
* `people.kind` for records created here (e.g. 'client', 'lead', 'contact').
|
|
15
|
-
* Also narrows the default lookup, so a vertical only searches its own people.
|
|
16
|
-
*/
|
|
14
|
+
/** `people.kind` the default lookup searches, so a vertical only sees its own people. */
|
|
17
15
|
kind?: string;
|
|
18
|
-
/** Per-vertical extension table linked by `person_id` — skipped when absent from the pool. */
|
|
19
|
-
extensionTable?: string;
|
|
20
16
|
/** Search source. Defaults to the `person` archetype lookup narrowed by `kind`. */
|
|
21
17
|
lookup?: EntityLookup;
|
|
22
18
|
/**
|
|
@@ -79,16 +75,34 @@ export interface ContactPickerProps {
|
|
|
79
75
|
*/
|
|
80
76
|
createLabel?: string;
|
|
81
77
|
/**
|
|
82
|
-
* Fires when the inline create form opens/closes
|
|
83
|
-
*
|
|
84
|
-
* (the conversations composer does) hides its own to avoid asking twice.
|
|
78
|
+
* Fires when the inline create form opens/closes, so a host that renders its
|
|
79
|
+
* own field around the picker can hide it rather than ask twice.
|
|
85
80
|
*/
|
|
86
81
|
onCreatingChange?: (creating: boolean) => void;
|
|
87
82
|
className?: string;
|
|
88
83
|
/** Extra hint under the input while a name is typed but nothing is selected. */
|
|
89
84
|
hint?: React.ReactNode;
|
|
90
|
-
/**
|
|
91
|
-
|
|
85
|
+
/**
|
|
86
|
+
* What this field creates — the app's own entity ("Client", "Student"), the
|
|
87
|
+
* same definition its registry page uses.
|
|
88
|
+
*
|
|
89
|
+
* "Create" opens THAT form: the fields this app requires, the rest one click
|
|
90
|
+
* away, written by the entity's own provider — which is what knows how to
|
|
91
|
+
* write the base table and the vertical's extension together. Without it the
|
|
92
|
+
* field searches only; there is no generic contact shape to fall back on that
|
|
93
|
+
* would not write a record some app considers invalid.
|
|
94
|
+
*
|
|
95
|
+
* The entity also decides who may: with `permission.feature` declared and no
|
|
96
|
+
* `create` grant, the field searches but never offers to register.
|
|
97
|
+
*/
|
|
98
|
+
createEntityDef?: EntityDef;
|
|
99
|
+
/**
|
|
100
|
+
* Chevron on the right of the search box, saying the field picks from a list.
|
|
101
|
+
* On by default for `inline`, where there is no border to say it otherwise.
|
|
102
|
+
*/
|
|
103
|
+
chevron?: boolean;
|
|
104
|
+
/** Marks the search input `aria-required`; the visible mark belongs to the host row. */
|
|
105
|
+
required?: boolean;
|
|
92
106
|
}
|
|
93
|
-
export declare function ContactPicker({ value, onChange, kind,
|
|
107
|
+
export declare function ContactPicker({ value, onChange, kind, lookup, allowFreeText, clearable, disabled, autoFocus, placeholder, variant, label, secondaryText, handleField, createLabel, onCreatingChange, className, hint, createEntityDef, chevron, required, }: ContactPickerProps): React.JSX.Element;
|
|
94
108
|
//# sourceMappingURL=ContactPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPicker.d.ts","sourceRoot":"","sources":["../../../src/components/shared/ContactPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ContactPicker.d.ts","sourceRoot":"","sources":["../../../src/components/shared/ContactPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAA;AAGnE,OAAO,EAA0D,KAAK,SAAS,EAAE,MAAM,eAAe,CAAA;AACtG,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAqBtF,MAAM,WAAW,kBAAkB;IACjC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AAI,CAAA;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gFAAgF;IAChF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;;;;;;;;;;OAYG;IACH,eAAe,CAAC,EAAE,SAAS,CAAA;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,aAAqB,EACrB,SAAgB,EAChB,QAAQ,EACR,SAAS,EACT,WAAW,EACX,OAAiB,EACjB,KAAK,EACL,aAAa,EACb,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,IAAI,EACJ,eAAe,EACf,OAAO,EACP,QAAQ,GACT,EAAE,kBAAkB,qBA2QpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordPickerModal.d.ts","sourceRoot":"","sources":["../../../src/components/shared/RecordPickerModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAA;AAsBnE,MAAM,WAAW,eAAe;IAC9B,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,uEAAuE;IACvE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,gFAAgF;I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|
|
4
|
+
create: (data: Record<string, unknown>) => Promise<{
|
|
5
|
+
id: string;
|
|
6
|
+
}>;
|
|
7
|
+
/** Rows currently loaded — read only to publish what a unique field already
|
|
8
|
+
* holds, never as the list of everything that exists. */
|
|
9
|
+
items?: Array<Record<string, unknown>> | null;
|
|
10
|
+
}
|
|
11
|
+
export interface CrudSurfaceInput {
|
|
12
|
+
entityDef: EntityDef<any>;
|
|
13
|
+
store: CrudStoreLike;
|
|
14
|
+
/** Screen-specific guidance, appended to CREATE_GUIDANCE. */
|
|
15
|
+
instructions?: string;
|
|
16
|
+
/** Field keys whose values must not repeat. */
|
|
17
|
+
uniqueFields?: string[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The contribution itself, built from a GETTER so the component can re-render
|
|
21
|
+
* without re-registering and the snapshot still reads the live list. Exported
|
|
22
|
+
* because what the assistant is told is worth testing without a DOM.
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildCrudSurfaceContribution(read: () => CrudSurfaceInput): AgentSurfaceContribution;
|
|
25
|
+
export declare function CrudAgentSurface(props: CrudSurfaceInput): null;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=CrudAgentSurface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrudAgentSurface.d.ts","sourceRoot":"","sources":["../../src/crud/CrudAgentSurface.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,eAAe,CAAA;AAG5D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAoEpE,UAAU,aAAa;IACrB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAClE;8DAC0D;IAC1D,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,CAAA;CAC9C;AAoBD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,CAAA;IACzB,KAAK,EAAE,aAAa,CAAA;IACpB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,gBAAgB,GAC3B,wBAAwB,CAiE1B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,QAYvD"}
|
|
@@ -7,6 +7,15 @@ interface CrudDetailPageProps {
|
|
|
7
7
|
namePlural: string;
|
|
8
8
|
basePath: string;
|
|
9
9
|
initialTab?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Path segments past the tab id, handed to the tab component as `tabPath`.
|
|
12
|
+
*
|
|
13
|
+
* This is what lets something INSIDE a record be linkable without inventing a
|
|
14
|
+
* top-level route for it: `/clients/:id/scribe/:recordingId` opens the
|
|
15
|
+
* client, on the recordings tab, on that recording — keeping the name, the
|
|
16
|
+
* other tabs and the way back that `#/scribe/:id` threw away.
|
|
17
|
+
*/
|
|
18
|
+
tabPath?: string[];
|
|
10
19
|
onBack: () => void;
|
|
11
20
|
onEdit?: () => void;
|
|
12
21
|
onDelete?: () => void;
|
|
@@ -16,11 +25,20 @@ interface CrudDetailPageProps {
|
|
|
16
25
|
/** Saves ONE field. Absent means read-only — the same signal that already
|
|
17
26
|
* decides the Edit button. */
|
|
18
27
|
onFieldSave?: (key: string, value: unknown) => Promise<void> | void;
|
|
28
|
+
/** Extra badges beside the name — facts ABOUT the record that do not live on
|
|
29
|
+
* it. The org role is the case that forced this: it belongs to the
|
|
30
|
+
* membership, not to the person, so there is no field to render it from and
|
|
31
|
+
* no honest place to put it except next to the name. */
|
|
32
|
+
badges?: React.ReactNode;
|
|
33
|
+
/** Makes the hero photo replaceable. Absent means the image is display-only,
|
|
34
|
+
* which is what every registry screen wants; the profile passes it because
|
|
35
|
+
* there the photo IS the account's photo. */
|
|
36
|
+
onImageChange?: (file: File) => Promise<void> | void;
|
|
19
37
|
}
|
|
20
38
|
/** @internal exportado para teste — a resolução das abas do arquétipo. */
|
|
21
39
|
export declare function getArchetypeTabs(layout?: FormLayout, archetypeKind?: string): DetailTab[];
|
|
22
40
|
/** @internal exportado para teste — resolve `DetailTab.icon` contra o lucide. */
|
|
23
41
|
export declare function resolveTabIcon(name: string): LucideIcon | null;
|
|
24
|
-
export declare function CrudDetailPage({ entityDef, item, namePlural, basePath, initialTab, onBack, onEdit, onDelete, feature, embedded, onFieldSave, }: CrudDetailPageProps): React.JSX.Element;
|
|
42
|
+
export declare function CrudDetailPage({ entityDef, item, namePlural, basePath, initialTab, tabPath, onBack, onEdit, onDelete, feature, embedded, onFieldSave, badges, onImageChange, }: CrudDetailPageProps): React.JSX.Element;
|
|
25
43
|
export {};
|
|
26
44
|
//# sourceMappingURL=CrudDetailPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudDetailPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudDetailPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAG/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"CrudDetailPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudDetailPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAG/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AA+B9C,OAAO,KAAK,EAAE,SAAS,EAAwB,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE3F,UAAU,mBAAmB;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAA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
2
|
+
import type { FieldDef, EntityDef } from '@fayz-ai/core';
|
|
3
3
|
interface CrudFormPageProps {
|
|
4
4
|
entityDef: EntityDef;
|
|
5
5
|
mode: 'create' | 'edit';
|
|
@@ -20,7 +20,48 @@ interface CrudFormPageProps {
|
|
|
20
20
|
formId?: string;
|
|
21
21
|
/** Drop the inline Cancel/Save row: the host renders them somewhere better. */
|
|
22
22
|
hideActions?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Opens showing ONLY the essentials — the required fields — with a link that
|
|
25
|
+
* reveals the whole registry. For a form that interrupts something else: the
|
|
26
|
+
* supplier missing mid-invoice needs a name, not twenty fields the person
|
|
27
|
+
* posting it does not have to hand.
|
|
28
|
+
*/
|
|
29
|
+
essentialFirst?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Render the fields in a <div> instead of a <form>, and hand the host a way
|
|
32
|
+
* to submit them (`submitRef`).
|
|
33
|
+
*
|
|
34
|
+
* For a host that is ITSELF a form — a lookup's inline create sitting inside
|
|
35
|
+
* an invoice or a booking. A form nested in a form cannot be submitted at
|
|
36
|
+
* all: the button is associated correctly and `requestSubmit()` is simply
|
|
37
|
+
* ignored, so the only symptom is a dead button. Verified in Chromium.
|
|
38
|
+
*
|
|
39
|
+
* The trade is native `required` validation, which `submit` replaces with its
|
|
40
|
+
* own check over the entity's required fields.
|
|
41
|
+
*/
|
|
42
|
+
noForm?: boolean;
|
|
43
|
+
/** Receives the submit function while mounted. Only useful with `noForm`. */
|
|
44
|
+
submitRef?: React.MutableRefObject<(() => void) | null>;
|
|
23
45
|
}
|
|
24
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Empty for the purpose of a REQUIRED check.
|
|
48
|
+
*
|
|
49
|
+
* Deliberately not `!value`: `0` is a price a merchant meant to type and
|
|
50
|
+
* `false` is an answer to a checkbox, and treating either as missing is how a
|
|
51
|
+
* validator starts refusing valid input. Spelled out rather than leaning on
|
|
52
|
+
* string coercion — `!String(v ?? '').trim()` happens to agree on every case
|
|
53
|
+
* here, and agreeing by accident is not the same as saying what you mean.
|
|
54
|
+
*/
|
|
55
|
+
export declare function isEmptyValue(value: unknown): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* The required fields a save would fail on, in the order they appear on screen.
|
|
58
|
+
*
|
|
59
|
+
* Pure and exported because it is the whole judgement — the rest is wiring —
|
|
60
|
+
* and because it is the same question the agent path (`ai-tool-handlers.ts`)
|
|
61
|
+
* asks of the same record. Fields hidden by `visibleWhen` are skipped: a field
|
|
62
|
+
* the merchant cannot see is not one they can be asked to fill.
|
|
63
|
+
*/
|
|
64
|
+
export declare function missingRequiredFields(fields: FieldDef[], values: Record<string, unknown>): FieldDef[];
|
|
65
|
+
export declare function CrudFormPage({ entityDef, mode, initialData, onSubmit, onCancel, namePlural, embedded, hideBreadcrumb, formId, hideActions, essentialFirst, noForm, submitRef }: CrudFormPageProps): React.JSX.Element;
|
|
25
66
|
export {};
|
|
26
67
|
//# sourceMappingURL=CrudFormPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudFormPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudFormPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"CrudFormPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudFormPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAmBlD,OAAO,KAAK,EAAE,QAAQ,EAAc,SAAS,EAAE,MAAM,eAAe,CAAA;AAMpE,UAAU,iBAAiB;IACzB,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACjC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7D,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;iFAC6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+EAA+E;IAC/E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;CACxD;AAaD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKpD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,QAAQ,EAAE,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,QAAQ,EAAE,CAOZ;AA6bD,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,iBAAiB,qBAuUjM"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ColumnDef as TanStackColumnDef } from '@tanstack/react-table';
|
|
3
3
|
import type { EntityDef } from '@fayz-ai/core';
|
|
4
|
-
import { type StatTileData } from '@fayz-ai/ui';
|
|
4
|
+
import { type RowBulkAction, type StatTileData } from '@fayz-ai/ui';
|
|
5
|
+
import { type AskAIIntro } from '../components/AskAI';
|
|
5
6
|
/** A resolved facet: a field plus the options to render. */
|
|
6
7
|
export interface CrudFacet {
|
|
7
8
|
field: string;
|
|
@@ -21,6 +22,23 @@ export interface CrudFacet {
|
|
|
21
22
|
*/
|
|
22
23
|
display?: 'pills' | 'tabs';
|
|
23
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* "Criar com IA" on a list, and what the assistant knows while it is open.
|
|
27
|
+
*
|
|
28
|
+
* `instructions` and `uniqueFields` are what turn a generic create into one
|
|
29
|
+
* that can actually finish: the first says how THIS entity is filled, the
|
|
30
|
+
* second publishes the values already taken so an invented identifier does not
|
|
31
|
+
* collide with a row that exists.
|
|
32
|
+
*/
|
|
33
|
+
export interface CrudAiCreate {
|
|
34
|
+
hint?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
intro?: AskAIIntro;
|
|
37
|
+
/** Guidance appended to the generic create guidance while the list is open. */
|
|
38
|
+
instructions?: string;
|
|
39
|
+
/** Field keys that must not repeat (a coupon code, a slug). */
|
|
40
|
+
uniqueFields?: string[];
|
|
41
|
+
}
|
|
24
42
|
/**
|
|
25
43
|
* A sibling list this one sits beside — rendered in the header strip next to (or
|
|
26
44
|
* instead of) the facet tabs, as a link rather than a filter. This is what turns
|
|
@@ -40,19 +58,10 @@ export interface CrudNavTab {
|
|
|
40
58
|
* One entry in the bar that appears when rows are ticked. It receives the
|
|
41
59
|
* selected ROWS, not their ids: an action that has to go back to the store to
|
|
42
60
|
* learn what it is acting on is an action that can act on stale data.
|
|
61
|
+
*
|
|
62
|
+
* The same shape a plugin's own ListView takes — one contract for both.
|
|
43
63
|
*/
|
|
44
|
-
export
|
|
45
|
-
id: string;
|
|
46
|
-
label: string;
|
|
47
|
-
icon?: React.ComponentType<{
|
|
48
|
-
className?: string;
|
|
49
|
-
}>;
|
|
50
|
-
onSelect: (rows: T[]) => void | Promise<void>;
|
|
51
|
-
destructive?: boolean;
|
|
52
|
-
/** Sends the action to the "…" menu instead of the button row. */
|
|
53
|
-
overflow?: boolean;
|
|
54
|
-
disabled?: boolean;
|
|
55
|
-
}
|
|
64
|
+
export type CrudBulkAction<T> = RowBulkAction<T>;
|
|
56
65
|
export interface CrudListViewProps<T extends {
|
|
57
66
|
id: string;
|
|
58
67
|
}> {
|
|
@@ -90,6 +99,15 @@ export interface CrudListViewProps<T extends {
|
|
|
90
99
|
onBulkDelete?: (rows: T[]) => void;
|
|
91
100
|
onImport?: () => void;
|
|
92
101
|
onExport?: () => void;
|
|
102
|
+
/**
|
|
103
|
+
* Offer "Criar com IA" in the create menu.
|
|
104
|
+
*
|
|
105
|
+
* OPT-IN, not automatic, and the reason is honesty: the assistant reaches a
|
|
106
|
+
* record through the data primitives, which only see entities a plugin
|
|
107
|
+
* published in `queryEntities`. Turn it on where the entity IS reachable —
|
|
108
|
+
* elsewhere the door would open on an assistant that cannot do the thing.
|
|
109
|
+
*/
|
|
110
|
+
aiCreate?: CrudAiCreate;
|
|
93
111
|
feature?: string;
|
|
94
112
|
readOnly?: boolean;
|
|
95
113
|
/** Esta lista é uma SEÇÃO de outra tela, não a tela. Mantém as ações no
|
|
@@ -130,5 +148,5 @@ export interface CrudListViewProps<T extends {
|
|
|
130
148
|
*/
|
|
131
149
|
export declare function CrudListView<T extends {
|
|
132
150
|
id: string;
|
|
133
|
-
}>({ entityDef, columns, items, total, page, pageSize, onPageChange, display, search, onSearchChange, searchPlaceholder, facets, activeFilters, onFacetChange, onNew, addLabel, onRowClick, onDelete, bulkActions, onBulkDelete, onImport, onExport, feature, readOnly, embedded, emptyMessage, navTabs, activeNavTab, headerActions, stats, onRefresh, refreshFromCache, onSort, onSortField, onSortDir, sortBy, sortDir, error, }: CrudListViewProps<T>): React.JSX.Element;
|
|
151
|
+
}>({ entityDef, columns, items, total, page, pageSize, onPageChange, display, search, onSearchChange, searchPlaceholder, facets, activeFilters, onFacetChange, onNew, addLabel, onRowClick, onDelete, bulkActions, onBulkDelete, onImport, onExport, aiCreate, feature, readOnly, embedded, emptyMessage, navTabs, activeNavTab, headerActions, stats, onRefresh, refreshFromCache, onSort, onSortField, onSortDir, sortBy, sortDir, error, }: CrudListViewProps<T>): React.JSX.Element;
|
|
134
152
|
//# sourceMappingURL=CrudListView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudListView.d.ts","sourceRoot":"","sources":["../../src/crud/CrudListView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAGhD,OAAO,KAAK,EAAE,SAAS,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAE3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"CrudListView.d.ts","sourceRoot":"","sources":["../../src/crud/CrudListView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAGhD,OAAO,KAAK,EAAE,SAAS,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAE3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAM9C,OAAO,EAAgH,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAOjL,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAG5D,4DAA4D;AAC5D,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;kEAC8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,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,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,6EAA6E;IAC7E,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,gFAAgF;IAChF,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,8EAA8E;IAC9E,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,MAAM,KAAK,IAAI,CAAA;IACzC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IACxB;2CACuC;IACvC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EACrD,SAAS,EACT,OAAO,EACP,KAAK,EACL,KAAK,EACL,IAAQ,EACR,QAAa,EACb,YAAY,EACZ,OAAiB,EACjB,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,aAAa,EACb,KAAK,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,aAAa,EACb,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,MAAM,EACN,WAAW,EACX,SAAS,EACT,MAAM,EACN,OAAO,EACP,KAAK,GACN,EAAE,iBAAiB,CAAC,CAAC,CAAC,qBAuhBtB"}
|
package/dist/crud/CrudPage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type CrudNavTab } from './CrudListView';
|
|
2
|
+
import { type CrudAiCreate, type CrudNavTab } from './CrudListView';
|
|
3
3
|
import type { StatTileData } from '@fayz-ai/ui';
|
|
4
4
|
import type { EntityDef } from '@fayz-ai/core';
|
|
5
5
|
import type { CrudStore } from '../stores/createCrudStore';
|
|
@@ -19,12 +19,23 @@ interface CrudPageProps<T extends {
|
|
|
19
19
|
activeNavTab?: string;
|
|
20
20
|
/** Summary tiles for the list, derived from the rows currently loaded. */
|
|
21
21
|
stats?: (items: T[] | null, total: number) => StatTileData[];
|
|
22
|
+
/**
|
|
23
|
+
* Offer "Criar com IA" on this list, and publish a tool that can actually do
|
|
24
|
+
* it.
|
|
25
|
+
*
|
|
26
|
+
* The tool writes through THIS list's store — the same provider the form
|
|
27
|
+
* uses — which is what lets a provider-backed entity (the shop's products,
|
|
28
|
+
* behind a commerce API with no table of its own) be created by conversation
|
|
29
|
+
* at all. The agent's global data primitives cannot reach those; they resolve
|
|
30
|
+
* a target by table.
|
|
31
|
+
*/
|
|
32
|
+
aiCreate?: CrudAiCreate;
|
|
22
33
|
/** Este CRUD é uma SEÇÃO de outra tela (um cadastro dentro de uma aba de
|
|
23
34
|
* configurações). Ver CrudListView.embedded. */
|
|
24
35
|
embedded?: boolean;
|
|
25
36
|
}
|
|
26
37
|
export declare function CrudPage<T extends {
|
|
27
38
|
id: string;
|
|
28
|
-
}>({ entityDef: rawEntityDef, useStore, basePath, display, feature, readOnly, navTabs, activeNavTab, stats, embedded }: CrudPageProps<T>): React.JSX.Element;
|
|
39
|
+
}>({ entityDef: rawEntityDef, useStore, basePath, display, feature, readOnly, navTabs, activeNavTab, stats, embedded, aiCreate }: CrudPageProps<T>): React.JSX.Element;
|
|
29
40
|
export {};
|
|
30
41
|
//# sourceMappingURL=CrudPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAUhF,OAAO,
|
|
1
|
+
{"version":3,"file":"CrudPage.d.ts","sourceRoot":"","sources":["../../src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,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,qBAodjM"}
|
|
@@ -6,14 +6,28 @@ export interface CrudRecordModalProps {
|
|
|
6
6
|
/** The saved record, for a caller that wants to retry what it was doing. */
|
|
7
7
|
onSaved?: (record: Record<string, any>) => void;
|
|
8
8
|
entityDef: EntityDef;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/** 'edit' (default) reads via `load`; 'create' opens blank over `initialData`. */
|
|
10
|
+
mode?: 'create' | 'edit';
|
|
11
|
+
/** Reads the record. Null closes the form with the empty state. Edit only. */
|
|
12
|
+
load?: () => Promise<Record<string, any> | null>;
|
|
13
|
+
/** What is already known about the new record (the name the search missed). */
|
|
14
|
+
initialData?: Record<string, any>;
|
|
15
|
+
/** Writes. Throwing keeps the form open with the message on it. */
|
|
11
16
|
save: (data: Record<string, any>) => Promise<Record<string, any> | void>;
|
|
17
|
+
/**
|
|
18
|
+
* The caller's own message above the form — for a refusal that has an ANSWER,
|
|
19
|
+
* not just a text. "That e-mail already belongs to Ana Souza — use her
|
|
20
|
+
* record" is a button; as a thrown error it would be a dead end. Render it
|
|
21
|
+
* from a `save` that resolves instead of throwing.
|
|
22
|
+
*/
|
|
23
|
+
notice?: React.ReactNode;
|
|
12
24
|
/** Defaults to the entity's own name. */
|
|
13
25
|
title?: React.ReactNode;
|
|
14
26
|
description?: React.ReactNode;
|
|
15
27
|
/** Shown when `load` answers null — there is no record to edit. */
|
|
16
28
|
emptyLabel?: React.ReactNode;
|
|
29
|
+
/** Opens showing only required fields, with a link to the rest. */
|
|
30
|
+
essentialFirst?: boolean;
|
|
17
31
|
}
|
|
18
|
-
export declare function CrudRecordModal({ open, onClose, onSaved, entityDef, load, save, title, description, emptyLabel, }: CrudRecordModalProps): React.JSX.Element;
|
|
32
|
+
export declare function CrudRecordModal({ open, onClose, onSaved, entityDef, mode, load, initialData, save, title, description, emptyLabel, essentialFirst, notice, }: CrudRecordModalProps): React.JSX.Element;
|
|
19
33
|
//# sourceMappingURL=CrudRecordModal.d.ts.map
|