@coolon/angular-ui-powerups 1.13.1 → 1.13.3
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/CHANGELOG.md +15 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +557 -540
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +3 -1
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/index.js +1 -0
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/scroll-container/scroll-container.component.js +1 -1
- package/esm2015/lib/components/scroll-container/scroll-container.component.js.map +1 -1
- package/esm2015/lib/components/scroll-container/scroll-container.component.metadata.json +1 -1
- package/esm2015/lib/components/table/cell-editors.js.map +1 -1
- package/esm2015/lib/components/table/cell-protal-ref.js +89 -0
- package/esm2015/lib/components/table/cell-protal-ref.js.map +1 -0
- package/esm2015/lib/components/table/cell-protal-ref.metadata.json +1 -0
- package/esm2015/lib/components/table/column-model.js +3 -105
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +22 -9
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +2 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +2 -1
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +23 -7
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +2 -2
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
- package/esm5/lib/components/components.module.js +3 -1
- package/esm5/lib/components/components.module.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/index.js +1 -0
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/scroll-container/scroll-container.component.js +1 -1
- package/esm5/lib/components/scroll-container/scroll-container.component.js.map +1 -1
- package/esm5/lib/components/table/cell-editors.js.map +1 -1
- package/esm5/lib/components/table/cell-protal-ref.js +113 -0
- package/esm5/lib/components/table/cell-protal-ref.js.map +1 -0
- package/esm5/lib/components/table/column-model.js +4 -129
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +31 -16
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +2 -1
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +2 -1
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +23 -7
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +2 -2
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +527 -511
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +556 -538
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/table/cell-protal-ref.d.ts +53 -0
- package/lib/components/table/column-model.d.ts +2 -48
- package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +8 -3
- package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +2 -1
- package/lib/components/table/table-model.d.ts +2 -1
- package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +3 -2
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ export * from "./noop/noop.component";
|
|
|
23
23
|
export * from "./scroll-container/scroll-container.component";
|
|
24
24
|
export * from "./switch-case/switch-case.component";
|
|
25
25
|
export * from "./table/cell-editors";
|
|
26
|
+
export * from "./table/cell-protal-ref";
|
|
26
27
|
export * from "./table/cell-renderer";
|
|
27
28
|
export * from "./table/column-model";
|
|
28
29
|
export * from "./table/column-text-properties";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ComponentType } from '@angular/cdk/overlay';
|
|
2
|
+
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
|
+
import { ColumnModel, RowData } from './column-model';
|
|
4
|
+
import { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';
|
|
5
|
+
import { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';
|
|
6
|
+
import { EditSession } from './edit-session';
|
|
7
|
+
export declare const HEADER_CELL_RENDERER_PORTAL: unique symbol;
|
|
8
|
+
export declare const CELL_RENDERER_PORTAL: unique symbol;
|
|
9
|
+
export declare const CELL_EDITOR_PORTAL: unique symbol;
|
|
10
|
+
export declare const PORTAL_RENDERER_COMPONENT: unique symbol;
|
|
11
|
+
export declare const PORTAL_EDITOR_COMPONENT: unique symbol;
|
|
12
|
+
export declare abstract class CellPortalRef<Row, Host, Portal> {
|
|
13
|
+
constructor();
|
|
14
|
+
abstract initialiseHost(host: Host, columnModel: ColumnModel<Row>): any;
|
|
15
|
+
abstract onPortalAttached(host: Host, portalComponent: Portal): any;
|
|
16
|
+
}
|
|
17
|
+
export declare class CellHeaderPortalRef<Row, C> extends CellPortalRef<Row, TableHeaderCellRendererComponent, C> {
|
|
18
|
+
readonly componentType: ComponentType<C>;
|
|
19
|
+
readonly initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void;
|
|
20
|
+
constructor(componentType: ComponentType<C>, initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void);
|
|
21
|
+
initialiseHost(host: TableHeaderCellRendererComponent, columnModel: ColumnModel<Row>): void;
|
|
22
|
+
onPortalAttached(host: TableHeaderCellRendererComponent, portalComponent: C): void;
|
|
23
|
+
}
|
|
24
|
+
export declare abstract class CellRendererPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {
|
|
25
|
+
abstract pushState(host: TableCellRendererComponent<Row>): void;
|
|
26
|
+
}
|
|
27
|
+
export declare class ComponentCellRendererPortalRef<Row, Portal> extends CellRendererPortalRef<Row, Portal> {
|
|
28
|
+
readonly componentType: ComponentType<Portal>;
|
|
29
|
+
readonly updateComponent: (component: Portal, rowData: RowData<Row>) => void;
|
|
30
|
+
constructor(componentType: ComponentType<Portal>, updateComponent: (component: Portal, rowData: RowData<Row>) => void);
|
|
31
|
+
initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>): void;
|
|
32
|
+
onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal): void;
|
|
33
|
+
pushState(host: TableCellRendererComponent<Row>): void;
|
|
34
|
+
}
|
|
35
|
+
export declare class CellEditorPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {
|
|
36
|
+
readonly componentType: ComponentType<Portal>;
|
|
37
|
+
readonly initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void;
|
|
38
|
+
constructor(componentType: ComponentType<Portal>, initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void);
|
|
39
|
+
initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>): void;
|
|
40
|
+
onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal): void;
|
|
41
|
+
}
|
|
42
|
+
export declare class TemplateCellRendererPortalRef<Row> extends CellRendererPortalRef<Row, undefined> {
|
|
43
|
+
private templateRef;
|
|
44
|
+
private viewContainer;
|
|
45
|
+
private fillCell;
|
|
46
|
+
private padChild;
|
|
47
|
+
constructor();
|
|
48
|
+
registerPortal(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean): void;
|
|
49
|
+
initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>): void;
|
|
50
|
+
onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: undefined): void;
|
|
51
|
+
pushState(host: TableCellRendererComponent<Row>): void;
|
|
52
|
+
private createPortal;
|
|
53
|
+
}
|
|
@@ -2,62 +2,16 @@ import { ComponentType } from '@angular/cdk/overlay';
|
|
|
2
2
|
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { Command, Form, SelectionModel, Types, UnaryCommand, Validator } from '@coolon/pectin';
|
|
4
4
|
import { CellEditorComponent, CellListEditorComponent } from './cell-editors';
|
|
5
|
+
import { CellEditorPortalRef, CellHeaderPortalRef, CellRendererPortalRef } from './cell-protal-ref';
|
|
5
6
|
import { ColumnTextProperties } from './column-text-properties';
|
|
6
7
|
import { EditSession } from './edit-session';
|
|
7
8
|
import { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';
|
|
8
9
|
import { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';
|
|
9
|
-
export declare const HEADER_CELL_RENDERER_PORTAL: unique symbol;
|
|
10
|
-
export declare const CELL_RENDERER_PORTAL: unique symbol;
|
|
11
|
-
export declare const CELL_EDITOR_PORTAL: unique symbol;
|
|
12
|
-
export declare const PORTAL_RENDERER_COMPONENT: unique symbol;
|
|
13
|
-
export declare const PORTAL_EDITOR_COMPONENT: unique symbol;
|
|
14
10
|
export interface RowData<Row> {
|
|
15
11
|
row: Row;
|
|
16
12
|
editSession?: EditSession<Row>;
|
|
17
13
|
editRowCommand: Command<void>;
|
|
18
14
|
}
|
|
19
|
-
export declare abstract class CellPortalRef<Row, Host, Portal> {
|
|
20
|
-
constructor();
|
|
21
|
-
abstract initialiseHost(host: Host, columnModel: ColumnModel<Row>): any;
|
|
22
|
-
abstract onPortalAttached(host: Host, portalComponent: Portal): any;
|
|
23
|
-
}
|
|
24
|
-
export declare class CellHeaderPortalRef<Row, C> extends CellPortalRef<Row, TableHeaderCellRendererComponent, C> {
|
|
25
|
-
readonly componentType: ComponentType<C>;
|
|
26
|
-
readonly initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void;
|
|
27
|
-
constructor(componentType: ComponentType<C>, initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void);
|
|
28
|
-
initialiseHost(host: TableHeaderCellRendererComponent, columnModel: ColumnModel<Row>): void;
|
|
29
|
-
onPortalAttached(host: TableHeaderCellRendererComponent, portalComponent: C): void;
|
|
30
|
-
}
|
|
31
|
-
export declare abstract class CellRendererPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {
|
|
32
|
-
abstract pushState(host: TableCellRendererComponent<Row>): void;
|
|
33
|
-
}
|
|
34
|
-
export declare class ComponentCellRendererPortalRef<Row, Portal> extends CellRendererPortalRef<Row, Portal> {
|
|
35
|
-
readonly componentType: ComponentType<Portal>;
|
|
36
|
-
readonly updateComponent: (component: Portal, rowData: RowData<Row>) => void;
|
|
37
|
-
constructor(componentType: ComponentType<Portal>, updateComponent: (component: Portal, rowData: RowData<Row>) => void);
|
|
38
|
-
initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>): void;
|
|
39
|
-
onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal): void;
|
|
40
|
-
pushState(host: TableCellRendererComponent<Row>): void;
|
|
41
|
-
}
|
|
42
|
-
export declare class CellEditorPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {
|
|
43
|
-
readonly componentType: ComponentType<Portal>;
|
|
44
|
-
readonly initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void;
|
|
45
|
-
constructor(componentType: ComponentType<Portal>, initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void);
|
|
46
|
-
initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>): void;
|
|
47
|
-
onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal): void;
|
|
48
|
-
}
|
|
49
|
-
export declare class TemplateCellRendererPortalRef<Row> extends CellRendererPortalRef<Row, undefined> {
|
|
50
|
-
private templateRef;
|
|
51
|
-
private viewContainer;
|
|
52
|
-
private fillCell;
|
|
53
|
-
private padChild;
|
|
54
|
-
constructor();
|
|
55
|
-
registerPortal(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean): void;
|
|
56
|
-
initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>): void;
|
|
57
|
-
onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: undefined): void;
|
|
58
|
-
pushState(host: TableCellRendererComponent<Row>): void;
|
|
59
|
-
private createPortal;
|
|
60
|
-
}
|
|
61
15
|
export declare class ColumnModel<Row> {
|
|
62
16
|
readonly columnId: string;
|
|
63
17
|
private defaults;
|
|
@@ -70,7 +24,7 @@ export declare class ColumnModel<Row> {
|
|
|
70
24
|
protected getDefaultHeaderText(): string;
|
|
71
25
|
getColumnTextProperties(): ColumnTextProperties;
|
|
72
26
|
textProperties(columnTextProperties: ColumnTextProperties): this;
|
|
73
|
-
protected configureHeaderRenderer<C>(config:
|
|
27
|
+
protected configureHeaderRenderer<C>(config: CellHeaderPortalRef<Row, any>): void;
|
|
74
28
|
protected configureCellRenderer<C>(config: CellRendererPortalRef<Row, any>): void;
|
|
75
29
|
protected configureCellEditor<E>(cellEditor: CellEditorPortalRef<Row, E>): void;
|
|
76
30
|
cellHeaderRenderer<C>(componentType: ComponentType<C>, initialiser: (component: C, column: ColumnModel<Row>) => void): this;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Portal } from '@angular/cdk/portal';
|
|
2
2
|
import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { DisposableComponent } from '../../disposable-component';
|
|
4
|
+
import { CellEditorComponent, CellListEditorComponent } from '../cell-editors';
|
|
5
|
+
import { ColumnModel, RowData } from '../column-model';
|
|
4
6
|
import { EditSession } from '../edit-session';
|
|
5
7
|
import { TableModel } from '../table-model';
|
|
6
|
-
|
|
8
|
+
import { CELL_RENDERER_PORTAL, CELL_EDITOR_PORTAL } from '../cell-protal-ref';
|
|
9
|
+
export declare class TableCellRendererComponent<Row> extends DisposableComponent implements OnInit, OnChanges {
|
|
7
10
|
row: Row;
|
|
8
11
|
column: ColumnModel<Row>;
|
|
9
12
|
editSession: EditSession<Row>;
|
|
@@ -14,11 +17,13 @@ export declare class TableCellRendererComponent<Row> implements OnInit, OnChange
|
|
|
14
17
|
defaultClassNames: string;
|
|
15
18
|
fillCell: boolean;
|
|
16
19
|
padChild: boolean;
|
|
20
|
+
private firstEditableColumn;
|
|
17
21
|
constructor();
|
|
18
22
|
ngOnInit(): void;
|
|
19
23
|
hasActiveEditor(): boolean;
|
|
20
24
|
initialiseRenderer(instance: any): void;
|
|
21
|
-
initialiseEditor(instance:
|
|
25
|
+
initialiseEditor(instance: CellEditorComponent<Row> | CellListEditorComponent<Row>): void;
|
|
26
|
+
private tryAndFocusEditor;
|
|
22
27
|
ngOnChanges(changes: SimpleChanges): void;
|
|
23
28
|
getRendererPortal(): Portal<any>;
|
|
24
29
|
getEditorPortal(): Portal<any>;
|
package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Portal } from '@angular/cdk/portal';
|
|
2
2
|
import { OnInit } from '@angular/core';
|
|
3
|
-
import { ColumnModel
|
|
3
|
+
import { ColumnModel } from '../column-model';
|
|
4
|
+
import { HEADER_CELL_RENDERER_PORTAL } from '../cell-protal-ref';
|
|
4
5
|
export declare class TableHeaderCellRendererComponent implements OnInit {
|
|
5
6
|
column: ColumnModel<any>;
|
|
6
7
|
defaultClassNames: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BooleanValueModelChain, CanIdentify, Form, ListModel, ListModelChain, SelectionModel, Types, UnaryCommand } from '@coolon/pectin';
|
|
1
|
+
import { BooleanValueModelChain, CanIdentify, Form, ListModel, ListModelChain, SelectionModel, Types, UnaryCommand, ValueModelChain } from '@coolon/pectin';
|
|
2
2
|
import { ColumnModel, CustomTemplateColumnModel, CustomValueColumnModel, EditorControlColumnModel, ListPropertyColumnModel, PropertyColumnModel, SelectionColumnModel } from './column-model';
|
|
3
3
|
import { ColumnTextProperties } from './column-text-properties';
|
|
4
4
|
import { EditSession } from './edit-session';
|
|
@@ -85,6 +85,7 @@ export declare class TableModel<Row> {
|
|
|
85
85
|
private _editorSessionByRowId;
|
|
86
86
|
readonly editing: BooleanValueModelChain;
|
|
87
87
|
readonly dataSource: ListModelChain<Row>;
|
|
88
|
+
readonly firstEditableColumn: ValueModelChain<ColumnModel<Row>>;
|
|
88
89
|
static fromList<Row>(sourceOfTruth: ListModel<Row>, builder?: (tableModel: TableModel<Row>) => void): TableModel<Row>;
|
|
89
90
|
private _createForm;
|
|
90
91
|
protected constructor(sourceOfTruth: ListModel<Row>);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConnectedPosition, Overlay } from '@angular/cdk/overlay';
|
|
1
|
+
import { CdkScrollable, 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';
|
|
@@ -9,11 +9,12 @@ export declare class PopupInteractionContextComponent extends DisposableComponen
|
|
|
9
9
|
private _element;
|
|
10
10
|
private _overlay;
|
|
11
11
|
private interactionContext;
|
|
12
|
+
private scrollContainers;
|
|
12
13
|
get active(): boolean;
|
|
13
14
|
readonly outputPortal: ComponentPortal<InPlaceInteractionContextComponent<any, any, any>>;
|
|
14
15
|
anchorX: 'start' | 'end';
|
|
15
16
|
anchorY: 'top' | 'bottom';
|
|
16
|
-
constructor(_element: ElementRef, _overlay: Overlay);
|
|
17
|
+
constructor(_element: ElementRef, _overlay: Overlay, scrollable: CdkScrollable);
|
|
17
18
|
startActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R>;
|
|
18
19
|
computePositions(): ConnectedPosition[];
|
|
19
20
|
cancelActiveActivity(): Promise<boolean>;
|