@coolon/angular-ui-powerups 1.11.3 → 1.12.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 (73) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +830 -821
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.d.ts +15 -16
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/esm2015/coolon-angular-ui-powerups.js +15 -16
  9. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  10. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  11. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  12. package/esm2015/lib/components/index.js +1 -0
  13. package/esm2015/lib/components/index.js.map +1 -1
  14. package/esm2015/lib/components/index.metadata.json +1 -1
  15. package/esm2015/lib/components/table/column-model.js +13 -2
  16. package/esm2015/lib/components/table/column-model.js.map +1 -1
  17. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  18. package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +3 -4
  19. package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -1
  20. package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.metadata.json +1 -1
  21. package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js +2 -2
  22. package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
  23. package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.metadata.json +1 -1
  24. package/esm2015/lib/components/table/edit-session.js +20 -0
  25. package/esm2015/lib/components/table/edit-session.js.map +1 -0
  26. package/esm2015/lib/components/table/edit-session.metadata.json +1 -0
  27. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +2 -1
  28. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  29. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
  30. package/esm2015/lib/components/table/table-model.js +4 -24
  31. package/esm2015/lib/components/table/table-model.js.map +1 -1
  32. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  33. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  34. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  35. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  36. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +2 -2
  37. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
  38. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -1
  39. package/esm5/coolon-angular-ui-powerups.js +15 -16
  40. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  41. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  42. package/esm5/lib/components/index.js +1 -0
  43. package/esm5/lib/components/index.js.map +1 -1
  44. package/esm5/lib/components/table/column-model.js +13 -2
  45. package/esm5/lib/components/table/column-model.js.map +1 -1
  46. package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +3 -4
  47. package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -1
  48. package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js +2 -2
  49. package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
  50. package/esm5/lib/components/table/edit-session.js +25 -0
  51. package/esm5/lib/components/table/edit-session.js.map +1 -0
  52. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +2 -1
  53. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  54. package/esm5/lib/components/table/table-model.js +5 -28
  55. package/esm5/lib/components/table/table-model.js.map +1 -1
  56. package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  57. package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  58. package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +2 -2
  59. package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
  60. package/fesm2015/coolon-angular-ui-powerups.js +552 -544
  61. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  62. package/fesm5/coolon-angular-ui-powerups.js +804 -796
  63. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  64. package/lib/components/index.d.ts +1 -0
  65. package/lib/components/table/column-model.d.ts +16 -12
  66. package/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.d.ts +1 -2
  67. package/lib/components/table/edit-row-controls/edit-row-controls.component.d.ts +2 -2
  68. package/lib/components/table/edit-session.d.ts +9 -0
  69. package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +2 -1
  70. package/lib/components/table/table-model.d.ts +4 -13
  71. package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +1 -1
  72. package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +3 -2
  73. package/package.json +1 -1
@@ -23,6 +23,7 @@ export * from "./table/cell-editor.component";
23
23
  export * from "./table/cell-renderer";
24
24
  export * from "./table/column-model";
25
25
  export * from "./table/column-text-properties";
26
+ export * from "./table/edit-session";
26
27
  export * from "./table/table-def";
27
28
  export * from "./table/table-model";
28
29
  export * from "./table/table.component";
@@ -4,18 +4,18 @@ import { Command, Form, SelectionModel, Types, UnaryCommand, Validator } from '@
4
4
  import { AbstractInputComponent } from '../forms/abstract-input.component';
5
5
  import { CellEditorComponent } from './cell-editor.component';
6
6
  import { ColumnTextProperties } from './column-text-properties';
7
- import { TableModel } from './table-model';
7
+ import { EditSession } from './edit-session';
8
8
  export interface ColumnHeaderConfig<Row, C extends any> {
9
9
  portal: Portal<C>;
10
10
  initialiseComponent?: (component: C, column: ColumnModel<Row>) => void;
11
11
  }
12
12
  export interface CellRendererConfig<Row, C extends any> {
13
13
  portal: Portal<C>;
14
- pushState?: (component: C, row: Row, editRowCommand: Command<void>, editSession: TableModel.EditSession<Row>) => void;
14
+ pushState?: (component: C, row: Row, editRowCommand: Command<void>, editSession: EditSession<Row>) => void;
15
15
  }
16
16
  export interface CellEditorConfig<Row, V, C extends AbstractInputComponent<V>> {
17
17
  portal: Portal<C>;
18
- initialiseComponent?: (component: C, editSession: TableModel.EditSession<Row>) => void;
18
+ initialiseComponent?: (component: C, editSession: EditSession<Row>) => void;
19
19
  }
20
20
  export declare class ColumnModel<Row> {
21
21
  readonly columnId: string;
@@ -29,19 +29,21 @@ export declare class ColumnModel<Row> {
29
29
  protected getDefaultHeaderText(): string;
30
30
  getColumnTextProperties(): ColumnTextProperties;
31
31
  textProperties(columnTextProperties: ColumnTextProperties): this;
32
- protected setCellRenderer<C>(cellRenderer: ComponentType<C>, initialiser: (component: C, row: Row, editRowCommand: Command<void>, editSession: TableModel.EditSession<Row>) => void): void;
33
- cellHeaderRenderer<C>(cellRenderer: ComponentType<C>, initialiser: (component: C, column: ColumnModel<Row>) => void): void;
32
+ protected setCellRenderer<C>(cellRenderer: ComponentType<C>, initialiser: (component: C, row: Row, editRowCommand: Command<void>, editSession: EditSession<Row>) => void): void;
33
+ cellHeaderRenderer<C>(cellRenderer: ComponentType<C>, initialiser: (component: C, column: ColumnModel<Row>) => void): this;
34
34
  protected setCellEditor<E extends AbstractInputComponent<any>>(cellEditor: CellEditorConfig<any, any, any>): void;
35
35
  get cellRendererPortal(): Portal<any>;
36
36
  get columnHeaderCellRendererPortal(): Portal<any>;
37
37
  get cellEditorPortal(): Portal<any>;
38
38
  hasEditor(): boolean;
39
- updateCellRenderer(component: any, row: Row, editRowCommand: Command<void>, editSession: TableModel.EditSession<Row>): void;
39
+ updateCellRenderer(component: any, row: Row, editRowCommand: Command<void>, editSession: EditSession<Row>): void;
40
40
  initialiseHeader(component: any): void;
41
- initialiseEditor(component: any, editSession: TableModel.EditSession<Row>): void;
41
+ initialiseEditor(component: any, editSession: EditSession<Row>): void;
42
42
  }
43
43
  export declare namespace ColumnModel {
44
- type Defaults = Pick<TableModel<any>, 'getColumnTextProperties'>;
44
+ interface Defaults {
45
+ getColumnTextProperties(columnModel: ColumnModel<any>): ColumnTextProperties;
46
+ }
45
47
  }
46
48
  export interface CellEditorOptions<V, E extends CellEditorComponent<V>> {
47
49
  validators?: Validator<V>[];
@@ -49,26 +51,28 @@ export interface CellEditorOptions<V, E extends CellEditorComponent<V>> {
49
51
  }
50
52
  export declare class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {
51
53
  readonly property: P;
54
+ private _format;
52
55
  constructor(property: P, defaults: ColumnModel.Defaults);
53
56
  cellRenderer(componentType: ComponentType<{
54
57
  value: Row[P];
55
- }>): void;
58
+ }>): this;
56
59
  cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, options?: CellEditorOptions<Row[P], E>): this;
60
+ format(formatter: (value: Row[P]) => any): this;
57
61
  }
58
62
  export declare class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {
59
63
  private getValue;
60
64
  constructor(columnId: string, defaults: ColumnModel.Defaults, getValue: (row: Row) => V);
61
65
  cellRenderer(componentType: ComponentType<{
62
66
  value: V;
63
- }>): void;
67
+ }>): this;
64
68
  }
65
69
  export declare class EditorControlColumnModel<Row> extends ColumnModel<Row> {
66
70
  constructor(columnId: string, saveCommand: UnaryCommand<Form<Row>, boolean>, defaults: ColumnModel.Defaults);
67
71
  cellRenderer(componentType: ComponentType<{
68
72
  row: Row;
69
- editSession: TableModel.EditSession<Row>;
73
+ editSession: EditSession<Row>;
70
74
  editRowCommand: Command<void>;
71
- }>): void;
75
+ }>): this;
72
76
  protected getDefaultHeaderText(): string;
73
77
  }
74
78
  export declare class CustomTemplateColumnModel<Row> extends ColumnModel<Row> {
@@ -1,5 +1,4 @@
1
- import { ColumnModel } from '../column-model';
2
1
  export declare class DefaultHeaderCellRendererComponent {
3
- columnModel: ColumnModel<any>;
2
+ headerText: string;
4
3
  constructor();
5
4
  }
@@ -1,11 +1,11 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { Command, Form } from '@coolon/pectin';
3
3
  import { DisposableComponent } from '../../disposable-component';
4
- import { TableModel } from '../table-model';
4
+ import { EditSession } from '../edit-session';
5
5
  export declare class EditRowControls<Row> extends DisposableComponent implements OnInit {
6
6
  row: Row;
7
7
  editRowCommand: Command<void>;
8
- editSession: TableModel.EditSession<Row>;
8
+ editSession: EditSession<Row>;
9
9
  readonly saveCommand: Command<void>;
10
10
  readonly cancelCommand: Command<void>;
11
11
  constructor();
@@ -0,0 +1,9 @@
1
+ import { Form, GarbageCollector, UnaryCommand } from '@coolon/pectin';
2
+ export declare class EditSession<Row> extends GarbageCollector {
3
+ readonly rowId: any;
4
+ readonly saveCommand: UnaryCommand<Form<Row>, boolean>;
5
+ readonly form: Form<Row>;
6
+ private _editorValue;
7
+ readonly rowValueModel: import("@coolon/pectin").ValueModel<Row>;
8
+ constructor(rowId: any, row: Row, saveCommand: UnaryCommand<Form<Row>, boolean>);
9
+ }
@@ -1,10 +1,11 @@
1
1
  import { OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { ColumnModel } from '../column-model';
3
+ import { EditSession } from '../edit-session';
3
4
  import { TableModel } from '../table-model';
4
5
  export declare class TableCellRendererComponent<Row> implements OnChanges {
5
6
  row: Row;
6
7
  column: ColumnModel<Row>;
7
- editSession: TableModel.EditSession<Row>;
8
+ editSession: EditSession<Row>;
8
9
  tableModel: TableModel<Row>;
9
10
  private renderer;
10
11
  private editor;
@@ -1,6 +1,7 @@
1
- import { BooleanValueModelChain, CanIdentify, Form, GarbageCollector, ListModel, ListModelChain, SelectionModel, Types, UnaryCommand } from '@coolon/pectin';
1
+ import { BooleanValueModelChain, CanIdentify, Form, ListModel, ListModelChain, SelectionModel, Types, UnaryCommand } from '@coolon/pectin';
2
2
  import { ColumnModel, CustomValueColumnModel, EditorControlColumnModel, PropertyColumnModel, SelectionColumnModel } from './column-model';
3
3
  import { ColumnTextProperties } from './column-text-properties';
4
+ import { EditSession } from './edit-session';
4
5
  /**
5
6
  * Example:
6
7
  * @example
@@ -98,17 +99,7 @@ export declare class TableModel<Row> {
98
99
  [columnName: string]: () => ColumnTextProperties;
99
100
  }): void;
100
101
  getColumnTextProperties(column: ColumnModel<Row>): ColumnTextProperties;
101
- startEditSession(row: Row): TableModel.EditSession<Row>;
102
- getEditSessionFor(row: Row): TableModel.EditSession<Row>;
102
+ startEditSession(row: Row): EditSession<Row>;
103
+ getEditSessionFor(row: Row): EditSession<Row>;
103
104
  cancelAllEditorSessions(): void;
104
105
  }
105
- export declare namespace TableModel {
106
- class EditSession<Row> extends GarbageCollector {
107
- readonly rowId: any;
108
- readonly saveCommand: UnaryCommand<Form<Row>, boolean>;
109
- readonly form: Form<Row>;
110
- private _editorValue;
111
- readonly rowValueModel: import("@coolon/pectin").ValueModel<Row>;
112
- constructor(rowId: any, row: Row, saveCommand: UnaryCommand<Form<Row>, boolean>);
113
- }
114
- }
@@ -1,6 +1,6 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { Command } from '@coolon/pectin';
3
- import { DisposableComponent } from '../../../components';
3
+ import { DisposableComponent } from '../../../components/disposable-component';
4
4
  export declare class ActivityActionsComponent extends DisposableComponent implements OnInit {
5
5
  confirmCommand: Command<any>;
6
6
  confirmText: string;
@@ -2,8 +2,9 @@ import { ConnectedPosition, Overlay } from '@angular/cdk/overlay';
2
2
  import { ComponentPortal } from '@angular/cdk/portal';
3
3
  import { ElementRef, OnInit } from '@angular/core';
4
4
  import { Constructable } from '@coolon/pectin';
5
- import { Activity, InPlaceInteractionContextComponent } from '../..';
6
- import { DisposableComponent } from '../../../components';
5
+ import { DisposableComponent } from '../../../components/disposable-component';
6
+ import { Activity } from '../../activity';
7
+ import { InPlaceInteractionContextComponent } from '../inplace-interaction-context/in-place-interaction-context.component';
7
8
  export declare class PopupInteractionContextComponent extends DisposableComponent implements OnInit {
8
9
  private _element;
9
10
  private _overlay;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "1.11.3",
3
+ "version": "1.12.0",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "dependencies": {
6
6
  "ts-morph": "^7.0.3",