@one-paragon/angular-utilities 0.0.11-b → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/table-builder/components/generic-table/paginator.component.mjs +2 -2
- package/esm2020/utilities/directives/dialog.mjs +13 -5
- package/esm2020/utilities/index.mjs +2 -1
- package/esm2020/utilities/pipes/function.pipe.mjs +1 -1
- package/fesm2015/one-paragon-angular-utilities.mjs +15 -7
- package/fesm2015/one-paragon-angular-utilities.mjs.map +1 -1
- package/fesm2020/one-paragon-angular-utilities.mjs +15 -6
- package/fesm2020/one-paragon-angular-utilities.mjs.map +1 -1
- package/package.json +1 -1
- package/utilities/directives/dialog.d.ts +4 -4
- package/utilities/index.d.ts +1 -0
- package/utilities/pipes/function.pipe.d.ts +1 -1
|
@@ -50,7 +50,7 @@ import { MatNativeDateModule } from '@angular/material/core';
|
|
|
50
50
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
51
51
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
52
52
|
import * as i1$3 from '@angular/material/dialog';
|
|
53
|
-
import { MatDialogModule
|
|
53
|
+
import { MatDialogModule } from '@angular/material/dialog';
|
|
54
54
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
55
55
|
import { MatGridListModule } from '@angular/material/grid-list';
|
|
56
56
|
import { MatListModule } from '@angular/material/list';
|
|
@@ -1573,7 +1573,7 @@ class PaginatorComponent {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
paginatorChange() {
|
|
1575
1575
|
if (!this.ourPageEvent) {
|
|
1576
|
-
|
|
1576
|
+
setTimeout(() => this.tableElRef?.nativeElement?.scrollIntoView(), 0);
|
|
1577
1577
|
}
|
|
1578
1578
|
else {
|
|
1579
1579
|
this.ourPageEvent = false;
|
|
@@ -2817,13 +2817,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImpor
|
|
|
2817
2817
|
template: ``
|
|
2818
2818
|
}]
|
|
2819
2819
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
2820
|
+
const defaultDialogConfig = {
|
|
2821
|
+
maxHeight: '95vh'
|
|
2822
|
+
};
|
|
2820
2823
|
class DialogDirective {
|
|
2821
2824
|
constructor(templateRef, dialog, service) {
|
|
2822
2825
|
this.templateRef = templateRef;
|
|
2823
2826
|
this.dialog = dialog;
|
|
2824
2827
|
this.service = service;
|
|
2825
2828
|
this.opDialogClosed = new EventEmitter();
|
|
2826
|
-
this.
|
|
2829
|
+
this._dialogConfig = defaultDialogConfig;
|
|
2827
2830
|
this._data = new Subject();
|
|
2828
2831
|
this.subscription = this._data.pipe(switchAll()).subscribe(d => {
|
|
2829
2832
|
if (d) {
|
|
@@ -2835,6 +2838,12 @@ class DialogDirective {
|
|
|
2835
2838
|
}
|
|
2836
2839
|
});
|
|
2837
2840
|
}
|
|
2841
|
+
set opDialogConfig(config) {
|
|
2842
|
+
this._dialogConfig = { ...defaultDialogConfig, ...config };
|
|
2843
|
+
}
|
|
2844
|
+
get opDialogConfig() {
|
|
2845
|
+
return this._dialogConfig;
|
|
2846
|
+
}
|
|
2838
2847
|
set state(open_close) {
|
|
2839
2848
|
this._data.next(open_close);
|
|
2840
2849
|
}
|
|
@@ -2845,14 +2854,14 @@ class DialogDirective {
|
|
|
2845
2854
|
if (this.nativeElement) {
|
|
2846
2855
|
const rect = this.nativeElement.getBoundingClientRect();
|
|
2847
2856
|
const position = { left: `${rect.left}px`, top: `${rect.bottom - 50}px` };
|
|
2848
|
-
this.opDialogConfig = { ...
|
|
2857
|
+
this.opDialogConfig = { ...this.opDialogConfig, position };
|
|
2849
2858
|
}
|
|
2850
2859
|
this.dialogRef = this.dialog.open(DialogWrapper, this.opDialogConfig);
|
|
2851
2860
|
this.componentWrapper = this.dialogRef.componentInstance;
|
|
2852
2861
|
this.componentWrapper.close = () => this.dialogRef?.close();
|
|
2853
2862
|
this.componentWrapper.data = this.opDialogConfig.data;
|
|
2854
2863
|
this.componentWrapper.template = this.templateRef;
|
|
2855
|
-
if (!this.opDialogConfig
|
|
2864
|
+
if (!this.opDialogConfig.disableClose) {
|
|
2856
2865
|
this.service.addDialogRef(this.dialogRef);
|
|
2857
2866
|
}
|
|
2858
2867
|
const sub = this.dialogRef.afterClosed().subscribe(() => {
|
|
@@ -3470,5 +3479,5 @@ const CreateTableBuilder = (reportDef$) => {
|
|
|
3470
3479
|
* Generated bundle index. Do not edit.
|
|
3471
3480
|
*/
|
|
3472
3481
|
|
|
3473
|
-
export { ArrayStyle, AutoFocusDirective, ClickEmitterDirective, ClickSubjectDirective, CreateTableBuilder, CustomCellDirective, DateFilterComponent, DialogDirective, DialogWrapper, FieldType, FilterChipsComponent, FilterComponent, FilterType, FunctionPipe, GenColDisplayerComponent, GenFilterDisplayerComponent, GeneralTableSettings, GenericTableComponent, HttpErrorStateDirective, HttpInProgressStateDirective, HttpNotStartedStateDirective, HttpRequestModule, HttpRequestStateDirective, HttpRequestStateFactory, HttpRequestStateStore, HttpRequestStatus, HttpRequestStrategy, HttpSuccessStateDirective, MatSlideToggleGroupDirective, MatTableObservableDataSource, MultiSortDirective, NotPersisitedTableSettings, PaginatorComponent, PesrsistedTableSettings, PhoneNumberPipe, PreventEnterDirective, ResizeColumnDirective, SortDirection, SpaceCasePipe, StopPropagationDirective, StylerDirective, TableBuilder, TableBuilderModule, TableContainerComponent, TableWrapperFooterSettings, TableWrapperHeaderSettings, Target, UtilitiesModule, chainRequest, combineArrays, createFailure, createSuccess, defaultShareReplay, filterArray, getRequestorBody, getRequestorStatus, httpRequest, httpRequestor, inProgress, isErrorState, isSuccessState, mapArray, mapError, notNull, notStarted, onWait, previousAndCurrent, skipOneWhen, spaceCase, statusIsSuccessOrInProgress, switchOff, tapError, tapSuccess };
|
|
3482
|
+
export { ArrayStyle, AutoFocusDirective, ClickEmitterDirective, ClickSubjectDirective, CreateTableBuilder, CustomCellDirective, DateFilterComponent, DialogDirective, DialogService, DialogWrapper, FieldType, FilterChipsComponent, FilterComponent, FilterType, FunctionPipe, GenColDisplayerComponent, GenFilterDisplayerComponent, GeneralTableSettings, GenericTableComponent, HttpErrorStateDirective, HttpInProgressStateDirective, HttpNotStartedStateDirective, HttpRequestModule, HttpRequestStateDirective, HttpRequestStateFactory, HttpRequestStateStore, HttpRequestStatus, HttpRequestStrategy, HttpSuccessStateDirective, MatSlideToggleGroupDirective, MatTableObservableDataSource, MultiSortDirective, NotPersisitedTableSettings, PaginatorComponent, PesrsistedTableSettings, PhoneNumberPipe, PreventEnterDirective, ResizeColumnDirective, SortDirection, SpaceCasePipe, StopPropagationDirective, StylerDirective, TableBuilder, TableBuilderModule, TableContainerComponent, TableWrapperFooterSettings, TableWrapperHeaderSettings, Target, UtilitiesModule, chainRequest, combineArrays, createFailure, createSuccess, defaultShareReplay, filterArray, getRequestorBody, getRequestorStatus, httpRequest, httpRequestor, inProgress, isErrorState, isSuccessState, mapArray, mapError, notNull, notStarted, onWait, previousAndCurrent, skipOneWhen, spaceCase, statusIsSuccessOrInProgress, switchOff, tapError, tapSuccess };
|
|
3474
3483
|
//# sourceMappingURL=one-paragon-angular-utilities.mjs.map
|