@coolon/angular-ui-powerups 12.4.0-alpha.72 → 12.4.0-alpha.74

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 (63) hide show
  1. package/assets/pills.scss +45 -0
  2. package/assets/styles.scss +2 -0
  3. package/bundles/coolon-angular-ui-powerups.umd.js +177 -25
  4. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  5. package/coolon-angular-ui-powerups.metadata.json +1 -1
  6. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  7. package/esm2015/lib/components/components.module.js +7 -2
  8. package/esm2015/lib/components/components.module.js.map +1 -1
  9. package/esm2015/lib/components/components.module.metadata.json +1 -1
  10. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  11. package/esm2015/lib/components/exports.js +1 -0
  12. package/esm2015/lib/components/exports.js.map +1 -1
  13. package/esm2015/lib/components/exports.metadata.json +1 -1
  14. package/esm2015/lib/components/text/markdown/markdown.component.js +48 -0
  15. package/esm2015/lib/components/text/markdown/markdown.component.js.map +1 -0
  16. package/esm2015/lib/components/text/markdown/markdown.component.metadata.json +1 -0
  17. package/esm2015/lib/components/text/markdown/markdown.component.ngfactory.js.map +1 -0
  18. package/esm2015/lib/components/text/markdown/markdown.component.scss.shim.ngstyle.js.map +1 -0
  19. package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -1
  20. package/esm2015/lib/interaction/alert.js +17 -1
  21. package/esm2015/lib/interaction/alert.js.map +1 -1
  22. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +10 -3
  23. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  24. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
  25. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +7 -2
  26. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  27. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
  28. package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.js +8 -3
  29. package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.js.map +1 -1
  30. package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.metadata.json +1 -1
  31. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +8 -3
  32. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  33. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
  34. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  35. package/esm2015/lib/interaction/interaction-context.js.map +1 -1
  36. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  37. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  38. package/esm2015/lib/services/exports.js +2 -0
  39. package/esm2015/lib/services/exports.js.map +1 -1
  40. package/esm2015/lib/services/exports.metadata.json +1 -1
  41. package/esm2015/lib/services/markdown/markdown.service.js +26 -0
  42. package/esm2015/lib/services/markdown/markdown.service.js.map +1 -0
  43. package/esm2015/lib/services/markdown/markdown.service.metadata.json +1 -0
  44. package/esm2015/lib/services/markdown/markdown.service.ngfactory.js.map +1 -0
  45. package/esm2015/lib/services/markdown/pill-plugin.js +38 -0
  46. package/esm2015/lib/services/markdown/pill-plugin.js.map +1 -0
  47. package/esm2015/lib/services/markdown/pill-plugin.metadata.json +1 -0
  48. package/fesm2015/coolon-angular-ui-powerups.js +156 -14
  49. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  50. package/lib/components/exports.d.ts +1 -0
  51. package/lib/components/text/markdown/markdown.component.d.ts +13 -0
  52. package/lib/interaction/abstract-interaction-context.d.ts +1 -1
  53. package/lib/interaction/alert.d.ts +7 -1
  54. package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +4 -0
  55. package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +3 -0
  56. package/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.d.ts +5 -1
  57. package/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.d.ts +3 -0
  58. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +1 -1
  59. package/lib/interaction/interaction-context.d.ts +1 -1
  60. package/lib/services/exports.d.ts +2 -0
  61. package/lib/services/markdown/markdown.service.d.ts +6 -0
  62. package/lib/services/markdown/pill-plugin.d.ts +15 -0
  63. package/package.json +2 -1
@@ -76,6 +76,7 @@ export * from "./tables/tree-table/tree-table-component";
76
76
  export * from "./tables/tree-table/tree-table-model";
77
77
  export * from "./tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component";
78
78
  export * from "./tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component";
79
+ export * from "./text/markdown/markdown.component";
79
80
  export * from "./types/bounds.class";
80
81
  export * from "./types/dimension.class";
81
82
  export * from "./types/point.class";
@@ -0,0 +1,13 @@
1
+ import { ElementRef, OnInit } from '@angular/core';
2
+ import { ValueModel } from '@coolon/pectin';
3
+ import { MarkdownService } from '../../../services/markdown/markdown.service';
4
+ import { DisposableComponent } from '../../disposable-component';
5
+ export declare class MarkdownComponent extends DisposableComponent implements OnInit {
6
+ private readonly element;
7
+ private readonly markdownService;
8
+ content$: ValueModel<string>;
9
+ content: string;
10
+ inline: boolean;
11
+ constructor(element: ElementRef, markdownService: MarkdownService);
12
+ ngOnInit(): void;
13
+ }
@@ -21,5 +21,5 @@ export declare abstract class AbstractInteractionContext implements InteractionC
21
21
  * @param data the activity data.
22
22
  */
23
23
  confirmThen<D, R, E>(confirm: Confirm, activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R>;
24
- confirmThenExecute<R>(confirm: Confirm, operation: () => (Promise<R> | R)): Promise<R>;
24
+ confirmThenExecute<R>(confirm: Confirm, operation: (interactionContext: InteractionContext) => (Promise<R> | R)): Promise<R>;
25
25
  }
@@ -1,5 +1,11 @@
1
1
  export interface Alert {
2
2
  title?(): string;
3
- content(): string[];
3
+ color?(): 'primary' | 'accent' | 'warn';
4
+ content(): string | string[];
4
5
  ok(): string;
5
6
  }
7
+ export declare namespace Alert {
8
+ function getContent(alert: Alert): string[];
9
+ function getTitle(alert: Alert): string;
10
+ function getColor(alert: Alert): 'primary' | 'accent' | 'warn';
11
+ }
@@ -5,6 +5,10 @@ import { Alert } from '../../alert';
5
5
  export declare class AlertDialogComponent extends Activity<Alert, void> implements OnInit {
6
6
  readonly alert: Alert;
7
7
  readonly confirmFace: CommandFace;
8
+ readonly title: string;
9
+ readonly content: string[];
10
+ readonly color?: 'primary' | 'accent' | 'warn';
8
11
  constructor(alert: Alert);
12
+ isContentArray(): void;
9
13
  ngOnInit(): void;
10
14
  }
@@ -7,6 +7,9 @@ export declare class ConfirmThenDialogComponent<D, R, E> extends Activity<Confir
7
7
  readonly config: ConfirmThenDialogComponent.Data<D, R, E>;
8
8
  readonly confirmFace: CommandFace;
9
9
  readonly cancelFace: CommandFace;
10
+ readonly title: string;
11
+ readonly color: 'primary' | 'accent' | 'warn';
12
+ readonly content: string[];
10
13
  constructor(config: ConfirmThenDialogComponent.Data<D, R, E>);
11
14
  ngOnInit(): void;
12
15
  get confirm(): Confirm;
@@ -1,10 +1,14 @@
1
1
  import { CommandFace } from '../../../components/commands/command-face';
2
2
  import { Activity } from '../../activity';
3
3
  import { Confirm } from '../../confirm';
4
+ import { InteractionContext } from '../../interaction-context';
4
5
  export declare class ConfirmThenExecuteDialogComponent<R, E> extends Activity<ConfirmThenExecuteDialogComponent.Data<R, E>, R, E> {
5
6
  readonly data: ConfirmThenExecuteDialogComponent.Data<R, E>;
6
7
  readonly confirmFace: CommandFace;
7
8
  readonly cancelFace: CommandFace;
9
+ readonly title: string;
10
+ readonly color: 'primary' | 'accent' | 'warn';
11
+ readonly content: string[];
8
12
  constructor(data: ConfirmThenExecuteDialogComponent.Data<R, E>);
9
13
  get confirm(): Confirm;
10
14
  get titleColor(): string;
@@ -13,6 +17,6 @@ export declare class ConfirmThenExecuteDialogComponent<R, E> extends Activity<Co
13
17
  export declare namespace ConfirmThenExecuteDialogComponent {
14
18
  interface Data<R, E> {
15
19
  confirm: Confirm;
16
- operation: () => R | Promise<R>;
20
+ operation: (interactionContext: InteractionContext) => R | Promise<R>;
17
21
  }
18
22
  }
@@ -6,6 +6,9 @@ export declare class ConfirmationDialogComponent extends Activity<Confirm, void>
6
6
  readonly confirm: Confirm;
7
7
  readonly confirmFace: CommandFace;
8
8
  readonly cancelFace: CommandFace;
9
+ readonly title: string;
10
+ readonly color: 'primary' | 'accent' | 'warn';
11
+ readonly content: string[];
9
12
  constructor(confirm: Confirm);
10
13
  ngOnInit(): void;
11
14
  get titleColor(): string;
@@ -39,7 +39,7 @@ export declare class InPlaceInteractionContextComponent<D, R, E> extends Disposa
39
39
  confirm(confirm: Confirm): Promise<boolean>;
40
40
  confirmOrReject(confirm: Confirm): Promise<void>;
41
41
  confirmThen<D1, R1, E1>(confirm: Confirm, activityType: Constructable<Activity<D1, R1, E1>>, data?: D1): Promise<R1>;
42
- confirmThenExecute<R1>(confirm: Confirm, operation: () => (Promise<R1> | R1)): Promise<R1>;
42
+ confirmThenExecute<R1>(confirm: Confirm, operation: (interactionContext: InteractionContext) => (Promise<R1> | R1)): Promise<R1>;
43
43
  isActive(): boolean;
44
44
  startActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data?: D1, options?: InteractionContext.Options): Promise<R1>;
45
45
  }
@@ -11,7 +11,7 @@ export interface InteractionContext extends Disposable, Disposable.Collector {
11
11
  alert(alert: Alert): Promise<void>;
12
12
  confirmOrReject(confirm: Confirm): Promise<void>;
13
13
  confirmThen<D, R, E>(confirm: Confirm, activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R>;
14
- confirmThenExecute<R>(confirm: Confirm, operation: () => R | Promise<R>): Promise<R>;
14
+ confirmThenExecute<R>(confirm: Confirm, operation: (interactionContext: InteractionContext) => R | Promise<R>): Promise<R>;
15
15
  }
16
16
  export declare namespace InteractionContext {
17
17
  interface Options {
@@ -2,3 +2,5 @@
2
2
  * @file Automatically generated by barrelsby.
3
3
  */
4
4
  export * from "./visibility-service";
5
+ export * from "./markdown/markdown.service";
6
+ export * from "./markdown/pill-plugin";
@@ -0,0 +1,6 @@
1
+ export declare class MarkdownService {
2
+ constructor();
3
+ render(content: string): string;
4
+ renderInline(content: string): string;
5
+ usePillExtension(renderer?: (content: string) => string): void;
6
+ }
@@ -0,0 +1,15 @@
1
+ import { marked } from 'marked';
2
+ import RendererThis = marked.RendererThis;
3
+ import TokenizerThis = marked.TokenizerThis;
4
+ import Tokens = marked.Tokens;
5
+ export declare const markdownPillExtension: (renderPill: (text: string) => string) => {
6
+ name: string;
7
+ level: string;
8
+ start: (src: string) => number;
9
+ tokenizer: (this: TokenizerThis, src: string) => {
10
+ type: string;
11
+ raw: string;
12
+ text: string;
13
+ };
14
+ renderer: (this: RendererThis, token: Tokens.Generic) => string;
15
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "12.4.0-alpha.72",
3
+ "version": "12.4.0-alpha.74",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "dependencies": {
6
6
  "@coolon/typescript-utilities": "^2.3.0",
@@ -14,6 +14,7 @@
14
14
  "@fortawesome/free-solid-svg-icons": "^5.15.2",
15
15
  "@fortawesome/fontawesome-free": "5.15.3",
16
16
  "resize-observer-polyfill": "^1.5.1",
17
+ "marked": "^4.0.3",
17
18
  "tslib": "^2.2.0"
18
19
  },
19
20
  "peerDependencies": {