@dereekb/dbx-web 10.1.3 → 10.1.4

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.
@@ -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
 
@@ -1,20 +1,39 @@
1
- import { ElementRef } from '@angular/core';
1
+ import { ChangeDetectorRef } 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';
4
7
  import * as i0 from "@angular/core";
8
+ type DbxReadableErrorComponentViewType = 'none' | 'default' | 'custom';
9
+ interface DbxReadableErrorComponentState {
10
+ readonly viewType: DbxReadableErrorComponentViewType;
11
+ readonly isDefaultError?: Maybe<boolean>;
12
+ readonly message?: Maybe<string>;
13
+ readonly rawError?: Maybe<ErrorInput>;
14
+ readonly error?: Maybe<ReadableError>;
15
+ readonly customView?: Maybe<DbxInjectionComponentConfig>;
16
+ }
5
17
  /**
6
- * Basic error component.
18
+ * Root error component that displays content related to an error.
7
19
  */
8
- export declare class DbxReadableErrorComponent {
20
+ export declare class DbxReadableErrorComponent extends AbstractSubscriptionDirective {
9
21
  readonly popoverService: DbxPopoverService;
10
- buttonPopoverOrigin: ElementRef;
11
- private _error?;
12
- constructor(popoverService: DbxPopoverService);
13
- get error(): Maybe<ReadableError>;
22
+ readonly dbxErrorWidgetService: DbxErrorWidgetService;
23
+ readonly cdRef: ChangeDetectorRef;
24
+ private _state;
25
+ private _inputError;
26
+ readonly state$: import("rxjs").Observable<DbxReadableErrorComponentState>;
27
+ constructor(popoverService: DbxPopoverService, dbxErrorWidgetService: DbxErrorWidgetService, cdRef: ChangeDetectorRef);
28
+ ngOnInit(): void;
29
+ protected get viewType(): DbxReadableErrorComponentViewType;
30
+ protected get isDefaultError(): Maybe<boolean>;
31
+ protected get message(): Maybe<string>;
32
+ protected get customView(): Maybe<DbxInjectionComponentConfig>;
33
+ get error(): Maybe<ErrorInput>;
14
34
  set error(error: Maybe<ErrorInput>);
15
- get isDefaultError(): boolean;
16
- get message(): Maybe<string>;
17
- openErrorPopover(): void;
35
+ protected openErrorPopover(event: DbxErrorViewButtonEvent): void;
18
36
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxReadableErrorComponent, never>;
19
37
  static ɵcmp: i0.ɵɵComponentDeclaration<DbxReadableErrorComponent, "dbx-error", never, { "error": { "alias": "error"; "required": false; }; }, {}, never, never, false, never>;
20
38
  }
39
+ export {};
@@ -2,18 +2,19 @@ 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.popover.component";
6
- import * as i5 from "./error.details.component";
7
- import * as i6 from "./error.widget.component";
8
- import * as i7 from "./default.error.widget.component";
9
- import * as i8 from "@angular/common";
10
- import * as i9 from "../layout/text/text.module";
11
- import * as i10 from "@dereekb/dbx-core";
12
- import * as i11 from "../interaction/popover/popover.content.module";
13
- import * as i12 from "@angular/material/button";
14
- import * as i13 from "@angular/material/icon";
5
+ import * as i4 from "./error.view.component";
6
+ import * as i5 from "./error.popover.component";
7
+ import * as i6 from "./error.details.component";
8
+ import * as i7 from "./error.widget.component";
9
+ import * as i8 from "./default.error.widget.component";
10
+ import * as i9 from "@angular/common";
11
+ import * as i10 from "../layout/text/text.module";
12
+ import * as i11 from "@dereekb/dbx-core";
13
+ import * as i12 from "../interaction/popover/popover.content.module";
14
+ import * as i13 from "@angular/material/button";
15
+ import * as i14 from "@angular/material/icon";
15
16
  export declare class DbxReadableErrorModule {
16
17
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxReadableErrorModule, never>;
17
- static ɵmod: i0.ɵɵNgModuleDeclaration<DbxReadableErrorModule, [typeof i1.DbxReadableErrorComponent, typeof i2.DbxLoadingErrorDirective, typeof i3.DbxActionErrorDirective, typeof i4.DbxErrorPopoverComponent, typeof i5.DbxErrorDetailsComponent, typeof i6.DbxErrorWidgetViewComponent, typeof i7.DbxErrorDefaultErrorWidgetComponent], [typeof i8.CommonModule, typeof i9.DbxTextModule, typeof i10.DbxInjectionComponentModule, typeof i11.DbxPopoverInteractionContentModule, typeof i12.MatButtonModule, typeof i13.MatIconModule], [typeof i1.DbxReadableErrorComponent, typeof i2.DbxLoadingErrorDirective, typeof i3.DbxActionErrorDirective, typeof i4.DbxErrorPopoverComponent, typeof i5.DbxErrorDetailsComponent, typeof i6.DbxErrorWidgetViewComponent, typeof i7.DbxErrorDefaultErrorWidgetComponent]>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxReadableErrorModule, [typeof i1.DbxReadableErrorComponent, typeof i2.DbxLoadingErrorDirective, typeof i3.DbxActionErrorDirective, typeof i4.DbxErrorViewComponent, typeof i5.DbxErrorPopoverComponent, typeof i6.DbxErrorDetailsComponent, typeof i7.DbxErrorWidgetViewComponent, typeof i8.DbxErrorDefaultErrorWidgetComponent], [typeof i9.CommonModule, typeof i10.DbxTextModule, typeof i11.DbxInjectionComponentModule, typeof i12.DbxPopoverInteractionContentModule, typeof i13.MatButtonModule, typeof i14.MatIconModule], [typeof i1.DbxReadableErrorComponent, typeof i2.DbxLoadingErrorDirective, typeof i3.DbxActionErrorDirective, typeof i4.DbxErrorViewComponent, typeof i5.DbxErrorPopoverComponent, typeof i6.DbxErrorDetailsComponent, typeof i7.DbxErrorWidgetViewComponent, typeof i8.DbxErrorDefaultErrorWidgetComponent]>;
18
19
  static ɵinj: i0.ɵɵInjectorDeclaration<DbxReadableErrorModule>;
19
20
  }
@@ -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
+ }
@@ -9,16 +9,37 @@ export interface DbxErrorWidgetEntry {
9
9
  readonly code: StringErrorCode;
10
10
  /**
11
11
  * Error widget component class to use.
12
+ *
13
+ * @deprecated use `widgetComponentClass` instead.
12
14
  */
13
- readonly componentClass: Type<unknown>;
15
+ readonly componentClass?: Maybe<Type<unknown>>;
16
+ /**
17
+ * In-line error widget component class to use.
18
+ *
19
+ * This changes how it appears in dbx-error.
20
+ *
21
+ * If not provided, dbx-error will display the default output.
22
+ */
23
+ readonly errorComponentClass?: Maybe<Type<unknown>>;
24
+ /**
25
+ * Custom popup error widget component class to use.
26
+ *
27
+ * This changes how it appears in the dbx-error-widget-view.
28
+ *
29
+ * If not provided, the widget will display the default entry.
30
+ */
31
+ readonly widgetComponentClass?: Maybe<Type<unknown>>;
14
32
  }
33
+ export type DbxErrorWidgetEntryWithPopupComponentClass = Omit<DbxErrorWidgetEntry, 'popupComponentClass'> & {
34
+ popupComponentClass: Type<unknown>;
35
+ };
15
36
  /**
16
37
  * Service used to register error widgets.
17
38
  */
18
39
  export declare class DbxErrorWidgetService {
19
40
  private _entries;
20
41
  constructor();
21
- registerDefaultEntry(entry: Omit<DbxErrorWidgetEntry, 'code'>): boolean;
42
+ registerDefaultEntry(entry: Omit<DbxErrorWidgetEntry, 'errorComponentClass' | 'code'>): boolean;
22
43
  register(entry: DbxErrorWidgetEntry, override?: boolean): boolean;
23
44
  getErrorWidgetIdentifiers(): StringErrorCode[];
24
45
  getDefaultErrorWidgetEntry(): Maybe<DbxErrorWidgetEntry>;
@@ -2,6 +2,7 @@ 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';
@@ -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;
@@ -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
  }
@@ -56,6 +56,8 @@ $header-left-reserved-space-small-screen: 120px;
56
56
  }
57
57
 
58
58
  .dbx-section-header-padded {
59
+ padding: 0 !important;
60
+
59
61
  .dbx-section-header {
60
62
  padding: 0 4px;
61
63
  }
@@ -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 shrink
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
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web/mapbox",
3
- "version": "10.1.3",
3
+ "version": "10.1.4",
4
4
  "module": "fesm2022/dereekb-dbx-web-mapbox.mjs",
5
5
  "typings": "index.d.ts",
6
6
  "exports": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web",
3
- "version": "10.1.3",
3
+ "version": "10.1.4",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.2.12",
6
6
  "@angular/core": "^16.2.12",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web/table",
3
- "version": "10.1.3",
3
+ "version": "10.1.4",
4
4
  "module": "fesm2022/dereekb-dbx-web-table.mjs",
5
5
  "typings": "index.d.ts",
6
6
  "exports": {