@coolon/angular-ui-powerups 13.7.14 → 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.
- package/esm2020/lib/components/exports.mjs +3 -2
- package/esm2020/lib/components/tables/abstract-table-model.mjs +14 -67
- package/esm2020/lib/components/tables/abstract-table.component.mjs +5 -4
- package/esm2020/lib/components/tables/filter/abstract-table-filter-model.mjs +10 -0
- package/esm2020/lib/components/tables/filter/table-filter-model.mjs +78 -0
- package/esm2020/lib/components/tables/table/table.component.mjs +3 -3
- package/esm2020/lib/components/tables/tree-table/tree-table-component.mjs +3 -3
- package/fesm2015/coolon-angular-ui-powerups.mjs +100 -100
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +100 -99
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/exports.d.ts +2 -1
- package/lib/components/tables/abstract-table-model.d.ts +5 -7
- package/lib/components/tables/abstract-table.component.d.ts +1 -1
- package/lib/components/tables/filter/abstract-table-filter-model.d.ts +11 -0
- package/lib/components/tables/filter/table-filter-model.d.ts +25 -0
- package/package.json +1 -1
- package/esm2020/lib/components/tables/filter-strategy.mjs +0 -31
- package/lib/components/tables/filter-strategy.d.ts +0 -19
|
@@ -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 } from 'tslib';
|
|
44
44
|
import * as i1$2 from '@angular/platform-browser';
|
|
45
45
|
import escapeStringRegexp from 'escape-string-regexp';
|
|
@@ -50,7 +50,7 @@ import { Enum } from 'typescript-string-enums';
|
|
|
50
50
|
import { lang as lang$1, assert as assert$1, Stringy, Klass, Opts } from '@coolon/typescript-utilities';
|
|
51
51
|
import * as i3 from '@angular/material/core';
|
|
52
52
|
import produce from 'immer';
|
|
53
|
-
import { isFunction as isFunction$1,
|
|
53
|
+
import { isFunction as isFunction$1, isNil as isNil$1, isEmpty as isEmpty$1, findLast } from 'lodash-es';
|
|
54
54
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
55
55
|
import * as i6$1 from '@angular/cdk/a11y';
|
|
56
56
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
@@ -2759,8 +2759,9 @@ class AbstractTableComponent extends DisposableComponent {
|
|
|
2759
2759
|
}
|
|
2760
2760
|
ngOnInit() {
|
|
2761
2761
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
2762
|
-
this.getModel()
|
|
2763
|
-
|
|
2762
|
+
const model = this.getModel();
|
|
2763
|
+
model.initialise(this.injector);
|
|
2764
|
+
this.columnsById = chain(model.columns).indexBy('columnId');
|
|
2764
2765
|
}
|
|
2765
2766
|
getModel() {
|
|
2766
2767
|
return lang$1.abstractMethod(this.constructor);
|
|
@@ -3236,38 +3237,17 @@ class SelectionColumnModel extends ColumnModel {
|
|
|
3236
3237
|
}
|
|
3237
3238
|
}
|
|
3238
3239
|
|
|
3239
|
-
|
|
3240
|
-
// that has a single model with a row matching interface.
|
|
3241
|
-
// rowPredicate$: ValueModel<row => matches(row, visibleColumns)>
|
|
3242
|
-
// that way you can implement it how every you want.... But for now this was quicker.
|
|
3243
|
-
class FilterStrategy extends GarbageCollector {
|
|
3244
|
-
constructor(rowPredicate$, searchText$) {
|
|
3245
|
-
super();
|
|
3246
|
-
this.rowPredicate$ = rowPredicate$;
|
|
3247
|
-
this.searchText$ = searchText$;
|
|
3248
|
-
}
|
|
3249
|
-
static create(build) {
|
|
3250
|
-
const builder = new FilterStrategy.BuilderImp();
|
|
3251
|
-
build(builder);
|
|
3252
|
-
return new FilterStrategy(builder.rowPredicate ?? ValueModel.constant(() => true), builder.searchText$);
|
|
3253
|
-
}
|
|
3240
|
+
class AbstractTableFilterModel extends GarbageCollector {
|
|
3254
3241
|
}
|
|
3255
|
-
(
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
useSearchText(searchText$) {
|
|
3262
|
-
this.searchText$ = searchText$;
|
|
3263
|
-
return this;
|
|
3264
|
-
}
|
|
3265
|
-
}
|
|
3266
|
-
FilterStrategy.BuilderImp = BuilderImp;
|
|
3267
|
-
})(FilterStrategy || (FilterStrategy = {}));
|
|
3242
|
+
TrackExternal.useDelegate(AbstractTableFilterModel, options => {
|
|
3243
|
+
return DelegateProxyHandler.create("AbstractTableFilterModel", b => {
|
|
3244
|
+
b.forProperty("rowFilter$", () => new DelegatingValueModel());
|
|
3245
|
+
b.forProperty("highlightText$", () => new DelegatingValueModel());
|
|
3246
|
+
});
|
|
3247
|
+
});
|
|
3268
3248
|
|
|
3269
|
-
var DefaultValueFormatter = ColumnTextSearchFormatter.DefaultValueFormatter;
|
|
3270
3249
|
var DefaultArrayFormatter = ColumnTextSearchFormatter.DefaultArrayFormatter;
|
|
3250
|
+
var DefaultValueFormatter = ColumnTextSearchFormatter.DefaultValueFormatter;
|
|
3271
3251
|
// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
|
|
3272
3252
|
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
3273
3253
|
class RowClass {
|
|
@@ -3276,58 +3256,6 @@ class RowClass {
|
|
|
3276
3256
|
this.matches = matches;
|
|
3277
3257
|
}
|
|
3278
3258
|
}
|
|
3279
|
-
class FilterManager extends GarbageCollector {
|
|
3280
|
-
constructor(columns) {
|
|
3281
|
-
super();
|
|
3282
|
-
this.columns = columns;
|
|
3283
|
-
this._userRowPredicate$ = this.registerDisposable(new DelegatingValueModel().withDefault(() => true));
|
|
3284
|
-
this.searchText$ = this.registerDisposable(new DelegatingValueModel());
|
|
3285
|
-
this.updateInProgress = new Guard();
|
|
3286
|
-
const { chain } = Dsl.disposeWith(this);
|
|
3287
|
-
// TODO: should this logic be in the strategy itself? That way users could
|
|
3288
|
-
// customise...
|
|
3289
|
-
const textSearchPredicate$ = chain(this.searchText$).map(text => {
|
|
3290
|
-
if (isEmpty$1(text)) {
|
|
3291
|
-
return () => true;
|
|
3292
|
-
}
|
|
3293
|
-
else {
|
|
3294
|
-
const regex = new RegExp(escapeStringRegexp(text), "i");
|
|
3295
|
-
return (row) => this.hasMatchingColumn(row, regex);
|
|
3296
|
-
}
|
|
3297
|
-
}, {
|
|
3298
|
-
allowNil: true,
|
|
3299
|
-
dependsOn: this.columns
|
|
3300
|
-
});
|
|
3301
|
-
this.rowPredicate$ = chain(this._userRowPredicate$)
|
|
3302
|
-
.map(p => {
|
|
3303
|
-
return ((row) => p(row) && textSearchPredicate$.value(row));
|
|
3304
|
-
}, {
|
|
3305
|
-
dependsOn: textSearchPredicate$,
|
|
3306
|
-
postponeWhile: this.updateInProgress
|
|
3307
|
-
});
|
|
3308
|
-
}
|
|
3309
|
-
setStrategy(filterStrategy) {
|
|
3310
|
-
if (this.searchText$.hasUserDelegate()) {
|
|
3311
|
-
lang.illegalState("Filter strategy has already been set, it must be disposed first.");
|
|
3312
|
-
}
|
|
3313
|
-
this.updateInProgress.whileTrue(() => {
|
|
3314
|
-
this.searchText$.setDelegate(filterStrategy.searchText$);
|
|
3315
|
-
this._userRowPredicate$.setDelegate(filterStrategy.rowPredicate$);
|
|
3316
|
-
});
|
|
3317
|
-
const self = this;
|
|
3318
|
-
return {
|
|
3319
|
-
dispose() {
|
|
3320
|
-
self.updateInProgress.whileTrue(() => {
|
|
3321
|
-
this.searchText$.setDelegate(undefined);
|
|
3322
|
-
this._userRowPredicate$.setDelegate(undefined);
|
|
3323
|
-
});
|
|
3324
|
-
}
|
|
3325
|
-
};
|
|
3326
|
-
}
|
|
3327
|
-
hasMatchingColumn(row, regex) {
|
|
3328
|
-
return !!this.columns.value.find(c => regex.test(c.getSearchTextFor(row)));
|
|
3329
|
-
}
|
|
3330
|
-
}
|
|
3331
3259
|
class AbstractTableModel extends GarbageCollector {
|
|
3332
3260
|
constructor() {
|
|
3333
3261
|
super();
|
|
@@ -3347,12 +3275,12 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3347
3275
|
});
|
|
3348
3276
|
this._editorSessionByRowId = chain(this._editorSessions).indexBy("rowId");
|
|
3349
3277
|
this.editing$ = chain(this._editorSessions).count().isGreaterThan(0);
|
|
3350
|
-
this.filterManager = this.registerDisposable(new FilterManager(this._columnList));
|
|
3351
3278
|
this._filteredRows$ = chain(this._rawDataSource)
|
|
3352
3279
|
.reduceToList(items => {
|
|
3353
|
-
|
|
3280
|
+
const filter = this.filterModel.rowFilter$.value; // filter can be null
|
|
3281
|
+
return !filter ? items : items.filter(item => filter.matches(item, this.columns.value));
|
|
3354
3282
|
}, {
|
|
3355
|
-
dependsOn: this.
|
|
3283
|
+
dependsOn: [this.filterModel.rowFilter$, this.columns]
|
|
3356
3284
|
})
|
|
3357
3285
|
.replaceAll(this.rowsBeingEdited$);
|
|
3358
3286
|
this._visibleRows$.setDelegate(this._filteredRows$);
|
|
@@ -3378,12 +3306,6 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3378
3306
|
setDataSource(sourceOfTruth) {
|
|
3379
3307
|
this._rawDataSource.setDelegate(sourceOfTruth);
|
|
3380
3308
|
}
|
|
3381
|
-
registerFilterStrategy(builder) {
|
|
3382
|
-
return this.filterManager.setStrategy(FilterStrategy.create(builder));
|
|
3383
|
-
}
|
|
3384
|
-
get searchText$() {
|
|
3385
|
-
return this.filterManager.searchText$;
|
|
3386
|
-
}
|
|
3387
3309
|
identityOf(row) {
|
|
3388
3310
|
return this._rawDataSource.identityOf(row);
|
|
3389
3311
|
}
|
|
@@ -3521,6 +3443,11 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3521
3443
|
this.rowClickListeners.fire(l => l(row));
|
|
3522
3444
|
}
|
|
3523
3445
|
}
|
|
3446
|
+
__decorate([
|
|
3447
|
+
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??
|
|
3448
|
+
,
|
|
3449
|
+
__metadata("design:type", AbstractTableFilterModel)
|
|
3450
|
+
], AbstractTableModel.prototype, "filterModel", void 0);
|
|
3524
3451
|
TrackExternal.oneTimeBinding(AbstractTableModel);
|
|
3525
3452
|
|
|
3526
3453
|
class TableCellComponent extends DisposableComponent {
|
|
@@ -4114,7 +4041,7 @@ class TableComponent extends AbstractTableComponent {
|
|
|
4114
4041
|
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: TableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4115
4042
|
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: TableComponent, selector: "aup-table", inputs: { tableModel: "tableModel" }, providers: [
|
|
4116
4043
|
{ provide: AbstractTableComponent, useExisting: TableComponent }
|
|
4117
|
-
], usesInheritance: true, ngImport: i0, template: "<aup-table-body [tableModel]=\"tableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n (visibleRowCount)=\"updatePageSize($event)\"\n [aupHighlightTextModel]=\"tableModel.
|
|
4044
|
+
], 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"] }] });
|
|
4118
4045
|
__decorate([
|
|
4119
4046
|
TrackExternal(),
|
|
4120
4047
|
__metadata("design:type", TableModel)
|
|
@@ -4123,7 +4050,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImpor
|
|
|
4123
4050
|
type: Component,
|
|
4124
4051
|
args: [{ selector: 'aup-table', providers: [
|
|
4125
4052
|
{ provide: AbstractTableComponent, useExisting: TableComponent }
|
|
4126
|
-
], template: "<aup-table-body [tableModel]=\"tableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n (visibleRowCount)=\"updatePageSize($event)\"\n [aupHighlightTextModel]=\"tableModel.
|
|
4053
|
+
], 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"] }]
|
|
4127
4054
|
}], propDecorators: { tableModel: [{
|
|
4128
4055
|
type: Input
|
|
4129
4056
|
}] } });
|
|
@@ -4713,7 +4640,7 @@ class TreeTableComponent extends AbstractTableComponent {
|
|
|
4713
4640
|
TreeTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: TreeTableComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
4714
4641
|
TreeTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: TreeTableComponent, selector: "aup-tree-table", inputs: { treeTableModel: "treeTableModel" }, providers: [
|
|
4715
4642
|
{ provide: AbstractTableComponent, useExisting: TreeTableComponent }
|
|
4716
|
-
], usesInheritance: true, ngImport: i0, template: "<aup-table-body [tableModel]=\"treeTableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n [aupHighlightTextModel]=\"treeTableModel.
|
|
4643
|
+
], 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"] }] });
|
|
4717
4644
|
__decorate([
|
|
4718
4645
|
TrackExternal(),
|
|
4719
4646
|
__metadata("design:type", TreeTableModel)
|
|
@@ -4722,7 +4649,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImpor
|
|
|
4722
4649
|
type: Component,
|
|
4723
4650
|
args: [{ selector: 'aup-tree-table', providers: [
|
|
4724
4651
|
{ provide: AbstractTableComponent, useExisting: TreeTableComponent }
|
|
4725
|
-
], template: "<aup-table-body [tableModel]=\"treeTableModel\"\n [showHeader$]=\"showHeader$\"\n [enableScrolling]=\"enableScrolling\"\n [aupHighlightTextModel]=\"treeTableModel.
|
|
4652
|
+
], 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"] }]
|
|
4726
4653
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { treeTableModel: [{
|
|
4727
4654
|
type: Input
|
|
4728
4655
|
}] } });
|
|
@@ -8354,6 +8281,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImpor
|
|
|
8354
8281
|
}]
|
|
8355
8282
|
}] });
|
|
8356
8283
|
|
|
8284
|
+
class TableFilterModel extends AbstractTableFilterModel {
|
|
8285
|
+
constructor(builder) {
|
|
8286
|
+
super();
|
|
8287
|
+
this._rowPredicate$ = this.registerDisposable(new DelegatingValueModel());
|
|
8288
|
+
this._searchText$ = this.registerDisposable(new DelegatingValueModel());
|
|
8289
|
+
this.inUpdate = new Guard();
|
|
8290
|
+
const { chain } = Dsl.disposeWith(this);
|
|
8291
|
+
if (builder) {
|
|
8292
|
+
this.registerModels(builder);
|
|
8293
|
+
}
|
|
8294
|
+
const textSearchRegex$ = chain(this._searchText$).map(text => {
|
|
8295
|
+
return isEmpty$1(text) ? undefined : new RegExp(escapeStringRegexp(text), "i");
|
|
8296
|
+
}, { allowNil: true });
|
|
8297
|
+
this._rowFilter$ = chain(this._rowPredicate$)
|
|
8298
|
+
.map(predicate => {
|
|
8299
|
+
const regex = textSearchRegex$.value;
|
|
8300
|
+
return {
|
|
8301
|
+
matches(row, columns) {
|
|
8302
|
+
return (!predicate || predicate(row)) && (!regex || !!columns.find(c => regex.test(c.getSearchTextFor(row))));
|
|
8303
|
+
}
|
|
8304
|
+
};
|
|
8305
|
+
}, {
|
|
8306
|
+
allowNil: true,
|
|
8307
|
+
dependsOn: textSearchRegex$,
|
|
8308
|
+
postponeWhile: this.inUpdate
|
|
8309
|
+
});
|
|
8310
|
+
}
|
|
8311
|
+
get rowFilter$() {
|
|
8312
|
+
return this._rowFilter$.readonly;
|
|
8313
|
+
}
|
|
8314
|
+
get highlightText$() {
|
|
8315
|
+
return this._searchText$.readonly;
|
|
8316
|
+
}
|
|
8317
|
+
registerModels(builder) {
|
|
8318
|
+
// TODO: calling this twice without disposing woudl result in confusion... I should probably
|
|
8319
|
+
// change how this works...
|
|
8320
|
+
const self = this;
|
|
8321
|
+
this.inUpdate.whileTrue(() => {
|
|
8322
|
+
builder({
|
|
8323
|
+
usePredicate(predicate$) {
|
|
8324
|
+
self._rowPredicate$.setDelegate(predicate$);
|
|
8325
|
+
return this;
|
|
8326
|
+
},
|
|
8327
|
+
useSearchText(searchText$) {
|
|
8328
|
+
self._searchText$.setDelegate(searchText$);
|
|
8329
|
+
return this;
|
|
8330
|
+
}
|
|
8331
|
+
});
|
|
8332
|
+
});
|
|
8333
|
+
return {
|
|
8334
|
+
dispose: () => self.clear()
|
|
8335
|
+
};
|
|
8336
|
+
}
|
|
8337
|
+
clear() {
|
|
8338
|
+
this.inUpdate.whileTrue(() => {
|
|
8339
|
+
this._rowPredicate$.setDelegate(undefined);
|
|
8340
|
+
this._searchText$.setDelegate(undefined);
|
|
8341
|
+
});
|
|
8342
|
+
}
|
|
8343
|
+
}
|
|
8344
|
+
(function (TableFilterModel) {
|
|
8345
|
+
class BuilderImp {
|
|
8346
|
+
usePredicate(predicate$) {
|
|
8347
|
+
this.rowPredicate$ = predicate$;
|
|
8348
|
+
return this;
|
|
8349
|
+
}
|
|
8350
|
+
useSearchText(searchText$) {
|
|
8351
|
+
this.searchText$ = searchText$;
|
|
8352
|
+
return this;
|
|
8353
|
+
}
|
|
8354
|
+
}
|
|
8355
|
+
TableFilterModel.BuilderImp = BuilderImp;
|
|
8356
|
+
})(TableFilterModel || (TableFilterModel = {}));
|
|
8357
|
+
|
|
8357
8358
|
/**
|
|
8358
8359
|
* @file Automatically generated by barrelsby.
|
|
8359
8360
|
*/
|
|
@@ -10293,5 +10294,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImpor
|
|
|
10293
10294
|
* Generated bundle index. Do not edit.
|
|
10294
10295
|
*/
|
|
10295
10296
|
|
|
10296
|
-
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,
|
|
10297
|
+
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 };
|
|
10297
10298
|
//# sourceMappingURL=coolon-angular-ui-powerups.mjs.map
|