@fayz-ai/admin 0.14.0 → 0.15.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/{ScheduleEditor-S3QI5MHO.js → ScheduleEditor-57AYL7B6.js} +4 -4
- package/dist/{ScheduleEditor-S3QI5MHO.js.map → ScheduleEditor-57AYL7B6.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/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-OI7RYSTM.js → chunk-45EZQW4M.js} +22 -7
- package/dist/chunk-45EZQW4M.js.map +1 -0
- 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/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 +1 -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.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/ConnectorSuggestionCard.d.ts +3 -0
- package/dist/components/chat/ConnectorSuggestionCard.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/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/shared/ContactPicker.d.ts +26 -12
- package/dist/components/shared/ContactPicker.d.ts.map +1 -1
- package/dist/crud/CrudAgentSurface.d.ts +12 -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 +23 -1
- package/dist/crud/CrudFormPage.d.ts.map +1 -1
- package/dist/crud/CrudListView.d.ts +19 -14
- package/dist/crud/CrudListView.d.ts.map +1 -1
- package/dist/crud/CrudPage.d.ts +17 -1
- package/dist/crud/CrudPage.d.ts.map +1 -1
- package/dist/crud/CrudRecordModal.d.ts +9 -3
- package/dist/crud/CrudRecordModal.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 +4 -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/PersonPicker.d.ts.map +1 -1
- package/dist/crud/createCrudPage.d.ts +8 -0
- package/dist/crud/createCrudPage.d.ts.map +1 -1
- package/dist/crud/useLookupCreate.d.ts +30 -0
- package/dist/crud/useLookupCreate.d.ts.map +1 -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/useChat.d.ts.map +1 -1
- package/dist/index.d.ts +21 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15362 -8467
- 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/chat-upload.d.ts +12 -0
- package/dist/lib/chat-upload.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/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/QuickActionsButton.d.ts.map +1 -1
- package/dist/stores/chat.store.d.ts +150 -2
- 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/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 +111 -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/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
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SettingsTabDef {
|
|
3
|
+
id: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
/** ICON_MAP key. */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** Already-resolved lucide component — wins over `icon`, and renders even when
|
|
8
|
+
* the name is absent from ICON_MAP. */
|
|
9
|
+
IconComp?: React.ComponentType<{
|
|
10
|
+
className?: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The tab strip of a settings panel — the SAME strip a module page draws
|
|
15
|
+
* (`HeaderTabs`), so "Campanhas / Canais / Funil" in Marketing and "Geral /
|
|
16
|
+
* Propriedades" in Configurações are one control, not two look-alikes.
|
|
17
|
+
*
|
|
18
|
+
* Only the band around it differs, and it has to: `PageTabs` bleeds past the
|
|
19
|
+
* page padding so its hairline meets the shell bar, which is right when the tabs
|
|
20
|
+
* ARE the screen's sub-header. Inside Configurações the shell already wrote
|
|
21
|
+
* "← Configurações / Agenda" above, so a bleeding band ran wider than the
|
|
22
|
+
* content under it. This one starts and ends where the content does.
|
|
23
|
+
*/
|
|
24
|
+
export declare function SettingsTabs({ tabs, value, onChange, actions, className, ...rest }: {
|
|
25
|
+
tabs: ReadonlyArray<SettingsTabDef>;
|
|
26
|
+
value: string;
|
|
27
|
+
onChange: (id: string) => void;
|
|
28
|
+
/** Right side of the row (e.g. a counter). */
|
|
29
|
+
actions?: React.ReactNode;
|
|
30
|
+
className?: string;
|
|
31
|
+
'aria-label'?: string;
|
|
32
|
+
}): React.JSX.Element;
|
|
33
|
+
//# sourceMappingURL=SettingsTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsTabs.d.ts","sourceRoot":"","sources":["../../../src/components/plugins/SettingsTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;4CACwC;IACxC,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACvD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE;IACnF,IAAI,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,qBAmBA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface RailPageProps {
|
|
3
|
+
/** O que identifica o registro a abrir — `{ eventKey, channel }` para o raio. */
|
|
4
|
+
params: Record<string, string>;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
export type RailPageComponent = React.ComponentType<RailPageProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Anuncia uma página de coluna sob um id.
|
|
10
|
+
*
|
|
11
|
+
* Chamado na construção do manifesto (não em render): é lá que existe o store
|
|
12
|
+
* do plugin, e é lá que acontece antes de qualquer tela procurar.
|
|
13
|
+
*/
|
|
14
|
+
export declare function registerRailPage(id: string, Component: RailPageComponent): void;
|
|
15
|
+
/** A página anunciada sob este id, ou `null` se ninguém a oferece. */
|
|
16
|
+
export declare function getRailPage(id: string): RailPageComponent | null;
|
|
17
|
+
//# sourceMappingURL=rail-pages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rail-pages.d.ts","sourceRoot":"","sources":["../../src/components/rail-pages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAoBnC,MAAM,WAAW,aAAa;IAC5B,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAA;AAIlE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAE/E;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAEhE"}
|
|
@@ -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,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"right-rail.d.ts","sourceRoot":"","sources":["../../src/components/right-rail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B;4CAC4C;AAE5C,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAClD;6DACyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;yEACqE;IACrE,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACtD;;6CAEyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;yEACqE;IACrE,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,CAAA;KAAE,CAAA;IAC3D;uDACmD;IACnD,SAAS,EAAE,KAAK,CAAC,aAAa,CAAA;CAC/B;AAED;mEACmE;AACnE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,M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,GAAG,IAAI,CAqBpE;AAED,2DAA2D;AAC3D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAID,wDAAwD;AACxD,wBAAgB,kBAAkB,CAAC,QAAQ,SAAM,GAAG,MAAM,CAOzD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAMvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectedCompanySettings.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ConnectedCompanySettings.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -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,kEAAkE;IAClE,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAA;IACpD,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mFAAmF;IACnF,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,yEAAyE;IACzE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC5B,+GAA+G;IAC/G,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE;QACZ,kEAAkE;QAClE,KAAK,EAAE,MAAM,CAAA;QACb,8DAA8D;QAC9D,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;QACjC,4DAA4D;QAC5D,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;IACD;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EntityDef } from '@fayz-ai/core';
|
|
2
|
+
interface CrudStoreLike {
|
|
3
|
+
create: (data: Record<string, unknown>) => Promise<{
|
|
4
|
+
id: string;
|
|
5
|
+
}>;
|
|
6
|
+
}
|
|
7
|
+
export declare function CrudAgentSurface({ entityDef, store, }: {
|
|
8
|
+
entityDef: EntityDef<any>;
|
|
9
|
+
store: CrudStoreLike;
|
|
10
|
+
}): null;
|
|
11
|
+
export {};
|
|
12
|
+
//# 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;AA6C5D,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;CACnE;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EAAE,KAAK,GACjB,EAAE;IACD,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,CAAA;IACzB,KAAK,EAAE,aAAa,CAAA;CACrB,QAqDA"}
|
|
@@ -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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AAU,EACV,OAAO,EACP,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EACX,MAAM,EACN,aAAa,GACd,EAAE,mBAAmB,qBAwQrB"}
|
|
@@ -20,7 +20,29 @@ 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
|
-
export declare function CrudFormPage({ entityDef, mode, initialData, onSubmit, onCancel, namePlural, embedded, hideBreadcrumb, formId, hideActions }: CrudFormPageProps): React.JSX.Element;
|
|
46
|
+
export declare function CrudFormPage({ entityDef, mode, initialData, onSubmit, onCancel, namePlural, embedded, hideBreadcrumb, formId, hideActions, essentialFirst, noForm, submitRef }: CrudFormPageProps): React.JSX.Element;
|
|
25
47
|
export {};
|
|
26
48
|
//# 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;AAkBlD,OAAO,KAAK,EAAwB,SAAS,EAAE,MAAM,eAAe,CAAA;AAKpE,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;
|
|
1
|
+
{"version":3,"file":"CrudFormPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudFormPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAkBlD,OAAO,KAAK,EAAwB,SAAS,EAAE,MAAM,eAAe,CAAA;AAKpE,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;AAkXD,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,qBAkSjM"}
|
|
@@ -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;
|
|
@@ -40,19 +41,10 @@ export interface CrudNavTab {
|
|
|
40
41
|
* One entry in the bar that appears when rows are ticked. It receives the
|
|
41
42
|
* selected ROWS, not their ids: an action that has to go back to the store to
|
|
42
43
|
* learn what it is acting on is an action that can act on stale data.
|
|
44
|
+
*
|
|
45
|
+
* The same shape a plugin's own ListView takes — one contract for both.
|
|
43
46
|
*/
|
|
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
|
-
}
|
|
47
|
+
export type CrudBulkAction<T> = RowBulkAction<T>;
|
|
56
48
|
export interface CrudListViewProps<T extends {
|
|
57
49
|
id: string;
|
|
58
50
|
}> {
|
|
@@ -90,6 +82,19 @@ export interface CrudListViewProps<T extends {
|
|
|
90
82
|
onBulkDelete?: (rows: T[]) => void;
|
|
91
83
|
onImport?: () => void;
|
|
92
84
|
onExport?: () => void;
|
|
85
|
+
/**
|
|
86
|
+
* Offer "Criar com IA" in the create menu.
|
|
87
|
+
*
|
|
88
|
+
* OPT-IN, not automatic, and the reason is honesty: the assistant reaches a
|
|
89
|
+
* record through the data primitives, which only see entities a plugin
|
|
90
|
+
* published in `queryEntities`. Turn it on where the entity IS reachable —
|
|
91
|
+
* elsewhere the door would open on an assistant that cannot do the thing.
|
|
92
|
+
*/
|
|
93
|
+
aiCreate?: {
|
|
94
|
+
hint?: string;
|
|
95
|
+
description?: string;
|
|
96
|
+
intro?: AskAIIntro;
|
|
97
|
+
};
|
|
93
98
|
feature?: string;
|
|
94
99
|
readOnly?: boolean;
|
|
95
100
|
/** Esta lista é uma SEÇÃO de outra tela, não a tela. Mantém as ações no
|
|
@@ -130,5 +135,5 @@ export interface CrudListViewProps<T extends {
|
|
|
130
135
|
*/
|
|
131
136
|
export declare function CrudListView<T extends {
|
|
132
137
|
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;
|
|
138
|
+
}>({ 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
139
|
//# 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;AAK9C,OAAO,EAAgH,KAAK,YAAY,EAAE,MAAM,aAAa,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;AAK9C,OAAO,EAAgH,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,C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SAAS,EACT,gBAAgB,EAChB,MAAM,EACN,WAAW,EACX,SAAS,EACT,MAAM,EACN,OAAO,EACP,KAAK,GACN,EAAE,iBAAiB,CAAC,CAAC,CAAC,qBA8etB"}
|
package/dist/crud/CrudPage.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CrudNavTab } from './CrudListView';
|
|
3
|
+
import type { AskAIIntro } from '../components/AskAI';
|
|
3
4
|
import type { StatTileData } from '@fayz-ai/ui';
|
|
4
5
|
import type { EntityDef } from '@fayz-ai/core';
|
|
5
6
|
import type { CrudStore } from '../stores/createCrudStore';
|
|
@@ -19,12 +20,27 @@ interface CrudPageProps<T extends {
|
|
|
19
20
|
activeNavTab?: string;
|
|
20
21
|
/** Summary tiles for the list, derived from the rows currently loaded. */
|
|
21
22
|
stats?: (items: T[] | null, total: number) => StatTileData[];
|
|
23
|
+
/**
|
|
24
|
+
* Offer "Criar com IA" on this list, and publish a tool that can actually do
|
|
25
|
+
* it.
|
|
26
|
+
*
|
|
27
|
+
* The tool writes through THIS list's store — the same provider the form
|
|
28
|
+
* uses — which is what lets a provider-backed entity (the shop's products,
|
|
29
|
+
* behind a commerce API with no table of its own) be created by conversation
|
|
30
|
+
* at all. The agent's global data primitives cannot reach those; they resolve
|
|
31
|
+
* a target by table.
|
|
32
|
+
*/
|
|
33
|
+
aiCreate?: {
|
|
34
|
+
hint?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
intro?: AskAIIntro;
|
|
37
|
+
};
|
|
22
38
|
/** Este CRUD é uma SEÇÃO de outra tela (um cadastro dentro de uma aba de
|
|
23
39
|
* configurações). Ver CrudListView.embedded. */
|
|
24
40
|
embedded?: boolean;
|
|
25
41
|
}
|
|
26
42
|
export declare function CrudPage<T extends {
|
|
27
43
|
id: string;
|
|
28
|
-
}>({ entityDef: rawEntityDef, useStore, basePath, display, feature, readOnly, navTabs, activeNavTab, stats, embedded }: CrudPageProps<T>): React.JSX.Element;
|
|
44
|
+
}>({ entityDef: rawEntityDef, useStore, basePath, display, feature, readOnly, navTabs, activeNavTab, stats, embedded, aiCreate }: CrudPageProps<T>): React.JSX.Element;
|
|
29
45
|
export {};
|
|
30
46
|
//# 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,EAAgC,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"CrudPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAUhF,OAAO,EAAgC,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAgB/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAG1D,KAAK,WAAW,GAAG,OAAO,GAAG,OAAO,CAAA;AAYpC,UAAU,aAAa,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;IAC9C,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IACvB,QAAQ,EAAE,MAAM,SAAS,CAAC,CAAC,CAAC,CAAA;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,YAAY,EAAE,CAAA;IAC5D;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,UAAU,CAAA;KAAE,CAAA;IACtE;qDACiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAmID,wBAAgB,QAAQ,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,qBAocjM"}
|
|
@@ -6,14 +6,20 @@ 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>;
|
|
11
15
|
save: (data: Record<string, any>) => Promise<Record<string, any> | void>;
|
|
12
16
|
/** Defaults to the entity's own name. */
|
|
13
17
|
title?: React.ReactNode;
|
|
14
18
|
description?: React.ReactNode;
|
|
15
19
|
/** Shown when `load` answers null — there is no record to edit. */
|
|
16
20
|
emptyLabel?: React.ReactNode;
|
|
21
|
+
/** Opens showing only required fields, with a link to the rest. */
|
|
22
|
+
essentialFirst?: boolean;
|
|
17
23
|
}
|
|
18
|
-
export declare function CrudRecordModal({ open, onClose, onSaved, entityDef, load, save, title, description, emptyLabel, }: CrudRecordModalProps): React.JSX.Element;
|
|
24
|
+
export declare function CrudRecordModal({ open, onClose, onSaved, entityDef, mode, load, initialData, save, title, description, emptyLabel, essentialFirst, }: CrudRecordModalProps): React.JSX.Element;
|
|
19
25
|
//# sourceMappingURL=CrudRecordModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudRecordModal.d.ts","sourceRoot":"","sources":["../../src/crud/CrudRecordModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"CrudRecordModal.d.ts","sourceRoot":"","sources":["../../src/crud/CrudRecordModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAsB9C,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;IAC/C,SAAS,EAAE,SAAS,CAAA;IACpB,kFAAkF;IAClF,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;IACxB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAAA;IAChD,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACjC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAAA;IACxE,yCAAyC;IACzC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,mEAAmE;IACnE,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,mEAAmE;IACnE,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAa,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EACzE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,GAC/C,EAAE,oBAAoB,qBAqGtB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { EntityDef } from '@fayz-ai/core';
|
|
3
|
+
export interface LookupCreateInlineProps {
|
|
4
|
+
entityDef: EntityDef;
|
|
5
|
+
/** What is already known — the text the search did not find. */
|
|
6
|
+
initialData?: Record<string, any>;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
/** Writes. Errors stay on the form; the box does not close over them. */
|
|
9
|
+
save: (data: Record<string, any>) => Promise<void>;
|
|
10
|
+
/** Replaces "Add {entity}" in the header. */
|
|
11
|
+
title?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function LookupCreateInline({ entityDef, initialData, onCancel, save, title, className, }: LookupCreateInlineProps): React.JSX.Element;
|
|
15
|
+
//# sourceMappingURL=LookupCreateInline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LookupCreateInline.d.ts","sourceRoot":"","sources":["../../src/crud/LookupCreateInline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAa9C,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,SAAS,CAAA;IACpB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACjC,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,yEAAyE;IACzE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAClD,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,SAAS,GACV,EAAE,uBAAuB,qBAuFzB"}
|