@elderbyte/ngx-starter 22.7.1 → 22.7.3
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.
|
@@ -5889,7 +5889,7 @@ class DataContextAutoStarter extends DataContextLifeCycleBinding {
|
|
|
5889
5889
|
subscribe() {
|
|
5890
5890
|
const startedTrue$ = this._dataContext.isStarted$.pipe(filter((t) => t));
|
|
5891
5891
|
this._subscription = this._autoStartConditionFulfilled$
|
|
5892
|
-
.pipe(takeUntil(startedTrue$), tap((fulfilled) => this.logger.debug(`Got fulfilled event: ${fulfilled}`)), filter((fulfilled) => !!fulfilled), switchMap$1(() => this.
|
|
5892
|
+
.pipe(takeUntil(startedTrue$), tap((fulfilled) => this.logger.debug(`Got fulfilled event: ${fulfilled}`)), filter((fulfilled) => !!fulfilled), switchMap$1(() => this.lazySorts(this._autoStartSpec.initialSort)))
|
|
5893
5893
|
.subscribe((sorts) => this.startDataContext(sorts));
|
|
5894
5894
|
}
|
|
5895
5895
|
/***************************************************************************
|
|
@@ -5897,6 +5897,14 @@ class DataContextAutoStarter extends DataContextLifeCycleBinding {
|
|
|
5897
5897
|
* Private methods *
|
|
5898
5898
|
* *
|
|
5899
5899
|
**************************************************************************/
|
|
5900
|
+
lazySorts(initialSort) {
|
|
5901
|
+
if (initialSort) {
|
|
5902
|
+
return this.awaitFirstNonNull(initialSort);
|
|
5903
|
+
}
|
|
5904
|
+
else {
|
|
5905
|
+
return of(undefined);
|
|
5906
|
+
}
|
|
5907
|
+
}
|
|
5900
5908
|
buildRequiredFilterConditionObservable(requiredFilters) {
|
|
5901
5909
|
return this.awaitFirstNonNull(requiredFilters).pipe(switchMap$1((activeFiltersStructure) => {
|
|
5902
5910
|
return RequiredFilterEvaluator.observeMatch(this._dataContext.filter, activeFiltersStructure).pipe(map((event) => event.isValid));
|
|
@@ -5907,9 +5915,6 @@ class DataContextAutoStarter extends DataContextLifeCycleBinding {
|
|
|
5907
5915
|
this._dataContext.start(initialSort);
|
|
5908
5916
|
}
|
|
5909
5917
|
awaitFirstNonNull(filters) {
|
|
5910
|
-
if (!filters) {
|
|
5911
|
-
return of([]);
|
|
5912
|
-
}
|
|
5913
5918
|
return filters.pipe(filter((f) => f != null), take(1));
|
|
5914
5919
|
}
|
|
5915
5920
|
}
|
|
@@ -18520,7 +18525,7 @@ class ElderTableComponent extends ElderDataViewBaseComponent {
|
|
|
18520
18525
|
provide: ELDER_DATA_VIEW,
|
|
18521
18526
|
useExisting: forwardRef(() => ElderTableComponent),
|
|
18522
18527
|
},
|
|
18523
|
-
], queries: [{ propertyName: "navigationBar", first: true, predicate: ElderTableNavigationBarDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "columnDefs", predicate: MatColumnDef }, { propertyName: "elderColumns", predicate: ElderTableColumnDirective }, { propertyName: "rowDefs", predicate: MatRowDef }, { propertyName: "toolbarRowTemplateQuery", predicate: ElderTableToolbarDirective, read: TemplateRef }], viewQueries: [{ propertyName: "dropListConnector", first: true, predicate: ElderTableDropListConnectorDirective, descendants: true, isSignal: true }, { propertyName: "matTable", first: true, predicate: MatTable, descendants: true, static: true }, { propertyName: "rowsQuery", predicate: ElderTableRowDirective, descendants: true }], exportAs: ["elderTable"], usesInheritance: true, hostDirectives: [{ directive: DataViewInteractionControllerDirective }], ngImport: i0, template: "<div class=\"full\" style=\"overflow: hidden\">\n <div class=\"layout-col elder-table full\" [class.elder-table-dense-horizontal]=\"denseHorizontal()\">\n <!-- Toolbar Rows -->\n @for (toolbarRowTemplate of toolbarRowTemplates(); track toolbarRowTemplate) {\n <ng-template\n *ngTemplateOutlet=\"toolbarRowTemplate; context: { $implicit: this }\"\n ></ng-template>\n }\n\n <!-- Scrollable Table -->\n <div\n class=\"elder-table-inner layout-col {{\n isDataValid(viewData()) ? 'flex' : ''\n }} scrollable elder-table-scroll\"\n elderInfiniteScroll\n [eventThrottle]=\"150\"\n [offsetFactor]=\"2\"\n [ignoreScrollEvent]=\"!isContinuable || !canLoadMore()\"\n (closeToEnd)=\"requestMoreDataZoned($event)\"\n >\n <table\n mat-table\n [id]=\"id()\"\n class=\"elder-mat-inner-table\"\n [trackBy]=\"trackByFn\"\n [dataSource]=\"$any(dc())\"\n [elderDataContextSelection]=\"dc()\"\n #dataSelection=\"elderDataContextSelection\"\n [elderDataContextSelectionModel]=\"selectionModel\"\n elderTableDropListConnector\n [tableDropListConntectorId]=\"id()\"\n >\n <!-- selection Column -->\n <ng-container matColumnDef=\"select\">\n <th mat-header-cell *matHeaderCellDef style=\"width: 0%\">\n <elder-selection-master-checkbox></elder-selection-master-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let entity\">\n <elder-table-selection-cell\n [entity]=\"entity\"\n class=\"elder-table-checkbox\"\n [class.elder-table-checkbox-visible]=\"dataSelection.selectionState().anySelected\"\n ></elder-table-selection-cell>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideHeaderRow()) {\n <tr mat-header-row *matHeaderRowDef=\"displayedColumnsInner(); sticky: true\"></tr>\n }\n <tr\n mat-row\n class=\"elder-table-row\"\n *matRowDef=\"let entity; columns: displayedColumnsInner()\"\n [elderDataViewItemDrag]=\"entity\"\n [elderTableRow]=\"entity\"\n [highlightSelection]=\"interactionMode === 'selection'\"\n [class.dense]=\"dense()\"\n [class.elder-row-hidden]=\"hiddenField && entity[hiddenField]\"\n [class.elder-row-removing]=\"removingField && entity[removingField]\"\n (click)=\"onItemClick(entity, $event)\"\n (dblclick)=\"onItemDoubleClick(entity)\"\n ></tr>\n <!-- Dummy row is needed as drop target (dnd) in case no data is available and no table header is displayed -->\n <ng-template matNoDataRow>\n @if (hasDragAndDropSupport) {\n <tr class=\"elder-empty-drop-row\">\n <td [attr.colspan]=\"displayedColumnsInner()?.length || 1\"></td>\n </tr>\n }\n </ng-template>\n @if (showFooterRow()) {\n <tr mat-footer-row *matFooterRowDef=\"displayedColumnsInner(); sticky: true\"></tr>\n }\n </table>\n </div>\n\n @if (!isDataValid(viewData())) {\n <elder-data-context-state-indicator class=\"flex\" [dataContext]=\"dataContext\">\n </elder-data-context-state-indicator>\n }\n\n <mat-progress-bar\n class=\"flex-none mt-auto\"\n [mode]=\"dcStatus()?.loading ? 'indeterminate' : 'determinate'\"\n [color]=\"dcStatus()?.hasError ? 'warn' : 'primary'\"\n >\n </mat-progress-bar>\n\n <ng-template\n *ngTemplateOutlet=\"navigationBar() ?? defaultNavigationBar; context: { $implicit: this }\"\n ></ng-template>\n </div>\n</div>\n\n<ng-template #defaultNavigationBar>\n <elder-data-navigation></elder-data-navigation>\n</ng-template>\n", styles: [":host{min-width:0;min-height:0}.elder-empty-drop-row{height:48px}.elder-empty-drop-row td{padding:0;border:0}.elder-mat-inner-table:has(.cdk-drag-placeholder) .elder-empty-drop-row{display:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ElderInfiniteScrollDirective, selector: "[elderInfiniteScroll]", inputs: ["listenToHost", "eventThrottle", "offsetFactor", "ignoreScrollEvent", "containerId", "scrollContainer"], outputs: ["closeToEnd", "scrolling"] }, { kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: DataContextSelectionDirective, selector: "[elderDataContextSelection]", inputs: ["elderDataContextSelectionModel", "elderDataContextSelection"], exportAs: ["elderDataContextSelection"] }, { kind: "directive", type: MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "component", type: ElderSelectionMasterCheckboxComponent, selector: "elder-selection-master-checkbox" }, { kind: "directive", type: MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "directive", type: ElderTableRowDirective, selector: "tr[elderTableRow]", inputs: ["elderTableRow", "highlightSelection"], exportAs: ["elderTableRow"] }, { kind: "directive", type: MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "component", type: MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: DataContextStateIndicatorComponent, selector: "elder-data-context-state-indicator", inputs: ["dataContext"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: ElderDataViewItemDragDirective, selector: "[elderDataViewItemDrag]", inputs: ["elderDataViewItemDrag", "canDragItem"] }, { kind: "directive", type: ElderTableDropListConnectorDirective, selector: "[elderTableDropListConnector]", inputs: ["tableDropListConntectorId"] }, { kind: "component", type: ElderTableSelectionCellComponent, selector: "elder-table-selection-cell", inputs: ["entity"] }, { kind: "component", type: ElderDataNavigationComponent, selector: "elder-data-navigation" }] }); }
|
|
18528
|
+
], queries: [{ propertyName: "navigationBar", first: true, predicate: ElderTableNavigationBarDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "columnDefs", predicate: MatColumnDef }, { propertyName: "elderColumns", predicate: ElderTableColumnDirective }, { propertyName: "rowDefs", predicate: MatRowDef }, { propertyName: "toolbarRowTemplateQuery", predicate: ElderTableToolbarDirective, read: TemplateRef }], viewQueries: [{ propertyName: "dropListConnector", first: true, predicate: ElderTableDropListConnectorDirective, descendants: true, isSignal: true }, { propertyName: "matTable", first: true, predicate: MatTable, descendants: true, static: true }, { propertyName: "rowsQuery", predicate: ElderTableRowDirective, descendants: true }], exportAs: ["elderTable"], usesInheritance: true, hostDirectives: [{ directive: DataViewInteractionControllerDirective }], ngImport: i0, template: "<div class=\"full\" style=\"overflow: hidden\">\n <div class=\"layout-col elder-table full\" [class.elder-table-dense-horizontal]=\"denseHorizontal()\">\n <!-- Toolbar Rows -->\n @for (toolbarRowTemplate of toolbarRowTemplates(); track toolbarRowTemplate) {\n <ng-template\n *ngTemplateOutlet=\"toolbarRowTemplate; context: { $implicit: this }\"\n ></ng-template>\n }\n\n <!-- Scrollable Table -->\n <div\n class=\"elder-table-inner layout-col {{\n isDataValid(viewData()) ? 'flex' : ''\n }} scrollable elder-table-scroll\"\n elderInfiniteScroll\n [eventThrottle]=\"150\"\n [offsetFactor]=\"2\"\n [ignoreScrollEvent]=\"!isContinuable || !canLoadMore()\"\n (closeToEnd)=\"requestMoreDataZoned($event)\"\n >\n <table\n mat-table\n [id]=\"id()\"\n class=\"elder-mat-inner-table\"\n [trackBy]=\"trackByFn\"\n [dataSource]=\"$any(dc())\"\n [elderDataContextSelection]=\"dc()\"\n #dataSelection=\"elderDataContextSelection\"\n [elderDataContextSelectionModel]=\"selectionModel\"\n elderTableDropListConnector\n [tableDropListConntectorId]=\"id()\"\n >\n <!-- selection Column -->\n <ng-container matColumnDef=\"select\">\n <th mat-header-cell *matHeaderCellDef style=\"width: 0%\">\n <elder-selection-master-checkbox></elder-selection-master-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let entity\">\n <elder-table-selection-cell\n [entity]=\"entity\"\n class=\"elder-table-checkbox\"\n [class.elder-table-checkbox-visible]=\"dataSelection.selectionState().anySelected\"\n ></elder-table-selection-cell>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideHeaderRow()) {\n <tr mat-header-row *matHeaderRowDef=\"displayedColumnsInner(); sticky: true\"></tr>\n }\n <tr\n mat-row\n class=\"elder-table-row\"\n *matRowDef=\"let entity; columns: displayedColumnsInner()\"\n [elderDataViewItemDrag]=\"entity\"\n [elderTableRow]=\"entity\"\n [highlightSelection]=\"interactionMode === 'selection'\"\n [class.dense]=\"dense()\"\n [class.elder-row-hidden]=\"hiddenField && entity[hiddenField]\"\n [class.elder-row-removing]=\"removingField && entity[removingField]\"\n (click)=\"onItemClick(entity, $event)\"\n (dblclick)=\"onItemDoubleClick(entity)\"\n ></tr>\n <!-- Dummy row is needed as drop target (dnd) in case no data is available and no table header is displayed -->\n <ng-template matNoDataRow>\n @if (hasDragAndDropSupport) {\n <tr class=\"elder-empty-drop-row\">\n <td [attr.colspan]=\"displayedColumnsInner()?.length || 1\"></td>\n </tr>\n }\n </ng-template>\n @if (showFooterRow()) {\n <tr mat-footer-row *matFooterRowDef=\"displayedColumnsInner(); sticky: true\"></tr>\n }\n </table>\n </div>\n\n @if (!isDataValid(viewData()) && !hasDragAndDropSupport) {\n <elder-data-context-state-indicator class=\"flex\" [dataContext]=\"dataContext\">\n </elder-data-context-state-indicator>\n }\n\n <mat-progress-bar\n class=\"flex-none mt-auto\"\n [mode]=\"dcStatus()?.loading ? 'indeterminate' : 'determinate'\"\n [color]=\"dcStatus()?.hasError ? 'warn' : 'primary'\"\n >\n </mat-progress-bar>\n\n <ng-template\n *ngTemplateOutlet=\"navigationBar() ?? defaultNavigationBar; context: { $implicit: this }\"\n ></ng-template>\n </div>\n</div>\n\n<ng-template #defaultNavigationBar>\n <elder-data-navigation></elder-data-navigation>\n</ng-template>\n", styles: [":host{min-width:0;min-height:0}.elder-empty-drop-row{height:48px}.elder-empty-drop-row td{padding:0;border:0}.elder-mat-inner-table:has(.cdk-drag-placeholder) .elder-empty-drop-row{display:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ElderInfiniteScrollDirective, selector: "[elderInfiniteScroll]", inputs: ["listenToHost", "eventThrottle", "offsetFactor", "ignoreScrollEvent", "containerId", "scrollContainer"], outputs: ["closeToEnd", "scrolling"] }, { kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: DataContextSelectionDirective, selector: "[elderDataContextSelection]", inputs: ["elderDataContextSelectionModel", "elderDataContextSelection"], exportAs: ["elderDataContextSelection"] }, { kind: "directive", type: MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "component", type: ElderSelectionMasterCheckboxComponent, selector: "elder-selection-master-checkbox" }, { kind: "directive", type: MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "directive", type: ElderTableRowDirective, selector: "tr[elderTableRow]", inputs: ["elderTableRow", "highlightSelection"], exportAs: ["elderTableRow"] }, { kind: "directive", type: MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "component", type: MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: DataContextStateIndicatorComponent, selector: "elder-data-context-state-indicator", inputs: ["dataContext"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: ElderDataViewItemDragDirective, selector: "[elderDataViewItemDrag]", inputs: ["elderDataViewItemDrag", "canDragItem"] }, { kind: "directive", type: ElderTableDropListConnectorDirective, selector: "[elderTableDropListConnector]", inputs: ["tableDropListConntectorId"] }, { kind: "component", type: ElderTableSelectionCellComponent, selector: "elder-table-selection-cell", inputs: ["entity"] }, { kind: "component", type: ElderDataNavigationComponent, selector: "elder-data-navigation" }] }); }
|
|
18524
18529
|
}
|
|
18525
18530
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ElderTableComponent, decorators: [{
|
|
18526
18531
|
type: Component,
|
|
@@ -18557,7 +18562,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
|
|
|
18557
18562
|
ElderTableDropListConnectorDirective,
|
|
18558
18563
|
ElderTableSelectionCellComponent,
|
|
18559
18564
|
ElderDataNavigationComponent,
|
|
18560
|
-
], template: "<div class=\"full\" style=\"overflow: hidden\">\n <div class=\"layout-col elder-table full\" [class.elder-table-dense-horizontal]=\"denseHorizontal()\">\n <!-- Toolbar Rows -->\n @for (toolbarRowTemplate of toolbarRowTemplates(); track toolbarRowTemplate) {\n <ng-template\n *ngTemplateOutlet=\"toolbarRowTemplate; context: { $implicit: this }\"\n ></ng-template>\n }\n\n <!-- Scrollable Table -->\n <div\n class=\"elder-table-inner layout-col {{\n isDataValid(viewData()) ? 'flex' : ''\n }} scrollable elder-table-scroll\"\n elderInfiniteScroll\n [eventThrottle]=\"150\"\n [offsetFactor]=\"2\"\n [ignoreScrollEvent]=\"!isContinuable || !canLoadMore()\"\n (closeToEnd)=\"requestMoreDataZoned($event)\"\n >\n <table\n mat-table\n [id]=\"id()\"\n class=\"elder-mat-inner-table\"\n [trackBy]=\"trackByFn\"\n [dataSource]=\"$any(dc())\"\n [elderDataContextSelection]=\"dc()\"\n #dataSelection=\"elderDataContextSelection\"\n [elderDataContextSelectionModel]=\"selectionModel\"\n elderTableDropListConnector\n [tableDropListConntectorId]=\"id()\"\n >\n <!-- selection Column -->\n <ng-container matColumnDef=\"select\">\n <th mat-header-cell *matHeaderCellDef style=\"width: 0%\">\n <elder-selection-master-checkbox></elder-selection-master-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let entity\">\n <elder-table-selection-cell\n [entity]=\"entity\"\n class=\"elder-table-checkbox\"\n [class.elder-table-checkbox-visible]=\"dataSelection.selectionState().anySelected\"\n ></elder-table-selection-cell>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideHeaderRow()) {\n <tr mat-header-row *matHeaderRowDef=\"displayedColumnsInner(); sticky: true\"></tr>\n }\n <tr\n mat-row\n class=\"elder-table-row\"\n *matRowDef=\"let entity; columns: displayedColumnsInner()\"\n [elderDataViewItemDrag]=\"entity\"\n [elderTableRow]=\"entity\"\n [highlightSelection]=\"interactionMode === 'selection'\"\n [class.dense]=\"dense()\"\n [class.elder-row-hidden]=\"hiddenField && entity[hiddenField]\"\n [class.elder-row-removing]=\"removingField && entity[removingField]\"\n (click)=\"onItemClick(entity, $event)\"\n (dblclick)=\"onItemDoubleClick(entity)\"\n ></tr>\n <!-- Dummy row is needed as drop target (dnd) in case no data is available and no table header is displayed -->\n <ng-template matNoDataRow>\n @if (hasDragAndDropSupport) {\n <tr class=\"elder-empty-drop-row\">\n <td [attr.colspan]=\"displayedColumnsInner()?.length || 1\"></td>\n </tr>\n }\n </ng-template>\n @if (showFooterRow()) {\n <tr mat-footer-row *matFooterRowDef=\"displayedColumnsInner(); sticky: true\"></tr>\n }\n </table>\n </div>\n\n @if (!isDataValid(viewData())) {\n <elder-data-context-state-indicator class=\"flex\" [dataContext]=\"dataContext\">\n </elder-data-context-state-indicator>\n }\n\n <mat-progress-bar\n class=\"flex-none mt-auto\"\n [mode]=\"dcStatus()?.loading ? 'indeterminate' : 'determinate'\"\n [color]=\"dcStatus()?.hasError ? 'warn' : 'primary'\"\n >\n </mat-progress-bar>\n\n <ng-template\n *ngTemplateOutlet=\"navigationBar() ?? defaultNavigationBar; context: { $implicit: this }\"\n ></ng-template>\n </div>\n</div>\n\n<ng-template #defaultNavigationBar>\n <elder-data-navigation></elder-data-navigation>\n</ng-template>\n", styles: [":host{min-width:0;min-height:0}.elder-empty-drop-row{height:48px}.elder-empty-drop-row td{padding:0;border:0}.elder-mat-inner-table:has(.cdk-drag-placeholder) .elder-empty-drop-row{display:none}\n"] }]
|
|
18565
|
+
], template: "<div class=\"full\" style=\"overflow: hidden\">\n <div class=\"layout-col elder-table full\" [class.elder-table-dense-horizontal]=\"denseHorizontal()\">\n <!-- Toolbar Rows -->\n @for (toolbarRowTemplate of toolbarRowTemplates(); track toolbarRowTemplate) {\n <ng-template\n *ngTemplateOutlet=\"toolbarRowTemplate; context: { $implicit: this }\"\n ></ng-template>\n }\n\n <!-- Scrollable Table -->\n <div\n class=\"elder-table-inner layout-col {{\n isDataValid(viewData()) ? 'flex' : ''\n }} scrollable elder-table-scroll\"\n elderInfiniteScroll\n [eventThrottle]=\"150\"\n [offsetFactor]=\"2\"\n [ignoreScrollEvent]=\"!isContinuable || !canLoadMore()\"\n (closeToEnd)=\"requestMoreDataZoned($event)\"\n >\n <table\n mat-table\n [id]=\"id()\"\n class=\"elder-mat-inner-table\"\n [trackBy]=\"trackByFn\"\n [dataSource]=\"$any(dc())\"\n [elderDataContextSelection]=\"dc()\"\n #dataSelection=\"elderDataContextSelection\"\n [elderDataContextSelectionModel]=\"selectionModel\"\n elderTableDropListConnector\n [tableDropListConntectorId]=\"id()\"\n >\n <!-- selection Column -->\n <ng-container matColumnDef=\"select\">\n <th mat-header-cell *matHeaderCellDef style=\"width: 0%\">\n <elder-selection-master-checkbox></elder-selection-master-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let entity\">\n <elder-table-selection-cell\n [entity]=\"entity\"\n class=\"elder-table-checkbox\"\n [class.elder-table-checkbox-visible]=\"dataSelection.selectionState().anySelected\"\n ></elder-table-selection-cell>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideHeaderRow()) {\n <tr mat-header-row *matHeaderRowDef=\"displayedColumnsInner(); sticky: true\"></tr>\n }\n <tr\n mat-row\n class=\"elder-table-row\"\n *matRowDef=\"let entity; columns: displayedColumnsInner()\"\n [elderDataViewItemDrag]=\"entity\"\n [elderTableRow]=\"entity\"\n [highlightSelection]=\"interactionMode === 'selection'\"\n [class.dense]=\"dense()\"\n [class.elder-row-hidden]=\"hiddenField && entity[hiddenField]\"\n [class.elder-row-removing]=\"removingField && entity[removingField]\"\n (click)=\"onItemClick(entity, $event)\"\n (dblclick)=\"onItemDoubleClick(entity)\"\n ></tr>\n <!-- Dummy row is needed as drop target (dnd) in case no data is available and no table header is displayed -->\n <ng-template matNoDataRow>\n @if (hasDragAndDropSupport) {\n <tr class=\"elder-empty-drop-row\">\n <td [attr.colspan]=\"displayedColumnsInner()?.length || 1\"></td>\n </tr>\n }\n </ng-template>\n @if (showFooterRow()) {\n <tr mat-footer-row *matFooterRowDef=\"displayedColumnsInner(); sticky: true\"></tr>\n }\n </table>\n </div>\n\n @if (!isDataValid(viewData()) && !hasDragAndDropSupport) {\n <elder-data-context-state-indicator class=\"flex\" [dataContext]=\"dataContext\">\n </elder-data-context-state-indicator>\n }\n\n <mat-progress-bar\n class=\"flex-none mt-auto\"\n [mode]=\"dcStatus()?.loading ? 'indeterminate' : 'determinate'\"\n [color]=\"dcStatus()?.hasError ? 'warn' : 'primary'\"\n >\n </mat-progress-bar>\n\n <ng-template\n *ngTemplateOutlet=\"navigationBar() ?? defaultNavigationBar; context: { $implicit: this }\"\n ></ng-template>\n </div>\n</div>\n\n<ng-template #defaultNavigationBar>\n <elder-data-navigation></elder-data-navigation>\n</ng-template>\n", styles: [":host{min-width:0;min-height:0}.elder-empty-drop-row{height:48px}.elder-empty-drop-row td{padding:0;border:0}.elder-mat-inner-table:has(.cdk-drag-placeholder) .elder-empty-drop-row{display:none}\n"] }]
|
|
18561
18566
|
}], ctorParameters: () => [{ type: ElderTableModel }, { type: SelectionModel, decorators: [{
|
|
18562
18567
|
type: Optional
|
|
18563
18568
|
}] }, { type: ElderDataViewOptionsProvider, decorators: [{
|
|
@@ -33834,66 +33839,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
|
|
|
33834
33839
|
type: Input
|
|
33835
33840
|
}] } });
|
|
33836
33841
|
|
|
33837
|
-
/**
|
|
33838
|
-
* Search name adapter for input controls.
|
|
33839
|
-
*/
|
|
33840
|
-
class ElderInitialValueDirective {
|
|
33841
|
-
/***************************************************************************
|
|
33842
|
-
* *
|
|
33843
|
-
* Constructor *
|
|
33844
|
-
* *
|
|
33845
|
-
**************************************************************************/
|
|
33846
|
-
constructor(ngModel) {
|
|
33847
|
-
//TODO: The debounce time is a hacky workaround, find a proper way to set initial value.
|
|
33848
|
-
// ngModel regular and two way binding differ in initial value, which led to this solution
|
|
33849
|
-
this.ngModel = ngModel;
|
|
33850
|
-
/***************************************************************************
|
|
33851
|
-
* *
|
|
33852
|
-
* Fields *
|
|
33853
|
-
* *
|
|
33854
|
-
**************************************************************************/
|
|
33855
|
-
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
33856
|
-
this.initialValue$ = new BehaviorSubject(null);
|
|
33857
|
-
this.initialDone$ = new Subject();
|
|
33858
|
-
const ngModelValue$ = of('dummy').pipe(delay(10), map(() => this.ngModel.model));
|
|
33859
|
-
ngModelValue$
|
|
33860
|
-
.pipe(takeUntilDestroyed(), combineLatestWith$1(this.initialValue$), takeUntil(this.initialDone$))
|
|
33861
|
-
.subscribe(([ngModelValue, initialValue]) => {
|
|
33862
|
-
if (initialValue) {
|
|
33863
|
-
ngModel.control.setValue(initialValue);
|
|
33864
|
-
}
|
|
33865
|
-
this.initialDone$.next();
|
|
33866
|
-
this.initialDone$.complete();
|
|
33867
|
-
});
|
|
33868
|
-
}
|
|
33869
|
-
/***************************************************************************
|
|
33870
|
-
* *
|
|
33871
|
-
* Properties *
|
|
33872
|
-
* *
|
|
33873
|
-
**************************************************************************/
|
|
33874
|
-
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
33875
|
-
get valueChanges$() {
|
|
33876
|
-
return this.ngModel.control.valueChanges;
|
|
33877
|
-
}
|
|
33878
|
-
setValue(value) {
|
|
33879
|
-
if (value) {
|
|
33880
|
-
this.ngModel.control.setValue(value);
|
|
33881
|
-
}
|
|
33882
|
-
this.initialValue$.next(value);
|
|
33883
|
-
}
|
|
33884
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ElderInitialValueDirective, deps: [{ token: i1$3.NgModel, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
33885
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.2", type: ElderInitialValueDirective, isStandalone: true, selector: "[elderInitialValue]", exportAs: ["elderInitialValue"], ngImport: i0 }); }
|
|
33886
|
-
}
|
|
33887
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ElderInitialValueDirective, decorators: [{
|
|
33888
|
-
type: Directive,
|
|
33889
|
-
args: [{
|
|
33890
|
-
selector: '[elderInitialValue]',
|
|
33891
|
-
exportAs: 'elderInitialValue',
|
|
33892
|
-
}]
|
|
33893
|
-
}], ctorParameters: () => [{ type: i1$3.NgModel, decorators: [{
|
|
33894
|
-
type: Host
|
|
33895
|
-
}] }] });
|
|
33896
|
-
|
|
33897
33842
|
class DefaultInputFilterConverter {
|
|
33898
33843
|
/***************************************************************************
|
|
33899
33844
|
* *
|
|
@@ -33938,6 +33883,32 @@ class DefaultInputFilterConverter {
|
|
|
33938
33883
|
}
|
|
33939
33884
|
}
|
|
33940
33885
|
|
|
33886
|
+
class NgModelInitialValueFix {
|
|
33887
|
+
constructor(ngModel) {
|
|
33888
|
+
//TODO: The debounce time is a hacky workaround, find a proper way to set initial value.
|
|
33889
|
+
// ngModel regular and two way binding differ in initial value, which led to this solution
|
|
33890
|
+
this.ngModel = ngModel;
|
|
33891
|
+
this.initialValue$ = new BehaviorSubject(null);
|
|
33892
|
+
this.initialDone$ = new Subject();
|
|
33893
|
+
const ngModelValue$ = of('dummy').pipe(delay(10), map(() => this.ngModel.model));
|
|
33894
|
+
ngModelValue$
|
|
33895
|
+
.pipe(takeUntilDestroyed(), combineLatestWith$1(this.initialValue$), takeUntil(this.initialDone$))
|
|
33896
|
+
.subscribe(([ngModelValue, initialValue]) => {
|
|
33897
|
+
if (initialValue) {
|
|
33898
|
+
ngModel.control.setValue(initialValue);
|
|
33899
|
+
}
|
|
33900
|
+
this.initialDone$.next();
|
|
33901
|
+
this.initialDone$.complete();
|
|
33902
|
+
});
|
|
33903
|
+
}
|
|
33904
|
+
setValue(value) {
|
|
33905
|
+
if (value) {
|
|
33906
|
+
this.ngModel.control.setValue(value);
|
|
33907
|
+
}
|
|
33908
|
+
this.initialValue$.next(value);
|
|
33909
|
+
}
|
|
33910
|
+
}
|
|
33911
|
+
|
|
33941
33912
|
/**
|
|
33942
33913
|
* Binds the control value (ngModel) to a SearchContexts Filter.
|
|
33943
33914
|
*/
|
|
@@ -33959,7 +33930,7 @@ class ElderSearchInputDirective {
|
|
|
33959
33930
|
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
33960
33931
|
this._queryKey$ = new BehaviorSubject(null);
|
|
33961
33932
|
this._inputConverter = DefaultInputFilterConverter.of(() => this.queryKey);
|
|
33962
|
-
this._initialValueDirective = new
|
|
33933
|
+
this._initialValueDirective = new NgModelInitialValueFix(ngModel);
|
|
33963
33934
|
this._state$ = this.buildInputStateObservable();
|
|
33964
33935
|
this._state = toSignal(this._state$);
|
|
33965
33936
|
}
|
|
@@ -34693,7 +34664,6 @@ class ElderSearchModule {
|
|
|
34693
34664
|
ElderSearchContextDirective,
|
|
34694
34665
|
ElderSearchUrlDirective,
|
|
34695
34666
|
ElderSearchInputDirective,
|
|
34696
|
-
ElderInitialValueDirective,
|
|
34697
34667
|
ElderSearchBoxComponent,
|
|
34698
34668
|
ElderSearchPanelComponent], exports: [ElderSearchContextDirective,
|
|
34699
34669
|
ElderSearchUrlDirective,
|
|
@@ -34729,7 +34699,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
|
|
|
34729
34699
|
ElderSearchContextDirective,
|
|
34730
34700
|
ElderSearchUrlDirective,
|
|
34731
34701
|
ElderSearchInputDirective,
|
|
34732
|
-
ElderInitialValueDirective,
|
|
34733
34702
|
ElderSearchBoxComponent,
|
|
34734
34703
|
ElderSearchPanelComponent,
|
|
34735
34704
|
],
|