@firestitch/html-editor 12.0.1 → 12.0.4

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.
@@ -30,7 +30,6 @@ export declare class FsHtmlEditorComponent implements OnInit, AfterViewInit, Con
30
30
  hasContent(): boolean;
31
31
  initialize(options?: any): void;
32
32
  private _processImageUpload;
33
- private _getTextNode;
34
33
  uninitializedClick(event: UIEvent): void;
35
34
  updateSize(): void;
36
35
  validate(control: AbstractControl): ValidationErrors | null;
@@ -47,11 +46,13 @@ export declare class FsHtmlEditorComponent implements OnInit, AfterViewInit, Con
47
46
  destroy(): void;
48
47
  private _createConfig;
49
48
  private _change;
49
+ private _initButtons;
50
50
  private _initPlugins;
51
51
  private _createOptions;
52
52
  private _listenLazyInit;
53
53
  private _contentChanged;
54
54
  private _setupFroala;
55
+ private _getTextNode;
55
56
  static ɵfac: i0.ɵɵFactoryDeclaration<FsHtmlEditorComponent, [{ optional: true; }, null, null]>;
56
57
  static ɵcmp: i0.ɵɵComponentDeclaration<FsHtmlEditorComponent, "fs-html-editor", never, { "config": "config"; }, {}, never, never>;
57
58
  }
@@ -1,4 +1,4 @@
1
- export declare const enum DefaultPlugin {
1
+ export declare const enum FroalaPlugin {
2
2
  Align = "align",
3
3
  Colors = "colors",
4
4
  Image = "image",
@@ -10,5 +10,6 @@ export declare const enum DefaultPlugin {
10
10
  Video = "video",
11
11
  Quote = "quote",
12
12
  Draggable = "draggable",
13
- FontSize = "font_size"
13
+ FontSize = "font_size",
14
+ QuickInsert = "quick_insert"
14
15
  }
@@ -1,15 +1,16 @@
1
1
  import { ModuleWithProviders } from '@angular/core';
2
2
  import { FsHtmlEditorConfig } from './interfaces/html-editor-config';
3
- import { DefaultPlugin } from './enums/default-plugin.enum';
3
+ import { FroalaPlugin } from './enums/default-plugin.enum';
4
4
  import * as i0 from "@angular/core";
5
5
  import * as i1 from "./components/html-editor/html-editor.component";
6
6
  import * as i2 from "./components/html-renderer/html-renderer.component";
7
7
  import * as i3 from "@angular/common";
8
8
  import * as i4 from "@firestitch/skeleton";
9
+ import * as i5 from "@firestitch/label";
9
10
  export declare class FsHtmlEditorModule {
10
11
  static forRoot(config?: FsHtmlEditorConfig): ModuleWithProviders<FsHtmlEditorModule>;
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<FsHtmlEditorModule, never>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<FsHtmlEditorModule, [typeof i1.FsHtmlEditorComponent, typeof i2.FsHtmlRendererComponent], [typeof i3.CommonModule, typeof i4.FsSkeletonModule], [typeof i1.FsHtmlEditorComponent, typeof i2.FsHtmlRendererComponent]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FsHtmlEditorModule, [typeof i1.FsHtmlEditorComponent, typeof i2.FsHtmlRendererComponent], [typeof i3.CommonModule, typeof i4.FsSkeletonModule, typeof i5.FsLabelModule], [typeof i1.FsHtmlEditorComponent, typeof i2.FsHtmlRendererComponent]>;
13
14
  static ɵinj: i0.ɵɵInjectorDeclaration<FsHtmlEditorModule>;
14
15
  }
15
16
  export declare function FsHtmlEditorConfigFactory(config: FsHtmlEditorConfig): {
@@ -22,12 +23,21 @@ export declare function FsHtmlEditorConfigFactory(config: FsHtmlEditorConfig): {
22
23
  placeholder?: string;
23
24
  maxLength?: number;
24
25
  autofocus?: boolean;
25
- froalaConfig?: any;
26
26
  disabled?: boolean;
27
27
  activationKey?: any;
28
28
  tooltip?: string;
29
29
  plugins?: import("./classes/plugin").Plugin[];
30
- defaultPlugins: DefaultPlugin[];
30
+ froalaPlugins: FroalaPlugin[];
31
+ froalaConfig?: any;
31
32
  assetsJSPath?: string;
32
33
  assetsCSSPath?: string;
34
+ buttons?: {
35
+ name: string;
36
+ svgKey?: string;
37
+ title?: string;
38
+ focus?: boolean;
39
+ undo?: boolean;
40
+ refreshAfterCallback?: boolean;
41
+ click: (editor: any) => void;
42
+ }[];
33
43
  };
@@ -1,6 +1,6 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { Plugin } from '../classes/plugin';
3
- import { DefaultPlugin } from '../enums/default-plugin.enum';
3
+ import { FroalaPlugin } from '../enums/default-plugin.enum';
4
4
  export interface FsHtmlEditorConfig {
5
5
  image?: FsHtmlEditorUploadConfig;
6
6
  label?: string;
@@ -11,14 +11,23 @@ export interface FsHtmlEditorConfig {
11
11
  placeholder?: string;
12
12
  maxLength?: number;
13
13
  autofocus?: boolean;
14
- froalaConfig?: any;
15
14
  disabled?: boolean;
16
15
  activationKey?: any;
17
16
  tooltip?: string;
18
17
  plugins?: Plugin[];
19
- defaultPlugins?: DefaultPlugin[];
18
+ froalaPlugins?: FroalaPlugin[];
19
+ froalaConfig?: any;
20
20
  assetsJSPath?: string;
21
21
  assetsCSSPath?: string;
22
+ buttons?: {
23
+ name: string;
24
+ svgKey?: string;
25
+ title?: string;
26
+ focus?: boolean;
27
+ undo?: boolean;
28
+ refreshAfterCallback?: boolean;
29
+ click: (editor: any) => void;
30
+ }[];
22
31
  }
23
32
  export interface FsHtmlEditorUploadConfig {
24
33
  width?: number | undefined;
@@ -5,7 +5,7 @@ export declare class FsFroalaLoaderService {
5
5
  private _defaultConfig;
6
6
  private _FroalaEditor;
7
7
  private _froalaLoaded;
8
- private _defaultPluginsLoaded;
8
+ private _froalaPluginsLoaded;
9
9
  private _loaded$;
10
10
  constructor(_defaultConfig: FsHtmlEditorConfig);
11
11
  get loaded$(): Observable<boolean>;
@@ -14,7 +14,7 @@ export declare class FsFroalaLoaderService {
14
14
  private _load;
15
15
  private _loadPlugins;
16
16
  private _froalaDone;
17
- private _defaultPluginsDone;
17
+ private _froalaPluginsDone;
18
18
  static ɵfac: i0.ɵɵFactoryDeclaration<FsFroalaLoaderService, [{ optional: true; }]>;
19
19
  static ɵprov: i0.ɵɵInjectableDeclaration<FsFroalaLoaderService>;
20
20
  }
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@firestitch/skeleton'), require('@angular/forms'), require('@firestitch/file'), require('rxjs'), require('rxjs/operators'), require('lodash-es'), require('@angular/platform-browser'), require('tributejs'), require('@firestitch/common')) :
3
- typeof define === 'function' && define.amd ? define('@firestitch/html-editor', ['exports', '@angular/core', '@angular/common', '@firestitch/skeleton', '@angular/forms', '@firestitch/file', 'rxjs', 'rxjs/operators', 'lodash-es', '@angular/platform-browser', 'tributejs', '@firestitch/common'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["html-editor"] = {}), global.ng.core, global.ng.common, global.i4, global.ng.forms, global.file, global.rxjs, global.rxjs.operators, global.lodashEs, global.ng.platformBrowser, global.Tribute, global.common));
5
- })(this, (function (exports, i0, i3, i4, forms, file, rxjs, operators, lodashEs, i1, Tribute, common) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@firestitch/label'), require('@firestitch/skeleton'), require('@angular/forms'), require('@firestitch/file'), require('rxjs'), require('rxjs/operators'), require('lodash-es'), require('@angular/platform-browser'), require('tributejs'), require('@firestitch/common')) :
3
+ typeof define === 'function' && define.amd ? define('@firestitch/html-editor', ['exports', '@angular/core', '@angular/common', '@firestitch/label', '@firestitch/skeleton', '@angular/forms', '@firestitch/file', 'rxjs', 'rxjs/operators', 'lodash-es', '@angular/platform-browser', 'tributejs', '@firestitch/common'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["html-editor"] = {}), global.ng.core, global.ng.common, global.i2, global.i5, global.ng.forms, global.file, global.rxjs, global.rxjs.operators, global.lodashEs, global.ng.platformBrowser, global.Tribute, global.common));
5
+ })(this, (function (exports, i0, i4, i2, i5, forms, file, rxjs, operators, lodashEs, i1, Tribute, common) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -25,8 +25,9 @@
25
25
  }
26
26
 
27
27
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
29
28
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
29
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
30
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
30
31
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
32
  var Tribute__default = /*#__PURE__*/_interopDefaultLegacy(Tribute);
32
33
 
@@ -405,6 +406,7 @@
405
406
  quote: 'plugins/quote.min.js',
406
407
  draggable: 'plugins/draggable.min.js',
407
408
  font_size: 'plugins/font_size.min.js',
409
+ quick_insert: 'plugins/quick_insert.min.js',
408
410
  };
409
411
  var stylesPaths = {
410
412
  froala: 'froala_editor.pkgd.min.css',
@@ -471,8 +473,8 @@
471
473
  function FsFroalaLoaderService(_defaultConfig) {
472
474
  this._defaultConfig = _defaultConfig;
473
475
  this._froalaLoaded = new rxjs.BehaviorSubject(false);
474
- this._defaultPluginsLoaded = new rxjs.BehaviorSubject(false);
475
- this._loaded$ = rxjs.combineLatest([this._froalaLoaded, this._defaultPluginsLoaded])
476
+ this._froalaPluginsLoaded = new rxjs.BehaviorSubject(false);
477
+ this._loaded$ = rxjs.combineLatest([this._froalaLoaded, this._froalaPluginsLoaded])
476
478
  .pipe(operators.map(function (_a) {
477
479
  var _b = __read(_a, 2), FroalaReady = _b[0], pluginsRead = _b[1];
478
480
  return pluginsRead && FroalaReady;
@@ -496,7 +498,7 @@
496
498
  });
497
499
  Object.defineProperty(FsFroalaLoaderService.prototype, "ready", {
498
500
  get: function () {
499
- return this._froalaLoaded.getValue() && this._defaultPluginsLoaded.getValue();
501
+ return this._froalaLoaded.getValue() && this._froalaPluginsLoaded.getValue();
500
502
  },
501
503
  enumerable: false,
502
504
  configurable: true
@@ -520,13 +522,13 @@
520
522
  }), operators.concatMap(function () {
521
523
  return _this._loadPlugins();
522
524
  }), operators.tap(function () {
523
- _this._defaultPluginsDone();
525
+ _this._froalaPluginsDone();
524
526
  }))
525
527
  .subscribe();
526
528
  };
527
529
  FsFroalaLoaderService.prototype._loadPlugins = function () {
528
530
  var imports = this._defaultConfig
529
- .defaultPlugins
531
+ .froalaPlugins
530
532
  .reduce(function (acc, pluginName) {
531
533
  var import$ = ResourceLoader.loadResource(pluginName);
532
534
  acc.push(import$);
@@ -537,8 +539,8 @@
537
539
  FsFroalaLoaderService.prototype._froalaDone = function () {
538
540
  this._froalaLoaded.next(true);
539
541
  };
540
- FsFroalaLoaderService.prototype._defaultPluginsDone = function () {
541
- this._defaultPluginsLoaded.next(true);
542
+ FsFroalaLoaderService.prototype._froalaPluginsDone = function () {
543
+ this._froalaPluginsLoaded.next(true);
542
544
  };
543
545
  return FsFroalaLoaderService;
544
546
  }());
@@ -656,7 +658,7 @@
656
658
  if (options === void 0) { options = {}; }
657
659
  var config = this._createConfig();
658
660
  this._initPlugins(config);
659
- // this.el.innerHTML = this._html || '';
661
+ this._initButtons(config);
660
662
  this._editor = new this._fr.FroalaEditor(this.el, this._createOptions(), function () {
661
663
  _this._froalaReady$.next({ config: config, options: options });
662
664
  });
@@ -666,21 +668,11 @@
666
668
  var processor = new file.FileProcessor();
667
669
  var file$1 = new file.FsFile(blob);
668
670
  return processor.process([file$1], this.config.image)
669
- .pipe(operators.switchMap(function (_a) {
670
- var _b = __read(_a, 1), f = _b[0];
671
+ .pipe(operators.switchMap(function (_d) {
672
+ var _e = __read(_d, 1), f = _e[0];
671
673
  return _this.config.image.upload(f.file);
672
674
  }));
673
675
  };
674
- FsHtmlEditorComponent.prototype._getTextNode = function (node) {
675
- if (node) {
676
- if (node.nodeType === Node.TEXT_NODE) {
677
- return node;
678
- }
679
- if (node.childNodes) {
680
- return this._getTextNode(node.childNodes[0]);
681
- }
682
- }
683
- };
684
676
  FsHtmlEditorComponent.prototype.uninitializedClick = function (event) {
685
677
  if (!event.defaultPrevented) {
686
678
  var target_1 = event.target;
@@ -778,9 +770,45 @@
778
770
  return lodashEs.merge({ froalaConfig: {} }, this._defaultConfig, this.config);
779
771
  };
780
772
  FsHtmlEditorComponent.prototype._change = function (html) {
781
- // this._html = html;
773
+ this._html = html;
782
774
  this.onChange(html);
783
775
  };
776
+ FsHtmlEditorComponent.prototype._initButtons = function (config) {
777
+ var _this = this;
778
+ (config.buttons || [])
779
+ .forEach(function (button) {
780
+ /*
781
+ Svg Keys:
782
+ ["add", "advancedImageEditor", "alignCenter", "alignJustify", "alignLeft", "alignRight",
783
+ "anchors", "back", "backgroundColor", "blockquote", "bold", "cellBackground",
784
+ "cellBorderColor", "cellOptions", "cellStyle", "clearFormatting", "close", "codeView",
785
+ "cogs", "columns", "editLink", "exitFullscreen", "fontAwesome", "fontFamily",
786
+ "fontSize", "fullscreen", "help", "horizontalLine", "imageAltText", "imageCaption",
787
+ "imageClass", "imageDisplay", "imageManager", "imageSize", "indent", "inlineClass",
788
+ "inlineStyle", "insertEmbed", "insertFile", "insertImage", "insertLink", "insertMore",
789
+ "insertTable", "insertVideo", "upload", "italic", "search", "lineHeight", "linkStyles",
790
+ "mention", "more", "openLink", "orderedList", "outdent", "pageBreaker",
791
+ "paragraphFormat", "paragraphMore", "paragraphStyle", "pdfExport", "print",
792
+ "redo", "removeTable", "remove", "replaceImage", "row", "selectAll", "smile",
793
+ "spellcheck", "star", "strikeThrough", "subscript", "superscript", "symbols", "tags",
794
+ "tableHeader", "tableStyle", "textColor", "textMore", "underline", "undo", "unlink",
795
+ "unorderedList", "verticalAlignBottom", "verticalAlignMiddle", "verticalAlignTop"]
796
+ */
797
+ var _a, _b, _c;
798
+ if (button.svgKey) {
799
+ _this._fr.FroalaEditor.DefineIcon(button.name, { SVG_KEY: button.svgKey });
800
+ }
801
+ _this._fr.FroalaEditor.RegisterCommand(button.name, {
802
+ title: button.title,
803
+ focus: (_a = button.focus) !== null && _a !== void 0 ? _a : true,
804
+ undo: (_b = button.undo) !== null && _b !== void 0 ? _b : true,
805
+ refreshAfterCallback: (_c = button.refreshAfterCallback) !== null && _c !== void 0 ? _c : true,
806
+ callback: function () {
807
+ button.click(this);
808
+ }
809
+ });
810
+ });
811
+ };
784
812
  FsHtmlEditorComponent.prototype._initPlugins = function (config) {
785
813
  var _this = this;
786
814
  (config.plugins || []).forEach(function (plugin) {
@@ -886,8 +914,8 @@
886
914
  };
887
915
  }
888
916
  _this.initialize(options);
889
- }), operators.switchMap(function () { return _this._froalaReady$; }), operators.filter(function (data) { return !!data; }), operators.tap(function (_a) {
890
- var config = _a.config, options = _a.options;
917
+ }), operators.switchMap(function () { return _this._froalaReady$; }), operators.filter(function (data) { return !!data; }), operators.tap(function (_d) {
918
+ var config = _d.config, options = _d.options;
891
919
  _this._setupFroala(config, options);
892
920
  }))
893
921
  .subscribe();
@@ -998,6 +1026,16 @@
998
1026
  this.focus();
999
1027
  }
1000
1028
  };
1029
+ FsHtmlEditorComponent.prototype._getTextNode = function (node) {
1030
+ if (node) {
1031
+ if (node.nodeType === Node.TEXT_NODE) {
1032
+ return node;
1033
+ }
1034
+ if (node.childNodes) {
1035
+ return this._getTextNode(node.childNodes[0]);
1036
+ }
1037
+ }
1038
+ };
1001
1039
  return FsHtmlEditorComponent;
1002
1040
  }());
1003
1041
  FsHtmlEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorComponent, deps: [{ token: FS_HTML_EDITOR_CONFIG, optional: true }, { token: i0__namespace.ChangeDetectorRef }, { token: FsFroalaLoaderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
@@ -1012,7 +1050,7 @@
1012
1050
  useExisting: i0.forwardRef(function () { return FsHtmlEditorComponent; }),
1013
1051
  multi: true
1014
1052
  },
1015
- ], viewQueries: [{ propertyName: "elRef", first: true, predicate: ["elRef"], descendants: true }], ngImport: i0__namespace, template: "<div class=\"fs-html-editor-default\">\n <ng-container *ngIf=\"initialized\">\n <ng-container *fsSkeleton=\"(froalaLoaded$ | async) !== false\">\n </ng-container>\n </ng-container>\n\n <div #elRef></div>\n\n <div class=\"bottom-line\"></div>\n <div class=\"disabled-line\"></div>\n <fs-html-renderer\n *ngIf=\"!initialized\"\n [html]=\"html\"\n (click)=\"uninitializedClick($event)\">\n </fs-html-renderer>\n</div>\n", styles: [":host ::ng-deep .fr-box.fr-basic .fr-wrapper{border:0;border-bottom:1px solid #949494;margin-bottom:1px;background-color:transparent}:host ::ng-deep .fr-box.fr-basic .fr-element{padding:0;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;min-height:auto}:host ::ng-deep .fr-more-toolbar,:host ::ng-deep .fr-toolbar,:host ::ng-deep .fr-dropdown:after,:host ::ng-deep .fr-dropdown-menu .fr-dropdown-wrapper{transition:none!important}:host ::ng-deep .fr-toolbar.fr-top{position:sticky;z-index:2;border-radius:0;background-color:#fff}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp{margin:0 20px 0 0}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(1):after,:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(2):after{content:\"\";position:absolute;top:9px;height:30px;border-left:1px solid #e5e5e5;margin-left:10px}:host ::ng-deep .fr-toolbar.fr-top div:first-of-type:before{border:none}:host ::ng-deep .fr-toolbar.fr-top.fr-toolbar-open .fr-newline{height:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:first-child{margin-left:0}:host ::ng-deep .fr-toolbar.fr-top.fr-top{border:0}:host ::ng-deep .fr-toolbar.fr-top .fr-newline{margin:0}:host ::ng-deep .fr-toolbar.fr-top .fr-more-toolbar{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown:after{right:3px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown.fr-selection span{margin-right:24px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-open{border-radius:4px;margin:4px 2px}:host ::ng-deep .fr-view ol,:host ::ng-deep .fr-view ul{list-style-position:unset}:host.disabled ::ng-deep .fr-box.fr-basic{opacity:.5;pointer-events:none}:host.disabled ::ng-deep .fr-box.fr-basic .fr-wrapper{border:none}:host.disabled ::ng-deep .disabled-line{display:block}::ng-deep .fr-popup{z-index:1001!important}::ng-deep .fr-video-by-url-layer .fr-checkbox-line{display:none}.disabled-line{display:none;position:absolute;bottom:-1px;z-index:1;background-image:linear-gradient(90deg,rgba(0,0,0,.42) 0,rgba(0,0,0,.42) 33%,transparent 0);background-size:4px 100%;background-repeat:repeat-x;height:1px;width:100%}.bottom-line{opacity:0;transform-origin:50%;transform:scaleX(.5);transition:background-color .3s cubic-bezier(.55,0,.55,.2);width:100%;border-bottom:2px solid #949494;position:absolute;bottom:-1px;z-index:1}:host{position:relative;display:block}:host.focused .bottom-line{opacity:1;display:block;transform:scaleX(1);transition:transform .3s cubic-bezier(.25,.8,.25,1),opacity .1s cubic-bezier(.25,.8,.25,1),background-color .3s cubic-bezier(.25,.8,.25,1)}::ng-deep .fs-html-editor-mention-container{position:absolute;top:0;left:0;height:auto;max-height:300px;max-width:500px;overflow:auto;display:block;z-index:999999;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;border-bottom-left-radius:4px;border-bottom-right-radius:4px;background:#fff}::ng-deep .fs-html-editor-mention-container ul{margin:0;padding:0;list-style:none}::ng-deep .fs-html-editor-mention-container li{padding:0 16px;cursor:pointer;line-height:48px}::ng-deep .fs-html-editor-mention-container li.highlight,::ng-deep .fs-html-editor-mention-container li:hover{background:#F5F5F5}::ng-deep .fs-html-editor-mention-container li.no-match{cursor:default}\n"], components: [{ type: FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: ["html"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }], pipes: { "async": i3__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1053
+ ], viewQueries: [{ propertyName: "elRef", first: true, predicate: ["elRef"], descendants: true }], ngImport: i0__namespace, template: "<fs-label-field>\n <fs-label *ngIf=\"config.label\">{{config.label}}</fs-label>\n <div class=\"fs-html-editor-default\">\n <ng-container *ngIf=\"initialized\">\n <ng-container *fsSkeleton=\"(froalaLoaded$ | async) !== false\">\n </ng-container>\n </ng-container>\n \n <div #elRef></div>\n \n <div class=\"bottom-line\"></div>\n <div class=\"disabled-line\"></div>\n <fs-html-renderer\n *ngIf=\"!initialized\"\n [html]=\"html\"\n (click)=\"uninitializedClick($event)\">\n </fs-html-renderer>\n </div>\n \n <fs-label-message>\n <div class=\"fs-form-message\"></div>\n </fs-label-message>\n</fs-label-field>\n", styles: [":host ::ng-deep .fr-box.fr-basic .fr-wrapper{border:0;border-bottom:1px solid #949494;margin-bottom:1px;background-color:transparent}:host ::ng-deep .fr-box.fr-basic .fr-element{padding:0;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;min-height:auto}:host ::ng-deep .fr-more-toolbar,:host ::ng-deep .fr-toolbar,:host ::ng-deep .fr-dropdown:after,:host ::ng-deep .fr-dropdown-menu .fr-dropdown-wrapper{transition:none!important}:host ::ng-deep .fr-toolbar.fr-top{position:sticky;z-index:2;border-radius:0;background-color:#fff}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp{margin:0 20px 0 0}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(1):after,:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(2):after{content:\"\";position:absolute;top:9px;height:30px;border-left:1px solid #e5e5e5;margin-left:10px}:host ::ng-deep .fr-toolbar.fr-top div:first-of-type:before{border:none}:host ::ng-deep .fr-toolbar.fr-top.fr-toolbar-open .fr-newline{height:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:first-child{margin-left:0}:host ::ng-deep .fr-toolbar.fr-top.fr-top{border:0}:host ::ng-deep .fr-toolbar.fr-top .fr-newline{margin:0}:host ::ng-deep .fr-toolbar.fr-top .fr-more-toolbar{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown:after{right:3px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown.fr-selection span{margin-right:24px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-open{border-radius:4px;margin:4px 2px}:host ::ng-deep .fr-view ol,:host ::ng-deep .fr-view ul{list-style-position:unset}:host.disabled ::ng-deep .fr-box.fr-basic{opacity:.5;pointer-events:none}:host.disabled ::ng-deep .fr-box.fr-basic .fr-wrapper{border:none}:host.disabled ::ng-deep .disabled-line{display:block}::ng-deep .fr-popup{z-index:1001!important}::ng-deep .fr-video-by-url-layer .fr-checkbox-line{display:none}.disabled-line{display:none;position:absolute;bottom:-1px;z-index:1;background-image:linear-gradient(90deg,rgba(0,0,0,.42) 0,rgba(0,0,0,.42) 33%,transparent 0);background-size:4px 100%;background-repeat:repeat-x;height:1px;width:100%}.bottom-line{opacity:0;transform-origin:50%;transform:scaleX(.5);transition:background-color .3s cubic-bezier(.55,0,.55,.2);width:100%;border-bottom:2px solid #949494;position:absolute;bottom:-1px;z-index:1}:host{position:relative;display:block}:host.focused .bottom-line{opacity:1;display:block;transform:scaleX(1);transition:transform .3s cubic-bezier(.25,.8,.25,1),opacity .1s cubic-bezier(.25,.8,.25,1),background-color .3s cubic-bezier(.25,.8,.25,1)}::ng-deep .fs-html-editor-mention-container{position:absolute;top:0;left:0;height:auto;max-height:300px;max-width:500px;overflow:auto;display:block;z-index:999999;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;border-bottom-left-radius:4px;border-bottom-right-radius:4px;background:#fff}::ng-deep .fs-html-editor-mention-container ul{margin:0;padding:0;list-style:none}::ng-deep .fs-html-editor-mention-container li{padding:0 16px;cursor:pointer;line-height:48px}::ng-deep .fs-html-editor-mention-container li.highlight,::ng-deep .fs-html-editor-mention-container li:hover{background:#F5F5F5}::ng-deep .fs-html-editor-mention-container li.no-match{cursor:default}\n"], components: [{ type: i2__namespace.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i2__namespace.FsLabelComponent, selector: "fs-label" }, { type: FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: ["html"] }, { type: i2__namespace.FsLabelMessageComponent, selector: "fs-label-message" }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1016
1054
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorComponent, decorators: [{
1017
1055
  type: i0.Component,
1018
1056
  args: [{
@@ -1074,19 +1112,22 @@
1074
1112
  }());
1075
1113
  FsHtmlEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1076
1114
  FsHtmlEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, declarations: [FsHtmlEditorComponent,
1077
- FsHtmlRendererComponent], imports: [i3.CommonModule,
1078
- i4.FsSkeletonModule], exports: [FsHtmlEditorComponent,
1115
+ FsHtmlRendererComponent], imports: [i4.CommonModule,
1116
+ i5.FsSkeletonModule,
1117
+ i2.FsLabelModule], exports: [FsHtmlEditorComponent,
1079
1118
  FsHtmlRendererComponent] });
1080
1119
  FsHtmlEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, imports: [[
1081
- i3.CommonModule,
1082
- i4.FsSkeletonModule,
1120
+ i4.CommonModule,
1121
+ i5.FsSkeletonModule,
1122
+ i2.FsLabelModule,
1083
1123
  ]] });
1084
1124
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, decorators: [{
1085
1125
  type: i0.NgModule,
1086
1126
  args: [{
1087
1127
  imports: [
1088
- i3.CommonModule,
1089
- i4.FsSkeletonModule,
1128
+ i4.CommonModule,
1129
+ i5.FsSkeletonModule,
1130
+ i2.FsLabelModule,
1090
1131
  ],
1091
1132
  exports: [
1092
1133
  FsHtmlEditorComponent,
@@ -1099,7 +1140,7 @@
1099
1140
  }]
1100
1141
  }] });
1101
1142
  function FsHtmlEditorConfigFactory(config) {
1102
- return Object.assign({ defaultPlugins: [
1143
+ return Object.assign({ froalaPlugins: [
1103
1144
  "align" /* Align */,
1104
1145
  "colors" /* Colors */,
1105
1146
  "image" /* Image */,