@thecodeblogs/blog 0.20.7 → 0.30.0

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.
@@ -4,7 +4,7 @@ import { Injectable, EventEmitter, PLATFORM_ID, Inject, SecurityContext, Compone
4
4
  import * as i1 from '@angular/common/http';
5
5
  import { HttpParams } from '@angular/common/http';
6
6
  import { map, debounceTime } from 'rxjs/operators';
7
- import { Subject, of, debounceTime as debounceTime$1, Subscription } from 'rxjs';
7
+ import { Subject, of, debounceTime as debounceTime$1, ReplaySubject, map as map$2, catchError, Subscription } from 'rxjs';
8
8
  import * as i6 from '@angular/common';
9
9
  import { isPlatformBrowser, NgIf, CommonModule } from '@angular/common';
10
10
  import * as i2 from 'ngx-device-detector';
@@ -16,7 +16,7 @@ import * as i3 from '@angular/material/divider';
16
16
  import { MatDividerModule } from '@angular/material/divider';
17
17
  import * as i4 from '@angular/material/table';
18
18
  import { MatTableModule } from '@angular/material/table';
19
- import * as i5 from '@angular/material/button';
19
+ import * as i15 from '@angular/material/button';
20
20
  import { MatButtonModule } from '@angular/material/button';
21
21
  import * as i6$1 from 'ng2-file-upload';
22
22
  import { FileUploader, FileUploadModule } from 'ng2-file-upload';
@@ -51,7 +51,7 @@ import { QuillEditorComponent } from 'ngx-quill';
51
51
  import { trigger, state, transition, style, animate } from '@angular/animations';
52
52
  import * as i4$1 from '@angular/cdk/drag-drop';
53
53
  import { DragDropModule } from '@angular/cdk/drag-drop';
54
- import * as i2$1 from '@angular/material/sidenav';
54
+ import * as i3$2 from '@angular/material/sidenav';
55
55
  import { MatSidenavModule } from '@angular/material/sidenav';
56
56
  import * as i9$1 from '@angular/material/list';
57
57
  import { MatListModule } from '@angular/material/list';
@@ -771,7 +771,7 @@ class EntrySelectorDialogComponent {
771
771
  });
772
772
  }
773
773
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntrySelectorDialogComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: EntryService }], target: i0.ɵɵFactoryTarget.Component }); }
774
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: EntrySelectorDialogComponent, isStandalone: true, selector: "app-entry-selector-dialog", ngImport: i0, template: "<h1 mat-dialog-title>Select an Entry to Edit</h1>\n<!--<mat-radio-group aria-label=\"Select an option\">-->\n<!-- <mat-radio-button class=\"option\" value=\"unpublished\">Unpublished</mat-radio-button>-->\n<!-- <mat-radio-button class=\"option\" value=\"published\">Published</mat-radio-button>-->\n<!--</mat-radio-group>-->\n<mat-divider class=\"option-list-divider\"></mat-divider>\n<div mat-dialog-content>\n\n <table mat-table [dataSource]=entries>\n <ng-container matColumnDef=\"id\">\n <th mat-header-cell *matHeaderCellDef> Id </th>\n <td mat-cell *matCellDef=\"let entry\"> {{entry.id}} </td>\n </ng-container>\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let entry\"> {{entry.title}} </td>\n </ng-container>\n <ng-container matColumnDef=\"create_date\">\n <th mat-header-cell *matHeaderCellDef> Created </th>\n <td mat-cell *matCellDef=\"let entry\"> {{entry.create_date}} </td>\n </ng-container>\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let entry\">\n <button mat-button color=\"primary\" (click)=\"select(entry)\">Edit</button> | <button mat-button color=\"warn\" (click)=\"delete(entry)\">Delete</button>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"columnsToDisplay\"></tr>\n <tr mat-row *matRowDef=\"let myRowData; columns: columnsToDisplay\"></tr>\n </table>\n <div *ngIf=\"!entries?.length\">There are no unpublished entries</div>\n</div>\n<div mat-dialog-actions>\n <button mat-button (click)=\"onNoClick()\">Cancel</button>\n</div>\n", styles: [".entry-checkbox-container{display:inline-block;width:100%;margin:5px 0}.option-list-divider{margin:10px 0}.option{margin-right:5px}.mat-column-actions{min-width:175px}.mat-column-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:365px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] }); }
774
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: EntrySelectorDialogComponent, isStandalone: true, selector: "app-entry-selector-dialog", ngImport: i0, template: "<h1 mat-dialog-title>Select an Entry to Edit</h1>\n<!--<mat-radio-group aria-label=\"Select an option\">-->\n<!-- <mat-radio-button class=\"option\" value=\"unpublished\">Unpublished</mat-radio-button>-->\n<!-- <mat-radio-button class=\"option\" value=\"published\">Published</mat-radio-button>-->\n<!--</mat-radio-group>-->\n<mat-divider class=\"option-list-divider\"></mat-divider>\n<div mat-dialog-content>\n\n <table mat-table [dataSource]=entries>\n <ng-container matColumnDef=\"id\">\n <th mat-header-cell *matHeaderCellDef> Id </th>\n <td mat-cell *matCellDef=\"let entry\"> {{entry.id}} </td>\n </ng-container>\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let entry\"> {{entry.title}} </td>\n </ng-container>\n <ng-container matColumnDef=\"create_date\">\n <th mat-header-cell *matHeaderCellDef> Created </th>\n <td mat-cell *matCellDef=\"let entry\"> {{entry.create_date}} </td>\n </ng-container>\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let entry\">\n <button mat-button color=\"primary\" (click)=\"select(entry)\">Edit</button> | <button mat-button color=\"warn\" (click)=\"delete(entry)\">Delete</button>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"columnsToDisplay\"></tr>\n <tr mat-row *matRowDef=\"let myRowData; columns: columnsToDisplay\"></tr>\n </table>\n <div *ngIf=\"!entries?.length\">There are no unpublished entries</div>\n</div>\n<div mat-dialog-actions>\n <button mat-button (click)=\"onNoClick()\">Cancel</button>\n</div>\n", styles: [".entry-checkbox-container{display:inline-block;width:100%;margin:5px 0}.option-list-divider{margin:10px 0}.option{margin-right:5px}.mat-column-actions{min-width:175px}.mat-column-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:365px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i15.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] }); }
775
775
  }
776
776
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntrySelectorDialogComponent, decorators: [{
777
777
  type: Component,
@@ -788,6 +788,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
788
788
  }] }, { type: EntryService }] });
789
789
 
790
790
  class MediaUploadModalComponent {
791
+ isMockUploadMode() {
792
+ return Boolean(this.uploadService.isMock);
793
+ }
794
+ uploadFileInMockMode(file) {
795
+ if (!file) {
796
+ return;
797
+ }
798
+ const createFromFile = this.uploadService.createFromFile;
799
+ if (typeof createFromFile !== 'function') {
800
+ return;
801
+ }
802
+ this.uploading = true;
803
+ createFromFile.call(this.uploadService, file).subscribe((response) => {
804
+ this.uploadId = response.id;
805
+ this.imgLink = response[this.uploadUrlKey];
806
+ this.mimeType = response.mime_type;
807
+ this.uploading = false;
808
+ });
809
+ }
791
810
  static getCookie(name) {
792
811
  const ca = document.cookie.split(';');
793
812
  const caLen = ca.length;
@@ -830,8 +849,11 @@ class MediaUploadModalComponent {
830
849
  });
831
850
  }
832
851
  ngOnInit() {
852
+ const uploadEndpoint = this.isMockUploadMode()
853
+ ? this.uploadService.constructor.upload_endpoint || UploadService.upload_endpoint
854
+ : UploadService.upload_endpoint;
833
855
  this.uploader = new FileUploader({
834
- url: UploadService.upload_endpoint,
856
+ url: uploadEndpoint,
835
857
  itemAlias: 'file',
836
858
  authToken: '',
837
859
  headers: [
@@ -851,12 +873,28 @@ class MediaUploadModalComponent {
851
873
  this.uploading = false;
852
874
  };
853
875
  if (this.file) {
854
- this.uploader.addToQueue([this.file]);
855
- this.uploader.uploadAll();
856
- this.uploading = true;
876
+ if (this.isMockUploadMode()) {
877
+ this.uploadFileInMockMode(this.file);
878
+ }
879
+ else {
880
+ this.uploader.addToQueue([this.file]);
881
+ this.uploader.uploadAll();
882
+ this.uploading = true;
883
+ }
857
884
  }
858
885
  }
859
886
  onFileSelected(e) {
887
+ if (this.isMockUploadMode()) {
888
+ const files = e?.target?.files;
889
+ if (files && files.length > 0) {
890
+ this.uploadFileInMockMode(files[0]);
891
+ return;
892
+ }
893
+ if (this.uploader.queue.length > 0) {
894
+ this.uploadFileInMockMode(this.uploader.queue[0]._file);
895
+ return;
896
+ }
897
+ }
860
898
  this.uploader.uploadAll();
861
899
  this.uploading = true;
862
900
  }
@@ -910,7 +948,13 @@ class MediaUploadModalComponent {
910
948
  }
911
949
  else {
912
950
  for (let i = 0; i < files.length; i++) {
913
- this.uploader.addToQueue([files[i]]);
951
+ if (this.isMockUploadMode()) {
952
+ this.uploadFileInMockMode(files[i]);
953
+ return;
954
+ }
955
+ else {
956
+ this.uploader.addToQueue([files[i]]);
957
+ }
914
958
  }
915
959
  this.uploader.uploadAll();
916
960
  this.uploading = true;
@@ -1247,7 +1291,7 @@ class EntryCreatorComponent {
1247
1291
  });
1248
1292
  }
1249
1293
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntryCreatorComponent, deps: [{ token: i1$3.Router }, { token: EntryService }, { token: TagService }, { token: IdentityService }, { token: i0.ChangeDetectorRef }, { token: i1$2.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
1250
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: EntryCreatorComponent, isStandalone: true, selector: "app-entry-creator", inputs: { allowedMimeTypes: "allowedMimeTypes", uploadUrlKey: "uploadUrlKey" }, providers: [provideNativeDateAdapter()], viewQueries: [{ propertyName: "tagInput", first: true, predicate: ["tagInput"], descendants: true }, { propertyName: "matAutocomplete", first: true, predicate: ["tagauto"], descendants: true }], ngImport: i0, template: "<div class=\"section creator fields\">\n <div style=\"padding: 10px;\">\n <button\n style=\"width: 100%;\"\n mat-raised-button (click)=\"routeTo('create/v2(left-col:create//right-col:create)')\">V2</button>\n </div>\n <form #createForm=\"ngForm\" (change)=\"onChange()\" *ngIf=\"this.entry\">\n <div class=\"form-group\">\n <mat-form-field class=\"full-width\">\n <mat-label>Title</mat-label>\n <input matInput\n [(ngModel)]=\"entry.title\"\n name=\"title\">\n </mat-form-field>\n </div>\n <mat-card class=\"form-section tags\">\n <div>\n <!--\n <mat-form-field class=\"full-width\" hintLabel=\"Use a comma to seperate different tags\">\n <mat-chip-listbox #tagList aria-label=\"Tags\">\n <mat-chip-option\n *ngFor=\"let tag of tags\"\n [selectable]=\"selectable\"\n [removable]=\"removable\"\n (removed)=\"remove(tag)\">\n {{tag}}\n <mat-icon matChipRemove *ngIf=\"removable\">cancel</mat-icon>\n </mat-chip-option>\n <input\n matInput\n placeholder=\"Tags...\"\n #tagInput\n [formControl]=\"tagCtrl\"\n [matAutocomplete]=\"tagauto\"\n [matChipInputFor]=\"tagList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (matChipInputTokenEnd)=\"add($event)\">\n </mat-chip-listbox>\n <mat-autocomplete #tagauto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let tag of filtered_tags | async\" [value]=\"tag\">\n {{tag}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n -->\n </div>\n </mat-card>\n <mat-card class=\"form-section\" *ngFor=\"let section of entry.sections\">\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>Subheading</mat-label>\n <input matInput\n [(ngModel)]=\"section.subheading\"\n name=\"{{section.id}}-subheading\">\n </mat-form-field>\n <div class=\"form-content\" *ngFor=\"let content of section.contents\">\n <div class=\"form-group\">\n <mat-radio-group\n aria-label=\"Select the Content Type\"\n name=\"{{content.id}}-content-type\"\n class=\"radio-group\"\n [(ngModel)]=\"content.type\">\n <mat-radio-button\n *ngFor=\"let value of Object.values(ContentType)\"\n class=\"radio-button\"\n [value]=\"value\">{{value}}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Title</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-title\"\n [(ngModel)]=\"content.title\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.TEXT\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"3\"\n cdkAutosizeMaxRows=\"20\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"3\"\n cdkAutosizeMaxRows=\"20\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"10\"\n cdkAutosizeMaxRows=\"100\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-source\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Description</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-description\"\n [(ngModel)]=\"content.description\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <div class=\"full-width\">\n <ng-container *ngIf=\"content.value\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Description</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-description\"\n [(ngModel)]=\"content.description\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngIf=\"content.additional\">\n <ng-container *ngFor=\"let add of content.additional\">\n <mat-form-field class=\"full-width\">\n <mat-label>{{add.key}}</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-{{add.key}}\"\n [(ngModel)]=\"add.value\"\n [disabled]=\"true\"\n >\n </mat-form-field>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!content.value\">\n <button mat-raised-button (click)=startUploader(content)>Upload</button>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <button mat-raised-button (click)=removeContent(content)>Remove Content</button>\n <button mat-raised-button (click)=\"addContent(section)\">+ Add Content</button>\n </div>\n <button mat-raised-button (click)=\"removeSection(section)\">Remove Section</button>\n <button mat-raised-button (click)=\"addContent(section)\" *ngIf=\"section.contents.length === 0\">+ Add\n Content\n </button>\n <button mat-raised-button (click)=\"addSection()\">+ Add Section</button>\n </div>\n\n </mat-card>\n <button mat-raised-button (click)=\"addSection()\" *ngIf=\"entry.sections?.length === 0\">+ Add Section</button>\n <button mat-raised-button (click)=\"addSection()\" *ngIf=\"!entry.sections\">+ Add Section</button>\n\n <div class=\"controls\">\n <button mat-raised-button (click)=\"resetDate()\">Reset the Date</button>\n <button mat-raised-button (click)=\"delete()\">Delete</button>\n <button mat-raised-button [disabled]=\"scheduling\" (click)=\"publish()\">Publish</button>\n <button mat-raised-button [disabled]=\"scheduling\" (click)=\"exposeScheduling()\">Schedule</button>\n <button mat-raised-button (click)=\"startNew()\">New</button>\n </div>\n <p *ngIf=\"scheduling\">Publishing is disabled while scheduling is being used.</p>\n\n <mat-card [hidden]=\"!scheduling\">\n <h4>\n Scheduling Options\n </h4>\n\n <div class=\"form-group\">\n <mat-form-field class=\"full-width\">\n <mat-label>Date</mat-label>\n <input\n #futurePublishDate\n matInput\n [matDatepicker]=\"picker\"\n [min]=\"today\"\n (dateInput)=\"onDateChange()\"\n (dateChange)=\"onDateChange()\"\n [(ngModel)]=\"entry.future_publish_date\"\n name=\"future-publish-date\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n #picker></mat-datepicker>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Time</mat-label>\n <input matInput [matTimepicker]=\"pickertwo\">\n <mat-timepicker-toggle matIconSuffix [for]=\"pickertwo\"/>\n <mat-timepicker #pickertwo/>\n </mat-form-field>\n <p>Times are represented in your local time zone</p>\n </div>\n\n <div mat-dialog-actions>\n <div class=\"controls\">\n <button mat-raised-button (click)=\"cancelScheduling()\">Cancel Scheduling</button>\n </div>\n </div>\n <p>This post will be published as soon as its scheduled date and time arrive. No further action is needed by you. If you do not\n want to use scheduling, you can cancel scheduling and manually publish.</p>\n </mat-card>\n </form>\n <div class=\"controls\">\n <button mat-raised-button (click)=\"seeEntries()\">See Entries</button>\n <button *ngIf=\"!this.entry\" mat-raised-button (click)=\"startNew()\">New</button>\n </div>\n</div>\n", styles: [".creator{min-height:calc(100vh - 100px)}form{padding:20px}.content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}button{margin:4px}.radio-group{display:flex;flex-direction:column;margin:15px 0}.radio-button{margin:4px}.full-width{width:100%}.content-card{margin:0 0 10px}.form-section{margin-bottom:10px}.form-content:not(:last-child){border-bottom:1px dotted #aaa;padding-bottom:10px}.controls{display:inline-block;width:100%;padding:10px}[hidden]{display:none!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i10.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i10.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i11.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: "directive", type: i12.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i13.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i13.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i13.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatTimepickerModule }, { kind: "component", type: i14.MatTimepicker, selector: "mat-timepicker", inputs: ["interval", "options", "disableRipple", "aria-label", "aria-labelledby"], outputs: ["selected", "opened", "closed"], exportAs: ["matTimepicker"] }, { kind: "directive", type: i14.MatTimepickerInput, selector: "input[matTimepicker]", inputs: ["value", "matTimepicker", "matTimepickerMin", "matTimepickerMax", "disabled"], outputs: ["valueChange"], exportAs: ["matTimepickerInput"] }, { kind: "component", type: i14.MatTimepickerToggle, selector: "mat-timepicker-toggle", inputs: ["for", "aria-label", "aria-labelledby", "disabled", "tabIndex", "disableRipple"], exportAs: ["matTimepickerToggle"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
1294
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: EntryCreatorComponent, isStandalone: true, selector: "app-entry-creator", inputs: { allowedMimeTypes: "allowedMimeTypes", uploadUrlKey: "uploadUrlKey" }, providers: [provideNativeDateAdapter()], viewQueries: [{ propertyName: "tagInput", first: true, predicate: ["tagInput"], descendants: true }, { propertyName: "matAutocomplete", first: true, predicate: ["tagauto"], descendants: true }], ngImport: i0, template: "<div class=\"section creator fields\">\n <div style=\"padding: 10px;\">\n <button\n style=\"width: 100%;\"\n mat-raised-button (click)=\"routeTo('create/v2(left-col:create//right-col:create)')\">V2</button>\n </div>\n <form #createForm=\"ngForm\" (change)=\"onChange()\" *ngIf=\"this.entry\">\n <div class=\"form-group\">\n <mat-form-field class=\"full-width\">\n <mat-label>Title</mat-label>\n <input matInput\n [(ngModel)]=\"entry.title\"\n name=\"title\">\n </mat-form-field>\n </div>\n <mat-card class=\"form-section tags\">\n <div>\n <!--\n <mat-form-field class=\"full-width\" hintLabel=\"Use a comma to seperate different tags\">\n <mat-chip-listbox #tagList aria-label=\"Tags\">\n <mat-chip-option\n *ngFor=\"let tag of tags\"\n [selectable]=\"selectable\"\n [removable]=\"removable\"\n (removed)=\"remove(tag)\">\n {{tag}}\n <mat-icon matChipRemove *ngIf=\"removable\">cancel</mat-icon>\n </mat-chip-option>\n <input\n matInput\n placeholder=\"Tags...\"\n #tagInput\n [formControl]=\"tagCtrl\"\n [matAutocomplete]=\"tagauto\"\n [matChipInputFor]=\"tagList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (matChipInputTokenEnd)=\"add($event)\">\n </mat-chip-listbox>\n <mat-autocomplete #tagauto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let tag of filtered_tags | async\" [value]=\"tag\">\n {{tag}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n -->\n </div>\n </mat-card>\n <mat-card class=\"form-section\" *ngFor=\"let section of entry.sections\">\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>Subheading</mat-label>\n <input matInput\n [(ngModel)]=\"section.subheading\"\n name=\"{{section.id}}-subheading\">\n </mat-form-field>\n <div class=\"form-content\" *ngFor=\"let content of section.contents\">\n <div class=\"form-group\">\n <mat-radio-group\n aria-label=\"Select the Content Type\"\n name=\"{{content.id}}-content-type\"\n class=\"radio-group\"\n [(ngModel)]=\"content.type\">\n <mat-radio-button\n *ngFor=\"let value of Object.values(ContentType)\"\n class=\"radio-button\"\n [value]=\"value\">{{value}}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Title</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-title\"\n [(ngModel)]=\"content.title\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.TEXT\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"3\"\n cdkAutosizeMaxRows=\"20\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"3\"\n cdkAutosizeMaxRows=\"20\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"10\"\n cdkAutosizeMaxRows=\"100\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-source\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Description</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-description\"\n [(ngModel)]=\"content.description\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <div class=\"full-width\">\n <ng-container *ngIf=\"content.value\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Description</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-description\"\n [(ngModel)]=\"content.description\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngIf=\"content.additional\">\n <ng-container *ngFor=\"let add of content.additional\">\n <mat-form-field class=\"full-width\">\n <mat-label>{{add.key}}</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-{{add.key}}\"\n [(ngModel)]=\"add.value\"\n [disabled]=\"true\"\n >\n </mat-form-field>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!content.value\">\n <button mat-raised-button (click)=startUploader(content)>Upload</button>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <button mat-raised-button (click)=removeContent(content)>Remove Content</button>\n <button mat-raised-button (click)=\"addContent(section)\">+ Add Content</button>\n </div>\n <button mat-raised-button (click)=\"removeSection(section)\">Remove Section</button>\n <button mat-raised-button (click)=\"addContent(section)\" *ngIf=\"section.contents.length === 0\">+ Add\n Content\n </button>\n <button mat-raised-button (click)=\"addSection()\">+ Add Section</button>\n </div>\n\n </mat-card>\n <button mat-raised-button (click)=\"addSection()\" *ngIf=\"entry.sections?.length === 0\">+ Add Section</button>\n <button mat-raised-button (click)=\"addSection()\" *ngIf=\"!entry.sections\">+ Add Section</button>\n\n <div class=\"controls\">\n <button mat-raised-button (click)=\"resetDate()\">Reset the Date</button>\n <button mat-raised-button (click)=\"delete()\">Delete</button>\n <button mat-raised-button [disabled]=\"scheduling\" (click)=\"publish()\">Publish</button>\n <button mat-raised-button [disabled]=\"scheduling\" (click)=\"exposeScheduling()\">Schedule</button>\n <button mat-raised-button (click)=\"startNew()\">New</button>\n </div>\n <p *ngIf=\"scheduling\">Publishing is disabled while scheduling is being used.</p>\n\n <mat-card [hidden]=\"!scheduling\">\n <h4>\n Scheduling Options\n </h4>\n\n <div class=\"form-group\">\n <mat-form-field class=\"full-width\">\n <mat-label>Date</mat-label>\n <input\n #futurePublishDate\n matInput\n [matDatepicker]=\"picker\"\n [min]=\"today\"\n (dateInput)=\"onDateChange()\"\n (dateChange)=\"onDateChange()\"\n [(ngModel)]=\"entry.future_publish_date\"\n name=\"future-publish-date\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n #picker></mat-datepicker>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Time</mat-label>\n <input matInput [matTimepicker]=\"pickertwo\">\n <mat-timepicker-toggle matIconSuffix [for]=\"pickertwo\"/>\n <mat-timepicker #pickertwo/>\n </mat-form-field>\n <p>Times are represented in your local time zone</p>\n </div>\n\n <div mat-dialog-actions>\n <div class=\"controls\">\n <button mat-raised-button (click)=\"cancelScheduling()\">Cancel Scheduling</button>\n </div>\n </div>\n <p>This post will be published as soon as its scheduled date and time arrive. No further action is needed by you. If you do not\n want to use scheduling, you can cancel scheduling and manually publish.</p>\n </mat-card>\n </form>\n <div class=\"controls\">\n <button mat-raised-button (click)=\"seeEntries()\">See Entries</button>\n <button *ngIf=\"!this.entry\" mat-raised-button (click)=\"startNew()\">New</button>\n </div>\n\n <button class=\"floating-landing-button\" mat-fab (click)=\"routeTo('/')\">Home</button>\n</div>\n", styles: [".creator{min-height:calc(100vh - 100px)}form{padding:20px}.content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}button{margin:4px}.radio-group{display:flex;flex-direction:column;margin:15px 0}.radio-button{margin:4px}.full-width{width:100%}.content-card{margin:0 0 10px}.form-section{margin-bottom:10px}.form-content:not(:last-child){border-bottom:1px dotted #aaa;padding-bottom:10px}.controls{display:inline-block;width:100%;padding:10px}[hidden]{display:none!important}.floating-landing-button{position:fixed;right:20px;bottom:20px;z-index:1000}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i10.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i10.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i11.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: "directive", type: i12.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i13.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i13.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i13.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatTimepickerModule }, { kind: "component", type: i14.MatTimepicker, selector: "mat-timepicker", inputs: ["interval", "options", "disableRipple", "aria-label", "aria-labelledby"], outputs: ["selected", "opened", "closed"], exportAs: ["matTimepicker"] }, { kind: "directive", type: i14.MatTimepickerInput, selector: "input[matTimepicker]", inputs: ["value", "matTimepicker", "matTimepickerMin", "matTimepickerMax", "disabled"], outputs: ["valueChange"], exportAs: ["matTimepickerInput"] }, { kind: "component", type: i14.MatTimepickerToggle, selector: "mat-timepicker-toggle", inputs: ["for", "aria-label", "aria-labelledby", "disabled", "tabIndex", "disableRipple"], exportAs: ["matTimepickerToggle"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i15.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i15.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }] }); }
1251
1295
  }
1252
1296
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntryCreatorComponent, decorators: [{
1253
1297
  type: Component,
@@ -1266,7 +1310,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
1266
1310
  MatDatepickerModule,
1267
1311
  MatTimepickerModule,
1268
1312
  MatButtonModule,
1269
- ], template: "<div class=\"section creator fields\">\n <div style=\"padding: 10px;\">\n <button\n style=\"width: 100%;\"\n mat-raised-button (click)=\"routeTo('create/v2(left-col:create//right-col:create)')\">V2</button>\n </div>\n <form #createForm=\"ngForm\" (change)=\"onChange()\" *ngIf=\"this.entry\">\n <div class=\"form-group\">\n <mat-form-field class=\"full-width\">\n <mat-label>Title</mat-label>\n <input matInput\n [(ngModel)]=\"entry.title\"\n name=\"title\">\n </mat-form-field>\n </div>\n <mat-card class=\"form-section tags\">\n <div>\n <!--\n <mat-form-field class=\"full-width\" hintLabel=\"Use a comma to seperate different tags\">\n <mat-chip-listbox #tagList aria-label=\"Tags\">\n <mat-chip-option\n *ngFor=\"let tag of tags\"\n [selectable]=\"selectable\"\n [removable]=\"removable\"\n (removed)=\"remove(tag)\">\n {{tag}}\n <mat-icon matChipRemove *ngIf=\"removable\">cancel</mat-icon>\n </mat-chip-option>\n <input\n matInput\n placeholder=\"Tags...\"\n #tagInput\n [formControl]=\"tagCtrl\"\n [matAutocomplete]=\"tagauto\"\n [matChipInputFor]=\"tagList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (matChipInputTokenEnd)=\"add($event)\">\n </mat-chip-listbox>\n <mat-autocomplete #tagauto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let tag of filtered_tags | async\" [value]=\"tag\">\n {{tag}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n -->\n </div>\n </mat-card>\n <mat-card class=\"form-section\" *ngFor=\"let section of entry.sections\">\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>Subheading</mat-label>\n <input matInput\n [(ngModel)]=\"section.subheading\"\n name=\"{{section.id}}-subheading\">\n </mat-form-field>\n <div class=\"form-content\" *ngFor=\"let content of section.contents\">\n <div class=\"form-group\">\n <mat-radio-group\n aria-label=\"Select the Content Type\"\n name=\"{{content.id}}-content-type\"\n class=\"radio-group\"\n [(ngModel)]=\"content.type\">\n <mat-radio-button\n *ngFor=\"let value of Object.values(ContentType)\"\n class=\"radio-button\"\n [value]=\"value\">{{value}}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Title</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-title\"\n [(ngModel)]=\"content.title\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.TEXT\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"3\"\n cdkAutosizeMaxRows=\"20\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"3\"\n cdkAutosizeMaxRows=\"20\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"10\"\n cdkAutosizeMaxRows=\"100\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-source\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Description</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-description\"\n [(ngModel)]=\"content.description\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <div class=\"full-width\">\n <ng-container *ngIf=\"content.value\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Description</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-description\"\n [(ngModel)]=\"content.description\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngIf=\"content.additional\">\n <ng-container *ngFor=\"let add of content.additional\">\n <mat-form-field class=\"full-width\">\n <mat-label>{{add.key}}</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-{{add.key}}\"\n [(ngModel)]=\"add.value\"\n [disabled]=\"true\"\n >\n </mat-form-field>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!content.value\">\n <button mat-raised-button (click)=startUploader(content)>Upload</button>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <button mat-raised-button (click)=removeContent(content)>Remove Content</button>\n <button mat-raised-button (click)=\"addContent(section)\">+ Add Content</button>\n </div>\n <button mat-raised-button (click)=\"removeSection(section)\">Remove Section</button>\n <button mat-raised-button (click)=\"addContent(section)\" *ngIf=\"section.contents.length === 0\">+ Add\n Content\n </button>\n <button mat-raised-button (click)=\"addSection()\">+ Add Section</button>\n </div>\n\n </mat-card>\n <button mat-raised-button (click)=\"addSection()\" *ngIf=\"entry.sections?.length === 0\">+ Add Section</button>\n <button mat-raised-button (click)=\"addSection()\" *ngIf=\"!entry.sections\">+ Add Section</button>\n\n <div class=\"controls\">\n <button mat-raised-button (click)=\"resetDate()\">Reset the Date</button>\n <button mat-raised-button (click)=\"delete()\">Delete</button>\n <button mat-raised-button [disabled]=\"scheduling\" (click)=\"publish()\">Publish</button>\n <button mat-raised-button [disabled]=\"scheduling\" (click)=\"exposeScheduling()\">Schedule</button>\n <button mat-raised-button (click)=\"startNew()\">New</button>\n </div>\n <p *ngIf=\"scheduling\">Publishing is disabled while scheduling is being used.</p>\n\n <mat-card [hidden]=\"!scheduling\">\n <h4>\n Scheduling Options\n </h4>\n\n <div class=\"form-group\">\n <mat-form-field class=\"full-width\">\n <mat-label>Date</mat-label>\n <input\n #futurePublishDate\n matInput\n [matDatepicker]=\"picker\"\n [min]=\"today\"\n (dateInput)=\"onDateChange()\"\n (dateChange)=\"onDateChange()\"\n [(ngModel)]=\"entry.future_publish_date\"\n name=\"future-publish-date\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n #picker></mat-datepicker>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Time</mat-label>\n <input matInput [matTimepicker]=\"pickertwo\">\n <mat-timepicker-toggle matIconSuffix [for]=\"pickertwo\"/>\n <mat-timepicker #pickertwo/>\n </mat-form-field>\n <p>Times are represented in your local time zone</p>\n </div>\n\n <div mat-dialog-actions>\n <div class=\"controls\">\n <button mat-raised-button (click)=\"cancelScheduling()\">Cancel Scheduling</button>\n </div>\n </div>\n <p>This post will be published as soon as its scheduled date and time arrive. No further action is needed by you. If you do not\n want to use scheduling, you can cancel scheduling and manually publish.</p>\n </mat-card>\n </form>\n <div class=\"controls\">\n <button mat-raised-button (click)=\"seeEntries()\">See Entries</button>\n <button *ngIf=\"!this.entry\" mat-raised-button (click)=\"startNew()\">New</button>\n </div>\n</div>\n", styles: [".creator{min-height:calc(100vh - 100px)}form{padding:20px}.content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}button{margin:4px}.radio-group{display:flex;flex-direction:column;margin:15px 0}.radio-button{margin:4px}.full-width{width:100%}.content-card{margin:0 0 10px}.form-section{margin-bottom:10px}.form-content:not(:last-child){border-bottom:1px dotted #aaa;padding-bottom:10px}.controls{display:inline-block;width:100%;padding:10px}[hidden]{display:none!important}\n"] }]
1313
+ ], template: "<div class=\"section creator fields\">\n <div style=\"padding: 10px;\">\n <button\n style=\"width: 100%;\"\n mat-raised-button (click)=\"routeTo('create/v2(left-col:create//right-col:create)')\">V2</button>\n </div>\n <form #createForm=\"ngForm\" (change)=\"onChange()\" *ngIf=\"this.entry\">\n <div class=\"form-group\">\n <mat-form-field class=\"full-width\">\n <mat-label>Title</mat-label>\n <input matInput\n [(ngModel)]=\"entry.title\"\n name=\"title\">\n </mat-form-field>\n </div>\n <mat-card class=\"form-section tags\">\n <div>\n <!--\n <mat-form-field class=\"full-width\" hintLabel=\"Use a comma to seperate different tags\">\n <mat-chip-listbox #tagList aria-label=\"Tags\">\n <mat-chip-option\n *ngFor=\"let tag of tags\"\n [selectable]=\"selectable\"\n [removable]=\"removable\"\n (removed)=\"remove(tag)\">\n {{tag}}\n <mat-icon matChipRemove *ngIf=\"removable\">cancel</mat-icon>\n </mat-chip-option>\n <input\n matInput\n placeholder=\"Tags...\"\n #tagInput\n [formControl]=\"tagCtrl\"\n [matAutocomplete]=\"tagauto\"\n [matChipInputFor]=\"tagList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (matChipInputTokenEnd)=\"add($event)\">\n </mat-chip-listbox>\n <mat-autocomplete #tagauto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let tag of filtered_tags | async\" [value]=\"tag\">\n {{tag}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n -->\n </div>\n </mat-card>\n <mat-card class=\"form-section\" *ngFor=\"let section of entry.sections\">\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>Subheading</mat-label>\n <input matInput\n [(ngModel)]=\"section.subheading\"\n name=\"{{section.id}}-subheading\">\n </mat-form-field>\n <div class=\"form-content\" *ngFor=\"let content of section.contents\">\n <div class=\"form-group\">\n <mat-radio-group\n aria-label=\"Select the Content Type\"\n name=\"{{content.id}}-content-type\"\n class=\"radio-group\"\n [(ngModel)]=\"content.type\">\n <mat-radio-button\n *ngFor=\"let value of Object.values(ContentType)\"\n class=\"radio-button\"\n [value]=\"value\">{{value}}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Title</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-title\"\n [(ngModel)]=\"content.title\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.TEXT\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"3\"\n cdkAutosizeMaxRows=\"20\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"3\"\n cdkAutosizeMaxRows=\"20\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"10\"\n cdkAutosizeMaxRows=\"100\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-source\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Description</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-description\"\n [(ngModel)]=\"content.description\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <div class=\"full-width\">\n <ng-container *ngIf=\"content.value\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Description</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-description\"\n [(ngModel)]=\"content.description\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngIf=\"content.additional\">\n <ng-container *ngFor=\"let add of content.additional\">\n <mat-form-field class=\"full-width\">\n <mat-label>{{add.key}}</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-{{add.key}}\"\n [(ngModel)]=\"add.value\"\n [disabled]=\"true\"\n >\n </mat-form-field>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!content.value\">\n <button mat-raised-button (click)=startUploader(content)>Upload</button>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <button mat-raised-button (click)=removeContent(content)>Remove Content</button>\n <button mat-raised-button (click)=\"addContent(section)\">+ Add Content</button>\n </div>\n <button mat-raised-button (click)=\"removeSection(section)\">Remove Section</button>\n <button mat-raised-button (click)=\"addContent(section)\" *ngIf=\"section.contents.length === 0\">+ Add\n Content\n </button>\n <button mat-raised-button (click)=\"addSection()\">+ Add Section</button>\n </div>\n\n </mat-card>\n <button mat-raised-button (click)=\"addSection()\" *ngIf=\"entry.sections?.length === 0\">+ Add Section</button>\n <button mat-raised-button (click)=\"addSection()\" *ngIf=\"!entry.sections\">+ Add Section</button>\n\n <div class=\"controls\">\n <button mat-raised-button (click)=\"resetDate()\">Reset the Date</button>\n <button mat-raised-button (click)=\"delete()\">Delete</button>\n <button mat-raised-button [disabled]=\"scheduling\" (click)=\"publish()\">Publish</button>\n <button mat-raised-button [disabled]=\"scheduling\" (click)=\"exposeScheduling()\">Schedule</button>\n <button mat-raised-button (click)=\"startNew()\">New</button>\n </div>\n <p *ngIf=\"scheduling\">Publishing is disabled while scheduling is being used.</p>\n\n <mat-card [hidden]=\"!scheduling\">\n <h4>\n Scheduling Options\n </h4>\n\n <div class=\"form-group\">\n <mat-form-field class=\"full-width\">\n <mat-label>Date</mat-label>\n <input\n #futurePublishDate\n matInput\n [matDatepicker]=\"picker\"\n [min]=\"today\"\n (dateInput)=\"onDateChange()\"\n (dateChange)=\"onDateChange()\"\n [(ngModel)]=\"entry.future_publish_date\"\n name=\"future-publish-date\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n #picker></mat-datepicker>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Time</mat-label>\n <input matInput [matTimepicker]=\"pickertwo\">\n <mat-timepicker-toggle matIconSuffix [for]=\"pickertwo\"/>\n <mat-timepicker #pickertwo/>\n </mat-form-field>\n <p>Times are represented in your local time zone</p>\n </div>\n\n <div mat-dialog-actions>\n <div class=\"controls\">\n <button mat-raised-button (click)=\"cancelScheduling()\">Cancel Scheduling</button>\n </div>\n </div>\n <p>This post will be published as soon as its scheduled date and time arrive. No further action is needed by you. If you do not\n want to use scheduling, you can cancel scheduling and manually publish.</p>\n </mat-card>\n </form>\n <div class=\"controls\">\n <button mat-raised-button (click)=\"seeEntries()\">See Entries</button>\n <button *ngIf=\"!this.entry\" mat-raised-button (click)=\"startNew()\">New</button>\n </div>\n\n <button class=\"floating-landing-button\" mat-fab (click)=\"routeTo('/')\">Home</button>\n</div>\n", styles: [".creator{min-height:calc(100vh - 100px)}form{padding:20px}.content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}button{margin:4px}.radio-group{display:flex;flex-direction:column;margin:15px 0}.radio-button{margin:4px}.full-width{width:100%}.content-card{margin:0 0 10px}.form-section{margin-bottom:10px}.form-content:not(:last-child){border-bottom:1px dotted #aaa;padding-bottom:10px}.controls{display:inline-block;width:100%;padding:10px}[hidden]{display:none!important}.floating-landing-button{position:fixed;right:20px;bottom:20px;z-index:1000}\n"] }]
1270
1314
  }], ctorParameters: () => [{ type: i1$3.Router }, { type: EntryService }, { type: TagService }, { type: IdentityService }, { type: i0.ChangeDetectorRef }, { type: i1$2.MatDialog }], propDecorators: { tagInput: [{
1271
1315
  type: ViewChild,
1272
1316
  args: ['tagInput']
@@ -1508,7 +1552,7 @@ class EntryWysiwygComponent {
1508
1552
  alert(something);
1509
1553
  }
1510
1554
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntryWysiwygComponent, deps: [{ token: i1$3.Router }, { token: EntryService }, { token: TagService }, { token: IdentityService }, { token: i1$2.MatDialog }, { token: i1$1.DomSanitizer }, { token: i7.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1511
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: EntryWysiwygComponent, isStandalone: true, selector: "lib-entry-wysiwyg", providers: [provideNativeDateAdapter()], ngImport: i0, template: "<div class=\"container\" style=\"padding: 20px;\">\n <div style=\"padding: 10px;\">\n <button\n style=\"width: 100%;\"\n mat-raised-button\n (click)=\"routeTo('create(left-col:create//right-col:create)')\">V1</button>\n </div>\n <div>\n <div *ngIf=\"entry\">\n <h2>{{entry?.title}}</h2>\n\n <h3>Posted {{entry?.create_date.toString() | timeAgo}} on {{entry?.create_date?.getMonth() + 1}}/{{entry?.create_date?.getDate()}}/{{entry?.create_date?.getFullYear()}}</h3>\n <h5 *ngIf=\"entry?.showEditInformation()\">Article was last edited {{entry?.edit_date.toString() | timeAgo}}</h5>\n <br>\n <p *ngIf=\"entry?.tags?.length > 0\">Tags: <span *ngFor=\"let tag of entry?.tags; let last = last\">{{tag}}<ng-container *ngIf=\"!last\"> |\n </ng-container></span><span *ngIf=\"entry?.views\">, {{entry._friendly_views}} views</span></p>\n </div>\n\n <div style=\"width: 100%; padding: 10px;\">\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"publish()\"\n >Publish</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"seeEntries()\"\n >Entries</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"displayAlert('One day...')\"\n >Advanced</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"startNew()\"\n >New</button>\n </div>\n </div>\n\n <form [formGroup]=\"form\">\n <quill-editor\n style=\"width: 100%;\"\n format=\"{{format}}\"\n formControlName=\"html\"\n theme=\"bubble\"\n ></quill-editor>\n </form>\n</div>\n", styles: [".create-container{margin-left:auto;margin-right:auto;width:80%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: QuillEditorComponent, selector: "quill-editor" }, { kind: "pipe", type: TimeAgoPipe, name: "timeAgo" }] }); }
1555
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: EntryWysiwygComponent, isStandalone: true, selector: "lib-entry-wysiwyg", providers: [provideNativeDateAdapter()], ngImport: i0, template: "<div class=\"container\" style=\"padding: 20px;\">\n <div style=\"padding: 10px;\">\n <button\n style=\"width: 100%;\"\n mat-raised-button\n (click)=\"routeTo('create(left-col:create//right-col:create)')\">V1</button>\n </div>\n <div>\n <div *ngIf=\"entry\">\n <h2>{{entry?.title}}</h2>\n\n <h3>Posted {{entry?.create_date.toString() | timeAgo}} on {{entry?.create_date?.getMonth() + 1}}/{{entry?.create_date?.getDate()}}/{{entry?.create_date?.getFullYear()}}</h3>\n <h5 *ngIf=\"entry?.showEditInformation()\">Article was last edited {{entry?.edit_date.toString() | timeAgo}}</h5>\n <br>\n <p *ngIf=\"entry?.tags?.length > 0\">Tags: <span *ngFor=\"let tag of entry?.tags; let last = last\">{{tag}}<ng-container *ngIf=\"!last\"> |\n </ng-container></span><span *ngIf=\"entry?.views\">, {{entry._friendly_views}} views</span></p>\n </div>\n\n <div style=\"width: 100%; padding: 10px;\">\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"publish()\"\n >Publish</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"seeEntries()\"\n >Entries</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"displayAlert('One day...')\"\n >Advanced</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"startNew()\"\n >New</button>\n </div>\n </div>\n\n <form [formGroup]=\"form\">\n <quill-editor\n style=\"width: 100%;\"\n format=\"{{format}}\"\n formControlName=\"html\"\n theme=\"bubble\"\n ></quill-editor>\n </form>\n\n <button class=\"floating-landing-button\" mat-fab (click)=\"routeTo('/')\">Home</button>\n</div>\n", styles: [".create-container{margin-left:auto;margin-right:auto;width:80%}.floating-landing-button{position:fixed;right:20px;bottom:20px;z-index:1000}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i15.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i15.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "component", type: QuillEditorComponent, selector: "quill-editor" }, { kind: "pipe", type: TimeAgoPipe, name: "timeAgo" }] }); }
1512
1556
  }
1513
1557
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntryWysiwygComponent, decorators: [{
1514
1558
  type: Component,
@@ -1520,7 +1564,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
1520
1564
  MatButtonModule,
1521
1565
  QuillEditorComponent,
1522
1566
  TimeAgoPipe,
1523
- ], template: "<div class=\"container\" style=\"padding: 20px;\">\n <div style=\"padding: 10px;\">\n <button\n style=\"width: 100%;\"\n mat-raised-button\n (click)=\"routeTo('create(left-col:create//right-col:create)')\">V1</button>\n </div>\n <div>\n <div *ngIf=\"entry\">\n <h2>{{entry?.title}}</h2>\n\n <h3>Posted {{entry?.create_date.toString() | timeAgo}} on {{entry?.create_date?.getMonth() + 1}}/{{entry?.create_date?.getDate()}}/{{entry?.create_date?.getFullYear()}}</h3>\n <h5 *ngIf=\"entry?.showEditInformation()\">Article was last edited {{entry?.edit_date.toString() | timeAgo}}</h5>\n <br>\n <p *ngIf=\"entry?.tags?.length > 0\">Tags: <span *ngFor=\"let tag of entry?.tags; let last = last\">{{tag}}<ng-container *ngIf=\"!last\"> |\n </ng-container></span><span *ngIf=\"entry?.views\">, {{entry._friendly_views}} views</span></p>\n </div>\n\n <div style=\"width: 100%; padding: 10px;\">\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"publish()\"\n >Publish</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"seeEntries()\"\n >Entries</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"displayAlert('One day...')\"\n >Advanced</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"startNew()\"\n >New</button>\n </div>\n </div>\n\n <form [formGroup]=\"form\">\n <quill-editor\n style=\"width: 100%;\"\n format=\"{{format}}\"\n formControlName=\"html\"\n theme=\"bubble\"\n ></quill-editor>\n </form>\n</div>\n", styles: [".create-container{margin-left:auto;margin-right:auto;width:80%}\n"] }]
1567
+ ], template: "<div class=\"container\" style=\"padding: 20px;\">\n <div style=\"padding: 10px;\">\n <button\n style=\"width: 100%;\"\n mat-raised-button\n (click)=\"routeTo('create(left-col:create//right-col:create)')\">V1</button>\n </div>\n <div>\n <div *ngIf=\"entry\">\n <h2>{{entry?.title}}</h2>\n\n <h3>Posted {{entry?.create_date.toString() | timeAgo}} on {{entry?.create_date?.getMonth() + 1}}/{{entry?.create_date?.getDate()}}/{{entry?.create_date?.getFullYear()}}</h3>\n <h5 *ngIf=\"entry?.showEditInformation()\">Article was last edited {{entry?.edit_date.toString() | timeAgo}}</h5>\n <br>\n <p *ngIf=\"entry?.tags?.length > 0\">Tags: <span *ngFor=\"let tag of entry?.tags; let last = last\">{{tag}}<ng-container *ngIf=\"!last\"> |\n </ng-container></span><span *ngIf=\"entry?.views\">, {{entry._friendly_views}} views</span></p>\n </div>\n\n <div style=\"width: 100%; padding: 10px;\">\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"publish()\"\n >Publish</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"seeEntries()\"\n >Entries</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"displayAlert('One day...')\"\n >Advanced</button>\n\n <button\n style=\"width: 24%; margin: 5px;\"\n mat-raised-button\n (click)=\"startNew()\"\n >New</button>\n </div>\n </div>\n\n <form [formGroup]=\"form\">\n <quill-editor\n style=\"width: 100%;\"\n format=\"{{format}}\"\n formControlName=\"html\"\n theme=\"bubble\"\n ></quill-editor>\n </form>\n\n <button class=\"floating-landing-button\" mat-fab (click)=\"routeTo('/')\">Home</button>\n</div>\n", styles: [".create-container{margin-left:auto;margin-right:auto;width:80%}.floating-landing-button{position:fixed;right:20px;bottom:20px;z-index:1000}\n"] }]
1524
1568
  }], ctorParameters: () => [{ type: i1$3.Router }, { type: EntryService }, { type: TagService }, { type: IdentityService }, { type: i1$2.MatDialog }, { type: i1$1.DomSanitizer }, { type: i7.FormBuilder }] });
1525
1569
 
1526
1570
  class StaticHtmlComponent {
@@ -2021,14 +2065,227 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
2021
2065
  args: ['navcontainer', { static: false }]
2022
2066
  }] } });
2023
2067
 
2068
+ const FRONTEND_VERSION = '0.30.0';
2069
+ const EXPECTED_API_CONTRACT = '^1.0.0';
2070
+
2071
+ class SyncConfigService {
2072
+ constructor(http) {
2073
+ this.http = http;
2074
+ this.endpoint = '/blog_api/sync_config/';
2075
+ }
2076
+ getSyncConfig() {
2077
+ return this.http.get(this.endpoint);
2078
+ }
2079
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SyncConfigService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
2080
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SyncConfigService, providedIn: 'root' }); }
2081
+ }
2082
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SyncConfigService, decorators: [{
2083
+ type: Injectable,
2084
+ args: [{
2085
+ providedIn: 'root'
2086
+ }]
2087
+ }], ctorParameters: () => [{ type: i1.HttpClient }] });
2088
+
2089
+ class ApiCompatibilityService {
2090
+ constructor(syncConfigService) {
2091
+ this.syncConfigService = syncConfigService;
2092
+ this.started = false;
2093
+ this.resultSubject = new ReplaySubject(1);
2094
+ }
2095
+ ensureChecked() {
2096
+ if (!this.started) {
2097
+ this.started = true;
2098
+ this.syncConfigService.getSyncConfig().pipe(map$2((cfg) => {
2099
+ const backendApiContractVersion = cfg.api_contract_version || '';
2100
+ const backendSupportedFrontendVersions = cfg.supported_frontend_versions || '';
2101
+ if (!backendApiContractVersion || !backendSupportedFrontendVersions) {
2102
+ return this.createResult(false, 'Backend sync config is missing compatibility metadata.', backendApiContractVersion, backendSupportedFrontendVersions);
2103
+ }
2104
+ const apiContractMatches = this.satisfiesRange(backendApiContractVersion, EXPECTED_API_CONTRACT);
2105
+ const frontendSupported = this.satisfiesRange(FRONTEND_VERSION, backendSupportedFrontendVersions);
2106
+ if (!apiContractMatches) {
2107
+ return this.createResult(false, 'Backend API contract version is outside the frontend expected range.', backendApiContractVersion, backendSupportedFrontendVersions);
2108
+ }
2109
+ if (!frontendSupported) {
2110
+ return this.createResult(false, 'Frontend version is outside the backend supported range.', backendApiContractVersion, backendSupportedFrontendVersions);
2111
+ }
2112
+ return this.createResult(true, 'API compatibility validated.', backendApiContractVersion, backendSupportedFrontendVersions);
2113
+ }), catchError((err) => {
2114
+ return of(this.createResult(false, 'Unable to validate API compatibility from backend sync config.', '', ''));
2115
+ })).subscribe((result) => {
2116
+ this.current = result;
2117
+ this.resultSubject.next(result);
2118
+ });
2119
+ }
2120
+ return this.resultSubject.asObservable();
2121
+ }
2122
+ getCurrentResult() {
2123
+ return this.current;
2124
+ }
2125
+ createResult(compatible, reason, backendApiContractVersion, backendSupportedFrontendVersions) {
2126
+ return {
2127
+ compatible,
2128
+ reason,
2129
+ frontendVersion: FRONTEND_VERSION,
2130
+ expectedApiContract: EXPECTED_API_CONTRACT,
2131
+ backendApiContractVersion,
2132
+ backendSupportedFrontendVersions
2133
+ };
2134
+ }
2135
+ satisfiesRange(versionText, rangeText) {
2136
+ const version = this.parseVersion(versionText);
2137
+ if (!version) {
2138
+ return false;
2139
+ }
2140
+ if (!rangeText || rangeText.trim().length === 0) {
2141
+ return false;
2142
+ }
2143
+ const range = rangeText.trim();
2144
+ if (range.startsWith('^')) {
2145
+ return this.satisfiesCaret(version, range.substring(1));
2146
+ }
2147
+ if (range.startsWith('~')) {
2148
+ return this.satisfiesTilde(version, range.substring(1));
2149
+ }
2150
+ const tokens = range.split(/\s+/).filter((token) => token.length > 0);
2151
+ if (tokens.length === 1 && !this.hasComparator(tokens[0])) {
2152
+ const exact = this.parseVersion(tokens[0]);
2153
+ return !!exact && this.compareVersions(version, exact) === 0;
2154
+ }
2155
+ for (const token of tokens) {
2156
+ if (!this.satisfiesComparator(version, token)) {
2157
+ return false;
2158
+ }
2159
+ }
2160
+ return true;
2161
+ }
2162
+ hasComparator(token) {
2163
+ return token.startsWith('>=') ||
2164
+ token.startsWith('<=') ||
2165
+ token.startsWith('>') ||
2166
+ token.startsWith('<') ||
2167
+ token.startsWith('=');
2168
+ }
2169
+ satisfiesComparator(version, token) {
2170
+ let comparator = '';
2171
+ let versionText = token;
2172
+ if (token.startsWith('>=')) {
2173
+ comparator = '>=';
2174
+ versionText = token.substring(2);
2175
+ }
2176
+ else if (token.startsWith('<=')) {
2177
+ comparator = '<=';
2178
+ versionText = token.substring(2);
2179
+ }
2180
+ else if (token.startsWith('>')) {
2181
+ comparator = '>';
2182
+ versionText = token.substring(1);
2183
+ }
2184
+ else if (token.startsWith('<')) {
2185
+ comparator = '<';
2186
+ versionText = token.substring(1);
2187
+ }
2188
+ else if (token.startsWith('=')) {
2189
+ comparator = '=';
2190
+ versionText = token.substring(1);
2191
+ }
2192
+ else {
2193
+ comparator = '=';
2194
+ }
2195
+ const target = this.parseVersion(versionText);
2196
+ if (!target) {
2197
+ return false;
2198
+ }
2199
+ const cmp = this.compareVersions(version, target);
2200
+ if (comparator === '>=') {
2201
+ return cmp >= 0;
2202
+ }
2203
+ if (comparator === '<=') {
2204
+ return cmp <= 0;
2205
+ }
2206
+ if (comparator === '>') {
2207
+ return cmp > 0;
2208
+ }
2209
+ if (comparator === '<') {
2210
+ return cmp < 0;
2211
+ }
2212
+ return cmp === 0;
2213
+ }
2214
+ satisfiesCaret(version, lowerBoundText) {
2215
+ const lowerBound = this.parseVersion(lowerBoundText);
2216
+ if (!lowerBound) {
2217
+ return false;
2218
+ }
2219
+ if (this.compareVersions(version, lowerBound) < 0) {
2220
+ return false;
2221
+ }
2222
+ const upperBound = {
2223
+ major: lowerBound.major + 1,
2224
+ minor: 0,
2225
+ patch: 0
2226
+ };
2227
+ return this.compareVersions(version, upperBound) < 0;
2228
+ }
2229
+ satisfiesTilde(version, lowerBoundText) {
2230
+ const lowerBound = this.parseVersion(lowerBoundText);
2231
+ if (!lowerBound) {
2232
+ return false;
2233
+ }
2234
+ if (this.compareVersions(version, lowerBound) < 0) {
2235
+ return false;
2236
+ }
2237
+ const upperBound = {
2238
+ major: lowerBound.major,
2239
+ minor: lowerBound.minor + 1,
2240
+ patch: 0
2241
+ };
2242
+ return this.compareVersions(version, upperBound) < 0;
2243
+ }
2244
+ compareVersions(left, right) {
2245
+ if (left.major !== right.major) {
2246
+ return left.major - right.major;
2247
+ }
2248
+ if (left.minor !== right.minor) {
2249
+ return left.minor - right.minor;
2250
+ }
2251
+ return left.patch - right.patch;
2252
+ }
2253
+ parseVersion(text) {
2254
+ const normalized = (text || '').trim();
2255
+ const matches = normalized.match(/^(\d+)\.(\d+)\.(\d+)$/);
2256
+ if (!matches) {
2257
+ return null;
2258
+ }
2259
+ return {
2260
+ major: Number(matches[1]),
2261
+ minor: Number(matches[2]),
2262
+ patch: Number(matches[3])
2263
+ };
2264
+ }
2265
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: ApiCompatibilityService, deps: [{ token: SyncConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2266
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: ApiCompatibilityService, providedIn: 'root' }); }
2267
+ }
2268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: ApiCompatibilityService, decorators: [{
2269
+ type: Injectable,
2270
+ args: [{
2271
+ providedIn: 'root'
2272
+ }]
2273
+ }], ctorParameters: () => [{ type: SyncConfigService }] });
2274
+
2024
2275
  class MainComponent {
2025
- constructor(router) {
2276
+ constructor(router, apiCompatibilityService) {
2026
2277
  this.router = router;
2278
+ this.apiCompatibilityService = apiCompatibilityService;
2027
2279
  this.loaded = true;
2028
2280
  this.subs = new Subscription();
2029
2281
  this.resizeSubject = new Subject();
2282
+ this.compatibilityChecked = false;
2030
2283
  }
2031
2284
  ngOnInit() {
2285
+ this.subs.add(this.apiCompatibilityService.ensureChecked().subscribe((result) => {
2286
+ this.compatibility = result;
2287
+ this.compatibilityChecked = true;
2288
+ }));
2032
2289
  this.subs.add(this.router.events.subscribe((e) => {
2033
2290
  if (e instanceof NavigationEnd) {
2034
2291
  if (e.urlAfterRedirects.includes('create')) {
@@ -2057,16 +2314,16 @@ class MainComponent {
2057
2314
  ngOnDestroy() {
2058
2315
  this.subs.unsubscribe();
2059
2316
  }
2060
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: MainComponent, deps: [{ token: i1$3.Router }], target: i0.ɵɵFactoryTarget.Component }); }
2061
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: MainComponent, isStandalone: true, selector: "lib-main", host: { listeners: { "window:resize": "onResize($event)" } }, ngImport: i0, template: "<ng-container *ngIf=\"loaded\">\n <div class=\"container\">\n <div class=\"body\">\n <div class=\"container-row\">\n <mat-sidenav-container [autosize]=\"true\">\n <mat-sidenav [(opened)]=\"showLeftCol\" #leftcol opened mode=\"side\" class=\"left no-scrollbar\">\n <router-outlet name=\"left-col\"></router-outlet>\n <button mat-mini-fab color=\"primary\" class=\"fade left-toggle\" *ngIf=\"showLeftCol\" (click)=\"leftcol.toggle()\"> << </button>\n </mat-sidenav>\n <mat-sidenav [(opened)]=\"showRightCol\" #rightcol mode=\"side\" position=\"end\" class=\"right\">\n <button mat-mini-fab color=\"primary\" class=\"fade right-toggle\" *ngIf=\"showRightCol\" (click)=\"rightcol.toggle()\"> >> </button>\n <router-outlet name=\"right-col\"></router-outlet>\n </mat-sidenav>\n <div class=\"middle\">\n <button mat-mini-fab color=\"primary\" class=\"fade left-toggle\" *ngIf=\"!showLeftCol\" (click)=\"leftcol.toggle()\"> >> </button>\n <button mat-mini-fab color=\"primary\" class=\"fade right-toggle\" *ngIf=\"!showRightCol\" (click)=\"rightcol.toggle()\"> << </button>\n <router-outlet></router-outlet>\n </div>\n </mat-sidenav-container>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: ["a{text-decoration:none}.body{flex-grow:1;max-height:calc(100vh - 100px);overflow:scroll}@media screen and (max-height: 560px){.body{max-height:100vh}}.left,.right{min-width:400px;max-width:33vw}.left-toggle{position:fixed;top:50%;left:5px;z-index:100}.right-toggle{position:fixed;top:50%;right:5px;z-index:100}a{margin-right:10px}a:not(:last-child):after{margin-left:10px;content:\"|\"}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i2$1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i2$1.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }] }); }
2317
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: MainComponent, deps: [{ token: i1$3.Router }, { token: ApiCompatibilityService }], target: i0.ɵɵFactoryTarget.Component }); }
2318
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: MainComponent, isStandalone: true, selector: "lib-main", host: { listeners: { "window:resize": "onResize($event)" } }, ngImport: i0, template: "<ng-container *ngIf=\"compatibilityChecked && compatibility && !compatibility.compatible\">\n <div class=\"compatibility-error\">\n <h2>Frontend/Backend Version Mismatch</h2>\n <p>{{ compatibility.reason }}</p>\n <p>Frontend version: {{ compatibility.frontendVersion }}</p>\n <p>Expected API contract: {{ compatibility.expectedApiContract }}</p>\n <p>Backend API contract: {{ compatibility.backendApiContractVersion || 'missing' }}</p>\n <p>Backend supported frontend versions: {{ compatibility.backendSupportedFrontendVersions || 'missing' }}</p>\n </div>\n</ng-container>\n<ng-container *ngIf=\"(!compatibilityChecked || !compatibility || compatibility.compatible) && loaded\">\n <div class=\"container\">\n <div class=\"body\">\n <div class=\"container-row\">\n <mat-sidenav-container [autosize]=\"true\">\n <mat-sidenav [(opened)]=\"showLeftCol\" #leftcol opened mode=\"side\" class=\"left no-scrollbar\">\n <router-outlet name=\"left-col\"></router-outlet>\n <button mat-mini-fab color=\"primary\" class=\"fade left-toggle\" *ngIf=\"showLeftCol\" (click)=\"leftcol.toggle()\"> << </button>\n </mat-sidenav>\n <mat-sidenav [(opened)]=\"showRightCol\" #rightcol mode=\"side\" position=\"end\" class=\"right\">\n <button mat-mini-fab color=\"primary\" class=\"fade right-toggle\" *ngIf=\"showRightCol\" (click)=\"rightcol.toggle()\"> >> </button>\n <router-outlet name=\"right-col\"></router-outlet>\n </mat-sidenav>\n <div class=\"middle\">\n <button mat-mini-fab color=\"primary\" class=\"fade left-toggle\" *ngIf=\"!showLeftCol\" (click)=\"leftcol.toggle()\"> >> </button>\n <button mat-mini-fab color=\"primary\" class=\"fade right-toggle\" *ngIf=\"!showRightCol\" (click)=\"rightcol.toggle()\"> << </button>\n <router-outlet></router-outlet>\n </div>\n </mat-sidenav-container>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: ["a{text-decoration:none}.body{flex-grow:1;max-height:calc(100vh - 100px);overflow:scroll}@media screen and (max-height: 560px){.body{max-height:100vh}}.left,.right{min-width:400px;max-width:33vw}.left-toggle{position:fixed;top:50%;left:5px;z-index:100}.right-toggle{position:fixed;top:50%;right:5px;z-index:100}a{margin-right:10px}a:not(:last-child):after{margin-left:10px;content:\"|\"}.compatibility-error{margin:2rem;padding:1.5rem;border:2px solid #7a1f1f;border-radius:8px;background:#fff5f5;color:#4b1515}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i3$2.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i3$2.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }] }); }
2062
2319
  }
2063
2320
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: MainComponent, decorators: [{
2064
2321
  type: Component,
2065
2322
  args: [{ selector: 'lib-main', imports: [
2066
2323
  RouterModule,
2067
2324
  MatSidenavModule,
2068
- ], template: "<ng-container *ngIf=\"loaded\">\n <div class=\"container\">\n <div class=\"body\">\n <div class=\"container-row\">\n <mat-sidenav-container [autosize]=\"true\">\n <mat-sidenav [(opened)]=\"showLeftCol\" #leftcol opened mode=\"side\" class=\"left no-scrollbar\">\n <router-outlet name=\"left-col\"></router-outlet>\n <button mat-mini-fab color=\"primary\" class=\"fade left-toggle\" *ngIf=\"showLeftCol\" (click)=\"leftcol.toggle()\"> << </button>\n </mat-sidenav>\n <mat-sidenav [(opened)]=\"showRightCol\" #rightcol mode=\"side\" position=\"end\" class=\"right\">\n <button mat-mini-fab color=\"primary\" class=\"fade right-toggle\" *ngIf=\"showRightCol\" (click)=\"rightcol.toggle()\"> >> </button>\n <router-outlet name=\"right-col\"></router-outlet>\n </mat-sidenav>\n <div class=\"middle\">\n <button mat-mini-fab color=\"primary\" class=\"fade left-toggle\" *ngIf=\"!showLeftCol\" (click)=\"leftcol.toggle()\"> >> </button>\n <button mat-mini-fab color=\"primary\" class=\"fade right-toggle\" *ngIf=\"!showRightCol\" (click)=\"rightcol.toggle()\"> << </button>\n <router-outlet></router-outlet>\n </div>\n </mat-sidenav-container>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: ["a{text-decoration:none}.body{flex-grow:1;max-height:calc(100vh - 100px);overflow:scroll}@media screen and (max-height: 560px){.body{max-height:100vh}}.left,.right{min-width:400px;max-width:33vw}.left-toggle{position:fixed;top:50%;left:5px;z-index:100}.right-toggle{position:fixed;top:50%;right:5px;z-index:100}a{margin-right:10px}a:not(:last-child):after{margin-left:10px;content:\"|\"}\n"] }]
2069
- }], ctorParameters: () => [{ type: i1$3.Router }], propDecorators: { onResize: [{
2325
+ ], template: "<ng-container *ngIf=\"compatibilityChecked && compatibility && !compatibility.compatible\">\n <div class=\"compatibility-error\">\n <h2>Frontend/Backend Version Mismatch</h2>\n <p>{{ compatibility.reason }}</p>\n <p>Frontend version: {{ compatibility.frontendVersion }}</p>\n <p>Expected API contract: {{ compatibility.expectedApiContract }}</p>\n <p>Backend API contract: {{ compatibility.backendApiContractVersion || 'missing' }}</p>\n <p>Backend supported frontend versions: {{ compatibility.backendSupportedFrontendVersions || 'missing' }}</p>\n </div>\n</ng-container>\n<ng-container *ngIf=\"(!compatibilityChecked || !compatibility || compatibility.compatible) && loaded\">\n <div class=\"container\">\n <div class=\"body\">\n <div class=\"container-row\">\n <mat-sidenav-container [autosize]=\"true\">\n <mat-sidenav [(opened)]=\"showLeftCol\" #leftcol opened mode=\"side\" class=\"left no-scrollbar\">\n <router-outlet name=\"left-col\"></router-outlet>\n <button mat-mini-fab color=\"primary\" class=\"fade left-toggle\" *ngIf=\"showLeftCol\" (click)=\"leftcol.toggle()\"> << </button>\n </mat-sidenav>\n <mat-sidenav [(opened)]=\"showRightCol\" #rightcol mode=\"side\" position=\"end\" class=\"right\">\n <button mat-mini-fab color=\"primary\" class=\"fade right-toggle\" *ngIf=\"showRightCol\" (click)=\"rightcol.toggle()\"> >> </button>\n <router-outlet name=\"right-col\"></router-outlet>\n </mat-sidenav>\n <div class=\"middle\">\n <button mat-mini-fab color=\"primary\" class=\"fade left-toggle\" *ngIf=\"!showLeftCol\" (click)=\"leftcol.toggle()\"> >> </button>\n <button mat-mini-fab color=\"primary\" class=\"fade right-toggle\" *ngIf=\"!showRightCol\" (click)=\"rightcol.toggle()\"> << </button>\n <router-outlet></router-outlet>\n </div>\n </mat-sidenav-container>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: ["a{text-decoration:none}.body{flex-grow:1;max-height:calc(100vh - 100px);overflow:scroll}@media screen and (max-height: 560px){.body{max-height:100vh}}.left,.right{min-width:400px;max-width:33vw}.left-toggle{position:fixed;top:50%;left:5px;z-index:100}.right-toggle{position:fixed;top:50%;right:5px;z-index:100}a{margin-right:10px}a:not(:last-child):after{margin-left:10px;content:\"|\"}.compatibility-error{margin:2rem;padding:1.5rem;border:2px solid #7a1f1f;border-radius:8px;background:#fff5f5;color:#4b1515}\n"] }]
2326
+ }], ctorParameters: () => [{ type: i1$3.Router }, { type: ApiCompatibilityService }], propDecorators: { onResize: [{
2070
2327
  type: HostListener,
2071
2328
  args: ['window:resize', ['$event']]
2072
2329
  }] } });