@coolon/angular-ui-powerups 12.4.0-alpha.65 → 12.4.0-alpha.67

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 (36) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +35 -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/exports.js +1 -0
  5. package/esm2015/lib/components/exports.js.map +1 -1
  6. package/esm2015/lib/components/exports.metadata.json +1 -1
  7. package/esm2015/lib/components/tables/abstract-table-model.js +6 -0
  8. package/esm2015/lib/components/tables/abstract-table-model.js.map +1 -1
  9. package/esm2015/lib/components/tables/abstract-table-model.metadata.json +1 -1
  10. package/esm2015/lib/components/tables/table/cell-renderer.js.map +1 -1
  11. package/esm2015/lib/components/tables/table/column-model.js +22 -4
  12. package/esm2015/lib/components/tables/table/column-model.js.map +1 -1
  13. package/esm2015/lib/components/tables/table/column-model.metadata.json +1 -1
  14. package/esm2015/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.js +3 -0
  15. package/esm2015/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -1
  16. package/esm2015/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.metadata.json +1 -1
  17. package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.js +0 -2
  18. package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.js.map +1 -1
  19. package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.metadata.json +1 -1
  20. package/esm2015/lib/components/tables/table/text-search-predicate.js +2 -0
  21. package/esm2015/lib/components/tables/table/text-search-predicate.js.map +1 -0
  22. package/esm2015/lib/components/tables/table/text-search-predicate.metadata.json +1 -0
  23. package/fesm2015/coolon-angular-ui-powerups.js +31 -6
  24. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  25. package/lib/components/exports.d.ts +1 -0
  26. package/lib/components/tables/abstract-table-model.d.ts +2 -0
  27. package/lib/components/tables/table/cell-renderer.d.ts +2 -0
  28. package/lib/components/tables/table/column-model.d.ts +9 -0
  29. package/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.d.ts +3 -1
  30. package/lib/components/tables/table/table-row-menu/table-row-menu.component.d.ts +2 -3
  31. package/lib/components/tables/table/text-search-predicate.d.ts +1 -0
  32. package/package.json +1 -1
  33. package/schematics/activity/index.js +1 -1
  34. package/schematics/activity/index.js.map +1 -1
  35. package/schematics/aup-i18n/index.js +1 -1
  36. package/schematics/aup-i18n/index.js.map +1 -1
@@ -2940,6 +2940,9 @@
2940
2940
  enumerable: false,
2941
2941
  configurable: true
2942
2942
  });
2943
+ DefaultCellRendererComponent.prototype.matches = function (row, regex) {
2944
+ return regex.test(row.toString());
2945
+ };
2943
2946
  return DefaultCellRendererComponent;
2944
2947
  }());
2945
2948
  DefaultCellRendererComponent.decorators = [
@@ -3081,6 +3084,8 @@
3081
3084
  };
3082
3085
  var ɵ0 = noop;
3083
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;
3084
3089
  var ColumnModel = /** @class */ (function (_super) {
3085
3090
  __extends(ColumnModel, _super);
3086
3091
  function ColumnModel(columnId, textPropertiesProvider) {
@@ -3091,6 +3096,8 @@
3091
3096
  _this._flex = false;
3092
3097
  _this._defaultVisibility = _this.registerDisposable(new pectin.DelegatingValueModel().withDefault(true));
3093
3098
  _this._visible = _this.registerDisposable(new pectin.DelegatingValueModel().withDefault(_this._defaultVisibility));
3099
+ _this._columnModelTextSearchPredicate = undefined;
3100
+ _this._cellRendererTextSearchPredicate = undefined;
3094
3101
  _this.installHeaderRenderer();
3095
3102
  _this.dasherisedColumnId = typescriptUtilities.Stringy.from(columnId).dasherize().toString();
3096
3103
  return _this;
@@ -3124,6 +3131,21 @@
3124
3131
  ColumnModel.prototype.getDefaultHeaderText = function () {
3125
3132
  return this.columnId;
3126
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
+ };
3127
3149
  ColumnModel.prototype.getColumnTextProperties = function () {
3128
3150
  return this._columnTextProperties || this.textPropertiesProvider();
3129
3151
  };
@@ -3175,6 +3197,12 @@
3175
3197
  };
3176
3198
  ColumnModel.prototype.onRendererAttached = function (host, component) {
3177
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
+ }
3178
3206
  };
3179
3207
  // @Trace()
3180
3208
  ColumnModel.prototype.onEditorAttached = function (host, component) {
@@ -3227,9 +3255,6 @@
3227
3255
  }
3228
3256
  }
3229
3257
  component.value = _this._format(rowData.row[_this.property]);
3230
- if (!___default["default"].isFunction(onComponentInitOrOptions) && ___default["default"].isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
3231
- onComponentInitOrOptions.onRowUpdate(component, rowData.row);
3232
- }
3233
3258
  }));
3234
3259
  return this;
3235
3260
  };
@@ -3771,8 +3796,6 @@
3771
3796
  TableRowMenuComponent.prototype.registerMoreAction = function (commandFactory, properties) {
3772
3797
  this.moreActions.push(new MenuItemData(commandFactory, properties));
3773
3798
  };
3774
- TableRowMenuComponent.prototype.ngOnInit = function () {
3775
- };
3776
3799
  TableRowMenuComponent.prototype.createMoreMenuCommand = function (item, value) {
3777
3800
  var _this = this;
3778
3801
  var when = pectin.Dsl.disposeWith(this).when;
@@ -3903,6 +3926,12 @@
3903
3926
  _this.rowSelectionDisabledOnAllColumns = chain(_this._columnList).select(function (column) { return column.isRowSelectionEnabled(); }).count().equals(0);
3904
3927
  return _this;
3905
3928
  }
3929
+ AbstractTableModel.prototype.findMatchingColumns = function (row, regex) {
3930
+ return this.columns.value.filter(function (c) { return c.isTextMatch(row, regex); });
3931
+ };
3932
+ AbstractTableModel.prototype.hasMatchingColumn = function (row, regex) {
3933
+ return !!this.columns.value.find(function (c) { return c.isTextMatch(row, regex); });
3934
+ };
3906
3935
  AbstractTableModel.prototype.setDataSource = function (sourceOfTruth) {
3907
3936
  this._dataSource.setDelegate(sourceOfTruth);
3908
3937
  };
@@ -10669,6 +10698,7 @@
10669
10698
  exports.slideRightOnEnterAnimation = slideRightOnEnterAnimation;
10670
10699
  exports.treeNodeDecorator = treeNodeDecorator;
10671
10700
  exports["ɵ0"] = ɵ0;
10701
+ exports["ɵ1"] = ɵ1;
10672
10702
 
10673
10703
  Object.defineProperty(exports, '__esModule', { value: true });
10674
10704