ngx-techlify-core 16.0.0 → 16.0.2
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/esm2022/lib/role/role-form.component.mjs +3 -3
- package/esm2022/lib/searchable-selector/searchable-selector.component.mjs +15 -20
- package/esm2022/lib/timeline-filter/timeline-filter.component.mjs +2 -2
- package/fesm2022/ngx-techlify-core.mjs +17 -19
- package/fesm2022/ngx-techlify-core.mjs.map +1 -1
- package/lib/searchable-selector/searchable-selector.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ import * as i1$4 from '@angular/forms';
|
|
|
31
31
|
import { UntypedFormControl, Validators, ReactiveFormsModule, FormsModule, NG_VALUE_ACCESSOR, FormControl } from '@angular/forms';
|
|
32
32
|
import * as i1$2 from '@angular/common/http';
|
|
33
33
|
import { HttpResponse, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
34
|
-
import { throwError, Observable, Subject, of, BehaviorSubject, map as map$1, from, interval } from 'rxjs';
|
|
34
|
+
import { throwError, Observable, Subject, of, BehaviorSubject, map as map$1, Subscription, from, interval } from 'rxjs';
|
|
35
35
|
import * as i1$1 from '@angular/material/snack-bar';
|
|
36
36
|
import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
|
|
37
37
|
import * as i7$3 from '@angular/material/form-field';
|
|
@@ -3061,8 +3061,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3061
3061
|
}]
|
|
3062
3062
|
}], ctorParameters: function () { return [{ type: i1$5.Router }, { type: i1$5.ActivatedRoute }]; } });
|
|
3063
3063
|
|
|
3064
|
-
|
|
3065
|
-
let SearchableSelectorComponent = SearchableSelectorComponent_1 = class SearchableSelectorComponent {
|
|
3064
|
+
class SearchableSelectorComponent {
|
|
3066
3065
|
_focusMonitor;
|
|
3067
3066
|
http;
|
|
3068
3067
|
_elementRef;
|
|
@@ -3099,10 +3098,11 @@ let SearchableSelectorComponent = SearchableSelectorComponent_1 = class Searchab
|
|
|
3099
3098
|
stateChanges = new Subject();
|
|
3100
3099
|
focused = false;
|
|
3101
3100
|
controlType = 'searchable-selctor';
|
|
3102
|
-
id = `searchable-selctor-${
|
|
3101
|
+
id = `searchable-selctor-${SearchableSelectorComponent.nextId++}`;
|
|
3103
3102
|
describedBy = '';
|
|
3104
3103
|
filters;
|
|
3105
3104
|
cachedItems = [];
|
|
3105
|
+
subscriptions = new Subscription();
|
|
3106
3106
|
get empty() {
|
|
3107
3107
|
const { value: { select_value } } = this.selectorForm;
|
|
3108
3108
|
return !select_value;
|
|
@@ -3139,13 +3139,13 @@ let SearchableSelectorComponent = SearchableSelectorComponent_1 = class Searchab
|
|
|
3139
3139
|
select_value: [null],
|
|
3140
3140
|
search: ''
|
|
3141
3141
|
});
|
|
3142
|
-
_focusMonitor.monitor(_elementRef, true).subscribe(origin => {
|
|
3142
|
+
this.subscriptions.add(_focusMonitor.monitor(_elementRef, true).subscribe(origin => {
|
|
3143
3143
|
if (this.focused && !origin) {
|
|
3144
3144
|
this.onTouched();
|
|
3145
3145
|
}
|
|
3146
3146
|
this.focused = !!origin;
|
|
3147
3147
|
this.stateChanges.next();
|
|
3148
|
-
});
|
|
3148
|
+
}));
|
|
3149
3149
|
if (this.ngControl != null) {
|
|
3150
3150
|
this.ngControl.valueAccessor = this;
|
|
3151
3151
|
}
|
|
@@ -3169,11 +3169,11 @@ let SearchableSelectorComponent = SearchableSelectorComponent_1 = class Searchab
|
|
|
3169
3169
|
return items;
|
|
3170
3170
|
}
|
|
3171
3171
|
ngOnInit() {
|
|
3172
|
-
this.selectorForm.get('search').valueChanges
|
|
3173
|
-
.pipe(debounceTime(500), distinctUntilChanged()
|
|
3172
|
+
this.subscriptions.add(this.selectorForm.get('search').valueChanges
|
|
3173
|
+
.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
|
3174
3174
|
if (this.enableSearch)
|
|
3175
3175
|
this.search(value);
|
|
3176
|
-
});
|
|
3176
|
+
}));
|
|
3177
3177
|
this.filters = {
|
|
3178
3178
|
perPage: this.perPage,
|
|
3179
3179
|
search: '',
|
|
@@ -3194,14 +3194,14 @@ let SearchableSelectorComponent = SearchableSelectorComponent_1 = class Searchab
|
|
|
3194
3194
|
if (this.cache) {
|
|
3195
3195
|
request = this.http.cache().get(this.apiUrl, { params: this.filters });
|
|
3196
3196
|
}
|
|
3197
|
-
of().pipe(startWith(true), switchMap((_) => from(request)), finalize(() => this.isLoading = false)
|
|
3197
|
+
this.subscriptions.add(of().pipe(startWith(true), switchMap((_) => from(request)), finalize(() => this.isLoading = false)).subscribe((result) => {
|
|
3198
3198
|
this.items = this.items.concat(result[this.apiDataProperty]);
|
|
3199
3199
|
if (this.cache) {
|
|
3200
3200
|
this.cachedItems = this.items;
|
|
3201
3201
|
}
|
|
3202
3202
|
this.filters.page = result?.current_page || 1;
|
|
3203
3203
|
this.filters.lastPage = result?.last_page || 1;
|
|
3204
|
-
});
|
|
3204
|
+
}));
|
|
3205
3205
|
}
|
|
3206
3206
|
setDescribedByIds(ids) {
|
|
3207
3207
|
this.describedBy = ids.join(' ');
|
|
@@ -3326,18 +3326,16 @@ let SearchableSelectorComponent = SearchableSelectorComponent_1 = class Searchab
|
|
|
3326
3326
|
ngOnDestroy() {
|
|
3327
3327
|
this.stateChanges.complete();
|
|
3328
3328
|
this._focusMonitor.stopMonitoring(this._elementRef);
|
|
3329
|
+
this.subscriptions.unsubscribe();
|
|
3329
3330
|
}
|
|
3330
3331
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchableSelectorComponent, deps: [{ token: i1$4.UntypedFormBuilder }, { token: i1$3.FocusMonitor }, { token: HttpService }, { token: i0.ElementRef }, { token: i1.MatDialog }, { token: i1$4.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3331
3332
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SearchableSelectorComponent, selector: "app-searchable-selector", inputs: { valueField: "valueField", titleField: "titleField", subtitleField: "subtitleField", apiUrl: "apiUrl", multiple: "multiple", selectedValue: "selectedValue", enableSearch: "enableSearch", add: "add", addConfig: "addConfig", edit: "edit", editConfig: "editConfig", sort: "sort", sortBy: "sortBy", searchField: "searchField", itemComponent: "itemComponent", items: "items", apiDataProperty: "apiDataProperty", cache: "cache", perPage: "perPage", inDataSearch: "inDataSearch", required: "required", disabled: "disabled", value: "value" }, outputs: { selectedValueChange: "selectedValueChange", selectionChange: "selectionChange", itemsChange: "itemsChange" }, providers: [
|
|
3332
3333
|
{
|
|
3333
3334
|
provide: MatFormFieldControl,
|
|
3334
|
-
useExisting:
|
|
3335
|
+
useExisting: SearchableSelectorComponent
|
|
3335
3336
|
}
|
|
3336
3337
|
], ngImport: i0, template: "<div [formGroup]=\"selectorForm\" class=\"searchable-selctor-container\">\n <mat-select formControlName=\"select_value\" focused=\"false\" [multiple]=\"multiple\" [required]=\"required\"\n autocomplete=\"off\" (selectionChange)=\"_handleInput()\" (openedChange)=\"openedChange($event)\">\n <mat-form-field *ngIf=\"enableSearch\" class=\"p-1 w-100\">\n <input matInput formControlName=\"search\" placeholder=\"Search...\" (keydown)=\"$event.stopPropagation();\"\n autocomplete=\"off\">\n </mat-form-field>\n <div>\n <!-- TODO:Implement scroll only for options and have search fixed -->\n <mat-option *ngFor=\" let item of dataItems\" [value]=\"getPropertyValue(item,valueField)\">\n <span>{{getPropertyValue(item,titleField)}}</span>\n <span *ngIf=\"subtitleField\" class=\"text-secondary\" style='font-size: 14px;'>\n - {{ getPropertyValue(item,subtitleField) }}\n </span>\n </mat-option>\n </div>\n <div fxlayout=\"column\" class=\"w-100\" fxLayoutAlign=\"center center\">\n <mat-spinner class=\"my-4\" color=\"primary\" diameter=\"30\" *ngIf=\"isLoading\"></mat-spinner>\n </div>\n </mat-select>\n <mat-icon *ngIf=\"add\" class=\"relative-icon\" matSuffix (click)=\"addItem($event)\">add_circle_outline</mat-icon>\n <mat-icon *ngIf=\"edit && selectedValue\" class=\"relative-icon\" matSuffix (click)=\"editItem($event)\">edit</mat-icon>\n</div>", styles: [".searchable-selctor-container{display:flex}.relative-icon{position:relative;top:-4px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.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: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i7$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i11$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i9$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }] });
|
|
3337
|
-
}
|
|
3338
|
-
SearchableSelectorComponent = SearchableSelectorComponent_1 = __decorate([
|
|
3339
|
-
UntilDestroy()
|
|
3340
|
-
], SearchableSelectorComponent);
|
|
3338
|
+
}
|
|
3341
3339
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchableSelectorComponent, decorators: [{
|
|
3342
3340
|
type: Component,
|
|
3343
3341
|
args: [{ selector: 'app-searchable-selector', providers: [
|
|
@@ -3833,7 +3831,7 @@ let TimelineFilterComponent = TimelineFilterComponent_1 = class TimelineFilterCo
|
|
|
3833
3831
|
];
|
|
3834
3832
|
dateFrom = 'date_from';
|
|
3835
3833
|
dateTo = 'date_to';
|
|
3836
|
-
appearance = '
|
|
3834
|
+
appearance = 'fill';
|
|
3837
3835
|
showClearButton = false;
|
|
3838
3836
|
/**
|
|
3839
3837
|
* @deprecated The form input is deprecated.
|
|
@@ -11406,11 +11404,11 @@ class RoleFormComponent {
|
|
|
11406
11404
|
return this.formValidatorService.getErrorMessage(field, this.roleForm, errorMessages$2);
|
|
11407
11405
|
}
|
|
11408
11406
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleFormComponent, deps: [{ token: AlertService }, { token: CredentialsService }, { token: i1$4.UntypedFormBuilder }, { token: FormValidatorService }, { token: UserConfigService }, { token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: RoleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11409
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RoleFormComponent, selector: "role-form", ngImport: i0, template: "<form [formGroup]=\"roleForm\" (ngSubmit)=\"save()\">\n <div fxLayout=\"column\">\n <div mat-dialog-title class=\"text-center\">\n <div>Role Form</div>\n </div>\n <mat-form-field fxFlex=\"100%\">\n <input matInput formControlName=\"label\" placeholder=\"Role\" type=\"text\" autocomplete=\"off\" required />\n <mat-error *ngIf=\"isFieldValid('label')\">{{getErrorMessage('label')}}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\" *ngIf=\"showModuleSelector\">\n <mat-label>Module</mat-label>\n <mat-select formControlName=\"module_code\" required>\n <mat-option *ngFor=\"let module of modules\" [value]=\"module.package?.module.code\">\n {{module.package?.module.name}}</mat-option>\n </mat-select>\n <mat-error>Module is required</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n\n <ng-container *ngIf=\"isAdminUser\">\n <mat-checkbox formControlName=\"is_editable\"> Is Editable</mat-checkbox>\n <mat-checkbox formControlName=\"is_global\"> Is Global</mat-checkbox>\n </ng-container>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">\n Cancel\n </button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">\n Save\n </button>\n </div>\n </div>\n</form
|
|
11407
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RoleFormComponent, selector: "role-form", ngImport: i0, template: "<form [formGroup]=\"roleForm\" (ngSubmit)=\"save()\" class=\"p-3\">\n <div fxLayout=\"column\">\n <div mat-dialog-title class=\"text-center\">\n <div>Role Form</div>\n </div>\n <mat-form-field fxFlex=\"100%\">\n <input matInput formControlName=\"label\" placeholder=\"Role\" type=\"text\" autocomplete=\"off\" required />\n <mat-error *ngIf=\"isFieldValid('label')\">{{getErrorMessage('label')}}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\" *ngIf=\"showModuleSelector\">\n <mat-label>Module</mat-label>\n <mat-select formControlName=\"module_code\" required>\n <mat-option *ngFor=\"let module of modules\" [value]=\"module.package?.module.code\">\n {{module.package?.module.name}}</mat-option>\n </mat-select>\n <mat-error>Module is required</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n\n <ng-container *ngIf=\"isAdminUser\">\n <mat-checkbox formControlName=\"is_editable\"> Is Editable</mat-checkbox>\n <mat-checkbox formControlName=\"is_global\"> Is Global</mat-checkbox>\n </ng-container>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">\n Cancel\n </button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">\n Save\n </button>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: i7$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i9$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i7.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i7.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i7.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i7.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i1$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$4.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: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
11410
11408
|
}
|
|
11411
11409
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleFormComponent, decorators: [{
|
|
11412
11410
|
type: Component,
|
|
11413
|
-
args: [{ selector: 'role-form', template: "<form [formGroup]=\"roleForm\" (ngSubmit)=\"save()\">\n <div fxLayout=\"column\">\n <div mat-dialog-title class=\"text-center\">\n <div>Role Form</div>\n </div>\n <mat-form-field fxFlex=\"100%\">\n <input matInput formControlName=\"label\" placeholder=\"Role\" type=\"text\" autocomplete=\"off\" required />\n <mat-error *ngIf=\"isFieldValid('label')\">{{getErrorMessage('label')}}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\" *ngIf=\"showModuleSelector\">\n <mat-label>Module</mat-label>\n <mat-select formControlName=\"module_code\" required>\n <mat-option *ngFor=\"let module of modules\" [value]=\"module.package?.module.code\">\n {{module.package?.module.name}}</mat-option>\n </mat-select>\n <mat-error>Module is required</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n\n <ng-container *ngIf=\"isAdminUser\">\n <mat-checkbox formControlName=\"is_editable\"> Is Editable</mat-checkbox>\n <mat-checkbox formControlName=\"is_global\"> Is Global</mat-checkbox>\n </ng-container>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">\n Cancel\n </button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">\n Save\n </button>\n </div>\n </div>\n</form
|
|
11411
|
+
args: [{ selector: 'role-form', template: "<form [formGroup]=\"roleForm\" (ngSubmit)=\"save()\" class=\"p-3\">\n <div fxLayout=\"column\">\n <div mat-dialog-title class=\"text-center\">\n <div>Role Form</div>\n </div>\n <mat-form-field fxFlex=\"100%\">\n <input matInput formControlName=\"label\" placeholder=\"Role\" type=\"text\" autocomplete=\"off\" required />\n <mat-error *ngIf=\"isFieldValid('label')\">{{getErrorMessage('label')}}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\" *ngIf=\"showModuleSelector\">\n <mat-label>Module</mat-label>\n <mat-select formControlName=\"module_code\" required>\n <mat-option *ngFor=\"let module of modules\" [value]=\"module.package?.module.code\">\n {{module.package?.module.name}}</mat-option>\n </mat-select>\n <mat-error>Module is required</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n\n <ng-container *ngIf=\"isAdminUser\">\n <mat-checkbox formControlName=\"is_editable\"> Is Editable</mat-checkbox>\n <mat-checkbox formControlName=\"is_global\"> Is Global</mat-checkbox>\n </ng-container>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">\n Cancel\n </button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">\n Save\n </button>\n </div>\n </div>\n</form>\n" }]
|
|
11414
11412
|
}], ctorParameters: function () { return [{ type: AlertService }, { type: CredentialsService }, { type: i1$4.UntypedFormBuilder }, { type: FormValidatorService }, { type: UserConfigService }, { type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
11415
11413
|
type: Inject,
|
|
11416
11414
|
args: [MAT_DIALOG_DATA]
|