@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
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [2.0.0-alpha.12](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2020-07-29)
6
+
7
+
8
+ ### Features
9
+
10
+ * added row update callbacks for custom component columns ([c128053](https://bitbucket.org/coolon/angular-ui-powerups/commit/c128053f37679ba480289df4c56c5b19c9d949c4))
11
+
12
+ ## [2.0.0-alpha.11](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.10...v2.0.0-alpha.11) (2020-07-29)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * fixed nilOptionTemplate in aup-select-input ([aa80cf1](https://bitbucket.org/coolon/angular-ui-powerups/commit/aa80cf118ef7e1b2f8df4989dd8b56c2afa2b490))
18
+
5
19
  ## [2.0.0-alpha.10](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.9...v2.0.0-alpha.10) (2020-07-27)
6
20
 
7
21
 
@@ -1093,7 +1093,7 @@
1093
1093
  * Using templates:
1094
1094
  * <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
1095
1095
  * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
1096
- * <ng-template #nilOptionTemplateRef let-option>{{option.thePropertyYouWant}}</ng-template>
1096
+ * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
1097
1097
  * </aup-multiple-select_input>
1098
1098
  */
1099
1099
  var MultipleSelectInputComponent = /** @class */ (function (_super) {
@@ -1117,18 +1117,10 @@
1117
1117
  core.Input(),
1118
1118
  __metadata("design:type", Object)
1119
1119
  ], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
1120
- __decorate([
1121
- core.Input(),
1122
- __metadata("design:type", Boolean)
1123
- ], MultipleSelectInputComponent.prototype, "allowNil", void 0);
1124
1120
  __decorate([
1125
1121
  core.ContentChild('optionTemplate'),
1126
1122
  __metadata("design:type", core.TemplateRef)
1127
1123
  ], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
1128
- __decorate([
1129
- core.ContentChild('nilOptionTemplate'),
1130
- __metadata("design:type", core.TemplateRef)
1131
- ], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
1132
1124
  __decorate([
1133
1125
  core.Input(),
1134
1126
  __metadata("design:type", Function)
@@ -1136,7 +1128,7 @@
1136
1128
  MultipleSelectInputComponent = __decorate([
1137
1129
  core.Component({
1138
1130
  selector: 'aup-multiple-select-input',
1139
- 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",
1131
+ 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",
1140
1132
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
1141
1133
  }),
1142
1134
  __metadata("design:paramtypes", [])
@@ -1199,7 +1191,7 @@
1199
1191
  * Using templates:
1200
1192
  * <aup-select-input [valueModel]="myModel" [options]="myOptions">
1201
1193
  * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
1202
- * <ng-template #nilOptionTemplateRef let-option>{{option.thePropertyYouWant}}</ng-template>
1194
+ * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
1203
1195
  * </aup-select_input>
1204
1196
  */
1205
1197
  var SelectInputComponent = /** @class */ (function (_super) {
@@ -1242,7 +1234,7 @@
1242
1234
  SelectInputComponent = __decorate([
1243
1235
  core.Component({
1244
1236
  selector: 'aup-select-input',
1245
- 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",
1237
+ 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",
1246
1238
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
1247
1239
  }),
1248
1240
  __metadata("design:paramtypes", [])
@@ -2024,13 +2016,23 @@
2024
2016
  _this.cellRenderer(DefaultCellRendererComponent);
2025
2017
  return _this;
2026
2018
  }
2027
- CustomValueColumnModel.prototype.cellRenderer = function (componentType, onComponentInit) {
2019
+ CustomValueColumnModel.prototype.cellRenderer = function (componentType, onComponentInitOrOptions) {
2028
2020
  var _this = this;
2029
2021
  this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
2030
- if (firstTime && ___default__default.isFunction(onComponentInit)) {
2031
- onComponentInit(component);
2022
+ if (firstTime) {
2023
+ if (___default__default.isFunction(onComponentInitOrOptions)) {
2024
+ onComponentInitOrOptions(component);
2025
+ }
2026
+ else {
2027
+ if (___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
2028
+ onComponentInitOrOptions.onComponentInit(component);
2029
+ }
2030
+ }
2032
2031
  }
2033
2032
  component.value = _this.getValue(rowData.row);
2033
+ if (!___default__default.isFunction(onComponentInitOrOptions) && ___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
2034
+ onComponentInitOrOptions.onRowUpdate(component, rowData.row);
2035
+ }
2034
2036
  }));
2035
2037
  return this;
2036
2038
  };
@@ -2260,8 +2262,8 @@
2260
2262
  TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
2261
2263
  return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
2262
2264
  };
2263
- TableModel.prototype.addComponentColumn = function (columnId, component, onInit) {
2264
- return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onInit);
2265
+ TableModel.prototype.addComponentColumn = function (columnId, component, onComponentInitOrOptions) {
2266
+ return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onComponentInitOrOptions);
2265
2267
  };
2266
2268
  TableModel.prototype.addTemplateColumn = function (columnId) {
2267
2269
  return this.addColumn(new CustomTemplateColumnModel(columnId, this));