Deployed the page to Github Pages.

This commit is contained in:
Batuhan Berk Başoğlu 2024-11-03 21:30:09 -05:00
parent 1d79754e93
commit 2c89899458
Signed by: batuhan-basoglu
SSH key fingerprint: SHA256:kEsnuHX+qbwhxSAXPUQ4ox535wFHu/hIRaa53FzxRpo
62797 changed files with 6551425 additions and 15279 deletions

38
node_modules/rxfire/database/auth/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,38 @@
/**
* @license
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Auth } from 'firebase/auth';
import { Observable } from 'rxjs';
type User = import('firebase/auth').User;
/**
* Create an observable of authentication state. The observer is only
* triggered on sign-in or sign-out.
* @param auth firebase.auth.Auth
*/
export declare function authState(auth: Auth): Observable<User | null>;
/**
* Create an observable of user state. The observer is triggered for sign-in,
* sign-out, and token refresh events
* @param auth firebase.auth.Auth
*/
export declare function user(auth: Auth): Observable<User | null>;
/**
* Create an observable of idToken state. The observer is triggered for sign-in,
* sign-out, and token refresh events
* @param auth firebase.auth.Auth
*/
export declare function idToken(auth: Auth): Observable<string | null>;
export {};

24
node_modules/rxfire/database/database/fromRef.d.ts generated vendored Normal file
View file

@ -0,0 +1,24 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Observable } from 'rxjs';
import { ListenEvent, QueryChange } from './interfaces';
/**
* Create an observable from a Database Reference or Database Query.
* @param ref Database Reference
* @param event Listen event type ('value', 'added', 'changed', 'removed', 'moved')
*/
export declare function fromRef(ref: import('firebase/database').Query, event: ListenEvent): Observable<QueryChange>;

21
node_modules/rxfire/database/database/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,21 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './fromRef';
export * from './interfaces';
export * from './list';
export * from './list/audit-trail';
export * from './object';

37
node_modules/rxfire/database/database/interfaces.d.ts generated vendored Normal file
View file

@ -0,0 +1,37 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { onChildAdded, onChildChanged, onChildMoved, onChildRemoved, onValue } from 'firebase/database';
export type Query = import('firebase/database').Query;
export declare enum ListenEvent {
added = "child_added",
removed = "child_removed",
changed = "child_changed",
moved = "child_moved",
value = "value"
}
export interface QueryChange {
snapshot: import('firebase/database').DataSnapshot;
prevKey: string | null | undefined;
event: ListenEvent;
}
export declare const ListenerMethods: Readonly<{
child_added: typeof onChildAdded;
child_removed: typeof onChildRemoved;
child_changed: typeof onChildChanged;
child_moved: typeof onChildMoved;
value: typeof onValue;
}>;

View file

@ -0,0 +1,21 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Observable } from 'rxjs';
import { QueryChange, ListenEvent, Query } from '../interfaces';
export declare function auditTrail(query: Query, options?: {
events?: ListenEvent[];
}): Observable<QueryChange[]>;

32
node_modules/rxfire/database/database/list/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,32 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { QueryChange, ListenEvent, Query } from '../interfaces';
import { Observable } from 'rxjs';
export declare function stateChanges(query: Query, options?: {
events?: ListenEvent[];
}): Observable<QueryChange>;
export declare function list(query: Query, options?: {
events?: ListenEvent[];
}): Observable<QueryChange[]>;
/**
* Get an object mapped to its value, and optionally its key
* @param query object ref or query
* @param keyField map the object key to a specific field
*/
export declare function listVal<T>(query: Query, options?: {
keyField?: string;
}): Observable<T[]>;

View file

@ -0,0 +1,34 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { QueryChange, Query } from '../interfaces';
import { Observable } from 'rxjs';
/**
* Get the snapshot changes of an object
* @param query
*/
export declare function object(query: Query): Observable<QueryChange>;
/**
* Get an array of object values, optionally with a mapped key
* @param query object ref or query
* @param keyField map the object key to a specific field
*/
export declare function objectVal<T>(query: Query, options?: {
keyField?: string;
}): Observable<T>;
export declare function changeToData(change: QueryChange, options?: {
keyField?: string;
}): {};

23
node_modules/rxfire/database/database/utils.d.ts generated vendored Normal file
View file

@ -0,0 +1,23 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ListenEvent } from './interfaces';
/**
* Check the length of the provided array. If it is empty return an array
* that is populated with all the Realtime Database child events.
* @param events
*/
export declare function validateEventsArray(events?: ListenEvent[]): ListenEvent[];

View file

@ -0,0 +1,59 @@
/**
* @license
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Observable } from 'rxjs';
import { DocumentChangeType, DocumentChange, Query, QueryDocumentSnapshot, DocumentData } from '../interfaces';
import { SnapshotOptions } from 'firebase/firestore';
import { CountSnapshot } from '../lite/interfaces';
/**
* Return a stream of document changes on a query. These results are not in sort order but in
* order of occurence.
* @param query
*/
export declare function collectionChanges<T = DocumentData>(query: Query<T>, options?: {
events?: DocumentChangeType[];
}): Observable<DocumentChange<T>[]>;
/**
* Return a stream of document snapshots on a query. These results are in sort order.
* @param query
*/
export declare function collection<T = DocumentData>(query: Query<T>): Observable<QueryDocumentSnapshot<T>[]>;
/**
* Return a stream of document changes on a query. These results are in sort order.
* @param query
*/
export declare function sortedChanges<T = DocumentData>(query: Query<T>, options?: {
events?: DocumentChangeType[];
}): Observable<DocumentChange<T>[]>;
/**
* Create a stream of changes as they occur it time. This method is similar
* to docChanges() but it collects each event in an array over time.
*/
export declare function auditTrail<T = DocumentData>(query: Query<T>, options?: {
events?: DocumentChangeType[];
}): Observable<DocumentChange<T>[]>;
/**
* Returns a stream of documents mapped to their data payload, and optionally the document ID
* @param query
* @param options
*/
export declare function collectionData<T = DocumentData, U extends string = never>(query: Query<T>, options?: {
idField?: ((U | keyof T) & keyof NonNullable<T>);
} & SnapshotOptions): Observable<((T & {
[T in U]: string;
}) | NonNullable<T>)[]>;
export declare function collectionCountSnap(query: Query<unknown>): Observable<CountSnapshot>;
export declare function collectionCount(query: Query<unknown>): Observable<number>;

View file

@ -0,0 +1,31 @@
/**
* @license
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DocumentReference, DocumentSnapshot, DocumentData } from '../interfaces';
import { Observable } from 'rxjs';
import { SnapshotOptions } from 'firebase/firestore';
export declare function doc<T = DocumentData>(ref: DocumentReference<T>): Observable<DocumentSnapshot<T>>;
/**
* Returns a stream of a document, mapped to its data payload and optionally the document ID
* @param query
* @param options
*/
export declare function docData<T = DocumentData, R extends T = T>(ref: DocumentReference<T>, options?: {
idField?: keyof R;
} & SnapshotOptions): Observable<T | R | undefined>;
export declare function snapToData<T = DocumentData, R extends T = T>(snapshot: DocumentSnapshot<T>, options?: {
idField?: keyof R;
} & SnapshotOptions): T | R | undefined;

20
node_modules/rxfire/database/firestore/fromRef.d.ts generated vendored Normal file
View file

@ -0,0 +1,20 @@
/**
* @license
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Observable } from 'rxjs';
import { DocumentReference, DocumentData, SnapshotListenOptions, Query, DocumentSnapshot, QuerySnapshot } from './interfaces';
export declare function fromRef<T = DocumentData>(ref: DocumentReference<T>, options?: SnapshotListenOptions): Observable<DocumentSnapshot<T>>;
export declare function fromRef<T = DocumentData>(ref: Query<T>, options?: SnapshotListenOptions): Observable<QuerySnapshot<T>>;

19
node_modules/rxfire/database/firestore/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,19 @@
/**
* @license
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './collection';
export * from './document';
export * from './fromRef';

View file

@ -0,0 +1,9 @@
export type DocumentReference<T> = import('firebase/firestore').DocumentReference<T>;
export type DocumentData = import('firebase/firestore').DocumentData;
export type SnapshotListenOptions = import('firebase/firestore').SnapshotListenOptions;
export type Query<T> = import('firebase/firestore').Query<T>;
export type DocumentSnapshot<T> = import('firebase/firestore').DocumentSnapshot<T>;
export type QuerySnapshot<T> = import('firebase/firestore').QuerySnapshot<T>;
export type DocumentChangeType = import('firebase/firestore').DocumentChangeType;
export type DocumentChange<T> = import('firebase/firestore').DocumentChange<T>;
export type QueryDocumentSnapshot<T> = import('firebase/firestore').QueryDocumentSnapshot<T>;

View file

@ -0,0 +1,32 @@
/**
* @license
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Observable } from 'rxjs';
import { Query, QueryDocumentSnapshot, DocumentData, CountSnapshot } from '../interfaces';
/**
* Return a stream of document snapshots on a query. These results are in sort order.
* @param query
*/
export declare function collection<T = DocumentData>(query: Query<T>): Observable<QueryDocumentSnapshot<T>[]>;
/**
* Returns a stream of documents mapped to their data payload, and optionally the document ID
* @param query
*/
export declare function collectionData<T = DocumentData>(query: Query<T>, options?: {
idField?: string;
}): Observable<T[]>;
export declare function collectionCountSnap(query: Query<unknown>): Observable<CountSnapshot>;
export declare function collectionCount(query: Query<unknown>): Observable<number>;

View file

@ -0,0 +1,29 @@
/**
* @license
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DocumentReference, DocumentSnapshot, DocumentData } from '../interfaces';
import { Observable } from 'rxjs';
export declare function doc<T = DocumentData>(ref: DocumentReference<T>): Observable<DocumentSnapshot<T>>;
/**
* Returns a stream of a document, mapped to its data payload and optionally the document ID
* @param query
*/
export declare function docData<T = DocumentData>(ref: DocumentReference<T>, options?: {
idField?: string;
}): Observable<T>;
export declare function snapToData<T = DocumentData>(snapshot: DocumentSnapshot<T>, options?: {
idField?: string;
}): {} | undefined;

View file

@ -0,0 +1,4 @@
import { Observable } from 'rxjs';
import { DocumentReference, DocumentData, Query, DocumentSnapshot, QuerySnapshot } from './interfaces';
export declare function fromRef<T = DocumentData>(ref: DocumentReference<T>): Observable<DocumentSnapshot<T>>;
export declare function fromRef<T = DocumentData>(ref: Query<T>): Observable<QuerySnapshot<T>>;

19
node_modules/rxfire/database/firestore/lite/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,19 @@
/**
* @license
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './collection';
export * from './document';
export * from './fromRef';

View file

@ -0,0 +1,10 @@
import type * as lite from 'firebase/firestore/lite';
export type DocumentReference<T> = lite.DocumentReference<T>;
export type DocumentData = lite.DocumentData;
export type Query<T> = lite.Query<T>;
export type DocumentSnapshot<T> = lite.DocumentSnapshot<T>;
export type QuerySnapshot<T> = lite.QuerySnapshot<T>;
export type QueryDocumentSnapshot<T> = lite.QueryDocumentSnapshot<T>;
export type CountSnapshot = lite.AggregateQuerySnapshot<{
count: lite.AggregateField<number>;
}, any, DocumentData>;

24
node_modules/rxfire/database/fromRef.d.ts generated vendored Normal file
View file

@ -0,0 +1,24 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Observable } from 'rxjs';
import { ListenEvent, QueryChange } from './interfaces';
/**
* Create an observable from a Database Reference or Database Query.
* @param ref Database Reference
* @param event Listen event type ('value', 'added', 'changed', 'removed', 'moved')
*/
export declare function fromRef(ref: import('firebase/database').Query, event: ListenEvent): Observable<QueryChange>;

21
node_modules/rxfire/database/functions/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,21 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Observable } from 'rxjs';
type Functions = import('firebase/functions').Functions;
type HttpsCallableOptions = import('firebase/functions').HttpsCallableOptions;
export declare function httpsCallable<RequestData = unknown, ResponseData = unknown>(functions: Functions, name: string, options?: HttpsCallableOptions): (data?: RequestData | null) => Observable<ResponseData>;
export {};

400
node_modules/rxfire/database/index.cjs.js generated vendored Normal file
View file

@ -0,0 +1,400 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var rxjs = require('rxjs');
var operators = require('rxjs/operators');
var database = require('firebase/database');
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var _a;
exports.ListenEvent = void 0;
(function (ListenEvent) {
ListenEvent["added"] = "child_added";
ListenEvent["removed"] = "child_removed";
ListenEvent["changed"] = "child_changed";
ListenEvent["moved"] = "child_moved";
ListenEvent["value"] = "value";
})(exports.ListenEvent || (exports.ListenEvent = {}));
var ListenerMethods = Object.freeze((_a = {},
_a[exports.ListenEvent.added] = database.onChildAdded,
_a[exports.ListenEvent.removed] = database.onChildRemoved,
_a[exports.ListenEvent.changed] = database.onChildChanged,
_a[exports.ListenEvent.moved] = database.onChildMoved,
_a[exports.ListenEvent.value] = database.onValue,
_a));
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Create an observable from a Database Reference or Database Query.
* @param ref Database Reference
* @param event Listen event type ('value', 'added', 'changed', 'removed', 'moved')
*/
function fromRef(ref, event) {
return new rxjs.Observable(function (subscriber) {
var fn = ListenerMethods[event](ref, function (snapshot, prevKey) {
subscriber.next({ snapshot: snapshot, prevKey: prevKey, event: event });
}, subscriber.error.bind(subscriber));
return {
unsubscribe: function () {
database.off(ref, event, fn);
},
};
}).pipe(
// Ensures subscribe on observable is async. This handles
// a quirk in the SDK where on/once callbacks can happen
// synchronously.
operators.delay(0));
}
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __spreadArray(to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
}
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Check the length of the provided array. If it is empty return an array
* that is populated with all the Realtime Database child events.
* @param events
*/
function validateEventsArray(events) {
if (events == null || events.length === 0) {
events = [
exports.ListenEvent.added,
exports.ListenEvent.removed,
exports.ListenEvent.changed,
exports.ListenEvent.moved,
];
}
return events;
}
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Get the snapshot changes of an object
* @param query
*/
function object(query) {
return fromRef(query, exports.ListenEvent.value);
}
/**
* Get an array of object values, optionally with a mapped key
* @param query object ref or query
* @param keyField map the object key to a specific field
*/
function objectVal(query, options) {
if (options === void 0) { options = {}; }
return fromRef(query, exports.ListenEvent.value).pipe(operators.map(function (change) { return changeToData(change, options); }));
}
function changeToData(change, options) {
var _a;
if (options === void 0) { options = {}; }
var val = change.snapshot.val();
// match the behavior of the JS SDK when the snapshot doesn't exist
if (!change.snapshot.exists()) {
return val;
}
// val can be a primitive type
if (typeof val !== 'object') {
return val;
}
return __assign(__assign({}, val), (options.keyField ? (_a = {}, _a[options.keyField] = change.snapshot.key, _a) : null));
}
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function stateChanges(query, options) {
if (options === void 0) { options = {}; }
var events = validateEventsArray(options.events);
var childEvent$ = events.map(function (event) { return fromRef(query, event); });
return rxjs.merge.apply(void 0, childEvent$);
}
function get(query) {
return rxjs.from(database.get(query)).pipe(operators.map(function (snapshot) {
var event = exports.ListenEvent.value;
return { snapshot: snapshot, prevKey: null, event: event };
}));
}
function list(query, options) {
if (options === void 0) { options = {}; }
var events = validateEventsArray(options.events);
return get(query).pipe(operators.switchMap(function (change) {
var childEvent$ = [rxjs.of(change)];
events.forEach(function (event) {
childEvent$.push(fromRef(query, event));
});
return rxjs.merge.apply(void 0, childEvent$).pipe(operators.scan(buildView, []));
}), operators.distinctUntilChanged());
}
/**
* Get an object mapped to its value, and optionally its key
* @param query object ref or query
* @param keyField map the object key to a specific field
*/
function listVal(query, options) {
if (options === void 0) { options = {}; }
return list(query).pipe(operators.map(function (arr) {
return arr.map(function (change) { return changeToData(change, options); });
}));
}
function positionFor(changes, key) {
var len = changes.length;
for (var i = 0; i < len; i++) {
if (changes[i].snapshot.key === key) {
return i;
}
}
return -1;
}
function positionAfter(changes, prevKey) {
if (prevKey == null) {
return 0;
}
else {
var i = positionFor(changes, prevKey);
if (i === -1) {
return changes.length;
}
else {
return i + 1;
}
}
}
function buildView(current, change) {
var snapshot = change.snapshot, prevKey = change.prevKey, event = change.event;
var key = snapshot.key;
var currentKeyPosition = positionFor(current, key);
var afterPreviousKeyPosition = positionAfter(current, prevKey || undefined);
switch (event) {
case exports.ListenEvent.value:
if (change.snapshot && change.snapshot.exists()) {
var prevKey_1 = null;
change.snapshot.forEach(function (snapshot) {
var action = {
snapshot: snapshot,
event: exports.ListenEvent.value,
prevKey: prevKey_1,
};
prevKey_1 = snapshot.key;
current = __spreadArray(__spreadArray([], current, true), [action], false);
return false;
});
}
return current;
case exports.ListenEvent.added:
if (currentKeyPosition > -1) {
// check that the previouskey is what we expect, else reorder
var previous = current[currentKeyPosition - 1];
if (((previous && previous.snapshot.key) || null) !== prevKey) {
current = current.filter(function (x) { return x.snapshot.key !== snapshot.key; });
current.splice(afterPreviousKeyPosition, 0, change);
}
}
else if (prevKey == null) {
return __spreadArray([change], current, true);
}
else {
current = current.slice();
current.splice(afterPreviousKeyPosition, 0, change);
}
return current;
case exports.ListenEvent.removed:
return current.filter(function (x) { return x.snapshot.key !== snapshot.key; });
case exports.ListenEvent.changed:
return current.map(function (x) { return (x.snapshot.key === key ? change : x); });
case exports.ListenEvent.moved:
if (currentKeyPosition > -1) {
var data = current.splice(currentKeyPosition, 1)[0];
current = current.slice();
current.splice(afterPreviousKeyPosition, 0, data);
return current;
}
return current;
// default will also remove null results
default:
return current;
}
}
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function auditTrail(query, options) {
if (options === void 0) { options = {}; }
var auditTrail$ = stateChanges(query, options).pipe(operators.scan(function (current, changes) { return __spreadArray(__spreadArray([], current, true), [changes], false); }, []));
return waitForLoaded(query, auditTrail$);
}
function loadedData(query) {
// Create an observable of loaded values to retrieve the
// known dataset. This will allow us to know what key to
// emit the "whole" array at when listening for child events.
return fromRef(query, exports.ListenEvent.value).pipe(operators.map(function (data) {
// Store the last key in the data set
var lastKeyToLoad;
// Loop through loaded dataset to find the last key
data.snapshot.forEach(function (child) {
lastKeyToLoad = child.key;
return false;
});
// return data set and the current last key loaded
return { data: data, lastKeyToLoad: lastKeyToLoad };
}));
}
function waitForLoaded(query, snap$) {
var loaded$ = loadedData(query);
return loaded$.pipe(operators.withLatestFrom(snap$),
// Get the latest values from the "loaded" and "child" datasets
// We can use both datasets to form an array of the latest values.
operators.map(function (_a) {
var loaded = _a[0], changes = _a[1];
// Store the last key in the data set
var lastKeyToLoad = loaded.lastKeyToLoad;
// Store all child keys loaded at this point
var loadedKeys = changes.map(function (change) { return change.snapshot.key; });
return { changes: changes, lastKeyToLoad: lastKeyToLoad, loadedKeys: loadedKeys };
}),
// This is the magical part, only emit when the last load key
// in the dataset has been loaded by a child event. At this point
// we can assume the dataset is "whole".
operators.skipWhile(function (meta) {
return meta.loadedKeys.indexOf(meta.lastKeyToLoad) === -1;
}),
// Pluck off the meta data because the user only cares
// to iterate through the snapshots
operators.map(function (meta) { return meta.changes; }));
}
exports.ListenerMethods = ListenerMethods;
exports.auditTrail = auditTrail;
exports.changeToData = changeToData;
exports.fromRef = fromRef;
exports.list = list;
exports.listVal = listVal;
exports.object = object;
exports.objectVal = objectVal;
exports.stateChanges = stateChanges;
//# sourceMappingURL=index.cjs.js.map

1
node_modules/rxfire/database/index.cjs.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

21
node_modules/rxfire/database/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,21 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './fromRef';
export * from './interfaces';
export * from './list';
export * from './list/audit-trail';
export * from './object';

388
node_modules/rxfire/database/index.esm.js generated vendored Normal file
View file

@ -0,0 +1,388 @@
import { Observable, merge, of, from } from 'rxjs';
import { delay, map, switchMap, scan, distinctUntilChanged, withLatestFrom, skipWhile } from 'rxjs/operators';
import { onChildAdded, onChildRemoved, onChildChanged, onChildMoved, onValue, off, get as get$1 } from 'firebase/database';
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var _a;
var ListenEvent;
(function (ListenEvent) {
ListenEvent["added"] = "child_added";
ListenEvent["removed"] = "child_removed";
ListenEvent["changed"] = "child_changed";
ListenEvent["moved"] = "child_moved";
ListenEvent["value"] = "value";
})(ListenEvent || (ListenEvent = {}));
var ListenerMethods = Object.freeze((_a = {},
_a[ListenEvent.added] = onChildAdded,
_a[ListenEvent.removed] = onChildRemoved,
_a[ListenEvent.changed] = onChildChanged,
_a[ListenEvent.moved] = onChildMoved,
_a[ListenEvent.value] = onValue,
_a));
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Create an observable from a Database Reference or Database Query.
* @param ref Database Reference
* @param event Listen event type ('value', 'added', 'changed', 'removed', 'moved')
*/
function fromRef(ref, event) {
return new Observable(function (subscriber) {
var fn = ListenerMethods[event](ref, function (snapshot, prevKey) {
subscriber.next({ snapshot: snapshot, prevKey: prevKey, event: event });
}, subscriber.error.bind(subscriber));
return {
unsubscribe: function () {
off(ref, event, fn);
},
};
}).pipe(
// Ensures subscribe on observable is async. This handles
// a quirk in the SDK where on/once callbacks can happen
// synchronously.
delay(0));
}
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __spreadArray(to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
}
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Check the length of the provided array. If it is empty return an array
* that is populated with all the Realtime Database child events.
* @param events
*/
function validateEventsArray(events) {
if (events == null || events.length === 0) {
events = [
ListenEvent.added,
ListenEvent.removed,
ListenEvent.changed,
ListenEvent.moved,
];
}
return events;
}
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Get the snapshot changes of an object
* @param query
*/
function object(query) {
return fromRef(query, ListenEvent.value);
}
/**
* Get an array of object values, optionally with a mapped key
* @param query object ref or query
* @param keyField map the object key to a specific field
*/
function objectVal(query, options) {
if (options === void 0) { options = {}; }
return fromRef(query, ListenEvent.value).pipe(map(function (change) { return changeToData(change, options); }));
}
function changeToData(change, options) {
var _a;
if (options === void 0) { options = {}; }
var val = change.snapshot.val();
// match the behavior of the JS SDK when the snapshot doesn't exist
if (!change.snapshot.exists()) {
return val;
}
// val can be a primitive type
if (typeof val !== 'object') {
return val;
}
return __assign(__assign({}, val), (options.keyField ? (_a = {}, _a[options.keyField] = change.snapshot.key, _a) : null));
}
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function stateChanges(query, options) {
if (options === void 0) { options = {}; }
var events = validateEventsArray(options.events);
var childEvent$ = events.map(function (event) { return fromRef(query, event); });
return merge.apply(void 0, childEvent$);
}
function get(query) {
return from(get$1(query)).pipe(map(function (snapshot) {
var event = ListenEvent.value;
return { snapshot: snapshot, prevKey: null, event: event };
}));
}
function list(query, options) {
if (options === void 0) { options = {}; }
var events = validateEventsArray(options.events);
return get(query).pipe(switchMap(function (change) {
var childEvent$ = [of(change)];
events.forEach(function (event) {
childEvent$.push(fromRef(query, event));
});
return merge.apply(void 0, childEvent$).pipe(scan(buildView, []));
}), distinctUntilChanged());
}
/**
* Get an object mapped to its value, and optionally its key
* @param query object ref or query
* @param keyField map the object key to a specific field
*/
function listVal(query, options) {
if (options === void 0) { options = {}; }
return list(query).pipe(map(function (arr) {
return arr.map(function (change) { return changeToData(change, options); });
}));
}
function positionFor(changes, key) {
var len = changes.length;
for (var i = 0; i < len; i++) {
if (changes[i].snapshot.key === key) {
return i;
}
}
return -1;
}
function positionAfter(changes, prevKey) {
if (prevKey == null) {
return 0;
}
else {
var i = positionFor(changes, prevKey);
if (i === -1) {
return changes.length;
}
else {
return i + 1;
}
}
}
function buildView(current, change) {
var snapshot = change.snapshot, prevKey = change.prevKey, event = change.event;
var key = snapshot.key;
var currentKeyPosition = positionFor(current, key);
var afterPreviousKeyPosition = positionAfter(current, prevKey || undefined);
switch (event) {
case ListenEvent.value:
if (change.snapshot && change.snapshot.exists()) {
var prevKey_1 = null;
change.snapshot.forEach(function (snapshot) {
var action = {
snapshot: snapshot,
event: ListenEvent.value,
prevKey: prevKey_1,
};
prevKey_1 = snapshot.key;
current = __spreadArray(__spreadArray([], current, true), [action], false);
return false;
});
}
return current;
case ListenEvent.added:
if (currentKeyPosition > -1) {
// check that the previouskey is what we expect, else reorder
var previous = current[currentKeyPosition - 1];
if (((previous && previous.snapshot.key) || null) !== prevKey) {
current = current.filter(function (x) { return x.snapshot.key !== snapshot.key; });
current.splice(afterPreviousKeyPosition, 0, change);
}
}
else if (prevKey == null) {
return __spreadArray([change], current, true);
}
else {
current = current.slice();
current.splice(afterPreviousKeyPosition, 0, change);
}
return current;
case ListenEvent.removed:
return current.filter(function (x) { return x.snapshot.key !== snapshot.key; });
case ListenEvent.changed:
return current.map(function (x) { return (x.snapshot.key === key ? change : x); });
case ListenEvent.moved:
if (currentKeyPosition > -1) {
var data = current.splice(currentKeyPosition, 1)[0];
current = current.slice();
current.splice(afterPreviousKeyPosition, 0, data);
return current;
}
return current;
// default will also remove null results
default:
return current;
}
}
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function auditTrail(query, options) {
if (options === void 0) { options = {}; }
var auditTrail$ = stateChanges(query, options).pipe(scan(function (current, changes) { return __spreadArray(__spreadArray([], current, true), [changes], false); }, []));
return waitForLoaded(query, auditTrail$);
}
function loadedData(query) {
// Create an observable of loaded values to retrieve the
// known dataset. This will allow us to know what key to
// emit the "whole" array at when listening for child events.
return fromRef(query, ListenEvent.value).pipe(map(function (data) {
// Store the last key in the data set
var lastKeyToLoad;
// Loop through loaded dataset to find the last key
data.snapshot.forEach(function (child) {
lastKeyToLoad = child.key;
return false;
});
// return data set and the current last key loaded
return { data: data, lastKeyToLoad: lastKeyToLoad };
}));
}
function waitForLoaded(query, snap$) {
var loaded$ = loadedData(query);
return loaded$.pipe(withLatestFrom(snap$),
// Get the latest values from the "loaded" and "child" datasets
// We can use both datasets to form an array of the latest values.
map(function (_a) {
var loaded = _a[0], changes = _a[1];
// Store the last key in the data set
var lastKeyToLoad = loaded.lastKeyToLoad;
// Store all child keys loaded at this point
var loadedKeys = changes.map(function (change) { return change.snapshot.key; });
return { changes: changes, lastKeyToLoad: lastKeyToLoad, loadedKeys: loadedKeys };
}),
// This is the magical part, only emit when the last load key
// in the dataset has been loaded by a child event. At this point
// we can assume the dataset is "whole".
skipWhile(function (meta) {
return meta.loadedKeys.indexOf(meta.lastKeyToLoad) === -1;
}),
// Pluck off the meta data because the user only cares
// to iterate through the snapshots
map(function (meta) { return meta.changes; }));
}
export { ListenEvent, ListenerMethods, auditTrail, changeToData, fromRef, list, listVal, object, objectVal, stateChanges };
//# sourceMappingURL=index.esm.js.map

1
node_modules/rxfire/database/index.esm.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

37
node_modules/rxfire/database/interfaces.d.ts generated vendored Normal file
View file

@ -0,0 +1,37 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { onChildAdded, onChildChanged, onChildMoved, onChildRemoved, onValue } from 'firebase/database';
export type Query = import('firebase/database').Query;
export declare enum ListenEvent {
added = "child_added",
removed = "child_removed",
changed = "child_changed",
moved = "child_moved",
value = "value"
}
export interface QueryChange {
snapshot: import('firebase/database').DataSnapshot;
prevKey: string | null | undefined;
event: ListenEvent;
}
export declare const ListenerMethods: Readonly<{
child_added: typeof onChildAdded;
child_removed: typeof onChildRemoved;
child_changed: typeof onChildChanged;
child_moved: typeof onChildMoved;
value: typeof onValue;
}>;

21
node_modules/rxfire/database/list/audit-trail.d.ts generated vendored Normal file
View file

@ -0,0 +1,21 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Observable } from 'rxjs';
import { QueryChange, ListenEvent, Query } from '../interfaces';
export declare function auditTrail(query: Query, options?: {
events?: ListenEvent[];
}): Observable<QueryChange[]>;

32
node_modules/rxfire/database/list/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,32 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { QueryChange, ListenEvent, Query } from '../interfaces';
import { Observable } from 'rxjs';
export declare function stateChanges(query: Query, options?: {
events?: ListenEvent[];
}): Observable<QueryChange>;
export declare function list(query: Query, options?: {
events?: ListenEvent[];
}): Observable<QueryChange[]>;
/**
* Get an object mapped to its value, and optionally its key
* @param query object ref or query
* @param keyField map the object key to a specific field
*/
export declare function listVal<T>(query: Query, options?: {
keyField?: string;
}): Observable<T[]>;

34
node_modules/rxfire/database/object/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,34 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { QueryChange, Query } from '../interfaces';
import { Observable } from 'rxjs';
/**
* Get the snapshot changes of an object
* @param query
*/
export declare function object(query: Query): Observable<QueryChange>;
/**
* Get an array of object values, optionally with a mapped key
* @param query object ref or query
* @param keyField map the object key to a specific field
*/
export declare function objectVal<T>(query: Query, options?: {
keyField?: string;
}): Observable<T>;
export declare function changeToData(change: QueryChange, options?: {
keyField?: string;
}): {};

8
node_modules/rxfire/database/package.json generated vendored Normal file
View file

@ -0,0 +1,8 @@
{
"name": "rxfire/database",
"browser": "index.esm.js",
"main": "index.cjs.js",
"module": "index.esm.js",
"typings": "index.d.ts",
"sideEffects": false
}

55
node_modules/rxfire/database/performance/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,55 @@
import { Observable } from 'rxjs';
type FirebaseApp = import('firebase/app').FirebaseApp;
/**
* Lazy loads Firebase Performance monitoring and returns the instance as
* an observable
* @param app
* @returns Observable<FirebasePerformance>
*/
export declare const getPerformance$: (app: FirebaseApp) => Observable<import("firebase/performance").FirebasePerformance>;
/**
* Creates a function that creates an observable that begins a trace with a given id. The trace is ended
* when the observable unsubscribes. The measurement is also logged as a performance
* entry.
* @param name
* @returns (source$: Observable<T>) => Observable<T>
*/
export declare const trace: <T = any>(name: string) => (source$: Observable<T>) => Observable<T>;
/**
* Creates a function that creates an observable that begins a trace with a given name. The trace runs until
* a condition resolves to true and then the observable unsubscribes and ends the trace.
* @param name
* @param test
* @param options
* @returns (source$: Observable<T>) => Observable<T>
*/
export declare const traceUntil: <T = any>(name: string, test: (a: T) => boolean, options?: {
orComplete?: boolean;
}) => (source$: Observable<T>) => Observable<T>;
/**
* Creates a function that creates an observable that begins a trace with a given name. The trace runs while
* a condition resolves to true. Once the condition fails the observable unsubscribes
* and ends the trace.
* @param name
* @param test
* @param options
* @returns (source$: Observable<T>) => Observable<T>
*/
export declare const traceWhile: <T = any>(name: string, test: (a: T) => boolean, options?: {
orComplete?: boolean;
}) => (source$: Observable<T>) => Observable<T>;
/**
* Creates a function that creates an observable that begins a trace with a given name. The trace runs until the
* observable fully completes.
* @param name
* @returns (source$: Observable<T>) => Observable<T>
*/
export declare const traceUntilComplete: <T = any>(name: string) => (source$: Observable<T>) => Observable<T>;
/**
* Creates a function that creates an observable that begins a trace with a given name.
* The trace runs until the first value emits from the provided observable.
* @param name
* @returns (source$: Observable<T>) => Observable<T>
*/
export declare const traceUntilFirst: <T = any>(name: string) => (source$: Observable<T>) => Observable<T>;
export {};

12
node_modules/rxfire/database/remote-config/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,12 @@
import { Observable } from 'rxjs';
type RemoteConfig = import('firebase/remote-config').RemoteConfig;
type RemoteConfigValue = import('firebase/remote-config').Value;
export type AllParameters = {
[key: string]: RemoteConfigValue;
};
export declare function getValue(remoteConfig: RemoteConfig, key: string): Observable<import("@firebase/remote-config").Value>;
export declare function getString(remoteConfig: RemoteConfig, key: string): Observable<string>;
export declare function getNumber(remoteConfig: RemoteConfig, key: string): Observable<number>;
export declare function getBoolean(remoteConfig: RemoteConfig, key: string): Observable<boolean>;
export declare function getAll(remoteConfig: RemoteConfig): Observable<AllParameters>;
export {};

11
node_modules/rxfire/database/storage/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,11 @@
import { Observable } from 'rxjs';
import type { UploadTaskSnapshot, StorageReference, UploadMetadata, StringFormat, UploadTask, UploadResult } from 'firebase/storage';
export declare function fromTask(task: UploadTask): Observable<UploadTaskSnapshot>;
export declare function getDownloadURL(ref: StorageReference): Observable<string>;
export declare function getMetadata(ref: StorageReference): Observable<any>;
export declare function uploadBytesResumable(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): Observable<UploadTaskSnapshot>;
export declare function uploadString(ref: StorageReference, data: string, format?: StringFormat, metadata?: UploadMetadata): Observable<UploadResult>;
export declare function percentage(task: UploadTask): Observable<{
progress: number;
snapshot: UploadTaskSnapshot;
}>;

23
node_modules/rxfire/database/utils.d.ts generated vendored Normal file
View file

@ -0,0 +1,23 @@
/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ListenEvent } from './interfaces';
/**
* Check the length of the provided array. If it is empty return an array
* that is populated with all the Realtime Database child events.
* @param events
*/
export declare function validateEventsArray(events?: ListenEvent[]): ListenEvent[];