@coolon/angular-ui-powerups 2.0.0-alpha.10 → 2.0.0-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +19 -17
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  8. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +2 -10
  9. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  10. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
  11. package/esm2015/lib/components/forms/select-input/select-input.component.js +2 -2
  12. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  13. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  14. package/esm2015/lib/components/table/column-model.js +13 -3
  15. package/esm2015/lib/components/table/column-model.js.map +1 -1
  16. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  17. package/esm2015/lib/components/table/table-model.js +2 -2
  18. package/esm2015/lib/components/table/table-model.js.map +1 -1
  19. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  20. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  21. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +2 -10
  22. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  23. package/esm5/lib/components/forms/select-input/select-input.component.js +2 -2
  24. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  25. package/esm5/lib/components/table/column-model.js +13 -3
  26. package/esm5/lib/components/table/column-model.js.map +1 -1
  27. package/esm5/lib/components/table/table-model.js +2 -2
  28. package/esm5/lib/components/table/table-model.js.map +1 -1
  29. package/fesm2015/coolon-angular-ui-powerups.js +19 -17
  30. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  31. package/fesm5/coolon-angular-ui-powerups.js +19 -17
  32. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  33. package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +1 -3
  34. package/lib/components/forms/select-input/select-input.component.d.ts +1 -1
  35. package/lib/components/table/column-model.d.ts +1 -1
  36. package/lib/components/table/table-model.d.ts +5 -2
  37. package/package.json +1 -1
@@ -922,7 +922,7 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
922
922
  * Using templates:
923
923
  * <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
924
924
  * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
925
- * <ng-template #nilOptionTemplateRef let-option>{{option.thePropertyYouWant}}</ng-template>
925
+ * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
926
926
  * </aup-multiple-select_input>
927
927
  */
928
928
  var MultipleSelectInputComponent = /** @class */ (function (_super) {
@@ -946,18 +946,10 @@ var MultipleSelectInputComponent = /** @class */ (function (_super) {
946
946
  Input(),
947
947
  __metadata("design:type", Object)
948
948
  ], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
949
- __decorate([
950
- Input(),
951
- __metadata("design:type", Boolean)
952
- ], MultipleSelectInputComponent.prototype, "allowNil", void 0);
953
949
  __decorate([
954
950
  ContentChild('optionTemplate'),
955
951
  __metadata("design:type", TemplateRef)
956
952
  ], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
957
- __decorate([
958
- ContentChild('nilOptionTemplate'),
959
- __metadata("design:type", TemplateRef)
960
- ], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
961
953
  __decorate([
962
954
  Input(),
963
955
  __metadata("design:type", Function)
@@ -965,7 +957,7 @@ var MultipleSelectInputComponent = /** @class */ (function (_super) {
965
957
  MultipleSelectInputComponent = __decorate([
966
958
  Component({
967
959
  selector: 'aup-multiple-select-input',
968
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"listModel.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\">{{placeholder}}</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",
960
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"listModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\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",
969
961
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
970
962
  }),
971
963
  __metadata("design:paramtypes", [])
@@ -1028,7 +1020,7 @@ var PasswordInputComponent = /** @class */ (function (_super) {
1028
1020
  * Using templates:
1029
1021
  * <aup-select-input [valueModel]="myModel" [options]="myOptions">
1030
1022
  * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
1031
- * <ng-template #nilOptionTemplateRef let-option>{{option.thePropertyYouWant}}</ng-template>
1023
+ * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
1032
1024
  * </aup-select_input>
1033
1025
  */
1034
1026
  var SelectInputComponent = /** @class */ (function (_super) {
@@ -1071,7 +1063,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
1071
1063
  SelectInputComponent = __decorate([
1072
1064
  Component({
1073
1065
  selector: 'aup-select-input',
1074
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.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\">{{placeholder}}</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",
1066
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.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",
1075
1067
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
1076
1068
  }),
1077
1069
  __metadata("design:paramtypes", [])
@@ -1853,13 +1845,23 @@ var CustomValueColumnModel = /** @class */ (function (_super) {
1853
1845
  _this.cellRenderer(DefaultCellRendererComponent);
1854
1846
  return _this;
1855
1847
  }
1856
- CustomValueColumnModel.prototype.cellRenderer = function (componentType, onComponentInit) {
1848
+ CustomValueColumnModel.prototype.cellRenderer = function (componentType, onComponentInitOrOptions) {
1857
1849
  var _this = this;
1858
1850
  this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
1859
- if (firstTime && ___default.isFunction(onComponentInit)) {
1860
- onComponentInit(component);
1851
+ if (firstTime) {
1852
+ if (___default.isFunction(onComponentInitOrOptions)) {
1853
+ onComponentInitOrOptions(component);
1854
+ }
1855
+ else {
1856
+ if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
1857
+ onComponentInitOrOptions.onComponentInit(component);
1858
+ }
1859
+ }
1861
1860
  }
1862
1861
  component.value = _this.getValue(rowData.row);
1862
+ if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
1863
+ onComponentInitOrOptions.onRowUpdate(component, rowData.row);
1864
+ }
1863
1865
  }));
1864
1866
  return this;
1865
1867
  };
@@ -2089,8 +2091,8 @@ var TableModel = /** @class */ (function () {
2089
2091
  TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
2090
2092
  return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
2091
2093
  };
2092
- TableModel.prototype.addComponentColumn = function (columnId, component, onInit) {
2093
- return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onInit);
2094
+ TableModel.prototype.addComponentColumn = function (columnId, component, onComponentInitOrOptions) {
2095
+ return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onComponentInitOrOptions);
2094
2096
  };
2095
2097
  TableModel.prototype.addTemplateColumn = function (columnId) {
2096
2098
  return this.addColumn(new CustomTemplateColumnModel(columnId, this));