@coolon/angular-ui-powerups 13.1.7 → 13.2.1
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/assets/table.scss +2 -2
- package/esm2020/lib/components/components.module.mjs +22 -19
- package/esm2020/lib/components/exports.mjs +28 -21
- package/esm2020/lib/components/tables/abstract-table-model.mjs +70 -29
- package/esm2020/lib/components/tables/abstract-table.component.mjs +12 -10
- package/esm2020/lib/components/tables/column/column-list-model.mjs +39 -0
- package/esm2020/lib/components/tables/column/column-model.mjs +180 -0
- package/esm2020/lib/components/tables/column/column-template/column-template.directive.mjs +35 -0
- package/esm2020/lib/components/tables/column/column-text-properties.mjs +2 -0
- package/esm2020/lib/components/tables/column/custom-template-column-model.mjs +16 -0
- package/esm2020/lib/components/tables/column/custom-value-column-model.mjs +37 -0
- package/esm2020/lib/components/tables/column/editor-controls-column-model.mjs +21 -0
- package/esm2020/lib/components/tables/column/list-propery-column-model.mjs +48 -0
- package/esm2020/lib/components/tables/column/property-column-model.mjs +92 -0
- package/esm2020/lib/components/tables/column/selection-column-model.mjs +40 -0
- package/esm2020/lib/components/tables/editor/edit-row-controls/edit-row-controls.component.mjs +55 -0
- package/esm2020/lib/components/tables/editor/edit-session.mjs +23 -0
- package/esm2020/lib/components/tables/editor/editable-cell-renderer.mjs +2 -0
- package/esm2020/lib/components/tables/{table/paginator → paginator}/paginator.component.mjs +4 -4
- package/esm2020/lib/components/tables/renderer/cell-editors.mjs +2 -0
- package/esm2020/lib/components/tables/renderer/cell-portal-ref.mjs +93 -0
- package/esm2020/lib/components/tables/renderer/cell-renderer.mjs +2 -0
- package/esm2020/lib/components/tables/renderer/default-cell-renderer/default-cell-renderer.component.mjs +30 -0
- package/esm2020/lib/components/tables/{table → renderer}/default-header-cell-renderer/default-header-cell-renderer.component.mjs +1 -1
- package/esm2020/lib/components/tables/renderer/default-list-cell-renderer/default-list-cell-renderer.component.mjs +40 -0
- package/esm2020/lib/components/tables/renderer/select-header-cell/selection-header-cell.component.mjs +31 -0
- package/esm2020/lib/components/tables/renderer/selection-cell/selection-cell.component.mjs +26 -0
- package/esm2020/lib/components/tables/renderer/table-cell/table-cell.component.mjs +93 -0
- package/esm2020/lib/components/tables/renderer/table-header-cell/table-header-cell.component.mjs +32 -0
- package/esm2020/lib/components/tables/search/column-text-search-formatter.mjs +52 -0
- package/esm2020/lib/components/tables/search/enable-cell-text-search.decorator.mjs +30 -0
- package/esm2020/lib/components/tables/table/table-model.mjs +2 -10
- package/esm2020/lib/components/tables/table/table.component.mjs +12 -12
- package/esm2020/lib/components/tables/table-row-menu/table-row-menu.component.mjs +84 -0
- package/esm2020/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.mjs +1 -1
- package/esm2020/lib/components/tables/tree-table/tree-label-column-model.mjs +3 -3
- package/esm2020/lib/components/tables/tree-table/tree-table-component.mjs +10 -10
- package/esm2020/lib/components/tables/tree-table/tree-table-model.mjs +1 -1
- package/fesm2015/coolon-angular-ui-powerups.mjs +608 -446
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +740 -580
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/components.module.d.ts +55 -54
- package/lib/components/exports.d.ts +27 -20
- package/lib/components/tables/abstract-table-model.d.ts +24 -13
- package/lib/components/tables/abstract-table.component.d.ts +6 -5
- package/lib/components/tables/{column-list-model.d.ts → column/column-list-model.d.ts} +4 -4
- package/lib/components/tables/column/column-model.d.ts +77 -0
- package/lib/components/tables/column/custom-template-column-model.d.ts +8 -0
- package/lib/components/tables/column/custom-value-column-model.d.ts +10 -0
- package/lib/components/tables/column/editor-controls-column-model.d.ts +13 -0
- package/lib/components/tables/column/list-propery-column-model.d.ts +15 -0
- package/lib/components/tables/column/property-column-model.d.ts +24 -0
- package/lib/components/tables/column/selection-column-model.d.ts +12 -0
- package/lib/components/tables/{table → editor}/edit-row-controls/edit-row-controls.component.d.ts +1 -1
- package/lib/components/tables/{edit-session.d.ts → editor/edit-session.d.ts} +2 -2
- package/lib/components/tables/{table/mutable-cell-renderer.d.ts → editor/editable-cell-renderer.d.ts} +2 -2
- package/lib/components/tables/{table/paginator → paginator}/paginator.component.d.ts +1 -1
- package/lib/components/tables/{table → renderer}/cell-portal-ref.d.ts +18 -18
- package/lib/components/tables/renderer/cell-renderer.d.ts +3 -0
- package/lib/components/tables/{table → renderer}/default-cell-renderer/default-cell-renderer.component.d.ts +1 -1
- package/lib/components/tables/renderer/default-list-cell-renderer/default-list-cell-renderer.component.d.ts +12 -0
- package/lib/components/tables/{table/select-header-cell-renderer/select-header-cell-renderer.component.d.ts → renderer/select-header-cell/selection-header-cell.component.d.ts} +3 -3
- package/lib/components/tables/{table/select-cell-renderer/select-cell-renderer.component.d.ts → renderer/selection-cell/selection-cell.component.d.ts} +3 -3
- package/lib/components/tables/{table/table-cell-renderer/table-cell-renderer.component.d.ts → renderer/table-cell/table-cell.component.d.ts} +5 -5
- package/lib/components/tables/{table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts → renderer/table-header-cell/table-header-cell.component.d.ts} +4 -4
- package/lib/components/tables/search/column-text-search-formatter.d.ts +28 -0
- package/lib/components/tables/search/enable-cell-text-search.decorator.d.ts +25 -0
- package/lib/components/tables/table/table-model.d.ts +3 -9
- package/lib/components/tables/table/table.component.d.ts +4 -4
- package/lib/components/tables/{table/table-row-menu → table-row-menu}/table-row-menu.component.d.ts +3 -3
- package/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.d.ts +1 -1
- package/lib/components/tables/tree-table/tree-label-column-model.d.ts +1 -1
- package/lib/components/tables/tree-table/tree-table-component.d.ts +2 -2
- package/lib/components/tables/tree-table/tree-table-model.d.ts +1 -1
- package/package.json +2 -1
- package/esm2020/lib/components/tables/column-list-model.mjs +0 -39
- package/esm2020/lib/components/tables/edit-session.mjs +0 -23
- package/esm2020/lib/components/tables/table/cell-editors.mjs +0 -2
- package/esm2020/lib/components/tables/table/cell-portal-ref.mjs +0 -93
- package/esm2020/lib/components/tables/table/cell-renderer.mjs +0 -2
- package/esm2020/lib/components/tables/table/column-model.mjs +0 -392
- package/esm2020/lib/components/tables/table/column-template/column-template.directive.mjs +0 -35
- package/esm2020/lib/components/tables/table/column-text-properties.mjs +0 -2
- package/esm2020/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.mjs +0 -22
- package/esm2020/lib/components/tables/table/edit-row-controls/edit-row-controls.component.mjs +0 -55
- package/esm2020/lib/components/tables/table/mutable-cell-renderer.mjs +0 -2
- package/esm2020/lib/components/tables/table/select-cell-renderer/select-cell-renderer.component.mjs +0 -26
- package/esm2020/lib/components/tables/table/select-header-cell-renderer/select-header-cell-renderer.component.mjs +0 -31
- package/esm2020/lib/components/tables/table/table-cell-renderer/table-cell-renderer.component.mjs +0 -93
- package/esm2020/lib/components/tables/table/table-def.mjs +0 -2
- package/esm2020/lib/components/tables/table/table-header-cell-renderer/table-header-cell-renderer.component.mjs +0 -32
- package/esm2020/lib/components/tables/table/table-row-menu/table-row-menu.component.mjs +0 -84
- package/esm2020/lib/components/tables/table/text-search-predicate.mjs +0 -2
- package/lib/components/tables/table/cell-renderer.d.ts +0 -5
- package/lib/components/tables/table/column-model.d.ts +0 -145
- package/lib/components/tables/table/table-def.d.ts +0 -7
- package/lib/components/tables/table/text-search-predicate.d.ts +0 -1
- /package/lib/components/tables/{table → column}/column-template/column-template.directive.d.ts +0 -0
- /package/lib/components/tables/{table → column}/column-text-properties.d.ts +0 -0
- /package/lib/components/tables/{table → renderer}/cell-editors.d.ts +0 -0
- /package/lib/components/tables/{table → renderer}/default-header-cell-renderer/default-header-cell-renderer.component.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i4 from '@angular/common';
|
|
2
2
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { ElementRef, Directive, Inject, Host, Optional, Input, HostListener, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, ViewEncapsulation, HostBinding, InjectionToken, ViewChildren, EventEmitter, ViewChild, Output, SkipSelf, Self, ContentChildren, ComponentRef,
|
|
4
|
+
import { ElementRef, Directive, Inject, Host, Optional, Input, HostListener, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, ViewEncapsulation, HostBinding, InjectionToken, ViewChildren, EventEmitter, ViewChild, Output, SkipSelf, Self, ContentChildren, ComponentRef, Injector, PLATFORM_ID } from '@angular/core';
|
|
5
5
|
import * as i4$1 from '@angular/forms';
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
7
|
import * as i1$8 from '@angular/material/form-field';
|
|
@@ -40,17 +40,19 @@ import { MatTooltipModule } from '@angular/material/tooltip';
|
|
|
40
40
|
import * as i1$5 from '@fortawesome/angular-fontawesome';
|
|
41
41
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
42
42
|
import * as i1$7 from '@coolon/pectin';
|
|
43
|
-
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, DelegatingListModel, MutableValueModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel,
|
|
43
|
+
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, ComputedListModel, PageController, Trace, Deferred } from '@coolon/pectin';
|
|
44
44
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
45
45
|
import * as i1$2 from '@angular/platform-browser';
|
|
46
|
+
import * as _ from 'lodash';
|
|
46
47
|
import { isEmpty, isString, isFunction, isNil, isInteger, isEqual, first, uniq, findLast, isObject, isNumber, isNaN as isNaN$1 } from 'lodash';
|
|
47
48
|
import { marked } from 'marked';
|
|
48
49
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator';
|
|
49
50
|
import { Enum } from 'typescript-string-enums';
|
|
50
|
-
import { lang as lang$1, assert as assert$1, Stringy,
|
|
51
|
+
import { lang as lang$1, assert as assert$1, Stringy, Klass, Opts } from '@coolon/typescript-utilities';
|
|
51
52
|
import * as i3 from '@angular/material/core';
|
|
52
53
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
53
54
|
import produce from 'immer';
|
|
55
|
+
import escapeStringRegexp from 'escape-string-regexp';
|
|
54
56
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
55
57
|
import * as i6$1 from '@angular/cdk/a11y';
|
|
56
58
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
@@ -2510,25 +2512,6 @@ class TemplateCellRendererPortalRef extends CellRendererPortalRef {
|
|
|
2510
2512
|
}
|
|
2511
2513
|
}
|
|
2512
2514
|
|
|
2513
|
-
class DefaultCellRendererComponent {
|
|
2514
|
-
constructor() {
|
|
2515
|
-
}
|
|
2516
|
-
set value(value) {
|
|
2517
|
-
this._value = value;
|
|
2518
|
-
}
|
|
2519
|
-
get value() {
|
|
2520
|
-
return this._value;
|
|
2521
|
-
}
|
|
2522
|
-
}
|
|
2523
|
-
DefaultCellRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2524
|
-
DefaultCellRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: DefaultCellRendererComponent, selector: "aup-default-cell-renderer", inputs: { value: "value" }, ngImport: i0, template: "<span [innerHTML]=\"value| aupHighlight\"></span>\n", styles: [""], pipes: { "aupHighlight": HighlightPipe } });
|
|
2525
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultCellRendererComponent, decorators: [{
|
|
2526
|
-
type: Component,
|
|
2527
|
-
args: [{ selector: 'aup-default-cell-renderer', template: "<span [innerHTML]=\"value| aupHighlight\"></span>\n", styles: [""] }]
|
|
2528
|
-
}], ctorParameters: function () { return []; }, propDecorators: { value: [{
|
|
2529
|
-
type: Input
|
|
2530
|
-
}] } });
|
|
2531
|
-
|
|
2532
2515
|
class DefaultHeaderCellRendererComponent {
|
|
2533
2516
|
constructor() {
|
|
2534
2517
|
}
|
|
@@ -2542,120 +2525,81 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
2542
2525
|
type: Input
|
|
2543
2526
|
}] } });
|
|
2544
2527
|
|
|
2545
|
-
class
|
|
2546
|
-
constructor(rowId, row, form, saveCommand) {
|
|
2547
|
-
super();
|
|
2548
|
-
this.rowId = rowId;
|
|
2549
|
-
this.form = form;
|
|
2550
|
-
this.saveCommand = saveCommand;
|
|
2551
|
-
this._liveRowValue = new MutableValueModel();
|
|
2552
|
-
this.liveRowValue = this._liveRowValue.readonly;
|
|
2553
|
-
this.form.load(row);
|
|
2554
|
-
this._liveRowValue.value = row;
|
|
2555
|
-
this.form.onEdit(() => {
|
|
2556
|
-
// if (!this._liveRowValue.value[immerable]) {
|
|
2557
|
-
// console.warn()
|
|
2558
|
-
// }
|
|
2559
|
-
this._liveRowValue.value = produce(this._liveRowValue.value, draft => {
|
|
2560
|
-
this.form.writeDirtyStateTo(draft);
|
|
2561
|
-
});
|
|
2562
|
-
});
|
|
2563
|
-
}
|
|
2528
|
+
class ColumnTextSearchFormatter {
|
|
2564
2529
|
}
|
|
2565
|
-
|
|
2566
|
-
class
|
|
2567
|
-
constructor() {
|
|
2568
|
-
super();
|
|
2569
|
-
this.saveCommand = Command.create(async () => {
|
|
2570
|
-
const finished = await this.editSession.saveCommand.execute();
|
|
2571
|
-
if (finished) {
|
|
2572
|
-
this.editSession.dispose();
|
|
2573
|
-
}
|
|
2574
|
-
});
|
|
2575
|
-
this.cancelCommand = Command.create(() => {
|
|
2576
|
-
this.editSession.dispose();
|
|
2577
|
-
}).disableWhile(this.saveCommand.busy);
|
|
2530
|
+
(function (ColumnTextSearchFormatter) {
|
|
2531
|
+
class Delegate extends ColumnTextSearchFormatter {
|
|
2578
2532
|
}
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2533
|
+
ColumnTextSearchFormatter.Delegate = Delegate;
|
|
2534
|
+
class Delegating extends ColumnTextSearchFormatter.Delegate {
|
|
2535
|
+
constructor(delegateClass) {
|
|
2536
|
+
super();
|
|
2537
|
+
this.delegateClass = delegateClass;
|
|
2538
|
+
}
|
|
2539
|
+
initialise(injector) {
|
|
2540
|
+
this._delegate = injector.get(this.delegateClass);
|
|
2541
|
+
if (this._delegate instanceof Delegating) {
|
|
2542
|
+
this._delegate.initialise(injector);
|
|
2543
|
+
}
|
|
2544
|
+
}
|
|
2545
|
+
format(row) {
|
|
2546
|
+
return this._delegate ? this._delegate.format(row) : "";
|
|
2582
2547
|
}
|
|
2583
|
-
this._session = session;
|
|
2584
|
-
}
|
|
2585
|
-
get editSession() {
|
|
2586
|
-
return this._session;
|
|
2587
2548
|
}
|
|
2588
|
-
|
|
2549
|
+
ColumnTextSearchFormatter.Delegating = Delegating;
|
|
2550
|
+
function forFormatter(formatter) {
|
|
2551
|
+
return new class extends ColumnTextSearchFormatter {
|
|
2552
|
+
format(value) {
|
|
2553
|
+
return formatter(value);
|
|
2554
|
+
}
|
|
2555
|
+
};
|
|
2589
2556
|
}
|
|
2590
|
-
|
|
2591
|
-
|
|
2557
|
+
ColumnTextSearchFormatter.forFormatter = forFormatter;
|
|
2558
|
+
class Null extends ColumnTextSearchFormatter {
|
|
2559
|
+
format(value) {
|
|
2560
|
+
return "";
|
|
2561
|
+
}
|
|
2592
2562
|
}
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: EditRowControls, decorators: [{
|
|
2601
|
-
type: Component,
|
|
2602
|
-
args: [{ selector: 'aup-row-editor-controls', template: "<button *ngIf=\"!editSession\" mat-icon-button [pectinCommand]=\"editRowCommand\" class=\"edit-button\"><aup-icon icon=\"mat:edit\"></aup-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"saveCommand\"><aup-icon icon=\"mat:done\"></aup-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"cancelCommand\"><aup-icon icon=\"mat:clear\"></aup-icon></button>\n", styles: [":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}\n"] }]
|
|
2603
|
-
}], ctorParameters: function () { return []; }, propDecorators: { row: [{
|
|
2604
|
-
type: Input
|
|
2605
|
-
}], editRowCommand: [{
|
|
2606
|
-
type: Input
|
|
2607
|
-
}], editSession: [{
|
|
2608
|
-
type: Input
|
|
2609
|
-
}] } });
|
|
2610
|
-
|
|
2611
|
-
class SelectCellRendererComponent extends DisposableComponent {
|
|
2612
|
-
constructor() {
|
|
2613
|
-
super();
|
|
2614
|
-
this.selectCommand = Command.create(() => {
|
|
2615
|
-
this.selectionModel?.selectCommand.execute(this.row);
|
|
2616
|
-
});
|
|
2563
|
+
ColumnTextSearchFormatter.Null = Null;
|
|
2564
|
+
class DefaultValueFormatter extends ColumnTextSearchFormatter {
|
|
2565
|
+
format(value) {
|
|
2566
|
+
let s = value?.toString() ?? "";
|
|
2567
|
+
console.log("DefaultValueFormatter", { value, text: s });
|
|
2568
|
+
return s;
|
|
2569
|
+
}
|
|
2617
2570
|
}
|
|
2618
|
-
|
|
2619
|
-
|
|
2571
|
+
ColumnTextSearchFormatter.DefaultValueFormatter = DefaultValueFormatter;
|
|
2572
|
+
class DefaultArrayFormatter extends ColumnTextSearchFormatter {
|
|
2573
|
+
format(value) {
|
|
2574
|
+
return value ? value.map(it => it?.toString()).join(",") : "";
|
|
2575
|
+
}
|
|
2620
2576
|
}
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
SelectCellRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: SelectCellRendererComponent, selector: "aup-select-cell-renderer", inputs: { row: "row" }, usesInheritance: true, ngImport: i0, template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\"></mat-checkbox>\n", styles: [""], components: [{ type: i1$9.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }] });
|
|
2624
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectCellRendererComponent, decorators: [{
|
|
2625
|
-
type: Component,
|
|
2626
|
-
args: [{ selector: 'aup-select-cell-renderer', template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\"></mat-checkbox>\n", styles: [""] }]
|
|
2627
|
-
}], ctorParameters: function () { return []; }, propDecorators: { row: [{
|
|
2628
|
-
type: Input
|
|
2629
|
-
}] } });
|
|
2577
|
+
ColumnTextSearchFormatter.DefaultArrayFormatter = DefaultArrayFormatter;
|
|
2578
|
+
})(ColumnTextSearchFormatter || (ColumnTextSearchFormatter = {}));
|
|
2630
2579
|
|
|
2631
|
-
|
|
2580
|
+
const noop = () => {
|
|
2581
|
+
};
|
|
2582
|
+
class ColumnTextSearchWrapper extends ColumnTextSearchFormatter.Delegate {
|
|
2632
2583
|
constructor() {
|
|
2633
|
-
super();
|
|
2634
|
-
this.
|
|
2635
|
-
this.selectionModel.toggleAllCommand.execute();
|
|
2636
|
-
});
|
|
2584
|
+
super(...arguments);
|
|
2585
|
+
this._map = Functions.identity;
|
|
2637
2586
|
}
|
|
2638
|
-
|
|
2639
|
-
|
|
2587
|
+
initialise(injector) {
|
|
2588
|
+
if (this._delegate instanceof ColumnTextSearchFormatter.Delegate) {
|
|
2589
|
+
this._delegate.initialise(injector);
|
|
2590
|
+
}
|
|
2640
2591
|
}
|
|
2641
|
-
|
|
2642
|
-
|
|
2592
|
+
format(row) {
|
|
2593
|
+
let value = this._map(row);
|
|
2594
|
+
let result = this._delegate ? this._delegate.format(value) : "";
|
|
2595
|
+
console.log({ format: row, value, text: result });
|
|
2596
|
+
return result;
|
|
2643
2597
|
}
|
|
2644
|
-
|
|
2645
|
-
|
|
2598
|
+
setDelegate(formatter, mapper) {
|
|
2599
|
+
this._delegate = formatter;
|
|
2600
|
+
this._map = mapper ?? Functions.identity;
|
|
2646
2601
|
}
|
|
2647
2602
|
}
|
|
2648
|
-
SelectHeaderCellRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectHeaderCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2649
|
-
SelectHeaderCellRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: SelectHeaderCellRendererComponent, selector: "aup-select-header-cell-renderer", usesInheritance: true, ngImport: i0, template: "<mat-checkbox *ngIf=\"isVisible()\" [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\"></mat-checkbox>\n", styles: [""], components: [{ type: i1$9.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }] });
|
|
2650
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectHeaderCellRendererComponent, decorators: [{
|
|
2651
|
-
type: Component,
|
|
2652
|
-
args: [{ selector: 'aup-select-header-cell-renderer', template: "<mat-checkbox *ngIf=\"isVisible()\" [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\"></mat-checkbox>\n", styles: [""] }]
|
|
2653
|
-
}], ctorParameters: function () { return []; } });
|
|
2654
|
-
|
|
2655
|
-
const noop = () => {
|
|
2656
|
-
};
|
|
2657
|
-
const CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol('aup-cell-renderer:row-data-cache');
|
|
2658
|
-
const DEFAULT_TEXT_SEARCH_PREDICATE = (row, text) => false;
|
|
2659
2603
|
class ColumnModel extends GarbageCollector {
|
|
2660
2604
|
constructor(columnId, textPropertiesProvider) {
|
|
2661
2605
|
super();
|
|
@@ -2663,10 +2607,9 @@ class ColumnModel extends GarbageCollector {
|
|
|
2663
2607
|
this.textPropertiesProvider = textPropertiesProvider;
|
|
2664
2608
|
this._enableRowSelection = true;
|
|
2665
2609
|
this._flex = false;
|
|
2666
|
-
this._defaultVisibility = this.registerDisposable(new DelegatingValueModel().withDefault(true));
|
|
2667
|
-
this._visible = this.registerDisposable(new DelegatingValueModel().withDefault(this._defaultVisibility));
|
|
2668
|
-
this.
|
|
2669
|
-
this._cellRendererTextSearchPredicate = undefined;
|
|
2610
|
+
this._defaultVisibility$ = this.registerDisposable(new DelegatingValueModel().withDefault(true));
|
|
2611
|
+
this._visible$ = this.registerDisposable(new DelegatingValueModel().withDefault(this._defaultVisibility$));
|
|
2612
|
+
this.textSearchDelegate = new ColumnTextSearchWrapper();
|
|
2670
2613
|
this.installHeaderRenderer();
|
|
2671
2614
|
this.dasherisedColumnId = Stringy.from(columnId).dasherize().toString();
|
|
2672
2615
|
}
|
|
@@ -2679,32 +2622,21 @@ class ColumnModel extends GarbageCollector {
|
|
|
2679
2622
|
return this.getColumnTextProperties()?.headerText() || this.getDefaultHeaderText();
|
|
2680
2623
|
}
|
|
2681
2624
|
isVisible() {
|
|
2682
|
-
return this.visible
|
|
2625
|
+
return this.visible$.value;
|
|
2683
2626
|
}
|
|
2684
|
-
get visible() {
|
|
2685
|
-
return this._visible
|
|
2627
|
+
get visible$() {
|
|
2628
|
+
return this._visible$.readonly;
|
|
2686
2629
|
}
|
|
2687
2630
|
visibleWhile(visible) {
|
|
2688
|
-
this._visible
|
|
2631
|
+
this._visible$.setDelegate(visible);
|
|
2689
2632
|
return this;
|
|
2690
2633
|
}
|
|
2691
2634
|
setDefaultVisibility(visible) {
|
|
2692
|
-
this._defaultVisibility
|
|
2635
|
+
this._defaultVisibility$.setDelegate(visible);
|
|
2693
2636
|
}
|
|
2694
2637
|
getDefaultHeaderText() {
|
|
2695
2638
|
return this.columnId;
|
|
2696
2639
|
}
|
|
2697
|
-
get isTextMatch() {
|
|
2698
|
-
return this._columnModelTextSearchPredicate || this._cellRendererTextSearchPredicate || DEFAULT_TEXT_SEARCH_PREDICATE;
|
|
2699
|
-
}
|
|
2700
|
-
/**
|
|
2701
|
-
* Sets the predicate to use when checking if the specified row is a text match for this column.
|
|
2702
|
-
* @param predicate
|
|
2703
|
-
*/
|
|
2704
|
-
useTextSearchPredicate(predicate) {
|
|
2705
|
-
this._columnModelTextSearchPredicate = predicate;
|
|
2706
|
-
return this;
|
|
2707
|
-
}
|
|
2708
2640
|
getColumnTextProperties() {
|
|
2709
2641
|
return this._columnTextProperties || this.textPropertiesProvider();
|
|
2710
2642
|
}
|
|
@@ -2719,6 +2651,14 @@ class ColumnModel extends GarbageCollector {
|
|
|
2719
2651
|
this._columnTextProperties = columnTextProperties;
|
|
2720
2652
|
return this;
|
|
2721
2653
|
}
|
|
2654
|
+
getSearchTextFor(row) {
|
|
2655
|
+
return this.textSearchDelegate.format(row);
|
|
2656
|
+
}
|
|
2657
|
+
configureColumnTextSearch(formatter, mapper) {
|
|
2658
|
+
assert$1.notNil(formatter);
|
|
2659
|
+
console.log({ col: this.columnId, formatter });
|
|
2660
|
+
this.textSearchDelegate.setDelegate(formatter, mapper);
|
|
2661
|
+
}
|
|
2722
2662
|
configureHeaderRenderer(config) {
|
|
2723
2663
|
this._columnHeaderPortalRef = config;
|
|
2724
2664
|
}
|
|
@@ -2757,12 +2697,6 @@ class ColumnModel extends GarbageCollector {
|
|
|
2757
2697
|
onRendererAttached(host, ref) {
|
|
2758
2698
|
const component = this.getComponentOrEmbeddedView(ref);
|
|
2759
2699
|
this._cellRendererPortalRef.onPortalAttached(host, component);
|
|
2760
|
-
if (isFunction(component?.matches)) {
|
|
2761
|
-
this._cellRendererTextSearchPredicate = (row, text) => component.matches(row, text);
|
|
2762
|
-
}
|
|
2763
|
-
else {
|
|
2764
|
-
this._cellRendererTextSearchPredicate = undefined;
|
|
2765
|
-
}
|
|
2766
2700
|
}
|
|
2767
2701
|
// @Trace()
|
|
2768
2702
|
onEditorAttached(host, ref) {
|
|
@@ -2795,6 +2729,9 @@ class ColumnModel extends GarbageCollector {
|
|
|
2795
2729
|
return ref;
|
|
2796
2730
|
}
|
|
2797
2731
|
}
|
|
2732
|
+
initialise(injector) {
|
|
2733
|
+
this.textSearchDelegate.initialise(injector);
|
|
2734
|
+
}
|
|
2798
2735
|
}
|
|
2799
2736
|
__decorate([
|
|
2800
2737
|
Memoize(),
|
|
@@ -2808,143 +2745,453 @@ __decorate([
|
|
|
2808
2745
|
__metadata("design:paramtypes", []),
|
|
2809
2746
|
__metadata("design:returntype", Object)
|
|
2810
2747
|
], ColumnModel.prototype, "getColumnTextProperties", null);
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
}
|
|
2821
|
-
cellRenderer(componentType, onComponentInitOrOptions) {
|
|
2822
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
2823
|
-
if (firstTime) {
|
|
2824
|
-
if (isFunction(onComponentInitOrOptions)) {
|
|
2825
|
-
onComponentInitOrOptions(component);
|
|
2826
|
-
}
|
|
2827
|
-
else {
|
|
2828
|
-
if (isFunction(onComponentInitOrOptions?.onComponentInit)) {
|
|
2829
|
-
onComponentInitOrOptions.onComponentInit(component);
|
|
2830
|
-
}
|
|
2831
|
-
}
|
|
2832
|
-
}
|
|
2833
|
-
component.value = this._format(rowData.row[this.property]);
|
|
2834
|
-
}));
|
|
2835
|
-
return this;
|
|
2836
|
-
}
|
|
2837
|
-
liveEditCellRenderer(componentType, options) {
|
|
2838
|
-
return this.mutableCellRenderer(componentType, options);
|
|
2839
|
-
}
|
|
2840
|
-
/**
|
|
2841
|
-
* Deprecated. Use #liveEditCellRenderer instead.
|
|
2842
|
-
* @param componentType
|
|
2843
|
-
* @param options
|
|
2844
|
-
*/
|
|
2845
|
-
mutableCellRenderer(componentType, options) {
|
|
2846
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
2847
|
-
// keep a local copy most recent row value so it's available to teh
|
|
2848
|
-
// edit callback without having to add/remove subscribers all the time.
|
|
2849
|
-
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
2850
|
-
let disableEditCallback = false;
|
|
2851
|
-
if (firstTime) {
|
|
2852
|
-
if (isFunction(options?.onComponentInit)) {
|
|
2853
|
-
options.onComponentInit(component);
|
|
2854
|
-
}
|
|
2855
|
-
// install our edit callback
|
|
2856
|
-
component.onValueEdited((is, was) => {
|
|
2857
|
-
if (!disableEditCallback) {
|
|
2858
|
-
options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
|
|
2859
|
-
}
|
|
2860
|
-
});
|
|
2861
|
-
}
|
|
2862
|
-
// now push the value the component and disable the callback just incase the component misbehaves
|
|
2863
|
-
// and fires a value change during the operation.
|
|
2864
|
-
disableEditCallback = true;
|
|
2865
|
-
component.value = rowData.row[this.property];
|
|
2866
|
-
disableEditCallback = false;
|
|
2867
|
-
if (!isFunction(options) && isFunction(options?.onRowUpdate)) {
|
|
2868
|
-
options.onRowUpdate(component, rowData.row);
|
|
2869
|
-
}
|
|
2870
|
-
}));
|
|
2871
|
-
return this;
|
|
2872
|
-
}
|
|
2873
|
-
cellEditor(editor, validatorsOrInitialiser, onComponentInit) {
|
|
2874
|
-
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
2875
|
-
const initialiser = isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
2876
|
-
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
2877
|
-
const formValueModel = editSession.form.pluck(this.property);
|
|
2878
|
-
if (validators) {
|
|
2879
|
-
formValueModel.validateUsing(validators);
|
|
2880
|
-
}
|
|
2881
|
-
component.valueModel = formValueModel;
|
|
2882
|
-
if (initialiser) {
|
|
2883
|
-
initialiser(component);
|
|
2884
|
-
}
|
|
2885
|
-
}));
|
|
2886
|
-
return this;
|
|
2748
|
+
(function (ColumnModel) {
|
|
2749
|
+
ColumnModel.CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol('aup-cell-renderer:row-data-cache');
|
|
2750
|
+
})(ColumnModel || (ColumnModel = {}));
|
|
2751
|
+
|
|
2752
|
+
class CustomTemplateColumnModel extends ColumnModel {
|
|
2753
|
+
constructor(columnId, defaults) {
|
|
2754
|
+
super(columnId, defaults);
|
|
2755
|
+
this.config = new TemplateCellRendererPortalRef();
|
|
2756
|
+
this.configureCellRenderer(this.config);
|
|
2887
2757
|
}
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
this._format = formatter;
|
|
2891
|
-
return this;
|
|
2758
|
+
setTemplate(templateRef, viewContainer, fillCell, padChild) {
|
|
2759
|
+
this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);
|
|
2892
2760
|
}
|
|
2893
2761
|
selectRowOnClick(selectOnRowClick) {
|
|
2894
2762
|
return this._selectRowOnClick(selectOnRowClick);
|
|
2895
2763
|
}
|
|
2896
2764
|
}
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2765
|
+
|
|
2766
|
+
/**
|
|
2767
|
+
* Create your model:
|
|
2768
|
+
* @example
|
|
2769
|
+
* this.heroTableModel = new TableModel(heroList, table => {
|
|
2770
|
+
* table.pluck("firstName");
|
|
2771
|
+
* table.pluck("lastName");
|
|
2772
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2773
|
+
* });
|
|
2774
|
+
*
|
|
2775
|
+
* Create your table
|
|
2776
|
+
* @example
|
|
2777
|
+
* <aup-table [tableModel]="heroTableModel"></aup-table>
|
|
2778
|
+
*
|
|
2779
|
+
* Column templates
|
|
2780
|
+
* @example
|
|
2781
|
+
* this.heroTableModel = new TableModel(heroList, table => {
|
|
2782
|
+
* table.pluck("firstName");
|
|
2783
|
+
* table.pluck("lastName");
|
|
2784
|
+
* table.addTemplateColumn("specialColumn");
|
|
2785
|
+
* });
|
|
2786
|
+
* <aup-table [tableModel]="heroTableModel">
|
|
2787
|
+
* <div *aupColumnTemplate="let hero; columnId: 'specialColumn'; fillCell: true; padChild:false">
|
|
2788
|
+
* {{hero.name}}
|
|
2789
|
+
* </div>
|
|
2790
|
+
* </aup-table>
|
|
2791
|
+
*
|
|
2792
|
+
* Styling
|
|
2793
|
+
* @example
|
|
2794
|
+
* // global settings
|
|
2795
|
+
* :root {
|
|
2796
|
+
* --aup-table-column-gap: 10px; // defaults to 24px
|
|
2797
|
+
* --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
2798
|
+
* --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
2799
|
+
* --aup-table-first-column-padding-left: 18px // defaults to --column-gap
|
|
2800
|
+
* --aup-table-last-column-padding-right: 18px // defaults to --column-gap
|
|
2801
|
+
* }
|
|
2802
|
+
*
|
|
2803
|
+
* // per table settings.
|
|
2804
|
+
* aup-table {
|
|
2805
|
+
* --column-gap: 10px; // defaults to 24px
|
|
2806
|
+
* --row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
2807
|
+
* --row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
2808
|
+
* --first-column-padding-left: 18px // defaults to --column-gap
|
|
2809
|
+
* --last-column-padding-right: 18px // defaults to --column-gap
|
|
2810
|
+
*
|
|
2811
|
+
* aup-table-header-cell-renderer,
|
|
2812
|
+
* aup-table-cell-renderer {
|
|
2813
|
+
* &.aup-col-my-dasherised-column-id {
|
|
2814
|
+
* // do stuff
|
|
2815
|
+
* }
|
|
2816
|
+
* &.first-visible-column {
|
|
2817
|
+
* // do stuff
|
|
2818
|
+
* }
|
|
2819
|
+
* &.last-visible-column {
|
|
2820
|
+
* // do stuff
|
|
2821
|
+
* }
|
|
2822
|
+
* }
|
|
2823
|
+
* }
|
|
2824
|
+
*/
|
|
2825
|
+
class AbstractTableComponent extends ResizeAwareComponent {
|
|
2826
|
+
constructor(elementRef, ngZone, injector) {
|
|
2827
|
+
super(elementRef, ngZone);
|
|
2828
|
+
this.injector = injector;
|
|
2829
|
+
/**
|
|
2830
|
+
* Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
|
|
2831
|
+
* need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
|
|
2832
|
+
* containment area.
|
|
2833
|
+
*/
|
|
2834
|
+
this.enableScrolling = false;
|
|
2835
|
+
// TODO: support user defined header and row heights via css vars.
|
|
2836
|
+
this.headerHeight = new MutableValueModel(56);
|
|
2837
|
+
this.rowHeight = new MutableValueModel(48);
|
|
2838
|
+
this.baseCssClass = 'aup-table-component';
|
|
2839
|
+
const { chain, when } = Dsl.disposeWith(this);
|
|
2840
|
+
const actualHeaderHeight = chain(this.showHeaderModel).map(show => {
|
|
2841
|
+
return show ? this.headerHeight.value : 0;
|
|
2842
|
+
}, { dependsOn: this.headerHeight });
|
|
2843
|
+
this.visibleRowCount = chain(this.boundsModel).map(bounds => {
|
|
2844
|
+
// TODO: this doesn't take into account any css styling adjustments etc. Will investigate if it's an issue.
|
|
2845
|
+
const rawRowCount = (bounds.height - actualHeaderHeight.value) / this.rowHeight.value;
|
|
2846
|
+
return rawRowCount < 1 ? 0 : Math.floor(rawRowCount);
|
|
2847
|
+
}, {
|
|
2848
|
+
dependsOn: [actualHeaderHeight, this.rowHeight],
|
|
2849
|
+
postponeWhile: chain(this.boundsModel).pluckNumeric('height').isLessThan(1)
|
|
2850
|
+
});
|
|
2851
|
+
}
|
|
2852
|
+
get hideHeader() {
|
|
2853
|
+
return !this.showHeader;
|
|
2854
|
+
}
|
|
2855
|
+
getModel() {
|
|
2856
|
+
return lang$1.abstractMethod(this.constructor);
|
|
2857
|
+
}
|
|
2858
|
+
ngOnInit() {
|
|
2859
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
2860
|
+
this.getModel().initialise(this.injector);
|
|
2861
|
+
this.columns = chain(this.getModel().columns);
|
|
2862
|
+
this.columnIds = chain(this.columns).pluck('columnId');
|
|
2863
|
+
this.columnsById = chain(this.columns).indexBy('columnId');
|
|
2864
|
+
}
|
|
2865
|
+
isEditing(row) {
|
|
2866
|
+
return !!this.getModel().getEditSessionFor(row);
|
|
2867
|
+
}
|
|
2868
|
+
registerColumnTemplate(columnId, templateRef, viewContainer, fillCell, padChild) {
|
|
2869
|
+
const column = this.columnsById.get(columnId);
|
|
2870
|
+
if (column instanceof CustomTemplateColumnModel) {
|
|
2871
|
+
column.setTemplate(templateRef, viewContainer, fillCell, padChild);
|
|
2872
|
+
}
|
|
2873
|
+
}
|
|
2874
|
+
notifyCellClicked(columnModel, row) {
|
|
2875
|
+
this.getModel()._notifyCellClicked(columnModel, row);
|
|
2876
|
+
}
|
|
2877
|
+
// @Trace()
|
|
2878
|
+
isFirstVisibleColumn(columnId) {
|
|
2879
|
+
return this.getModel().firstVisibleColumn$.query().value?.columnId === columnId;
|
|
2880
|
+
}
|
|
2881
|
+
// @Trace()
|
|
2882
|
+
isLastVisibleColumn(columnId) {
|
|
2883
|
+
return this.getModel().lastVisibleColumn$.query().value?.columnId === columnId;
|
|
2884
|
+
}
|
|
2885
|
+
getColumnClasses(columnId) {
|
|
2886
|
+
const classes = [`aup-col-${this.columnsById.get(columnId).dasherisedColumnId}`];
|
|
2887
|
+
if (this.isFirstVisibleColumn(columnId)) {
|
|
2888
|
+
classes.push('first-visible-column');
|
|
2889
|
+
}
|
|
2890
|
+
if (this.isLastVisibleColumn(columnId)) {
|
|
2891
|
+
classes.push('last-visible-column');
|
|
2892
|
+
}
|
|
2893
|
+
return classes;
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2896
|
+
AbstractTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AbstractTableComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
2897
|
+
AbstractTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: AbstractTableComponent, selector: "aup-abstract-table", inputs: { showHeaderModel: "showHeaderModel", showHeader: "showHeader", enableScrolling: "enableScrolling" }, host: { properties: { "class.enable-scrolling": "this.enableScrolling", "class": "this.baseCssClass", "class.hide-header": "this.hideHeader" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
2898
|
+
__decorate([
|
|
2899
|
+
TrackExternal({ defaultValue: true }),
|
|
2900
|
+
__metadata("design:type", ValueModel)
|
|
2901
|
+
], AbstractTableComponent.prototype, "showHeaderModel", void 0);
|
|
2902
|
+
__decorate([
|
|
2903
|
+
StoreInValueModel('showHeaderModel'),
|
|
2904
|
+
__metadata("design:type", Boolean)
|
|
2905
|
+
], AbstractTableComponent.prototype, "showHeader", void 0);
|
|
2906
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AbstractTableComponent, decorators: [{
|
|
2907
|
+
type: Component,
|
|
2908
|
+
args: [{
|
|
2909
|
+
selector: 'aup-abstract-table',
|
|
2910
|
+
template: ''
|
|
2911
|
+
}]
|
|
2912
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Injector }]; }, propDecorators: { showHeaderModel: [{
|
|
2913
|
+
type: Input
|
|
2914
|
+
}], showHeader: [{
|
|
2915
|
+
type: Input
|
|
2916
|
+
}], enableScrolling: [{
|
|
2917
|
+
type: Input
|
|
2918
|
+
}, {
|
|
2919
|
+
type: HostBinding,
|
|
2920
|
+
args: ['class.enable-scrolling']
|
|
2921
|
+
}], baseCssClass: [{
|
|
2922
|
+
type: HostBinding,
|
|
2923
|
+
args: ['class']
|
|
2924
|
+
}], hideHeader: [{
|
|
2925
|
+
type: HostBinding,
|
|
2926
|
+
args: ['class.hide-header']
|
|
2927
|
+
}] } });
|
|
2928
|
+
|
|
2929
|
+
class ColumnTemplateDirective {
|
|
2930
|
+
constructor(host, templateRef, viewContainer) {
|
|
2931
|
+
this.host = host;
|
|
2932
|
+
this.templateRef = templateRef;
|
|
2933
|
+
this.viewContainer = viewContainer;
|
|
2934
|
+
this.aupColumnTemplateFillCell = false;
|
|
2935
|
+
this.aupColumnTemplateAutoPadChild = undefined;
|
|
2936
|
+
}
|
|
2937
|
+
ngOnInit() {
|
|
2938
|
+
assert.isTruthy(this.aupColumnTemplateColumnId);
|
|
2939
|
+
this.host.registerColumnTemplate(this.aupColumnTemplateColumnId, this.templateRef, this.viewContainer, this.aupColumnTemplateFillCell, this.aupColumnTemplateAutoPadChild ?? this.aupColumnTemplateFillCell);
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
ColumnTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ColumnTemplateDirective, deps: [{ token: AbstractTableComponent }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2943
|
+
ColumnTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: ColumnTemplateDirective, selector: "[aupColumnTemplate]", inputs: { aupColumnTemplate: "aupColumnTemplate", aupColumnTemplateColumnId: "aupColumnTemplateColumnId", aupColumnTemplateFillCell: "aupColumnTemplateFillCell", aupColumnTemplateAutoPadChild: "aupColumnTemplateAutoPadChild" }, ngImport: i0 });
|
|
2944
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ColumnTemplateDirective, decorators: [{
|
|
2945
|
+
type: Directive,
|
|
2946
|
+
args: [{
|
|
2947
|
+
selector: '[aupColumnTemplate]'
|
|
2948
|
+
}]
|
|
2949
|
+
}], ctorParameters: function () { return [{ type: AbstractTableComponent }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { aupColumnTemplate: [{
|
|
2950
|
+
type: Input
|
|
2951
|
+
}], aupColumnTemplateColumnId: [{
|
|
2952
|
+
type: Input
|
|
2953
|
+
}], aupColumnTemplateFillCell: [{
|
|
2954
|
+
type: Input
|
|
2955
|
+
}], aupColumnTemplateAutoPadChild: [{
|
|
2956
|
+
type: Input
|
|
2957
|
+
}] } });
|
|
2958
|
+
|
|
2959
|
+
const TEXT_SEARCH_FORMATTER_KEY = `aup:table:textSearchFormatter`;
|
|
2960
|
+
const Keys = Enum("useFunction", "useInstance", "useClass");
|
|
2961
|
+
function EnableCellTextSearch(options) {
|
|
2962
|
+
assert$1.notNil(options);
|
|
2963
|
+
return (constructor) => {
|
|
2964
|
+
const klass = Klass.get(constructor);
|
|
2965
|
+
assert$1.isFalsey(klass.hasOwnMetadata(TEXT_SEARCH_FORMATTER_KEY), "class already decorated with @EnableCellTextSearch");
|
|
2966
|
+
klass.defineMetadata(TEXT_SEARCH_FORMATTER_KEY, options);
|
|
2967
|
+
};
|
|
2968
|
+
}
|
|
2969
|
+
(function (EnableCellTextSearch) {
|
|
2970
|
+
function getFormatter(renderer, useDefault) {
|
|
2971
|
+
const options = Klass.get(renderer).getMetadata(TEXT_SEARCH_FORMATTER_KEY) ?? {};
|
|
2972
|
+
if (options[Keys.useFunction]) {
|
|
2973
|
+
return ColumnTextSearchFormatter.forFormatter(options[Keys.useFunction]);
|
|
2974
|
+
}
|
|
2975
|
+
if (options[Keys.useInstance]) {
|
|
2976
|
+
return options[Keys.useInstance];
|
|
2977
|
+
}
|
|
2978
|
+
if (options[Keys.useClass]) {
|
|
2979
|
+
return new ColumnTextSearchFormatter.Delegating(options[Keys.useClass]);
|
|
2980
|
+
}
|
|
2981
|
+
return useDefault();
|
|
2982
|
+
}
|
|
2983
|
+
EnableCellTextSearch.getFormatter = getFormatter;
|
|
2984
|
+
})(EnableCellTextSearch || (EnableCellTextSearch = {}));
|
|
2985
|
+
|
|
2986
|
+
let DefaultCellRendererComponent = class DefaultCellRendererComponent {
|
|
2987
|
+
constructor() {
|
|
2988
|
+
}
|
|
2989
|
+
set value(value) {
|
|
2990
|
+
this._value = value;
|
|
2991
|
+
}
|
|
2992
|
+
get value() {
|
|
2993
|
+
return this._value;
|
|
2994
|
+
}
|
|
2995
|
+
};
|
|
2996
|
+
DefaultCellRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2997
|
+
DefaultCellRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: DefaultCellRendererComponent, selector: "aup-default-cell-renderer", inputs: { value: "value" }, ngImport: i0, template: "<span [innerHTML]=\"value| aupHighlight\"></span>\n", styles: [""], pipes: { "aupHighlight": HighlightPipe } });
|
|
2998
|
+
DefaultCellRendererComponent = __decorate([
|
|
2999
|
+
EnableCellTextSearch({ useClass: ColumnTextSearchFormatter.DefaultValueFormatter }),
|
|
3000
|
+
__metadata("design:paramtypes", [])
|
|
3001
|
+
], DefaultCellRendererComponent);
|
|
3002
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultCellRendererComponent, decorators: [{
|
|
3003
|
+
type: Component,
|
|
3004
|
+
args: [{ selector: "aup-default-cell-renderer", template: "<span [innerHTML]=\"value| aupHighlight\"></span>\n", styles: [""] }]
|
|
3005
|
+
}], ctorParameters: function () { return []; }, propDecorators: { value: [{
|
|
3006
|
+
type: Input
|
|
3007
|
+
}] } });
|
|
3008
|
+
|
|
3009
|
+
class EditSession extends GarbageCollector {
|
|
3010
|
+
constructor(rowId, row, form, saveCommand) {
|
|
3011
|
+
super();
|
|
3012
|
+
this.rowId = rowId;
|
|
3013
|
+
this.form = form;
|
|
3014
|
+
this.saveCommand = saveCommand;
|
|
3015
|
+
this._liveRowValue$ = new MutableValueModel();
|
|
3016
|
+
this.liveRowValue$ = this._liveRowValue$.readonly;
|
|
3017
|
+
this.form.load(row);
|
|
3018
|
+
this._liveRowValue$.value = row;
|
|
3019
|
+
this.form.onEdit(() => {
|
|
3020
|
+
// if (!this._liveRowValue.value[immerable]) {
|
|
3021
|
+
// console.warn()
|
|
3022
|
+
// }
|
|
3023
|
+
this._liveRowValue$.value = produce(this._liveRowValue$.value, draft => {
|
|
3024
|
+
this.form.writeDirtyStateTo(draft);
|
|
3025
|
+
});
|
|
3026
|
+
});
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
|
|
3030
|
+
class EditRowControls extends DisposableComponent {
|
|
3031
|
+
constructor() {
|
|
3032
|
+
super();
|
|
3033
|
+
this.saveCommand = Command.create(async () => {
|
|
3034
|
+
const finished = await this.editSession.saveCommand.execute();
|
|
3035
|
+
if (finished) {
|
|
3036
|
+
this.editSession.dispose();
|
|
3037
|
+
}
|
|
3038
|
+
});
|
|
3039
|
+
this.cancelCommand = Command.create(() => {
|
|
3040
|
+
this.editSession.dispose();
|
|
3041
|
+
}).disableWhile(this.saveCommand.busy);
|
|
3042
|
+
}
|
|
3043
|
+
set editSession(session) {
|
|
3044
|
+
if (session) {
|
|
3045
|
+
session.form.disableWhile(this.saveCommand.busy);
|
|
3046
|
+
}
|
|
3047
|
+
this._session = session;
|
|
3048
|
+
}
|
|
3049
|
+
get editSession() {
|
|
3050
|
+
return this._session;
|
|
3051
|
+
}
|
|
3052
|
+
ngOnInit() {
|
|
3053
|
+
}
|
|
3054
|
+
get form() {
|
|
3055
|
+
return this.editSession?.form;
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
EditRowControls.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: EditRowControls, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3059
|
+
EditRowControls.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: EditRowControls, selector: "aup-row-editor-controls", inputs: { row: "row", editRowCommand: "editRowCommand", editSession: "editSession" }, usesInheritance: true, ngImport: i0, template: "<button *ngIf=\"!editSession\" mat-icon-button [pectinCommand]=\"editRowCommand\" class=\"edit-button\"><aup-icon icon=\"mat:edit\"></aup-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"saveCommand\"><aup-icon icon=\"mat:done\"></aup-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"cancelCommand\"><aup-icon icon=\"mat:clear\"></aup-icon></button>\n", styles: [":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}\n"], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: IconComponent, selector: "aup-icon", inputs: ["icon"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }] });
|
|
3060
|
+
__decorate([
|
|
3061
|
+
TrackExternal(),
|
|
3062
|
+
__metadata("design:type", Command)
|
|
3063
|
+
], EditRowControls.prototype, "editRowCommand", void 0);
|
|
3064
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: EditRowControls, decorators: [{
|
|
3065
|
+
type: Component,
|
|
3066
|
+
args: [{ selector: 'aup-row-editor-controls', template: "<button *ngIf=\"!editSession\" mat-icon-button [pectinCommand]=\"editRowCommand\" class=\"edit-button\"><aup-icon icon=\"mat:edit\"></aup-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"saveCommand\"><aup-icon icon=\"mat:done\"></aup-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"cancelCommand\"><aup-icon icon=\"mat:clear\"></aup-icon></button>\n", styles: [":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}\n"] }]
|
|
3067
|
+
}], ctorParameters: function () { return []; }, propDecorators: { row: [{
|
|
3068
|
+
type: Input
|
|
3069
|
+
}], editRowCommand: [{
|
|
3070
|
+
type: Input
|
|
3071
|
+
}], editSession: [{
|
|
3072
|
+
type: Input
|
|
3073
|
+
}] } });
|
|
3074
|
+
|
|
3075
|
+
let formatter = (row) => row.map(e => e?.toString()).join(", ");
|
|
3076
|
+
let DefaultListCellRendererComponent = class DefaultListCellRendererComponent extends DisposableComponent {
|
|
3077
|
+
constructor() {
|
|
3078
|
+
super();
|
|
3079
|
+
const { chain } = Dsl.disposeWith(this);
|
|
3080
|
+
this.text$ = chain(this.value$).reduce(formatter);
|
|
3081
|
+
}
|
|
3082
|
+
};
|
|
3083
|
+
DefaultListCellRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultListCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3084
|
+
DefaultListCellRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: DefaultListCellRendererComponent, selector: "aup-default-list-cell-renderer", inputs: { value$: "value$", value: "value" }, usesInheritance: true, ngImport: i0, template: "<span [innerHTML]=\"text$.value| aupHighlight\"></span>\n", styles: [""], pipes: { "aupHighlight": HighlightPipe } });
|
|
3085
|
+
__decorate([
|
|
3086
|
+
TrackExternal(),
|
|
3087
|
+
__metadata("design:type", ListModel)
|
|
3088
|
+
], DefaultListCellRendererComponent.prototype, "value$", void 0);
|
|
3089
|
+
__decorate([
|
|
3090
|
+
StoreInListModel("value$"),
|
|
3091
|
+
__metadata("design:type", Array)
|
|
3092
|
+
], DefaultListCellRendererComponent.prototype, "value", void 0);
|
|
3093
|
+
DefaultListCellRendererComponent = __decorate([
|
|
3094
|
+
EnableCellTextSearch({ useClass: ColumnTextSearchFormatter.DefaultArrayFormatter }),
|
|
3095
|
+
__metadata("design:paramtypes", [])
|
|
3096
|
+
], DefaultListCellRendererComponent);
|
|
3097
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultListCellRendererComponent, decorators: [{
|
|
3098
|
+
type: Component,
|
|
3099
|
+
args: [{ selector: "aup-default-list-cell-renderer", template: "<span [innerHTML]=\"text$.value| aupHighlight\"></span>\n", styles: [""] }]
|
|
3100
|
+
}], ctorParameters: function () { return []; }, propDecorators: { value$: [{
|
|
3101
|
+
type: Input
|
|
3102
|
+
}], value: [{
|
|
3103
|
+
type: Input
|
|
3104
|
+
}] } });
|
|
3105
|
+
|
|
3106
|
+
class SelectionCellComponent extends DisposableComponent {
|
|
3107
|
+
constructor() {
|
|
3108
|
+
super();
|
|
3109
|
+
this.selectCommand = Command.create(() => {
|
|
3110
|
+
this.selectionModel?.selectCommand.execute(this.row);
|
|
3111
|
+
});
|
|
3112
|
+
}
|
|
3113
|
+
isSelected() {
|
|
3114
|
+
return this.selectionModel?.isSelected(this.row);
|
|
3115
|
+
}
|
|
3116
|
+
}
|
|
3117
|
+
SelectionCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectionCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3118
|
+
SelectionCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: SelectionCellComponent, selector: "aup-selection-cell", inputs: { row: "row" }, usesInheritance: true, ngImport: i0, template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\"></mat-checkbox>\n", styles: [""], components: [{ type: i1$9.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }] });
|
|
3119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectionCellComponent, decorators: [{
|
|
3120
|
+
type: Component,
|
|
3121
|
+
args: [{ selector: 'aup-selection-cell', template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\"></mat-checkbox>\n", styles: [""] }]
|
|
3122
|
+
}], ctorParameters: function () { return []; }, propDecorators: { row: [{
|
|
3123
|
+
type: Input
|
|
3124
|
+
}] } });
|
|
3125
|
+
|
|
3126
|
+
class SelectionHeaderCellComponent extends DisposableComponent {
|
|
3127
|
+
constructor() {
|
|
3128
|
+
super();
|
|
3129
|
+
this.selectCommand = Command.create(() => {
|
|
3130
|
+
this.selectionModel.toggleAllCommand.execute();
|
|
3131
|
+
});
|
|
3132
|
+
}
|
|
3133
|
+
isSelected() {
|
|
3134
|
+
return this.selectionModel?.allSelected.value || false;
|
|
3135
|
+
}
|
|
3136
|
+
isIntermediate() {
|
|
3137
|
+
return this.selectionModel?.someSelected.value || false;
|
|
3138
|
+
}
|
|
3139
|
+
isVisible() {
|
|
3140
|
+
return this.enableHeaderControls && this.selectionModel.getDelegate() instanceof MultipleSelectionModel;
|
|
3141
|
+
}
|
|
3142
|
+
}
|
|
3143
|
+
SelectionHeaderCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectionHeaderCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3144
|
+
SelectionHeaderCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: SelectionHeaderCellComponent, selector: "aup-selection-header-cell", usesInheritance: true, ngImport: i0, template: "<mat-checkbox *ngIf=\"isVisible()\" [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\"></mat-checkbox>\n", styles: [""], components: [{ type: i1$9.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }] });
|
|
3145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectionHeaderCellComponent, decorators: [{
|
|
3146
|
+
type: Component,
|
|
3147
|
+
args: [{ selector: 'aup-selection-header-cell', template: "<mat-checkbox *ngIf=\"isVisible()\" [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\"></mat-checkbox>\n", styles: [""] }]
|
|
3148
|
+
}], ctorParameters: function () { return []; } });
|
|
3149
|
+
|
|
3150
|
+
class ColumnListModel extends AbstractComputedListModel {
|
|
3151
|
+
constructor() {
|
|
3152
|
+
super();
|
|
3153
|
+
this._allColumns$ = new MutableListModel();
|
|
3154
|
+
const { chain } = Dsl.disposeWith(this);
|
|
3155
|
+
this.columnsById$ = chain(this._allColumns$).indexBy('columnId');
|
|
3156
|
+
}
|
|
3157
|
+
get allColumns$() {
|
|
3158
|
+
return this._allColumns$.readonly;
|
|
3159
|
+
}
|
|
3160
|
+
getColumn(id) {
|
|
3161
|
+
return this.columnsById$.get(id);
|
|
3162
|
+
}
|
|
3163
|
+
hasColumn(id) {
|
|
3164
|
+
return !!this.columnsById$.get(id);
|
|
3165
|
+
}
|
|
3166
|
+
addColumn(column, index) {
|
|
3167
|
+
if (this.hasColumn(column.columnId)) {
|
|
3168
|
+
lang.illegalState(`Column with id=${column.columnId} already exists`);
|
|
3169
|
+
}
|
|
3170
|
+
this.registerDisposable(column);
|
|
3171
|
+
this.runInTransaction(() => {
|
|
3172
|
+
if (!isNil(index)) {
|
|
3173
|
+
this._allColumns$.insert(index, column);
|
|
3174
|
+
}
|
|
3175
|
+
else {
|
|
3176
|
+
this._allColumns$.push(column);
|
|
3177
|
+
}
|
|
3178
|
+
this.registerDisposable(this.trackSource(column.visible$));
|
|
3179
|
+
});
|
|
3180
|
+
return column;
|
|
3181
|
+
}
|
|
3182
|
+
doComputeValue() {
|
|
3183
|
+
return this._allColumns$.value.filter(c => c.visible$.value);
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
|
|
3187
|
+
class CustomValueColumnModel extends ColumnModel {
|
|
3188
|
+
constructor(columnId, defaults, getValue) {
|
|
2943
3189
|
super(columnId, defaults);
|
|
2944
3190
|
this.getValue = getValue;
|
|
2945
3191
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
2946
3192
|
}
|
|
2947
3193
|
cellRenderer(componentType, onComponentInitOrOptions) {
|
|
3194
|
+
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => new ColumnTextSearchFormatter.Null()), row => this.getValue(row));
|
|
2948
3195
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
2949
3196
|
if (firstTime) {
|
|
2950
3197
|
if (isFunction(onComponentInitOrOptions)) {
|
|
@@ -2967,6 +3214,7 @@ class CustomValueColumnModel extends ColumnModel {
|
|
|
2967
3214
|
return this._selectRowOnClick(selectOnRowClick);
|
|
2968
3215
|
}
|
|
2969
3216
|
}
|
|
3217
|
+
|
|
2970
3218
|
class EditorControlColumnModel extends ColumnModel {
|
|
2971
3219
|
constructor(columnId, saveCommandFactory, defaults) {
|
|
2972
3220
|
super(columnId, defaults);
|
|
@@ -2980,34 +3228,148 @@ class EditorControlColumnModel extends ColumnModel {
|
|
|
2980
3228
|
}));
|
|
2981
3229
|
return this;
|
|
2982
3230
|
}
|
|
2983
|
-
getDefaultHeaderText() {
|
|
2984
|
-
return '';
|
|
2985
|
-
}
|
|
2986
|
-
}
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
this.
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
3231
|
+
getDefaultHeaderText() {
|
|
3232
|
+
return '';
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3236
|
+
class ListPropertyColumnModel extends ColumnModel {
|
|
3237
|
+
constructor(id, property, defaults) {
|
|
3238
|
+
super(id, defaults);
|
|
3239
|
+
this.property = property;
|
|
3240
|
+
this._format = (value) => value.map(v => v?.toString()).join(", ");
|
|
3241
|
+
this.cellRenderer(DefaultListCellRendererComponent);
|
|
3242
|
+
}
|
|
3243
|
+
cellRenderer(componentType) {
|
|
3244
|
+
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => new ColumnTextSearchFormatter.DefaultArrayFormatter()), row => row[this.property]);
|
|
3245
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
3246
|
+
let rowElement = rowData.row[this.property];
|
|
3247
|
+
// @ts-ignore Started complaining in ts 4.5.. but I think my logic is correct...
|
|
3248
|
+
component.value = this._format(rowElement);
|
|
3249
|
+
}));
|
|
3250
|
+
return this;
|
|
3251
|
+
}
|
|
3252
|
+
cellEditor(editor, validatorsOrInitialiser, initialiseComponent) {
|
|
3253
|
+
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
3254
|
+
const initialiser = isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
3255
|
+
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
3256
|
+
const formListModel = editSession.form.pluckList(this.property);
|
|
3257
|
+
if (validators) {
|
|
3258
|
+
formListModel.validateUsing(validators);
|
|
3259
|
+
}
|
|
3260
|
+
component.listModel = formListModel;
|
|
3261
|
+
if (initialiser) {
|
|
3262
|
+
initialiser(component);
|
|
3263
|
+
}
|
|
3264
|
+
}));
|
|
3265
|
+
return this;
|
|
3266
|
+
}
|
|
3267
|
+
format(formatter) {
|
|
3268
|
+
assert$1.isFunction(formatter);
|
|
3269
|
+
this._format = formatter;
|
|
3270
|
+
return this;
|
|
3271
|
+
}
|
|
3272
|
+
selectRowOnClick(selectRowOnClick) {
|
|
3273
|
+
return this._selectRowOnClick(selectRowOnClick);
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
|
|
3277
|
+
class PropertyColumnModel extends ColumnModel {
|
|
3278
|
+
constructor(id, property, defaults) {
|
|
3279
|
+
super(id, defaults);
|
|
3280
|
+
this.property = property;
|
|
3281
|
+
this._format = (value) => value?.toString();
|
|
3282
|
+
this.cellRenderer(DefaultCellRendererComponent);
|
|
3283
|
+
}
|
|
3284
|
+
cellRenderer(componentType, onComponentInitOrOptions) {
|
|
3285
|
+
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => new ColumnTextSearchFormatter.DefaultValueFormatter()), row => row[this.property]);
|
|
3286
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
3287
|
+
if (firstTime) {
|
|
3288
|
+
if (isFunction(onComponentInitOrOptions)) {
|
|
3289
|
+
onComponentInitOrOptions(component);
|
|
3290
|
+
}
|
|
3291
|
+
else {
|
|
3292
|
+
if (isFunction(onComponentInitOrOptions?.onComponentInit)) {
|
|
3293
|
+
onComponentInitOrOptions.onComponentInit(component);
|
|
3294
|
+
}
|
|
3295
|
+
}
|
|
3296
|
+
}
|
|
3297
|
+
component.value = this._format(rowData.row[this.property]);
|
|
3298
|
+
}));
|
|
3299
|
+
return this;
|
|
3300
|
+
}
|
|
3301
|
+
liveEditCellRenderer(componentType, options) {
|
|
3302
|
+
return this.mutableCellRenderer(componentType, options);
|
|
3303
|
+
}
|
|
3304
|
+
/**
|
|
3305
|
+
* Deprecated. Use #liveEditCellRenderer instead.
|
|
3306
|
+
* @param componentType
|
|
3307
|
+
* @param options
|
|
3308
|
+
*/
|
|
3309
|
+
mutableCellRenderer(componentType, options) {
|
|
3310
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
3311
|
+
// keep a local copy most recent row value so it's available to teh
|
|
3312
|
+
// edit callback without having to add/remove subscribers all the time.
|
|
3313
|
+
component[ColumnModel.CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
3314
|
+
let disableEditCallback = false;
|
|
3315
|
+
if (firstTime) {
|
|
3316
|
+
if (isFunction(options?.onComponentInit)) {
|
|
3317
|
+
options.onComponentInit(component);
|
|
3318
|
+
}
|
|
3319
|
+
// install our edit callback
|
|
3320
|
+
component.onValueEdited((is, was) => {
|
|
3321
|
+
if (!disableEditCallback) {
|
|
3322
|
+
options.onValueEdit(component[ColumnModel.CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
|
|
3323
|
+
}
|
|
3324
|
+
});
|
|
3325
|
+
}
|
|
3326
|
+
// now push the value the component and disable the callback just incase the component misbehaves
|
|
3327
|
+
// and fires a value change during the operation.
|
|
3328
|
+
disableEditCallback = true;
|
|
3329
|
+
component.value = rowData.row[this.property];
|
|
3330
|
+
disableEditCallback = false;
|
|
3331
|
+
if (!isFunction(options) && isFunction(options?.onRowUpdate)) {
|
|
3332
|
+
options.onRowUpdate(component, rowData.row);
|
|
3333
|
+
}
|
|
3334
|
+
}));
|
|
3335
|
+
return this;
|
|
3336
|
+
}
|
|
3337
|
+
cellEditor(editor, validatorsOrInitialiser, onComponentInit) {
|
|
3338
|
+
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
3339
|
+
const initialiser = isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
3340
|
+
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
3341
|
+
const formValueModel = editSession.form.pluck(this.property);
|
|
3342
|
+
if (validators) {
|
|
3343
|
+
formValueModel.validateUsing(validators);
|
|
3344
|
+
}
|
|
3345
|
+
component.valueModel = formValueModel;
|
|
3346
|
+
if (initialiser) {
|
|
3347
|
+
initialiser(component);
|
|
3348
|
+
}
|
|
3349
|
+
}));
|
|
3350
|
+
return this;
|
|
3351
|
+
}
|
|
3352
|
+
format(formatter) {
|
|
3353
|
+
assert$1.isFunction(formatter);
|
|
3354
|
+
this._format = formatter;
|
|
3355
|
+
return this;
|
|
2995
3356
|
}
|
|
2996
3357
|
selectRowOnClick(selectOnRowClick) {
|
|
2997
3358
|
return this._selectRowOnClick(selectOnRowClick);
|
|
2998
3359
|
}
|
|
2999
3360
|
}
|
|
3361
|
+
|
|
3000
3362
|
class SelectionColumnModel extends ColumnModel {
|
|
3001
3363
|
constructor(columnId, defaults, selectionModel) {
|
|
3002
3364
|
super(columnId, defaults);
|
|
3003
3365
|
this._enableHeaderControls = true;
|
|
3004
3366
|
this.selectionModel = DelegatingSelectionModel.createDelegate();
|
|
3005
3367
|
this._selectRowOnClick(false);
|
|
3006
|
-
this.cellHeaderRenderer(
|
|
3368
|
+
this.cellHeaderRenderer(SelectionHeaderCellComponent, (component) => {
|
|
3007
3369
|
component.selectionModel = this.selectionModel;
|
|
3008
3370
|
component.enableHeaderControls = this._enableHeaderControls;
|
|
3009
3371
|
});
|
|
3010
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(
|
|
3372
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectionCellComponent, (component, rowData) => {
|
|
3011
3373
|
component.row = rowData.row;
|
|
3012
3374
|
component.selectionModel = this.selectionModel;
|
|
3013
3375
|
}));
|
|
@@ -3032,234 +3394,8 @@ class SelectionColumnModel extends ColumnModel {
|
|
|
3032
3394
|
}
|
|
3033
3395
|
}
|
|
3034
3396
|
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
* @example
|
|
3038
|
-
* this.heroTableModel = TableModel.fromList(heroList, table => {
|
|
3039
|
-
* table.pluck("firstName");
|
|
3040
|
-
* table.pluck("lastName");
|
|
3041
|
-
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
3042
|
-
* });
|
|
3043
|
-
*
|
|
3044
|
-
* Create your table
|
|
3045
|
-
* @example
|
|
3046
|
-
* <aup-table [tableModel]="heroTableModel"></aup-table>
|
|
3047
|
-
*
|
|
3048
|
-
* Column templates
|
|
3049
|
-
* @example
|
|
3050
|
-
* this.heroTableModel = TableModel.fromList(heroList, table => {
|
|
3051
|
-
* table.pluck("firstName");
|
|
3052
|
-
* table.pluck("lastName");
|
|
3053
|
-
* table.addTemplateColumn("specialColumn");
|
|
3054
|
-
* });
|
|
3055
|
-
* <aup-table [tableModel]="heroTableModel">
|
|
3056
|
-
* <div *aupColumnTemplate="let hero; columnId: 'specialColumn'; fillCell: true; padChild:false">
|
|
3057
|
-
* {{hero.name}}
|
|
3058
|
-
* </div>
|
|
3059
|
-
* </aup-table>
|
|
3060
|
-
*
|
|
3061
|
-
* Styling
|
|
3062
|
-
* @example
|
|
3063
|
-
* // global settings
|
|
3064
|
-
* :root {
|
|
3065
|
-
* --aup-table-column-gap: 10px; // defaults to 24px
|
|
3066
|
-
* --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
3067
|
-
* --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
3068
|
-
* --aup-table-first-column-padding-left: 18px // defaults to --column-gap
|
|
3069
|
-
* --aup-table-last-column-padding-right: 18px // defaults to --column-gap
|
|
3070
|
-
* }
|
|
3071
|
-
*
|
|
3072
|
-
* // per table settings.
|
|
3073
|
-
* aup-table {
|
|
3074
|
-
* --column-gap: 10px; // defaults to 24px
|
|
3075
|
-
* --row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
3076
|
-
* --row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
3077
|
-
* --first-column-padding-left: 18px // defaults to --column-gap
|
|
3078
|
-
* --last-column-padding-right: 18px // defaults to --column-gap
|
|
3079
|
-
*
|
|
3080
|
-
* aup-table-header-cell-renderer,
|
|
3081
|
-
* aup-table-cell-renderer {
|
|
3082
|
-
* &.aup-col-my-dasherised-column-id {
|
|
3083
|
-
* // do stuff
|
|
3084
|
-
* }
|
|
3085
|
-
* &.first-visible-column {
|
|
3086
|
-
* // do stuff
|
|
3087
|
-
* }
|
|
3088
|
-
* &.last-visible-column {
|
|
3089
|
-
* // do stuff
|
|
3090
|
-
* }
|
|
3091
|
-
* }
|
|
3092
|
-
* }
|
|
3093
|
-
*/
|
|
3094
|
-
class AbstractTableComponent extends ResizeAwareComponent {
|
|
3095
|
-
constructor(elementRef, ngZone) {
|
|
3096
|
-
super(elementRef, ngZone);
|
|
3097
|
-
/**
|
|
3098
|
-
* Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
|
|
3099
|
-
* need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
|
|
3100
|
-
* containment area.
|
|
3101
|
-
*/
|
|
3102
|
-
this.enableScrolling = false;
|
|
3103
|
-
// TODO: support user defined header and row heights via css vars.
|
|
3104
|
-
this.headerHeight = new MutableValueModel(56);
|
|
3105
|
-
this.rowHeight = new MutableValueModel(48);
|
|
3106
|
-
this.baseCssClass = 'aup-table-component';
|
|
3107
|
-
const { chain, when } = Dsl.disposeWith(this);
|
|
3108
|
-
const actualHeaderHeight = chain(this.showHeaderModel).map(show => {
|
|
3109
|
-
return show ? this.headerHeight.value : 0;
|
|
3110
|
-
}, { dependsOn: this.headerHeight });
|
|
3111
|
-
this.visibleRowCount = chain(this.boundsModel).map(bounds => {
|
|
3112
|
-
// TODO: this doesn't take into account any css styling adjustments etc. Will investigate if it's an issue.
|
|
3113
|
-
const rawRowCount = (bounds.height - actualHeaderHeight.value) / this.rowHeight.value;
|
|
3114
|
-
return rawRowCount < 1 ? 0 : Math.floor(rawRowCount);
|
|
3115
|
-
}, {
|
|
3116
|
-
dependsOn: [actualHeaderHeight, this.rowHeight],
|
|
3117
|
-
postponeWhile: chain(this.boundsModel).pluckNumeric('height').isLessThan(1)
|
|
3118
|
-
});
|
|
3119
|
-
}
|
|
3120
|
-
get hideHeader() {
|
|
3121
|
-
return !this.showHeader;
|
|
3122
|
-
}
|
|
3123
|
-
getModel() {
|
|
3124
|
-
return lang$1.abstractMethod(this.constructor);
|
|
3125
|
-
}
|
|
3126
|
-
ngOnInit() {
|
|
3127
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
3128
|
-
this.columns = chain(this.getModel().columns);
|
|
3129
|
-
this.columnIds = chain(this.columns).pluck('columnId');
|
|
3130
|
-
this.columnsById = chain(this.columns).indexBy('columnId');
|
|
3131
|
-
}
|
|
3132
|
-
isEditing(row) {
|
|
3133
|
-
return !!this.getModel().getEditSessionFor(row);
|
|
3134
|
-
}
|
|
3135
|
-
registerColumnTemplate(columnId, templateRef, viewContainer, fillCell, padChild) {
|
|
3136
|
-
const column = this.columnsById.get(columnId);
|
|
3137
|
-
if (column instanceof CustomTemplateColumnModel) {
|
|
3138
|
-
column.setTemplate(templateRef, viewContainer, fillCell, padChild);
|
|
3139
|
-
}
|
|
3140
|
-
}
|
|
3141
|
-
notifyCellClicked(columnModel, row) {
|
|
3142
|
-
this.getModel()._notifyCellClicked(columnModel, row);
|
|
3143
|
-
}
|
|
3144
|
-
// @Trace()
|
|
3145
|
-
isFirstVisibleColumn(columnId) {
|
|
3146
|
-
return this.getModel().firstVisibleColumn.query().value?.columnId === columnId;
|
|
3147
|
-
}
|
|
3148
|
-
// @Trace()
|
|
3149
|
-
isLastVisibleColumn(columnId) {
|
|
3150
|
-
return this.getModel().lastVisibleColumn.query().value?.columnId === columnId;
|
|
3151
|
-
}
|
|
3152
|
-
getColumnClasses(columnId) {
|
|
3153
|
-
const classes = [`aup-col-${this.columnsById.get(columnId).dasherisedColumnId}`];
|
|
3154
|
-
if (this.isFirstVisibleColumn(columnId)) {
|
|
3155
|
-
classes.push('first-visible-column');
|
|
3156
|
-
}
|
|
3157
|
-
if (this.isLastVisibleColumn(columnId)) {
|
|
3158
|
-
classes.push('last-visible-column');
|
|
3159
|
-
}
|
|
3160
|
-
return classes;
|
|
3161
|
-
}
|
|
3162
|
-
}
|
|
3163
|
-
AbstractTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AbstractTableComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
3164
|
-
AbstractTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: AbstractTableComponent, selector: "aup-abstract-table", inputs: { showHeaderModel: "showHeaderModel", showHeader: "showHeader", enableScrolling: "enableScrolling" }, host: { properties: { "class.enable-scrolling": "this.enableScrolling", "class": "this.baseCssClass", "class.hide-header": "this.hideHeader" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
3165
|
-
__decorate([
|
|
3166
|
-
TrackExternal({ defaultValue: true }),
|
|
3167
|
-
__metadata("design:type", ValueModel)
|
|
3168
|
-
], AbstractTableComponent.prototype, "showHeaderModel", void 0);
|
|
3169
|
-
__decorate([
|
|
3170
|
-
StoreInValueModel('showHeaderModel'),
|
|
3171
|
-
__metadata("design:type", Boolean)
|
|
3172
|
-
], AbstractTableComponent.prototype, "showHeader", void 0);
|
|
3173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AbstractTableComponent, decorators: [{
|
|
3174
|
-
type: Component,
|
|
3175
|
-
args: [{
|
|
3176
|
-
selector: 'aup-abstract-table',
|
|
3177
|
-
template: ''
|
|
3178
|
-
}]
|
|
3179
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { showHeaderModel: [{
|
|
3180
|
-
type: Input
|
|
3181
|
-
}], showHeader: [{
|
|
3182
|
-
type: Input
|
|
3183
|
-
}], enableScrolling: [{
|
|
3184
|
-
type: Input
|
|
3185
|
-
}, {
|
|
3186
|
-
type: HostBinding,
|
|
3187
|
-
args: ['class.enable-scrolling']
|
|
3188
|
-
}], baseCssClass: [{
|
|
3189
|
-
type: HostBinding,
|
|
3190
|
-
args: ['class']
|
|
3191
|
-
}], hideHeader: [{
|
|
3192
|
-
type: HostBinding,
|
|
3193
|
-
args: ['class.hide-header']
|
|
3194
|
-
}] } });
|
|
3195
|
-
|
|
3196
|
-
class ColumnTemplateDirective {
|
|
3197
|
-
constructor(host, templateRef, viewContainer) {
|
|
3198
|
-
this.host = host;
|
|
3199
|
-
this.templateRef = templateRef;
|
|
3200
|
-
this.viewContainer = viewContainer;
|
|
3201
|
-
this.aupColumnTemplateFillCell = false;
|
|
3202
|
-
this.aupColumnTemplateAutoPadChild = undefined;
|
|
3203
|
-
}
|
|
3204
|
-
ngOnInit() {
|
|
3205
|
-
assert.isTruthy(this.aupColumnTemplateColumnId);
|
|
3206
|
-
this.host.registerColumnTemplate(this.aupColumnTemplateColumnId, this.templateRef, this.viewContainer, this.aupColumnTemplateFillCell, this.aupColumnTemplateAutoPadChild ?? this.aupColumnTemplateFillCell);
|
|
3207
|
-
}
|
|
3208
|
-
}
|
|
3209
|
-
ColumnTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ColumnTemplateDirective, deps: [{ token: AbstractTableComponent }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3210
|
-
ColumnTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: ColumnTemplateDirective, selector: "[aupColumnTemplate]", inputs: { aupColumnTemplate: "aupColumnTemplate", aupColumnTemplateColumnId: "aupColumnTemplateColumnId", aupColumnTemplateFillCell: "aupColumnTemplateFillCell", aupColumnTemplateAutoPadChild: "aupColumnTemplateAutoPadChild" }, ngImport: i0 });
|
|
3211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ColumnTemplateDirective, decorators: [{
|
|
3212
|
-
type: Directive,
|
|
3213
|
-
args: [{
|
|
3214
|
-
selector: '[aupColumnTemplate]'
|
|
3215
|
-
}]
|
|
3216
|
-
}], ctorParameters: function () { return [{ type: AbstractTableComponent }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { aupColumnTemplate: [{
|
|
3217
|
-
type: Input
|
|
3218
|
-
}], aupColumnTemplateColumnId: [{
|
|
3219
|
-
type: Input
|
|
3220
|
-
}], aupColumnTemplateFillCell: [{
|
|
3221
|
-
type: Input
|
|
3222
|
-
}], aupColumnTemplateAutoPadChild: [{
|
|
3223
|
-
type: Input
|
|
3224
|
-
}] } });
|
|
3225
|
-
|
|
3226
|
-
class ColumnListModel extends AbstractComputedListModel {
|
|
3227
|
-
constructor() {
|
|
3228
|
-
super();
|
|
3229
|
-
this._allColumns = new MutableListModel();
|
|
3230
|
-
const { chain } = Dsl.disposeWith(this);
|
|
3231
|
-
this.columnsById = chain(this._allColumns).indexBy('columnId');
|
|
3232
|
-
}
|
|
3233
|
-
get allColumns() {
|
|
3234
|
-
return this._allColumns.readonly;
|
|
3235
|
-
}
|
|
3236
|
-
getColumn(id) {
|
|
3237
|
-
return this.columnsById.get(id);
|
|
3238
|
-
}
|
|
3239
|
-
hasColumn(id) {
|
|
3240
|
-
return !!this.columnsById.get(id);
|
|
3241
|
-
}
|
|
3242
|
-
addColumn(column, index) {
|
|
3243
|
-
if (this.hasColumn(column.columnId)) {
|
|
3244
|
-
lang.illegalState(`Column with id=${column.columnId} already exists`);
|
|
3245
|
-
}
|
|
3246
|
-
this.registerDisposable(column);
|
|
3247
|
-
this.runInTransaction(() => {
|
|
3248
|
-
if (!isNil(index)) {
|
|
3249
|
-
this._allColumns.insert(index, column);
|
|
3250
|
-
}
|
|
3251
|
-
else {
|
|
3252
|
-
this._allColumns.push(column);
|
|
3253
|
-
}
|
|
3254
|
-
this.registerDisposable(this.trackSource(column.visible));
|
|
3255
|
-
});
|
|
3256
|
-
return column;
|
|
3257
|
-
}
|
|
3258
|
-
doComputeValue() {
|
|
3259
|
-
return this._allColumns.value.filter(c => c.visible.value);
|
|
3260
|
-
}
|
|
3261
|
-
}
|
|
3262
|
-
|
|
3397
|
+
var DefaultValueFormatter = ColumnTextSearchFormatter.DefaultValueFormatter;
|
|
3398
|
+
var DefaultArrayFormatter = ColumnTextSearchFormatter.DefaultArrayFormatter;
|
|
3263
3399
|
// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
|
|
3264
3400
|
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
3265
3401
|
class RowClass {
|
|
@@ -3276,39 +3412,69 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3276
3412
|
this._editorSessions = new MutableListModel();
|
|
3277
3413
|
this.rowClassNamePredicates = [];
|
|
3278
3414
|
this.rowClickListeners = new EventListenerList();
|
|
3415
|
+
this._searchText$ = new DelegatingValueModel();
|
|
3279
3416
|
this._createForm = (row) => new DirtyTrackingForm();
|
|
3280
3417
|
this.trackBy = (index, item) => {
|
|
3281
3418
|
return this.identityOf ? this.identityOf(item) : index;
|
|
3282
3419
|
};
|
|
3283
3420
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
3284
|
-
this._rowsBeingEdited = new MutableListModel([], {
|
|
3421
|
+
this._rowsBeingEdited$ = new MutableListModel([], {
|
|
3285
3422
|
identifiedWith: row => this.identityOf(row)
|
|
3286
3423
|
});
|
|
3287
|
-
this._editorSessionByRowId = chain(this._editorSessions).indexBy(
|
|
3288
|
-
this.editing = chain(this._editorSessions).count().isGreaterThan(0);
|
|
3289
|
-
this.
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3424
|
+
this._editorSessionByRowId = chain(this._editorSessions).indexBy("rowId");
|
|
3425
|
+
this.editing$ = chain(this._editorSessions).count().isGreaterThan(0);
|
|
3426
|
+
this._textSearchPredicate$ = chain(this._searchText$).map(text => {
|
|
3427
|
+
return _.isEmpty(text) ? Functions.identity : (rows) => {
|
|
3428
|
+
const regex = new RegExp(escapeStringRegexp(text), "i");
|
|
3429
|
+
return rows.filter(row => this.hasMatchingColumn(row, regex));
|
|
3430
|
+
};
|
|
3431
|
+
}, {
|
|
3432
|
+
allowNil: true,
|
|
3433
|
+
dependsOn: this.columns
|
|
3434
|
+
});
|
|
3435
|
+
this.dataSource = chain(this._dataSource)
|
|
3436
|
+
.reduceToList(items => this._textSearchPredicate$.value(items), {
|
|
3437
|
+
dependsOn: this._textSearchPredicate$
|
|
3438
|
+
})
|
|
3439
|
+
.replaceAll(this.rowsBeingEdited$);
|
|
3440
|
+
this.firstEditableColumn$ = chain(this.columns).select(c => c.hasEditorPortal()).first();
|
|
3441
|
+
this.firstVisibleColumn$ = chain(this._columnList).first();
|
|
3442
|
+
this.lastVisibleColumn$ = chain(this._columnList).last();
|
|
3443
|
+
this.rowSelectionDisabledOnAllColumns$ = chain(this._columnList).select(column => column.isRowSelectionEnabled()).count().equals(0);
|
|
3294
3444
|
}
|
|
3295
3445
|
findMatchingColumns(row, regex) {
|
|
3296
|
-
return this.columns.value.filter(c => c.
|
|
3446
|
+
return this.columns.value.filter(c => regex.test(c.getSearchTextFor(row)));
|
|
3297
3447
|
}
|
|
3448
|
+
// @Trace()
|
|
3298
3449
|
hasMatchingColumn(row, regex) {
|
|
3299
|
-
return !!this.columns.value.find(c => c.
|
|
3450
|
+
return !!this.columns.value.find(c => regex.test(c.getSearchTextFor(row)));
|
|
3451
|
+
}
|
|
3452
|
+
initialise(injector) {
|
|
3453
|
+
// not sure if I should define these at the module level or not...
|
|
3454
|
+
const customInjector = Injector.create({
|
|
3455
|
+
providers: [
|
|
3456
|
+
{ provide: DefaultValueFormatter },
|
|
3457
|
+
{ provide: DefaultArrayFormatter }
|
|
3458
|
+
],
|
|
3459
|
+
parent: injector
|
|
3460
|
+
});
|
|
3461
|
+
this.columns.value.forEach(c => c.initialise(customInjector));
|
|
3300
3462
|
}
|
|
3301
3463
|
setDataSource(sourceOfTruth) {
|
|
3302
3464
|
this._dataSource.setDelegate(sourceOfTruth);
|
|
3303
3465
|
}
|
|
3466
|
+
setTextSearch(searchText$, throttleDelayMilliseconds = 100) {
|
|
3467
|
+
const { chain } = Dsl.disposeWith(this);
|
|
3468
|
+
this._searchText$.setDelegate(chain(searchText$).throttle(throttleDelayMilliseconds));
|
|
3469
|
+
}
|
|
3304
3470
|
identityOf(row) {
|
|
3305
3471
|
return this._dataSource.identityOf(row);
|
|
3306
3472
|
}
|
|
3307
|
-
get rowsBeingEdited() {
|
|
3308
|
-
return this._rowsBeingEdited
|
|
3473
|
+
get rowsBeingEdited$() {
|
|
3474
|
+
return this._rowsBeingEdited$.readonly;
|
|
3309
3475
|
}
|
|
3310
3476
|
get columns() {
|
|
3311
|
-
return this._columnList.allColumns
|
|
3477
|
+
return this._columnList.allColumns$;
|
|
3312
3478
|
}
|
|
3313
3479
|
get visibleColumns() {
|
|
3314
3480
|
return this._columnList.readonly;
|
|
@@ -3323,9 +3489,9 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3323
3489
|
}
|
|
3324
3490
|
_addSelectionColumn(selectionModel, visible) {
|
|
3325
3491
|
assert.isNil(this.selectionColumnModel);
|
|
3326
|
-
const columnId =
|
|
3492
|
+
const columnId = "selection-column";
|
|
3327
3493
|
this.selectionColumnModel = new SelectionColumnModel(columnId, () => this.getColumnTextProperties(columnId), selectionModel);
|
|
3328
|
-
this.addRowClass(
|
|
3494
|
+
this.addRowClass("aup-row-selected", row => this.selectionColumnModel.isSelected(row));
|
|
3329
3495
|
const selectionColumnModel = this.addColumn(this.selectionColumnModel, 0);
|
|
3330
3496
|
if (!isNil(visible)) {
|
|
3331
3497
|
selectionColumnModel.visibleWhile(visible instanceof ValueModel ? visible : ValueModel.constant(visible));
|
|
@@ -3337,7 +3503,7 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3337
3503
|
if (isFunction(formFactory)) {
|
|
3338
3504
|
this._createForm = formFactory;
|
|
3339
3505
|
}
|
|
3340
|
-
const columnId =
|
|
3506
|
+
const columnId = "editControls";
|
|
3341
3507
|
return this.addColumn(new EditorControlColumnModel(columnId, saveCommandFactory, () => this.getColumnTextProperties(columnId)));
|
|
3342
3508
|
}
|
|
3343
3509
|
addCustomColumn(columnId, dataAccessor) {
|
|
@@ -3379,7 +3545,7 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3379
3545
|
}
|
|
3380
3546
|
startEditSession(row) {
|
|
3381
3547
|
const rowId = this.identityOf(row);
|
|
3382
|
-
if (this._rowsBeingEdited
|
|
3548
|
+
if (this._rowsBeingEdited$.query().indexOf(row) > -1) {
|
|
3383
3549
|
return lang.illegalState(`Row with id=${rowId} already being edited`);
|
|
3384
3550
|
}
|
|
3385
3551
|
// todo: pass the factories to the edit session so we can make the whole lot pluggable?
|
|
@@ -3387,12 +3553,12 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3387
3553
|
const saveCommand = this.saveCommandFactory.create(form);
|
|
3388
3554
|
const editSession = new EditSession(rowId, row, form, saveCommand);
|
|
3389
3555
|
const { when } = Dsl.disposeWith(editSession);
|
|
3390
|
-
when(editSession.liveRowValue).changes((editedValue) => {
|
|
3391
|
-
this._rowsBeingEdited
|
|
3392
|
-
}, { initialValue:
|
|
3556
|
+
when(editSession.liveRowValue$).changes((editedValue) => {
|
|
3557
|
+
this._rowsBeingEdited$.replaceOrPush(editedValue);
|
|
3558
|
+
}, { initialValue: "triggerChangeUnlessNil" });
|
|
3393
3559
|
this._editorSessions.push(editSession);
|
|
3394
3560
|
editSession.onDispose(() => {
|
|
3395
|
-
this._rowsBeingEdited
|
|
3561
|
+
this._rowsBeingEdited$.remove(editSession.liveRowValue$.value);
|
|
3396
3562
|
this._editorSessions.remove(editSession);
|
|
3397
3563
|
});
|
|
3398
3564
|
return editSession;
|
|
@@ -3402,7 +3568,7 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3402
3568
|
}
|
|
3403
3569
|
cancelAllEditorSessions() {
|
|
3404
3570
|
this._editorSessions.runInTransaction((draft) => {
|
|
3405
|
-
this._rowsBeingEdited
|
|
3571
|
+
this._rowsBeingEdited$.runInTransaction(() => {
|
|
3406
3572
|
draft.value.forEach(session => session.dispose());
|
|
3407
3573
|
});
|
|
3408
3574
|
});
|
|
@@ -3411,7 +3577,7 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3411
3577
|
return this.isRowSelectionEnabled() && column.isRowSelectionEnabled();
|
|
3412
3578
|
}
|
|
3413
3579
|
isRowSelectionEnabled() {
|
|
3414
|
-
return this.hasUserSelectionModel() && !this.rowSelectionDisabledOnAllColumns
|
|
3580
|
+
return this.hasUserSelectionModel() && !this.rowSelectionDisabledOnAllColumns$.value;
|
|
3415
3581
|
}
|
|
3416
3582
|
hasUserSelectionModel() {
|
|
3417
3583
|
return !!this.selectionColumnModel?.selectionModel.getDelegate();
|
|
@@ -3440,7 +3606,7 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3440
3606
|
}
|
|
3441
3607
|
TrackExternal.oneTimeBinding(AbstractTableModel);
|
|
3442
3608
|
|
|
3443
|
-
class
|
|
3609
|
+
class TableCellComponent extends DisposableComponent {
|
|
3444
3610
|
constructor() {
|
|
3445
3611
|
super();
|
|
3446
3612
|
this.defaultClassNames = 'aup-cell-renderer';
|
|
@@ -3452,7 +3618,7 @@ class TableCellRendererComponent extends DisposableComponent {
|
|
|
3452
3618
|
}
|
|
3453
3619
|
ngOnInit() {
|
|
3454
3620
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
3455
|
-
this.firstEditableColumn = chain(this.tableModel.firstEditableColumn).equals(this.column); // this would break if the column changed.
|
|
3621
|
+
this.firstEditableColumn = chain(this.tableModel.firstEditableColumn$).equals(this.column); // this would break if the column changed.
|
|
3456
3622
|
this.column.attachCell(this);
|
|
3457
3623
|
}
|
|
3458
3624
|
hasActiveEditor() {
|
|
@@ -3499,11 +3665,11 @@ class TableCellRendererComponent extends DisposableComponent {
|
|
|
3499
3665
|
};
|
|
3500
3666
|
}
|
|
3501
3667
|
}
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type:
|
|
3668
|
+
TableCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3669
|
+
TableCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: TableCellComponent, selector: "aup-table-cell", inputs: { row: "row", column: "column", editSession: "editSession", tableModel: "tableModel" }, host: { properties: { "class": "this.defaultClassNames", "class.fillCell": "this.fillCell", "class.padChild": "this.padChild" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"!hasActiveEditor()\" [cdkPortalOutlet]=\"getRendererPortal()\" (attached)=\"initialiseRenderer($event)\"></ng-container>\n<ng-container *ngIf=\"hasActiveEditor()\" [cdkPortalOutlet]=\"getEditorPortal()\" (attached)=\"initialiseEditor($event)\"></ng-container>\n", styles: [""], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$4.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] });
|
|
3670
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableCellComponent, decorators: [{
|
|
3505
3671
|
type: Component,
|
|
3506
|
-
args: [{ selector: 'aup-table-cell
|
|
3672
|
+
args: [{ selector: 'aup-table-cell', template: "<ng-container *ngIf=\"!hasActiveEditor()\" [cdkPortalOutlet]=\"getRendererPortal()\" (attached)=\"initialiseRenderer($event)\"></ng-container>\n<ng-container *ngIf=\"hasActiveEditor()\" [cdkPortalOutlet]=\"getEditorPortal()\" (attached)=\"initialiseEditor($event)\"></ng-container>\n", styles: [""] }]
|
|
3507
3673
|
}], ctorParameters: function () { return []; }, propDecorators: { row: [{
|
|
3508
3674
|
type: Input
|
|
3509
3675
|
}], column: [{
|
|
@@ -3523,7 +3689,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
3523
3689
|
args: ['class.padChild']
|
|
3524
3690
|
}] } });
|
|
3525
3691
|
|
|
3526
|
-
class
|
|
3692
|
+
class TableHeaderCellComponent {
|
|
3527
3693
|
constructor() {
|
|
3528
3694
|
this.defaultClassNames = 'aup-header-cell-renderer';
|
|
3529
3695
|
}
|
|
@@ -3538,11 +3704,11 @@ class TableHeaderCellRendererComponent {
|
|
|
3538
3704
|
return this[HEADER_CELL_RENDERER_PORTAL];
|
|
3539
3705
|
}
|
|
3540
3706
|
}
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type:
|
|
3707
|
+
TableHeaderCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableHeaderCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3708
|
+
TableHeaderCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: TableHeaderCellComponent, selector: "aup-table-header-cell", inputs: { column: "column" }, host: { properties: { "class": "this.defaultClassNames" } }, ngImport: i0, template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event)\"></ng-container>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}\n"], directives: [{ type: i2$4.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] });
|
|
3709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableHeaderCellComponent, decorators: [{
|
|
3544
3710
|
type: Component,
|
|
3545
|
-
args: [{ selector: 'aup-table-header-cell
|
|
3711
|
+
args: [{ selector: 'aup-table-header-cell', template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event)\"></ng-container>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}\n"] }]
|
|
3546
3712
|
}], ctorParameters: function () { return []; }, propDecorators: { column: [{
|
|
3547
3713
|
type: Input
|
|
3548
3714
|
}], defaultClassNames: [{
|
|
@@ -3628,7 +3794,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
3628
3794
|
/**
|
|
3629
3795
|
* Create your model:
|
|
3630
3796
|
* @example
|
|
3631
|
-
* this.heroTableModel = TableModel
|
|
3797
|
+
* this.heroTableModel = new TableModel(heroList, table => {
|
|
3632
3798
|
* table.pluck("firstName");
|
|
3633
3799
|
* table.pluck("lastName");
|
|
3634
3800
|
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
@@ -3640,7 +3806,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
3640
3806
|
*
|
|
3641
3807
|
* Column templates
|
|
3642
3808
|
* @example
|
|
3643
|
-
* this.heroTableModel = TableModel
|
|
3809
|
+
* this.heroTableModel = new TableModel(heroList, table => {
|
|
3644
3810
|
* table.pluck("firstName");
|
|
3645
3811
|
* table.pluck("lastName");
|
|
3646
3812
|
* table.addTemplateColumn("specialColumn");
|
|
@@ -3686,17 +3852,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
3686
3852
|
* }
|
|
3687
3853
|
*/
|
|
3688
3854
|
class TableComponent extends AbstractTableComponent {
|
|
3689
|
-
constructor(elementRef, ngZone) {
|
|
3690
|
-
super(elementRef, ngZone);
|
|
3855
|
+
constructor(elementRef, ngZone, injector) {
|
|
3856
|
+
super(elementRef, ngZone, injector);
|
|
3691
3857
|
}
|
|
3692
3858
|
getModel() {
|
|
3693
3859
|
return this.tableModel;
|
|
3694
3860
|
}
|
|
3695
3861
|
}
|
|
3696
|
-
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
3862
|
+
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
3697
3863
|
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: TableComponent, selector: "aup-table", inputs: { tableModel: "tableModel" }, providers: [
|
|
3698
3864
|
{ provide: AbstractTableComponent, useExisting: TableComponent }
|
|
3699
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"getModel().dataSource.value\" [trackBy]=\"getModel().trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell
|
|
3865
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"getModel().dataSource.value\" [trackBy]=\"getModel().trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"getModel().isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"getModel()\"\n [editSession]=\"getModel().getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"getModel().getRowClasses(row)\" [class.enable-hover]=\"getModel().isHoverEnabled()\"\n [attr.aup-row-id]=\"getModel().trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}\n"], components: [{ type: i1$b.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: TableHeaderCellComponent, selector: "aup-table-header-cell", inputs: ["column"] }, { type: TableCellComponent, selector: "aup-table-cell", inputs: ["row", "column", "editSession", "tableModel"] }, { type: i1$b.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i1$b.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$b.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i1$b.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i1$b.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i1$b.MatCellDef, selector: "[matCellDef]" }, { type: i1$b.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i1$b.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i1$b.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
3700
3866
|
__decorate([
|
|
3701
3867
|
TrackExternal(),
|
|
3702
3868
|
__metadata("design:type", AbstractTableModel)
|
|
@@ -3705,8 +3871,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
3705
3871
|
type: Component,
|
|
3706
3872
|
args: [{ selector: 'aup-table', providers: [
|
|
3707
3873
|
{ provide: AbstractTableComponent, useExisting: TableComponent }
|
|
3708
|
-
], template: "<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"getModel().dataSource.value\" [trackBy]=\"getModel().trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell
|
|
3709
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { tableModel: [{
|
|
3874
|
+
], template: "<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"getModel().dataSource.value\" [trackBy]=\"getModel().trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"getModel().isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"getModel()\"\n [editSession]=\"getModel().getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"getModel().getRowClasses(row)\" [class.enable-hover]=\"getModel().isHoverEnabled()\"\n [attr.aup-row-id]=\"getModel().trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}\n"] }]
|
|
3875
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Injector }]; }, propDecorators: { tableModel: [{
|
|
3710
3876
|
type: Input
|
|
3711
3877
|
}] } });
|
|
3712
3878
|
|
|
@@ -4285,17 +4451,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
4285
4451
|
* }
|
|
4286
4452
|
*/
|
|
4287
4453
|
class TreeTableComponent extends AbstractTableComponent {
|
|
4288
|
-
constructor(elementRef, ngZone) {
|
|
4289
|
-
super(elementRef, ngZone);
|
|
4454
|
+
constructor(elementRef, ngZone, injector) {
|
|
4455
|
+
super(elementRef, ngZone, injector);
|
|
4290
4456
|
}
|
|
4291
4457
|
getModel() {
|
|
4292
4458
|
return this.treeTableModel;
|
|
4293
4459
|
}
|
|
4294
4460
|
}
|
|
4295
|
-
TreeTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TreeTableComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
4461
|
+
TreeTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TreeTableComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
4296
4462
|
TreeTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: TreeTableComponent, selector: "aup-tree-table", inputs: { treeTableModel: "treeTableModel" }, providers: [
|
|
4297
4463
|
{ provide: AbstractTableComponent, useExisting: TreeTableComponent }
|
|
4298
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"getModel().dataSource.value\" [trackBy]=\"getModel().trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell
|
|
4464
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"getModel().dataSource.value\" [trackBy]=\"getModel().trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"getModel().isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"getModel()\"\n [editSession]=\"getModel().getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"getModel().getRowClasses(row)\" [class.enable-hover]=\"getModel().isHoverEnabled()\"\n [attr.aup-row-id]=\"getModel().trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}\n", "td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}td.mat-column-tree-label,td.mat-column-tree-label{width:1px}aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}aup-tree-label-cell-renderer{flex:1}\n"], components: [{ type: i1$b.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: TableHeaderCellComponent, selector: "aup-table-header-cell", inputs: ["column"] }, { type: TableCellComponent, selector: "aup-table-cell", inputs: ["row", "column", "editSession", "tableModel"] }, { type: i1$b.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i1$b.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$b.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i1$b.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i1$b.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i1$b.MatCellDef, selector: "[matCellDef]" }, { type: i1$b.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i1$b.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i1$b.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
4299
4465
|
__decorate([
|
|
4300
4466
|
TrackExternal(),
|
|
4301
4467
|
__metadata("design:type", TreeTableModel)
|
|
@@ -4304,8 +4470,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
4304
4470
|
type: Component,
|
|
4305
4471
|
args: [{ selector: 'aup-tree-table', providers: [
|
|
4306
4472
|
{ provide: AbstractTableComponent, useExisting: TreeTableComponent }
|
|
4307
|
-
], template: "<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"getModel().dataSource.value\" [trackBy]=\"getModel().trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell
|
|
4308
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { treeTableModel: [{
|
|
4473
|
+
], template: "<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"getModel().dataSource.value\" [trackBy]=\"getModel().trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"getModel().isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"getModel()\"\n [editSession]=\"getModel().getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"getModel().getRowClasses(row)\" [class.enable-hover]=\"getModel().isHoverEnabled()\"\n [attr.aup-row-id]=\"getModel().trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}\n", "td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}td.mat-column-tree-label,td.mat-column-tree-label{width:1px}aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}aup-tree-label-cell-renderer{flex:1}\n"] }]
|
|
4474
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Injector }]; }, propDecorators: { treeTableModel: [{
|
|
4309
4475
|
type: Input
|
|
4310
4476
|
}] } });
|
|
4311
4477
|
|
|
@@ -4529,11 +4695,12 @@ ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
4529
4695
|
EditRowControls,
|
|
4530
4696
|
ColumnTemplateDirective,
|
|
4531
4697
|
DefaultCellRendererComponent,
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4698
|
+
DefaultListCellRendererComponent,
|
|
4699
|
+
TableCellComponent,
|
|
4700
|
+
SelectionCellComponent,
|
|
4701
|
+
SelectionHeaderCellComponent,
|
|
4535
4702
|
DefaultHeaderCellRendererComponent,
|
|
4536
|
-
|
|
4703
|
+
TableHeaderCellComponent,
|
|
4537
4704
|
IconComponent,
|
|
4538
4705
|
SectionHeaderComponent,
|
|
4539
4706
|
TableRowMenuComponent,
|
|
@@ -4692,11 +4859,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
4692
4859
|
EditRowControls,
|
|
4693
4860
|
ColumnTemplateDirective,
|
|
4694
4861
|
DefaultCellRendererComponent,
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4862
|
+
DefaultListCellRendererComponent,
|
|
4863
|
+
TableCellComponent,
|
|
4864
|
+
SelectionCellComponent,
|
|
4865
|
+
SelectionHeaderCellComponent,
|
|
4698
4866
|
DefaultHeaderCellRendererComponent,
|
|
4699
|
-
|
|
4867
|
+
TableHeaderCellComponent,
|
|
4700
4868
|
IconComponent,
|
|
4701
4869
|
SectionHeaderComponent,
|
|
4702
4870
|
TableRowMenuComponent,
|
|
@@ -8042,14 +8210,6 @@ class TableModel extends AbstractTableModel {
|
|
|
8042
8210
|
}
|
|
8043
8211
|
this.setDataSource(sourceOfTruth);
|
|
8044
8212
|
}
|
|
8045
|
-
/**
|
|
8046
|
-
* @deprecated use new TableModel(sourceOfTruth, table => {...}); instead.
|
|
8047
|
-
* @param sourceOfTruth
|
|
8048
|
-
* @param builder
|
|
8049
|
-
*/
|
|
8050
|
-
static fromList(sourceOfTruth, builder) {
|
|
8051
|
-
return new TableModel(sourceOfTruth, builder);
|
|
8052
|
-
}
|
|
8053
8213
|
addSelectionColumn(selectionModel, showSelectionColumn) {
|
|
8054
8214
|
return this._addSelectionColumn(selectionModel, showSelectionColumn);
|
|
8055
8215
|
}
|
|
@@ -9991,5 +10151,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
9991
10151
|
* Generated bundle index. Do not edit.
|
|
9992
10152
|
*/
|
|
9993
10153
|
|
|
9994
|
-
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, 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, 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, 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,
|
|
10154
|
+
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, DefaultListCellRendererComponent, 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, 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 };
|
|
9995
10155
|
//# sourceMappingURL=coolon-angular-ui-powerups.mjs.map
|