@firestitch/block-editor 12.3.0 → 12.3.2
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/sidebar/sidebar.component.d.ts +1 -1
- package/app/interfaces/block-editor-config.d.ts +0 -1
- package/app/interfaces/block.d.ts +2 -0
- package/bundles/firestitch-block-editor.umd.js +9 -9
- package/bundles/firestitch-block-editor.umd.js.map +1 -1
- package/esm2015/app/components/block/block.component.js +9 -9
- package/esm2015/app/components/sidebar/sidebar.component.js +2 -2
- package/esm2015/app/interfaces/block-editor-config.js +1 -1
- package/esm2015/app/interfaces/block.js +1 -1
- package/fesm2015/firestitch-block-editor.js +9 -9
- package/fesm2015/firestitch-block-editor.js.map +1 -1
- package/package.json +3 -2
|
@@ -560,11 +560,6 @@ class FsBlockComponent {
|
|
|
560
560
|
this.unit = this._blockEditor.config.unit;
|
|
561
561
|
this.content = this.block.content;
|
|
562
562
|
this.block.shadowOpacity = this.block.shadowOpacity || 100;
|
|
563
|
-
this._blockEditor.blockInited$
|
|
564
|
-
.pipe(takeUntil(this._destroy$))
|
|
565
|
-
.subscribe(() => {
|
|
566
|
-
this._updateElementGuidelines();
|
|
567
|
-
});
|
|
568
563
|
this._blockEditor.blockChanged$
|
|
569
564
|
.pipe(filter((block) => block === this.block), takeUntil(this._destroy$))
|
|
570
565
|
.subscribe((block) => {
|
|
@@ -574,6 +569,7 @@ class FsBlockComponent {
|
|
|
574
569
|
this.top = block.top;
|
|
575
570
|
this.left = block.left;
|
|
576
571
|
this.rotate = this.block.rotate;
|
|
572
|
+
this.clippable = this.block.clippable;
|
|
577
573
|
this._cdRef.markForCheck();
|
|
578
574
|
});
|
|
579
575
|
}
|
|
@@ -588,6 +584,11 @@ class FsBlockComponent {
|
|
|
588
584
|
this.left = this.block.left;
|
|
589
585
|
this.rotate = this.block.rotate;
|
|
590
586
|
this._blockEditor.initBlock(this.block, this);
|
|
587
|
+
this._blockEditor.blockInited$
|
|
588
|
+
.pipe(takeUntil(this._destroy$))
|
|
589
|
+
.subscribe(() => {
|
|
590
|
+
this._updateElementGuidelines();
|
|
591
|
+
});
|
|
591
592
|
});
|
|
592
593
|
}
|
|
593
594
|
pxToIn(px) {
|
|
@@ -667,8 +668,7 @@ class FsBlockComponent {
|
|
|
667
668
|
this.block.clipPath = e.clipStyle;
|
|
668
669
|
e.target.style.clipPath = e.clipStyle;
|
|
669
670
|
this._triggerChanged();
|
|
670
|
-
})
|
|
671
|
-
this.moveable
|
|
671
|
+
})
|
|
672
672
|
.on('dragStart', () => {
|
|
673
673
|
this.disableContentEdit();
|
|
674
674
|
this.transformating = true;
|
|
@@ -788,7 +788,7 @@ class FsBlockComponent {
|
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
FsBlockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsBlockComponent, deps: [{ token: BlockEditorService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
791
|
-
FsBlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsBlockComponent, selector: "fs-block", inputs: { block: "block", html: "html", zoompan: "zoompan" }, host: { properties: { "class.transforming": "this.transformating" } }, viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, static: true }, { propertyName: "contentElement", first: true, predicate: ["contentElement"], descendants: true, static: true }, { propertyName: "contentEditable", first: true, predicate: ["contentEditable"], descendants: true, static: true }], ngImport: i0, template: "<div\n #element\n [class]=\"'block ' + 'block-' + block.type\"\n [ngClass]=\"{ \n editable: editable, \n readonly: block.readonly,\n required: block.required\n }\">\n <div\n #contentElement\n class=\"content\"\n [style.
|
|
791
|
+
FsBlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsBlockComponent, selector: "fs-block", inputs: { block: "block", html: "html", zoompan: "zoompan" }, host: { properties: { "class.transforming": "this.transformating" } }, viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, static: true }, { propertyName: "contentElement", first: true, predicate: ["contentElement"], descendants: true, static: true }, { propertyName: "contentEditable", first: true, predicate: ["contentEditable"], descendants: true, static: true }], ngImport: i0, template: "<div\n #element\n [class]=\"'block ' + 'block-' + block.type\"\n [ngClass]=\"{ \n editable: editable, \n readonly: block.readonly,\n required: block.required\n }\"\n [style.zIndex]=\"block.index\">\n <div\n #contentElement\n class=\"content\"\n [style.borderColor]=\"block.borderColor\"\n [style.borderWidth]=\"block.borderWidth ? block.borderWidth + 'pt' : ''\"\n [style.borderStyle]=\"block.borderColor ? 'solid' : 'dashed'\"\n [style.textAlign]=\"block.horizontalAlign\"\n [style.fontStyle]=\"block.italic ? 'italic' : ''\"\n [style.fontFamily]=\"block.fontFamily || ''\"\n [style.fontSize]=\"block.fontSize ? block.fontSize + 'pt' : ''\"\n [style.lineHeight]=\"block.lineHeight ? block.lineHeight + 'pt' : ''\"\n [style.color]=\"block.fontColor\"\n [style.fontWeight]=\"block.bold ? 'bold' : ''\"\n [style.textDecoration]=\"block.underline ? 'underline' : ''\"\n [style.paddingTop]=\"block.paddingTop ? block.paddingTop + 'pt' : ''\"\n [style.paddingBottom]=\"block.paddingBottom ? block.paddingBottom + 'pt' : ''\"\n [style.paddingLeft]=\"block.paddingLeft ? block.paddingLeft + 'pt' : ''\"\n [style.paddingRight]=\"block.paddingRight ? block.paddingRight + 'pt' : ''\"\n [style.clipPath]=\"block.clipPath\"\n [style.backgroundColor]=\"block.backgroundColor\"\n [style.borderBottomLeftRadius]=\"block.shapeRadius && block.shapeBottomLeft === 'round' ? block.shapeRadius + 'pt' : ''\"\n [style.borderBottomRightRadius]=\"block.shapeRadius && block.shapeBottomRight === 'round' ? block.shapeRadius + 'pt' : ''\"\n [style.borderTopRightRadius]=\"block.shapeRadius && block.shapeTopRight === 'round' ? block.shapeRadius + 'pt' : ''\"\n [style.borderTopLeftRadius]=\"block.shapeRadius && block.shapeTopLeft === 'round' ? block.shapeRadius + 'pt' : ''\"\n [style.boxShadow]=\"boxShadow\"\n [ngClass]=\"{\n 'editable': editable,\n 'vertical-align-center': block.verticalAlign === 'center',\n 'vertical-align-bottom': block.verticalAlign === 'bottom'\n }\">\n <ng-container [ngSwitch]=\"block.type\">\n <ng-container *ngSwitchCase=\"BlockType.Pdf\">\n <img [src]=\"block.imageUrl\">\n </ng-container>\n <img [src]=\"block.imageUrl\" *ngIf=\"block.imageUrl\">\n </ng-container>\n <ng-container *ngIf=\"block.type === BlockType.LongText || block.type === BlockType.ShortText || block.type === BlockType.RadioButton || block.type === BlockType.Checkbox || block.type === BlockType.Date\">\n {{block.label || block.name}}\n </ng-container>\n <div\n #contentEditable\n [contentEditable]=\"editable\"\n class=\"content-editable\"\n [innerHTML]=\"content\">\n </div>\n </div>\n</div>\n", styles: [":host ::ng-deep .moveable-control{width:10px!important;height:10px!important;margin-top:-5px!important;margin-left:-5px!important}:host.transforming ::ng-deep .moveable-control,:host.transforming ::ng-deep .moveable-rotation{display:none}.block{position:absolute;display:block;outline:none;-webkit-user-select:none;user-select:none;cursor:pointer}.block.block-shorttext,.block.block-longtext,.block.block-date,.block.block-radiobutton,.block.block-signature,.block.block-checkbox{background-color:#aab5e1cc;color:#585555;font-size:12px}.block.block-radiobutton{border-radius:50%}.block.required{background-color:#f7adaa}.block .content-editable{outline:none;position:relative}.block.editable .content-editable{cursor:text}.block .content{flex-direction:column;height:100%;display:flex;border:0px solid transparent;position:relative;box-sizing:border-box;overflow:hidden}.block .content fs-html-editor{width:100%}.block .content.vertical-align-center{justify-content:center}.block .content.vertical-align-bottom{justify-content:flex-end}.block .content img{width:100%;height:100%;position:absolute}:host ::ng-deep fs-html-editor .bottom-line,:host ::ng-deep fs-html-editor .fr-toolbar{display:none!important}:host ::ng-deep fs-html-editor .fr-wrapper{background:none!important;border:none!important}:host ::ng-deep .moveable-line:not(.moveable-rotation-line):not(.moveable-guideline){background:transparent!important}\n"], directives: [{ type: i13.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i13.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i13.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i13.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
792
792
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsBlockComponent, decorators: [{
|
|
793
793
|
type: Component,
|
|
794
794
|
args: [{
|
|
@@ -883,6 +883,7 @@ class SidebarComponent {
|
|
|
883
883
|
this.BlockTypes = BlockTypes;
|
|
884
884
|
this.blockTypeNames = index(BlockTypes, 'value', 'name');
|
|
885
885
|
this.blockTypeIcons = index(BlockTypes, 'value', 'icon');
|
|
886
|
+
this.clippable = false;
|
|
886
887
|
this.BlockType = BlockType;
|
|
887
888
|
this.formats = [];
|
|
888
889
|
this._destroy$ = new Subject();
|
|
@@ -900,7 +901,6 @@ class SidebarComponent {
|
|
|
900
901
|
this._blockEditor.selectedBlocks$
|
|
901
902
|
.pipe(takeUntil(this._destroy$))
|
|
902
903
|
.subscribe((blocks) => {
|
|
903
|
-
this.clippable = false;
|
|
904
904
|
this.block = blocks[0] ? blocks[0] : null;
|
|
905
905
|
this.formats = BlockFormats
|
|
906
906
|
.filter((blockFormat) => { var _a; return (blockFormat.blockTypes.indexOf((_a = this.block) === null || _a === void 0 ? void 0 : _a.type) !== -1); });
|