@one-paragon/angular-utilities 2.0.7 → 2.0.9
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/fesm2022/one-paragon-angular-utilities.mjs +7 -3
- package/fesm2022/one-paragon-angular-utilities.mjs.map +1 -1
- package/http-request-state/HttpRequestStateStore.d.ts +3 -0
- package/package.json +1 -1
- package/table-builder/classes/table-store.d.ts +4 -4
- package/table-builder/components/table-container/table-container.d.ts +2 -2
- package/table-builder/directives/table-wrapper.directive.d.ts +1 -1
- package/utilities/directives/dialog.d.ts +1 -0
|
@@ -32,7 +32,7 @@ import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
|
32
32
|
import * as i6 from '@angular/material/form-field';
|
|
33
33
|
import * as i1$3 from '@angular/material/card';
|
|
34
34
|
import { MatCardModule } from '@angular/material/card';
|
|
35
|
-
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
35
|
+
import { MatDialog, MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule } from '@angular/material/dialog';
|
|
36
36
|
import * as i3$1 from '@angular/material/button';
|
|
37
37
|
import { MatButtonModule, MatIconButton, MatButton } from '@angular/material/button';
|
|
38
38
|
import * as i4$1 from '@angular/material/tooltip';
|
|
@@ -554,6 +554,9 @@ class HttpRequestStateStore extends ComponentStore {
|
|
|
554
554
|
selectHttpState$ = this.select(a => a.response);
|
|
555
555
|
$selectStatus = computed(() => this.$selectHttpState()?.status);
|
|
556
556
|
selectStatus$ = this.selectHttpState$.pipe(map(s => s.status));
|
|
557
|
+
$selectIsSuccess = computed(() => isSuccessState(this.$selectHttpState()));
|
|
558
|
+
$selectIsError = computed(() => isErrorState(this.$selectHttpState()));
|
|
559
|
+
$selectIsInProgress = computed(() => this.$selectStatus() === HttpRequestStatus.inProgress);
|
|
557
560
|
selectError$ = this.selectHttpState$.pipe(filter(isErrorState), map(state => state.error));
|
|
558
561
|
$selectError = computed(() => {
|
|
559
562
|
const state = this.$selectHttpState();
|
|
@@ -2444,12 +2447,13 @@ const defaultDialogConfig = {
|
|
|
2444
2447
|
class DialogDirective {
|
|
2445
2448
|
templateRef = inject(TemplateRef);
|
|
2446
2449
|
dialog = inject(MatDialog);
|
|
2450
|
+
dialogConfig = inject(MAT_DIALOG_DEFAULT_OPTIONS, { optional: true }) || {};
|
|
2447
2451
|
service = inject(DialogService);
|
|
2448
2452
|
opDialogClosed = new EventEmitter();
|
|
2449
|
-
_dialogConfig = defaultDialogConfig;
|
|
2453
|
+
_dialogConfig = { ...this.dialogConfig, ...defaultDialogConfig };
|
|
2450
2454
|
opDialogAddDialogClass = true;
|
|
2451
2455
|
set opDialogConfig(config) {
|
|
2452
|
-
this._dialogConfig = { ...defaultDialogConfig, ...config };
|
|
2456
|
+
this._dialogConfig = { ...this.dialogConfig, ...defaultDialogConfig, ...config };
|
|
2453
2457
|
}
|
|
2454
2458
|
get opDialogConfig() {
|
|
2455
2459
|
return this._dialogConfig;
|