@coolon/angular-ui-powerups 12.4.0-alpha.64 → 12.4.0-alpha.66

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 (40) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +40 -5
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/coolon-angular-ui-powerups.metadata.json +1 -1
  4. package/esm2015/lib/components/commands/command-face/command-face.component.js +4 -0
  5. package/esm2015/lib/components/commands/command-face/command-face.component.js.map +1 -1
  6. package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
  7. package/esm2015/lib/components/exports.js +1 -0
  8. package/esm2015/lib/components/exports.js.map +1 -1
  9. package/esm2015/lib/components/exports.metadata.json +1 -1
  10. package/esm2015/lib/components/tables/abstract-table-model.js +3 -0
  11. package/esm2015/lib/components/tables/abstract-table-model.js.map +1 -1
  12. package/esm2015/lib/components/tables/abstract-table-model.metadata.json +1 -1
  13. package/esm2015/lib/components/tables/table/cell-renderer.js.map +1 -1
  14. package/esm2015/lib/components/tables/table/column-model.js +22 -4
  15. package/esm2015/lib/components/tables/table/column-model.js.map +1 -1
  16. package/esm2015/lib/components/tables/table/column-model.metadata.json +1 -1
  17. package/esm2015/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.js +3 -0
  18. package/esm2015/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -1
  19. package/esm2015/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.metadata.json +1 -1
  20. package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.js +0 -2
  21. package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.js.map +1 -1
  22. package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.metadata.json +1 -1
  23. package/esm2015/lib/components/tables/table/text-search-predicate.js +2 -0
  24. package/esm2015/lib/components/tables/table/text-search-predicate.js.map +1 -0
  25. package/esm2015/lib/components/tables/table/text-search-predicate.metadata.json +1 -0
  26. package/fesm2015/coolon-angular-ui-powerups.js +32 -6
  27. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  28. package/lib/components/commands/command-face/command-face.component.d.ts +1 -0
  29. package/lib/components/exports.d.ts +1 -0
  30. package/lib/components/tables/abstract-table-model.d.ts +1 -0
  31. package/lib/components/tables/table/cell-renderer.d.ts +2 -0
  32. package/lib/components/tables/table/column-model.d.ts +9 -0
  33. package/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.d.ts +3 -1
  34. package/lib/components/tables/table/table-row-menu/table-row-menu.component.d.ts +2 -3
  35. package/lib/components/tables/table/text-search-predicate.d.ts +1 -0
  36. package/package.json +1 -1
  37. package/schematics/activity/index.js +1 -1
  38. package/schematics/activity/index.js.map +1 -1
  39. package/schematics/aup-i18n/index.js +1 -1
  40. package/schematics/aup-i18n/index.js.map +1 -1
@@ -1177,6 +1177,13 @@
1177
1177
  _this.activeColor = activeFace.pluck("color");
1178
1178
  return _this;
1179
1179
  }
1180
+ Object.defineProperty(CommandFaceComponent.prototype, "face", {
1181
+ set: function (face) {
1182
+ this.facesModel.value = [face];
1183
+ },
1184
+ enumerable: false,
1185
+ configurable: true
1186
+ });
1180
1187
  Object.defineProperty(CommandFaceComponent.prototype, "requiresMissingIconInLayout", {
1181
1188
  get: function () {
1182
1189
  return this.includeMissingIconInLayout && !this.activeIcon.value;
@@ -1215,6 +1222,7 @@
1215
1222
  CommandFaceComponent.ctorParameters = function () { return []; };
1216
1223
  CommandFaceComponent.propDecorators = {
1217
1224
  _rawFaces: [{ type: i0.Input, args: ['faces',] }],
1225
+ face: [{ type: i0.Input }],
1218
1226
  ignoreIcon: [{ type: i0.Input }],
1219
1227
  ignoreText: [{ type: i0.Input }],
1220
1228
  includeMissingIconInLayout: [{ type: i0.Input }],
@@ -2932,6 +2940,9 @@
2932
2940
  enumerable: false,
2933
2941
  configurable: true
2934
2942
  });
2943
+ DefaultCellRendererComponent.prototype.matches = function (row, text) {
2944
+ return row.toString().includes(text);
2945
+ };
2935
2946
  return DefaultCellRendererComponent;
2936
2947
  }());
2937
2948
  DefaultCellRendererComponent.decorators = [
@@ -3073,6 +3084,8 @@
3073
3084
  };
3074
3085
  var ɵ0 = noop;
3075
3086
  var CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol('aup-cell-renderer:row-data-cache');
3087
+ var DEFAULT_TEXT_SEARCH_PREDICATE = function (row, text) { return false; };
3088
+ var ɵ1 = DEFAULT_TEXT_SEARCH_PREDICATE;
3076
3089
  var ColumnModel = /** @class */ (function (_super) {
3077
3090
  __extends(ColumnModel, _super);
3078
3091
  function ColumnModel(columnId, textPropertiesProvider) {
@@ -3083,6 +3096,8 @@
3083
3096
  _this._flex = false;
3084
3097
  _this._defaultVisibility = _this.registerDisposable(new pectin.DelegatingValueModel().withDefault(true));
3085
3098
  _this._visible = _this.registerDisposable(new pectin.DelegatingValueModel().withDefault(_this._defaultVisibility));
3099
+ _this._columnModelTextSearchPredicate = undefined;
3100
+ _this._cellRendererTextSearchPredicate = undefined;
3086
3101
  _this.installHeaderRenderer();
3087
3102
  _this.dasherisedColumnId = typescriptUtilities.Stringy.from(columnId).dasherize().toString();
3088
3103
  return _this;
@@ -3116,6 +3131,21 @@
3116
3131
  ColumnModel.prototype.getDefaultHeaderText = function () {
3117
3132
  return this.columnId;
3118
3133
  };
3134
+ Object.defineProperty(ColumnModel.prototype, "isTextMatch", {
3135
+ get: function () {
3136
+ return this._columnModelTextSearchPredicate || this._cellRendererTextSearchPredicate || DEFAULT_TEXT_SEARCH_PREDICATE;
3137
+ },
3138
+ enumerable: false,
3139
+ configurable: true
3140
+ });
3141
+ /**
3142
+ * Sets the predicate to use when checking if the specified row is a text match for this column.
3143
+ * @param predicate
3144
+ */
3145
+ ColumnModel.prototype.useTextSearchPredicate = function (predicate) {
3146
+ this._columnModelTextSearchPredicate = predicate;
3147
+ return this;
3148
+ };
3119
3149
  ColumnModel.prototype.getColumnTextProperties = function () {
3120
3150
  return this._columnTextProperties || this.textPropertiesProvider();
3121
3151
  };
@@ -3167,6 +3197,12 @@
3167
3197
  };
3168
3198
  ColumnModel.prototype.onRendererAttached = function (host, component) {
3169
3199
  this._cellRendererPortalRef.onPortalAttached(host, component);
3200
+ if (___default["default"].isFunction(component.matches)) {
3201
+ this._cellRendererTextSearchPredicate = function (row, text) { return component.matches(row, text); };
3202
+ }
3203
+ else {
3204
+ this._cellRendererTextSearchPredicate = undefined;
3205
+ }
3170
3206
  };
3171
3207
  // @Trace()
3172
3208
  ColumnModel.prototype.onEditorAttached = function (host, component) {
@@ -3219,9 +3255,6 @@
3219
3255
  }
3220
3256
  }
3221
3257
  component.value = _this._format(rowData.row[_this.property]);
3222
- if (!___default["default"].isFunction(onComponentInitOrOptions) && ___default["default"].isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
3223
- onComponentInitOrOptions.onRowUpdate(component, rowData.row);
3224
- }
3225
3258
  }));
3226
3259
  return this;
3227
3260
  };
@@ -3763,8 +3796,6 @@
3763
3796
  TableRowMenuComponent.prototype.registerMoreAction = function (commandFactory, properties) {
3764
3797
  this.moreActions.push(new MenuItemData(commandFactory, properties));
3765
3798
  };
3766
- TableRowMenuComponent.prototype.ngOnInit = function () {
3767
- };
3768
3799
  TableRowMenuComponent.prototype.createMoreMenuCommand = function (item, value) {
3769
3800
  var _this = this;
3770
3801
  var when = pectin.Dsl.disposeWith(this).when;
@@ -3895,6 +3926,9 @@
3895
3926
  _this.rowSelectionDisabledOnAllColumns = chain(_this._columnList).select(function (column) { return column.isRowSelectionEnabled(); }).count().equals(0);
3896
3927
  return _this;
3897
3928
  }
3929
+ AbstractTableModel.prototype.findMatchingColumns = function (row, text) {
3930
+ return this.columns.value.filter(function (c) { return c.isTextMatch(row, text); });
3931
+ };
3898
3932
  AbstractTableModel.prototype.setDataSource = function (sourceOfTruth) {
3899
3933
  this._dataSource.setDelegate(sourceOfTruth);
3900
3934
  };
@@ -10661,6 +10695,7 @@
10661
10695
  exports.slideRightOnEnterAnimation = slideRightOnEnterAnimation;
10662
10696
  exports.treeNodeDecorator = treeNodeDecorator;
10663
10697
  exports["ɵ0"] = ɵ0;
10698
+ exports["ɵ1"] = ɵ1;
10664
10699
 
10665
10700
  Object.defineProperty(exports, '__esModule', { value: true });
10666
10701