@coolon/angular-ui-powerups 13.7.13 → 13.7.17

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.
@@ -5,6 +5,7 @@ import { AbstractTableComponent } from '../abstract-table.component';
5
5
  import { TreeTableModel } from './tree-table-model';
6
6
  import * as i0 from "@angular/core";
7
7
  import * as i1 from "../renderer/table-body/table-body.component";
8
+ import * as i2 from "../../../directives/highlight-text-model.directive";
8
9
  /**
9
10
  * Create your model:
10
11
  * @example
@@ -76,7 +77,7 @@ export class TreeTableComponent extends AbstractTableComponent {
76
77
  TreeTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: TreeTableComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
77
78
  TreeTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: TreeTableComponent, selector: "aup-tree-table", inputs: { treeTableModel: "treeTableModel" }, providers: [
78
79
  { provide: AbstractTableComponent, useExisting: TreeTableComponent }
79
- ], usesInheritance: true, ngImport: i0, template: "<aup-table-body [tableModel]=\"treeTableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n></aup-table-body>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host::ng-deep td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}:host::ng-deep td.mat-column-tree-label,:host::ng-deep td.mat-column-tree-label{width:1px}:host::ng-deep aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}:host::ng-deep aup-tree-label-cell-renderer{flex:1}aup-table-body{flex:1}\n"], components: [{ type: i1.TableBodyComponent, selector: "aup-table-body", inputs: ["tableModel", "showHeader$", "showHeader", "enableScrolling"], outputs: ["visibleRowCount"] }] });
80
+ ], usesInheritance: true, ngImport: i0, template: "<aup-table-body [tableModel]=\"treeTableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n [aupHighlightTextModel]=\"treeTableModel.filterModel.highlightText$\"\n></aup-table-body>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host::ng-deep td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}:host::ng-deep td.mat-column-tree-label,:host::ng-deep td.mat-column-tree-label{width:1px}:host::ng-deep aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}:host::ng-deep aup-tree-label-cell-renderer{flex:1}aup-table-body{flex:1}\n"], components: [{ type: i1.TableBodyComponent, selector: "aup-table-body", inputs: ["tableModel", "showHeader$", "showHeader", "enableScrolling"], outputs: ["visibleRowCount"] }], directives: [{ type: i2.HighlightTextModelDirective, selector: "[aupHighlightTextModel]", inputs: ["aupHighlightTextModel"] }] });
80
81
  __decorate([
81
82
  TrackExternal(),
82
83
  __metadata("design:type", TreeTableModel)
@@ -85,8 +86,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImpor
85
86
  type: Component,
86
87
  args: [{ selector: 'aup-tree-table', providers: [
87
88
  { provide: AbstractTableComponent, useExisting: TreeTableComponent }
88
- ], template: "<aup-table-body [tableModel]=\"treeTableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n></aup-table-body>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host::ng-deep td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}:host::ng-deep td.mat-column-tree-label,:host::ng-deep td.mat-column-tree-label{width:1px}:host::ng-deep aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}:host::ng-deep aup-tree-label-cell-renderer{flex:1}aup-table-body{flex:1}\n"] }]
89
+ ], template: "<aup-table-body [tableModel]=\"treeTableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n [aupHighlightTextModel]=\"treeTableModel.filterModel.highlightText$\"\n></aup-table-body>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host::ng-deep td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}:host::ng-deep td.mat-column-tree-label,:host::ng-deep td.mat-column-tree-label{width:1px}:host::ng-deep aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}:host::ng-deep aup-tree-label-cell-renderer{flex:1}aup-table-body{flex:1}\n"] }]
89
90
  }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { treeTableModel: [{
90
91
  type: Input
91
92
  }] } });
92
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJlZS10YWJsZS1jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItdWktcG93ZXJ1cHMvc3JjL2xpYi9jb21wb25lbnRzL3RhYmxlcy90cmVlLXRhYmxlL3RyZWUtdGFibGUtY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbmd1bGFyLXVpLXBvd2VydXBzL3NyYy9saWIvY29tcG9uZW50cy90YWJsZXMvdHJlZS10YWJsZS90cmVlLXRhYmxlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFjLFFBQVEsRUFBRSxLQUFLLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDL0UsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRy9DLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ3JFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQzs7O0FBRXBEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztH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JbnB1dCgpXG4gIEBUcmFja0V4dGVybmFsKClcbiAgdHJlZVRhYmxlTW9kZWw6IFRyZWVUYWJsZU1vZGVsPFQ+O1xuXG4gIGNvbnN0cnVjdG9yKGluamVjdG9yOiBJbmplY3Rvcikge1xuICAgIHN1cGVyKGluamVjdG9yKTtcbiAgfVxuXG4gIGdldE1vZGVsKCk6IEFic3RyYWN0VGFibGVNb2RlbDxUPiB7XG4gICAgcmV0dXJuIHRoaXMudHJlZVRhYmxlTW9kZWw7XG4gIH1cblxufVxuIiwiPGF1cC10YWJsZS1ib2R5IFt0YWJsZU1vZGVsXT1cInRyZWVUYWJsZU1vZGVsXCJcbiAgICAgICAgICAgICAgICBbc2hvd0hlYWRlciRdPVwic2hvd0hlYWRlciRcIlxuICAgICAgICAgICAgICAgIFtlbmFibGVTY3JvbGxpbmddPVwiZW5hYmxlU2Nyb2xsaW5nXCJcbiAgICAgICAgICAgICAgICBbYXVwSGlnaGxpZ2h0VGV4dE1vZGVsXT1cInRyZWVUYWJsZU1vZGVsLmZpbHRlck1vZGVsLmhpZ2hsaWdodFRleHQkXCJcbj48L2F1cC10YWJsZS1ib2R5PlxuIl19
@@ -39,7 +39,7 @@ import { MatTableModule } from '@angular/material/table';
39
39
  import * as i6 from '@angular/material/tooltip';
40
40
  import { MatTooltipModule } from '@angular/material/tooltip';
41
41
  import * as i1$6 from '@coolon/pectin';
42
- import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, DelegatingListModel, MutableValueModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, Functions, MultipleSelectionModel, AbstractComputedListModel, DelegatingSelectionModel, DirtyTrackingForm, PagedListModel, PageController, ComputedListModel, Deferred } from '@coolon/pectin';
42
+ import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, DelegatingListModel, MutableValueModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, Functions, MultipleSelectionModel, AbstractComputedListModel, DelegatingSelectionModel, DelegateProxyHandler, DirtyTrackingForm, PagedListModel, PageController, ComputedListModel, Deferred } from '@coolon/pectin';
43
43
  import { __decorate, __param, __metadata, __awaiter } from 'tslib';
44
44
  import escapeStringRegexp from 'escape-string-regexp';
45
45
  import { isEmpty, isString, isFunction, isNil, isInteger, isEqual, uniq, first, isObject, isNumber, isNaN as isNaN$1 } from 'lodash';
@@ -49,7 +49,7 @@ import { lang as lang$1, assert as assert$1, Stringy, Klass, Opts } from '@coolo
49
49
  import { Memoize } from '@typescript-plus/fast-memoize-decorator';
50
50
  import { Enum } from 'typescript-string-enums';
51
51
  import * as i3 from '@angular/material/core';
52
- import { isFunction as isFunction$1, isEmpty as isEmpty$1, isNil as isNil$1, findLast } from 'lodash-es';
52
+ import { isFunction as isFunction$1, isNil as isNil$1, isEmpty as isEmpty$1, findLast } from 'lodash-es';
53
53
  import produce from 'immer';
54
54
  import ResizeObserver from 'resize-observer-polyfill';
55
55
  import * as i6$1 from '@angular/cdk/a11y';
@@ -2786,8 +2786,9 @@ class AbstractTableComponent extends DisposableComponent {
2786
2786
  }
2787
2787
  ngOnInit() {
2788
2788
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
2789
- this.getModel().initialise(this.injector);
2790
- this.columnsById = chain(this.getModel().columns).indexBy('columnId');
2789
+ const model = this.getModel();
2790
+ model.initialise(this.injector);
2791
+ this.columnsById = chain(model.columns).indexBy('columnId');
2791
2792
  }
2792
2793
  getModel() {
2793
2794
  return lang$1.abstractMethod(this.constructor);
@@ -3456,8 +3457,17 @@ class EditSession extends GarbageCollector {
3456
3457
  }
3457
3458
  }
3458
3459
 
3459
- var DefaultValueFormatter = ColumnTextSearchFormatter.DefaultValueFormatter;
3460
+ class AbstractTableFilterModel extends GarbageCollector {
3461
+ }
3462
+ TrackExternal.useDelegate(AbstractTableFilterModel, options => {
3463
+ return DelegateProxyHandler.create("AbstractTableFilterModel", b => {
3464
+ b.forProperty("rowFilter$", () => new DelegatingValueModel());
3465
+ b.forProperty("highlightText$", () => new DelegatingValueModel());
3466
+ });
3467
+ });
3468
+
3460
3469
  var DefaultArrayFormatter = ColumnTextSearchFormatter.DefaultArrayFormatter;
3470
+ var DefaultValueFormatter = ColumnTextSearchFormatter.DefaultValueFormatter;
3461
3471
  // export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
3462
3472
  // export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
3463
3473
  class RowClass {
@@ -3466,58 +3476,6 @@ class RowClass {
3466
3476
  this.matches = matches;
3467
3477
  }
3468
3478
  }
3469
- class FilterManager extends GarbageCollector {
3470
- constructor(columns) {
3471
- super();
3472
- this.columns = columns;
3473
- this._userRowPredicate$ = this.registerDisposable(new DelegatingValueModel().withDefault(() => true));
3474
- this._searchText$ = this.registerDisposable(new DelegatingValueModel());
3475
- this.updateInProgress = new Guard();
3476
- const { chain } = Dsl.disposeWith(this);
3477
- // TODO: should this logic be in the strategy itself? That way users could
3478
- // customise...
3479
- const textSearchPredicate$ = chain(this._searchText$).map(text => {
3480
- if (isEmpty$1(text)) {
3481
- return () => true;
3482
- }
3483
- else {
3484
- const regex = new RegExp(escapeStringRegexp(text), "i");
3485
- return (row) => this.hasMatchingColumn(row, regex);
3486
- }
3487
- }, {
3488
- allowNil: true,
3489
- dependsOn: this.columns
3490
- });
3491
- this.rowPredicate$ = chain(this._userRowPredicate$)
3492
- .map(p => {
3493
- return ((row) => p(row) && textSearchPredicate$.value(row));
3494
- }, {
3495
- dependsOn: textSearchPredicate$,
3496
- postponeWhile: this.updateInProgress
3497
- });
3498
- }
3499
- setStrategy(filterStrategy) {
3500
- if (this._searchText$.hasUserDelegate()) {
3501
- lang.illegalState("Filter strategy has already been set, it must be disposed first.");
3502
- }
3503
- this.updateInProgress.whileTrue(() => {
3504
- this._searchText$.setDelegate(filterStrategy.searchText$);
3505
- this._userRowPredicate$.setDelegate(filterStrategy.rowPredicate$);
3506
- });
3507
- const self = this;
3508
- return {
3509
- dispose() {
3510
- self.updateInProgress.whileTrue(() => {
3511
- this._searchText$.setDelegate(undefined);
3512
- this._userRowPredicate$.setDelegate(undefined);
3513
- });
3514
- }
3515
- };
3516
- }
3517
- hasMatchingColumn(row, regex) {
3518
- return !!this.columns.value.find(c => regex.test(c.getSearchTextFor(row)));
3519
- }
3520
- }
3521
3479
  class AbstractTableModel extends GarbageCollector {
3522
3480
  constructor() {
3523
3481
  super();
@@ -3527,7 +3485,6 @@ class AbstractTableModel extends GarbageCollector {
3527
3485
  this._editorSessions = new MutableListModel();
3528
3486
  this.rowClassNamePredicates = [];
3529
3487
  this.rowClickListeners = new EventListenerList();
3530
- this._searchText$ = new DelegatingValueModel();
3531
3488
  this._createForm = (row) => new DirtyTrackingForm();
3532
3489
  this.trackBy = (index, item) => {
3533
3490
  return this.identityOf ? this.identityOf(item) : index;
@@ -3538,12 +3495,12 @@ class AbstractTableModel extends GarbageCollector {
3538
3495
  });
3539
3496
  this._editorSessionByRowId = chain(this._editorSessions).indexBy("rowId");
3540
3497
  this.editing$ = chain(this._editorSessions).count().isGreaterThan(0);
3541
- this.filterManager = this.registerDisposable(new FilterManager(this._columnList));
3542
3498
  this._filteredRows$ = chain(this._rawDataSource)
3543
3499
  .reduceToList(items => {
3544
- return items.filter(item => this.filterManager.rowPredicate$.value(item));
3500
+ const filter = this.filterModel.rowFilter$.value; // filter can be null
3501
+ return !filter ? items : items.filter(item => filter.matches(item, this.columns.value));
3545
3502
  }, {
3546
- dependsOn: this.filterManager.rowPredicate$
3503
+ dependsOn: [this.filterModel.rowFilter$, this.columns]
3547
3504
  })
3548
3505
  .replaceAll(this.rowsBeingEdited$);
3549
3506
  this._visibleRows$.setDelegate(this._filteredRows$);
@@ -3552,13 +3509,6 @@ class AbstractTableModel extends GarbageCollector {
3552
3509
  this.lastVisibleColumn$ = chain(this._columnList).last();
3553
3510
  this.rowSelectionDisabledOnAllColumns$ = chain(this._columnList).select(column => column.isRowSelectionEnabled()).count().equals(0);
3554
3511
  }
3555
- findMatchingColumns(row, regex) {
3556
- return this.columns.value.filter(c => regex.test(c.getSearchTextFor(row)));
3557
- }
3558
- // @Trace()
3559
- hasMatchingColumn(row, regex) {
3560
- return !!this.columns.value.find(c => regex.test(c.getSearchTextFor(row)));
3561
- }
3562
3512
  initialise(injector) {
3563
3513
  // not sure if I should define these at the module level or not...
3564
3514
  const customInjector = Injector.create({
@@ -3576,9 +3526,6 @@ class AbstractTableModel extends GarbageCollector {
3576
3526
  setDataSource(sourceOfTruth) {
3577
3527
  this._rawDataSource.setDelegate(sourceOfTruth);
3578
3528
  }
3579
- registerFilterStrategy(filterStrategy) {
3580
- return this.filterManager.setStrategy(filterStrategy);
3581
- }
3582
3529
  identityOf(row) {
3583
3530
  return this._rawDataSource.identityOf(row);
3584
3531
  }
@@ -3719,6 +3666,11 @@ class AbstractTableModel extends GarbageCollector {
3719
3666
  this.rowClickListeners.fire(l => l(row));
3720
3667
  }
3721
3668
  }
3669
+ __decorate([
3670
+ TrackExternal() // hack instead of creating a delegating one from scratch. Would be nice if this easier to do automated... or better named? @UseProxy or @UseDelegate??
3671
+ ,
3672
+ __metadata("design:type", AbstractTableFilterModel)
3673
+ ], AbstractTableModel.prototype, "filterModel", void 0);
3722
3674
  TrackExternal.oneTimeBinding(AbstractTableModel);
3723
3675
 
3724
3676
  /**
@@ -4129,7 +4081,7 @@ class TableComponent extends AbstractTableComponent {
4129
4081
  TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: TableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4130
4082
  TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: TableComponent, selector: "aup-table", inputs: { tableModel: "tableModel" }, providers: [
4131
4083
  { provide: AbstractTableComponent, useExisting: TableComponent }
4132
- ], usesInheritance: true, ngImport: i0, template: "<aup-table-body [tableModel]=\"tableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n (visibleRowCount)=\"updatePageSize($event)\"\n></aup-table-body>\n<section class=\"table-footer\">\n <div class=\"footer-content\"><ng-content select=\"[footer]\"></ng-content></div>\n <aup-paginator *ngIf=\"tableModel.pageController\" [pageController]=\"tableModel.pageController\"></aup-paginator>\n</section>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}aup-table-body{flex:1}.table-footer{display:flex;flex-direction:row;align-items:center}.table-footer .footer-content{flex:1}\n"], components: [{ type: TableBodyComponent, selector: "aup-table-body", inputs: ["tableModel", "showHeader$", "showHeader", "enableScrolling"], outputs: ["visibleRowCount"] }, { type: PaginatorComponent, selector: "aup-paginator", inputs: ["pageController"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
4084
+ ], usesInheritance: true, ngImport: i0, template: "<aup-table-body [tableModel]=\"tableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n (visibleRowCount)=\"updatePageSize($event)\"\n [aupHighlightTextModel]=\"tableModel.filterModel.highlightText$\"\n></aup-table-body>\n<section class=\"table-footer\">\n <div class=\"footer-content\"><ng-content select=\"[footer]\"></ng-content></div>\n <aup-paginator *ngIf=\"tableModel.pageController\" [pageController]=\"tableModel.pageController\"></aup-paginator>\n</section>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}aup-table-body{flex:1}.table-footer{display:flex;flex-direction:row;align-items:center}.table-footer .footer-content{flex:1}\n"], components: [{ type: TableBodyComponent, selector: "aup-table-body", inputs: ["tableModel", "showHeader$", "showHeader", "enableScrolling"], outputs: ["visibleRowCount"] }, { type: PaginatorComponent, selector: "aup-paginator", inputs: ["pageController"] }], directives: [{ type: HighlightTextModelDirective, selector: "[aupHighlightTextModel]", inputs: ["aupHighlightTextModel"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
4133
4085
  __decorate([
4134
4086
  TrackExternal(),
4135
4087
  __metadata("design:type", TableModel)
@@ -4138,7 +4090,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImpor
4138
4090
  type: Component,
4139
4091
  args: [{ selector: 'aup-table', providers: [
4140
4092
  { provide: AbstractTableComponent, useExisting: TableComponent }
4141
- ], template: "<aup-table-body [tableModel]=\"tableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n (visibleRowCount)=\"updatePageSize($event)\"\n></aup-table-body>\n<section class=\"table-footer\">\n <div class=\"footer-content\"><ng-content select=\"[footer]\"></ng-content></div>\n <aup-paginator *ngIf=\"tableModel.pageController\" [pageController]=\"tableModel.pageController\"></aup-paginator>\n</section>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}aup-table-body{flex:1}.table-footer{display:flex;flex-direction:row;align-items:center}.table-footer .footer-content{flex:1}\n"] }]
4093
+ ], template: "<aup-table-body [tableModel]=\"tableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n (visibleRowCount)=\"updatePageSize($event)\"\n [aupHighlightTextModel]=\"tableModel.filterModel.highlightText$\"\n></aup-table-body>\n<section class=\"table-footer\">\n <div class=\"footer-content\"><ng-content select=\"[footer]\"></ng-content></div>\n <aup-paginator *ngIf=\"tableModel.pageController\" [pageController]=\"tableModel.pageController\"></aup-paginator>\n</section>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}aup-table-body{flex:1}.table-footer{display:flex;flex-direction:row;align-items:center}.table-footer .footer-content{flex:1}\n"] }]
4142
4094
  }], propDecorators: { tableModel: [{
4143
4095
  type: Input
4144
4096
  }] } });
@@ -4729,7 +4681,7 @@ class TreeTableComponent extends AbstractTableComponent {
4729
4681
  TreeTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: TreeTableComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
4730
4682
  TreeTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: TreeTableComponent, selector: "aup-tree-table", inputs: { treeTableModel: "treeTableModel" }, providers: [
4731
4683
  { provide: AbstractTableComponent, useExisting: TreeTableComponent }
4732
- ], usesInheritance: true, ngImport: i0, template: "<aup-table-body [tableModel]=\"treeTableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n></aup-table-body>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host::ng-deep td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}:host::ng-deep td.mat-column-tree-label,:host::ng-deep td.mat-column-tree-label{width:1px}:host::ng-deep aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}:host::ng-deep aup-tree-label-cell-renderer{flex:1}aup-table-body{flex:1}\n"], components: [{ type: TableBodyComponent, selector: "aup-table-body", inputs: ["tableModel", "showHeader$", "showHeader", "enableScrolling"], outputs: ["visibleRowCount"] }] });
4684
+ ], usesInheritance: true, ngImport: i0, template: "<aup-table-body [tableModel]=\"treeTableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n [aupHighlightTextModel]=\"treeTableModel.filterModel.highlightText$\"\n></aup-table-body>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host::ng-deep td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}:host::ng-deep td.mat-column-tree-label,:host::ng-deep td.mat-column-tree-label{width:1px}:host::ng-deep aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}:host::ng-deep aup-tree-label-cell-renderer{flex:1}aup-table-body{flex:1}\n"], components: [{ type: TableBodyComponent, selector: "aup-table-body", inputs: ["tableModel", "showHeader$", "showHeader", "enableScrolling"], outputs: ["visibleRowCount"] }], directives: [{ type: HighlightTextModelDirective, selector: "[aupHighlightTextModel]", inputs: ["aupHighlightTextModel"] }] });
4733
4685
  __decorate([
4734
4686
  TrackExternal(),
4735
4687
  __metadata("design:type", TreeTableModel)
@@ -4738,7 +4690,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImpor
4738
4690
  type: Component,
4739
4691
  args: [{ selector: 'aup-tree-table', providers: [
4740
4692
  { provide: AbstractTableComponent, useExisting: TreeTableComponent }
4741
- ], template: "<aup-table-body [tableModel]=\"treeTableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n></aup-table-body>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host::ng-deep td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}:host::ng-deep td.mat-column-tree-label,:host::ng-deep td.mat-column-tree-label{width:1px}:host::ng-deep aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}:host::ng-deep aup-tree-label-cell-renderer{flex:1}aup-table-body{flex:1}\n"] }]
4693
+ ], template: "<aup-table-body [tableModel]=\"treeTableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n [aupHighlightTextModel]=\"treeTableModel.filterModel.highlightText$\"\n></aup-table-body>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host::ng-deep td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}:host::ng-deep td.mat-column-tree-label,:host::ng-deep td.mat-column-tree-label{width:1px}:host::ng-deep aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}:host::ng-deep aup-tree-label-cell-renderer{flex:1}aup-table-body{flex:1}\n"] }]
4742
4694
  }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { treeTableModel: [{
4743
4695
  type: Input
4744
4696
  }] } });
@@ -8433,27 +8385,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImpor
8433
8385
  }]
8434
8386
  }] });
8435
8387
 
8436
- // TODO: This is all kinda ugly and limited, would probably be better to make it an interface
8437
- // that has a single model with a row matching interface.
8438
- // rowPredicate$: ValueModel<row => matches(row, visibleColumns)>
8439
- // that way you can implement it how every you want.... But for now this was quicker.
8440
- class FilterStrategy extends GarbageCollector {
8441
- constructor(rowPredicate$, searchText$) {
8388
+ class TableFilterModel extends AbstractTableFilterModel {
8389
+ constructor(builder) {
8442
8390
  super();
8443
- this.rowPredicate$ = rowPredicate$;
8444
- this.searchText$ = searchText$;
8391
+ this._rowPredicate$ = this.registerDisposable(new DelegatingValueModel());
8392
+ this._searchText$ = this.registerDisposable(new DelegatingValueModel());
8393
+ this.inUpdate = new Guard();
8394
+ const { chain } = Dsl.disposeWith(this);
8395
+ if (builder) {
8396
+ this.registerModels(builder);
8397
+ }
8398
+ const textSearchRegex$ = chain(this._searchText$).map(text => {
8399
+ return isEmpty$1(text) ? undefined : new RegExp(escapeStringRegexp(text), "i");
8400
+ }, { allowNil: true });
8401
+ this._rowFilter$ = chain(this._rowPredicate$)
8402
+ .map(predicate => {
8403
+ const regex = textSearchRegex$.value;
8404
+ return {
8405
+ matches(row, columns) {
8406
+ return (!predicate || predicate(row)) && (!regex || !!columns.find(c => regex.test(c.getSearchTextFor(row))));
8407
+ }
8408
+ };
8409
+ }, {
8410
+ allowNil: true,
8411
+ dependsOn: textSearchRegex$,
8412
+ postponeWhile: this.inUpdate
8413
+ });
8445
8414
  }
8446
- static create(build) {
8447
- var _a, _b;
8448
- const builder = new FilterStrategy.BuilderImp();
8449
- build(builder);
8450
- return new FilterStrategy((_a = builder.rowPredicate) !== null && _a !== void 0 ? _a : ValueModel.constant(() => true), (_b = builder.searchText$) !== null && _b !== void 0 ? _b : ValueModel.constant(""));
8415
+ get rowFilter$() {
8416
+ return this._rowFilter$.readonly;
8417
+ }
8418
+ get highlightText$() {
8419
+ return this._searchText$.readonly;
8420
+ }
8421
+ registerModels(builder) {
8422
+ // TODO: calling this twice without disposing woudl result in confusion... I should probably
8423
+ // change how this works...
8424
+ const self = this;
8425
+ this.inUpdate.whileTrue(() => {
8426
+ builder({
8427
+ usePredicate(predicate$) {
8428
+ self._rowPredicate$.setDelegate(predicate$);
8429
+ return this;
8430
+ },
8431
+ useSearchText(searchText$) {
8432
+ self._searchText$.setDelegate(searchText$);
8433
+ return this;
8434
+ }
8435
+ });
8436
+ });
8437
+ return {
8438
+ dispose: () => self.clear()
8439
+ };
8440
+ }
8441
+ clear() {
8442
+ this.inUpdate.whileTrue(() => {
8443
+ this._rowPredicate$.setDelegate(undefined);
8444
+ this._searchText$.setDelegate(undefined);
8445
+ });
8451
8446
  }
8452
8447
  }
8453
- (function (FilterStrategy) {
8448
+ (function (TableFilterModel) {
8454
8449
  class BuilderImp {
8455
8450
  usePredicate(predicate$) {
8456
- this.rowPredicate = predicate$;
8451
+ this.rowPredicate$ = predicate$;
8457
8452
  return this;
8458
8453
  }
8459
8454
  useSearchText(searchText$) {
@@ -8461,8 +8456,8 @@ class FilterStrategy extends GarbageCollector {
8461
8456
  return this;
8462
8457
  }
8463
8458
  }
8464
- FilterStrategy.BuilderImp = BuilderImp;
8465
- })(FilterStrategy || (FilterStrategy = {}));
8459
+ TableFilterModel.BuilderImp = BuilderImp;
8460
+ })(TableFilterModel || (TableFilterModel = {}));
8466
8461
 
8467
8462
  /**
8468
8463
  * @file Automatically generated by barrelsby.
@@ -10422,5 +10417,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImpor
10422
10417
  * Generated bundle index. Do not edit.
10423
10418
  */
10424
10419
 
10425
- export { ACTIVITY_DATA, ALERT_CONFIG, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CardStackComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnListModel, ColumnModel, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FilterStrategy, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableBodyComponent, TableCellComponent, TableComponent, TableHeaderCellComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, markdownPillExtension, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator };
10420
+ export { ACTIVITY_DATA, ALERT_CONFIG, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableFilterModel, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CardStackComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnListModel, ColumnModel, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableBodyComponent, TableCellComponent, TableComponent, TableFilterModel, TableHeaderCellComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, markdownPillExtension, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator };
10426
10421
  //# sourceMappingURL=coolon-angular-ui-powerups.mjs.map