@firestitch/content 12.2.2 → 12.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/app/interfaces/content-config.d.ts +5 -5
- package/app/interfaces/content-page.d.ts +1 -0
- package/app/interfaces/content-style.d.ts +4 -0
- package/app/interfaces/index.d.ts +2 -1
- package/app/modules/content/components/content/content.component.d.ts +7 -3
- package/app/modules/content/components/content-renderer/content-renderer.component.d.ts +11 -9
- package/app/modules/content-layouts/components/content-layouts/content-layouts.component.d.ts +2 -1
- package/app/modules/content-pages/components/content-pages/content-pages.component.d.ts +2 -0
- package/app/modules/content-style/components/content-style/content-style.component.d.ts +27 -0
- package/app/modules/content-style/components/content-style/index.d.ts +1 -0
- package/app/modules/content-style/fs-content-style.module.d.ts +14 -0
- package/app/modules/editor/components/editor/editor.component.d.ts +24 -22
- package/app/modules/editor/fs-content-editor.module.d.ts +8 -5
- package/bundles/firestitch-content.umd.js +620 -523
- package/bundles/firestitch-content.umd.js.map +1 -1
- package/esm2015/app/interfaces/content-config.js +1 -1
- package/esm2015/app/interfaces/content-page.js +1 -1
- package/esm2015/app/interfaces/content-style.js +2 -0
- package/esm2015/app/interfaces/index.js +3 -2
- package/esm2015/app/modules/content/components/content/content.component.js +35 -20
- package/esm2015/app/modules/content/components/content-renderer/content-renderer.component.js +21 -19
- package/esm2015/app/modules/content-layouts/components/content-layouts/content-layouts.component.js +11 -8
- package/esm2015/app/modules/content-pages/components/content-pages/content-pages.component.js +16 -11
- package/esm2015/app/modules/content-pages/fs-content-pages.module.js +1 -1
- package/esm2015/app/modules/content-style/components/content-style/content-style.component.js +71 -0
- package/esm2015/app/modules/content-style/components/content-style/index.js +2 -0
- package/esm2015/app/modules/content-style/fs-content-style.module.js +50 -0
- package/esm2015/app/modules/editor/components/editor/editor.component.js +76 -116
- package/esm2015/app/modules/editor/fs-content-editor.module.js +19 -7
- package/esm2015/public_api.js +5 -3
- package/fesm2015/firestitch-content.js +446 -353
- package/fesm2015/firestitch-content.js.map +1 -1
- package/package.json +6 -5
- package/public_api.d.ts +5 -3
@@ -1,12 +1,9 @@
|
|
1
1
|
import { Observable } from 'rxjs';
|
2
2
|
import { FsContentLayout } from './content-layout';
|
3
3
|
import { FsContentPage } from './content-page';
|
4
|
+
import { FsContentStyle } from './content-style';
|
4
5
|
export interface FsContentConfig {
|
5
|
-
loadContent: (path: string) => Observable<
|
6
|
-
content: string;
|
7
|
-
styles: string;
|
8
|
-
title: string;
|
9
|
-
}>;
|
6
|
+
loadContent: (path: string) => Observable<FsContentPage>;
|
10
7
|
loadContentPages: (query: any) => Observable<{
|
11
8
|
contentPages: FsContentPage[];
|
12
9
|
paging: any;
|
@@ -14,6 +11,9 @@ export interface FsContentConfig {
|
|
14
11
|
saveContentPage: (contentPage: FsContentPage) => Observable<FsContentPage>;
|
15
12
|
deleteContentPage: (contentPage: FsContentPage) => Observable<FsContentPage>;
|
16
13
|
loadContentLayouts: (query?: any) => Observable<FsContentLayout[]>;
|
14
|
+
loadContentStyleCss?: () => Observable<string>;
|
15
|
+
loadContentStyle: () => Observable<FsContentStyle>;
|
16
|
+
saveContentStyle: (contentStyle: FsContentStyle) => Observable<FsContentStyle>;
|
17
17
|
saveContentLayout: (contentLayout: FsContentLayout) => Observable<FsContentLayout>;
|
18
18
|
deleteContentLayout: (contentLayout: FsContentLayout) => Observable<FsContentLayout>;
|
19
19
|
}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { ChangeDetectorRef,
|
1
|
+
import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
2
2
|
import { Title } from '@angular/platform-browser';
|
3
3
|
import { Router } from '@angular/router';
|
4
|
+
import { HtmlRenderer } from '@firestitch/body';
|
4
5
|
import { FsContentConfig } from '../../../../interfaces';
|
5
6
|
import * as i0 from "@angular/core";
|
6
7
|
export declare class FsContentComponent implements OnInit, OnDestroy {
|
@@ -9,13 +10,16 @@ export declare class FsContentComponent implements OnInit, OnDestroy {
|
|
9
10
|
private _cdRef;
|
10
11
|
private _router;
|
11
12
|
private _el;
|
13
|
+
private _htmlRenderer;
|
12
14
|
contentPage: any;
|
13
15
|
private _destroy$;
|
14
|
-
constructor(_config: FsContentConfig, _title: Title, _cdRef: ChangeDetectorRef, _router: Router, _el: ElementRef);
|
16
|
+
constructor(_config: FsContentConfig, _title: Title, _cdRef: ChangeDetectorRef, _router: Router, _el: ElementRef, _htmlRenderer: HtmlRenderer);
|
15
17
|
ngOnInit(): void;
|
16
|
-
load(): void;
|
17
18
|
get el(): any;
|
18
19
|
ngOnDestroy(): void;
|
20
|
+
private _initStyles;
|
21
|
+
private _initContent;
|
22
|
+
private _loadContent;
|
19
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsContentComponent, never>;
|
20
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<FsContentComponent, "fs-content", never, {}, {}, never, never>;
|
21
25
|
}
|
@@ -1,17 +1,19 @@
|
|
1
|
-
import {
|
2
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
1
|
+
import { AfterViewChecked, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
2
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
3
3
|
import { Router } from '@angular/router';
|
4
|
-
import {
|
4
|
+
import { HtmlRenderer } from '@firestitch/body';
|
5
5
|
import * as i0 from "@angular/core";
|
6
|
-
export declare class ContentRendererComponent implements OnDestroy, AfterViewChecked {
|
6
|
+
export declare class ContentRendererComponent implements OnDestroy, AfterViewChecked, OnInit {
|
7
7
|
private _sanitizer;
|
8
8
|
private _router;
|
9
9
|
private _el;
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
private _htmlRenderer;
|
11
|
+
script: ElementRef;
|
12
|
+
contentPage: any;
|
13
|
+
content: SafeHtml;
|
14
|
+
private _destroy$;
|
15
|
+
constructor(_sanitizer: DomSanitizer, _router: Router, _el: ElementRef, _htmlRenderer: HtmlRenderer);
|
16
|
+
ngOnInit(): void;
|
15
17
|
ngAfterViewChecked(): void;
|
16
18
|
registerHrefs(): void;
|
17
19
|
get el(): any;
|
package/app/modules/content-layouts/components/content-layouts/content-layouts.component.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
2
2
|
import { MatDialog } from '@angular/material/dialog';
|
3
3
|
import { FsListComponent, FsListConfig } from '@firestitch/list';
|
4
|
+
import { Observable } from 'rxjs';
|
4
5
|
import { FsContentConfig } from '../../../../interfaces';
|
5
6
|
import * as i0 from "@angular/core";
|
6
7
|
export declare class FsContentLayoutsComponent implements OnInit, OnDestroy {
|
@@ -12,7 +13,7 @@ export declare class FsContentLayoutsComponent implements OnInit, OnDestroy {
|
|
12
13
|
constructor(_config: FsContentConfig, _dialog: MatDialog);
|
13
14
|
ngOnInit(): void;
|
14
15
|
openEditor(contentLayout: any): void;
|
15
|
-
openLayout(contentLayout: any):
|
16
|
+
openLayout(contentLayout: any): Observable<any>;
|
16
17
|
ngOnDestroy(): void;
|
17
18
|
private _initListConfig;
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsContentLayoutsComponent, never>;
|
@@ -2,6 +2,7 @@ import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { MatDialog } from '@angular/material/dialog';
|
3
3
|
import { FsHtmlEditorConfig } from '@firestitch/html-editor';
|
4
4
|
import { FsListComponent, FsListConfig } from '@firestitch/list';
|
5
|
+
import { Observable } from 'rxjs';
|
5
6
|
import { FsContentConfig } from '../../../../interfaces';
|
6
7
|
import * as i0 from "@angular/core";
|
7
8
|
export declare class FsContentPagesComponent implements OnInit, OnDestroy {
|
@@ -16,6 +17,7 @@ export declare class FsContentPagesComponent implements OnInit, OnDestroy {
|
|
16
17
|
ngOnInit(): void;
|
17
18
|
openEditor(contentPage: any): void;
|
18
19
|
ngOnDestroy(): void;
|
20
|
+
openContentPage(contentPage: any): Observable<any>;
|
19
21
|
private _initListConfig;
|
20
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsContentPagesComponent, never>;
|
21
23
|
static ɵcmp: i0.ɵɵComponentDeclaration<FsContentPagesComponent, "fs-content-pages", never, { "htmlEditorConfig": "htmlEditorConfig"; }, {}, never, never>;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
2
|
+
import { FsFormDirective } from '@firestitch/form';
|
3
|
+
import { FsMessage } from '@firestitch/message';
|
4
|
+
import { FsTextEditorComponent } from '@firestitch/text-editor';
|
5
|
+
import { FsContentConfig } from '../../../../interfaces';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
export declare class ContentStyleComponent implements OnInit, OnDestroy {
|
8
|
+
private _config;
|
9
|
+
private _message;
|
10
|
+
private _cdRef;
|
11
|
+
textEditors: FsTextEditorComponent;
|
12
|
+
form: FsFormDirective;
|
13
|
+
height: string;
|
14
|
+
contentStyle: any;
|
15
|
+
styleConfig: {
|
16
|
+
tabSize: number;
|
17
|
+
language: string;
|
18
|
+
height: string;
|
19
|
+
};
|
20
|
+
private _destroy$;
|
21
|
+
constructor(_config: FsContentConfig, _message: FsMessage, _cdRef: ChangeDetectorRef);
|
22
|
+
ngOnInit(): void;
|
23
|
+
ngOnDestroy(): void;
|
24
|
+
save(): void;
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContentStyleComponent, never>;
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContentStyleComponent, "fs-content-style", never, { "height": "height"; }, {}, never, never>;
|
27
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './content-style.component';
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./components/content-style/content-style.component";
|
3
|
+
import * as i2 from "@angular/common";
|
4
|
+
import * as i3 from "@angular/forms";
|
5
|
+
import * as i4 from "@angular/material/button";
|
6
|
+
import * as i5 from "@firestitch/text-editor";
|
7
|
+
import * as i6 from "@firestitch/skeleton";
|
8
|
+
import * as i7 from "@firestitch/common";
|
9
|
+
import * as i8 from "../editor/fs-content-editor.module";
|
10
|
+
export declare class FsContentStyleModule {
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsContentStyleModule, never>;
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FsContentStyleModule, [typeof i1.ContentStyleComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.MatButtonModule, typeof i5.FsTextEditorModule, typeof i6.FsSkeletonModule, typeof i7.FsCommonModule, typeof i8.FsContentEditorModule], [typeof i1.ContentStyleComponent]>;
|
13
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FsContentStyleModule>;
|
14
|
+
}
|
@@ -1,54 +1,56 @@
|
|
1
|
-
import { ChangeDetectorRef,
|
1
|
+
import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
2
2
|
import { MatButtonToggleChange } from '@angular/material/button-toggle';
|
3
|
-
import {
|
4
|
-
import { FsFormDirective } from '@firestitch/form';
|
3
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
5
4
|
import { FsMessage } from '@firestitch/message';
|
6
|
-
import {
|
5
|
+
import { FsTextEditorConfig } from '@firestitch/text-editor';
|
7
6
|
import { Observable } from 'rxjs';
|
7
|
+
import { FsContentConfig } from '../../../../interfaces';
|
8
8
|
import * as i0 from "@angular/core";
|
9
9
|
export declare class EditorComponent implements OnInit, OnDestroy {
|
10
10
|
private _data;
|
11
11
|
private _dialogRef;
|
12
|
-
private _dialog;
|
13
12
|
private _message;
|
14
13
|
private _cdRef;
|
15
|
-
form: FsFormDirective;
|
16
|
-
styleEditor: FsTextEditorComponent;
|
17
|
-
contentEditor: FsTextEditorComponent;
|
18
|
-
separator: ElementRef;
|
19
|
-
contentContainer: ElementRef;
|
20
|
-
styleContainer: ElementRef;
|
21
14
|
contentPage: {
|
22
15
|
id?: number;
|
23
16
|
styles?: string;
|
24
17
|
content?: string;
|
25
18
|
name?: string;
|
19
|
+
js?: string;
|
20
|
+
};
|
21
|
+
contentStyle: {
|
22
|
+
scss?: string;
|
26
23
|
};
|
27
24
|
resizing: boolean;
|
28
25
|
title: any;
|
29
26
|
editors: {
|
30
|
-
|
31
|
-
|
27
|
+
html: boolean;
|
28
|
+
scss: boolean;
|
29
|
+
js: boolean;
|
30
|
+
globalScss: boolean;
|
32
31
|
};
|
33
|
-
|
34
|
-
|
32
|
+
scssConfig: FsTextEditorConfig;
|
33
|
+
globalScssConfig: FsTextEditorConfig;
|
34
|
+
htmlConfig: FsTextEditorConfig;
|
35
|
+
jsConfig: FsTextEditorConfig;
|
36
|
+
private _config;
|
35
37
|
private _destroy$;
|
36
38
|
private _save;
|
37
39
|
constructor(_data: {
|
38
40
|
contentPage: any;
|
39
41
|
title: string;
|
40
42
|
save: (data: any) => Observable<any>;
|
41
|
-
|
43
|
+
openSettings: (data: any) => Observable<any>;
|
44
|
+
contentConfig: FsContentConfig;
|
45
|
+
}, _dialogRef: MatDialogRef<EditorComponent>, _message: FsMessage, _cdRef: ChangeDetectorRef);
|
42
46
|
ngOnInit(): void;
|
43
47
|
editorToggleChange(event: MatButtonToggleChange): void;
|
44
|
-
updateEditorLayouts(): void;
|
45
48
|
ngOnDestroy(): void;
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
+
globalScssChange(): void;
|
50
|
+
initTextEditors(): void;
|
51
|
+
initGlobalContentStyle(): void;
|
52
|
+
saveContentPage(): void;
|
49
53
|
openSettings(): void;
|
50
|
-
private _initSeparator;
|
51
|
-
private _moveSeparator;
|
52
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<EditorComponent, never>;
|
53
55
|
static ɵcmp: i0.ɵɵComponentDeclaration<EditorComponent, "ng-component", never, {}, {}, never, never>;
|
54
56
|
}
|
@@ -9,12 +9,15 @@ import * as i7 from "@angular/material/icon";
|
|
9
9
|
import * as i8 from "@angular/material/button-toggle";
|
10
10
|
import * as i9 from "@firestitch/list";
|
11
11
|
import * as i10 from "@firestitch/form";
|
12
|
-
import * as i11 from "@firestitch/
|
13
|
-
import * as i12 from "@firestitch/
|
14
|
-
import * as i13 from "@firestitch/
|
15
|
-
import * as i14 from "@firestitch/
|
12
|
+
import * as i11 from "@firestitch/skeleton";
|
13
|
+
import * as i12 from "@firestitch/label";
|
14
|
+
import * as i13 from "@firestitch/html-editor";
|
15
|
+
import * as i14 from "@firestitch/common";
|
16
|
+
import * as i15 from "@firestitch/dialog";
|
17
|
+
import * as i16 from "@firestitch/text-editor";
|
18
|
+
import * as i17 from "angular-split";
|
16
19
|
export declare class FsContentEditorModule {
|
17
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsContentEditorModule, never>;
|
18
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FsContentEditorModule, [typeof i1.EditorComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.MatDialogModule, typeof i5.MatButtonModule, typeof i6.MatTabsModule, typeof i7.MatIconModule, typeof i8.MatButtonToggleModule, typeof i9.FsListModule, typeof i10.FsFormModule, typeof i11.
|
21
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FsContentEditorModule, [typeof i1.EditorComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.MatDialogModule, typeof i5.MatButtonModule, typeof i6.MatTabsModule, typeof i7.MatIconModule, typeof i8.MatButtonToggleModule, typeof i9.FsListModule, typeof i10.FsFormModule, typeof i11.FsSkeletonModule, typeof i12.FsLabelModule, typeof i13.FsHtmlEditorModule, typeof i14.FsCommonModule, typeof i15.FsDialogModule, typeof i16.FsTextEditorModule, typeof i17.AngularSplitModule], [typeof i1.EditorComponent]>;
|
19
22
|
static ɵinj: i0.ɵɵInjectorDeclaration<FsContentEditorModule>;
|
20
23
|
}
|