diff --git a/examples/example_pro/src/SupabaseApp/useSupabaseDataSourceDelegate.tsx b/examples/example_pro/src/SupabaseApp/useSupabaseDataSourceDelegate.tsx index 2cdeb6f31..5e3404c2a 100644 --- a/examples/example_pro/src/SupabaseApp/useSupabaseDataSourceDelegate.tsx +++ b/examples/example_pro/src/SupabaseApp/useSupabaseDataSourceDelegate.tsx @@ -86,7 +86,7 @@ export function useSupabaseDelegate({ supabase }: SupabaseDataSourceProps): Supa if (error) { throw error; } - return createEntityFromDocument(data, databaseId); + return createEntityFromDocument(data, path, databaseId); }, [supabase]); // const listenEntity = useCallback(( @@ -124,12 +124,11 @@ export function useSupabaseDelegate({ supabase }: SupabaseDataSourceProps): Supa data, error } = await query; - console.log("new data", { props }, data); if (error) { throw error; } - return data.map((doc: any) => createEntityFromDocument(doc)); + return data.map((doc: any) => createEntityFromDocument(doc, path, props.collection?.databaseId)); }, [buildQuery]); // const listenCollection = useCallback(>( @@ -317,11 +316,7 @@ export function useSupabaseDelegate({ supabase }: SupabaseDataSourceProps): Supa generateEntityId, countEntities, isFilterCombinationValid, - initTextSearch: async ({ - path, - databaseId, - collection - }): Promise => { + initTextSearch: async (): Promise => { return true; } }; @@ -329,11 +324,12 @@ export function useSupabaseDelegate({ supabase }: SupabaseDataSourceProps): Supa const createEntityFromDocument = >( data: any, + path: string, databaseId?: string ): Entity => { return { id: data.id, - path: data.path, + path: path, values: data, databaseId }; diff --git a/packages/cli/templates/template/package.json b/packages/cli/templates/template/package.json index a5566301b..2b2d04284 100644 --- a/packages/cli/templates/template/package.json +++ b/packages/cli/templates/template/package.json @@ -4,9 +4,9 @@ "private": true, "type": "module", "dependencies": { - "@firecms/core": "^3.0.0-canary", - "@firecms/firebase": "^3.0.0-canary", - "@firecms/ui": "^3.0.0-canary", + "@firecms/core": "^3.0.0-beta", + "@firecms/firebase": "^3.0.0-beta", + "@firecms/ui": "^3.0.0-beta", "firebase": "^10.12.2", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/packages/cli/templates/template_cloud/package.json b/packages/cli/templates/template_cloud/package.json index b132e3b64..ed1104c51 100644 --- a/packages/cli/templates/template_cloud/package.json +++ b/packages/cli/templates/template_cloud/package.json @@ -12,7 +12,7 @@ "logout": "firecms logout" }, "dependencies": { - "@firecms/cloud": "^3.0.0-canary", + "@firecms/cloud": "^3.0.0-beta", "firebase": "^10.12.2", "react": "^18.3.1", "react-dom": "^18.3.1" diff --git a/packages/cli/templates/template_pro/package.json b/packages/cli/templates/template_pro/package.json index 0ad49fc71..9d701cb11 100644 --- a/packages/cli/templates/template_pro/package.json +++ b/packages/cli/templates/template_pro/package.json @@ -6,16 +6,16 @@ "dependencies": { "typeface-rubik": "^1.1.13", "@fontsource/jetbrains-mono": "^5.0.20", - "@firecms/collection_editor": "^3.0.0-canary", - "@firecms/collection_editor_firebase": "^3.0.0-canary", - "@firecms/core": "^3.0.0-canary", - "@firecms/data_enhancement": "^3.0.0-canary", - "@firecms/data_import": "^3.0.0-canary", - "@firecms/data_export": "^3.0.0-canary", - "@firecms/firebase": "^3.0.0-canary", - "@firecms/schema_inference": "^3.0.0-canary", - "@firecms/ui": "^3.0.0-canary", - "@firecms/user_management": "^3.0.0-canary", + "@firecms/collection_editor": "^3.0.0-beta", + "@firecms/collection_editor_firebase": "^3.0.0-beta", + "@firecms/core": "^3.0.0-beta", + "@firecms/data_enhancement": "^3.0.0-beta", + "@firecms/data_import": "^3.0.0-beta", + "@firecms/data_export": "^3.0.0-beta", + "@firecms/firebase": "^3.0.0-beta", + "@firecms/schema_inference": "^3.0.0-beta", + "@firecms/ui": "^3.0.0-beta", + "@firecms/user_management": "^3.0.0-beta", "firebase": "^10.12.2", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/packages/collection_editor_firebase/src/hooks/useFirestoreCollectionsConfigController.tsx b/packages/collection_editor_firebase/src/hooks/useFirestoreCollectionsConfigController.tsx index df4348cf2..55dea214f 100644 --- a/packages/collection_editor_firebase/src/hooks/useFirestoreCollectionsConfigController.tsx +++ b/packages/collection_editor_firebase/src/hooks/useFirestoreCollectionsConfigController.tsx @@ -216,7 +216,7 @@ export function useFirestoreCollectionsConfigController { - console.log("Autocomplete result", result); return result; }); diff --git a/packages/datatalk/src/api.ts b/packages/datatalk/src/api.ts index b642b5fcb..8e123b8d7 100644 --- a/packages/datatalk/src/api.ts +++ b/packages/datatalk/src/api.ts @@ -38,7 +38,7 @@ export async function streamDataTalkCommand(firebaseAccessToken: string, let result = ""; const processChunk = (chunk: ReadableStreamReadResult): void | Promise => { if (chunk.done) { - console.log("Stream completed", { result }); + console.debug("Stream completed", { result }); resolve(result); return; } @@ -62,11 +62,10 @@ export async function streamDataTalkCommand(firebaseAccessToken: string, try { const message = JSON.parse(part); if (message.type === "delta") { - console.log("Delta received:", message.data.delta); result += message.data.delta; onDelta(message.data.delta); } else if (message.type === "result") { - console.log("Result received:", message.data); + console.debug("Result received:", message.data); resolve(message.data.text); } } catch (error) { diff --git a/packages/datatalk/src/components/TableResults.tsx b/packages/datatalk/src/components/TableResults.tsx index 15e351c2c..1b3ee50f6 100644 --- a/packages/datatalk/src/components/TableResults.tsx +++ b/packages/datatalk/src/components/TableResults.tsx @@ -111,13 +111,9 @@ export function TableResults({ const firestore = getFirestore(); const firebaseValues = cmsToFirestoreModel(updatedValues, firestore); - console.log("Saving", firebaseValues, entity); - console.log("Firestore", firestore); const documentReference: DocumentReference = doc(firestore, entity.path); - console.log("Document reference", documentReference) return setDoc(documentReference, firebaseValues, { merge: true }) .then((res) => { - console.log("Document updated", res); onValueUpdated(); }) .catch((error) => { diff --git a/packages/editor/src/extensions/InlineAutocomplete.tsx b/packages/editor/src/extensions/InlineAutocomplete.tsx index 60c494a10..21b1e6ecb 100644 --- a/packages/editor/src/extensions/InlineAutocomplete.tsx +++ b/packages/editor/src/extensions/InlineAutocomplete.tsx @@ -140,7 +140,6 @@ export const AutocompleteExtension = Node.create< // Find the suggestion decoration const decoration = pluginState.find(cursorPos)?.[0]; - console.log(decoration); // @ts-ignore if (decoration && decoration.type?.spec?.suggestionText) { // @ts-ignore diff --git a/packages/firecms_cloud/src/FireCMSCloudApp.tsx b/packages/firecms_cloud/src/FireCMSCloudApp.tsx index 39207ca55..320def69f 100644 --- a/packages/firecms_cloud/src/FireCMSCloudApp.tsx +++ b/packages/firecms_cloud/src/FireCMSCloudApp.tsx @@ -120,14 +120,11 @@ export function FireCMSCloudApp({ fromUrl: backendApiHost + "/config" }); - console.log("backendFirebaseApp", backendFirebaseApp); const fireCMSBackend = useBuildFireCMSBackend({ backendApiHost, backendFirebaseApp }); - - console.log("fireCMSBackend", fireCMSBackend); let component; if (backendConfigLoading || !backendFirebaseApp) { @@ -800,7 +797,6 @@ function buildAdminRoutes(usersLimit: number | undefined, hideFromNavigation: true, view: { - console.log("DataTalk event", event, params); onAnalyticsEvent?.("datatalk:" + event, params); }} apiEndpoint={dataTalkEndpoint} diff --git a/packages/firecms_cloud/src/components/auth/FireCMSCloudLoginView.tsx b/packages/firecms_cloud/src/components/auth/FireCMSCloudLoginView.tsx index 842e8697f..c24e7976a 100644 --- a/packages/firecms_cloud/src/components/auth/FireCMSCloudLoginView.tsx +++ b/packages/firecms_cloud/src/components/auth/FireCMSCloudLoginView.tsx @@ -97,7 +97,6 @@ export function FireCMSCloudLoginView({ { - console.log("Google login"); fireCMSBackend.googleLogin(includeGoogleAdminScopes).then((user) => { if (subscribeToNewsletter && user?.email) { subscribeNewsletter(user.email); @@ -139,6 +138,5 @@ const subscribeNewsletter = (email: string) => { source: "saas" }) }).then((res) => { - console.log("newsletter response", res); }); } diff --git a/packages/firecms_core/src/components/EntityCollectionTable/fields/TableReferenceField.tsx b/packages/firecms_core/src/components/EntityCollectionTable/fields/TableReferenceField.tsx index bae13ac74..2d98c41a4 100644 --- a/packages/firecms_core/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +++ b/packages/firecms_core/src/components/EntityCollectionTable/fields/TableReferenceField.tsx @@ -67,7 +67,6 @@ export const TableReferenceFieldInternal = React.memo( }, [updateValue]); const onMultipleEntitiesSelected = useCallback((entities: Entity[]) => { - console.log("onMultipleEntitiesSelected", entities); updateValue(entities.map((e) => getReferenceFrom(e))); }, [updateValue]); diff --git a/packages/firecms_core/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx b/packages/firecms_core/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx index 0b43ce9b8..f864d3bb3 100644 --- a/packages/firecms_core/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +++ b/packages/firecms_core/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx @@ -179,7 +179,7 @@ function StorageUpload({ onDropRejected: (fileRejections, event) => { for (const fileRejection of fileRejections) { for (const error of fileRejection.errors) { - console.log("Error uploading file: ", error); + console.error("Error uploading file: ", error); if (error.code === "file-too-large") { snackbarContext.open({ type: "error", diff --git a/packages/firecms_core/src/components/EntityCollectionView/EntityCollectionView.tsx b/packages/firecms_core/src/components/EntityCollectionView/EntityCollectionView.tsx index 81b566960..52eca52c5 100644 --- a/packages/firecms_core/src/components/EntityCollectionView/EntityCollectionView.tsx +++ b/packages/firecms_core/src/components/EntityCollectionView/EntityCollectionView.tsx @@ -207,7 +207,6 @@ export const EntityCollectionView = React.memo( }, [tableController.setPopupCell]); const onEntityClick = useCallback((clickedEntity: Entity) => { - console.log("Entity clicked", clickedEntity) const collection = collectionRef.current; setHighlightedEntity(clickedEntity); analyticsController.onAnalyticsEvent?.("edit_entity_clicked", { diff --git a/packages/firecms_core/src/components/HomePage/DefaultHomePage.tsx b/packages/firecms_core/src/components/HomePage/DefaultHomePage.tsx index d3be223c4..f6579de46 100644 --- a/packages/firecms_core/src/components/HomePage/DefaultHomePage.tsx +++ b/packages/firecms_core/src/components/HomePage/DefaultHomePage.tsx @@ -82,7 +82,6 @@ export function DefaultHomePage({ setFilteredUrls(null); } else { const searchResult = fuse.current?.search(value); - console.log("Search result", searchResult); if (searchResult) { setFilteredUrls(searchResult.map((e) => e.item.url)); } diff --git a/packages/firecms_core/src/components/SearchIconsView.tsx b/packages/firecms_core/src/components/SearchIconsView.tsx index 258590767..15df7b762 100644 --- a/packages/firecms_core/src/components/SearchIconsView.tsx +++ b/packages/firecms_core/src/components/SearchIconsView.tsx @@ -46,7 +46,6 @@ export function SearchIconsView({ }, [query, updateSearchResults]); const icons = keys === null ? coolIconKeys : keys; - console.log("Icons", icons); return ( <> diff --git a/packages/firecms_core/src/components/SelectableTable/filters/StringNumberFilterField.tsx b/packages/firecms_core/src/components/SelectableTable/filters/StringNumberFilterField.tsx index afded0ac0..490231982 100644 --- a/packages/firecms_core/src/components/SelectableTable/filters/StringNumberFilterField.tsx +++ b/packages/firecms_core/src/components/SelectableTable/filters/StringNumberFilterField.tsx @@ -93,7 +93,6 @@ export function StringNumberFilterField({ const multiple = multipleSelectOperations.includes(operation); - console.log("internalValue", { internalValue }); return (
diff --git a/packages/firecms_core/src/core/DefaultDrawer.tsx b/packages/firecms_core/src/core/DefaultDrawer.tsx index 23ab5284d..9ea4cafbf 100644 --- a/packages/firecms_core/src/core/DefaultDrawer.tsx +++ b/packages/firecms_core/src/core/DefaultDrawer.tsx @@ -93,7 +93,7 @@ export function DefaultDrawer({ .map((view, index) => } + icon={} tooltipsOpen={tooltipsOpen} adminMenuOpen={adminMenuOpen} drawerOpen={drawerOpen} diff --git a/packages/firecms_core/src/core/EntityEditView.tsx b/packages/firecms_core/src/core/EntityEditView.tsx index 4557d23ae..73eacb38d 100644 --- a/packages/firecms_core/src/core/EntityEditView.tsx +++ b/packages/firecms_core/src/core/EntityEditView.tsx @@ -299,7 +299,6 @@ export function EntityEditViewInner>({ onUpdate({ entity: updatedEntity }); if (closeAfterSave) { - console.log("Closing side dialog") sideDialogContext.setBlocked(false); sideDialogContext.close(true); onClose?.(); diff --git a/packages/firecms_core/src/core/SideDialogs.tsx b/packages/firecms_core/src/core/SideDialogs.tsx index 748a870eb..6b1b356d8 100644 --- a/packages/firecms_core/src/core/SideDialogs.tsx +++ b/packages/firecms_core/src/core/SideDialogs.tsx @@ -94,7 +94,6 @@ function SideDialogView({ const handleDrawerCloseOk = () => { setBlocked(false); setDrawerCloseRequested(false); - console.log("handleDrawerCloseOk"); sideDialogsController.close(); panel?.onClose?.(); }; diff --git a/packages/firecms_core/src/form/field_bindings/StorageUploadFieldBinding.tsx b/packages/firecms_core/src/form/field_bindings/StorageUploadFieldBinding.tsx index a32147859..05c5e7958 100644 --- a/packages/firecms_core/src/form/field_bindings/StorageUploadFieldBinding.tsx +++ b/packages/firecms_core/src/form/field_bindings/StorageUploadFieldBinding.tsx @@ -182,7 +182,7 @@ function FileDropComponent({ onDropRejected: (fileRejections, event) => { for (const fileRejection of fileRejections) { for (const error of fileRejection.errors) { - console.log("Error uploading file: ", error); + console.error("Error uploading file: ", error); if (error.code === "file-too-large") { snackbarContext.open({ type: "error", diff --git a/packages/ui/src/components/MultiSelect.tsx b/packages/ui/src/components/MultiSelect.tsx index 473f6f853..aaf3764b2 100644 --- a/packages/ui/src/components/MultiSelect.tsx +++ b/packages/ui/src/components/MultiSelect.tsx @@ -94,7 +94,6 @@ export const MultiSelect = React.forwardRef< ) => { const [isPopoverOpen, setIsPopoverOpen] = React.useState(open ?? false); const [selectedValues, setSelectedValues] = React.useState(value ?? []); - console.log("selectedValues", selectedValues); const onPopoverOpenChange = (open: boolean) => { setIsPopoverOpen(open);