@firestitch/block-editor 12.2.0 → 12.2.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/artboard/artboard.component.d.ts +35 -35
- package/app/components/block/block.component.d.ts +58 -58
- package/app/components/block-editor/block-editor.component.d.ts +28 -28
- package/app/components/layers-reorder-dialog/layers-reorder-dialog.component.d.ts +15 -15
- package/app/components/sidebar/sidebar.component.d.ts +79 -79
- package/app/consts/block-formats.const.d.ts +6 -6
- package/app/consts/block-types.const.d.ts +12 -12
- package/app/consts/index.d.ts +2 -2
- package/app/directives/block-editor-margin.directive.d.ts +9 -9
- package/app/directives/block-editor-sidebar-panel.directive.d.ts +10 -10
- package/app/enums/block-format.enum.d.ts +6 -6
- package/app/enums/block-type.enum.d.ts +11 -11
- package/app/enums/index.d.ts +2 -2
- package/app/fs-block-editor.module.d.ts +31 -31
- package/app/interfaces/block-editor-config.d.ts +20 -20
- package/app/interfaces/block.d.ts +49 -49
- package/app/services/block-editor.service.d.ts +53 -53
- package/app/services/blocks-store.service.d.ts +34 -34
- package/app/services/index.d.ts +1 -1
- package/bundles/firestitch-block-editor.umd.js +1717 -1717
- package/bundles/firestitch-block-editor.umd.js.map +1 -1
- package/esm2015/app/components/artboard/artboard.component.js +128 -128
- package/esm2015/app/components/block/block.component.js +318 -318
- package/esm2015/app/components/block-editor/block-editor.component.js +85 -85
- package/esm2015/app/components/layers-reorder-dialog/layers-reorder-dialog.component.js +44 -44
- package/esm2015/app/components/sidebar/sidebar.component.js +251 -251
- package/esm2015/app/consts/block-formats.const.js +7 -7
- package/esm2015/app/consts/block-types.const.js +12 -12
- package/esm2015/app/consts/index.js +2 -2
- package/esm2015/app/directives/block-editor-margin.directive.js +18 -18
- package/esm2015/app/directives/block-editor-sidebar-panel.directive.js +20 -20
- package/esm2015/app/enums/block-format.enum.js +7 -7
- package/esm2015/app/enums/block-type.enum.js +12 -12
- package/esm2015/app/enums/index.js +2 -2
- package/esm2015/app/fs-block-editor.module.js +112 -112
- 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 +164 -164
- package/esm2015/app/services/blocks-store.service.js +173 -173
- package/esm2015/app/services/index.js +1 -1
- package/esm2015/firestitch-block-editor.js +4 -4
- package/esm2015/public_api.js +6 -6
- package/fesm2015/firestitch-block-editor.js +1216 -1216
- package/fesm2015/firestitch-block-editor.js.map +1 -1
- package/firestitch-block-editor.d.ts +5 -5
- package/package.json +1 -1
- package/public_api.d.ts +8 -8
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { Block } from './block';
|
|
3
|
-
export interface BlockEditorConfig {
|
|
4
|
-
unit?: 'in' | 'px';
|
|
5
|
-
width?: number;
|
|
6
|
-
height?: number;
|
|
7
|
-
marginTop?: number;
|
|
8
|
-
marginRight?: number;
|
|
9
|
-
marginBottom?: number;
|
|
10
|
-
marginLeft?: number;
|
|
11
|
-
blocks?: Block[];
|
|
12
|
-
blockChanged?: (block: Block) => void;
|
|
13
|
-
blockAdded?: (block: Block) => void;
|
|
14
|
-
blockAdd?: (block: Block) => Observable<Block>;
|
|
15
|
-
blockUpload?: (block: Block, file: Blob) => Observable<Block>;
|
|
16
|
-
blocksRemove?: (block: Block[]) => Observable<Block>;
|
|
17
|
-
blocksLevelChanged?: (blocks: Block[]) => void;
|
|
18
|
-
blocksSelected?: (blocks: Block[]) => void;
|
|
19
|
-
imageUpload?: (file: Blob) => Observable<string>;
|
|
20
|
-
}
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Block } from './block';
|
|
3
|
+
export interface BlockEditorConfig {
|
|
4
|
+
unit?: 'in' | 'px';
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
marginTop?: number;
|
|
8
|
+
marginRight?: number;
|
|
9
|
+
marginBottom?: number;
|
|
10
|
+
marginLeft?: number;
|
|
11
|
+
blocks?: Block[];
|
|
12
|
+
blockChanged?: (block: Block) => void;
|
|
13
|
+
blockAdded?: (block: Block) => void;
|
|
14
|
+
blockAdd?: (block: Block) => Observable<Block>;
|
|
15
|
+
blockUpload?: (block: Block, file: Blob) => Observable<Block>;
|
|
16
|
+
blocksRemove?: (block: Block[]) => Observable<Block>;
|
|
17
|
+
blocksLevelChanged?: (blocks: Block[]) => void;
|
|
18
|
+
blocksSelected?: (blocks: Block[]) => void;
|
|
19
|
+
imageUpload?: (file: Blob) => Observable<string>;
|
|
20
|
+
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { BlockType } from '../enums';
|
|
2
|
-
import { FsBlockComponent } from './../components/block/block.component';
|
|
3
|
-
export declare type Block<T = any> = BlockBase & T;
|
|
4
|
-
export interface BlockBase {
|
|
5
|
-
width?: number;
|
|
6
|
-
height?: number;
|
|
7
|
-
top?: number;
|
|
8
|
-
left?: number;
|
|
9
|
-
rotate?: number;
|
|
10
|
-
horizontalAlign?: 'left' | 'right' | 'center';
|
|
11
|
-
verticalAlign?: 'top' | 'center' | 'bottom';
|
|
12
|
-
borderColor?: string;
|
|
13
|
-
borderWidth?: number;
|
|
14
|
-
fontColor?: string;
|
|
15
|
-
fontSize?: number;
|
|
16
|
-
bold?: boolean;
|
|
17
|
-
italic?: boolean;
|
|
18
|
-
underline?: boolean;
|
|
19
|
-
keepRatio?: boolean;
|
|
20
|
-
backgroundColor?: string;
|
|
21
|
-
shapeRadius?: number;
|
|
22
|
-
lineHeight?: number;
|
|
23
|
-
shapeTopRight?: string;
|
|
24
|
-
shapeTopLeft?: string;
|
|
25
|
-
shapeBottomRight?: string;
|
|
26
|
-
shapeBottomLeft?: string;
|
|
27
|
-
padding?: number;
|
|
28
|
-
paddingTop?: number;
|
|
29
|
-
paddingLeft?: number;
|
|
30
|
-
paddingBottom?: number;
|
|
31
|
-
paddingRight?: number;
|
|
32
|
-
content?: string;
|
|
33
|
-
blockComponent?: FsBlockComponent;
|
|
34
|
-
index?: number;
|
|
35
|
-
tabIndex?: number;
|
|
36
|
-
imageUrl?: string;
|
|
37
|
-
clipPath?: string;
|
|
38
|
-
readonly?: boolean;
|
|
39
|
-
name?: string;
|
|
40
|
-
format?: string;
|
|
41
|
-
required?: boolean;
|
|
42
|
-
label?: string;
|
|
43
|
-
description?: string;
|
|
44
|
-
default?: string;
|
|
45
|
-
groupLabel?: string;
|
|
46
|
-
groupDescription?: string;
|
|
47
|
-
guid?: string;
|
|
48
|
-
type?: BlockType;
|
|
49
|
-
}
|
|
1
|
+
import { BlockType } from '../enums';
|
|
2
|
+
import { FsBlockComponent } from './../components/block/block.component';
|
|
3
|
+
export declare type Block<T = any> = BlockBase & T;
|
|
4
|
+
export interface BlockBase {
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
top?: number;
|
|
8
|
+
left?: number;
|
|
9
|
+
rotate?: number;
|
|
10
|
+
horizontalAlign?: 'left' | 'right' | 'center';
|
|
11
|
+
verticalAlign?: 'top' | 'center' | 'bottom';
|
|
12
|
+
borderColor?: string;
|
|
13
|
+
borderWidth?: number;
|
|
14
|
+
fontColor?: string;
|
|
15
|
+
fontSize?: number;
|
|
16
|
+
bold?: boolean;
|
|
17
|
+
italic?: boolean;
|
|
18
|
+
underline?: boolean;
|
|
19
|
+
keepRatio?: boolean;
|
|
20
|
+
backgroundColor?: string;
|
|
21
|
+
shapeRadius?: number;
|
|
22
|
+
lineHeight?: number;
|
|
23
|
+
shapeTopRight?: string;
|
|
24
|
+
shapeTopLeft?: string;
|
|
25
|
+
shapeBottomRight?: string;
|
|
26
|
+
shapeBottomLeft?: string;
|
|
27
|
+
padding?: number;
|
|
28
|
+
paddingTop?: number;
|
|
29
|
+
paddingLeft?: number;
|
|
30
|
+
paddingBottom?: number;
|
|
31
|
+
paddingRight?: number;
|
|
32
|
+
content?: string;
|
|
33
|
+
blockComponent?: FsBlockComponent;
|
|
34
|
+
index?: number;
|
|
35
|
+
tabIndex?: number;
|
|
36
|
+
imageUrl?: string;
|
|
37
|
+
clipPath?: string;
|
|
38
|
+
readonly?: boolean;
|
|
39
|
+
name?: string;
|
|
40
|
+
format?: string;
|
|
41
|
+
required?: boolean;
|
|
42
|
+
label?: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
default?: string;
|
|
45
|
+
groupLabel?: string;
|
|
46
|
+
groupDescription?: string;
|
|
47
|
+
guid?: string;
|
|
48
|
+
type?: BlockType;
|
|
49
|
+
}
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { OnDestroy } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { FsFile } from '@firestitch/file';
|
|
4
|
-
import { FsDialog } from '@firestitch/dialog';
|
|
5
|
-
import { BlocksStore } from './blocks-store.service';
|
|
6
|
-
import { Block } from './../interfaces/block';
|
|
7
|
-
import { FsBlockComponent } from '../components/block/block.component';
|
|
8
|
-
import { BlockEditorConfig } from '../interfaces/block-editor-config';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class BlockEditorService implements OnDestroy {
|
|
11
|
-
private _store;
|
|
12
|
-
private _dialog;
|
|
13
|
-
container: any;
|
|
14
|
-
margin: any;
|
|
15
|
-
config: BlockEditorConfig;
|
|
16
|
-
private _selectedBlocks$;
|
|
17
|
-
private _selectionRange;
|
|
18
|
-
private _blockComponents;
|
|
19
|
-
private _destroy$;
|
|
20
|
-
constructor(_store: BlocksStore, _dialog: FsDialog);
|
|
21
|
-
get blockComponents(): FsBlockComponent[];
|
|
22
|
-
get selectedComponentBlocks(): FsBlockComponent[];
|
|
23
|
-
init(config: BlockEditorConfig): void;
|
|
24
|
-
blockAdd(block: Block, newBlock?: boolean): void;
|
|
25
|
-
blockUpload(block: Block, fsFile: FsFile, newBlock?: boolean): void;
|
|
26
|
-
private _updateIndexesFor;
|
|
27
|
-
blockRemove(block: Block): void;
|
|
28
|
-
removeSelectedBlocks(): void;
|
|
29
|
-
get blocks$(): Observable<Block[]>;
|
|
30
|
-
get blockChanged$(): Observable<any>;
|
|
31
|
-
get blockAdded$(): Observable<Block>;
|
|
32
|
-
get blockRemoved$(): Observable<Block>;
|
|
33
|
-
get blocks(): Block[];
|
|
34
|
-
blockChange(block: Block): void;
|
|
35
|
-
isSelectedBlock(block: any): boolean;
|
|
36
|
-
indexOf(block: any): number;
|
|
37
|
-
selectedBlockComponentChangeProperty(value: any, name: any): void;
|
|
38
|
-
get selectedBlocks$(): Observable<Block<any>[]>;
|
|
39
|
-
set selectedBlock(block: Block<any>);
|
|
40
|
-
set selectedBlocks(blocks: Block<any>[]);
|
|
41
|
-
get selectedBlocks(): Block<any>[];
|
|
42
|
-
saveSelection(): void;
|
|
43
|
-
restoreSelection(): void;
|
|
44
|
-
hasSelectionRange(): boolean;
|
|
45
|
-
registerBlock(block: Block, blockComponent: FsBlockComponent): void;
|
|
46
|
-
unregisterBlock(block: Block): void;
|
|
47
|
-
registerContainer(container: any): void;
|
|
48
|
-
registerMargin(margin: any): void;
|
|
49
|
-
openReorderDialog(): void;
|
|
50
|
-
ngOnDestroy(): void;
|
|
51
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BlockEditorService, never>;
|
|
52
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<BlockEditorService>;
|
|
53
|
-
}
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { FsFile } from '@firestitch/file';
|
|
4
|
+
import { FsDialog } from '@firestitch/dialog';
|
|
5
|
+
import { BlocksStore } from './blocks-store.service';
|
|
6
|
+
import { Block } from './../interfaces/block';
|
|
7
|
+
import { FsBlockComponent } from '../components/block/block.component';
|
|
8
|
+
import { BlockEditorConfig } from '../interfaces/block-editor-config';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class BlockEditorService implements OnDestroy {
|
|
11
|
+
private _store;
|
|
12
|
+
private _dialog;
|
|
13
|
+
container: any;
|
|
14
|
+
margin: any;
|
|
15
|
+
config: BlockEditorConfig;
|
|
16
|
+
private _selectedBlocks$;
|
|
17
|
+
private _selectionRange;
|
|
18
|
+
private _blockComponents;
|
|
19
|
+
private _destroy$;
|
|
20
|
+
constructor(_store: BlocksStore, _dialog: FsDialog);
|
|
21
|
+
get blockComponents(): FsBlockComponent[];
|
|
22
|
+
get selectedComponentBlocks(): FsBlockComponent[];
|
|
23
|
+
init(config: BlockEditorConfig): void;
|
|
24
|
+
blockAdd(block: Block, newBlock?: boolean): void;
|
|
25
|
+
blockUpload(block: Block, fsFile: FsFile, newBlock?: boolean): void;
|
|
26
|
+
private _updateIndexesFor;
|
|
27
|
+
blockRemove(block: Block): void;
|
|
28
|
+
removeSelectedBlocks(): void;
|
|
29
|
+
get blocks$(): Observable<Block[]>;
|
|
30
|
+
get blockChanged$(): Observable<any>;
|
|
31
|
+
get blockAdded$(): Observable<Block>;
|
|
32
|
+
get blockRemoved$(): Observable<Block>;
|
|
33
|
+
get blocks(): Block[];
|
|
34
|
+
blockChange(block: Block): void;
|
|
35
|
+
isSelectedBlock(block: any): boolean;
|
|
36
|
+
indexOf(block: any): number;
|
|
37
|
+
selectedBlockComponentChangeProperty(value: any, name: any): void;
|
|
38
|
+
get selectedBlocks$(): Observable<Block<any>[]>;
|
|
39
|
+
set selectedBlock(block: Block<any>);
|
|
40
|
+
set selectedBlocks(blocks: Block<any>[]);
|
|
41
|
+
get selectedBlocks(): Block<any>[];
|
|
42
|
+
saveSelection(): void;
|
|
43
|
+
restoreSelection(): void;
|
|
44
|
+
hasSelectionRange(): boolean;
|
|
45
|
+
registerBlock(block: Block, blockComponent: FsBlockComponent): void;
|
|
46
|
+
unregisterBlock(block: Block): void;
|
|
47
|
+
registerContainer(container: any): void;
|
|
48
|
+
registerMargin(margin: any): void;
|
|
49
|
+
openReorderDialog(): void;
|
|
50
|
+
ngOnDestroy(): void;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlockEditorService, never>;
|
|
52
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BlockEditorService>;
|
|
53
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { OnDestroy } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { FsFile } from '@firestitch/file';
|
|
4
|
-
import { Block } from '../interfaces/block';
|
|
5
|
-
import { BlockEditorConfig } from '../interfaces/block-editor-config';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class BlocksStore implements OnDestroy {
|
|
8
|
-
private _config;
|
|
9
|
-
private _lastTabIndex;
|
|
10
|
-
private _eventBus$;
|
|
11
|
-
private _blocks$;
|
|
12
|
-
private _destroy$;
|
|
13
|
-
get blocks(): Block[];
|
|
14
|
-
get blocks$(): Observable<Block[]>;
|
|
15
|
-
get blockAdded$(): Observable<Block>;
|
|
16
|
-
get blockChanged$(): Observable<Block>;
|
|
17
|
-
get blockRemoved$(): Observable<Block>;
|
|
18
|
-
ngOnDestroy(): void;
|
|
19
|
-
init(config: BlockEditorConfig): void;
|
|
20
|
-
blockExists(block: Block): boolean;
|
|
21
|
-
blockAdd(block: Block, initBlock?: boolean): void;
|
|
22
|
-
blockUpload(block: Block, fsFile: FsFile, initBlock?: boolean): void;
|
|
23
|
-
blockChange(block: Block): void;
|
|
24
|
-
blockRemove(targetBlocks: Block | Block[]): void;
|
|
25
|
-
isReordableBlock(block: Block): boolean;
|
|
26
|
-
updateTabIndex(index: number): void;
|
|
27
|
-
private _setBlocks;
|
|
28
|
-
private _appendBlock;
|
|
29
|
-
private _dispatchEvent;
|
|
30
|
-
private _createBlock;
|
|
31
|
-
private _deduplicateIndexesFor;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BlocksStore, never>;
|
|
33
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<BlocksStore>;
|
|
34
|
-
}
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { FsFile } from '@firestitch/file';
|
|
4
|
+
import { Block } from '../interfaces/block';
|
|
5
|
+
import { BlockEditorConfig } from '../interfaces/block-editor-config';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class BlocksStore implements OnDestroy {
|
|
8
|
+
private _config;
|
|
9
|
+
private _lastTabIndex;
|
|
10
|
+
private _eventBus$;
|
|
11
|
+
private _blocks$;
|
|
12
|
+
private _destroy$;
|
|
13
|
+
get blocks(): Block[];
|
|
14
|
+
get blocks$(): Observable<Block[]>;
|
|
15
|
+
get blockAdded$(): Observable<Block>;
|
|
16
|
+
get blockChanged$(): Observable<Block>;
|
|
17
|
+
get blockRemoved$(): Observable<Block>;
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
init(config: BlockEditorConfig): void;
|
|
20
|
+
blockExists(block: Block): boolean;
|
|
21
|
+
blockAdd(block: Block, initBlock?: boolean): void;
|
|
22
|
+
blockUpload(block: Block, fsFile: FsFile, initBlock?: boolean): void;
|
|
23
|
+
blockChange(block: Block): void;
|
|
24
|
+
blockRemove(targetBlocks: Block | Block[]): void;
|
|
25
|
+
isReordableBlock(block: Block): boolean;
|
|
26
|
+
updateTabIndex(index: number): void;
|
|
27
|
+
private _setBlocks;
|
|
28
|
+
private _appendBlock;
|
|
29
|
+
private _dispatchEvent;
|
|
30
|
+
private _createBlock;
|
|
31
|
+
private _deduplicateIndexesFor;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlocksStore, never>;
|
|
33
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BlocksStore>;
|
|
34
|
+
}
|
package/app/services/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './block-editor.service';
|
|
1
|
+
export * from './block-editor.service';
|