@dereekb/dbx-firebase 12.6.15 → 12.6.16

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.
@@ -0,0 +1,15 @@
1
+ @use '../style/config';
2
+ @use '../style/theming';
3
+ @use './modules/model/model';
4
+
5
+ @mixin all-model-core($theme-config) {
6
+ @include model.core();
7
+ }
8
+
9
+ @mixin all-model-typography($theme-config-or-typography-config) {
10
+ @include model.typography($theme-config-or-typography-config);
11
+ }
12
+
13
+ @mixin all-model-theme($theme-config) {
14
+ @include model.theme($theme-config);
15
+ }
@@ -0,0 +1,27 @@
1
+ @use '../../../style/theming';
2
+
3
+ // MARK: Mixin
4
+ @mixin core() {
5
+ }
6
+
7
+ @mixin color($theme-config) {
8
+ }
9
+
10
+ @mixin typography($theme-config-or-typography-config) {
11
+ }
12
+
13
+ @mixin theme($theme-config) {
14
+ @include theming.private-check-duplicate-theme-styles($theme-config, 'dbx-firebase-model-model') {
15
+ $color: theming.m2-get-color-config($theme-config);
16
+ $density: theming.m2-get-density-config($theme-config);
17
+ $typography: theming.m2-get-typography-config($theme-config);
18
+
19
+ @if $color !=null {
20
+ @include color($theme-config);
21
+ }
22
+
23
+ @if $typography !=null {
24
+ @include typography($theme-config);
25
+ }
26
+ }
27
+ }
@@ -3,15 +3,17 @@ import { DbxFirebaseModelEntity, DbxFirebaseModelEntityWithKeyAndStore } from '.
3
3
  import { Observable } from 'rxjs';
4
4
  import { Maybe } from '@dereekb/util';
5
5
  import { LoadingState } from '@dereekb/rxjs';
6
+ import { DbxFirebaseModelEntitiesWidgetService } from './model.entities.widget.service';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class DbxFirebaseModelEntitiesComponent implements OnDestroy {
9
+ readonly entitiesWidgetService: DbxFirebaseModelEntitiesWidgetService;
8
10
  /**
9
11
  * Whether the accordion should allow multiple expanded panels.
10
12
  */
11
13
  readonly multi: import("@angular/core").InputSignal<boolean>;
12
14
  readonly entities: import("@angular/core").InputSignal<Observable<LoadingState<DbxFirebaseModelEntity[]>> | undefined>;
13
15
  readonly entities$: Observable<LoadingState<DbxFirebaseModelEntity[]>>;
14
- readonly entitiesWithKeysState$: Observable<LoadingState<DbxFirebaseModelEntityWithKeyAndStore[]>>;
16
+ readonly allEntitiesWithKeysState$: Observable<LoadingState<DbxFirebaseModelEntityWithKeyAndStore[]>>;
15
17
  readonly entitiesWithKeys$: Observable<Maybe<DbxFirebaseModelEntityWithKeyAndStore<any, import("dist/packages/firebase/src").FirestoreDocument<any, import("dist/packages/firebase/src").FirestoreModelIdentity>>[]>>;
16
18
  readonly entitiesWithKeysSignal: import("@angular/core").Signal<Maybe<DbxFirebaseModelEntityWithKeyAndStore<any, import("dist/packages/firebase/src").FirestoreDocument<any, import("dist/packages/firebase/src").FirestoreModelIdentity>>[]>>;
17
19
  readonly hasNoEntitiesSignal: import("@angular/core").Signal<boolean>;
@@ -1,16 +1,28 @@
1
1
  import { ElementRef } from '@angular/core';
2
- import { AbstractPopoverRefDirective } from '@dereekb/dbx-web';
2
+ import { AbstractPopoverRefDirective, DbxButtonStyle } from '@dereekb/dbx-web';
3
3
  import { NgPopoverRef } from 'ng-overlay-container';
4
4
  import { DbxFirebaseModelEntitiesPopoverConfigWithoutOrigin } from './model.entities.popover.component';
5
5
  import { Maybe } from '@dereekb/util';
6
6
  import { DbxFirebaseModelEntitiesSource } from './model.entities';
7
+ import { DbxButtonDisplay } from '@dereekb/dbx-core';
7
8
  import * as i0 from "@angular/core";
8
- export type DbxFirebaseModelEntitiesPopoverButtonConfig = DbxFirebaseModelEntitiesPopoverConfigWithoutOrigin;
9
+ export interface DbxFirebaseModelEntitiesPopoverButtonConfig extends DbxFirebaseModelEntitiesPopoverConfigWithoutOrigin {
10
+ /**
11
+ * The display configuration for the button.
12
+ */
13
+ readonly buttonDisplay?: Maybe<DbxButtonDisplay>;
14
+ /**
15
+ * The style configuration for the button.
16
+ */
17
+ readonly buttonStyle?: Maybe<DbxButtonStyle>;
18
+ }
9
19
  export declare class DbxFirebaseModelEntitiesPopoverButtonComponent extends AbstractPopoverRefDirective<unknown, unknown> {
10
20
  private readonly _dbxPopoverService;
11
21
  readonly entitiesSource: DbxFirebaseModelEntitiesSource;
12
22
  readonly buttonElement: import("@angular/core").Signal<ElementRef<any>>;
13
- readonly config: import("@angular/core").InputSignal<DbxFirebaseModelEntitiesPopoverConfigWithoutOrigin | undefined>;
23
+ readonly config: import("@angular/core").InputSignal<DbxFirebaseModelEntitiesPopoverButtonConfig | undefined>;
24
+ readonly buttonDisplaySignal: import("@angular/core").Signal<DbxButtonDisplay>;
25
+ readonly buttonStyleSignal: import("@angular/core").Signal<Maybe<DbxButtonStyle>>;
14
26
  protected _makePopoverRef(origin?: Maybe<ElementRef>): NgPopoverRef<unknown, unknown>;
15
27
  showEntitiesPopover(): void;
16
28
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseModelEntitiesPopoverButtonComponent, never>;
@@ -1,12 +1,15 @@
1
- import { OnDestroy } from '@angular/core';
1
+ import { OnDestroy, Signal } from '@angular/core';
2
2
  import { AbstractDbxFirebaseModelEntitiesWidgetDirective } from './model.entities.widget.entity.abstract.directive';
3
+ import { DownloadTextContent } from '@dereekb/dbx-web';
4
+ import { Maybe } from '@dereekb/util';
3
5
  import * as i0 from "@angular/core";
4
6
  /**
5
7
  * A debug widget component that displays entity data and metadata.
6
8
  */
7
9
  export declare class DbxFirebaseModelEntitiesDebugWidgetComponent extends AbstractDbxFirebaseModelEntitiesWidgetDirective implements OnDestroy {
8
- readonly currentKey: import("@angular/core").Signal<import("dist/packages/util/src").Maybe<string>>;
9
- readonly currentData: import("@angular/core").Signal<any>;
10
+ readonly currentKey: Signal<Maybe<string>>;
11
+ readonly currentData: Signal<any>;
12
+ readonly contentSignal: Signal<Maybe<DownloadTextContent>>;
10
13
  readonly context: import("@dereekb/rxjs").MutableLoadingStateContext<unknown, import("@dereekb/rxjs").LoadingState<any>, import("@dereekb/rxjs").LoadingContextEvent & import("@dereekb/rxjs").LoadingState<any>>;
11
14
  ngOnDestroy(): void;
12
15
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseModelEntitiesDebugWidgetComponent, never>;
@@ -7,6 +7,12 @@ export interface DbxFirebaseModelEntitiesWidgetEntry {
7
7
  * Widget type to respond to.
8
8
  */
9
9
  readonly identity: FirestoreModelIdentity;
10
+ /**
11
+ * The priority to use when sorting the entities.
12
+ *
13
+ * Higher values are displayed first in the list.
14
+ */
15
+ readonly sortPriority?: Maybe<number>;
10
16
  /**
11
17
  * Widget component that is specific to this entity.
12
18
  */
@@ -44,6 +50,7 @@ export declare class DbxFirebaseModelEntitiesWidgetService {
44
50
  private _commonComponentClass;
45
51
  private _debugComponentClass;
46
52
  private readonly _entries;
53
+ private readonly _sortPriorityMap;
47
54
  constructor(initialConfig?: DbxFirebaseModelEntitiesWidgetServiceConfig);
48
55
  getCommonComponentClass(): Maybe<Type<unknown>>;
49
56
  setCommonComponentClass(componentClass: Maybe<Type<unknown>>): void;
@@ -61,6 +68,7 @@ export declare class DbxFirebaseModelEntitiesWidgetService {
61
68
  getAllRegisteredWidgetIdentities(): FirestoreModelIdentity[];
62
69
  getWidgetEntry(identity: FirestoreModelIdentity): DbxFirebaseModelEntitiesWidgetEntry;
63
70
  getWidgetEntries(identities: Iterable<FirestoreModelIdentity>): DbxFirebaseModelEntitiesWidgetEntry[];
71
+ getSortPriorityMap(): Map<FirestoreModelIdentity, number>;
64
72
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseModelEntitiesWidgetService, [{ optional: true; }]>;
65
73
  static ɵprov: i0.ɵɵInjectableDeclaration<DbxFirebaseModelEntitiesWidgetService>;
66
74
  }
@@ -1,6 +1,8 @@
1
1
  @use '../auth/login/login';
2
+ @use '../model/model';
2
3
 
3
4
  // Includes all theming config
4
- @mixin all-component-core() {
5
+ @mixin all-component-core($theme-config) {
5
6
  @include login.core();
7
+ @include model.all-model-core($theme-config);
6
8
  }
@@ -1,6 +1,8 @@
1
1
  @use '../auth/login/login';
2
+ @use '../model/model';
2
3
 
3
4
  // Includes all theming config
4
5
  @mixin all-component-themes($theme-config) {
5
6
  @include login.theme($theme-config);
7
+ @include model.all-model-theme($theme-config);
6
8
  }
@@ -1,6 +1,8 @@
1
1
  @use '../auth/login/login';
2
+ @use '../model/model';
2
3
 
3
4
  // Includes all of the typographic styles.
4
5
  @mixin all-component-typographies($theme-config) {
5
6
  @include login.typography($theme-config);
7
+ @include model.all-model-typography($theme-config);
6
8
  }
@@ -4,5 +4,5 @@
4
4
  @use './config';
5
5
 
6
6
  @mixin core($theme-config: null) {
7
- @include all-core.all-component-core();
7
+ @include all-core.all-component-core($theme-config);
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-firebase",
3
- "version": "12.6.15",
3
+ "version": "12.6.16",
4
4
  "peerDependencies": {
5
5
  "@angular/core": "^18.0.0",
6
6
  "@dereekb/dbx-analytics": "*",