@manta-eu/react 0.12.0 → 0.13.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/README.md +59 -0
- package/dist/components/AppErrorBoundary.d.ts.map +1 -1
- package/dist/components/AppErrorBoundary.js +14 -11
- package/dist/components/AppErrorBoundary.js.map +1 -1
- package/dist/components/app-gate/AppGate.d.ts +8 -0
- package/dist/components/app-gate/AppGate.d.ts.map +1 -0
- package/dist/components/app-gate/AppGate.js +68 -0
- package/dist/components/app-gate/AppGate.js.map +1 -0
- package/dist/components/app-gate/AwaitingDatastoreStatus.d.ts +7 -0
- package/dist/components/app-gate/AwaitingDatastoreStatus.d.ts.map +1 -0
- package/dist/components/app-gate/AwaitingDatastoreStatus.js +19 -0
- package/dist/components/app-gate/AwaitingDatastoreStatus.js.map +1 -0
- package/dist/components/app-gate/EnterDatastoreRoute.d.ts +2 -0
- package/dist/components/app-gate/EnterDatastoreRoute.d.ts.map +1 -0
- package/dist/components/app-gate/EnterDatastoreRoute.js +25 -0
- package/dist/components/app-gate/EnterDatastoreRoute.js.map +1 -0
- package/dist/components/app-gate/ErrorRoute.d.ts +2 -0
- package/dist/components/app-gate/ErrorRoute.d.ts.map +1 -0
- package/dist/components/app-gate/ErrorRoute.js +27 -0
- package/dist/components/app-gate/ErrorRoute.js.map +1 -0
- package/dist/components/app-gate/FailureAlert.d.ts +5 -0
- package/dist/components/app-gate/FailureAlert.d.ts.map +1 -0
- package/dist/components/app-gate/FailureAlert.js +9 -0
- package/dist/components/app-gate/FailureAlert.js.map +1 -0
- package/dist/components/app-gate/NoDatastoreAccess.d.ts +8 -0
- package/dist/components/app-gate/NoDatastoreAccess.d.ts.map +1 -0
- package/dist/components/app-gate/NoDatastoreAccess.js +9 -0
- package/dist/components/app-gate/NoDatastoreAccess.js.map +1 -0
- package/dist/components/app-gate/NotFoundRoute.d.ts +2 -0
- package/dist/components/app-gate/NotFoundRoute.d.ts.map +1 -0
- package/dist/components/app-gate/NotFoundRoute.js +9 -0
- package/dist/components/app-gate/NotFoundRoute.js.map +1 -0
- package/dist/components/app-gate/PendingInvitations.d.ts +5 -0
- package/dist/components/app-gate/PendingInvitations.d.ts.map +1 -0
- package/dist/components/app-gate/PendingInvitations.js +58 -0
- package/dist/components/app-gate/PendingInvitations.js.map +1 -0
- package/dist/components/app-gate/ServiceError.d.ts +8 -0
- package/dist/components/app-gate/ServiceError.d.ts.map +1 -0
- package/dist/components/app-gate/ServiceError.js +10 -0
- package/dist/components/app-gate/ServiceError.js.map +1 -0
- package/dist/components/app-gate/index.d.ts +3 -0
- package/dist/components/app-gate/index.d.ts.map +1 -0
- package/dist/components/app-gate/index.js +3 -0
- package/dist/components/app-gate/index.js.map +1 -0
- package/dist/components/app-gate/sdk-route-elements.d.ts +23 -0
- package/dist/components/app-gate/sdk-route-elements.d.ts.map +1 -0
- package/dist/components/app-gate/sdk-route-elements.js +35 -0
- package/dist/components/app-gate/sdk-route-elements.js.map +1 -0
- package/dist/components/app-shell/AppShell.d.ts +7 -0
- package/dist/components/app-shell/AppShell.d.ts.map +1 -0
- package/dist/components/app-shell/AppShell.js +10 -0
- package/dist/components/app-shell/AppShell.js.map +1 -0
- package/dist/components/app-shell/AppShellRoutes.d.ts +9 -0
- package/dist/components/app-shell/AppShellRoutes.d.ts.map +1 -0
- package/dist/components/app-shell/AppShellRoutes.js +20 -0
- package/dist/components/app-shell/AppShellRoutes.js.map +1 -0
- package/dist/components/app-shell/GroupDatastores.d.ts +8 -0
- package/dist/components/app-shell/GroupDatastores.d.ts.map +1 -0
- package/dist/components/app-shell/GroupDatastores.js +15 -0
- package/dist/components/app-shell/GroupDatastores.js.map +1 -0
- package/dist/components/app-shell/GroupRoute.d.ts +2 -0
- package/dist/components/app-shell/GroupRoute.d.ts.map +1 -0
- package/dist/components/app-shell/GroupRoute.js +22 -0
- package/dist/components/app-shell/GroupRoute.js.map +1 -0
- package/dist/components/app-shell/index.d.ts +3 -0
- package/dist/components/app-shell/index.d.ts.map +1 -0
- package/dist/components/app-shell/index.js +3 -0
- package/dist/components/app-shell/index.js.map +1 -0
- package/dist/components/authenticated-chat/index.d.ts +1 -2
- package/dist/components/authenticated-chat/index.d.ts.map +1 -1
- package/dist/components/authenticated-chat/index.js +1 -12
- package/dist/components/authenticated-chat/index.js.map +1 -1
- package/dist/components/chat-view/Chat.d.ts +2 -1
- package/dist/components/chat-view/Chat.d.ts.map +1 -1
- package/dist/components/chat-view/Chat.js +3 -2
- package/dist/components/chat-view/Chat.js.map +1 -1
- package/dist/components/chat-view/MessageItem.d.ts.map +1 -1
- package/dist/components/chat-view/MessageItem.js +4 -2
- package/dist/components/chat-view/MessageItem.js.map +1 -1
- package/dist/components/chat-view/tool-part-rendering.d.ts +1 -0
- package/dist/components/chat-view/tool-part-rendering.d.ts.map +1 -1
- package/dist/components/chat-view/tool-part-rendering.js +8 -1
- package/dist/components/chat-view/tool-part-rendering.js.map +1 -1
- package/dist/components/chip/index.d.ts +1 -0
- package/dist/components/chip/index.d.ts.map +1 -1
- package/dist/components/chip/index.js +2 -1
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/embedded-chat/index.d.ts +1 -1
- package/dist/components/embedded-chat/index.d.ts.map +1 -1
- package/dist/components/embedded-chat/index.js +1 -1
- package/dist/components/embedded-chat/index.js.map +1 -1
- package/dist/components/input/input-date-time.d.ts +6 -0
- package/dist/components/input/input-date-time.d.ts.map +1 -1
- package/dist/components/input/input-date-time.js +2 -1
- package/dist/components/input/input-date-time.js.map +1 -1
- package/dist/components/input/input-date.d.ts +22 -0
- package/dist/components/input/input-date.d.ts.map +1 -1
- package/dist/components/input/input-date.js +28 -14
- package/dist/components/input/input-date.js.map +1 -1
- package/dist/components/input/input-time.d.ts +9 -0
- package/dist/components/input/input-time.d.ts.map +1 -1
- package/dist/components/input/input-time.js +29 -18
- package/dist/components/input/input-time.js.map +1 -1
- package/dist/components/layouts/RouteLayout.d.ts +0 -9
- package/dist/components/layouts/RouteLayout.d.ts.map +1 -1
- package/dist/components/layouts/RouteLayout.js +7 -4
- package/dist/components/layouts/RouteLayout.js.map +1 -1
- package/dist/components/layouts/Sidebar.d.ts +1 -8
- package/dist/components/layouts/Sidebar.d.ts.map +1 -1
- package/dist/components/layouts/Sidebar.js +7 -14
- package/dist/components/layouts/Sidebar.js.map +1 -1
- package/dist/components/plan-limits/PlanLimitsDialog.d.ts +20 -0
- package/dist/components/plan-limits/PlanLimitsDialog.d.ts.map +1 -0
- package/dist/components/plan-limits/PlanLimitsDialog.js +109 -0
- package/dist/components/plan-limits/PlanLimitsDialog.js.map +1 -0
- package/dist/components/plan-limits/index.d.ts +4 -0
- package/dist/components/plan-limits/index.d.ts.map +1 -0
- package/dist/components/plan-limits/index.js +2 -0
- package/dist/components/plan-limits/index.js.map +1 -0
- package/dist/components/plan-limits/plan-limits-client.d.ts +15 -0
- package/dist/components/plan-limits/plan-limits-client.d.ts.map +1 -0
- package/dist/components/plan-limits/plan-limits-client.js +44 -0
- package/dist/components/plan-limits/plan-limits-client.js.map +1 -0
- package/dist/components/plan-limits/plan-limits-model.d.ts +66 -0
- package/dist/components/plan-limits/plan-limits-model.d.ts.map +1 -0
- package/dist/components/plan-limits/plan-limits-model.js +123 -0
- package/dist/components/plan-limits/plan-limits-model.js.map +1 -0
- package/dist/components/plan-limits/plan-limits-save.d.ts +31 -0
- package/dist/components/plan-limits/plan-limits-save.d.ts.map +1 -0
- package/dist/components/plan-limits/plan-limits-save.js +43 -0
- package/dist/components/plan-limits/plan-limits-save.js.map +1 -0
- package/dist/components/planning/PlanLimitsAction.d.ts +6 -0
- package/dist/components/planning/PlanLimitsAction.d.ts.map +1 -0
- package/dist/components/planning/PlanLimitsAction.js +19 -0
- package/dist/components/planning/PlanLimitsAction.js.map +1 -0
- package/dist/components/slider/index.d.ts.map +1 -1
- package/dist/components/slider/index.js +2 -1
- package/dist/components/slider/index.js.map +1 -1
- package/dist/datastore-picker/datastore-picker-rows.d.ts +7 -0
- package/dist/datastore-picker/datastore-picker-rows.d.ts.map +1 -1
- package/dist/datastore-picker/datastore-picker-rows.js +26 -22
- package/dist/datastore-picker/datastore-picker-rows.js.map +1 -1
- package/dist/globals.css +85 -2
- package/dist/hooks/use-action-plans-list.d.ts +3 -0
- package/dist/hooks/use-action-plans-list.d.ts.map +1 -1
- package/dist/hooks/use-action-plans-list.js +8 -9
- package/dist/hooks/use-action-plans-list.js.map +1 -1
- package/dist/hooks/use-activity-feed.d.ts +10 -1
- package/dist/hooks/use-activity-feed.d.ts.map +1 -1
- package/dist/hooks/use-activity-feed.js +9 -11
- package/dist/hooks/use-activity-feed.js.map +1 -1
- package/dist/hooks/use-entity.d.ts +4 -3
- package/dist/hooks/use-entity.d.ts.map +1 -1
- package/dist/hooks/use-entity.js +4 -4
- package/dist/hooks/use-entity.js.map +1 -1
- package/dist/hooks/use-manual-actions.d.ts +1 -1
- package/dist/hooks/use-manual-actions.d.ts.map +1 -1
- package/dist/hooks/use-manual-actions.js +5 -5
- package/dist/hooks/use-manual-actions.js.map +1 -1
- package/dist/hooks/use-unsaved-changes-warning.d.ts +2 -0
- package/dist/hooks/use-unsaved-changes-warning.d.ts.map +1 -0
- package/dist/hooks/use-unsaved-changes-warning.js +13 -0
- package/dist/hooks/use-unsaved-changes-warning.js.map +1 -0
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +4 -3
- package/dist/hooks/useAuth.js.map +1 -1
- package/dist/hooks/useChatPanelSync.d.ts.map +1 -1
- package/dist/hooks/useChatPanelSync.js +2 -3
- package/dist/hooks/useChatPanelSync.js.map +1 -1
- package/dist/hooks/useDatastoreSelection.d.ts.map +1 -1
- package/dist/hooks/useDatastoreSelection.js +11 -4
- package/dist/hooks/useDatastoreSelection.js.map +1 -1
- package/dist/hooks/useExecuteAction.d.ts +1 -0
- package/dist/hooks/useExecuteAction.d.ts.map +1 -1
- package/dist/hooks/useExecuteAction.js.map +1 -1
- package/dist/hooks/useLoginRedirect.d.ts +6 -0
- package/dist/hooks/useLoginRedirect.d.ts.map +1 -0
- package/dist/hooks/useLoginRedirect.js +51 -0
- package/dist/hooks/useLoginRedirect.js.map +1 -0
- package/dist/hooks/usePlanLimits.d.ts +18 -0
- package/dist/hooks/usePlanLimits.d.ts.map +1 -0
- package/dist/hooks/usePlanLimits.js +56 -0
- package/dist/hooks/usePlanLimits.js.map +1 -0
- package/dist/ldo-ui.d.ts +1 -1
- package/dist/ldo-ui.d.ts.map +1 -1
- package/dist/ldo-ui.js.map +1 -1
- package/dist/lib/app-tools.d.ts +18 -0
- package/dist/lib/app-tools.d.ts.map +1 -0
- package/dist/lib/app-tools.js +42 -0
- package/dist/lib/app-tools.js.map +1 -0
- package/dist/lib/chat-types.d.ts +3 -0
- package/dist/lib/chat-types.d.ts.map +1 -1
- package/dist/lib/chat-types.js.map +1 -1
- package/dist/lib/datastore-route-table.d.ts +3 -0
- package/dist/lib/datastore-route-table.d.ts.map +1 -1
- package/dist/lib/datastore-route-table.js +6 -0
- package/dist/lib/datastore-route-table.js.map +1 -1
- package/dist/lib/graphql-error.d.ts +2 -0
- package/dist/lib/graphql-error.d.ts.map +1 -0
- package/dist/lib/graphql-error.js +7 -0
- package/dist/lib/graphql-error.js.map +1 -0
- package/dist/lib/update-notice.d.ts +2 -1
- package/dist/lib/update-notice.d.ts.map +1 -1
- package/dist/lib/update-notice.js +8 -2
- package/dist/lib/update-notice.js.map +1 -1
- package/dist/providers/ActiveChatProvider.d.ts +2 -0
- package/dist/providers/ActiveChatProvider.d.ts.map +1 -1
- package/dist/providers/ActiveChatProvider.js +6 -3
- package/dist/providers/ActiveChatProvider.js.map +1 -1
- package/dist/providers/ActiveDatastoreProvider.d.ts +12 -0
- package/dist/providers/ActiveDatastoreProvider.d.ts.map +1 -1
- package/dist/providers/ActiveDatastoreProvider.js +114 -11
- package/dist/providers/ActiveDatastoreProvider.js.map +1 -1
- package/dist/providers/AuthContext.d.ts +1 -0
- package/dist/providers/AuthContext.d.ts.map +1 -1
- package/dist/providers/AuthContext.js.map +1 -1
- package/dist/providers/MantaClientProvider.d.ts.map +1 -1
- package/dist/providers/MantaClientProvider.js +3 -3
- package/dist/providers/MantaClientProvider.js.map +1 -1
- package/dist/providers/index.d.ts +3 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +2 -2
- package/dist/providers/index.js.map +1 -1
- package/dist/routes/activity/detail/ActivityDetailRoute.d.ts.map +1 -1
- package/dist/routes/activity/detail/ActivityDetailRoute.js +1 -3
- package/dist/routes/activity/detail/ActivityDetailRoute.js.map +1 -1
- package/dist/routes/activity/index.d.ts.map +1 -1
- package/dist/routes/activity/index.js +1 -3
- package/dist/routes/activity/index.js.map +1 -1
- package/dist/routes/chat/index.d.ts +2 -21
- package/dist/routes/chat/index.d.ts.map +1 -1
- package/dist/routes/chat/index.js +4 -2
- package/dist/routes/chat/index.js.map +1 -1
- package/dist/routes/data-collection/index.d.ts.map +1 -1
- package/dist/routes/data-collection/index.js +1 -3
- package/dist/routes/data-collection/index.js.map +1 -1
- package/dist/routes/data-explorer/components/DataExplorerLayout.d.ts.map +1 -1
- package/dist/routes/data-explorer/components/DataExplorerLayout.js +1 -3
- package/dist/routes/data-explorer/components/DataExplorerLayout.js.map +1 -1
- package/dist/routes/data-explorer/components/class-detail/UsedByRules.js +2 -2
- package/dist/routes/data-explorer/components/class-detail/UsedByRules.js.map +1 -1
- package/dist/routes/datastores/index.d.ts.map +1 -1
- package/dist/routes/datastores/index.js +2 -2
- package/dist/routes/datastores/index.js.map +1 -1
- package/dist/routes/explain/index.d.ts.map +1 -1
- package/dist/routes/explain/index.js +1 -3
- package/dist/routes/explain/index.js.map +1 -1
- package/dist/routes/integrations/components/connect-forms/DashConnectForm.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/DashConnectForm.js +0 -1
- package/dist/routes/integrations/components/connect-forms/DashConnectForm.js.map +1 -1
- package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.js +0 -1
- package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.js.map +1 -1
- package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.js +0 -1
- package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.js.map +1 -1
- package/dist/routes/integrations/components/connect-forms/GoogleMerchantCenterConnectForm.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/GoogleMerchantCenterConnectForm.js +0 -1
- package/dist/routes/integrations/components/connect-forms/GoogleMerchantCenterConnectForm.js.map +1 -1
- package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.d.ts +0 -1
- package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.js +3 -2
- package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.js.map +1 -1
- package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.js +0 -1
- package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.js.map +1 -1
- package/dist/routes/integrations/components/connect-forms/MicrosoftAdsConnectForm.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/MicrosoftAdsConnectForm.js +0 -1
- package/dist/routes/integrations/components/connect-forms/MicrosoftAdsConnectForm.js.map +1 -1
- package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.d.ts +0 -1
- package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.js +4 -3
- package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.js.map +1 -1
- package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.js +0 -1
- package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.js.map +1 -1
- package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.js +0 -1
- package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.js.map +1 -1
- package/dist/routes/integrations/types.d.ts +2 -1
- package/dist/routes/integrations/types.d.ts.map +1 -1
- package/dist/routes/integrations/types.js +16 -0
- package/dist/routes/integrations/types.js.map +1 -1
- package/dist/routes/memories/components/DateValueInput.d.ts +16 -0
- package/dist/routes/memories/components/DateValueInput.d.ts.map +1 -0
- package/dist/routes/memories/components/DateValueInput.js +35 -0
- package/dist/routes/memories/components/DateValueInput.js.map +1 -0
- package/dist/routes/memories/components/EntityValuePicker.d.ts +11 -0
- package/dist/routes/memories/components/EntityValuePicker.d.ts.map +1 -0
- package/dist/routes/memories/components/EntityValuePicker.js +61 -0
- package/dist/routes/memories/components/EntityValuePicker.js.map +1 -0
- package/dist/routes/memories/components/FieldLabel.d.ts +12 -0
- package/dist/routes/memories/components/FieldLabel.d.ts.map +1 -0
- package/dist/routes/memories/components/FieldLabel.js +12 -0
- package/dist/routes/memories/components/FieldLabel.js.map +1 -0
- package/dist/routes/memories/components/ImportanceSlider.d.ts +2 -0
- package/dist/routes/memories/components/ImportanceSlider.d.ts.map +1 -1
- package/dist/routes/memories/components/ImportanceSlider.js +4 -1
- package/dist/routes/memories/components/ImportanceSlider.js.map +1 -1
- package/dist/routes/memories/components/MemoriesFilters.d.ts +2 -2
- package/dist/routes/memories/components/MemoriesFilters.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoriesFilters.js.map +1 -1
- package/dist/routes/memories/components/MemoriesPanel.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoriesPanel.js +4 -0
- package/dist/routes/memories/components/MemoriesPanel.js.map +1 -1
- package/dist/routes/memories/components/MemoriesTabPanel.d.ts +2 -2
- package/dist/routes/memories/components/MemoriesTabPanel.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoryActions.d.ts +2 -0
- package/dist/routes/memories/components/MemoryActions.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoryActions.js +3 -3
- package/dist/routes/memories/components/MemoryActions.js.map +1 -1
- package/dist/routes/memories/components/MemoryFields.d.ts +15 -3
- package/dist/routes/memories/components/MemoryFields.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoryFields.js +34 -5
- package/dist/routes/memories/components/MemoryFields.js.map +1 -1
- package/dist/routes/memories/components/MemoryFormDialog.d.ts +6 -3
- package/dist/routes/memories/components/MemoryFormDialog.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoryFormDialog.js +105 -59
- package/dist/routes/memories/components/MemoryFormDialog.js.map +1 -1
- package/dist/routes/memories/components/MemoryPropertyFields.d.ts +10 -0
- package/dist/routes/memories/components/MemoryPropertyFields.d.ts.map +1 -0
- package/dist/routes/memories/components/MemoryPropertyFields.js +67 -0
- package/dist/routes/memories/components/MemoryPropertyFields.js.map +1 -0
- package/dist/routes/memories/components/RuleDraftDialog.d.ts +7 -0
- package/dist/routes/memories/components/RuleDraftDialog.d.ts.map +1 -0
- package/dist/routes/memories/components/RuleDraftDialog.js +20 -0
- package/dist/routes/memories/components/RuleDraftDialog.js.map +1 -0
- package/dist/routes/memories/components/SchemasTab.d.ts +17 -2
- package/dist/routes/memories/components/SchemasTab.d.ts.map +1 -1
- package/dist/routes/memories/components/SchemasTab.js +146 -28
- package/dist/routes/memories/components/SchemasTab.js.map +1 -1
- package/dist/routes/memories/components/badges.d.ts +7 -0
- package/dist/routes/memories/components/badges.d.ts.map +1 -1
- package/dist/routes/memories/components/badges.js +11 -3
- package/dist/routes/memories/components/badges.js.map +1 -1
- package/dist/routes/memories/hooks/useMemoryColumns.d.ts +4 -2
- package/dist/routes/memories/hooks/useMemoryColumns.d.ts.map +1 -1
- package/dist/routes/memories/hooks/useMemoryColumns.js +31 -15
- package/dist/routes/memories/hooks/useMemoryColumns.js.map +1 -1
- package/dist/routes/memories/index.d.ts +2 -1
- package/dist/routes/memories/index.d.ts.map +1 -1
- package/dist/routes/memories/index.js +72 -30
- package/dist/routes/memories/index.js.map +1 -1
- package/dist/routes/memories/memory-mutation-input.d.ts.map +1 -1
- package/dist/routes/memories/memory-mutation-input.js +5 -2
- package/dist/routes/memories/memory-mutation-input.js.map +1 -1
- package/dist/routes/memories/memory-property-values.d.ts +13 -0
- package/dist/routes/memories/memory-property-values.d.ts.map +1 -0
- package/dist/routes/memories/memory-property-values.js +40 -0
- package/dist/routes/memories/memory-property-values.js.map +1 -0
- package/dist/routes/memories/schemas/AllowedValuesField.d.ts +14 -0
- package/dist/routes/memories/schemas/AllowedValuesField.d.ts.map +1 -0
- package/dist/routes/memories/schemas/AllowedValuesField.js +64 -0
- package/dist/routes/memories/schemas/AllowedValuesField.js.map +1 -0
- package/dist/routes/memories/schemas/MemorySchemaPage.d.ts +127 -0
- package/dist/routes/memories/schemas/MemorySchemaPage.d.ts.map +1 -0
- package/dist/routes/memories/schemas/MemorySchemaPage.js +285 -0
- package/dist/routes/memories/schemas/MemorySchemaPage.js.map +1 -0
- package/dist/routes/memories/schemas/SchemaChangeReviewDialog.d.ts +20 -0
- package/dist/routes/memories/schemas/SchemaChangeReviewDialog.d.ts.map +1 -0
- package/dist/routes/memories/schemas/SchemaChangeReviewDialog.js +54 -0
- package/dist/routes/memories/schemas/SchemaChangeReviewDialog.js.map +1 -0
- package/dist/routes/memories/schemas/SchemaConfirmDialog.d.ts +15 -0
- package/dist/routes/memories/schemas/SchemaConfirmDialog.d.ts.map +1 -0
- package/dist/routes/memories/schemas/SchemaConfirmDialog.js +8 -0
- package/dist/routes/memories/schemas/SchemaConfirmDialog.js.map +1 -0
- package/dist/routes/memories/schemas/SchemaDetailPage.d.ts +15 -0
- package/dist/routes/memories/schemas/SchemaDetailPage.d.ts.map +1 -0
- package/dist/routes/memories/schemas/SchemaDetailPage.js +74 -0
- package/dist/routes/memories/schemas/SchemaDetailPage.js.map +1 -0
- package/dist/routes/memories/schemas/SchemaEditorForm.d.ts +10 -0
- package/dist/routes/memories/schemas/SchemaEditorForm.d.ts.map +1 -0
- package/dist/routes/memories/schemas/SchemaEditorForm.js +242 -0
- package/dist/routes/memories/schemas/SchemaEditorForm.js.map +1 -0
- package/dist/routes/memories/schemas/SchemaTemplatesDialog.d.ts +13 -0
- package/dist/routes/memories/schemas/SchemaTemplatesDialog.d.ts.map +1 -0
- package/dist/routes/memories/schemas/SchemaTemplatesDialog.js +13 -0
- package/dist/routes/memories/schemas/SchemaTemplatesDialog.js.map +1 -0
- package/dist/routes/memories/schemas/ValueTypeSelect.d.ts +12 -0
- package/dist/routes/memories/schemas/ValueTypeSelect.d.ts.map +1 -0
- package/dist/routes/memories/schemas/ValueTypeSelect.js +10 -0
- package/dist/routes/memories/schemas/ValueTypeSelect.js.map +1 -0
- package/dist/routes/memories/schemas/schema-form.d.ts +72 -0
- package/dist/routes/memories/schemas/schema-form.d.ts.map +1 -0
- package/dist/routes/memories/schemas/schema-form.js +279 -0
- package/dist/routes/memories/schemas/schema-form.js.map +1 -0
- package/dist/routes/memories/schemas/schema-impact.d.ts +13 -0
- package/dist/routes/memories/schemas/schema-impact.d.ts.map +1 -0
- package/dist/routes/memories/schemas/schema-impact.js +40 -0
- package/dist/routes/memories/schemas/schema-impact.js.map +1 -0
- package/dist/routes/memories/schemas/schema-route.d.ts +18 -0
- package/dist/routes/memories/schemas/schema-route.d.ts.map +1 -0
- package/dist/routes/memories/schemas/schema-route.js +21 -0
- package/dist/routes/memories/schemas/schema-route.js.map +1 -0
- package/dist/routes/memories/schemas/schema-rule-context.d.ts +17 -0
- package/dist/routes/memories/schemas/schema-rule-context.d.ts.map +1 -0
- package/dist/routes/memories/schemas/schema-rule-context.js +83 -0
- package/dist/routes/memories/schemas/schema-rule-context.js.map +1 -0
- package/dist/routes/memories/schemas/schema-table.d.ts +11 -0
- package/dist/routes/memories/schemas/schema-table.d.ts.map +1 -0
- package/dist/routes/memories/schemas/schema-table.js +34 -0
- package/dist/routes/memories/schemas/schema-table.js.map +1 -0
- package/dist/routes/memories/schemas/useMemorySchemaMutations.d.ts +32 -0
- package/dist/routes/memories/schemas/useMemorySchemaMutations.d.ts.map +1 -0
- package/dist/routes/memories/schemas/useMemorySchemaMutations.js +31 -0
- package/dist/routes/memories/schemas/useMemorySchemaMutations.js.map +1 -0
- package/dist/routes/memories/schemas/useSchemaChangeReview.d.ts +51 -0
- package/dist/routes/memories/schemas/useSchemaChangeReview.d.ts.map +1 -0
- package/dist/routes/memories/schemas/useSchemaChangeReview.js +175 -0
- package/dist/routes/memories/schemas/useSchemaChangeReview.js.map +1 -0
- package/dist/routes/memories/schemas/useSchemaLifecycle.d.ts +46 -0
- package/dist/routes/memories/schemas/useSchemaLifecycle.d.ts.map +1 -0
- package/dist/routes/memories/schemas/useSchemaLifecycle.js +93 -0
- package/dist/routes/memories/schemas/useSchemaLifecycle.js.map +1 -0
- package/dist/routes/memories/schemas/useSchemasTab.d.ts +18 -0
- package/dist/routes/memories/schemas/useSchemasTab.d.ts.map +1 -0
- package/dist/routes/memories/schemas/useSchemasTab.js +92 -0
- package/dist/routes/memories/schemas/useSchemasTab.js.map +1 -0
- package/dist/routes/plans/index.d.ts.map +1 -1
- package/dist/routes/plans/index.js +2 -2
- package/dist/routes/plans/index.js.map +1 -1
- package/dist/routes/rules/components/CreateRuleChatModal.d.ts +7 -1
- package/dist/routes/rules/components/CreateRuleChatModal.d.ts.map +1 -1
- package/dist/routes/rules/components/CreateRuleChatModal.js +9 -4
- package/dist/routes/rules/components/CreateRuleChatModal.js.map +1 -1
- package/dist/routes/rules/components/RuleValueControls.d.ts.map +1 -1
- package/dist/routes/rules/components/RuleValueControls.js +3 -24
- package/dist/routes/rules/components/RuleValueControls.js.map +1 -1
- package/dist/routes/rules/components/rule-value-input.d.ts +11 -0
- package/dist/routes/rules/components/rule-value-input.d.ts.map +1 -0
- package/dist/routes/rules/components/rule-value-input.js +24 -0
- package/dist/routes/rules/components/rule-value-input.js.map +1 -0
- package/dist/routes/rules/components/rules.utils.d.ts +5 -0
- package/dist/routes/rules/components/rules.utils.d.ts.map +1 -1
- package/dist/routes/rules/components/rules.utils.js +18 -3
- package/dist/routes/rules/components/rules.utils.js.map +1 -1
- package/dist/routes/rules/pages.d.ts +1 -1
- package/dist/routes/rules/pages.d.ts.map +1 -1
- package/dist/routes/rules/pages.js +1 -1
- package/dist/routes/rules/pages.js.map +1 -1
- package/dist/shared/graph-derived-queries.d.ts.map +1 -1
- package/dist/shared/graph-derived-queries.js +4 -1
- package/dist/shared/graph-derived-queries.js.map +1 -1
- package/dist/worker/index.d.ts +22 -0
- package/dist/worker/index.d.ts.map +1 -0
- package/dist/worker/index.js +110 -0
- package/dist/worker/index.js.map +1 -0
- package/dist/worker/policy.d.ts +21 -0
- package/dist/worker/policy.d.ts.map +1 -0
- package/dist/worker/policy.js +42 -0
- package/dist/worker/policy.js.map +1 -0
- package/dist/worker/proxy.d.ts +14 -0
- package/dist/worker/proxy.d.ts.map +1 -0
- package/dist/worker/proxy.js +58 -0
- package/dist/worker/proxy.js.map +1 -0
- package/dist/worker/session.d.ts +24 -0
- package/dist/worker/session.d.ts.map +1 -0
- package/dist/worker/session.js +72 -0
- package/dist/worker/session.js.map +1 -0
- package/package.json +52 -7
- package/src/app-subpaths.json +9 -1
- package/src/components/AppErrorBoundary.tsx +14 -11
- package/src/components/app-gate/AppGate.tsx +122 -0
- package/src/components/app-gate/AwaitingDatastoreStatus.tsx +35 -0
- package/src/components/app-gate/EnterDatastoreRoute.tsx +30 -0
- package/src/components/app-gate/ErrorRoute.tsx +43 -0
- package/src/components/app-gate/FailureAlert.tsx +15 -0
- package/src/components/app-gate/NoDatastoreAccess.tsx +26 -0
- package/src/components/app-gate/NotFoundRoute.tsx +20 -0
- package/src/components/app-gate/PendingInvitations.tsx +134 -0
- package/src/components/app-gate/ServiceError.tsx +27 -0
- package/src/components/app-gate/index.ts +2 -0
- package/src/components/app-gate/sdk-route-elements.tsx +46 -0
- package/src/components/app-shell/AppShell.tsx +22 -0
- package/src/components/app-shell/AppShellRoutes.tsx +34 -0
- package/src/components/app-shell/GroupDatastores.tsx +28 -0
- package/src/components/app-shell/GroupRoute.tsx +34 -0
- package/src/components/app-shell/index.ts +2 -0
- package/src/components/authenticated-chat/index.tsx +1 -34
- package/src/components/chat-view/Chat.tsx +9 -3
- package/src/components/chat-view/MessageItem.tsx +10 -2
- package/src/components/chat-view/tool-part-rendering.ts +10 -1
- package/src/components/chip/index.tsx +8 -1
- package/src/components/embedded-chat/index.tsx +2 -1
- package/src/components/input/input-date-time.tsx +10 -3
- package/src/components/input/input-date.tsx +93 -21
- package/src/components/input/input-time.tsx +59 -26
- package/src/components/layouts/RouteLayout.tsx +11 -50
- package/src/components/layouts/Sidebar.tsx +21 -23
- package/src/components/plan-limits/PlanLimitsDialog.tsx +331 -0
- package/src/components/plan-limits/index.tsx +3 -0
- package/src/components/plan-limits/plan-limits-client.ts +71 -0
- package/src/components/plan-limits/plan-limits-model.ts +180 -0
- package/src/components/plan-limits/plan-limits-save.ts +68 -0
- package/src/components/planning/PlanLimitsAction.tsx +44 -0
- package/src/components/slider/index.tsx +2 -1
- package/src/datastore-picker/datastore-picker-rows.ts +36 -20
- package/src/hooks/use-action-plans-list.ts +20 -12
- package/src/hooks/use-activity-feed.ts +30 -14
- package/src/hooks/use-entity.ts +11 -6
- package/src/hooks/use-manual-actions.ts +11 -6
- package/src/hooks/use-unsaved-changes-warning.ts +12 -0
- package/src/hooks/useAuth.ts +5 -3
- package/src/hooks/useChatPanelSync.ts +2 -3
- package/src/hooks/useDatastoreSelection.ts +10 -4
- package/src/hooks/useExecuteAction.ts +2 -0
- package/src/hooks/useLoginRedirect.ts +66 -0
- package/src/hooks/usePlanLimits.ts +97 -0
- package/src/ldo-ui.ts +1 -0
- package/src/lib/app-tools.ts +63 -0
- package/src/lib/chat-types.ts +5 -0
- package/src/lib/datastore-route-table.ts +9 -0
- package/src/lib/graphql-error.ts +7 -0
- package/src/lib/update-notice.ts +12 -2
- package/src/providers/ActiveChatProvider.tsx +8 -3
- package/src/providers/ActiveDatastoreProvider.tsx +179 -9
- package/src/providers/AuthContext.ts +1 -0
- package/src/providers/MantaClientProvider.tsx +8 -3
- package/src/providers/index.tsx +7 -4
- package/src/routes/activity/detail/ActivityDetailRoute.tsx +1 -10
- package/src/routes/activity/index.tsx +1 -10
- package/src/routes/chat/index.tsx +11 -47
- package/src/routes/data-collection/index.tsx +1 -11
- package/src/routes/data-explorer/components/DataExplorerLayout.tsx +1 -11
- package/src/routes/data-explorer/components/class-detail/UsedByRules.tsx +2 -2
- package/src/routes/datastores/index.tsx +3 -9
- package/src/routes/explain/index.tsx +1 -11
- package/src/routes/integrations/components/connect-forms/DashConnectForm.tsx +0 -1
- package/src/routes/integrations/components/connect-forms/GoogleAdsConnectForm.tsx +0 -1
- package/src/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.tsx +0 -1
- package/src/routes/integrations/components/connect-forms/GoogleMerchantCenterConnectForm.tsx +0 -1
- package/src/routes/integrations/components/connect-forms/InferalCredentialConnectForm.tsx +5 -3
- package/src/routes/integrations/components/connect-forms/KlaviyoConnectForm.tsx +0 -1
- package/src/routes/integrations/components/connect-forms/MicrosoftAdsConnectForm.tsx +0 -1
- package/src/routes/integrations/components/connect-forms/OAuthSetupConnectForm.tsx +7 -7
- package/src/routes/integrations/components/connect-forms/TriplewhaleConnectForm.tsx +0 -1
- package/src/routes/integrations/components/connect-forms/WoocommerceConnectForm.tsx +0 -1
- package/src/routes/integrations/types.ts +22 -6
- package/src/routes/memories/components/DateValueInput.tsx +72 -0
- package/src/routes/memories/components/EntityValuePicker.tsx +132 -0
- package/src/routes/memories/components/FieldLabel.tsx +49 -0
- package/src/routes/memories/components/ImportanceSlider.tsx +5 -1
- package/src/routes/memories/components/MemoriesFilters.tsx +2 -2
- package/src/routes/memories/components/MemoriesPanel.tsx +7 -3
- package/src/routes/memories/components/MemoriesTabPanel.tsx +2 -2
- package/src/routes/memories/components/MemoryActions.tsx +26 -2
- package/src/routes/memories/components/MemoryFields.tsx +75 -12
- package/src/routes/memories/components/MemoryFormDialog.tsx +305 -199
- package/src/routes/memories/components/MemoryPropertyFields.tsx +288 -0
- package/src/routes/memories/components/RuleDraftDialog.tsx +35 -0
- package/src/routes/memories/components/SchemasTab.tsx +481 -118
- package/src/routes/memories/components/badges.tsx +16 -4
- package/src/routes/memories/hooks/useMemoryColumns.tsx +69 -35
- package/src/routes/memories/index.tsx +125 -51
- package/src/routes/memories/memory-mutation-input.ts +5 -2
- package/src/routes/memories/memory-property-values.ts +83 -0
- package/src/routes/memories/schemas/AllowedValuesField.tsx +188 -0
- package/src/routes/memories/schemas/MemorySchemaPage.tsx +476 -0
- package/src/routes/memories/schemas/SchemaChangeReviewDialog.tsx +290 -0
- package/src/routes/memories/schemas/SchemaConfirmDialog.tsx +62 -0
- package/src/routes/memories/schemas/SchemaDetailPage.tsx +373 -0
- package/src/routes/memories/schemas/SchemaEditorForm.tsx +990 -0
- package/src/routes/memories/schemas/SchemaTemplatesDialog.tsx +81 -0
- package/src/routes/memories/schemas/ValueTypeSelect.tsx +37 -0
- package/src/routes/memories/schemas/schema-form.ts +360 -0
- package/src/routes/memories/schemas/schema-impact.ts +66 -0
- package/src/routes/memories/schemas/schema-route.ts +30 -0
- package/src/routes/memories/schemas/schema-rule-context.ts +103 -0
- package/src/routes/memories/schemas/schema-table.ts +54 -0
- package/src/routes/memories/schemas/useMemorySchemaMutations.ts +49 -0
- package/src/routes/memories/schemas/useSchemaChangeReview.ts +238 -0
- package/src/routes/memories/schemas/useSchemaLifecycle.tsx +151 -0
- package/src/routes/memories/schemas/useSchemasTab.ts +119 -0
- package/src/routes/plans/index.tsx +3 -14
- package/src/routes/rules/components/CreateRuleChatModal.tsx +46 -22
- package/src/routes/rules/components/RuleValueControls.tsx +3 -35
- package/src/routes/rules/components/rule-value-input.ts +34 -0
- package/src/routes/rules/components/rules.utils.ts +25 -3
- package/src/routes/rules/pages.ts +5 -1
- package/src/shared/graph-derived-queries.ts +6 -0
- package/src/themes/manta-dark.css +4 -0
- package/src/worker/index.ts +175 -0
- package/src/worker/policy.ts +62 -0
- package/src/worker/proxy.ts +101 -0
- package/src/worker/session.ts +111 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { GQLMemorySchemaValueType } from "@manta-eu/client";
|
|
3
|
+
import { isPresent } from "@manta-eu/lib/present";
|
|
4
|
+
import { ArrowDown, ArrowUp, Check, Ellipsis, GripVertical, Pencil, Plus, Trash2 } from "lucide-react";
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
|
+
import { DateValueInput } from "../components/DateValueInput.js";
|
|
7
|
+
import { FieldLabel } from "../components/FieldLabel.js";
|
|
8
|
+
import { importanceLabel, importanceSteps } from "../components/ImportanceSlider.js";
|
|
9
|
+
import { AllowedValuesField, escapeClearsTypedValue } from "./AllowedValuesField.js";
|
|
10
|
+
import { emptyPropertyForm, hasErrorsUnder, kindLabels, loadPatternCheck, memorySchemaPropertyLimit, moveItem, propertyErrorPrefix, propertyFormErrors, propertySettings, propertyTags, withValueType, scopeLabels, volatilityLabels, valueTypeLabels, } from "./schema-form.js";
|
|
11
|
+
import { ValueTypeSelect } from "./ValueTypeSelect.js";
|
|
12
|
+
import { Banner } from "#components/banner/index";
|
|
13
|
+
import { Button } from "#components/button/index";
|
|
14
|
+
import { Dropdown, DropdownContent, DropdownItem, DropdownTrigger } from "#components/dropdown/index";
|
|
15
|
+
import { Input, Textarea } from "#components/input/index";
|
|
16
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "#components/select/index";
|
|
17
|
+
import { Sheet, SheetBody, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, } from "#components/sheet/index";
|
|
18
|
+
import { Switch } from "#components/switch/index";
|
|
19
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "#components/tooltip/index";
|
|
20
|
+
import { cn } from "#lib/utils";
|
|
21
|
+
const unsetValue = "unset";
|
|
22
|
+
function ChoiceSelect(props) {
|
|
23
|
+
const { id, label, hint, value, choices, onChange, error, disabled } = props;
|
|
24
|
+
return (_jsxs("div", { className: "flex flex-col gap-1.5", children: [hint ? (_jsx(FieldLabel, { label: label, hint: hint, htmlFor: id })) : (_jsx("label", { htmlFor: id, className: "typography-small", children: label })), _jsxs(Select, { value: value ?? unsetValue, disabled: disabled, onValueChange: (next) => onChange(next === unsetValue ? null : (choices.find((c) => c.value === next)?.value ?? null)), children: [_jsx(SelectTrigger, { label: label, id: id, hiddenLabel: true, error: error, children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: unsetValue, children: "Not set" }), choices.map((choice) => (_jsx(SelectItem, { value: choice.value, children: choice.label }, choice.value)))] })] }), error && _jsx("p", { className: "typography-small text-error-foreground", children: error })] }));
|
|
25
|
+
}
|
|
26
|
+
function choicesOf(labels) {
|
|
27
|
+
return Object.entries(labels).map(([value, label]) => ({ value, label }));
|
|
28
|
+
}
|
|
29
|
+
const kindChoices = choicesOf(kindLabels);
|
|
30
|
+
const volatilityChoices = choicesOf(volatilityLabels);
|
|
31
|
+
const scopeChoices = choicesOf(scopeLabels);
|
|
32
|
+
const importanceChoices = importanceSteps.map((step) => ({ value: String(step), label: importanceLabel(step) }));
|
|
33
|
+
function ActionTooltip(props) {
|
|
34
|
+
const { label, children } = props;
|
|
35
|
+
return (_jsx(TooltipProvider, { delayDuration: 300, children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: children }), _jsx(TooltipContent, { side: "top", className: "max-w-xs text-left typography-small", children: label })] }) }));
|
|
36
|
+
}
|
|
37
|
+
const propertyHints = {
|
|
38
|
+
label: "The name people and the agent see for this property.",
|
|
39
|
+
type: "What kind of value this property holds. It decides which constraints you can set. A linked record points to something already in your data, such as a campaign or an ad account, so rules can follow the link.",
|
|
40
|
+
key: "Names the property in the knowledge graph. It cannot change once saved.",
|
|
41
|
+
description: "Explains what to record here, for the people and the agent filling it in.",
|
|
42
|
+
required: "A memory of this schema cannot be saved without a value here.",
|
|
43
|
+
multiValued: "One memory can hold several values, such as several channels.",
|
|
44
|
+
keyProperty: "A new memory replaces an old one when both have the same value here. Use it for what the memory is about, like a target's metric.",
|
|
45
|
+
computed: "A Datalog rule fills this in. Nobody writes it by hand, and chat extraction never sets it.",
|
|
46
|
+
options: "Leave empty to accept any text. Add values to accept only those. Click a value to set how it is shown and what it means.",
|
|
47
|
+
minValue: "The smallest value accepted, inclusive.",
|
|
48
|
+
maxValue: "The largest value accepted, inclusive.",
|
|
49
|
+
unit: "Shown next to the value, such as EUR. It does not convert anything.",
|
|
50
|
+
maxLength: "The most characters a value can have.",
|
|
51
|
+
pattern: "A regular expression every value must match, such as ^[A-Z]{3}$.",
|
|
52
|
+
entityClass: "The class IRI of the records that can be linked, such as a campaign class. Leave it empty to allow any record.",
|
|
53
|
+
defaultValue: "Used when a memory gives no value for this property.",
|
|
54
|
+
};
|
|
55
|
+
const shownPropertyFields = [
|
|
56
|
+
"label",
|
|
57
|
+
"key",
|
|
58
|
+
"description",
|
|
59
|
+
"valueType",
|
|
60
|
+
"entityClass",
|
|
61
|
+
"required",
|
|
62
|
+
"keyProperty",
|
|
63
|
+
"minValue",
|
|
64
|
+
"maxValue",
|
|
65
|
+
"maxLength",
|
|
66
|
+
"pattern",
|
|
67
|
+
"defaultValue",
|
|
68
|
+
"unit",
|
|
69
|
+
"options",
|
|
70
|
+
];
|
|
71
|
+
function otherPropertyErrors(errors, prefix) {
|
|
72
|
+
return [...errors.entries()]
|
|
73
|
+
.filter(([field]) => field.startsWith(`${prefix}.`))
|
|
74
|
+
.filter(([field]) => {
|
|
75
|
+
const rest = field.slice(prefix.length + 1);
|
|
76
|
+
return !shownPropertyFields.some((shown) => rest === shown || rest.startsWith("options."));
|
|
77
|
+
})
|
|
78
|
+
.map(([, message]) => message);
|
|
79
|
+
}
|
|
80
|
+
const dateTypes = [
|
|
81
|
+
GQLMemorySchemaValueType.Date,
|
|
82
|
+
GQLMemorySchemaValueType.DateTime,
|
|
83
|
+
];
|
|
84
|
+
function BoundOrDefaultField(props) {
|
|
85
|
+
const { id, label, hint, valueType, value, placeholder, error, disabled, onChange } = props;
|
|
86
|
+
if (dateTypes.includes(valueType)) {
|
|
87
|
+
return (_jsxs("div", { className: cn("flex flex-col gap-1.5", valueType === GQLMemorySchemaValueType.DateTime && "sm:col-span-2"), children: [_jsx(FieldLabel, { label: label, hint: hint, htmlFor: id }), _jsx(DateValueInput, { id: id, label: label, withTime: valueType === GQLMemorySchemaValueType.DateTime, placeholder: "Not set", value: value, error: error, disabled: disabled, onChange: onChange })] }));
|
|
88
|
+
}
|
|
89
|
+
const isNumber = valueType === GQLMemorySchemaValueType.Integer || valueType === GQLMemorySchemaValueType.Decimal;
|
|
90
|
+
return (_jsx(Input, { id: id, label: label, description: hint, descriptionInLabelTooltip: true, type: isNumber ? "number" : "text", step: valueType === GQLMemorySchemaValueType.Decimal ? "any" : undefined, placeholder: placeholder, value: value, disabled: disabled, error: error, onChange: (e) => onChange(e.target.value) }));
|
|
91
|
+
}
|
|
92
|
+
function defaultValueChoices(property) {
|
|
93
|
+
const choices = property.valueType === GQLMemorySchemaValueType.Boolean
|
|
94
|
+
? [
|
|
95
|
+
{ value: "true", label: "Yes" },
|
|
96
|
+
{ value: "false", label: "No" },
|
|
97
|
+
]
|
|
98
|
+
: propertySettings(property.valueType).options && isPresent(property.options)
|
|
99
|
+
? property.options
|
|
100
|
+
.map((option) => ({ value: option.value.trim(), label: option.label.trim() || option.value.trim() }))
|
|
101
|
+
.filter((choice, index, all) => isPresent(choice.value) && all.findIndex((c) => c.value === choice.value) === index)
|
|
102
|
+
: null;
|
|
103
|
+
if (choices === null)
|
|
104
|
+
return null;
|
|
105
|
+
const current = property.defaultValue.trim();
|
|
106
|
+
return isPresent(current) && !choices.some((choice) => choice.value === current)
|
|
107
|
+
? [...choices, { value: current, label: `${current} (not allowed)` }]
|
|
108
|
+
: choices;
|
|
109
|
+
}
|
|
110
|
+
function RuleChip(props) {
|
|
111
|
+
const { label, hint, pressed, unavailable, disabled, onToggle } = props;
|
|
112
|
+
const blocked = isPresent(unavailable) || disabled === true;
|
|
113
|
+
return (_jsx(ActionTooltip, { label: isPresent(unavailable) ? `${hint} ${unavailable}` : hint, children: _jsxs("button", { type: "button", "aria-pressed": pressed, "aria-disabled": blocked ? true : undefined, onClick: () => {
|
|
114
|
+
if (!blocked)
|
|
115
|
+
onToggle();
|
|
116
|
+
}, className: cn("inline-flex h-8 items-center gap-1.5 rounded-full px-3.5 typography-small transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-active-border/50", pressed
|
|
117
|
+
? "bg-primary text-primary-foreground"
|
|
118
|
+
: "border border-input-border text-default-foreground hover:bg-faint", blocked && !pressed && "cursor-not-allowed border-dashed text-muted-foreground hover:bg-transparent", blocked && pressed && "cursor-not-allowed opacity-60"), children: [pressed && _jsx(Check, { className: "size-3.5", "aria-hidden": true }), label] }) }));
|
|
119
|
+
}
|
|
120
|
+
function PropertyFields(props) {
|
|
121
|
+
const { property, prefix, errors, disabled, onChange } = props;
|
|
122
|
+
const settings = propertySettings(property.valueType);
|
|
123
|
+
function set(patch) {
|
|
124
|
+
onChange({ ...property, ...patch });
|
|
125
|
+
}
|
|
126
|
+
function fieldId(name) {
|
|
127
|
+
return `schema-property-${property.id}-${name}`;
|
|
128
|
+
}
|
|
129
|
+
const extraErrors = otherPropertyErrors(errors, prefix);
|
|
130
|
+
const defaultChoices = defaultValueChoices(property);
|
|
131
|
+
const ruleErrors = [errors.get(`${prefix}.required`), errors.get(`${prefix}.keyProperty`)].filter(isPresent);
|
|
132
|
+
const keyUnavailable = !settings.keyProperty
|
|
133
|
+
? "Long text cannot identify a memory."
|
|
134
|
+
: property.multiValued
|
|
135
|
+
? "A list of values cannot identify a memory."
|
|
136
|
+
: property.computed
|
|
137
|
+
? "A computed property cannot identify a memory."
|
|
138
|
+
: null;
|
|
139
|
+
return (_jsxs("div", { className: "flex flex-col gap-5", children: [_jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [_jsx(Input, { id: fieldId("label"), label: "Label", description: propertyHints.label, descriptionInLabelTooltip: true, placeholder: "e.g. Channel", value: property.label, disabled: disabled, error: errors.get(`${prefix}.label`), onChange: (e) => set({ label: e.target.value }) }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(FieldLabel, { label: "Type", hint: propertyHints.type, htmlFor: fieldId("type") }), _jsx(ValueTypeSelect, { id: fieldId("type"), label: "Type", value: property.valueType, disabled: disabled, error: errors.get(`${prefix}.valueType`), onChange: (valueType) => onChange(withValueType(property, valueType)) })] }), settings.unit && (_jsx(Input, { id: fieldId("unit"), label: "Unit", description: propertyHints.unit, descriptionInLabelTooltip: true, placeholder: "e.g. EUR", value: property.unit, disabled: disabled, error: errors.get(`${prefix}.unit`), onChange: (e) => set({ unit: e.target.value }) })), settings.entityClass && (_jsx(Input, { id: fieldId("entity-class"), label: "Record type", description: propertyHints.entityClass, descriptionInLabelTooltip: true, placeholder: "Any record", containerClassName: "sm:col-span-2", value: property.entityClass, disabled: disabled, error: errors.get(`${prefix}.entityClass`), onChange: (e) => set({ entityClass: e.target.value }) }))] }), property.path === null && (_jsx(Input, { id: fieldId("key"), label: "Key", placeholder: "Generated from the label", description: propertyHints.key, descriptionInLabelTooltip: true, value: property.key, disabled: disabled, error: errors.get(`${prefix}.key`), onChange: (e) => set({ key: e.target.value }) })), _jsx(Textarea, { id: fieldId("description"), label: "Description", description: propertyHints.description, descriptionInLabelTooltip: true, placeholder: "What this property records (optional)", value: property.description, minRows: 2, maxRows: 5, disabled: disabled, error: errors.get(`${prefix}.description`), onChange: (e) => set({ description: e.target.value }) }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("span", { id: fieldId("rules"), className: "typography-small", children: "Rules" }), _jsxs("div", { role: "group", "aria-labelledby": fieldId("rules"), className: "flex flex-wrap gap-2", children: [_jsx(RuleChip, { label: "Required", hint: propertyHints.required, pressed: property.required && !property.computed, unavailable: property.computed ? "A computed property is never required." : null, disabled: disabled, onToggle: () => set({ required: !property.required }) }), _jsx(RuleChip, { label: "List of values", hint: propertyHints.multiValued, pressed: property.multiValued, disabled: disabled, onToggle: () => set({ multiValued: !property.multiValued }) }), _jsx(RuleChip, { label: "Identifies the memory", hint: propertyHints.keyProperty, pressed: property.keyProperty && keyUnavailable === null, unavailable: keyUnavailable, disabled: disabled, onToggle: () => set({ keyProperty: !property.keyProperty }) }), _jsx(RuleChip, { label: "Computed by a rule", hint: propertyHints.computed, pressed: property.computed, disabled: disabled, onToggle: () => set({ computed: !property.computed }) })] }), ruleErrors.map((message) => (_jsx("p", { className: "typography-small text-error-foreground", children: message }, message)))] }), settings.options && (_jsx(AllowedValuesField, { id: fieldId("options"), hint: propertyHints.options, options: property.options, prefix: prefix, errors: errors, disabled: disabled, onChange: (options) => set({ options }) })), (settings.bounds || settings.maxLength || settings.pattern) && (_jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [settings.bounds && (_jsxs(_Fragment, { children: [_jsx(BoundOrDefaultField, { id: fieldId("min"), label: "Minimum", hint: propertyHints.minValue, valueType: property.valueType, placeholder: "No minimum", value: property.minValue, disabled: disabled, error: errors.get(`${prefix}.minValue`), onChange: (minValue) => set({ minValue }) }), _jsx(BoundOrDefaultField, { id: fieldId("max"), label: "Maximum", hint: propertyHints.maxValue, valueType: property.valueType, placeholder: "No maximum", value: property.maxValue, disabled: disabled, error: errors.get(`${prefix}.maxValue`), onChange: (maxValue) => set({ maxValue }) })] })), settings.maxLength && (_jsx(Input, { id: fieldId("max-length"), label: "Maximum length", description: propertyHints.maxLength, descriptionInLabelTooltip: true, inputMode: "numeric", placeholder: "No limit", value: property.maxLength, disabled: disabled, error: errors.get(`${prefix}.maxLength`), onChange: (e) => set({ maxLength: e.target.value }) })), settings.pattern && (_jsx(Input, { id: fieldId("pattern"), label: "Pattern", description: propertyHints.pattern, descriptionInLabelTooltip: true, placeholder: "Any", value: property.pattern, disabled: disabled, error: errors.get(`${prefix}.pattern`), onChange: (e) => set({ pattern: e.target.value }) }))] })), !property.computed && defaultChoices !== null && (_jsx(ChoiceSelect, { id: fieldId("default"), label: "Default value", hint: propertyHints.defaultValue, value: isPresent(property.defaultValue.trim()) ? property.defaultValue.trim() : null, choices: defaultChoices, disabled: disabled, error: errors.get(`${prefix}.defaultValue`), onChange: (defaultValue) => set({ defaultValue: defaultValue ?? "" }) })), !property.computed && defaultChoices === null && (_jsx(BoundOrDefaultField, { id: fieldId("default"), label: "Default value", hint: propertyHints.defaultValue, valueType: property.valueType, placeholder: "None", value: property.defaultValue, disabled: disabled, error: errors.get(`${prefix}.defaultValue`), onChange: (defaultValue) => set({ defaultValue }) })), extraErrors.map((message) => (_jsx("p", { className: "typography-small text-error-foreground", children: message }, message)))] }));
|
|
140
|
+
}
|
|
141
|
+
function PropertyRow(props) {
|
|
142
|
+
const { property, index, count, hasErrors, disabled, onEdit, onRemove, onMove, drag } = props;
|
|
143
|
+
const rowRef = useRef(null);
|
|
144
|
+
const name = property.label || `Property ${index + 1}`;
|
|
145
|
+
return (_jsxs("div", { ref: rowRef, role: "group", "aria-label": name, className: cn("relative flex items-center gap-3 border-b border-muted-border px-3 py-2.5 transition-colors last:border-0", !disabled && "hover:bg-faint", hasErrors && "bg-error/40", drag.isDragging && "opacity-50", drag.isDropTarget && "ring-2 ring-inset ring-active-border/50"), onDragOver: (event) => {
|
|
146
|
+
if (!drag.active)
|
|
147
|
+
return;
|
|
148
|
+
event.preventDefault();
|
|
149
|
+
drag.onOver();
|
|
150
|
+
}, onDrop: (event) => {
|
|
151
|
+
if (!drag.active)
|
|
152
|
+
return;
|
|
153
|
+
event.preventDefault();
|
|
154
|
+
drag.onDrop();
|
|
155
|
+
}, children: [_jsx("span", { draggable: !disabled, title: "Drag to reorder", className: cn("relative z-10 text-muted-foreground", disabled ? "cursor-not-allowed" : "cursor-grab"), onDragStart: (event) => {
|
|
156
|
+
event.dataTransfer.effectAllowed = "move";
|
|
157
|
+
event.dataTransfer.setData("text/plain", property.id);
|
|
158
|
+
if (rowRef.current)
|
|
159
|
+
event.dataTransfer.setDragImage(rowRef.current, 16, 16);
|
|
160
|
+
drag.onStart();
|
|
161
|
+
}, onDragEnd: drag.onEnd, children: _jsx(GripVertical, { className: "size-4", "aria-hidden": true }) }), _jsxs("button", { type: "button", "aria-label": `Edit property ${name}`, className: cn("flex min-w-0 flex-1 flex-col items-start gap-0.5 text-left focus-visible:outline-none", "after:absolute after:inset-0 after:content-[''] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-active-border/50", !disabled && "cursor-pointer"), disabled: disabled, onClick: onEdit, children: [_jsx("span", { className: cn("max-w-full truncate typography-small-medium", property.label ? "text-default-foreground" : "text-muted-foreground"), children: name }), hasErrors ? (_jsx("span", { className: "typography-tiny text-error-foreground", children: "Needs attention" })) : (property.description && (_jsx("span", { className: "max-w-full truncate typography-tiny text-muted-foreground", children: property.description })))] }), _jsx("span", { className: "hidden shrink-0 typography-small text-muted-foreground sm:inline", children: valueTypeLabels[property.valueType] }), _jsx("div", { className: "hidden shrink-0 flex-wrap justify-end gap-1 md:flex", children: propertyTags(property).map((tag) => (_jsx("span", { className: "rounded-full bg-muted px-2 py-0.5 typography-tiny text-default-foreground", children: tag }, tag))) }), _jsxs(Dropdown, { children: [_jsx(ActionTooltip, { label: "More actions", children: _jsx(DropdownTrigger, { asChild: true, children: _jsx(Button, { type: "button", variant: "tertiary", size: "sm", iconOnly: true, icon: Ellipsis, "aria-label": `More actions for ${name}`, disabled: disabled, className: "relative z-10" }) }) }), _jsxs(DropdownContent, { align: "end", children: [_jsx(DropdownItem, { icon: _jsx(Pencil, { className: "size-4" }), onSelect: onEdit, children: "Edit" }), _jsx(DropdownItem, { icon: _jsx(ArrowUp, { className: "size-4" }), disabled: index === 0, onSelect: () => onMove(index - 1), children: "Move up" }), _jsx(DropdownItem, { icon: _jsx(ArrowDown, { className: "size-4" }), disabled: index === count - 1, onSelect: () => onMove(index + 1), children: "Move down" }), _jsx(DropdownItem, { icon: _jsx(Trash2, { className: "size-4" }), className: "text-error-foreground", onSelect: onRemove, children: "Remove" })] })] })] }));
|
|
162
|
+
}
|
|
163
|
+
function PropertySheet(props) {
|
|
164
|
+
const { draft, siblings, errors, disabled, onChange, onDone, onCancel } = props;
|
|
165
|
+
const isNew = draft?.index === null;
|
|
166
|
+
const [confirmingDiscard, setConfirmingDiscard] = useState(false);
|
|
167
|
+
const [triedDone, setTriedDone] = useState(false);
|
|
168
|
+
const prefix = propertyErrorPrefix(draft?.index ?? -1);
|
|
169
|
+
const draftErrors = draft ? propertyFormErrors(draft.property, prefix, siblings) : new Map();
|
|
170
|
+
const shownErrors = triedDone ? draftErrors : errors;
|
|
171
|
+
const isDirty = draft !== null && JSON.stringify(draft.property) !== JSON.stringify(draft.original);
|
|
172
|
+
function close(next) {
|
|
173
|
+
setConfirmingDiscard(false);
|
|
174
|
+
setTriedDone(false);
|
|
175
|
+
next();
|
|
176
|
+
}
|
|
177
|
+
function requestDone() {
|
|
178
|
+
if (draftErrors.size > 0)
|
|
179
|
+
setTriedDone(true);
|
|
180
|
+
else
|
|
181
|
+
close(onDone);
|
|
182
|
+
}
|
|
183
|
+
function requestCancel() {
|
|
184
|
+
if (isDirty && !disabled)
|
|
185
|
+
setConfirmingDiscard(true);
|
|
186
|
+
else
|
|
187
|
+
close(onCancel);
|
|
188
|
+
}
|
|
189
|
+
return (_jsx(Sheet, { open: draft !== null, onOpenChange: (open) => !open && requestCancel(), children: _jsxs(SheetContent, { side: "right", className: "w-full sm:w-[560px]", onEscapeKeyDown: (event) => {
|
|
190
|
+
if (escapeClearsTypedValue(event))
|
|
191
|
+
event.preventDefault();
|
|
192
|
+
}, onOpenAutoFocus: (event) => {
|
|
193
|
+
if (!draft)
|
|
194
|
+
return;
|
|
195
|
+
event.preventDefault();
|
|
196
|
+
document.getElementById(`schema-property-${draft.property.id}-label`)?.focus();
|
|
197
|
+
}, children: [_jsxs(SheetHeader, { children: [_jsx(SheetTitle, { text: isNew ? "Add property" : "Edit property" }), _jsx(SheetDescription, { children: isNew ? "Describe one field memories of this schema record." : "Changes apply when you save the schema." })] }), _jsxs(SheetBody, { className: "-mx-6 px-6", children: [triedDone && draftErrors.size > 0 && (_jsx(Banner, { label: "Fix the highlighted fields to keep this property.", className: "mb-4" })), draft && (_jsx(PropertyFields, { property: draft.property, prefix: prefix, errors: shownErrors, disabled: disabled, onChange: onChange }))] }), _jsx(SheetFooter, { children: confirmingDiscard ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "mr-auto typography-small text-muted-foreground", children: "Discard unsaved changes?" }), _jsx(Button, { type: "button", variant: "tertiary", onClick: () => setConfirmingDiscard(false), children: "Keep editing" }), _jsx(Button, { type: "button", variant: "destructive", onClick: () => close(onCancel), children: "Discard" })] })) : (_jsxs(_Fragment, { children: [_jsx(Button, { type: "button", variant: "tertiary", onClick: requestCancel, children: "Cancel" }), _jsx(Button, { type: "button", onClick: requestDone, disabled: disabled, children: isNew ? "Add property" : "Done" })] })) })] }) }));
|
|
198
|
+
}
|
|
199
|
+
export function SchemaEditorForm(props) {
|
|
200
|
+
const { form, errors, isNew, disabled, onChange } = props;
|
|
201
|
+
function set(patch) {
|
|
202
|
+
onChange({ ...form, ...patch });
|
|
203
|
+
}
|
|
204
|
+
function setProperties(properties) {
|
|
205
|
+
set({ properties });
|
|
206
|
+
}
|
|
207
|
+
const [draft, setDraft] = useState(null);
|
|
208
|
+
const [dragged, setDragged] = useState(null);
|
|
209
|
+
useEffect(() => {
|
|
210
|
+
loadPatternCheck().catch((error) => console.warn("The pattern check could not load", error));
|
|
211
|
+
}, []);
|
|
212
|
+
const [dragOver, setDragOver] = useState(null);
|
|
213
|
+
function endDrag() {
|
|
214
|
+
setDragged(null);
|
|
215
|
+
setDragOver(null);
|
|
216
|
+
}
|
|
217
|
+
function commitDraft() {
|
|
218
|
+
if (!draft)
|
|
219
|
+
return;
|
|
220
|
+
setProperties(draft.index === null
|
|
221
|
+
? [...form.properties, draft.property]
|
|
222
|
+
: form.properties.map((p, i) => (i === draft.index ? draft.property : p)));
|
|
223
|
+
setDraft(null);
|
|
224
|
+
}
|
|
225
|
+
return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsxs("section", { className: "flex flex-col gap-3 rounded-xl border border-muted-border bg-card p-5", children: [_jsx("h3", { className: "typography-small-medium text-default-foreground", children: "Schema" }), _jsx(Input, { id: "schema-label", label: "Name", placeholder: "e.g. Campaign brief", value: form.label, disabled: disabled, error: errors.get("label"), onChange: (e) => set({ label: e.target.value }) }), isNew && (_jsx(Input, { id: "schema-key", label: "Key", placeholder: "Generated from the name", helperText: "Names the schema in the knowledge graph. It cannot change once saved.", value: form.key, disabled: disabled, error: errors.get("key"), onChange: (e) => set({ key: e.target.value }) })), _jsx(Textarea, { id: "schema-description", label: "Description", placeholder: "What kind of memory this is", value: form.description, minRows: 2, maxRows: 6, disabled: disabled, error: errors.get("description"), onChange: (e) => set({ description: e.target.value }) })] }), _jsxs("section", { className: "flex flex-col gap-3 rounded-xl border border-muted-border bg-card p-5", children: [_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("h3", { className: "typography-small-medium text-default-foreground", children: "Defaults for new memories" }), _jsx("p", { className: "typography-small text-muted-foreground", children: "Applied to new memories of this schema that leave them unset; each memory can change them." })] }), _jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4", children: [_jsx(ChoiceSelect, { id: "schema-default-kind", label: "Kind", value: form.defaultMemoryKind, choices: kindChoices, disabled: disabled, error: errors.get("defaultMemoryKind"), onChange: (defaultMemoryKind) => set({ defaultMemoryKind }) }), _jsx(ChoiceSelect, { id: "schema-default-importance", label: "Importance", value: form.defaultImportance != null ? String(form.defaultImportance) : null, choices: importanceChoices, disabled: disabled, error: errors.get("defaultImportance"), onChange: (value) => set({ defaultImportance: value != null ? Number(value) : null }) }), _jsx(ChoiceSelect, { id: "schema-default-volatility", label: "Volatility", value: form.defaultVolatility, choices: volatilityChoices, disabled: disabled, error: errors.get("defaultVolatility"), onChange: (defaultVolatility) => set({ defaultVolatility }) }), _jsx(ChoiceSelect, { id: "schema-default-scope", label: "Scope", value: form.defaultScope, choices: scopeChoices, disabled: disabled, error: errors.get("defaultScope"), onChange: (defaultScope) => set({ defaultScope }) })] })] }), _jsxs("section", { className: "flex flex-col gap-3 rounded-xl border border-muted-border bg-card p-5", children: [_jsx(Switch, { id: "schema-extraction", label: "Chat extraction can record memories of this type", description: "When off, only people and the agent's explicit tool calls give a memory this schema.", checked: form.extractionEnabled, disabled: disabled, containerClassName: "w-full", onCheckedChange: (extractionEnabled) => set({ extractionEnabled }) }), form.extractionEnabled && (_jsx(Textarea, { id: "schema-extraction-guidance", label: "When to use it", placeholder: "e.g. When the user states a cost-per-acquisition target for a channel", value: form.extractionGuidance, minRows: 2, maxRows: 6, disabled: disabled, error: errors.get("extractionGuidance"), onChange: (e) => set({ extractionGuidance: e.target.value }) }))] }), _jsxs("section", { className: "flex flex-col gap-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("h3", { className: "typography-small-medium text-default-foreground", children: "Properties" }), _jsxs("span", { className: "typography-tiny text-muted-foreground", children: [form.properties.length, " of ", memorySchemaPropertyLimit] })] }), errors.get("properties") && (_jsx("p", { className: "typography-small text-error-foreground", children: errors.get("properties") })), isPresent(form.properties) && (_jsx("div", { className: "overflow-hidden rounded-xl border border-muted-border bg-card", children: form.properties.map((property, index) => (_jsx(PropertyRow, { property: property, index: index, count: form.properties.length, hasErrors: hasErrorsUnder(errors, propertyErrorPrefix(index)), disabled: disabled, onEdit: () => setDraft({ index, property, original: property }), onRemove: () => setProperties(form.properties.filter((_, i) => i !== index)), onMove: (to) => setProperties(moveItem(form.properties, index, to)), drag: {
|
|
226
|
+
active: dragged !== null,
|
|
227
|
+
isDragging: dragged === index,
|
|
228
|
+
isDropTarget: dragged !== null && dragOver === index && dragOver !== dragged,
|
|
229
|
+
onStart: () => setDragged(index),
|
|
230
|
+
onOver: () => setDragOver(index),
|
|
231
|
+
onDrop: () => {
|
|
232
|
+
if (dragged !== null && dragged !== index)
|
|
233
|
+
setProperties(moveItem(form.properties, dragged, index));
|
|
234
|
+
endDrag();
|
|
235
|
+
},
|
|
236
|
+
onEnd: endDrag,
|
|
237
|
+
} }, property.id))) })), _jsx(Button, { type: "button", variant: "secondary", icon: Plus, className: "w-fit", disabled: disabled || form.properties.length >= memorySchemaPropertyLimit, onClick: () => {
|
|
238
|
+
const property = emptyPropertyForm();
|
|
239
|
+
setDraft({ index: null, property, original: property });
|
|
240
|
+
}, children: "Add property" }), _jsx(PropertySheet, { draft: draft, siblings: form.properties, errors: errors, disabled: disabled, onChange: (property) => setDraft((current) => (current ? { ...current, property } : current)), onDone: commitDraft, onCancel: () => setDraft(null) })] })] }));
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=SchemaEditorForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaEditorForm.js","sourceRoot":"","sources":["../../../../src/routes/memories/schemas/SchemaEditorForm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,cAAc,EAA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Z,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAC7F,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,GAC9B,IACM,IACN,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { GQLMemorySchemaTemplatesQuery } from "@manta-eu/client";
|
|
2
|
+
export type MemorySchemaTemplate = GQLMemorySchemaTemplatesQuery["memorySchemaTemplates"]["templates"][number];
|
|
3
|
+
export type SchemaTemplatesDialogProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
templates: readonly MemorySchemaTemplate[];
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
errorMessage?: string | null;
|
|
8
|
+
addingIri: string | null;
|
|
9
|
+
onAdd: (templateIri: string) => void;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare function SchemaTemplatesDialog(props: SchemaTemplatesDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=SchemaTemplatesDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaTemplatesDialog.d.ts","sourceRoot":"","sources":["../../../../src/routes/memories/schemas/SchemaTemplatesDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAetE,MAAM,MAAM,oBAAoB,GAAG,6BAA6B,CAAC,uBAAuB,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/G,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC3C,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CAqDtE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { humanCount } from "@manta-eu/lib/humanize";
|
|
3
|
+
import { isPresent } from "@manta-eu/lib/present";
|
|
4
|
+
import { Banner } from "#components/banner/index";
|
|
5
|
+
import { Button } from "#components/button/index";
|
|
6
|
+
import { Loader } from "#components/loader/index";
|
|
7
|
+
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "#components/modal/index";
|
|
8
|
+
export function SchemaTemplatesDialog(props) {
|
|
9
|
+
const { open, templates, isLoading, errorMessage, addingIri, onAdd, onClose } = props;
|
|
10
|
+
const available = templates.filter((template) => !template.live);
|
|
11
|
+
return (_jsx(Dialog, { open: open, onOpenChange: (next) => !next && onClose(), children: _jsxs(DialogContent, { className: "flex flex-col overflow-hidden", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { text: "Restore a default schema" }), _jsx(DialogDescription, { children: "Manta ships these schemas. Restoring one gives this datastore its own copy to edit again." })] }), _jsxs("div", { className: "-mx-8 flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-8 py-1", children: [errorMessage && _jsx(Banner, { label: errorMessage, className: "shrink-0" }), isLoading ? (_jsx("div", { className: "flex justify-center py-6", children: _jsx(Loader, { className: "size-6" }) })) : isPresent(available) ? (available.map(({ schema }) => (_jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-muted-border p-3", children: [_jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsx("span", { className: "truncate typography-small-medium", children: schema.label }), _jsx("span", { className: "typography-tiny text-muted-foreground", children: schema.description ?? humanCount(schema.properties.length, "property") })] }), _jsx(Button, { size: "sm", variant: "secondary", disabled: addingIri !== null, "aria-label": `Restore ${schema.label}`, onClick: () => onAdd(schema.iri), children: addingIri === schema.iri ? "Restoring…" : "Restore" })] }, schema.iri)))) : (_jsx("p", { className: "py-4 typography-small text-muted-foreground", children: "Every default schema is already in this datastore." }))] }), _jsx(DialogFooter, { children: _jsx(Button, { variant: "tertiary", onClick: onClose, children: "Close" }) })] }) }));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=SchemaTemplatesDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaTemplatesDialog.js","sourceRoot":"","sources":["../../../../src/routes/memories/schemas/SchemaTemplatesDialog.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,yBAAyB,CAAC;AAcjC,MAAM,UAAU,qBAAqB,CAAC,KAAiC;IACrE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACtF,MAAM,SAAS,GA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KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,GAC7C,KAfD,MAAM,CAAC,GAAG,CAgBd,CACP,CAAC,CACH,CAAC,CAAC,CAAC,CACF,YAAG,SAAS,EAAC,6CAA6C,mEAEtD,CACL,IACG,EACN,KAAC,YAAY,cACX,KAAC,MAAM,IAAC,OAAO,EAAC,UAAU,EAAC,OAAO,EAAE,OAAO,sBAElC,GACI,IACD,GACT,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GQLMemorySchemaValueType } from "@manta-eu/client";
|
|
2
|
+
export type ValueTypeSelectProps = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
value: GQLMemorySchemaValueType;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
onChange: (valueType: GQLMemorySchemaValueType) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function ValueTypeSelect(props: ValueTypeSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=ValueTypeSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueTypeSelect.d.ts","sourceRoot":"","sources":["../../../../src/routes/memories/schemas/ValueTypeSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAM5D,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,wBAAwB,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,CAAC,SAAS,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACzD,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAoB1D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { GQLMemorySchemaValueType } from "@manta-eu/client";
|
|
3
|
+
import { valueTypeLabels } from "./schema-form.js";
|
|
4
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "#components/select/index";
|
|
5
|
+
const valueTypes = Object.values(GQLMemorySchemaValueType);
|
|
6
|
+
export function ValueTypeSelect(props) {
|
|
7
|
+
const { id, label, value, disabled, error, className, onChange } = props;
|
|
8
|
+
return (_jsxs(Select, { value: value, disabled: disabled, onValueChange: (next) => onChange(valueTypes.find((type) => type === next) ?? value), children: [_jsx(SelectTrigger, { label: label, id: id, hiddenLabel: true, error: error, className: className, children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: valueTypes.map((type) => (_jsx(SelectItem, { value: type, children: valueTypeLabels[type] }, type))) })] }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ValueTypeSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueTypeSelect.js","sourceRoot":"","sources":["../../../../src/routes/memories/schemas/ValueTypeSelect.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEzG,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAY3D,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACzE,OAAO,CACL,MAAC,MAAM,IACL,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,CAAC,aAEpF,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,QAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,YACjF,KAAC,WAAW,KAAG,GACD,EAChB,KAAC,aAAa,cACX,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACxB,KAAC,UAAU,IAAY,KAAK,EAAE,IAAI,YAC/B,eAAe,CAAC,IAAI,CAAC,IADP,IAAI,CAER,CACd,CAAC,GACY,IACT,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { GQLMemoryKind, GQLMemorySchemaValueType, GQLMemoryScope, GQLMemoryVolatility, type GQLMemorySchemaFieldsFragment, type GQLMemorySchemaDefinitionInput, type GQLMemorySchemaValidationError } from "@manta-eu/client";
|
|
2
|
+
export declare function loadPatternCheck(): Promise<void>;
|
|
3
|
+
export declare const memorySchemaPropertyLimit: 20;
|
|
4
|
+
export declare const memorySchemaOptionLimit: 50;
|
|
5
|
+
export type SchemaOptionForm = {
|
|
6
|
+
id: string;
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
export type SchemaPropertyForm = {
|
|
12
|
+
id: string;
|
|
13
|
+
path: string | null;
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
description: string;
|
|
17
|
+
valueType: GQLMemorySchemaValueType;
|
|
18
|
+
entityClass: string;
|
|
19
|
+
required: boolean;
|
|
20
|
+
multiValued: boolean;
|
|
21
|
+
keyProperty: boolean;
|
|
22
|
+
computed: boolean;
|
|
23
|
+
options: SchemaOptionForm[];
|
|
24
|
+
minValue: string;
|
|
25
|
+
maxValue: string;
|
|
26
|
+
maxLength: string;
|
|
27
|
+
pattern: string;
|
|
28
|
+
defaultValue: string;
|
|
29
|
+
unit: string;
|
|
30
|
+
};
|
|
31
|
+
export type SchemaForm = {
|
|
32
|
+
key: string;
|
|
33
|
+
label: string;
|
|
34
|
+
description: string;
|
|
35
|
+
defaultMemoryKind: GQLMemoryKind | null;
|
|
36
|
+
defaultVolatility: GQLMemoryVolatility | null;
|
|
37
|
+
defaultImportance: number | null;
|
|
38
|
+
defaultScope: GQLMemoryScope | null;
|
|
39
|
+
extractionEnabled: boolean;
|
|
40
|
+
extractionGuidance: string;
|
|
41
|
+
properties: SchemaPropertyForm[];
|
|
42
|
+
};
|
|
43
|
+
export declare const kindLabels: Record<GQLMemoryKind, string>;
|
|
44
|
+
export declare const volatilityLabels: Record<GQLMemoryVolatility, string>;
|
|
45
|
+
export declare const scopeLabels: Record<GQLMemoryScope, string>;
|
|
46
|
+
export declare const valueTypeLabels: Record<GQLMemorySchemaValueType, string>;
|
|
47
|
+
export declare function propertySettings(valueType: GQLMemorySchemaValueType): {
|
|
48
|
+
options: boolean;
|
|
49
|
+
bounds: boolean;
|
|
50
|
+
maxLength: boolean;
|
|
51
|
+
pattern: boolean;
|
|
52
|
+
unit: boolean;
|
|
53
|
+
entityClass: boolean;
|
|
54
|
+
keyProperty: boolean;
|
|
55
|
+
};
|
|
56
|
+
export declare function propertyTags(property: SchemaPropertyForm): string[];
|
|
57
|
+
export declare function withValueType(property: SchemaPropertyForm, valueType: GQLMemorySchemaValueType): SchemaPropertyForm;
|
|
58
|
+
export declare function newFormId(): string;
|
|
59
|
+
export declare function emptyPropertyForm(): SchemaPropertyForm;
|
|
60
|
+
export declare function emptySchemaForm(): SchemaForm;
|
|
61
|
+
export declare function schemaFormFromSchema(schema: GQLMemorySchemaFieldsFragment): SchemaForm;
|
|
62
|
+
export declare function schemaDefinitionInput(form: SchemaForm, options: {
|
|
63
|
+
isNew: boolean;
|
|
64
|
+
}): GQLMemorySchemaDefinitionInput;
|
|
65
|
+
export type SchemaFormErrors = ReadonlyMap<string, string>;
|
|
66
|
+
export declare function propertyFormErrors(property: SchemaPropertyForm, prefix: string, siblings?: readonly SchemaPropertyForm[]): Map<string, string>;
|
|
67
|
+
export declare function localSchemaFormErrors(form: SchemaForm): SchemaFormErrors;
|
|
68
|
+
export declare function schemaFormErrors(errors: readonly GQLMemorySchemaValidationError[]): SchemaFormErrors;
|
|
69
|
+
export declare function propertyErrorPrefix(index: number): string;
|
|
70
|
+
export declare function hasErrorsUnder(errors: SchemaFormErrors, prefix: string): boolean;
|
|
71
|
+
export declare function moveItem<T>(items: readonly T[], from: number, to: number): T[];
|
|
72
|
+
//# sourceMappingURL=schema-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-form.d.ts","sourceRoot":"","sources":["../../../../src/routes/memories/schemas/schema-form.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EAEnC,KAAK,8BAA8B,EACpC,MAAM,kBAAkB,CAAC;AAmB1B,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtD;AAED,eAAO,MAAM,yBAAyB,IAAgC,CAAC;AACvE,eAAO,MAAM,uBAAuB,IAA6B,CAAC;AAElE,MAAM,MAAM,gBAAgB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjG,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,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