@firestitch/block-editor 9.0.10 → 12.0.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/app/components/block/block.component.d.ts +3 -6
- package/app/components/block-editor/block-editor.component.d.ts +9 -2
- package/app/components/sidebar/sidebar.component.d.ts +5 -2
- package/app/directives/block-editor-margin.directive.d.ts +3 -0
- package/app/directives/block-editor-sidebar-panel.directive.d.ts +3 -0
- package/app/fs-block-editor.module.d.ts +17 -0
- package/app/interfaces/block.d.ts +0 -1
- package/app/services/block-editor.service.d.ts +3 -0
- package/bundles/firestitch-block-editor.umd.js +489 -372
- package/bundles/firestitch-block-editor.umd.js.map +1 -1
- package/esm2015/app/components/block/block.component.js +34 -64
- package/esm2015/app/components/block-editor/block-editor.component.js +67 -57
- package/esm2015/app/components/sidebar/sidebar.component.js +37 -46
- package/esm2015/app/directives/block-editor-margin.directive.js +13 -15
- package/esm2015/app/directives/block-editor-sidebar-panel.directive.js +16 -22
- package/esm2015/app/fs-block-editor.module.js +49 -27
- package/esm2015/app/interfaces/block-editor-config.js +2 -1
- package/esm2015/app/interfaces/block.js +2 -1
- package/esm2015/app/services/block-editor.service.js +9 -9
- package/esm2015/firestitch-block-editor.js +1 -4
- package/esm2015/public_api.js +1 -1
- package/fesm2015/firestitch-block-editor.js +203 -217
- package/fesm2015/firestitch-block-editor.js.map +1 -1
- package/firestitch-block-editor.d.ts +1 -3
- package/package.json +5 -12
- package/bundles/firestitch-block-editor.umd.min.js +0 -2
- package/bundles/firestitch-block-editor.umd.min.js.map +0 -1
- package/esm5/app/components/block/block.component.js +0 -498
- package/esm5/app/components/block-editor/block-editor.component.js +0 -137
- package/esm5/app/components/sidebar/sidebar.component.js +0 -334
- package/esm5/app/directives/block-editor-margin.directive.js +0 -26
- package/esm5/app/directives/block-editor-sidebar-panel.directive.js +0 -28
- package/esm5/app/fs-block-editor.module.js +0 -57
- package/esm5/app/interfaces/block-editor-config.js +0 -1
- package/esm5/app/interfaces/block.js +0 -1
- package/esm5/app/services/block-editor.service.js +0 -124
- package/esm5/firestitch-block-editor.js +0 -8
- package/esm5/public_api.js +0 -8
- package/fesm5/firestitch-block-editor.js +0 -1177
- package/fesm5/firestitch-block-editor.js.map +0 -1
- package/firestitch-block-editor.metadata.json +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { FsHtmlEditorComponent, FsHtmlEditorConfig } from '@firestitch/html-editor';
|
|
3
2
|
import { BlockEditorService } from './../../services/block-editor.service';
|
|
4
3
|
import { Block } from './../../interfaces/block';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class FsBlockComponent implements OnDestroy, AfterContentInit, OnInit {
|
|
6
6
|
private _service;
|
|
7
7
|
private _elementRef;
|
|
@@ -9,7 +9,6 @@ export declare class FsBlockComponent implements OnDestroy, AfterContentInit, On
|
|
|
9
9
|
element: ElementRef;
|
|
10
10
|
contentElement: ElementRef;
|
|
11
11
|
contentEditable: ElementRef;
|
|
12
|
-
htmlEditor: FsHtmlEditorComponent;
|
|
13
12
|
block: Block<any>;
|
|
14
13
|
html: string;
|
|
15
14
|
changed: EventEmitter<any>;
|
|
@@ -17,10 +16,8 @@ export declare class FsBlockComponent implements OnDestroy, AfterContentInit, On
|
|
|
17
16
|
unit: any;
|
|
18
17
|
content: string;
|
|
19
18
|
justifyContent: any;
|
|
20
|
-
htmlConfig: FsHtmlEditorConfig;
|
|
21
19
|
private _moveable;
|
|
22
20
|
private _editable;
|
|
23
|
-
private _selectedElements;
|
|
24
21
|
private _rotateStart;
|
|
25
22
|
private _transformable;
|
|
26
23
|
private _destroy$;
|
|
@@ -61,8 +58,6 @@ export declare class FsBlockComponent implements OnDestroy, AfterContentInit, On
|
|
|
61
58
|
updateRect(): void;
|
|
62
59
|
markForCheck(): void;
|
|
63
60
|
ngOnInit(): void;
|
|
64
|
-
saveSelectedElements(): void;
|
|
65
|
-
clearSelectedElements(): void;
|
|
66
61
|
ngAfterContentInit(): void;
|
|
67
62
|
pxToIn(px: any): number;
|
|
68
63
|
round(value: any, decimals: any): number;
|
|
@@ -72,4 +67,6 @@ export declare class FsBlockComponent implements OnDestroy, AfterContentInit, On
|
|
|
72
67
|
ngOnDestroy(): void;
|
|
73
68
|
private _setTransform;
|
|
74
69
|
private _triggerChanged;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsBlockComponent, never>;
|
|
71
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsBlockComponent, "fs-block", never, { "block": "block"; "html": "html"; }, { "changed": "changed"; }, never, never>;
|
|
75
72
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, IterableDiffers, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
2
2
|
import { BlockEditorConfig } from './../../interfaces/block-editor-config';
|
|
3
3
|
import { FsBlockComponent } from './../block/block.component';
|
|
4
4
|
import { BlockEditorService } from './../../services/block-editor.service';
|
|
@@ -6,10 +6,12 @@ import { Block } from './../../interfaces/block';
|
|
|
6
6
|
import { FsBlockEditorSidebarPanelDirective } from './../../directives/block-editor-sidebar-panel.directive';
|
|
7
7
|
import { FsBlockEditorMarginDirective } from './../../directives/block-editor-margin.directive';
|
|
8
8
|
import { SidebarComponent } from './../sidebar/sidebar.component';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class FsBlockEditorComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
10
11
|
private _el;
|
|
11
12
|
private _service;
|
|
12
13
|
private _cdRef;
|
|
14
|
+
private _differs;
|
|
13
15
|
sidebarPanels: QueryList<FsBlockEditorSidebarPanelDirective>;
|
|
14
16
|
blockComponents: QueryList<FsBlockComponent>;
|
|
15
17
|
artboard: ElementRef;
|
|
@@ -18,13 +20,18 @@ export declare class FsBlockEditorComponent implements OnInit, AfterViewInit, On
|
|
|
18
20
|
artboardContainer: ElementRef;
|
|
19
21
|
sidebar: SidebarComponent;
|
|
20
22
|
config: BlockEditorConfig;
|
|
23
|
+
blockAdded: EventEmitter<FsBlockComponent>;
|
|
24
|
+
blockRemoved: EventEmitter<FsBlockComponent>;
|
|
21
25
|
blocks: Block<any>[];
|
|
26
|
+
private _differ;
|
|
22
27
|
private _destroy$;
|
|
23
|
-
constructor(_el: ElementRef, _service: BlockEditorService, _cdRef: ChangeDetectorRef);
|
|
28
|
+
constructor(_el: ElementRef, _service: BlockEditorService, _cdRef: ChangeDetectorRef, _differs: IterableDiffers);
|
|
24
29
|
get el(): any;
|
|
25
30
|
ngOnInit(): void;
|
|
26
31
|
artboardClick(event: any): void;
|
|
27
32
|
blockChanged(block: Block<any>): void;
|
|
28
33
|
ngAfterViewInit(): void;
|
|
29
34
|
ngOnDestroy(): void;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsBlockEditorComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsBlockEditorComponent, "fs-block-editor", never, { "config": "config"; }, { "blockAdded": "blockAdded"; "blockRemoved": "blockRemoved"; }, ["sidebarPanels"], never>;
|
|
30
37
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FsBlockComponent } from './../block/block.component';
|
|
2
|
-
import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
2
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
3
3
|
import { FsFile } from '@firestitch/file';
|
|
4
4
|
import { BlockEditorConfig } from '../../interfaces/block-editor-config';
|
|
5
5
|
import { BlockEditorService } from '../../services/block-editor.service';
|
|
6
6
|
import { Block } from '../../interfaces/block';
|
|
7
7
|
import { FsBlockEditorSidebarPanelDirective } from '../../directives/block-editor-sidebar-panel.directive';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class SidebarComponent implements OnInit, OnDestroy {
|
|
9
10
|
private _el;
|
|
10
11
|
private _service;
|
|
@@ -12,7 +13,7 @@ export declare class SidebarComponent implements OnInit, OnDestroy {
|
|
|
12
13
|
sidebarPanels: QueryList<FsBlockEditorSidebarPanelDirective>;
|
|
13
14
|
config: BlockEditorConfig;
|
|
14
15
|
blocks: any;
|
|
15
|
-
|
|
16
|
+
blockAdded: EventEmitter<FsBlockComponent>;
|
|
16
17
|
block: Block<any>;
|
|
17
18
|
clippable: any;
|
|
18
19
|
private _destroy$;
|
|
@@ -55,4 +56,6 @@ export declare class SidebarComponent implements OnInit, OnDestroy {
|
|
|
55
56
|
inputFocus(event: any): void;
|
|
56
57
|
ngOnDestroy(): void;
|
|
57
58
|
validNumeric(value: any): boolean;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SidebarComponent, never>;
|
|
60
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SidebarComponent, "sidebar", never, { "config": "config"; "blocks": "blocks"; "blockAdded": "blockAdded"; }, {}, ["sidebarPanels"], never>;
|
|
58
61
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class FsBlockEditorMarginDirective {
|
|
3
4
|
private _elementRef;
|
|
4
5
|
constructor(_elementRef: ElementRef);
|
|
5
6
|
get element(): any;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsBlockEditorMarginDirective, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FsBlockEditorMarginDirective, "[fsBlockEditorMargin]", never, {}, {}, never>;
|
|
6
9
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class FsBlockEditorSidebarPanelDirective {
|
|
3
4
|
templateRef: TemplateRef<any>;
|
|
4
5
|
label: string;
|
|
5
6
|
show: boolean;
|
|
6
7
|
constructor(templateRef: TemplateRef<any>);
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsBlockEditorSidebarPanelDirective, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FsBlockEditorSidebarPanelDirective, "[fsBlockEditorSidebarPanel]", never, { "label": "label"; "show": "show"; }, {}, never>;
|
|
7
10
|
}
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "./components/block/block.component";
|
|
4
|
+
import * as i2 from "./components/block-editor/block-editor.component";
|
|
5
|
+
import * as i3 from "./directives/block-editor-sidebar-panel.directive";
|
|
6
|
+
import * as i4 from "./directives/block-editor-margin.directive";
|
|
7
|
+
import * as i5 from "./components/sidebar/sidebar.component";
|
|
8
|
+
import * as i6 from "@angular/common";
|
|
9
|
+
import * as i7 from "@angular/forms";
|
|
10
|
+
import * as i8 from "@angular/material/icon";
|
|
11
|
+
import * as i9 from "@angular/material/button";
|
|
12
|
+
import * as i10 from "@angular/material/input";
|
|
13
|
+
import * as i11 from "@angular/material/form-field";
|
|
14
|
+
import * as i12 from "@firestitch/file";
|
|
15
|
+
import * as i13 from "@firestitch/colorpicker";
|
|
2
16
|
export declare class FsBlockEditorModule {
|
|
3
17
|
static forRoot(): ModuleWithProviders<FsBlockEditorModule>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsBlockEditorModule, never>;
|
|
19
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FsBlockEditorModule, [typeof i1.FsBlockComponent, typeof i2.FsBlockEditorComponent, typeof i3.FsBlockEditorSidebarPanelDirective, typeof i4.FsBlockEditorMarginDirective, typeof i5.SidebarComponent], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.MatIconModule, typeof i9.MatButtonModule, typeof i10.MatInputModule, typeof i11.MatFormFieldModule, typeof i12.FsFileModule, typeof i13.FsColorPickerModule], [typeof i1.FsBlockComponent, typeof i2.FsBlockEditorComponent, typeof i3.FsBlockEditorSidebarPanelDirective]>;
|
|
20
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FsBlockEditorModule>;
|
|
4
21
|
}
|
|
@@ -2,6 +2,7 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
2
2
|
import { Block } from './../interfaces/block';
|
|
3
3
|
import { FsBlockComponent } from '../components/block/block.component';
|
|
4
4
|
import { BlockEditorConfig } from '../interfaces/block-editor-config';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class BlockEditorService {
|
|
6
7
|
container: any;
|
|
7
8
|
margin: any;
|
|
@@ -30,4 +31,6 @@ export declare class BlockEditorService {
|
|
|
30
31
|
registerContainer(container: any): void;
|
|
31
32
|
registerMargin(margin: any): void;
|
|
32
33
|
sanitizeBlock(block: any): any;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlockEditorService, never>;
|
|
35
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BlockEditorService>;
|
|
33
36
|
}
|