@dereekb/dbx-web 13.4.1 → 13.5.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.
- package/_index.scss +6 -1
- package/fesm2022/dereekb-dbx-web-calendar.mjs +58 -25
- package/fesm2022/dereekb-dbx-web-calendar.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-mapbox.mjs +120 -88
- package/fesm2022/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-table.mjs +148 -110
- package/fesm2022/dereekb-dbx-web-table.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web.mjs +2069 -1704
- package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
- package/lib/action/_action.scss +0 -1
- package/lib/action/snackbar/_snackbar.scss +0 -19
- package/lib/button/_button.scss +0 -18
- package/lib/button/progress/bar.button.component.scss +6 -0
- package/lib/error/_error.scss +0 -18
- package/lib/extension/_extension.scss +0 -31
- package/lib/extension/calendar/_calendar.scss +25 -74
- package/lib/extension/calendar/style/month/calendar-month-view.scss +1 -1
- package/lib/extension/help/_help.scss +0 -20
- package/lib/extension/table/_table.scss +0 -19
- package/lib/extension/zip/_zip.scss +5 -20
- package/lib/interaction/_interaction.scss +0 -8
- package/lib/interaction/dialog/_dialog.scss +4 -19
- package/lib/interaction/filter/_filter.scss +0 -19
- package/lib/interaction/iframe/_iframe.scss +0 -19
- package/lib/interaction/popover/_popover.scss +7 -17
- package/lib/interaction/popup/_popup.scss +2 -26
- package/lib/interaction/prompt/_prompt.scss +0 -19
- package/lib/interaction/style/_style.scss +4 -35
- package/lib/interaction/upload/_upload.scss +4 -45
- package/lib/layout/_layout.scss +0 -14
- package/lib/layout/avatar/_avatar.scss +2 -29
- package/lib/layout/bar/_bar.scss +10 -43
- package/lib/layout/block/_block.scss +0 -19
- package/lib/layout/card/_card.scss +0 -19
- package/lib/layout/column/_column.scss +2 -17
- package/lib/layout/content/_content.scss +7 -55
- package/lib/layout/flag/_flag.scss +0 -19
- package/lib/layout/flex/_flex.scss +0 -19
- package/lib/layout/item/_item.scss +0 -19
- package/lib/layout/list/_list.scss +3 -26
- package/lib/layout/section/_section.scss +7 -17
- package/lib/layout/step/_step.scss +0 -19
- package/lib/layout/style/_style.scss +1 -18
- package/lib/layout/text/_text.scss +8 -46
- package/lib/loading/_loading.scss +0 -19
- package/lib/router/_router.scss +0 -4
- package/lib/router/layout/anchor/_anchor.scss +0 -19
- package/lib/router/layout/anchorlist/_anchorlist.scss +4 -32
- package/lib/router/layout/navbar/_navbar.scss +0 -18
- package/lib/router/layout/sidenav/_sidenav.scss +22 -102
- package/lib/style/_all-typography.scss +0 -16
- package/lib/style/_m2-visual-compat.scss +120 -0
- package/lib/style/_root-variables.scss +37 -47
- package/lib/style/_theming.scss +1 -202
- package/lib/style/_variables.scss +35 -2
- package/package.json +13 -13
- package/types/dereekb-dbx-web-calendar.d.ts +40 -2
- package/types/dereekb-dbx-web-mapbox.d.ts +27 -1
- package/types/dereekb-dbx-web-table.d.ts +41 -0
- package/types/dereekb-dbx-web.d.ts +554 -110
|
@@ -27,7 +27,7 @@ import { MatTable, MatTableModule } from '@angular/material/table';
|
|
|
27
27
|
class DbxTableDateHeaderComponent {
|
|
28
28
|
left = 'E';
|
|
29
29
|
right = 'MMM d';
|
|
30
|
-
_dateSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "_dateSignal" }] : []));
|
|
30
|
+
_dateSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "_dateSignal" }] : /* istanbul ignore next */ []));
|
|
31
31
|
dateSignal = this._dateSignal.asReadonly();
|
|
32
32
|
get date() {
|
|
33
33
|
return this._dateSignal();
|
|
@@ -35,8 +35,8 @@ class DbxTableDateHeaderComponent {
|
|
|
35
35
|
set date(date) {
|
|
36
36
|
this._dateSignal.set(date);
|
|
37
37
|
}
|
|
38
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
39
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDateHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: DbxTableDateHeaderComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
40
40
|
@if (dateSignal()) {
|
|
41
41
|
<div class="dbx-table-date-column-header">
|
|
42
42
|
<span class="dbx-table-date-column-header-left">{{ dateSignal() | date: left }}</span>
|
|
@@ -45,7 +45,7 @@ class DbxTableDateHeaderComponent {
|
|
|
45
45
|
}
|
|
46
46
|
`, isInline: true, dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47
47
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDateHeaderComponent, decorators: [{
|
|
49
49
|
type: Component,
|
|
50
50
|
args: [{
|
|
51
51
|
template: `
|
|
@@ -61,6 +61,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
61
61
|
standalone: true
|
|
62
62
|
}]
|
|
63
63
|
}] });
|
|
64
|
+
/**
|
|
65
|
+
* Creates a factory that produces injection component configs for rendering date column headers.
|
|
66
|
+
*
|
|
67
|
+
* The factory initializes each {@link DbxTableDateHeaderComponent} with the column's date metadata.
|
|
68
|
+
*
|
|
69
|
+
* @returns a factory function that maps a date column to its header injection config
|
|
70
|
+
*/
|
|
64
71
|
function dbxTableDateHeaderInjectionFactory() {
|
|
65
72
|
return (column) => {
|
|
66
73
|
const config = {
|
|
@@ -74,6 +81,14 @@ function dbxTableDateHeaderInjectionFactory() {
|
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
const NO_GROUPS_ID = 'none';
|
|
84
|
+
/**
|
|
85
|
+
* Creates a default (ungrouped) table item group that wraps all items under the {@link NO_GROUPS_ID} identifier.
|
|
86
|
+
*
|
|
87
|
+
* Used when no explicit grouping function is provided to the table.
|
|
88
|
+
*
|
|
89
|
+
* @param items - the array of items to include in the default group
|
|
90
|
+
* @returns a default group containing all the provided items
|
|
91
|
+
*/
|
|
77
92
|
function defaultDbxTableItemGroup(items) {
|
|
78
93
|
return {
|
|
79
94
|
groupId: NO_GROUPS_ID,
|
|
@@ -82,6 +97,7 @@ function defaultDbxTableItemGroup(items) {
|
|
|
82
97
|
default: true
|
|
83
98
|
};
|
|
84
99
|
}
|
|
100
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
85
101
|
|
|
86
102
|
class DbxTableStore extends ComponentStore {
|
|
87
103
|
constructor() {
|
|
@@ -139,10 +155,10 @@ class DbxTableStore extends ComponentStore {
|
|
|
139
155
|
setInput = this.updater((state, input) => ({ ...state, input }));
|
|
140
156
|
setDataDelegate = this.updater((state, dataDelegate) => ({ ...state, dataDelegate }));
|
|
141
157
|
setViewDelegate = this.updater((state, viewDelegate) => ({ ...state, viewDelegate }));
|
|
142
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
143
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
159
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableStore });
|
|
144
160
|
}
|
|
145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableStore, decorators: [{
|
|
146
162
|
type: Injectable
|
|
147
163
|
}], ctorParameters: () => [] });
|
|
148
164
|
|
|
@@ -163,10 +179,10 @@ class DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy {
|
|
|
163
179
|
}
|
|
164
180
|
return new DateRange(null, null);
|
|
165
181
|
}
|
|
166
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
167
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
182
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
183
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy });
|
|
168
184
|
}
|
|
169
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy, decorators: [{
|
|
170
186
|
type: Injectable
|
|
171
187
|
}] });
|
|
172
188
|
const DEFAULT_DBX_TABLE_DATE_RANGE_DAY_DISTIANCE_INPUT_CELL_COMPONENT_CONFIG = { daysDistance: 6 };
|
|
@@ -178,16 +194,16 @@ class DbxTableDateRangeDayDistanceInputCellInputComponent {
|
|
|
178
194
|
tableStore = inject((DbxTableStore));
|
|
179
195
|
_syncSub = new SubscriptionObject();
|
|
180
196
|
_valueSub = new SubscriptionObject();
|
|
181
|
-
_pickerOpenedSignal = signal(false, ...(ngDevMode ? [{ debugName: "_pickerOpenedSignal" }] : []));
|
|
182
|
-
_configSignal = signal(DEFAULT_DBX_TABLE_DATE_RANGE_DAY_DISTIANCE_INPUT_CELL_COMPONENT_CONFIG, ...(ngDevMode ? [{ debugName: "_configSignal" }] : []));
|
|
197
|
+
_pickerOpenedSignal = signal(false, ...(ngDevMode ? [{ debugName: "_pickerOpenedSignal" }] : /* istanbul ignore next */ []));
|
|
198
|
+
_configSignal = signal(DEFAULT_DBX_TABLE_DATE_RANGE_DAY_DISTIANCE_INPUT_CELL_COMPONENT_CONFIG, ...(ngDevMode ? [{ debugName: "_configSignal" }] : /* istanbul ignore next */ []));
|
|
183
199
|
range = new FormGroup({
|
|
184
200
|
start: new FormControl(null),
|
|
185
201
|
end: new FormControl(null)
|
|
186
202
|
});
|
|
187
203
|
pickerOpened$ = this.range.valueChanges.pipe(startWith(this.range.value));
|
|
188
|
-
minDateSignal = computed(() => this._configSignal().minDate ?? null, ...(ngDevMode ? [{ debugName: "minDateSignal" }] : []));
|
|
189
|
-
maxDateSignal = computed(() => this._configSignal().maxDate ?? null, ...(ngDevMode ? [{ debugName: "maxDateSignal" }] : []));
|
|
190
|
-
buttonFormatSignal = computed(() => this._configSignal().buttonFormat ?? DEFAULT_DBX_TABLE_DATE_RANGE_DAY_BUTTON_FORMAT, ...(ngDevMode ? [{ debugName: "buttonFormatSignal" }] : []));
|
|
204
|
+
minDateSignal = computed(() => this._configSignal().minDate ?? null, ...(ngDevMode ? [{ debugName: "minDateSignal" }] : /* istanbul ignore next */ []));
|
|
205
|
+
maxDateSignal = computed(() => this._configSignal().maxDate ?? null, ...(ngDevMode ? [{ debugName: "maxDateSignal" }] : /* istanbul ignore next */ []));
|
|
206
|
+
buttonFormatSignal = computed(() => this._configSignal().buttonFormat ?? DEFAULT_DBX_TABLE_DATE_RANGE_DAY_BUTTON_FORMAT, ...(ngDevMode ? [{ debugName: "buttonFormatSignal" }] : /* istanbul ignore next */ []));
|
|
191
207
|
rangeValue$ = this.range.valueChanges.pipe(startWith(this.range.value));
|
|
192
208
|
dateRangeStringSignal = computed(() => {
|
|
193
209
|
const buttonFormat = this.buttonFormatSignal();
|
|
@@ -198,7 +214,7 @@ class DbxTableDateRangeDayDistanceInputCellInputComponent {
|
|
|
198
214
|
else {
|
|
199
215
|
return `Select Date`;
|
|
200
216
|
}
|
|
201
|
-
}, ...(ngDevMode ? [{ debugName: "dateRangeStringSignal" }] : []));
|
|
217
|
+
}, ...(ngDevMode ? [{ debugName: "dateRangeStringSignal" }] : /* istanbul ignore next */ []));
|
|
202
218
|
constructor() {
|
|
203
219
|
cleanSubscription(this.tableStore.input$.subscribe((x) => {
|
|
204
220
|
const start = x?.date ?? null;
|
|
@@ -231,8 +247,8 @@ class DbxTableDateRangeDayDistanceInputCellInputComponent {
|
|
|
231
247
|
pickerClosed() {
|
|
232
248
|
this._pickerOpenedSignal.set(false);
|
|
233
249
|
}
|
|
234
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
235
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
250
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
251
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableDateRangeDayDistanceInputCellInputComponent, isStandalone: true, selector: "ng-component", providers: [
|
|
236
252
|
{
|
|
237
253
|
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
238
254
|
useClass: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy
|
|
@@ -248,7 +264,7 @@ class DbxTableDateRangeDayDistanceInputCellInputComponent {
|
|
|
248
264
|
</div>
|
|
249
265
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i1.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i1.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
250
266
|
}
|
|
251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputComponent, decorators: [{
|
|
252
268
|
type: Component,
|
|
253
269
|
args: [{
|
|
254
270
|
template: `
|
|
@@ -272,6 +288,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
272
288
|
imports: [MatDatepickerModule, ReactiveFormsModule, MatButtonModule]
|
|
273
289
|
}]
|
|
274
290
|
}], ctorParameters: () => [] });
|
|
291
|
+
/**
|
|
292
|
+
* Creates an injection component config for a date-range day-distance input cell.
|
|
293
|
+
*
|
|
294
|
+
* Initializes the component with the provided configuration for day distance, date bounds, and button format.
|
|
295
|
+
*
|
|
296
|
+
* @param componentConfig - optional configuration for the date range input (day distance, min/max dates, button format)
|
|
297
|
+
* @returns an injection component config that renders a {@link DbxTableDateRangeDayDistanceInputCellInputComponent}
|
|
298
|
+
*/
|
|
275
299
|
function dbxTableDateRangeDayDistanceInputCellInput(componentConfig) {
|
|
276
300
|
const config = {
|
|
277
301
|
componentClass: DbxTableDateRangeDayDistanceInputCellInputComponent,
|
|
@@ -284,11 +308,11 @@ function dbxTableDateRangeDayDistanceInputCellInput(componentConfig) {
|
|
|
284
308
|
|
|
285
309
|
const importsAndExports$1 = [DbxTableDateHeaderComponent, DbxTableDateRangeDayDistanceInputCellInputComponent];
|
|
286
310
|
class DbxTableDateModule {
|
|
287
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
288
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
289
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
311
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
312
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDateModule, imports: [DbxTableDateHeaderComponent, DbxTableDateRangeDayDistanceInputCellInputComponent], exports: [DbxTableDateHeaderComponent, DbxTableDateRangeDayDistanceInputCellInputComponent] });
|
|
313
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDateModule, imports: [DbxTableDateRangeDayDistanceInputCellInputComponent] });
|
|
290
314
|
}
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDateModule, decorators: [{
|
|
292
316
|
type: NgModule,
|
|
293
317
|
args: [{
|
|
294
318
|
imports: importsAndExports$1,
|
|
@@ -300,12 +324,12 @@ class DbxTableActionCellComponent {
|
|
|
300
324
|
tableStore = inject(DbxTableStore);
|
|
301
325
|
config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.actionHeader), distinctUntilChanged());
|
|
302
326
|
configSignal = toSignal(this.config$);
|
|
303
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
304
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
327
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableActionCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
328
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableActionCellComponent, isStandalone: true, selector: "dbx-table-action-cell", ngImport: i0, template: `
|
|
305
329
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
306
330
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
307
331
|
}
|
|
308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableActionCellComponent, decorators: [{
|
|
309
333
|
type: Component,
|
|
310
334
|
args: [{
|
|
311
335
|
selector: 'dbx-table-action-cell',
|
|
@@ -325,12 +349,12 @@ class DbxTableInputCellComponent {
|
|
|
325
349
|
tableStore = inject(DbxTableStore);
|
|
326
350
|
config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.inputHeader), distinctUntilChanged());
|
|
327
351
|
configSignal = toSignal(this.config$);
|
|
328
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
329
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
352
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableInputCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
353
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableInputCellComponent, isStandalone: true, selector: "dbx-table-input-cell", ngImport: i0, template: `
|
|
330
354
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
331
355
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
332
356
|
}
|
|
333
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
357
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableInputCellComponent, decorators: [{
|
|
334
358
|
type: Component,
|
|
335
359
|
args: [{
|
|
336
360
|
selector: 'dbx-table-input-cell',
|
|
@@ -347,12 +371,12 @@ class DbxTableSummaryEndCellComponent {
|
|
|
347
371
|
tableStore = inject(DbxTableStore);
|
|
348
372
|
config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.summaryRowEnd), distinctUntilChanged());
|
|
349
373
|
configSignal = toSignal(this.config$);
|
|
350
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
351
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
374
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableSummaryEndCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
375
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableSummaryEndCellComponent, isStandalone: true, selector: "dbx-table-summary-end-cell", ngImport: i0, template: `
|
|
352
376
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
353
377
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
354
378
|
}
|
|
355
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableSummaryEndCellComponent, decorators: [{
|
|
356
380
|
type: Component,
|
|
357
381
|
args: [{
|
|
358
382
|
selector: 'dbx-table-summary-end-cell',
|
|
@@ -372,12 +396,12 @@ class DbxTableSummaryStartCellComponent {
|
|
|
372
396
|
tableStore = inject(DbxTableStore);
|
|
373
397
|
config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.summaryRowHeader), distinctUntilChanged());
|
|
374
398
|
configSignal = toSignal(this.config$);
|
|
375
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
376
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
399
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableSummaryStartCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
400
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableSummaryStartCellComponent, isStandalone: true, selector: "dbx-table-summary-start-cell", ngImport: i0, template: `
|
|
377
401
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
378
402
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
379
403
|
}
|
|
380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableSummaryStartCellComponent, decorators: [{
|
|
381
405
|
type: Component,
|
|
382
406
|
args: [{
|
|
383
407
|
selector: 'dbx-table-summary-start-cell',
|
|
@@ -395,12 +419,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
395
419
|
*/
|
|
396
420
|
class AbstractDbxTableColumnDirective {
|
|
397
421
|
tableStore = inject((DbxTableStore));
|
|
398
|
-
column = input(...(ngDevMode ? [undefined, { debugName: "column" }] : []));
|
|
422
|
+
column = input(...(ngDevMode ? [undefined, { debugName: "column" }] : /* istanbul ignore next */ []));
|
|
399
423
|
column$ = toObservable(this.column).pipe(filterMaybe(), distinctUntilChanged());
|
|
400
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
401
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
424
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: AbstractDbxTableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
425
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.3", type: AbstractDbxTableColumnDirective, isStandalone: true, inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
402
426
|
}
|
|
403
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: AbstractDbxTableColumnDirective, decorators: [{
|
|
404
428
|
type: Directive
|
|
405
429
|
}], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: false }] }] } });
|
|
406
430
|
|
|
@@ -415,12 +439,12 @@ class DbxTableColumnHeaderComponent extends AbstractDbxTableColumnDirective {
|
|
|
415
439
|
}
|
|
416
440
|
}), distinctUntilChanged());
|
|
417
441
|
configSignal = toSignal(this.config$);
|
|
418
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
419
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
442
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableColumnHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
443
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableColumnHeaderComponent, isStandalone: true, selector: "dbx-table-column-header", usesInheritance: true, ngImport: i0, template: `
|
|
420
444
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
421
445
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
422
446
|
}
|
|
423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableColumnHeaderComponent, decorators: [{
|
|
424
448
|
type: Component,
|
|
425
449
|
args: [{
|
|
426
450
|
selector: 'dbx-table-column-header',
|
|
@@ -444,12 +468,12 @@ class DbxTableColumnFooterComponent extends AbstractDbxTableColumnDirective {
|
|
|
444
468
|
}
|
|
445
469
|
}), distinctUntilChanged());
|
|
446
470
|
configSignal = toSignal(this.config$);
|
|
447
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
448
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
471
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableColumnFooterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
472
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableColumnFooterComponent, isStandalone: true, selector: "dbx-table-column-footer", usesInheritance: true, ngImport: i0, template: `
|
|
449
473
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
450
474
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
451
475
|
}
|
|
452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
476
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableColumnFooterComponent, decorators: [{
|
|
453
477
|
type: Component,
|
|
454
478
|
args: [{
|
|
455
479
|
selector: 'dbx-table-column-footer',
|
|
@@ -509,7 +533,7 @@ class DbxTableColumnSizeDirective {
|
|
|
509
533
|
visibleColumns += 1;
|
|
510
534
|
}
|
|
511
535
|
return visibleColumns;
|
|
512
|
-
}, ...(ngDevMode ? [{ debugName: "visibleColumnsSignal" }] : []));
|
|
536
|
+
}, ...(ngDevMode ? [{ debugName: "visibleColumnsSignal" }] : /* istanbul ignore next */ []));
|
|
513
537
|
addColumn(column) {
|
|
514
538
|
this._columnsMap.value.set(column.index(), column);
|
|
515
539
|
this._columnsMap.next(this._columnsMap.value);
|
|
@@ -519,10 +543,10 @@ class DbxTableColumnSizeDirective {
|
|
|
519
543
|
this._columnsMap.next(this._columnsMap.value);
|
|
520
544
|
}
|
|
521
545
|
}
|
|
522
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
523
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
546
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableColumnSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
547
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableColumnSizeDirective, isStandalone: true, selector: "[dbxTableColumnSize]", exportAs: ["dbxTableColumnSize"], ngImport: i0 });
|
|
524
548
|
}
|
|
525
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableColumnSizeDirective, decorators: [{
|
|
526
550
|
type: Directive,
|
|
527
551
|
args: [{
|
|
528
552
|
exportAs: 'dbxTableColumnSize',
|
|
@@ -536,7 +560,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
536
560
|
class DbxColumnSizeColumnDirective {
|
|
537
561
|
dbxColumnSizeDirective = inject(DbxTableColumnSizeDirective);
|
|
538
562
|
elementRef = inject(ElementRef);
|
|
539
|
-
index = input.required({ ...(ngDevMode ? { debugName: "index" } : {}), alias: 'dbx-column-size-column' });
|
|
563
|
+
index = input.required({ ...(ngDevMode ? { debugName: "index" } : /* istanbul ignore next */ {}), alias: 'dbx-column-size-column' });
|
|
540
564
|
constructor() {
|
|
541
565
|
clean(() => this.dbxColumnSizeDirective.removeColumn(this));
|
|
542
566
|
}
|
|
@@ -547,12 +571,13 @@ class DbxColumnSizeColumnDirective {
|
|
|
547
571
|
get width() {
|
|
548
572
|
return this.elementRef.nativeElement.clientWidth;
|
|
549
573
|
}
|
|
550
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
551
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
574
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxColumnSizeColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
575
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.3", type: DbxColumnSizeColumnDirective, isStandalone: true, selector: "[dbx-column-size-column]", inputs: { index: { classPropertyName: "index", publicName: "dbx-column-size-column", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
552
576
|
}
|
|
553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
577
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxColumnSizeColumnDirective, decorators: [{
|
|
554
578
|
type: Directive,
|
|
555
579
|
args: [{
|
|
580
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
556
581
|
selector: '[dbx-column-size-column]',
|
|
557
582
|
standalone: true
|
|
558
583
|
}]
|
|
@@ -565,26 +590,26 @@ const DBX_TABLE_COLUMN_SIZE_PARENT_ELEMENT_REF_TOKEN = new InjectionToken('DBX_T
|
|
|
565
590
|
*/
|
|
566
591
|
class AbstractDbxTableItemDirective {
|
|
567
592
|
tableStore = inject((DbxTableStore));
|
|
568
|
-
item = input(...(ngDevMode ? [undefined, { debugName: "item" }] : []));
|
|
593
|
+
item = input(...(ngDevMode ? [undefined, { debugName: "item" }] : /* istanbul ignore next */ []));
|
|
569
594
|
item$ = toObservable(this.item);
|
|
570
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
571
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
595
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: AbstractDbxTableItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
596
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.3", type: AbstractDbxTableItemDirective, isStandalone: true, inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
572
597
|
}
|
|
573
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: AbstractDbxTableItemDirective, decorators: [{
|
|
574
599
|
type: Directive
|
|
575
600
|
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }] } });
|
|
576
601
|
|
|
577
602
|
class DbxTableItemCellComponent extends AbstractDbxTableItemDirective {
|
|
578
|
-
column = input(...(ngDevMode ? [undefined, { debugName: "column" }] : []));
|
|
603
|
+
column = input(...(ngDevMode ? [undefined, { debugName: "column" }] : /* istanbul ignore next */ []));
|
|
579
604
|
column$ = toObservable(this.column);
|
|
580
605
|
config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => combineLatest([this.column$, this.item$]).pipe(map(([column, item]) => (column && item ? viewDelegate.itemCell(column, item) : undefined)))));
|
|
581
606
|
configSignal = toSignal(this.config$);
|
|
582
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
583
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
607
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableItemCellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
608
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.3", type: DbxTableItemCellComponent, isStandalone: true, selector: "dbx-table-item-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
584
609
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
585
610
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
586
611
|
}
|
|
587
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableItemCellComponent, decorators: [{
|
|
588
613
|
type: Component,
|
|
589
614
|
args: [{
|
|
590
615
|
selector: 'dbx-table-item-cell',
|
|
@@ -600,12 +625,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
600
625
|
class DbxTableItemHeaderComponent extends AbstractDbxTableItemDirective {
|
|
601
626
|
config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => this.item$.pipe(map((x) => (x != null ? viewDelegate.itemHeader(x) : undefined)))), maybeValueFromObservableOrValue());
|
|
602
627
|
configSignal = toSignal(this.config$);
|
|
603
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
604
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
628
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableItemHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
629
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableItemHeaderComponent, isStandalone: true, selector: "dbx-table-item-header", usesInheritance: true, ngImport: i0, template: `
|
|
605
630
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
606
631
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
607
632
|
}
|
|
608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
633
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableItemHeaderComponent, decorators: [{
|
|
609
634
|
type: Component,
|
|
610
635
|
args: [{
|
|
611
636
|
selector: 'dbx-table-item-header',
|
|
@@ -628,12 +653,12 @@ class DbxTableItemActionComponent extends AbstractDbxTableItemDirective {
|
|
|
628
653
|
return obs;
|
|
629
654
|
}), maybeValueFromObservableOrValue());
|
|
630
655
|
configSignal = toSignal(this.config$);
|
|
631
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
632
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
656
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableItemActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
657
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableItemActionComponent, isStandalone: true, selector: "dbx-table-item-action", usesInheritance: true, ngImport: i0, template: `
|
|
633
658
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
634
659
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
635
660
|
}
|
|
636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableItemActionComponent, decorators: [{
|
|
637
662
|
type: Component,
|
|
638
663
|
args: [{
|
|
639
664
|
selector: 'dbx-table-item-action',
|
|
@@ -651,12 +676,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
651
676
|
*/
|
|
652
677
|
class AbstractDbxTableGroupDirective {
|
|
653
678
|
tableStore = inject((DbxTableStore));
|
|
654
|
-
group = input(...(ngDevMode ? [undefined, { debugName: "group" }] : []));
|
|
679
|
+
group = input(...(ngDevMode ? [undefined, { debugName: "group" }] : /* istanbul ignore next */ []));
|
|
655
680
|
group$ = toObservable(this.group).pipe(filterMaybe(), distinctUntilChanged());
|
|
656
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
657
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
681
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: AbstractDbxTableGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
682
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.3", type: AbstractDbxTableGroupDirective, isStandalone: true, inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
658
683
|
}
|
|
659
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: AbstractDbxTableGroupDirective, decorators: [{
|
|
660
685
|
type: Directive
|
|
661
686
|
}], propDecorators: { group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }] } });
|
|
662
687
|
|
|
@@ -670,12 +695,12 @@ class DbxTableGroupHeaderComponent extends AbstractDbxTableGroupDirective {
|
|
|
670
695
|
return obs;
|
|
671
696
|
}), maybeValueFromObservableOrValue(), distinctUntilChanged());
|
|
672
697
|
configSignal = toSignal(this.config$);
|
|
673
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
674
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
698
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableGroupHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
699
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableGroupHeaderComponent, isStandalone: true, selector: "dbx-table-group-header", usesInheritance: true, ngImport: i0, template: `
|
|
675
700
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
676
701
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
677
702
|
}
|
|
678
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableGroupHeaderComponent, decorators: [{
|
|
679
704
|
type: Component,
|
|
680
705
|
args: [{
|
|
681
706
|
selector: 'dbx-table-group-header',
|
|
@@ -698,12 +723,12 @@ class DbxTableGroupFooterComponent extends AbstractDbxTableGroupDirective {
|
|
|
698
723
|
return obs;
|
|
699
724
|
}), maybeValueFromObservableOrValue(), distinctUntilChanged());
|
|
700
725
|
configSignal = toSignal(this.config$);
|
|
701
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
702
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
726
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableGroupFooterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
727
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableGroupFooterComponent, isStandalone: true, selector: "dbx-table-group-footer", usesInheritance: true, ngImport: i0, template: `
|
|
703
728
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
704
729
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
705
730
|
}
|
|
706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableGroupFooterComponent, decorators: [{
|
|
707
732
|
type: Component,
|
|
708
733
|
args: [{
|
|
709
734
|
selector: 'dbx-table-group-footer',
|
|
@@ -723,12 +748,12 @@ class DbxTableFullSummaryRowComponent {
|
|
|
723
748
|
tableStore = inject(DbxTableStore);
|
|
724
749
|
config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.fullSummaryRow), distinctUntilChanged());
|
|
725
750
|
configSignal = toSignal(this.config$);
|
|
726
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
727
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
751
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableFullSummaryRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
752
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxTableFullSummaryRowComponent, isStandalone: true, selector: "dbx-table-full-summary-row", host: { classAttribute: "dbx-h100 dbx-flex-bar" }, ngImport: i0, template: `
|
|
728
753
|
<dbx-injection [config]="configSignal()"></dbx-injection>
|
|
729
754
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
730
755
|
}
|
|
731
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
756
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableFullSummaryRowComponent, decorators: [{
|
|
732
757
|
type: Component,
|
|
733
758
|
args: [{
|
|
734
759
|
selector: 'dbx-table-full-summary-row',
|
|
@@ -746,9 +771,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
746
771
|
|
|
747
772
|
const DBX_TABLE_ITEMS_COLUMN_NAME = '_items';
|
|
748
773
|
const DBX_TABLE_ACTIONS_COLUMN_NAME = '_actions';
|
|
774
|
+
/**
|
|
775
|
+
* Type guard that checks whether a table view element is a group element (header or footer).
|
|
776
|
+
*
|
|
777
|
+
* @param element - the table view element to check
|
|
778
|
+
* @returns `true` if the element represents a group header or footer row
|
|
779
|
+
*/
|
|
749
780
|
function isDbxTableViewGroupElement(element) {
|
|
750
781
|
return element.type === 'group';
|
|
751
782
|
}
|
|
783
|
+
/**
|
|
784
|
+
* Type guard that checks whether a table view element is an item data element.
|
|
785
|
+
*
|
|
786
|
+
* @param element - the table view element to check
|
|
787
|
+
* @returns `true` if the element represents an item data row
|
|
788
|
+
*/
|
|
752
789
|
function isDbxTableViewItemElement(element) {
|
|
753
790
|
return element.type === 'item';
|
|
754
791
|
}
|
|
@@ -761,8 +798,8 @@ class DbxTableViewComponent {
|
|
|
761
798
|
DEFAULT_TRACK_BY_FUNCTION = (index) => {
|
|
762
799
|
return index;
|
|
763
800
|
};
|
|
764
|
-
scrollDistance = input(0.5, ...(ngDevMode ? [{ debugName: "scrollDistance" }] : []));
|
|
765
|
-
throttleScroll = input(50, ...(ngDevMode ? [{ debugName: "throttleScroll" }] : []));
|
|
801
|
+
scrollDistance = input(0.5, ...(ngDevMode ? [{ debugName: "scrollDistance" }] : /* istanbul ignore next */ []));
|
|
802
|
+
throttleScroll = input(50, ...(ngDevMode ? [{ debugName: "throttleScroll" }] : /* istanbul ignore next */ []));
|
|
766
803
|
itemsColumnName = DBX_TABLE_ITEMS_COLUMN_NAME;
|
|
767
804
|
actionsColumnName = DBX_TABLE_ACTIONS_COLUMN_NAME;
|
|
768
805
|
innerColumns$ = this.tableStore.columns$;
|
|
@@ -774,8 +811,7 @@ class DbxTableViewComponent {
|
|
|
774
811
|
const { groupHeader: inputGroupHeader, groupFooter: inputGroupFooter } = viewDelegate;
|
|
775
812
|
const hasGroupHeader = inputGroupHeader != null ? (group) => inputGroupHeader(group) != null : () => false;
|
|
776
813
|
const hasGroupFooter = inputGroupFooter != null ? (group) => inputGroupFooter(group) != null : () => false;
|
|
777
|
-
return groups
|
|
778
|
-
.map((group) => {
|
|
814
|
+
return groups.flatMap((group) => {
|
|
779
815
|
const { items } = group;
|
|
780
816
|
const itemElements = items.map((item) => ({
|
|
781
817
|
type: 'item',
|
|
@@ -806,8 +842,7 @@ class DbxTableViewComponent {
|
|
|
806
842
|
}
|
|
807
843
|
}
|
|
808
844
|
return elements;
|
|
809
|
-
})
|
|
810
|
-
.flat();
|
|
845
|
+
});
|
|
811
846
|
}));
|
|
812
847
|
})), shareReplay(1));
|
|
813
848
|
elements$ = this.elementsState$.pipe(valueFromFinishedLoadingState(() => []), throttleTime(50, undefined, { leading: true, trailing: true }), shareReplay(1));
|
|
@@ -817,7 +852,7 @@ class DbxTableViewComponent {
|
|
|
817
852
|
displayedColumnsSignal = computed(() => {
|
|
818
853
|
const columnNames = this.innerColumnNamesSignal() || [];
|
|
819
854
|
return [this.itemsColumnName, ...columnNames, this.actionsColumnName];
|
|
820
|
-
}, ...(ngDevMode ? [{ debugName: "displayedColumnsSignal" }] : []));
|
|
855
|
+
}, ...(ngDevMode ? [{ debugName: "displayedColumnsSignal" }] : /* istanbul ignore next */ []));
|
|
821
856
|
trackByFunction$ = this.tableStore.viewDelegate$.pipe(map((x) => x.trackBy ?? this.DEFAULT_TRACK_BY_FUNCTION), shareReplay(1));
|
|
822
857
|
inputTrackByFunctionSignal = toSignal(this.trackByFunction$, { initialValue: this.DEFAULT_TRACK_BY_FUNCTION });
|
|
823
858
|
trackElementByFunctionSignal = computed(() => {
|
|
@@ -831,7 +866,7 @@ class DbxTableViewComponent {
|
|
|
831
866
|
}
|
|
832
867
|
};
|
|
833
868
|
return fn;
|
|
834
|
-
}, ...(ngDevMode ? [{ debugName: "trackElementByFunctionSignal" }] : []));
|
|
869
|
+
}, ...(ngDevMode ? [{ debugName: "trackElementByFunctionSignal" }] : /* istanbul ignore next */ []));
|
|
835
870
|
context = loadingStateContext({ obs: this.tableStore.dataState$ });
|
|
836
871
|
dataLoadingContext = loadingStateContext({ obs: this.elementsState$ });
|
|
837
872
|
contextSignal = toSignal(this.context.state$);
|
|
@@ -853,22 +888,21 @@ class DbxTableViewComponent {
|
|
|
853
888
|
}
|
|
854
889
|
showFooterRowSignal = computed(() => {
|
|
855
890
|
const viewDelegate = this.viewDelegateSignal();
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
}, ...(ngDevMode ? [{ debugName: "showFooterRowSignal" }] : []));
|
|
891
|
+
return viewDelegate && (viewDelegate.summaryRowHeader != null || viewDelegate.columnFooter != null || viewDelegate.summaryRowEnd != null);
|
|
892
|
+
}, ...(ngDevMode ? [{ debugName: "showFooterRowSignal" }] : /* istanbul ignore next */ []));
|
|
859
893
|
showFullSummaryRowSignal = computed(() => {
|
|
860
894
|
const viewDelegate = this.viewDelegateSignal();
|
|
861
895
|
return viewDelegate?.fullSummaryRow != null;
|
|
862
|
-
}, ...(ngDevMode ? [{ debugName: "showFullSummaryRowSignal" }] : []));
|
|
863
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
864
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
896
|
+
}, ...(ngDevMode ? [{ debugName: "showFullSummaryRowSignal" }] : /* istanbul ignore next */ []));
|
|
897
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
898
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: DbxTableViewComponent, isStandalone: true, selector: "dbx-table-view", inputs: { scrollDistance: { classPropertyName: "scrollDistance", publicName: "scrollDistance", isSignal: true, isRequired: false, transformFunction: null }, throttleScroll: { classPropertyName: "throttleScroll", publicName: "throttleScroll", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
865
899
|
{
|
|
866
900
|
provide: DBX_TABLE_COLUMN_SIZE_PARENT_ELEMENT_REF_TOKEN,
|
|
867
901
|
useExisting: ElementRef
|
|
868
902
|
}
|
|
869
903
|
], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }], ngImport: i0, template: "<dbx-loading [context]=\"context\">\n <dbx-loading class=\"dbx-table-view-loading\" [linear]=\"true\" [context]=\"dataLoadingContext\"></dbx-loading>\n <div class=\"dbx-table-view\" [ngClass]=\"tableCssClasses()\">\n <section class=\"dbx-table-view-table-wrapper\" dbxTableColumnSize #columnSize=\"dbxTableColumnSize\" infinite-scroll [infiniteScrollDistance]=\"scrollDistance()\" [infiniteScrollThrottle]=\"throttleScroll()\" [scrollWindow]=\"false\" (scrolled)=\"onScrollDown()\">\n <table class=\"dbx-table-view-table\" mat-table [dataSource]=\"elementsSignal()\" [trackBy]=\"trackElementByFunctionSignal()\" multiTemplateDataRows>\n <!-- Groups -->\n <!-- Group Header column -->\n <ng-container matColumnDef=\"groupHeaderColumn\" [sticky]=\"true\">\n <td mat-cell [attr.colspan]=\"columnSize.visibleColumnsSignal()\" *matCellDef=\"let element\">\n <dbx-table-group-header [group]=\"element.group\"></dbx-table-group-header>\n </td>\n </ng-container>\n\n <!-- Group Footer column -->\n <ng-container matColumnDef=\"groupFooterColumn\" [sticky]=\"true\">\n <td mat-cell [attr.colspan]=\"columnSize.visibleColumnsSignal()\" *matCellDef=\"let element\">\n <dbx-table-group-footer [group]=\"element.group\"></dbx-table-group-footer>\n </td>\n </ng-container>\n\n <!-- Items -->\n <!-- Header/Item column -->\n <ng-container [matColumnDef]=\"itemsColumnName\" [sticky]=\"true\">\n <th dbx-column-size-column=\"head\" 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 [item]=\"element.item\"></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 @for (column of innerColumnsSignal(); track column.columnName) {\n <ng-container [matColumnDef]=\"column.columnName\" [sticky]=\"false\">\n <th [dbx-column-size-column]=\"$index\" 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 [item]=\"element.item\" [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\n <!-- Tail/Action column -->\n <ng-container [matColumnDef]=\"actionsColumnName\" [stickyEnd]=\"true\">\n <th dbx-column-size-column=\"tail\" 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 [item]=\"element.item\"></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=\"displayedColumnsSignal(); sticky: true\"></tr>\n\n <tr mat-row *matRowDef=\"let row; columns: ['groupHeaderColumn']; when: showGroupHeaderRow\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumnsSignal(); when: showItemRow\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: ['groupFooterColumn']; when: showGroupFooterRow\"></tr>\n\n <tr [ngClass]=\"{ 'dbx-hide': !showFooterRowSignal() }\" mat-footer-row *matFooterRowDef=\"displayedColumnsSignal(); sticky: true\"></tr>\n </table>\n </section>\n <!-- Full summary row -->\n @if (showFullSummaryRowSignal()) {\n <div class=\"mat-mdc-table dbx-table-view-full-summary-row-container\">\n <div class=\"mdc-data-table__cell mat-mdc-row\">\n <dbx-table-full-summary-row></dbx-table-full-summary-row>\n </div>\n </div>\n }\n </div>\n</dbx-loading>\n", dependencies: [{ kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "color", "diameter", "linear", "loading", "error", "context"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i1$1.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i1$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i1$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i1$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i1$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: DbxTableInputCellComponent, selector: "dbx-table-input-cell" }, { kind: "component", type: DbxTableItemHeaderComponent, selector: "dbx-table-item-header" }, { kind: "component", type: DbxTableItemCellComponent, selector: "dbx-table-item-cell", inputs: ["column"] }, { kind: "component", type: DbxTableItemActionComponent, selector: "dbx-table-item-action" }, { kind: "component", type: DbxTableActionCellComponent, selector: "dbx-table-action-cell" }, { kind: "component", type: DbxTableColumnHeaderComponent, selector: "dbx-table-column-header" }, { kind: "component", type: DbxTableColumnFooterComponent, selector: "dbx-table-column-footer" }, { kind: "component", type: DbxTableSummaryStartCellComponent, selector: "dbx-table-summary-start-cell" }, { kind: "component", type: DbxTableSummaryEndCellComponent, selector: "dbx-table-summary-end-cell" }, { kind: "component", type: DbxTableGroupHeaderComponent, selector: "dbx-table-group-header" }, { kind: "component", type: DbxTableGroupFooterComponent, selector: "dbx-table-group-footer" }, { kind: "component", type: DbxTableFullSummaryRowComponent, selector: "dbx-table-full-summary-row" }, { kind: "directive", type: DbxTableColumnSizeDirective, selector: "[dbxTableColumnSize]", exportAs: ["dbxTableColumnSize"] }, { kind: "directive", type: DbxColumnSizeColumnDirective, selector: "[dbx-column-size-column]", inputs: ["dbx-column-size-column"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
870
904
|
}
|
|
871
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
905
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableViewComponent, decorators: [{
|
|
872
906
|
type: Component,
|
|
873
907
|
args: [{ selector: 'dbx-table-view', imports: [
|
|
874
908
|
DbxLoadingComponent,
|
|
@@ -902,18 +936,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
902
936
|
*/
|
|
903
937
|
class DbxTableDirective {
|
|
904
938
|
tableStore = inject((DbxTableStore));
|
|
905
|
-
dbxTableInput = input(...(ngDevMode ? [undefined, { debugName: "dbxTableInput" }] : []));
|
|
906
|
-
dbxTableViewDelegate = input(...(ngDevMode ? [undefined, { debugName: "dbxTableViewDelegate" }] : []));
|
|
907
|
-
dbxTableDataDelegate = input(...(ngDevMode ? [undefined, { debugName: "dbxTableDataDelegate" }] : []));
|
|
939
|
+
dbxTableInput = input(...(ngDevMode ? [undefined, { debugName: "dbxTableInput" }] : /* istanbul ignore next */ []));
|
|
940
|
+
dbxTableViewDelegate = input(...(ngDevMode ? [undefined, { debugName: "dbxTableViewDelegate" }] : /* istanbul ignore next */ []));
|
|
941
|
+
dbxTableDataDelegate = input(...(ngDevMode ? [undefined, { debugName: "dbxTableDataDelegate" }] : /* istanbul ignore next */ []));
|
|
908
942
|
_setOnTableStoreEffect = effect(() => {
|
|
909
943
|
this.tableStore.setInput(this.dbxTableInput());
|
|
910
944
|
this.tableStore.setViewDelegate(this.dbxTableViewDelegate());
|
|
911
945
|
this.tableStore.setDataDelegate(this.dbxTableDataDelegate());
|
|
912
|
-
}, { ...(ngDevMode ? { debugName: "_setOnTableStoreEffect" } : {}), allowSignalWrites: true });
|
|
913
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
914
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
946
|
+
}, { ...(ngDevMode ? { debugName: "_setOnTableStoreEffect" } : /* istanbul ignore next */ {}), allowSignalWrites: true });
|
|
947
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
948
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.3", type: DbxTableDirective, isStandalone: true, selector: "[dbxTable]", inputs: { dbxTableInput: { classPropertyName: "dbxTableInput", publicName: "dbxTableInput", isSignal: true, isRequired: false, transformFunction: null }, dbxTableViewDelegate: { classPropertyName: "dbxTableViewDelegate", publicName: "dbxTableViewDelegate", isSignal: true, isRequired: false, transformFunction: null }, dbxTableDataDelegate: { classPropertyName: "dbxTableDataDelegate", publicName: "dbxTableDataDelegate", isSignal: true, isRequired: false, transformFunction: null } }, providers: [DbxTableStore], ngImport: i0 });
|
|
915
949
|
}
|
|
916
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableDirective, decorators: [{
|
|
917
951
|
type: Directive,
|
|
918
952
|
args: [{
|
|
919
953
|
selector: '[dbxTable]',
|
|
@@ -924,11 +958,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
924
958
|
|
|
925
959
|
const importsAndExports = [DbxTableDirective, DbxTableViewComponent];
|
|
926
960
|
class DbxTableModule {
|
|
927
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
928
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
929
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
961
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
962
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.3", ngImport: i0, type: DbxTableModule, imports: [DbxTableDirective, DbxTableViewComponent], exports: [DbxTableDirective, DbxTableViewComponent] });
|
|
963
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableModule, imports: [DbxTableViewComponent] });
|
|
930
964
|
}
|
|
931
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
965
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxTableModule, decorators: [{
|
|
932
966
|
type: NgModule,
|
|
933
967
|
args: [{
|
|
934
968
|
imports: importsAndExports,
|
|
@@ -945,6 +979,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
945
979
|
* @returns
|
|
946
980
|
*/
|
|
947
981
|
const DEFAULT_DBX_TABLE_READER_COLUMN_TRACK_BY = (column) => column.columnName;
|
|
982
|
+
/**
|
|
983
|
+
* Creates a {@link DbxTableReader} that provides reactive access to cell data across all columns and items in the table.
|
|
984
|
+
*
|
|
985
|
+
* @param config The reader configuration containing the delegate and table store
|
|
986
|
+
* @returns A {@link DbxTableReader} instance with observable accessors for cell data
|
|
987
|
+
*/
|
|
948
988
|
function dbxTableReader(config) {
|
|
949
989
|
const { delegate, tableStore } = config;
|
|
950
990
|
const { items$ } = tableStore;
|
|
@@ -999,11 +1039,10 @@ function dbxTableReader(config) {
|
|
|
999
1039
|
return allColumnsData$.pipe(map((columnsData) => columnsData.record[columnKey]), shareReplay(1));
|
|
1000
1040
|
};
|
|
1001
1041
|
const loadCellDataPairsForColumn = (column) => {
|
|
1002
|
-
|
|
1042
|
+
return _columnAccessorForColumn(column).pipe(switchMap((accessor) => {
|
|
1003
1043
|
// when visibility changes, the data will change to be an empty array
|
|
1004
1044
|
return accessor ? accessor.cellData$ : of([]);
|
|
1005
1045
|
}), shareReplay(1));
|
|
1006
|
-
return columnsData$;
|
|
1007
1046
|
};
|
|
1008
1047
|
const cellDataPairsForColumn = (column) => {
|
|
1009
1048
|
return loadCellDataPairsForColumn(column);
|
|
@@ -1013,7 +1052,7 @@ function dbxTableReader(config) {
|
|
|
1013
1052
|
};
|
|
1014
1053
|
const cellDataPairForColumnAndItem = (column, item) => {
|
|
1015
1054
|
const itemKey = trackItem(item);
|
|
1016
|
-
|
|
1055
|
+
return _columnAccessorForColumn(column).pipe(switchMap((columnsData) => {
|
|
1017
1056
|
return columnsData
|
|
1018
1057
|
? columnsData.cellDataAccessors$.pipe(switchMap((cellDataAccessor) => {
|
|
1019
1058
|
const itemAccessor = cellDataAccessor.accessorsRecord[itemKey];
|
|
@@ -1022,7 +1061,6 @@ function dbxTableReader(config) {
|
|
|
1022
1061
|
}))
|
|
1023
1062
|
: of(null);
|
|
1024
1063
|
}), shareReplay(1));
|
|
1025
|
-
return columnsData$;
|
|
1026
1064
|
};
|
|
1027
1065
|
const cellDataForColumnAndItem = (column, item) => {
|
|
1028
1066
|
return cellDataPairForColumnAndItem(column, item).pipe(map((pair) => pair?.value));
|