@coolon/angular-ui-powerups 2.0.0-alpha.2 → 2.0.0-alpha.21
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 +133 -0
- package/assets/form.scss +33 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +571 -330
- 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 +26 -6
- 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 +51 -6
- 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 +46 -7
- 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 +70 -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 -13
- 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 +4 -8
- 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 +66 -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/mutable-cell-renderer.js +1 -0
- package/esm2015/lib/components/table/mutable-cell-renderer.js.map +1 -0
- package/esm2015/lib/components/table/mutable-cell-renderer.metadata.json +1 -0
- 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 +11 -10
- 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 -1
- 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/interaction/components/activity-container/activity-container.component.js +2 -7
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/place-component.js +1 -1
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-router.js +2 -8
- package/esm2015/lib/place/place-router.js.map +1 -1
- package/esm2015/lib/place/place-router.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +2 -3
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.metadata.json +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 +34 -6
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js +56 -6
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +51 -7
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +73 -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 -13
- 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 +4 -8
- 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 +67 -11
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/mutable-cell-renderer.js +1 -0
- package/esm5/lib/components/table/mutable-cell-renderer.js.map +1 -0
- 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 +11 -11
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/table.component.js +1 -1
- package/esm5/lib/components/table/table.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +2 -7
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/place-component.js +1 -1
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place-router.js +2 -8
- package/esm5/lib/place/place-router.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +2 -3
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +466 -247
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +503 -263
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +12 -3
- package/lib/components/forms/abstract-list-input.component.d.ts +10 -3
- package/lib/components/forms/abstract-value-input.component.d.ts +9 -3
- package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +25 -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 -4
- 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 +3 -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 +18 -12
- package/lib/components/table/mutable-cell-renderer.d.ts +6 -0
- 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 +15 -4
- package/package.json +4 -4
- package/esm2015/lib/components/table/cell-protal-ref.js.map +0 -1
- package/esm5/lib/components/table/cell-protal-ref.js.map +0 -1
|
@@ -2,6 +2,13 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { Component, ContentChild, Input, TemplateRef } from '@angular/core';
|
|
3
3
|
import { ListModel, StoreInListModel, TrackExternal } from '@coolon/pectin';
|
|
4
4
|
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
5
|
+
/**
|
|
6
|
+
* Using templates:
|
|
7
|
+
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
8
|
+
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
9
|
+
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
10
|
+
* </aup-select_input>
|
|
11
|
+
*/
|
|
5
12
|
let SelectInputComponent = class SelectInputComponent extends AbstractValueInputComponent {
|
|
6
13
|
constructor() {
|
|
7
14
|
super();
|
|
@@ -10,10 +17,6 @@ let SelectInputComponent = class SelectInputComponent extends AbstractValueInput
|
|
|
10
17
|
ngOnInit() {
|
|
11
18
|
}
|
|
12
19
|
};
|
|
13
|
-
__decorate([
|
|
14
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
15
|
-
__metadata("design:type", Object)
|
|
16
|
-
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
17
20
|
__decorate([
|
|
18
21
|
Input(), TrackExternal(),
|
|
19
22
|
__metadata("design:type", ListModel)
|
|
@@ -45,7 +48,7 @@ __decorate([
|
|
|
45
48
|
SelectInputComponent = __decorate([
|
|
46
49
|
Component({
|
|
47
50
|
selector: 'aup-select-input',
|
|
48
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
51
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
49
52
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
50
53
|
}),
|
|
51
54
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/select-input/select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAsB,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAQ,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"select-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/select-input/select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAsB,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAQ,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEhF;;;;;;GAMG;AAMH,IAAa,oBAAoB,GAAjC,MAAa,oBAA8B,SAAQ,2BAA8B;IA0B/E;QACE,KAAK,EAAE,CAAC;QAHV,sBAAiB,GAAuB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAIrH,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AA3BC;IADC,KAAK,EAAE,EAAE,aAAa,EAAE;8BACX,SAAS;0DAAI;AAG3B;IADC,KAAK,EAAE,EAAE,gBAAgB,CAAC,cAAc,CAAC;;qDAC7B;AAGb;IADC,KAAK,EAAE;;yDACa;AAGrB;IADC,KAAK,EAAE;;sDACU;AAGlB;IADC,YAAY,CAAC,gBAAgB,CAAC;8BACZ,WAAW;+DAAM;AAGpC;IADC,YAAY,CAAC,mBAAmB,CAAC;8BACZ,WAAW;kEAAM;AAGvC;IADC,KAAK,EAAE;;+DAC6G;AAxB1G,oBAAoB;IALhC,SAAS,CAAC;QACT,QAAQ,EAAE,kBAAkB;QAC5B,6zCAA4C;;KAE7C,CAAC;;GACW,oBAAoB,CAiChC;SAjCY,oBAAoB","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { IMutableValueModel, ListModel, StoreInListModel, TrackExternal, Form } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n/**\n * Using templates:\n * <aup-select-input [valueModel]=\"myModel\" [options]=\"myOptions\">\n * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * </aup-select_input>\n */\n@Component({\n selector: 'aup-select-input',\n templateUrl: './select-input.component.html',\n styleUrls: ['./select-input.component.scss']\n})\nexport class SelectInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit {\n\n // @Input() @TrackExternal({ delegateTo: 'inputModel' })\n // valueModel: Form.ValueModelBase<T> | IMutableValueModel<T>;\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @Input()\n allowNil: boolean;\n\n @ContentChild('optionTemplate')\n optionTemplateRef: TemplateRef<any>;\n\n @ContentChild('nilOptionTemplate')\n nilOptionTemplateRef: TemplateRef<any>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"SelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"SelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":16,"character":51},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-select-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":21,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":24,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"allowNil":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":33,"character":3},"arguments":["optionTemplate"]}]}],"nilOptionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":36,"character":3},"arguments":["nilOptionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -7,17 +7,13 @@ let StringInputComponent = class StringInputComponent extends AbstractValueInput
|
|
|
7
7
|
super();
|
|
8
8
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
9
9
|
this.clearCommand = Command.create(() => {
|
|
10
|
-
this.
|
|
10
|
+
this.componentValueModel.value = null;
|
|
11
11
|
});
|
|
12
|
-
this.clearCommand.disableWhile(chain.stringValue(this.
|
|
12
|
+
this.clearCommand.disableWhile(chain.stringValue(this.componentValueModel).isBlank());
|
|
13
13
|
}
|
|
14
14
|
ngOnInit() {
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
__decorate([
|
|
18
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
19
|
-
__metadata("design:type", Object)
|
|
20
|
-
], StringInputComponent.prototype, "valueModel", void 0);
|
|
21
17
|
__decorate([
|
|
22
18
|
Input(), TrackExternal({ defaultValue: false }),
|
|
23
19
|
__metadata("design:type", ValueModel)
|
|
@@ -29,8 +25,8 @@ __decorate([
|
|
|
29
25
|
StringInputComponent = __decorate([
|
|
30
26
|
Component({
|
|
31
27
|
selector: 'aup-string-input',
|
|
32
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
33
|
-
styles: ["
|
|
28
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
|
|
29
|
+
styles: ["button[disabled]{visibility:hidden}"]
|
|
34
30
|
}),
|
|
35
31
|
__metadata("design:paramtypes", [])
|
|
36
32
|
], StringInputComponent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/string-input/string-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,GAAG,EAA4B,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,2BAAmC;
|
|
1
|
+
{"version":3,"file":"string-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/string-input/string-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,GAAG,EAA4B,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,2BAAmC;IAU3E;QACE,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzF,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;YACtC,IAAI,CAAC,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC;QACxC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AAnBC;IADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;8BAC9B,UAAU;8DAAU;AAGtC;IADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;;yDAC1B;AANV,oBAAoB;IALhC,SAAS,CAAC;QACT,QAAQ,EAAE,kBAAkB;QAC5B,ixBAA4C;;KAE7C,CAAC;;GACW,oBAAoB,CAsBhC;SAtBY,oBAAoB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Command, Dsl, Form, IMutableValueModel, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-string-input',\n templateUrl: './string-input.component.html',\n styleUrls: ['./string-input.component.scss']\n})\nexport class StringInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n @Input() @TrackExternal({ defaultValue: false })\n enableClearModel: ValueModel<boolean>;\n\n @Input() @StoreInValueModel('enableClearModel')\n enableClear: boolean;\n\n readonly clearCommand: Command<void>;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.clearCommand = Command.create(() => {\n this.componentValueModel.value = null;\n });\n this.clearCommand.disableWhile(chain.stringValue(this.componentValueModel).isBlank());\n }\n\n ngOnInit() {\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"StringInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":9,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-string-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"StringInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":9,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-string-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n","styles":["button[disabled]{visibility:hidden}"]}]}],"members":{"enableClearModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":11,"character":12},"arguments":[{"defaultValue":false}]}]}],"enableClear":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":14,"character":12},"arguments":["enableClearModel"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { Component, Input } from '@angular/core';
|
|
3
|
-
import { TrackExternal } from '@coolon/pectin';
|
|
4
3
|
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
5
4
|
let TextInputComponent = class TextInputComponent extends AbstractValueInputComponent {
|
|
6
5
|
constructor() {
|
|
7
6
|
super();
|
|
7
|
+
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
8
|
+
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
8
9
|
this.rows = 2;
|
|
9
10
|
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
10
11
|
}
|
|
11
12
|
ngOnInit() {
|
|
12
13
|
}
|
|
13
14
|
};
|
|
14
|
-
__decorate([
|
|
15
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
16
|
-
__metadata("design:type", Object)
|
|
17
|
-
], TextInputComponent.prototype, "valueModel", void 0);
|
|
18
15
|
__decorate([
|
|
19
16
|
Input(),
|
|
20
17
|
__metadata("design:type", Object)
|
|
@@ -26,8 +23,8 @@ __decorate([
|
|
|
26
23
|
TextInputComponent = __decorate([
|
|
27
24
|
Component({
|
|
28
25
|
selector: 'aup-text-input',
|
|
29
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
30
|
-
styles: ["
|
|
26
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
27
|
+
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
31
28
|
}),
|
|
32
29
|
__metadata("design:paramtypes", [])
|
|
33
30
|
], TextInputComponent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/text-input/text-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"text-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/text-input/text-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,2BAAmC;IAQzE;QACE,KAAK,EAAE,CAAC;QAPV,wDAAwD;QACxD,wEAAwE;QAE/D,SAAI,GAAG,CAAC,CAAC;QAKhB,4FAA4F;IAC9F,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AAXU;IAAR,KAAK,EAAE;;gDAAU;AACT;IAAR,KAAK,EAAE;;gDAAc;AANX,kBAAkB;IAL9B,SAAS,CAAC;QACT,QAAQ,EAAE,gBAAgB;QAC1B,+sBAA0C;;KAE3C,CAAC;;GACW,kBAAkB,CAgB9B;SAhBY,kBAAkB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-text-input',\n templateUrl: './text-input.component.html',\n styleUrls: ['./text-input.component.scss']\n})\nexport class TextInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n // @Input() @TrackExternal({ delegateTo: 'inputModel' })\n // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;\n\n @Input() rows = 2;\n @Input() cols: number;\n\n constructor() {\n super();\n // const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n }\n\n ngOnInit() {\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"TextInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":9,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-text-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TextInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":9,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-text-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n","styles":["button[disabled]{visibility:hidden}textarea{overflow:auto}"]}]}],"members":{"rows":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"cols":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -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";
|
|
@@ -22,7 +23,7 @@ export * from "./noop/noop.component";
|
|
|
22
23
|
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
|
-
export * from "./table/cell-
|
|
26
|
+
export * from "./table/cell-portal-ref";
|
|
26
27
|
export * from "./table/column-model";
|
|
27
28
|
export * from "./table/edit-session";
|
|
28
29
|
export * from "./table/table-model";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iDAAiD,CAAC;AAChE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,yBAAyB,CAAC;AAExC,cAAc,sBAAsB,CAAC;AAErC,cAAc,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yDAAyD,CAAC;AACxE,cAAc,iDAAiD,CAAC;AAChE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,yBAAyB,CAAC;AAExC,cAAc,sBAAsB,CAAC;AAErC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mDAAmD,CAAC;AAClE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6EAA6E,CAAC;AAC5F,cAAc,uDAAuD,CAAC;AACtE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,2EAA2E,CAAC;AAC1F,cAAc,2DAA2D,CAAC;AAC1E,cAAc,yEAAyE,CAAC;AACxF,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+DAA+D,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./focusable.component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./card-container/card-container.component\";\nexport * from \"./focus-container/focus-container.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/abstract-list-input.component\";\nexport * from \"./forms/abstract-value-input.component\";\nexport * from \"./forms/autocomplete-input/autocomplete-input.component\";\nexport * from \"./forms/checkbox-input/checkbox-input.component\";\nexport * from \"./forms/multiple-select-input/multiple-select-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./forms/text-input/text-input.component\";\nexport * from \"./icon/icon.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./section-header/section-header.component\";\nexport * from \"./switch-case/switch-case.component\";\nexport * from \"./table/cell-editors\";\nexport * from \"./table/cell-portal-ref\";\nexport * from \"./table/cell-renderer\";\nexport * from \"./table/column-model\";\nexport * from \"./table/column-text-properties\";\nexport * from \"./table/edit-session\";\nexport * from \"./table/mutable-cell-renderer\";\nexport * from \"./table/table-def\";\nexport * from \"./table/table-model\";\nexport * from \"./table/table.component\";\nexport * from \"./table/column-template/column-template.directive\";\nexport * from \"./table/default-cell-renderer/default-cell-renderer.component\";\nexport * from \"./table/default-header-cell-renderer/default-header-cell-renderer.component\";\nexport * from \"./table/edit-row-controls/edit-row-controls.component\";\nexport * from \"./table/select-cell-renderer/select-cell-renderer.component\";\nexport * from \"./table/select-header-cell-renderer/select-header-cell-renderer.component\";\nexport * from \"./table/table-cell-renderer/table-cell-renderer.component\";\nexport * from \"./table/table-header-cell-renderer/table-header-cell-renderer.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\nexport * from \"./vertical-focus-container/vertical-focus-container.component\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./components.module"},{"from":"./disposable-component"},{"from":"./focusable.component"},{"from":"./resize-aware.component"},{"from":"./card-container/card-container.component"},{"from":"./focus-container/focus-container.component"},{"from":"./forms/abstract-input.component"},{"from":"./forms/abstract-list-input.component"},{"from":"./forms/abstract-value-input.component"},{"from":"./forms/checkbox-input/checkbox-input.component"},{"from":"./forms/multiple-select-input/multiple-select-input.component"},{"from":"./forms/number-input/number-input.component"},{"from":"./forms/password-input/password-input.component"},{"from":"./forms/select-input/select-input.component"},{"from":"./forms/string-input/string-input.component"},{"from":"./forms/text-input/text-input.component"},{"from":"./icon/icon.component"},{"from":"./noop/noop.component"},{"from":"./scroll-container/scroll-container.component"},{"from":"./section-header/section-header.component"},{"from":"./switch-case/switch-case.component"},{"from":"./table/cell-editors"},{"from":"./table/cell-
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./components.module"},{"from":"./disposable-component"},{"from":"./focusable.component"},{"from":"./resize-aware.component"},{"from":"./card-container/card-container.component"},{"from":"./focus-container/focus-container.component"},{"from":"./forms/abstract-input.component"},{"from":"./forms/abstract-list-input.component"},{"from":"./forms/abstract-value-input.component"},{"from":"./forms/autocomplete-input/autocomplete-input.component"},{"from":"./forms/checkbox-input/checkbox-input.component"},{"from":"./forms/multiple-select-input/multiple-select-input.component"},{"from":"./forms/number-input/number-input.component"},{"from":"./forms/password-input/password-input.component"},{"from":"./forms/select-input/select-input.component"},{"from":"./forms/string-input/string-input.component"},{"from":"./forms/text-input/text-input.component"},{"from":"./icon/icon.component"},{"from":"./noop/noop.component"},{"from":"./scroll-container/scroll-container.component"},{"from":"./section-header/section-header.component"},{"from":"./switch-case/switch-case.component"},{"from":"./table/cell-editors"},{"from":"./table/cell-portal-ref"},{"from":"./table/cell-renderer"},{"from":"./table/column-model"},{"from":"./table/column-text-properties"},{"from":"./table/edit-session"},{"from":"./table/mutable-cell-renderer"},{"from":"./table/table-def"},{"from":"./table/table-model"},{"from":"./table/table.component"},{"from":"./table/column-template/column-template.directive"},{"from":"./table/default-cell-renderer/default-cell-renderer.component"},{"from":"./table/default-header-cell-renderer/default-header-cell-renderer.component"},{"from":"./table/edit-row-controls/edit-row-controls.component"},{"from":"./table/select-cell-renderer/select-cell-renderer.component"},{"from":"./table/select-header-cell-renderer/select-header-cell-renderer.component"},{"from":"./table/table-cell-renderer/table-cell-renderer.component"},{"from":"./table/table-header-cell-renderer/table-header-cell-renderer.component"},{"from":"./types/bounds.class"},{"from":"./types/dimension.class"},{"from":"./types/point.class"},{"from":"./vertical-focus-container/vertical-focus-container.component"}]}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-editors.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/cell-editors.ts"],"names":[],"mappings":"","sourcesContent":["import { Form, ListModel, ValueModel } from '@coolon/pectin';\n\nexport interface CellEditorComponent<T> {\n valueModel:
|
|
1
|
+
{"version":3,"file":"cell-editors.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/cell-editors.ts"],"names":[],"mappings":"","sourcesContent":["import { Form, IMutableListModel, IMutableValueModel, ListModel, ValueModel } from '@coolon/pectin';\n\nexport interface CellEditorComponent<T> {\n valueModel: IMutableValueModel<T> | Form.ValueModelBase<T>\n\n requestFocus?();\n}\n\nexport interface CellListEditorComponent<T> {\n listModel: IMutableListModel<T> | Form.ListModelBase<T>\n\n requestFocus?();\n}\n"]}
|
|
@@ -19,6 +19,7 @@ export class CellHeaderPortalRef extends CellPortalRef {
|
|
|
19
19
|
assert.isTruthy(host);
|
|
20
20
|
host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
21
21
|
}
|
|
22
|
+
// @Trace()
|
|
22
23
|
onPortalAttached(host, portalComponent) {
|
|
23
24
|
this.initialiseHeader(portalComponent, host.column);
|
|
24
25
|
}
|
|
@@ -34,13 +35,15 @@ export class ComponentCellRendererPortalRef extends CellRendererPortalRef {
|
|
|
34
35
|
initialiseHost(host, columnModel) {
|
|
35
36
|
host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
36
37
|
}
|
|
38
|
+
// @Trace()
|
|
37
39
|
onPortalAttached(host, portalComponent) {
|
|
38
40
|
host[PORTAL_RENDERER_COMPONENT] = portalComponent;
|
|
39
|
-
this.updateComponent(portalComponent, host.getRowData());
|
|
41
|
+
this.updateComponent(portalComponent, host.getRowData(), true);
|
|
40
42
|
}
|
|
43
|
+
// @Trace()
|
|
41
44
|
pushState(host) {
|
|
42
45
|
if (host[PORTAL_RENDERER_COMPONENT]) {
|
|
43
|
-
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
|
|
46
|
+
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData(), false);
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
}
|
|
@@ -77,6 +80,7 @@ export class TemplateCellRendererPortalRef extends CellRendererPortalRef {
|
|
|
77
80
|
onPortalAttached(host, portalComponent) {
|
|
78
81
|
// don't care
|
|
79
82
|
}
|
|
83
|
+
// @Trace()
|
|
80
84
|
pushState(host) {
|
|
81
85
|
host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
|
|
82
86
|
host.fillCell = this.fillCell;
|
|
@@ -86,4 +90,4 @@ export class TemplateCellRendererPortalRef extends CellRendererPortalRef {
|
|
|
86
90
|
return new TemplatePortal(this.templateRef, this.viewContainer, Object.assign(Object.assign({}, (data)), { $implicit: data.row }));
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
|
-
//# sourceMappingURL=cell-
|
|
93
|
+
//# sourceMappingURL=cell-portal-ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell-portal-ref.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/cell-portal-ref.ts"],"names":[],"mappings":"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","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport { Trace } from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { ColumnModel, RowData } from './column-model';\nimport { EditSession } from './edit-session';\nimport { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';\nimport { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';\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 // @Trace()\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>, firstTime: boolean) => 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 // @Trace()\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal) {\n host[PORTAL_RENDERER_COMPONENT] = portalComponent;\n this.updateComponent(portalComponent, host.getRowData(), true);\n }\n\n // @Trace()\n pushState(host: TableCellRendererComponent<Row>): void {\n if (host[PORTAL_RENDERER_COMPONENT]) {\n this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData(), false);\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 // @Trace()\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"]}
|
package/esm2015/lib/components/table/{cell-protal-ref.metadata.json → cell-portal-ref.metadata.json}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"HEADER_CELL_RENDERER_PORTAL":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["aup-cell-header-renderer-component-ref"]},"CELL_RENDERER_PORTAL":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["aup-cell-renderer-component-ref"]},"CELL_EDITOR_PORTAL":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["aup-cell-editor-component-ref"]},"PORTAL_RENDERER_COMPONENT":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["aup-cell-renderer-portal-component"]},"PORTAL_EDITOR_COMPONENT":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["aup-cell-editor-portal-component"]},"CellPortalRef":{"__symbolic":"class","arity":3,"members":{"__ctor__":[{"__symbolic":"constructor"}],"initialiseHost":[{"__symbolic":"method"}],"onPortalAttached":[{"__symbolic":"method"}]}},"CellHeaderPortalRef":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"CellPortalRef"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"ComponentType","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"HEADER_CELL_RENDERER_PORTAL":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["aup-cell-header-renderer-component-ref"]},"CELL_RENDERER_PORTAL":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["aup-cell-renderer-component-ref"]},"CELL_EDITOR_PORTAL":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["aup-cell-editor-component-ref"]},"PORTAL_RENDERER_COMPONENT":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["aup-cell-renderer-portal-component"]},"PORTAL_EDITOR_COMPONENT":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["aup-cell-editor-portal-component"]},"CellPortalRef":{"__symbolic":"class","arity":3,"members":{"__ctor__":[{"__symbolic":"constructor"}],"initialiseHost":[{"__symbolic":"method"}],"onPortalAttached":[{"__symbolic":"method"}]}},"CellHeaderPortalRef":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"CellPortalRef"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"ComponentType","line":27,"character":38,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":75,"character":52,"context":{"typeName":"Portal"}}]},{"__symbolic":"error","message":"Expression form not supported","line":27,"character":83}]}],"initialiseHost":[{"__symbolic":"method"}],"onPortalAttached":[{"__symbolic":"method"}]}},"CellRendererPortalRef":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"CellPortalRef"},"arity":2,"members":{"pushState":[{"__symbolic":"method"}]}},"ComponentCellRendererPortalRef":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"CellRendererPortalRef"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"ComponentType","line":27,"character":38,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":75,"character":52,"context":{"typeName":"Portal"}}]},{"__symbolic":"error","message":"Expression form not supported","line":50,"character":87}]}],"initialiseHost":[{"__symbolic":"method"}],"onPortalAttached":[{"__symbolic":"method"}],"pushState":[{"__symbolic":"method"}]}},"CellEditorPortalRef":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"CellPortalRef"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"ComponentType","line":27,"character":38,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":75,"character":52,"context":{"typeName":"Portal"}}]},{"__symbolic":"error","message":"Expression form not supported","line":75,"character":95}]}],"initialiseHost":[{"__symbolic":"method"}],"onPortalAttached":[{"__symbolic":"method"}]}},"TemplateCellRendererPortalRef":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"CellRendererPortalRef"},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor"}],"registerPortal":[{"__symbolic":"method"}],"initialiseHost":[{"__symbolic":"method"}],"onPortalAttached":[{"__symbolic":"method"}],"pushState":[{"__symbolic":"method"}],"createPortal":[{"__symbolic":"method"}]}}}}]
|
|
@@ -3,7 +3,7 @@ import { MultipleSelectionModel } from '@coolon/pectin';
|
|
|
3
3
|
import { assert } from '@coolon/typescript-utilities';
|
|
4
4
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
5
5
|
import _ from 'lodash';
|
|
6
|
-
import { CellEditorPortalRef, CellHeaderPortalRef, ComponentCellRendererPortalRef, TemplateCellRendererPortalRef } from './cell-
|
|
6
|
+
import { CellEditorPortalRef, CellHeaderPortalRef, ComponentCellRendererPortalRef, TemplateCellRendererPortalRef } from './cell-portal-ref';
|
|
7
7
|
import { DefaultCellRendererComponent } from './default-cell-renderer/default-cell-renderer.component';
|
|
8
8
|
import { DefaultHeaderCellRendererComponent } from './default-header-cell-renderer/default-header-cell-renderer.component';
|
|
9
9
|
import { EditRowControls } from './edit-row-controls/edit-row-controls.component';
|
|
@@ -12,6 +12,7 @@ import { SelectHeaderCellRendererComponent } from './select-header-cell-renderer
|
|
|
12
12
|
const noop = () => {
|
|
13
13
|
};
|
|
14
14
|
const ɵ0 = noop;
|
|
15
|
+
const CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
15
16
|
export class ColumnModel {
|
|
16
17
|
constructor(columnId, defaults) {
|
|
17
18
|
this.columnId = columnId;
|
|
@@ -100,21 +101,62 @@ __decorate([
|
|
|
100
101
|
__metadata("design:returntype", Object)
|
|
101
102
|
], ColumnModel.prototype, "getColumnTextProperties", null);
|
|
102
103
|
export class PropertyColumnModel extends ColumnModel {
|
|
103
|
-
constructor(property, defaults) {
|
|
104
|
-
super(
|
|
104
|
+
constructor(id, property, defaults) {
|
|
105
|
+
super(id, defaults);
|
|
105
106
|
this.property = property;
|
|
106
107
|
this._format = (value) => value;
|
|
107
108
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
108
109
|
}
|
|
109
|
-
cellRenderer(componentType) {
|
|
110
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
110
|
+
cellRenderer(componentType, onComponentInitOrOptions) {
|
|
111
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
112
|
+
if (firstTime) {
|
|
113
|
+
if (_.isFunction(onComponentInitOrOptions)) {
|
|
114
|
+
onComponentInitOrOptions(component);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
if (_.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
118
|
+
onComponentInitOrOptions.onComponentInit(component);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
111
122
|
component.value = this._format(rowData.row[this.property]);
|
|
123
|
+
if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
124
|
+
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
125
|
+
}
|
|
112
126
|
}));
|
|
113
127
|
return this;
|
|
114
128
|
}
|
|
115
|
-
|
|
129
|
+
mutableCellRenderer(componentType, options) {
|
|
130
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
131
|
+
// keep a local copy most recent row value so it's available to teh
|
|
132
|
+
// edit callback without having to add/remove subscribers all the time.
|
|
133
|
+
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
134
|
+
let disableEditCallback = false;
|
|
135
|
+
if (firstTime) {
|
|
136
|
+
if (_.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
137
|
+
options.onComponentInit(component);
|
|
138
|
+
}
|
|
139
|
+
// install our edit callback
|
|
140
|
+
component.onValueEdited((is, was) => {
|
|
141
|
+
if (!disableEditCallback) {
|
|
142
|
+
options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
// now push the value the component and disable the callback just incase the component misbehaves
|
|
147
|
+
// and fires a value change during the operation.
|
|
148
|
+
disableEditCallback = true;
|
|
149
|
+
component.value = rowData.row[this.property];
|
|
150
|
+
disableEditCallback = false;
|
|
151
|
+
if (!_.isFunction(options) && _.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
152
|
+
options.onRowUpdate(component, rowData.row);
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
155
|
+
return this;
|
|
156
|
+
}
|
|
157
|
+
cellEditor(editor, validatorsOrInitialiser, onComponentInit) {
|
|
116
158
|
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
117
|
-
const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser :
|
|
159
|
+
const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
118
160
|
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
119
161
|
const formValueModel = editSession.form.pluck(this.property);
|
|
120
162
|
if (validators) {
|
|
@@ -137,8 +179,8 @@ export class PropertyColumnModel extends ColumnModel {
|
|
|
137
179
|
}
|
|
138
180
|
}
|
|
139
181
|
export class ListPropertyColumnModel extends ColumnModel {
|
|
140
|
-
constructor(property, defaults) {
|
|
141
|
-
super(
|
|
182
|
+
constructor(id, property, defaults) {
|
|
183
|
+
super(id, defaults);
|
|
142
184
|
this.property = property;
|
|
143
185
|
this._format = (value) => value.map(v => v === null || v === void 0 ? void 0 : v.toString()).join(', ');
|
|
144
186
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
@@ -179,9 +221,22 @@ export class CustomValueColumnModel extends ColumnModel {
|
|
|
179
221
|
this.getValue = getValue;
|
|
180
222
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
181
223
|
}
|
|
182
|
-
cellRenderer(componentType) {
|
|
183
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
224
|
+
cellRenderer(componentType, onComponentInitOrOptions) {
|
|
225
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
226
|
+
if (firstTime) {
|
|
227
|
+
if (_.isFunction(onComponentInitOrOptions)) {
|
|
228
|
+
onComponentInitOrOptions(component);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
if (_.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
232
|
+
onComponentInitOrOptions.onComponentInit(component);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
184
236
|
component.value = this.getValue(rowData.row);
|
|
237
|
+
if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
238
|
+
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
239
|
+
}
|
|
185
240
|
}));
|
|
186
241
|
return this;
|
|
187
242
|
}
|