@dereekb/dbx-web 12.6.11 → 12.6.13
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/esm2022/lib/extension/download/text/download.text.component.mjs +7 -39
- package/esm2022/lib/extension/download/text/download.text.module.mjs +2 -2
- package/esm2022/lib/extension/help/absract.help.widget.directive.mjs +20 -0
- package/esm2022/lib/extension/help/help.context.directive.mjs +29 -0
- package/esm2022/lib/extension/help/help.context.mjs +24 -0
- package/esm2022/lib/extension/help/help.context.service.mjs +34 -0
- package/esm2022/lib/extension/help/help.mjs +2 -0
- package/esm2022/lib/extension/help/help.providers.mjs +20 -0
- package/esm2022/lib/extension/help/help.view.list.component.mjs +60 -0
- package/esm2022/lib/extension/help/help.view.list.entry.component.mjs +58 -0
- package/esm2022/lib/extension/help/help.view.popover.button.component.mjs +45 -0
- package/esm2022/lib/extension/help/help.view.popover.component.mjs +49 -0
- package/esm2022/lib/extension/help/help.widget.mjs +6 -0
- package/esm2022/lib/extension/help/help.widget.service.mjs +84 -0
- package/esm2022/lib/extension/help/index.mjs +13 -0
- package/esm2022/lib/extension/index.mjs +2 -1
- package/esm2022/lib/layout/content/content.pit.directive.mjs +4 -2
- package/esm2022/lib/layout/text/copy.text.component.mjs +39 -0
- package/esm2022/lib/layout/text/copy.text.directive.mjs +56 -0
- package/esm2022/lib/layout/text/detail.block.component.mjs +5 -3
- package/esm2022/lib/layout/text/index.mjs +3 -1
- package/esm2022/lib/layout/text/text.module.mjs +6 -4
- package/esm2022/lib/util/clipboard.directive.mjs +20 -0
- package/esm2022/lib/util/clipboard.mjs +98 -0
- package/esm2022/lib/util/index.mjs +3 -1
- package/fesm2022/dereekb-dbx-web.mjs +592 -44
- package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
- package/lib/extension/_extension.scss +19 -0
- package/lib/extension/download/text/download.text.component.d.ts +2 -4
- package/lib/extension/download/text/download.text.module.d.ts +1 -1
- package/lib/extension/help/_help.scss +27 -0
- package/lib/extension/help/absract.help.widget.directive.d.ts +12 -0
- package/lib/extension/help/help.context.d.ts +11 -0
- package/lib/extension/help/help.context.directive.d.ts +17 -0
- package/lib/extension/help/help.context.service.d.ts +20 -0
- package/lib/extension/help/help.d.ts +15 -0
- package/lib/extension/help/help.providers.d.ts +22 -0
- package/lib/extension/help/help.view.list.component.d.ts +20 -0
- package/lib/extension/help/help.view.list.entry.component.d.ts +16 -0
- package/lib/extension/help/help.view.popover.button.component.d.ts +19 -0
- package/lib/extension/help/help.view.popover.component.d.ts +60 -0
- package/lib/extension/help/help.widget.d.ts +42 -0
- package/lib/extension/help/help.widget.service.d.ts +55 -0
- package/lib/extension/help/index.d.ts +12 -0
- package/lib/extension/index.d.ts +1 -0
- package/lib/layout/content/_content.scss +4 -0
- package/lib/layout/content/content.pit.directive.d.ts +2 -1
- package/lib/layout/text/_text.scss +20 -2
- package/lib/layout/text/copy.text.component.d.ts +17 -0
- package/lib/layout/text/copy.text.directive.d.ts +23 -0
- package/lib/layout/text/detail.block.component.d.ts +2 -1
- package/lib/layout/text/index.d.ts +2 -0
- package/lib/layout/text/text.module.d.ts +10 -8
- package/lib/style/_config.scss +7 -1
- package/lib/style/_root-variables.scss +2 -0
- package/lib/style/_variables.scss +3 -0
- package/lib/util/clipboard.d.ts +78 -0
- package/lib/util/clipboard.directive.d.ts +12 -0
- package/lib/util/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -3,16 +3,19 @@
|
|
|
3
3
|
@use './calendar/calendar';
|
|
4
4
|
@use './table/table';
|
|
5
5
|
@use './zip/zip';
|
|
6
|
+
@use './help/help';
|
|
6
7
|
|
|
7
8
|
@mixin all-extension-core($theme-config) {
|
|
8
9
|
$calendar-enabled: 1;
|
|
9
10
|
$table-enabled: 1;
|
|
10
11
|
$zip-enabled: 1;
|
|
12
|
+
$help-enabled: 1;
|
|
11
13
|
|
|
12
14
|
@if ($theme-config != null) {
|
|
13
15
|
$calendar-enabled: config.get-dbx-extension-calendar-enabled($theme-config);
|
|
14
16
|
$table-enabled: config.get-dbx-extension-table-enabled($theme-config);
|
|
15
17
|
$zip-enabled: config.get-dbx-extension-zip-enabled($theme-config);
|
|
18
|
+
$help-enabled: config.get-dbx-extension-help-enabled($theme-config);
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
@if ($calendar-enabled == 1) {
|
|
@@ -26,12 +29,17 @@
|
|
|
26
29
|
@if ($zip-enabled == 1) {
|
|
27
30
|
@include zip.core();
|
|
28
31
|
}
|
|
32
|
+
|
|
33
|
+
@if ($help-enabled == 1) {
|
|
34
|
+
@include help.core();
|
|
35
|
+
}
|
|
29
36
|
}
|
|
30
37
|
|
|
31
38
|
@mixin all-extension-typography($theme-config-or-typography-config) {
|
|
32
39
|
$calendar-enabled: 1;
|
|
33
40
|
$table-enabled: 1;
|
|
34
41
|
$zip-enabled: 1;
|
|
42
|
+
$help-enabled: 1;
|
|
35
43
|
|
|
36
44
|
@if ($theme-config-or-typography-config != null) {
|
|
37
45
|
@if (theming.private-is-theme-object($theme-config-or-typography-config)) {
|
|
@@ -40,6 +48,7 @@
|
|
|
40
48
|
$calendar-enabled: config.get-dbx-extension-calendar-enabled($theme-config);
|
|
41
49
|
$table-enabled: config.get-dbx-extension-table-enabled($theme-config);
|
|
42
50
|
$zip-enabled: config.get-dbx-extension-zip-enabled($theme-config);
|
|
51
|
+
$help-enabled: config.get-dbx-extension-help-enabled($theme-config);
|
|
43
52
|
}
|
|
44
53
|
|
|
45
54
|
@if ($calendar-enabled == 1) {
|
|
@@ -53,6 +62,10 @@
|
|
|
53
62
|
@if ($zip-enabled == 1) {
|
|
54
63
|
@include zip.typography($theme-config-or-typography-config);
|
|
55
64
|
}
|
|
65
|
+
|
|
66
|
+
@if ($help-enabled == 1) {
|
|
67
|
+
@include help.typography($theme-config-or-typography-config);
|
|
68
|
+
}
|
|
56
69
|
}
|
|
57
70
|
}
|
|
58
71
|
|
|
@@ -60,11 +73,13 @@
|
|
|
60
73
|
$calendar-enabled: 1;
|
|
61
74
|
$table-enabled: 1;
|
|
62
75
|
$zip-enabled: 1;
|
|
76
|
+
$help-enabled: 1;
|
|
63
77
|
|
|
64
78
|
@if ($theme-config != null) {
|
|
65
79
|
$calendar-enabled: config.get-dbx-extension-calendar-enabled($theme-config);
|
|
66
80
|
$table-enabled: config.get-dbx-extension-table-enabled($theme-config);
|
|
67
81
|
$zip-enabled: config.get-dbx-extension-zip-enabled($theme-config);
|
|
82
|
+
$help-enabled: config.get-dbx-extension-help-enabled($theme-config);
|
|
68
83
|
}
|
|
69
84
|
|
|
70
85
|
@if ($calendar-enabled == 1) {
|
|
@@ -78,4 +93,8 @@
|
|
|
78
93
|
@if ($zip-enabled == 1) {
|
|
79
94
|
@include zip.theme($theme-config);
|
|
80
95
|
}
|
|
96
|
+
|
|
97
|
+
@if ($help-enabled == 1) {
|
|
98
|
+
@include help.theme($theme-config);
|
|
99
|
+
}
|
|
81
100
|
}
|
|
@@ -3,15 +3,13 @@ import { WorkUsingObservable, LoadingState, MaybeObservableOrValue } from '@dere
|
|
|
3
3
|
import { type Maybe } from '@dereekb/util';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { DownloadTextContent } from './download.text';
|
|
6
|
-
import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
7
6
|
import { DbxDownloadBlobButtonConfig } from '../blob/download.blob.button.component';
|
|
7
|
+
import { AbstractDbxClipboardDirective } from '../../../util/clipboard.directive';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
/**
|
|
10
10
|
* View for previewing and downloading arbitrary text content.
|
|
11
11
|
*/
|
|
12
|
-
export declare class DbxDownloadTextViewComponent extends
|
|
13
|
-
private readonly _clipboard;
|
|
14
|
-
private readonly _matSnackbar;
|
|
12
|
+
export declare class DbxDownloadTextViewComponent extends AbstractDbxClipboardDirective implements OnDestroy {
|
|
15
13
|
private readonly _browserObjectUrl;
|
|
16
14
|
readonly downloadButton: import("@angular/core").Signal<Maybe<ElementRef<any>>>;
|
|
17
15
|
readonly loadingText: import("@angular/core").InputSignal<Maybe<string>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./download.text.component";
|
|
3
3
|
/**
|
|
4
|
-
* @deprecated import
|
|
4
|
+
* @deprecated import DbxDownloadTextViewComponent directly instead.
|
|
5
5
|
*/
|
|
6
6
|
export declare class DbxDownloadTextModule {
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxDownloadTextModule, never>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use '../../style/theming';
|
|
2
|
+
|
|
3
|
+
@mixin core() {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
@mixin color($theme-config) {
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin typography($theme-config-or-typography-config) {
|
|
10
|
+
// Add typography styles if needed
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin theme($theme-config) {
|
|
14
|
+
@include theming.private-check-duplicate-theme-styles($theme-config, 'dbx-help') {
|
|
15
|
+
$color: theming.m2-get-color-config($theme-config);
|
|
16
|
+
$density: theming.m2-get-density-config($theme-config);
|
|
17
|
+
$typography: theming.m2-get-typography-config($theme-config);
|
|
18
|
+
|
|
19
|
+
@if $color !=null {
|
|
20
|
+
@include color($theme-config);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@if $typography !=null {
|
|
24
|
+
@include typography($theme-config);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DbxHelpContextString } from './help';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Abstract help widget directive that injects the help widget data.
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class DbxAbstractHelpWidgetDirective {
|
|
7
|
+
readonly helpWidgetData: import("./help.widget").DbxHelpWidgetEntryData;
|
|
8
|
+
readonly helpWidgetEntry: import("./help.widget").DbxHelpWidgetServiceEntry;
|
|
9
|
+
get helpContextString(): DbxHelpContextString;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAbstractHelpWidgetDirective, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxAbstractHelpWidgetDirective, never, never, {}, {}, never, never, false, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ObservableOrValue } from '@dereekb/rxjs';
|
|
2
|
+
import { type DbxHelpContextString } from './help';
|
|
3
|
+
import { type DestroyFunction } from '@dereekb/util';
|
|
4
|
+
/**
|
|
5
|
+
* Registers the input observable with the DbxHelpContextService.
|
|
6
|
+
*
|
|
7
|
+
* Must be run in an injectable context.
|
|
8
|
+
*
|
|
9
|
+
* Automatically cleans up, but returns a destroy function for manual cleanup.
|
|
10
|
+
*/
|
|
11
|
+
export declare function registerHelpContextStringsWithDbxHelpContextService(helpContextStrings: ObservableOrValue<DbxHelpContextString[]>): DestroyFunction;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DbxHelpContextString } from './help';
|
|
2
|
+
import { ArrayOrValue } from '@dereekb/util';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Directive that registers one or more help contexts to the current context.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DbxHelpContextDirective {
|
|
9
|
+
/**
|
|
10
|
+
* The input help context string(s) to add.
|
|
11
|
+
*/
|
|
12
|
+
readonly dbxHelpContext: import("@angular/core").InputSignal<ArrayOrValue<string>>;
|
|
13
|
+
readonly helpContextStrings$: Observable<DbxHelpContextString[]>;
|
|
14
|
+
constructor();
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxHelpContextDirective, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxHelpContextDirective, "[dbxHelpContext]", never, { "dbxHelpContext": { "alias": "dbxHelpContext"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { DbxHelpContextString, DbxHelpContextReference } from './help';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Service that tracks all active help context strings in the current context.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DbxHelpContextService implements OnDestroy {
|
|
9
|
+
private readonly _contextReferences;
|
|
10
|
+
/**
|
|
11
|
+
* Observable of all currently active help context strings.
|
|
12
|
+
*/
|
|
13
|
+
readonly activeHelpContextStrings$: Observable<Set<DbxHelpContextString>>;
|
|
14
|
+
readonly activeHelpContextStringsArray$: Observable<string[]>;
|
|
15
|
+
register(reference: DbxHelpContextReference): void;
|
|
16
|
+
unregister(reference: DbxHelpContextReference): void;
|
|
17
|
+
ngOnDestroy(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxHelpContextService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DbxHelpContextService>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Observable } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* String type for identifying help topics
|
|
4
|
+
*/
|
|
5
|
+
export type DbxHelpContextString = string;
|
|
6
|
+
/**
|
|
7
|
+
* Reference object for tracking help context registrations.
|
|
8
|
+
* Used internally to track multiple directives with the same context string.
|
|
9
|
+
*/
|
|
10
|
+
export interface DbxHelpContextReference {
|
|
11
|
+
/**
|
|
12
|
+
* Observable of context strings that this reference provides.
|
|
13
|
+
*/
|
|
14
|
+
readonly helpContextStrings$: Observable<DbxHelpContextString[]>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type EnvironmentProviders, type Injector } from '@angular/core';
|
|
2
|
+
import { DbxHelpWidgetServiceConfig } from './help.widget.service';
|
|
3
|
+
/**
|
|
4
|
+
* Factory for DbxHelpWidgetServiceConfig.
|
|
5
|
+
*/
|
|
6
|
+
export type DbxHelpWidgetServiceConfigFactory = (injector: Injector) => DbxHelpWidgetServiceConfig;
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for provideDbxHelpServices().
|
|
9
|
+
*/
|
|
10
|
+
export interface ProvideDbxHelpServicesConfig {
|
|
11
|
+
/**
|
|
12
|
+
* Initial help widget entries to register.
|
|
13
|
+
*/
|
|
14
|
+
readonly dbxHelpWidgetServiceConfigFactory?: DbxHelpWidgetServiceConfigFactory;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Creates EnvironmentProviders for the help context system.
|
|
18
|
+
*
|
|
19
|
+
* @param config Optional configuration
|
|
20
|
+
* @returns EnvironmentProviders
|
|
21
|
+
*/
|
|
22
|
+
export declare function provideDbxHelpServices(config?: ProvideDbxHelpServicesConfig): EnvironmentProviders;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DbxHelpContextString } from './help';
|
|
2
|
+
import { ObservableOrValue } from '@dereekb/rxjs';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { DbxHelpWidgetService } from './help.widget.service';
|
|
5
|
+
import { ArrayOrValue } from '@dereekb/util';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DbxHelpViewListComponent {
|
|
8
|
+
readonly helpWidgetService: DbxHelpWidgetService;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the accordion should allow multiple expanded panels.
|
|
11
|
+
*/
|
|
12
|
+
readonly multi: import("@angular/core").InputSignal<boolean>;
|
|
13
|
+
readonly helpContextStrings: import("@angular/core").InputSignal<ObservableOrValue<ArrayOrValue<string>>>;
|
|
14
|
+
readonly helpContextStrings$: Observable<DbxHelpContextString[]>;
|
|
15
|
+
readonly helpContextStringsSignal: import("@angular/core").Signal<string[]>;
|
|
16
|
+
readonly helpWidgetEntriesSignal: import("@angular/core").Signal<import("@dereekb/dbx-web").DbxHelpWidgetServiceEntry[]>;
|
|
17
|
+
readonly hasNoHelpWidgetEntriesSignal: import("@angular/core").Signal<boolean>;
|
|
18
|
+
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>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
|
+
import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
|
|
3
|
+
import { DbxHelpWidgetServiceEntry } from './help.widget';
|
|
4
|
+
import { Maybe } from '@dereekb/util';
|
|
5
|
+
import { DbxHelpWidgetService } from './help.widget.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DbxHelpViewListEntryComponent {
|
|
8
|
+
readonly helpWidgetEntry: import("@angular/core").InputSignal<DbxHelpWidgetServiceEntry>;
|
|
9
|
+
readonly helpWidgetService: DbxHelpWidgetService;
|
|
10
|
+
readonly titleSignal: Signal<string>;
|
|
11
|
+
readonly iconSignal: Signal<Maybe<string>>;
|
|
12
|
+
readonly widgetInjectionConfigSignal: Signal<DbxInjectionComponentConfig>;
|
|
13
|
+
readonly headerInjectionConfigSignal: Signal<Maybe<DbxInjectionComponentConfig>>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxHelpViewListEntryComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxHelpViewListEntryComponent, "dbx-help-view-list-entry", never, { "helpWidgetEntry": { "alias": "helpWidgetEntry"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { AbstractPopoverRefDirective } from '../../interaction/popover/abstract.popover.ref.directive';
|
|
4
|
+
import { NgPopoverRef } from 'ng-overlay-container';
|
|
5
|
+
import { DbxHelpViewPopoverConfigWithoutOrigin } from './help.view.popover.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export type DbxHelpViewPopoverButtonConfig = DbxHelpViewPopoverConfigWithoutOrigin;
|
|
8
|
+
/**
|
|
9
|
+
* Button component that opens a help popover showing active help contexts.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DbxHelpViewPopoverButtonComponent extends AbstractPopoverRefDirective<unknown, unknown> {
|
|
12
|
+
private readonly _dbxPopoverService;
|
|
13
|
+
readonly buttonElement: import("@angular/core").Signal<ElementRef<any>>;
|
|
14
|
+
readonly config: import("@angular/core").InputSignal<Maybe<DbxHelpViewPopoverConfigWithoutOrigin>>;
|
|
15
|
+
protected _makePopoverRef(origin?: Maybe<ElementRef>): NgPopoverRef<unknown, unknown>;
|
|
16
|
+
showHelpPopover(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxHelpViewPopoverButtonComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxHelpViewPopoverButtonComponent, "dbx-help-view-popover-button", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { ArrayOrValue, Maybe } from '@dereekb/util';
|
|
3
|
+
import { AbstractPopoverDirective } from '../../interaction/popover/abstract.popover.directive';
|
|
4
|
+
import { DbxPopoverKey } from '../../interaction/popover/popover';
|
|
5
|
+
import { DbxPopoverService } from '../../interaction/popover/popover.service';
|
|
6
|
+
import { DbxHelpContextString } from './help';
|
|
7
|
+
import { NgPopoverRef } from 'ng-overlay-container';
|
|
8
|
+
import { ObservableOrValue } from '@dereekb/rxjs';
|
|
9
|
+
import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export declare const DEFAULT_DBX_HELP_VIEW_POPOVER_KEY = "help";
|
|
12
|
+
export interface DbxHelpViewPopoverConfig {
|
|
13
|
+
/**
|
|
14
|
+
* Custom icon
|
|
15
|
+
*
|
|
16
|
+
* Defaults to "help"
|
|
17
|
+
*/
|
|
18
|
+
readonly icon?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Custom header text
|
|
21
|
+
*
|
|
22
|
+
* Defaults to "Help"
|
|
23
|
+
*/
|
|
24
|
+
readonly header?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Custom empty text when no help contexts are available.
|
|
27
|
+
*/
|
|
28
|
+
readonly emptyText?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Origin element to attach the popover to.
|
|
31
|
+
*/
|
|
32
|
+
readonly origin: ElementRef;
|
|
33
|
+
/**
|
|
34
|
+
* Specific contexts to display. If not provided, shows all active contexts from the DbxHelpContextService.
|
|
35
|
+
*/
|
|
36
|
+
readonly helpContextStrings?: Maybe<ObservableOrValue<ArrayOrValue<DbxHelpContextString>>>;
|
|
37
|
+
/**
|
|
38
|
+
* Overrides the default popover header config.
|
|
39
|
+
*
|
|
40
|
+
* If not provided, the default popover header config will be used from DbxHelpWidgetService.
|
|
41
|
+
*/
|
|
42
|
+
readonly popoverHeaderConfig?: Maybe<DbxInjectionComponentConfig>;
|
|
43
|
+
}
|
|
44
|
+
export type DbxHelpViewPopoverConfigWithoutOrigin = Omit<DbxHelpViewPopoverConfig, 'origin'>;
|
|
45
|
+
/**
|
|
46
|
+
* Popover component for displaying help contexts.
|
|
47
|
+
*/
|
|
48
|
+
export declare class DbxHelpViewPopoverComponent extends AbstractPopoverDirective<unknown, DbxHelpViewPopoverConfig> {
|
|
49
|
+
private readonly _helpContextService;
|
|
50
|
+
private readonly _helpWidgetService;
|
|
51
|
+
readonly helpContextStrings$: string | string[] | import("rxjs").Observable<ArrayOrValue<string>>;
|
|
52
|
+
static openPopover(popoverService: DbxPopoverService, config: DbxHelpViewPopoverConfig, popoverKey?: DbxPopoverKey): NgPopoverRef;
|
|
53
|
+
get config(): DbxHelpViewPopoverConfig;
|
|
54
|
+
readonly icon: string;
|
|
55
|
+
readonly header: string;
|
|
56
|
+
readonly emptyText: string;
|
|
57
|
+
readonly popoverHeaderConfig: Maybe<DbxInjectionComponentConfig>;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxHelpViewPopoverComponent, never>;
|
|
59
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxHelpViewPopoverComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { InjectionToken, type Type } from '@angular/core';
|
|
2
|
+
import { type Maybe } from '@dereekb/util';
|
|
3
|
+
import { type DbxHelpContextString } from './help';
|
|
4
|
+
/**
|
|
5
|
+
* Entry defining a help widget for a specific context
|
|
6
|
+
*/
|
|
7
|
+
export interface DbxHelpWidgetServiceEntry {
|
|
8
|
+
/**
|
|
9
|
+
* Help context string specific to this entry.
|
|
10
|
+
*/
|
|
11
|
+
readonly helpContextString: DbxHelpContextString;
|
|
12
|
+
/**
|
|
13
|
+
* Title/Label for the help topic.
|
|
14
|
+
*/
|
|
15
|
+
readonly title: string;
|
|
16
|
+
/**
|
|
17
|
+
* Icon for the help topic, if applicable.
|
|
18
|
+
*/
|
|
19
|
+
readonly icon?: Maybe<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Custom help widget component class to use.
|
|
22
|
+
*
|
|
23
|
+
* The component will receive the context string as data.
|
|
24
|
+
*/
|
|
25
|
+
readonly widgetComponentClass: Type<unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* Custom header component class to use that shows up on the widget.
|
|
28
|
+
*
|
|
29
|
+
* The component will receive the context string as data.
|
|
30
|
+
*/
|
|
31
|
+
readonly headerComponentClass?: Maybe<Type<unknown>>;
|
|
32
|
+
}
|
|
33
|
+
export interface DbxHelpWidgetEntryData {
|
|
34
|
+
/**
|
|
35
|
+
* Corresponding widget entry.
|
|
36
|
+
*/
|
|
37
|
+
readonly helpWidgetEntry: DbxHelpWidgetServiceEntry;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Injection token for DbxHelpWidgetData.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DBX_HELP_WIDGET_ENTRY_DATA_TOKEN: InjectionToken<DbxHelpWidgetEntryData>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { ArrayOrValue, Maybe } from '@dereekb/util';
|
|
3
|
+
import { DbxHelpContextString } from './help';
|
|
4
|
+
import { DbxHelpWidgetServiceEntry } from './help.widget';
|
|
5
|
+
import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare abstract class DbxHelpWidgetServiceConfig {
|
|
8
|
+
abstract readonly entries?: Maybe<DbxHelpWidgetServiceEntry[]>;
|
|
9
|
+
/**
|
|
10
|
+
* Default icon to use for unknown help topics.
|
|
11
|
+
*/
|
|
12
|
+
abstract readonly defaultIcon?: Maybe<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Default/Unknown help topic component class.
|
|
15
|
+
*/
|
|
16
|
+
abstract readonly defaultWidgetComponentClass?: Maybe<Type<unknown>>;
|
|
17
|
+
/**
|
|
18
|
+
* Optional header component class to use for the list view.
|
|
19
|
+
*/
|
|
20
|
+
abstract readonly popoverHeaderComponentConfig?: Maybe<DbxInjectionComponentConfig>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Service used to register help widgets.
|
|
24
|
+
*
|
|
25
|
+
* Similar to DbxErrorWidgetService, this maintains a registry of help widgets
|
|
26
|
+
* that can be displayed for specific help context strings.
|
|
27
|
+
*/
|
|
28
|
+
export declare class DbxHelpWidgetService {
|
|
29
|
+
private readonly _entries;
|
|
30
|
+
private _defaultWidgetComponentClass;
|
|
31
|
+
private _defaultIcon?;
|
|
32
|
+
private _popoverHeaderComponentConfig;
|
|
33
|
+
constructor(initialConfig?: DbxHelpWidgetServiceConfig);
|
|
34
|
+
getDefaultWidgetComponentClass(): Maybe<Type<unknown>>;
|
|
35
|
+
setDefaultWidgetComponentClass(componentClass: Maybe<Type<unknown>>): void;
|
|
36
|
+
getDefaultIcon(): Maybe<string>;
|
|
37
|
+
setDefaultIcon(icon: Maybe<string>): void;
|
|
38
|
+
getPopoverHeaderComponentConfig(): Maybe<DbxInjectionComponentConfig>;
|
|
39
|
+
setPopoverHeaderComponentConfig(componentConfig: Maybe<DbxInjectionComponentConfig>): void;
|
|
40
|
+
/**
|
|
41
|
+
* Used to register one or more entries.
|
|
42
|
+
*
|
|
43
|
+
* If an entry with the same identity is already registered, this will override it by default.
|
|
44
|
+
*
|
|
45
|
+
* @param entries The entries to register
|
|
46
|
+
* @param override Whether to override existing entries (default: true)
|
|
47
|
+
*/
|
|
48
|
+
register(entries: ArrayOrValue<DbxHelpWidgetServiceEntry>, override?: boolean): boolean;
|
|
49
|
+
getAllRegisteredHelpContextStrings(): DbxHelpContextString[];
|
|
50
|
+
getHelpWidgetEntry(helpContextString: DbxHelpContextString): Maybe<DbxHelpWidgetServiceEntry>;
|
|
51
|
+
getHelpWidgetEntriesForHelpContextStrings(helpContextStrings: DbxHelpContextString[]): DbxHelpWidgetServiceEntry[];
|
|
52
|
+
hasHelpWidgetEntry(context: DbxHelpContextString): boolean;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxHelpWidgetService, [{ optional: true; }]>;
|
|
54
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DbxHelpWidgetService>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './help.context.directive';
|
|
2
|
+
export * from './help.context.service';
|
|
3
|
+
export * from './help.context';
|
|
4
|
+
export * from './help.providers';
|
|
5
|
+
export * from './absract.help.widget.directive';
|
|
6
|
+
export * from './help';
|
|
7
|
+
export * from './help.view.list.component';
|
|
8
|
+
export * from './help.view.list.entry.component';
|
|
9
|
+
export * from './help.view.popover.component';
|
|
10
|
+
export * from './help.view.popover.button.component';
|
|
11
|
+
export * from './help.widget.service';
|
|
12
|
+
export * from './help.widget';
|
package/lib/extension/index.d.ts
CHANGED
|
@@ -48,6 +48,10 @@ $scroll-content-bottom-padding: 42px;
|
|
|
48
48
|
padding: $pit-padding;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
.dbx-content-pit-rounded {
|
|
52
|
+
border-radius: theming.$dbx-content-pit-rounded-border-radius;
|
|
53
|
+
}
|
|
54
|
+
|
|
51
55
|
.dbx-content-pit > .dbx-label-block > .dbx-label {
|
|
52
56
|
opacity: 0.66; // increase opacity slightly to make it easier to read against background
|
|
53
57
|
}
|
|
@@ -8,7 +8,8 @@ export type DbxContentPitScrollableHeightSetting = 'small' | 'medium' | 'large';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class DbxContentPitDirective {
|
|
10
10
|
readonly scrollable: import("@angular/core").InputSignal<Maybe<DbxContentPitScrollableInput>>;
|
|
11
|
+
readonly rounded: import("@angular/core").InputSignal<boolean>;
|
|
11
12
|
readonly scrollableHeightSignal: import("@angular/core").Signal<string | null>;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxContentPitDirective, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxContentPitDirective, "dbx-content-pit, [dbxContentPit]", never, { "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxContentPitDirective, "dbx-content-pit, [dbxContentPit]", never, { "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
14
15
|
}
|
|
@@ -12,6 +12,7 @@ $mat-hint-opacity: 0.54; // Opacity to mirror mat-hint
|
|
|
12
12
|
$dbx-label-padded-padding: 6px;
|
|
13
13
|
$dbx-detail-block-bottom-padding: 12px;
|
|
14
14
|
$dbx-detail-block-content-offset: 30px;
|
|
15
|
+
$click-to-copy-icon-size: 18px;
|
|
15
16
|
|
|
16
17
|
// MARK: Mixin
|
|
17
18
|
@mixin core() {
|
|
@@ -108,6 +109,12 @@ $dbx-detail-block-content-offset: 30px;
|
|
|
108
109
|
padding-bottom: $dbx-detail-block-bottom-padding;
|
|
109
110
|
}
|
|
110
111
|
|
|
112
|
+
.dbx-detail-block.dbx-detail-block-big-header {
|
|
113
|
+
.dbx-detail-block-header {
|
|
114
|
+
font-size: 1.18em;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
111
118
|
.dbx-text-no-overflow {
|
|
112
119
|
white-space: pre-wrap !important;
|
|
113
120
|
overflow: visible !important;
|
|
@@ -168,6 +175,10 @@ $dbx-detail-block-content-offset: 30px;
|
|
|
168
175
|
margin: 4px;
|
|
169
176
|
}
|
|
170
177
|
|
|
178
|
+
.dbx-chip-sublabel {
|
|
179
|
+
margin-left: $icon-spacing;
|
|
180
|
+
}
|
|
181
|
+
|
|
171
182
|
.dbx-us-address {
|
|
172
183
|
white-space: pre-wrap !important;
|
|
173
184
|
line-height: 1.4;
|
|
@@ -245,6 +256,10 @@ $dbx-detail-block-content-offset: 30px;
|
|
|
245
256
|
.dbx-number-with-limit-rounded {
|
|
246
257
|
border-radius: 12px;
|
|
247
258
|
}
|
|
259
|
+
|
|
260
|
+
.dbx-click-to-copy-text-highlighted {
|
|
261
|
+
text-decoration: underline;
|
|
262
|
+
}
|
|
248
263
|
}
|
|
249
264
|
|
|
250
265
|
@mixin typography($theme-config-or-typography-config) {
|
|
@@ -256,8 +271,11 @@ $dbx-detail-block-content-offset: 30px;
|
|
|
256
271
|
font-size: theming.m2-font-size($typography-config, 'caption');
|
|
257
272
|
}
|
|
258
273
|
|
|
259
|
-
.dbx-
|
|
260
|
-
|
|
274
|
+
.dbx-click-to-copy-text-icon.mat-icon {
|
|
275
|
+
width: $click-to-copy-icon-size;
|
|
276
|
+
height: $click-to-copy-icon-size;
|
|
277
|
+
font-size: $click-to-copy-icon-size;
|
|
278
|
+
padding-left: 4px;
|
|
261
279
|
}
|
|
262
280
|
}
|
|
263
281
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { DbxClickToCopyTextDirective } from './copy.text.directive';
|
|
3
|
+
import { Maybe } from '@dereekb/util';
|
|
4
|
+
import { CopyToClipboardFunctionWithSnackbarMessageSnackbarConfig } from '../../util';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DbxClickToCopyTextComponent {
|
|
7
|
+
readonly contentElementRef: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
|
|
8
|
+
readonly dbxClickToCopyText: import("@angular/core").Signal<DbxClickToCopyTextDirective | undefined>;
|
|
9
|
+
readonly copyText: import("@angular/core").InputSignal<Maybe<string | null>>;
|
|
10
|
+
readonly highlighted: import("@angular/core").InputSignal<boolean>;
|
|
11
|
+
readonly clipboardSnackbarMessagesConfig: import("@angular/core").InputSignal<Maybe<CopyToClipboardFunctionWithSnackbarMessageSnackbarConfig>>;
|
|
12
|
+
readonly clipboardSnackbarMessagesEnabled: import("@angular/core").InputSignal<boolean>;
|
|
13
|
+
readonly clickToCopyIcon: import("@angular/core").InputSignal<string>;
|
|
14
|
+
readonly clickIconToCopyOnly: import("@angular/core").InputSignal<boolean>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxClickToCopyTextComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxClickToCopyTextComponent, "dbx-click-to-copy-text", never, { "copyText": { "alias": "copyText"; "required": false; "isSignal": true; }; "highlighted": { "alias": "highlighted"; "required": false; "isSignal": true; }; "clipboardSnackbarMessagesConfig": { "alias": "clipboardSnackbarMessagesConfig"; "required": false; "isSignal": true; }; "clipboardSnackbarMessagesEnabled": { "alias": "clipboardSnackbarMessagesEnabled"; "required": false; "isSignal": true; }; "clickToCopyIcon": { "alias": "clickToCopyIcon"; "required": false; "isSignal": true; }; "clickIconToCopyOnly": { "alias": "clickIconToCopyOnly"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { AbstractDbxClipboardDirective } from '../../util/clipboard.directive';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DbxClickToCopyTextDirective extends AbstractDbxClipboardDirective {
|
|
6
|
+
readonly copyTextFromElement: import("@angular/core").ModelSignal<ElementRef<HTMLElement> | undefined>;
|
|
7
|
+
/**
|
|
8
|
+
* If the input is null, then copy from the element's text content.
|
|
9
|
+
*/
|
|
10
|
+
readonly copyText: import("@angular/core").InputSignal<Maybe<string | null>>;
|
|
11
|
+
/**
|
|
12
|
+
* If true, the click events will be ignored.
|
|
13
|
+
*/
|
|
14
|
+
readonly disableCopy: import("@angular/core").InputSignal<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Highlight the text visually.
|
|
17
|
+
*/
|
|
18
|
+
readonly highlighted: import("@angular/core").InputSignal<boolean>;
|
|
19
|
+
handleClick(event: MouseEvent): void;
|
|
20
|
+
_copyText(eventElement?: Maybe<HTMLElement>): Maybe<string>;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxClickToCopyTextDirective, never>;
|
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxClickToCopyTextDirective, "[dbxClickToCopyText]", never, { "copyTextFromElement": { "alias": "copyTextFromElement"; "required": false; "isSignal": true; }; "copyText": { "alias": "dbxClickToCopyText"; "required": false; "isSignal": true; }; "disableCopy": { "alias": "disableCopy"; "required": false; "isSignal": true; }; "highlighted": { "alias": "highlighted"; "required": false; "isSignal": true; }; }, { "copyTextFromElement": "copyTextFromElementChange"; }, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -7,6 +7,7 @@ export declare class DbxDetailBlockComponent {
|
|
|
7
7
|
readonly icon: import("@angular/core").InputSignal<Maybe<string>>;
|
|
8
8
|
readonly header: import("@angular/core").InputSignal<Maybe<string>>;
|
|
9
9
|
readonly alignHeader: import("@angular/core").InputSignal<boolean>;
|
|
10
|
+
readonly bigHeader: import("@angular/core").InputSignal<boolean>;
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxDetailBlockComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DbxDetailBlockComponent, "dbx-detail-block", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "alignHeader": { "alias": "alignHeader"; "required": false; "isSignal": true; }; }, {}, never, ["[header]", "*"], true, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxDetailBlockComponent, "dbx-detail-block", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "alignHeader": { "alias": "alignHeader"; "required": false; "isSignal": true; }; "bigHeader": { "alias": "bigHeader"; "required": false; "isSignal": true; }; }, {}, never, ["[header]", "*"], true, never>;
|
|
12
13
|
}
|
|
@@ -7,4 +7,6 @@ export * from './linkify.component';
|
|
|
7
7
|
export * from './text.chip.directive';
|
|
8
8
|
export * from './text.chips.component';
|
|
9
9
|
export * from './number.limit.component';
|
|
10
|
+
export * from './copy.text.directive';
|
|
11
|
+
export * from './copy.text.component';
|
|
10
12
|
export * from './text.module';
|