@dereekb/dbx-web 8.7.0 → 8.7.3

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.
@@ -11,7 +11,7 @@ export declare class DbxTwoColumnContextDirective implements OnInit, OnDestroy {
11
11
  constructor(twoColumnsContextStore: TwoColumnsContextStore);
12
12
  ngOnInit(): void;
13
13
  ngOnDestroy(): void;
14
- set showRight(showRight: Maybe<boolean>);
14
+ set showRight(showRight: Maybe<boolean | ''>);
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxTwoColumnContextDirective, never>;
16
16
  static ɵdir: i0.ɵɵDirectiveDeclaration<DbxTwoColumnContextDirective, "[dbxTwoColumnContext]", never, { "showRight": "showRight"; }, {}, never>;
17
17
  }
@@ -1,4 +1,5 @@
1
1
  import { SegueRefOrSegueRefRouterLink } from '@dereekb/dbx-core';
2
+ import { Maybe } from '@dereekb/util';
2
3
  import { TwoColumnsContextStore } from './two.column.store';
3
4
  import * as i0 from "@angular/core";
4
5
  /**
@@ -7,7 +8,7 @@ import * as i0 from "@angular/core";
7
8
  export declare class DbxTwoColumnSrefDirective {
8
9
  private readonly _twoColumnsContextStore;
9
10
  constructor(_twoColumnsContextStore: TwoColumnsContextStore);
10
- set ref(ref: SegueRefOrSegueRefRouterLink);
11
+ set ref(ref: Maybe<SegueRefOrSegueRefRouterLink | ''>);
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxTwoColumnSrefDirective, never>;
12
13
  static ɵdir: i0.ɵɵDirectiveDeclaration<DbxTwoColumnSrefDirective, "[dbxTwoColumnSref]", never, { "ref": "dbxTwoColumnSref"; }, {}, never>;
13
14
  }
@@ -12,7 +12,7 @@ export interface TwoColumnsState {
12
12
  /**
13
13
  * Optional ref to use with TwoColumns that use an sref for the back button.
14
14
  */
15
- backRef?: SegueRef;
15
+ backRef?: Maybe<SegueRef>;
16
16
  }
17
17
  export declare class TwoColumnsContextStore extends ComponentStore<TwoColumnsState> implements OnDestroy {
18
18
  private readonly _back;
@@ -36,7 +36,7 @@ export declare class TwoColumnsContextStore extends ComponentStore<TwoColumnsSta
36
36
  /**
37
37
  * Pipes the current backRef value.
38
38
  */
39
- readonly backRef$: import("rxjs").Observable<SegueRef<object> | undefined>;
39
+ readonly backRef$: import("rxjs").Observable<Maybe<SegueRef<object>>>;
40
40
  /**
41
41
  * Emits back events.
42
42
  */
@@ -56,7 +56,7 @@ export declare class TwoColumnsContextStore extends ComponentStore<TwoColumnsSta
56
56
  /**
57
57
  * Sets the new back ref.
58
58
  */
59
- readonly setBackRef: (observableOrValue: SegueRef<object> | import("rxjs").Observable<SegueRef<object>>) => import("rxjs").Subscription;
59
+ readonly setBackRef: (() => void) | ((observableOrValue: Maybe<SegueRef<object>> | import("rxjs").Observable<Maybe<SegueRef<object>>>) => import("rxjs").Subscription);
60
60
  /**
61
61
  * Emits a back event.
62
62
  */
@@ -35,32 +35,89 @@ $header-left-reserved-space-small-screen: 120px;
35
35
  }
36
36
  }
37
37
 
38
- .dbx-section-hint {
38
+ .dbx-section-hint,
39
+ .dbx-section-hint-inline {
39
40
  margin: 0;
41
+ font-size: 16px;
40
42
  }
41
43
 
42
44
  // MARK: Page
43
45
  .dbx-section-page {
44
- > .dbx-section-header > .dbx-section-header-content {
46
+ > .dbx-section-header {
45
47
  height: $content-navbar-height;
46
48
  max-height: $content-navbar-height;
47
- overflow-x: auto;
48
- overflow-y: hidden;
49
+ overflow: hidden;
49
50
  max-width: 100%;
50
51
 
51
- .dbx-section-header-content-title {
52
- max-width: calc(80% - #{$header-left-reserved-space});
52
+ > .dbx-section-header-content {
53
+ height: $content-navbar-height;
54
+ max-height: $content-navbar-height;
55
+ overflow-x: auto;
56
+ overflow-y: hidden;
57
+ max-width: 100%;
58
+
59
+ .dbx-section-header-content-title {
60
+ max-width: calc(80% - #{$header-left-reserved-space});
53
61
 
54
- display: inline-flex !important;
55
- justify-content: center;
56
- align-items: center;
62
+ display: inline-flex !important;
63
+ justify-content: center;
64
+ align-items: center;
57
65
 
58
- .mat-icon {
59
- margin-right: 4px;
66
+ .mat-icon {
67
+ margin-right: 4px;
68
+ }
69
+
70
+ > .title-text {
71
+ @include theming.limit-text();
72
+ }
60
73
  }
74
+ }
75
+ }
61
76
 
62
- > .title-text {
63
- @include theming.limit-text();
77
+ .dbx-section-page {
78
+ &.dbx-content-page {
79
+ @include theming.nested-content-height(1);
80
+
81
+ .dbx-section-page {
82
+ &.dbx-content-page {
83
+ @include theming.nested-content-height(2);
84
+
85
+ .dbx-section-page {
86
+ &.dbx-content-page {
87
+ @include theming.nested-content-height(3);
88
+
89
+ .dbx-section-page {
90
+ &.dbx-content-page {
91
+ @include theming.nested-content-height(4);
92
+
93
+ .dbx-section-page {
94
+ &.dbx-content-page {
95
+ @include theming.nested-content-height(5);
96
+
97
+ .dbx-section-page {
98
+ &.dbx-content-page {
99
+ @include theming.nested-content-height(6);
100
+
101
+ .dbx-section-page {
102
+ &.dbx-content-page {
103
+ @include theming.nested-content-height(7);
104
+
105
+ .dbx-section-page {
106
+ &.dbx-content-page {
107
+ @include theming.nested-content-height(9);
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
64
121
  }
65
122
  }
66
123
  }
@@ -84,6 +141,12 @@ $header-left-reserved-space-small-screen: 120px;
84
141
  }
85
142
  }
86
143
  }
144
+
145
+ .dbx-section-header.dbx-section-header-full-title > .dbx-section-header-content {
146
+ .dbx-section-header-content-title {
147
+ max-width: 100%;
148
+ }
149
+ }
87
150
  }
88
151
 
89
152
  @mixin typography($typography-config) {
@@ -7,9 +7,11 @@ import * as i0 from "@angular/core";
7
7
  export declare class DbxSectionHeaderComponent {
8
8
  h?: Maybe<DbxSectionHeaderHType>;
9
9
  header?: Maybe<string>;
10
+ onlyHeader: boolean;
10
11
  icon?: Maybe<string>;
11
12
  hint?: Maybe<string>;
13
+ hintInline?: Maybe<boolean>;
12
14
  get showTitle(): boolean;
13
15
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxSectionHeaderComponent, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<DbxSectionHeaderComponent, "dbx-section-header,.dbx-section-header", never, { "h": "h"; "header": "header"; "icon": "icon"; "hint": "hint"; }, {}, never, ["*"]>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxSectionHeaderComponent, "dbx-section-header,.dbx-section-header", never, { "h": "h"; "header": "header"; "onlyHeader": "onlyHeader"; "icon": "icon"; "hint": "hint"; "hintInline": "hintInline"; }, {}, never, ["*"]>;
15
17
  }
@@ -2,8 +2,13 @@ import { DbxSectionHeaderComponent } from './section.header.component';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
4
  * Component used to style a page that is made up of app sections.
5
+ *
6
+ * Should be used on pages that need a section page heading.
7
+ *
8
+ * Can be nested within eachother, retaining the proper fixed height.
5
9
  */
6
10
  export declare class DbxSectionPageComponent extends DbxSectionHeaderComponent {
11
+ hintInline: boolean;
7
12
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxSectionPageComponent, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<DbxSectionPageComponent, "dbx-section-page", never, {}, {}, never, ["[sectionHeader]", "*"]>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxSectionPageComponent, "dbx-section-page", never, { "hintInline": "hintInline"; }, {}, never, ["[sectionHeader]", "*"]>;
9
14
  }
@@ -73,10 +73,33 @@
73
73
  Content height that sets the height to $content-height with an optional offset.
74
74
  */
75
75
  @mixin content-height($additionalOffset: 0) {
76
+ $temp: variables.$content-height;
77
+
76
78
  @if $additionalOffset !=0 {
77
- height: calc(variables.$content-height - #{$additionalOffset});
79
+ height: calc($temp - #{$additionalOffset});
80
+ } @else {
81
+ height: $temp;
82
+ }
83
+ }
84
+
85
+ /**
86
+ Nested content height that sets the height to $content-height minus the total number of $content-navbar-heights above it, with an optional offset.
87
+ */
88
+ @mixin nested-content-height($headers: 1, $additionalOffset: 0) {
89
+ @if $headers < 1 {
90
+ @error "Headers count #{$headers} must be greater than 1.";
91
+ }
92
+
93
+ @if $headers == 1 {
94
+ @include content-height($additionalOffset); // content-height properly handles this case.
78
95
  } @else {
79
- height: variables.$content-height;
96
+ $temp: calc(variables.$content-height - variables.$content-navbar-height * ($headers - 1));
97
+
98
+ @if $additionalOffset !=0 {
99
+ height: calc($temp - #{$additionalOffset});
100
+ } @else {
101
+ height: $temp;
102
+ }
80
103
  }
81
104
  }
82
105
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web",
3
- "version": "8.7.0",
3
+ "version": "8.7.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.0.0",
6
6
  "@angular/core": "^13.0.0",
7
7
  "@angular/material": "^13.0.0",
8
- "@dereekb/rxjs": "8.7.0",
9
- "@dereekb/dbx-core": "8.7.0",
8
+ "@dereekb/rxjs": "8.7.3",
9
+ "@dereekb/dbx-core": "8.7.3",
10
10
  "@angular/flex-layout": "^13.0.0-beta.38",
11
11
  "ng-overlay-container": "^13.0.2",
12
12
  "@angular/cdk": "^13.0.0",