@thecodeblogs/blog 0.19.9 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/thecodeblogs-blog.mjs +85 -62
- 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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef, OnInit, ElementRef } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
2
3
|
import { Entry } from '../../data/entry';
|
|
3
4
|
import { ContentType } from '../../data/content-type';
|
|
4
5
|
import { Identity } from '../../data/identity';
|
|
@@ -13,12 +14,13 @@ import { MatChipInputEvent } from '@angular/material/chips';
|
|
|
13
14
|
import { TagService } from '../../services/tag.service';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
export declare class EntryCreatorComponent implements OnInit {
|
|
17
|
+
private router;
|
|
16
18
|
private entryService;
|
|
17
19
|
private tagService;
|
|
18
20
|
private identityService;
|
|
19
21
|
private cdr;
|
|
20
22
|
private dialog;
|
|
21
|
-
static
|
|
23
|
+
static CURRENT_ENTRY_KEY: string;
|
|
22
24
|
static DEFAULT_NEW_ENTRY_TITLE: string;
|
|
23
25
|
ContentType: typeof ContentType;
|
|
24
26
|
Object: ObjectConstructor;
|
|
@@ -44,7 +46,7 @@ export declare class EntryCreatorComponent implements OnInit {
|
|
|
44
46
|
uploadUrlKey: string;
|
|
45
47
|
uploader: FileUploader;
|
|
46
48
|
static getCookie(name: string): string;
|
|
47
|
-
constructor(entryService: EntryService, tagService: TagService, identityService: IdentityService, cdr: ChangeDetectorRef, dialog: MatDialog);
|
|
49
|
+
constructor(router: Router, entryService: EntryService, tagService: TagService, identityService: IdentityService, cdr: ChangeDetectorRef, dialog: MatDialog);
|
|
48
50
|
private _filter;
|
|
49
51
|
add(event: MatChipInputEvent): void;
|
|
50
52
|
remove(fruit: string): void;
|
|
@@ -69,6 +71,7 @@ export declare class EntryCreatorComponent implements OnInit {
|
|
|
69
71
|
delete(): void;
|
|
70
72
|
onDateChange(): void;
|
|
71
73
|
setTime(e: any): void;
|
|
74
|
+
routeTo(path: any): void;
|
|
72
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<EntryCreatorComponent, never>;
|
|
73
76
|
static ɵcmp: i0.ɵɵComponentDeclaration<EntryCreatorComponent, "app-entry-creator", never, { "allowedMimeTypes": { "alias": "allowedMimeTypes"; "required": false; }; "uploadUrlKey": { "alias": "uploadUrlKey"; "required": false; }; }, {}, never, never, true, never>;
|
|
74
77
|
}
|
|
@@ -38,7 +38,7 @@ export declare class SideNavigationComponent implements OnInit, OnDestroy {
|
|
|
38
38
|
getEntries(): void;
|
|
39
39
|
searchEntries(searchTerm: string): void;
|
|
40
40
|
render(): void;
|
|
41
|
-
routeTo(entry: any): void;
|
|
41
|
+
routeTo(entry: any, path?: string): void;
|
|
42
42
|
getMonthAndYearFromKey(key: string): string;
|
|
43
43
|
ngOnDestroy(): void;
|
|
44
44
|
searchControl: FormControl<string>;
|
package/lib/data/content.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { ContentType } from './content-type';
|
|
|
3
3
|
export declare class Content extends Base {
|
|
4
4
|
static KEY_MIMETYPE: string;
|
|
5
5
|
order: number;
|
|
6
|
-
type: ContentType;
|
|
6
|
+
type: ContentType | 'text';
|
|
7
7
|
value: string;
|
|
8
8
|
title: string;
|
|
9
9
|
source: string;
|
|
10
|
-
description: string;
|
|
10
|
+
description: string | null;
|
|
11
11
|
additional: Array<{
|
|
12
12
|
key: string;
|
|
13
13
|
value: string;
|
package/lib/data/identity.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export declare class EntryService extends DjangoRestFrameworkEndpointService<Ent
|
|
|
22
22
|
updateUnpublishedEntry(entry: Entry): Observable<Entry>;
|
|
23
23
|
slugify(s: string): string;
|
|
24
24
|
delete(entity: any): Observable<any>;
|
|
25
|
+
convertHtmlToBlogFormat(entry: Entry, html: string): Entry;
|
|
26
|
+
convertBlogToHtmlFormat(entry: Entry): string;
|
|
25
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<EntryService, never>;
|
|
26
28
|
static ɵprov: i0.ɵɵInjectableDeclaration<EntryService>;
|
|
27
29
|
}
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import 'clipboard';
|
|
2
|
-
import 'prismjs';
|
|
3
|
-
import 'prismjs/plugins/toolbar/prism-toolbar';
|
|
4
|
-
import 'prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard';
|
|
5
|
-
import 'prismjs/components/prism-css';
|
|
6
|
-
import 'prismjs/components/prism-javascript';
|
|
7
|
-
import 'prismjs/components/prism-java';
|
|
8
|
-
import 'prismjs/components/prism-markup';
|
|
9
|
-
import 'prismjs/components/prism-typescript';
|
|
10
|
-
import 'prismjs/components/prism-sass';
|
|
11
|
-
import 'prismjs/components/prism-scss';
|
|
12
1
|
import * as i0 from "@angular/core";
|
|
13
2
|
export declare class PrismService {
|
|
14
3
|
private platformId;
|
|
4
|
+
testPrism(): boolean;
|
|
15
5
|
constructor(platformId: Object);
|
|
16
6
|
highlightAll(): void;
|
|
17
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<PrismService, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Entry } from '@blog/data/entry';
|
|
2
|
+
import { Section } from '@blog/data/section';
|
|
3
|
+
import { Content } from '@blog/data/content';
|
|
4
|
+
export declare class Utility {
|
|
5
|
+
static replaceNbsps(str: any): any;
|
|
6
|
+
static convertHTMLToType(el: Element): Section | Content | null;
|
|
7
|
+
static convertHtmlToBlogFormat(entry: Entry, html: string): Entry;
|
|
8
|
+
static convertTypeToHTML(content: Content): string;
|
|
9
|
+
static convertBlogToHtml(blog: Entry): string;
|
|
10
|
+
}
|