axioma-material 6.0.55 → 6.0.59
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/axioma-material.mjs +92 -71
- package/fesm2022/axioma-material.mjs.map +1 -1
- package/lib/grid/grid.component.d.ts +7 -2
- package/package.json +1 -1
- package/state/grid/grid.actions.d.ts +9 -0
- package/state/grid/grid.effects.d.ts +6 -1
- package/state/grid/grid.reducer.d.ts +5 -2
- package/state/grid/grid.selectors.d.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable,
|
|
2
|
+
import { inject, Injectable, ChangeDetectionStrategy, Component, Injector, input, booleanAttribute, output, signal, computed, effect, Input, ViewChild, EventEmitter, Output, forwardRef, TemplateRef, NgModule, Directive } from '@angular/core';
|
|
3
3
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
4
|
import { createActionGroup, emptyProps, props, Store, createReducer, on, createFeature, createFeatureSelector, createSelector, provideState } from '@ngrx/store';
|
|
5
|
-
import { finalize, take, of, map, first, filter,
|
|
5
|
+
import { finalize, take, of, map, first, filter, mergeMap, tap } from 'rxjs';
|
|
6
6
|
import { MAT_DIALOG_DATA, MatDialogRef, MatDialogContent, MatDialogActions, MatDialogTitle, MatDialog } from '@angular/material/dialog';
|
|
7
7
|
import { NgTemplateOutlet, CommonModule, Location } from '@angular/common';
|
|
8
8
|
import * as i5 from '@angular/material/button';
|
|
@@ -10,7 +10,7 @@ import { MatButtonModule } from '@angular/material/button';
|
|
|
10
10
|
import * as i1 from '@angular/material/autocomplete';
|
|
11
11
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
12
12
|
import * as i5$1 from '@angular/forms';
|
|
13
|
-
import { FormControl, NgControl,
|
|
13
|
+
import { FormControl, NgControl, ReactiveFormsModule, NG_VALUE_ACCESSOR, Validators, NG_VALIDATORS, NgModel, FormControlDirective, FormControlName, ControlContainer } from '@angular/forms';
|
|
14
14
|
import * as i3 from '@angular/material/input';
|
|
15
15
|
import { MatInputModule } from '@angular/material/input';
|
|
16
16
|
import * as i6 from '@angular/material/icon';
|
|
@@ -36,7 +36,7 @@ import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
|
36
36
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
37
37
|
import { Actions, ofType, createEffect, provideEffects } from '@ngrx/effects';
|
|
38
38
|
import { concatLatestFrom } from '@ngrx/operators';
|
|
39
|
-
import { map as map$1, mergeMap, filter as filter$1, catchError, concatMap, tap as tap$1 } from 'rxjs/operators';
|
|
39
|
+
import { map as map$1, mergeMap as mergeMap$1, filter as filter$1, catchError, concatMap, tap as tap$1 } from 'rxjs/operators';
|
|
40
40
|
import * as i1$2 from '@angular/common/http';
|
|
41
41
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
42
42
|
import { ROUTER_NAVIGATION } from '@ngrx/router-store';
|
|
@@ -46,10 +46,10 @@ class SnackService {
|
|
|
46
46
|
info(message, action = 'Dismiss', duration = 3000) {
|
|
47
47
|
this.snackBar.open(message, action, { duration });
|
|
48
48
|
}
|
|
49
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
50
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
49
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SnackService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
50
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SnackService, providedIn: 'root' });
|
|
51
51
|
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SnackService, decorators: [{
|
|
53
53
|
type: Injectable,
|
|
54
54
|
args: [{
|
|
55
55
|
providedIn: 'root'
|
|
@@ -105,10 +105,10 @@ class ConfirmationDialogComponent {
|
|
|
105
105
|
clickButton(button) {
|
|
106
106
|
this.dialogRef.close(button.value);
|
|
107
107
|
}
|
|
108
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
109
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1
|
|
108
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ConfirmationDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
109
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: ConfirmationDialogComponent, isStandalone: true, selector: "x-confirmation-dialog", ngImport: i0, template: "<h2 mat-dialog-title>{{data.title}}</h2>\n<mat-dialog-content cdkTrapFocus class=\"mat-typography\">\n @if(data.message){\n <p>{{data.message}}</p>\n } @else if (data.messageRef) {\n <ng-container *ngTemplateOutlet=\"data.messageRef\"></ng-container>\n }\n</mat-dialog-content>\n<mat-dialog-actions>\n @for(button of data.buttons; track button){\n @if(button.default){\n <button mat-button (click)=\"clickButton(button)\" cdkFocusInitial>{{button.text}}</button>\n } @else {\n <button mat-button (click)=\"clickButton(button)\">{{button.text}}</button>\n }\n }\n</mat-dialog-actions>", styles: [""], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
110
110
|
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
112
112
|
type: Component,
|
|
113
113
|
args: [{ selector: 'x-confirmation-dialog', imports: [NgTemplateOutlet, MatButtonModule, MatDialogContent, MatDialogActions, MatDialogTitle], changeDetection: ChangeDetectionStrategy.OnPush, template: "<h2 mat-dialog-title>{{data.title}}</h2>\n<mat-dialog-content cdkTrapFocus class=\"mat-typography\">\n @if(data.message){\n <p>{{data.message}}</p>\n } @else if (data.messageRef) {\n <ng-container *ngTemplateOutlet=\"data.messageRef\"></ng-container>\n }\n</mat-dialog-content>\n<mat-dialog-actions>\n @for(button of data.buttons; track button){\n @if(button.default){\n <button mat-button (click)=\"clickButton(button)\" cdkFocusInitial>{{button.text}}</button>\n } @else {\n <button mat-button (click)=\"clickButton(button)\">{{button.text}}</button>\n }\n }\n</mat-dialog-actions>" }]
|
|
114
114
|
}], ctorParameters: () => [] });
|
|
@@ -121,10 +121,10 @@ class ConfirmationService {
|
|
|
121
121
|
});
|
|
122
122
|
return ref.afterClosed();
|
|
123
123
|
}
|
|
124
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
125
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ConfirmationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
125
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ConfirmationService, providedIn: 'root' });
|
|
126
126
|
}
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ConfirmationService, decorators: [{
|
|
128
128
|
type: Injectable,
|
|
129
129
|
args: [{
|
|
130
130
|
providedIn: 'root'
|
|
@@ -246,8 +246,8 @@ class SmartSelectComponent {
|
|
|
246
246
|
e.stopPropagation();
|
|
247
247
|
this.newClick.emit();
|
|
248
248
|
}
|
|
249
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
250
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1
|
|
249
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SmartSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
250
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: SmartSelectComponent, isStandalone: true, selector: "x-smart-select", inputs: { $displayFn: { classPropertyName: "$displayFn", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, $hint: { classPropertyName: "$hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, $label: { classPropertyName: "$label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, $options: { classPropertyName: "$options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, $toolbar: { classPropertyName: "$toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null }, $new: { classPropertyName: "$new", publicName: "new", isSignal: true, isRequired: false, transformFunction: null }, $required: { classPropertyName: "$required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, outputs: { newClick: "newClick", change: "change", filter: "filter" }, host: { listeners: { "blur": "onTouched($event)" } }, providers: [
|
|
251
251
|
{
|
|
252
252
|
provide: NG_VALUE_ACCESSOR,
|
|
253
253
|
multi: true,
|
|
@@ -255,7 +255,7 @@ class SmartSelectComponent {
|
|
|
255
255
|
}
|
|
256
256
|
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "auto", first: true, predicate: ["auto"], descendants: true }], ngImport: i0, template: "<mat-form-field class=\"w-full\">\n <mat-label>{{$label()}}</mat-label>\n <input #input [formControl]=\"control\" [required]=\"$required()\" type=\"text\" (input)=\"setFilter()\" (focus)=\"setFilter()\"\n placeholder=\"Select {{$label()}}\" [attr.aria-label]=\"$label()\" matInput [matAutocomplete]=\"auto\">\n @if($new()){\n <button type=\"button\" matSuffix matTooltipPositionAtOrigin=\"true\" matTooltip=\"Create new\" (click)=\"onNew($event)\" mat-icon-button>\n <mat-icon>add</mat-icon>\n </button>\n }\n <mat-error>{{getErrorMessage()}}</mat-error>\n @if (!$toolbar()){\n <mat-hint>{{$hint()}}</mat-hint>\n }\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\" (optionSelected)=\"onAutoCompleteChange($event)\"\n [displayWith]=\"$displayFn()\">\n @if(!$required()){\n <mat-option>None</mat-option>\n }\n @for (opt of $filtered(); track opt.id) {\n <mat-option [value]=\"opt\">{{display(opt)}}</mat-option>\n }\n </mat-autocomplete>\n</mat-form-field>", styles: [""], dependencies: [{ kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5$1.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: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
257
257
|
}
|
|
258
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SmartSelectComponent, decorators: [{
|
|
259
259
|
type: Component,
|
|
260
260
|
args: [{ selector: 'x-smart-select', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatAutocompleteModule, MatInputModule, ReactiveFormsModule, MatIconModule,
|
|
261
261
|
MatTooltipModule, MatButtonModule], host: {
|
|
@@ -290,10 +290,10 @@ class DetailActionsComponent {
|
|
|
290
290
|
constructor() {
|
|
291
291
|
this.cancel.pipe(take(1)).subscribe(() => this.dontRoute || this.store.dispatch(SharedActions.back()));
|
|
292
292
|
}
|
|
293
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
294
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.1
|
|
293
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: DetailActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
294
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.1", type: DetailActionsComponent, isStandalone: true, selector: "x-detail-actions", inputs: { dontRoute: ["no-routing", "dontRoute", booleanAttribute] }, outputs: { cancel: "cancel" }, ngImport: i0, template: "<mat-toolbar class=\"flex flex-row gap-2 p-2\">\n <button mat-stroked-button type=\"submit\"><mat-icon>save</mat-icon> Save</button>\n <button mat-button type=\"button\" (click)=\"cancel.emit()\"><mat-icon>cancel</mat-icon> Cancel</button>\n <div class=\"flex-grow\"></div>\n <ng-content select=\"[right]\"></ng-content>\n</mat-toolbar>", styles: [""], dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i1$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
295
295
|
}
|
|
296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: DetailActionsComponent, decorators: [{
|
|
297
297
|
type: Component,
|
|
298
298
|
args: [{ selector: 'x-detail-actions', imports: [MatToolbarModule, MatIconModule, MatButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-toolbar class=\"flex flex-row gap-2 p-2\">\n <button mat-stroked-button type=\"submit\"><mat-icon>save</mat-icon> Save</button>\n <button mat-button type=\"button\" (click)=\"cancel.emit()\"><mat-icon>cancel</mat-icon> Cancel</button>\n <div class=\"flex-grow\"></div>\n <ng-content select=\"[right]\"></ng-content>\n</mat-toolbar>" }]
|
|
299
299
|
}], ctorParameters: () => [], propDecorators: { dontRoute: [{
|
|
@@ -364,8 +364,8 @@ class EmailComponent {
|
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
368
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1
|
|
367
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EmailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
368
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: EmailComponent, isStandalone: true, selector: "x-email", inputs: { checkUserExistsFn: { classPropertyName: "checkUserExistsFn", publicName: "checkUserExistsFn", isSignal: false, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, $touched: { classPropertyName: "$touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, $existing: { classPropertyName: "$existing", publicName: "existing", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { login: "login", exists: "exists" }, host: { listeners: { "blur": "onTouch($event)" } }, providers: [
|
|
369
369
|
{
|
|
370
370
|
provide: NG_VALUE_ACCESSOR,
|
|
371
371
|
multi: true,
|
|
@@ -378,7 +378,7 @@ class EmailComponent {
|
|
|
378
378
|
},
|
|
379
379
|
], ngImport: i0, template: "<mat-form-field >\n <mat-label>{{label}}</mat-label>\n <input matInput type=\"email\" [formControl]=\"control\" required>\n <mat-hint><ng-content></ng-content></mat-hint>\n @if (control.hasError('required')){\n <mat-error>Email is required</mat-error>\n } @else if (control.hasError('email')){\n <mat-error>Email is invalid</mat-error>\n } @else if (control.hasError('exists')){\n <mat-error>Email already exists: <a (click)=\"login.emit()\">sign in</a>.</mat-error>\n } @else if (control.hasError('missing')){\n <mat-error>Email is missing</mat-error>\n }\n</mat-form-field>", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5$1.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: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: RouterModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
380
380
|
}
|
|
381
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
381
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EmailComponent, decorators: [{
|
|
382
382
|
type: Component,
|
|
383
383
|
args: [{ selector: 'x-email', imports: [ReactiveFormsModule, MatFormFieldModule, MatInputModule, RouterModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
384
384
|
'(blur)': 'onTouch($event)'
|
|
@@ -409,6 +409,7 @@ const GridActions = createActionGroup({
|
|
|
409
409
|
source: 'Grid',
|
|
410
410
|
events: {
|
|
411
411
|
'Refresh': emptyProps(),
|
|
412
|
+
'Implicit Load': props(),
|
|
412
413
|
'Load': props(),
|
|
413
414
|
'Load Success': props(),
|
|
414
415
|
'Change Paging': props(),
|
|
@@ -428,9 +429,10 @@ const initialState$2 = {
|
|
|
428
429
|
const reducer$2 = createReducer(initialState$2, on(GridActions.loadSuccess, (state, { name, data, count }) => ({
|
|
429
430
|
...state,
|
|
430
431
|
grids: { ...state.grids, [name]: { ...state.grids[name], data, count, loading: false } }
|
|
431
|
-
})), on(GridActions.
|
|
432
|
+
})), on(GridActions.implicitLoad, (state, { name, dataUrl }) => ({
|
|
432
433
|
...state,
|
|
433
434
|
grids: { ...state.grids, [name]: { ...state.grids[name],
|
|
435
|
+
dataUrl,
|
|
434
436
|
data: undefined,
|
|
435
437
|
count: undefined,
|
|
436
438
|
loading: true } }
|
|
@@ -492,7 +494,7 @@ const selectSortDir = createSelector(selectGridSetup, selectQueryParam('sort-dir
|
|
|
492
494
|
const selectSearchFields = createSelector(selectGridSetup, d => d?.searchFields);
|
|
493
495
|
const selectIsGrid = createSelector(selectGridSetup, s => !!s);
|
|
494
496
|
const selectGridName = createSelector(selectGridSetup, s => s?.controllerMethod);
|
|
495
|
-
const selectDataUrl = createSelector(selectGridSetup, s => `/api/${s?.controllerMethod}`);
|
|
497
|
+
const selectDataUrl = (name) => createSelector(selectGridSetup, selectGridData(name), (s, d) => s?.controllerMethod ? `/api/${s?.controllerMethod}` : d?.dataUrl);
|
|
496
498
|
const selectFilterText = createSelector(selectGridFilters('filter'), f => f?.fields?.at(0)?.values?.at(0) ?? '');
|
|
497
499
|
const selectDataRequest = createSelector(selectPageIndex, selectPageSize, selectSortBy, selectSortDir, selectGridFilters('base-filter'), selectGridFilters('filter'), (pageIndex, pageSize, sortBy, sortDir, baseFilters, filters) => ({
|
|
498
500
|
paging: { page: pageIndex + 1, pageSize },
|
|
@@ -512,6 +514,10 @@ function combineFilters(filters) {
|
|
|
512
514
|
}
|
|
513
515
|
|
|
514
516
|
class GridComponent {
|
|
517
|
+
toolbar;
|
|
518
|
+
get hasToolbar() {
|
|
519
|
+
return !!this.toolbar?.nativeElement?.children.length;
|
|
520
|
+
}
|
|
515
521
|
$deleteSuccess = toSignal(inject(Actions).pipe(ofType(GridActions.bulkDeleteSuccess)));
|
|
516
522
|
route = inject(ActivatedRoute);
|
|
517
523
|
router = inject(Router);
|
|
@@ -540,7 +546,13 @@ class GridComponent {
|
|
|
540
546
|
}
|
|
541
547
|
return res;
|
|
542
548
|
});
|
|
543
|
-
$
|
|
549
|
+
$data = input(undefined, { alias: 'data' });
|
|
550
|
+
$storeData = toSignal(toObservable(this.$gridName).pipe(filter(name => !!name), mergeMap(name => this.store.select(selectGridData(name)))));
|
|
551
|
+
$gridData = computed(() => {
|
|
552
|
+
let data = this.$data();
|
|
553
|
+
let storeData = this.$storeData();
|
|
554
|
+
return data ?? storeData;
|
|
555
|
+
});
|
|
544
556
|
$filter = this.store.selectSignal(selectFilterText);
|
|
545
557
|
$pageIndex = this.store.selectSignal(selectPageIndex);
|
|
546
558
|
$pageSize = this.store.selectSignal(selectPageSize);
|
|
@@ -645,15 +657,18 @@ class GridComponent {
|
|
|
645
657
|
return this.$allSelected() && !selection?.hasValue() ? total : selection?.selected.length;
|
|
646
658
|
});
|
|
647
659
|
}
|
|
648
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
649
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.4", type: GridComponent, isStandalone: true, selector: "x-grid", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, $bulk: { classPropertyName: "$bulk", publicName: "bulk", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, ngImport: i0, template: "<mat-toolbar class=\"flex flex-row gap-2 p-2\">\n @if($hasSearch()){\n <div class=\"h-full\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <mat-icon matPrefix>search</mat-icon>\n <input matInput type=\"text\" [value]=\"$filter()\" (keyup)=\"filterKeyUp($event)\">\n @if ($filter()) {\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"setFilter('')\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n }\n <ng-content select=\"[toolbar]\"></ng-content>\n @for(button of $buttons(); track button.name){\n <button mat-button [routerLink]=\"button.routerLink?button.routerLink():undefined\" [matTooltip]=\"button.text\"\n (click)=\"onAction($event,undefined,button)\"><mat-icon>{{button.icon}}</mat-icon> {{button.text}}</button>\n }\n @if ($config()?.new){\n <a mat-button routerLink=\"../new\"><mat-icon>add</mat-icon> New</a>\n }\n @if($config()?.refresh)\n {\n <button mat-button (click)=\"refresh()\"><mat-icon>sync</mat-icon> Refresh</button>\n }\n @if($bulk()){\n <button mat-button [disabled]=\"!$selectedCount()\" (click)=\"deleteSelected()\"><mat-icon>delete</mat-icon>\n Delete</button>\n }\n <span class=\"flex-grow\"></span>\n @if ($selectedCount() || $allSelected()){\n <span class=\"count\"> {{$selectedCount()??0}} items selected</span>\n }\n</mat-toolbar>\n<mat-table [dataSource]=\"$dataSource()\" matSort (matSortChange)=\"sortChange($event)\" [matSortActive]=\"$sort()\"\n [matSortDirection]=\"$dir()\" matSortDisableClear>\n @if ($bulk()){\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef class=\"select\" matTooltip=\"Select all\">\n <mat-checkbox (change)=\"$event ? toggleAll() : null\" [checked]=\"!selection.hasValue() && $allSelected()\"\n [indeterminate]=\"selection.hasValue() && !$allSelected()\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"select\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"toggleOne($event, row)\"\n [checked]=\"selection.isSelected(row) || $allSelected() && !selection.hasValue()\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n }\n @for(column of $columns(); track column.name){\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sort){\n <mat-header-cell [style]=\"getStyle(column)\" *matHeaderCellDef\n mat-sort-header>{{column.header}}</mat-header-cell>\n } @else {\n <mat-header-cell [style]=\"getStyle(column)\" *matHeaderCellDef>{{column.header}}</mat-header-cell>\n }\n <mat-cell [style]=\"getStyle(column)\" *matCellDef=\"let row\">\n @if(column.href || column.routerLink){\n <a [routerLink]=\"column.routerLink?column.routerLink(row):undefined\"\n [attr.href]=\"column.href?column.href(row):undefined\"\n (click)=\"column.action?column.action(row):undefined\">\n {{ display(column,row) }}\n </a>\n } @else if (getDisplayRef(column)) {\n <ng-container *ngTemplateOutlet=\"getDisplayRef(column); context: { $implicit: row}\"></ng-container>\n } @else {\n {{ display(column,row)}}\n }\n </mat-cell>\n </ng-container>\n }\n @if($hasActions()){\n <ng-container matColumnDef=\"actions\">\n <mat-header-cell [style]=\"getActionStyle()\" *matHeaderCellDef>Actions</mat-header-cell>\n <mat-cell [style]=\"getActionStyle()\" *matCellDef=\"let row\">\n @for(action of $actions(); track action.name){\n <button type=\"button\" mat-icon-button [disabled]=\"action.disabled?action.disabled(row):undefined\"\n [matTooltip]=\"action.text\" (click)=\"onAction($event, row, action)\"\n [queryParams]=\"action.queryParams?action.queryParams(row):undefined\"\n [routerLink]=\"action.routerLink?action.routerLink(row):undefined\">\n <mat-icon>{{action.icon}}</mat-icon>\n </button>\n }\n </mat-cell>\n </ng-container>\n }\n <mat-header-row *matHeaderRowDef=\"$displayedColumns()\"></mat-header-row>\n <mat-row [class.clickable]=\"!!$config()?.defaultAction\" *matRowDef=\"let row; columns: $displayedColumns()\"\n (click)=\"onRowClick(row)\"></mat-row>\n</mat-table>\n<mat-paginator [pageIndex]=\"$pageIndex()\" [length]=\"$gridData()?.count\" [pageSize]=\"$pageSize()\"\n (page)=\"pageChange($event)\" aria-label=\"Select page\"></mat-paginator>", styles: ["mat-row.clickable:hover{background:#f5f5f5;cursor:pointer}.select{max-width:80px}.count{font-size:.875rem}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i1$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i11.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
660
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
661
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: GridComponent, isStandalone: true, selector: "x-grid", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, $bulk: { classPropertyName: "$bulk", publicName: "bulk", isSignal: true, isRequired: false, transformFunction: null }, $data: { classPropertyName: "$data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, viewQueries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true }], ngImport: i0, template: "<mat-toolbar #toolbar class=\"flex flex-row gap-2 p-2\" [class.hidden]=\"!hasToolbar\">\n @if($hasSearch()){\n <div class=\"h-full\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <mat-icon matPrefix>search</mat-icon>\n <input matInput type=\"text\" [value]=\"$filter()\" (keyup)=\"filterKeyUp($event)\">\n @if ($filter()) {\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"setFilter('')\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n }\n <ng-content select=\"[toolbar]\"></ng-content>\n @for(button of $buttons(); track button.name){\n <button mat-button [routerLink]=\"button.routerLink?button.routerLink():undefined\" [matTooltip]=\"button.text\"\n (click)=\"onAction($event,undefined,button)\"><mat-icon>{{button.icon}}</mat-icon> {{button.text}}</button>\n }\n @if ($config()?.new){\n <a mat-button routerLink=\"../new\"><mat-icon>add</mat-icon> New</a>\n }\n @if($config()?.refresh)\n {\n <button mat-button (click)=\"refresh()\"><mat-icon>sync</mat-icon> Refresh</button>\n }\n @if($bulk()){\n <button mat-button [disabled]=\"!$selectedCount()\" (click)=\"deleteSelected()\"><mat-icon>delete</mat-icon>\n Delete</button>\n }\n <span class=\"flex-grow\"></span>\n @if ($selectedCount() || $allSelected()){\n <span class=\"count\"> {{$selectedCount()??0}} items selected</span>\n }\n</mat-toolbar>\n<mat-table [dataSource]=\"$dataSource()\" matSort (matSortChange)=\"sortChange($event)\" [matSortActive]=\"$sort()\"\n [matSortDirection]=\"$dir()\" matSortDisableClear>\n @if ($bulk()){\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef class=\"select\" matTooltip=\"Select all\">\n <mat-checkbox (change)=\"$event ? toggleAll() : null\" [checked]=\"!selection.hasValue() && $allSelected()\"\n [indeterminate]=\"selection.hasValue() && !$allSelected()\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"select\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"toggleOne($event, row)\"\n [checked]=\"selection.isSelected(row) || $allSelected() && !selection.hasValue()\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n }\n @for(column of $columns(); track column.name){\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sort){\n <mat-header-cell [style]=\"getStyle(column)\" *matHeaderCellDef\n mat-sort-header>{{column.header}}</mat-header-cell>\n } @else {\n <mat-header-cell [style]=\"getStyle(column)\" *matHeaderCellDef>{{column.header}}</mat-header-cell>\n }\n <mat-cell [style]=\"getStyle(column)\" *matCellDef=\"let row\">\n @if(column.href || column.routerLink){\n <a [routerLink]=\"column.routerLink?column.routerLink(row):undefined\"\n [attr.href]=\"column.href?column.href(row):undefined\"\n (click)=\"column.action?column.action(row):undefined\">\n {{ display(column,row) }}\n </a>\n } @else if (getDisplayRef(column)) {\n <ng-container *ngTemplateOutlet=\"getDisplayRef(column); context: { $implicit: row}\"></ng-container>\n } @else {\n {{ display(column,row)}}\n }\n </mat-cell>\n </ng-container>\n }\n @if($hasActions()){\n <ng-container matColumnDef=\"actions\">\n <mat-header-cell [style]=\"getActionStyle()\" *matHeaderCellDef>Actions</mat-header-cell>\n <mat-cell [style]=\"getActionStyle()\" *matCellDef=\"let row\">\n @for(action of $actions(); track action.name){\n <button type=\"button\" mat-icon-button [disabled]=\"action.disabled?action.disabled(row):undefined\"\n [matTooltip]=\"action.text\" (click)=\"onAction($event, row, action)\"\n [queryParams]=\"action.queryParams?action.queryParams(row):undefined\"\n [routerLink]=\"action.routerLink?action.routerLink(row):undefined\">\n <mat-icon>{{action.icon}}</mat-icon>\n </button>\n }\n </mat-cell>\n </ng-container>\n }\n <mat-header-row *matHeaderRowDef=\"$displayedColumns()\"></mat-header-row>\n <mat-row [class.clickable]=\"!!$config()?.defaultAction\" *matRowDef=\"let row; columns: $displayedColumns()\"\n (click)=\"onRowClick(row)\"></mat-row>\n</mat-table>\n<mat-paginator [pageIndex]=\"$pageIndex()\" [length]=\"$gridData()?.count\" [pageSize]=\"$pageSize()\"\n (page)=\"pageChange($event)\" aria-label=\"Select page\"></mat-paginator>", styles: ["mat-row.clickable:hover{background:#f5f5f5;cursor:pointer}.select{max-width:80px}.count{font-size:.875rem}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i1$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i11.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
650
662
|
}
|
|
651
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
663
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GridComponent, decorators: [{
|
|
652
664
|
type: Component,
|
|
653
665
|
args: [{ selector: 'x-grid', imports: [MatInputModule, MatTableModule, MatToolbarModule, MatButtonModule,
|
|
654
666
|
MatCheckboxModule, MatTooltipModule, MatIconModule, RouterModule,
|
|
655
|
-
MatSortModule, MatPaginatorModule, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-toolbar class=\"flex flex-row gap-2 p-2\">\n @if($hasSearch()){\n <div class=\"h-full\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <mat-icon matPrefix>search</mat-icon>\n <input matInput type=\"text\" [value]=\"$filter()\" (keyup)=\"filterKeyUp($event)\">\n @if ($filter()) {\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"setFilter('')\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n }\n <ng-content select=\"[toolbar]\"></ng-content>\n @for(button of $buttons(); track button.name){\n <button mat-button [routerLink]=\"button.routerLink?button.routerLink():undefined\" [matTooltip]=\"button.text\"\n (click)=\"onAction($event,undefined,button)\"><mat-icon>{{button.icon}}</mat-icon> {{button.text}}</button>\n }\n @if ($config()?.new){\n <a mat-button routerLink=\"../new\"><mat-icon>add</mat-icon> New</a>\n }\n @if($config()?.refresh)\n {\n <button mat-button (click)=\"refresh()\"><mat-icon>sync</mat-icon> Refresh</button>\n }\n @if($bulk()){\n <button mat-button [disabled]=\"!$selectedCount()\" (click)=\"deleteSelected()\"><mat-icon>delete</mat-icon>\n Delete</button>\n }\n <span class=\"flex-grow\"></span>\n @if ($selectedCount() || $allSelected()){\n <span class=\"count\"> {{$selectedCount()??0}} items selected</span>\n }\n</mat-toolbar>\n<mat-table [dataSource]=\"$dataSource()\" matSort (matSortChange)=\"sortChange($event)\" [matSortActive]=\"$sort()\"\n [matSortDirection]=\"$dir()\" matSortDisableClear>\n @if ($bulk()){\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef class=\"select\" matTooltip=\"Select all\">\n <mat-checkbox (change)=\"$event ? toggleAll() : null\" [checked]=\"!selection.hasValue() && $allSelected()\"\n [indeterminate]=\"selection.hasValue() && !$allSelected()\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"select\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"toggleOne($event, row)\"\n [checked]=\"selection.isSelected(row) || $allSelected() && !selection.hasValue()\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n }\n @for(column of $columns(); track column.name){\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sort){\n <mat-header-cell [style]=\"getStyle(column)\" *matHeaderCellDef\n mat-sort-header>{{column.header}}</mat-header-cell>\n } @else {\n <mat-header-cell [style]=\"getStyle(column)\" *matHeaderCellDef>{{column.header}}</mat-header-cell>\n }\n <mat-cell [style]=\"getStyle(column)\" *matCellDef=\"let row\">\n @if(column.href || column.routerLink){\n <a [routerLink]=\"column.routerLink?column.routerLink(row):undefined\"\n [attr.href]=\"column.href?column.href(row):undefined\"\n (click)=\"column.action?column.action(row):undefined\">\n {{ display(column,row) }}\n </a>\n } @else if (getDisplayRef(column)) {\n <ng-container *ngTemplateOutlet=\"getDisplayRef(column); context: { $implicit: row}\"></ng-container>\n } @else {\n {{ display(column,row)}}\n }\n </mat-cell>\n </ng-container>\n }\n @if($hasActions()){\n <ng-container matColumnDef=\"actions\">\n <mat-header-cell [style]=\"getActionStyle()\" *matHeaderCellDef>Actions</mat-header-cell>\n <mat-cell [style]=\"getActionStyle()\" *matCellDef=\"let row\">\n @for(action of $actions(); track action.name){\n <button type=\"button\" mat-icon-button [disabled]=\"action.disabled?action.disabled(row):undefined\"\n [matTooltip]=\"action.text\" (click)=\"onAction($event, row, action)\"\n [queryParams]=\"action.queryParams?action.queryParams(row):undefined\"\n [routerLink]=\"action.routerLink?action.routerLink(row):undefined\">\n <mat-icon>{{action.icon}}</mat-icon>\n </button>\n }\n </mat-cell>\n </ng-container>\n }\n <mat-header-row *matHeaderRowDef=\"$displayedColumns()\"></mat-header-row>\n <mat-row [class.clickable]=\"!!$config()?.defaultAction\" *matRowDef=\"let row; columns: $displayedColumns()\"\n (click)=\"onRowClick(row)\"></mat-row>\n</mat-table>\n<mat-paginator [pageIndex]=\"$pageIndex()\" [length]=\"$gridData()?.count\" [pageSize]=\"$pageSize()\"\n (page)=\"pageChange($event)\" aria-label=\"Select page\"></mat-paginator>", styles: ["mat-row.clickable:hover{background:#f5f5f5;cursor:pointer}.select{max-width:80px}.count{font-size:.875rem}\n"] }]
|
|
656
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
667
|
+
MatSortModule, MatPaginatorModule, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-toolbar #toolbar class=\"flex flex-row gap-2 p-2\" [class.hidden]=\"!hasToolbar\">\n @if($hasSearch()){\n <div class=\"h-full\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <mat-icon matPrefix>search</mat-icon>\n <input matInput type=\"text\" [value]=\"$filter()\" (keyup)=\"filterKeyUp($event)\">\n @if ($filter()) {\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"setFilter('')\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n }\n <ng-content select=\"[toolbar]\"></ng-content>\n @for(button of $buttons(); track button.name){\n <button mat-button [routerLink]=\"button.routerLink?button.routerLink():undefined\" [matTooltip]=\"button.text\"\n (click)=\"onAction($event,undefined,button)\"><mat-icon>{{button.icon}}</mat-icon> {{button.text}}</button>\n }\n @if ($config()?.new){\n <a mat-button routerLink=\"../new\"><mat-icon>add</mat-icon> New</a>\n }\n @if($config()?.refresh)\n {\n <button mat-button (click)=\"refresh()\"><mat-icon>sync</mat-icon> Refresh</button>\n }\n @if($bulk()){\n <button mat-button [disabled]=\"!$selectedCount()\" (click)=\"deleteSelected()\"><mat-icon>delete</mat-icon>\n Delete</button>\n }\n <span class=\"flex-grow\"></span>\n @if ($selectedCount() || $allSelected()){\n <span class=\"count\"> {{$selectedCount()??0}} items selected</span>\n }\n</mat-toolbar>\n<mat-table [dataSource]=\"$dataSource()\" matSort (matSortChange)=\"sortChange($event)\" [matSortActive]=\"$sort()\"\n [matSortDirection]=\"$dir()\" matSortDisableClear>\n @if ($bulk()){\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef class=\"select\" matTooltip=\"Select all\">\n <mat-checkbox (change)=\"$event ? toggleAll() : null\" [checked]=\"!selection.hasValue() && $allSelected()\"\n [indeterminate]=\"selection.hasValue() && !$allSelected()\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"select\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"toggleOne($event, row)\"\n [checked]=\"selection.isSelected(row) || $allSelected() && !selection.hasValue()\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n }\n @for(column of $columns(); track column.name){\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sort){\n <mat-header-cell [style]=\"getStyle(column)\" *matHeaderCellDef\n mat-sort-header>{{column.header}}</mat-header-cell>\n } @else {\n <mat-header-cell [style]=\"getStyle(column)\" *matHeaderCellDef>{{column.header}}</mat-header-cell>\n }\n <mat-cell [style]=\"getStyle(column)\" *matCellDef=\"let row\">\n @if(column.href || column.routerLink){\n <a [routerLink]=\"column.routerLink?column.routerLink(row):undefined\"\n [attr.href]=\"column.href?column.href(row):undefined\"\n (click)=\"column.action?column.action(row):undefined\">\n {{ display(column,row) }}\n </a>\n } @else if (getDisplayRef(column)) {\n <ng-container *ngTemplateOutlet=\"getDisplayRef(column); context: { $implicit: row}\"></ng-container>\n } @else {\n {{ display(column,row)}}\n }\n </mat-cell>\n </ng-container>\n }\n @if($hasActions()){\n <ng-container matColumnDef=\"actions\">\n <mat-header-cell [style]=\"getActionStyle()\" *matHeaderCellDef>Actions</mat-header-cell>\n <mat-cell [style]=\"getActionStyle()\" *matCellDef=\"let row\">\n @for(action of $actions(); track action.name){\n <button type=\"button\" mat-icon-button [disabled]=\"action.disabled?action.disabled(row):undefined\"\n [matTooltip]=\"action.text\" (click)=\"onAction($event, row, action)\"\n [queryParams]=\"action.queryParams?action.queryParams(row):undefined\"\n [routerLink]=\"action.routerLink?action.routerLink(row):undefined\">\n <mat-icon>{{action.icon}}</mat-icon>\n </button>\n }\n </mat-cell>\n </ng-container>\n }\n <mat-header-row *matHeaderRowDef=\"$displayedColumns()\"></mat-header-row>\n <mat-row [class.clickable]=\"!!$config()?.defaultAction\" *matRowDef=\"let row; columns: $displayedColumns()\"\n (click)=\"onRowClick(row)\"></mat-row>\n</mat-table>\n<mat-paginator [pageIndex]=\"$pageIndex()\" [length]=\"$gridData()?.count\" [pageSize]=\"$pageSize()\"\n (page)=\"pageChange($event)\" aria-label=\"Select page\"></mat-paginator>", styles: ["mat-row.clickable:hover{background:#f5f5f5;cursor:pointer}.select{max-width:80px}.count{font-size:.875rem}\n"] }]
|
|
668
|
+
}], ctorParameters: () => [], propDecorators: { toolbar: [{
|
|
669
|
+
type: ViewChild,
|
|
670
|
+
args: ['toolbar']
|
|
671
|
+
}], config: [{
|
|
657
672
|
type: Input
|
|
658
673
|
}] } });
|
|
659
674
|
|
|
@@ -671,21 +686,21 @@ class RouterEffects {
|
|
|
671
686
|
$set = createEffect(() => this.actions$.pipe(ofType(RouterActions.setQueryParams), concatLatestFrom(() => this.store.select(selectQueryParams)), tap(([{ queryParams }, params]) => {
|
|
672
687
|
this.router.navigate([], { queryParams: Object.assign({ ...params }, queryParams) });
|
|
673
688
|
})), { dispatch: false });
|
|
674
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
675
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
689
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RouterEffects, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
690
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RouterEffects });
|
|
676
691
|
}
|
|
677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RouterEffects, decorators: [{
|
|
678
693
|
type: Injectable
|
|
679
694
|
}] });
|
|
680
695
|
|
|
681
696
|
class StateRouterModule {
|
|
682
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
683
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1
|
|
684
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1
|
|
697
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: StateRouterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
698
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: StateRouterModule, imports: [CommonModule] });
|
|
699
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: StateRouterModule, providers: [
|
|
685
700
|
provideEffects(RouterEffects)
|
|
686
701
|
], imports: [CommonModule] });
|
|
687
702
|
}
|
|
688
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: StateRouterModule, decorators: [{
|
|
689
704
|
type: NgModule,
|
|
690
705
|
args: [{
|
|
691
706
|
declarations: [],
|
|
@@ -715,7 +730,7 @@ class GridEffects {
|
|
|
715
730
|
this.store.select(selectUrl),
|
|
716
731
|
this.store.select(selectUrlWithoutQuery),
|
|
717
732
|
this.store.select(selectQueryParam('base-filter'))
|
|
718
|
-
]), mergeMap(([{ request }, oldUrl, urlWithoutQuery, filter]) => {
|
|
733
|
+
]), mergeMap$1(([{ request }, oldUrl, urlWithoutQuery, filter]) => {
|
|
719
734
|
let url = `${urlWithoutQuery}?page=${request.paging?.page}&size=${request.paging?.pageSize}&sort-by=${request.sortBy ?? ''}&sort-dir=${request.sortDir == SortDir.Desc ? 'desc' : 'asc'}&filter=${request.filters ? btoa(JSON.stringify(request.filters)) : ''}&base-filter=${filter ?? ''}`;
|
|
720
735
|
return oldUrl == url
|
|
721
736
|
? []
|
|
@@ -746,19 +761,25 @@ class GridEffects {
|
|
|
746
761
|
})));
|
|
747
762
|
});
|
|
748
763
|
loadData$ = createEffect(() => {
|
|
749
|
-
return this.actions$.pipe(ofType(GridActions.load), concatLatestFrom(() => [
|
|
750
|
-
this.store.select(selectDataUrl)
|
|
764
|
+
return this.actions$.pipe(ofType(GridActions.load), concatLatestFrom(({ name }) => [
|
|
765
|
+
this.store.select(selectDataUrl(name))
|
|
766
|
+
]), map$1(([{ name, request }, dataUrl]) => GridActions.implicitLoad({ name, dataUrl, request })));
|
|
767
|
+
});
|
|
768
|
+
implicitLoad$ = createEffect(() => {
|
|
769
|
+
return this.actions$.pipe(ofType(GridActions.implicitLoad), concatLatestFrom(() => [
|
|
751
770
|
this.store.select(selectDataRequest)
|
|
752
|
-
]), mergeMap(([{ type, name, request },
|
|
753
|
-
return this.client.post(dataUrl, request ??
|
|
771
|
+
]), filter$1(([{ dataUrl }]) => !!dataUrl), mergeMap$1(([{ type, name, dataUrl, request }, urlRequest]) => {
|
|
772
|
+
return this.client.post(dataUrl, request ?? urlRequest).pipe(map$1(data => GridActions.loadSuccess({ name, ...data })), catchError(error => of(SharedActions.badError({ source: type, error }))));
|
|
754
773
|
}));
|
|
755
774
|
});
|
|
756
775
|
bulkDelete$ = createEffect(() => {
|
|
757
776
|
return this.actions$.pipe(ofType(GridActions.bulkDelete), concatLatestFrom(() => [
|
|
758
777
|
this.store.select(selectGridName),
|
|
759
|
-
this.store.select(selectDataUrl),
|
|
760
778
|
this.store.select(selectDataRequest)
|
|
761
|
-
]), concatLatestFrom(([, name]) =>
|
|
779
|
+
]), concatLatestFrom(([, name]) => [
|
|
780
|
+
this.store.select(selectDataUrl(name)),
|
|
781
|
+
this.store.select(selectTotalCount(name))
|
|
782
|
+
]), filter$1(([[], url]) => !!url), mergeMap$1(([[{ type, ids }, _, request], url, totalCount]) => this.confirmation.confirm({ title: 'Delete', message: `Are you sure you want to delete ${ids?.length ? ids.length : totalCount} items?`
|
|
762
783
|
}).pipe(filter$1(c => c), concatMap(_ => {
|
|
763
784
|
let headers = new HttpHeaders({ 'Content-Type': 'application/json' });
|
|
764
785
|
let body = {
|
|
@@ -783,22 +804,22 @@ class GridEffects {
|
|
|
783
804
|
return this.actions$.pipe(ofType(GridActions.bulkDeleteSuccess), tap$1(() => this.snack.info('Deleted!')), map$1(() => GridActions.refresh()));
|
|
784
805
|
});
|
|
785
806
|
constructor() { }
|
|
786
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
787
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
807
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GridEffects, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
808
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GridEffects });
|
|
788
809
|
}
|
|
789
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GridEffects, decorators: [{
|
|
790
811
|
type: Injectable
|
|
791
812
|
}], ctorParameters: () => [] });
|
|
792
813
|
|
|
793
814
|
class GridModule {
|
|
794
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
795
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1
|
|
796
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1
|
|
815
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
816
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: GridModule, imports: [CommonModule] });
|
|
817
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GridModule, providers: [
|
|
797
818
|
provideState(gridFeature),
|
|
798
819
|
provideEffects([GridEffects])
|
|
799
820
|
], imports: [CommonModule] });
|
|
800
821
|
}
|
|
801
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
822
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GridModule, decorators: [{
|
|
802
823
|
type: NgModule,
|
|
803
824
|
args: [{
|
|
804
825
|
declarations: [],
|
|
@@ -864,7 +885,7 @@ class CrudEffects {
|
|
|
864
885
|
save$ = createEffect(() => {
|
|
865
886
|
return this.actions$.pipe(ofType(CrudActions.save), concatLatestFrom(() => [
|
|
866
887
|
this.store.select(crudFeature.selectUrlPrefix)
|
|
867
|
-
]), mergeMap(([{ type, name, value, stay }, prefix]) => (value.id
|
|
888
|
+
]), mergeMap$1(([{ type, name, value, stay }, prefix]) => (value.id
|
|
868
889
|
? this.client.put(`${prefix}/${name}/${value.id}`, value)
|
|
869
890
|
: this.client.post(`${prefix}/${name}`, value))
|
|
870
891
|
.pipe(map$1(value => CrudActions.saveSuccess({ name, value, stay })), catchError(error => of(SharedActions.badError({ source: type, error }))))));
|
|
@@ -880,26 +901,26 @@ class CrudEffects {
|
|
|
880
901
|
return this.confirmation.confirm({
|
|
881
902
|
message: `Are you sure you want to delete ${nameStr}?`,
|
|
882
903
|
title: 'Delete'
|
|
883
|
-
}).pipe(filter$1(confirmed => confirmed), mergeMap(() => this.client.delete(`${prefix}/${name}/${value.id}`).pipe(map$1(() => GridActions.refresh()), tap$1(() => this.snack.info('Deleted!')), catchError(error => of(SharedActions.badError({ source: type, error }))))));
|
|
904
|
+
}).pipe(filter$1(confirmed => confirmed), mergeMap$1(() => this.client.delete(`${prefix}/${name}/${value.id}`).pipe(map$1(() => GridActions.refresh()), tap$1(() => this.snack.info('Deleted!')), catchError(error => of(SharedActions.badError({ source: type, error }))))));
|
|
884
905
|
}));
|
|
885
906
|
});
|
|
886
907
|
constructor() { }
|
|
887
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
888
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
908
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CrudEffects, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
909
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CrudEffects });
|
|
889
910
|
}
|
|
890
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CrudEffects, decorators: [{
|
|
891
912
|
type: Injectable
|
|
892
913
|
}], ctorParameters: () => [] });
|
|
893
914
|
|
|
894
915
|
class CrudModule {
|
|
895
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
896
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1
|
|
897
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1
|
|
916
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CrudModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
917
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: CrudModule, imports: [CommonModule] });
|
|
918
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CrudModule, providers: [
|
|
898
919
|
provideState(crudFeature),
|
|
899
920
|
provideEffects(CrudEffects)
|
|
900
921
|
], imports: [CommonModule] });
|
|
901
922
|
}
|
|
902
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
923
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CrudModule, decorators: [{
|
|
903
924
|
type: NgModule,
|
|
904
925
|
args: [{
|
|
905
926
|
declarations: [],
|
|
@@ -920,7 +941,7 @@ class SharedEffects {
|
|
|
920
941
|
store = inject(Store);
|
|
921
942
|
actions$ = inject(Actions);
|
|
922
943
|
init$ = createEffect(() => {
|
|
923
|
-
return this.actions$.pipe(ofType(SharedActions.init), mergeMap(() => this.http.get('/build.txt').pipe(map$1(build => SharedActions.initSuccess({ build })), catchError(error => of(SharedActions.transientError({ source: 'init', error }))))));
|
|
944
|
+
return this.actions$.pipe(ofType(SharedActions.init), mergeMap$1(() => this.http.get('/build.txt').pipe(map$1(build => SharedActions.initSuccess({ build })), catchError(error => of(SharedActions.transientError({ source: 'init', error }))))));
|
|
924
945
|
});
|
|
925
946
|
badError$ = createEffect(() => {
|
|
926
947
|
return this.actions$.pipe(ofType(SharedActions.badError), tap$1(({ error }) => {
|
|
@@ -956,10 +977,10 @@ class SharedEffects {
|
|
|
956
977
|
ngrxOnInitEffects() {
|
|
957
978
|
return SharedActions.init();
|
|
958
979
|
}
|
|
959
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
960
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
980
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SharedEffects, deps: [{ token: i1$2.HttpClient }, { token: i2$2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
981
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SharedEffects });
|
|
961
982
|
}
|
|
962
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
983
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SharedEffects, decorators: [{
|
|
963
984
|
type: Injectable
|
|
964
985
|
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i2$2.Router }] });
|
|
965
986
|
|
|
@@ -975,14 +996,14 @@ const sharedFeature = createFeature({
|
|
|
975
996
|
});
|
|
976
997
|
|
|
977
998
|
class SharedModule {
|
|
978
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
979
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1
|
|
980
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1
|
|
999
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1000
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: SharedModule, imports: [CommonModule] });
|
|
1001
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SharedModule, providers: [
|
|
981
1002
|
provideState(sharedFeature),
|
|
982
1003
|
provideEffects([SharedEffects])
|
|
983
1004
|
], imports: [CommonModule] });
|
|
984
1005
|
}
|
|
985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
1006
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SharedModule, decorators: [{
|
|
986
1007
|
type: NgModule,
|
|
987
1008
|
args: [{
|
|
988
1009
|
declarations: [],
|
|
@@ -1045,8 +1066,8 @@ class HostControlDirective {
|
|
|
1045
1066
|
ngOnDestroy() {
|
|
1046
1067
|
this.subscription?.unsubscribe();
|
|
1047
1068
|
}
|
|
1048
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
1049
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1
|
|
1069
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: HostControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1070
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: HostControlDirective, isStandalone: true, providers: [
|
|
1050
1071
|
{
|
|
1051
1072
|
provide: NG_VALUE_ACCESSOR,
|
|
1052
1073
|
multi: true,
|
|
@@ -1054,7 +1075,7 @@ class HostControlDirective {
|
|
|
1054
1075
|
},
|
|
1055
1076
|
], ngImport: i0 });
|
|
1056
1077
|
}
|
|
1057
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
1078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: HostControlDirective, decorators: [{
|
|
1058
1079
|
type: Directive,
|
|
1059
1080
|
args: [{
|
|
1060
1081
|
standalone: true,
|