@firestitch/block-editor 12.3.22 → 12.3.23
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/artboard/artboard.component.d.ts +4 -4
- package/app/components/block/block.component.d.ts +5 -3
- package/app/components/layers-reorder-dialog/layers-reorder-dialog.component.d.ts +3 -2
- package/app/interfaces/block.d.ts +3 -0
- package/app/services/block-editor.service.d.ts +2 -2
- package/app/services/blocks-store.service.d.ts +2 -0
- package/bundles/firestitch-block-editor.umd.js +151 -122
- package/bundles/firestitch-block-editor.umd.js.map +1 -1
- package/esm2015/app/components/artboard/artboard.component.js +12 -11
- package/esm2015/app/components/block/block.component.js +47 -27
- package/esm2015/app/components/layers-reorder-dialog/layers-reorder-dialog.component.js +6 -6
- package/esm2015/app/components/sidebar/sidebar.component.js +10 -10
- package/esm2015/app/interfaces/block.js +1 -1
- package/esm2015/app/services/block-editor.service.js +14 -24
- package/esm2015/app/services/blocks-store.service.js +10 -4
- package/fesm2015/firestitch-block-editor.js +127 -111
- package/fesm2015/firestitch-block-editor.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
2
2
|
import { FsZoomPanComponent } from '@firestitch/zoom-pan';
|
|
3
|
+
import { FsBlockEditorMarginDirective } from '../../directives/block-editor-margin.directive';
|
|
4
|
+
import { FsBlockEditorSidebarPanelDirective } from '../../directives/block-editor-sidebar-panel.directive';
|
|
5
|
+
import { Block } from '../../interfaces/block';
|
|
3
6
|
import { BlockEditorConfig } from '../../interfaces/block-editor-config';
|
|
4
|
-
import { FsBlockComponent } from '../block/block.component';
|
|
5
7
|
import { BlockEditorService } from '../../services/block-editor.service';
|
|
6
|
-
import {
|
|
7
|
-
import { FsBlockEditorSidebarPanelDirective } from '../../directives/block-editor-sidebar-panel.directive';
|
|
8
|
-
import { FsBlockEditorMarginDirective } from '../../directives/block-editor-margin.directive';
|
|
8
|
+
import { FsBlockComponent } from '../block/block.component';
|
|
9
9
|
import { SidebarComponent } from '../sidebar/sidebar.component';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
export declare class ArtboardComponent implements OnInit, OnDestroy {
|
|
@@ -13,7 +13,7 @@ export declare class FsBlockComponent implements OnDestroy, AfterContentInit, On
|
|
|
13
13
|
element: ElementRef;
|
|
14
14
|
contentElement: ElementRef;
|
|
15
15
|
contentEditable: ElementRef;
|
|
16
|
-
block: Block;
|
|
16
|
+
set block(block: Block);
|
|
17
17
|
html: string;
|
|
18
18
|
zoompan: FsZoomPanComponent;
|
|
19
19
|
transformating: boolean;
|
|
@@ -22,12 +22,15 @@ export declare class FsBlockComponent implements OnDestroy, AfterContentInit, On
|
|
|
22
22
|
selected: any;
|
|
23
23
|
BlockType: typeof BlockType;
|
|
24
24
|
private _moveable;
|
|
25
|
+
private _block;
|
|
25
26
|
private _editable;
|
|
26
27
|
private _transformable;
|
|
27
28
|
private _destroy$;
|
|
28
29
|
constructor(_blockEditor: BlockEditorService, _elementRef: ElementRef, _cdRef: ChangeDetectorRef, _googleFontService: GoogleFontService);
|
|
30
|
+
get block(): Block;
|
|
29
31
|
get el(): any;
|
|
30
32
|
get moveable(): Moveable;
|
|
33
|
+
hasType(types: any): any;
|
|
31
34
|
get editable(): any;
|
|
32
35
|
get styleTop(): string;
|
|
33
36
|
get styleLeft(): string;
|
|
@@ -53,11 +56,10 @@ export declare class FsBlockComponent implements OnDestroy, AfterContentInit, On
|
|
|
53
56
|
ngAfterContentInit(): void;
|
|
54
57
|
pxToIn(px: any): number;
|
|
55
58
|
round(value: any, decimals: any): number;
|
|
56
|
-
select(): void;
|
|
57
59
|
deselect(): void;
|
|
58
60
|
disableContentEdit(): void;
|
|
59
61
|
deselectContent(): void;
|
|
60
|
-
|
|
62
|
+
selectTextAll(): void;
|
|
61
63
|
ngOnDestroy(): void;
|
|
62
64
|
private _setTransform;
|
|
63
65
|
private _triggerChanged;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
1
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { Block } from '../../interfaces';
|
|
3
4
|
import { FsBlockComponent } from '../block/block.component';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class LayersReorderDialogComponent {
|
|
6
7
|
private _dialogRef;
|
|
7
|
-
|
|
8
|
+
blocks: Block[];
|
|
8
9
|
blockTypeIcons: {};
|
|
9
10
|
constructor(_dialogData: unknown, _dialogRef: MatDialogRef<LayersReorderDialogComponent>);
|
|
10
11
|
swapItems(event: CdkDragDrop<FsBlockComponent>): void;
|
|
@@ -21,7 +21,6 @@ export declare class BlockEditorService implements OnDestroy {
|
|
|
21
21
|
private _blockInited$;
|
|
22
22
|
constructor(_store: BlocksStore, _dialog: FsDialog);
|
|
23
23
|
get blockComponents(): FsBlockComponent[];
|
|
24
|
-
get selectedComponentBlocks(): FsBlockComponent[];
|
|
25
24
|
init(config: BlockEditorConfig): void;
|
|
26
25
|
blockAdd(block: Block): void;
|
|
27
26
|
blockUpload(block: Block, fsFile: FsFile): Observable<Block>;
|
|
@@ -29,6 +28,7 @@ export declare class BlockEditorService implements OnDestroy {
|
|
|
29
28
|
removeSelectedBlocks(): void;
|
|
30
29
|
get blocks$(): Observable<Block[]>;
|
|
31
30
|
get blockChanged$(): Observable<Block>;
|
|
31
|
+
get blockUpdated$(): Observable<Block>;
|
|
32
32
|
get blockClippable$(): BehaviorSubject<boolean>;
|
|
33
33
|
set blockClippable(value: any);
|
|
34
34
|
get blockAdded$(): Observable<Block>;
|
|
@@ -36,7 +36,7 @@ export declare class BlockEditorService implements OnDestroy {
|
|
|
36
36
|
get blockRemoved$(): Observable<Block>;
|
|
37
37
|
get blocks(): Block[];
|
|
38
38
|
blockChange(block: Block): void;
|
|
39
|
-
isSelectedBlock(block:
|
|
39
|
+
isSelectedBlock(block: Block): boolean;
|
|
40
40
|
indexOf(block: any): number;
|
|
41
41
|
selectedBlockComponentChangeProperty(value: any, name: any): void;
|
|
42
42
|
get selectedBlocks$(): Observable<Block[]>;
|
|
@@ -14,6 +14,7 @@ export declare class BlocksStore implements OnDestroy {
|
|
|
14
14
|
get blocks$(): Observable<Block[]>;
|
|
15
15
|
get blockAdded$(): Observable<Block>;
|
|
16
16
|
get blockChanged$(): Observable<Block>;
|
|
17
|
+
get blockUpdated$(): Observable<Block>;
|
|
17
18
|
get blockRemoved$(): Observable<Block>;
|
|
18
19
|
ngOnDestroy(): void;
|
|
19
20
|
init(config: BlockEditorConfig): void;
|
|
@@ -21,6 +22,7 @@ export declare class BlocksStore implements OnDestroy {
|
|
|
21
22
|
blockAdd(block: Block): void;
|
|
22
23
|
blockUpload(block: Block, fsFile: FsFile): Observable<Block>;
|
|
23
24
|
blockChange(block: Block): void;
|
|
25
|
+
blockUpdate(block: Block): void;
|
|
24
26
|
blockRemove(targetBlocks: Block | Block[]): void;
|
|
25
27
|
isReordableBlock(block: Block): boolean;
|
|
26
28
|
updateTabIndex(index: number): void;
|