@rebasepro/client-firebase 0.0.1-canary.eae7889 → 0.1.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/dist/index.es.js +4 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/utils/collections_firestore.d.ts +1 -1
- package/package.json +7 -8
- package/src/components/FirebaseLoginView.tsx +2 -2
- package/src/components/RebaseFirebaseApp.tsx +1 -1
- package/src/hooks/useBuildUserManagement.tsx +1 -1
- package/src/utils/collections_firestore.ts +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocumentSnapshot } from "@firebase/firestore";
|
|
2
2
|
import { EntityCollection } from "@rebasepro/types";
|
|
3
|
-
export declare function buildCollectionId(idOrPath: string,
|
|
3
|
+
export declare function buildCollectionId(idOrPath: string, parentCollectionSlugs?: string[], parentEntityIds?: string[]): string;
|
|
4
4
|
export declare const docsToCollectionTree: (docs: DocumentSnapshot[]) => EntityCollection[];
|
|
5
5
|
export declare const docToCollection: (doc: DocumentSnapshot) => EntityCollection;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebasepro/client-firebase",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -11,14 +11,13 @@
|
|
|
11
11
|
"source": "src/index.ts",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@firebase/auth": "*",
|
|
14
|
-
"react-fast-compare": "3.2.2",
|
|
15
14
|
"react-router-dom": "^7.13.1",
|
|
16
|
-
"@rebasepro/
|
|
17
|
-
"@rebasepro/
|
|
18
|
-
"@rebasepro/core": "0.
|
|
19
|
-
"@rebasepro/
|
|
20
|
-
"@rebasepro/utils": "0.
|
|
21
|
-
"@rebasepro/ui": "0.
|
|
15
|
+
"@rebasepro/common": "0.1.0",
|
|
16
|
+
"@rebasepro/types": "0.1.0",
|
|
17
|
+
"@rebasepro/core": "0.1.0",
|
|
18
|
+
"@rebasepro/admin": "0.1.0",
|
|
19
|
+
"@rebasepro/utils": "0.1.0",
|
|
20
|
+
"@rebasepro/ui": "0.1.0"
|
|
22
21
|
},
|
|
23
22
|
"peerDependencies": {
|
|
24
23
|
"firebase": "^10.12.2 || ^11.0.0 || ^12.0.0",
|
|
@@ -282,7 +282,7 @@ export function FirebaseLoginView({
|
|
|
282
282
|
|
|
283
283
|
{(!passwordLoginSelected && !phoneLoginSelected) && <div className={"my-4 w-full"}>
|
|
284
284
|
|
|
285
|
-
{buildOauthLoginButtons(authController, resolvedSignInOptions, modeState.mode, disabled)}
|
|
285
|
+
{buildOauthLoginButtons(authController, resolvedSignInOptions, modeState.mode as "light" | "dark", disabled)}
|
|
286
286
|
|
|
287
287
|
{resolvedSignInOptions.includes("password") &&
|
|
288
288
|
<LoginButton
|
|
@@ -321,7 +321,7 @@ export function FirebaseLoginView({
|
|
|
321
321
|
{passwordLoginSelected && <LoginForm
|
|
322
322
|
authController={authController}
|
|
323
323
|
onClose={() => setPasswordLoginSelected(false)}
|
|
324
|
-
mode={modeState.mode}
|
|
324
|
+
mode={modeState.mode as "light" | "dark"}
|
|
325
325
|
noUserComponent={noUserComponent}
|
|
326
326
|
disableSignupScreen={disableSignupScreen}
|
|
327
327
|
disableResetPassword={disableResetPassword}
|
|
@@ -2,10 +2,10 @@ import { deleteField, DocumentSnapshot } from "@firebase/firestore";
|
|
|
2
2
|
import { EntityCollection, FirebaseCollection, Properties, Property } from "@rebasepro/types";
|
|
3
3
|
import { COLLECTION_PATH_SEPARATOR, sortProperties, stripCollectionPath } from "@rebasepro/common";
|
|
4
4
|
|
|
5
|
-
export function buildCollectionId(idOrPath: string,
|
|
6
|
-
if (!
|
|
5
|
+
export function buildCollectionId(idOrPath: string, parentCollectionSlugs?: string[], parentEntityIds?: string[]): string {
|
|
6
|
+
if (!parentCollectionSlugs)
|
|
7
7
|
return stripCollectionPath(idOrPath);
|
|
8
|
-
return [...
|
|
8
|
+
return [...parentCollectionSlugs.map(stripCollectionPath), stripCollectionPath(idOrPath)].join(COLLECTION_PATH_SEPARATOR);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
|