@dereekb/dbx-web 10.1.3 → 10.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/calendar/package.json +1 -1
- package/esm2022/lib/action/snackbar/action.snackbar.component.mjs +7 -7
- package/esm2022/lib/action/snackbar/action.snackbar.module.mjs +4 -3
- package/esm2022/lib/action/snackbar/action.snackbar.service.mjs +3 -4
- package/esm2022/lib/action/transition/transition.safety.dialog.component.mjs +1 -1
- package/esm2022/lib/button/progress/spinner.button.component.mjs +2 -2
- package/esm2022/lib/error/default.error.widget.component.mjs +3 -1
- package/esm2022/lib/error/error.api.mjs +1 -1
- package/esm2022/lib/error/error.component.mjs +123 -25
- package/esm2022/lib/error/error.module.mjs +13 -1
- package/esm2022/lib/error/error.snackbar.action.directive.mjs +37 -0
- package/esm2022/lib/error/error.snackbar.component.mjs +71 -0
- package/esm2022/lib/error/error.snackbar.service.mjs +41 -0
- package/esm2022/lib/error/error.view.component.mjs +44 -0
- package/esm2022/lib/error/error.widget.component.mjs +22 -9
- package/esm2022/lib/error/error.widget.service.mjs +27 -3
- package/esm2022/lib/error/index.mjs +5 -1
- package/esm2022/lib/extension/download/text/download.text.component.mjs +2 -2
- package/esm2022/lib/layout/column/two/two.column.right.component.mjs +7 -4
- package/esm2022/lib/layout/list/list.view.value.group.title.directive.mjs +16 -15
- package/esm2022/lib/layout/list/list.view.value.group.title.mjs +1 -1
- package/esm2022/lib/loading/basic-loading.component.mjs +1 -1
- package/fesm2022/dereekb-dbx-web.mjs +404 -94
- package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
- package/lib/action/snackbar/action.snackbar.component.d.ts +2 -2
- package/lib/button/_button.scss +10 -1
- package/lib/button/progress/spinner.button.component.scss +1 -1
- package/lib/error/_error.scss +27 -1
- package/lib/error/error.component.d.ts +35 -11
- package/lib/error/error.module.d.ts +14 -11
- package/lib/error/error.snackbar.action.directive.d.ts +18 -0
- package/lib/error/error.snackbar.component.d.ts +40 -0
- package/lib/error/error.snackbar.service.d.ts +17 -0
- package/lib/error/error.view.component.d.ts +24 -0
- package/lib/error/error.widget.service.d.ts +33 -2
- package/lib/error/index.d.ts +4 -0
- package/lib/extension/download/text/download.text.component.d.ts +3 -3
- package/lib/interaction/dialog/_dialog.scss +4 -0
- package/lib/layout/column/_column.scss +1 -1
- package/lib/layout/column/two/two.column.right.component.d.ts +2 -1
- package/lib/layout/content/_content.scss +0 -5
- package/lib/layout/list/_list.scss +2 -3
- package/lib/layout/list/list.view.value.group.title.d.ts +4 -0
- package/lib/layout/section/_section.scss +2 -0
- package/lib/layout/style/_style.scss +1 -4
- package/lib/layout/text/_text.scss +21 -1
- package/mapbox/package.json +1 -1
- package/package.json +1 -2
- package/table/package.json +1 -1
|
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
* Component for a snackbar that contains an action.
|
|
11
11
|
*/
|
|
12
12
|
export declare class DbxActionSnackbarComponent extends AbstractSubscriptionDirective implements OnInit, AfterViewInit, OnDestroy {
|
|
13
|
-
readonly
|
|
13
|
+
readonly snackbarRef: MatSnackBarRef<DbxActionSnackbarComponent>;
|
|
14
14
|
readonly data: DbxActionSnackbarDisplayConfig;
|
|
15
15
|
private _durationTimeout;
|
|
16
16
|
private _actionRef;
|
|
@@ -24,7 +24,7 @@ export declare class DbxActionSnackbarComponent extends AbstractSubscriptionDire
|
|
|
24
24
|
get hasAction(): boolean;
|
|
25
25
|
get message(): Maybe<string>;
|
|
26
26
|
get actionConfig(): Maybe<DbxActionSnackbarActionConfig>;
|
|
27
|
-
constructor(
|
|
27
|
+
constructor(snackbarRef: MatSnackBarRef<DbxActionSnackbarComponent>, data: DbxActionSnackbarDisplayConfig);
|
|
28
28
|
ngOnInit(): void;
|
|
29
29
|
ngOnDestroy(): void;
|
|
30
30
|
ngAfterViewInit(): void;
|
package/lib/button/_button.scss
CHANGED
|
@@ -13,7 +13,6 @@ $big-button-height: 46px; // 33% bigger
|
|
|
13
13
|
.dbx-button-big {
|
|
14
14
|
.mdc-button.mat-mdc-button {
|
|
15
15
|
height: $big-button-height;
|
|
16
|
-
line-height: $big-button-height;
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
|
|
@@ -37,6 +36,16 @@ $big-button-height: 46px; // 33% bigger
|
|
|
37
36
|
align-items: center;
|
|
38
37
|
}
|
|
39
38
|
|
|
39
|
+
.dbx-button-text-option-button {
|
|
40
|
+
.dbx-button {
|
|
41
|
+
margin-bottom: 6px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dbx-base-button .mdc-button__label {
|
|
45
|
+
padding: 8px 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
40
49
|
.dbx-grow-button {
|
|
41
50
|
width: 100%;
|
|
42
51
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
button {
|
|
3
3
|
min-height: 36px;
|
|
4
4
|
height: unset; // allow height to expand
|
|
5
|
-
|
|
6
5
|
outline: none;
|
|
7
6
|
|
|
8
7
|
&.working {
|
|
@@ -19,6 +18,7 @@
|
|
|
19
18
|
// icon button fixes
|
|
20
19
|
min-width: unset;
|
|
21
20
|
--mdc-icon-button-icon-size: unset;
|
|
21
|
+
border-radius: 50%; // sometimes the css order seems to be different, causing the button to lose its radius
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&.fullWidth {
|
package/lib/error/_error.scss
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// MARK: Variables
|
|
4
4
|
$error-padding: 8px;
|
|
5
|
+
$error-message-button-margin: 12px;
|
|
5
6
|
|
|
6
7
|
// MARK: Mixin
|
|
7
8
|
@mixin core() {
|
|
@@ -12,7 +13,7 @@ $error-padding: 8px;
|
|
|
12
13
|
align-items: center;
|
|
13
14
|
|
|
14
15
|
.dbx-error-message {
|
|
15
|
-
margin-left:
|
|
16
|
+
margin-left: $error-message-button-margin;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -20,9 +21,34 @@ $error-padding: 8px;
|
|
|
20
21
|
overflow: hidden;
|
|
21
22
|
box-sizing: border-box;
|
|
22
23
|
}
|
|
24
|
+
|
|
25
|
+
.dbx-error-snackbar {
|
|
26
|
+
.mdc-snackbar__label {
|
|
27
|
+
padding-left: 8px;
|
|
28
|
+
padding-right: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.dbx-error-snackbar-content-button {
|
|
32
|
+
margin-left: $error-message-button-margin;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dbx-error-snackbar-content {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: row;
|
|
38
|
+
align-items: center;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
23
41
|
}
|
|
24
42
|
|
|
25
43
|
@mixin color($theme-config) {
|
|
44
|
+
.mat-mdc-snack-bar-container.dbx-error-snackbar {
|
|
45
|
+
--mdc-snackbar-container-color: var(--dbx-warn-color);
|
|
46
|
+
--mdc-snackbar-supporting-text-color: var(--dbx-warn-color-contrast);
|
|
47
|
+
|
|
48
|
+
.dbx-error-snackbar-content .dbx-warn {
|
|
49
|
+
color: var(--mdc-snackbar-supporting-text-color);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
26
52
|
}
|
|
27
53
|
|
|
28
54
|
@mixin typography($theme-config-or-typography-config) {
|
|
@@ -1,20 +1,44 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { Maybe, ErrorInput, ReadableError } from '@dereekb/util';
|
|
3
3
|
import { DbxPopoverService } from '../interaction/popover/popover.service';
|
|
4
|
+
import { AbstractSubscriptionDirective, DbxInjectionComponentConfig } from '@dereekb/dbx-core';
|
|
5
|
+
import { DbxErrorViewButtonEvent } from './error.view.component';
|
|
6
|
+
import { DbxErrorWidgetService } from './error.widget.service';
|
|
7
|
+
import { NgPopoverRef } from 'ng-overlay-container';
|
|
4
8
|
import * as i0 from "@angular/core";
|
|
9
|
+
type DbxReadableErrorComponentViewType = 'none' | 'default' | 'custom';
|
|
10
|
+
interface DbxReadableErrorComponentState {
|
|
11
|
+
readonly viewType: DbxReadableErrorComponentViewType;
|
|
12
|
+
readonly isDefaultError?: Maybe<boolean>;
|
|
13
|
+
readonly message?: Maybe<string>;
|
|
14
|
+
readonly rawError?: Maybe<ErrorInput>;
|
|
15
|
+
readonly error?: Maybe<ReadableError>;
|
|
16
|
+
readonly customView?: Maybe<DbxInjectionComponentConfig>;
|
|
17
|
+
}
|
|
5
18
|
/**
|
|
6
|
-
*
|
|
19
|
+
* Root error component that displays content related to an error.
|
|
7
20
|
*/
|
|
8
|
-
export declare class DbxReadableErrorComponent {
|
|
21
|
+
export declare class DbxReadableErrorComponent extends AbstractSubscriptionDirective {
|
|
9
22
|
readonly popoverService: DbxPopoverService;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
23
|
+
readonly dbxErrorWidgetService: DbxErrorWidgetService;
|
|
24
|
+
readonly cdRef: ChangeDetectorRef;
|
|
25
|
+
readonly popoverOpen: EventEmitter<NgPopoverRef<any, any>>;
|
|
26
|
+
private _state;
|
|
27
|
+
private _iconOnly;
|
|
28
|
+
private _inputError;
|
|
29
|
+
readonly state$: import("rxjs").Observable<DbxReadableErrorComponentState>;
|
|
30
|
+
constructor(popoverService: DbxPopoverService, dbxErrorWidgetService: DbxErrorWidgetService, cdRef: ChangeDetectorRef);
|
|
31
|
+
ngOnInit(): void;
|
|
32
|
+
protected get viewType(): DbxReadableErrorComponentViewType;
|
|
33
|
+
protected get isDefaultError(): Maybe<boolean>;
|
|
34
|
+
protected get message(): Maybe<string>;
|
|
35
|
+
protected get customView(): Maybe<DbxInjectionComponentConfig>;
|
|
36
|
+
get error(): Maybe<ErrorInput>;
|
|
14
37
|
set error(error: Maybe<ErrorInput>);
|
|
15
|
-
get
|
|
16
|
-
|
|
17
|
-
openErrorPopover(): void;
|
|
38
|
+
get iconOnly(): Maybe<boolean>;
|
|
39
|
+
set iconOnly(iconOnly: Maybe<boolean>);
|
|
40
|
+
protected openErrorPopover(event: DbxErrorViewButtonEvent): void;
|
|
18
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxReadableErrorComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DbxReadableErrorComponent, "dbx-error", never, { "error": { "alias": "error"; "required": false; }; }, {}, never, never, false, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxReadableErrorComponent, "dbx-error", never, { "error": { "alias": "error"; "required": false; }; "iconOnly": { "alias": "iconOnly"; "required": false; }; }, { "popoverOpen": "popoverOpen"; }, never, never, false, never>;
|
|
20
43
|
}
|
|
44
|
+
export {};
|
|
@@ -2,18 +2,21 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./error.component";
|
|
3
3
|
import * as i2 from "./error.loading.directive";
|
|
4
4
|
import * as i3 from "./error.action.directive";
|
|
5
|
-
import * as i4 from "./error.
|
|
6
|
-
import * as i5 from "./error.
|
|
7
|
-
import * as i6 from "./error.
|
|
8
|
-
import * as i7 from "./
|
|
9
|
-
import * as i8 from "
|
|
10
|
-
import * as i9 from "
|
|
11
|
-
import * as i10 from "
|
|
12
|
-
import * as i11 from "
|
|
13
|
-
import * as i12 from "
|
|
14
|
-
import * as i13 from "@
|
|
5
|
+
import * as i4 from "./error.snackbar.action.directive";
|
|
6
|
+
import * as i5 from "./error.view.component";
|
|
7
|
+
import * as i6 from "./error.snackbar.component";
|
|
8
|
+
import * as i7 from "./error.popover.component";
|
|
9
|
+
import * as i8 from "./error.details.component";
|
|
10
|
+
import * as i9 from "./error.widget.component";
|
|
11
|
+
import * as i10 from "./default.error.widget.component";
|
|
12
|
+
import * as i11 from "@angular/common";
|
|
13
|
+
import * as i12 from "../layout/text/text.module";
|
|
14
|
+
import * as i13 from "@dereekb/dbx-core";
|
|
15
|
+
import * as i14 from "../interaction/popover/popover.content.module";
|
|
16
|
+
import * as i15 from "@angular/material/button";
|
|
17
|
+
import * as i16 from "@angular/material/icon";
|
|
15
18
|
export declare class DbxReadableErrorModule {
|
|
16
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxReadableErrorModule, never>;
|
|
17
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxReadableErrorModule, [typeof i1.DbxReadableErrorComponent, typeof i2.DbxLoadingErrorDirective, typeof i3.DbxActionErrorDirective, typeof i4.
|
|
20
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxReadableErrorModule, [typeof i1.DbxReadableErrorComponent, typeof i2.DbxLoadingErrorDirective, typeof i3.DbxActionErrorDirective, typeof i4.DbxActionSnackbarErrorDirective, typeof i5.DbxErrorViewComponent, typeof i6.DbxErrorSnackbarComponent, typeof i7.DbxErrorPopoverComponent, typeof i8.DbxErrorDetailsComponent, typeof i9.DbxErrorWidgetViewComponent, typeof i10.DbxErrorDefaultErrorWidgetComponent], [typeof i11.CommonModule, typeof i12.DbxTextModule, typeof i13.DbxInjectionComponentModule, typeof i14.DbxPopoverInteractionContentModule, typeof i15.MatButtonModule, typeof i16.MatIconModule], [typeof i1.DbxReadableErrorComponent, typeof i2.DbxLoadingErrorDirective, typeof i3.DbxActionErrorDirective, typeof i4.DbxActionSnackbarErrorDirective, typeof i5.DbxErrorViewComponent, typeof i6.DbxErrorSnackbarComponent, typeof i7.DbxErrorPopoverComponent, typeof i8.DbxErrorDetailsComponent, typeof i9.DbxErrorWidgetViewComponent, typeof i10.DbxErrorDefaultErrorWidgetComponent]>;
|
|
18
21
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxReadableErrorModule>;
|
|
19
22
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DbxActionContextStoreSourceInstance, AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
3
|
+
import { DbxErrorSnackbarService } from './error.snackbar.service';
|
|
4
|
+
import { Maybe, Milliseconds } from '@dereekb/util';
|
|
5
|
+
import { DbxErrorSnackbarConfig } from './error.snackbar.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Context used for displaying an error from an ActionContext a snackbar when an ReadableErrorComponent
|
|
9
|
+
*/
|
|
10
|
+
export declare class DbxActionSnackbarErrorDirective extends AbstractSubscriptionDirective implements OnInit {
|
|
11
|
+
readonly dbxErrorSnackbarService: DbxErrorSnackbarService;
|
|
12
|
+
readonly source: DbxActionContextStoreSourceInstance;
|
|
13
|
+
config?: Maybe<DbxErrorSnackbarConfig> | Milliseconds | '';
|
|
14
|
+
constructor(dbxErrorSnackbarService: DbxErrorSnackbarService, source: DbxActionContextStoreSourceInstance);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionSnackbarErrorDirective, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionSnackbarErrorDirective, "[dbxActionSnackbarError]", never, { "config": { "alias": "dbxActionSnackbarError"; "required": false; }; }, {}, never, never, false, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { MatSnackBar, MatSnackBarConfig, MatSnackBarRef } from '@angular/material/snack-bar';
|
|
3
|
+
import { ErrorInput } from '@dereekb/util';
|
|
4
|
+
import { NgPopoverRef } from 'ng-overlay-container';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export type DbxErrorSnackbarConfig = Omit<MatSnackBarConfig<any>, 'data' | 'viewContainerRef'>;
|
|
7
|
+
export interface DbxErrorSnackbarData<T extends ErrorInput = ErrorInput> {
|
|
8
|
+
/**
|
|
9
|
+
* The error being passed to the error view.
|
|
10
|
+
*/
|
|
11
|
+
readonly error: T;
|
|
12
|
+
/**
|
|
13
|
+
* Duration to show the error before closing while not interacting with the error view.
|
|
14
|
+
*
|
|
15
|
+
* While the error's info view is open the snackbar will not automatically be dismissed.
|
|
16
|
+
*/
|
|
17
|
+
readonly duration?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A snackbar orientation for an error.
|
|
21
|
+
*/
|
|
22
|
+
export declare class DbxErrorSnackbarComponent implements OnDestroy {
|
|
23
|
+
readonly snackBarRef: MatSnackBarRef<DbxErrorSnackbarComponent>;
|
|
24
|
+
readonly data: DbxErrorSnackbarData;
|
|
25
|
+
private _allowAutoDismiss;
|
|
26
|
+
private _popoverOpen;
|
|
27
|
+
private _autoDismissTimer;
|
|
28
|
+
private _popoverSub;
|
|
29
|
+
private _popoverSyncSub;
|
|
30
|
+
private _autoDismissSub;
|
|
31
|
+
get error(): ErrorInput;
|
|
32
|
+
constructor(snackBarRef: MatSnackBarRef<DbxErrorSnackbarComponent>, data: DbxErrorSnackbarData);
|
|
33
|
+
ngOnInit(): void;
|
|
34
|
+
ngOnDestroy(): void;
|
|
35
|
+
static showErrorSnackbar(matSnackbar: MatSnackBar, error: ErrorInput, config?: DbxErrorSnackbarConfig): void;
|
|
36
|
+
errorPopoverOpen(popover: NgPopoverRef): void;
|
|
37
|
+
dismiss(): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxErrorSnackbarComponent, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxErrorSnackbarComponent, "ng-component", never, {}, {}, never, never, false, never>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
2
|
+
import { ErrorInput, Maybe } from '@dereekb/util';
|
|
3
|
+
import { DbxErrorSnackbarConfig } from './error.snackbar.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Service used to show errors in the snackbar.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DbxErrorSnackbarService {
|
|
9
|
+
readonly matSnackbar: MatSnackBar;
|
|
10
|
+
private _defaultConfig;
|
|
11
|
+
constructor(matSnackbar: MatSnackBar);
|
|
12
|
+
get defaultConfig(): DbxErrorSnackbarConfig;
|
|
13
|
+
setDefaultConfig(defaultConfig: DbxErrorSnackbarConfig): void;
|
|
14
|
+
showSnackbarError(error: ErrorInput, inputConfig?: Maybe<DbxErrorSnackbarConfig>): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxErrorSnackbarService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DbxErrorSnackbarService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface DbxErrorViewButtonEvent {
|
|
5
|
+
readonly origin: ElementRef;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The basic error view.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DbxErrorViewComponent implements OnDestroy {
|
|
11
|
+
icon: string;
|
|
12
|
+
message?: Maybe<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Whether or not the error button is disabled.
|
|
15
|
+
*/
|
|
16
|
+
buttonDisabled?: Maybe<boolean>;
|
|
17
|
+
readonly buttonClick: EventEmitter<DbxErrorViewButtonEvent>;
|
|
18
|
+
buttonOrigin: ElementRef;
|
|
19
|
+
constructor();
|
|
20
|
+
ngOnDestroy(): void;
|
|
21
|
+
clickError(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxErrorViewComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxErrorViewComponent, "dbx-error-view", never, { "icon": { "alias": "icon"; "required": false; }; "message": { "alias": "message"; "required": false; }; "buttonDisabled": { "alias": "buttonDisabled"; "required": false; }; }, { "buttonClick": "buttonClick"; }, never, never, false, never>;
|
|
24
|
+
}
|
|
@@ -2,6 +2,7 @@ import { Type } from '@angular/core';
|
|
|
2
2
|
import { Maybe, StringErrorCode } from '@dereekb/util';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare const DEFAULT_ERROR_WIDGET_CODE = "DEFAULT_ERROR_WIDGET";
|
|
5
|
+
export declare const UNKNOWN_ERROR_WIDGET_CODE = "UNKNOWN_ERROR_WIDGET";
|
|
5
6
|
export interface DbxErrorWidgetEntry {
|
|
6
7
|
/**
|
|
7
8
|
* Error code to respond to.
|
|
@@ -9,19 +10,49 @@ export interface DbxErrorWidgetEntry {
|
|
|
9
10
|
readonly code: StringErrorCode;
|
|
10
11
|
/**
|
|
11
12
|
* Error widget component class to use.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated use `widgetComponentClass` instead.
|
|
12
15
|
*/
|
|
13
|
-
readonly componentClass
|
|
16
|
+
readonly componentClass?: Maybe<Type<unknown>>;
|
|
17
|
+
/**
|
|
18
|
+
* In-line error widget component class to use.
|
|
19
|
+
*
|
|
20
|
+
* This changes how it appears in dbx-error.
|
|
21
|
+
*
|
|
22
|
+
* If not provided, dbx-error will display the default output.
|
|
23
|
+
*/
|
|
24
|
+
readonly errorComponentClass?: Maybe<Type<unknown>>;
|
|
25
|
+
/**
|
|
26
|
+
* Custom popup error widget component class to use.
|
|
27
|
+
*
|
|
28
|
+
* This changes how it appears in the dbx-error-widget-view.
|
|
29
|
+
*
|
|
30
|
+
* If not provided, the widget will display the default entry.
|
|
31
|
+
*/
|
|
32
|
+
readonly widgetComponentClass?: Maybe<Type<unknown>>;
|
|
14
33
|
}
|
|
34
|
+
export type DbxErrorWidgetEntryWithPopupComponentClass = Omit<DbxErrorWidgetEntry, 'popupComponentClass'> & {
|
|
35
|
+
popupComponentClass: Type<unknown>;
|
|
36
|
+
};
|
|
15
37
|
/**
|
|
16
38
|
* Service used to register error widgets.
|
|
39
|
+
*
|
|
40
|
+
* It has two default widgets:
|
|
41
|
+
*
|
|
42
|
+
* - default: used in cases where an error has been registered by its error code
|
|
43
|
+
* - unknown: used in cases where an error has an error code that has not been registered
|
|
44
|
+
*
|
|
45
|
+
* By default the DbxErrorDefaultErrorWidgetComponent is registered to both the default and unknown error entries.
|
|
17
46
|
*/
|
|
18
47
|
export declare class DbxErrorWidgetService {
|
|
19
48
|
private _entries;
|
|
20
49
|
constructor();
|
|
21
|
-
registerDefaultEntry(entry: Omit<DbxErrorWidgetEntry, 'code'>): boolean;
|
|
50
|
+
registerDefaultEntry(entry: Omit<DbxErrorWidgetEntry, 'errorComponentClass' | 'code'>): boolean;
|
|
51
|
+
registerUnknownEntry(entry: Omit<DbxErrorWidgetEntry, 'errorComponentClass' | 'code'>): boolean;
|
|
22
52
|
register(entry: DbxErrorWidgetEntry, override?: boolean): boolean;
|
|
23
53
|
getErrorWidgetIdentifiers(): StringErrorCode[];
|
|
24
54
|
getDefaultErrorWidgetEntry(): Maybe<DbxErrorWidgetEntry>;
|
|
55
|
+
getUnknownErrorWidgetEntry(): Maybe<DbxErrorWidgetEntry>;
|
|
25
56
|
getErrorWidgetEntry(code: StringErrorCode): Maybe<DbxErrorWidgetEntry>;
|
|
26
57
|
getErrorWidgetEntries(codes: Iterable<StringErrorCode>): DbxErrorWidgetEntry[];
|
|
27
58
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxErrorWidgetService, never>;
|
package/lib/error/index.d.ts
CHANGED
|
@@ -2,10 +2,14 @@ export * from './default.error.widget.component';
|
|
|
2
2
|
export * from './error.action.directive';
|
|
3
3
|
export * from './error.api';
|
|
4
4
|
export * from './error.component';
|
|
5
|
+
export * from './error.view.component';
|
|
5
6
|
export * from './error.details.component';
|
|
6
7
|
export * from './error.loading.directive';
|
|
7
8
|
export * from './error.module';
|
|
8
9
|
export * from './error.popover.component';
|
|
10
|
+
export * from './error.snackbar.action.directive';
|
|
11
|
+
export * from './error.snackbar.component';
|
|
12
|
+
export * from './error.snackbar.service';
|
|
9
13
|
export * from './error.widget.component';
|
|
10
14
|
export * from './error.widget.directive';
|
|
11
15
|
export * from './error.widget.service';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
3
|
-
import {
|
|
4
|
-
import { LoadingState } from '@dereekb/rxjs';
|
|
3
|
+
import { WorkUsingObservable, LoadingState } from '@dereekb/rxjs';
|
|
5
4
|
import { Maybe } from '@dereekb/util';
|
|
6
5
|
import { Observable } from 'rxjs';
|
|
7
6
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
8
7
|
import { DownloadTextContent } from './download.text';
|
|
9
8
|
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
9
|
+
import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
/**
|
|
12
12
|
* DbxStructureDirective used specifically on the body of the app.
|
|
@@ -34,7 +34,7 @@ export declare class DbxDownloadTextViewComponent extends AbstractSubscriptionDi
|
|
|
34
34
|
set contentState(contentState: Maybe<LoadingState<DownloadTextContent>>);
|
|
35
35
|
set downloadButton(downloadButton: ElementRef);
|
|
36
36
|
ngOnDestroy(): void;
|
|
37
|
-
readonly handleCopyToClipboard:
|
|
37
|
+
readonly handleCopyToClipboard: WorkUsingObservable;
|
|
38
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxDownloadTextViewComponent, never>;
|
|
39
39
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxDownloadTextViewComponent, "dbx-download-text-view", never, { "loadingText": { "alias": "loadingText"; "required": false; }; "linear": { "alias": "linear"; "required": false; }; "showTitle": { "alias": "showTitle"; "required": false; }; "showPreview": { "alias": "showPreview"; "required": false; }; "content": { "alias": "content"; "required": false; }; "contentState": { "alias": "contentState"; "required": false; }; }, {}, never, never, false, never>;
|
|
40
40
|
}
|
|
@@ -16,6 +16,10 @@ $dbx-dialog-content-close-right-offset: $dbx-dialog-content-close-edge-padding;
|
|
|
16
16
|
padding: $mat-dialog-container-padding;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
.dbx-dialog-content.normal-dialog-content {
|
|
20
|
+
min-width: unset;
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
.mdc-dialog__container .dbx-dialog-content {
|
|
20
24
|
&.wide-dialog-content {
|
|
21
25
|
width: $max-dialog-width;
|
|
@@ -11,6 +11,7 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class DbxTwoColumnRightComponent implements AfterViewInit, OnDestroy {
|
|
13
13
|
private readonly twoColumnsContextStore;
|
|
14
|
+
full: boolean;
|
|
14
15
|
header?: Maybe<string>;
|
|
15
16
|
block?: boolean;
|
|
16
17
|
private _showBack;
|
|
@@ -27,5 +28,5 @@ export declare class DbxTwoColumnRightComponent implements AfterViewInit, OnDest
|
|
|
27
28
|
set minRightWidth(minRightWidth: Maybe<number | ''>);
|
|
28
29
|
backClicked(): void;
|
|
29
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxTwoColumnRightComponent, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DbxTwoColumnRightComponent, "dbx-two-column-right", never, { "header": { "alias": "header"; "required": false; }; "block": { "alias": "block"; "required": false; }; "showBack": { "alias": "showBack"; "required": false; }; "minRightWidth": { "alias": "minRightWidth"; "required": false; }; }, {}, never, ["[nav]", "*"], false, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxTwoColumnRightComponent, "dbx-two-column-right", never, { "full": { "alias": "full"; "required": false; }; "header": { "alias": "header"; "required": false; }; "block": { "alias": "block"; "required": false; }; "showBack": { "alias": "showBack"; "required": false; }; "minRightWidth": { "alias": "minRightWidth"; "required": false; }; }, {}, never, ["[nav]", "*"], false, never>;
|
|
31
32
|
}
|
|
@@ -178,11 +178,6 @@ $scroll-content-bottom-padding: 42px;
|
|
|
178
178
|
$accent-color: theming.get-color-from-palette($accent, 500);
|
|
179
179
|
$warn-color: theming.get-color-from-palette($warn, 500);
|
|
180
180
|
|
|
181
|
-
.dbx-background {
|
|
182
|
-
color: $content-color;
|
|
183
|
-
background: $content-background;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
181
|
.dbx-content-pit {
|
|
187
182
|
background: $content-border-background;
|
|
188
183
|
}
|
|
@@ -72,9 +72,8 @@ $list-item-padded-min-height: 42px;
|
|
|
72
72
|
position: sticky;
|
|
73
73
|
top: 0;
|
|
74
74
|
|
|
75
|
-
.dbx-list-two-line-item {
|
|
76
|
-
padding: 2px 0;
|
|
77
|
-
margin-right: 2px;
|
|
75
|
+
.dbx-list-two-line-item .dbx-list-two-line-item-with-icon {
|
|
76
|
+
padding: 2px 0; // override the padding when there is an icon
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
}
|
|
@@ -42,6 +42,10 @@ export interface DbxListTitleGroupTitleDelegate<T, O extends PrimativeKey, D ext
|
|
|
42
42
|
* DbxListTitleGroupHeaderComponent is injected by default.
|
|
43
43
|
*/
|
|
44
44
|
readonly headerComponentClass?: Type<unknown>;
|
|
45
|
+
/**
|
|
46
|
+
* Custom footer component class to inject, if applicable.
|
|
47
|
+
*/
|
|
48
|
+
readonly footerComponentClass?: Type<unknown>;
|
|
45
49
|
/**
|
|
46
50
|
* (Optional) CSS classes to apply to the group.
|
|
47
51
|
*/
|
|
@@ -165,11 +165,8 @@
|
|
|
165
165
|
color: theming.$dbx-disabled-color;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
+
.dbx-background, // COMPAT: Remove dbx-background later
|
|
168
169
|
.dbx-bg {
|
|
169
|
-
color: theming.$dbx-disabled-color;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.dbx-background {
|
|
173
170
|
background: theming.$dbx-bg-color-contrast;
|
|
174
171
|
color: theming.$dbx-bg-color;
|
|
175
172
|
}
|
|
@@ -29,11 +29,25 @@ $dbx-detail-block-content-offset: 30px;
|
|
|
29
29
|
text-align: center;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
.dbx-u {
|
|
33
|
+
text-decoration: underline;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.text-left {
|
|
37
|
+
text-align: left;
|
|
38
|
+
}
|
|
39
|
+
|
|
32
40
|
.dbx-json,
|
|
33
41
|
.prettyjson {
|
|
34
42
|
white-space: pre-wrap !important;
|
|
35
43
|
}
|
|
36
44
|
|
|
45
|
+
.dbx-iframe {
|
|
46
|
+
height: 100%;
|
|
47
|
+
width: 100%;
|
|
48
|
+
border: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
37
51
|
.dbx-label-block {
|
|
38
52
|
display: block;
|
|
39
53
|
padding: 3px 0;
|
|
@@ -45,7 +59,7 @@ $dbx-detail-block-content-offset: 30px;
|
|
|
45
59
|
|
|
46
60
|
.mat-icon {
|
|
47
61
|
padding-right: 6px;
|
|
48
|
-
flex-shrink: 0; // do not
|
|
62
|
+
flex-shrink: 0; // do not allow shrinking
|
|
49
63
|
}
|
|
50
64
|
|
|
51
65
|
.dbx-anchor-a {
|
|
@@ -130,6 +144,12 @@ $dbx-detail-block-content-offset: 30px;
|
|
|
130
144
|
min-height: 20px;
|
|
131
145
|
}
|
|
132
146
|
|
|
147
|
+
.dbx-chip-small-text .dbx-chip,
|
|
148
|
+
.dbx-chip-small-text.dbx-chip,
|
|
149
|
+
.dbx-chip-small-text.dbx-chip.dbx-chip-small {
|
|
150
|
+
font-size: 10px;
|
|
151
|
+
}
|
|
152
|
+
|
|
133
153
|
.dbx-chip.dbx-chip-block {
|
|
134
154
|
border-radius: 0;
|
|
135
155
|
}
|
package/mapbox/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-web",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.5",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^16.2.12",
|
|
6
6
|
"@angular/core": "^16.2.12",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"@dereekb/dbx-core": "*",
|
|
11
11
|
"@dereekb/util": "*",
|
|
12
12
|
"rxjs": "^7.5.0",
|
|
13
|
-
"ms": "^3.0.0-canary.1",
|
|
14
13
|
"@uirouter/core": "^6.0.8",
|
|
15
14
|
"@ngrx/store": "^16.0.0",
|
|
16
15
|
"@ngrx/effects": "^16.0.0",
|