@thecodeblogs/blog 0.19.9 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/thecodeblogs-blog.mjs +251 -63
- package/fesm2022/thecodeblogs-blog.mjs.map +1 -1
- package/lib/components/entry-creator/entry-creator.component.d.ts +5 -2
- package/lib/components/side-navigation/side-navigation.component.d.ts +1 -1
- package/lib/data/content.d.ts +2 -2
- package/lib/data/identity.d.ts +1 -0
- package/lib/services/entry.service.d.ts +2 -0
- package/lib/services/prism.service.d.ts +1 -11
- package/lib/services/utility.d.ts +10 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -4,22 +4,16 @@ 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, Subscription } from 'rxjs';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import '
|
|
11
|
-
import 'prismjs';
|
|
12
|
-
import 'prismjs/plugins/toolbar/prism-toolbar';
|
|
13
|
-
import 'prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard';
|
|
14
|
-
import 'prismjs/components/prism-css';
|
|
15
|
-
import 'prismjs/components/prism-javascript';
|
|
16
|
-
import 'prismjs/components/prism-java';
|
|
17
|
-
import 'prismjs/components/prism-markup';
|
|
18
|
-
import 'prismjs/components/prism-typescript';
|
|
19
|
-
import 'prismjs/components/prism-sass';
|
|
20
|
-
import 'prismjs/components/prism-scss';
|
|
7
|
+
import { Subject, of, Subscription } from 'rxjs';
|
|
8
|
+
import { Utility as Utility$1 } from '@blog/services/utility';
|
|
9
|
+
import * as i6 from '@angular/common';
|
|
10
|
+
import { isPlatformBrowser, NgIf, CommonModule } from '@angular/common';
|
|
21
11
|
import * as i2 from 'ngx-device-detector';
|
|
22
12
|
import * as i1$1 from '@angular/platform-browser';
|
|
13
|
+
import { Entry as Entry$1 } from '@blog/data/entry';
|
|
14
|
+
import { Section as Section$1 } from '@blog/data/section';
|
|
15
|
+
import { Content as Content$1 } from '@blog/data/content';
|
|
16
|
+
import { ContentType as ContentType$1 } from '@blog/data/content-type';
|
|
23
17
|
import { ENTER, COMMA, TAB } from '@angular/cdk/keycodes';
|
|
24
18
|
import * as i1$2 from '@angular/material/dialog';
|
|
25
19
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
@@ -29,44 +23,44 @@ import * as i4 from '@angular/material/table';
|
|
|
29
23
|
import { MatTableModule } from '@angular/material/table';
|
|
30
24
|
import * as i5 from '@angular/material/button';
|
|
31
25
|
import { MatButtonModule } from '@angular/material/button';
|
|
32
|
-
import * as i6 from 'ng2-file-upload';
|
|
26
|
+
import * as i6$1 from 'ng2-file-upload';
|
|
33
27
|
import { FileUploader, FileUploadModule } from 'ng2-file-upload';
|
|
34
28
|
import * as i3$1 from '@fortawesome/angular-fontawesome';
|
|
35
29
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
36
30
|
import { faSpinner } from '@fortawesome/free-solid-svg-icons';
|
|
37
|
-
import * as
|
|
31
|
+
import * as i7 from '@angular/forms';
|
|
38
32
|
import { UntypedFormControl, FormsModule, ReactiveFormsModule, FormControl } from '@angular/forms';
|
|
39
33
|
import { MatSelectModule } from '@angular/material/select';
|
|
40
|
-
import * as
|
|
34
|
+
import * as i11 from '@angular/material/input';
|
|
41
35
|
import { MatInputModule } from '@angular/material/input';
|
|
42
|
-
import * as
|
|
36
|
+
import * as i8 from '@angular/material/form-field';
|
|
43
37
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
44
38
|
import * as i9 from '@angular/material/card';
|
|
45
39
|
import { MatCardModule } from '@angular/material/card';
|
|
46
40
|
import { MatChipsModule } from '@angular/material/chips';
|
|
47
41
|
import { MatIconModule } from '@angular/material/icon';
|
|
48
42
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
49
|
-
import * as
|
|
43
|
+
import * as i10 from '@angular/material/radio';
|
|
50
44
|
import { MatRadioModule } from '@angular/material/radio';
|
|
51
|
-
import * as
|
|
45
|
+
import * as i13 from '@angular/material/datepicker';
|
|
52
46
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
53
|
-
import * as
|
|
47
|
+
import * as i14 from '@angular/material/timepicker';
|
|
54
48
|
import { MatTimepickerModule } from '@angular/material/timepicker';
|
|
55
|
-
import
|
|
56
|
-
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
49
|
+
import { provideNativeDateAdapter, MatNativeDateModule } from '@angular/material/core';
|
|
57
50
|
import * as i1$3 from '@angular/router';
|
|
58
51
|
import { NavigationEnd, RouterModule } from '@angular/router';
|
|
59
|
-
import * as
|
|
52
|
+
import * as i12 from '@angular/cdk/text-field';
|
|
53
|
+
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
54
|
+
import * as i4$1 from '@angular/cdk/drag-drop';
|
|
60
55
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
61
56
|
import * as i6$2 from '@angular/material/progress-spinner';
|
|
62
57
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
63
|
-
import * as i2$
|
|
58
|
+
import * as i2$1 from '@angular/material/sidenav';
|
|
64
59
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
65
|
-
import * as i9$
|
|
60
|
+
import * as i9$1 from '@angular/material/list';
|
|
66
61
|
import { MatListModule } from '@angular/material/list';
|
|
67
62
|
import Autolinker from 'autolinker';
|
|
68
63
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
69
|
-
import { MatNativeDateModule } from '@angular/material/core';
|
|
70
64
|
|
|
71
65
|
class Guid {
|
|
72
66
|
newGuid() {
|
|
@@ -363,6 +357,12 @@ class EntryService extends DjangoRestFrameworkEndpointService {
|
|
|
363
357
|
delete(entity) {
|
|
364
358
|
return this.http.delete(this.adminEndpoint + entity.id + '/').pipe(map((val) => this.triggerCoreEvent(val, CoreEventType.DELETE)), map(this.handleResponse.bind(this)));
|
|
365
359
|
}
|
|
360
|
+
convertHtmlToBlogFormat(entry, html) {
|
|
361
|
+
return Utility$1.convertHtmlToBlogFormat(entry, html);
|
|
362
|
+
}
|
|
363
|
+
convertBlogToHtmlFormat(entry) {
|
|
364
|
+
return Utility$1.convertBlogToHtml(entry);
|
|
365
|
+
}
|
|
366
366
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntryService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
367
367
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntryService, providedIn: 'root' }); }
|
|
368
368
|
}
|
|
@@ -378,7 +378,16 @@ class IdentityService {
|
|
|
378
378
|
this.http = http;
|
|
379
379
|
}
|
|
380
380
|
getMe() {
|
|
381
|
-
|
|
381
|
+
console.error('You must provide an implementation for this');
|
|
382
|
+
return of({
|
|
383
|
+
id: 1,
|
|
384
|
+
username: "fakeadmin",
|
|
385
|
+
email: "admin@example.com",
|
|
386
|
+
display_name: "Fake Admin",
|
|
387
|
+
comments_public: false,
|
|
388
|
+
gravatar_url: "",
|
|
389
|
+
fake: true
|
|
390
|
+
});
|
|
382
391
|
}
|
|
383
392
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: IdentityService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
384
393
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: IdentityService, providedIn: 'root' }); }
|
|
@@ -391,15 +400,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
391
400
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
392
401
|
|
|
393
402
|
class PrismService {
|
|
403
|
+
testPrism() {
|
|
404
|
+
if (typeof (Prism) !== 'undefined') {
|
|
405
|
+
if (Prism) {
|
|
406
|
+
return true;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
394
411
|
constructor(platformId) {
|
|
395
412
|
this.platformId = platformId;
|
|
396
|
-
if (
|
|
413
|
+
if (this.testPrism()) {
|
|
397
414
|
Prism.manual = true;
|
|
398
415
|
}
|
|
399
416
|
}
|
|
400
417
|
highlightAll() {
|
|
401
418
|
if (isPlatformBrowser(this.platformId)) {
|
|
402
|
-
|
|
419
|
+
if (this.testPrism()) {
|
|
420
|
+
Prism.highlightAll();
|
|
421
|
+
}
|
|
403
422
|
}
|
|
404
423
|
}
|
|
405
424
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: PrismService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -558,6 +577,167 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
558
577
|
}]
|
|
559
578
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
560
579
|
|
|
580
|
+
class Utility {
|
|
581
|
+
static replaceNbsps(str) {
|
|
582
|
+
var re = new RegExp(String.fromCharCode(160), "g");
|
|
583
|
+
return str.replace(re, " ");
|
|
584
|
+
}
|
|
585
|
+
static convertHTMLToType(el) {
|
|
586
|
+
var value = "";
|
|
587
|
+
var contentType = "";
|
|
588
|
+
// First test for custom objects
|
|
589
|
+
var testValue = el.innerText;
|
|
590
|
+
try {
|
|
591
|
+
var obj = JSON.parse(testValue);
|
|
592
|
+
return obj;
|
|
593
|
+
}
|
|
594
|
+
catch (error) {
|
|
595
|
+
//console.error(error);
|
|
596
|
+
}
|
|
597
|
+
//console.log(el.tagName);
|
|
598
|
+
switch (el.tagName.toLowerCase()) {
|
|
599
|
+
case "p":
|
|
600
|
+
if (el.children.length > 0) {
|
|
601
|
+
var child = el.children[0];
|
|
602
|
+
if (child.tagName.toLowerCase() === "a") {
|
|
603
|
+
var c = new Content$1();
|
|
604
|
+
value = child.href;
|
|
605
|
+
c.value = value;
|
|
606
|
+
c.title = Utility.replaceNbsps(child.innerText);
|
|
607
|
+
c.type = ContentType$1.URL;
|
|
608
|
+
return c;
|
|
609
|
+
}
|
|
610
|
+
else if (child.tagName.toLowerCase() === 'img') {
|
|
611
|
+
var c = new Content$1();
|
|
612
|
+
value = child.src;
|
|
613
|
+
c.value = value;
|
|
614
|
+
c.type = ContentType$1.IMAGE;
|
|
615
|
+
return c;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
var c = new Content$1();
|
|
620
|
+
value = Utility.replaceNbsps(el.innerText);
|
|
621
|
+
c.value = value;
|
|
622
|
+
c.type = ContentType$1.TEXT;
|
|
623
|
+
return c;
|
|
624
|
+
}
|
|
625
|
+
break;
|
|
626
|
+
case "a":
|
|
627
|
+
var c = new Content$1();
|
|
628
|
+
value = el.href;
|
|
629
|
+
c.value = value;
|
|
630
|
+
c.title = Utility.replaceNbsps(el.innerText);
|
|
631
|
+
c.type = ContentType$1.URL;
|
|
632
|
+
return c;
|
|
633
|
+
break;
|
|
634
|
+
case "h4":
|
|
635
|
+
var s = new Section$1();
|
|
636
|
+
value = Utility.replaceNbsps(el.innerText);
|
|
637
|
+
s.subheading = Utility.replaceNbsps(value);
|
|
638
|
+
return s;
|
|
639
|
+
break;
|
|
640
|
+
case "blockquote":
|
|
641
|
+
var c = new Content$1();
|
|
642
|
+
value = el.innerHTML;
|
|
643
|
+
c.value = "<blockquote>" + value + "</blockquote>";
|
|
644
|
+
c.type = ContentType$1.HTML;
|
|
645
|
+
return c;
|
|
646
|
+
break;
|
|
647
|
+
default:
|
|
648
|
+
var c = new Content$1();
|
|
649
|
+
value = el.innerHTML;
|
|
650
|
+
c.value = value;
|
|
651
|
+
c.type = ContentType$1.HTML;
|
|
652
|
+
return c;
|
|
653
|
+
break;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
static convertHtmlToBlogFormat(entry, html) {
|
|
657
|
+
entry.sections = [];
|
|
658
|
+
var newEntry = new Entry$1(entry);
|
|
659
|
+
var el = document.createElement('html');
|
|
660
|
+
el.innerHTML = html;
|
|
661
|
+
// Creating the HTML element adds a head and body
|
|
662
|
+
// We hardcode to 1 to reference the body, and its
|
|
663
|
+
// child elements
|
|
664
|
+
var children = el.children[1].children;
|
|
665
|
+
;
|
|
666
|
+
var section = new Section$1();
|
|
667
|
+
section.subheading = "";
|
|
668
|
+
for (let i = 0; i < children.length; i++) {
|
|
669
|
+
var child = children[i];
|
|
670
|
+
var thing = Utility.convertHTMLToType(child);
|
|
671
|
+
//console.log('Thing: ' + JSON.stringify(thing));
|
|
672
|
+
//console.log('Typeof: ' + JSON.stringify(typeof(thing)));
|
|
673
|
+
if (thing instanceof Section$1) {
|
|
674
|
+
section = thing;
|
|
675
|
+
section.order = i * 10;
|
|
676
|
+
entry.sections.push(section);
|
|
677
|
+
}
|
|
678
|
+
else if (thing instanceof Content$1) {
|
|
679
|
+
if (entry.sections.length === 0) {
|
|
680
|
+
thing.order = i * 10;
|
|
681
|
+
section.contents.push(thing);
|
|
682
|
+
entry.sections.push(section);
|
|
683
|
+
section.order = i * 10;
|
|
684
|
+
}
|
|
685
|
+
else {
|
|
686
|
+
thing.order = i * 10;
|
|
687
|
+
section.contents.push(thing);
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
else {
|
|
691
|
+
if (thing !== null && typeof (thing) !== 'undefined') {
|
|
692
|
+
thing.order = i * 10;
|
|
693
|
+
section.contents.push(thing);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
//console.log('E: ' + JSON.stringify(entry));
|
|
698
|
+
return entry;
|
|
699
|
+
}
|
|
700
|
+
static convertTypeToHTML(content) {
|
|
701
|
+
switch (content.type) {
|
|
702
|
+
case ContentType$1.CODE:
|
|
703
|
+
return '<pre><code class="language-ts">' + content?.value + '</code></pre>';
|
|
704
|
+
break;
|
|
705
|
+
case ContentType$1.IMAGE:
|
|
706
|
+
return '<img src="' + content?.value + '"/>';
|
|
707
|
+
break;
|
|
708
|
+
case ContentType$1.MEDIA:
|
|
709
|
+
return '<pre>' + JSON.stringify(content) + '</pre>';
|
|
710
|
+
break;
|
|
711
|
+
case ContentType$1.HTML:
|
|
712
|
+
return content.value;
|
|
713
|
+
break;
|
|
714
|
+
case ContentType$1.URL:
|
|
715
|
+
return '<a target="_blank" href="' + content.value + '">' + content.title + '</a><br>';
|
|
716
|
+
break;
|
|
717
|
+
case ContentType$1.TEXT:
|
|
718
|
+
return '<p>' + content.value + '</p>';
|
|
719
|
+
break;
|
|
720
|
+
default:
|
|
721
|
+
return '<pre>' + JSON.stringify(content) + '</pre>';
|
|
722
|
+
break;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
static convertBlogToHtml(blog) {
|
|
726
|
+
var html = "";
|
|
727
|
+
var sections = blog.sections;
|
|
728
|
+
for (var i = 0; i < sections.length; i++) {
|
|
729
|
+
var section = sections[i];
|
|
730
|
+
html = html + '<h4>' + section.subheading + '</h4>';
|
|
731
|
+
var contents = section.contents;
|
|
732
|
+
for (var j = 0; j < contents.length; j++) {
|
|
733
|
+
var content = contents[j];
|
|
734
|
+
html = html + Utility.convertTypeToHTML(content);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
return html;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
561
741
|
class EntrySelectorDialogData {
|
|
562
742
|
}
|
|
563
743
|
|
|
@@ -595,11 +775,12 @@ class EntrySelectorDialogComponent {
|
|
|
595
775
|
});
|
|
596
776
|
}
|
|
597
777
|
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 }); }
|
|
598
|
-
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: "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]" }] }); }
|
|
778
|
+
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]" }] }); }
|
|
599
779
|
}
|
|
600
780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntrySelectorDialogComponent, decorators: [{
|
|
601
781
|
type: Component,
|
|
602
782
|
args: [{ selector: 'app-entry-selector-dialog', imports: [
|
|
783
|
+
NgIf,
|
|
603
784
|
MatDividerModule,
|
|
604
785
|
MatTableModule,
|
|
605
786
|
MatButtonModule,
|
|
@@ -745,7 +926,7 @@ class MediaUploadModalComponent {
|
|
|
745
926
|
}
|
|
746
927
|
}
|
|
747
928
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: MediaUploadModalComponent, deps: [{ token: i1$2.MatDialogRef }, { token: UploadService }, { token: i3$1.FaIconLibrary }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
748
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: MediaUploadModalComponent, isStandalone: true, selector: "app-media-upload-modal", inputs: { allowedMimeTypes: "allowedMimeTypes", uploadUrlKey: "uploadUrlKey", file: "file" }, host: { listeners: { "document:paste": "onPaste($event)" } }, ngImport: i0, template: "<h1 mat-dialog-title>Upload an Image</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 <div *ngIf=\"uploading\">\n <fa-icon [icon]=\"'spinner'\" animation=\"spin\"></fa-icon>\n </div>\n <ng-container *ngIf=\"!imgLink && !uploading\">\n <h4>Select a File</h4>\n <div class=\"input-group\">\n <div class=\"form-group\">\n <!-- <label for=\"import_file\">Choose File</label>-->\n <input type=\"file\" id=\"import_file\"\n *ngIf=\"uploader.queue.length==0 && !uploading\"\n ng2FileSelect\n [uploader]=\"uploader\"\n (onFileSelected)=\"onFileSelected($event)\"\n >\n </div>\n </div>\n <br>\n <h3>Paste a File</h3>\n <p>You can use the paste command to paste any image here</p>\n </ng-container>\n <div *ngIf=\"imgLink\">\n <img *ngIf=\"imgLink\" [src]=\"imgLink\"/>\n </div>\n <div *ngIf=\"error\">\n <div class=\"alert alert-danger\">\n {{error}}\n </div>\n </div>\n</div>\n<div mat-dialog-actions>\n <button mat-button [disabled]=\"!imgLink || uploading\" (click)=\"close()\">Attach</button>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
929
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: MediaUploadModalComponent, isStandalone: true, selector: "app-media-upload-modal", inputs: { allowedMimeTypes: "allowedMimeTypes", uploadUrlKey: "uploadUrlKey", file: "file" }, host: { listeners: { "document:paste": "onPaste($event)" } }, ngImport: i0, template: "<h1 mat-dialog-title>Upload an Image</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 <div *ngIf=\"uploading\">\n <fa-icon [icon]=\"'spinner'\" animation=\"spin\"></fa-icon>\n </div>\n <ng-container *ngIf=\"!imgLink && !uploading\">\n <h4>Select a File</h4>\n <div class=\"input-group\">\n <div class=\"form-group\">\n <!-- <label for=\"import_file\">Choose File</label>-->\n <input type=\"file\" id=\"import_file\"\n *ngIf=\"uploader.queue.length==0 && !uploading\"\n ng2FileSelect\n [uploader]=\"uploader\"\n (onFileSelected)=\"onFileSelected($event)\"\n >\n </div>\n </div>\n <br>\n <h3>Paste a File</h3>\n <p>You can use the paste command to paste any image here</p>\n </ng-container>\n <div *ngIf=\"imgLink\">\n <img *ngIf=\"imgLink\" [src]=\"imgLink\"/>\n </div>\n <div *ngIf=\"error\">\n <div class=\"alert alert-danger\">\n {{error}}\n </div>\n </div>\n</div>\n<div mat-dialog-actions>\n <button mat-button [disabled]=\"!imgLink || uploading\" (click)=\"close()\">Attach</button>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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]" }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i3$1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "directive", type: i6$1.FileSelectDirective, selector: "[ng2FileSelect]", inputs: ["uploader"], outputs: ["onFileSelected"] }] }); }
|
|
749
930
|
}
|
|
750
931
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: MediaUploadModalComponent, decorators: [{
|
|
751
932
|
type: Component,
|
|
@@ -768,7 +949,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
768
949
|
}] } });
|
|
769
950
|
|
|
770
951
|
class EntryCreatorComponent {
|
|
771
|
-
static { this.
|
|
952
|
+
static { this.CURRENT_ENTRY_KEY = 'current_entry'; }
|
|
772
953
|
static { this.DEFAULT_NEW_ENTRY_TITLE = 'A New Entry'; }
|
|
773
954
|
static getCookie(name) {
|
|
774
955
|
const ca = document.cookie.split(';');
|
|
@@ -783,7 +964,8 @@ class EntryCreatorComponent {
|
|
|
783
964
|
}
|
|
784
965
|
return '';
|
|
785
966
|
}
|
|
786
|
-
constructor(entryService, tagService, identityService, cdr, dialog) {
|
|
967
|
+
constructor(router, entryService, tagService, identityService, cdr, dialog) {
|
|
968
|
+
this.router = router;
|
|
787
969
|
this.entryService = entryService;
|
|
788
970
|
this.tagService = tagService;
|
|
789
971
|
this.identityService = identityService;
|
|
@@ -889,7 +1071,7 @@ class EntryCreatorComponent {
|
|
|
889
1071
|
this.identityService.getMe().subscribe((me) => {
|
|
890
1072
|
this.me = me;
|
|
891
1073
|
});
|
|
892
|
-
const savedEntry = localStorage.getItem(EntryCreatorComponent.
|
|
1074
|
+
const savedEntry = localStorage.getItem(EntryCreatorComponent.CURRENT_ENTRY_KEY);
|
|
893
1075
|
if (savedEntry) {
|
|
894
1076
|
this.entry = new Entry(JSON.parse(savedEntry));
|
|
895
1077
|
if (this.entry.should_publish_in_future && this.entry.future_publish_date < new Date()) {
|
|
@@ -967,7 +1149,7 @@ class EntryCreatorComponent {
|
|
|
967
1149
|
}
|
|
968
1150
|
onChange() {
|
|
969
1151
|
this.entry.slug = this.entryService.slugify(this.entry.title).toLowerCase();
|
|
970
|
-
localStorage.setItem(EntryCreatorComponent.
|
|
1152
|
+
localStorage.setItem(EntryCreatorComponent.CURRENT_ENTRY_KEY, JSON.stringify(this.entry));
|
|
971
1153
|
this.entry.sort();
|
|
972
1154
|
this.cdr.detectChanges();
|
|
973
1155
|
this.entryService.currentlyEditedEntry.next(this.entry);
|
|
@@ -986,7 +1168,7 @@ class EntryCreatorComponent {
|
|
|
986
1168
|
this.entry.published = false;
|
|
987
1169
|
this.entry.version = 1;
|
|
988
1170
|
this.entryService.currentlyEditedEntry.next(this.entry);
|
|
989
|
-
localStorage.setItem(EntryCreatorComponent.
|
|
1171
|
+
localStorage.setItem(EntryCreatorComponent.CURRENT_ENTRY_KEY, JSON.stringify(this.entry));
|
|
990
1172
|
this.entryService.create(this.entry).subscribe((next) => {
|
|
991
1173
|
});
|
|
992
1174
|
}
|
|
@@ -1001,7 +1183,7 @@ class EntryCreatorComponent {
|
|
|
1001
1183
|
this.entryService.getUnpublishedById(id).subscribe((result) => {
|
|
1002
1184
|
const entry = result;
|
|
1003
1185
|
this.entryService.currentlyEditedEntry.next(entry);
|
|
1004
|
-
localStorage.setItem(EntryCreatorComponent.
|
|
1186
|
+
localStorage.setItem(EntryCreatorComponent.CURRENT_ENTRY_KEY, JSON.stringify(entry));
|
|
1005
1187
|
this.entry = entry;
|
|
1006
1188
|
});
|
|
1007
1189
|
}
|
|
@@ -1011,7 +1193,7 @@ class EntryCreatorComponent {
|
|
|
1011
1193
|
this.entryService.currentlyEditedEntry.next(null);
|
|
1012
1194
|
this.entry = null;
|
|
1013
1195
|
this.seeEntries();
|
|
1014
|
-
localStorage.removeItem(EntryCreatorComponent.
|
|
1196
|
+
localStorage.removeItem(EntryCreatorComponent.CURRENT_ENTRY_KEY);
|
|
1015
1197
|
}
|
|
1016
1198
|
cancelScheduling() {
|
|
1017
1199
|
this.entry.future_publish_date = null;
|
|
@@ -1043,7 +1225,7 @@ class EntryCreatorComponent {
|
|
|
1043
1225
|
this.entryService.delete(this.entry).subscribe(() => {
|
|
1044
1226
|
this.entry = null;
|
|
1045
1227
|
this.entryService.currentlyEditedEntry.next(null);
|
|
1046
|
-
localStorage.removeItem(EntryCreatorComponent.
|
|
1228
|
+
localStorage.removeItem(EntryCreatorComponent.CURRENT_ENTRY_KEY);
|
|
1047
1229
|
});
|
|
1048
1230
|
}
|
|
1049
1231
|
}
|
|
@@ -1064,12 +1246,16 @@ class EntryCreatorComponent {
|
|
|
1064
1246
|
this.entry.future_publish_date.setMinutes(this.minutes);
|
|
1065
1247
|
this.onChange();
|
|
1066
1248
|
}
|
|
1067
|
-
|
|
1068
|
-
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" }, 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 <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-label>Time</mat-label>\n <mat-timepicker>\n [defaultTime]=\"customScheduleTime\"\n [format]=\"12\"\n [buttonAlign]=\"'left'\"\n (timeChanged)=\"setTime($event)\"\n ></mat-timepicker>\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: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6$1.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: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.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: i9$1.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i9$1.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: i10.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: i11.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i12.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i12.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i12.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatTimepickerModule }, { kind: "component", type: i4$1.MatTimepicker, selector: "mat-timepicker", inputs: ["interval", "options", "disableRipple", "aria-label", "aria-labelledby"], outputs: ["selected", "opened", "closed"], exportAs: ["matTimepicker"] }, { 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"] }] }); }
|
|
1249
|
+
routeTo(path) {
|
|
1250
|
+
this.router.navigateByUrl(path).then(() => {
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
1253
|
+
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 }); }
|
|
1254
|
+
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"] }] }); }
|
|
1069
1255
|
}
|
|
1070
1256
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntryCreatorComponent, decorators: [{
|
|
1071
1257
|
type: Component,
|
|
1072
|
-
args: [{ selector: 'app-entry-creator', imports: [
|
|
1258
|
+
args: [{ selector: 'app-entry-creator', providers: [provideNativeDateAdapter()], imports: [
|
|
1073
1259
|
CommonModule,
|
|
1074
1260
|
FormsModule,
|
|
1075
1261
|
ReactiveFormsModule,
|
|
@@ -1084,8 +1270,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
1084
1270
|
MatDatepickerModule,
|
|
1085
1271
|
MatTimepickerModule,
|
|
1086
1272
|
MatButtonModule,
|
|
1087
|
-
], template: "<div class=\"section creator fields\">\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-label>Time</mat-label>\n <mat-timepicker>\n [defaultTime]=\"customScheduleTime\"\n [format]=\"12\"\n [buttonAlign]=\"'left'\"\n (timeChanged)=\"setTime($event)\"\n ></mat-timepicker>\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"] }]
|
|
1088
|
-
}], ctorParameters: () => [{ type: EntryService }, { type: TagService }, { type: IdentityService }, { type: i0.ChangeDetectorRef }, { type: i1$2.MatDialog }], propDecorators: { tagInput: [{
|
|
1273
|
+
], 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"] }]
|
|
1274
|
+
}], ctorParameters: () => [{ type: i1$3.Router }, { type: EntryService }, { type: TagService }, { type: IdentityService }, { type: i0.ChangeDetectorRef }, { type: i1$2.MatDialog }], propDecorators: { tagInput: [{
|
|
1089
1275
|
type: ViewChild,
|
|
1090
1276
|
args: ['tagInput']
|
|
1091
1277
|
}], matAutocomplete: [{
|
|
@@ -1268,8 +1454,8 @@ class EntryRendererComponent {
|
|
|
1268
1454
|
entry.published = false;
|
|
1269
1455
|
delete entry.publish_date;
|
|
1270
1456
|
this.entryService.create(entry).subscribe((response) => {
|
|
1271
|
-
localStorage.setItem(EntryCreatorComponent.
|
|
1272
|
-
this.router.navigateByUrl('create(left-col:create//right-col:create)').then(() => {
|
|
1457
|
+
localStorage.setItem(EntryCreatorComponent.CURRENT_ENTRY_KEY, JSON.stringify(response));
|
|
1458
|
+
this.router.navigateByUrl('create/v2(left-col:create//right-col:create)').then(() => {
|
|
1273
1459
|
});
|
|
1274
1460
|
});
|
|
1275
1461
|
}
|
|
@@ -1306,7 +1492,7 @@ class EntryRendererComponent {
|
|
|
1306
1492
|
});
|
|
1307
1493
|
}
|
|
1308
1494
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntryRendererComponent, deps: [{ token: PrismService }, { token: i0.NgZone }, { token: IdentityService }, { token: CommentService }, { token: i1$3.Router }, { token: EntryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1309
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.3", type: EntryRendererComponent, isStandalone: true, selector: "app-entry-renderer", inputs: { entry: { classPropertyName: "entry", publicName: "entry", isSignal: true, isRequired: false, transformFunction: null }, editMode: { classPropertyName: "editMode", publicName: "editMode", isSignal: false, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n [@entryAnimation]=\"state\"\n *ngIf=\"entry()\"\n>\n <h2>{{entry()?.title}}</h2>\n <a *ngIf=\"me?.id === entry()?.getProp('author_id')\" href=\"javascript:void(0)\" (click)=\"edit(entry())\"><h4>[Edit]</h4></a>\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 <br>\n\n <ng-container *ngFor=\"let section of entry()?.sections\">\n <h4>{{section?.subheading}}</h4>\n <ng-container *ngFor=\"let content of section?.contents\">\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <pre><code class=\"language-ts\">{{content?.value}}</code></pre>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <a [href]=\"content?.value\" target=\"_blank\">{{content.title}}</a><br>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <ng-container *ngIf=\"mediaIsZip(content)\">\n <div class=\"download\">\n <a href=\"content?.value\">{{content?.description}}</a>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!mediaIsZip(content)\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <app-static-html\n [value]=\"content?.value\"\n >\n </app-static-html>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <p>{{content?.value}}</p>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container>\n <h2>Comments</h2>\n <p *ngIf=\"comments?.length == 0\">There are no comments yet.</p>\n <ng-container *ngIf=\"comments?.length > 0\">\n <div *ngFor=\"let comment of comments\">\n <mat-card style=\"margin-bottom: 20px;\" class=\"restrict\">\n <mat-card-title><img class=\"gravatar\" src=\"{{comment.gravatar_url}} + ?s=30\"> {{comment.user_display_name}}</mat-card-title>\n <mat-card-subtitle>{{comment.date_obj | timeAgo}}</mat-card-subtitle>\n <mat-card-content>\n <p>{{comment.content}}</p>\n <ng-container *ngIf=\"me?.id === entry()?.__server_generated_properties?.author_id\">\n <a href=\"javascript:void(0);\" *ngIf=\"!comment?.approved\" (click)=\"approve(comment)\">Approve</a>\n <a href=\"javascript:void(0);\" *ngIf=\"comment?.approved\" (click)=\"unapprove(comment)\">Unapprove</a>\n </ng-container>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!me\">\n <a href=\"/signup\">Signup</a> or <a href=\"/login\">login</a> to join the conversation!\n </ng-container>\n <ng-container *ngIf=\"me && !me?.comments_public\">\n <p>Note, your comments will not be public be default. It is possible I will make your comments public, but for now comments are just between you and me.</p>\n </ng-container>\n <ng-container *ngIf=\"me\">\n <h2 style=\"width: 100%;\">Leave a Comment</h2>\n <br>\n <mat-form-field class=\"restrict\" style=\"width: 100%;\" appearance=\"outline\">\n <mat-label>Comment</mat-label>\n <textarea [(ngModel)]=\"commentText\" (keydown.enter)=\"postComment($event)\" matInput></textarea>\n </mat-form-field>\n <br>\n <button (click)=\"postComment($event)\" style=\"text-align: right;\" mat-button>Submit</button>\n </ng-container>\n <div style=\"margin-bottom: 30px;\"></div>\n</div>\n\n", styles: [".image{width:100%;text-align:center;justify-content:center}.source,.description{text-align:center;font-size:12px}.gravatar{margin-right:20px}.smaller{text-size:12px;text-color:gray}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
1495
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.3", type: EntryRendererComponent, isStandalone: true, selector: "app-entry-renderer", inputs: { entry: { classPropertyName: "entry", publicName: "entry", isSignal: true, isRequired: false, transformFunction: null }, editMode: { classPropertyName: "editMode", publicName: "editMode", isSignal: false, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n [@entryAnimation]=\"state\"\n *ngIf=\"entry()\"\n>\n <h2>{{entry()?.title}}</h2>\n <a *ngIf=\"me?.id === entry()?.getProp('author_id')\" href=\"javascript:void(0)\" (click)=\"edit(entry())\"><h4>[Edit]</h4></a>\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 <br>\n\n <ng-container *ngFor=\"let section of entry()?.sections\">\n <h4>{{section?.subheading}}</h4>\n <ng-container *ngFor=\"let content of section?.contents\">\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <pre><code class=\"language-ts\">{{content?.value}}</code></pre>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <a [href]=\"content?.value\" target=\"_blank\">{{content.title}}</a><br>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <ng-container *ngIf=\"mediaIsZip(content)\">\n <div class=\"download\">\n <a href=\"content?.value\">{{content?.description}}</a>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!mediaIsZip(content)\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <app-static-html\n [value]=\"content?.value\"\n >\n </app-static-html>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <p>{{content?.value}}</p>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container>\n <h2>Comments</h2>\n <p *ngIf=\"comments?.length == 0\">There are no comments yet.</p>\n <ng-container *ngIf=\"comments?.length > 0\">\n <div *ngFor=\"let comment of comments\">\n <mat-card style=\"margin-bottom: 20px;\" class=\"restrict\">\n <mat-card-title><img class=\"gravatar\" src=\"{{comment.gravatar_url}} + ?s=30\"> {{comment.user_display_name}}</mat-card-title>\n <mat-card-subtitle>{{comment.date_obj | timeAgo}}</mat-card-subtitle>\n <mat-card-content>\n <p>{{comment.content}}</p>\n <ng-container *ngIf=\"me?.id === entry()?.__server_generated_properties?.author_id\">\n <a href=\"javascript:void(0);\" *ngIf=\"!comment?.approved\" (click)=\"approve(comment)\">Approve</a>\n <a href=\"javascript:void(0);\" *ngIf=\"comment?.approved\" (click)=\"unapprove(comment)\">Unapprove</a>\n </ng-container>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!me\">\n <a href=\"/signup\">Signup</a> or <a href=\"/login\">login</a> to join the conversation!\n </ng-container>\n <ng-container *ngIf=\"me && !me?.comments_public\">\n <p>Note, your comments will not be public be default. It is possible I will make your comments public, but for now comments are just between you and me.</p>\n </ng-container>\n <ng-container *ngIf=\"me\">\n <h2 style=\"width: 100%;\">Leave a Comment</h2>\n <br>\n <mat-form-field class=\"restrict\" style=\"width: 100%;\" appearance=\"outline\">\n <mat-label>Comment</mat-label>\n <textarea [(ngModel)]=\"commentText\" (keydown.enter)=\"postComment($event)\" matInput></textarea>\n </mat-form-field>\n <br>\n <button (click)=\"postComment($event)\" style=\"text-align: right;\" mat-button>Submit</button>\n </ng-container>\n <div style=\"margin-bottom: 30px;\"></div>\n</div>\n\n", styles: [".image{width:100%;text-align:center;justify-content:center}.source,.description{text-align:center;font-size:12px}.gravatar{margin-right:20px}.smaller{text-size:12px;text-color:gray}\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: "directive", type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: "ngmodule", type: MatCardModule }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i9.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i9.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i9.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: MatChipsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatRadioModule }, { 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: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "ngmodule", type: MatTimepickerModule }, { kind: "component", type: StaticHtmlComponent, selector: "app-static-html", inputs: ["value"] }, { kind: "pipe", type: TimeAgoPipe, name: "timeAgo" }], animations: [
|
|
1310
1496
|
trigger('entryAnimation', [
|
|
1311
1497
|
state('in', style({ opacity: '1' })),
|
|
1312
1498
|
state('out', style({ opacity: '0' })),
|
|
@@ -1365,7 +1551,7 @@ class EntrySummaryComponent {
|
|
|
1365
1551
|
});
|
|
1366
1552
|
}
|
|
1367
1553
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntrySummaryComponent, deps: [{ token: i1$3.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1368
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: EntrySummaryComponent, isStandalone: true, selector: "app-entry-summary", inputs: { entry: "entry" }, ngImport: i0, template: "\n<div class=\"entry section restrict\">\n <h2>{{entry?.title}}</h2>\n <!-- <a href=\"javascript:void(0)\" (click)=\"edit(entry)\"><h6>[Edit]</h6></a>-->\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\n <ng-container *ngFor=\"let section of entry?.sections.slice(0, 1)\">\n <h4>{{section?.subheading}}</h4>\n <ng-container *ngFor=\"let content of section?.contents.slice(0, 1)\">\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <pre><code class=\"language-ts\">{{content?.value}}</code></pre>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <a [href]=\"content?.value\" target=\"_blank\">{{content.title}}</a>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <app-static-html\n [value]=\"content?.value\"\n >\n </app-static-html>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <p>{{content?.value}}</p>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <a href=\"javascript:void(0);\" (click)=\"routeTo(entry)\">Read more...</a>\n</div>\n", styles: [".entry{padding:20px;border-bottom:solid 1px rgba(0,0,0,.12)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
1554
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: EntrySummaryComponent, isStandalone: true, selector: "app-entry-summary", inputs: { entry: "entry" }, ngImport: i0, template: "\n<div class=\"entry section restrict\">\n <h2>{{entry?.title}}</h2>\n <!-- <a href=\"javascript:void(0)\" (click)=\"edit(entry)\"><h6>[Edit]</h6></a>-->\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\n <ng-container *ngFor=\"let section of entry?.sections.slice(0, 1)\">\n <h4>{{section?.subheading}}</h4>\n <ng-container *ngFor=\"let content of section?.contents.slice(0, 1)\">\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <pre><code class=\"language-ts\">{{content?.value}}</code></pre>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <a [href]=\"content?.value\" target=\"_blank\">{{content.title}}</a>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <app-static-html\n [value]=\"content?.value\"\n >\n </app-static-html>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <p>{{content?.value}}</p>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <a href=\"javascript:void(0);\" (click)=\"routeTo(entry)\">Read more...</a>\n</div>\n", styles: [".entry{padding:20px;border-bottom:solid 1px rgba(0,0,0,.12)}\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: "directive", type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: StaticHtmlComponent, selector: "app-static-html", inputs: ["value"] }, { kind: "pipe", type: TimeAgoPipe, name: "timeAgo" }] }); }
|
|
1369
1555
|
}
|
|
1370
1556
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntrySummaryComponent, decorators: [{
|
|
1371
1557
|
type: Component,
|
|
@@ -1378,6 +1564,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
1378
1564
|
type: Input
|
|
1379
1565
|
}] } });
|
|
1380
1566
|
|
|
1567
|
+
//import {EntrySummaryComponent} from '../entry-summary/entry-summary.component';
|
|
1381
1568
|
class JsonRendererComponent {
|
|
1382
1569
|
constructor(entryService) {
|
|
1383
1570
|
this.entryService = entryService;
|
|
@@ -1390,14 +1577,14 @@ class JsonRendererComponent {
|
|
|
1390
1577
|
});
|
|
1391
1578
|
}
|
|
1392
1579
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: JsonRendererComponent, deps: [{ token: EntryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1393
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: JsonRendererComponent, isStandalone: true, selector: "app-json-renderer", inputs: { entry: "entry" }, ngImport: i0, template: "<div class=\"section json-render json\">\n <app-entry-renderer [editMode]=\"true\" [entry]=\"entry\"></app-entry-renderer>\n <pre *ngIf=\"entry\">{{JSON.stringify(entry)}}</pre>\n</div>\n", styles: [".json pre{white-space:pre-wrap;word-wrap:anywhere}.json-render{padding:0 20px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
1580
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: JsonRendererComponent, isStandalone: true, selector: "app-json-renderer", inputs: { entry: "entry" }, ngImport: i0, template: "<div class=\"section json-render json\">\n <app-entry-renderer [editMode]=\"true\" [entry]=\"entry\"></app-entry-renderer>\n <pre *ngIf=\"entry\">{{JSON.stringify(entry)}}</pre>\n</div>\n", styles: [".json pre{white-space:pre-wrap;word-wrap:anywhere}.json-render{padding:0 20px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EntryRendererComponent, selector: "app-entry-renderer", inputs: ["entry", "editMode"] }] }); }
|
|
1394
1581
|
}
|
|
1395
1582
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: JsonRendererComponent, decorators: [{
|
|
1396
1583
|
type: Component,
|
|
1397
1584
|
args: [{ selector: 'app-json-renderer', imports: [
|
|
1398
1585
|
CommonModule,
|
|
1399
1586
|
EntryRendererComponent,
|
|
1400
|
-
EntrySummaryComponent
|
|
1587
|
+
//EntrySummaryComponent
|
|
1401
1588
|
], template: "<div class=\"section json-render json\">\n <app-entry-renderer [editMode]=\"true\" [entry]=\"entry\"></app-entry-renderer>\n <pre *ngIf=\"entry\">{{JSON.stringify(entry)}}</pre>\n</div>\n", styles: [".json pre{white-space:pre-wrap;word-wrap:anywhere}.json-render{padding:0 20px}\n"] }]
|
|
1402
1589
|
}], ctorParameters: () => [{ type: EntryService }], propDecorators: { entry: [{
|
|
1403
1590
|
type: Input
|
|
@@ -1423,7 +1610,7 @@ class LandingPageComponent {
|
|
|
1423
1610
|
}
|
|
1424
1611
|
}
|
|
1425
1612
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: LandingPageComponent, deps: [{ token: i1$3.Router }, { token: EntryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1426
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: LandingPageComponent, isStandalone: true, selector: "app-landing-page", ngImport: i0, template: "<div class=\"landing-page\">\n <ng-container *ngFor=\"let entry of entries\">\n <app-entry-summary [entry]=\"entry.entry\"></app-entry-summary>\n </ng-container>\n</div>\n", styles: [".landing-page{min-height:calc(100vh - 100px);max-height:calc(100vh - 100px)}@media screen and (max-height: 560px){.landing-page{max-height:100vh}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
1613
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: LandingPageComponent, isStandalone: true, selector: "app-landing-page", ngImport: i0, template: "<div class=\"landing-page\">\n <ng-container *ngFor=\"let entry of entries\">\n <app-entry-summary [entry]=\"entry.entry\"></app-entry-summary>\n </ng-container>\n</div>\n", styles: [".landing-page{min-height:calc(100vh - 100px);max-height:calc(100vh - 100px)}@media screen and (max-height: 560px){.landing-page{max-height:100vh}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: EntrySummaryComponent, selector: "app-entry-summary", inputs: ["entry"] }, { kind: "ngmodule", type: MatCardModule }] }); }
|
|
1427
1614
|
}
|
|
1428
1615
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: LandingPageComponent, decorators: [{
|
|
1429
1616
|
type: Component,
|
|
@@ -1459,7 +1646,7 @@ class OutlineViewComponent {
|
|
|
1459
1646
|
this.entryService.currentlyEditedEntry.next(this.entry);
|
|
1460
1647
|
}
|
|
1461
1648
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: OutlineViewComponent, deps: [{ token: EntryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1462
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: OutlineViewComponent, isStandalone: true, selector: "app-outline-view", ngImport: i0, template: "<div *ngIf=\"entry\" class=\"section outline\">\n <h1 *ngIf=\"entry?.sections?.length === 0\">Outline View</h1>\n <div cdkDropList class=\"sections\" (cdkDropListDropped)=\"sectionDrop($event)\">\n <mat-card class=\"card\" cdkDrag *ngFor=\"let section of entry.sections\">\n <h3>Section {{Math.ceil(section.order / 10) + 1}}</h3>\n {{section.subheading}}\n <div cdkDropList class=\"contents\" (cdkDropListDropped)=\"contentDrop($event, section)\">\n <h3>Contents for {{section.subheading}}</h3>\n <div class=\"content-card\" *ngFor=\"let content of section.contents\" cdkDrag>\n <div class=\"content\">{{content.value}}</div>\n <div class=\"content-placeholder\" *cdkDragPlaceholder></div>\n </div>\n </div>\n </mat-card>\n <div class=\"custom-placeholder\" *cdkDragPlaceholder></div>\n </div>\n</div>\n", styles: [".outline{padding:0 20px}.content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.card,.content-card{margin:4px;cursor:pointer}.content-card:not(:last-child){border-bottom:1px dotted #aaa}.custom-placeholder{background:#ccc;border:dotted 3px #999;transition:transform .25s cubic-bezier(0,0,.2,1);min-height:60px}.content-placeholder{background:#ccc;border:dotted 3px #999;transition:transform .25s cubic-bezier(0,0,.2,1);min-height:30px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
1649
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: OutlineViewComponent, isStandalone: true, selector: "app-outline-view", ngImport: i0, template: "<div *ngIf=\"entry\" class=\"section outline\">\n <h1 *ngIf=\"entry?.sections?.length === 0\">Outline View</h1>\n <div cdkDropList class=\"sections\" (cdkDropListDropped)=\"sectionDrop($event)\">\n <mat-card class=\"card\" cdkDrag *ngFor=\"let section of entry.sections\">\n <h3>Section {{Math.ceil(section.order / 10) + 1}}</h3>\n {{section.subheading}}\n <div cdkDropList class=\"contents\" (cdkDropListDropped)=\"contentDrop($event, section)\">\n <h3>Contents for {{section.subheading}}</h3>\n <div class=\"content-card\" *ngFor=\"let content of section.contents\" cdkDrag>\n <div class=\"content\">{{content.value}}</div>\n <div class=\"content-placeholder\" *cdkDragPlaceholder></div>\n </div>\n </div>\n </mat-card>\n <div class=\"custom-placeholder\" *cdkDragPlaceholder></div>\n </div>\n</div>\n", styles: [".outline{padding:0 20px}.content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.card,.content-card{margin:4px;cursor:pointer}.content-card:not(:last-child){border-bottom:1px dotted #aaa}.custom-placeholder{background:#ccc;border:dotted 3px #999;transition:transform .25s cubic-bezier(0,0,.2,1);min-height:60px}.content-placeholder{background:#ccc;border:dotted 3px #999;transition:transform .25s cubic-bezier(0,0,.2,1);min-height:30px}\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: MatCardModule }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i4$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4$1.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] }); }
|
|
1463
1650
|
}
|
|
1464
1651
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: OutlineViewComponent, decorators: [{
|
|
1465
1652
|
type: Component,
|
|
@@ -1584,9 +1771,9 @@ class SideNavigationComponent {
|
|
|
1584
1771
|
}
|
|
1585
1772
|
render() {
|
|
1586
1773
|
}
|
|
1587
|
-
routeTo(entry) {
|
|
1774
|
+
routeTo(entry, path = "") {
|
|
1588
1775
|
if (!entry) {
|
|
1589
|
-
this.router.navigateByUrl(
|
|
1776
|
+
this.router.navigateByUrl(path).then(() => {
|
|
1590
1777
|
});
|
|
1591
1778
|
}
|
|
1592
1779
|
else {
|
|
@@ -1651,7 +1838,7 @@ class SideNavigationComponent {
|
|
|
1651
1838
|
this.doSearch.emit(searchValue);
|
|
1652
1839
|
}
|
|
1653
1840
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SideNavigationComponent, deps: [{ token: EntryService }, { token: i1$3.Router }, { token: IdentityService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1654
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: SideNavigationComponent, isStandalone: true, selector: "app-side-navigation", viewQueries: [{ propertyName: "divNav", first: true, predicate: ["navcontainer"], descendants: true }], ngImport: i0, template: "<div class=\"sidenav no-scrollbar\">\n <div style=\"margin-top: 20px;\">\n <mat-form-field style=\"width: 100%\">\n <mat-label>Search</mat-label>\n <input matInput [formControl]=\"searchControl\" (ngModelChange)=\"onSearchChange($event)\">\n </mat-form-field>\n </div>\n\n <div\n class=\"progress\"\n [hidden]=\"!loading\"\n >\n <mat-progress-spinner\n style=\"margin-left: 16px;\"\n [diameter]=20\n mode=\"indeterminate\"\n >\n </mat-progress-spinner>\n </div>\n\n <div #navcontainer class=\"navcontainer\"\n [@sideNavAnimation]=\"state\"\n >\n <mat-nav-list>\n @for(container of entriesByMonthAndYear; track container) {\n <h3>{{getMonthAndYearFromKey(container.month_year)}}</h3>\n @for(entry of container.entries; track entry.id) {\n <a mat-list-item href=\"javascript:void(0);\" (click)=\"routeTo(entry)\">{{entry.title}}</a>\n }\n }\n </mat-nav-list>\n\n <a\n class=\"sidelink\"\n *ngIf=\"this?.response?.next && !loading\"\n (click)=\"getMore()\"\n href=\"javascript:void(0);\">More...</a>\n </div>\n <ng-container *ngIf=\"identity?.id === 1\">\n <h2>Misc</h2>\n
|
|
1841
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: SideNavigationComponent, isStandalone: true, selector: "app-side-navigation", viewQueries: [{ propertyName: "divNav", first: true, predicate: ["navcontainer"], descendants: true }], ngImport: i0, template: "<div class=\"sidenav no-scrollbar\">\n <div style=\"margin-top: 20px;\">\n <mat-form-field style=\"width: 100%\">\n <mat-label>Search</mat-label>\n <input matInput [formControl]=\"searchControl\" (ngModelChange)=\"onSearchChange($event)\">\n </mat-form-field>\n </div>\n\n <div\n class=\"progress\"\n [hidden]=\"!loading\"\n >\n <mat-progress-spinner\n style=\"margin-left: 16px;\"\n [diameter]=20\n mode=\"indeterminate\"\n >\n </mat-progress-spinner>\n </div>\n\n <div #navcontainer class=\"navcontainer\"\n [@sideNavAnimation]=\"state\"\n >\n <mat-nav-list>\n @for(container of entriesByMonthAndYear; track container) {\n <h3>{{getMonthAndYearFromKey(container.month_year)}}</h3>\n @for(entry of container.entries; track entry.id) {\n <a mat-list-item href=\"javascript:void(0);\" (click)=\"routeTo(entry)\">{{entry.title}}</a>\n }\n }\n </mat-nav-list>\n\n <a\n class=\"sidelink\"\n *ngIf=\"this?.response?.next && !loading\"\n (click)=\"getMore()\"\n href=\"javascript:void(0);\">More...</a>\n </div>\n <ng-container *ngIf=\"identity?.id === 1\">\n <h2>Misc</h2>\n <mat-list>\n <a mat-list-item href=\"javascript:void(0);\" (click)=\"routeTo(null, 'create/v2(left-col:create//right-col:create)')\">Create</a>\n </mat-list>\n </ng-container>\n <h3 *ngIf=\"identity\">Logged in as {{identity?.email}}</h3>\n</div>\n\n", styles: [".progress{position:absolute;top:100px;left:0}.sidelink{padding-left:16px}.sidenav{position:relative;max-height:calc(100vh - 100px)}@media screen and (max-height: 560px){.sidenav{max-height:100vh}}h2,h3{margin-left:10px;justify-content:right}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i6$2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatSidenavModule }, { 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: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i9$1.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i9$1.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i9$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }], animations: [
|
|
1655
1842
|
trigger('sideNavAnimation', [
|
|
1656
1843
|
state('in', style({ transform: 'translateX(0%)' })),
|
|
1657
1844
|
state('out', style({ transform: 'translateX(110%)' })),
|
|
@@ -1686,7 +1873,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
1686
1873
|
animate('100ms ease-in', style({ transform: 'translateX(0%)' }))
|
|
1687
1874
|
])
|
|
1688
1875
|
]),
|
|
1689
|
-
], template: "<div class=\"sidenav no-scrollbar\">\n <div style=\"margin-top: 20px;\">\n <mat-form-field style=\"width: 100%\">\n <mat-label>Search</mat-label>\n <input matInput [formControl]=\"searchControl\" (ngModelChange)=\"onSearchChange($event)\">\n </mat-form-field>\n </div>\n\n <div\n class=\"progress\"\n [hidden]=\"!loading\"\n >\n <mat-progress-spinner\n style=\"margin-left: 16px;\"\n [diameter]=20\n mode=\"indeterminate\"\n >\n </mat-progress-spinner>\n </div>\n\n <div #navcontainer class=\"navcontainer\"\n [@sideNavAnimation]=\"state\"\n >\n <mat-nav-list>\n @for(container of entriesByMonthAndYear; track container) {\n <h3>{{getMonthAndYearFromKey(container.month_year)}}</h3>\n @for(entry of container.entries; track entry.id) {\n <a mat-list-item href=\"javascript:void(0);\" (click)=\"routeTo(entry)\">{{entry.title}}</a>\n }\n }\n </mat-nav-list>\n\n <a\n class=\"sidelink\"\n *ngIf=\"this?.response?.next && !loading\"\n (click)=\"getMore()\"\n href=\"javascript:void(0);\">More...</a>\n </div>\n <ng-container *ngIf=\"identity?.id === 1\">\n <h2>Misc</h2>\n
|
|
1876
|
+
], template: "<div class=\"sidenav no-scrollbar\">\n <div style=\"margin-top: 20px;\">\n <mat-form-field style=\"width: 100%\">\n <mat-label>Search</mat-label>\n <input matInput [formControl]=\"searchControl\" (ngModelChange)=\"onSearchChange($event)\">\n </mat-form-field>\n </div>\n\n <div\n class=\"progress\"\n [hidden]=\"!loading\"\n >\n <mat-progress-spinner\n style=\"margin-left: 16px;\"\n [diameter]=20\n mode=\"indeterminate\"\n >\n </mat-progress-spinner>\n </div>\n\n <div #navcontainer class=\"navcontainer\"\n [@sideNavAnimation]=\"state\"\n >\n <mat-nav-list>\n @for(container of entriesByMonthAndYear; track container) {\n <h3>{{getMonthAndYearFromKey(container.month_year)}}</h3>\n @for(entry of container.entries; track entry.id) {\n <a mat-list-item href=\"javascript:void(0);\" (click)=\"routeTo(entry)\">{{entry.title}}</a>\n }\n }\n </mat-nav-list>\n\n <a\n class=\"sidelink\"\n *ngIf=\"this?.response?.next && !loading\"\n (click)=\"getMore()\"\n href=\"javascript:void(0);\">More...</a>\n </div>\n <ng-container *ngIf=\"identity?.id === 1\">\n <h2>Misc</h2>\n <mat-list>\n <a mat-list-item href=\"javascript:void(0);\" (click)=\"routeTo(null, 'create/v2(left-col:create//right-col:create)')\">Create</a>\n </mat-list>\n </ng-container>\n <h3 *ngIf=\"identity\">Logged in as {{identity?.email}}</h3>\n</div>\n\n", styles: [".progress{position:absolute;top:100px;left:0}.sidelink{padding-left:16px}.sidenav{position:relative;max-height:calc(100vh - 100px)}@media screen and (max-height: 560px){.sidenav{max-height:100vh}}h2,h3{margin-left:10px;justify-content:right}\n"] }]
|
|
1690
1877
|
}], ctorParameters: () => [{ type: EntryService }, { type: i1$3.Router }, { type: IdentityService }, { type: i0.Renderer2 }], propDecorators: { divNav: [{
|
|
1691
1878
|
type: ViewChild,
|
|
1692
1879
|
args: ['navcontainer', { static: false }]
|
|
@@ -1729,7 +1916,7 @@ class MainComponent {
|
|
|
1729
1916
|
this.subs.unsubscribe();
|
|
1730
1917
|
}
|
|
1731
1918
|
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 }); }
|
|
1732
|
-
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$
|
|
1919
|
+
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"] }] }); }
|
|
1733
1920
|
}
|
|
1734
1921
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: MainComponent, decorators: [{
|
|
1735
1922
|
type: Component,
|
|
@@ -1799,11 +1986,12 @@ class EntryRendererWrapperComponent {
|
|
|
1799
1986
|
}
|
|
1800
1987
|
}
|
|
1801
1988
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntryRendererWrapperComponent, deps: [{ token: EntryService }, { token: i1$3.Router }, { token: i1$3.ActivatedRoute }, { token: ViewService }, { token: InteractionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1802
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: EntryRendererWrapperComponent, isStandalone: true, selector: "lib-entry-renderer-wrapper", ngImport: i0, template: "<div class=\"rendered-entry section\">\n <app-entry-renderer *ngIf=\"currentEntry\" [entry]=\"currentEntry\"></app-entry-renderer>\n</div>\n", styles: [".rendered-entry{padding:0 20px}\n"], dependencies: [{ kind: "component", type: EntryRendererComponent, selector: "app-entry-renderer", inputs: ["entry", "editMode"] }] }); }
|
|
1989
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: EntryRendererWrapperComponent, isStandalone: true, selector: "lib-entry-renderer-wrapper", ngImport: i0, template: "<div class=\"rendered-entry section\">\n <app-entry-renderer *ngIf=\"currentEntry\" [entry]=\"currentEntry\"></app-entry-renderer>\n</div>\n", styles: [".rendered-entry{padding:0 20px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EntryRendererComponent, selector: "app-entry-renderer", inputs: ["entry", "editMode"] }] }); }
|
|
1803
1990
|
}
|
|
1804
1991
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: EntryRendererWrapperComponent, decorators: [{
|
|
1805
1992
|
type: Component,
|
|
1806
1993
|
args: [{ selector: 'lib-entry-renderer-wrapper', imports: [
|
|
1994
|
+
CommonModule,
|
|
1807
1995
|
EntryRendererComponent
|
|
1808
1996
|
], template: "<div class=\"rendered-entry section\">\n <app-entry-renderer *ngIf=\"currentEntry\" [entry]=\"currentEntry\"></app-entry-renderer>\n</div>\n", styles: [".rendered-entry{padding:0 20px}\n"] }]
|
|
1809
1997
|
}], ctorParameters: () => [{ type: EntryService }, { type: i1$3.Router }, { type: i1$3.ActivatedRoute }, { type: ViewService }, { type: InteractionService }] });
|
|
@@ -1855,7 +2043,7 @@ class SchedulePublishDialogComponent {
|
|
|
1855
2043
|
this.dialogRef.close('test');
|
|
1856
2044
|
}
|
|
1857
2045
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SchedulePublishDialogComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1858
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: SchedulePublishDialogComponent, isStandalone: true, selector: "lib-schedule-publish-dialog", ngImport: i0, template: "<h1 mat-dialog-title>Select a Date and Time to Schedule This Post</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<p>Date</p>\n<mat-form-field appearance=\"fill\">\n <mat-label>Choose a date</mat-label>\n <input matInput [matDatepicker]=\"picker\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n<p>Time</p>\n<input [matTimepicker]=\"timepicker\" readonly>\n<mat-timepicker #timepicker></mat-timepicker>\n<div mat-dialog-actions>\n <button mat-button (click)=\"onNoClick()\">Cancel</button>\n <button mat-button (click)=\"onYesClick()\" cdkFocusInitial>Schedule Publish</button>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type:
|
|
2046
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: SchedulePublishDialogComponent, isStandalone: true, selector: "lib-schedule-publish-dialog", ngImport: i0, template: "<h1 mat-dialog-title>Select a Date and Time to Schedule This Post</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<p>Date</p>\n<mat-form-field appearance=\"fill\">\n <mat-label>Choose a date</mat-label>\n <input matInput [matDatepicker]=\"picker\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n<p>Time</p>\n<input [matTimepicker]=\"timepicker\" readonly>\n<mat-timepicker #timepicker></mat-timepicker>\n<div mat-dialog-actions>\n <button mat-button (click)=\"onNoClick()\">Cancel</button>\n <button mat-button (click)=\"onYesClick()\" cdkFocusInitial>Schedule Publish</button>\n</div>\n", styles: [""], dependencies: [{ 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: 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"] }] }); }
|
|
1859
2047
|
}
|
|
1860
2048
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SchedulePublishDialogComponent, decorators: [{
|
|
1861
2049
|
type: Component,
|
|
@@ -1933,7 +2121,7 @@ class CoreModule {
|
|
|
1933
2121
|
PrismService,
|
|
1934
2122
|
IdentityService,
|
|
1935
2123
|
DjangoRestFrameworkEndpointService,
|
|
1936
|
-
TagService
|
|
2124
|
+
TagService
|
|
1937
2125
|
], imports: [CommonModule,
|
|
1938
2126
|
RouterModule,
|
|
1939
2127
|
FormsModule,
|
|
@@ -2020,7 +2208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
2020
2208
|
PrismService,
|
|
2021
2209
|
IdentityService,
|
|
2022
2210
|
DjangoRestFrameworkEndpointService,
|
|
2023
|
-
TagService
|
|
2211
|
+
TagService
|
|
2024
2212
|
],
|
|
2025
2213
|
exports: [
|
|
2026
2214
|
EntryRendererComponent,
|
|
@@ -2049,5 +2237,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
2049
2237
|
* Generated bundle index. Do not edit.
|
|
2050
2238
|
*/
|
|
2051
2239
|
|
|
2052
|
-
export { Base, CommentService, Content, ContentType, CoreEvent, CoreEventType, CoreModule, DjangoRestFrameworkEndpointService, Entry, EntryCreatorComponent, EntryRendererComponent, EntryRendererWrapperComponent, EntrySelectorDialogComponent, EntryService, EntrySummaryComponent, Guid, IdentityService, Interaction, InteractionService, JsonRendererComponent, LandingPageComponent, LinkyPipe, ListResponse, MainComponent, MediaUploadModalComponent, OutlineViewComponent, PrismService, Routes, Section, SideNavigationComponent, StaticHtmlComponent, StaticHtmlService, TagService, TimeAgoPipe, Upload, UploadService, View, ViewService, VisitorProfile, VisitorProfileService };
|
|
2240
|
+
export { Base, CommentService, Content, ContentType, CoreEvent, CoreEventType, CoreModule, DjangoRestFrameworkEndpointService, Entry, EntryCreatorComponent, EntryRendererComponent, EntryRendererWrapperComponent, EntrySelectorDialogComponent, EntryService, EntrySummaryComponent, Guid, IdentityService, Interaction, InteractionService, JsonRendererComponent, LandingPageComponent, LinkyPipe, ListResponse, MainComponent, MediaUploadModalComponent, OutlineViewComponent, PrismService, Routes, Section, SideNavigationComponent, StaticHtmlComponent, StaticHtmlService, TagService, TimeAgoPipe, Upload, UploadService, Utility, View, ViewService, VisitorProfile, VisitorProfileService };
|
|
2053
2241
|
//# sourceMappingURL=thecodeblogs-blog.mjs.map
|