@dereekb/dbx-firebase 9.24.16 → 9.24.18

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.
@@ -22,7 +22,7 @@ import { CommonModule } from '@angular/common';
22
22
  import * as i1$2 from '@dereekb/dbx-web';
23
23
  import { DbxRouterAnchorModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, AbstractDbxSelectionListWrapperDirective, provideDbxListViewWrapper, DEFAULT_LIST_WRAPPER_DIRECTIVE_TEMPLATE, AbstractDbxSelectionListViewDirective, provideDbxListView, DEFAULT_DBX_SELECTION_VALUE_LIST_DIRECTIVE_TEMPLATE, AbstractDbxValueListViewItemComponent, DBX_VALUE_LIST_VIEW_ITEM, TwoColumnsContextStore, AbstractPopupDirective, DbxWidgetModule, DbxTextModule, DbxBlockLayoutModule, DbxTwoColumnLayoutModule, DbxPopupInteractionModule, DbxListLayoutModule, allDbxModelViewTrackerEventModelKeys, AbstractPopoverDirective, AbstractPopoverRefDirective, DbxModelInfoModule, DbxRouterListModule, DbxPopoverInteractionModule } from '@dereekb/dbx-web';
24
24
  import * as i1$4 from '@dereekb/firebase';
25
- import { firebaseAuthErrorToReadableError, ScheduledFunctionDevelopmentFunctionTypeEnum, clientFirebaseFirestoreContextFactory, SystemStateFirestoreCollections, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FirebaseDevelopmentFunctions, iterationQueryDocChangeWatcher, firebaseQuerySnapshotAccumulator, firebaseQueryItemAccumulator, firestoreModelKeysFromDocuments, firestoreModelIdsFromDocuments, documentReferencesFromDocuments, getDocumentSnapshots, getDataFromDocumentSnapshots, latestSnapshotsFromDocuments, dataFromDocumentSnapshots, loadDocumentsForKeys, loadDocumentsForDocumentReferences, loadDocumentsForIds, asFirestoreModelKeyCollectionType, buildFirebaseCollectionTypeModelTypeMap, FirestoreAccessorStreamMode, firestoreModelIdsFromKey, firestoreModelKeyPartPairs, firestoreModelKeyPairObject, flatFirestoreModelKey, documentDataWithIdAndKey, inferKeyFromTwoWayFlatFirestoreModelKey, clientFirebaseStorageContextFactory } from '@dereekb/firebase';
25
+ import { firebaseAuthErrorToReadableError, ScheduledFunctionDevelopmentFunctionTypeEnum, clientFirebaseFirestoreContextFactory, SystemStateFirestoreCollections, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FirebaseDevelopmentFunctions, iterationQueryDocChangeWatcher, firebaseQuerySnapshotAccumulator, firebaseQueryItemAccumulator, firestoreModelKeysFromDocuments, firestoreModelIdsFromDocuments, documentReferencesFromDocuments, getDocumentSnapshots, getDataFromDocumentSnapshots, latestSnapshotsFromDocuments, dataFromDocumentSnapshots, loadDocumentsForKeys, loadDocumentsForDocumentReferences, loadDocumentsForIds, asFirestoreModelKeyCollectionType, buildFirebaseCollectionTypeModelTypeMap, FirestoreAccessorStreamMode, firestoreModelIdsFromKey, firestoreModelKeyPartPairs, firestoreModelKeyPairObject, flatFirestoreModelKey, documentDataWithIdAndKey, inferKeyFromTwoWayFlatFirestoreModelKey, firestoreModelKeyParentKey, clientFirebaseStorageContextFactory } from '@dereekb/firebase';
26
26
  import * as i1$3 from '@dereekb/dbx-form';
27
27
  import { AbstractAsyncFormlyFormDirective, usernamePasswordLoginFields, provideFormlyContext, AbstractSyncFormlyFormDirective, emailField, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule, AbstractConfigAsyncFormlyFormDirective, pickableItemChipField, filterPickableItemFieldValuesByLabel } from '@dereekb/dbx-form';
28
28
  import { initializeApp } from 'firebase/app';
@@ -4259,8 +4259,14 @@ class AbstractDbxFirebaseDocumentWithParentStore extends AbstractDbxFirebaseDocu
4259
4259
  });
4260
4260
  this._setParent = this.setParent;
4261
4261
  // MARK: Accessors
4262
+ /**
4263
+ * Returns the parent model key given the current key value.
4264
+ */
4265
+ this.keyParentKey$ = this.key$.pipe(map((x) => firestoreModelKeyParentKey(x, 1)), distinctUntilChanged(), shareReplay(1));
4262
4266
  this.currentParent$ = this.state$.pipe(map((x) => x.parent), distinctUntilChanged(), shareReplay(1));
4267
+ this.currentParentKey$ = this.state$.pipe(map((x) => x.parent?.key), distinctUntilChanged(), shareReplay(1));
4263
4268
  this.parent$ = this.currentParent$.pipe(filterMaybe());
4269
+ this.parentKey$ = this.currentParentKey$.pipe(filterMaybe());
4264
4270
  this.currentCollectionFactory$ = this.state$.pipe(map((x) => x.collectionFactory), distinctUntilChanged(), shareReplay(1));
4265
4271
  this.collectionFactory$ = this.currentCollectionFactory$.pipe(filterMaybe());
4266
4272
  // MARK: State Changes