@manta-eu/react 0.1.4 → 0.1.5
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 +4 -8
- package/dist/components/audience-phase-badge/index.d.ts +1 -1
- package/dist/components/audience-phase-badge/index.d.ts.map +1 -1
- package/dist/components/audience-phase-badge/index.js +3 -0
- package/dist/components/authenticated-chat/index.d.ts.map +1 -1
- package/dist/components/authenticated-chat/index.js +0 -5
- package/dist/components/chat-view/Chat.d.ts +6 -0
- package/dist/components/chat-view/Chat.d.ts.map +1 -1
- package/dist/components/chat-view/Chat.js +6 -6
- package/dist/components/chat-view/ChatHeaders.d.ts.map +1 -1
- package/dist/components/chat-view/ChatHeaders.js +3 -2
- package/dist/components/embedded-chat/EmbeddedDatastorePicker.d.ts +1 -0
- package/dist/components/embedded-chat/EmbeddedDatastorePicker.d.ts.map +1 -1
- package/dist/components/embedded-chat/EmbeddedDatastorePicker.js +9 -3
- package/dist/components/embedded-chat/index.d.ts.map +1 -1
- package/dist/components/embedded-chat/index.js +1 -8
- package/dist/components/layouts/Sidebar.d.ts.map +1 -1
- package/dist/components/layouts/Sidebar.js +11 -4
- package/dist/components/planning/ActioningView.d.ts.map +1 -1
- package/dist/components/planning/ActioningView.js +11 -6
- package/dist/components/planning/ExecutionSectionItem.d.ts +2 -3
- package/dist/components/planning/ExecutionSectionItem.d.ts.map +1 -1
- package/dist/components/planning/ExecutionSectionItem.js +3 -6
- package/dist/components/planning/ExecutionSections.d.ts +2 -3
- package/dist/components/planning/ExecutionSections.d.ts.map +1 -1
- package/dist/components/planning/ExecutionSections.js +2 -2
- package/dist/components/planning/ManualActionCard.d.ts +3 -4
- package/dist/components/planning/ManualActionCard.d.ts.map +1 -1
- package/dist/components/planning/ManualActionCard.js +24 -6
- package/dist/components/rdf-insights/CampaignChannelMix.js +1 -1
- package/dist/components/rdf-insights/CampaignGrid.d.ts.map +1 -1
- package/dist/components/rdf-insights/CampaignGrid.js +2 -2
- package/dist/components/rdf-insights/DailyPerformance.js +2 -2
- package/dist/components/rdf-insights/KpiDashboard.d.ts +2 -2
- package/dist/components/rdf-insights/KpiDashboard.d.ts.map +1 -1
- package/dist/components/rdf-insights/KpiDashboard.js +33 -53
- package/dist/components/rdf-insights/MetaDailyInsights.js +2 -2
- package/dist/components/rdf-insights/ProductCard.d.ts.map +1 -1
- package/dist/components/rdf-insights/ProductCard.js +1 -1
- package/dist/components/rdf-insights/ProductVariantsTable.js +1 -1
- package/dist/components/rdf-insights/useExtractedInsights.d.ts +1 -1
- package/dist/components/rdf-insights/useExtractedInsights.js +3 -3
- package/dist/datastore-picker/datastore-picker-rows.d.ts +1 -0
- package/dist/datastore-picker/datastore-picker-rows.d.ts.map +1 -1
- package/dist/datastore-picker/datastore-picker-rows.js +6 -2
- package/dist/graph/nodes/GoogleCampaignView.js +2 -2
- package/dist/hooks/use-action-plans-list.js +1 -1
- package/dist/hooks/use-manual-actions.d.ts +11 -1
- package/dist/hooks/use-manual-actions.d.ts.map +1 -1
- package/dist/hooks/use-manual-actions.js +47 -100
- package/dist/hooks/useAuth.d.ts +5 -1
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +4 -0
- package/dist/hooks/useValidateActionPlan.d.ts.map +1 -1
- package/dist/ldo-ui.d.ts +1 -1
- package/dist/ldo-ui.d.ts.map +1 -1
- package/dist/lib/manual-actions.js +1 -1
- package/dist/lib/rdf/index.d.ts +4 -2
- package/dist/lib/rdf/index.d.ts.map +1 -1
- package/dist/lib/rdf/index.js +48 -18
- package/dist/lib/rdf/insights.d.ts +6 -1
- package/dist/lib/rdf/insights.d.ts.map +1 -1
- package/dist/lib/rdf/insights.js +15 -3
- package/dist/lib/rdf/types.d.ts +21 -8
- package/dist/lib/rdf/types.d.ts.map +1 -1
- package/dist/providers/AuthContext.d.ts +1 -1
- package/dist/providers/AuthContext.d.ts.map +1 -1
- package/dist/providers/index.d.ts +4 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +2 -1
- package/dist/routes/datastores/components/DatastoreFormDialog.d.ts +4 -2
- package/dist/routes/datastores/components/DatastoreFormDialog.d.ts.map +1 -1
- package/dist/routes/datastores/components/DatastoreFormDialog.js +7 -4
- package/dist/routes/datastores/components/DatastoresToolbar.d.ts +3 -1
- package/dist/routes/datastores/components/DatastoresToolbar.d.ts.map +1 -1
- package/dist/routes/datastores/components/DatastoresToolbar.js +18 -5
- package/dist/routes/datastores/components/LinkUnlinkedDatastoreDialog.d.ts.map +1 -1
- package/dist/routes/datastores/components/LinkUnlinkedDatastoreDialog.js +6 -2
- package/dist/routes/datastores/components/ProvisionDatastoreDialog.d.ts +7 -0
- package/dist/routes/datastores/components/ProvisionDatastoreDialog.d.ts.map +1 -0
- package/dist/routes/datastores/components/ProvisionDatastoreDialog.js +10 -0
- package/dist/routes/datastores/flatten.d.ts +4 -0
- package/dist/routes/datastores/flatten.d.ts.map +1 -1
- package/dist/routes/datastores/flatten.js +11 -0
- package/dist/routes/datastores/hooks/useDatastoreColumns.d.ts +4 -1
- package/dist/routes/datastores/hooks/useDatastoreColumns.d.ts.map +1 -1
- package/dist/routes/datastores/hooks/useDatastoreColumns.js +6 -2
- package/dist/routes/datastores/hooks/useTenantOrganizationCheck.d.ts +3 -0
- package/dist/routes/datastores/hooks/useTenantOrganizationCheck.d.ts.map +1 -0
- package/dist/routes/datastores/hooks/useTenantOrganizationCheck.js +21 -0
- package/dist/routes/datastores/index.d.ts.map +1 -1
- package/dist/routes/datastores/index.js +44 -6
- package/dist/routes/datastores/link-provider.d.ts +11 -0
- package/dist/routes/datastores/link-provider.d.ts.map +1 -0
- package/dist/routes/datastores/link-provider.js +34 -0
- package/dist/routes/integrations/components/connect-forms/types.d.ts +1 -0
- package/dist/routes/integrations/components/connect-forms/types.d.ts.map +1 -1
- package/dist/routes/integrations/connection-view.d.ts.map +1 -1
- package/dist/routes/integrations/connection-view.js +19 -6
- package/dist/routes/integrations/types.d.ts +2 -0
- package/dist/routes/integrations/types.d.ts.map +1 -1
- package/dist/routes/memories/components/ChangeScopeDialog.d.ts +1 -1
- package/dist/routes/memories/components/ChangeScopeDialog.d.ts.map +1 -1
- package/dist/routes/memories/components/ChangeScopeDialog.js +3 -3
- package/dist/routes/memories/components/EmptyStates.d.ts +1 -2
- package/dist/routes/memories/components/EmptyStates.d.ts.map +1 -1
- package/dist/routes/memories/components/EmptyStates.js +2 -2
- package/dist/routes/memories/components/MemoriesPanel.d.ts +1 -1
- package/dist/routes/memories/components/MemoriesPanel.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoriesPanel.js +9 -9
- package/dist/routes/memories/components/MemoryActions.d.ts +1 -1
- package/dist/routes/memories/components/MemoryActions.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoryActions.js +4 -4
- package/dist/routes/memories/components/MemoryFields.d.ts +1 -1
- package/dist/routes/memories/components/MemoryFields.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoryFields.js +2 -2
- package/dist/routes/memories/components/MemoryFormDialog.d.ts +1 -1
- package/dist/routes/memories/components/MemoryFormDialog.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoryFormDialog.js +2 -2
- package/dist/routes/memories/components/TeamPicker.d.ts +1 -1
- package/dist/routes/memories/components/TeamPicker.d.ts.map +1 -1
- package/dist/routes/memories/components/TeamPicker.js +2 -2
- package/dist/routes/memories/hooks/useMemoryColumns.d.ts +1 -1
- package/dist/routes/memories/hooks/useMemoryColumns.d.ts.map +1 -1
- package/dist/routes/memories/hooks/useMemoryColumns.js +3 -3
- package/dist/routes/memories/index.d.ts.map +1 -1
- package/dist/routes/memories/index.js +21 -21
- package/package.json +7 -6
|
@@ -77,7 +77,7 @@ const tabLabels = {
|
|
|
77
77
|
"live-context": "Live Context",
|
|
78
78
|
};
|
|
79
79
|
export function MemoriesRoute() {
|
|
80
|
-
const { datastore, datastores, user, logout, isOperator, canSwitchDatastore } = useAuthContext();
|
|
80
|
+
const { datastore, datastores, user, logout, isOperator, canManageSharedMemories, canSwitchDatastore } = useAuthContext();
|
|
81
81
|
const { mantaClient } = useMantaClient();
|
|
82
82
|
const queryClient = useQueryClient();
|
|
83
83
|
const [showArchived, setShowArchived] = useState(false);
|
|
@@ -104,15 +104,15 @@ export function MemoriesRoute() {
|
|
|
104
104
|
const deleteMutation = useDeleteMemoryMutation(mantaClient);
|
|
105
105
|
const restoreMutation = useRestoreMemoryMutation(mantaClient);
|
|
106
106
|
const reconfirmMutation = useReconfirmMemoryMutation(mantaClient);
|
|
107
|
-
const { data: teamsData } = useAvailableTeamsQuery(mantaClient, undefined, { enabled: !!
|
|
107
|
+
const { data: teamsData } = useAvailableTeamsQuery(mantaClient, undefined, { enabled: !!canManageSharedMemories });
|
|
108
108
|
const hasTeams = isPresent(teamsData?.availableTeams.teams);
|
|
109
109
|
const availableTabs = useMemo(() => [
|
|
110
|
-
...(
|
|
111
|
-
...(
|
|
110
|
+
...(canManageSharedMemories ? ["company"] : []),
|
|
111
|
+
...(canManageSharedMemories && hasTeams ? ["team"] : []),
|
|
112
112
|
"personal",
|
|
113
|
-
...(
|
|
113
|
+
...(canManageSharedMemories ? ["schemas"] : []),
|
|
114
114
|
"live-context",
|
|
115
|
-
], [
|
|
115
|
+
], [canManageSharedMemories, hasTeams]);
|
|
116
116
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
117
117
|
const tabParam = searchParams.get("tab");
|
|
118
118
|
const activeTab = useMemo(() => {
|
|
@@ -203,7 +203,7 @@ export function MemoriesRoute() {
|
|
|
203
203
|
const handleCreate = useCallback(async (form, supersedesMemoryIris) => {
|
|
204
204
|
if (!addDialog)
|
|
205
205
|
return;
|
|
206
|
-
if (!
|
|
206
|
+
if (!canManageSharedMemories && addDialog.scope !== GQLMemoryScope.User)
|
|
207
207
|
return;
|
|
208
208
|
try {
|
|
209
209
|
const result = await createMutation.mutateAsync({
|
|
@@ -219,11 +219,11 @@ export function MemoriesRoute() {
|
|
|
219
219
|
catch (e) {
|
|
220
220
|
reportMutationError(e, "Failed to add memory");
|
|
221
221
|
}
|
|
222
|
-
}, [addDialog, createMutation, invalidate,
|
|
222
|
+
}, [addDialog, createMutation, invalidate, canManageSharedMemories]);
|
|
223
223
|
const handleUpdate = useCallback(async (form, supersedesMemoryIris) => {
|
|
224
224
|
if (!editingMemory)
|
|
225
225
|
return;
|
|
226
|
-
if (!
|
|
226
|
+
if (!canManageSharedMemories && editingMemory.scope !== GQLMemoryScope.User)
|
|
227
227
|
return;
|
|
228
228
|
try {
|
|
229
229
|
const result = await updateMutation.mutateAsync({
|
|
@@ -239,10 +239,10 @@ export function MemoriesRoute() {
|
|
|
239
239
|
catch (e) {
|
|
240
240
|
reportMutationError(e, "Failed to update memory");
|
|
241
241
|
}
|
|
242
|
-
}, [editingMemory, updateMutation, invalidate,
|
|
242
|
+
}, [editingMemory, updateMutation, invalidate, canManageSharedMemories]);
|
|
243
243
|
const handleDelete = useCallback(async (iri) => {
|
|
244
244
|
const target = allMemories.find((m) => m.iri === iri);
|
|
245
|
-
if (!
|
|
245
|
+
if (!canManageSharedMemories && target && target.scope !== GQLMemoryScope.User)
|
|
246
246
|
return;
|
|
247
247
|
try {
|
|
248
248
|
await deleteMutation.mutateAsync({ memoryIri: iri });
|
|
@@ -252,7 +252,7 @@ export function MemoriesRoute() {
|
|
|
252
252
|
catch (e) {
|
|
253
253
|
reportMutationError(e, "Failed to delete memory");
|
|
254
254
|
}
|
|
255
|
-
}, [deleteMutation, invalidate,
|
|
255
|
+
}, [deleteMutation, invalidate, canManageSharedMemories, allMemories]);
|
|
256
256
|
const handleRestore = useCallback(async (iri) => {
|
|
257
257
|
try {
|
|
258
258
|
const result = await restoreMutation.mutateAsync({ memoryIri: iri });
|
|
@@ -308,7 +308,7 @@ export function MemoriesRoute() {
|
|
|
308
308
|
const handleMove = useCallback(async (newScope, newTeams, supersedesMemoryIris) => {
|
|
309
309
|
if (!movingMemory)
|
|
310
310
|
return;
|
|
311
|
-
if (!
|
|
311
|
+
if (!canManageSharedMemories)
|
|
312
312
|
return;
|
|
313
313
|
try {
|
|
314
314
|
const result = await updateMutation.mutateAsync({
|
|
@@ -335,17 +335,17 @@ export function MemoriesRoute() {
|
|
|
335
335
|
catch (e) {
|
|
336
336
|
reportMutationError(e, "Failed to move memory");
|
|
337
337
|
}
|
|
338
|
-
}, [movingMemory, updateMutation, invalidate,
|
|
338
|
+
}, [movingMemory, updateMutation, invalidate, canManageSharedMemories]);
|
|
339
339
|
const { duplicates } = useDuplicateDetection(unreviewedPersonalMemories, {
|
|
340
340
|
enabled: activeTab === "personal",
|
|
341
341
|
});
|
|
342
342
|
const columns = useMemoryColumns({
|
|
343
|
-
|
|
343
|
+
canManageSharedMemories,
|
|
344
344
|
userId: user.id,
|
|
345
345
|
schemas,
|
|
346
346
|
onEdit: setEditingMemory,
|
|
347
347
|
onDelete: handleDelete,
|
|
348
|
-
onMove:
|
|
348
|
+
onMove: canManageSharedMemories ? setMovingMemory : undefined,
|
|
349
349
|
onRestore: handleRestore,
|
|
350
350
|
onReconfirm: handleReconfirm,
|
|
351
351
|
duplicates,
|
|
@@ -371,7 +371,7 @@ export function MemoriesRoute() {
|
|
|
371
371
|
}));
|
|
372
372
|
const tabsList = _jsx(ScopeTabs, { tabs: scopeTabs, activeValue: activeTab, isLoading: isLoading });
|
|
373
373
|
const addMemoryButton = addMemoryButtonConfig(activeTab);
|
|
374
|
-
const canShowArchived = activeTab === "personal" || (
|
|
374
|
+
const canShowArchived = activeTab === "personal" || (canManageSharedMemories && (activeTab === "company" || activeTab === "team"));
|
|
375
375
|
const headerActions = [
|
|
376
376
|
{
|
|
377
377
|
key: "refresh",
|
|
@@ -458,14 +458,14 @@ export function MemoriesRoute() {
|
|
|
458
458
|
return (_jsxs(RouteLayout, { user: user, datastore: datastore, datastores: datastores, isOperator: isOperator, canSwitchDatastore: canSwitchDatastore, logout: logout, children: [_jsx(PageHeader, { title: "Memories", icon: Brain, actions: _jsx(PageHeaderActions, { actions: headerActions }) }), _jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "flex flex-col flex-1 min-h-0 overflow-hidden", children: [_jsx(ScopeMemoriesTab, { value: "personal", tableState: personalTableState, memories: displayedPersonalMemories, tabs: tabsList, isLoading: isLoading, errorMessage: errorMessage, schemas: schemas, onRowClick: handleRowClick, visibleStatusFilters: [
|
|
459
459
|
...alwaysVisibleStatusFilters,
|
|
460
460
|
"autoCaptured",
|
|
461
|
-
...(
|
|
462
|
-
], emptyState: _jsx(MemoriesEmptyState, {
|
|
461
|
+
...(canManageSharedMemories ? ["promotion"] : []),
|
|
462
|
+
], emptyState: _jsx(MemoriesEmptyState, { onAdd: () => setAddDialog({ scope: GQLMemoryScope.User }) }) }), canManageSharedMemories && (_jsx(ScopeMemoriesTab, { value: "company", tableState: companyTableState, memories: companyMemories, tabs: tabsList, isLoading: isLoading, errorMessage: errorMessage, schemas: schemas, onRowClick: handleRowClick, emptyState: showCompanyOnboarding ? (_jsx("div", { className: "flex items-center justify-center h-full min-h-64 p-5", children: _jsx(MemoryOnboardingWizard, { scope: GQLMemoryScope.Company, onComplete: () => setShowOrgOnboarding(false), onSkip: () => setShowOrgOnboarding(false) }) })) : (_jsx(CompanyMemoriesEmptyState, { onAdd: () => setAddDialog({ scope: GQLMemoryScope.Company }), onSetUp: () => setShowOrgOnboarding(true) })) })), canManageSharedMemories && hasTeams && (_jsx(ScopeMemoriesTab, { value: "team", tableState: teamTableState, memories: teamMemories, tabs: tabsList, isLoading: isLoading, errorMessage: errorMessage, schemas: schemas, onRowClick: handleRowClick, emptyState: _jsx(GroupMemoriesEmptyState, { canManageSharedMemories: true, onAdd: () => setAddDialog({ scope: GQLMemoryScope.Team }) }) })), canManageSharedMemories && (_jsx(FilterableTabContent, { value: "schemas", tabs: tabsList, placeholder: "Filter schemas\u2026", query: schemasQuery, onQueryChange: setSchemasQuery, children: _jsx(SchemasTab, { query: schemasQuery }) })), _jsx(FilterableTabContent, { value: "live-context", tabs: tabsList, placeholder: "Filter live context\u2026", query: liveContextQuery, onQueryChange: setLiveContextQuery, children: _jsx(LiveContextTab, { query: liveContextQuery }) })] }), formDialogState && (_jsx(MemoryFormDialog, { open: true, onOpenChange: (open) => {
|
|
463
463
|
if (!open)
|
|
464
464
|
formDialogState.onClose();
|
|
465
|
-
}, scope: formDialogState.scope, initial: formDialogState.initial, onSave: formDialogState.onSave, isSaving: formDialogState.isSaving,
|
|
465
|
+
}, scope: formDialogState.scope, initial: formDialogState.initial, onSave: formDialogState.onSave, isSaving: formDialogState.isSaving, canManageSharedMemories: canManageSharedMemories, schemas: schemas, currentUserId: user.id })), movingMemory && (_jsx(ChangeScopeDialog, { open: true, onOpenChange: (open) => {
|
|
466
466
|
if (!open)
|
|
467
467
|
setMovingMemory(null);
|
|
468
|
-
}, memory: movingMemory,
|
|
468
|
+
}, memory: movingMemory, canManageSharedMemories: canManageSharedMemories, onSave: handleMove, isSaving: updateMutation.isPending, currentUserId: user.id })), _jsx(RestoreBlockedDialog, { open: restoreBlocked != null, onOpenChange: (open) => {
|
|
469
469
|
if (!open)
|
|
470
470
|
setRestoreBlocked(null);
|
|
471
471
|
}, blockedByLabel: restoreBlocked?.blockedByLabel ?? null, onConfirm: handleConfirmRestoreBlocked }), _jsx(ConsolidationReviewDialog, { open: consolidating, clusters: reviewGroups, isLoading: isFindingRedundancy, isSaving: consolidateMutation.isPending, candidateCount: consolidationCandidates.length, comparedCount: reviewData?.memoryRedundancyReview.comparedCount ?? null, timedOut: reviewData?.memoryRedundancyReview.timedOut ?? false, errorMessage: reviewData?.memoryRedundancyReview.error ?? (reviewError instanceof Error ? reviewError.message : null), onMerge: handleConsolidate, onClose: () => setConsolidating(false) })] }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manta-eu/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "The Manta design system, knowledge-graph UI and agent components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -1085,11 +1085,12 @@
|
|
|
1085
1085
|
"usehooks-ts": "^3.1.1",
|
|
1086
1086
|
"zod": "^4.5.0",
|
|
1087
1087
|
"zustand": "^5.0.2",
|
|
1088
|
-
"@manta-eu/
|
|
1089
|
-
"@manta-eu/
|
|
1090
|
-
"@manta-eu/
|
|
1091
|
-
"@manta-eu/
|
|
1092
|
-
"@manta-eu/
|
|
1088
|
+
"@manta-eu/auth": "0.1.5",
|
|
1089
|
+
"@manta-eu/client": "0.1.5",
|
|
1090
|
+
"@manta-eu/datalog-parser": "0.1.5",
|
|
1091
|
+
"@manta-eu/ldo": "0.1.5",
|
|
1092
|
+
"@manta-eu/lib": "0.1.5",
|
|
1093
|
+
"@manta-eu/rdf-lib": "0.1.5"
|
|
1093
1094
|
},
|
|
1094
1095
|
"peerDependencies": {
|
|
1095
1096
|
"@ulb-darmstadt/shacl-form": "^2.1.1-rc1",
|