@vertesia/ui 1.0.0-dev.20260225.024852Z → 1.0.0-dev.20260227.112605Z
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/env/index.js +3 -0
- package/lib/esm/env/index.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +8 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/esm/features/facets/CollectionsFacetsNav.js +2 -2
- package/lib/esm/features/facets/CollectionsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/DocumentsFacetsNav.js +2 -2
- package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/utils/TypeFacet.js +2 -2
- package/lib/esm/features/facets/utils/TypeFacet.js.map +1 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js +3 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +2 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +3 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js +4 -3
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentType.js +8 -8
- package/lib/esm/features/store/types/SelectContentType.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentTypeModal.js +2 -2
- package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/esm/features/store/types/TypeRegistry.js.map +1 -0
- package/lib/esm/features/store/types/TypeRegistryProvider.js +53 -0
- package/lib/esm/features/store/types/TypeRegistryProvider.js.map +1 -0
- package/lib/esm/features/store/types/index.js +2 -0
- package/lib/esm/features/store/types/index.js.map +1 -1
- package/lib/esm/session/UserSession.js +1 -27
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/index.js +0 -1
- package/lib/esm/session/index.js.map +1 -1
- package/lib/esm/shell/SplashScreen.js +2 -2
- package/lib/esm/shell/SplashScreen.js.map +1 -1
- package/lib/esm/shell/VertesiaShell.js +2 -2
- package/lib/esm/shell/VertesiaShell.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/env/index.d.ts +2 -0
- package/lib/types/env/index.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
- package/lib/types/features/facets/CollectionsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/utils/TypeFacet.d.ts.map +1 -1
- package/lib/types/features/facets/utils/VTypeFacet.d.ts +1 -1
- package/lib/types/features/facets/utils/VTypeFacet.d.ts.map +1 -1
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -1
- package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -1
- package/lib/types/features/store/types/TypeRegistry.d.ts.map +1 -0
- package/lib/types/features/store/types/TypeRegistryProvider.d.ts +15 -0
- package/lib/types/features/store/types/TypeRegistryProvider.d.ts.map +1 -0
- package/lib/types/features/store/types/index.d.ts +2 -0
- package/lib/types/features/store/types/index.d.ts.map +1 -1
- package/lib/types/session/UserSession.d.ts +0 -4
- package/lib/types/session/UserSession.d.ts.map +1 -1
- package/lib/types/session/index.d.ts +0 -1
- package/lib/types/session/index.d.ts.map +1 -1
- package/lib/types/shell/VertesiaShell.d.ts.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-shell.js +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/package.json +15 -7
- package/src/env/index.ts +5 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +7 -1
- package/src/features/facets/CollectionsFacetsNav.tsx +2 -2
- package/src/features/facets/DocumentsFacetsNav.tsx +2 -2
- package/src/features/facets/utils/TypeFacet.tsx +2 -2
- package/src/features/facets/utils/VTypeFacet.tsx +1 -1
- package/src/features/store/collections/BrowseCollectionView.tsx +5 -2
- package/src/features/store/objects/DocumentSearchResults.tsx +4 -2
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +3 -1
- package/src/features/store/types/ContentObjectTypesSearch.tsx +4 -3
- package/src/features/store/types/SelectContentType.tsx +8 -8
- package/src/features/store/types/SelectContentTypeModal.tsx +2 -2
- package/src/features/store/types/TypeRegistryProvider.tsx +73 -0
- package/src/features/store/types/index.ts +2 -0
- package/src/session/UserSession.ts +1 -28
- package/src/session/index.ts +0 -1
- package/src/shell/SplashScreen.tsx +4 -2
- package/src/shell/VertesiaShell.tsx +10 -8
- package/lib/esm/session/TypeRegistry.js.map +0 -1
- package/lib/types/session/TypeRegistry.d.ts.map +0 -1
- /package/lib/esm/{session → features/store/types}/TypeRegistry.js +0 -0
- /package/lib/types/{session → features/store/types}/TypeRegistry.d.ts +0 -0
- /package/src/{session → features/store/types}/TypeRegistry.ts +0 -0
|
@@ -9,7 +9,9 @@ import {
|
|
|
9
9
|
SidePanel, Spinner, useIntersectionObserver, useToast
|
|
10
10
|
} from '@vertesia/ui/core';
|
|
11
11
|
import { useNavigate } from "@vertesia/ui/router";
|
|
12
|
-
import {
|
|
12
|
+
import { useUserSession } from '@vertesia/ui/session';
|
|
13
|
+
import { TypeRegistry } from '../types/TypeRegistry.js';
|
|
14
|
+
import { useTypeRegistry } from '../types/TypeRegistryProvider.js';
|
|
13
15
|
import { Download, ExternalLink, RefreshCw } from 'lucide-react';
|
|
14
16
|
import { useEffect, useRef, useState } from "react";
|
|
15
17
|
import { useDocumentFilterGroups, useDocumentFilterHandler } from "../../facets/DocumentsFacetsNav";
|
|
@@ -95,7 +97,7 @@ export function DocumentSearchResults({ layout, onUpload, allowFilter = true, al
|
|
|
95
97
|
const searchContext = useDocumentSearch();
|
|
96
98
|
const [isReady, setIsReady] = useState(false);
|
|
97
99
|
const [selectedObject, setSelectedObject] = useState<ContentObjectItem | null>(null);
|
|
98
|
-
const { typeRegistry } =
|
|
100
|
+
const { registry: typeRegistry } = useTypeRegistry();
|
|
99
101
|
const { search, isLoading, error, objects, hasMore } = useWatchDocumentSearchResult();
|
|
100
102
|
const [actualLayout, setActualLayout] = useState<ColumnLayout[]>(
|
|
101
103
|
typeRegistry ? layout || getTableLayout(typeRegistry, search.query.type) : defaultLayout,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Collection, ContentObjectTypeItem, DynamicCollection } from "@vertesia/common";
|
|
2
2
|
import { Button, MessageBox, Modal, ModalBody, ModalFooter, ModalTitle, SelectBox, Spinner, useToast, VTooltip } from "@vertesia/ui/core";
|
|
3
3
|
import { useUserSession } from "@vertesia/ui/session";
|
|
4
|
+
import { useTypeRegistry } from "../../types/TypeRegistryProvider.js";
|
|
4
5
|
import { DropZone, UploadSummary } from '@vertesia/ui/widgets';
|
|
5
6
|
import { AlertCircleIcon, CheckCircleIcon, FileIcon, FolderIcon, Info, UploadIcon, XCircleIcon } from "lucide-react";
|
|
6
7
|
import { ReactNode, useEffect, useMemo, useState } from "react";
|
|
@@ -69,7 +70,8 @@ export function DocumentUploadModal({
|
|
|
69
70
|
showTypeSelectionOnly = false,
|
|
70
71
|
allowFolders = true,
|
|
71
72
|
}: DocumentUploadModalProps) {
|
|
72
|
-
const { client
|
|
73
|
+
const { client } = useUserSession();
|
|
74
|
+
const { registry: typeRegistry } = useTypeRegistry();
|
|
73
75
|
const toast = useToast();
|
|
74
76
|
const [files, setFiles] = useState<File[]>([]);
|
|
75
77
|
const [processedFiles, setProcessedFiles] = useState<FileWithMetadata[]>([]);
|
|
@@ -5,6 +5,7 @@ import { useWatchSearchResult } from "./search/ObjectTypeSearchContext";
|
|
|
5
5
|
|
|
6
6
|
import { EmptyCollection, ErrorBox, Input, SelectBox, useDebounce, useIntersectionObserver, useToast } from "@vertesia/ui/core";
|
|
7
7
|
import { useUserSession } from "@vertesia/ui/session";
|
|
8
|
+
import { useTypeRegistry } from "./TypeRegistryProvider.js";
|
|
8
9
|
|
|
9
10
|
import { CreateOrUpdateTypeModal, CreateOrUpdateTypePayload } from "./CreateOrUpdateTypeModal";
|
|
10
11
|
|
|
@@ -14,8 +15,8 @@ interface ContentObjectTypesSearchProps {
|
|
|
14
15
|
isDirty?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export function ContentObjectTypesSearch({ isDirty = false }: ContentObjectTypesSearchProps) {
|
|
17
|
-
const
|
|
18
|
-
const {
|
|
18
|
+
const { store } = useUserSession();
|
|
19
|
+
const { reload: reloadTypes } = useTypeRegistry();
|
|
19
20
|
|
|
20
21
|
const toast = useToast();
|
|
21
22
|
|
|
@@ -80,7 +81,7 @@ export function ContentObjectTypesSearch({ isDirty = false }: ContentObjectTypes
|
|
|
80
81
|
title: "Type created",
|
|
81
82
|
duration: 2000
|
|
82
83
|
});
|
|
83
|
-
|
|
84
|
+
reloadTypes();
|
|
84
85
|
search.search().then(() => setIsReady(true));
|
|
85
86
|
}).catch(err => {
|
|
86
87
|
toast({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ContentObjectTypeItem } from "@vertesia/common";
|
|
2
2
|
import { SelectBox } from "@vertesia/ui/core";
|
|
3
|
-
import { useUserSession } from "@vertesia/ui/session";
|
|
4
3
|
import { useEffect, useState } from "react";
|
|
4
|
+
import { useTypeRegistry } from "./TypeRegistryProvider.js";
|
|
5
5
|
|
|
6
6
|
const optionLabel = (t: ContentObjectTypeItem | null) => {
|
|
7
7
|
if (t === null) return 'None';
|
|
@@ -22,7 +22,7 @@ interface SelectContentTypeProps {
|
|
|
22
22
|
multiple?: boolean;
|
|
23
23
|
}
|
|
24
24
|
export function SelectContentType({ className, defaultValue, onChange, isClearable, multiple}: SelectContentTypeProps) {
|
|
25
|
-
const
|
|
25
|
+
const { registry: typeRegistry } = useTypeRegistry();
|
|
26
26
|
const [isMounted, setIsMounted] = useState(false);
|
|
27
27
|
const [selectedType, setSelectedType] = useState<ContentObjectTypeItem | undefined>();
|
|
28
28
|
const [selectedTypes, setSelectedTypes] = useState<ContentObjectTypeItem[]>([])
|
|
@@ -30,18 +30,18 @@ export function SelectContentType({ className, defaultValue, onChange, isClearab
|
|
|
30
30
|
useEffect(() => {
|
|
31
31
|
if (!isMounted) {
|
|
32
32
|
setIsMounted(true);
|
|
33
|
-
if (
|
|
33
|
+
if (typeRegistry && defaultValue) {
|
|
34
34
|
if (multiple && Array.isArray(defaultValue)) {
|
|
35
|
-
const types =
|
|
35
|
+
const types = typeRegistry.types.filter(t => defaultValue.includes(t.id));
|
|
36
36
|
setSelectedTypes(types);
|
|
37
37
|
}
|
|
38
|
-
const type =
|
|
38
|
+
const type = typeRegistry.types.find(t => t.id === defaultValue);
|
|
39
39
|
if (type) {
|
|
40
40
|
setSelectedType(type);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
}, [
|
|
44
|
+
}, [typeRegistry, defaultValue, multiple])
|
|
45
45
|
|
|
46
46
|
const _onChange = (option: ContentObjectTypeItem | null) => {
|
|
47
47
|
setSelectedType(option || undefined);
|
|
@@ -57,7 +57,7 @@ export function SelectContentType({ className, defaultValue, onChange, isClearab
|
|
|
57
57
|
return (
|
|
58
58
|
<div className='flex flex-col gap-4 content-between'>
|
|
59
59
|
<SelectBox<ContentObjectTypeItem>
|
|
60
|
-
options={
|
|
60
|
+
options={typeRegistry?.types || []}
|
|
61
61
|
value={selectedTypes}
|
|
62
62
|
onChange={_onChangeMultiple}
|
|
63
63
|
placeholder="Choose Content Types..."
|
|
@@ -74,7 +74,7 @@ export function SelectContentType({ className, defaultValue, onChange, isClearab
|
|
|
74
74
|
return (
|
|
75
75
|
<div className='flex flex-col gap-4 content-between'>
|
|
76
76
|
<SelectBox<ContentObjectTypeItem>
|
|
77
|
-
options={
|
|
77
|
+
options={typeRegistry?.types || []}
|
|
78
78
|
value={selectedType}
|
|
79
79
|
onChange={_onChange}
|
|
80
80
|
placeholder="Choose a Content Type..."
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
VTooltip,
|
|
10
10
|
} from "@vertesia/ui/core";
|
|
11
11
|
import { ContentObjectTypeItem } from "@vertesia/common";
|
|
12
|
-
import {
|
|
12
|
+
import { useTypeRegistry } from "./TypeRegistryProvider.js";
|
|
13
13
|
import { CheckCircleIcon, Info } from "lucide-react";
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -49,7 +49,7 @@ export function SelectContentTypeModal({
|
|
|
49
49
|
initialSelectedType = null,
|
|
50
50
|
allowNone = true,
|
|
51
51
|
}: SelectContentTypeModalProps) {
|
|
52
|
-
const { typeRegistry } =
|
|
52
|
+
const { registry: typeRegistry } = useTypeRegistry();
|
|
53
53
|
const [selectedType, setSelectedType] = useState<ContentObjectTypeItem | null>(initialSelectedType);
|
|
54
54
|
|
|
55
55
|
// Get available types from the registry
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { createContext, ReactNode, useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { useUserSession } from '@vertesia/ui/session';
|
|
4
|
+
import { TypeRegistry } from './TypeRegistry.js';
|
|
5
|
+
|
|
6
|
+
interface TypeRegistryContextValue {
|
|
7
|
+
registry: TypeRegistry | undefined;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
load: () => Promise<void>;
|
|
10
|
+
reload: () => Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const TypeRegistryContext = createContext<TypeRegistryContextValue>({
|
|
14
|
+
registry: undefined,
|
|
15
|
+
isLoading: false,
|
|
16
|
+
load: () => Promise.resolve(),
|
|
17
|
+
reload: () => Promise.resolve(),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
interface TypeRegistryProviderProps {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function TypeRegistryProvider({ children }: TypeRegistryProviderProps) {
|
|
25
|
+
const { store, project } = useUserSession();
|
|
26
|
+
const [registry, setRegistry] = useState<TypeRegistry | undefined>();
|
|
27
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
28
|
+
const fetchRef = useRef(false);
|
|
29
|
+
|
|
30
|
+
const load = useCallback(async () => {
|
|
31
|
+
if (!project || fetchRef.current) return;
|
|
32
|
+
fetchRef.current = true;
|
|
33
|
+
setIsLoading(true);
|
|
34
|
+
try {
|
|
35
|
+
const types = await store.types.catalog.list({ layout: true });
|
|
36
|
+
setRegistry(new TypeRegistry(types));
|
|
37
|
+
} catch (err) {
|
|
38
|
+
console.error('Failed to fetch types', err);
|
|
39
|
+
} finally {
|
|
40
|
+
setIsLoading(false);
|
|
41
|
+
fetchRef.current = false;
|
|
42
|
+
}
|
|
43
|
+
}, [store, project]);
|
|
44
|
+
|
|
45
|
+
const reload = useCallback(async () => {
|
|
46
|
+
fetchRef.current = false;
|
|
47
|
+
return load();
|
|
48
|
+
}, [load]);
|
|
49
|
+
|
|
50
|
+
// Reset when project changes
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
setRegistry(undefined);
|
|
53
|
+
fetchRef.current = false;
|
|
54
|
+
}, [project]);
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<TypeRegistryContext.Provider value={{ registry, isLoading, load, reload }}>
|
|
58
|
+
{children}
|
|
59
|
+
</TypeRegistryContext.Provider>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function useTypeRegistry() {
|
|
64
|
+
const ctx = useContext(TypeRegistryContext);
|
|
65
|
+
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (!ctx.registry && !ctx.isLoading) {
|
|
68
|
+
ctx.load();
|
|
69
|
+
}
|
|
70
|
+
}, [ctx.registry, ctx.isLoading]);
|
|
71
|
+
|
|
72
|
+
return ctx;
|
|
73
|
+
}
|
|
@@ -7,7 +7,6 @@ import { Env } from '@vertesia/ui/env';
|
|
|
7
7
|
|
|
8
8
|
import { getComposableToken } from './auth/composable';
|
|
9
9
|
import { getFirebaseAuth } from './auth/firebase';
|
|
10
|
-
import { TypeRegistry } from './TypeRegistry';
|
|
11
10
|
|
|
12
11
|
import { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY } from './constants';
|
|
13
12
|
export { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY };
|
|
@@ -21,7 +20,6 @@ class UserSession {
|
|
|
21
20
|
client: VertesiaClient;
|
|
22
21
|
authError?: Error;
|
|
23
22
|
authToken?: AuthTokenPayload;
|
|
24
|
-
typeRegistry?: TypeRegistry;
|
|
25
23
|
setSession?: (session: UserSession) => void;
|
|
26
24
|
lastSelectedAccount?: string | null;
|
|
27
25
|
lastSelectedProject?: string | null;
|
|
@@ -102,11 +100,7 @@ class UserSession {
|
|
|
102
100
|
// notify the host app of the login
|
|
103
101
|
Env.onLogin?.(this.authToken);
|
|
104
102
|
|
|
105
|
-
|
|
106
|
-
await Promise.all([
|
|
107
|
-
this._loadTypes(),
|
|
108
|
-
this.fetchOnboardingStatus(),
|
|
109
|
-
]);
|
|
103
|
+
await this.fetchOnboardingStatus();
|
|
110
104
|
|
|
111
105
|
return Promise.resolve();
|
|
112
106
|
|
|
@@ -131,7 +125,6 @@ class UserSession {
|
|
|
131
125
|
this.authError = undefined;
|
|
132
126
|
this.isLoading = false;
|
|
133
127
|
this.authToken = undefined;
|
|
134
|
-
this.typeRegistry = undefined;
|
|
135
128
|
this.setSession = undefined;
|
|
136
129
|
this.client.withAuthCallback(undefined);
|
|
137
130
|
|
|
@@ -150,7 +143,6 @@ class UserSession {
|
|
|
150
143
|
this.authError = undefined;
|
|
151
144
|
this.isLoading = false;
|
|
152
145
|
this.authToken = undefined;
|
|
153
|
-
this.typeRegistry = undefined;
|
|
154
146
|
this.setSession = undefined;
|
|
155
147
|
this.client.withAuthCallback(undefined);
|
|
156
148
|
}
|
|
@@ -177,24 +169,6 @@ class UserSession {
|
|
|
177
169
|
window.location.replace('/?a=' + this.account?.id + '&p=' + targetProjectId);
|
|
178
170
|
}
|
|
179
171
|
|
|
180
|
-
async _loadTypes() {
|
|
181
|
-
if (this.project) {
|
|
182
|
-
return this.store.types.catalog.list({ layout: true }).then(types => this.typeRegistry = new TypeRegistry(types)).catch(err => {
|
|
183
|
-
//return this.store.types.list({}, { layout: true }).then(types => this.typeRegistry = new TypeRegistry(types)).catch(err => {
|
|
184
|
-
console.error('Failed to fetch object types', err);
|
|
185
|
-
throw err;
|
|
186
|
-
})
|
|
187
|
-
} else {
|
|
188
|
-
console.log('No project selected');
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
async reloadTypes() {
|
|
193
|
-
return this._loadTypes().then(() => {
|
|
194
|
-
this.setSession?.(this.clone());
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
|
|
198
172
|
async fetchAccounts() {
|
|
199
173
|
return this.client.accounts.list().then(accounts => {
|
|
200
174
|
if (!this.authToken) {
|
|
@@ -237,7 +211,6 @@ class UserSession {
|
|
|
237
211
|
session.setSession = this.setSession;
|
|
238
212
|
session.lastSelectedAccount = this.lastSelectedAccount;
|
|
239
213
|
session.switchAccount = this.switchAccount;
|
|
240
|
-
session.typeRegistry = this.typeRegistry;
|
|
241
214
|
session.onboardingComplete = this.onboardingComplete;
|
|
242
215
|
return session;
|
|
243
216
|
}
|
package/src/session/index.ts
CHANGED
|
@@ -2,7 +2,6 @@ export * from "./auth/composable";
|
|
|
2
2
|
export * from "./auth/useCurrentTenant";
|
|
3
3
|
export * from "./auth/useAuthState";
|
|
4
4
|
export * from "./auth/firebase";
|
|
5
|
-
export * from "./TypeRegistry";
|
|
6
5
|
export * from "./UserSession";
|
|
7
6
|
export * from "./UserSessionProvider";
|
|
8
7
|
export * from "./useUXTracking";
|
|
@@ -30,8 +30,8 @@ export function SplashScreen({ icon: Icon }: SplashScreenProps) {
|
|
|
30
30
|
leaveFrom="opacity-100"
|
|
31
31
|
leaveTo="opacity-0"
|
|
32
32
|
>
|
|
33
|
-
<div style={{ zIndex: 999999 }} className='fixed inset-x-0 inset-y-0'>
|
|
34
|
-
<div className="flex w-full h-full items-center justify-center">
|
|
33
|
+
<div style={{ zIndex: 999999, position: 'fixed', inset: 0 }} className='fixed inset-x-0 inset-y-0'>
|
|
34
|
+
<div style={{ display: 'flex', width: '100%', height: '100%', alignItems: 'center', justifyContent: 'center' }} className="flex w-full h-full items-center justify-center">
|
|
35
35
|
<div className="animate-[spin_4s_linear_infinite]">
|
|
36
36
|
<div className='animate-pulse rounded-full bg-transparent'>
|
|
37
37
|
{Icon || <LoadingIcon />}
|
|
@@ -50,6 +50,8 @@ function LoadingIcon() {
|
|
|
50
50
|
// const stopColor2 = "#4F46E5";
|
|
51
51
|
return (
|
|
52
52
|
<svg
|
|
53
|
+
width="32"
|
|
54
|
+
height="32"
|
|
53
55
|
className="w-8 h-8 text-indigo-600"
|
|
54
56
|
viewBox="0 0 50 50"
|
|
55
57
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ThemeProvider, ToastProvider } from "@vertesia/ui/core";
|
|
2
|
-
import { UserPermissionProvider } from "@vertesia/ui/features";
|
|
2
|
+
import { UserPermissionProvider, TypeRegistryProvider } from "@vertesia/ui/features";
|
|
3
3
|
import { UserSessionProvider } from "@vertesia/ui/session";
|
|
4
4
|
import { SplashScreen } from "./SplashScreen";
|
|
5
5
|
import { SigninScreen } from "./login/SigninScreen";
|
|
@@ -16,13 +16,15 @@ export function VertesiaShell({ children, lightLogo, darkLogo, loadingIcon }: Ve
|
|
|
16
16
|
return (
|
|
17
17
|
<ToastProvider>
|
|
18
18
|
<UserSessionProvider>
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
<TypeRegistryProvider>
|
|
20
|
+
<ThemeProvider defaultTheme="system" storageKey="vite-ui-theme">
|
|
21
|
+
<SplashScreen icon={loadingIcon} />
|
|
22
|
+
<SigninScreen allowedPrefix="/shared/" lightLogo={lightLogo} darkLogo={darkLogo} />
|
|
23
|
+
<UserPermissionProvider>
|
|
24
|
+
{children}
|
|
25
|
+
</UserPermissionProvider>
|
|
26
|
+
</ThemeProvider>
|
|
27
|
+
</TypeRegistryProvider>
|
|
26
28
|
</UserSessionProvider>
|
|
27
29
|
</ToastProvider>
|
|
28
30
|
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypeRegistry.js","sourceRoot":"","sources":["../../../src/session/TypeRegistry.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,YAAY;IAEF;IADnB,GAAG,GAA0C,EAAE,CAAC;IAChD,YAAmB,KAA8B;QAA9B,UAAK,GAAL,KAAK,CAAyB;QAC7C,YAAY;QACZ,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;QAClD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;QAC7B,CAAC;IACL,CAAC;IAED,OAAO,CAAC,EAAU;QACd,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;IAED,aAAa,CAAC,EAAU;QACpB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;IAChD,CAAC;IAED,WAAW,CAAC,EAAU;QAClB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACxC,CAAC;CAEJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypeRegistry.d.ts","sourceRoot":"","sources":["../../../src/session/TypeRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,YAAY;IAEF,KAAK,EAAE,qBAAqB,EAAE;IADjD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAM;gBAC7B,KAAK,EAAE,qBAAqB,EAAE;IAQjD,OAAO,CAAC,EAAE,EAAE,MAAM;IAIlB,aAAa,CAAC,EAAE,EAAE,MAAM;IAKxB,WAAW,CAAC,EAAE,EAAE,MAAM;CAKzB"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|