@dereekb/dbx-web 12.6.12 → 12.6.14

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.
Files changed (60) hide show
  1. package/esm2022/lib/extension/download/text/download.text.component.mjs +7 -39
  2. package/esm2022/lib/extension/download/text/download.text.module.mjs +2 -2
  3. package/esm2022/lib/extension/help/absract.help.widget.directive.mjs +20 -0
  4. package/esm2022/lib/extension/help/help.context.directive.mjs +29 -0
  5. package/esm2022/lib/extension/help/help.context.mjs +24 -0
  6. package/esm2022/lib/extension/help/help.context.service.mjs +34 -0
  7. package/esm2022/lib/extension/help/help.mjs +2 -0
  8. package/esm2022/lib/extension/help/help.providers.mjs +20 -0
  9. package/esm2022/lib/extension/help/help.view.list.component.mjs +60 -0
  10. package/esm2022/lib/extension/help/help.view.list.entry.component.mjs +58 -0
  11. package/esm2022/lib/extension/help/help.view.popover.button.component.mjs +45 -0
  12. package/esm2022/lib/extension/help/help.view.popover.component.mjs +49 -0
  13. package/esm2022/lib/extension/help/help.widget.mjs +6 -0
  14. package/esm2022/lib/extension/help/help.widget.service.mjs +84 -0
  15. package/esm2022/lib/extension/help/index.mjs +13 -0
  16. package/esm2022/lib/extension/index.mjs +2 -1
  17. package/esm2022/lib/layout/content/content.pit.directive.mjs +4 -2
  18. package/esm2022/lib/layout/text/copy.text.component.mjs +39 -0
  19. package/esm2022/lib/layout/text/copy.text.directive.mjs +56 -0
  20. package/esm2022/lib/layout/text/detail.block.component.mjs +5 -3
  21. package/esm2022/lib/layout/text/index.mjs +3 -1
  22. package/esm2022/lib/layout/text/text.module.mjs +6 -4
  23. package/esm2022/lib/util/clipboard.directive.mjs +20 -0
  24. package/esm2022/lib/util/clipboard.mjs +98 -0
  25. package/esm2022/lib/util/index.mjs +3 -1
  26. package/fesm2022/dereekb-dbx-web.mjs +592 -44
  27. package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
  28. package/lib/extension/_extension.scss +19 -0
  29. package/lib/extension/download/text/download.text.component.d.ts +2 -4
  30. package/lib/extension/download/text/download.text.module.d.ts +1 -1
  31. package/lib/extension/help/_help.scss +27 -0
  32. package/lib/extension/help/absract.help.widget.directive.d.ts +12 -0
  33. package/lib/extension/help/help.context.d.ts +11 -0
  34. package/lib/extension/help/help.context.directive.d.ts +17 -0
  35. package/lib/extension/help/help.context.service.d.ts +20 -0
  36. package/lib/extension/help/help.d.ts +15 -0
  37. package/lib/extension/help/help.providers.d.ts +22 -0
  38. package/lib/extension/help/help.view.list.component.d.ts +20 -0
  39. package/lib/extension/help/help.view.list.entry.component.d.ts +16 -0
  40. package/lib/extension/help/help.view.popover.button.component.d.ts +19 -0
  41. package/lib/extension/help/help.view.popover.component.d.ts +60 -0
  42. package/lib/extension/help/help.widget.d.ts +42 -0
  43. package/lib/extension/help/help.widget.service.d.ts +55 -0
  44. package/lib/extension/help/index.d.ts +12 -0
  45. package/lib/extension/index.d.ts +1 -0
  46. package/lib/layout/content/_content.scss +4 -0
  47. package/lib/layout/content/content.pit.directive.d.ts +2 -1
  48. package/lib/layout/text/_text.scss +20 -2
  49. package/lib/layout/text/copy.text.component.d.ts +17 -0
  50. package/lib/layout/text/copy.text.directive.d.ts +23 -0
  51. package/lib/layout/text/detail.block.component.d.ts +2 -1
  52. package/lib/layout/text/index.d.ts +2 -0
  53. package/lib/layout/text/text.module.d.ts +10 -8
  54. package/lib/style/_config.scss +7 -1
  55. package/lib/style/_root-variables.scss +2 -0
  56. package/lib/style/_variables.scss +3 -0
  57. package/lib/util/clipboard.d.ts +78 -0
  58. package/lib/util/clipboard.directive.d.ts +12 -0
  59. package/lib/util/index.d.ts +2 -0
  60. package/package.json +1 -1
@@ -1,15 +1,17 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./address.component";
3
3
  import * as i2 from "./number.limit.component";
4
- import * as i3 from "./text.chip.directive";
5
- import * as i4 from "./detail.block.component";
6
- import * as i5 from "./detail.block.header.component";
7
- import * as i6 from "./label.block.component";
8
- import * as i7 from "./linkify.component";
9
- import * as i8 from "./text.chips.component";
10
- import * as i9 from "./icon.spacer.component";
4
+ import * as i3 from "./copy.text.directive";
5
+ import * as i4 from "./copy.text.component";
6
+ import * as i5 from "./text.chip.directive";
7
+ import * as i6 from "./detail.block.component";
8
+ import * as i7 from "./detail.block.header.component";
9
+ import * as i8 from "./label.block.component";
10
+ import * as i9 from "./linkify.component";
11
+ import * as i10 from "./text.chips.component";
12
+ import * as i11 from "./icon.spacer.component";
11
13
  export declare class DbxTextModule {
12
14
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxTextModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<DbxTextModule, never, [typeof i1.DbxUnitedStatesAddressComponent, typeof i2.DbxNumberWithLimitComponent, typeof i3.DbxChipDirective, typeof i4.DbxDetailBlockComponent, typeof i5.DbxDetailBlockHeaderComponent, typeof i6.DbxLabelBlockComponent, typeof i7.DbxLinkifyComponent, typeof i8.DbxTextChipsComponent, typeof i9.DbxIconSpacerDirective], [typeof i1.DbxUnitedStatesAddressComponent, typeof i2.DbxNumberWithLimitComponent, typeof i3.DbxChipDirective, typeof i4.DbxDetailBlockComponent, typeof i5.DbxDetailBlockHeaderComponent, typeof i6.DbxLabelBlockComponent, typeof i7.DbxLinkifyComponent, typeof i8.DbxTextChipsComponent, typeof i9.DbxIconSpacerDirective]>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxTextModule, never, [typeof i1.DbxUnitedStatesAddressComponent, typeof i2.DbxNumberWithLimitComponent, typeof i3.DbxClickToCopyTextDirective, typeof i4.DbxClickToCopyTextComponent, typeof i5.DbxChipDirective, typeof i6.DbxDetailBlockComponent, typeof i7.DbxDetailBlockHeaderComponent, typeof i8.DbxLabelBlockComponent, typeof i9.DbxLinkifyComponent, typeof i10.DbxTextChipsComponent, typeof i11.DbxIconSpacerDirective], [typeof i1.DbxUnitedStatesAddressComponent, typeof i2.DbxNumberWithLimitComponent, typeof i3.DbxClickToCopyTextDirective, typeof i4.DbxClickToCopyTextComponent, typeof i5.DbxChipDirective, typeof i6.DbxDetailBlockComponent, typeof i7.DbxDetailBlockHeaderComponent, typeof i8.DbxLabelBlockComponent, typeof i9.DbxLinkifyComponent, typeof i10.DbxTextChipsComponent, typeof i11.DbxIconSpacerDirective]>;
14
16
  static ɵinj: i0.ɵɵInjectorDeclaration<DbxTextModule>;
15
17
  }
@@ -194,7 +194,9 @@ $default-notice-color: #f28600;
194
194
  // table enabled by default
195
195
  'table': 1,
196
196
  // zip enabled by default
197
- 'zip': 1
197
+ 'zip': 1,
198
+ // help enabled by default
199
+ 'help': 1
198
200
  );
199
201
 
200
202
  @if ($input-dbx-theme-extension-config != null) {
@@ -223,3 +225,7 @@ $default-notice-color: #f28600;
223
225
  @function get-dbx-extension-zip-enabled($theme-config) {
224
226
  @return get-dbx-extension-config-var($theme-config, 'zip');
225
227
  }
228
+
229
+ @function get-dbx-extension-help-enabled($theme-config) {
230
+ @return get-dbx-extension-config-var($theme-config, 'help');
231
+ }
@@ -32,6 +32,8 @@
32
32
  #{theming.$dbx-page-height-additional-offset-var}: 0px;
33
33
  #{theming.$dbx-content-height-additional-offset-var}: 0px;
34
34
 
35
+ #{theming.$dbx-content-pit-rounded-border-radius-var}: 12px;
36
+
35
37
  #{theming.$dbx-avatar-size-var}: theming.get-dbx-avatar-size($theme-config);
36
38
  #{theming.$dbx-avatar-large-size-var}: theming.get-dbx-avatar-large-size($theme-config);
37
39
  #{theming.$dbx-avatar-small-size-var}: theming.get-dbx-avatar-small-size($theme-config);
@@ -128,6 +128,9 @@ $dbx-grey-color-contrast: var($dbx-grey-color-contrast-var);
128
128
  $dbx-disabled-color-contrast: var($dbx-disabled-color-contrast-var);
129
129
  $dbx-bg-color-contrast: var($dbx-bg-color-contrast-var);
130
130
 
131
+ $dbx-content-pit-rounded-border-radius-var: --dbx-content-pit-rounded-border-radius;
132
+ $dbx-content-pit-rounded-border-radius: var($dbx-content-pit-rounded-border-radius-var);
133
+
131
134
  $dbx-avatar-size: var($dbx-avatar-size-var);
132
135
  $dbx-avatar-large-size: var($dbx-avatar-large-size-var);
133
136
  $dbx-avatar-small-size: var($dbx-avatar-small-size-var);
@@ -0,0 +1,78 @@
1
+ import { Clipboard } from '@angular/cdk/clipboard';
2
+ import { type GetterOrValueWithInput, type Maybe, type Milliseconds, type Seconds } from '@dereekb/util';
3
+ /**
4
+ * True if copying to the clipboard was successful.
5
+ */
6
+ export type CopyToClipboardSuccess = boolean;
7
+ /**
8
+ * Can only copy strings to the clipboard.
9
+ */
10
+ export type CopyToClipboardContent = string;
11
+ /**
12
+ * Copies the input text to the clipboard.
13
+ *
14
+ * @param content The content to copy.
15
+ * @returns A promise that resolves to true if the content was copied successfully, false otherwise.
16
+ */
17
+ export type CopyToClipboardFunction = ((content: CopyToClipboardContent) => Promise<CopyToClipboardSuccess>) & {
18
+ readonly _clipboard: Clipboard;
19
+ };
20
+ export interface CopyToClipboardFunctionConfig {
21
+ readonly copyTimeoutSeconds?: Maybe<Seconds>;
22
+ readonly delayBetweenCopyAttempts?: Maybe<Milliseconds>;
23
+ readonly onCopyResult?: Maybe<(success: CopyToClipboardSuccess, content: CopyToClipboardContent) => void>;
24
+ }
25
+ /**
26
+ * Creates a copy to clipboard function.
27
+ *
28
+ * @param clipboard The clipboard to use.
29
+ * @param config Optional configuration.
30
+ * @returns The copy to clipboard function.
31
+ */
32
+ export declare function copyToClipboardFunction(clipboard: Clipboard, config?: CopyToClipboardFunctionConfig): CopyToClipboardFunction;
33
+ /**
34
+ * Injects a copy to clipboard function.
35
+ *
36
+ * Must be run in an Angular injection context.
37
+ *
38
+ * @param config
39
+ * @returns
40
+ */
41
+ export declare function injectCopyToClipboardFunction(config?: CopyToClipboardFunctionConfig): CopyToClipboardFunction;
42
+ /**
43
+ * Copies the input text to the clipboard.
44
+ *
45
+ * @param content The content to copy.
46
+ * @returns A promise that resolves to true if the content was copied successfully, false otherwise.
47
+ */
48
+ export type CopyToClipboardFunctionWithSnackbarMessage = CopyToClipboardFunction & {
49
+ setSnackbarMessagesConfig(config: Maybe<CopyToClipboardFunctionWithSnackbarMessageSnackbarConfig>): void;
50
+ setSnackbarMessagesEnabled(enabled: boolean): void;
51
+ };
52
+ export interface CopyToClipboardFunctionWithSnackbarMessageSnackbarConfig {
53
+ /**
54
+ * The duration to show the snackbar for.
55
+ *
56
+ * Defaults to 3 seconds.
57
+ */
58
+ readonly snackbarDuration?: Milliseconds;
59
+ /**
60
+ * The message to show when the content is copied successfully.
61
+ */
62
+ readonly successMessage?: GetterOrValueWithInput<string, CopyToClipboardContent>;
63
+ /**
64
+ * The message to show when the content fails to copy.
65
+ */
66
+ readonly failureMessage?: GetterOrValueWithInput<string, CopyToClipboardContent>;
67
+ }
68
+ export interface CopyToClipboardFunctionWithSnackbarMessageConfig extends CopyToClipboardFunctionConfig, CopyToClipboardFunctionWithSnackbarMessageSnackbarConfig {
69
+ }
70
+ /**
71
+ * Injects a copy to clipboard function.
72
+ *
73
+ * Must be run in an Angular injection context.
74
+ *
75
+ * @param config
76
+ * @returns
77
+ */
78
+ export declare function injectCopyToClipboardFunctionWithSnackbarMessage(config?: CopyToClipboardFunctionWithSnackbarMessageConfig): CopyToClipboardFunctionWithSnackbarMessage;
@@ -0,0 +1,12 @@
1
+ import { Maybe } from '@dereekb/util';
2
+ import { CopyToClipboardFunctionWithSnackbarMessageSnackbarConfig } from './clipboard';
3
+ import * as i0 from "@angular/core";
4
+ export declare class AbstractDbxClipboardDirective {
5
+ protected readonly _copyToClipboard: import("./clipboard").CopyToClipboardFunctionWithSnackbarMessage;
6
+ readonly clipboardSnackbarMessagesConfig: import("@angular/core").InputSignal<Maybe<CopyToClipboardFunctionWithSnackbarMessageSnackbarConfig>>;
7
+ readonly clipboardSnackbarMessagesEnabled: import("@angular/core").InputSignal<boolean>;
8
+ protected readonly _configEffect: import("@angular/core").EffectRef;
9
+ protected readonly _enabledEffect: import("@angular/core").EffectRef;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbxClipboardDirective, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbxClipboardDirective, never, never, { "clipboardSnackbarMessagesConfig": { "alias": "clipboardSnackbarMessagesConfig"; "required": false; "isSignal": true; }; "clipboardSnackbarMessagesEnabled": { "alias": "clipboardSnackbarMessagesEnabled"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
12
+ }
@@ -1 +1,3 @@
1
1
  export * from './cdk';
2
+ export * from './clipboard';
3
+ export * from './clipboard.directive';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web",
3
- "version": "12.6.12",
3
+ "version": "12.6.14",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0",