import * as i0 from '@angular/core';
import { signal, Component, ChangeDetectionStrategy, Injectable, inject, computed, NgModule, input, Directive, ElementRef, InjectionToken, viewChild, effect } from '@angular/core';
import { DatePipe, NgClass } from '@angular/common';
import { isSameDateDay } from '@dereekb/date';
import { filterMaybe, beginLoading, valueFromFinishedLoadingState, mapLoadingStateValueWithOperator, asObservable, SubscriptionObject, maybeValueFromObservableOrValue, loadingStateContext } from '@dereekb/rxjs';
import { spaceSeparatedCssClasses, pushArrayItemsIntoArray, filterMaybeArrayValues } from '@dereekb/util';
import { ComponentStore } from '@ngrx/component-store';
import { switchMap, first, tap, map, distinctUntilChanged, shareReplay, combineLatest, of, startWith, filter, throttleTime, BehaviorSubject } from 'rxjs';
import * as i1 from '@angular/material/datepicker';
import { DateRange, MAT_DATE_RANGE_SELECTION_STRATEGY, MatDatepickerModule } from '@angular/material/datepicker';
import { DateAdapter } from '@angular/material/core';
import * as i2 from '@angular/forms';
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
import { format, addDays } from 'date-fns';
import * as i3 from '@angular/material/button';
import { MatButtonModule } from '@angular/material/button';
import { toSignal, toObservable } from '@angular/core/rxjs-interop';
import { DbxInjectionComponent } from '@dereekb/dbx-core';
import { resizeSignal, DbxLoadingComponent } from '@dereekb/dbx-web';
import { InfiniteScrollDirective } from 'ngx-infinite-scroll';
import * as i1$1 from '@angular/material/table';
import { MatTable, MatTableModule } from '@angular/material/table';

/**
 * A table header component used for rendering date values on the header.
 */
class DbxTableDateHeaderComponent {
    left = 'E';
    right = 'MMM d';
    _dateSignal = signal(undefined);
    dateSignal = this._dateSignal.asReadonly();
    get date() {
        return this._dateSignal();
    }
    set date(date) {
        this._dateSignal.set(date);
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDateHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxTableDateHeaderComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
    @if (dateSignal()) {
      <div class="dbx-table-date-column-header">
        <span class="dbx-table-date-column-header-left">{{ dateSignal() | date: left }}</span>
        <span>{{ dateSignal() | date: right }}</span>
      </div>
    }
  `, isInline: true, dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDateHeaderComponent, decorators: [{
            type: Component,
            args: [{
                    template: `
    @if (dateSignal()) {
      <div class="dbx-table-date-column-header">
        <span class="dbx-table-date-column-header-left">{{ dateSignal() | date: left }}</span>
        <span>{{ dateSignal() | date: right }}</span>
      </div>
    }
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    imports: [DatePipe],
                    standalone: true
                }]
        }] });
function dbxTableDateHeaderInjectionFactory() {
    return (column) => {
        const config = {
            componentClass: DbxTableDateHeaderComponent,
            init: (x) => {
                x.date = column.meta;
            }
        };
        return config;
    };
}

const NO_GROUPS_ID = 'none';
function defaultDbxTableItemGroup(items) {
    return {
        groupId: NO_GROUPS_ID,
        items,
        meta: undefined,
        default: true
    };
}

class DbxTableStore extends ComponentStore {
    constructor() {
        super({
            input: null,
            dataDelegate: null,
            viewDelegate: null
        });
    }
    // MARK: Effects
    loadMore = this.effect((input) => {
        return input.pipe(switchMap(() => this.data$.pipe(first(), tap((x) => {
            if (x.loadMore) {
                x.loadMore();
            }
        }))));
    });
    // MARK: Accessors
    input$ = this.state$.pipe(map((x) => x.input), distinctUntilChanged(), shareReplay(1));
    dataDelegate$ = this.state$.pipe(map((x) => x.dataDelegate), distinctUntilChanged(), shareReplay(1));
    currentViewDelegate$ = this.state$.pipe(map((x) => x.viewDelegate), distinctUntilChanged(), shareReplay(1));
    viewDelegate$ = this.currentViewDelegate$.pipe(filterMaybe());
    tableCssClasses$ = this.viewDelegate$.pipe(map((x) => x.tableClasses));
    spaceSeparatedTableCssClasses$ = this.tableCssClasses$.pipe(map((x) => spaceSeparatedCssClasses(x)), distinctUntilChanged(), shareReplay(1));
    dataState$ = combineLatest([this.input$, this.dataDelegate$]).pipe(switchMap(([input, dataDelegate]) => {
        let obs;
        if (input && dataDelegate) {
            obs = dataDelegate.loadData(input);
        }
        else {
            obs = of(beginLoading());
        }
        return obs;
    }), shareReplay(1));
    data$ = this.dataState$.pipe(
    //
    valueFromFinishedLoadingState(), filterMaybe(), distinctUntilChanged(), shareReplay(1));
    columns$ = this.data$.pipe(map((x) => x.columns), shareReplay(1));
    itemsState$ = this.data$.pipe(switchMap((x) => x.items$), shareReplay(1));
    items$ = this.itemsState$.pipe(valueFromFinishedLoadingState(), filterMaybe(), shareReplay(1));
    groupsState$ = this.itemsState$.pipe(mapLoadingStateValueWithOperator(switchMap((x) => {
        return this.viewDelegate$.pipe(switchMap((viewDelegate) => {
            let groups;
            if (viewDelegate.groupBy) {
                groups = asObservable(viewDelegate.groupBy(x));
            }
            else {
                groups = of([defaultDbxTableItemGroup(x)]);
            }
            return groups;
        }));
    })), shareReplay(1));
    groups$ = this.groupsState$.pipe(valueFromFinishedLoadingState(), filterMaybe(), shareReplay(1));
    // MARK: State Changes
    setInput = this.updater((state, input) => ({ ...state, input }));
    setDataDelegate = this.updater((state, dataDelegate) => ({ ...state, dataDelegate }));
    setViewDelegate = this.updater((state, viewDelegate) => ({ ...state, viewDelegate }));
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableStore });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableStore, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy {
    _dateAdapter = inject((DateAdapter));
    dbxTableDateRangeDayDistanceInputCellInputComponent = inject(DbxTableDateRangeDayDistanceInputCellInputComponent);
    selectionFinished(date) {
        return this._createFiveDayRange(date);
    }
    createPreview(activeDate) {
        return this._createFiveDayRange(activeDate);
    }
    _createFiveDayRange(date) {
        if (date) {
            const start = date;
            const end = this._dateAdapter.addCalendarDays(date, this.dbxTableDateRangeDayDistanceInputCellInputComponent.daysDistance);
            return new DateRange(start, end);
        }
        return new DateRange(null, null);
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy, decorators: [{
            type: Injectable
        }] });
const DEFAULT_DBX_TABLE_DATE_RANGE_DAY_DISTIANCE_INPUT_CELL_COMPONENT_CONFIG = { daysDistance: 6 };
const DEFAULT_DBX_TABLE_DATE_RANGE_DAY_BUTTON_FORMAT = 'MMM dd';
/**
 * Cell input for a DateRangeDayDistanceInput value.
 */
class DbxTableDateRangeDayDistanceInputCellInputComponent {
    tableStore = inject((DbxTableStore));
    _syncSub = new SubscriptionObject();
    _valueSub = new SubscriptionObject();
    _pickerOpenedSignal = signal(false);
    _configSignal = signal(DEFAULT_DBX_TABLE_DATE_RANGE_DAY_DISTIANCE_INPUT_CELL_COMPONENT_CONFIG);
    range = new FormGroup({
        start: new FormControl(null),
        end: new FormControl(null)
    });
    pickerOpened$ = this.range.valueChanges.pipe(startWith(this.range.value));
    minDateSignal = computed(() => this._configSignal().minDate ?? null);
    maxDateSignal = computed(() => this._configSignal().maxDate ?? null);
    buttonFormatSignal = computed(() => this._configSignal().buttonFormat ?? DEFAULT_DBX_TABLE_DATE_RANGE_DAY_BUTTON_FORMAT);
    rangeValue$ = this.range.valueChanges.pipe(startWith(this.range.value));
    dateRangeStringSignal = computed(() => {
        const buttonFormat = this.buttonFormatSignal();
        const { start, end } = this.range.value;
        if (start && end) {
            return `${format(start, buttonFormat)} - ${format(end, buttonFormat)}`;
        }
        else {
            return `Select Date`;
        }
    });
    ngOnInit() {
        this._syncSub.subscription = this.tableStore.input$.subscribe((x) => {
            const start = x?.date ?? null;
            const end = start ? addDays(start, this.daysDistance) : undefined;
            this.range.setValue({
                start,
                end
            });
        });
        this._valueSub.subscription = this.rangeValue$
            .pipe(filter((x) => Boolean(x.start)), distinctUntilChanged((a, b) => isSameDateDay(a?.start, b?.start)), throttleTime(100, undefined, { trailing: true }))
            .subscribe((x) => {
            if (x.start) {
                this.tableStore.setInput({ date: x.start, distance: this.daysDistance });
            }
        });
    }
    ngOnDestroy() {
        this._syncSub.destroy();
        this._valueSub.destroy();
    }
    get daysDistance() {
        return this._configSignal().daysDistance;
    }
    get config() {
        return this._configSignal();
    }
    set config(config) {
        this._configSignal.set(config || DEFAULT_DBX_TABLE_DATE_RANGE_DAY_DISTIANCE_INPUT_CELL_COMPONENT_CONFIG);
    }
    pickerOpened() {
        this._pickerOpenedSignal.set(true);
    }
    pickerClosed() {
        this._pickerOpenedSignal.set(false);
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableDateRangeDayDistanceInputCellInputComponent, isStandalone: true, selector: "ng-component", providers: [
            {
                provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
                useClass: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy
            }
        ], ngImport: i0, template: `
    <div class="dbx-table-date-range-distance-input-cell">
      <mat-date-range-input class="dbx-table-date-range-distance-input" [min]="minDateSignal()" [max]="maxDateSignal()" [formGroup]="range" [rangePicker]="picker">
        <input matStartDate formControlName="start" placeholder="Start date" />
        <input matEndDate formControlName="end" placeholder="End date" />
      </mat-date-range-input>
      <button mat-stroked-button color="primary" (click)="picker.open()">{{ dateRangeStringSignal() }}</button>
      <mat-date-range-picker #picker (opened)="pickerOpened()" (closed)="pickerClosed()"></mat-date-range-picker>
    </div>
  `, 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],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[mat-button], button[mat-raised-button], button[mat-flat-button],    button[mat-stroked-button]  ", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputComponent, decorators: [{
            type: Component,
            args: [{
                    template: `
    <div class="dbx-table-date-range-distance-input-cell">
      <mat-date-range-input class="dbx-table-date-range-distance-input" [min]="minDateSignal()" [max]="maxDateSignal()" [formGroup]="range" [rangePicker]="picker">
        <input matStartDate formControlName="start" placeholder="Start date" />
        <input matEndDate formControlName="end" placeholder="End date" />
      </mat-date-range-input>
      <button mat-stroked-button color="primary" (click)="picker.open()">{{ dateRangeStringSignal() }}</button>
      <mat-date-range-picker #picker (opened)="pickerOpened()" (closed)="pickerClosed()"></mat-date-range-picker>
    </div>
  `,
                    providers: [
                        {
                            provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
                            useClass: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy
                        }
                    ],
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    standalone: true,
                    imports: [MatDatepickerModule, ReactiveFormsModule, MatButtonModule]
                }]
        }] });
function dbxTableDateRangeDayDistanceInputCellInput(componentConfig) {
    const config = {
        componentClass: DbxTableDateRangeDayDistanceInputCellInputComponent,
        init: (x) => {
            x.config = componentConfig;
        }
    };
    return config;
}

const importsAndExports$1 = [DbxTableDateHeaderComponent, DbxTableDateRangeDayDistanceInputCellInputComponent];
class DbxTableDateModule {
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDateModule, imports: [DbxTableDateHeaderComponent, DbxTableDateRangeDayDistanceInputCellInputComponent], exports: [DbxTableDateHeaderComponent, DbxTableDateRangeDayDistanceInputCellInputComponent] });
    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDateModule, imports: [DbxTableDateRangeDayDistanceInputCellInputComponent] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDateModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: importsAndExports$1,
                    exports: importsAndExports$1
                }]
        }] });

class DbxTableActionCellComponent {
    tableStore = inject(DbxTableStore);
    config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.actionHeader), distinctUntilChanged());
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableActionCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableActionCellComponent, isStandalone: true, selector: "dbx-table-action-cell", ngImport: i0, template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableActionCellComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-action-cell',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    standalone: true,
                    imports: [DbxInjectionComponent]
                }]
        }] });

/**
 * A table header component used for injecting the input picker view.
 */
class DbxTableInputCellComponent {
    tableStore = inject(DbxTableStore);
    config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.inputHeader), distinctUntilChanged());
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableInputCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableInputCellComponent, isStandalone: true, selector: "dbx-table-input-cell", ngImport: i0, template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableInputCellComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-input-cell',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    standalone: true,
                    imports: [DbxInjectionComponent]
                }]
        }] });

class DbxTableSummaryEndCellComponent {
    tableStore = inject(DbxTableStore);
    config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.summaryRowEnd), distinctUntilChanged());
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableSummaryEndCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableSummaryEndCellComponent, isStandalone: true, selector: "dbx-table-summary-end-cell", ngImport: i0, template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableSummaryEndCellComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-summary-end-cell',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    standalone: true,
                    imports: [DbxInjectionComponent]
                }]
        }] });

/**
 * A table header component used for injecting the input picker view.
 */
class DbxTableSummaryStartCellComponent {
    tableStore = inject(DbxTableStore);
    config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.summaryRowHeader), distinctUntilChanged());
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableSummaryStartCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableSummaryStartCellComponent, isStandalone: true, selector: "dbx-table-summary-start-cell", ngImport: i0, template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableSummaryStartCellComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-summary-start-cell',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    standalone: true,
                    imports: [DbxInjectionComponent]
                }]
        }] });

/**
 * Abstract directive that has a column input.
 */
class AbstractDbxTableColumnDirective {
    tableStore = inject((DbxTableStore));
    column = input();
    column$ = toObservable(this.column).pipe(filterMaybe(), distinctUntilChanged());
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractDbxTableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: AbstractDbxTableColumnDirective, inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractDbxTableColumnDirective, decorators: [{
            type: Directive
        }] });

class DbxTableColumnHeaderComponent extends AbstractDbxTableColumnDirective {
    config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => {
        const columnHeader = viewDelegate.columnHeader;
        if (columnHeader) {
            return this.column$.pipe(map((x) => columnHeader(x)));
        }
        else {
            return of(undefined);
        }
    }), distinctUntilChanged());
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableColumnHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableColumnHeaderComponent, isStandalone: true, selector: "dbx-table-column-header", usesInheritance: true, ngImport: i0, template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableColumnHeaderComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-column-header',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    standalone: true,
                    imports: [DbxInjectionComponent]
                }]
        }] });

class DbxTableColumnFooterComponent extends AbstractDbxTableColumnDirective {
    config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => {
        const columnFooter = viewDelegate.columnFooter;
        if (columnFooter) {
            return this.column$.pipe(map((x) => columnFooter(x)));
        }
        else {
            return of(undefined);
        }
    }), distinctUntilChanged());
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableColumnFooterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableColumnFooterComponent, isStandalone: true, selector: "dbx-table-column-footer", usesInheritance: true, ngImport: i0, template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableColumnFooterComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-column-footer',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    standalone: true,
                    imports: [DbxInjectionComponent]
                }]
        }] });

class DbxTableColumnSizeDirective {
    elementRef = inject(ElementRef);
    resized = resizeSignal(this.elementRef);
    _columnsMap = new BehaviorSubject(new Map());
    columns$ = this._columnsMap.asObservable();
    columnsSignal = toSignal(this.columns$);
    visibleColumnsSignal = computed(() => {
        const resized = this.resized();
        const columnsMap = this.columnsSignal();
        const { width } = resized.newRect;
        let visibleColumns = 0;
        const itemColumns = [];
        let headerColumn;
        let tailColumn;
        columnsMap.forEach((column) => {
            const index = column.index();
            switch (index) {
                case 'head':
                    headerColumn = column;
                    break;
                case 'tail':
                    tailColumn = column;
                    break;
                default:
                    itemColumns[index] = column;
                    break;
            }
        });
        const headerColumnWidth = headerColumn?.width || 0;
        const tailColumnWidth = tailColumn?.width || 0;
        let remainingTableWidth = width - headerColumnWidth;
        visibleColumns = 1;
        let i = 0;
        while (remainingTableWidth > 0 && i < itemColumns.length) {
            const nextColumn = itemColumns[i];
            i += 1;
            const columnWidth = nextColumn.width;
            remainingTableWidth -= columnWidth;
            if (remainingTableWidth >= 0) {
                visibleColumns += 1;
            }
        }
        // show the tail column
        if (tailColumn != null && visibleColumns === itemColumns.length + 1 && Math.abs(remainingTableWidth - tailColumnWidth) < 3) {
            visibleColumns += 1;
        }
        return visibleColumns;
    });
    addColumn(column) {
        this._columnsMap.value.set(column.index(), column);
        this._columnsMap.next(this._columnsMap.value);
    }
    removeColumn(column) {
        if (this._columnsMap.value.delete(column.index())) {
            this._columnsMap.next(this._columnsMap.value);
        }
    }
    ngOnDestroy() {
        this._columnsMap.complete();
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableColumnSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableColumnSizeDirective, isStandalone: true, selector: "[dbx-table-column-size]", exportAs: ["dbxTableColumnSize"], ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableColumnSizeDirective, decorators: [{
            type: Directive,
            args: [{
                    exportAs: 'dbxTableColumnSize',
                    selector: '[dbx-table-column-size]',
                    standalone: true
                }]
        }] });
/**
 * References a specific element and the index of the column.
 */
class DbxColumnSizeColumnDirective {
    dbxColumnSizeDirective = inject(DbxTableColumnSizeDirective);
    elementRef = inject(ElementRef);
    index = input.required({ alias: 'dbx-column-size-column' });
    ngOnInit() {
        this.dbxColumnSizeDirective.addColumn(this);
    }
    ngOnDestroy() {
        this.dbxColumnSizeDirective.removeColumn(this);
    }
    get width() {
        return this.elementRef.nativeElement.clientWidth;
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxColumnSizeColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", 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 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxColumnSizeColumnDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[dbx-column-size-column]',
                    standalone: true
                }]
        }] });

const DBX_TABLE_COLUMN_SIZE_PARENT_ELEMENT_REF_TOKEN = new InjectionToken('DBX_TABLE_COLUMN_SIZE_PARENT_ELEMENT_REF_TOKEN');

/**
 * Abstract directive that has an element input.
 */
class AbstractDbxTableItemDirective {
    tableStore = inject((DbxTableStore));
    item = input();
    item$ = toObservable(this.item);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractDbxTableItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: AbstractDbxTableItemDirective, inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractDbxTableItemDirective, decorators: [{
            type: Directive
        }] });

class DbxTableItemCellComponent extends AbstractDbxTableItemDirective {
    column = input();
    column$ = toObservable(this.column);
    config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => combineLatest([this.column$, this.item$]).pipe(map(([column, item]) => (column && item ? viewDelegate.itemCell(column, item) : undefined)))));
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableItemCellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", 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: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableItemCellComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-item-cell',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    imports: [DbxInjectionComponent],
                    standalone: true
                }]
        }] });

class DbxTableItemHeaderComponent extends AbstractDbxTableItemDirective {
    config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => this.item$.pipe(map((x) => (x != null ? viewDelegate.itemHeader(x) : undefined)))), maybeValueFromObservableOrValue());
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableItemHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableItemHeaderComponent, isStandalone: true, selector: "dbx-table-item-header", usesInheritance: true, ngImport: i0, template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableItemHeaderComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-item-header',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    imports: [DbxInjectionComponent],
                    standalone: true
                }]
        }] });

class DbxTableItemActionComponent extends AbstractDbxTableItemDirective {
    config$ = this.tableStore.viewDelegate$.pipe(map((viewDelegate) => {
        const itemAction = viewDelegate.itemAction;
        let obs = undefined;
        if (itemAction) {
            obs = this.item$.pipe(map((x) => (x != null ? itemAction(x) : undefined)));
        }
        return obs;
    }), maybeValueFromObservableOrValue());
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableItemActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableItemActionComponent, isStandalone: true, selector: "dbx-table-item-action", usesInheritance: true, ngImport: i0, template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableItemActionComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-item-action',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    imports: [DbxInjectionComponent],
                    standalone: true
                }]
        }] });

/**
 * Abstract directive that has an element input.
 */
class AbstractDbxTableGroupDirective {
    tableStore = inject((DbxTableStore));
    group = input();
    group$ = toObservable(this.group).pipe(filterMaybe(), distinctUntilChanged());
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractDbxTableGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: AbstractDbxTableGroupDirective, inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractDbxTableGroupDirective, decorators: [{
            type: Directive
        }] });

class DbxTableGroupHeaderComponent extends AbstractDbxTableGroupDirective {
    config$ = this.tableStore.viewDelegate$.pipe(map((viewDelegate) => {
        const groupHeader = viewDelegate.groupHeader;
        let obs = undefined;
        if (groupHeader) {
            obs = this.group$.pipe(map((x) => groupHeader(x)));
        }
        return obs;
    }), maybeValueFromObservableOrValue(), distinctUntilChanged());
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableGroupHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableGroupHeaderComponent, isStandalone: true, selector: "dbx-table-group-header", usesInheritance: true, ngImport: i0, template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableGroupHeaderComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-group-header',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    imports: [DbxInjectionComponent],
                    standalone: true
                }]
        }] });

class DbxTableGroupFooterComponent extends AbstractDbxTableGroupDirective {
    config$ = this.tableStore.viewDelegate$.pipe(map((viewDelegate) => {
        const groupFooter = viewDelegate.groupFooter;
        let obs = undefined;
        if (groupFooter) {
            obs = this.group$.pipe(map((x) => groupFooter(x)));
        }
        return obs;
    }), maybeValueFromObservableOrValue(), distinctUntilChanged());
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableGroupFooterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableGroupFooterComponent, isStandalone: true, selector: "dbx-table-group-footer", usesInheritance: true, ngImport: i0, template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableGroupFooterComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-group-footer',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    imports: [DbxInjectionComponent],
                    standalone: true
                }]
        }] });

/**
 * A table header component used for injecting the input picker view.
 */
class DbxTableFullSummaryRowComponent {
    tableStore = inject(DbxTableStore);
    config$ = this.tableStore.viewDelegate$.pipe(map((x) => x.fullSummaryRow), distinctUntilChanged());
    configSignal = toSignal(this.config$);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableFullSummaryRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DbxTableFullSummaryRowComponent, isStandalone: true, selector: "dbx-table-full-summary-row", host: { classAttribute: "dbx-h100 dbx-flex-bar" }, ngImport: i0, template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableFullSummaryRowComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-table-full-summary-row',
                    template: `
    <dbx-injection [config]="configSignal()"></dbx-injection>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    standalone: true,
                    imports: [DbxInjectionComponent],
                    host: {
                        class: 'dbx-h100 dbx-flex-bar'
                    }
                }]
        }] });

const DBX_TABLE_ITEMS_COLUMN_NAME = '_items';
const DBX_TABLE_ACTIONS_COLUMN_NAME = '_actions';
function isDbxTableViewGroupElement(element) {
    return element.type === 'group';
}
function isDbxTableViewItemElement(element) {
    return element.type === 'item';
}
/**
 * A table with fixed content
 */
class DbxTableViewComponent {
    tableStore = inject((DbxTableStore));
    table = viewChild.required(MatTable);
    DEFAULT_TRACK_BY_FUNCTION = (index) => {
        return index;
    };
    scrollDistance = input(0.5);
    throttleScroll = input(50);
    itemsColumnName = DBX_TABLE_ITEMS_COLUMN_NAME;
    actionsColumnName = DBX_TABLE_ACTIONS_COLUMN_NAME;
    innerColumns$ = this.tableStore.columns$;
    innerColumnNames$ = this.innerColumns$.pipe(map((x) => x.map((y) => y.columnName)), shareReplay(1));
    innerColumnsSignal = toSignal(this.innerColumns$);
    innerColumnNamesSignal = toSignal(this.innerColumnNames$);
    elementsState$ = this.tableStore.groupsState$.pipe(mapLoadingStateValueWithOperator(switchMap((groups) => {
        return this.tableStore.viewDelegate$.pipe(map((viewDelegate) => {
            const { groupHeader: inputGroupHeader, groupFooter: inputGroupFooter } = viewDelegate;
            const hasGroupHeader = inputGroupHeader != null ? (group) => inputGroupHeader(group) != null : () => false;
            const hasGroupFooter = inputGroupFooter != null ? (group) => inputGroupFooter(group) != null : () => false;
            return groups
                .map((group) => {
                const { items } = group;
                const itemElements = items.map((item) => ({
                    type: 'item',
                    item
                }));
                let elements;
                if (group.default) {
                    elements = itemElements;
                }
                else {
                    const header = hasGroupHeader(group);
                    const footer = hasGroupFooter(group);
                    elements = [];
                    if (header) {
                        elements.push({
                            type: 'group',
                            location: 'header',
                            group
                        });
                    }
                    pushArrayItemsIntoArray(elements, itemElements);
                    if (footer) {
                        elements.push({
                            type: 'group',
                            location: 'footer',
                            group
                        });
                    }
                }
                return elements;
            })
                .flat();
        }));
    })), shareReplay(1));
    elements$ = this.elementsState$.pipe(valueFromFinishedLoadingState(() => []), throttleTime(50, undefined, { leading: true, trailing: true }), shareReplay(1));
    displayedColumns$ = this.innerColumnNames$.pipe(map((columnNames) => {
        return [this.itemsColumnName, ...columnNames, this.actionsColumnName];
    }), shareReplay(1));
    displayedColumnsSignal = computed(() => {
        const columnNames = this.innerColumnNamesSignal() || [];
        return [this.itemsColumnName, ...columnNames, this.actionsColumnName];
    });
    trackByFunction$ = this.tableStore.viewDelegate$.pipe(map((x) => x.trackBy ?? this.DEFAULT_TRACK_BY_FUNCTION), shareReplay(1));
    inputTrackByFunctionSignal = toSignal(this.trackByFunction$, { initialValue: this.DEFAULT_TRACK_BY_FUNCTION });
    trackElementByFunctionSignal = computed(() => {
        const trackByFunction = this.inputTrackByFunctionSignal();
        const fn = (index, element) => {
            if (element.type === 'item') {
                return `i_${trackByFunction(index, element.item)}`;
            }
            else {
                return `g_${element.group.groupId}`;
            }
        };
        return fn;
    });
    context = loadingStateContext({ obs: this.tableStore.dataState$ });
    dataLoadingContext = loadingStateContext({ obs: this.elementsState$ });
    contextSignal = toSignal(this.context.state$);
    dataLoadingContextSignal = toSignal(this.dataLoadingContext.state$);
    viewDelegateSignal = toSignal(this.tableStore.viewDelegate$);
    elementsSignal = toSignal(this.elements$, { initialValue: [] });
    tableCssClasses = toSignal(this.tableStore.spaceSeparatedTableCssClasses$);
    onScrollDown() {
        this.tableStore.loadMore();
    }
    showItemRow(_, row) {
        return row.type === 'item';
    }
    showGroupHeaderRow(_, row) {
        return row.type === 'group' && row.location === 'header';
    }
    showGroupFooterRow(_, row) {
        return row.type === 'group' && row.location === 'footer';
    }
    showFooterRowSignal = computed(() => {
        const viewDelegate = this.viewDelegateSignal();
        const showFooterRow = viewDelegate && (viewDelegate.summaryRowHeader != null || viewDelegate.columnFooter != null || viewDelegate.summaryRowEnd != null);
        return showFooterRow;
    });
    showFullSummaryRowSignal = computed(() => {
        const viewDelegate = this.viewDelegateSignal();
        return viewDelegate?.fullSummaryRow != null;
    });
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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: [
            {
                provide: DBX_TABLE_COLUMN_SIZE_PARENT_ELEMENT_REF_TOKEN,
                useExisting: ElementRef
            }
        ], 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\" dbx-table-column-size #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: "[dbx-table-column-size]", exportAs: ["dbxTableColumnSize"] }, { kind: "directive", type: DbxColumnSizeColumnDirective, selector: "[dbx-column-size-column]", inputs: ["dbx-column-size-column"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableViewComponent, decorators: [{
            type: Component,
            args: [{ selector: 'dbx-table-view', imports: [
                        DbxLoadingComponent,
                        NgClass,
                        InfiniteScrollDirective,
                        MatTableModule,
                        DbxTableInputCellComponent,
                        DbxTableItemHeaderComponent,
                        DbxTableItemCellComponent,
                        DbxTableItemActionComponent,
                        DbxTableActionCellComponent,
                        DbxTableColumnHeaderComponent,
                        DbxTableColumnFooterComponent,
                        DbxTableSummaryStartCellComponent,
                        DbxTableSummaryEndCellComponent,
                        DbxTableGroupHeaderComponent,
                        DbxTableGroupFooterComponent,
                        DbxTableFullSummaryRowComponent,
                        DbxTableColumnSizeDirective,
                        DbxColumnSizeColumnDirective
                    ], providers: [
                        {
                            provide: DBX_TABLE_COLUMN_SIZE_PARENT_ELEMENT_REF_TOKEN,
                            useExisting: ElementRef
                        }
                    ], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, 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\" dbx-table-column-size #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" }]
        }] });

/**
 * Directive for providing and configuring a DbxTableStore
 */
class DbxTableDirective {
    tableStore = inject((DbxTableStore));
    dbxTableInput = input();
    dbxTableViewDelegate = input();
    dbxTableDataDelegate = input();
    _setOnTableStoreEffect = effect(() => {
        this.tableStore.setInput(this.dbxTableInput());
        this.tableStore.setViewDelegate(this.dbxTableViewDelegate());
        this.tableStore.setDataDelegate(this.dbxTableDataDelegate());
    }, {
        allowSignalWrites: true
    });
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", 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 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[dbxTable]',
                    providers: [DbxTableStore],
                    standalone: true
                }]
        }] });

const importsAndExports = [DbxTableDirective, DbxTableViewComponent];
class DbxTableModule {
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: DbxTableModule, imports: [DbxTableDirective, DbxTableViewComponent], exports: [DbxTableDirective, DbxTableViewComponent] });
    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableModule, imports: [DbxTableViewComponent] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTableModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: importsAndExports,
                    exports: importsAndExports
                }]
        }] });

/**
 * Default track by function for DbxTableColumn.
 *
 * Returns the column name.
 *
 * @param column
 * @returns
 */
const DEFAULT_DBX_TABLE_READER_COLUMN_TRACK_BY = (column) => column.columnName;
function dbxTableReader(config) {
    const { delegate, tableStore } = config;
    const { items$ } = tableStore;
    const { readItemCellDataForColumn, trackColumn: inputTrackColumn, trackItem } = delegate;
    const trackColumn = (inputTrackColumn ?? DEFAULT_DBX_TABLE_READER_COLUMN_TRACK_BY);
    const _cellDataAccessorsForColumn = (column) => {
        return items$.pipe(map((x) => {
            const allObservables = [];
            const accessorsRecord = {};
            x.forEach((item) => {
                const itemKey = trackItem(item);
                const accessor$ = readItemCellDataForColumn(column, item).pipe(map((value) => {
                    return {
                        column,
                        item,
                        value
                    };
                }));
                accessorsRecord[itemKey] = accessor$;
                allObservables.push(accessor$);
            });
            const allValues$ = combineLatest(allObservables).pipe(startWith([]), shareReplay(1));
            return {
                column,
                allValues$,
                accessorsRecord
            };
        }), shareReplay(1));
    };
    function columnDataCellsAccessor(columnKey, column) {
        const cellDataAccessors$ = _cellDataAccessorsForColumn(column);
        const cellData$ = cellDataAccessors$.pipe(switchMap((record) => record.allValues$), startWith([]), shareReplay(1));
        return {
            columnKey,
            column,
            cellDataAccessors$,
            cellData$
        };
    }
    const allColumnsData$ = tableStore.columns$.pipe(map((nextColumns) => {
        const record = {};
        nextColumns.forEach((column) => {
            const columnKey = trackColumn(column);
            record[columnKey] = columnDataCellsAccessor(columnKey, column);
        });
        return {
            record
        };
    }), shareReplay(1));
    const _columnAccessorForColumn = (column) => {
        const columnKey = trackColumn(column);
        return allColumnsData$.pipe(map((columnsData) => columnsData.record[columnKey]), shareReplay(1));
    };
    const loadCellDataPairsForColumn = (column) => {
        const columnsData$ = _columnAccessorForColumn(column).pipe(switchMap((accessor) => {
            // when visibility changes, the data will change to be an empty array
            return accessor ? accessor.cellData$ : of([]);
        }), shareReplay(1));
        return columnsData$;
    };
    const cellDataPairsForColumn = (column) => {
        return loadCellDataPairsForColumn(column);
    };
    const cellDataForColumn = (column) => {
        return cellDataPairsForColumn(column).pipe(map((pairs) => filterMaybeArrayValues(pairs.map((pair) => pair.value))), shareReplay(1));
    };
    const cellDataPairForColumnAndItem = (column, item) => {
        const itemKey = trackItem(item);
        const columnsData$ = _columnAccessorForColumn(column).pipe(switchMap((columnsData) => {
            return columnsData
                ? columnsData.cellDataAccessors$.pipe(switchMap((cellDataAccessor) => {
                    const itemAccessor = cellDataAccessor.accessorsRecord[itemKey];
                    const result = itemAccessor ? itemAccessor : of(null);
                    return result;
                }))
                : of(null);
        }), shareReplay(1));
        return columnsData$;
    };
    const cellDataForColumnAndItem = (column, item) => {
        return cellDataPairForColumnAndItem(column, item).pipe(map((pair) => pair?.value));
    };
    return {
        tableStore,
        delegate,
        cellDataPairsForColumn,
        cellDataForColumn,
        cellDataPairForColumnAndItem,
        cellDataForColumnAndItem
    };
}

/**
 * Generated bundle index. Do not edit.
 */

export { AbstractDbxTableColumnDirective, AbstractDbxTableGroupDirective, AbstractDbxTableItemDirective, DBX_TABLE_ACTIONS_COLUMN_NAME, DBX_TABLE_COLUMN_SIZE_PARENT_ELEMENT_REF_TOKEN, DBX_TABLE_ITEMS_COLUMN_NAME, DEFAULT_DBX_TABLE_DATE_RANGE_DAY_BUTTON_FORMAT, DEFAULT_DBX_TABLE_DATE_RANGE_DAY_DISTIANCE_INPUT_CELL_COMPONENT_CONFIG, DEFAULT_DBX_TABLE_READER_COLUMN_TRACK_BY, DbxColumnSizeColumnDirective, DbxTableActionCellComponent, DbxTableColumnFooterComponent, DbxTableColumnHeaderComponent, DbxTableColumnSizeDirective, DbxTableDateHeaderComponent, DbxTableDateModule, DbxTableDateRangeDayDistanceInputCellInputComponent, DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy, DbxTableDirective, DbxTableGroupFooterComponent, DbxTableGroupHeaderComponent, DbxTableInputCellComponent, DbxTableItemActionComponent, DbxTableItemCellComponent, DbxTableItemHeaderComponent, DbxTableModule, DbxTableStore, DbxTableSummaryEndCellComponent, DbxTableSummaryStartCellComponent, DbxTableViewComponent, NO_GROUPS_ID, dbxTableDateHeaderInjectionFactory, dbxTableDateRangeDayDistanceInputCellInput, dbxTableReader, defaultDbxTableItemGroup, isDbxTableViewGroupElement, isDbxTableViewItemElement };
//# sourceMappingURL=dereekb-dbx-web-table.mjs.map
