@firestitch/block-editor 12.3.22 → 12.3.24
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/components/sidebar/sidebar.component.d.ts +2 -0
- package/app/fs-block-editor.module.d.ts +4 -3
- package/app/interfaces/block-editor-config.d.ts +1 -0
- 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 +187 -147
- 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/block-editor/block-editor.component.js +5 -3
- package/esm2015/app/components/layers-reorder-dialog/layers-reorder-dialog.component.js +7 -6
- package/esm2015/app/components/sidebar/sidebar.component.js +25 -19
- package/esm2015/app/fs-block-editor.module.js +5 -1
- package/esm2015/app/interfaces/block-editor-config.js +1 -1
- 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 +151 -123
- 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;
|
|
@@ -2,6 +2,7 @@ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, QueryLi
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { FsFile } from '@firestitch/file';
|
|
4
4
|
import { FsPrompt } from '@firestitch/prompt';
|
|
5
|
+
import { FormControl } from '@angular/forms';
|
|
5
6
|
import { FsBlockEditorSidebarPanelDirective } from '../../directives/block-editor-sidebar-panel.directive';
|
|
6
7
|
import { BlockType } from '../../enums';
|
|
7
8
|
import { Block } from '../../interfaces/block';
|
|
@@ -65,6 +66,7 @@ export declare class SidebarComponent implements OnInit, OnDestroy {
|
|
|
65
66
|
imageClip(): void;
|
|
66
67
|
blockChangeProperty(value: any, name: any): void;
|
|
67
68
|
blockRemoveClick(): void;
|
|
69
|
+
validate: (formControl: FormControl) => Observable<any>;
|
|
68
70
|
blockUpload(block: Block, fsFile: FsFile): void;
|
|
69
71
|
blockAdd(type: BlockType): void;
|
|
70
72
|
layerMove(direction: any): void;
|
|
@@ -24,11 +24,12 @@ import * as i21 from "@firestitch/file";
|
|
|
24
24
|
import * as i22 from "@firestitch/colorpicker";
|
|
25
25
|
import * as i23 from "@firestitch/menu";
|
|
26
26
|
import * as i24 from "@firestitch/zoom-pan";
|
|
27
|
-
import * as i25 from "@firestitch/
|
|
28
|
-
import * as i26 from "@firestitch/
|
|
27
|
+
import * as i25 from "@firestitch/form";
|
|
28
|
+
import * as i26 from "@firestitch/autocomplete";
|
|
29
|
+
import * as i27 from "@firestitch/dialog";
|
|
29
30
|
export declare class FsBlockEditorModule {
|
|
30
31
|
static forRoot(): ModuleWithProviders<FsBlockEditorModule>;
|
|
31
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsBlockEditorModule, never>;
|
|
32
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FsBlockEditorModule, [typeof i1.FsBlockComponent, typeof i2.FsBlockEditorComponent, typeof i3.FsBlockEditorSidebarPanelDirective, typeof i4.FsBlockEditorMarginDirective, typeof i5.SidebarComponent, typeof i6.ArtboardComponent, typeof i7.LayersReorderDialogComponent, typeof i8.FontComponent, typeof i9.CreateImageUrlPipe], [typeof i10.CommonModule, typeof i11.FormsModule, typeof i12.MatIconModule, typeof i13.MatButtonModule, typeof i14.MatInputModule, typeof i15.MatFormFieldModule, typeof i16.MatCheckboxModule, typeof i17.MatTooltipModule, typeof i18.MatSelectModule, typeof i19.MatListModule, typeof i20.DragDropModule, typeof i21.FsFileModule, typeof i22.FsColorPickerModule, typeof i23.FsMenuModule, typeof i24.FsZoomPanModule, typeof i25.
|
|
33
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FsBlockEditorModule, [typeof i1.FsBlockComponent, typeof i2.FsBlockEditorComponent, typeof i3.FsBlockEditorSidebarPanelDirective, typeof i4.FsBlockEditorMarginDirective, typeof i5.SidebarComponent, typeof i6.ArtboardComponent, typeof i7.LayersReorderDialogComponent, typeof i8.FontComponent, typeof i9.CreateImageUrlPipe], [typeof i10.CommonModule, typeof i11.FormsModule, typeof i12.MatIconModule, typeof i13.MatButtonModule, typeof i14.MatInputModule, typeof i15.MatFormFieldModule, typeof i16.MatCheckboxModule, typeof i17.MatTooltipModule, typeof i18.MatSelectModule, typeof i19.MatListModule, typeof i20.DragDropModule, typeof i21.FsFileModule, typeof i22.FsColorPickerModule, typeof i23.FsMenuModule, typeof i24.FsZoomPanModule, typeof i25.FsFormModule, typeof i26.FsAutocompleteModule, typeof i27.FsDialogModule], [typeof i1.FsBlockComponent, typeof i2.FsBlockEditorComponent, typeof i3.FsBlockEditorSidebarPanelDirective]>;
|
|
33
34
|
static ɵinj: i0.ɵɵInjectorDeclaration<FsBlockEditorModule>;
|
|
34
35
|
}
|
|
@@ -9,6 +9,7 @@ export interface BlockEditorConfig {
|
|
|
9
9
|
marginBottom?: number;
|
|
10
10
|
marginLeft?: number;
|
|
11
11
|
blocks?: Block[];
|
|
12
|
+
defaultValidation?: (block: Block, value: any) => Observable<any>;
|
|
12
13
|
blockChanged?: (block: Block) => void;
|
|
13
14
|
blockAdd?: (block: Block) => Observable<Block>;
|
|
14
15
|
blockUpload?: (block: Block, file: Blob) => Observable<Block>;
|
|
@@ -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;
|