ichec-angular-core 0.3.2 → 0.3.4
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/ichec-angular-core.mjs +496 -170
- package/fesm2022/ichec-angular-core.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/styles.scss +25 -22
- package/types/ichec-angular-core.d.ts +141 -33
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BehaviorSubject, map, catchError, mergeMap, throwError, tap, of, debounceTime, distinctUntilChanged, merge, Subscription, finalize } from 'rxjs';
|
|
2
2
|
import { HttpClient, HttpParams, HttpHeaders } from '@angular/common/http';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, inject, DOCUMENT, Injectable,
|
|
4
|
+
import { InjectionToken, inject, signal, DOCUMENT, Injectable, Component, computed, input, output, viewChild } from '@angular/core';
|
|
5
5
|
import { CookieService } from 'ngx-cookie-service';
|
|
6
6
|
import * as i1$2 from '@angular/forms';
|
|
7
7
|
import { FormControl, Validators, FormGroup, ReactiveFormsModule, FormBuilder } from '@angular/forms';
|
|
@@ -13,7 +13,7 @@ import * as i2 from '@angular/material/button';
|
|
|
13
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
14
|
import * as i1 from '@angular/material/table';
|
|
15
15
|
import { MatTable, MatTableModule } from '@angular/material/table';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i5 from '@angular/material/form-field';
|
|
17
17
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
18
18
|
import * as i6 from '@angular/material/select';
|
|
19
19
|
import { MatSelectModule } from '@angular/material/select';
|
|
@@ -23,32 +23,35 @@ import * as i6$1 from '@angular/material/autocomplete';
|
|
|
23
23
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
24
24
|
import * as i3 from '@angular/material/input';
|
|
25
25
|
import { MatInputModule } from '@angular/material/input';
|
|
26
|
-
import * as
|
|
26
|
+
import * as i3$1 from '@angular/material/tooltip';
|
|
27
27
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
28
|
-
import * as
|
|
28
|
+
import * as i7 from '@angular/material/slide-toggle';
|
|
29
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
30
|
+
import * as i6$2 from '@angular/material/checkbox';
|
|
29
31
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
30
32
|
import { MatCardModule } from '@angular/material/card';
|
|
31
|
-
import * as
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
33
|
+
import * as i2$1 from '@angular/material/list';
|
|
34
|
+
import { MatListModule } from '@angular/material/list';
|
|
35
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
36
|
+
import * as i3$2 from '@angular/material/sort';
|
|
34
37
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
35
38
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
36
|
-
import * as i1$
|
|
39
|
+
import * as i1$4 from '@angular/material/progress-spinner';
|
|
37
40
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
38
|
-
import * as i2$
|
|
41
|
+
import * as i2$2 from '@angular/material/paginator';
|
|
39
42
|
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
40
43
|
import * as i2$3 from '@angular/cdk/scrolling';
|
|
41
44
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
42
|
-
import * as i2$2 from '@angular/material/list';
|
|
43
|
-
import { MatListModule } from '@angular/material/list';
|
|
44
45
|
import { DataSource } from '@angular/cdk/collections';
|
|
45
46
|
import * as i2$4 from '@angular/material/toolbar';
|
|
46
47
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
47
48
|
import * as i5$1 from '@angular/material/menu';
|
|
48
49
|
import { MatMenuModule } from '@angular/material/menu';
|
|
49
|
-
import * as i1$
|
|
50
|
+
import * as i1$5 from '@angular/material/sidenav';
|
|
50
51
|
import { MatSidenavContent, MatSidenavModule } from '@angular/material/sidenav';
|
|
51
|
-
import * as
|
|
52
|
+
import * as i6$3 from '@angular/material/expansion';
|
|
53
|
+
import { MatExpansionModule } from '@angular/material/expansion';
|
|
54
|
+
import * as i9 from '@angular/material/tabs';
|
|
52
55
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
53
56
|
|
|
54
57
|
class Paginated {
|
|
@@ -180,6 +183,7 @@ const REST_SERVICE_CONFIG = new InjectionToken("Config for the rest service");
|
|
|
180
183
|
class RestService {
|
|
181
184
|
manifest = new BehaviorSubject(null);
|
|
182
185
|
_url = "";
|
|
186
|
+
userQuery = "user";
|
|
183
187
|
config = inject(REST_SERVICE_CONFIG);
|
|
184
188
|
_http = inject(HttpClient);
|
|
185
189
|
cookieService = inject(CookieService);
|
|
@@ -187,7 +191,7 @@ class RestService {
|
|
|
187
191
|
return this._http.delete(this.baseUrl + id + "/", this.getRequestBase()).pipe(map(_ => { return void (0); }), catchError(this.handleError));
|
|
188
192
|
}
|
|
189
193
|
getForUser(user, query = new ItemQuery()) {
|
|
190
|
-
query.queries.set(
|
|
194
|
+
query.queries.set(this.userQuery, user.id.toString());
|
|
191
195
|
return this.get(query);
|
|
192
196
|
}
|
|
193
197
|
_getServiceManifest() {
|
|
@@ -239,12 +243,14 @@ class RestService {
|
|
|
239
243
|
return this._http.patch(this.mediaUrl + id + "/", form, this.getRequestBase("")).pipe(mergeMap(_ => this.getItem(id)), catchError(this.handleError));
|
|
240
244
|
}
|
|
241
245
|
postFile(id, field, file) {
|
|
246
|
+
const path = id + "/" + field + "/upload";
|
|
242
247
|
const form = new FormData();
|
|
243
248
|
form.append("file", file);
|
|
244
|
-
return this._http.post(this.baseUrl +
|
|
249
|
+
return this._http.post(this.baseUrl + path, form, this.getRequestBase("")).pipe(mergeMap(_ => this.getItem(id)), catchError(this.handleError));
|
|
245
250
|
}
|
|
246
251
|
putFile(id, field, file) {
|
|
247
|
-
|
|
252
|
+
const path = id + "/" + field + "/upload";
|
|
253
|
+
return this._http.put(this.baseUrl + path, file, this.getRequestBase("", new HttpParams(), file.name)).pipe(mergeMap(_ => this.getItem(id)), catchError(this.handleError));
|
|
248
254
|
}
|
|
249
255
|
putFileStandalone(url, file) {
|
|
250
256
|
return this._http.put(this.config.endpoint_url + "/api/" + url + "/upload", file, this.getRequestBase("", new HttpParams(), file.name)).pipe(map(_response => { return void (0); }), catchError(this.handleError));
|
|
@@ -342,6 +348,7 @@ class UserService extends ItemService {
|
|
|
342
348
|
Service to handle IPortalMember via REST and also handle logins.
|
|
343
349
|
*/
|
|
344
350
|
loggedInUser = new BehaviorSubject(null);
|
|
351
|
+
canInvite = signal(false, ...(ngDevMode ? [{ debugName: "canInvite" }] : []));
|
|
345
352
|
document = inject(DOCUMENT);
|
|
346
353
|
_url = PortalMember.plural;
|
|
347
354
|
typename = PortalMember.typename;
|
|
@@ -384,10 +391,20 @@ class UserService extends ItemService {
|
|
|
384
391
|
//this.login(next)
|
|
385
392
|
});
|
|
386
393
|
}
|
|
394
|
+
canCreate() {
|
|
395
|
+
return this.canInvite();
|
|
396
|
+
}
|
|
387
397
|
getSelf() {
|
|
388
398
|
console.log("Attempting to fetch self profile");
|
|
389
399
|
return this._getServiceManifest().pipe(mergeMap(m => { this.manifest.next(m); return this._getSelf(); }));
|
|
390
400
|
}
|
|
401
|
+
inviteMember(invite) {
|
|
402
|
+
let prefix = "";
|
|
403
|
+
if (this.config.endpoint_url) {
|
|
404
|
+
prefix = this.config.endpoint_url + "/";
|
|
405
|
+
}
|
|
406
|
+
return this._http.post(prefix + "api/accounts/invite", invite, this.getRequestBase());
|
|
407
|
+
}
|
|
391
408
|
_getSelf() {
|
|
392
409
|
return this.getUrl(this.config.endpoint_url + "/api/self/").pipe(tap(user => this.onSelf(user)), map(user => { return user; }), catchError(e => this._selfFetchFailed(e)));
|
|
393
410
|
}
|
|
@@ -704,9 +721,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
704
721
|
}]
|
|
705
722
|
}], ctorParameters: () => [] });
|
|
706
723
|
|
|
707
|
-
class
|
|
708
|
-
_url =
|
|
709
|
-
typename =
|
|
724
|
+
class OrganizationService extends ItemWithUserService {
|
|
725
|
+
_url = Organization.plural;
|
|
726
|
+
typename = Organization.typename;
|
|
710
727
|
countryOptions = signal([], ...(ngDevMode ? [{ debugName: "countryOptions" }] : []));
|
|
711
728
|
refreshCountryOptions() {
|
|
712
729
|
this.getOptions().subscribe(options => this.onOptions(options));
|
|
@@ -719,27 +736,23 @@ class AddressService extends ItemWithUserService {
|
|
|
719
736
|
this.onPostActions(options.actions['POST']);
|
|
720
737
|
}
|
|
721
738
|
}
|
|
739
|
+
onAddressOption(option) {
|
|
740
|
+
console.log("option", option);
|
|
741
|
+
for (const [_, child] of Object.entries(option.children)) {
|
|
742
|
+
if (child.label == "Country" && child.choices) {
|
|
743
|
+
console.log("choices", child.choices);
|
|
744
|
+
this.onCountryChoices(child.choices);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
722
748
|
onPostActions(actions) {
|
|
723
|
-
if ('
|
|
724
|
-
this.
|
|
749
|
+
if ('address' in actions) {
|
|
750
|
+
this.onAddressOption(actions["address"]);
|
|
725
751
|
}
|
|
726
752
|
}
|
|
727
753
|
onCountryChoices(choices) {
|
|
728
754
|
this.countryOptions.update(() => choices.map(c => { return { name: c.display_name, code: c.value, flag: "" }; }));
|
|
729
755
|
}
|
|
730
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: AddressService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
731
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: AddressService, providedIn: 'root' });
|
|
732
|
-
}
|
|
733
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: AddressService, decorators: [{
|
|
734
|
-
type: Injectable,
|
|
735
|
-
args: [{
|
|
736
|
-
providedIn: 'root'
|
|
737
|
-
}]
|
|
738
|
-
}] });
|
|
739
|
-
|
|
740
|
-
class OrganizationService extends ItemWithUserService {
|
|
741
|
-
_url = Organization.plural;
|
|
742
|
-
typename = Organization.typename;
|
|
743
756
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: OrganizationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
744
757
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: OrganizationService, providedIn: 'root' });
|
|
745
758
|
}
|
|
@@ -1023,7 +1036,7 @@ class SelectTableComponent {
|
|
|
1023
1036
|
this.table()?.renderRows();
|
|
1024
1037
|
}
|
|
1025
1038
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SelectTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1026
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: SelectTableComponent, isStandalone: true, selector: "lib-select-table", inputs: { itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemAdded: "itemAdded", itemRemoved: "itemRemoved", searchChanged: "searchChanged" }, viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }], ngImport: i0, template: "<div class='select-container'
|
|
1039
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: SelectTableComponent, isStandalone: true, selector: "lib-select-table", inputs: { itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemAdded: "itemAdded", itemRemoved: "itemRemoved", searchChanged: "searchChanged" }, viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }], ngImport: i0, template: "<div class='select-container'>\n <div class='controls-container'>\n <mat-form-field style=\"width:100%\">\n <mat-label>Search {{itemType()}} to add...</mat-label>\n <input \n type=\"text\"\n aria-label=\"Selected item\"\n matInput\n [formControl]=\"searchControl\" \n placeholder=\"Search {{itemType()}} to add...\"\n [matAutocomplete]=\"auto\">\n\n <mat-autocomplete #auto=\"matAutocomplete\" style=\"width:100%\">\n @for(item of options(); track item.item.id){\n <mat-option [value]=\"item.title\" style=\"width:100%\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplate(); context: { item: item.item }\">\n </ng-container>\n </mat-option>\n }\n </mat-autocomplete>\n </mat-form-field>\n\n @if(searchControl.value){\n <button mat-mini-fab type=\"button\" \n class=\"form-action-button\" \n matTooltip=\"Add new item\"\n (click)=\"add()\">\n <mat-icon>add</mat-icon>\n </button>\n }\n </div>\n\n @if(selected().length > 0){\n <table mat-table [dataSource]=\"selected()\" class=\"mat-elevation-z8\">\n @for (column of columns(); track column.name) {\n <ng-container matColumnDef=\"{{ column.name }}\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n {{ column.title }}\n </th>\n <td mat-cell *matCellDef=\"let element\">{{ element[column.name] }}</td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"remove\">\n <th mat-header-cell *matHeaderCellDef>Remove\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <button mat-icon-button\n color=\"primary\"\n type=\"button\" \n matTooltip=\"Remove item\"\n aria-label=\"Remove an item\"\n (click)=\"remove(element.id)\">\n <mat-icon>remove\n </mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnNames()\">\n </tr>\n <tr mat-row *matRowDef=\"let row; columns: columnNames();\">\n </tr>\n </table>\n }\n</div>", styles: [".select-container{display:flex;text-align:center;justify-content:center;flex-direction:column;width:100%}.controls-container{width:100%;display:flex;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i6$1.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: "directive", type: i6$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1027
1040
|
}
|
|
1028
1041
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SelectTableComponent, decorators: [{
|
|
1029
1042
|
type: Component,
|
|
@@ -1035,7 +1048,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1035
1048
|
MatAutocompleteModule,
|
|
1036
1049
|
ReactiveFormsModule,
|
|
1037
1050
|
MatInputModule,
|
|
1038
|
-
|
|
1051
|
+
MatTooltipModule,
|
|
1052
|
+
NgTemplateOutlet], template: "<div class='select-container'>\n <div class='controls-container'>\n <mat-form-field style=\"width:100%\">\n <mat-label>Search {{itemType()}} to add...</mat-label>\n <input \n type=\"text\"\n aria-label=\"Selected item\"\n matInput\n [formControl]=\"searchControl\" \n placeholder=\"Search {{itemType()}} to add...\"\n [matAutocomplete]=\"auto\">\n\n <mat-autocomplete #auto=\"matAutocomplete\" style=\"width:100%\">\n @for(item of options(); track item.item.id){\n <mat-option [value]=\"item.title\" style=\"width:100%\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplate(); context: { item: item.item }\">\n </ng-container>\n </mat-option>\n }\n </mat-autocomplete>\n </mat-form-field>\n\n @if(searchControl.value){\n <button mat-mini-fab type=\"button\" \n class=\"form-action-button\" \n matTooltip=\"Add new item\"\n (click)=\"add()\">\n <mat-icon>add</mat-icon>\n </button>\n }\n </div>\n\n @if(selected().length > 0){\n <table mat-table [dataSource]=\"selected()\" class=\"mat-elevation-z8\">\n @for (column of columns(); track column.name) {\n <ng-container matColumnDef=\"{{ column.name }}\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n {{ column.title }}\n </th>\n <td mat-cell *matCellDef=\"let element\">{{ element[column.name] }}</td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"remove\">\n <th mat-header-cell *matHeaderCellDef>Remove\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <button mat-icon-button\n color=\"primary\"\n type=\"button\" \n matTooltip=\"Remove item\"\n aria-label=\"Remove an item\"\n (click)=\"remove(element.id)\">\n <mat-icon>remove\n </mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnNames()\">\n </tr>\n <tr mat-row *matRowDef=\"let row; columns: columnNames();\">\n </tr>\n </table>\n }\n</div>", styles: [".select-container{display:flex;text-align:center;justify-content:center;flex-direction:column;width:100%}.controls-container{width:100%;display:flex;flex-direction:row}\n"] }]
|
|
1039
1053
|
}], propDecorators: { itemType: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemType", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], itemAdded: [{ type: i0.Output, args: ["itemAdded"] }], itemRemoved: [{ type: i0.Output, args: ["itemRemoved"] }], searchChanged: [{ type: i0.Output, args: ["searchChanged"] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], table: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatTable), { isSignal: true }] }] } });
|
|
1040
1054
|
|
|
1041
1055
|
const USER_TABLE_FULL = [
|
|
@@ -1047,6 +1061,7 @@ const USER_TABLE_FULL = [
|
|
|
1047
1061
|
|
|
1048
1062
|
class SelectionManager {
|
|
1049
1063
|
candidates = signal([], ...(ngDevMode ? [{ debugName: "candidates" }] : []));
|
|
1064
|
+
dirty = signal(false, ...(ngDevMode ? [{ debugName: "dirty" }] : []));
|
|
1050
1065
|
selected = signal([], ...(ngDevMode ? [{ debugName: "selected" }] : []));
|
|
1051
1066
|
columns = [];
|
|
1052
1067
|
itemService;
|
|
@@ -1063,11 +1078,13 @@ class SelectionManager {
|
|
|
1063
1078
|
this.candidates.set(items.results.map(item => this.toSelectable(item)));
|
|
1064
1079
|
}
|
|
1065
1080
|
onRemoved(id) {
|
|
1081
|
+
this.dirty.set(true);
|
|
1066
1082
|
const url = this.selected().find(m => m.id == id).url;
|
|
1067
1083
|
this.selected.update(items => items.filter(m => m.id != id));
|
|
1068
1084
|
return url;
|
|
1069
1085
|
}
|
|
1070
1086
|
onAdded(title) {
|
|
1087
|
+
this.dirty.set(true);
|
|
1071
1088
|
const selected = this.candidates().find(m => m.title == title);
|
|
1072
1089
|
if (selected) {
|
|
1073
1090
|
this.selected.update(members => { members.push(selected.item); return members; });
|
|
@@ -1103,11 +1120,11 @@ class BackButtonComponent {
|
|
|
1103
1120
|
this.location.back();
|
|
1104
1121
|
}
|
|
1105
1122
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: BackButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1106
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: BackButtonComponent, isStandalone: true, selector: "lib-back-button", ngImport: i0, template: "<a mat-icon-button class=\"padded-button\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\">\n<mat-icon>arrow_back</mat-icon>\n</a>\n\n", styles: [":host{position:absolute}.padded-button{margin-left:5px;margin-top:5px}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }] });
|
|
1123
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: BackButtonComponent, isStandalone: true, selector: "lib-back-button", ngImport: i0, template: "<a mat-icon-button class=\"padded-button\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n matTooltip=\"Go Back\"\n role=\"button\">\n<mat-icon>arrow_back</mat-icon>\n</a>\n\n", styles: [":host{position:absolute}.padded-button{margin-left:5px;margin-top:5px}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
|
|
1107
1124
|
}
|
|
1108
1125
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: BackButtonComponent, decorators: [{
|
|
1109
1126
|
type: Component,
|
|
1110
|
-
args: [{ selector: 'lib-back-button', imports: [MatIconModule, MatButtonModule], template: "<a mat-icon-button class=\"padded-button\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\">\n<mat-icon>arrow_back</mat-icon>\n</a>\n\n", styles: [":host{position:absolute}.padded-button{margin-left:5px;margin-top:5px}\n"] }]
|
|
1127
|
+
args: [{ selector: 'lib-back-button', imports: [MatIconModule, MatButtonModule, MatTooltipModule], template: "<a mat-icon-button class=\"padded-button\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n matTooltip=\"Go Back\"\n role=\"button\">\n<mat-icon>arrow_back</mat-icon>\n</a>\n\n", styles: [":host{position:absolute}.padded-button{margin-left:5px;margin-top:5px}\n"] }]
|
|
1111
1128
|
}] });
|
|
1112
1129
|
|
|
1113
1130
|
class DetailHeaderComponent {
|
|
@@ -1122,26 +1139,50 @@ class DetailHeaderComponent {
|
|
|
1122
1139
|
this.deleteClicked.emit();
|
|
1123
1140
|
}
|
|
1124
1141
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DetailHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1125
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DetailHeaderComponent, isStandalone: true, selector: "lib-detail-header", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, route: { classPropertyName: "route", publicName: "route", isSignal: true, isRequired: false, transformFunction: null }, canEdit: { classPropertyName: "canEdit", publicName: "canEdit", isSignal: true, isRequired: false, transformFunction: null }, canDelete: { classPropertyName: "canDelete", publicName: "canDelete", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { deleteClicked: "deleteClicked" }, ngImport: i0, template: "<div class=\"container\">\n\n <h1 class=\"header\">{{text()}}</h1>\n\n <div class=\"controls\">\n @if(canEdit()){\n <a mat-mini-fab class=\"control-button\" matTooltip=\"Edit the item\" title=\"Click to edit this item\" aria-label=\"Click to edit this item\"\n [routerLink]=\"[fullRoute(), id()]\">\n <mat-icon>edit</mat-icon>\n </a>\n }\n\n @if(canDelete()){\n <button mat-mini-fab class=\"control-button\" (click)=\"deleteClick()\" matTooltip=\"Delete the item\" title=\"Click to delete this item\"\n aria-label=\"Click to delete this item\">\n <mat-icon>delete</mat-icon></button>\n }\n </div>\n\n</div>", styles: [".container{width:100%;max-width:
|
|
1142
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DetailHeaderComponent, isStandalone: true, selector: "lib-detail-header", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, route: { classPropertyName: "route", publicName: "route", isSignal: true, isRequired: false, transformFunction: null }, canEdit: { classPropertyName: "canEdit", publicName: "canEdit", isSignal: true, isRequired: false, transformFunction: null }, canDelete: { classPropertyName: "canDelete", publicName: "canDelete", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { deleteClicked: "deleteClicked" }, ngImport: i0, template: "<div class=\"container\">\n\n <h1 class=\"header\">{{text()}}</h1>\n\n <div class=\"controls\">\n @if(canEdit()){\n <a mat-mini-fab class=\"control-button\" matTooltip=\"Edit the item\" title=\"Click to edit this item\" aria-label=\"Click to edit this item\"\n [routerLink]=\"[fullRoute(), id()]\">\n <mat-icon>edit</mat-icon>\n </a>\n }\n\n @if(canDelete()){\n <button mat-mini-fab class=\"control-button\" color=\"warn\" (click)=\"deleteClick()\" matTooltip=\"Delete the item\" title=\"Click to delete this item\"\n aria-label=\"Click to delete this item\">\n <mat-icon>delete</mat-icon></button>\n }\n </div>\n\n</div>", styles: [".container{width:100%;max-width:600px;padding:5px;display:flex;flex-direction:row;align-items:center}.header{width:100%;padding:5px;margin:0}.controls{display:flex;flex-direction:row;align-content:center;justify-content:center}.control-button{margin:5px}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
|
|
1126
1143
|
}
|
|
1127
1144
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DetailHeaderComponent, decorators: [{
|
|
1128
1145
|
type: Component,
|
|
1129
1146
|
args: [{ selector: 'lib-detail-header', imports: [RouterModule,
|
|
1130
1147
|
MatButtonModule,
|
|
1131
|
-
MatIconModule, MatTooltipModule], template: "<div class=\"container\">\n\n <h1 class=\"header\">{{text()}}</h1>\n\n <div class=\"controls\">\n @if(canEdit()){\n <a mat-mini-fab class=\"control-button\" matTooltip=\"Edit the item\" title=\"Click to edit this item\" aria-label=\"Click to edit this item\"\n [routerLink]=\"[fullRoute(), id()]\">\n <mat-icon>edit</mat-icon>\n </a>\n }\n\n @if(canDelete()){\n <button mat-mini-fab class=\"control-button\" (click)=\"deleteClick()\" matTooltip=\"Delete the item\" title=\"Click to delete this item\"\n aria-label=\"Click to delete this item\">\n <mat-icon>delete</mat-icon></button>\n }\n </div>\n\n</div>", styles: [".container{width:100%;max-width:
|
|
1148
|
+
MatIconModule, MatTooltipModule], template: "<div class=\"container\">\n\n <h1 class=\"header\">{{text()}}</h1>\n\n <div class=\"controls\">\n @if(canEdit()){\n <a mat-mini-fab class=\"control-button\" matTooltip=\"Edit the item\" title=\"Click to edit this item\" aria-label=\"Click to edit this item\"\n [routerLink]=\"[fullRoute(), id()]\">\n <mat-icon>edit</mat-icon>\n </a>\n }\n\n @if(canDelete()){\n <button mat-mini-fab class=\"control-button\" color=\"warn\" (click)=\"deleteClick()\" matTooltip=\"Delete the item\" title=\"Click to delete this item\"\n aria-label=\"Click to delete this item\">\n <mat-icon>delete</mat-icon></button>\n }\n </div>\n\n</div>", styles: [".container{width:100%;max-width:600px;padding:5px;display:flex;flex-direction:row;align-items:center}.header{width:100%;padding:5px;margin:0}.controls{display:flex;flex-direction:row;align-content:center;justify-content:center}.control-button{margin:5px}\n"] }]
|
|
1132
1149
|
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], route: [{ type: i0.Input, args: [{ isSignal: true, alias: "route", required: false }] }], canEdit: [{ type: i0.Input, args: [{ isSignal: true, alias: "canEdit", required: false }] }], canDelete: [{ type: i0.Input, args: [{ isSignal: true, alias: "canDelete", required: false }] }], deleteClicked: [{ type: i0.Output, args: ["deleteClicked"] }] } });
|
|
1133
1150
|
|
|
1134
1151
|
class SearchBarComponent {
|
|
1135
1152
|
itemType = input("", ...(ngDevMode ? [{ debugName: "itemType" }] : []));
|
|
1136
1153
|
sortFields = input([], ...(ngDevMode ? [{ debugName: "sortFields" }] : []));
|
|
1137
1154
|
sortAscending = signal(true, ...(ngDevMode ? [{ debugName: "sortAscending" }] : []));
|
|
1155
|
+
filters = input(null, ...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
1138
1156
|
searchChanged = output();
|
|
1139
1157
|
searchFilter = new FormControl();
|
|
1158
|
+
showFilters = signal(false, ...(ngDevMode ? [{ debugName: "showFilters" }] : []));
|
|
1159
|
+
fb = inject(FormBuilder);
|
|
1160
|
+
filterForm = null;
|
|
1161
|
+
ngOnInit() {
|
|
1162
|
+
const filters = this.filters();
|
|
1163
|
+
if (!filters) {
|
|
1164
|
+
return;
|
|
1165
|
+
}
|
|
1166
|
+
this.filterForm = this.fb.group({});
|
|
1167
|
+
for (const row of filters.rows) {
|
|
1168
|
+
for (const filter of row.filters) {
|
|
1169
|
+
if (filter.type == "boolean") {
|
|
1170
|
+
this.filterForm.addControl(filter.key, this.fb.control(filter.default === "true"));
|
|
1171
|
+
}
|
|
1172
|
+
else if (filter.type == "selection") {
|
|
1173
|
+
this.filterForm.addControl(filter.key, this.fb.control(filter.default));
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1140
1178
|
ngAfterViewInit() {
|
|
1141
1179
|
this.searchFilter.valueChanges.pipe(debounceTime(150), distinctUntilChanged(), tap(() => {
|
|
1142
1180
|
this.searchEntered();
|
|
1143
1181
|
})).subscribe();
|
|
1144
1182
|
}
|
|
1183
|
+
toggleFilterVisibility() {
|
|
1184
|
+
this.showFilters.update(value => !value);
|
|
1185
|
+
}
|
|
1145
1186
|
clearSearch() {
|
|
1146
1187
|
this.searchFilter.setValue("");
|
|
1147
1188
|
}
|
|
@@ -1149,7 +1190,7 @@ class SearchBarComponent {
|
|
|
1149
1190
|
this.searchChanged.emit(this.searchFilter.value);
|
|
1150
1191
|
}
|
|
1151
1192
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SearchBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1152
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: SearchBarComponent, isStandalone: true, selector: "lib-search-bar", inputs: { itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: false, transformFunction: null }, sortFields: { classPropertyName: "sortFields", publicName: "sortFields", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchChanged: "searchChanged" }, ngImport: i0, template: "<div class=\"container\">\n <mat-form-field class=\"search\" style=\"margin:
|
|
1193
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: SearchBarComponent, isStandalone: true, selector: "lib-search-bar", inputs: { itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: false, transformFunction: null }, sortFields: { classPropertyName: "sortFields", publicName: "sortFields", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchChanged: "searchChanged" }, ngImport: i0, template: "<div class=\"container\">\n <div class=\"search-row\">\n <mat-form-field class=\"search\" style=\"margin: 5px;width:70%\">\n <mat-label>{{'Search for ' + itemType() | titlecase}}</mat-label>\n <input matInput [formControl]=\"searchFilter\" placeholder=\"Search {{ itemType() | titlecase }}\" />\n\n @if(searchFilter.value){\n <button matSuffix mat-icon-button aria-label=\"Cancel\" (click)=\"clearSearch()\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n @else(){\n <button matSuffix mat-icon-button aria-label=\"Search\">\n <mat-icon>search</mat-icon>\n </button>\n }\n </mat-form-field>\n\n @if(filters(); as filters)\n {\n @if(showFilters())\n {\n <button mat-button=\"tonal\" (click)=\"toggleFilterVisibility()\"><mat-icon>close</mat-icon>Hide Filters</button>\n }\n @else {\n <button mat-button=\"tonal\" (click)=\"toggleFilterVisibility()\"><mat-icon>tune</mat-icon>Filters</button>\n }\n }\n\n @if(sortFields().length > 0){\n <mat-form-field style=\"margin: 10px\">\n <mat-label>Sort By</mat-label>\n <mat-select>\n @for(field of sortFields(); track field)\n {\n <mat-option>{{field}}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <button mat-icon-button aria-label=\"Sort Order\" matTooltip=\"Toggle sort order\">\n <mat-icon>sort</mat-icon>\n </button>\n }\n </div>\n\n <div class=\"filter-container\" style=\"width:100%\">\n @if(filters(); as filters)\n {\n @if(showFilters())\n {\n <div style=\"display: flex; flex-direction: row;\">\n @for(row of filters.rows; track row)\n {\n @for(filter of row.filters; track filter)\n {\n @if(filter.type === \"boolean\")\n {\n <mat-slide-toggle [formControlName]=\"filter.key\">{{filter.display_name}}</mat-slide-toggle>\n }\n }\n }\n </div>\n }\n }\n </div>\n</div>", styles: [":host{flex-grow:1}.container{width:100%;display:flex;flex-wrap:wrap;flex-direction:column;align-items:center;justify-content:center}.search-row{width:100%;display:flex;flex-wrap:wrap;flex-direction:row;align-items:center;justify-content:center}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i7.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }] });
|
|
1153
1194
|
}
|
|
1154
1195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SearchBarComponent, decorators: [{
|
|
1155
1196
|
type: Component,
|
|
@@ -1158,9 +1199,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1158
1199
|
MatTooltipModule,
|
|
1159
1200
|
MatButtonModule,
|
|
1160
1201
|
MatSelectModule,
|
|
1202
|
+
MatSlideToggleModule,
|
|
1161
1203
|
MatIconModule,
|
|
1162
|
-
TitleCasePipe], template: "<div class=\"container\">\n <mat-form-field class=\"search\" style=\"margin:
|
|
1163
|
-
}], propDecorators: { itemType: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemType", required: false }] }], sortFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortFields", required: false }] }], searchChanged: [{ type: i0.Output, args: ["searchChanged"] }] } });
|
|
1204
|
+
TitleCasePipe], template: "<div class=\"container\">\n <div class=\"search-row\">\n <mat-form-field class=\"search\" style=\"margin: 5px;width:70%\">\n <mat-label>{{'Search for ' + itemType() | titlecase}}</mat-label>\n <input matInput [formControl]=\"searchFilter\" placeholder=\"Search {{ itemType() | titlecase }}\" />\n\n @if(searchFilter.value){\n <button matSuffix mat-icon-button aria-label=\"Cancel\" (click)=\"clearSearch()\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n @else(){\n <button matSuffix mat-icon-button aria-label=\"Search\">\n <mat-icon>search</mat-icon>\n </button>\n }\n </mat-form-field>\n\n @if(filters(); as filters)\n {\n @if(showFilters())\n {\n <button mat-button=\"tonal\" (click)=\"toggleFilterVisibility()\"><mat-icon>close</mat-icon>Hide Filters</button>\n }\n @else {\n <button mat-button=\"tonal\" (click)=\"toggleFilterVisibility()\"><mat-icon>tune</mat-icon>Filters</button>\n }\n }\n\n @if(sortFields().length > 0){\n <mat-form-field style=\"margin: 10px\">\n <mat-label>Sort By</mat-label>\n <mat-select>\n @for(field of sortFields(); track field)\n {\n <mat-option>{{field}}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <button mat-icon-button aria-label=\"Sort Order\" matTooltip=\"Toggle sort order\">\n <mat-icon>sort</mat-icon>\n </button>\n }\n </div>\n\n <div class=\"filter-container\" style=\"width:100%\">\n @if(filters(); as filters)\n {\n @if(showFilters())\n {\n <div style=\"display: flex; flex-direction: row;\">\n @for(row of filters.rows; track row)\n {\n @for(filter of row.filters; track filter)\n {\n @if(filter.type === \"boolean\")\n {\n <mat-slide-toggle [formControlName]=\"filter.key\">{{filter.display_name}}</mat-slide-toggle>\n }\n }\n }\n </div>\n }\n }\n </div>\n</div>", styles: [":host{flex-grow:1}.container{width:100%;display:flex;flex-wrap:wrap;flex-direction:column;align-items:center;justify-content:center}.search-row{width:100%;display:flex;flex-wrap:wrap;flex-direction:row;align-items:center;justify-content:center}\n"] }]
|
|
1205
|
+
}], propDecorators: { itemType: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemType", required: false }] }], sortFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortFields", required: false }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], searchChanged: [{ type: i0.Output, args: ["searchChanged"] }] } });
|
|
1164
1206
|
|
|
1165
1207
|
class FileUploadComponent {
|
|
1166
1208
|
control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
|
|
@@ -1196,23 +1238,25 @@ class FileUploadComponent {
|
|
|
1196
1238
|
this.control().setValue(record);
|
|
1197
1239
|
}
|
|
1198
1240
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1199
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: FileUploadComponent, isStandalone: true, selector: "lib-file-upload", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"container\">\n @if (control().value.local || control().value.file)\n {\n <div class=\"
|
|
1241
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: FileUploadComponent, isStandalone: true, selector: "lib-file-upload", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"container\">\n @if (control().value.local || control().value.file)\n {\n <div class=\"image-holder\">\n <p>Change {{control().value.display_name | titlecase}}</p>\n <div class=\"control-container\">\n @if(control().value.local){\n <img alt=\"{{control().value.display_name}}\" src=\"{{control().value.local}}\" style=\"height:120px;\">\n }\n @else {\n <div>{{control().value.file?.name}}</div>\n }\n\n <button mat-mini-fab (click)=\"onClearLocal()\" matTooltip=\"Clear\" type=\"button\" style=\"margin:10px\">\n <mat-icon>clear</mat-icon>\n </button>\n </div>\n\n </div>\n }\n @else\n {\n @if (control().value.remote){\n <div class=\"image-holder\">\n <p>{{control().value.display_name | titlecase}}</p>\n <div style=\"display:flex; flex-direction: row; align-items: end;\">\n <img alt=\"{{control().value.display_name}}\" src=\"{{control().value.remote}}\" style=\"height:120px;\">\n <button mat-mini-fab (click)=\"fileInput.click()\" matTooltip=\"Edit\" type=\"button\" style=\"margin:3px\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n </div>\n }\n @else {\n <div style=\"display: flex; flex-direction: column;\">\n <span>Upload a {{control().value.display_name}}</span>\n <button mat-mini-fab (click)=\"fileInput.click()\" matTooltip=\"Upload\" type=\"button\" style=\"margin:10px\">\n <mat-icon>upload</mat-icon>\n </button>\n </div>\n }\n <input hidden type=\"file\" #fileInput (change)=\"onFileUpload($event)\" />\n }\n</div>", styles: [".container{display:flex;justify-content:center;text-align:center;flex-direction:column;max-width:300px}.control-container{display:flex;flex-direction:row;justify-content:center;align-content:center}p{margin-top:0;margin-bottom:5px}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }] });
|
|
1200
1242
|
}
|
|
1201
1243
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
1202
1244
|
type: Component,
|
|
1203
|
-
args: [{ selector: 'lib-file-upload', imports: [MatIconModule, MatButtonModule, MatTooltipModule, TitleCasePipe], template: "<div class=\"container\">\n @if (control().value.local || control().value.file)\n {\n <div class=\"
|
|
1245
|
+
args: [{ selector: 'lib-file-upload', imports: [MatIconModule, MatButtonModule, MatTooltipModule, TitleCasePipe], template: "<div class=\"container\">\n @if (control().value.local || control().value.file)\n {\n <div class=\"image-holder\">\n <p>Change {{control().value.display_name | titlecase}}</p>\n <div class=\"control-container\">\n @if(control().value.local){\n <img alt=\"{{control().value.display_name}}\" src=\"{{control().value.local}}\" style=\"height:120px;\">\n }\n @else {\n <div>{{control().value.file?.name}}</div>\n }\n\n <button mat-mini-fab (click)=\"onClearLocal()\" matTooltip=\"Clear\" type=\"button\" style=\"margin:10px\">\n <mat-icon>clear</mat-icon>\n </button>\n </div>\n\n </div>\n }\n @else\n {\n @if (control().value.remote){\n <div class=\"image-holder\">\n <p>{{control().value.display_name | titlecase}}</p>\n <div style=\"display:flex; flex-direction: row; align-items: end;\">\n <img alt=\"{{control().value.display_name}}\" src=\"{{control().value.remote}}\" style=\"height:120px;\">\n <button mat-mini-fab (click)=\"fileInput.click()\" matTooltip=\"Edit\" type=\"button\" style=\"margin:3px\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n </div>\n }\n @else {\n <div style=\"display: flex; flex-direction: column;\">\n <span>Upload a {{control().value.display_name}}</span>\n <button mat-mini-fab (click)=\"fileInput.click()\" matTooltip=\"Upload\" type=\"button\" style=\"margin:10px\">\n <mat-icon>upload</mat-icon>\n </button>\n </div>\n }\n <input hidden type=\"file\" #fileInput (change)=\"onFileUpload($event)\" />\n }\n</div>", styles: [".container{display:flex;justify-content:center;text-align:center;flex-direction:column;max-width:300px}.control-container{display:flex;flex-direction:row;justify-content:center;align-content:center}p{margin-top:0;margin-bottom:5px}\n"] }]
|
|
1204
1246
|
}], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }] } });
|
|
1205
1247
|
|
|
1206
1248
|
class FormFieldDetailComponent {
|
|
1207
1249
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
1208
1250
|
form = input.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1251
|
+
/*
|
|
1252
|
+
get isValid(): boolean {
|
|
1253
|
+
const control = this.form().get(this.key);
|
|
1254
|
+
if (control) {
|
|
1255
|
+
return control.valid;
|
|
1256
|
+
}
|
|
1257
|
+
return false;
|
|
1258
|
+
}
|
|
1259
|
+
*/
|
|
1216
1260
|
get key() {
|
|
1217
1261
|
return this.field().id.toString();
|
|
1218
1262
|
}
|
|
@@ -1220,7 +1264,7 @@ class FormFieldDetailComponent {
|
|
|
1220
1264
|
return this.form().get(this.key);
|
|
1221
1265
|
}
|
|
1222
1266
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormFieldDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1223
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: FormFieldDetailComponent, isStandalone: true, selector: "lib-form-field-detail", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div [formGroup]=\"form()\">\n <h3>{{ field().label }}</h3>\n <p>{{field().description}}</p>\n <div>\n @switch (field().field_type) {\n @case ('TEXT') {\n <mat-form-field class=\"form-field-wide\">\n <mat-label [attr.for]=\"key\">{{ field().label }}</mat-label>\n <textarea matInput\n [placeholder]=\"field().default\"\n type=\"text\"\n style=\"min-height:150px\"\n [formControlName]=\"key\"\n [name]=\"key\"></textarea>\n </mat-form-field>\n }\n @case('BOOLEAN')\n {\n <mat-checkbox\n class=\"form-field\"\n [name]=\"key\"\n [formControlName]=\"key\">\n {{ field().label }}\n </mat-checkbox>\n }\n @case ('INTEGER') {\n <mat-form-field class=\"form-field\">\n <mat-label>{{ field().label }}</mat-label>\n <input matInput\n [placeholder]=\"field().default\"\n type=\"number\"\n max=\"10\" min=\"1\"\n [formControlName]=\"key\"\n name=\"
|
|
1267
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: FormFieldDetailComponent, isStandalone: true, selector: "lib-form-field-detail", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div [formGroup]=\"form()\">\n <h3>{{ field().label }}</h3>\n <p>{{field().description}}</p>\n <div>\n @switch (field().field_type) {\n @case ('TEXT') {\n <mat-form-field class=\"form-field-wide\">\n <mat-label [attr.for]=\"key\">{{ field().label }}</mat-label>\n <textarea matInput\n [placeholder]=\"field().default\"\n type=\"text\"\n style=\"min-height:150px\"\n [formControlName]=\"key\"\n [name]=\"key\"></textarea>\n </mat-form-field>\n }\n @case('BOOLEAN')\n {\n <mat-checkbox\n class=\"form-field\"\n [name]=\"key\"\n [formControlName]=\"key\">\n {{ field().label }}\n </mat-checkbox>\n }\n @case ('INTEGER') {\n <mat-form-field class=\"form-field\">\n <mat-label>{{ field().label }}</mat-label>\n <input matInput\n [placeholder]=\"field().default\"\n type=\"number\"\n max=\"10\" min=\"1\"\n [formControlName]=\"key\"\n name=\"key\">\n </mat-form-field>\n }\n @case ('CHAR') {\n <mat-form-field class=\"form-field\">\n <mat-label>{{ field().label }}</mat-label>\n <input matInput\n [placeholder]=\"field().default\"\n type=\"text\"\n [formControlName]=\"key\"\n name=\"key\">\n </mat-form-field>\n }\n @case ('SELECTION')\n {\n <mat-form-field class=\"form-field\">\n <mat-label>{{ field().label }}</mat-label>\n <mat-select formControlName=\"key\" name=\"key\">\n @for(option of field().options; track option)\n {\n <mat-option [value]=\"option.value\">{{option.key}}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n @case('FILE') {\n <div class=\"form-field\">\n @if(field().template)\n {\n <a href=\"{{field().template}}\" matFab extended aria-label=\"Download template\">\n <mat-icon>download</mat-icon>\n Download Form\n </a>\n }\n <h4>Upload Completed Form</h4>\n <lib-file-upload [control]=\"control\"></lib-file-upload>\n </div>\n } \n }\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.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$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1$2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { 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: MatButtonModule }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6$2.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: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FileUploadComponent, selector: "lib-file-upload", inputs: ["control"] }] });
|
|
1224
1268
|
}
|
|
1225
1269
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormFieldDetailComponent, decorators: [{
|
|
1226
1270
|
type: Component,
|
|
@@ -1228,19 +1272,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1228
1272
|
MatFormFieldModule,
|
|
1229
1273
|
MatInputModule,
|
|
1230
1274
|
MatButtonModule,
|
|
1231
|
-
|
|
1275
|
+
MatSelectModule,
|
|
1276
|
+
MatTooltipModule,
|
|
1277
|
+
MatCheckboxModule, MatIconModule, FileUploadComponent], template: "<div [formGroup]=\"form()\">\n <h3>{{ field().label }}</h3>\n <p>{{field().description}}</p>\n <div>\n @switch (field().field_type) {\n @case ('TEXT') {\n <mat-form-field class=\"form-field-wide\">\n <mat-label [attr.for]=\"key\">{{ field().label }}</mat-label>\n <textarea matInput\n [placeholder]=\"field().default\"\n type=\"text\"\n style=\"min-height:150px\"\n [formControlName]=\"key\"\n [name]=\"key\"></textarea>\n </mat-form-field>\n }\n @case('BOOLEAN')\n {\n <mat-checkbox\n class=\"form-field\"\n [name]=\"key\"\n [formControlName]=\"key\">\n {{ field().label }}\n </mat-checkbox>\n }\n @case ('INTEGER') {\n <mat-form-field class=\"form-field\">\n <mat-label>{{ field().label }}</mat-label>\n <input matInput\n [placeholder]=\"field().default\"\n type=\"number\"\n max=\"10\" min=\"1\"\n [formControlName]=\"key\"\n name=\"key\">\n </mat-form-field>\n }\n @case ('CHAR') {\n <mat-form-field class=\"form-field\">\n <mat-label>{{ field().label }}</mat-label>\n <input matInput\n [placeholder]=\"field().default\"\n type=\"text\"\n [formControlName]=\"key\"\n name=\"key\">\n </mat-form-field>\n }\n @case ('SELECTION')\n {\n <mat-form-field class=\"form-field\">\n <mat-label>{{ field().label }}</mat-label>\n <mat-select formControlName=\"key\" name=\"key\">\n @for(option of field().options; track option)\n {\n <mat-option [value]=\"option.value\">{{option.key}}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n @case('FILE') {\n <div class=\"form-field\">\n @if(field().template)\n {\n <a href=\"{{field().template}}\" matFab extended aria-label=\"Download template\">\n <mat-icon>download</mat-icon>\n Download Form\n </a>\n }\n <h4>Upload Completed Form</h4>\n <lib-file-upload [control]=\"control\"></lib-file-upload>\n </div>\n } \n }\n </div>\n</div>\n" }]
|
|
1232
1278
|
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }] } });
|
|
1233
1279
|
|
|
1234
1280
|
class FormFieldEditComponent {
|
|
1235
1281
|
availableTypes = FORM_FIELD_CHOICES;
|
|
1236
1282
|
FieldType = FieldType;
|
|
1283
|
+
deleteDialog = inject(MatDialog);
|
|
1284
|
+
table = viewChild(MatTable, ...(ngDevMode ? [{ debugName: "table" }] : []));
|
|
1285
|
+
keyControl = new FormControl("");
|
|
1286
|
+
valueControl = new FormControl("");
|
|
1237
1287
|
form = input.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1288
|
+
canOrderUp = input(false, ...(ngDevMode ? [{ debugName: "canOrderUp" }] : []));
|
|
1289
|
+
canOrderDown = input(false, ...(ngDevMode ? [{ debugName: "canOrderDown" }] : []));
|
|
1290
|
+
orderUp = output();
|
|
1291
|
+
orderDown = output();
|
|
1292
|
+
deleted = output();
|
|
1241
1293
|
get templateControl() {
|
|
1242
1294
|
return this.form().get('template');
|
|
1243
1295
|
}
|
|
1296
|
+
get optionsControl() {
|
|
1297
|
+
return this.form().get('options');
|
|
1298
|
+
}
|
|
1244
1299
|
get fieldType() {
|
|
1245
1300
|
const field_type = this.form().value.field_type;
|
|
1246
1301
|
if (field_type) {
|
|
@@ -1248,14 +1303,53 @@ class FormFieldEditComponent {
|
|
|
1248
1303
|
}
|
|
1249
1304
|
return FieldType.Undefined;
|
|
1250
1305
|
}
|
|
1251
|
-
|
|
1252
|
-
this.
|
|
1306
|
+
onOrderUp() {
|
|
1307
|
+
this.orderUp.emit();
|
|
1253
1308
|
}
|
|
1254
|
-
|
|
1255
|
-
this.
|
|
1309
|
+
onOrderDown() {
|
|
1310
|
+
this.orderDown.emit();
|
|
1311
|
+
}
|
|
1312
|
+
onDelete() {
|
|
1313
|
+
this.deleted.emit();
|
|
1314
|
+
}
|
|
1315
|
+
onDeleteClicked() {
|
|
1316
|
+
const dialogRef = this.deleteDialog.open(DeleteDialogComponent, {
|
|
1317
|
+
data: {
|
|
1318
|
+
title: "Delete this Field?",
|
|
1319
|
+
message: "Are you sure you want to delete this field?"
|
|
1320
|
+
},
|
|
1321
|
+
});
|
|
1322
|
+
dialogRef.afterClosed().subscribe(result => {
|
|
1323
|
+
if (result !== undefined) {
|
|
1324
|
+
this.onDelete();
|
|
1325
|
+
}
|
|
1326
|
+
});
|
|
1327
|
+
}
|
|
1328
|
+
addChoice() {
|
|
1329
|
+
let options = [];
|
|
1330
|
+
if (this.optionsControl.value) {
|
|
1331
|
+
options = this.optionsControl.value;
|
|
1332
|
+
}
|
|
1333
|
+
const value = this.valueControl.value;
|
|
1334
|
+
let key = this.keyControl.value;
|
|
1335
|
+
if (!key) {
|
|
1336
|
+
key = value;
|
|
1337
|
+
}
|
|
1338
|
+
options.push({ key: key, value: value });
|
|
1339
|
+
this.optionsControl.setValue(options);
|
|
1340
|
+
this.keyControl.reset("");
|
|
1341
|
+
this.valueControl.reset("");
|
|
1342
|
+
this.table()?.renderRows();
|
|
1343
|
+
}
|
|
1344
|
+
removeOption(value) {
|
|
1345
|
+
let options = [];
|
|
1346
|
+
if (this.optionsControl.value) {
|
|
1347
|
+
options = this.optionsControl.value;
|
|
1348
|
+
}
|
|
1349
|
+
this.optionsControl.setValue(options.filter(e => e.value !== value));
|
|
1256
1350
|
}
|
|
1257
1351
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormFieldEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1258
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: FormFieldEditComponent, isStandalone: true, selector: "lib-form-field-edit", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, editMode: { classPropertyName: "editMode", publicName: "editMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitted: "submitted", cancelled: "cancelled" }, ngImport: i0, template: "<form class=\"form-card\" id=\"app-field-form\" [formGroup]=\"form()\" (ngSubmit)=\"submit()\">\n <mat-form-field class=\"form-field\">\n <mat-label>Label</mat-label>\n <input matInput placeholder=\"Label\" type=\"text\" formControlName=\"label\" required name=\"label\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label>Key</mat-label>\n <input matInput placeholder=\"Key\" type=\"text\" formControlName=\"key\" required name=\"key\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field-wide\">\n <mat-label>Description</mat-label>\n <textarea matInput placeholder=\"Description\" style=\"min-height:150px\" type=\"text\" formControlName=\"description\"\n required name=\"description\"></textarea>\n </mat-form-field>\n\n <mat-checkbox class=\"example-margin\" formControlName=\"required\">Required?</mat-checkbox>\n\n <mat-form-field class=\"form-field\">\n <mat-label>Type</mat-label>\n <mat-select formControlName=\"field_type\" name=\"field_type\" required>\n @for(type of availableTypes; track type.value){\n <mat-option [value]=\"type.value\">{{type.display_name}}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n @switch (fieldType) {\n @case(FieldType.Boolean)\n {\n <mat-form-field class=\"form-field\">\n <mat-label>Default</mat-label>\n <mat-select formControlName=\"default\" name=\"default\" required>\n <mat-option [value]=\"'true'\">True</mat-option>\n <mat-option [value]=\"'false'\">False</mat-option>\n </mat-select>\n </mat-form-field>\n }\n @case(FieldType.Char)\n {\n <mat-form-field class=\"form-field\">\n <mat-label>Default</mat-label>\n <input matInput placeholder=\"Default\" type=\"text\" formControlName=\"default\" name=\"default\">\n </mat-form-field>\n }\n @case(FieldType.Text || FieldType.RichText)\n {\n <mat-form-field class=\"form-field-wide\">\n <mat-label>Default</mat-label>\n <textarea matInput placeholder=\"Default\" style=\"min-height:150px\" type=\"text\" formControlName=\"default\"\n name=\"default\"></textarea>\n </mat-form-field>\n }\n @case(FieldType.File)\n {\n <lib-file-upload [control]=\"templateControl\"></lib-file-upload>\n }\n}\n <div>\n @if(!editMode()) {\n <button mat-fab class=\"form-action-button\" type=\"submit\" matTooltip=\"Add Field\"\n [disabled]=\"!form().valid\">\n <mat-icon>add</mat-icon>\n </button>\n <button mat-fab class=\"form-action-button\" (click)=\"cancel()\" type=\"button\" matTooltip=\"Cancel\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n </div>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "ngmodule", type: MatTableModule }, { 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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5.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: "component", type: FileUploadComponent, selector: "lib-file-upload", inputs: ["control"] }] });
|
|
1352
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: FormFieldEditComponent, isStandalone: true, selector: "lib-form-field-edit", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, canOrderUp: { classPropertyName: "canOrderUp", publicName: "canOrderUp", isSignal: true, isRequired: false, transformFunction: null }, canOrderDown: { classPropertyName: "canOrderDown", publicName: "canOrderDown", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { orderUp: "orderUp", orderDown: "orderDown", deleted: "deleted" }, viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }], ngImport: i0, template: "<h3>Editing Field</h3>\n\n<div class=\"button-container\">\n @if(canOrderUp())\n {\n <button type=\"button\" class=\"form-action-button\" mat-mini-fab matTooltip=\"Move the field up\" (click)=\"onOrderUp()\"><mat-icon>arrow_upward</mat-icon></button>\n }\n @if(canOrderDown())\n {\n <button type=\"button\" class=\"form-action-button\" mat-mini-fab matTooltip=\"Move the field down\" (click)=\"onOrderDown()\"><mat-icon>arrow_downward</mat-icon></button>\n }\n <button type=\"button\" class=\"form-action-button\" mat-mini-fab matTooltip=\"Delete the Field\" (click)=\"onDeleteClicked()\"><mat-icon>delete</mat-icon></button>\n</div>\n\n<form class=\"form-card\" style=\"width:100%\" [formGroup]=\"form()\">\n <mat-form-field class=\"form-field\" style=\"width:100%; max-width: 600px;\">\n <mat-label>Label</mat-label>\n <input matInput placeholder=\"Label\" type=\"text\" formControlName=\"label\" required name=\"label\">\n <mat-icon matSuffix matTooltip=\"This will be rendered as the field's heading in the form\">info</mat-icon>\n </mat-form-field>\n\n <mat-form-field class=\"form-field\" style=\"width:100%; max-width: 600px;\">\n <mat-label>Key</mat-label>\n <input matInput placeholder=\"Key\" type=\"text\" formControlName=\"key\" required name=\"key\">\n <mat-icon matSuffix matTooltip=\"This will be used to uniquely identify the field in machine-readable versions of the form. Use alphabetical characters only with underscores.\">\n info\n </mat-icon>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-wide\" style=\"max-width: 600px;\">\n <mat-label>Description</mat-label>\n <textarea matInput placeholder=\"Description\" style=\"min-height:150px\" type=\"text\" formControlName=\"description\"\n required name=\"description\"></textarea>\n <mat-icon matSuffix matTooltip=\"This will be rendered as the field's instructions for the person filling in the form.\">\n info\n </mat-icon>\n </mat-form-field>\n\n <div style=\"display: flex; flex-direction: row; align-items: center;\">\n <mat-checkbox style=\"margin-bottom: 5px;\" formControlName=\"required\">Required?</mat-checkbox>\n <mat-icon matSuffix matTooltip=\"Tick this if the user is required to enter a value for the field.\">\n info\n </mat-icon>\n </div>\n\n <mat-form-field class=\"form-field\">\n <mat-label>Type</mat-label>\n <mat-select formControlName=\"field_type\" name=\"field_type\" required>\n @for(type of availableTypes; track type.value){\n <mat-option [value]=\"type.value\">{{type.display_name}}\n </mat-option>\n }\n </mat-select>\n <mat-icon matSuffix matTooltip=\"Select the Type of the field.\">\n info\n </mat-icon> \n </mat-form-field>\n\n @switch (fieldType) {\n @case(FieldType.Boolean)\n {\n <mat-form-field class=\"form-field\">\n <mat-label>Default</mat-label>\n <mat-select formControlName=\"default\" name=\"default\" required>\n <mat-option [value]=\"'true'\">True</mat-option>\n <mat-option [value]=\"'false'\">False</mat-option>\n </mat-select>\n </mat-form-field>\n }\n @case(FieldType.Char)\n {\n <mat-form-field class=\"form-field\" style=\"width:100%; max-width: 600px;\">\n <mat-label>Default</mat-label>\n <input matInput placeholder=\"Default\" type=\"text\" formControlName=\"default\" name=\"default\">\n <mat-icon matSuffix matTooltip=\"An optional default value for the field.\">\n info\n </mat-icon> \n </mat-form-field>\n }\n @case(FieldType.Text || FieldType.RichText)\n {\n <mat-form-field class=\"form-field-wide\" style=\"max-width: 600px;\">\n <mat-label>Default</mat-label>\n <textarea matInput placeholder=\"Default\" style=\"min-height:150px\" type=\"text\" formControlName=\"default\"\n name=\"default\"></textarea>\n <mat-icon matSuffix matTooltip=\"An optional default value for the field.\">\n info\n </mat-icon> \n </mat-form-field>\n }\n @case(FieldType.File)\n {\n <lib-file-upload [control]=\"templateControl\"></lib-file-upload>\n }\n @case ((FieldType.Selection)) {\n <mat-form-field class=\"form-field\">\n <mat-label>Default</mat-label>\n <input matInput placeholder=\"Default\" type=\"text\" formControlName=\"default\" name=\"default\">\n <mat-icon matSuffix matTooltip=\"An optional default value for the field.\">\n info\n </mat-icon> \n </mat-form-field>\n\n <h4>Add Choice</h4>\n <div style=\"display: flex; flex-direction: row; justify-content: center; align-items: center; width:100%\">\n <mat-form-field class=\"form-field\">\n <mat-label>Choice</mat-label>\n <input matInput placeholder=\"Choice\" type=\"text\" [formControl]=\"valueControl\" name=\"option_value\">\n <mat-icon matSuffix matTooltip=\"A choice to be selected from.\">\n info\n </mat-icon> \n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label>Display Name</mat-label>\n <input matInput placeholder=\"Display Name\" type=\"text\" [formControl]=\"keyControl\" name=\"option_key\">\n <mat-icon matSuffix matTooltip=\"An optional display name for the choice.\">\n info\n </mat-icon> \n </mat-form-field>\n\n <button [hidden]=\"!valueControl.value\" mat-mini-fab matTooltip=\"Add choice\" (click)=\"addChoice()\"><mat-icon>add</mat-icon></button>\n\n </div>\n\n @if(optionsControl.value && optionsControl.value.length > 0){\n <h4>Choices</h4>\n <table mat-table [dataSource]=\"optionsControl.value\" class=\"mat-elevation-z8\">\n \n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n Display Name\n </th>\n <td mat-cell *matCellDef=\"let element\">{{ element.key }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"value\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n Value\n </th>\n <td mat-cell *matCellDef=\"let element\">{{ element.value }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"remove\">\n <th mat-header-cell *matHeaderCellDef>Remove\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <button mat-icon-button\n color=\"primary\"\n type=\"button\" \n matTooltip=\"Remove option\"\n aria-label=\"Remove this option\"\n (click)=\"removeOption(element.value)\">\n <mat-icon>remove\n </mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"['name', 'value', 'remove']\">\n </tr>\n <tr mat-row *matRowDef=\"let row; columns: ['name', 'value', 'remove'];\">\n </tr>\n </table>\n }\n }\n }\n</form>", styles: [":host{flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { 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: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6$2.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: "component", type: FileUploadComponent, selector: "lib-file-upload", inputs: ["control"] }] });
|
|
1259
1353
|
}
|
|
1260
1354
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormFieldEditComponent, decorators: [{
|
|
1261
1355
|
type: Component,
|
|
@@ -1270,8 +1364,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1270
1364
|
MatSelectModule,
|
|
1271
1365
|
MatTooltipModule,
|
|
1272
1366
|
MatCheckboxModule,
|
|
1273
|
-
FileUploadComponent], template: "<
|
|
1274
|
-
}], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }],
|
|
1367
|
+
FileUploadComponent], template: "<h3>Editing Field</h3>\n\n<div class=\"button-container\">\n @if(canOrderUp())\n {\n <button type=\"button\" class=\"form-action-button\" mat-mini-fab matTooltip=\"Move the field up\" (click)=\"onOrderUp()\"><mat-icon>arrow_upward</mat-icon></button>\n }\n @if(canOrderDown())\n {\n <button type=\"button\" class=\"form-action-button\" mat-mini-fab matTooltip=\"Move the field down\" (click)=\"onOrderDown()\"><mat-icon>arrow_downward</mat-icon></button>\n }\n <button type=\"button\" class=\"form-action-button\" mat-mini-fab matTooltip=\"Delete the Field\" (click)=\"onDeleteClicked()\"><mat-icon>delete</mat-icon></button>\n</div>\n\n<form class=\"form-card\" style=\"width:100%\" [formGroup]=\"form()\">\n <mat-form-field class=\"form-field\" style=\"width:100%; max-width: 600px;\">\n <mat-label>Label</mat-label>\n <input matInput placeholder=\"Label\" type=\"text\" formControlName=\"label\" required name=\"label\">\n <mat-icon matSuffix matTooltip=\"This will be rendered as the field's heading in the form\">info</mat-icon>\n </mat-form-field>\n\n <mat-form-field class=\"form-field\" style=\"width:100%; max-width: 600px;\">\n <mat-label>Key</mat-label>\n <input matInput placeholder=\"Key\" type=\"text\" formControlName=\"key\" required name=\"key\">\n <mat-icon matSuffix matTooltip=\"This will be used to uniquely identify the field in machine-readable versions of the form. Use alphabetical characters only with underscores.\">\n info\n </mat-icon>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-wide\" style=\"max-width: 600px;\">\n <mat-label>Description</mat-label>\n <textarea matInput placeholder=\"Description\" style=\"min-height:150px\" type=\"text\" formControlName=\"description\"\n required name=\"description\"></textarea>\n <mat-icon matSuffix matTooltip=\"This will be rendered as the field's instructions for the person filling in the form.\">\n info\n </mat-icon>\n </mat-form-field>\n\n <div style=\"display: flex; flex-direction: row; align-items: center;\">\n <mat-checkbox style=\"margin-bottom: 5px;\" formControlName=\"required\">Required?</mat-checkbox>\n <mat-icon matSuffix matTooltip=\"Tick this if the user is required to enter a value for the field.\">\n info\n </mat-icon>\n </div>\n\n <mat-form-field class=\"form-field\">\n <mat-label>Type</mat-label>\n <mat-select formControlName=\"field_type\" name=\"field_type\" required>\n @for(type of availableTypes; track type.value){\n <mat-option [value]=\"type.value\">{{type.display_name}}\n </mat-option>\n }\n </mat-select>\n <mat-icon matSuffix matTooltip=\"Select the Type of the field.\">\n info\n </mat-icon> \n </mat-form-field>\n\n @switch (fieldType) {\n @case(FieldType.Boolean)\n {\n <mat-form-field class=\"form-field\">\n <mat-label>Default</mat-label>\n <mat-select formControlName=\"default\" name=\"default\" required>\n <mat-option [value]=\"'true'\">True</mat-option>\n <mat-option [value]=\"'false'\">False</mat-option>\n </mat-select>\n </mat-form-field>\n }\n @case(FieldType.Char)\n {\n <mat-form-field class=\"form-field\" style=\"width:100%; max-width: 600px;\">\n <mat-label>Default</mat-label>\n <input matInput placeholder=\"Default\" type=\"text\" formControlName=\"default\" name=\"default\">\n <mat-icon matSuffix matTooltip=\"An optional default value for the field.\">\n info\n </mat-icon> \n </mat-form-field>\n }\n @case(FieldType.Text || FieldType.RichText)\n {\n <mat-form-field class=\"form-field-wide\" style=\"max-width: 600px;\">\n <mat-label>Default</mat-label>\n <textarea matInput placeholder=\"Default\" style=\"min-height:150px\" type=\"text\" formControlName=\"default\"\n name=\"default\"></textarea>\n <mat-icon matSuffix matTooltip=\"An optional default value for the field.\">\n info\n </mat-icon> \n </mat-form-field>\n }\n @case(FieldType.File)\n {\n <lib-file-upload [control]=\"templateControl\"></lib-file-upload>\n }\n @case ((FieldType.Selection)) {\n <mat-form-field class=\"form-field\">\n <mat-label>Default</mat-label>\n <input matInput placeholder=\"Default\" type=\"text\" formControlName=\"default\" name=\"default\">\n <mat-icon matSuffix matTooltip=\"An optional default value for the field.\">\n info\n </mat-icon> \n </mat-form-field>\n\n <h4>Add Choice</h4>\n <div style=\"display: flex; flex-direction: row; justify-content: center; align-items: center; width:100%\">\n <mat-form-field class=\"form-field\">\n <mat-label>Choice</mat-label>\n <input matInput placeholder=\"Choice\" type=\"text\" [formControl]=\"valueControl\" name=\"option_value\">\n <mat-icon matSuffix matTooltip=\"A choice to be selected from.\">\n info\n </mat-icon> \n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label>Display Name</mat-label>\n <input matInput placeholder=\"Display Name\" type=\"text\" [formControl]=\"keyControl\" name=\"option_key\">\n <mat-icon matSuffix matTooltip=\"An optional display name for the choice.\">\n info\n </mat-icon> \n </mat-form-field>\n\n <button [hidden]=\"!valueControl.value\" mat-mini-fab matTooltip=\"Add choice\" (click)=\"addChoice()\"><mat-icon>add</mat-icon></button>\n\n </div>\n\n @if(optionsControl.value && optionsControl.value.length > 0){\n <h4>Choices</h4>\n <table mat-table [dataSource]=\"optionsControl.value\" class=\"mat-elevation-z8\">\n \n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n Display Name\n </th>\n <td mat-cell *matCellDef=\"let element\">{{ element.key }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"value\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n Value\n </th>\n <td mat-cell *matCellDef=\"let element\">{{ element.value }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"remove\">\n <th mat-header-cell *matHeaderCellDef>Remove\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <button mat-icon-button\n color=\"primary\"\n type=\"button\" \n matTooltip=\"Remove option\"\n aria-label=\"Remove this option\"\n (click)=\"removeOption(element.value)\">\n <mat-icon>remove\n </mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"['name', 'value', 'remove']\">\n </tr>\n <tr mat-row *matRowDef=\"let row; columns: ['name', 'value', 'remove'];\">\n </tr>\n </table>\n }\n }\n }\n</form>", styles: [":host{flex-grow:1}\n"] }]
|
|
1368
|
+
}], propDecorators: { table: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatTable), { isSignal: true }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }], canOrderUp: [{ type: i0.Input, args: [{ isSignal: true, alias: "canOrderUp", required: false }] }], canOrderDown: [{ type: i0.Input, args: [{ isSignal: true, alias: "canOrderDown", required: false }] }], orderUp: [{ type: i0.Output, args: ["orderUp"] }], orderDown: [{ type: i0.Output, args: ["orderDown"] }], deleted: [{ type: i0.Output, args: ["deleted"] }] } });
|
|
1275
1369
|
|
|
1276
1370
|
class FormFieldForm {
|
|
1277
1371
|
static getBaseTemplate() {
|
|
@@ -1311,7 +1405,7 @@ class FormFieldForm {
|
|
|
1311
1405
|
required: item.required,
|
|
1312
1406
|
description: item.description,
|
|
1313
1407
|
template: template,
|
|
1314
|
-
options:
|
|
1408
|
+
options: item.options,
|
|
1315
1409
|
default: item.default,
|
|
1316
1410
|
field_type: item.field_type,
|
|
1317
1411
|
order: item.order,
|
|
@@ -1325,7 +1419,7 @@ class FormFieldForm {
|
|
|
1325
1419
|
key: value.key || "",
|
|
1326
1420
|
required: value.required || false,
|
|
1327
1421
|
description: value.description || "",
|
|
1328
|
-
options: null,
|
|
1422
|
+
options: value.options || null,
|
|
1329
1423
|
default: value.default || "",
|
|
1330
1424
|
field_type: value.field_type || "BOOLEAN",
|
|
1331
1425
|
order: value.order || 0
|
|
@@ -1337,7 +1431,7 @@ class FormFieldForm {
|
|
|
1337
1431
|
item.key = value.key || "";
|
|
1338
1432
|
item.required = value.required || false;
|
|
1339
1433
|
item.description = value.description || "";
|
|
1340
|
-
item.options = null;
|
|
1434
|
+
item.options = value.options || null;
|
|
1341
1435
|
item.default = value.default || "";
|
|
1342
1436
|
item.field_type = value.field_type || "BOOLEAN";
|
|
1343
1437
|
item.order = value.order || 0;
|
|
@@ -1452,6 +1546,9 @@ class DynamicFormForm {
|
|
|
1452
1546
|
get groups() {
|
|
1453
1547
|
return this.form.get('groups');
|
|
1454
1548
|
}
|
|
1549
|
+
groupSize(id) {
|
|
1550
|
+
return FormGroupForm.getFields(this.groups.at(id)).length;
|
|
1551
|
+
}
|
|
1455
1552
|
getFileFields(form) {
|
|
1456
1553
|
const ids = getFileFieldIds(form);
|
|
1457
1554
|
const records = [];
|
|
@@ -1615,86 +1712,131 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1615
1712
|
|
|
1616
1713
|
class FormGroupEditComponent {
|
|
1617
1714
|
form = input.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1715
|
+
deleteDialog = inject(MatDialog);
|
|
1716
|
+
canOrderUp = input(false, ...(ngDevMode ? [{ debugName: "canOrderUp" }] : []));
|
|
1717
|
+
canOrderDown = input(false, ...(ngDevMode ? [{ debugName: "canOrderDown" }] : []));
|
|
1621
1718
|
deleted = output();
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
onFieldDelete(id) {
|
|
1628
|
-
FormGroupForm.deleteField(this.form(), id);
|
|
1719
|
+
fieldAdded = output();
|
|
1720
|
+
orderUp = output();
|
|
1721
|
+
orderDown = output();
|
|
1722
|
+
onAddField() {
|
|
1723
|
+
this.fieldAdded.emit();
|
|
1629
1724
|
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1725
|
+
onOrderUp() {
|
|
1726
|
+
this.orderUp.emit();
|
|
1632
1727
|
}
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
}
|
|
1636
|
-
addField() {
|
|
1637
|
-
this.fieldForm = FormFieldForm.createForm(this.fb);
|
|
1638
|
-
}
|
|
1639
|
-
cancelField() {
|
|
1640
|
-
this.fieldForm = null;
|
|
1641
|
-
}
|
|
1642
|
-
submitField() {
|
|
1643
|
-
if (this.fieldForm) {
|
|
1644
|
-
FormGroupForm.createField(this.form(), this.fieldForm);
|
|
1645
|
-
}
|
|
1646
|
-
this.fieldForm = null;
|
|
1728
|
+
onOrderDown() {
|
|
1729
|
+
this.orderDown.emit();
|
|
1647
1730
|
}
|
|
1648
1731
|
onDelete() {
|
|
1649
1732
|
this.deleted.emit();
|
|
1650
1733
|
}
|
|
1651
|
-
|
|
1652
|
-
this.
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1734
|
+
onDeleteClicked() {
|
|
1735
|
+
const dialogRef = this.deleteDialog.open(DeleteDialogComponent, {
|
|
1736
|
+
data: {
|
|
1737
|
+
title: "Delete this Group?",
|
|
1738
|
+
message: "Are you sure you want to delete this group?"
|
|
1739
|
+
},
|
|
1740
|
+
});
|
|
1741
|
+
dialogRef.afterClosed().subscribe(result => {
|
|
1742
|
+
if (result !== undefined) {
|
|
1743
|
+
this.onDelete();
|
|
1744
|
+
}
|
|
1745
|
+
});
|
|
1656
1746
|
}
|
|
1657
1747
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormGroupEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1658
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: FormGroupEditComponent, isStandalone: true, selector: "lib-form-group-edit", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null },
|
|
1748
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: FormGroupEditComponent, isStandalone: true, selector: "lib-form-group-edit", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, canOrderUp: { classPropertyName: "canOrderUp", publicName: "canOrderUp", isSignal: true, isRequired: false, transformFunction: null }, canOrderDown: { classPropertyName: "canOrderDown", publicName: "canOrderDown", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { deleted: "deleted", fieldAdded: "fieldAdded", orderUp: "orderUp", orderDown: "orderDown" }, ngImport: i0, template: "<div class=\"container\">\n\n<div class=\"header\">\n<h3>Editing Group</h3>\n@if(canOrderUp())\n{\n <button type=\"button\" class=\"form-action-button\" mat-mini-fab matTooltip=\"Move the group up\" (click)=\"onOrderUp()\"><mat-icon>arrow_upward</mat-icon></button>\n}\n@if(canOrderDown())\n{\n <button type=\"button\" class=\"form-action-button\" mat-mini-fab matTooltip=\"Move the group down\" (click)=\"onOrderDown()\"><mat-icon>arrow_downward</mat-icon></button>\n}\n<button mat-mini-fab type=\"button\" \n style=\"margin:5px\" \n color=\"primary\" matTooltip=\"Delete the Group\" aria-label=\"Delete the group\"\n (click)=\"onDeleteClicked()\">\n <mat-icon>delete</mat-icon>\n</button>\n</div>\n\n<form class=\"form-card\" style=\"width:100%\" [formGroup]=\"form()\">\n <mat-form-field class=\"form-field\" style=\"width: 70%\">\n <mat-label for=\"label\">Label</mat-label>\n <input matInput placeholder=\"\" type=\"text\" formControlName=\"label\"\n name=\"label\"/>\n <mat-icon matSuffix matTooltip=\"An optional label that will appear as a heading for the group in the form.\">info</mat-icon>\n </mat-form-field> \n\n <mat-form-field class=\"form-field-wide\" style=\"width: 70%\">\n <mat-label for=\"description\">Description</mat-label>\n <textarea matInput placeholder=\"\" type=\"text\" style=\"min-height:120px;\" formControlName=\"description\"\n name=\"description\"></textarea>\n <mat-icon matSuffix matTooltip=\"An optional description of the group, that will appear as a paragraph in the form.\">info</mat-icon>\n </mat-form-field>\n</form>\n\n<button matButton=\"filled\" type=\"button\" style=\"margin:5px\" \n color=\"primary\" matTooltip=\"Add a new field\" aria-label=\"Add a new field\"\n (click)=\"onAddField()\">\n Add Field\n</button>\n\n</div>", styles: [":host{flex-grow:1}.control-button{margin-right:10px}.container,.header{display:flex;flex-direction:column;align-items:center;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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"] }] });
|
|
1659
1749
|
}
|
|
1660
1750
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormGroupEditComponent, decorators: [{
|
|
1661
1751
|
type: Component,
|
|
1662
|
-
args: [{ selector: 'lib-form-group-edit', imports: [
|
|
1752
|
+
args: [{ selector: 'lib-form-group-edit', imports: [
|
|
1663
1753
|
MatIconModule,
|
|
1664
1754
|
MatButtonModule,
|
|
1665
1755
|
MatTooltipModule,
|
|
1666
1756
|
ReactiveFormsModule,
|
|
1667
1757
|
MatFormFieldModule,
|
|
1668
|
-
MatInputModule
|
|
1669
|
-
|
|
1670
|
-
}], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }],
|
|
1758
|
+
MatInputModule
|
|
1759
|
+
], template: "<div class=\"container\">\n\n<div class=\"header\">\n<h3>Editing Group</h3>\n@if(canOrderUp())\n{\n <button type=\"button\" class=\"form-action-button\" mat-mini-fab matTooltip=\"Move the group up\" (click)=\"onOrderUp()\"><mat-icon>arrow_upward</mat-icon></button>\n}\n@if(canOrderDown())\n{\n <button type=\"button\" class=\"form-action-button\" mat-mini-fab matTooltip=\"Move the group down\" (click)=\"onOrderDown()\"><mat-icon>arrow_downward</mat-icon></button>\n}\n<button mat-mini-fab type=\"button\" \n style=\"margin:5px\" \n color=\"primary\" matTooltip=\"Delete the Group\" aria-label=\"Delete the group\"\n (click)=\"onDeleteClicked()\">\n <mat-icon>delete</mat-icon>\n</button>\n</div>\n\n<form class=\"form-card\" style=\"width:100%\" [formGroup]=\"form()\">\n <mat-form-field class=\"form-field\" style=\"width: 70%\">\n <mat-label for=\"label\">Label</mat-label>\n <input matInput placeholder=\"\" type=\"text\" formControlName=\"label\"\n name=\"label\"/>\n <mat-icon matSuffix matTooltip=\"An optional label that will appear as a heading for the group in the form.\">info</mat-icon>\n </mat-form-field> \n\n <mat-form-field class=\"form-field-wide\" style=\"width: 70%\">\n <mat-label for=\"description\">Description</mat-label>\n <textarea matInput placeholder=\"\" type=\"text\" style=\"min-height:120px;\" formControlName=\"description\"\n name=\"description\"></textarea>\n <mat-icon matSuffix matTooltip=\"An optional description of the group, that will appear as a paragraph in the form.\">info</mat-icon>\n </mat-form-field>\n</form>\n\n<button matButton=\"filled\" type=\"button\" style=\"margin:5px\" \n color=\"primary\" matTooltip=\"Add a new field\" aria-label=\"Add a new field\"\n (click)=\"onAddField()\">\n Add Field\n</button>\n\n</div>", styles: [":host{flex-grow:1}.control-button{margin-right:10px}.container,.header{display:flex;flex-direction:column;align-items:center;width:100%}\n"] }]
|
|
1760
|
+
}], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }], canOrderUp: [{ type: i0.Input, args: [{ isSignal: true, alias: "canOrderUp", required: false }] }], canOrderDown: [{ type: i0.Input, args: [{ isSignal: true, alias: "canOrderDown", required: false }] }], deleted: [{ type: i0.Output, args: ["deleted"] }], fieldAdded: [{ type: i0.Output, args: ["fieldAdded"] }], orderUp: [{ type: i0.Output, args: ["orderUp"] }], orderDown: [{ type: i0.Output, args: ["orderDown"] }] } });
|
|
1671
1761
|
|
|
1672
1762
|
class DynamicFormBuilderComponent {
|
|
1673
1763
|
form = input.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
1674
1764
|
handleSubmit = input(false, ...(ngDevMode ? [{ debugName: "handleSubmit" }] : []));
|
|
1675
1765
|
submitted = output();
|
|
1676
1766
|
dirty = signal(false, ...(ngDevMode ? [{ debugName: "dirty" }] : []));
|
|
1767
|
+
activeGroup = signal(null, ...(ngDevMode ? [{ debugName: "activeGroup" }] : []));
|
|
1768
|
+
activeField = signal(null, ...(ngDevMode ? [{ debugName: "activeField" }] : []));
|
|
1677
1769
|
fb = inject(FormBuilder);
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
this.
|
|
1770
|
+
onGroupClick(index, group) {
|
|
1771
|
+
this.activeField.set(null);
|
|
1772
|
+
this.activeGroup.set({ index: index, group: group });
|
|
1681
1773
|
}
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1774
|
+
onFieldClick(index, group_index, field) {
|
|
1775
|
+
this.activeGroup.set(null);
|
|
1776
|
+
this.activeField.set({ index: index, group_index: group_index, field: field });
|
|
1777
|
+
}
|
|
1778
|
+
getFields(group) {
|
|
1779
|
+
return FormGroupForm.getFields(group);
|
|
1780
|
+
}
|
|
1781
|
+
isGroupSelected(id) {
|
|
1782
|
+
const active = this.activeGroup();
|
|
1783
|
+
if (!active) {
|
|
1784
|
+
return false;
|
|
1685
1785
|
}
|
|
1686
|
-
|
|
1786
|
+
return active.index === id;
|
|
1687
1787
|
}
|
|
1688
|
-
|
|
1689
|
-
|
|
1788
|
+
isFieldSelected(group_id, id) {
|
|
1789
|
+
const active = this.activeField();
|
|
1790
|
+
if (!active) {
|
|
1791
|
+
return false;
|
|
1792
|
+
}
|
|
1793
|
+
return active.index === id && active.group_index == group_id;
|
|
1690
1794
|
}
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1795
|
+
getGroupLabel(control) {
|
|
1796
|
+
const form = control;
|
|
1797
|
+
if (form.value.label) {
|
|
1798
|
+
return form.value.label;
|
|
1799
|
+
}
|
|
1800
|
+
else {
|
|
1801
|
+
return "Group " + form.value.order.toString();
|
|
1802
|
+
}
|
|
1694
1803
|
}
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1804
|
+
getFieldLabel(control) {
|
|
1805
|
+
const form = control;
|
|
1806
|
+
if (form.value.label) {
|
|
1807
|
+
return form.value.label;
|
|
1808
|
+
}
|
|
1809
|
+
else {
|
|
1810
|
+
return "Field " + form.value.order.toString();
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
allowOrderUp() {
|
|
1814
|
+
const active = this.activeField();
|
|
1815
|
+
if (!active) {
|
|
1816
|
+
return false;
|
|
1817
|
+
}
|
|
1818
|
+
return active.index > 0;
|
|
1819
|
+
}
|
|
1820
|
+
allowOrderDown() {
|
|
1821
|
+
const active = this.activeField();
|
|
1822
|
+
if (!active) {
|
|
1823
|
+
return false;
|
|
1824
|
+
}
|
|
1825
|
+
return active.index < this.form().groupSize(active.group_index) - 1;
|
|
1826
|
+
}
|
|
1827
|
+
allowGroupOrderUp() {
|
|
1828
|
+
const active = this.activeGroup();
|
|
1829
|
+
if (!active) {
|
|
1830
|
+
return false;
|
|
1831
|
+
}
|
|
1832
|
+
return active.index > 0;
|
|
1833
|
+
}
|
|
1834
|
+
allowGroupOrderDown() {
|
|
1835
|
+
const active = this.activeGroup();
|
|
1836
|
+
if (!active) {
|
|
1837
|
+
return false;
|
|
1838
|
+
}
|
|
1839
|
+
return active.index < this.form().groups.length - 1;
|
|
1698
1840
|
}
|
|
1699
1841
|
onOrderUp(id) {
|
|
1700
1842
|
this.form().orderUp(id);
|
|
@@ -1704,17 +1846,72 @@ class DynamicFormBuilderComponent {
|
|
|
1704
1846
|
this.form().orderDown(id);
|
|
1705
1847
|
this.dirty.set(true);
|
|
1706
1848
|
}
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1849
|
+
addGroup() {
|
|
1850
|
+
this.form().createGroup(FormGroupForm.createForm(this.fb));
|
|
1851
|
+
this.form().form.markAsDirty();
|
|
1852
|
+
}
|
|
1853
|
+
addField(group) {
|
|
1854
|
+
FormGroupForm.createField(group, FormFieldForm.createForm(this.fb));
|
|
1855
|
+
this.form().form.markAsDirty();
|
|
1856
|
+
}
|
|
1857
|
+
deleteGroup(id) {
|
|
1858
|
+
this.form().deleteGroup(id);
|
|
1859
|
+
this.activeGroup.set(null);
|
|
1860
|
+
this.form().form.markAsDirty();
|
|
1861
|
+
}
|
|
1862
|
+
deleteField() {
|
|
1863
|
+
const active = this.activeField();
|
|
1864
|
+
if (!active) {
|
|
1865
|
+
return;
|
|
1711
1866
|
}
|
|
1712
|
-
|
|
1713
|
-
|
|
1867
|
+
FormGroupForm.deleteField(this.form().groups.at(active.group_index), active.index);
|
|
1868
|
+
this.activeField.set(null);
|
|
1869
|
+
this.form().form.markAsDirty();
|
|
1870
|
+
}
|
|
1871
|
+
onFieldOrderUp() {
|
|
1872
|
+
const active = this.activeField();
|
|
1873
|
+
if (!active) {
|
|
1874
|
+
return;
|
|
1875
|
+
}
|
|
1876
|
+
const id = active.index;
|
|
1877
|
+
const group = this.form().groups.at(active.group_index);
|
|
1878
|
+
FormGroupForm.reorderField(group, id, id - 1);
|
|
1879
|
+
this.activeField.set({ index: id - 1, group_index: active.group_index, field: active.field });
|
|
1880
|
+
this.form().form.markAsDirty();
|
|
1881
|
+
}
|
|
1882
|
+
onFieldOrderDown() {
|
|
1883
|
+
const active = this.activeField();
|
|
1884
|
+
if (!active) {
|
|
1885
|
+
return;
|
|
1714
1886
|
}
|
|
1887
|
+
const id = active.index;
|
|
1888
|
+
const group = this.form().groups.at(active.group_index);
|
|
1889
|
+
FormGroupForm.reorderField(group, id, id + 1);
|
|
1890
|
+
this.activeField.set({ index: id + 1, group_index: active.group_index, field: active.field });
|
|
1891
|
+
this.form().form.markAsDirty();
|
|
1892
|
+
}
|
|
1893
|
+
onGroupOrderUp() {
|
|
1894
|
+
const active = this.activeGroup();
|
|
1895
|
+
if (!active) {
|
|
1896
|
+
return;
|
|
1897
|
+
}
|
|
1898
|
+
const id = active.index;
|
|
1899
|
+
this.form().reorder(id, id - 1);
|
|
1900
|
+
this.activeGroup.set({ index: id - 1, group: active.group });
|
|
1901
|
+
this.form().form.markAsDirty();
|
|
1902
|
+
}
|
|
1903
|
+
onGroupOrderDown() {
|
|
1904
|
+
const active = this.activeGroup();
|
|
1905
|
+
if (!active) {
|
|
1906
|
+
return;
|
|
1907
|
+
}
|
|
1908
|
+
const id = active.index;
|
|
1909
|
+
this.form().reorder(id, id + 1);
|
|
1910
|
+
this.activeGroup.set({ index: id + 1, group: active.group });
|
|
1911
|
+
this.form().form.markAsDirty();
|
|
1715
1912
|
}
|
|
1716
1913
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DynamicFormBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1717
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DynamicFormBuilderComponent, isStandalone: true, selector: "lib-dynamic-form-builder", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, handleSubmit: { classPropertyName: "handleSubmit", publicName: "handleSubmit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitted: "submitted" }, ngImport: i0, template: "<
|
|
1914
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DynamicFormBuilderComponent, isStandalone: true, selector: "lib-dynamic-form-builder", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, handleSubmit: { classPropertyName: "handleSubmit", publicName: "handleSubmit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitted: "submitted" }, ngImport: i0, template: "<div class=\"container\">\n <div class=\"group-list\">\n <div class=\"group-list-header\">\n <h3 class=\"heading\">Groups</h3>\n <button mat-mini-fab class=\"form-action-button\" (click)=\"addGroup()\" matTooltip=\"Add a Group\" type=\"button\">\n <mat-icon>add</mat-icon>\n </button>\n </div>\n <mat-list class=\"group-scroll\">\n @for(group of form().groups.controls; track group; let group_idx=$index; let even=$even)\n {\n <div class=\"scroll-item-container\">\n <mat-list-item class=\"scroll-item\" [class.selected]=\"isGroupSelected(group_idx)\" (click)=\"onGroupClick(group_idx, group)\">\n <div class=\"scroll-item-content\">\n <mat-icon matListIcon>list</mat-icon>\n @if(!group.valid){\n <mat-icon style=\"color:var(--mat-sys-error)\">error</mat-icon>\n }\n <h4 class=\"scroll-group-heading\">{{getGroupLabel(group)}}</h4>\n </div>\n </mat-list-item>\n\n @for(field of getFields(group).controls; track field; let field_idx=$index; let field_even=$even; let count=$count)\n {\n <mat-list-item class=\"scroll-item\" [class.selected]=\"isFieldSelected(group_idx, field_idx)\" [class.even]=\"field_even\" (click)=\"onFieldClick(field_idx, group_idx, field)\">\n <div class=\"scroll-item-content\">\n @if(!field.valid){\n <mat-icon style=\"padding-left: 5px;color:var(--mat-sys-error)\">error</mat-icon>\n }\n <span style=\"padding-left: 5px;\">{{getFieldLabel(field)}}</span>\n </div>\n </mat-list-item>\n @if(field_idx < count - 1){\n <mat-divider></mat-divider>\n }\n }\n </div>\n }\n </mat-list>\n </div>\n\n <div class=\"group-view\">\n @if(activeGroup(); as group)\n {\n <lib-form-group-edit [form]=\"group.group\" \n [canOrderUp]=\"allowGroupOrderUp()\" \n [canOrderDown]=\"allowGroupOrderDown()\"\n (fieldAdded)=\"addField(group.group)\"\n (orderUp)=\"onGroupOrderUp()\"\n (orderDown)=\"onGroupOrderDown()\"\n (deleted)=\"deleteGroup(group.index)\"\n \n >\n </lib-form-group-edit>\n }\n @else if(activeField(); as field)\n {\n <lib-form-field-edit [form]=\"field.field\" \n [canOrderUp]=\"allowOrderUp()\" \n [canOrderDown]=\"allowOrderDown()\"\n (orderUp)=\"onFieldOrderUp()\"\n (orderDown)=\"onFieldOrderDown()\"\n (deleted)=\"deleteField()\"\n ></lib-form-field-edit>\n }\n @else {\n <p>Select a Group or Field to view and edit it</p>\n }\n </div>\n</div>", styles: [":host{flex-grow:1}.expansion-panel-controls{display:none}.expansion-panel:hover .expansion-panel-controls{display:block}.control-button{margin-right:10px}.heading{margin:0 5px 5px 0}.container{display:flex;flex-direction:row;width:100%;margin-left:5px}.group-list{display:flex;flex-direction:column;width:100%;max-width:300px;height:520px}.group-list-header{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%}.group-scroll{width:100%}.group-view{width:100%;margin-left:10px}.scroll-item-container{width:100%;border-radius:6px;margin-bottom:2px;background-color:var(--mat-sys-surface-container-low)}.scroll-item{width:100%;height:40px;display:flex;padding-left:5px;flex-direction:row;text-align:left;align-items:center;justify-content:center}.scroll-item:hover{background-color:var(--mat-sys-surface-container-high);cursor:pointer}.scroll-item-content{display:flex;flex-direction:row;align-items:center}.scroll-group-heading{padding-left:5px;width:100%;text-align:center}.selected{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i2$1.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i2$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "component", type: i2$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: FormGroupEditComponent, selector: "lib-form-group-edit", inputs: ["form", "canOrderUp", "canOrderDown"], outputs: ["deleted", "fieldAdded", "orderUp", "orderDown"] }, { kind: "component", type: FormFieldEditComponent, selector: "lib-form-field-edit", inputs: ["form", "canOrderUp", "canOrderDown"], outputs: ["orderUp", "orderDown", "deleted"] }] });
|
|
1718
1915
|
}
|
|
1719
1916
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DynamicFormBuilderComponent, decorators: [{
|
|
1720
1917
|
type: Component,
|
|
@@ -1725,19 +1922,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1725
1922
|
ReactiveFormsModule,
|
|
1726
1923
|
MatButtonModule,
|
|
1727
1924
|
MatTooltipModule,
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1925
|
+
MatListModule,
|
|
1926
|
+
MatIconModule,
|
|
1927
|
+
MatDividerModule,
|
|
1928
|
+
FormGroupEditComponent,
|
|
1929
|
+
FormFieldEditComponent
|
|
1930
|
+
], template: "<div class=\"container\">\n <div class=\"group-list\">\n <div class=\"group-list-header\">\n <h3 class=\"heading\">Groups</h3>\n <button mat-mini-fab class=\"form-action-button\" (click)=\"addGroup()\" matTooltip=\"Add a Group\" type=\"button\">\n <mat-icon>add</mat-icon>\n </button>\n </div>\n <mat-list class=\"group-scroll\">\n @for(group of form().groups.controls; track group; let group_idx=$index; let even=$even)\n {\n <div class=\"scroll-item-container\">\n <mat-list-item class=\"scroll-item\" [class.selected]=\"isGroupSelected(group_idx)\" (click)=\"onGroupClick(group_idx, group)\">\n <div class=\"scroll-item-content\">\n <mat-icon matListIcon>list</mat-icon>\n @if(!group.valid){\n <mat-icon style=\"color:var(--mat-sys-error)\">error</mat-icon>\n }\n <h4 class=\"scroll-group-heading\">{{getGroupLabel(group)}}</h4>\n </div>\n </mat-list-item>\n\n @for(field of getFields(group).controls; track field; let field_idx=$index; let field_even=$even; let count=$count)\n {\n <mat-list-item class=\"scroll-item\" [class.selected]=\"isFieldSelected(group_idx, field_idx)\" [class.even]=\"field_even\" (click)=\"onFieldClick(field_idx, group_idx, field)\">\n <div class=\"scroll-item-content\">\n @if(!field.valid){\n <mat-icon style=\"padding-left: 5px;color:var(--mat-sys-error)\">error</mat-icon>\n }\n <span style=\"padding-left: 5px;\">{{getFieldLabel(field)}}</span>\n </div>\n </mat-list-item>\n @if(field_idx < count - 1){\n <mat-divider></mat-divider>\n }\n }\n </div>\n }\n </mat-list>\n </div>\n\n <div class=\"group-view\">\n @if(activeGroup(); as group)\n {\n <lib-form-group-edit [form]=\"group.group\" \n [canOrderUp]=\"allowGroupOrderUp()\" \n [canOrderDown]=\"allowGroupOrderDown()\"\n (fieldAdded)=\"addField(group.group)\"\n (orderUp)=\"onGroupOrderUp()\"\n (orderDown)=\"onGroupOrderDown()\"\n (deleted)=\"deleteGroup(group.index)\"\n \n >\n </lib-form-group-edit>\n }\n @else if(activeField(); as field)\n {\n <lib-form-field-edit [form]=\"field.field\" \n [canOrderUp]=\"allowOrderUp()\" \n [canOrderDown]=\"allowOrderDown()\"\n (orderUp)=\"onFieldOrderUp()\"\n (orderDown)=\"onFieldOrderDown()\"\n (deleted)=\"deleteField()\"\n ></lib-form-field-edit>\n }\n @else {\n <p>Select a Group or Field to view and edit it</p>\n }\n </div>\n</div>", styles: [":host{flex-grow:1}.expansion-panel-controls{display:none}.expansion-panel:hover .expansion-panel-controls{display:block}.control-button{margin-right:10px}.heading{margin:0 5px 5px 0}.container{display:flex;flex-direction:row;width:100%;margin-left:5px}.group-list{display:flex;flex-direction:column;width:100%;max-width:300px;height:520px}.group-list-header{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%}.group-scroll{width:100%}.group-view{width:100%;margin-left:10px}.scroll-item-container{width:100%;border-radius:6px;margin-bottom:2px;background-color:var(--mat-sys-surface-container-low)}.scroll-item{width:100%;height:40px;display:flex;padding-left:5px;flex-direction:row;text-align:left;align-items:center;justify-content:center}.scroll-item:hover{background-color:var(--mat-sys-surface-container-high);cursor:pointer}.scroll-item-content{display:flex;flex-direction:row;align-items:center}.scroll-group-heading{padding-left:5px;width:100%;text-align:center}.selected{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"] }]
|
|
1731
1931
|
}], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }], handleSubmit: [{ type: i0.Input, args: [{ isSignal: true, alias: "handleSubmit", required: false }] }], submitted: [{ type: i0.Output, args: ["submitted"] }] } });
|
|
1732
1932
|
|
|
1733
1933
|
class PopulatedFormComponent {
|
|
1734
1934
|
form = input.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
1735
1935
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: PopulatedFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1736
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: PopulatedFormComponent, isStandalone: true, selector: "lib-populated-form", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@for(value of form().values; track value.id)\n{\n@if(value.field.field_type === \"TEXT\" || value.field.field_type === \"RICH_TEXT\")\n{\n <div class=\"item-field\">\n <h3 style=\"margin-right: 10px\">{{value.field.label}}</h3>\n <p>{{value.value}}</p>\n </div>\n}\n@else if(value.field.field_type === \"CHAR\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <span>{{value.value}}</span>\n </div>\n}\n@else if(value.field.field_type === \"BOOLEAN\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n @if(value.value === \"true\")\n {\n <mat-icon>check</mat-icon>\n }\n @else {\n <mat-icon>close_small</mat-icon>\n }\n </div>\n}\n@else if(value.field.field_type === \"FILE\" && value.asset)\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <a matFab href=\"value.asset\">\n <mat-icon>download</mat-icon>\n </a>\n </div>\n}\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }] });
|
|
1936
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: PopulatedFormComponent, isStandalone: true, selector: "lib-populated-form", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@for(value of form().values; track value.id)\n{\n@if(value.field.field_type === \"TEXT\" || value.field.field_type === \"RICH_TEXT\")\n{\n <div class=\"item-field\">\n <h3 style=\"margin-right: 10px\">{{value.field.label}}</h3>\n <p>{{value.value}}</p>\n </div>\n}\n@else if(value.field.field_type === \"CHAR\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <span>{{value.value}}</span>\n </div>\n}\n@else if(value.field.field_type === \"BOOLEAN\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n @if(value.value === \"true\")\n {\n <mat-icon>check</mat-icon>\n }\n @else {\n <mat-icon>close_small</mat-icon>\n }\n </div>\n}\n@else if(value.field.field_type === \"SELECTION\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <span>{{value.value}}</span>\n </div>\n}\n@else if(value.field.field_type === \"INTEGER\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <span>{{value.value}}</span>\n </div>\n}\n@else if(value.field.field_type === \"FILE\" && value.asset)\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <a matFab href=\"value.asset\">\n <mat-icon>download</mat-icon>\n </a>\n </div>\n}\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }] });
|
|
1737
1937
|
}
|
|
1738
1938
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: PopulatedFormComponent, decorators: [{
|
|
1739
1939
|
type: Component,
|
|
1740
|
-
args: [{ selector: 'lib-populated-form', imports: [MatIconModule, MatButtonModule], template: "@for(value of form().values; track value.id)\n{\n@if(value.field.field_type === \"TEXT\" || value.field.field_type === \"RICH_TEXT\")\n{\n <div class=\"item-field\">\n <h3 style=\"margin-right: 10px\">{{value.field.label}}</h3>\n <p>{{value.value}}</p>\n </div>\n}\n@else if(value.field.field_type === \"CHAR\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <span>{{value.value}}</span>\n </div>\n}\n@else if(value.field.field_type === \"BOOLEAN\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n @if(value.value === \"true\")\n {\n <mat-icon>check</mat-icon>\n }\n @else {\n <mat-icon>close_small</mat-icon>\n }\n </div>\n}\n@else if(value.field.field_type === \"FILE\" && value.asset)\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <a matFab href=\"value.asset\">\n <mat-icon>download</mat-icon>\n </a>\n </div>\n}\n}" }]
|
|
1940
|
+
args: [{ selector: 'lib-populated-form', imports: [MatIconModule, MatButtonModule], template: "@for(value of form().values; track value.id)\n{\n@if(value.field.field_type === \"TEXT\" || value.field.field_type === \"RICH_TEXT\")\n{\n <div class=\"item-field\">\n <h3 style=\"margin-right: 10px\">{{value.field.label}}</h3>\n <p>{{value.value}}</p>\n </div>\n}\n@else if(value.field.field_type === \"CHAR\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <span>{{value.value}}</span>\n </div>\n}\n@else if(value.field.field_type === \"BOOLEAN\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n @if(value.value === \"true\")\n {\n <mat-icon>check</mat-icon>\n }\n @else {\n <mat-icon>close_small</mat-icon>\n }\n </div>\n}\n@else if(value.field.field_type === \"SELECTION\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <span>{{value.value}}</span>\n </div>\n}\n@else if(value.field.field_type === \"INTEGER\")\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <span>{{value.value}}</span>\n </div>\n}\n@else if(value.field.field_type === \"FILE\" && value.asset)\n{\n <div class=\"item-field\">\n <span style=\"margin-right: 10px\"><b>{{value.field.label}}:</b></span>\n <a matFab href=\"value.asset\">\n <mat-icon>download</mat-icon>\n </a>\n </div>\n}\n}" }]
|
|
1741
1941
|
}], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }] } });
|
|
1742
1942
|
|
|
1743
1943
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -1785,7 +1985,7 @@ class ListTableViewComponent {
|
|
|
1785
1985
|
}));
|
|
1786
1986
|
}
|
|
1787
1987
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ListTableViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1788
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ListTableViewComponent, isStandalone: true, selector: "lib-list-table-view", inputs: { itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, searchFilter: { classPropertyName: "searchFilter", publicName: "searchFilter", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], ngImport: i0, template: "@if (dataSource(); as dataSource) {\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n matSortActive=\"name\"\n matSortDisableClear\n matSortDirection=\"desc\"\n class=\"mat-elevation-z8\"\n >\n @for (column of columns(); track column.name) {\n <ng-container matColumnDef=\"{{ column.name }}\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n {{ column.title }}\n </th>\n <td mat-cell *matCellDef=\"let element\">\n\n @if(column.element_type === \"date\")\n {\n {{ element[column.name] | date}}\n }\n @else if(column.element_type === \"enum\")\n {\n {{ element[column.name] | titlecase}}\n }\n @else {\n {{ element[column.name] }}\n }\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"columnNames()\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: columnNames()\"\n [routerLink]=\"['/' + itemType() + '/detail/', row.id]\"\n [routerLinkActive]=\"['is-active']\"\n ></tr>\n </table>\n\n <mat-paginator\n [length]=\"dataSource.length()\"\n [pageSize]=\"20\"\n [pageSizeOptions]=\"pageSizeOptions\"\n aria-label=\"Select page\"\n >\n </mat-paginator>\n}\n", styles: [".mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.is-active{font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i2$
|
|
1988
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ListTableViewComponent, isStandalone: true, selector: "lib-list-table-view", inputs: { itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, searchFilter: { classPropertyName: "searchFilter", publicName: "searchFilter", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], ngImport: i0, template: "@if (dataSource(); as dataSource) {\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n matSortActive=\"name\"\n matSortDisableClear\n matSortDirection=\"desc\"\n class=\"mat-elevation-z8\"\n >\n @for (column of columns(); track column.name) {\n <ng-container matColumnDef=\"{{ column.name }}\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n {{ column.title }}\n </th>\n <td mat-cell *matCellDef=\"let element\">\n\n @if(column.element_type === \"date\")\n {\n {{ element[column.name] | date}}\n }\n @else if(column.element_type === \"enum\")\n {\n {{ element[column.name] | titlecase}}\n }\n @else {\n {{ element[column.name] }}\n }\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"columnNames()\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: columnNames()\"\n [routerLink]=\"['/' + itemType() + '/detail/', row.id]\"\n [routerLinkActive]=\"['is-active']\"\n ></tr>\n </table>\n\n <mat-paginator\n [length]=\"dataSource.length()\"\n [pageSize]=\"20\"\n [pageSizeOptions]=\"pageSizeOptions\"\n aria-label=\"Select page\"\n >\n </mat-paginator>\n}\n", styles: [".mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.is-active{font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i2$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i3$2.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i3$2.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }] });
|
|
1789
1989
|
}
|
|
1790
1990
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ListTableViewComponent, decorators: [{
|
|
1791
1991
|
type: Component,
|
|
@@ -1828,13 +2028,13 @@ class ListScrollViewComponent {
|
|
|
1828
2028
|
this.selected.emit(id);
|
|
1829
2029
|
}
|
|
1830
2030
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ListScrollViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1831
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ListScrollViewComponent, isStandalone: true, selector: "lib-list-scroll-view", inputs: { searchTerm: { classPropertyName: "searchTerm", publicName: "searchTerm", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, itemWidth: { classPropertyName: "itemWidth", publicName: "itemWidth", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, listItemTemplate: { classPropertyName: "listItemTemplate", publicName: "listItemTemplate", isSignal: true, isRequired: false, transformFunction: null }, routerMode: { classPropertyName: "routerMode", publicName: "routerMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template: "<mat-nav-list
|
|
2031
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ListScrollViewComponent, isStandalone: true, selector: "lib-list-scroll-view", inputs: { searchTerm: { classPropertyName: "searchTerm", publicName: "searchTerm", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, itemWidth: { classPropertyName: "itemWidth", publicName: "itemWidth", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, listItemTemplate: { classPropertyName: "listItemTemplate", publicName: "listItemTemplate", isSignal: true, isRequired: false, transformFunction: null }, routerMode: { classPropertyName: "routerMode", publicName: "routerMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template: "<mat-nav-list class=\"scrollable-container\">\n <cdk-virtual-scroll-viewport\n itemSize=\"itemHeight()\"\n class=\"scrollable-list\"\n style=\"width: 100%;\">\n <ng-container *cdkVirtualFor=\"let item of dataSource(); let even = even;\">\n @if(routerMode())\n {\n <ng-container\n *ngTemplateOutlet=\"listItemTemplate(); context: { item: item, even: even, selected: item.id === selection()}\" \n >\n </ng-container>\n }\n @else \n {\n <div\n (click)=\"onSelected(item.id)\" \n (keydown)=\"onSelected(item.id)\"\n tabindex=\"0\"\n style=\"width: 100%; margin-right: 5px; margin-bottom: 2px;\"\n role=\"button\">\n <ng-container\n *ngTemplateOutlet=\"listItemTemplate(); context: { item: item, even: even, selected: item.id === selection()}\" \n >\n </ng-container> \n </div> \n }\n </ng-container>\n </cdk-virtual-scroll-viewport>\n</mat-nav-list>\n", styles: [":host{flex-grow:1}.scrollable-container{padding:0;display:flex;justify-content:center}.scrollable-list{height:540px;padding:5px;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i2$1.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i2$3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2$3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2$3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }] });
|
|
1832
2032
|
}
|
|
1833
2033
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ListScrollViewComponent, decorators: [{
|
|
1834
2034
|
type: Component,
|
|
1835
2035
|
args: [{ selector: 'lib-list-scroll-view', imports: [MatListModule,
|
|
1836
2036
|
NgTemplateOutlet,
|
|
1837
|
-
ScrollingModule], template: "<mat-nav-list
|
|
2037
|
+
ScrollingModule], template: "<mat-nav-list class=\"scrollable-container\">\n <cdk-virtual-scroll-viewport\n itemSize=\"itemHeight()\"\n class=\"scrollable-list\"\n style=\"width: 100%;\">\n <ng-container *cdkVirtualFor=\"let item of dataSource(); let even = even;\">\n @if(routerMode())\n {\n <ng-container\n *ngTemplateOutlet=\"listItemTemplate(); context: { item: item, even: even, selected: item.id === selection()}\" \n >\n </ng-container>\n }\n @else \n {\n <div\n (click)=\"onSelected(item.id)\" \n (keydown)=\"onSelected(item.id)\"\n tabindex=\"0\"\n style=\"width: 100%; margin-right: 5px; margin-bottom: 2px;\"\n role=\"button\">\n <ng-container\n *ngTemplateOutlet=\"listItemTemplate(); context: { item: item, even: even, selected: item.id === selection()}\" \n >\n </ng-container> \n </div> \n }\n </ng-container>\n </cdk-virtual-scroll-viewport>\n</mat-nav-list>\n", styles: [":host{flex-grow:1}.scrollable-container{padding:0;display:flex;justify-content:center}.scrollable-list{height:540px;padding:5px;width:100%}\n"] }]
|
|
1838
2038
|
}], propDecorators: { searchTerm: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchTerm", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], itemWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemWidth", required: false }] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], listItemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "listItemTemplate", required: false }] }], routerMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerMode", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
|
|
1839
2039
|
|
|
1840
2040
|
class ListDataSource extends DataSource {
|
|
@@ -1920,6 +2120,7 @@ class ListHeaderComponent {
|
|
|
1920
2120
|
canCreate = input.required(...(ngDevMode ? [{ debugName: "canCreate" }] : []));
|
|
1921
2121
|
showControls = input.required(...(ngDevMode ? [{ debugName: "showControls" }] : []));
|
|
1922
2122
|
sortFields = input.required(...(ngDevMode ? [{ debugName: "sortFields" }] : []));
|
|
2123
|
+
filters = input(null, ...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
1923
2124
|
searchChanged = output();
|
|
1924
2125
|
title() {
|
|
1925
2126
|
return this.itemType().replace("_", " ");
|
|
@@ -1928,7 +2129,7 @@ class ListHeaderComponent {
|
|
|
1928
2129
|
this.searchChanged.emit(value);
|
|
1929
2130
|
}
|
|
1930
2131
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ListHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1931
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ListHeaderComponent, isStandalone: true, selector: "lib-list-header", inputs: { itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: true, transformFunction: null }, canCreate: { classPropertyName: "canCreate", publicName: "canCreate", isSignal: true, isRequired: true, transformFunction: null }, showControls: { classPropertyName: "showControls", publicName: "showControls", isSignal: true, isRequired: true, transformFunction: null }, sortFields: { classPropertyName: "sortFields", publicName: "sortFields", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { searchChanged: "searchChanged" }, ngImport: i0, template: "<div class=\"container\">\n\n <div class=\"title-container\">\n <h1 class=\"title\">{{ title() | titlecase }}</h1>\n\n @if (canCreate()) {\n <div class=\"button-container\">\n <a mat-fab
|
|
2132
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ListHeaderComponent, isStandalone: true, selector: "lib-list-header", inputs: { itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: true, transformFunction: null }, canCreate: { classPropertyName: "canCreate", publicName: "canCreate", isSignal: true, isRequired: true, transformFunction: null }, showControls: { classPropertyName: "showControls", publicName: "showControls", isSignal: true, isRequired: true, transformFunction: null }, sortFields: { classPropertyName: "sortFields", publicName: "sortFields", isSignal: true, isRequired: true, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchChanged: "searchChanged" }, ngImport: i0, template: "<div class=\"container\">\n\n <div class=\"title-container\">\n <h1 class=\"title\">{{ title() | titlecase }}</h1>\n\n @if (canCreate()) {\n <div class=\"button-container\">\n <a mat-mini-fab aria-label=\"Add new item\" [matTooltip]=\"'Add new ' + title()\"\n [routerLink]=\"['/' + itemType(), 'create']\">\n <mat-icon>add</mat-icon></a>\n </div>\n }\n </div>\n\n <div class=\"controls\" [hidden]=\"!showControls()\">\n <lib-search-bar style=\"width:70%\" [itemType]=\"title()\" [filters]=\"filters()\" [sortFields]=\"sortFields()\"\n (searchChanged)=\"onSearchChange($event)\"></lib-search-bar>\n </div>\n</div>", styles: [":host{flex-grow:1}.container{display:flex;flex-direction:column;align-items:center;justify-content:center}.title-container{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center}.title{text-align:center;padding:5px;margin:0}.controls{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SearchBarComponent, selector: "lib-search-bar", inputs: ["itemType", "sortFields", "filters"], outputs: ["searchChanged"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }] });
|
|
1932
2133
|
}
|
|
1933
2134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ListHeaderComponent, decorators: [{
|
|
1934
2135
|
type: Component,
|
|
@@ -1936,8 +2137,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1936
2137
|
RouterModule,
|
|
1937
2138
|
MatIconModule,
|
|
1938
2139
|
MatButtonModule,
|
|
1939
|
-
|
|
1940
|
-
|
|
2140
|
+
MatTooltipModule,
|
|
2141
|
+
SearchBarComponent], template: "<div class=\"container\">\n\n <div class=\"title-container\">\n <h1 class=\"title\">{{ title() | titlecase }}</h1>\n\n @if (canCreate()) {\n <div class=\"button-container\">\n <a mat-mini-fab aria-label=\"Add new item\" [matTooltip]=\"'Add new ' + title()\"\n [routerLink]=\"['/' + itemType(), 'create']\">\n <mat-icon>add</mat-icon></a>\n </div>\n }\n </div>\n\n <div class=\"controls\" [hidden]=\"!showControls()\">\n <lib-search-bar style=\"width:70%\" [itemType]=\"title()\" [filters]=\"filters()\" [sortFields]=\"sortFields()\"\n (searchChanged)=\"onSearchChange($event)\"></lib-search-bar>\n </div>\n</div>", styles: [":host{flex-grow:1}.container{display:flex;flex-direction:column;align-items:center;justify-content:center}.title-container{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center}.title{text-align:center;padding:5px;margin:0}.controls{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;width:100%}\n"] }]
|
|
2142
|
+
}], propDecorators: { itemType: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemType", required: true }] }], canCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "canCreate", required: true }] }], showControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "showControls", required: true }] }], sortFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortFields", required: true }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], searchChanged: [{ type: i0.Output, args: ["searchChanged"] }] } });
|
|
1941
2143
|
|
|
1942
2144
|
class ListViewComponent {
|
|
1943
2145
|
viewType = input("table", ...(ngDevMode ? [{ debugName: "viewType" }] : []));
|
|
@@ -1952,6 +2154,7 @@ class ListViewComponent {
|
|
|
1952
2154
|
noItemsCanCreateMessage = input(...(ngDevMode ? [undefined, { debugName: "noItemsCanCreateMessage" }] : []));
|
|
1953
2155
|
noItemsMessage = input(...(ngDevMode ? [undefined, { debugName: "noItemsMessage" }] : []));
|
|
1954
2156
|
defaultQueries = input([], ...(ngDevMode ? [{ debugName: "defaultQueries" }] : []));
|
|
2157
|
+
filters = input(null, ...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
1955
2158
|
embeddedMode = input(false, ...(ngDevMode ? [{ debugName: "embeddedMode" }] : []));
|
|
1956
2159
|
selectedViewType = signal("table", ...(ngDevMode ? [{ debugName: "selectedViewType" }] : []));
|
|
1957
2160
|
selected = output();
|
|
@@ -1963,7 +2166,7 @@ class ListViewComponent {
|
|
|
1963
2166
|
columnNames = computed(() => this.columns().map(c => c.name), ...(ngDevMode ? [{ debugName: "columnNames" }] : []));
|
|
1964
2167
|
searchTerm = "";
|
|
1965
2168
|
get resolvedItemWidth() {
|
|
1966
|
-
if (this.itemDetailTemplate()) {
|
|
2169
|
+
if (this.itemDetailTemplate() && this.dataSource !== undefined && !this.dataSource.sourceIsEmpty()) {
|
|
1967
2170
|
return (this.itemWidth() + 50).toString() + "px";
|
|
1968
2171
|
}
|
|
1969
2172
|
else {
|
|
@@ -2034,7 +2237,7 @@ class ListViewComponent {
|
|
|
2034
2237
|
return (url_segments.length == 2) && (url_segments[1].path == "self");
|
|
2035
2238
|
}
|
|
2036
2239
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ListViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2037
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ListViewComponent, isStandalone: true, selector: "lib-list-view", inputs: { viewType: { classPropertyName: "viewType", publicName: "viewType", isSignal: true, isRequired: false, transformFunction: null }, itemService: { classPropertyName: "itemService", publicName: "itemService", isSignal: true, isRequired: false, transformFunction: null }, listItemTemplate: { classPropertyName: "listItemTemplate", publicName: "listItemTemplate", isSignal: true, isRequired: false, transformFunction: null }, itemDetailTemplate: { classPropertyName: "itemDetailTemplate", publicName: "itemDetailTemplate", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, itemWidth: { classPropertyName: "itemWidth", publicName: "itemWidth", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, sortFields: { classPropertyName: "sortFields", publicName: "sortFields", isSignal: true, isRequired: false, transformFunction: null }, noSelfItemsMessage: { classPropertyName: "noSelfItemsMessage", publicName: "noSelfItemsMessage", isSignal: true, isRequired: false, transformFunction: null }, noItemsCanCreateMessage: { classPropertyName: "noItemsCanCreateMessage", publicName: "noItemsCanCreateMessage", isSignal: true, isRequired: false, transformFunction: null }, noItemsMessage: { classPropertyName: "noItemsMessage", publicName: "noItemsMessage", isSignal: true, isRequired: false, transformFunction: null }, defaultQueries: { classPropertyName: "defaultQueries", publicName: "defaultQueries", isSignal: true, isRequired: false, transformFunction: null }, embeddedMode: { classPropertyName: "embeddedMode", publicName: "embeddedMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }], ngImport: i0, template: "@if(!embeddedMode()){\n<lib-back-button></lib-back-button>\n}\n\n<div class=\"container\">\n <lib-list-header style=\"width:100%\"
|
|
2240
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ListViewComponent, isStandalone: true, selector: "lib-list-view", inputs: { viewType: { classPropertyName: "viewType", publicName: "viewType", isSignal: true, isRequired: false, transformFunction: null }, itemService: { classPropertyName: "itemService", publicName: "itemService", isSignal: true, isRequired: false, transformFunction: null }, listItemTemplate: { classPropertyName: "listItemTemplate", publicName: "listItemTemplate", isSignal: true, isRequired: false, transformFunction: null }, itemDetailTemplate: { classPropertyName: "itemDetailTemplate", publicName: "itemDetailTemplate", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, itemWidth: { classPropertyName: "itemWidth", publicName: "itemWidth", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, sortFields: { classPropertyName: "sortFields", publicName: "sortFields", isSignal: true, isRequired: false, transformFunction: null }, noSelfItemsMessage: { classPropertyName: "noSelfItemsMessage", publicName: "noSelfItemsMessage", isSignal: true, isRequired: false, transformFunction: null }, noItemsCanCreateMessage: { classPropertyName: "noItemsCanCreateMessage", publicName: "noItemsCanCreateMessage", isSignal: true, isRequired: false, transformFunction: null }, noItemsMessage: { classPropertyName: "noItemsMessage", publicName: "noItemsMessage", isSignal: true, isRequired: false, transformFunction: null }, defaultQueries: { classPropertyName: "defaultQueries", publicName: "defaultQueries", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, embeddedMode: { classPropertyName: "embeddedMode", publicName: "embeddedMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }], ngImport: i0, template: "@if(!embeddedMode()){\n<lib-back-button></lib-back-button>\n}\n\n<div class=\"container\">\n <lib-list-header style=\"width:100%\" [itemType]=\"itemType()\" [canCreate]=\"canCreate()\" [showControls]=\"showControls()\" [filters]=\"filters()\"\n [sortFields]=\"sortFields()\" (searchChanged)=\"onSearchChange($event)\"></lib-list-header>\n\n <div class=\"content-container\" style=\"padding: 0px\">\n @if(dataSource)\n {\n <div class=\"result-container\" [style.width]=\"resolvedItemWidth\">\n\n @if (dataSource.loading()) {\n <div class=\"spinner-container\">\n <mat-spinner></mat-spinner>\n </div>\n }\n\n @if(!embeddedMode()){\n <div [hidden]=\"!dataSource.sourceIsEmpty()\">\n @if(isSelfList())\n {\n @if(noSelfItemsMessage())\n {\n <p>{{noSelfItemsMessage()}}</p>\n }\n @else {\n <p>You do not have any {{itemType()}}.</p>\n }\n }\n @else{\n @if(canCreate()){\n @if(noItemsCanCreateMessage())\n {\n <p>{{noItemsCanCreateMessage()}}</p>\n }\n @else{\n <p>There are currently no {{itemType()}}, click above to add one.</p>\n }\n }\n @else{\n @if(noItemsMessage())\n {\n <p>{{noItemsMessage()}}</p>\n }\n @else\n {\n <p>There are currently no {{itemType()}}.</p>\n }\n }\n }\n </div>\n }\n\n <div style=\"width: 100%\" [hidden]=\"dataSource.sourceIsEmpty()\">\n @if(isTableView()) {\n <lib-list-table-view [itemType]=\"itemType()\" [columns]=\"columns()\" [dataSource]=\"dataSource\">\n </lib-list-table-view>\n }\n @else {\n <div class=\"scroll-container\">\n <h3>Results: {{dataSource.length()}}</h3>\n <lib-list-scroll-view [listItemTemplate]=\"listItemTemplate()\" [itemHeight]=\"itemHeight()\"\n [itemWidth]=\"itemWidth().toString()\" [dataSource]=\"dataSource\"\n (selected)=\"onSelection($event)\"></lib-list-scroll-view>\n </div>\n }\n </div>\n </div>\n @if(itemDetailTemplate()){\n <div class=\"detail-container\">\n <ng-container *ngTemplateOutlet=\"itemDetailTemplate()\">\n </ng-container>\n </div>\n }\n }\n </div>\n</div>", styles: [":host{flex-grow:1}.container{display:flex;padding-left:5px;padding-right:5px;flex-direction:column;justify-content:center;text-align:left;align-items:center}.content-container{display:flex;flex-direction:row;justify-content:left;align-items:start;width:100%}.hide-element{display:none}h3{margin-bottom:5px;margin-top:0;padding:0;text-align:center}.scroll-container{display:flex;flex-direction:column;width:100%}.detail-container{width:100%;display:flex;flex-grow:1;height:100%;min-width:400px}\n"], dependencies: [{ kind: "component", type: ListTableViewComponent, selector: "lib-list-table-view", inputs: ["itemType", "columns", "dataSource", "searchFilter"] }, { kind: "component", type: ListScrollViewComponent, selector: "lib-list-scroll-view", inputs: ["searchTerm", "pageSize", "itemHeight", "itemWidth", "dataSource", "listItemTemplate", "routerMode"], outputs: ["selected"] }, { kind: "component", type: BackButtonComponent, selector: "lib-back-button" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i1$4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: ListHeaderComponent, selector: "lib-list-header", inputs: ["itemType", "canCreate", "showControls", "sortFields", "filters"], outputs: ["searchChanged"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
2038
2241
|
}
|
|
2039
2242
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ListViewComponent, decorators: [{
|
|
2040
2243
|
type: Component,
|
|
@@ -2051,8 +2254,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
2051
2254
|
MatTooltipModule,
|
|
2052
2255
|
MatButtonModule,
|
|
2053
2256
|
ListHeaderComponent,
|
|
2054
|
-
NgTemplateOutlet], template: "@if(!embeddedMode()){\n<lib-back-button></lib-back-button>\n}\n\n<div class=\"container\">\n <lib-list-header style=\"width:100%\"
|
|
2055
|
-
}], propDecorators: { viewType: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewType", required: false }] }], itemService: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemService", required: false }] }], listItemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "listItemTemplate", required: false }] }], itemDetailTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemDetailTemplate", required: false }] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], itemWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemWidth", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], sortFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortFields", required: false }] }], noSelfItemsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noSelfItemsMessage", required: false }] }], noItemsCanCreateMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noItemsCanCreateMessage", required: false }] }], noItemsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noItemsMessage", required: false }] }], defaultQueries: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultQueries", required: false }] }], embeddedMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "embeddedMode", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], sort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }] } });
|
|
2257
|
+
NgTemplateOutlet], template: "@if(!embeddedMode()){\n<lib-back-button></lib-back-button>\n}\n\n<div class=\"container\">\n <lib-list-header style=\"width:100%\" [itemType]=\"itemType()\" [canCreate]=\"canCreate()\" [showControls]=\"showControls()\" [filters]=\"filters()\"\n [sortFields]=\"sortFields()\" (searchChanged)=\"onSearchChange($event)\"></lib-list-header>\n\n <div class=\"content-container\" style=\"padding: 0px\">\n @if(dataSource)\n {\n <div class=\"result-container\" [style.width]=\"resolvedItemWidth\">\n\n @if (dataSource.loading()) {\n <div class=\"spinner-container\">\n <mat-spinner></mat-spinner>\n </div>\n }\n\n @if(!embeddedMode()){\n <div [hidden]=\"!dataSource.sourceIsEmpty()\">\n @if(isSelfList())\n {\n @if(noSelfItemsMessage())\n {\n <p>{{noSelfItemsMessage()}}</p>\n }\n @else {\n <p>You do not have any {{itemType()}}.</p>\n }\n }\n @else{\n @if(canCreate()){\n @if(noItemsCanCreateMessage())\n {\n <p>{{noItemsCanCreateMessage()}}</p>\n }\n @else{\n <p>There are currently no {{itemType()}}, click above to add one.</p>\n }\n }\n @else{\n @if(noItemsMessage())\n {\n <p>{{noItemsMessage()}}</p>\n }\n @else\n {\n <p>There are currently no {{itemType()}}.</p>\n }\n }\n }\n </div>\n }\n\n <div style=\"width: 100%\" [hidden]=\"dataSource.sourceIsEmpty()\">\n @if(isTableView()) {\n <lib-list-table-view [itemType]=\"itemType()\" [columns]=\"columns()\" [dataSource]=\"dataSource\">\n </lib-list-table-view>\n }\n @else {\n <div class=\"scroll-container\">\n <h3>Results: {{dataSource.length()}}</h3>\n <lib-list-scroll-view [listItemTemplate]=\"listItemTemplate()\" [itemHeight]=\"itemHeight()\"\n [itemWidth]=\"itemWidth().toString()\" [dataSource]=\"dataSource\"\n (selected)=\"onSelection($event)\"></lib-list-scroll-view>\n </div>\n }\n </div>\n </div>\n @if(itemDetailTemplate()){\n <div class=\"detail-container\">\n <ng-container *ngTemplateOutlet=\"itemDetailTemplate()\">\n </ng-container>\n </div>\n }\n }\n </div>\n</div>", styles: [":host{flex-grow:1}.container{display:flex;padding-left:5px;padding-right:5px;flex-direction:column;justify-content:center;text-align:left;align-items:center}.content-container{display:flex;flex-direction:row;justify-content:left;align-items:start;width:100%}.hide-element{display:none}h3{margin-bottom:5px;margin-top:0;padding:0;text-align:center}.scroll-container{display:flex;flex-direction:column;width:100%}.detail-container{width:100%;display:flex;flex-grow:1;height:100%;min-width:400px}\n"] }]
|
|
2258
|
+
}], propDecorators: { viewType: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewType", required: false }] }], itemService: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemService", required: false }] }], listItemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "listItemTemplate", required: false }] }], itemDetailTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemDetailTemplate", required: false }] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], itemWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemWidth", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], sortFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortFields", required: false }] }], noSelfItemsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noSelfItemsMessage", required: false }] }], noItemsCanCreateMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noItemsCanCreateMessage", required: false }] }], noItemsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noItemsMessage", required: false }] }], defaultQueries: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultQueries", required: false }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], embeddedMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "embeddedMode", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], sort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }] } });
|
|
2056
2259
|
|
|
2057
2260
|
class TopBarComponent {
|
|
2058
2261
|
title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
|
|
@@ -2087,7 +2290,7 @@ class TopBarComponent {
|
|
|
2087
2290
|
}
|
|
2088
2291
|
}
|
|
2089
2292
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TopBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2090
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: TopBarComponent, isStandalone: true, selector: "lib-top-bar", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null }, loginRoute: { classPropertyName: "loginRoute", publicName: "loginRoute", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mat-toolbar class=\"toolbar\" [style.background-image]=\"backgroundStyle\">\n\n @if(logo())\n {\n <a aria-label=\"Home\" [routerLink]=\"['home']\">\n <img src=\"{{logo()}}\" class=\"logo\" alt=\"Website logo\"/>\n </a>\n }\n @else {\n <a mat-icon-button aria-label=\"Home\" [routerLink]=\"['home']\">\n <mat-icon class=\"icon\">home</mat-icon>\n </a>\n <span>{{title()}}</span>\n }\n <button mat-icon-button style=\"margin: 5px\" aria-label=\"Toggle Nav Bar\">\n <mat-icon class=\"icon\" (click)=\"leftNavService.toggle()\">\n @if(leftNavService.wide()){\n menu\n }\n @else {\n menu_open\n }\n </mat-icon>\n </button>\n\n <span class=\"topbar-spacer\"></span>\n @if(user(); as user)\n {\n <span>{{user.username}}</span>\n \n <button mat-icon-button style=\"margin: 5px\" aria-label=\"User Profile\" [matMenuTriggerFor]=\"profile_menu\">\n <mat-icon class=\"icon\">person</mat-icon>\n </button>\n\n <mat-menu #profile_menu=\"matMenu\">\n <a mat-menu-item aria-label=\"My Profile\" [routerLink]=\"['/members/detail', user.id]\">\n <mat-icon>manage_accounts</mat-icon>\n <span>My Profile</span>\n </a> \n <a mat-menu-item aria-label=\"Get Support\" [routerLink]=\"['/feedback']\">\n <mat-icon>contact_support</mat-icon>\n <span>Get Support</span>\n </a> \n <button mat-menu-item (click)=\"onLogout()\">\n <mat-icon>logout</mat-icon>\n <span>Log Out</span>\n </button>\n\n </mat-menu>\n }\n @else {\n <span>Log In</span>\n <button matIconButton (click)=\"onLogin()\">\n <mat-icon class=\"icon\">login</mat-icon>\n </button>\n }\n</mat-toolbar>\n", styles: [".topbar-spacer{flex:1 1 auto}.toolbar{height:60px;background-size:cover;--mat-toolbar-container-background-color: var(--mat-sys-primary);--mat-toolbar-container-text-color: var(--mat-sys-on-primary)}.logo{height:50px;margin-top:5px}.icon{color:var(--mat-sys-on-primary)}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i2$4.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] });
|
|
2293
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: TopBarComponent, isStandalone: true, selector: "lib-top-bar", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null }, loginRoute: { classPropertyName: "loginRoute", publicName: "loginRoute", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mat-toolbar class=\"toolbar\" [style.background-image]=\"backgroundStyle\">\n\n @if(logo())\n {\n <a aria-label=\"Home\" [routerLink]=\"['home']\">\n <img src=\"{{logo()}}\" class=\"logo\" alt=\"Website logo\"/>\n </a>\n }\n @else {\n <a mat-icon-button aria-label=\"Home\" [routerLink]=\"['home']\">\n <mat-icon class=\"icon\">home</mat-icon>\n </a>\n <span>{{title()}}</span>\n }\n @if(user()){\n <button mat-icon-button style=\"margin: 5px\" aria-label=\"Toggle Nav Bar\">\n <mat-icon class=\"icon\" (click)=\"leftNavService.toggle()\">\n @if(leftNavService.wide()){\n menu\n }\n @else {\n menu_open\n }\n </mat-icon>\n </button>\n }\n\n <span class=\"topbar-spacer\"></span>\n @if(user(); as user)\n {\n <span>{{user.username}}</span>\n \n <button mat-icon-button style=\"margin: 5px\" aria-label=\"User Profile\" [matMenuTriggerFor]=\"profile_menu\">\n <mat-icon class=\"icon\">person</mat-icon>\n </button>\n\n <mat-menu #profile_menu=\"matMenu\">\n <a mat-menu-item aria-label=\"My Profile\" [routerLink]=\"['/members/detail', user.id]\">\n <mat-icon>manage_accounts</mat-icon>\n <span>My Profile</span>\n </a> \n <a mat-menu-item aria-label=\"Get Support\" [routerLink]=\"['/feedback']\">\n <mat-icon>contact_support</mat-icon>\n <span>Get Support</span>\n </a> \n <button mat-menu-item (click)=\"onLogout()\">\n <mat-icon>logout</mat-icon>\n <span>Log Out</span>\n </button>\n\n </mat-menu>\n }\n @else {\n <span>Log In</span>\n <button matIconButton (click)=\"onLogin()\">\n <mat-icon class=\"icon\">login</mat-icon>\n </button>\n }\n</mat-toolbar>\n", styles: [".topbar-spacer{flex:1 1 auto}.toolbar{height:60px;background-size:cover;--mat-toolbar-container-background-color: var(--mat-sys-primary);--mat-toolbar-container-text-color: var(--mat-sys-on-primary)}.logo{height:50px;margin-top:5px}.icon{color:var(--mat-sys-on-primary)}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i2$4.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] });
|
|
2091
2294
|
}
|
|
2092
2295
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TopBarComponent, decorators: [{
|
|
2093
2296
|
type: Component,
|
|
@@ -2095,7 +2298,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
2095
2298
|
MatToolbarModule,
|
|
2096
2299
|
MatIconModule,
|
|
2097
2300
|
MatButtonModule,
|
|
2098
|
-
MatMenuModule], template: "<mat-toolbar class=\"toolbar\" [style.background-image]=\"backgroundStyle\">\n\n @if(logo())\n {\n <a aria-label=\"Home\" [routerLink]=\"['home']\">\n <img src=\"{{logo()}}\" class=\"logo\" alt=\"Website logo\"/>\n </a>\n }\n @else {\n <a mat-icon-button aria-label=\"Home\" [routerLink]=\"['home']\">\n <mat-icon class=\"icon\">home</mat-icon>\n </a>\n <span>{{title()}}</span>\n }\n <button mat-icon-button style=\"margin: 5px\" aria-label=\"Toggle Nav Bar\">\n <mat-icon class=\"icon\" (click)=\"leftNavService.toggle()\">\n @if(leftNavService.wide()){\n menu\n }\n @else {\n menu_open\n }\n </mat-icon>\n </button>\n\n <span class=\"topbar-spacer\"></span>\n @if(user(); as user)\n {\n <span>{{user.username}}</span>\n \n <button mat-icon-button style=\"margin: 5px\" aria-label=\"User Profile\" [matMenuTriggerFor]=\"profile_menu\">\n <mat-icon class=\"icon\">person</mat-icon>\n </button>\n\n <mat-menu #profile_menu=\"matMenu\">\n <a mat-menu-item aria-label=\"My Profile\" [routerLink]=\"['/members/detail', user.id]\">\n <mat-icon>manage_accounts</mat-icon>\n <span>My Profile</span>\n </a> \n <a mat-menu-item aria-label=\"Get Support\" [routerLink]=\"['/feedback']\">\n <mat-icon>contact_support</mat-icon>\n <span>Get Support</span>\n </a> \n <button mat-menu-item (click)=\"onLogout()\">\n <mat-icon>logout</mat-icon>\n <span>Log Out</span>\n </button>\n\n </mat-menu>\n }\n @else {\n <span>Log In</span>\n <button matIconButton (click)=\"onLogin()\">\n <mat-icon class=\"icon\">login</mat-icon>\n </button>\n }\n</mat-toolbar>\n", styles: [".topbar-spacer{flex:1 1 auto}.toolbar{height:60px;background-size:cover;--mat-toolbar-container-background-color: var(--mat-sys-primary);--mat-toolbar-container-text-color: var(--mat-sys-on-primary)}.logo{height:50px;margin-top:5px}.icon{color:var(--mat-sys-on-primary)}\n"] }]
|
|
2301
|
+
MatMenuModule], template: "<mat-toolbar class=\"toolbar\" [style.background-image]=\"backgroundStyle\">\n\n @if(logo())\n {\n <a aria-label=\"Home\" [routerLink]=\"['home']\">\n <img src=\"{{logo()}}\" class=\"logo\" alt=\"Website logo\"/>\n </a>\n }\n @else {\n <a mat-icon-button aria-label=\"Home\" [routerLink]=\"['home']\">\n <mat-icon class=\"icon\">home</mat-icon>\n </a>\n <span>{{title()}}</span>\n }\n @if(user()){\n <button mat-icon-button style=\"margin: 5px\" aria-label=\"Toggle Nav Bar\">\n <mat-icon class=\"icon\" (click)=\"leftNavService.toggle()\">\n @if(leftNavService.wide()){\n menu\n }\n @else {\n menu_open\n }\n </mat-icon>\n </button>\n }\n\n <span class=\"topbar-spacer\"></span>\n @if(user(); as user)\n {\n <span>{{user.username}}</span>\n \n <button mat-icon-button style=\"margin: 5px\" aria-label=\"User Profile\" [matMenuTriggerFor]=\"profile_menu\">\n <mat-icon class=\"icon\">person</mat-icon>\n </button>\n\n <mat-menu #profile_menu=\"matMenu\">\n <a mat-menu-item aria-label=\"My Profile\" [routerLink]=\"['/members/detail', user.id]\">\n <mat-icon>manage_accounts</mat-icon>\n <span>My Profile</span>\n </a> \n <a mat-menu-item aria-label=\"Get Support\" [routerLink]=\"['/feedback']\">\n <mat-icon>contact_support</mat-icon>\n <span>Get Support</span>\n </a> \n <button mat-menu-item (click)=\"onLogout()\">\n <mat-icon>logout</mat-icon>\n <span>Log Out</span>\n </button>\n\n </mat-menu>\n }\n @else {\n <span>Log In</span>\n <button matIconButton (click)=\"onLogin()\">\n <mat-icon class=\"icon\">login</mat-icon>\n </button>\n }\n</mat-toolbar>\n", styles: [".topbar-spacer{flex:1 1 auto}.toolbar{height:60px;background-size:cover;--mat-toolbar-container-background-color: var(--mat-sys-primary);--mat-toolbar-container-text-color: var(--mat-sys-on-primary)}.logo{height:50px;margin-top:5px}.icon{color:var(--mat-sys-on-primary)}\n"] }]
|
|
2099
2302
|
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], logo: [{ type: i0.Input, args: [{ isSignal: true, alias: "logo", required: false }] }], background: [{ type: i0.Input, args: [{ isSignal: true, alias: "background", required: false }] }], loginRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "loginRoute", required: false }] }] } });
|
|
2100
2303
|
|
|
2101
2304
|
class LeftNavComponent {
|
|
@@ -2120,7 +2323,7 @@ class LeftNavComponent {
|
|
|
2120
2323
|
}
|
|
2121
2324
|
}
|
|
2122
2325
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: LeftNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2123
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: LeftNavComponent, isStandalone: true, selector: "lib-left-nav", inputs: { background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "sideNavContent", first: true, predicate: MatSidenavContent, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-sidenav-container class=\"leftnav-container\">\n @if(leftNavService.wide()){\n <mat-sidenav mode=\"side\" class=\"leftnav-side\" [opened]=\"user()!== null\" style=\"width:200px; padding-top:0px\">\n <mat-nav-list>\n @for (grouping of leftNavService.activeGroupings(); track grouping) { \n <ul>\n @if(grouping.name)\n {\n <span>{{grouping.name}}</span>\n }\n @for (option of grouping.options; track option) {\n <li>\n <a mat-list-item \n [routerLink]=\"option.route\" \n routerLinkActive #rla=\"routerLinkActive\" \n [activated]=\"rla.isActive\">\n <div style=\"display:flex; vertical-align:middle;\">\n <mat-icon style=\"margin-right: 5px;\">{{option.icon}}</mat-icon><span>{{ option.name }}</span>\n </div>\n </a>\n </li>\n }\n </ul>\n }\n </mat-nav-list>\n </mat-sidenav>\n }\n @else{\n <mat-sidenav mode=\"side\" class=\"leftnav-side\" [opened]=\"user()!== null\" style=\"width: 64px;\">\n <mat-nav-list>\n @for (grouping of leftNavService.activeGroupings(); track grouping) { \n <ul>\n @if(grouping.name)\n {\n <span>{{grouping.name}}</span>\n }\n @for (option of grouping.options; track option) {\n <li>\n <a mat-list-item \n [routerLink]=\"option.route\" \n routerLinkActive #rla=\"routerLinkActive\" \n [activated]=\"rla.isActive\" matTooltip=\"{{option.name}}\">\n <div style=\"display:flex; vertical-align:middle;\">\n <mat-icon>{{option.icon}}</mat-icon>\n </div>\n </a>\n </li>\n }\n </ul>\n }\n </mat-nav-list>\n </mat-sidenav>\n }\n\n <mat-sidenav-content class=\"leftnav-content\" [style.background-image]=\"backgroundStyle\"> \n <router-outlet />\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}.leftnav-container{flex-grow:1;display:flex}.leftnav-content{display:flex;flex-grow:1;height:90vh;background-blend-mode:lighten;background-color:#ffffffa6;background-size:cover}.leftnav-side{padding:5px}ul,li{margin:0;padding:0;list-style-type:none;padding-inline-start:0;list-style:none}\n"], dependencies: [{ kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i1$
|
|
2326
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: LeftNavComponent, isStandalone: true, selector: "lib-left-nav", inputs: { background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "sideNavContent", first: true, predicate: MatSidenavContent, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-sidenav-container class=\"leftnav-container\">\n @if(leftNavService.wide()){\n <mat-sidenav mode=\"side\" class=\"leftnav-side\" [opened]=\"user()!== null\" style=\"width:200px; padding-top:0px\">\n <mat-nav-list>\n @for (grouping of leftNavService.activeGroupings(); track grouping) { \n <ul>\n @if(grouping.name)\n {\n <span>{{grouping.name}}</span>\n }\n @for (option of grouping.options; track option) {\n <li>\n <a mat-list-item \n [routerLink]=\"option.route\" \n routerLinkActive #rla=\"routerLinkActive\" \n [activated]=\"rla.isActive\">\n <div style=\"display:flex; vertical-align:middle;\">\n <mat-icon style=\"margin-right: 5px;\">{{option.icon}}</mat-icon><span>{{ option.name }}</span>\n </div>\n </a>\n </li>\n }\n </ul>\n }\n </mat-nav-list>\n </mat-sidenav>\n }\n @else{\n <mat-sidenav mode=\"side\" class=\"leftnav-side\" [opened]=\"user()!== null\" style=\"width: 64px;\">\n <mat-nav-list>\n @for (grouping of leftNavService.activeGroupings(); track grouping) { \n <ul>\n @if(grouping.name)\n {\n <span>{{grouping.name}}</span>\n }\n @for (option of grouping.options; track option) {\n <li>\n <a mat-list-item \n [routerLink]=\"option.route\" \n routerLinkActive #rla=\"routerLinkActive\" \n [activated]=\"rla.isActive\" matTooltip=\"{{option.name}}\">\n <div style=\"display:flex; vertical-align:middle;\">\n <mat-icon>{{option.icon}}</mat-icon>\n </div>\n </a>\n </li>\n }\n </ul>\n }\n </mat-nav-list>\n </mat-sidenav>\n }\n\n <mat-sidenav-content class=\"leftnav-content\" [style.background-image]=\"backgroundStyle\"> \n <router-outlet />\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}.leftnav-container{flex-grow:1;display:flex}.leftnav-content{display:flex;flex-grow:1;height:90vh;background-blend-mode:lighten;background-color:#ffffffa6;background-size:cover}.leftnav-side{padding:5px}ul,li{margin:0;padding:0;list-style-type:none;padding-inline-start:0;list-style:none}\n"], dependencies: [{ kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i1$5.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i1$5.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i1$5.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i2$1.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i2$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
|
|
2124
2327
|
}
|
|
2125
2328
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: LeftNavComponent, decorators: [{
|
|
2126
2329
|
type: Component,
|
|
@@ -2164,11 +2367,11 @@ class UserDetailComponent extends DetailView {
|
|
|
2164
2367
|
return super.canEdit();
|
|
2165
2368
|
}
|
|
2166
2369
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2167
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: UserDetailComponent, isStandalone: true, selector: "lib-user-detail", inputs: { showBack: { classPropertyName: "showBack", publicName: "showBack", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "@if(showBack())\n{\n<lib-back-button
|
|
2370
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: UserDetailComponent, isStandalone: true, selector: "lib-user-detail", inputs: { showBack: { classPropertyName: "showBack", publicName: "showBack", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "@if(showBack())\n{\n<lib-back-button></lib-back-button>\n}\n\n<div class=\"content-container\">\n @if(item(); as item){\n <div class=\"item-detail-container\">\n\n @if(item.profile){\n <div class=\"image-holder\">\n <img alt=\"User Profile Image\" src=\"{{item.profile}}\" style=\"height:120px;\">\n </div> \n }\n\n <lib-detail-header\n [text]=\"item.first_name + ' ' + item.last_name\"\n [id]=\"item.id\"\n [route]=\"itemService.typePlural()\"\n [canEdit]=\"canEdit()\"\n [canDelete]=\"canDelete()\"\n (onDelete)=\"onDelete()\"></lib-detail-header>\n\n <div class=\"form-card-left\" style=\"width:50%\">\n <div class=\"item-field\">\n <span><b>Username: </b></span>\n {{item.username}}\n </div>\n\n <div class=\"item-field\">\n <span><b>Email: </b></span>\n {{item.email}}\n </div>\n \n </div>\n \n </div>\n }\n</div>\n", styles: [":host{flex-grow:1}\n"], dependencies: [{ kind: "component", type: BackButtonComponent, selector: "lib-back-button" }, { kind: "component", type: DetailHeaderComponent, selector: "lib-detail-header", inputs: ["id", "text", "route", "canEdit", "canDelete"], outputs: ["deleteClicked"] }] });
|
|
2168
2371
|
}
|
|
2169
2372
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserDetailComponent, decorators: [{
|
|
2170
2373
|
type: Component,
|
|
2171
|
-
args: [{ selector: 'lib-user-detail', imports: [BackButtonComponent, DetailHeaderComponent], template: "@if(showBack())\n{\n<lib-back-button
|
|
2374
|
+
args: [{ selector: 'lib-user-detail', imports: [BackButtonComponent, DetailHeaderComponent], template: "@if(showBack())\n{\n<lib-back-button></lib-back-button>\n}\n\n<div class=\"content-container\">\n @if(item(); as item){\n <div class=\"item-detail-container\">\n\n @if(item.profile){\n <div class=\"image-holder\">\n <img alt=\"User Profile Image\" src=\"{{item.profile}}\" style=\"height:120px;\">\n </div> \n }\n\n <lib-detail-header\n [text]=\"item.first_name + ' ' + item.last_name\"\n [id]=\"item.id\"\n [route]=\"itemService.typePlural()\"\n [canEdit]=\"canEdit()\"\n [canDelete]=\"canDelete()\"\n (onDelete)=\"onDelete()\"></lib-detail-header>\n\n <div class=\"form-card-left\" style=\"width:50%\">\n <div class=\"item-field\">\n <span><b>Username: </b></span>\n {{item.username}}\n </div>\n\n <div class=\"item-field\">\n <span><b>Email: </b></span>\n {{item.email}}\n </div>\n \n </div>\n \n </div>\n }\n</div>\n", styles: [":host{flex-grow:1}\n"] }]
|
|
2172
2375
|
}], ctorParameters: () => [], propDecorators: { showBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBack", required: false }] }] } });
|
|
2173
2376
|
|
|
2174
2377
|
class UserForm {
|
|
@@ -2232,7 +2435,7 @@ class UserEditComponent extends EditView {
|
|
|
2232
2435
|
return this.form.form.get('profile');
|
|
2233
2436
|
}
|
|
2234
2437
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2235
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: UserEditComponent, isStandalone: true, selector: "lib-user-edit", usesInheritance: true, ngImport: i0, template: "<lib-back-button></lib-back-button>\n\n<div class=\"content-container\">\n\n <div class=\"item-edit-container\">\n\n <h1 class=\"item-edit-header\">{{heading() | titlecase}}</h1>\n\n <form class=\"form-card\" [formGroup]=\"form.form\" (ngSubmit)=\"submit()\">\n <mat-form-field class=\"form-field-wide\">\n <mat-label>Username</mat-label>\n <input matInput\n placeholder=\"Username\"\n type=\"text\"\n formControlName=\"username\"\n name=\"username\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field-wide\">\n <mat-label>Email</mat-label>\n <input matInput\n placeholder=\"Email\"\n type=\"text\"\n formControlName=\"email\"\n name=\"email\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label>First Name</mat-label>\n <input matInput\n placeholder=\"First Name\"\n type=\"text\"\n formControlName=\"first_name\"\n name=\"first_name\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field\">\n <mat-label>Last Name</mat-label>\n <input matInput\n placeholder=\"Last Name\"\n type=\"text\"\n formControlName=\"last_name\"\n name=\"last_name\">\n </mat-form-field>\n\n
|
|
2438
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: UserEditComponent, isStandalone: true, selector: "lib-user-edit", usesInheritance: true, ngImport: i0, template: "<lib-back-button></lib-back-button>\n\n<div class=\"content-container\">\n\n <div class=\"item-edit-container\">\n\n <h1 class=\"item-edit-header\">{{heading() | titlecase}}</h1>\n\n <form class=\"form-card\" [formGroup]=\"form.form\" (ngSubmit)=\"submit()\">\n\n <lib-file-upload [control]=\"profileControl\"></lib-file-upload>\n\n <mat-form-field class=\"form-field-wide\">\n <mat-label>Username</mat-label>\n <input matInput\n placeholder=\"Username\"\n type=\"text\"\n formControlName=\"username\"\n name=\"username\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field-wide\">\n <mat-label>Email</mat-label>\n <input matInput\n placeholder=\"Email\"\n type=\"text\"\n formControlName=\"email\"\n name=\"email\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label>First Name</mat-label>\n <input matInput\n placeholder=\"First Name\"\n type=\"text\"\n formControlName=\"first_name\"\n name=\"first_name\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field\">\n <mat-label>Last Name</mat-label>\n <input matInput\n placeholder=\"Last Name\"\n type=\"text\"\n formControlName=\"last_name\"\n name=\"last_name\">\n </mat-form-field>\n\n <div class=\"button-group\">\n <button mat-fab\n class=\"form-action-button\"\n type=\"submit\"\n matTooltip=\"Save\"\n [disabled]=\"!form.form.valid || !form.form.dirty\">\n <mat-icon>save</mat-icon></button>\n \n <button mat-fab\n class=\"form-action-button\"\n type=\"button\"\n matTooltip=\"Cancel\"\n (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon></button>\n </div> \n </form>\n </div>\n</div>\n", styles: [":host{flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: BackButtonComponent, selector: "lib-back-button" }, { 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: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: FileUploadComponent, selector: "lib-file-upload", inputs: ["control"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }] });
|
|
2236
2439
|
}
|
|
2237
2440
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserEditComponent, decorators: [{
|
|
2238
2441
|
type: Component,
|
|
@@ -2243,11 +2446,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
2243
2446
|
MatInputModule,
|
|
2244
2447
|
MatFormFieldModule,
|
|
2245
2448
|
MatIconModule,
|
|
2449
|
+
MatTooltipModule,
|
|
2246
2450
|
FileUploadComponent,
|
|
2247
2451
|
TitleCasePipe
|
|
2248
|
-
], template: "<lib-back-button></lib-back-button>\n\n<div class=\"content-container\">\n\n <div class=\"item-edit-container\">\n\n <h1 class=\"item-edit-header\">{{heading() | titlecase}}</h1>\n\n <form class=\"form-card\" [formGroup]=\"form.form\" (ngSubmit)=\"submit()\">\n <mat-form-field class=\"form-field-wide\">\n <mat-label>Username</mat-label>\n <input matInput\n placeholder=\"Username\"\n type=\"text\"\n formControlName=\"username\"\n name=\"username\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field-wide\">\n <mat-label>Email</mat-label>\n <input matInput\n placeholder=\"Email\"\n type=\"text\"\n formControlName=\"email\"\n name=\"email\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label>First Name</mat-label>\n <input matInput\n placeholder=\"First Name\"\n type=\"text\"\n formControlName=\"first_name\"\n name=\"first_name\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field\">\n <mat-label>Last Name</mat-label>\n <input matInput\n placeholder=\"Last Name\"\n type=\"text\"\n formControlName=\"last_name\"\n name=\"last_name\">\n </mat-form-field>\n\n
|
|
2452
|
+
], template: "<lib-back-button></lib-back-button>\n\n<div class=\"content-container\">\n\n <div class=\"item-edit-container\">\n\n <h1 class=\"item-edit-header\">{{heading() | titlecase}}</h1>\n\n <form class=\"form-card\" [formGroup]=\"form.form\" (ngSubmit)=\"submit()\">\n\n <lib-file-upload [control]=\"profileControl\"></lib-file-upload>\n\n <mat-form-field class=\"form-field-wide\">\n <mat-label>Username</mat-label>\n <input matInput\n placeholder=\"Username\"\n type=\"text\"\n formControlName=\"username\"\n name=\"username\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field-wide\">\n <mat-label>Email</mat-label>\n <input matInput\n placeholder=\"Email\"\n type=\"text\"\n formControlName=\"email\"\n name=\"email\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label>First Name</mat-label>\n <input matInput\n placeholder=\"First Name\"\n type=\"text\"\n formControlName=\"first_name\"\n name=\"first_name\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field\">\n <mat-label>Last Name</mat-label>\n <input matInput\n placeholder=\"Last Name\"\n type=\"text\"\n formControlName=\"last_name\"\n name=\"last_name\">\n </mat-form-field>\n\n <div class=\"button-group\">\n <button mat-fab\n class=\"form-action-button\"\n type=\"submit\"\n matTooltip=\"Save\"\n [disabled]=\"!form.form.valid || !form.form.dirty\">\n <mat-icon>save</mat-icon></button>\n \n <button mat-fab\n class=\"form-action-button\"\n type=\"button\"\n matTooltip=\"Cancel\"\n (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon></button>\n </div> \n </form>\n </div>\n</div>\n", styles: [":host{flex-grow:1}\n"] }]
|
|
2249
2453
|
}], ctorParameters: () => [] });
|
|
2250
2454
|
|
|
2455
|
+
class UserCreateForm {
|
|
2456
|
+
type;
|
|
2457
|
+
resource_id;
|
|
2458
|
+
constructor(type = "", resource_id = null) {
|
|
2459
|
+
this.type = type;
|
|
2460
|
+
this.resource_id = resource_id;
|
|
2461
|
+
}
|
|
2462
|
+
fb = inject(FormBuilder);
|
|
2463
|
+
form = this.fb.group({
|
|
2464
|
+
username: this.fb.control('', Validators.required),
|
|
2465
|
+
email: this.fb.control('', Validators.required),
|
|
2466
|
+
first_name: this.fb.control('', Validators.required),
|
|
2467
|
+
last_name: this.fb.control('', Validators.required),
|
|
2468
|
+
});
|
|
2469
|
+
createItem() {
|
|
2470
|
+
const value = this.form.value;
|
|
2471
|
+
return {
|
|
2472
|
+
username: value.username || "",
|
|
2473
|
+
email: value.email || "",
|
|
2474
|
+
first_name: value.first_name || "",
|
|
2475
|
+
last_name: value.last_name || "",
|
|
2476
|
+
type: this.type,
|
|
2477
|
+
resource_id: this.resource_id
|
|
2478
|
+
};
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
class UserCreateComponent {
|
|
2483
|
+
form = new UserCreateForm();
|
|
2484
|
+
userService = inject(UserService);
|
|
2485
|
+
submit() {
|
|
2486
|
+
this.userService.inviteMember(this.form.createItem()).subscribe({ next: (_) => { }, error: (_) => { } });
|
|
2487
|
+
}
|
|
2488
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2489
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: UserCreateComponent, isStandalone: true, selector: "lib-user-create", ngImport: i0, template: "<lib-back-button></lib-back-button>\n\n<div class=\"content-container\">\n\n <div class=\"item-edit-container\">\n\n <h1 class=\"item-edit-header\">Invite Member</h1>\n\n <form class=\"form-card\" [formGroup]=\"form.form\" (ngSubmit)=\"submit()\">\n\n <mat-form-field class=\"form-field-wide\">\n <mat-label>Username</mat-label>\n <input matInput\n placeholder=\"Username\"\n type=\"text\"\n formControlName=\"username\"\n name=\"username\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field-wide\">\n <mat-label>Email</mat-label>\n <input matInput\n placeholder=\"Email\"\n type=\"text\"\n formControlName=\"email\"\n name=\"email\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label>First Name</mat-label>\n <input matInput\n placeholder=\"First Name\"\n type=\"text\"\n formControlName=\"first_name\"\n name=\"first_name\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field\">\n <mat-label>Last Name</mat-label>\n <input matInput\n placeholder=\"Last Name\"\n type=\"text\"\n formControlName=\"last_name\"\n name=\"last_name\">\n </mat-form-field>\n\n <div class=\"button-group\">\n <button mat-fab\n class=\"form-action-button\"\n type=\"submit\"\n matTooltip=\"Save\"\n [disabled]=\"!form.form.valid || !form.form.dirty\">\n <mat-icon>save</mat-icon></button>\n </div> \n </form>\n </div>\n</div>\n", styles: [":host{flex-grow:1}\n"], dependencies: [{ kind: "component", type: BackButtonComponent, selector: "lib-back-button" }, { 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: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }] });
|
|
2490
|
+
}
|
|
2491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserCreateComponent, decorators: [{
|
|
2492
|
+
type: Component,
|
|
2493
|
+
args: [{ selector: 'lib-user-create', imports: [BackButtonComponent, MatInputModule, ReactiveFormsModule, MatIconModule, MatButtonModule], template: "<lib-back-button></lib-back-button>\n\n<div class=\"content-container\">\n\n <div class=\"item-edit-container\">\n\n <h1 class=\"item-edit-header\">Invite Member</h1>\n\n <form class=\"form-card\" [formGroup]=\"form.form\" (ngSubmit)=\"submit()\">\n\n <mat-form-field class=\"form-field-wide\">\n <mat-label>Username</mat-label>\n <input matInput\n placeholder=\"Username\"\n type=\"text\"\n formControlName=\"username\"\n name=\"username\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field-wide\">\n <mat-label>Email</mat-label>\n <input matInput\n placeholder=\"Email\"\n type=\"text\"\n formControlName=\"email\"\n name=\"email\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label>First Name</mat-label>\n <input matInput\n placeholder=\"First Name\"\n type=\"text\"\n formControlName=\"first_name\"\n name=\"first_name\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field\">\n <mat-label>Last Name</mat-label>\n <input matInput\n placeholder=\"Last Name\"\n type=\"text\"\n formControlName=\"last_name\"\n name=\"last_name\">\n </mat-form-field>\n\n <div class=\"button-group\">\n <button mat-fab\n class=\"form-action-button\"\n type=\"submit\"\n matTooltip=\"Save\"\n [disabled]=\"!form.form.valid || !form.form.dirty\">\n <mat-icon>save</mat-icon></button>\n </div> \n </form>\n </div>\n</div>\n", styles: [":host{flex-grow:1}\n"] }]
|
|
2494
|
+
}] });
|
|
2495
|
+
|
|
2251
2496
|
class UserListDetailComponent {
|
|
2252
2497
|
item = input.required(...(ngDevMode ? [{ debugName: "item" }] : []));
|
|
2253
2498
|
even = input(true, ...(ngDevMode ? [{ debugName: "even" }] : []));
|
|
@@ -2261,11 +2506,11 @@ class UserListDetailComponent {
|
|
|
2261
2506
|
}
|
|
2262
2507
|
}
|
|
2263
2508
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserListDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2264
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: UserListDetailComponent, isStandalone: true, selector: "lib-user-list-detail", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, even: { classPropertyName: "even", publicName: "even", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div mat-list-item class=\"container\" [class.even]=\"even() && !selected()\" [class.selected]=\"selected()\">\n @if(item().profile_thumbnail){\n <div class=\"image-holder\" style=\"width:35px;\">\n <img matListItemAvatar \n alt=\"User Avatar\" \n src=\"{{item().profile_thumbnail}}\" style=\"height:30px\">\n </div> \n }\n @else {\n <div class=\"image-holder\" style=\"width:35px;\">\n <mat-icon matListItemIcon>person</mat-icon>\n </div>\n }\n <div class=\"text-container\">\n <p matListItemTitle style=\"margin-bottom: 0px; margin-top: 0px\">{{title}}</p>\n <p matListItemLine>{{item().email}}</p>\n </div>\n</div>", styles: [":host{flex-grow:1}.container{height:60px;
|
|
2509
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: UserListDetailComponent, isStandalone: true, selector: "lib-user-list-detail", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, even: { classPropertyName: "even", publicName: "even", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div mat-list-item class=\"container\" [class.even]=\"even() && !selected()\" [class.selected]=\"selected()\">\n @if(item().profile_thumbnail){\n <div class=\"image-holder\" style=\"width:35px;\">\n <img matListItemAvatar \n alt=\"User Avatar\" \n src=\"{{item().profile_thumbnail}}\" style=\"height:30px\">\n </div> \n }\n @else {\n <div class=\"image-holder\" style=\"width:35px;\">\n <mat-icon matListItemIcon>person</mat-icon>\n </div>\n }\n <div class=\"text-container\">\n <p matListItemTitle style=\"margin-bottom: 0px; margin-top: 0px\">{{title}}</p>\n <p matListItemLine>{{item().email}}</p>\n </div>\n</div>", styles: [":host{flex-grow:1}.container{height:60px;width:100%;display:flex;padding-top:5px;border-radius:12px;flex-direction:row;background-color:var(--mat-sys-surface-container-lowest)}.container:hover{background-color:var(--mat-sys-surface-container-high);cursor:pointer}.even{background-color:var(--mat-sys-surface-container-low)}.selected{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatListModule }, { kind: "directive", type: i2$1.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i2$1.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i2$1.MatListItemLine, selector: "[matListItemLine]" }, { kind: "directive", type: i2$1.MatListItemTitle, selector: "[matListItemTitle]" }] });
|
|
2265
2510
|
}
|
|
2266
2511
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserListDetailComponent, decorators: [{
|
|
2267
2512
|
type: Component,
|
|
2268
|
-
args: [{ selector: 'lib-user-list-detail', imports: [MatIconModule, MatListModule], template: "<div mat-list-item class=\"container\" [class.even]=\"even() && !selected()\" [class.selected]=\"selected()\">\n @if(item().profile_thumbnail){\n <div class=\"image-holder\" style=\"width:35px;\">\n <img matListItemAvatar \n alt=\"User Avatar\" \n src=\"{{item().profile_thumbnail}}\" style=\"height:30px\">\n </div> \n }\n @else {\n <div class=\"image-holder\" style=\"width:35px;\">\n <mat-icon matListItemIcon>person</mat-icon>\n </div>\n }\n <div class=\"text-container\">\n <p matListItemTitle style=\"margin-bottom: 0px; margin-top: 0px\">{{title}}</p>\n <p matListItemLine>{{item().email}}</p>\n </div>\n</div>", styles: [":host{flex-grow:1}.container{height:60px;
|
|
2513
|
+
args: [{ selector: 'lib-user-list-detail', imports: [MatIconModule, MatListModule], template: "<div mat-list-item class=\"container\" [class.even]=\"even() && !selected()\" [class.selected]=\"selected()\">\n @if(item().profile_thumbnail){\n <div class=\"image-holder\" style=\"width:35px;\">\n <img matListItemAvatar \n alt=\"User Avatar\" \n src=\"{{item().profile_thumbnail}}\" style=\"height:30px\">\n </div> \n }\n @else {\n <div class=\"image-holder\" style=\"width:35px;\">\n <mat-icon matListItemIcon>person</mat-icon>\n </div>\n }\n <div class=\"text-container\">\n <p matListItemTitle style=\"margin-bottom: 0px; margin-top: 0px\">{{title}}</p>\n <p matListItemLine>{{item().email}}</p>\n </div>\n</div>", styles: [":host{flex-grow:1}.container{height:60px;width:100%;display:flex;padding-top:5px;border-radius:12px;flex-direction:row;background-color:var(--mat-sys-surface-container-lowest)}.container:hover{background-color:var(--mat-sys-surface-container-high);cursor:pointer}.even{background-color:var(--mat-sys-surface-container-low)}.selected{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"] }]
|
|
2269
2514
|
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], even: [{ type: i0.Input, args: [{ isSignal: true, alias: "even", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }] } });
|
|
2270
2515
|
|
|
2271
2516
|
class UserComponent {
|
|
@@ -2277,13 +2522,13 @@ class UserComponent {
|
|
|
2277
2522
|
}
|
|
2278
2523
|
}
|
|
2279
2524
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2280
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.3", type: UserComponent, isStandalone: true, selector: "lib-user", viewQueries: [{ propertyName: "detailView", first: true, predicate: UserDetailComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<lib-list-view\n [itemService]=\"itemService\"\n [listItemTemplate]=\"listItemTemplate\"\n [itemDetailTemplate]=\"itemDetailTemplate\"\n [viewType]=\"'list'\"\n [itemHeight]=\"
|
|
2525
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.3", type: UserComponent, isStandalone: true, selector: "lib-user", viewQueries: [{ propertyName: "detailView", first: true, predicate: UserDetailComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<lib-list-view\n [itemService]=\"itemService\"\n [listItemTemplate]=\"listItemTemplate\"\n [itemDetailTemplate]=\"itemDetailTemplate\"\n [viewType]=\"'list'\"\n [itemHeight]=\"62\"\n [itemWidth]=\"400\"\n (selected)=\"onSelected($event)\"\n >\n <ng-template #listItemTemplate let-item=\"item\" let-even=\"even\" let-selected=\"selected\">\n <lib-user-list-detail [item]=\"item\" [even]=\"even\" [selected]=\"selected\"></lib-user-list-detail>\n </ng-template>\n\n <ng-template #itemDetailTemplate>\n <lib-user-detail [showBack]='false'></lib-user-detail>\n </ng-template>\n\n</lib-list-view>\n\n", styles: [":host{flex-grow:1}\n"], dependencies: [{ kind: "component", type: ListViewComponent, selector: "lib-list-view", inputs: ["viewType", "itemService", "listItemTemplate", "itemDetailTemplate", "itemHeight", "itemWidth", "columns", "sortFields", "noSelfItemsMessage", "noItemsCanCreateMessage", "noItemsMessage", "defaultQueries", "filters", "embeddedMode"], outputs: ["selected"] }, { kind: "component", type: UserListDetailComponent, selector: "lib-user-list-detail", inputs: ["item", "even", "selected"] }, { kind: "component", type: UserDetailComponent, selector: "lib-user-detail", inputs: ["showBack"] }] });
|
|
2281
2526
|
}
|
|
2282
2527
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserComponent, decorators: [{
|
|
2283
2528
|
type: Component,
|
|
2284
2529
|
args: [{ selector: 'lib-user', imports: [ListViewComponent,
|
|
2285
2530
|
UserListDetailComponent,
|
|
2286
|
-
UserDetailComponent], template: "<lib-list-view\n [itemService]=\"itemService\"\n [listItemTemplate]=\"listItemTemplate\"\n [itemDetailTemplate]=\"itemDetailTemplate\"\n [viewType]=\"'list'\"\n [itemHeight]=\"
|
|
2531
|
+
UserDetailComponent], template: "<lib-list-view\n [itemService]=\"itemService\"\n [listItemTemplate]=\"listItemTemplate\"\n [itemDetailTemplate]=\"itemDetailTemplate\"\n [viewType]=\"'list'\"\n [itemHeight]=\"62\"\n [itemWidth]=\"400\"\n (selected)=\"onSelected($event)\"\n >\n <ng-template #listItemTemplate let-item=\"item\" let-even=\"even\" let-selected=\"selected\">\n <lib-user-list-detail [item]=\"item\" [even]=\"even\" [selected]=\"selected\"></lib-user-list-detail>\n </ng-template>\n\n <ng-template #itemDetailTemplate>\n <lib-user-detail [showBack]='false'></lib-user-detail>\n </ng-template>\n\n</lib-list-view>\n\n", styles: [":host{flex-grow:1}\n"] }]
|
|
2287
2532
|
}], propDecorators: { detailView: [{ type: i0.ViewChild, args: [i0.forwardRef(() => UserDetailComponent), { isSignal: true }] }] } });
|
|
2288
2533
|
|
|
2289
2534
|
class GroupDetailComponent extends DetailView {
|
|
@@ -2295,14 +2540,82 @@ class GroupDetailComponent extends DetailView {
|
|
|
2295
2540
|
this.onInit();
|
|
2296
2541
|
}
|
|
2297
2542
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GroupDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2298
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: GroupDetailComponent, isStandalone: true, selector: "lib-group-detail", inputs: { showBack: { classPropertyName: "showBack", publicName: "showBack", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "@if(showBack())\n{\n<lib-back-button
|
|
2543
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: GroupDetailComponent, isStandalone: true, selector: "lib-group-detail", inputs: { showBack: { classPropertyName: "showBack", publicName: "showBack", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "@if(showBack())\n{\n<lib-back-button></lib-back-button>\n}\n\n<div class=\"content-container\">\n @if(item(); as item) {\n <div class=\"item-detail-container\">\n\n <lib-detail-header\n [text]=\"item.name\"\n [id]=\"item.id\"\n [canEdit]=\"itemService.canEdit()\"\n [canDelete]=\"itemService.canDelete()\"\n [route]=\"itemService.typePlural()\"></lib-detail-header>\n \n <div class=\"item-field\">{{item.name}}</div>\n </div>\n }\n</div>\n", styles: [":host{flex-grow:1}\n"], dependencies: [{ kind: "component", type: BackButtonComponent, selector: "lib-back-button" }, { kind: "component", type: DetailHeaderComponent, selector: "lib-detail-header", inputs: ["id", "text", "route", "canEdit", "canDelete"], outputs: ["deleteClicked"] }] });
|
|
2299
2544
|
}
|
|
2300
2545
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GroupDetailComponent, decorators: [{
|
|
2301
2546
|
type: Component,
|
|
2302
2547
|
args: [{ selector: 'lib-group-detail', imports: [BackButtonComponent,
|
|
2303
|
-
DetailHeaderComponent], template: "@if(showBack())\n{\n<lib-back-button
|
|
2548
|
+
DetailHeaderComponent], template: "@if(showBack())\n{\n<lib-back-button></lib-back-button>\n}\n\n<div class=\"content-container\">\n @if(item(); as item) {\n <div class=\"item-detail-container\">\n\n <lib-detail-header\n [text]=\"item.name\"\n [id]=\"item.id\"\n [canEdit]=\"itemService.canEdit()\"\n [canDelete]=\"itemService.canDelete()\"\n [route]=\"itemService.typePlural()\"></lib-detail-header>\n \n <div class=\"item-field\">{{item.name}}</div>\n </div>\n }\n</div>\n", styles: [":host{flex-grow:1}\n"] }]
|
|
2304
2549
|
}], ctorParameters: () => [], propDecorators: { showBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBack", required: false }] }] } });
|
|
2305
2550
|
|
|
2551
|
+
class GroupForm {
|
|
2552
|
+
fb = inject(FormBuilder);
|
|
2553
|
+
form;
|
|
2554
|
+
constructor() {
|
|
2555
|
+
this.form = GroupForm.createForm(this.fb);
|
|
2556
|
+
}
|
|
2557
|
+
static createForm(fb) {
|
|
2558
|
+
return fb.group({
|
|
2559
|
+
name: fb.control('', Validators.required)
|
|
2560
|
+
});
|
|
2561
|
+
}
|
|
2562
|
+
setValue(item) {
|
|
2563
|
+
this.form.patchValue({
|
|
2564
|
+
name: item.name,
|
|
2565
|
+
});
|
|
2566
|
+
}
|
|
2567
|
+
createItem() {
|
|
2568
|
+
const value = this.form.value;
|
|
2569
|
+
return {
|
|
2570
|
+
name: value.name || "",
|
|
2571
|
+
user_set: []
|
|
2572
|
+
};
|
|
2573
|
+
}
|
|
2574
|
+
updateItem(item) {
|
|
2575
|
+
item.name = this.form.value.name || "";
|
|
2576
|
+
return item;
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
class GroupEditComponent extends EditView {
|
|
2581
|
+
selectionManager = new MemberSelectionManager();
|
|
2582
|
+
constructor() {
|
|
2583
|
+
super(inject(GroupService), new GroupForm());
|
|
2584
|
+
}
|
|
2585
|
+
ngOnInit() {
|
|
2586
|
+
this.onInit();
|
|
2587
|
+
}
|
|
2588
|
+
get showSubmit() {
|
|
2589
|
+
return this.form.form.valid && (this.form.form.dirty || this.selectionManager.dirty());
|
|
2590
|
+
}
|
|
2591
|
+
createItem() {
|
|
2592
|
+
const item = this.form.createItem();
|
|
2593
|
+
item.user_set = this.selectionManager.selected().map(m => m.url);
|
|
2594
|
+
return item;
|
|
2595
|
+
}
|
|
2596
|
+
updateItem(item) {
|
|
2597
|
+
item = this.form.updateItem(item);
|
|
2598
|
+
item.user_set = this.selectionManager.selected().map(m => m.url);
|
|
2599
|
+
return item;
|
|
2600
|
+
}
|
|
2601
|
+
onItemAndUserAvailable(item, _) {
|
|
2602
|
+
this.selectionManager.fetchCandidates(this.itemService.typePlural() + "__id", item.id);
|
|
2603
|
+
}
|
|
2604
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GroupEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2605
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: GroupEditComponent, isStandalone: true, selector: "lib-group-edit", usesInheritance: true, ngImport: i0, template: "<lib-back-button></lib-back-button>\n\n<div class=\"content-container\">\n\n <div class=\"item-edit-container\">\n \n <h1 class=\"item-edit-header\">{{heading() | titlecase}}</h1>\n\n <form class=\"form-card\" [formGroup]=\"form.form\" (ngSubmit)=\"submit()\">\n\n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"name\">Name</mat-label>\n <input matInput placeholder=\"Name\"\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n name=\"name\"\n required>\n </mat-form-field>\n \n <lib-select-table style=\"width:100%\" [selected]=\"selectionManager.selected()\"\n [itemType]=\"'Members'\"\n [columns]=\"selectionManager.columns\"\n [itemTemplate]=\"itemTemplate\"\n [options]=\"selectionManager.candidates()\"\n (itemAdded)=\"selectionManager.onAdded($event)\"\n (itemRemoved)=\"selectionManager.onRemoved($event)\"\n (searchChanged)=\"selectionManager.onSearchChanged($event)\">\n </lib-select-table>\n <ng-template #itemTemplate let-item=\"item\">\n <div>\n <p><b>{{item.first_name}} {{item.last_name}} ({{item.username}})</b></p>\n <p>{{item.email}}</p>\n </div>\n </ng-template>\n\n <div class=\"button-group\">\n <button mat-fab\n class=\"form-action-button\"\n type=\"submit\"\n matTooltip=\"Submit\"\n [disabled]=\"!showSubmit\">\n <mat-icon>save</mat-icon>\n </button>\n \n <button mat-fab\n type=\"button\"\n class=\"form-action-button\"\n matTooltip=\"Cancel\"\n (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button>\n </div>\n </form>\n </div>\n</div>\n\n", styles: [":host{flex-grow:1}.medium-textarea{min-height:150px}\n"], dependencies: [{ kind: "component", type: BackButtonComponent, selector: "lib-back-button" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "component", type: SelectTableComponent, selector: "lib-select-table", inputs: ["itemType", "selected", "options", "columns", "itemTemplate"], outputs: ["itemAdded", "itemRemoved", "searchChanged"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }] });
|
|
2606
|
+
}
|
|
2607
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GroupEditComponent, decorators: [{
|
|
2608
|
+
type: Component,
|
|
2609
|
+
args: [{ selector: 'lib-group-edit', imports: [BackButtonComponent,
|
|
2610
|
+
TitleCasePipe,
|
|
2611
|
+
ReactiveFormsModule,
|
|
2612
|
+
MatInputModule,
|
|
2613
|
+
SelectTableComponent,
|
|
2614
|
+
MatIconModule,
|
|
2615
|
+
MatButtonModule
|
|
2616
|
+
], template: "<lib-back-button></lib-back-button>\n\n<div class=\"content-container\">\n\n <div class=\"item-edit-container\">\n \n <h1 class=\"item-edit-header\">{{heading() | titlecase}}</h1>\n\n <form class=\"form-card\" [formGroup]=\"form.form\" (ngSubmit)=\"submit()\">\n\n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"name\">Name</mat-label>\n <input matInput placeholder=\"Name\"\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n name=\"name\"\n required>\n </mat-form-field>\n \n <lib-select-table style=\"width:100%\" [selected]=\"selectionManager.selected()\"\n [itemType]=\"'Members'\"\n [columns]=\"selectionManager.columns\"\n [itemTemplate]=\"itemTemplate\"\n [options]=\"selectionManager.candidates()\"\n (itemAdded)=\"selectionManager.onAdded($event)\"\n (itemRemoved)=\"selectionManager.onRemoved($event)\"\n (searchChanged)=\"selectionManager.onSearchChanged($event)\">\n </lib-select-table>\n <ng-template #itemTemplate let-item=\"item\">\n <div>\n <p><b>{{item.first_name}} {{item.last_name}} ({{item.username}})</b></p>\n <p>{{item.email}}</p>\n </div>\n </ng-template>\n\n <div class=\"button-group\">\n <button mat-fab\n class=\"form-action-button\"\n type=\"submit\"\n matTooltip=\"Submit\"\n [disabled]=\"!showSubmit\">\n <mat-icon>save</mat-icon>\n </button>\n \n <button mat-fab\n type=\"button\"\n class=\"form-action-button\"\n matTooltip=\"Cancel\"\n (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button>\n </div>\n </form>\n </div>\n</div>\n\n", styles: [":host{flex-grow:1}.medium-textarea{min-height:150px}\n"] }]
|
|
2617
|
+
}], ctorParameters: () => [] });
|
|
2618
|
+
|
|
2306
2619
|
class GroupComponent {
|
|
2307
2620
|
itemService = inject(GroupService);
|
|
2308
2621
|
detailView = viewChild(GroupDetailComponent, ...(ngDevMode ? [{ debugName: "detailView" }] : []));
|
|
@@ -2312,18 +2625,18 @@ class GroupComponent {
|
|
|
2312
2625
|
}
|
|
2313
2626
|
}
|
|
2314
2627
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2315
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.3", type: GroupComponent, isStandalone: true, selector: "lib-group", viewQueries: [{ propertyName: "detailView", first: true, predicate: GroupDetailComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<lib-list-view\n [itemService]=\"itemService\"\n [listItemTemplate]=\"listItemTemplate\"\n [itemDetailTemplate]=\"itemDetailTemplate\"\n [viewType]=\"'list'\"\n [itemHeight]=\"
|
|
2628
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.3", type: GroupComponent, isStandalone: true, selector: "lib-group", viewQueries: [{ propertyName: "detailView", first: true, predicate: GroupDetailComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<lib-list-view\n [itemService]=\"itemService\"\n [listItemTemplate]=\"listItemTemplate\"\n [itemDetailTemplate]=\"itemDetailTemplate\"\n [viewType]=\"'list'\"\n [itemHeight]=\"42\"\n (selected)=\"onSelected($event)\"\n >\n <ng-template #listItemTemplate let-item=\"item\" let-even=\"even\" let-selected=\"selected\">\n\n <div mat-list-item class=\"container\" [class.even]=\"even && !selected\" [class.selected]=\"selected\">\n <div class=\"text-container\">\n <p matListItemTitle style=\"margin-bottom: 0px; margin-top: 0px\">{{item.name}}</p>\n </div>\n </div>\n\n </ng-template>\n\n <ng-template #itemDetailTemplate>\n <lib-group-detail [showBack]='false'></lib-group-detail>\n </ng-template>\n\n</lib-list-view>\n\n", styles: [":host{flex-grow:1}.container{height:40px;padding-top:5px;padding-left:5px;width:100%;display:flex;flex-direction:row;border-radius:6px;background-color:var(--mat-sys-surface-container-lowest)}.container:hover{background-color:var(--mat-sys-surface-container-high);cursor:pointer}.even{background-color:var(--mat-sys-surface-container-low)}.selected{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"], dependencies: [{ kind: "component", type: ListViewComponent, selector: "lib-list-view", inputs: ["viewType", "itemService", "listItemTemplate", "itemDetailTemplate", "itemHeight", "itemWidth", "columns", "sortFields", "noSelfItemsMessage", "noItemsCanCreateMessage", "noItemsMessage", "defaultQueries", "filters", "embeddedMode"], outputs: ["selected"] }, { kind: "component", type: GroupDetailComponent, selector: "lib-group-detail", inputs: ["showBack"] }, { kind: "ngmodule", type: MatListModule }, { kind: "directive", type: i2$1.MatListItemTitle, selector: "[matListItemTitle]" }] });
|
|
2316
2629
|
}
|
|
2317
2630
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GroupComponent, decorators: [{
|
|
2318
2631
|
type: Component,
|
|
2319
|
-
args: [{ selector: 'lib-group', imports: [ListViewComponent, GroupDetailComponent, MatListModule], template: "<lib-list-view\n [itemService]=\"itemService\"\n [listItemTemplate]=\"listItemTemplate\"\n [itemDetailTemplate]=\"itemDetailTemplate\"\n [viewType]=\"'list'\"\n [itemHeight]=\"
|
|
2632
|
+
args: [{ selector: 'lib-group', imports: [ListViewComponent, GroupDetailComponent, MatListModule], template: "<lib-list-view\n [itemService]=\"itemService\"\n [listItemTemplate]=\"listItemTemplate\"\n [itemDetailTemplate]=\"itemDetailTemplate\"\n [viewType]=\"'list'\"\n [itemHeight]=\"42\"\n (selected)=\"onSelected($event)\"\n >\n <ng-template #listItemTemplate let-item=\"item\" let-even=\"even\" let-selected=\"selected\">\n\n <div mat-list-item class=\"container\" [class.even]=\"even && !selected\" [class.selected]=\"selected\">\n <div class=\"text-container\">\n <p matListItemTitle style=\"margin-bottom: 0px; margin-top: 0px\">{{item.name}}</p>\n </div>\n </div>\n\n </ng-template>\n\n <ng-template #itemDetailTemplate>\n <lib-group-detail [showBack]='false'></lib-group-detail>\n </ng-template>\n\n</lib-list-view>\n\n", styles: [":host{flex-grow:1}.container{height:40px;padding-top:5px;padding-left:5px;width:100%;display:flex;flex-direction:row;border-radius:6px;background-color:var(--mat-sys-surface-container-lowest)}.container:hover{background-color:var(--mat-sys-surface-container-high);cursor:pointer}.even{background-color:var(--mat-sys-surface-container-low)}.selected{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"] }]
|
|
2320
2633
|
}], propDecorators: { detailView: [{ type: i0.ViewChild, args: [i0.forwardRef(() => GroupDetailComponent), { isSignal: true }] }] } });
|
|
2321
2634
|
|
|
2322
2635
|
class AddressEditComponent {
|
|
2323
2636
|
countryOptions = input([], ...(ngDevMode ? [{ debugName: "countryOptions" }] : []));
|
|
2324
2637
|
form = input(...(ngDevMode ? [undefined, { debugName: "form" }] : []));
|
|
2325
2638
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: AddressEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2326
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: AddressEditComponent, isStandalone: true, selector: "lib-address-edit", inputs: { countryOptions: { classPropertyName: "countryOptions", publicName: "countryOptions", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if(form(); as form){\n<div [formGroup]=\"form\" style=\"display: flex; flex-direction: column; width:100%\">\n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"line1\">Line 1</mat-label>\n <input matInput placeholder=\"Address Line 1\" type=\"text\" id=\"line1\" formControlName=\"line1\" name=\"line1\"\n required>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"line2\">Line 2</mat-label>\n <input matInput placeholder=\"Address Line 2\" type=\"text\" id=\"line2\" formControlName=\"line2\" name=\"line1\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"line3\">Line 3</mat-label>\n <input matInput placeholder=\"Address Line 3\" type=\"text\" id=\"line3\" formControlName=\"line3\" name=\"line3\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label for=\"city\">City</mat-label>\n <input matInput placeholder=\"City\" type=\"text\" id=\"city\" formControlName=\"city\" name=\"city\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label for=\"region\">Region</mat-label>\n <input matInput placeholder=\"Region\" type=\"text\" id=\"region\" formControlName=\"region\" name=\"region\" required>\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label for=\"line1\">Post Code</mat-label>\n <input matInput placeholder=\"Post Code\" type=\"text\" id=\"postcode\" formControlName=\"postcode\" name=\"postcode\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label for=\"country\">Country</mat-label>\n <mat-select formControlName=\"country\" name=\"country\" id=\"country\" required>\n @for(country of countryOptions(); track $index){\n <mat-option [value]=\"country.code\">{{country.name}}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n</div>\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type:
|
|
2639
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: AddressEditComponent, isStandalone: true, selector: "lib-address-edit", inputs: { countryOptions: { classPropertyName: "countryOptions", publicName: "countryOptions", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if(form(); as form){\n<div [formGroup]=\"form\" style=\"display: flex; flex-direction: column; width:100%\">\n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"line1\">Line 1</mat-label>\n <input matInput placeholder=\"Address Line 1\" type=\"text\" id=\"line1\" formControlName=\"line1\" name=\"line1\"\n required>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"line2\">Line 2</mat-label>\n <input matInput placeholder=\"Address Line 2\" type=\"text\" id=\"line2\" formControlName=\"line2\" name=\"line1\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"line3\">Line 3</mat-label>\n <input matInput placeholder=\"Address Line 3\" type=\"text\" id=\"line3\" formControlName=\"line3\" name=\"line3\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label for=\"city\">City</mat-label>\n <input matInput placeholder=\"City\" type=\"text\" id=\"city\" formControlName=\"city\" name=\"city\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label for=\"region\">Region</mat-label>\n <input matInput placeholder=\"Region\" type=\"text\" id=\"region\" formControlName=\"region\" name=\"region\" required>\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label for=\"line1\">Post Code</mat-label>\n <input matInput placeholder=\"Post Code\" type=\"text\" id=\"postcode\" formControlName=\"postcode\" name=\"postcode\">\n </mat-form-field>\n\n <mat-form-field class=\"form-field\">\n <mat-label for=\"country\">Country</mat-label>\n <mat-select formControlName=\"country\" name=\"country\" id=\"country\" required>\n @for(country of countryOptions(); track $index){\n <mat-option [value]=\"country.code\">{{country.name}}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n</div>\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { 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: ReactiveFormsModule }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
2327
2640
|
}
|
|
2328
2641
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: AddressEditComponent, decorators: [{
|
|
2329
2642
|
type: Component,
|
|
@@ -2337,11 +2650,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
2337
2650
|
class AddressDetailComponent {
|
|
2338
2651
|
address = input(...(ngDevMode ? [undefined, { debugName: "address" }] : []));
|
|
2339
2652
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: AddressDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2340
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: AddressDetailComponent, isStandalone: true, selector: "lib-address-detail", inputs: { address: { classPropertyName: "address", publicName: "address", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if(address(); as address){\n<div class=\"
|
|
2653
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: AddressDetailComponent, isStandalone: true, selector: "lib-address-detail", inputs: { address: { classPropertyName: "address", publicName: "address", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if(address(); as address){\n<div class=\"container\">\n <span class=\"field\">{{address.line1}}, </span>\n @if(address.line2)\n {\n <span class=\"field\">{{address.line2}},</span>\n }\n @if(address.line3){\n <span class=\"field\">{{address.line3}},</span>\n }\n @if(address.city){\n <span class=\"field\">{{address.city}},</span>\n }\n <span class=\"field\">{{address.region}},</span>\n @if(address.postcode){ \n <span class=\"field\">{{address.postcode}},</span>\n }\n <span class=\"field\">{{address.country_name}}</span>\n</div>\n}", styles: [".container{display:flex;flex-wrap:wrap;justify-content:center;align-content:center}.field{margin-left:3px}\n"] });
|
|
2341
2654
|
}
|
|
2342
2655
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: AddressDetailComponent, decorators: [{
|
|
2343
2656
|
type: Component,
|
|
2344
|
-
args: [{ selector: 'lib-address-detail', imports: [], template: "@if(address(); as address){\n<div class=\"
|
|
2657
|
+
args: [{ selector: 'lib-address-detail', imports: [], template: "@if(address(); as address){\n<div class=\"container\">\n <span class=\"field\">{{address.line1}}, </span>\n @if(address.line2)\n {\n <span class=\"field\">{{address.line2}},</span>\n }\n @if(address.line3){\n <span class=\"field\">{{address.line3}},</span>\n }\n @if(address.city){\n <span class=\"field\">{{address.city}},</span>\n }\n <span class=\"field\">{{address.region}},</span>\n @if(address.postcode){ \n <span class=\"field\">{{address.postcode}},</span>\n }\n <span class=\"field\">{{address.country_name}}</span>\n</div>\n}", styles: [".container{display:flex;flex-wrap:wrap;justify-content:center;align-content:center}.field{margin-left:3px}\n"] }]
|
|
2345
2658
|
}], propDecorators: { address: [{ type: i0.Input, args: [{ isSignal: true, alias: "address", required: false }] }] } });
|
|
2346
2659
|
|
|
2347
2660
|
class AddressForm {
|
|
@@ -2406,12 +2719,12 @@ class OrganizationDetailComponent extends DetailView {
|
|
|
2406
2719
|
this.onInit();
|
|
2407
2720
|
}
|
|
2408
2721
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: OrganizationDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2409
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: OrganizationDetailComponent, isStandalone: true, selector: "lib-organization-detail", inputs: { showBack: { classPropertyName: "showBack", publicName: "showBack", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "@if(showBack())\n{\n<lib-back-button
|
|
2722
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: OrganizationDetailComponent, isStandalone: true, selector: "lib-organization-detail", inputs: { showBack: { classPropertyName: "showBack", publicName: "showBack", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "@if(showBack())\n{\n<lib-back-button></lib-back-button>\n}\n\n<div class=\"content-container\">\n\n @if(item(); as item){\n <div class=\"item-detail-container\">\n\n <lib-detail-header\n [text]=\"item.name\"\n [id]=\"item.id\"\n [canEdit]=\"itemService.canEdit()\"\n [canDelete]=\"itemService.canDelete()\"\n [route]=\"itemService.typePlural()\"\n (deleteClicked)=\"onDeleteClicked()\"></lib-detail-header>\n\n <div class=\"item-field\">\n <p class=\"text-area-view\">{{item.description}}</p>\n </div>\n \n <h3>Address</h3>\n <lib-address-detail [address]=\"item.address\"></lib-address-detail>\n\n <h3>Website</h3>\n <div class=\"item-field\">\n <a href=\"{{item.website}}\" target=\"_blank\" rel=\"noopener noreferrer\">{{item.website}}</a>\n </div>\n </div>\n }\n</div>\n", styles: [":host{flex-grow:1}.text-area-view{text-align:justify;text-justify:inter-word;max-width:600px}\n"], dependencies: [{ kind: "component", type: BackButtonComponent, selector: "lib-back-button" }, { kind: "component", type: DetailHeaderComponent, selector: "lib-detail-header", inputs: ["id", "text", "route", "canEdit", "canDelete"], outputs: ["deleteClicked"] }, { kind: "component", type: AddressDetailComponent, selector: "lib-address-detail", inputs: ["address"] }] });
|
|
2410
2723
|
}
|
|
2411
2724
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: OrganizationDetailComponent, decorators: [{
|
|
2412
2725
|
type: Component,
|
|
2413
2726
|
args: [{ selector: 'lib-organization-detail', imports: [BackButtonComponent,
|
|
2414
|
-
DetailHeaderComponent, AddressDetailComponent], template: "@if(showBack())\n{\n<lib-back-button
|
|
2727
|
+
DetailHeaderComponent, AddressDetailComponent], template: "@if(showBack())\n{\n<lib-back-button></lib-back-button>\n}\n\n<div class=\"content-container\">\n\n @if(item(); as item){\n <div class=\"item-detail-container\">\n\n <lib-detail-header\n [text]=\"item.name\"\n [id]=\"item.id\"\n [canEdit]=\"itemService.canEdit()\"\n [canDelete]=\"itemService.canDelete()\"\n [route]=\"itemService.typePlural()\"\n (deleteClicked)=\"onDeleteClicked()\"></lib-detail-header>\n\n <div class=\"item-field\">\n <p class=\"text-area-view\">{{item.description}}</p>\n </div>\n \n <h3>Address</h3>\n <lib-address-detail [address]=\"item.address\"></lib-address-detail>\n\n <h3>Website</h3>\n <div class=\"item-field\">\n <a href=\"{{item.website}}\" target=\"_blank\" rel=\"noopener noreferrer\">{{item.website}}</a>\n </div>\n </div>\n }\n</div>\n", styles: [":host{flex-grow:1}.text-area-view{text-align:justify;text-justify:inter-word;max-width:600px}\n"] }]
|
|
2415
2728
|
}], ctorParameters: () => [], propDecorators: { showBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBack", required: false }] }] } });
|
|
2416
2729
|
|
|
2417
2730
|
class OrganizationComponent {
|
|
@@ -2419,6 +2732,8 @@ class OrganizationComponent {
|
|
|
2419
2732
|
columns = [{ name: 'name', title: 'Name', element_type: 'string' },
|
|
2420
2733
|
{ name: 'website', title: 'Website', element_type: 'url' },
|
|
2421
2734
|
{ name: 'is_partner', title: 'Is Partner', element_type: 'boolean' }];
|
|
2735
|
+
filters = { rows: [{ filters: [{ display_name: "Public?", key: "public", type: "boolean", tooltip: "", choices: [], default: "false", include_if_null: false }] }
|
|
2736
|
+
] };
|
|
2422
2737
|
detailView = viewChild(OrganizationDetailComponent, ...(ngDevMode ? [{ debugName: "detailView" }] : []));
|
|
2423
2738
|
onSelected(id) {
|
|
2424
2739
|
if (id) {
|
|
@@ -2426,14 +2741,14 @@ class OrganizationComponent {
|
|
|
2426
2741
|
}
|
|
2427
2742
|
}
|
|
2428
2743
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: OrganizationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2429
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
2744
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: OrganizationComponent, isStandalone: true, selector: "lib-organization", viewQueries: [{ propertyName: "detailView", first: true, predicate: OrganizationDetailComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<lib-list-view\n [itemService]=\"itemService\"\n [listItemTemplate]=\"listItemTemplate\"\n [itemDetailTemplate]=\"itemDetailTemplate\"\n [viewType]=\"'list'\"\n [itemHeight]=\"82\"\n [itemWidth]=\"400\"\n [filters]=\"filters\"\n (selected)=\"onSelected($event)\"\n >\n <ng-template #listItemTemplate let-item=\"item\" let-even=\"even\" let-selected=\"selected\">\n <div mat-list-item class=\"container\" [class.even]=\"even && !selected\" [class.selected]=\"selected\">\n <div class=\"text-container\">\n <p matListItemTitle style=\"margin-bottom: 0px; margin-top: 0px\">{{item.name}}</p>\n @if(item.address.region && item.address.country_name){\n <p matListItemLine style=\"margin-bottom: 0px; margin-top: 0px\">\n {{item.address.region}}, {{item.address.country_name}}\n </p>\n }\n </div>\n </div>\n </ng-template>\n\n <ng-template #itemDetailTemplate>\n <lib-organization-detail [showBack]='false'></lib-organization-detail>\n </ng-template>\n\n</lib-list-view>\n\n\n\n", styles: [":host{flex-grow:1}.container{height:80px;padding-left:5px;padding-top:5px;border-radius:12px;width:100%;display:flex;flex-direction:row;background-color:var(--mat-sys-surface-container-lowest)}.container:hover{background-color:var(--mat-sys-surface-container-high);cursor:pointer}.even{background-color:var(--mat-sys-surface-container-low)}.selected{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"], dependencies: [{ kind: "component", type: ListViewComponent, selector: "lib-list-view", inputs: ["viewType", "itemService", "listItemTemplate", "itemDetailTemplate", "itemHeight", "itemWidth", "columns", "sortFields", "noSelfItemsMessage", "noItemsCanCreateMessage", "noItemsMessage", "defaultQueries", "filters", "embeddedMode"], outputs: ["selected"] }, { kind: "component", type: OrganizationDetailComponent, selector: "lib-organization-detail", inputs: ["showBack"] }] });
|
|
2430
2745
|
}
|
|
2431
2746
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: OrganizationComponent, decorators: [{
|
|
2432
2747
|
type: Component,
|
|
2433
2748
|
args: [{ selector: 'lib-organization', imports: [
|
|
2434
2749
|
ListViewComponent,
|
|
2435
2750
|
OrganizationDetailComponent
|
|
2436
|
-
], template: "<lib-list-view\n [itemService]=\"itemService\"\n [listItemTemplate]=\"listItemTemplate\"\n [itemDetailTemplate]=\"itemDetailTemplate\"\n [viewType]=\"'list'\"\n [itemHeight]=\"
|
|
2751
|
+
], template: "<lib-list-view\n [itemService]=\"itemService\"\n [listItemTemplate]=\"listItemTemplate\"\n [itemDetailTemplate]=\"itemDetailTemplate\"\n [viewType]=\"'list'\"\n [itemHeight]=\"82\"\n [itemWidth]=\"400\"\n [filters]=\"filters\"\n (selected)=\"onSelected($event)\"\n >\n <ng-template #listItemTemplate let-item=\"item\" let-even=\"even\" let-selected=\"selected\">\n <div mat-list-item class=\"container\" [class.even]=\"even && !selected\" [class.selected]=\"selected\">\n <div class=\"text-container\">\n <p matListItemTitle style=\"margin-bottom: 0px; margin-top: 0px\">{{item.name}}</p>\n @if(item.address.region && item.address.country_name){\n <p matListItemLine style=\"margin-bottom: 0px; margin-top: 0px\">\n {{item.address.region}}, {{item.address.country_name}}\n </p>\n }\n </div>\n </div>\n </ng-template>\n\n <ng-template #itemDetailTemplate>\n <lib-organization-detail [showBack]='false'></lib-organization-detail>\n </ng-template>\n\n</lib-list-view>\n\n\n\n", styles: [":host{flex-grow:1}.container{height:80px;padding-left:5px;padding-top:5px;border-radius:12px;width:100%;display:flex;flex-direction:row;background-color:var(--mat-sys-surface-container-lowest)}.container:hover{background-color:var(--mat-sys-surface-container-high);cursor:pointer}.even{background-color:var(--mat-sys-surface-container-low)}.selected{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"] }]
|
|
2437
2752
|
}], propDecorators: { detailView: [{ type: i0.ViewChild, args: [i0.forwardRef(() => OrganizationDetailComponent), { isSignal: true }] }] } });
|
|
2438
2753
|
|
|
2439
2754
|
class OrganizationForm {
|
|
@@ -2448,7 +2763,8 @@ class OrganizationForm {
|
|
|
2448
2763
|
acronym: fb.control(''),
|
|
2449
2764
|
description: fb.control(''),
|
|
2450
2765
|
website: fb.control(''),
|
|
2451
|
-
address: AddressForm.createForm(fb)
|
|
2766
|
+
address: AddressForm.createForm(fb),
|
|
2767
|
+
public: fb.control(false)
|
|
2452
2768
|
});
|
|
2453
2769
|
}
|
|
2454
2770
|
get address() {
|
|
@@ -2459,7 +2775,8 @@ class OrganizationForm {
|
|
|
2459
2775
|
name: item.name,
|
|
2460
2776
|
acronym: item.acronym,
|
|
2461
2777
|
description: item.description,
|
|
2462
|
-
website: item.website
|
|
2778
|
+
website: item.website,
|
|
2779
|
+
public: item.public
|
|
2463
2780
|
});
|
|
2464
2781
|
AddressForm.setValue(this.address, item.address);
|
|
2465
2782
|
}
|
|
@@ -2470,6 +2787,7 @@ class OrganizationForm {
|
|
|
2470
2787
|
acronym: value.acronym || "",
|
|
2471
2788
|
description: value.description || "",
|
|
2472
2789
|
website: value.website || "",
|
|
2790
|
+
public: value.public || false,
|
|
2473
2791
|
address: AddressForm.createItem(this.address),
|
|
2474
2792
|
members: []
|
|
2475
2793
|
};
|
|
@@ -2479,24 +2797,30 @@ class OrganizationForm {
|
|
|
2479
2797
|
item.acronym = this.form.value.acronym || "";
|
|
2480
2798
|
item.description = this.form.value.description || "";
|
|
2481
2799
|
item.website = this.form.value.website || "";
|
|
2800
|
+
item.public = this.form.value.public || false;
|
|
2482
2801
|
item.address = AddressForm.updateItem(this.address, item.address);
|
|
2483
2802
|
return item;
|
|
2484
2803
|
}
|
|
2485
2804
|
}
|
|
2486
2805
|
|
|
2487
2806
|
class OrganizationEditComponent extends EditView {
|
|
2488
|
-
addressService = inject(AddressService);
|
|
2489
2807
|
selectionManager = new MemberSelectionManager();
|
|
2490
2808
|
constructor() {
|
|
2491
2809
|
super(inject(OrganizationService), new OrganizationForm());
|
|
2492
|
-
this.
|
|
2810
|
+
this.organizationService.refreshCountryOptions();
|
|
2493
2811
|
}
|
|
2494
2812
|
ngOnInit() {
|
|
2495
2813
|
this.onInit();
|
|
2496
2814
|
}
|
|
2815
|
+
get organizationService() {
|
|
2816
|
+
return this.itemService;
|
|
2817
|
+
}
|
|
2497
2818
|
addressForm() {
|
|
2498
2819
|
return this.form.address;
|
|
2499
2820
|
}
|
|
2821
|
+
get showSubmit() {
|
|
2822
|
+
return this.form.form.valid && (this.form.form.dirty || this.selectionManager.dirty());
|
|
2823
|
+
}
|
|
2500
2824
|
createItem() {
|
|
2501
2825
|
const item = this.form.createItem();
|
|
2502
2826
|
item.members = this.selectionManager.selected().map(m => m.url);
|
|
@@ -2508,10 +2832,10 @@ class OrganizationEditComponent extends EditView {
|
|
|
2508
2832
|
return item;
|
|
2509
2833
|
}
|
|
2510
2834
|
onItemAndUserAvailable(item, _) {
|
|
2511
|
-
this.selectionManager.fetchCandidates(this.itemService.
|
|
2835
|
+
this.selectionManager.fetchCandidates(this.itemService.typePlural() + "__id", item.id);
|
|
2512
2836
|
}
|
|
2513
2837
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: OrganizationEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2514
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: OrganizationEditComponent, isStandalone: true, selector: "lib-organization-edit", usesInheritance: true, ngImport: i0, template: "<lib-back-button
|
|
2838
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: OrganizationEditComponent, isStandalone: true, selector: "lib-organization-edit", usesInheritance: true, ngImport: i0, template: "<lib-back-button></lib-back-button>\n\n<div class=\"content-container\">\n\n <div class=\"item-edit-container\">\n \n <h1 class=\"item-edit-header\">{{heading() | titlecase}}</h1>\n\n <form class=\"form-card\" [formGroup]=\"form.form\" (ngSubmit)=\"submit()\">\n\n <mat-tab-group mat-stretch-tabs=\"true\" mat-align-tabs=\"center\" style=\"width:100%;\">\n\n <mat-tab label=\"Overview\" style=\"width:100%;\">\n <div style=\"padding:10px;\">\n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"name\">Name</mat-label>\n <input matInput placeholder=\"Name\"\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n name=\"name\"\n required>\n </mat-form-field>\n \n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"acronym\">Acronym</mat-label> \n <input matInput placeholder=\"Acronym\"\n type=\"text\"\n id=\"acronym\"\n formControlName=\"acronym\"\n name=\"acronym\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"description\">Description</mat-label>\n <textarea matInput placeholder=\"Description\"\n type=\"text\"\n id=\"description\"\n formControlName=\"description\"\n name=\"description\"\n class=\"medium-textarea\"\n required></textarea>\n </mat-form-field>\n\n <mat-accordion style=\"width:100%\">\n <mat-expansion-panel style=\"width:100%\" [expanded]=\"true\">\n <mat-expansion-panel-header>\n <mat-panel-title>Address</mat-panel-title>\n </mat-expansion-panel-header>\n\n <lib-address-edit \n [countryOptions]=\"organizationService.countryOptions()\"\n [form]=\"addressForm()\"\n ></lib-address-edit>\n </mat-expansion-panel>\n </mat-accordion>\n\n <mat-slide-toggle style=\"margin-top: 10px;\" formControlName=\"public\">Is Public?</mat-slide-toggle>\n\n </div>\n </mat-tab>\n\n <mat-tab label=\"Members\" style=\"width:100%;\">\n <div style=\"padding:10px\">\n <lib-select-table style=\"width:100%\" [selected]=\"selectionManager.selected()\"\n [itemType]=\"'Members'\"\n [columns]=\"selectionManager.columns\"\n [itemTemplate]=\"itemTemplate\"\n [options]=\"selectionManager.candidates()\"\n (itemAdded)=\"selectionManager.onAdded($event)\"\n (itemRemoved)=\"selectionManager.onRemoved($event)\"\n (searchChanged)=\"selectionManager.onSearchChanged($event)\">\n </lib-select-table>\n <ng-template #itemTemplate let-item=\"item\">\n <div>\n <p><b>{{item.first_name}} {{item.last_name}} ({{item.username}})</b></p>\n <p>{{item.email}}</p>\n </div>\n </ng-template>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div class=\"button-group\">\n <button mat-fab\n class=\"form-action-button\"\n type=\"submit\"\n matTooltip=\"Submit\"\n [disabled]=\"!showSubmit\">\n <mat-icon>save</mat-icon>\n </button>\n \n <button mat-fab\n type=\"button\"\n class=\"form-action-button\"\n matTooltip=\"Cancel\"\n (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button>\n </div>\n </form>\n </div>\n</div>\n", styles: [":host{flex-grow:1}.medium-textarea{min-height:150px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { 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: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "directive", type: i6$3.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i6$3.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i6$3.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i6$3.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i7.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "component", type: BackButtonComponent, selector: "lib-back-button" }, { kind: "component", type: AddressEditComponent, selector: "lib-address-edit", inputs: ["countryOptions", "form"] }, { kind: "component", type: SelectTableComponent, selector: "lib-select-table", inputs: ["itemType", "selected", "options", "columns", "itemTemplate"], outputs: ["itemAdded", "itemRemoved", "searchChanged"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i9.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i9.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }] });
|
|
2515
2839
|
}
|
|
2516
2840
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: OrganizationEditComponent, decorators: [{
|
|
2517
2841
|
type: Component,
|
|
@@ -2524,12 +2848,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
2524
2848
|
MatIconModule,
|
|
2525
2849
|
MatCheckboxModule,
|
|
2526
2850
|
MatExpansionModule,
|
|
2851
|
+
MatTooltipModule,
|
|
2852
|
+
MatSlideToggleModule,
|
|
2527
2853
|
BackButtonComponent,
|
|
2528
2854
|
AddressEditComponent,
|
|
2529
2855
|
SelectTableComponent,
|
|
2530
2856
|
MatTabsModule,
|
|
2531
2857
|
TitleCasePipe
|
|
2532
|
-
], template: "<lib-back-button
|
|
2858
|
+
], template: "<lib-back-button></lib-back-button>\n\n<div class=\"content-container\">\n\n <div class=\"item-edit-container\">\n \n <h1 class=\"item-edit-header\">{{heading() | titlecase}}</h1>\n\n <form class=\"form-card\" [formGroup]=\"form.form\" (ngSubmit)=\"submit()\">\n\n <mat-tab-group mat-stretch-tabs=\"true\" mat-align-tabs=\"center\" style=\"width:100%;\">\n\n <mat-tab label=\"Overview\" style=\"width:100%;\">\n <div style=\"padding:10px;\">\n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"name\">Name</mat-label>\n <input matInput placeholder=\"Name\"\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n name=\"name\"\n required>\n </mat-form-field>\n \n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"acronym\">Acronym</mat-label> \n <input matInput placeholder=\"Acronym\"\n type=\"text\"\n id=\"acronym\"\n formControlName=\"acronym\"\n name=\"acronym\">\n </mat-form-field>\n \n <mat-form-field class=\"form-field-wide\">\n <mat-label for=\"description\">Description</mat-label>\n <textarea matInput placeholder=\"Description\"\n type=\"text\"\n id=\"description\"\n formControlName=\"description\"\n name=\"description\"\n class=\"medium-textarea\"\n required></textarea>\n </mat-form-field>\n\n <mat-accordion style=\"width:100%\">\n <mat-expansion-panel style=\"width:100%\" [expanded]=\"true\">\n <mat-expansion-panel-header>\n <mat-panel-title>Address</mat-panel-title>\n </mat-expansion-panel-header>\n\n <lib-address-edit \n [countryOptions]=\"organizationService.countryOptions()\"\n [form]=\"addressForm()\"\n ></lib-address-edit>\n </mat-expansion-panel>\n </mat-accordion>\n\n <mat-slide-toggle style=\"margin-top: 10px;\" formControlName=\"public\">Is Public?</mat-slide-toggle>\n\n </div>\n </mat-tab>\n\n <mat-tab label=\"Members\" style=\"width:100%;\">\n <div style=\"padding:10px\">\n <lib-select-table style=\"width:100%\" [selected]=\"selectionManager.selected()\"\n [itemType]=\"'Members'\"\n [columns]=\"selectionManager.columns\"\n [itemTemplate]=\"itemTemplate\"\n [options]=\"selectionManager.candidates()\"\n (itemAdded)=\"selectionManager.onAdded($event)\"\n (itemRemoved)=\"selectionManager.onRemoved($event)\"\n (searchChanged)=\"selectionManager.onSearchChanged($event)\">\n </lib-select-table>\n <ng-template #itemTemplate let-item=\"item\">\n <div>\n <p><b>{{item.first_name}} {{item.last_name}} ({{item.username}})</b></p>\n <p>{{item.email}}</p>\n </div>\n </ng-template>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <div class=\"button-group\">\n <button mat-fab\n class=\"form-action-button\"\n type=\"submit\"\n matTooltip=\"Submit\"\n [disabled]=\"!showSubmit\">\n <mat-icon>save</mat-icon>\n </button>\n \n <button mat-fab\n type=\"button\"\n class=\"form-action-button\"\n matTooltip=\"Cancel\"\n (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button>\n </div>\n </form>\n </div>\n</div>\n", styles: [":host{flex-grow:1}.medium-textarea{min-height:150px}\n"] }]
|
|
2533
2859
|
}], ctorParameters: () => [] });
|
|
2534
2860
|
|
|
2535
2861
|
/*
|
|
@@ -2540,5 +2866,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
2540
2866
|
* Generated bundle index. Do not edit.
|
|
2541
2867
|
*/
|
|
2542
2868
|
|
|
2543
|
-
export { Address, AddressDetailComponent, AddressEditComponent, AddressForm,
|
|
2869
|
+
export { Address, AddressDetailComponent, AddressEditComponent, AddressForm, ApiError, AvatarComponent, BackButtonComponent, DetailHeaderComponent, DetailView, DynamicFormBuilderComponent, DynamicFormComponent, DynamicFormForm, EditView, ErrorCode, FORM_FIELD_CHOICES, FeedbackComponent, FieldType, FileRecord, FileUploadComponent, FormFieldDetailComponent, FormFieldEditComponent, FormFieldValueForm, FormService, Group, GroupComponent, GroupDetailComponent, GroupEditComponent, GroupService, ItemQuery, ItemService, ItemWithUserService, LeftNavComponent, LeftNavService, ListTableViewComponent, ListViewComponent, MemberSelectionManager, MockItemService, Organization, OrganizationComponent, OrganizationDetailComponent, OrganizationEditComponent, OrganizationService, Paginated, Permission, PopulatedFormComponent, PopulatedFormForm, PortalMember, REST_SERVICE_CONFIG, ResolvedPermission, RestService, SearchBarComponent, SelectTableComponent, SelectionManager, TopBarComponent, UserComponent, UserCreateComponent, UserDetailComponent, UserEditComponent, UserService, getFieldTypeFromKey, getFileFieldIds };
|
|
2544
2870
|
//# sourceMappingURL=ichec-angular-core.mjs.map
|