@dereekb/dbx-web 1.2.0 → 2.0.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.
Files changed (77) hide show
  1. package/README.md +1 -1
  2. package/_index.scss +5 -2
  3. package/esm2020/lib/action/action.confirm.directive.mjs +5 -5
  4. package/esm2020/lib/action/action.module.mjs +1 -6
  5. package/esm2020/lib/action/index.mjs +2 -2
  6. package/esm2020/lib/action/key.trigger.directive.mjs +4 -4
  7. package/esm2020/lib/action/snackbar/action.snackbar.component.mjs +95 -0
  8. package/esm2020/lib/action/snackbar/action.snackbar.default.mjs +107 -0
  9. package/esm2020/lib/action/snackbar/action.snackbar.directive.mjs +62 -0
  10. package/esm2020/lib/action/snackbar/action.snackbar.generator.mjs +44 -0
  11. package/esm2020/lib/action/snackbar/action.snackbar.mjs +2 -0
  12. package/esm2020/lib/action/snackbar/action.snackbar.module.mjs +51 -0
  13. package/esm2020/lib/action/snackbar/action.snackbar.service.mjs +82 -0
  14. package/esm2020/lib/action/snackbar/index.mjs +8 -0
  15. package/esm2020/lib/action/transition/transition.safety.dialog.component.mjs +5 -4
  16. package/esm2020/lib/action/transition/transition.safety.directive.mjs +4 -4
  17. package/esm2020/lib/button/button.component.mjs +1 -2
  18. package/esm2020/lib/button/button.module.mjs +12 -8
  19. package/esm2020/lib/button/button.spacer.component.mjs +12 -10
  20. package/esm2020/lib/error/error.action.directive.mjs +4 -4
  21. package/esm2020/lib/interaction/popover/popover.action.button.directive.mjs +7 -7
  22. package/esm2020/lib/interaction/popover/popover.action.directive.mjs +4 -4
  23. package/esm2020/lib/interaction/popup/popup.controls.buttons.component.mjs +3 -3
  24. package/esm2020/lib/interaction/prompt/prompt.confirm.component.mjs +1 -1
  25. package/esm2020/lib/layout/section/section.header.component.mjs +6 -3
  26. package/esm2020/lib/layout/text/icon.spacer.component.mjs +19 -0
  27. package/esm2020/lib/layout/text/index.mjs +2 -1
  28. package/esm2020/lib/layout/text/text.module.mjs +10 -5
  29. package/esm2020/lib/loading/index.mjs +2 -1
  30. package/esm2020/lib/loading/loading.action.directive.mjs +37 -0
  31. package/esm2020/lib/loading/loading.module.mjs +10 -5
  32. package/esm2020/lib/router/layout/anchor/anchor.content.component.mjs +21 -0
  33. package/esm2020/lib/router/layout/anchor/anchor.module.mjs +10 -5
  34. package/esm2020/lib/router/layout/anchor/index.mjs +2 -1
  35. package/esm2020/lib/router/layout/sidenav/sidenav.pagebar.component.mjs +1 -1
  36. package/fesm2015/dereekb-dbx-web.mjs +839 -452
  37. package/fesm2015/dereekb-dbx-web.mjs.map +1 -1
  38. package/fesm2020/dereekb-dbx-web.mjs +830 -443
  39. package/fesm2020/dereekb-dbx-web.mjs.map +1 -1
  40. package/lib/action/_action.scss +8 -35
  41. package/lib/action/action.confirm.directive.d.ts +13 -4
  42. package/lib/action/action.module.d.ts +9 -10
  43. package/lib/action/index.d.ts +1 -1
  44. package/lib/action/key.trigger.directive.d.ts +3 -3
  45. package/lib/action/snackbar/_snackbar.scss +33 -0
  46. package/lib/action/snackbar/action.snackbar.component.d.ts +36 -0
  47. package/lib/action/snackbar/action.snackbar.d.ts +52 -0
  48. package/lib/action/snackbar/action.snackbar.default.d.ts +2 -0
  49. package/lib/action/snackbar/action.snackbar.directive.d.ts +25 -0
  50. package/lib/action/snackbar/action.snackbar.generator.d.ts +32 -0
  51. package/lib/action/snackbar/action.snackbar.module.d.ts +14 -0
  52. package/lib/action/snackbar/action.snackbar.service.d.ts +39 -0
  53. package/lib/action/snackbar/index.d.ts +7 -0
  54. package/lib/action/transition/transition.safety.directive.d.ts +3 -3
  55. package/lib/button/button.module.d.ts +2 -1
  56. package/lib/button/button.spacer.component.d.ts +4 -4
  57. package/lib/error/error.action.directive.d.ts +3 -3
  58. package/lib/interaction/popover/popover.action.button.directive.d.ts +3 -3
  59. package/lib/interaction/popover/popover.action.directive.d.ts +3 -3
  60. package/lib/layout/content/_content.scss +13 -0
  61. package/lib/layout/section/section.header.component.d.ts +1 -0
  62. package/lib/layout/text/icon.spacer.component.d.ts +8 -0
  63. package/lib/layout/text/index.d.ts +1 -0
  64. package/lib/layout/text/text.module.d.ts +6 -5
  65. package/lib/loading/index.d.ts +1 -0
  66. package/lib/loading/loading.action.directive.d.ts +19 -0
  67. package/lib/loading/loading.module.d.ts +6 -5
  68. package/lib/router/layout/anchor/anchor.content.component.d.ts +11 -0
  69. package/lib/router/layout/anchor/anchor.module.d.ts +6 -5
  70. package/lib/router/layout/anchor/index.d.ts +1 -0
  71. package/lib/style/_all-core.scss +2 -0
  72. package/lib/style/_all-theme.scss +2 -0
  73. package/lib/style/_all-typography.scss +2 -0
  74. package/lib/style/_function.scss +4 -0
  75. package/package.json +6 -5
  76. package/esm2020/lib/action/action.snackbar.component.mjs +0 -104
  77. package/lib/action/action.snackbar.component.d.ts +0 -22
@@ -1,40 +1,13 @@
1
- @use '../style/theming';
1
+ @use './snackbar/snackbar';
2
2
 
3
- // MARK: Variables
4
-
5
-
6
- // MARK: Mixin
7
- @mixin core() {}
8
-
9
- @mixin color($theme-config) {}
10
-
11
- @mixin typography($typography-config) {}
12
-
13
- @mixin theme($theme-config) {
14
- @include theming.private-check-duplicate-theme-styles($theme-config, 'dbx-action') {
15
- $color: theming.get-color-config($theme-config);
16
- $typography: theming.get-typography-config($theme-config);
17
-
18
- @if $color !=null {
19
- @include color($theme-config);
20
- }
21
-
22
- @if $typography !=null {
23
- @include typography($typography);
24
- }
25
- }
3
+ @mixin all-action-core() {
4
+ @include snackbar.core();
26
5
  }
27
6
 
28
- // TODO:
29
- .dbx-action-snackbar {
30
- display: flex;
31
- align-items: center;
32
-
33
- &.dbx-action-snackbar-success {
34
- // background: $success-color;
35
- }
7
+ @mixin all-action-typography($typography-config) {
8
+ @include snackbar.typography($typography-config);
9
+ }
36
10
 
37
- &.dbx-action-snackbar-error {
38
- // background: red;
39
- }
11
+ @mixin all-action-theme($theme-config) {
12
+ @include snackbar.theme($theme-config);
40
13
  }
@@ -2,8 +2,17 @@ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { MatDialog } from '@angular/material/dialog';
3
3
  import { AbstractPromptConfirmDirective } from '../interaction/prompt/prompt.confirm.directive';
4
4
  import { DbxPromptConfirmConfig } from '../interaction/prompt/prompt.confirm.component';
5
- import { ActionContextStoreSourceInstance } from '@dereekb/dbx-core';
5
+ import { DbxActionContextStoreSourceInstance } from '@dereekb/dbx-core';
6
6
  import * as i0 from "@angular/core";
7
+ /**
8
+ * DbxActionConfirmDirective configuration.
9
+ */
10
+ export interface DbxActionConfirmConfig<T> extends DbxPromptConfirmConfig {
11
+ /**
12
+ * Optionally set the readyValue passed to the instance.
13
+ */
14
+ readyValue?: T;
15
+ }
7
16
  /**
8
17
  * Directive that when triggered shows a dialog to accept or reject.
9
18
  *
@@ -11,10 +20,10 @@ import * as i0 from "@angular/core";
11
20
  * For button usage, use an appPromptConfirmButton directive.
12
21
  */
13
22
  export declare class DbxActionConfirmDirective<T, O> extends AbstractPromptConfirmDirective implements OnInit, OnDestroy {
14
- readonly source: ActionContextStoreSourceInstance<T, O>;
15
- config?: DbxPromptConfirmConfig;
23
+ readonly source: DbxActionContextStoreSourceInstance<T, O>;
24
+ config?: DbxActionConfirmConfig<T>;
16
25
  private _sourceSubscription;
17
- constructor(source: ActionContextStoreSourceInstance<T, O>, dialog: MatDialog);
26
+ constructor(source: DbxActionContextStoreSourceInstance<T, O>, dialog: MatDialog);
18
27
  ngOnInit(): void;
19
28
  ngOnDestroy(): void;
20
29
  protected _handleDialogResult(result: boolean): boolean;
@@ -1,16 +1,15 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./key.trigger.directive";
3
- import * as i2 from "./action.snackbar.component";
4
- import * as i3 from "./action.confirm.directive";
5
- import * as i4 from "@angular/common";
6
- import * as i5 from "@dereekb/dbx-core";
7
- import * as i6 from "../button/button.module";
8
- import * as i7 from "@angular/material/snack-bar";
9
- import * as i8 from "@angular/material/dialog";
10
- import * as i9 from "@angular/material/button";
11
- import * as i10 from "../interaction/prompt/prompt.module";
3
+ import * as i2 from "./action.confirm.directive";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@dereekb/dbx-core";
6
+ import * as i5 from "../button/button.module";
7
+ import * as i6 from "@angular/material/snack-bar";
8
+ import * as i7 from "@angular/material/dialog";
9
+ import * as i8 from "@angular/material/button";
10
+ import * as i9 from "../interaction/prompt/prompt.module";
12
11
  export declare class DbxActionModule {
13
12
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<DbxActionModule, [typeof i1.DbxActionKeyTriggerDirective, typeof i2.DbxActionSnackbarComponent, typeof i3.DbxActionConfirmDirective], [typeof i4.CommonModule, typeof i5.DbxCoreActionModule, typeof i6.DbxButtonModule, typeof i7.MatSnackBarModule, typeof i8.MatDialogModule, typeof i9.MatButtonModule, typeof i10.DbxPromptModule], [typeof i5.DbxCoreActionModule, typeof i1.DbxActionKeyTriggerDirective, typeof i2.DbxActionSnackbarComponent, typeof i3.DbxActionConfirmDirective]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxActionModule, [typeof i1.DbxActionKeyTriggerDirective, typeof i2.DbxActionConfirmDirective], [typeof i3.CommonModule, typeof i4.DbxCoreActionModule, typeof i5.DbxButtonModule, typeof i6.MatSnackBarModule, typeof i7.MatDialogModule, typeof i8.MatButtonModule, typeof i9.DbxPromptModule], [typeof i4.DbxCoreActionModule, typeof i1.DbxActionKeyTriggerDirective, typeof i2.DbxActionConfirmDirective]>;
15
14
  static ɵinj: i0.ɵɵInjectorDeclaration<DbxActionModule>;
16
15
  }
@@ -1,5 +1,5 @@
1
+ export * from './snackbar';
1
2
  export * from './transition';
2
3
  export * from './action.confirm.directive';
3
4
  export * from './action.module';
4
- export * from './action.snackbar.component';
5
5
  export * from './key.trigger.directive';
@@ -1,5 +1,5 @@
1
1
  import { Maybe } from '@dereekb/util';
2
- import { ActionContextStoreSourceInstance } from '@dereekb/dbx-core';
2
+ import { DbxActionContextStoreSourceInstance } from '@dereekb/dbx-core';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * Directive that triggers the action on a specific key up event.
@@ -7,9 +7,9 @@ import * as i0 from "@angular/core";
7
7
  * Events/Keys to respond to should be lowercase.
8
8
  */
9
9
  export declare class DbxActionKeyTriggerDirective<T = any, O = any> {
10
- readonly source: ActionContextStoreSourceInstance<T, O>;
10
+ readonly source: DbxActionContextStoreSourceInstance<T, O>;
11
11
  inputKey: Maybe<string>;
12
- constructor(source: ActionContextStoreSourceInstance<T, O>);
12
+ constructor(source: DbxActionContextStoreSourceInstance<T, O>);
13
13
  get key(): string;
14
14
  onKeyupHandler(event: KeyboardEvent): void;
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionKeyTriggerDirective<any, any>, [{ host: true; }]>;
@@ -0,0 +1,33 @@
1
+ @use '../../style/theming';
2
+
3
+ // MARK: Variables
4
+
5
+
6
+ // MARK: Mixin
7
+ @mixin core() {
8
+
9
+ .dbx-action-snackbar {
10
+ display: flex;
11
+ align-items: center;
12
+ }
13
+
14
+ }
15
+
16
+ @mixin color($theme-config) {}
17
+
18
+ @mixin typography($typography-config) {}
19
+
20
+ @mixin theme($theme-config) {
21
+ @include theming.private-check-duplicate-theme-styles($theme-config, 'dbx-action-snackbar') {
22
+ $color: theming.get-color-config($theme-config);
23
+ $typography: theming.get-typography-config($theme-config);
24
+
25
+ @if $color !=null {
26
+ @include color($theme-config);
27
+ }
28
+
29
+ @if $typography !=null {
30
+ @include typography($typography);
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,36 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { LoadingStateType } from '@dereekb/rxjs';
3
+ import { Observable } from 'rxjs';
4
+ import { OnDestroy, AfterViewInit } from '@angular/core';
5
+ import { MatSnackBarRef } from '@angular/material/snack-bar';
6
+ import { Maybe } from '@dereekb/util';
7
+ import { DbxActionSnackbarDisplayConfig, DbxActionSnackbarActionConfig } from './action.snackbar';
8
+ import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * Component for a snackbar that contains an action.
12
+ */
13
+ export declare class DbxActionSnackbarComponent extends AbstractSubscriptionDirective implements OnInit, AfterViewInit, OnDestroy {
14
+ readonly snackbar: MatSnackBarRef<DbxActionSnackbarComponent>;
15
+ readonly data: DbxActionSnackbarDisplayConfig;
16
+ private _durationTimeout;
17
+ private _actionRef;
18
+ readonly value$: Observable<number>;
19
+ readonly sourceInstance$: Observable<import("@dereekb/dbx-core").DbxActionContextStoreSourceInstance<any, any>>;
20
+ readonly complete$: Observable<boolean>;
21
+ readonly loadingStateType$: Observable<LoadingStateType>;
22
+ readonly snackbarStatusClass$: Observable<string>;
23
+ readonly button: Maybe<string>;
24
+ get action(): DbxActionSnackbarActionConfig | undefined;
25
+ get hasAction(): boolean;
26
+ get message(): Maybe<string>;
27
+ get actionConfig(): Maybe<DbxActionSnackbarActionConfig>;
28
+ constructor(snackbar: MatSnackBarRef<DbxActionSnackbarComponent>, data: DbxActionSnackbarDisplayConfig);
29
+ ngOnInit(): void;
30
+ ngOnDestroy(): void;
31
+ ngAfterViewInit(): void;
32
+ dismissAfterActionCompletes: () => void;
33
+ dismiss: () => void;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionSnackbarComponent, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxActionSnackbarComponent, "ng-component", never, {}, {}, never, never>;
36
+ }
@@ -0,0 +1,52 @@
1
+ import { MatSnackBarConfig } from "@angular/material/snack-bar";
2
+ import { DbxActionContextSourceReference } from "@dereekb/dbx-core";
3
+ import { LoadingState, LoadingStateType } from "@dereekb/rxjs";
4
+ import { Maybe } from "@dereekb/util";
5
+ export declare type DbxActionSnackbarType = string;
6
+ export declare type DbxActionSnackbarKnownType = 'none' | 'create' | 'save' | 'delete' | 'merge' | 'send' | 'cancel' | 'restore' | 'refresh' | 'read' | 'unread';
7
+ /**
8
+ * ActionSnackbar event. Depending on the type, a value or error is also available.
9
+ */
10
+ export interface DbxActionSnackbarEvent<O = any> extends Omit<LoadingState<O>, 'loading'> {
11
+ type: LoadingStateType;
12
+ }
13
+ /**
14
+ * Configuration for the actual snackbar popup.
15
+ */
16
+ export interface DbxActionSnackbarDisplayConfig {
17
+ /**
18
+ * Text to be shown on the close button. If action is defined, this is ignored and the action text is used.
19
+ */
20
+ button?: string;
21
+ /**
22
+ * Message to show in the snackbar.
23
+ */
24
+ message?: Maybe<string>;
25
+ /**
26
+ * Additional action that can occur.
27
+ */
28
+ action?: DbxActionSnackbarActionConfig;
29
+ /**
30
+ * MatSnackBar configuration
31
+ */
32
+ snackbar?: MatSnackBarConfig;
33
+ }
34
+ /**
35
+ * Used for configuring an action on the snackbar component.
36
+ */
37
+ export interface DbxActionSnackbarActionConfig {
38
+ /**
39
+ * Action label to display on the button.
40
+ */
41
+ button: string;
42
+ /**
43
+ * Action reference to use.
44
+ *
45
+ * The referred to action is used for triggering and lifecycle.
46
+ */
47
+ reference: DbxActionContextSourceReference;
48
+ /**
49
+ * Duration to show the action.
50
+ */
51
+ duration?: number;
52
+ }
@@ -0,0 +1,2 @@
1
+ import { DbxActionSnackbarEventMakeConfig } from './action.snackbar.service';
2
+ export declare const DBX_ACTION_SNACKBAR_DEFAULTS: DbxActionSnackbarEventMakeConfig;
@@ -0,0 +1,25 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { AbstractSubscriptionDirective, DbxActionContextStoreSourceInstance } from '@dereekb/dbx-core';
3
+ import { Maybe } from '@dereekb/util';
4
+ import { DbxActionSnackbarDisplayConfig, DbxActionSnackbarEvent, DbxActionSnackbarType } from './action.snackbar';
5
+ import { DbxActionSnackbarService } from './action.snackbar.service';
6
+ import { DbxActionSnackbarDisplayConfigGeneratorFunction, DbxActionSnackbarGeneratorUndoInput } from './action.snackbar.generator';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Action directive that displays a snackbar when the action context hits a certain state.
10
+ */
11
+ export declare class DbxActionSnackbarDirective<T = any, O = any> extends AbstractSubscriptionDirective implements OnInit {
12
+ readonly source: DbxActionContextStoreSourceInstance<T, O>;
13
+ readonly dbxActionSnackbarService: DbxActionSnackbarService;
14
+ private _snackbarFunction?;
15
+ get snackbarFunction(): Maybe<DbxActionSnackbarDisplayConfigGeneratorFunction<O>>;
16
+ set snackbarFunction(snackbarFunction: Maybe<'' | DbxActionSnackbarDisplayConfigGeneratorFunction<O>>);
17
+ dbxActionSnackbarDefault?: Maybe<DbxActionSnackbarType>;
18
+ dbxActionSnackbarUndo?: DbxActionSnackbarGeneratorUndoInput;
19
+ constructor(source: DbxActionContextStoreSourceInstance<T, O>, dbxActionSnackbarService: DbxActionSnackbarService);
20
+ ngOnInit(): void;
21
+ protected buildConfigurationForEvent(event: DbxActionSnackbarEvent): Maybe<DbxActionSnackbarDisplayConfig>;
22
+ protected showSnackbarForConfiguration(config: DbxActionSnackbarDisplayConfig, event: DbxActionSnackbarEvent): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionSnackbarDirective<any, any>, [{ host: true; }, null]>;
24
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionSnackbarDirective<any, any>, "[dbxActionSnackbar]", never, { "snackbarFunction": "dbxActionSnackbar"; "dbxActionSnackbarDefault": "dbxActionSnackbarDefault"; "dbxActionSnackbarUndo": "dbxActionSnackbarUndo"; }, {}, never>;
25
+ }
@@ -0,0 +1,32 @@
1
+ import { DbxActionContextSourceReference } from "@dereekb/dbx-core";
2
+ import { Milliseconds, Maybe, ObjectOrGetter, Getter } from "@dereekb/util";
3
+ import { DbxActionSnackbarDisplayConfig, DbxActionSnackbarEvent } from "./action.snackbar";
4
+ export interface DbxActionSnackbarGeneratorInput<O = any> {
5
+ event: DbxActionSnackbarEvent<O>;
6
+ undo?: Maybe<DbxActionSnackbarGeneratorUndoInput>;
7
+ }
8
+ export declare type DbxActionSnackbarGeneratorUndoInput = DbxActionSnackbarGeneratorUndoInputConfig | Getter<DbxActionContextSourceReference>;
9
+ export interface DbxActionSnackbarGeneratorUndoInputConfig {
10
+ duration?: Milliseconds;
11
+ getUndoAction: Getter<DbxActionContextSourceReference>;
12
+ }
13
+ export declare type DbxActionSnackbarDisplayConfigGeneratorFunction<O = any> = (input: DbxActionSnackbarGeneratorInput<O>) => Maybe<DbxActionSnackbarDisplayConfig>;
14
+ export interface DbxMakeActionSnackbarGeneratorConfiguration {
15
+ idle?: ObjectOrGetter<DbxMakeActionSnackbarGeneratorEventConfiguration>;
16
+ loading?: ObjectOrGetter<DbxMakeActionSnackbarGeneratorEventConfiguration>;
17
+ success?: ObjectOrGetter<DbxMakeActionSnackbarGeneratorEventConfiguration>;
18
+ error?: ObjectOrGetter<DbxMakeActionSnackbarGeneratorEventConfiguration>;
19
+ }
20
+ export interface DbxMakeActionSnackbarGeneratorEventConfiguration extends Omit<DbxActionSnackbarDisplayConfig, 'action'> {
21
+ /**
22
+ * Sets the undo action text. If undefined, will default to 'undo'
23
+ */
24
+ undoButtonText?: string;
25
+ }
26
+ /**
27
+ * Creates a DbxActionSnackbarDisplayConfigGeneratorFunction from the input config.
28
+ *
29
+ * @param config
30
+ * @returns
31
+ */
32
+ export declare function makeDbxActionSnackbarDisplayConfigGeneratorFunction<O = any>(config: DbxMakeActionSnackbarGeneratorConfiguration): DbxActionSnackbarDisplayConfigGeneratorFunction<O>;
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./action.snackbar.component";
3
+ import * as i2 from "./action.snackbar.directive";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "../../layout/style/style.layout.module";
6
+ import * as i5 from "@dereekb/dbx-core";
7
+ import * as i6 from "../../interaction/prompt/prompt.module";
8
+ import * as i7 from "../../button/button.module";
9
+ import * as i8 from "../../error/error.module";
10
+ export declare class DbxActionSnackbarModule {
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionSnackbarModule, never>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxActionSnackbarModule, [typeof i1.DbxActionSnackbarComponent, typeof i2.DbxActionSnackbarDirective], [typeof i3.CommonModule, typeof i4.DbxStyleLayoutModule, typeof i5.DbxCoreActionModule, typeof i6.DbxPromptModule, typeof i7.DbxButtonModule, typeof i8.DbxReadableErrorModule], [typeof i1.DbxActionSnackbarComponent, typeof i2.DbxActionSnackbarDirective]>;
13
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxActionSnackbarModule>;
14
+ }
@@ -0,0 +1,39 @@
1
+ import { DbxActionSnackbarComponent } from './action.snackbar.component';
2
+ import { InjectionToken, Type } from "@angular/core";
3
+ import { MatSnackBar, MatSnackBarConfig, MatSnackBarRef } from "@angular/material/snack-bar";
4
+ import { Milliseconds, Maybe } from "@dereekb/util";
5
+ import { DbxActionSnackbarDisplayConfig, DbxActionSnackbarType } from "./action.snackbar";
6
+ import { DbxActionSnackbarGeneratorInput, DbxMakeActionSnackbarGeneratorConfiguration } from "./action.snackbar.generator";
7
+ import * as i0 from "@angular/core";
8
+ export declare const DBX_ACTION_SNACKBAR_SERVICE_CONFIG: InjectionToken<unknown>;
9
+ export declare const DEFAULT_SNACKBAR_DIRECTIVE_DURATION: number;
10
+ export interface DbxActionSnackbarEventMakeConfig {
11
+ [key: string]: DbxMakeActionSnackbarGeneratorConfiguration;
12
+ }
13
+ export interface DbxActionSnackbarServiceConfig<C = any> {
14
+ readonly componentClass: Type<C>;
15
+ readonly snackbar?: Pick<MatSnackBarConfig, 'horizontalPosition' | 'verticalPosition'>;
16
+ readonly defaultDuration?: Milliseconds;
17
+ readonly defaultUndoDuration?: Milliseconds;
18
+ readonly eventTypeConfigs: DbxActionSnackbarEventMakeConfig;
19
+ }
20
+ /**
21
+ * Used for managing/configuring the snackbar default values and pushing snackbar events.
22
+ */
23
+ export declare class DbxActionSnackbarService<C = DbxActionSnackbarComponent> {
24
+ readonly matSnackBar: MatSnackBar;
25
+ readonly config: DbxActionSnackbarServiceConfig<C>;
26
+ get componentClass(): Type<C>;
27
+ get eventTypeConfigs(): DbxActionSnackbarEventMakeConfig;
28
+ constructor(matSnackBar: MatSnackBar, inputConfig: Partial<DbxActionSnackbarServiceConfig<C>>);
29
+ /**
30
+ * Opens a new snackbar given the input configuration.
31
+ *
32
+ * @param config
33
+ * @returns
34
+ */
35
+ openSnackbar(config: DbxActionSnackbarDisplayConfig): MatSnackBarRef<C>;
36
+ generateDisplayConfig(type: Maybe<DbxActionSnackbarType>, input: DbxActionSnackbarGeneratorInput): Maybe<DbxActionSnackbarDisplayConfig>;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionSnackbarService<any>, [null, { optional: true; }]>;
38
+ static ɵprov: i0.ɵɵInjectableDeclaration<DbxActionSnackbarService<any>>;
39
+ }
@@ -0,0 +1,7 @@
1
+ export * from './action.snackbar.component';
2
+ export * from './action.snackbar.default';
3
+ export * from './action.snackbar.directive';
4
+ export * from './action.snackbar.generator';
5
+ export * from './action.snackbar.module';
6
+ export * from './action.snackbar.service';
7
+ export * from './action.snackbar';
@@ -2,7 +2,7 @@ import { OnInit, OnDestroy, ViewContainerRef } from '@angular/core';
2
2
  import { MatDialog } from '@angular/material/dialog';
3
3
  import { HookResult, Transition, TransitionService } from '@uirouter/core';
4
4
  import { Observable } from 'rxjs';
5
- import { ActionContextStoreSourceInstance } from '@dereekb/dbx-core';
5
+ import { DbxActionContextStoreSourceInstance } from '@dereekb/dbx-core';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
8
  * How to handle transitions.
@@ -21,14 +21,14 @@ export declare type DbxActionTransitionSafetyType = 'none' | 'dialog' | 'auto';
21
21
  * NOTE: This dialog only works for uirouter.
22
22
  */
23
23
  export declare class DbxActionTransitionSafetyDirective<T, O> implements OnInit, OnDestroy {
24
- readonly source: ActionContextStoreSourceInstance<T, O>;
24
+ readonly source: DbxActionContextStoreSourceInstance<T, O>;
25
25
  protected readonly transitionService: TransitionService;
26
26
  protected readonly viewContainerRef: ViewContainerRef;
27
27
  protected readonly dialog: MatDialog;
28
28
  inputSafetyType?: DbxActionTransitionSafetyType;
29
29
  private _dialogRef?;
30
30
  private stopWatchingTransition?;
31
- constructor(source: ActionContextStoreSourceInstance<T, O>, transitionService: TransitionService, viewContainerRef: ViewContainerRef, dialog: MatDialog);
31
+ constructor(source: DbxActionContextStoreSourceInstance<T, O>, transitionService: TransitionService, viewContainerRef: ViewContainerRef, dialog: MatDialog);
32
32
  get safetyType(): DbxActionTransitionSafetyType;
33
33
  private get _destroyed();
34
34
  ngOnInit(): void;
@@ -3,8 +3,9 @@ import * as i1 from "./button.component";
3
3
  import * as i2 from "./button.spacer.component";
4
4
  import * as i3 from "@angular/common";
5
5
  import * as i4 from "mat-progress-buttons";
6
+ import * as i5 from "@dereekb/dbx-core";
6
7
  export declare class DbxButtonModule {
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxButtonModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<DbxButtonModule, [typeof i1.DbxButtonComponent, typeof i2.DbxButtonSpacerComponent], [typeof i3.CommonModule, typeof i4.MatProgressButtonsModule], [typeof i4.MatProgressButtonsModule, typeof i1.DbxButtonComponent, typeof i2.DbxButtonSpacerComponent]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxButtonModule, [typeof i1.DbxButtonComponent, typeof i2.DbxButtonSpacerDirective], [typeof i3.CommonModule, typeof i4.MatProgressButtonsModule], [typeof i5.DbxCoreButtonModule, typeof i4.MatProgressButtonsModule, typeof i1.DbxButtonComponent, typeof i2.DbxButtonSpacerDirective]>;
9
10
  static ɵinj: i0.ɵɵInjectorDeclaration<DbxButtonModule>;
10
11
  }
@@ -1,8 +1,8 @@
1
1
  import * as i0 from "@angular/core";
2
2
  /**
3
- * Button spacer component.
3
+ * Button spacer directive.
4
4
  */
5
- export declare class DbxButtonSpacerComponent {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<DbxButtonSpacerComponent, never>;
7
- static ɵcmp: i0.ɵɵComponentDeclaration<DbxButtonSpacerComponent, "dbx-button-spacer", never, {}, {}, never, never>;
5
+ export declare class DbxButtonSpacerDirective {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxButtonSpacerDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DbxButtonSpacerDirective, "dbx-button-spacer,dbxButtonSpacer", never, {}, {}, never>;
8
8
  }
@@ -1,5 +1,5 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { ActionContextStoreSourceInstance, AbstractSubscriptionDirective } from '@dereekb/dbx-core';
2
+ import { DbxActionContextStoreSourceInstance, AbstractSubscriptionDirective } from '@dereekb/dbx-core';
3
3
  import { DbxReadableErrorComponent } from './error.component';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
@@ -7,8 +7,8 @@ import * as i0 from "@angular/core";
7
7
  */
8
8
  export declare class DbxActionErrorDirective extends AbstractSubscriptionDirective implements OnInit {
9
9
  readonly error: DbxReadableErrorComponent;
10
- readonly source: ActionContextStoreSourceInstance;
11
- constructor(error: DbxReadableErrorComponent, source: ActionContextStoreSourceInstance);
10
+ readonly source: DbxActionContextStoreSourceInstance;
11
+ constructor(error: DbxReadableErrorComponent, source: DbxActionContextStoreSourceInstance);
12
12
  ngOnInit(): void;
13
13
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionErrorDirective, [{ host: true; }, null]>;
14
14
  static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionErrorDirective, "[dbxActionError]", never, {}, {}, never>;
@@ -1,5 +1,5 @@
1
- import { NgZone } from '@angular/core';
2
- import { DbxButtonDirective, DbxActionButtonDirective, ActionContextStoreSourceInstance } from '@dereekb/dbx-core';
1
+ import { ChangeDetectorRef } from '@angular/core';
2
+ import { DbxButtonDirective, DbxActionButtonDirective, DbxActionContextStoreSourceInstance } from '@dereekb/dbx-core';
3
3
  import { DbxPopoverActionDirective } from './popover.action.directive';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
7
7
  */
8
8
  export declare class DbxPopoverActionButtonDirective extends DbxActionButtonDirective {
9
9
  readonly appPopoverActionDirective: DbxPopoverActionDirective;
10
- constructor(button: DbxButtonDirective, source: ActionContextStoreSourceInstance, ngZone: NgZone, appPopoverActionDirective: DbxPopoverActionDirective);
10
+ constructor(button: DbxButtonDirective, source: DbxActionContextStoreSourceInstance, cdRef: ChangeDetectorRef, appPopoverActionDirective: DbxPopoverActionDirective);
11
11
  protected _buttonClicked(): void;
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxPopoverActionButtonDirective, [{ host: true; }, null, null, null]>;
13
13
  static ɵdir: i0.ɵɵDirectiveDeclaration<DbxPopoverActionButtonDirective, "[dbxPopoverActionButton]", never, {}, {}, never>;
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs';
2
2
  import { OnInit, OnDestroy, ElementRef } from '@angular/core';
3
3
  import { NgPopoverCloseEvent, NgPopoverRef } from 'ng-overlay-container';
4
4
  import { AbstractPopoverRefWithEventsDirective } from './abstract.popover.ref.directive';
5
- import { ActionContextStoreSourceInstance } from '@dereekb/dbx-core';
5
+ import { DbxActionContextStoreSourceInstance } from '@dereekb/dbx-core';
6
6
  import * as i0 from "@angular/core";
7
7
  export interface DbxPopoverActionFnParam {
8
8
  origin: ElementRef;
@@ -17,13 +17,13 @@ export declare type DbxPopoverActionModifiedFn<T = any> = (value: T) => Observab
17
17
  */
18
18
  export declare class DbxPopoverActionDirective<T = object> extends AbstractPopoverRefWithEventsDirective<any, T> implements OnInit, OnDestroy {
19
19
  readonly elementRef: ElementRef;
20
- readonly source: ActionContextStoreSourceInstance<T, any>;
20
+ readonly source: DbxActionContextStoreSourceInstance<T, any>;
21
21
  fn?: DbxPopoverActionFn<T>;
22
22
  appPopoverActionModified?: DbxPopoverActionModifiedFn<T>;
23
23
  private _popoverValue;
24
24
  private _triggeredSub;
25
25
  private _isModifiedSub;
26
- constructor(elementRef: ElementRef, source: ActionContextStoreSourceInstance<T, any>);
26
+ constructor(elementRef: ElementRef, source: DbxActionContextStoreSourceInstance<T, any>);
27
27
  ngOnInit(): void;
28
28
  ngOnDestroy(): void;
29
29
  protected _makePopoverRef(): NgPopoverRef<any, T>;
@@ -34,6 +34,11 @@ $content-container-padding-small-screen: theming.$padding-2;
34
34
  max-width: $box-max-width;
35
35
  }
36
36
 
37
+ .dbx-app-page {
38
+ @include theming.app-height();
39
+ overflow: hidden;
40
+ }
41
+
37
42
  .dbx-content,
38
43
  .dbx-content-page { //dbx-content page always has page height
39
44
  @include theming.page-height();
@@ -101,8 +106,16 @@ $content-container-padding-small-screen: theming.$padding-2;
101
106
  @mixin color($theme-config) {
102
107
  $color-config: theming.get-color-config($theme-config);
103
108
  $background: map.get($color-config, 'background');
109
+ $foreground: map.get($color-config, 'foreground');
110
+ $content-color: theming.get-color-from-palette($foreground, 'text');
111
+ $content-background: theming.get-color-from-palette($background, 'background');
104
112
  $content-border-background: theming.get-color-from-palette($background, 'hover');
105
113
 
114
+ .dbx-background {
115
+ color: $content-color;
116
+ background: $content-background;
117
+ }
118
+
106
119
  .dbx-content-border {
107
120
  // border-radius: 6px;
108
121
  border: 3px dashed $content-border-background;
@@ -9,6 +9,7 @@ export declare class DbxSectionHeaderComponent {
9
9
  header?: Maybe<string>;
10
10
  icon?: Maybe<string>;
11
11
  hint?: Maybe<string>;
12
+ get showTitle(): boolean;
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxSectionHeaderComponent, never>;
13
14
  static ɵcmp: i0.ɵɵComponentDeclaration<DbxSectionHeaderComponent, ".dbx-section-header", never, { "h": "h"; "header": "header"; "icon": "icon"; "hint": "hint"; }, {}, never, ["*"]>;
14
15
  }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Icon spacer directive.
4
+ */
5
+ export declare class DbxIconSpacerDirective {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxIconSpacerDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DbxIconSpacerDirective, "dbx-icon-spacer,dbxIconSpacer", never, {}, {}, never>;
8
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './hint.component';
2
+ export * from './icon.spacer.component';
2
3
  export * from './label.component';
3
4
  export * from './linkify.component';
4
5
  export * from './note.component';
@@ -8,12 +8,13 @@ import * as i6 from "./label.component";
8
8
  import * as i7 from "./linkify.component";
9
9
  import * as i8 from "./ok.component";
10
10
  import * as i9 from "./text.chips.component";
11
- import * as i10 from "@angular/common";
12
- import * as i11 from "@angular/material/chips";
13
- import * as i12 from "@angular/material/tooltip";
14
- import * as i13 from "@angular/material/icon";
11
+ import * as i10 from "./icon.spacer.component";
12
+ import * as i11 from "@angular/common";
13
+ import * as i12 from "@angular/material/chips";
14
+ import * as i13 from "@angular/material/tooltip";
15
+ import * as i14 from "@angular/material/icon";
15
16
  export declare class DbxTextModule {
16
17
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxTextModule, never>;
17
- static ɵmod: i0.ɵɵNgModuleDeclaration<DbxTextModule, [typeof i1.DbxNoteComponent, typeof i2.DbxNoticeComponent, typeof i3.DbxSuccessComponent, typeof i4.DbxWarnComponent, typeof i5.DbxHintComponent, typeof i6.DbxLabelComponent, typeof i7.DbxLinkifyComponent, typeof i8.DbxOkComponent, typeof i9.DbxTextChipsComponent], [typeof i10.CommonModule, typeof i11.MatChipsModule, typeof i12.MatTooltipModule, typeof i13.MatIconModule], [typeof i1.DbxNoteComponent, typeof i2.DbxNoticeComponent, typeof i3.DbxSuccessComponent, typeof i4.DbxWarnComponent, typeof i5.DbxHintComponent, typeof i6.DbxLabelComponent, typeof i7.DbxLinkifyComponent, typeof i8.DbxOkComponent, typeof i9.DbxTextChipsComponent]>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxTextModule, [typeof i1.DbxNoteComponent, typeof i2.DbxNoticeComponent, typeof i3.DbxSuccessComponent, typeof i4.DbxWarnComponent, typeof i5.DbxHintComponent, typeof i6.DbxLabelComponent, typeof i7.DbxLinkifyComponent, typeof i8.DbxOkComponent, typeof i9.DbxTextChipsComponent, typeof i10.DbxIconSpacerDirective], [typeof i11.CommonModule, typeof i12.MatChipsModule, typeof i13.MatTooltipModule, typeof i14.MatIconModule], [typeof i1.DbxNoteComponent, typeof i2.DbxNoticeComponent, typeof i3.DbxSuccessComponent, typeof i4.DbxWarnComponent, typeof i5.DbxHintComponent, typeof i6.DbxLabelComponent, typeof i7.DbxLinkifyComponent, typeof i8.DbxOkComponent, typeof i9.DbxTextChipsComponent, typeof i10.DbxIconSpacerDirective]>;
18
19
  static ɵinj: i0.ɵɵInjectorDeclaration<DbxTextModule>;
19
20
  }
@@ -1,4 +1,5 @@
1
1
  export * from './basic-loading.component';
2
2
  export * from './loading-progress.component';
3
+ export * from './loading.action.directive';
3
4
  export * from './loading.component';
4
5
  export * from './loading.module';
@@ -0,0 +1,19 @@
1
+ import { DbxActionContextStoreSourceInstance } from '@dereekb/dbx-core';
2
+ import { OnInit, OnDestroy } from '@angular/core';
3
+ import { LoadingStateContextInstance } from '@dereekb/rxjs';
4
+ import { DbxLoadingComponent } from './loading.component';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Context used for linking a loadingComponent to an ActionContext by providing a LoadingContext.
8
+ */
9
+ export declare class DbxActionLoadingContextDirective implements OnInit, OnDestroy {
10
+ readonly loadingComponent: DbxLoadingComponent;
11
+ readonly source: DbxActionContextStoreSourceInstance;
12
+ private _context;
13
+ constructor(loadingComponent: DbxLoadingComponent, source: DbxActionContextStoreSourceInstance);
14
+ get context(): LoadingStateContextInstance<any, import("@dereekb/rxjs").LoadingState<any>>;
15
+ ngOnInit(): void;
16
+ ngOnDestroy(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionLoadingContextDirective, [{ host: true; }, null]>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionLoadingContextDirective, "[dbxActionLoadingContext]", never, {}, {}, never>;
19
+ }
@@ -2,12 +2,13 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./loading.component";
3
3
  import * as i2 from "./basic-loading.component";
4
4
  import * as i3 from "./loading-progress.component";
5
- import * as i4 from "@angular/common";
6
- import * as i5 from "../error/error.module";
7
- import * as i6 from "@angular/material/progress-spinner";
8
- import * as i7 from "@angular/material/progress-bar";
5
+ import * as i4 from "./loading.action.directive";
6
+ import * as i5 from "@angular/common";
7
+ import * as i6 from "../error/error.module";
8
+ import * as i7 from "@angular/material/progress-spinner";
9
+ import * as i8 from "@angular/material/progress-bar";
9
10
  export declare class DbxLoadingModule {
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxLoadingModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<DbxLoadingModule, [typeof i1.DbxLoadingComponent, typeof i2.DbxBasicLoadingComponent, typeof i3.DbxLoadingProgressComponent], [typeof i4.CommonModule, typeof i5.DbxReadableErrorModule, typeof i6.MatProgressSpinnerModule, typeof i7.MatProgressBarModule], [typeof i1.DbxLoadingComponent, typeof i2.DbxBasicLoadingComponent, typeof i3.DbxLoadingProgressComponent, typeof i6.MatProgressSpinnerModule, typeof i7.MatProgressBarModule]>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxLoadingModule, [typeof i1.DbxLoadingComponent, typeof i2.DbxBasicLoadingComponent, typeof i3.DbxLoadingProgressComponent, typeof i4.DbxActionLoadingContextDirective], [typeof i5.CommonModule, typeof i6.DbxReadableErrorModule, typeof i7.MatProgressSpinnerModule, typeof i8.MatProgressBarModule], [typeof i1.DbxLoadingComponent, typeof i2.DbxBasicLoadingComponent, typeof i3.DbxLoadingProgressComponent, typeof i7.MatProgressSpinnerModule, typeof i8.MatProgressBarModule, typeof i4.DbxActionLoadingContextDirective]>;
12
13
  static ɵinj: i0.ɵɵInjectorDeclaration<DbxLoadingModule>;
13
14
  }