@coolon/angular-ui-powerups 3.16.0-alpha.0 → 3.17.0

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 (71) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/assets/activities.scss +4 -1
  3. package/assets/form.scss +20 -0
  4. package/bundles/coolon-angular-ui-powerups.umd.js +215 -103
  5. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  6. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  7. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  8. package/coolon-angular-ui-powerups.metadata.json +1 -1
  9. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  10. package/esm2015/lib/components/card-container/card-container.component.js +1 -1
  11. package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
  12. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  13. package/esm2015/lib/components/forms/number-input/number-input.component.js +3 -2
  14. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  15. package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
  16. package/esm2015/lib/components/forms/string-input/string-input.component.js +3 -2
  17. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  18. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  19. package/esm2015/lib/components/table/paginator/paginator.component.js +5 -2
  20. package/esm2015/lib/components/table/paginator/paginator.component.js.map +1 -1
  21. package/esm2015/lib/components/table/paginator/paginator.component.metadata.json +1 -1
  22. package/esm2015/lib/components/table/table.component.js +13 -0
  23. package/esm2015/lib/components/table/table.component.js.map +1 -1
  24. package/esm2015/lib/components/table/table.component.metadata.json +1 -1
  25. package/esm2015/lib/interaction/activity.js +19 -3
  26. package/esm2015/lib/interaction/activity.js.map +1 -1
  27. package/esm2015/lib/interaction/activity.metadata.json +1 -1
  28. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +35 -26
  29. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  30. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  31. package/esm2015/lib/interaction/components/activity-content/activity-body.component.html.shim.ngstyle.js.map +1 -0
  32. package/esm2015/lib/interaction/components/activity-content/activity-body.component.js +26 -0
  33. package/esm2015/lib/interaction/components/activity-content/activity-body.component.js.map +1 -0
  34. package/esm2015/lib/interaction/components/activity-content/activity-body.component.metadata.json +1 -0
  35. package/esm2015/lib/interaction/components/activity-content/activity-body.component.ngfactory.js.map +1 -0
  36. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +10 -1
  37. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  38. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
  39. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +18 -7
  40. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  41. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
  42. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +16 -2
  43. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  44. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
  45. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js +1 -4
  46. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js.map +1 -1
  47. package/esm2015/lib/interaction/components/input-activities/select-input-activity.metadata.json +1 -1
  48. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js +1 -3
  49. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js.map +1 -1
  50. package/esm2015/lib/interaction/components/input-activities/string-input-activity.metadata.json +1 -1
  51. package/esm2015/lib/interaction/exports.js +1 -0
  52. package/esm2015/lib/interaction/exports.js.map +1 -1
  53. package/esm2015/lib/interaction/exports.metadata.json +1 -1
  54. package/esm2015/lib/interaction/interaction.module.js +6 -2
  55. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  56. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  57. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  58. package/fesm2015/coolon-angular-ui-powerups.js +191 -97
  59. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  60. package/lib/components/forms/number-input/number-input.component.d.ts +1 -0
  61. package/lib/components/forms/string-input/string-input.component.d.ts +1 -0
  62. package/lib/components/table/paginator/paginator.component.d.ts +2 -1
  63. package/lib/components/table/table.component.d.ts +13 -0
  64. package/lib/interaction/activity.d.ts +9 -3
  65. package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +24 -20
  66. package/lib/interaction/components/activity-content/activity-body.component.d.ts +5 -0
  67. package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +2 -0
  68. package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +3 -1
  69. package/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.d.ts +3 -0
  70. package/lib/interaction/exports.d.ts +1 -0
  71. package/package.json +2 -1
@@ -4,6 +4,7 @@ export declare class NumberInputComponent extends AbstractValueInputComponent<nu
4
4
  autocomplete: string;
5
5
  min: number;
6
6
  max: number;
7
+ iconPrefix: string;
7
8
  constructor();
8
9
  ngOnInit(): void;
9
10
  }
@@ -5,6 +5,7 @@ export declare class StringInputComponent extends AbstractValueInputComponent<st
5
5
  autocomplete: string;
6
6
  enableClearModel: ValueModel<boolean>;
7
7
  enableClear: boolean;
8
+ iconPrefix: string;
8
9
  readonly clearCommand: Command<void>;
9
10
  constructor();
10
11
  ngOnInit(): void;
@@ -1,6 +1,7 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { PageController } from '@coolon/pectin';
3
- export declare class PaginatorComponent implements OnInit {
3
+ import { DisposableComponent } from '../../disposable-component';
4
+ export declare class PaginatorComponent extends DisposableComponent implements OnInit {
4
5
  pageController: PageController;
5
6
  constructor();
6
7
  ngOnInit(): void;
@@ -16,6 +16,19 @@ import { ColumnModel } from './column-model';
16
16
  * @example
17
17
  * <aup-table [tableModel]="heroTableModel"></aup-table>
18
18
  *
19
+ * Column templates
20
+ * @example
21
+ * this.heroTableModel = TableModel.fromList(heroList, table => {
22
+ * table.pluck("firstName");
23
+ * table.pluck("lastName");
24
+ * table.addTemplateColumn("specialColumn");
25
+ * });
26
+ * <aup-table [tableModel]="heroTableModel">
27
+ * <div *aupColumnTemplate="let hero; columnId: 'specialColumn'; fillCell: true; padChild:false">
28
+ * {{hero.name}}
29
+ * </div>
30
+ * </aup-table>
31
+ *
19
32
  * Styling
20
33
  * @example
21
34
  * aup-table {
@@ -1,16 +1,22 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { ValueModel } from '@coolon/pectin';
1
+ import { AfterViewInit, InjectionToken } from '@angular/core';
2
+ import { Command, ValueModel } from '@coolon/pectin';
3
3
  import { DisposableComponent } from '../components/disposable-component';
4
+ import { ActivityActionsComponent } from './components/activity-actions/activity-actions.component';
4
5
  import { InteractionContext } from './interaction-context';
5
6
  export declare const ACTIVITY_DATA: InjectionToken<any>;
6
- export declare class Activity<D, R, E = any> extends DisposableComponent {
7
+ export declare class Activity<D, R, E = any> extends DisposableComponent implements AfterViewInit {
7
8
  private readonly _busyModel;
8
9
  private _focusedModel;
9
10
  private _activityContext;
11
+ protected activityActions: ActivityActionsComponent;
12
+ confirmCommand: Command<unknown>;
13
+ cancelCommand: Command<unknown>;
10
14
  private _interactionContext;
11
15
  class: string;
12
16
  get isFocused(): boolean;
17
+ constructor();
13
18
  initialise(nestedInteractionContext: InteractionContext, activityContext: Activity.Context<R, E>): void;
19
+ ngAfterViewInit(): void;
14
20
  get interactionContext(): InteractionContext;
15
21
  done(result?: R): void;
16
22
  cancel(error?: E): void;
@@ -1,49 +1,53 @@
1
- import { OnInit } from '@angular/core';
1
+ import { ChangeDetectorRef, OnInit } from '@angular/core';
2
2
  import { Command } from '@coolon/pectin';
3
3
  import { CommandFace } from '../../../components/commands/command-face';
4
4
  import { DisposableComponent } from '../../../components/disposable-component';
5
5
  /**
6
6
  * @example
7
- * <aup-activity-actions
8
- * [confirmCommand]="confirm"
9
- * [cancelCommand]="cancel"
10
- * [style]="{confirm: saveFace, cancel: cancelFace}">
7
+ * <aup-activity-actions [style]="{confirm: saveFace, cancel: cancelFace}">
11
8
  * </aup-activity-actions>
12
9
  *
13
10
  * // Running `ng g @coolon/angular-ui-powerups:aup-i18n` will install default
14
11
  * // style definitions
15
- * <aup-activity-actions
16
- * [confirmCommand]="confirm"
17
- * [cancelCommand]="cancel"
18
- * [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
19
- * </aup-activity-actions>
20
- *
21
- * // both commands are optional
22
- * <aup-activity-actions
23
- * [confirmCommand]="confirm"
24
- * [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
12
+ * <aup-activity-actions [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
25
13
  * </aup-activity-actions>
26
14
  *
27
15
  * // you can also add additional content that will be displayed along with the buttons.
28
16
  * // The location of the content depends on the alignment attribute.
29
17
  * <aup-activity-actions
30
- * [confirmCommand]="confirm"
31
- * [cancelCommand]="cancel"
32
18
  * align="stretch"
33
19
  * [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
34
20
  * <span>This content will be between the two commands</span>
35
21
  * </aup-activity-actions>
36
22
  */
37
23
  export declare class ActivityActionsComponent extends DisposableComponent implements OnInit {
24
+ private readonly cdr;
25
+ /**
26
+ * @deprecated activity actions now use the confirm command of the activity automatically
27
+ */
38
28
  confirmCommand: Command<any>;
29
+ /**
30
+ * @deprecated activity actions now use the cancel command of the activity automatically
31
+ */
39
32
  cancelCommand: Command<any>;
40
- style: ActivityActionsComponent.Style;
33
+ set faces(faces: ActivityActionsComponent.Style);
34
+ confirmFace: CommandFace;
35
+ cancelFace: CommandFace;
36
+ /**
37
+ * @deprecated use #commandFaces instead.
38
+ */
39
+ set style(style: ActivityActionsComponent.Style);
41
40
  align: 'start' | 'end' | 'stretch';
42
41
  get alignEnd(): boolean;
43
42
  get alignStretch(): boolean;
43
+ constructor(cdr: ChangeDetectorRef);
44
44
  ngOnInit(): void;
45
- hasConfirmCommand(): boolean;
46
- hasCancelCommand(): boolean;
45
+ hasConfirmFace(): CommandFace;
46
+ hasCancelFace(): CommandFace;
47
+ initCommands(activity: {
48
+ confirmCommand: Command<unknown>;
49
+ cancelCommand: Command<unknown>;
50
+ }): void;
47
51
  }
48
52
  export declare namespace ActivityActionsComponent {
49
53
  interface Style {
@@ -0,0 +1,5 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { DisposableComponent } from '../../../components/disposable-component';
3
+ export declare class ActivityBodyComponent extends DisposableComponent implements OnInit {
4
+ ngOnInit(): void;
5
+ }
@@ -1,8 +1,10 @@
1
1
  import { OnInit } from '@angular/core';
2
+ import { CommandFace } from '../../../components/commands/command-face';
2
3
  import { Activity } from '../../activity';
3
4
  import { Alert } from '../../alert';
4
5
  export declare class AlertDialogComponent extends Activity<Alert, void> implements OnInit {
5
6
  readonly alert: Alert;
7
+ readonly confirmFace: CommandFace;
6
8
  constructor(alert: Alert);
7
9
  ngOnInit(): void;
8
10
  }
@@ -1,14 +1,16 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { Constructable } from '@coolon/pectin';
3
+ import { CommandFace } from '../../../components/commands/command-face';
3
4
  import { Activity } from '../../activity';
4
5
  import { Confirm } from '../../confirm';
5
6
  export declare class ConfirmThenDialogComponent<D, R, E> extends Activity<ConfirmThenDialogComponent.Data<D, R, E>, R, E> implements OnInit {
6
7
  readonly config: ConfirmThenDialogComponent.Data<D, R, E>;
8
+ readonly confirmFace: CommandFace;
9
+ readonly cancelFace: CommandFace;
7
10
  constructor(config: ConfirmThenDialogComponent.Data<D, R, E>);
8
11
  ngOnInit(): void;
9
12
  get confirm(): Confirm;
10
13
  isDestructive(): boolean;
11
- onConfirm(): void;
12
14
  }
13
15
  export declare namespace ConfirmThenDialogComponent {
14
16
  interface Data<D, R, E> {
@@ -1,8 +1,11 @@
1
1
  import { OnInit } from '@angular/core';
2
+ import { CommandFace } from '../../../components/commands/command-face';
2
3
  import { Activity } from '../../activity';
3
4
  import { Confirm } from '../../confirm';
4
5
  export declare class ConfirmationDialogComponent extends Activity<Confirm, void> implements OnInit {
5
6
  readonly confirm: Confirm;
7
+ readonly confirmFace: CommandFace;
8
+ readonly cancelFace: CommandFace;
6
9
  constructor(confirm: Confirm);
7
10
  ngOnInit(): void;
8
11
  isDestructive(): boolean;
@@ -13,6 +13,7 @@ export * from "./route-synchronisation-adapter";
13
13
  export * from "./components/activity-actions/activity-actions.component";
14
14
  export * from "./components/activity-container/activity-container.component";
15
15
  export * from "./components/activity-container/activity-outlet/activity-outlet.component";
16
+ export * from "./components/activity-content/activity-body.component";
16
17
  export * from "./components/activity-title/activity-title.component";
17
18
  export * from "./components/add-item-interaction-context/add-item-interaction-context.component";
18
19
  export * from "./components/alert-dialog/alert-dialog.component";
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "3.16.0-alpha.0",
3
+ "version": "3.17.0",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "dependencies": {
6
6
  "@coolon/typescript-utilities": "^2.2.0",
7
7
  "@typescript-plus/fast-memoize-decorator": "^0.1.0",
8
8
  "json5": "^2.1.0",
9
9
  "ts-morph": "^9.1.0",
10
+ "wake-event": "^0.0.1",
10
11
  "tslib": "^2.0.0",
11
12
  "typescript-string-enums": "^1.0.0"
12
13
  },