ichec-angular-core 0.3.4 → 0.3.5

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.
@@ -27,9 +27,10 @@ import * as i3$1 from '@angular/material/tooltip';
27
27
  import { MatTooltipModule } from '@angular/material/tooltip';
28
28
  import * as i7 from '@angular/material/slide-toggle';
29
29
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
30
+ import * as i4 from '@angular/material/card';
31
+ import { MatCardModule } from '@angular/material/card';
30
32
  import * as i6$2 from '@angular/material/checkbox';
31
33
  import { MatCheckboxModule } from '@angular/material/checkbox';
32
- import { MatCardModule } from '@angular/material/card';
33
34
  import * as i2$1 from '@angular/material/list';
34
35
  import { MatListModule } from '@angular/material/list';
35
36
  import { MatDividerModule } from '@angular/material/divider';
@@ -1206,20 +1207,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
1206
1207
 
1207
1208
  class FileUploadComponent {
1208
1209
  control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
1210
+ uploadCategory = input("", ...(ngDevMode ? [{ debugName: "uploadCategory" }] : []));
1211
+ allowedSizeMb = input(10, ...(ngDevMode ? [{ debugName: "allowedSizeMb" }] : []));
1212
+ showHeading = input(true, ...(ngDevMode ? [{ debugName: "showHeading" }] : []));
1213
+ error = signal("", ...(ngDevMode ? [{ debugName: "error" }] : []));
1214
+ get accepts() {
1215
+ if (this.uploadCategory() === "image") {
1216
+ return "image/jpeg, image/png";
1217
+ }
1218
+ else if (this.uploadCategory() === "document") {
1219
+ return ".doc,.docx,.pdf,.odt,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document";
1220
+ }
1221
+ return "*";
1222
+ }
1223
+ get acceptTitle() {
1224
+ if (this.uploadCategory() === "image") {
1225
+ return "JPG, PNG";
1226
+ }
1227
+ else if (this.uploadCategory() === "document") {
1228
+ return "DOC, DOCX, ODT, PDF";
1229
+ }
1230
+ return "";
1231
+ }
1232
+ get maxSize() {
1233
+ return this.allowedSizeMb().toString() + "MB";
1234
+ }
1209
1235
  onFileUpload(event) {
1210
1236
  if (!event.target) {
1211
1237
  return;
1212
1238
  }
1239
+ this.error.set("");
1213
1240
  const input_element = event.target;
1214
1241
  if (input_element.files && input_element.files.length > 0) {
1215
1242
  this.onFileUploaded(input_element.files[0]);
1216
1243
  }
1217
1244
  }
1245
+ isImage() {
1246
+ return this.control().value.file_type === "image";
1247
+ }
1218
1248
  onFileUploaded(file) {
1249
+ if (file.size > this.allowedSizeMb() * 1024 * 1024) {
1250
+ this.error.set("File size exceeds maximum of " + this.maxSize);
1251
+ return;
1252
+ }
1219
1253
  const record = this.control().value;
1220
1254
  record.file = file;
1221
1255
  this.control().setValue(record);
1222
- if (record.file_type == "image") {
1256
+ this.control().markAsDirty();
1257
+ if (record.file_type === "image") {
1223
1258
  const reader = new FileReader();
1224
1259
  reader.readAsDataURL(file);
1225
1260
  reader.onload = () => { if (reader.result) {
@@ -1231,19 +1266,22 @@ class FileUploadComponent {
1231
1266
  const record = this.control().value;
1232
1267
  record.local = preview;
1233
1268
  this.control().setValue(record);
1269
+ this.control().markAsDirty();
1234
1270
  }
1235
1271
  onClearLocal() {
1236
1272
  const record = this.control().value;
1237
1273
  record.local = "";
1274
+ record.file = null;
1238
1275
  this.control().setValue(record);
1276
+ this.control().markAsDirty();
1239
1277
  }
1240
1278
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
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" }] });
1279
+ 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 }, uploadCategory: { classPropertyName: "uploadCategory", publicName: "uploadCategory", isSignal: true, isRequired: false, transformFunction: null }, allowedSizeMb: { classPropertyName: "allowedSizeMb", publicName: "allowedSizeMb", isSignal: true, isRequired: false, transformFunction: null }, showHeading: { classPropertyName: "showHeading", publicName: "showHeading", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"container\">\n <mat-card class=\"card\">\n @if (control().value.local || control().value.file)\n {\n @if(showHeading())\n {\n <h4 class=\"header\">Change {{control().value.display_name | titlecase}}</h4>\n }\n <div class=\"content\">\n @if(control().value.local && isImage()){\n <img class=\"image\" src=\"{{control().value.local}}\" alt=\"{{control().value.display_name}}\">\n }\n @else {\n <div><p><b>Selected</b></p><p>{{control().value.file?.name}}</p></div>\n }\n <div class=\"controls\">\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 </div>\n }\n @else\n {\n @if (control().value.remote){\n @if(showHeading())\n {\n <h4 class=\"header\">{{control().value.display_name | titlecase}}</h4>\n }\n <div class=\"content\">\n @if(isImage())\n {\n <img alt=\"{{control().value.display_name}}\" src=\"{{control().value.remote}}\" class=\"image\">\n }\n @else {\n <a href=\"{{control().value.remote}}\" mat-mini-fab matTooltip=\"Download\"><mat-icon>download</mat-icon>Download</a>\n }\n\n <div class=\"controls\">\n @if(uploadCategory())\n {\n <p>Formats: {{acceptTitle}}</p>\n }\n <p>Max Size: {{maxSize}}</p>\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 @if(showHeading())\n {\n <h4 class=\"header\">Upload a {{control().value.display_name}}</h4>\n }\n <div class=\"controls\">\n @if(uploadCategory())\n {\n <p>Formats: {{acceptTitle}}</p>\n }\n <p>Max Size: {{maxSize}}</p>\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\n }\n @if(error())\n {\n <p>{{this.error()}}</p>\n }\n </mat-card>\n <input hidden type=\"file\" #fileInput (change)=\"onFileUpload($event)\" [accept]=\"accepts\" />\n</div>", styles: [".container{display:flex;justify-content:center;text-align:center;align-items:center;flex-direction:column;max-width:300px}.card{padding:10px;margin-bottom:5px}.header{margin:0 0 5px}.content{display:flex;flex-direction:row;justify-content:center;align-items:center}.image{height:120px;margin-right:10px;border-radius:10px}.controls{display:flex;flex-direction:column;justify-content:center;align-items: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: "ngmodule", type: MatCardModule }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }] });
1242
1280
  }
1243
1281
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FileUploadComponent, decorators: [{
1244
1282
  type: Component,
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"] }]
1246
- }], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }] } });
1283
+ args: [{ selector: 'lib-file-upload', imports: [MatIconModule, MatButtonModule, MatTooltipModule, TitleCasePipe, MatCardModule], template: "<div class=\"container\">\n <mat-card class=\"card\">\n @if (control().value.local || control().value.file)\n {\n @if(showHeading())\n {\n <h4 class=\"header\">Change {{control().value.display_name | titlecase}}</h4>\n }\n <div class=\"content\">\n @if(control().value.local && isImage()){\n <img class=\"image\" src=\"{{control().value.local}}\" alt=\"{{control().value.display_name}}\">\n }\n @else {\n <div><p><b>Selected</b></p><p>{{control().value.file?.name}}</p></div>\n }\n <div class=\"controls\">\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 </div>\n }\n @else\n {\n @if (control().value.remote){\n @if(showHeading())\n {\n <h4 class=\"header\">{{control().value.display_name | titlecase}}</h4>\n }\n <div class=\"content\">\n @if(isImage())\n {\n <img alt=\"{{control().value.display_name}}\" src=\"{{control().value.remote}}\" class=\"image\">\n }\n @else {\n <a href=\"{{control().value.remote}}\" mat-mini-fab matTooltip=\"Download\"><mat-icon>download</mat-icon>Download</a>\n }\n\n <div class=\"controls\">\n @if(uploadCategory())\n {\n <p>Formats: {{acceptTitle}}</p>\n }\n <p>Max Size: {{maxSize}}</p>\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 @if(showHeading())\n {\n <h4 class=\"header\">Upload a {{control().value.display_name}}</h4>\n }\n <div class=\"controls\">\n @if(uploadCategory())\n {\n <p>Formats: {{acceptTitle}}</p>\n }\n <p>Max Size: {{maxSize}}</p>\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\n }\n @if(error())\n {\n <p>{{this.error()}}</p>\n }\n </mat-card>\n <input hidden type=\"file\" #fileInput (change)=\"onFileUpload($event)\" [accept]=\"accepts\" />\n</div>", styles: [".container{display:flex;justify-content:center;text-align:center;align-items:center;flex-direction:column;max-width:300px}.card{padding:10px;margin-bottom:5px}.header{margin:0 0 5px}.content{display:flex;flex-direction:row;justify-content:center;align-items:center}.image{height:120px;margin-right:10px;border-radius:10px}.controls{display:flex;flex-direction:column;justify-content:center;align-items:center}p{margin-top:0;margin-bottom:5px}\n"] }]
1284
+ }], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], uploadCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadCategory", required: false }] }], allowedSizeMb: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowedSizeMb", required: false }] }], showHeading: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHeading", required: false }] }] } });
1247
1285
 
1248
1286
  class FormFieldDetailComponent {
1249
1287
  field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
@@ -1264,7 +1302,7 @@ class FormFieldDetailComponent {
1264
1302
  return this.form().get(this.key);
1265
1303
  }
1266
1304
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormFieldDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
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"] }] });
1305
+ 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\" style=\"width: 70%; max-width: 800px;\">\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-wide\" style=\"width: 70%; max-width: 800px;\">\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-wide\" style=\"width: 70%; max-width: 800px;\">\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 Template\n </a>\n }\n <div style=\"display: flex;flex-direction: column; justify-content: center; align-items: center;\">\n <h4>Upload</h4>\n <lib-file-upload [control]=\"control\" \n [showHeading]=\"false\" \n [uploadCategory]=\"'document'\"></lib-file-upload>\n </div>\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", "uploadCategory", "allowedSizeMb", "showHeading"] }] });
1268
1306
  }
1269
1307
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormFieldDetailComponent, decorators: [{
1270
1308
  type: Component,
@@ -1274,7 +1312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
1274
1312
  MatButtonModule,
1275
1313
  MatSelectModule,
1276
1314
  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" }]
1315
+ 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\" style=\"width: 70%; max-width: 800px;\">\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-wide\" style=\"width: 70%; max-width: 800px;\">\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-wide\" style=\"width: 70%; max-width: 800px;\">\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 Template\n </a>\n }\n <div style=\"display: flex;flex-direction: column; justify-content: center; align-items: center;\">\n <h4>Upload</h4>\n <lib-file-upload [control]=\"control\" \n [showHeading]=\"false\" \n [uploadCategory]=\"'document'\"></lib-file-upload>\n </div>\n </div>\n } \n }\n </div>\n</div>\n" }]
1278
1316
  }], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }] } });
1279
1317
 
1280
1318
  class FormFieldEditComponent {
@@ -1349,7 +1387,7 @@ class FormFieldEditComponent {
1349
1387
  this.optionsControl.setValue(options.filter(e => e.value !== value));
1350
1388
  }
1351
1389
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormFieldEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
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"] }] });
1390
+ 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\" [uploadCategory]=\"'document'\"></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", "uploadCategory", "allowedSizeMb", "showHeading"] }] });
1353
1391
  }
1354
1392
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormFieldEditComponent, decorators: [{
1355
1393
  type: Component,
@@ -1364,7 +1402,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
1364
1402
  MatSelectModule,
1365
1403
  MatTooltipModule,
1366
1404
  MatCheckboxModule,
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"] }]
1405
+ 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\" [uploadCategory]=\"'document'\"></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
1406
  }], 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"] }] } });
1369
1407
 
1370
1408
  class FormFieldForm {
@@ -2262,7 +2300,7 @@ class TopBarComponent {
2262
2300
  logo = input(...(ngDevMode ? [undefined, { debugName: "logo" }] : []));
2263
2301
  background = input(...(ngDevMode ? [undefined, { debugName: "background" }] : []));
2264
2302
  user = signal(null, ...(ngDevMode ? [{ debugName: "user" }] : []));
2265
- loginRoute = input("home", ...(ngDevMode ? [{ debugName: "loginRoute" }] : []));
2303
+ loginRoute = input("", ...(ngDevMode ? [{ debugName: "loginRoute" }] : []));
2266
2304
  userService = inject(UserService);
2267
2305
  leftNavService = inject(LeftNavService);
2268
2306
  constructor() {
@@ -2272,7 +2310,11 @@ class TopBarComponent {
2272
2310
  this.userService.logout();
2273
2311
  }
2274
2312
  onLogin() {
2275
- this.userService.login("/" + this.loginRoute);
2313
+ let route = "/";
2314
+ if (this.loginRoute()) {
2315
+ route = "/" + this.loginRoute();
2316
+ }
2317
+ this.userService.login(route);
2276
2318
  }
2277
2319
  get initials() {
2278
2320
  const user = this.user();
@@ -2367,11 +2409,11 @@ class UserDetailComponent extends DetailView {
2367
2409
  return super.canEdit();
2368
2410
  }
2369
2411
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
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"] }] });
2412
+ 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;border-radius: 10px;\">\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"] }] });
2371
2413
  }
2372
2414
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserDetailComponent, decorators: [{
2373
2415
  type: Component,
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"] }]
2416
+ 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;border-radius: 10px;\">\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"] }]
2375
2417
  }], ctorParameters: () => [], propDecorators: { showBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBack", required: false }] }] } });
2376
2418
 
2377
2419
  class UserForm {
@@ -2382,6 +2424,7 @@ class UserForm {
2382
2424
  first_name: this.fb.control(''),
2383
2425
  last_name: this.fb.control(''),
2384
2426
  phone: this.fb.control(''),
2427
+ preferences: this.fb.control({ notifications: "" }),
2385
2428
  profile: this.fb.control(UserForm.getDefaultProfile()),
2386
2429
  });
2387
2430
  static getDefaultProfile() {
@@ -2398,6 +2441,7 @@ class UserForm {
2398
2441
  first_name: item.first_name,
2399
2442
  last_name: item.last_name,
2400
2443
  phone: item.phone,
2444
+ preferences: item.preferences,
2401
2445
  profile: profile
2402
2446
  });
2403
2447
  }
@@ -2409,6 +2453,7 @@ class UserForm {
2409
2453
  first_name: value.first_name || "",
2410
2454
  last_name: value.last_name || "",
2411
2455
  phone: value.phone || "",
2456
+ preferences: value.preferences || { notifications: "" },
2412
2457
  identifiers: []
2413
2458
  };
2414
2459
  }
@@ -2419,6 +2464,7 @@ class UserForm {
2419
2464
  item.first_name = value.first_name || "";
2420
2465
  item.last_name = value.last_name || "";
2421
2466
  item.phone = value.phone || "";
2467
+ item.preferences = value.preferences || { notifications: "" };
2422
2468
  return item;
2423
2469
  }
2424
2470
  }
@@ -2435,7 +2481,7 @@ class UserEditComponent extends EditView {
2435
2481
  return this.form.form.get('profile');
2436
2482
  }
2437
2483
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
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" }] });
2484
+ 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\" [uploadCategory]=\"'image'\"></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", "uploadCategory", "allowedSizeMb", "showHeading"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }] });
2439
2485
  }
2440
2486
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserEditComponent, decorators: [{
2441
2487
  type: Component,
@@ -2449,7 +2495,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
2449
2495
  MatTooltipModule,
2450
2496
  FileUploadComponent,
2451
2497
  TitleCasePipe
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"] }]
2498
+ ], 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\" [uploadCategory]=\"'image'\"></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"] }]
2453
2499
  }], ctorParameters: () => [] });
2454
2500
 
2455
2501
  class UserCreateForm {
@@ -2506,11 +2552,11 @@ class UserListDetailComponent {
2506
2552
  }
2507
2553
  }
2508
2554
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserListDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
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]" }] });
2555
+ 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; border-radius: 5px;\">\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]" }] });
2510
2556
  }
2511
2557
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserListDetailComponent, decorators: [{
2512
2558
  type: Component,
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"] }]
2559
+ 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; border-radius: 5px;\">\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"] }]
2514
2560
  }], 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 }] }] } });
2515
2561
 
2516
2562
  class UserComponent {
@@ -2732,8 +2778,7 @@ class OrganizationComponent {
2732
2778
  columns = [{ name: 'name', title: 'Name', element_type: 'string' },
2733
2779
  { name: 'website', title: 'Website', element_type: 'url' },
2734
2780
  { 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
- ] };
2781
+ filters = null;
2737
2782
  detailView = viewChild(OrganizationDetailComponent, ...(ngDevMode ? [{ debugName: "detailView" }] : []));
2738
2783
  onSelected(id) {
2739
2784
  if (id) {