@coolon/angular-ui-powerups 2.0.0-alpha.1 → 2.0.0-alpha.10
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 +68 -0
- package/assets/form.scss +33 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +418 -233
- 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.d.ts +55 -54
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +53 -52
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/card-container/card-container.component.js +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +29 -12
- 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/forms/abstract-input.component.js +14 -2
- package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.js +37 -5
- package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js +35 -6
- package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +64 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +1 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +4 -7
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +8 -5
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js +4 -7
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +5 -8
- package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +8 -5
- package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +2 -6
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.js +4 -7
- package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/components/index.js +2 -1
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/table/cell-editors.js.map +1 -1
- package/esm2015/lib/components/table/{cell-protal-ref.js → cell-portal-ref.js} +7 -3
- package/esm2015/lib/components/table/cell-portal-ref.js.map +1 -0
- package/esm2015/lib/components/table/{cell-protal-ref.metadata.json → cell-portal-ref.metadata.json} +1 -1
- package/esm2015/lib/components/table/column-model.js +27 -11
- 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 +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -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-model.js +8 -5
- 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/components/table/table.component.js +1 -2
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +53 -52
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/card-container/card-container.component.js +1 -1
- package/esm5/lib/components/components.module.js +29 -12
- 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/forms/abstract-input.component.js +22 -2
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js +42 -5
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +40 -6
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +67 -0
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -0
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +4 -7
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +8 -5
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +4 -7
- package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +5 -8
- package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js +8 -5
- package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +2 -6
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js +4 -7
- package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm5/lib/components/index.js +2 -1
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/cell-editors.js.map +1 -1
- package/esm5/lib/components/table/{cell-protal-ref.js → cell-portal-ref.js} +7 -3
- package/esm5/lib/components/table/cell-portal-ref.js.map +1 -0
- package/esm5/lib/components/table/column-model.js +27 -11
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +1 -1
- 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 +1 -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 +8 -5
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/table.component.js +1 -2
- package/esm5/lib/components/table/table.component.js.map +1 -1
- package/esm5/lib/components/table/table.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +320 -157
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +351 -167
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +4 -1
- package/lib/components/forms/abstract-list-input.component.d.ts +8 -2
- package/lib/components/forms/abstract-value-input.component.d.ts +7 -2
- package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +22 -0
- package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +0 -2
- package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +8 -2
- package/lib/components/forms/number-input/number-input.component.d.ts +0 -2
- package/lib/components/forms/password-input/password-input.component.d.ts +0 -2
- package/lib/components/forms/select-input/select-input.component.d.ts +8 -2
- package/lib/components/forms/string-input/string-input.component.d.ts +1 -2
- package/lib/components/forms/text-input/text-input.component.d.ts +0 -2
- package/lib/components/index.d.ts +2 -1
- package/lib/components/table/cell-editors.d.ts +3 -3
- package/lib/components/table/{cell-protal-ref.d.ts → cell-portal-ref.d.ts} +4 -4
- package/lib/components/table/column-model.d.ts +15 -7
- package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +1 -1
- package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +1 -1
- package/lib/components/table/table-model.d.ts +10 -2
- package/package.json +2 -2
- package/esm2015/lib/components/table/cell-protal-ref.js.map +0 -1
- package/esm2015/lib/components/table/table.component.scss.ngstyle.js.map +0 -1
- package/esm5/lib/components/table/cell-protal-ref.js.map +0 -1
- package/esm5/lib/components/table/table.component.scss.ngstyle.js.map +0 -1
|
@@ -11,9 +11,10 @@ interface InputModel<T> {
|
|
|
11
11
|
export declare class AbstractInputComponent<T> extends DisposableComponent implements OnInit {
|
|
12
12
|
protected inputModel: InputModel<T>;
|
|
13
13
|
label: string;
|
|
14
|
-
|
|
14
|
+
userFloatLabel: 'auto' | 'always' | 'never';
|
|
15
15
|
hint: string;
|
|
16
16
|
placeholder: string;
|
|
17
|
+
dense: boolean;
|
|
17
18
|
focusCommand: Command<any>;
|
|
18
19
|
blurCommand: Command<any>;
|
|
19
20
|
enterCommand: Command<any>;
|
|
@@ -39,5 +40,7 @@ export declare class AbstractInputComponent<T> extends DisposableComponent imple
|
|
|
39
40
|
get errorList(): ListModel<string>;
|
|
40
41
|
get firstError(): string;
|
|
41
42
|
get focusContext(): FocusManager.Context;
|
|
43
|
+
get floatLabel(): 'auto' | 'always' | 'never';
|
|
44
|
+
get showHint(): boolean;
|
|
42
45
|
}
|
|
43
46
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { Form } from '@coolon/pectin';
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { Form, IMutableListModel } from '@coolon/pectin';
|
|
3
3
|
import { AbstractInputComponent } from './abstract-input.component';
|
|
4
4
|
export declare class AbstractListInputComponent<T> extends AbstractInputComponent<T[]> implements OnInit {
|
|
5
|
+
listModel: Form.ListModelBase<T> | IMutableListModel<T>;
|
|
5
6
|
/**
|
|
6
7
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
7
8
|
*
|
|
@@ -13,4 +14,9 @@ export declare class AbstractListInputComponent<T> extends AbstractInputComponen
|
|
|
13
14
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
14
15
|
*/
|
|
15
16
|
readonly inputModel: Form.DelegatingListModel<T>;
|
|
17
|
+
private setValueIsInitialising;
|
|
18
|
+
private listHolder;
|
|
19
|
+
set value(value: T[]);
|
|
20
|
+
readonly valueChange: EventEmitter<T[]>;
|
|
21
|
+
constructor();
|
|
16
22
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { Form } from '@coolon/pectin';
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { Form, Guard, IMutableValueModel } from '@coolon/pectin';
|
|
3
3
|
import { AbstractInputComponent } from './abstract-input.component';
|
|
4
4
|
export declare class AbstractValueInputComponent<T> extends AbstractInputComponent<T> implements OnInit {
|
|
5
|
+
valueModel: Form.ValueModelBase<T> | IMutableValueModel<T>;
|
|
5
6
|
/**
|
|
6
7
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
7
8
|
*
|
|
@@ -13,5 +14,9 @@ export declare class AbstractValueInputComponent<T> extends AbstractInputCompone
|
|
|
13
14
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
14
15
|
*/
|
|
15
16
|
readonly inputModel: Form.DelegatingValueModel<T>;
|
|
17
|
+
protected setValueInProgress: Guard;
|
|
18
|
+
private valueHolder;
|
|
19
|
+
set value(value: T);
|
|
20
|
+
readonly valueChange: EventEmitter<T>;
|
|
16
21
|
constructor();
|
|
17
22
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ListModel, ListModelChain } from '@coolon/pectin';
|
|
3
|
+
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
4
|
+
/**
|
|
5
|
+
* Using templates (not only supported for nil values:
|
|
6
|
+
* <aup-autocomplete-input [valueModel]="myModel" [options]="myOptions">
|
|
7
|
+
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
8
|
+
* </aup-autocomplete-input>
|
|
9
|
+
*/
|
|
10
|
+
export declare class AutocompleteInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit {
|
|
11
|
+
optionsModel: ListModel<T>;
|
|
12
|
+
options: T[];
|
|
13
|
+
optionLabel: keyof T;
|
|
14
|
+
allowNil: boolean;
|
|
15
|
+
nilOptionTemplateRef: TemplateRef<any>;
|
|
16
|
+
private filterValue;
|
|
17
|
+
readonly filteredOptions: ListModelChain<T>;
|
|
18
|
+
optionLabelFormat: (option: T) => any;
|
|
19
|
+
constructor();
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
updateFilter($event: string): void;
|
|
22
|
+
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { Form, IMutableValueModel } from '@coolon/pectin';
|
|
3
2
|
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
4
3
|
export declare class CheckboxInputComponent extends AbstractValueInputComponent<boolean> implements OnInit {
|
|
5
|
-
valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;
|
|
6
4
|
color: 'primary' | 'warn' | 'accent';
|
|
7
5
|
labelPosition: 'before' | 'after';
|
|
8
6
|
constructor();
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { OnInit, TemplateRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ListModel } from '@coolon/pectin';
|
|
3
3
|
import { AbstractListInputComponent } from '../abstract-list-input.component';
|
|
4
|
+
/**
|
|
5
|
+
* Using templates:
|
|
6
|
+
* <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
|
|
7
|
+
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
8
|
+
* <ng-template #nilOptionTemplateRef let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
9
|
+
* </aup-multiple-select_input>
|
|
10
|
+
*/
|
|
4
11
|
export declare class MultipleSelectInputComponent<T = any> extends AbstractListInputComponent<T> implements OnInit {
|
|
5
|
-
listModel: Form.ListModelBase<T> | IMutableListModel<T>;
|
|
6
12
|
optionsModel: ListModel<T>;
|
|
7
13
|
options: T[];
|
|
8
14
|
optionLabel: keyof T;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { Form, IMutableValueModel } from '@coolon/pectin';
|
|
3
2
|
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
4
3
|
export declare class NumberInputComponent extends AbstractValueInputComponent<number> implements OnInit {
|
|
5
|
-
valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;
|
|
6
4
|
min: number;
|
|
7
5
|
max: number;
|
|
8
6
|
constructor();
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { Form, IMutableValueModel } from '@coolon/pectin';
|
|
3
2
|
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
4
3
|
export declare class PasswordInputComponent extends AbstractValueInputComponent<string> implements OnInit {
|
|
5
|
-
valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
6
4
|
constructor();
|
|
7
5
|
ngOnInit(): void;
|
|
8
6
|
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { OnInit, TemplateRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ListModel } from '@coolon/pectin';
|
|
3
3
|
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
4
|
+
/**
|
|
5
|
+
* Using templates:
|
|
6
|
+
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
7
|
+
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
8
|
+
* <ng-template #nilOptionTemplateRef let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
9
|
+
* </aup-select_input>
|
|
10
|
+
*/
|
|
4
11
|
export declare class SelectInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit {
|
|
5
|
-
valueModel: Form.ValueModelBase<T> | IMutableValueModel<T>;
|
|
6
12
|
optionsModel: ListModel<T>;
|
|
7
13
|
options: T[];
|
|
8
14
|
optionLabel: keyof T;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { Command,
|
|
2
|
+
import { Command, ValueModel } from '@coolon/pectin';
|
|
3
3
|
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
4
4
|
export declare class StringInputComponent extends AbstractValueInputComponent<string> implements OnInit {
|
|
5
|
-
valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
6
5
|
enableClearModel: ValueModel<boolean>;
|
|
7
6
|
enableClear: boolean;
|
|
8
7
|
readonly clearCommand: Command<void>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { Form, IMutableValueModel } from '@coolon/pectin';
|
|
3
2
|
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
4
3
|
export declare class TextInputComponent extends AbstractValueInputComponent<string> implements OnInit {
|
|
5
|
-
valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
6
4
|
rows: number;
|
|
7
5
|
cols: number;
|
|
8
6
|
constructor();
|
|
@@ -10,6 +10,7 @@ export * from "./focus-container/focus-container.component";
|
|
|
10
10
|
export * from "./forms/abstract-input.component";
|
|
11
11
|
export * from "./forms/abstract-list-input.component";
|
|
12
12
|
export * from "./forms/abstract-value-input.component";
|
|
13
|
+
export * from "./forms/autocomplete-input/autocomplete-input.component";
|
|
13
14
|
export * from "./forms/checkbox-input/checkbox-input.component";
|
|
14
15
|
export * from "./forms/multiple-select-input/multiple-select-input.component";
|
|
15
16
|
export * from "./forms/number-input/number-input.component";
|
|
@@ -23,7 +24,7 @@ export * from "./scroll-container/scroll-container.component";
|
|
|
23
24
|
export * from "./section-header/section-header.component";
|
|
24
25
|
export * from "./switch-case/switch-case.component";
|
|
25
26
|
export * from "./table/cell-editors";
|
|
26
|
-
export * from "./table/cell-
|
|
27
|
+
export * from "./table/cell-portal-ref";
|
|
27
28
|
export * from "./table/cell-renderer";
|
|
28
29
|
export * from "./table/column-model";
|
|
29
30
|
export * from "./table/column-text-properties";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Form,
|
|
1
|
+
import { Form, IMutableListModel, IMutableValueModel } from '@coolon/pectin';
|
|
2
2
|
export interface CellEditorComponent<T> {
|
|
3
|
-
valueModel:
|
|
3
|
+
valueModel: IMutableValueModel<T> | Form.ValueModelBase<T>;
|
|
4
4
|
requestFocus?(): any;
|
|
5
5
|
}
|
|
6
6
|
export interface CellListEditorComponent<T> {
|
|
7
|
-
listModel:
|
|
7
|
+
listModel: IMutableListModel<T> | Form.ListModelBase<T>;
|
|
8
8
|
requestFocus?(): any;
|
|
9
9
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ComponentType } from '@angular/cdk/overlay';
|
|
2
2
|
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
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
4
|
import { EditSession } from './edit-session';
|
|
5
|
+
import { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';
|
|
6
|
+
import { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';
|
|
7
7
|
export declare const HEADER_CELL_RENDERER_PORTAL: unique symbol;
|
|
8
8
|
export declare const CELL_RENDERER_PORTAL: unique symbol;
|
|
9
9
|
export declare const CELL_EDITOR_PORTAL: unique symbol;
|
|
@@ -26,8 +26,8 @@ export declare abstract class CellRendererPortalRef<Row, Portal> extends CellPor
|
|
|
26
26
|
}
|
|
27
27
|
export declare class ComponentCellRendererPortalRef<Row, Portal> extends CellRendererPortalRef<Row, Portal> {
|
|
28
28
|
readonly componentType: ComponentType<Portal>;
|
|
29
|
-
readonly updateComponent: (component: Portal, rowData: RowData<Row
|
|
30
|
-
constructor(componentType: ComponentType<Portal>, updateComponent: (component: Portal, rowData: RowData<Row
|
|
29
|
+
readonly updateComponent: (component: Portal, rowData: RowData<Row>, firstTime: boolean) => void;
|
|
30
|
+
constructor(componentType: ComponentType<Portal>, updateComponent: (component: Portal, rowData: RowData<Row>, firstTime: boolean) => void);
|
|
31
31
|
initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>): void;
|
|
32
32
|
onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal): void;
|
|
33
33
|
pushState(host: TableCellRendererComponent<Row>): void;
|
|
@@ -2,7 +2,7 @@ import { ComponentType } from '@angular/cdk/overlay';
|
|
|
2
2
|
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { Command, DirtyTrackingForm, SelectionModel, Types, UnaryCommand, Validator } from '@coolon/pectin';
|
|
4
4
|
import { CellEditorComponent, CellListEditorComponent } from './cell-editors';
|
|
5
|
-
import { CellEditorPortalRef, CellHeaderPortalRef, CellRendererPortalRef } from './cell-
|
|
5
|
+
import { CellEditorPortalRef, CellHeaderPortalRef, CellRendererPortalRef } from './cell-portal-ref';
|
|
6
6
|
import { ColumnTextProperties } from './column-text-properties';
|
|
7
7
|
import { EditSession } from './edit-session';
|
|
8
8
|
import { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';
|
|
@@ -50,13 +50,21 @@ export interface CellEditorOptions<V, C> {
|
|
|
50
50
|
validators?: Validator<V>[];
|
|
51
51
|
initialiseComponent?(component: C): any;
|
|
52
52
|
}
|
|
53
|
+
export declare type OnComponentInit<C> = (component: C) => void;
|
|
54
|
+
export interface CellRendererOptions<Row, E> {
|
|
55
|
+
onComponentInit?: (component: E) => void;
|
|
56
|
+
onRowUpdate?: (component: E, row: Row) => void;
|
|
57
|
+
}
|
|
53
58
|
export declare class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {
|
|
54
59
|
readonly property: P;
|
|
55
60
|
private _format;
|
|
56
|
-
constructor(property: P, defaults: ColumnModel.Defaults);
|
|
57
|
-
cellRenderer
|
|
61
|
+
constructor(id: string, property: P, defaults: ColumnModel.Defaults);
|
|
62
|
+
cellRenderer<E extends {
|
|
58
63
|
value: Row[P];
|
|
59
|
-
}>): this;
|
|
64
|
+
}>(componentType: ComponentType<E>, options?: CellRendererOptions<Row, E>): this;
|
|
65
|
+
cellRenderer<E extends {
|
|
66
|
+
value: Row[P];
|
|
67
|
+
}>(componentType: ComponentType<E>, onComponentInit?: OnComponentInit<E>): this;
|
|
60
68
|
cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validators?: Validator<Row[P]>[], initialiseComponent?: (component: E) => void): this;
|
|
61
69
|
cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, initialiseComponent?: (component: E) => void): this;
|
|
62
70
|
format(formatter: (value: Row[P]) => any): this;
|
|
@@ -65,7 +73,7 @@ export declare class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<
|
|
|
65
73
|
export declare class ListPropertyColumnModel<Row, P extends Types.ArrayPropertiesOf<Row>> extends ColumnModel<Row> {
|
|
66
74
|
readonly property: P;
|
|
67
75
|
private _format;
|
|
68
|
-
constructor(property: P, defaults: ColumnModel.Defaults);
|
|
76
|
+
constructor(id: string, property: P, defaults: ColumnModel.Defaults);
|
|
69
77
|
cellRenderer(componentType: ComponentType<{
|
|
70
78
|
value: Types.ArrayElementType<Row, P>[];
|
|
71
79
|
}>): this;
|
|
@@ -77,9 +85,9 @@ export declare class ListPropertyColumnModel<Row, P extends Types.ArrayPropertie
|
|
|
77
85
|
export declare class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {
|
|
78
86
|
private getValue;
|
|
79
87
|
constructor(columnId: string, defaults: ColumnModel.Defaults, getValue: (row: Row) => V);
|
|
80
|
-
cellRenderer
|
|
88
|
+
cellRenderer<C extends {
|
|
81
89
|
value: V;
|
|
82
|
-
}>): this;
|
|
90
|
+
}>(componentType: ComponentType<C>, onComponentInit?: OnComponentInit<C>): this;
|
|
83
91
|
selectRowOnClick(selectOnRowClick: boolean): this;
|
|
84
92
|
}
|
|
85
93
|
export declare class EditorControlColumnModel<Row> extends ColumnModel<Row> {
|
|
@@ -5,7 +5,7 @@ import { CellEditorComponent, CellListEditorComponent } from '../cell-editors';
|
|
|
5
5
|
import { ColumnModel, RowData } from '../column-model';
|
|
6
6
|
import { EditSession } from '../edit-session';
|
|
7
7
|
import { TableModel } from '../table-model';
|
|
8
|
-
import { CELL_RENDERER_PORTAL, CELL_EDITOR_PORTAL } from '../cell-
|
|
8
|
+
import { CELL_RENDERER_PORTAL, CELL_EDITOR_PORTAL } from '../cell-portal-ref';
|
|
9
9
|
export declare class TableCellRendererComponent<Row> extends DisposableComponent implements OnInit, OnChanges {
|
|
10
10
|
row: Row;
|
|
11
11
|
column: ColumnModel<Row>;
|
package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Portal } from '@angular/cdk/portal';
|
|
2
2
|
import { OnInit } from '@angular/core';
|
|
3
3
|
import { ColumnModel } from '../column-model';
|
|
4
|
-
import { HEADER_CELL_RENDERER_PORTAL } from '../cell-
|
|
4
|
+
import { HEADER_CELL_RENDERER_PORTAL } from '../cell-portal-ref';
|
|
5
5
|
export declare class TableHeaderCellRendererComponent implements OnInit {
|
|
6
6
|
column: ColumnModel<any>;
|
|
7
7
|
defaultClassNames: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentType } from '@angular/cdk/overlay';
|
|
1
2
|
import { BooleanValueModelChain, CanIdentify, DirtyTrackingForm, ListModel, ListModelChain, SelectionModel, Types, UnaryCommand, ValueModelChain } from '@coolon/pectin';
|
|
2
3
|
import { ColumnModel, CustomTemplateColumnModel, CustomValueColumnModel, EditorControlColumnModel, ListPropertyColumnModel, PropertyColumnModel, SelectionColumnModel } from './column-model';
|
|
3
4
|
import { ColumnTextProperties } from './column-text-properties';
|
|
@@ -95,11 +96,18 @@ export declare class TableModel<Row> {
|
|
|
95
96
|
get rowsBeingEdited(): ListModel<Row>;
|
|
96
97
|
getTrackByFunction(): (index: number, item: Row) => any;
|
|
97
98
|
get columns(): ListModel<ColumnModel<Row>>;
|
|
98
|
-
pluck<P extends Types.ValuePropertiesOf<Row>>(property: P
|
|
99
|
-
|
|
99
|
+
pluck<P extends Types.ValuePropertiesOf<Row>>(property: P, options?: {
|
|
100
|
+
columnId: string;
|
|
101
|
+
}): PropertyColumnModel<Row, P>;
|
|
102
|
+
pluckList<P extends Types.ArrayPropertiesOf<Row>>(property: P, options?: {
|
|
103
|
+
columnId: string;
|
|
104
|
+
}): ListPropertyColumnModel<Row, P>;
|
|
100
105
|
addSelectionColumn(selectionModel: SelectionModel<Row>): SelectionColumnModel<Row>;
|
|
101
106
|
addEditControls(saveCommand: UnaryCommand<DirtyTrackingForm<Row>, boolean>): EditorControlColumnModel<Row>;
|
|
102
107
|
addCustomColumn<V>(columnId: string, dataAccessor: (row: Row) => V): CustomValueColumnModel<Row, V>;
|
|
108
|
+
addComponentColumn<C extends {
|
|
109
|
+
value: Row;
|
|
110
|
+
}>(columnId: string, component: ComponentType<C>, onInit?: (c: C) => void): CustomValueColumnModel<Row, Row>;
|
|
103
111
|
addTemplateColumn<V>(columnId: string): CustomTemplateColumnModel<Row>;
|
|
104
112
|
addRowClass(className: string, predicate: (row: Row) => boolean): void;
|
|
105
113
|
getRowClasses(row: Row): string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coolon/angular-ui-powerups",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.10",
|
|
4
4
|
"schematics": "./schematics/collection.json",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@coolon/typescript-utilities": "^2.0.0",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@angular/material": "^9.2.4",
|
|
25
25
|
"@angular/animations": "^9.1.9",
|
|
26
26
|
"@angular/cdk": "^9.2.4",
|
|
27
|
-
"@coolon/pectin": ">=
|
|
27
|
+
"@coolon/pectin": ">=3.0.0-alpha.18",
|
|
28
28
|
"resize-observer-polyfill": "^1.5.1",
|
|
29
29
|
"@fortawesome/angular-fontawesome": "^0.6.1",
|
|
30
30
|
"@fortawesome/fontawesome-svg-core": "^1.2.28",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cell-protal-ref.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/cell-protal-ref.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAMtD,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,wCAAwC,CAAC,CAAC;AAC5F,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,oCAAoC,CAAC,CAAC;AACtF,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,kCAAkC,CAAC,CAAC;AAGlF,MAAM,OAAgB,aAAa;IACjC;IACA,CAAC;CAKF;AAED,MAAM,OAAO,mBAA4B,SAAQ,aAAuD;IACtG,YAAqB,aAA+B,EAAW,gBAAuE;QACpI,KAAK,EAAE,CAAC;QADW,kBAAa,GAAb,aAAa,CAAkB;QAAW,qBAAgB,GAAhB,gBAAgB,CAAuD;IAEtI,CAAC;IAED,cAAc,CAA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AO,CAAC,IAAI,CAAC,KAAE,SAAS,EAAE,IAAI,CAAC,GAAG,IAAG,CAAC;IAC3G,CAAC;CACF","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport { assert } from '@coolon/typescript-utilities';\nimport { ColumnModel, RowData } from './column-model';\nimport { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';\nimport { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';\nimport { EditSession } from './edit-session';\n\nexport const HEADER_CELL_RENDERER_PORTAL = Symbol('aup-cell-header-renderer-component-ref');\nexport const CELL_RENDERER_PORTAL = Symbol('aup-cell-renderer-component-ref');\nexport const CELL_EDITOR_PORTAL = Symbol('aup-cell-editor-component-ref');\nexport const PORTAL_RENDERER_COMPONENT = Symbol('aup-cell-renderer-portal-component');\nexport const PORTAL_EDITOR_COMPONENT = Symbol('aup-cell-editor-portal-component');\n\n\nexport abstract class CellPortalRef<Row, Host, Portal> {\n constructor() {\n }\n\n abstract initialiseHost(host: Host, columnModel: ColumnModel<Row>)\n\n abstract onPortalAttached(host: Host, portalComponent: Portal);\n}\n\nexport class CellHeaderPortalRef<Row, C> extends CellPortalRef<Row, TableHeaderCellRendererComponent, C> {\n constructor(readonly componentType: ComponentType<C>, readonly initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void) {\n super();\n }\n\n initialiseHost(host: TableHeaderCellRendererComponent, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n onPortalAttached(host: TableHeaderCellRendererComponent, portalComponent: C) {\n this.initialiseHeader(portalComponent, host.column);\n }\n\n}\n\nexport abstract class CellRendererPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {\n abstract pushState(host: TableCellRendererComponent<Row>): void;\n}\n\nexport class ComponentCellRendererPortalRef<Row, Portal> extends CellRendererPortalRef<Row, Portal> {\n\n\n constructor(readonly componentType: ComponentType<Portal>, readonly updateComponent: (component: Portal, rowData: RowData<Row>) => void) {\n super();\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal) {\n host[PORTAL_RENDERER_COMPONENT] = portalComponent;\n this.updateComponent(portalComponent, host.getRowData());\n }\n\n pushState(host: TableCellRendererComponent<Row>): void {\n if (host[PORTAL_RENDERER_COMPONENT]) {\n this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());\n }\n }\n\n}\n\nexport class CellEditorPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {\n\n constructor(readonly componentType: ComponentType<Portal>, readonly initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void) {\n super();\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n host[CELL_EDITOR_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n // @Trace()\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal) {\n host[PORTAL_EDITOR_COMPONENT] = portalComponent;\n this.initialiseEditorSession(portalComponent, host.editSession);\n }\n\n}\n\nexport class TemplateCellRendererPortalRef<Row> extends CellRendererPortalRef<Row, undefined> {\n\n private templateRef: TemplateRef<any>;\n private viewContainer: ViewContainerRef;\n private fillCell: boolean;\n private padChild: boolean;\n\n constructor() {\n super();\n }\n\n public registerPortal(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean) {\n this.templateRef = templateRef;\n this.viewContainer = viewContainer;\n this.fillCell = fillCell;\n this.padChild = padChild;\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n }\n\n // @Trace()\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: undefined) {\n // don't care\n }\n\n pushState(host: TableCellRendererComponent<Row>): void {\n host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());\n host.fillCell = this.fillCell;\n host.padChild = this.padChild;\n }\n\n private createPortal(data: RowData<Row>) {\n return new TemplatePortal<any>(this.templateRef, this.viewContainer, { ...(data), $implicit: data.row });\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table.component.scss.ngstyle.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/table.component.scss.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cell-protal-ref.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/cell-protal-ref.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAMtD,MAAM,CAAC,IAAM,2BAA2B,GAAG,MAAM,CAAC,wCAAwC,CAAC,CAAC;AAC5F,MAAM,CAAC,IAAM,oBAAoB,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC;AAC9E,MAAM,CAAC,IAAM,kBAAkB,GAAG,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAC1E,MAAM,CAAC,IAAM,yBAAyB,GAAG,MAAM,CAAC,oCAAoC,CAAC,CAAC;AACtF,MAAM,CAAC,IAAM,uBAAuB,GAAG,MAAM,CAAC,kCAAkC,CAAC,CAAC;AAGlF;IACE;IACA,CAAC;IAKH,oBAAC;AAAD,CAAC,AAPD,IAOC;;AAED;IAAiD,uCAAuD;IACtG,6BAAqB,aAA+B,EAAW,gBAAuE;QAAtI,YACE,iBAAO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7C,IAAI,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAChC,CAAC;IAEO,oDAAY,GAApB,UAAqB,IAAkB;QACrC,OAAO,IAAI,cAAc,CAAM,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,aAAa,wBAAO,CAAC,IAAI,CAAC,KAAE,SAAS,EAAE,IAAI,CAAC,GAAG,IAAG,CAAC;IAC3G,CAAC;IACH,oCAAC;AAAD,CAAC,AApCD,CAAwD,qBAAqB,GAoC5E","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport { assert } from '@coolon/typescript-utilities';\nimport { ColumnModel, RowData } from './column-model';\nimport { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';\nimport { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';\nimport { EditSession } from './edit-session';\n\nexport const HEADER_CELL_RENDERER_PORTAL = Symbol('aup-cell-header-renderer-component-ref');\nexport const CELL_RENDERER_PORTAL = Symbol('aup-cell-renderer-component-ref');\nexport const CELL_EDITOR_PORTAL = Symbol('aup-cell-editor-component-ref');\nexport const PORTAL_RENDERER_COMPONENT = Symbol('aup-cell-renderer-portal-component');\nexport const PORTAL_EDITOR_COMPONENT = Symbol('aup-cell-editor-portal-component');\n\n\nexport abstract class CellPortalRef<Row, Host, Portal> {\n constructor() {\n }\n\n abstract initialiseHost(host: Host, columnModel: ColumnModel<Row>)\n\n abstract onPortalAttached(host: Host, portalComponent: Portal);\n}\n\nexport class CellHeaderPortalRef<Row, C> extends CellPortalRef<Row, TableHeaderCellRendererComponent, C> {\n constructor(readonly componentType: ComponentType<C>, readonly initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void) {\n super();\n }\n\n initialiseHost(host: TableHeaderCellRendererComponent, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n onPortalAttached(host: TableHeaderCellRendererComponent, portalComponent: C) {\n this.initialiseHeader(portalComponent, host.column);\n }\n\n}\n\nexport abstract class CellRendererPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {\n abstract pushState(host: TableCellRendererComponent<Row>): void;\n}\n\nexport class ComponentCellRendererPortalRef<Row, Portal> extends CellRendererPortalRef<Row, Portal> {\n\n\n constructor(readonly componentType: ComponentType<Portal>, readonly updateComponent: (component: Portal, rowData: RowData<Row>) => void) {\n super();\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal) {\n host[PORTAL_RENDERER_COMPONENT] = portalComponent;\n this.updateComponent(portalComponent, host.getRowData());\n }\n\n pushState(host: TableCellRendererComponent<Row>): void {\n if (host[PORTAL_RENDERER_COMPONENT]) {\n this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());\n }\n }\n\n}\n\nexport class CellEditorPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {\n\n constructor(readonly componentType: ComponentType<Portal>, readonly initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void) {\n super();\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n host[CELL_EDITOR_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n // @Trace()\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal) {\n host[PORTAL_EDITOR_COMPONENT] = portalComponent;\n this.initialiseEditorSession(portalComponent, host.editSession);\n }\n\n}\n\nexport class TemplateCellRendererPortalRef<Row> extends CellRendererPortalRef<Row, undefined> {\n\n private templateRef: TemplateRef<any>;\n private viewContainer: ViewContainerRef;\n private fillCell: boolean;\n private padChild: boolean;\n\n constructor() {\n super();\n }\n\n public registerPortal(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean) {\n this.templateRef = templateRef;\n this.viewContainer = viewContainer;\n this.fillCell = fillCell;\n this.padChild = padChild;\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n }\n\n // @Trace()\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: undefined) {\n // don't care\n }\n\n pushState(host: TableCellRendererComponent<Row>): void {\n host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());\n host.fillCell = this.fillCell;\n host.padChild = this.padChild;\n }\n\n private createPortal(data: RowData<Row>) {\n return new TemplatePortal<any>(this.templateRef, this.viewContainer, { ...(data), $implicit: data.row });\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table.component.scss.ngstyle.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/table.component.scss.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|