@vertesia/ui 0.64.0 → 0.66.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/lib/esm/core/components/EmptyCollection.js +2 -2
- package/lib/esm/core/components/EmptyCollection.js.map +1 -1
- package/lib/esm/core/components/InputList.js +2 -2
- package/lib/esm/core/components/InputList.js.map +1 -1
- package/lib/esm/core/components/SidePanel.js +1 -1
- package/lib/esm/core/components/SidePanel.js.map +1 -1
- package/lib/esm/core/components/Switch.js +2 -2
- package/lib/esm/core/components/Switch.js.map +1 -1
- package/lib/esm/core/components/shadcn/calendar.js +0 -1
- package/lib/esm/core/components/shadcn/calendar.js.map +1 -1
- package/lib/esm/core/components/shadcn/checkbox.js +0 -1
- package/lib/esm/core/components/shadcn/checkbox.js.map +1 -1
- package/lib/esm/core/components/shadcn/command.js +0 -1
- package/lib/esm/core/components/shadcn/command.js.map +1 -1
- package/lib/esm/core/components/shadcn/dialog.js +0 -1
- package/lib/esm/core/components/shadcn/dialog.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/comboBox.js +18 -0
- package/lib/esm/core/components/shadcn/filters/comboBox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +38 -17
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filters.js +11 -5
- package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/selectFilter.js +1 -1
- package/lib/esm/core/components/shadcn/filters/selectFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/stringListFilter.js +24 -0
- package/lib/esm/core/components/shadcn/filters/stringListFilter.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/textFilter.js +2 -1
- package/lib/esm/core/components/shadcn/filters/textFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/label.js +0 -1
- package/lib/esm/core/components/shadcn/label.js.map +1 -1
- package/lib/esm/core/components/shadcn/selectBox.js +1 -1
- package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/esm/env/index.js +4 -1
- package/lib/esm/env/index.js.map +1 -1
- package/lib/esm/features/agent/PayloadBuilder.js +56 -16
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +2 -6
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +2 -2
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/esm/features/facets/VEnvironmentFacet.js +24 -0
- package/lib/esm/features/facets/VEnvironmentFacet.js.map +1 -0
- package/lib/esm/features/facets/VFacetsNav.js +69 -26
- package/lib/esm/features/facets/VFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/VInteractionFacet.js +45 -0
- package/lib/esm/features/facets/VInteractionFacet.js.map +1 -0
- package/lib/esm/features/facets/VStringFacet.js +6 -5
- package/lib/esm/features/facets/VStringFacet.js.map +1 -1
- package/lib/esm/features/facets/VUserFacet.js +6 -6
- package/lib/esm/features/facets/VUserFacet.js.map +1 -1
- package/lib/esm/features/layout/GenericPageNavHeader.js +1 -1
- package/lib/esm/features/magic-pdf/PdfPageProvider.js +3 -3
- package/lib/esm/features/magic-pdf/PdfPageProvider.js.map +1 -1
- package/lib/esm/features/magic-pdf/TextPageView.js +1 -2
- package/lib/esm/features/magic-pdf/TextPageView.js.map +1 -1
- package/lib/esm/features/store/collections/CollectionsTable.js +9 -5
- package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -1
- package/lib/esm/features/store/collections/{CollectionsView.js → CreateCollection.js} +6 -14
- package/lib/esm/features/store/collections/CreateCollection.js.map +1 -0
- package/lib/esm/features/store/collections/EditCollectionView.js +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/SelectCollection.js +24 -0
- package/lib/esm/features/store/collections/SelectCollection.js.map +1 -0
- package/lib/esm/features/store/collections/index.js +2 -2
- package/lib/esm/features/store/collections/index.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +6 -3
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +14 -14
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/DocumentIcon.js +7 -10
- package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -1
- package/lib/esm/features/store/objects/components/DocumentInput.js +1 -2
- package/lib/esm/features/store/objects/components/DocumentInput.js.map +1 -1
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +4 -2
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +1 -2
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/SelectDocument.js +9 -3
- package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -1
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js +2 -2
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -1
- package/lib/esm/features/store/objects/layout/documentLayout.js +2 -2
- package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +4 -2
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/esm/features/store/objects/selection/SelectionActions.js +1 -1
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +7 -10
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +1 -1
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +2 -2
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +1 -1
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +1 -1
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js +2 -3
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -1
- package/lib/esm/features/store/types/ContentObjectTypesTable.js +1 -1
- package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +1 -1
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +2 -2
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -1
- package/lib/esm/features/store/types/ObjectSchemaEditor.js +2 -3
- package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -1
- package/lib/esm/features/store/types/TableLayoutEditor.js +1 -1
- package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -1
- package/lib/esm/features/store/types/index.js +0 -2
- package/lib/esm/features/store/types/index.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +1 -2
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/features/utils/rendition.js +22 -2
- package/lib/esm/features/utils/rendition.js.map +1 -1
- package/lib/esm/session/UserSession.js +2 -2
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/auth/composable.js +1 -1
- package/lib/esm/session/auth/composable.js.map +1 -1
- package/lib/esm/session/constants.js +3 -0
- package/lib/esm/session/constants.js.map +1 -0
- package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +2 -2
- package/lib/esm/widgets/codemirror/CodeMirrorEditor.js.map +1 -1
- package/lib/esm/widgets/properties/PropertiesView.js +4 -2
- package/lib/esm/widgets/properties/PropertiesView.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +1 -1
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/InputList.d.ts +2 -1
- package/lib/types/core/components/Switch.d.ts +2 -1
- package/lib/types/core/components/shadcn/filters/comboBox.d.ts +5 -0
- package/lib/types/core/components/shadcn/filters/stringListFilter.d.ts +10 -0
- package/lib/types/core/components/shadcn/filters/types.d.ts +3 -3
- package/lib/types/env/index.d.ts +1 -0
- package/lib/types/features/agent/PayloadBuilder.d.ts +12 -2
- package/lib/types/features/facets/VEnvironmentFacet.d.ts +11 -0
- package/lib/types/features/facets/VFacetsNav.d.ts +9 -1
- package/lib/types/features/facets/VInteractionFacet.d.ts +14 -0
- package/lib/types/features/facets/VStringFacet.d.ts +3 -2
- package/lib/types/features/facets/VUserFacet.d.ts +3 -2
- package/lib/types/features/store/collections/{CollectionsView.d.ts → CreateCollection.d.ts} +5 -3
- package/lib/types/features/store/collections/SelectCollection.d.ts +14 -0
- package/lib/types/features/store/collections/index.d.ts +2 -2
- package/lib/types/features/store/objects/components/ContentOverview.d.ts +2 -1
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts +2 -1
- package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts +2 -1
- package/lib/types/features/store/objects/layout/documentLayout.d.ts +1 -1
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +3 -2
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +2 -1
- package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts +2 -1
- package/lib/types/features/store/types/index.d.ts +0 -2
- package/lib/types/features/utils/rendition.d.ts +1 -1
- package/lib/types/session/UserSession.d.ts +2 -2
- package/lib/types/session/constants.d.ts +2 -0
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +6 -4
- package/src/core/components/EmptyCollection.tsx +26 -24
- package/src/core/components/InputList.tsx +3 -1
- package/src/core/components/SidePanel.tsx +2 -2
- package/src/core/components/Switch.tsx +4 -3
- package/src/core/components/shadcn/calendar.tsx +0 -2
- package/src/core/components/shadcn/checkbox.tsx +0 -2
- package/src/core/components/shadcn/command.tsx +0 -2
- package/src/core/components/shadcn/dialog.tsx +0 -2
- package/src/core/components/shadcn/filters/comboBox.tsx +73 -0
- package/src/core/components/shadcn/filters/filterBar.tsx +41 -17
- package/src/core/components/shadcn/filters/filters.tsx +30 -14
- package/src/core/components/shadcn/filters/selectFilter.tsx +3 -3
- package/src/core/components/shadcn/filters/stringListFilter.tsx +58 -0
- package/src/core/components/shadcn/filters/textFilter.tsx +2 -1
- package/src/core/components/shadcn/filters/types.ts +3 -3
- package/src/core/components/shadcn/label.tsx +0 -2
- package/src/core/components/shadcn/selectBox.tsx +1 -1
- package/src/env/index.ts +5 -1
- package/src/features/agent/PayloadBuilder.tsx +66 -16
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +0 -11
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +11 -12
- package/src/features/facets/VEnvironmentFacet.tsx +42 -0
- package/src/features/facets/VFacetsNav.tsx +87 -29
- package/src/features/facets/VInteractionFacet.tsx +73 -0
- package/src/features/facets/VStringFacet.tsx +7 -6
- package/src/features/facets/VUserFacet.tsx +7 -6
- package/src/features/layout/GenericPageNavHeader.tsx +1 -1
- package/src/features/magic-pdf/PdfPageProvider.tsx +3 -3
- package/src/features/magic-pdf/TextPageView.tsx +1 -2
- package/src/features/store/collections/CollectionsTable.tsx +49 -40
- package/src/features/store/collections/{CollectionsView.tsx → CreateCollection.tsx} +15 -42
- package/src/features/store/collections/EditCollectionView.tsx +1 -1
- package/src/features/store/collections/SelectCollection.tsx +46 -0
- package/src/features/store/collections/index.ts +2 -2
- package/src/features/store/objects/DocumentSearchResults.tsx +6 -3
- package/src/features/store/objects/components/ContentOverview.tsx +33 -95
- package/src/features/store/objects/components/DocumentIcon.tsx +27 -14
- package/src/features/store/objects/components/DocumentInput.tsx +1 -2
- package/src/features/store/objects/components/PropertiesEditorModal.tsx +7 -3
- package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +2 -2
- package/src/features/store/objects/components/SelectDocument.tsx +18 -3
- package/src/features/store/objects/components/SelectDocumentModal.tsx +6 -6
- package/src/features/store/objects/layout/documentLayout.tsx +2 -2
- package/src/features/store/objects/search/DocumentSearchContext.ts +6 -3
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +1 -1
- package/src/features/store/objects/selection/SelectionActions.tsx +0 -1
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +10 -21
- package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +1 -1
- package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +2 -2
- package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +1 -1
- package/src/features/store/objects/selection/actions/RemoveFromCollectionAction.tsx +1 -1
- package/src/features/store/types/ContentObjectTypesSearch.tsx +3 -4
- package/src/features/store/types/ContentObjectTypesTable.tsx +3 -1
- package/src/features/store/types/CreateOrUpdateTypeModal.tsx +2 -9
- package/src/features/store/types/ObjectSchemaEditor.tsx +4 -5
- package/src/features/store/types/TableLayoutEditor.tsx +4 -4
- package/src/features/store/types/index.ts +0 -2
- package/src/features/user/UserInfo.tsx +1 -2
- package/src/features/utils/rendition.ts +23 -1
- package/src/session/UserSession.ts +2 -2
- package/src/session/auth/composable.ts +1 -1
- package/src/session/constants.ts +2 -0
- package/src/widgets/codemirror/CodeMirrorEditor.tsx +2 -2
- package/src/widgets/properties/PropertiesView.tsx +10 -2
- package/src/widgets/schema-editor/editor/SchemaEditor.tsx +1 -1
- package/lib/esm/features/store/collections/CollectionView.js +0 -53
- package/lib/esm/features/store/collections/CollectionView.js.map +0 -1
- package/lib/esm/features/store/collections/CollectionsView.js.map +0 -1
- package/lib/esm/features/store/types/ContentObjectTypeView.js +0 -158
- package/lib/esm/features/store/types/ContentObjectTypeView.js.map +0 -1
- package/lib/esm/features/store/types/ContentObjectTypesView.js +0 -55
- package/lib/esm/features/store/types/ContentObjectTypesView.js.map +0 -1
- package/lib/types/features/store/collections/CollectionView.d.ts +0 -5
- package/lib/types/features/store/types/ContentObjectTypeView.d.ts +0 -5
- package/lib/types/features/store/types/ContentObjectTypesView.d.ts +0 -8
- package/src/features/store/collections/CollectionView.tsx +0 -94
- package/src/features/store/types/ContentObjectTypeView.tsx +0 -244
- package/src/features/store/types/ContentObjectTypesView.tsx +0 -71
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { JSONCode } from
|
|
2
|
-
import { Theme, XMLViewer } from '@vertesia/ui/widgets';
|
|
1
|
+
import { JSONCode, Theme, XMLViewer } from '@vertesia/ui/widgets';
|
|
3
2
|
import { useEffect, useLayoutEffect, useState } from "react";
|
|
4
3
|
import { usePdfPagesInfo } from "./PdfPageProvider";
|
|
5
4
|
import { ViewType } from "./types";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NavLink } from "@vertesia/ui/router";
|
|
2
2
|
import { useUserSession } from "@vertesia/ui/session";
|
|
3
3
|
import { FolderClosed, Search, Trash2 } from "lucide-react";
|
|
4
|
-
import { Button, ConfirmModal, ErrorBox, Table, TBody, TR, useToast, VTooltip } from "@vertesia/ui/core";
|
|
5
|
-
import { useFetch } from "@vertesia/ui/core";
|
|
4
|
+
import { Button, ConfirmModal, ErrorBox, Table, TBody, TR, useToast, VTooltip, useFetch, EmptyCollection } from "@vertesia/ui/core";
|
|
6
5
|
import dayjs from 'dayjs';
|
|
7
6
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
8
7
|
import { useState, useEffect } from "react";
|
|
8
|
+
import { CreateCollectionModal } from "./CreateCollection";
|
|
9
9
|
|
|
10
10
|
dayjs.extend(relativeTime);
|
|
11
11
|
|
|
@@ -16,9 +16,10 @@ export function CollectionsTable({ }: CollectionsTableProps) {
|
|
|
16
16
|
const toast = useToast();
|
|
17
17
|
const [collectionToDelete, setCollectionToDelete] = useState<string | undefined>();
|
|
18
18
|
const [isLoading, setIsLoading] = useState(true);
|
|
19
|
+
const [isOpen, setOpen] = useState(false);
|
|
19
20
|
|
|
20
21
|
const { data: collections, error, refetch } = useFetch(() => client.store.collections.list(), []);
|
|
21
|
-
|
|
22
|
+
|
|
22
23
|
// Update loading state when data is fetched
|
|
23
24
|
useEffect(() => {
|
|
24
25
|
if (collections || error) {
|
|
@@ -32,7 +33,7 @@ export function CollectionsTable({ }: CollectionsTableProps) {
|
|
|
32
33
|
|
|
33
34
|
const deleteCollection = async () => {
|
|
34
35
|
if (!collectionToDelete) return;
|
|
35
|
-
|
|
36
|
+
|
|
36
37
|
try {
|
|
37
38
|
await client.store.collections.delete(collectionToDelete);
|
|
38
39
|
toast({
|
|
@@ -56,42 +57,50 @@ export function CollectionsTable({ }: CollectionsTableProps) {
|
|
|
56
57
|
|
|
57
58
|
return (
|
|
58
59
|
<>
|
|
59
|
-
{collections &&
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
60
|
+
{collections &&
|
|
61
|
+
(collections.length > 0 ?
|
|
62
|
+
(<Table className="w-full">
|
|
63
|
+
<thead>
|
|
64
|
+
<tr>
|
|
65
|
+
<th>Name</th >
|
|
66
|
+
<th>Type</th>
|
|
67
|
+
<th>Created</th>
|
|
68
|
+
<th></th>
|
|
69
|
+
</tr >
|
|
70
|
+
</thead >
|
|
71
|
+
<TBody columns={4} isLoading={isLoading}>
|
|
72
|
+
{
|
|
73
|
+
collections.map((c) => {
|
|
74
|
+
return <TR key={c.id}>
|
|
75
|
+
<td>
|
|
76
|
+
<div className="flex items-center gap-2">
|
|
77
|
+
{collectionIcon(c.dynamic)}
|
|
78
|
+
<NavLink href={`/collections/${c.id}`}>{c.name}</NavLink>
|
|
79
|
+
</div>
|
|
80
|
+
</td>
|
|
81
|
+
<td>{c.type?.name || "-"}</td>
|
|
82
|
+
<td>{dayjs(c.created_at).fromNow()}</td>
|
|
83
|
+
<td className="text-right">
|
|
84
|
+
<Button
|
|
85
|
+
variant="destructive"
|
|
86
|
+
size="sm"
|
|
87
|
+
onClick={() => setCollectionToDelete(c.id)}
|
|
88
|
+
>
|
|
89
|
+
<Trash2 className="size-4" />
|
|
90
|
+
</Button>
|
|
91
|
+
</td>
|
|
92
|
+
</TR>
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
</TBody>
|
|
96
|
+
</Table >) :
|
|
97
|
+
<EmptyCollection title="No Collections" buttonLabel='New Collections' onClick={() => setOpen(true)}>
|
|
98
|
+
Get started by creating a new Collections.
|
|
99
|
+
</EmptyCollection>)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
<CreateCollectionModal isOpen={isOpen} onClose={() => setOpen(false)} />
|
|
103
|
+
|
|
95
104
|
<ConfirmModal
|
|
96
105
|
isOpen={!!collectionToDelete}
|
|
97
106
|
title="Delete Collection"
|
|
@@ -1,49 +1,9 @@
|
|
|
1
1
|
import { CreateCollectionPayload } from "@vertesia/common";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
Switch, useFlag, useToast, VModal,
|
|
5
|
-
VModalBody,
|
|
6
|
-
VModalFooter,
|
|
7
|
-
VModalTitle
|
|
8
|
-
} from "@vertesia/ui/core";
|
|
9
|
-
import { FullHeightLayout } from "@vertesia/ui/layout";
|
|
2
|
+
import { useToast, VModalBody, FormItem, Styles, VModalFooter, Input, Switch, Button, VModal, VModalTitle } from "@vertesia/ui/core";
|
|
3
|
+
import { SelectContentType } from "../types/SelectContentType";
|
|
10
4
|
import { useNavigate } from "@vertesia/ui/router";
|
|
11
5
|
import { useUserSession } from "@vertesia/ui/session";
|
|
12
6
|
import { useState } from "react";
|
|
13
|
-
import { GenericPageNavHeader } from "../../layout";
|
|
14
|
-
import { SelectContentType } from "../../store";
|
|
15
|
-
import { CollectionsTable } from "./CollectionsTable";
|
|
16
|
-
|
|
17
|
-
interface CollectionsViewProps { }
|
|
18
|
-
export function CollectionsView({ }: CollectionsViewProps) {
|
|
19
|
-
const actions = [<CreateCollectionButton key="create" />];
|
|
20
|
-
return (
|
|
21
|
-
<FullHeightLayout>
|
|
22
|
-
<GenericPageNavHeader
|
|
23
|
-
title="Collections"
|
|
24
|
-
breadcrumbs={[<span key="0">Collections</span>]}
|
|
25
|
-
description="Group objects together using a collection"
|
|
26
|
-
actions={actions}
|
|
27
|
-
/>
|
|
28
|
-
<FullHeightLayout.Body>
|
|
29
|
-
<CollectionsTable />
|
|
30
|
-
</FullHeightLayout.Body>
|
|
31
|
-
</FullHeightLayout>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function CreateCollectionButton() {
|
|
36
|
-
const { on, off, isOn } = useFlag();
|
|
37
|
-
return (
|
|
38
|
-
<div>
|
|
39
|
-
<VModal onClose={off} isOpen={isOn}>
|
|
40
|
-
<VModalTitle>Create a Collection</VModalTitle>
|
|
41
|
-
<CreateCollectionForm onClose={off} />
|
|
42
|
-
</VModal>
|
|
43
|
-
<Button onClick={on}>Create Collection</Button>
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
7
|
|
|
48
8
|
interface CreateCollectionFormProps {
|
|
49
9
|
onClose: () => void;
|
|
@@ -164,3 +124,16 @@ export function CreateCollectionForm({ onClose, redirect = true, onAddToCollecti
|
|
|
164
124
|
</form >
|
|
165
125
|
);
|
|
166
126
|
}
|
|
127
|
+
|
|
128
|
+
interface CreateCollectionModalProps {
|
|
129
|
+
isOpen: boolean;
|
|
130
|
+
onClose: () => void;
|
|
131
|
+
}
|
|
132
|
+
export function CreateCollectionModal({ isOpen, onClose }: CreateCollectionModalProps) {
|
|
133
|
+
return (
|
|
134
|
+
<VModal onClose={onClose} isOpen={isOpen}>
|
|
135
|
+
<VModalTitle>Create a Collection</VModalTitle>
|
|
136
|
+
<CreateCollectionForm onClose={onClose} />
|
|
137
|
+
</VModal>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
@@ -5,7 +5,7 @@ import { useUserSession } from "@vertesia/ui/session";
|
|
|
5
5
|
import { CodeMirrorEditor, EditorApi, GeneratedForm, ManagedObject } from "@vertesia/ui/widgets";
|
|
6
6
|
import { basicSetup } from "codemirror";
|
|
7
7
|
import { useMemo, useRef, useState } from "react";
|
|
8
|
-
import { SelectContentType, stringifyTableLayout } from "
|
|
8
|
+
import { SelectContentType, stringifyTableLayout } from "../types";
|
|
9
9
|
|
|
10
10
|
const extensions = [basicSetup, json()];
|
|
11
11
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ErrorBox, useFetch, VSelectBox } from "@vertesia/ui/core";
|
|
2
|
+
import { useUserSession } from "@vertesia/ui/session";
|
|
3
|
+
|
|
4
|
+
interface SelectCollectionProps {
|
|
5
|
+
value?: string; // Collection ID
|
|
6
|
+
onChange: (collectionId: string | undefined, collection?: any) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A component to select a collection from a list of collections.
|
|
13
|
+
* It fetches the collections from the store and displays them in a dropdown.
|
|
14
|
+
* @param props - The properties for the component.
|
|
15
|
+
* @returns A dropdown to select a collection.
|
|
16
|
+
*/
|
|
17
|
+
export function SelectCollection({ onChange, value, disabled = false, className }: SelectCollectionProps) {
|
|
18
|
+
const { client } = useUserSession();
|
|
19
|
+
const { data: collections, error } = useFetch(() => client.store.collections.list({ dynamic: false }), []);
|
|
20
|
+
|
|
21
|
+
if (error) {
|
|
22
|
+
return <ErrorBox title='Collection fetch failed'>{error.message}</ErrorBox>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Find the selected collection object from the ID
|
|
26
|
+
const selectedCollection = value ? collections?.find(col => col.id === value) : undefined;
|
|
27
|
+
|
|
28
|
+
const handleChange = (collection: any) => {
|
|
29
|
+
// Call onChange with both the ID and the full collection object
|
|
30
|
+
onChange(collection?.id, collection);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<VSelectBox
|
|
35
|
+
filterBy={"name"}
|
|
36
|
+
value={selectedCollection}
|
|
37
|
+
onChange={handleChange}
|
|
38
|
+
placeholder="Select a collection"
|
|
39
|
+
options={collections || []}
|
|
40
|
+
optionLabel={(col: any) => col.name}
|
|
41
|
+
by="id"
|
|
42
|
+
className={className}
|
|
43
|
+
disabled={disabled}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -4,11 +4,14 @@ import { ColumnLayout, ContentObject, ContentObjectItem, VectorSearchQuery } fro
|
|
|
4
4
|
import { Button, Divider, ErrorBox, SidePanel, Spinner, useDebounce, useIntersectionObserver, useToast } from '@vertesia/ui/core';
|
|
5
5
|
import { useNavigate } from "@vertesia/ui/router";
|
|
6
6
|
import { TypeRegistry, useUserSession } from '@vertesia/ui/session';
|
|
7
|
-
import { Download, RefreshCw,
|
|
7
|
+
import { Download, RefreshCw, Eye } from 'lucide-react';
|
|
8
8
|
import { VFacetsNav } from "../../facets";
|
|
9
9
|
import { VectorSearchWidget } from './components/VectorSearchWidget';
|
|
10
10
|
|
|
11
|
-
import { ContentDispositionButton
|
|
11
|
+
import { ContentDispositionButton } from './components/ContentDispositionButton';
|
|
12
|
+
import { DocumentTable } from './DocumentTable';
|
|
13
|
+
import { useDocumentSearch, useWatchDocumentSearchFacets, useWatchDocumentSearchResult } from './search/DocumentSearchContext';
|
|
14
|
+
import { useDocumentUploadHandler } from './upload/useUploadHandler';
|
|
12
15
|
import { ContentOverview } from './components/ContentOverview';
|
|
13
16
|
import { useDownloadDocument } from './components/useDownloadObject';
|
|
14
17
|
|
|
@@ -192,7 +195,7 @@ function OverviewDrawer({ object, onClose }: OverviewDrawerProps) {
|
|
|
192
195
|
<SidePanel title={object.properties?.title || object.name} isOpen={true} onClose={onClose}>
|
|
193
196
|
<div className="flex items-center gap-x-2">
|
|
194
197
|
<Button variant="ghost" size="sm" title="Open Object" onClick={() => navigate(`/objects/${object.id}`)}>
|
|
195
|
-
<
|
|
198
|
+
<Eye className="size-4" />
|
|
196
199
|
</Button>
|
|
197
200
|
{object.content?.source && (
|
|
198
201
|
<Button variant="ghost" size="sm" title="Download" onClick={onDownload}>
|
|
@@ -12,10 +12,12 @@ import { PropertiesEditorModal } from "./PropertiesEditorModal";
|
|
|
12
12
|
interface ContentOverviewProps {
|
|
13
13
|
object: ContentObject;
|
|
14
14
|
loadText?: boolean;
|
|
15
|
+
refetch?: () => Promise<unknown>;
|
|
15
16
|
}
|
|
16
17
|
export function ContentOverview({
|
|
17
18
|
object,
|
|
18
19
|
loadText,
|
|
20
|
+
refetch,
|
|
19
21
|
}: ContentOverviewProps) {
|
|
20
22
|
const { client, store } = useUserSession();
|
|
21
23
|
const [isLoadingText, setIsLoadingText] = useState(false);
|
|
@@ -144,7 +146,7 @@ export function ContentOverview({
|
|
|
144
146
|
};
|
|
145
147
|
|
|
146
148
|
const handleExportDocx = () => handleExportDocument("docx");
|
|
147
|
-
|
|
149
|
+
const handleExportPdf = () => handleExportDocument("pdf");
|
|
148
150
|
|
|
149
151
|
const content = object.content;
|
|
150
152
|
const isImage =
|
|
@@ -295,6 +297,15 @@ export function ContentOverview({
|
|
|
295
297
|
<Download className="h-4 w-4" />
|
|
296
298
|
DOCX
|
|
297
299
|
</Button>
|
|
300
|
+
<Button
|
|
301
|
+
variant="ghost"
|
|
302
|
+
size="sm"
|
|
303
|
+
onClick={handleExportPdf}
|
|
304
|
+
className="flex items-center gap-2"
|
|
305
|
+
>
|
|
306
|
+
<Download className="h-4 w-4" />
|
|
307
|
+
PDF
|
|
308
|
+
</Button>
|
|
298
309
|
</>
|
|
299
310
|
)}
|
|
300
311
|
</div>
|
|
@@ -303,64 +314,29 @@ export function ContentOverview({
|
|
|
303
314
|
{text ? (
|
|
304
315
|
<div className="border shadow-xs rounded-xs max-w-7xl">
|
|
305
316
|
{seemsMarkdown ? (
|
|
306
|
-
<div className="
|
|
317
|
+
<div className="vprose prose-sm p-1">
|
|
307
318
|
<Markdown
|
|
308
319
|
remarkPlugins={[remarkGfm]}
|
|
309
320
|
components={{
|
|
310
|
-
a: ({
|
|
311
|
-
node,
|
|
312
|
-
...props
|
|
313
|
-
}: {
|
|
314
|
-
node?: any;
|
|
315
|
-
href?: string;
|
|
316
|
-
children?: React.ReactNode;
|
|
317
|
-
}) => {
|
|
321
|
+
a: ({ node, ...props }: { node?: any; href?: string; children?: React.ReactNode }) => {
|
|
318
322
|
const href = props.href || "";
|
|
319
|
-
if (
|
|
320
|
-
href.startsWith(
|
|
321
|
-
"/store/objects/",
|
|
322
|
-
)
|
|
323
|
-
) {
|
|
323
|
+
if (href.startsWith("/store/objects/")) {
|
|
324
324
|
return (
|
|
325
325
|
<Link
|
|
326
326
|
href={href}
|
|
327
|
-
className="text-
|
|
327
|
+
className="text-info"
|
|
328
328
|
>
|
|
329
329
|
{props.children}
|
|
330
330
|
</Link>
|
|
331
331
|
);
|
|
332
332
|
}
|
|
333
|
-
return
|
|
334
|
-
<a
|
|
335
|
-
{...props}
|
|
336
|
-
target="_blank"
|
|
337
|
-
rel="noopener noreferrer"
|
|
338
|
-
/>
|
|
339
|
-
);
|
|
333
|
+
return <a {...props} target="_blank" rel="noopener noreferrer" />;
|
|
340
334
|
},
|
|
341
|
-
p: ({
|
|
342
|
-
|
|
343
|
-
...props
|
|
344
|
-
}: {
|
|
345
|
-
node?: any;
|
|
346
|
-
children?: React.ReactNode;
|
|
347
|
-
}) => (
|
|
348
|
-
<p
|
|
349
|
-
{...props}
|
|
350
|
-
className="my-0 text-gray-800 dark:text-gray-100"
|
|
351
|
-
/>
|
|
335
|
+
p: ({ node, ...props }: { node?: any; children?: React.ReactNode }) => (
|
|
336
|
+
<p {...props} className={`my-0`} />
|
|
352
337
|
),
|
|
353
|
-
pre: ({
|
|
354
|
-
|
|
355
|
-
...props
|
|
356
|
-
}: {
|
|
357
|
-
node?: any;
|
|
358
|
-
children?: React.ReactNode;
|
|
359
|
-
}) => (
|
|
360
|
-
<pre
|
|
361
|
-
{...props}
|
|
362
|
-
className="my-2 bg-gray-800 dark:bg-gray-900 p-2 rounded text-gray-100"
|
|
363
|
-
/>
|
|
338
|
+
pre: ({ node, ...props }: { node?: any; children?: React.ReactNode }) => (
|
|
339
|
+
<pre {...props} className={`my-2 p-2 rounded`} />
|
|
364
340
|
),
|
|
365
341
|
code: ({
|
|
366
342
|
node,
|
|
@@ -372,71 +348,32 @@ export function ContentOverview({
|
|
|
372
348
|
className?: string;
|
|
373
349
|
children?: React.ReactNode;
|
|
374
350
|
}) => {
|
|
375
|
-
const match =
|
|
376
|
-
/language-(\w+)/.exec(
|
|
377
|
-
className || "",
|
|
378
|
-
);
|
|
351
|
+
const match = /language-(\w+)/.exec(className || "");
|
|
379
352
|
const isInline = !match;
|
|
380
353
|
return (
|
|
381
354
|
<code
|
|
382
355
|
{...props}
|
|
383
356
|
className={
|
|
384
357
|
isInline
|
|
385
|
-
?
|
|
386
|
-
: "text-
|
|
358
|
+
? `px-1.5 py-0.5 rounded`
|
|
359
|
+
: "text-muted"
|
|
387
360
|
}
|
|
388
361
|
>
|
|
389
362
|
{children}
|
|
390
363
|
</code>
|
|
391
364
|
);
|
|
392
365
|
},
|
|
393
|
-
h1: ({
|
|
394
|
-
|
|
395
|
-
...props
|
|
396
|
-
}: {
|
|
397
|
-
node?: any;
|
|
398
|
-
children?: React.ReactNode;
|
|
399
|
-
}) => (
|
|
400
|
-
<h1
|
|
401
|
-
{...props}
|
|
402
|
-
className="text-gray-900 dark:text-gray-50 font-bold text-2xl my-2"
|
|
403
|
-
/>
|
|
366
|
+
h1: ({ node, ...props }: { node?: any; children?: React.ReactNode }) => (
|
|
367
|
+
<h1 {...props} className={`font-bold text-2xl my-2`} />
|
|
404
368
|
),
|
|
405
|
-
h2: ({
|
|
406
|
-
|
|
407
|
-
...props
|
|
408
|
-
}: {
|
|
409
|
-
node?: any;
|
|
410
|
-
children?: React.ReactNode;
|
|
411
|
-
}) => (
|
|
412
|
-
<h2
|
|
413
|
-
{...props}
|
|
414
|
-
className="text-gray-900 dark:text-gray-50 font-bold text-xl my-2"
|
|
415
|
-
/>
|
|
369
|
+
h2: ({ node, ...props }: { node?: any; children?: React.ReactNode }) => (
|
|
370
|
+
<h2 {...props} className={`font-bold text-xl my-2`} />
|
|
416
371
|
),
|
|
417
|
-
h3: ({
|
|
418
|
-
|
|
419
|
-
...props
|
|
420
|
-
}: {
|
|
421
|
-
node?: any;
|
|
422
|
-
children?: React.ReactNode;
|
|
423
|
-
}) => (
|
|
424
|
-
<h3
|
|
425
|
-
{...props}
|
|
426
|
-
className="text-gray-900 dark:text-gray-50 font-bold text-lg my-2"
|
|
427
|
-
/>
|
|
372
|
+
h3: ({ node, ...props }: { node?: any; children?: React.ReactNode }) => (
|
|
373
|
+
<h3 {...props} className={`font-bold text-lg my-2`} />
|
|
428
374
|
),
|
|
429
|
-
li: ({
|
|
430
|
-
|
|
431
|
-
...props
|
|
432
|
-
}: {
|
|
433
|
-
node?: any;
|
|
434
|
-
children?: React.ReactNode;
|
|
435
|
-
}) => (
|
|
436
|
-
<li
|
|
437
|
-
{...props}
|
|
438
|
-
className="text-gray-800 dark:text-gray-100"
|
|
439
|
-
/>
|
|
375
|
+
li: ({ node, ...props }: { node?: any; children?: React.ReactNode }) => (
|
|
376
|
+
<li {...props} />
|
|
440
377
|
),
|
|
441
378
|
}}
|
|
442
379
|
>
|
|
@@ -460,6 +397,7 @@ export function ContentOverview({
|
|
|
460
397
|
isOpen={isPropertiesModalOpen}
|
|
461
398
|
onClose={handleClosePropertiesModal}
|
|
462
399
|
object={object}
|
|
400
|
+
refetch={refetch}
|
|
463
401
|
/>
|
|
464
402
|
</div>
|
|
465
403
|
);
|
|
@@ -3,27 +3,25 @@ import { ChangeEvent, useEffect, useState } from 'react'
|
|
|
3
3
|
import { retrieveRendition } from '../../../utils'
|
|
4
4
|
|
|
5
5
|
import { ContentObjectItem } from '@vertesia/common'
|
|
6
|
-
import { Card, CardContent, Separator, VTooltip } from "@vertesia/ui/core"
|
|
7
|
-
import {
|
|
6
|
+
import { Button, Card, CardContent, Separator, VTooltip } from "@vertesia/ui/core"
|
|
7
|
+
import { NavLink } from "@vertesia/ui/router"
|
|
8
8
|
import { useUserSession } from "@vertesia/ui/session"
|
|
9
9
|
import { DocumentSelection } from '../DocumentSelectionProvider'
|
|
10
|
+
import { Eye } from 'lucide-react'
|
|
10
11
|
|
|
11
12
|
interface DocumentIconProps {
|
|
12
13
|
document: ContentObjectItem
|
|
13
14
|
onSelectionChange: ((object: ContentObjectItem, ev: ChangeEvent<HTMLInputElement>) => void);
|
|
14
15
|
selection: DocumentSelection;
|
|
15
|
-
|
|
16
|
+
onRowClick?: (object: ContentObjectItem) => void;
|
|
16
17
|
}
|
|
17
|
-
export function DocumentIcon({ selection, document, onSelectionChange }: Readonly<DocumentIconProps>) {
|
|
18
|
+
export function DocumentIcon({ selection, document, onSelectionChange, onRowClick }: Readonly<DocumentIconProps>) {
|
|
18
19
|
const { client } = useUserSession()
|
|
19
|
-
const navigate = useNavigate()
|
|
20
20
|
|
|
21
21
|
const [renditionUrl, setRenditionUrl] = useState<string | undefined>(undefined)
|
|
22
22
|
const [renditionAlt, setRenditionAlt] = useState<string | undefined>(undefined)
|
|
23
|
+
const [renditionStatus, setRenditionStatus] = useState<string | undefined>(undefined)
|
|
23
24
|
|
|
24
|
-
const handleNavigateToDocument = () => {
|
|
25
|
-
navigate(`/objects/${document.id}`)
|
|
26
|
-
}
|
|
27
25
|
|
|
28
26
|
const handleSelect = (ev: React.ChangeEvent<HTMLInputElement>) => {
|
|
29
27
|
ev.stopPropagation()
|
|
@@ -35,13 +33,11 @@ export function DocumentIcon({ selection, document, onSelectionChange }: Readonl
|
|
|
35
33
|
return
|
|
36
34
|
}
|
|
37
35
|
|
|
38
|
-
retrieveRendition(client, document, setRenditionUrl, setRenditionAlt)
|
|
36
|
+
retrieveRendition(client, document, setRenditionUrl, setRenditionAlt, setRenditionStatus)
|
|
39
37
|
}, [document])
|
|
40
38
|
|
|
41
|
-
console.log("renditionUrl", document)
|
|
42
|
-
|
|
43
39
|
return (
|
|
44
|
-
<Card className="relative flex flex-col border h-fit" onClick={
|
|
40
|
+
<Card className="relative flex flex-col border h-fit" onClick={() => (onRowClick && onRowClick(document))}>
|
|
45
41
|
{
|
|
46
42
|
selection && (
|
|
47
43
|
<div
|
|
@@ -56,11 +52,28 @@ export function DocumentIcon({ selection, document, onSelectionChange }: Readonl
|
|
|
56
52
|
)
|
|
57
53
|
}
|
|
58
54
|
|
|
55
|
+
<div
|
|
56
|
+
className="absolute top-1 right-1 z-10 flex flex-col items-center"
|
|
57
|
+
>
|
|
58
|
+
<NavLink
|
|
59
|
+
topLevelNav
|
|
60
|
+
href={`/store/objects/${document.id}`}
|
|
61
|
+
>
|
|
62
|
+
<Button
|
|
63
|
+
variant="ghost" size="sm" title="Open Object"
|
|
64
|
+
>
|
|
65
|
+
<Eye className={`size-4 ${renditionStatus === 'ready' ? 'text-muted' : 'text-white'}`} />
|
|
66
|
+
</Button>
|
|
67
|
+
</NavLink>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
59
70
|
{
|
|
60
|
-
renditionUrl ? (
|
|
71
|
+
(renditionUrl && renditionStatus == 'ready') ? (
|
|
61
72
|
<img src={renditionUrl} alt={renditionAlt} className="w-auto h-48 object-cover rounded-t-xl" />
|
|
62
73
|
) : (
|
|
63
|
-
<div className="h-48 bg-gray-700 rounded-t-xl"
|
|
74
|
+
<div className="h-48 bg-gray-700 rounded-t-xl flex items-center justify-center text-muted">
|
|
75
|
+
{renditionStatus}
|
|
76
|
+
</div>
|
|
64
77
|
)
|
|
65
78
|
}
|
|
66
79
|
<Separator className='bg-gray-200 h-[2px]' />
|
|
@@ -4,8 +4,7 @@ import { ChangeEvent, useEffect, useState } from 'react';
|
|
|
4
4
|
import { useUserSession } from '@vertesia/ui/session';
|
|
5
5
|
import { ContentObjectItem } from '@vertesia/common';
|
|
6
6
|
import { ChevronsUpDown, X } from 'lucide-react';
|
|
7
|
-
import { Button, Styles } from '@vertesia/ui/core';
|
|
8
|
-
import { useFlag } from '@vertesia/ui/core';
|
|
7
|
+
import { Button, Styles, useFlag } from '@vertesia/ui/core';
|
|
9
8
|
import { Node } from '@vertesia/ui/widgets';
|
|
10
9
|
|
|
11
10
|
import { SelectDocumentModal } from './SelectDocumentModal';
|
|
@@ -22,9 +22,10 @@ export interface PropertiesEditorModalProps {
|
|
|
22
22
|
isOpen: boolean;
|
|
23
23
|
onClose: () => void;
|
|
24
24
|
object: ContentObject;
|
|
25
|
+
refetch?: () => Promise<unknown>;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
export function PropertiesEditorModal({ isOpen, onClose, object }: PropertiesEditorModalProps) {
|
|
28
|
+
export function PropertiesEditorModal({ isOpen, onClose, object, refetch }: PropertiesEditorModalProps) {
|
|
28
29
|
const { client, store } = useUserSession();
|
|
29
30
|
const toast = useToast();
|
|
30
31
|
const navigate = useNavigate();
|
|
@@ -169,8 +170,11 @@ export function PropertiesEditorModal({ isOpen, onClose, object }: PropertiesEdi
|
|
|
169
170
|
description: 'The object properties have been updated successfully.',
|
|
170
171
|
duration: 2000
|
|
171
172
|
});
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
|
|
174
|
+
if (refetch) {
|
|
175
|
+
await refetch();
|
|
176
|
+
}
|
|
177
|
+
|
|
174
178
|
setShowConfirmation(false);
|
|
175
179
|
onClose();
|
|
176
180
|
}
|