@dereekb/dbx-web 12.6.16 → 12.6.18

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.
@@ -2,7 +2,8 @@ import { DbxHelpContextString } from './help';
2
2
  import { ObservableOrValue } from '@dereekb/rxjs';
3
3
  import { Observable } from 'rxjs';
4
4
  import { DbxHelpWidgetService } from './help.widget.service';
5
- import { ArrayOrValue } from '@dereekb/util';
5
+ import { ArrayOrValue, Maybe } from '@dereekb/util';
6
+ import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class DbxHelpViewListComponent {
8
9
  readonly helpWidgetService: DbxHelpWidgetService;
@@ -10,11 +11,22 @@ export declare class DbxHelpViewListComponent {
10
11
  * Whether the accordion should allow multiple expanded panels.
11
12
  */
12
13
  readonly multi: import("@angular/core").InputSignal<boolean>;
14
+ /**
15
+ * Whether or not to show the empty list content.
16
+ */
17
+ readonly allowEmptyListContent: import("@angular/core").InputSignal<boolean>;
18
+ /**
19
+ * Optional footer component config to inject after the list.
20
+ *
21
+ * If set null, then will not show any footer.
22
+ */
23
+ readonly helpListFooterComponentConfig: import("@angular/core").InputSignal<Maybe<DbxInjectionComponentConfig<unknown>>>;
13
24
  readonly helpContextStrings: import("@angular/core").InputSignal<ObservableOrValue<ArrayOrValue<string>>>;
14
25
  readonly helpContextStrings$: Observable<DbxHelpContextString[]>;
15
26
  readonly helpContextStringsSignal: import("@angular/core").Signal<string[]>;
16
27
  readonly helpWidgetEntriesSignal: import("@angular/core").Signal<import("@dereekb/dbx-web").DbxHelpWidgetServiceEntry[]>;
17
28
  readonly hasNoHelpWidgetEntriesSignal: import("@angular/core").Signal<boolean>;
29
+ readonly helpListFooterComponentConfigSignal: import("@angular/core").Signal<Maybe<DbxInjectionComponentConfig<unknown>>>;
18
30
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxHelpViewListComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<DbxHelpViewListComponent, "dbx-help-view-list", never, { "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "helpContextStrings": { "alias": "helpContextStrings"; "required": true; "isSignal": true; }; }, {}, never, ["[empty]"], true, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxHelpViewListComponent, "dbx-help-view-list", never, { "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "allowEmptyListContent": { "alias": "allowEmptyListContent"; "required": false; "isSignal": true; }; "helpListFooterComponentConfig": { "alias": "helpListFooterComponentConfig"; "required": false; "isSignal": true; }; "helpContextStrings": { "alias": "helpContextStrings"; "required": true; "isSignal": true; }; }, {}, never, ["[empty]"], true, never>;
20
32
  }
@@ -2,7 +2,7 @@ import { ElementRef } from '@angular/core';
2
2
  import { ArrayOrValue, Maybe } from '@dereekb/util';
3
3
  import { AbstractPopoverDirective } from '../../interaction/popover/abstract.popover.directive';
4
4
  import { DbxPopoverKey } from '../../interaction/popover/popover';
5
- import { DbxPopoverService } from '../../interaction/popover/popover.service';
5
+ import { DbxPopoverConfigSizing, DbxPopoverService } from '../../interaction/popover/popover.service';
6
6
  import { DbxHelpContextString } from './help';
7
7
  import { NgPopoverRef } from 'ng-overlay-container';
8
8
  import { ObservableOrValue } from '@dereekb/rxjs';
@@ -34,12 +34,26 @@ export interface DbxHelpViewPopoverConfig {
34
34
  * Specific contexts to display. If not provided, shows all active contexts from the DbxHelpContextService.
35
35
  */
36
36
  readonly helpContextStrings?: Maybe<ObservableOrValue<ArrayOrValue<DbxHelpContextString>>>;
37
+ /**
38
+ * Optional footer component config to inject after the list.
39
+ */
40
+ readonly helpListFooterComponentConfig?: Maybe<DbxInjectionComponentConfig>;
41
+ /**
42
+ * Whether to show the empty list content.
43
+ *
44
+ * Defaults to true.
45
+ */
46
+ readonly allowEmptyListContent?: Maybe<boolean>;
37
47
  /**
38
48
  * Overrides the default popover header config.
39
49
  *
40
50
  * If not provided, the default popover header config will be used from DbxHelpWidgetService.
41
51
  */
42
52
  readonly popoverHeaderConfig?: Maybe<DbxInjectionComponentConfig>;
53
+ /**
54
+ * Additional popover configuration.
55
+ */
56
+ readonly popoverSizingConfig?: Maybe<DbxPopoverConfigSizing>;
43
57
  }
44
58
  export type DbxHelpViewPopoverConfigWithoutOrigin = Omit<DbxHelpViewPopoverConfig, 'origin'>;
45
59
  /**
@@ -54,6 +68,8 @@ export declare class DbxHelpViewPopoverComponent extends AbstractPopoverDirectiv
54
68
  readonly icon: string;
55
69
  readonly header: string;
56
70
  readonly emptyText: string;
71
+ readonly allowEmptyListContent: boolean;
72
+ readonly helpListFooterComponentConfig: Maybe<DbxInjectionComponentConfig<unknown>>;
57
73
  readonly popoverHeaderConfig: Maybe<DbxInjectionComponentConfig>;
58
74
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxHelpViewPopoverComponent, never>;
59
75
  static ɵcmp: i0.ɵɵComponentDeclaration<DbxHelpViewPopoverComponent, "ng-component", never, {}, {}, never, never, true, never>;
@@ -17,6 +17,12 @@ export interface DbxHelpWidgetServiceEntry {
17
17
  * Icon for the help topic, if applicable.
18
18
  */
19
19
  readonly icon?: Maybe<string>;
20
+ /**
21
+ * The priority to use when sorting the entities.
22
+ *
23
+ * Higher values are displayed first in the list.
24
+ */
25
+ readonly sortPriority?: Maybe<number>;
20
26
  /**
21
27
  * Custom help widget component class to use.
22
28
  *
@@ -5,6 +5,9 @@ import { DbxHelpWidgetServiceEntry } from './help.widget';
5
5
  import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare abstract class DbxHelpWidgetServiceConfig {
8
+ /**
9
+ * All help widget service entries.
10
+ */
8
11
  abstract readonly entries?: Maybe<DbxHelpWidgetServiceEntry[]>;
9
12
  /**
10
13
  * Default icon to use for unknown help topics.
@@ -14,6 +17,10 @@ export declare abstract class DbxHelpWidgetServiceConfig {
14
17
  * Default/Unknown help topic component class.
15
18
  */
16
19
  abstract readonly defaultWidgetComponentClass?: Maybe<Type<unknown>>;
20
+ /**
21
+ * Optional component class that shows up under the help content in the list view.
22
+ */
23
+ abstract readonly helpListFooterComponentConfig?: Maybe<DbxInjectionComponentConfig>;
17
24
  /**
18
25
  * Optional header component class to use for the list view.
19
26
  */
@@ -27,7 +34,9 @@ export declare abstract class DbxHelpWidgetServiceConfig {
27
34
  */
28
35
  export declare class DbxHelpWidgetService {
29
36
  private readonly _entries;
37
+ private readonly _sortPriorityMap;
30
38
  private _defaultWidgetComponentClass;
39
+ private _helpListFooterComponentConfig;
31
40
  private _defaultIcon?;
32
41
  private _popoverHeaderComponentConfig;
33
42
  constructor(initialConfig?: DbxHelpWidgetServiceConfig);
@@ -37,6 +46,8 @@ export declare class DbxHelpWidgetService {
37
46
  setDefaultIcon(icon: Maybe<string>): void;
38
47
  getPopoverHeaderComponentConfig(): Maybe<DbxInjectionComponentConfig>;
39
48
  setPopoverHeaderComponentConfig(componentConfig: Maybe<DbxInjectionComponentConfig>): void;
49
+ getHelpListFooterComponentConfig(): Maybe<DbxInjectionComponentConfig>;
50
+ setHelpListFooterComponentConfig(componentConfig: Maybe<DbxInjectionComponentConfig>): void;
40
51
  /**
41
52
  * Used to register one or more entries.
42
53
  *
@@ -50,6 +61,7 @@ export declare class DbxHelpWidgetService {
50
61
  getHelpWidgetEntry(helpContextString: DbxHelpContextString): Maybe<DbxHelpWidgetServiceEntry>;
51
62
  getHelpWidgetEntriesForHelpContextStrings(helpContextStrings: DbxHelpContextString[]): DbxHelpWidgetServiceEntry[];
52
63
  hasHelpWidgetEntry(context: DbxHelpContextString): boolean;
64
+ getSortPriorityMap(): Map<string, number>;
53
65
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxHelpWidgetService, [{ optional: true; }]>;
54
66
  static ɵprov: i0.ɵɵInjectableDeclaration<DbxHelpWidgetService>;
55
67
  }
@@ -4,7 +4,7 @@ import { NgOverlayContainerConfiguration, NgPopoverRef } from 'ng-overlay-contai
4
4
  import * as i0 from "@angular/core";
5
5
  export type DbxPopoverConfigSizing = Pick<NgOverlayContainerConfiguration, 'originX' | 'originY' | 'height' | 'width' | 'minHeight' | 'minWidth' | 'isResizable'>;
6
6
  export interface DbxPopoverConfig<O, I, T> extends DbxPopoverComponentConfig<O, I, T>, DbxPopoverConfigSizing {
7
- injector?: Injector;
7
+ readonly injector?: Injector;
8
8
  }
9
9
  /**
10
10
  * Used for displaying a popover.
@@ -1,14 +1,31 @@
1
+ import { ElementRef, OnDestroy } from '@angular/core';
1
2
  import { AbstractDbxSegueAnchorDirective } from '../../layout/anchor/anchor.segue.directive';
2
3
  import { Obj, StateOrName, TransitionOptions } from '@uirouter/angular';
3
4
  import * as i0 from "@angular/core";
4
5
  /**
5
6
  * SegueAnchor implementation for UIRouter.
6
7
  */
7
- export declare class DbxUIRouterSegueAnchorComponent extends AbstractDbxSegueAnchorDirective {
8
+ export declare class DbxUIRouterSegueAnchorComponent extends AbstractDbxSegueAnchorDirective implements OnDestroy {
9
+ private _cleanupClickOverride;
8
10
  private readonly _parentAnchorSignal;
11
+ readonly anchorElement: import("@angular/core").Signal<ElementRef<HTMLElement>>;
12
+ readonly injectionElement: import("@angular/core").Signal<ElementRef<HTMLElement>>;
13
+ readonly anchorDisabledSignal: import("@angular/core").Signal<boolean>;
14
+ /**
15
+ * This effect exists to solve the issue of an injected element that utilizes event.stopPropogation() and doesn't also call event.preventDefault().
16
+ *
17
+ * We didn't want to use css's pointer-events: none as that would disable the Angular Material button effects.
18
+ *
19
+ * For example, dbx-button would call event.stopPropagation() on click, which would prevent the uiSref from being triggered, but the default behavior
20
+ * of the anchor element would still be triggered, causing the browser to load/reload the page at the given href instead of navigating to the new state using uiSref.
21
+ *
22
+ * NOTE: Those nested event listeners are still ultimately triggered.
23
+ */
24
+ protected readonly _overrideClickElementEffect: import("@angular/core").EffectRef;
9
25
  readonly uiSrefSignal: import("@angular/core").Signal<StateOrName>;
10
26
  readonly uiParamsSignal: import("@angular/core").Signal<Obj | undefined>;
11
27
  readonly uiOptionsSignal: import("@angular/core").Signal<TransitionOptions>;
28
+ ngOnDestroy(): void;
12
29
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxUIRouterSegueAnchorComponent, never>;
13
30
  static ɵcmp: i0.ɵɵComponentDeclaration<DbxUIRouterSegueAnchorComponent, "ng-component", never, {}, {}, never, never, true, never>;
14
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web",
3
- "version": "12.6.16",
3
+ "version": "12.6.18",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0",