@dereekb/dbx-web 9.20.20 → 9.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/calendar/package.json +2 -2
  2. package/esm2020/lib/action/snackbar/action.snackbar.component.mjs +1 -1
  3. package/esm2020/lib/action/transition/transition.safety.dialog.component.mjs +1 -1
  4. package/esm2020/lib/button/button.component.mjs +14 -2
  5. package/esm2020/lib/button/progress/base.progress.button.directive.mjs +3 -1
  6. package/esm2020/lib/button/progress/button.progress.config.mjs +1 -1
  7. package/esm2020/lib/button/progress/spinner.button.component.mjs +7 -4
  8. package/esm2020/lib/extension/model/model.tracker.view.storage.mjs +2 -3
  9. package/esm2020/lib/extension/model/model.types.service.mjs +2 -3
  10. package/esm2020/lib/extension/model/state/effects/tracker.effects.mjs +2 -2
  11. package/esm2020/lib/interaction/filter/filter.preset.menu.component.mjs +2 -3
  12. package/esm2020/lib/interaction/filter/filter.preset.mjs +2 -3
  13. package/esm2020/lib/interaction/filter/filter.wrapper.component.mjs +1 -1
  14. package/esm2020/lib/interaction/popup/popup.controls.buttons.component.mjs +1 -1
  15. package/esm2020/lib/layout/column/two/two.column.sref.showright.directive.mjs +2 -3
  16. package/esm2020/lib/layout/content/content.layout.module.mjs +31 -4
  17. package/esm2020/lib/layout/content/content.pit.directive.mjs +19 -0
  18. package/esm2020/lib/layout/content/index.mjs +2 -1
  19. package/esm2020/lib/layout/list/list.wrapper.mjs +1 -1
  20. package/esm2020/mapbox/lib/mapbox.change.service.mjs +2 -3
  21. package/esm2020/table/dereekb-dbx-web-table.mjs +5 -0
  22. package/esm2020/table/index.mjs +2 -0
  23. package/esm2020/table/lib/date/date.table.column.header.component.mjs +49 -0
  24. package/esm2020/table/lib/date/daterange.table.cell.input.component.mjs +166 -0
  25. package/esm2020/table/lib/date/index.mjs +4 -0
  26. package/esm2020/table/lib/date/table.date.module.mjs +68 -0
  27. package/esm2020/table/lib/index.mjs +18 -0
  28. package/esm2020/table/lib/table.cell.action.component.mjs +28 -0
  29. package/esm2020/table/lib/table.cell.input.component.mjs +31 -0
  30. package/esm2020/table/lib/table.cell.summaryend.component.mjs +28 -0
  31. package/esm2020/table/lib/table.cell.summarystart.component.mjs +31 -0
  32. package/esm2020/table/lib/table.column.directive.mjs +30 -0
  33. package/esm2020/table/lib/table.column.footer.component.mjs +35 -0
  34. package/esm2020/table/lib/table.column.header.component.mjs +35 -0
  35. package/esm2020/table/lib/table.component.mjs +58 -0
  36. package/esm2020/table/lib/table.directive.mjs +37 -0
  37. package/esm2020/table/lib/table.item.action.component.mjs +35 -0
  38. package/esm2020/table/lib/table.item.cell.component.mjs +39 -0
  39. package/esm2020/table/lib/table.item.directive.mjs +30 -0
  40. package/esm2020/table/lib/table.item.header.component.mjs +27 -0
  41. package/esm2020/table/lib/table.mjs +2 -0
  42. package/esm2020/table/lib/table.module.mjs +74 -0
  43. package/esm2020/table/lib/table.store.mjs +53 -0
  44. package/fesm2015/dereekb-dbx-web-mapbox.mjs +1 -2
  45. package/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
  46. package/fesm2015/dereekb-dbx-web-table.mjs +745 -0
  47. package/fesm2015/dereekb-dbx-web-table.mjs.map +1 -0
  48. package/fesm2015/dereekb-dbx-web.mjs +99 -38
  49. package/fesm2015/dereekb-dbx-web.mjs.map +1 -1
  50. package/fesm2020/dereekb-dbx-web-mapbox.mjs +1 -2
  51. package/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
  52. package/fesm2020/dereekb-dbx-web-table.mjs +738 -0
  53. package/fesm2020/dereekb-dbx-web-table.mjs.map +1 -0
  54. package/fesm2020/dereekb-dbx-web.mjs +97 -38
  55. package/fesm2020/dereekb-dbx-web.mjs.map +1 -1
  56. package/lib/button/_button.scss +4 -0
  57. package/lib/button/button.component.d.ts +5 -2
  58. package/lib/button/progress/button.progress.config.d.ts +7 -0
  59. package/lib/button/progress/spinner.button.component.d.ts +1 -0
  60. package/lib/extension/_extension.scss +19 -0
  61. package/lib/extension/table/_table.scss +60 -0
  62. package/lib/layout/content/_content.scss +14 -0
  63. package/lib/layout/content/content.layout.module.d.ts +3 -2
  64. package/lib/layout/content/content.pit.directive.d.ts +8 -0
  65. package/lib/layout/content/index.d.ts +1 -0
  66. package/lib/layout/list/list.wrapper.d.ts +2 -1
  67. package/lib/layout/style/_style.scss +4 -0
  68. package/lib/style/_config.scss +8 -2
  69. package/mapbox/esm2020/lib/mapbox.change.service.mjs +2 -3
  70. package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs +1 -2
  71. package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
  72. package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs +1 -2
  73. package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
  74. package/mapbox/package.json +3 -3
  75. package/package.json +14 -6
  76. package/table/README.md +6 -0
  77. package/table/esm2020/dereekb-dbx-web-table.mjs +5 -0
  78. package/table/esm2020/index.mjs +2 -0
  79. package/table/esm2020/lib/date/date.table.column.header.component.mjs +49 -0
  80. package/table/esm2020/lib/date/daterange.table.cell.input.component.mjs +166 -0
  81. package/table/esm2020/lib/date/index.mjs +4 -0
  82. package/table/esm2020/lib/date/table.date.module.mjs +68 -0
  83. package/table/esm2020/lib/index.mjs +18 -0
  84. package/table/esm2020/lib/table.cell.action.component.mjs +28 -0
  85. package/table/esm2020/lib/table.cell.input.component.mjs +31 -0
  86. package/table/esm2020/lib/table.cell.summaryend.component.mjs +28 -0
  87. package/table/esm2020/lib/table.cell.summarystart.component.mjs +31 -0
  88. package/table/esm2020/lib/table.column.directive.mjs +30 -0
  89. package/table/esm2020/lib/table.column.footer.component.mjs +35 -0
  90. package/table/esm2020/lib/table.column.header.component.mjs +35 -0
  91. package/table/esm2020/lib/table.component.mjs +58 -0
  92. package/table/esm2020/lib/table.directive.mjs +37 -0
  93. package/table/esm2020/lib/table.item.action.component.mjs +35 -0
  94. package/table/esm2020/lib/table.item.cell.component.mjs +39 -0
  95. package/table/esm2020/lib/table.item.directive.mjs +30 -0
  96. package/table/esm2020/lib/table.item.header.component.mjs +27 -0
  97. package/table/esm2020/lib/table.mjs +2 -0
  98. package/table/esm2020/lib/table.module.mjs +74 -0
  99. package/table/esm2020/lib/table.store.mjs +53 -0
  100. package/table/fesm2015/dereekb-dbx-web-table.mjs +745 -0
  101. package/table/fesm2015/dereekb-dbx-web-table.mjs.map +1 -0
  102. package/table/fesm2020/dereekb-dbx-web-table.mjs +738 -0
  103. package/table/fesm2020/dereekb-dbx-web-table.mjs.map +1 -0
  104. package/table/index.d.ts +1 -0
  105. package/table/lib/date/date.table.column.header.component.d.ts +18 -0
  106. package/table/lib/date/daterange.table.cell.input.component.d.ts +66 -0
  107. package/table/lib/date/index.d.ts +3 -0
  108. package/table/lib/date/table.date.module.d.ts +16 -0
  109. package/table/lib/index.d.ts +17 -0
  110. package/table/lib/table.cell.action.component.d.ts +9 -0
  111. package/table/lib/table.cell.input.component.d.ts +12 -0
  112. package/table/lib/table.cell.summaryend.component.d.ts +9 -0
  113. package/table/lib/table.cell.summarystart.component.d.ts +12 -0
  114. package/table/lib/table.column.directive.d.ts +18 -0
  115. package/table/lib/table.column.footer.component.d.ts +8 -0
  116. package/table/lib/table.column.header.component.d.ts +8 -0
  117. package/table/lib/table.component.d.ts +29 -0
  118. package/table/lib/table.d.ts +99 -0
  119. package/table/lib/table.directive.d.ts +16 -0
  120. package/table/lib/table.item.action.component.d.ts +7 -0
  121. package/table/lib/table.item.cell.component.d.ts +13 -0
  122. package/table/lib/table.item.directive.d.ts +17 -0
  123. package/table/lib/table.item.header.component.d.ts +7 -0
  124. package/table/lib/table.module.d.ts +22 -0
  125. package/table/lib/table.store.d.ts +38 -0
  126. package/table/package.json +35 -0
@@ -0,0 +1,745 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Injectable, NgModule, Directive, Input } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import { isSameDateDay } from '@dereekb/date';
6
+ import * as i4 from '@angular/material/datepicker';
7
+ import { DateRange, MAT_DATE_RANGE_SELECTION_STRATEGY, MatDatepickerModule } from '@angular/material/datepicker';
8
+ import * as i3 from '@angular/forms';
9
+ import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
10
+ import { filterMaybe, beginLoading, valueFromLoadingState, SubscriptionObject, loadingStateContext } from '@dereekb/rxjs';
11
+ import { format, addDays } from 'date-fns';
12
+ import { switchMap, first, tap, map, distinctUntilChanged, shareReplay, combineLatest, of, BehaviorSubject, startWith, filter, throttleTime } from 'rxjs';
13
+ import * as i1 from '@angular/material/core';
14
+ import { ComponentStore } from '@ngrx/component-store';
15
+ import * as i5 from '@angular/material/button';
16
+ import { MatButtonModule } from '@angular/material/button';
17
+ import { MatIconModule } from '@angular/material/icon';
18
+ import * as i3$1 from '@dereekb/dbx-web';
19
+ import { DbxLoadingModule } from '@dereekb/dbx-web';
20
+ import * as i4$1 from '@angular/material/table';
21
+ import { MatTableModule } from '@angular/material/table';
22
+ import * as i1$1 from '@dereekb/dbx-core';
23
+ import { DbxInjectionComponentModule } from '@dereekb/dbx-core';
24
+ import * as i5$1 from 'ngx-infinite-scroll';
25
+ import { InfiniteScrollModule } from 'ngx-infinite-scroll';
26
+
27
+ /**
28
+ * A table header component used for rendering date values on the header.
29
+ */
30
+ class DbxTableDateHeaderComponent {
31
+ constructor() {
32
+ this.left = 'E';
33
+ this.right = 'MMM d';
34
+ }
35
+ get date() {
36
+ return this._date;
37
+ }
38
+ set date(date) {
39
+ this._date = date;
40
+ }
41
+ }
42
+ DbxTableDateHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDateHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
43
+ DbxTableDateHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableDateHeaderComponent, selector: "ng-component", ngImport: i0, template: `
44
+ <div *ngIf="date" class="dbx-table-date-column-header">
45
+ <span class="dbx-table-date-column-header-left">{{ date | date: left }}</span>
46
+ <span>{{ date | date: right }}</span>
47
+ </div>
48
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDateHeaderComponent, decorators: [{
50
+ type: Component,
51
+ args: [{
52
+ template: `
53
+ <div *ngIf="date" class="dbx-table-date-column-header">
54
+ <span class="dbx-table-date-column-header-left">{{ date | date: left }}</span>
55
+ <span>{{ date | date: right }}</span>
56
+ </div>
57
+ `,
58
+ changeDetection: ChangeDetectionStrategy.OnPush
59
+ }]
60
+ }], ctorParameters: function () { return []; } });
61
+ function dbxTableDateHeaderInjectionFactory() {
62
+ return (column) => {
63
+ const config = {
64
+ componentClass: DbxTableDateHeaderComponent,
65
+ init: (x) => {
66
+ x.date = column.meta;
67
+ }
68
+ };
69
+ return config;
70
+ };
71
+ }
72
+
73
+ class DbxTableStore extends ComponentStore {
74
+ constructor() {
75
+ super({
76
+ input: null,
77
+ dataDelegate: null,
78
+ viewDelegate: null
79
+ });
80
+ // MARK: Effects
81
+ this.loadMore = this.effect((input) => {
82
+ return input.pipe(switchMap(() => this.data$.pipe(first(), tap((x) => {
83
+ if (x.loadMore) {
84
+ x.loadMore();
85
+ }
86
+ }))));
87
+ });
88
+ // MARK: Accessors
89
+ this.input$ = this.state$.pipe(map((x) => x.input), distinctUntilChanged(), shareReplay(1));
90
+ this.dataDelegate$ = this.state$.pipe(map((x) => x.dataDelegate), distinctUntilChanged(), shareReplay(1));
91
+ this.currentViewDelegate$ = this.state$.pipe(map((x) => x.viewDelegate), distinctUntilChanged(), shareReplay(1));
92
+ this.viewDelegate$ = this.currentViewDelegate$.pipe(filterMaybe());
93
+ this.dataState$ = combineLatest([this.input$, this.dataDelegate$]).pipe(switchMap(([input, dataDelegate]) => {
94
+ let obs;
95
+ if (input && dataDelegate) {
96
+ obs = dataDelegate.loadData(input);
97
+ }
98
+ else {
99
+ obs = of(beginLoading());
100
+ }
101
+ return obs;
102
+ }), shareReplay(1));
103
+ this.data$ = this.dataState$.pipe(
104
+ //
105
+ valueFromLoadingState(), distinctUntilChanged(), shareReplay(1));
106
+ this.columns$ = this.data$.pipe(map((x) => x.columns), shareReplay(1));
107
+ this.itemsState$ = this.data$.pipe(switchMap((x) => x.items$), shareReplay(1));
108
+ this.items$ = this.itemsState$.pipe(valueFromLoadingState(), shareReplay(1));
109
+ // MARK: State Changes
110
+ this.setInput = this.updater((state, input) => (Object.assign(Object.assign({}, state), { input })));
111
+ this.setDataDelegate = this.updater((state, dataDelegate) => (Object.assign(Object.assign({}, state), { dataDelegate })));
112
+ this.setViewDelegate = this.updater((state, viewDelegate) => (Object.assign(Object.assign({}, state), { viewDelegate })));
113
+ }
114
+ }
115
+ DbxTableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
116
+ DbxTableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableStore });
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableStore, decorators: [{
118
+ type: Injectable
119
+ }], ctorParameters: function () { return []; } });
120
+
121
+ class DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy {
122
+ constructor(_dateAdapter, dbxTableDateRangeDayDistanceInputCellInputComponent) {
123
+ this._dateAdapter = _dateAdapter;
124
+ this.dbxTableDateRangeDayDistanceInputCellInputComponent = dbxTableDateRangeDayDistanceInputCellInputComponent;
125
+ }
126
+ selectionFinished(date) {
127
+ return this._createFiveDayRange(date);
128
+ }
129
+ createPreview(activeDate) {
130
+ return this._createFiveDayRange(activeDate);
131
+ }
132
+ _createFiveDayRange(date) {
133
+ if (date) {
134
+ const start = date;
135
+ const end = this._dateAdapter.addCalendarDays(date, this.dbxTableDateRangeDayDistanceInputCellInputComponent.daysDistance);
136
+ return new DateRange(start, end);
137
+ }
138
+ return new DateRange(null, null);
139
+ }
140
+ }
141
+ DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy, deps: [{ token: i1.DateAdapter }, { token: DbxTableDateRangeDayDistanceInputCellInputComponent }], target: i0.ɵɵFactoryTarget.Injectable });
142
+ DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy });
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy, decorators: [{
144
+ type: Injectable
145
+ }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DbxTableDateRangeDayDistanceInputCellInputComponent }]; } });
146
+ const DEFAULT_DBX_TABLE_DATE_RANGE_DAY_DISTIANCE_INPUT_CELL_COMPONENT_CONFIG = { daysDistance: 6 };
147
+ const DEFAULT_DBX_TABLE_DATE_RANGE_DAY_BUTTON_FORMAT = 'MMM dd';
148
+ /**
149
+ * Cell input for a DateRangeDayDistanceInput value.
150
+ */
151
+ class DbxTableDateRangeDayDistanceInputCellInputComponent {
152
+ constructor(tableStore) {
153
+ this.tableStore = tableStore;
154
+ this._syncSub = new SubscriptionObject();
155
+ this._valueSub = new SubscriptionObject();
156
+ this._pickerOpened = new BehaviorSubject(false);
157
+ this._config = new BehaviorSubject(DEFAULT_DBX_TABLE_DATE_RANGE_DAY_DISTIANCE_INPUT_CELL_COMPONENT_CONFIG);
158
+ this.range = new FormGroup({
159
+ start: new FormControl(null),
160
+ end: new FormControl(null)
161
+ });
162
+ this.pickerOpened$ = this._pickerOpened.asObservable();
163
+ this.minDate$ = this._config.pipe(map((x) => x.minDate));
164
+ this.maxDate$ = this._config.pipe(map((x) => x.maxDate));
165
+ this.buttonFormat$ = this._config.pipe(map((x) => { var _a; return (_a = x.buttonFormat) !== null && _a !== void 0 ? _a : DEFAULT_DBX_TABLE_DATE_RANGE_DAY_BUTTON_FORMAT; }));
166
+ this.dateRangeString$ = combineLatest([this.buttonFormat$, this.range.valueChanges]).pipe(map(([buttonFormat, { start, end }]) => {
167
+ if (start && end) {
168
+ return `${format(start, buttonFormat)} - ${format(end, buttonFormat)}`;
169
+ }
170
+ else {
171
+ return `Select Date`;
172
+ }
173
+ }));
174
+ }
175
+ ngOnInit() {
176
+ this._syncSub.subscription = this.tableStore.input$.subscribe((x) => {
177
+ var _a;
178
+ const start = (_a = x === null || x === void 0 ? void 0 : x.date) !== null && _a !== void 0 ? _a : null;
179
+ const end = start ? addDays(start, this.daysDistance) : undefined;
180
+ this.range.setValue({
181
+ start,
182
+ end
183
+ });
184
+ });
185
+ this._valueSub.subscription = this._pickerOpened
186
+ .pipe(distinctUntilChanged(), switchMap((opened) => {
187
+ let obs;
188
+ if (opened) {
189
+ obs = of({});
190
+ }
191
+ else {
192
+ obs = this.range.valueChanges.pipe(startWith(this.range.value));
193
+ }
194
+ return obs;
195
+ }), filter((x) => Boolean(x.start)), distinctUntilChanged((a, b) => isSameDateDay(a.start, b.start)), throttleTime(100, undefined, { trailing: true }))
196
+ .subscribe((x) => {
197
+ if (x.start) {
198
+ this.tableStore.setInput({ date: x.start, distance: this.daysDistance });
199
+ }
200
+ });
201
+ }
202
+ ngOnDestroy() {
203
+ this._pickerOpened.complete();
204
+ this._config.complete();
205
+ this._syncSub.destroy();
206
+ this._valueSub.destroy();
207
+ }
208
+ get daysDistance() {
209
+ return this._config.value.daysDistance;
210
+ }
211
+ get config() {
212
+ return this._config.value;
213
+ }
214
+ set config(config) {
215
+ this._config.next(config || DEFAULT_DBX_TABLE_DATE_RANGE_DAY_DISTIANCE_INPUT_CELL_COMPONENT_CONFIG);
216
+ }
217
+ pickerOpened() {
218
+ this._pickerOpened.next(true);
219
+ }
220
+ pickerClosed() {
221
+ this._pickerOpened.next(false);
222
+ }
223
+ }
224
+ DbxTableDateRangeDayDistanceInputCellInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputComponent, deps: [{ token: DbxTableStore }], target: i0.ɵɵFactoryTarget.Component });
225
+ DbxTableDateRangeDayDistanceInputCellInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableDateRangeDayDistanceInputCellInputComponent, selector: "ng-component", providers: [
226
+ {
227
+ provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
228
+ useClass: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy
229
+ }
230
+ ], ngImport: i0, template: `
231
+ <div class="dbx-table-date-range-distance-input-cell">
232
+ <mat-date-range-input class="dbx-table-date-range-distance-input" [min]="minDate$ | async" [max]="maxDate$ | async" [formGroup]="range" [rangePicker]="picker">
233
+ <input matStartDate formControlName="start" placeholder="Start date" />
234
+ <input matEndDate formControlName="end" placeholder="End date" />
235
+ </mat-date-range-input>
236
+ <button mat-stroked-button color="primary" (click)="picker.open()">{{ dateRangeString$ | async }}</button>
237
+ <mat-date-range-picker #picker (opened)="pickerOpened()" (closed)="pickerClosed()"></mat-date-range-picker>
238
+ </div>
239
+ `, isInline: true, dependencies: [{ kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i4.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i4.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i4.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "component", type: i5.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"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputComponent, decorators: [{
241
+ type: Component,
242
+ args: [{
243
+ template: `
244
+ <div class="dbx-table-date-range-distance-input-cell">
245
+ <mat-date-range-input class="dbx-table-date-range-distance-input" [min]="minDate$ | async" [max]="maxDate$ | async" [formGroup]="range" [rangePicker]="picker">
246
+ <input matStartDate formControlName="start" placeholder="Start date" />
247
+ <input matEndDate formControlName="end" placeholder="End date" />
248
+ </mat-date-range-input>
249
+ <button mat-stroked-button color="primary" (click)="picker.open()">{{ dateRangeString$ | async }}</button>
250
+ <mat-date-range-picker #picker (opened)="pickerOpened()" (closed)="pickerClosed()"></mat-date-range-picker>
251
+ </div>
252
+ `,
253
+ providers: [
254
+ {
255
+ provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
256
+ useClass: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy
257
+ }
258
+ ],
259
+ changeDetection: ChangeDetectionStrategy.OnPush
260
+ }]
261
+ }], ctorParameters: function () { return [{ type: DbxTableStore }]; } });
262
+ function dbxTableDateRangeDayDistanceInputCellInput(componentConfig) {
263
+ const config = {
264
+ componentClass: DbxTableDateRangeDayDistanceInputCellInputComponent,
265
+ init: (x) => {
266
+ x.config = componentConfig;
267
+ }
268
+ };
269
+ return config;
270
+ }
271
+
272
+ const declarations = [
273
+ //
274
+ DbxTableDateHeaderComponent,
275
+ DbxTableDateRangeDayDistanceInputCellInputComponent
276
+ ];
277
+ class DbxTableDateModule {
278
+ }
279
+ DbxTableDateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
280
+ DbxTableDateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDateModule, declarations: [
281
+ //
282
+ DbxTableDateHeaderComponent,
283
+ DbxTableDateRangeDayDistanceInputCellInputComponent
284
+ ], imports: [
285
+ //
286
+ CommonModule,
287
+ DbxLoadingModule,
288
+ DbxInjectionComponentModule,
289
+ FormsModule,
290
+ ReactiveFormsModule,
291
+ MatIconModule,
292
+ MatDatepickerModule,
293
+ MatButtonModule,
294
+ MatTableModule
295
+ ], exports: [
296
+ //
297
+ DbxTableDateHeaderComponent,
298
+ DbxTableDateRangeDayDistanceInputCellInputComponent
299
+ ] });
300
+ DbxTableDateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDateModule, imports: [
301
+ //
302
+ CommonModule,
303
+ DbxLoadingModule,
304
+ DbxInjectionComponentModule,
305
+ FormsModule,
306
+ ReactiveFormsModule,
307
+ MatIconModule,
308
+ MatDatepickerModule,
309
+ MatButtonModule,
310
+ MatTableModule
311
+ ] });
312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDateModule, decorators: [{
313
+ type: NgModule,
314
+ args: [{
315
+ imports: [
316
+ //
317
+ CommonModule,
318
+ DbxLoadingModule,
319
+ DbxInjectionComponentModule,
320
+ FormsModule,
321
+ ReactiveFormsModule,
322
+ MatIconModule,
323
+ MatDatepickerModule,
324
+ MatButtonModule,
325
+ MatTableModule
326
+ ],
327
+ declarations,
328
+ exports: declarations
329
+ }]
330
+ }] });
331
+
332
+ class DbxTableActionCellComponent {
333
+ constructor(tableStore) {
334
+ this.tableStore = tableStore;
335
+ this.config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.summaryRowEnd), distinctUntilChanged());
336
+ }
337
+ }
338
+ DbxTableActionCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableActionCellComponent, deps: [{ token: DbxTableStore }], target: i0.ɵɵFactoryTarget.Component });
339
+ DbxTableActionCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableActionCellComponent, selector: "dbx-table-action-cell", ngImport: i0, template: `
340
+ <dbx-injection [config]="config$ | async"></dbx-injection>
341
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableActionCellComponent, decorators: [{
343
+ type: Component,
344
+ args: [{
345
+ selector: 'dbx-table-action-cell',
346
+ template: `
347
+ <dbx-injection [config]="config$ | async"></dbx-injection>
348
+ `,
349
+ changeDetection: ChangeDetectionStrategy.OnPush
350
+ }]
351
+ }], ctorParameters: function () { return [{ type: DbxTableStore }]; } });
352
+
353
+ /**
354
+ * A table header component used for injecting the input picker view.
355
+ */
356
+ class DbxTableInputCellComponent {
357
+ constructor(tableStore) {
358
+ this.tableStore = tableStore;
359
+ this.config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.inputHeader), distinctUntilChanged());
360
+ }
361
+ }
362
+ DbxTableInputCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableInputCellComponent, deps: [{ token: DbxTableStore }], target: i0.ɵɵFactoryTarget.Component });
363
+ DbxTableInputCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableInputCellComponent, selector: "dbx-table-input-cell", ngImport: i0, template: `
364
+ <dbx-injection [config]="config$ | async"></dbx-injection>
365
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableInputCellComponent, decorators: [{
367
+ type: Component,
368
+ args: [{
369
+ selector: 'dbx-table-input-cell',
370
+ template: `
371
+ <dbx-injection [config]="config$ | async"></dbx-injection>
372
+ `,
373
+ changeDetection: ChangeDetectionStrategy.OnPush
374
+ }]
375
+ }], ctorParameters: function () { return [{ type: DbxTableStore }]; } });
376
+
377
+ class DbxTableSummaryEndCellComponent {
378
+ constructor(tableStore) {
379
+ this.tableStore = tableStore;
380
+ this.config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.summaryRowEnd), distinctUntilChanged());
381
+ }
382
+ }
383
+ DbxTableSummaryEndCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableSummaryEndCellComponent, deps: [{ token: DbxTableStore }], target: i0.ɵɵFactoryTarget.Component });
384
+ DbxTableSummaryEndCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableSummaryEndCellComponent, selector: "dbx-table-summary-end-cell", ngImport: i0, template: `
385
+ <dbx-injection [config]="config$ | async"></dbx-injection>
386
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableSummaryEndCellComponent, decorators: [{
388
+ type: Component,
389
+ args: [{
390
+ selector: 'dbx-table-summary-end-cell',
391
+ template: `
392
+ <dbx-injection [config]="config$ | async"></dbx-injection>
393
+ `,
394
+ changeDetection: ChangeDetectionStrategy.OnPush
395
+ }]
396
+ }], ctorParameters: function () { return [{ type: DbxTableStore }]; } });
397
+
398
+ /**
399
+ * A table header component used for injecting the input picker view.
400
+ */
401
+ class DbxTableSummaryStartCellComponent {
402
+ constructor(tableStore) {
403
+ this.tableStore = tableStore;
404
+ this.config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.summaryRowHeader), distinctUntilChanged());
405
+ }
406
+ }
407
+ DbxTableSummaryStartCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableSummaryStartCellComponent, deps: [{ token: DbxTableStore }], target: i0.ɵɵFactoryTarget.Component });
408
+ DbxTableSummaryStartCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableSummaryStartCellComponent, selector: "dbx-table-summary-start-cell", ngImport: i0, template: `
409
+ <dbx-injection [config]="config$ | async"></dbx-injection>
410
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableSummaryStartCellComponent, decorators: [{
412
+ type: Component,
413
+ args: [{
414
+ selector: 'dbx-table-summary-start-cell',
415
+ template: `
416
+ <dbx-injection [config]="config$ | async"></dbx-injection>
417
+ `,
418
+ changeDetection: ChangeDetectionStrategy.OnPush
419
+ }]
420
+ }], ctorParameters: function () { return [{ type: DbxTableStore }]; } });
421
+
422
+ /**
423
+ * Abstract directive that has a column input.
424
+ */
425
+ class AbstractDbxTableColumnDirective {
426
+ constructor(tableStore) {
427
+ this.tableStore = tableStore;
428
+ this._column = new BehaviorSubject(undefined);
429
+ this.column$ = this._column.pipe(filterMaybe(), distinctUntilChanged());
430
+ }
431
+ set column(column) {
432
+ this._column.next(column);
433
+ }
434
+ ngOnDestroy() {
435
+ this._column.complete();
436
+ }
437
+ }
438
+ AbstractDbxTableColumnDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbstractDbxTableColumnDirective, deps: [{ token: DbxTableStore }], target: i0.ɵɵFactoryTarget.Directive });
439
+ AbstractDbxTableColumnDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: AbstractDbxTableColumnDirective, inputs: { column: "column" }, ngImport: i0 });
440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbstractDbxTableColumnDirective, decorators: [{
441
+ type: Directive
442
+ }], ctorParameters: function () { return [{ type: DbxTableStore }]; }, propDecorators: { column: [{
443
+ type: Input
444
+ }] } });
445
+
446
+ class DbxTableColumnHeaderComponent extends AbstractDbxTableColumnDirective {
447
+ constructor() {
448
+ super(...arguments);
449
+ this.config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => {
450
+ const columnHeader = viewDelegate.columnHeader;
451
+ if (columnHeader) {
452
+ return this.column$.pipe(map((x) => columnHeader(x)));
453
+ }
454
+ else {
455
+ return of(undefined);
456
+ }
457
+ }), distinctUntilChanged());
458
+ }
459
+ }
460
+ DbxTableColumnHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableColumnHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
461
+ DbxTableColumnHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableColumnHeaderComponent, selector: "dbx-table-column-header", usesInheritance: true, ngImport: i0, template: `
462
+ <dbx-injection [config]="config$ | async"></dbx-injection>
463
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
464
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableColumnHeaderComponent, decorators: [{
465
+ type: Component,
466
+ args: [{
467
+ selector: 'dbx-table-column-header',
468
+ template: `
469
+ <dbx-injection [config]="config$ | async"></dbx-injection>
470
+ `,
471
+ changeDetection: ChangeDetectionStrategy.OnPush
472
+ }]
473
+ }] });
474
+
475
+ class DbxTableColumnFooterComponent extends AbstractDbxTableColumnDirective {
476
+ constructor() {
477
+ super(...arguments);
478
+ this.config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => {
479
+ const columnFooter = viewDelegate.columnFooter;
480
+ if (columnFooter) {
481
+ return this.column$.pipe(map((x) => columnFooter(x)));
482
+ }
483
+ else {
484
+ return of(undefined);
485
+ }
486
+ }), distinctUntilChanged());
487
+ }
488
+ }
489
+ DbxTableColumnFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableColumnFooterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
490
+ DbxTableColumnFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableColumnFooterComponent, selector: "dbx-table-column-footer", usesInheritance: true, ngImport: i0, template: `
491
+ <dbx-injection [config]="config$ | async"></dbx-injection>
492
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
493
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableColumnFooterComponent, decorators: [{
494
+ type: Component,
495
+ args: [{
496
+ selector: 'dbx-table-column-footer',
497
+ template: `
498
+ <dbx-injection [config]="config$ | async"></dbx-injection>
499
+ `,
500
+ changeDetection: ChangeDetectionStrategy.OnPush
501
+ }]
502
+ }] });
503
+
504
+ /**
505
+ * Abstract directive that has an element input.
506
+ */
507
+ class AbstractDbxTableElementDirective {
508
+ constructor(tableStore) {
509
+ this.tableStore = tableStore;
510
+ this._element = new BehaviorSubject(undefined);
511
+ this.element$ = this._element.pipe(filterMaybe(), distinctUntilChanged());
512
+ }
513
+ set element(element) {
514
+ this._element.next(element);
515
+ }
516
+ ngOnDestroy() {
517
+ this._element.complete();
518
+ }
519
+ }
520
+ AbstractDbxTableElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbstractDbxTableElementDirective, deps: [{ token: DbxTableStore }], target: i0.ɵɵFactoryTarget.Directive });
521
+ AbstractDbxTableElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: AbstractDbxTableElementDirective, inputs: { element: "element" }, ngImport: i0 });
522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbstractDbxTableElementDirective, decorators: [{
523
+ type: Directive
524
+ }], ctorParameters: function () { return [{ type: DbxTableStore }]; }, propDecorators: { element: [{
525
+ type: Input
526
+ }] } });
527
+
528
+ class DbxTableItemCellComponent extends AbstractDbxTableElementDirective {
529
+ constructor() {
530
+ super(...arguments);
531
+ this._column = new BehaviorSubject(undefined);
532
+ this.column$ = this._column.pipe(filterMaybe(), distinctUntilChanged());
533
+ this.config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => combineLatest([this.column$, this.element$]).pipe(map(([column, element]) => viewDelegate.itemCell(column, element)))), distinctUntilChanged());
534
+ }
535
+ set column(column) {
536
+ this._column.next(column);
537
+ }
538
+ ngOnDestroy() {
539
+ super.ngOnDestroy();
540
+ this._column.complete();
541
+ }
542
+ }
543
+ DbxTableItemCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableItemCellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
544
+ DbxTableItemCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableItemCellComponent, selector: "dbx-table-item-cell", inputs: { column: "column" }, usesInheritance: true, ngImport: i0, template: `
545
+ <dbx-injection [config]="config$ | async"></dbx-injection>
546
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
547
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableItemCellComponent, decorators: [{
548
+ type: Component,
549
+ args: [{
550
+ selector: 'dbx-table-item-cell',
551
+ template: `
552
+ <dbx-injection [config]="config$ | async"></dbx-injection>
553
+ `,
554
+ changeDetection: ChangeDetectionStrategy.OnPush
555
+ }]
556
+ }], propDecorators: { column: [{
557
+ type: Input
558
+ }] } });
559
+
560
+ class DbxTableItemHeaderComponent extends AbstractDbxTableElementDirective {
561
+ constructor() {
562
+ super(...arguments);
563
+ this.config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => this.element$.pipe(map((x) => viewDelegate.itemHeader(x)))), distinctUntilChanged());
564
+ }
565
+ }
566
+ DbxTableItemHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableItemHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
567
+ DbxTableItemHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableItemHeaderComponent, selector: "dbx-table-item-header", usesInheritance: true, ngImport: i0, template: `
568
+ <dbx-injection [config]="config$ | async"></dbx-injection>
569
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableItemHeaderComponent, decorators: [{
571
+ type: Component,
572
+ args: [{
573
+ selector: 'dbx-table-item-header',
574
+ template: `
575
+ <dbx-injection [config]="config$ | async"></dbx-injection>
576
+ `,
577
+ changeDetection: ChangeDetectionStrategy.OnPush
578
+ }]
579
+ }] });
580
+
581
+ class DbxTableItemActionComponent extends AbstractDbxTableElementDirective {
582
+ constructor() {
583
+ super(...arguments);
584
+ this.config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => {
585
+ const itemAction = viewDelegate.itemAction;
586
+ if (itemAction) {
587
+ return this.element$.pipe(map((x) => itemAction(x)));
588
+ }
589
+ else {
590
+ return of(undefined);
591
+ }
592
+ }), distinctUntilChanged());
593
+ }
594
+ }
595
+ DbxTableItemActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableItemActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
596
+ DbxTableItemActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableItemActionComponent, selector: "dbx-table-item-action", usesInheritance: true, ngImport: i0, template: `
597
+ <dbx-injection [config]="config$ | async"></dbx-injection>
598
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
599
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableItemActionComponent, decorators: [{
600
+ type: Component,
601
+ args: [{
602
+ selector: 'dbx-table-item-action',
603
+ template: `
604
+ <dbx-injection [config]="config$ | async"></dbx-injection>
605
+ `,
606
+ changeDetection: ChangeDetectionStrategy.OnPush
607
+ }]
608
+ }] });
609
+
610
+ const DBX_TABLE_ITEMS_COLUMN_NAME = '_items';
611
+ const DBX_TABLE_ACTIONS_COLUMN_NAME = '_actions';
612
+ /**
613
+ * A table with fixed content
614
+ */
615
+ class DbxTableViewComponent {
616
+ constructor(tableStore) {
617
+ this.tableStore = tableStore;
618
+ this.DEFAULT_TRACK_BY_FUNCTION = (index) => {
619
+ return index;
620
+ };
621
+ this.scrollDistance = 0.5;
622
+ this.throttleScroll = 50;
623
+ this.itemsColumnName = DBX_TABLE_ITEMS_COLUMN_NAME;
624
+ this.actionsColumnName = DBX_TABLE_ACTIONS_COLUMN_NAME;
625
+ this.innerColumns$ = this.tableStore.columns$;
626
+ this.innerColumnNames$ = this.innerColumns$.pipe(map((x) => x.map((y) => y.columnName)), shareReplay(1));
627
+ this.elements$ = this.tableStore.items$;
628
+ this.displayedColumns$ = this.innerColumnNames$.pipe(map((columnNames) => {
629
+ return [this.itemsColumnName, ...columnNames, this.actionsColumnName];
630
+ }), shareReplay(1));
631
+ this.trackByFunction$ = this.tableStore.viewDelegate$.pipe(map((x) => { var _a; return (_a = x.trackBy) !== null && _a !== void 0 ? _a : this.DEFAULT_TRACK_BY_FUNCTION; }), shareReplay(1));
632
+ this.context = loadingStateContext({ obs: this.tableStore.dataState$ });
633
+ this.dataLoadingContext = loadingStateContext({ obs: this.tableStore.itemsState$ });
634
+ }
635
+ ngOnDestroy() {
636
+ this.context.destroy();
637
+ }
638
+ onScrollDown() {
639
+ this.tableStore.loadMore();
640
+ }
641
+ }
642
+ DbxTableViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableViewComponent, deps: [{ token: DbxTableStore }], target: i0.ɵɵFactoryTarget.Component });
643
+ DbxTableViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableViewComponent, selector: "dbx-table-view", ngImport: i0, template: "<dbx-loading [context]=\"context\">\n <dbx-loading class=\"dbx-table-view-loading\" [linear]=\"true\" [context]=\"dataLoadingContext\"></dbx-loading>\n <section class=\"dbx-table-view\" infinite-scroll [infiniteScrollDistance]=\"scrollDistance\" [infiniteScrollThrottle]=\"throttleScroll\" [scrollWindow]=\"false\" (scrolled)=\"onScrollDown()\">\n <table class=\"dbx-table-view-table\" mat-table [dataSource]=\"elements$\" [trackBy]=\"(trackByFunction$ | async) || DEFAULT_TRACK_BY_FUNCTION\">\n <!-- Header/Item column -->\n <ng-container [matColumnDef]=\"itemsColumnName\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef>\n <dbx-table-input-cell></dbx-table-input-cell>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <dbx-table-item-header [element]=\"element\"></dbx-table-item-header>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <dbx-table-summary-start-cell></dbx-table-summary-start-cell>\n </td>\n </ng-container>\n\n <!-- Column Definitions -->\n <ng-container [matColumnDef]=\"column.columnName\" [sticky]=\"false\" *ngFor=\"let column of innerColumns$ | async\">\n <th mat-header-cell *matHeaderCellDef>\n <dbx-table-column-header [column]=\"column\"></dbx-table-column-header>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <dbx-table-item-cell [element]=\"element\" [column]=\"column\"></dbx-table-item-cell>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <dbx-table-column-footer [column]=\"column\"></dbx-table-column-footer>\n </td>\n </ng-container>\n\n <!-- Tail/Action column -->\n <ng-container [matColumnDef]=\"actionsColumnName\" [stickyEnd]=\"true\">\n <th mat-header-cell *matHeaderCellDef>\n <dbx-table-action-cell></dbx-table-action-cell>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <dbx-table-item-action [element]=\"element\"></dbx-table-item-action>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <dbx-table-summary-end-cell></dbx-table-summary-end-cell>\n </td>\n </ng-container>\n\n <!-- Table View -->\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns$ | async; sticky: true\"></tr>\n\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns$ | async\"></tr>\n\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns$ | async; sticky: true\"></tr>\n </table>\n </section>\n</dbx-loading>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "context", "loading", "error"] }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i4$1.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i4$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i5$1.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: DbxTableColumnHeaderComponent, selector: "dbx-table-column-header" }, { kind: "component", type: DbxTableColumnFooterComponent, selector: "dbx-table-column-footer" }, { kind: "component", type: DbxTableInputCellComponent, selector: "dbx-table-input-cell" }, { kind: "component", type: DbxTableActionCellComponent, selector: "dbx-table-action-cell" }, { kind: "component", type: DbxTableItemCellComponent, selector: "dbx-table-item-cell", inputs: ["column"] }, { kind: "component", type: DbxTableItemHeaderComponent, selector: "dbx-table-item-header" }, { kind: "component", type: DbxTableItemActionComponent, selector: "dbx-table-item-action" }, { kind: "component", type: DbxTableSummaryStartCellComponent, selector: "dbx-table-summary-start-cell" }, { kind: "component", type: DbxTableSummaryEndCellComponent, selector: "dbx-table-summary-end-cell" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
644
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableViewComponent, decorators: [{
645
+ type: Component,
646
+ args: [{ selector: 'dbx-table-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<dbx-loading [context]=\"context\">\n <dbx-loading class=\"dbx-table-view-loading\" [linear]=\"true\" [context]=\"dataLoadingContext\"></dbx-loading>\n <section class=\"dbx-table-view\" infinite-scroll [infiniteScrollDistance]=\"scrollDistance\" [infiniteScrollThrottle]=\"throttleScroll\" [scrollWindow]=\"false\" (scrolled)=\"onScrollDown()\">\n <table class=\"dbx-table-view-table\" mat-table [dataSource]=\"elements$\" [trackBy]=\"(trackByFunction$ | async) || DEFAULT_TRACK_BY_FUNCTION\">\n <!-- Header/Item column -->\n <ng-container [matColumnDef]=\"itemsColumnName\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef>\n <dbx-table-input-cell></dbx-table-input-cell>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <dbx-table-item-header [element]=\"element\"></dbx-table-item-header>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <dbx-table-summary-start-cell></dbx-table-summary-start-cell>\n </td>\n </ng-container>\n\n <!-- Column Definitions -->\n <ng-container [matColumnDef]=\"column.columnName\" [sticky]=\"false\" *ngFor=\"let column of innerColumns$ | async\">\n <th mat-header-cell *matHeaderCellDef>\n <dbx-table-column-header [column]=\"column\"></dbx-table-column-header>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <dbx-table-item-cell [element]=\"element\" [column]=\"column\"></dbx-table-item-cell>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <dbx-table-column-footer [column]=\"column\"></dbx-table-column-footer>\n </td>\n </ng-container>\n\n <!-- Tail/Action column -->\n <ng-container [matColumnDef]=\"actionsColumnName\" [stickyEnd]=\"true\">\n <th mat-header-cell *matHeaderCellDef>\n <dbx-table-action-cell></dbx-table-action-cell>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <dbx-table-item-action [element]=\"element\"></dbx-table-item-action>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <dbx-table-summary-end-cell></dbx-table-summary-end-cell>\n </td>\n </ng-container>\n\n <!-- Table View -->\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns$ | async; sticky: true\"></tr>\n\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns$ | async\"></tr>\n\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns$ | async; sticky: true\"></tr>\n </table>\n </section>\n</dbx-loading>\n" }]
647
+ }], ctorParameters: function () { return [{ type: DbxTableStore }]; } });
648
+
649
+ /**
650
+ * Directive for providing and configuring a DbxTableStore
651
+ */
652
+ class DbxTableDirective {
653
+ constructor(tableStore) {
654
+ this.tableStore = tableStore;
655
+ }
656
+ set dbxTableInput(input) {
657
+ this.tableStore.setInput(input);
658
+ }
659
+ set dbxTableViewDelegate(dbxTableViewDelegate) {
660
+ this.tableStore.setViewDelegate(dbxTableViewDelegate);
661
+ }
662
+ set dbxTableDataDelegate(dbxTableDataDelegate) {
663
+ this.tableStore.setDataDelegate(dbxTableDataDelegate);
664
+ }
665
+ }
666
+ DbxTableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDirective, deps: [{ token: DbxTableStore }], target: i0.ɵɵFactoryTarget.Directive });
667
+ DbxTableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: DbxTableDirective, selector: "[dbxTable]", inputs: { dbxTableInput: "dbxTableInput", dbxTableViewDelegate: "dbxTableViewDelegate", dbxTableDataDelegate: "dbxTableDataDelegate" }, providers: [DbxTableStore], ngImport: i0 });
668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableDirective, decorators: [{
669
+ type: Directive,
670
+ args: [{
671
+ selector: '[dbxTable]',
672
+ providers: [DbxTableStore]
673
+ }]
674
+ }], ctorParameters: function () { return [{ type: DbxTableStore }]; }, propDecorators: { dbxTableInput: [{
675
+ type: Input
676
+ }], dbxTableViewDelegate: [{
677
+ type: Input
678
+ }], dbxTableDataDelegate: [{
679
+ type: Input
680
+ }] } });
681
+
682
+ const exports = [DbxTableDirective, DbxTableViewComponent];
683
+ const internalDeclarations = [
684
+ //
685
+ DbxTableColumnHeaderComponent,
686
+ DbxTableColumnFooterComponent,
687
+ DbxTableInputCellComponent,
688
+ DbxTableActionCellComponent,
689
+ DbxTableItemCellComponent,
690
+ DbxTableItemHeaderComponent,
691
+ DbxTableItemActionComponent,
692
+ DbxTableSummaryStartCellComponent,
693
+ DbxTableSummaryEndCellComponent
694
+ ];
695
+ class DbxTableModule {
696
+ }
697
+ DbxTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
698
+ DbxTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxTableModule, declarations: [DbxTableDirective, DbxTableViewComponent,
699
+ //
700
+ DbxTableColumnHeaderComponent,
701
+ DbxTableColumnFooterComponent,
702
+ DbxTableInputCellComponent,
703
+ DbxTableActionCellComponent,
704
+ DbxTableItemCellComponent,
705
+ DbxTableItemHeaderComponent,
706
+ DbxTableItemActionComponent,
707
+ DbxTableSummaryStartCellComponent,
708
+ DbxTableSummaryEndCellComponent], imports: [
709
+ //
710
+ CommonModule,
711
+ DbxLoadingModule,
712
+ DbxInjectionComponentModule,
713
+ MatTableModule,
714
+ InfiniteScrollModule
715
+ ], exports: [DbxTableDirective, DbxTableViewComponent] });
716
+ DbxTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableModule, imports: [
717
+ //
718
+ CommonModule,
719
+ DbxLoadingModule,
720
+ DbxInjectionComponentModule,
721
+ MatTableModule,
722
+ InfiniteScrollModule
723
+ ] });
724
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxTableModule, decorators: [{
725
+ type: NgModule,
726
+ args: [{
727
+ imports: [
728
+ //
729
+ CommonModule,
730
+ DbxLoadingModule,
731
+ DbxInjectionComponentModule,
732
+ MatTableModule,
733
+ InfiniteScrollModule
734
+ ],
735
+ declarations: [...exports, ...internalDeclarations],
736
+ exports
737
+ }]
738
+ }] });
739
+
740
+ /**
741
+ * Generated bundle index. Do not edit.
742
+ */
743
+
744
+ export { AbstractDbxTableColumnDirective, AbstractDbxTableElementDirective, DBX_TABLE_ACTIONS_COLUMN_NAME, DBX_TABLE_ITEMS_COLUMN_NAME, DEFAULT_DBX_TABLE_DATE_RANGE_DAY_BUTTON_FORMAT, DEFAULT_DBX_TABLE_DATE_RANGE_DAY_DISTIANCE_INPUT_CELL_COMPONENT_CONFIG, DbxTableActionCellComponent, DbxTableColumnFooterComponent, DbxTableColumnHeaderComponent, DbxTableDateHeaderComponent, DbxTableDateModule, DbxTableDateRangeDayDistanceInputCellInputComponent, DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy, DbxTableDirective, DbxTableInputCellComponent, DbxTableItemActionComponent, DbxTableItemCellComponent, DbxTableItemHeaderComponent, DbxTableModule, DbxTableStore, DbxTableSummaryEndCellComponent, DbxTableSummaryStartCellComponent, DbxTableViewComponent, dbxTableDateHeaderInjectionFactory, dbxTableDateRangeDayDistanceInputCellInput };
745
+ //# sourceMappingURL=dereekb-dbx-web-table.mjs.map