@worktile/theia 16.3.8 → 16.3.9

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.
@@ -4819,12 +4819,13 @@ class TheContextService {
4819
4819
  this.bindWindowResize();
4820
4820
  }
4821
4821
  getScrollContainer() {
4822
- return (this.options.nativeElement.closest(this.options.theOptions?.scrollContainer) ||
4823
- this.options.nativeElement.querySelector(this.options.theOptions?.scrollContainer));
4822
+ const { scrollContainer } = this.options.editor?.options;
4823
+ return this.options.nativeElement.closest(scrollContainer) || this.options.nativeElement.querySelector(scrollContainer);
4824
4824
  }
4825
4825
  rebindContainerScroll() {
4826
4826
  this.scrollSubscription?.unsubscribe();
4827
- if (this.options.theOptions?.scrollContainer) {
4827
+ const { scrollContainer } = this.options.editor?.options;
4828
+ if (scrollContainer) {
4828
4829
  const containerElement = this.getScrollContainer();
4829
4830
  if (containerElement) {
4830
4831
  this.ngZone.runOutsideAngular(() => {
@@ -4882,11 +4883,8 @@ class TheContextService {
4882
4883
  }
4883
4884
  return this.options;
4884
4885
  }
4885
- getTheOptions() {
4886
- return this.options.theOptions;
4887
- }
4888
4886
  getDefaultFontSize() {
4889
- return this.options.theOptions?.fontSize || FontSizes.fontSize14;
4887
+ return this.options.editor?.options?.fontSize || FontSizes.fontSize14;
4890
4888
  }
4891
4889
  getEditableElement() {
4892
4890
  return this.options.nativeElement.querySelector('.the-editor-typo');
@@ -6239,13 +6237,10 @@ const QuickInsertEditor = {
6239
6237
  const overlay = editor.injector.get(Overlay);
6240
6238
  const viewContainerRef = editor.injector.get(ViewContainerRef);
6241
6239
  const thyPopover = editor.injector.get(ThyPopover);
6242
- const thePresetConfig = editor.injector.get(THE_PRESET_CONFIG_TOKEN);
6243
- const presetPluginMenus = thePresetConfig?.options?.menu;
6244
- const pluginMenus = editor.options?.menu ?? presetPluginMenus;
6245
6240
  const pluginMenuRef = thyPopover.open(ThePluginMenuComponent, {
6246
6241
  initialState: {
6247
6242
  editor,
6248
- thePluginMenu: pluginMenus
6243
+ thePluginMenu: editor?.options?.menu
6249
6244
  },
6250
6245
  origin,
6251
6246
  viewContainerRef: viewContainerRef,
@@ -6954,8 +6949,7 @@ const AlignEditor = {
6954
6949
  return false;
6955
6950
  },
6956
6951
  isDisabled(editor) {
6957
- const contextService = editor?.injector?.get(TheContextService);
6958
- const { theOptions: { richMedia } } = contextService.getOptions();
6952
+ const { richMedia } = editor.options;
6959
6953
  return getToolbarItemDisabled(editor, PluginKeys.align, richMedia ? [ElementKinds.image] : []);
6960
6954
  },
6961
6955
  setAlign(editor, alignment) {
@@ -9282,11 +9276,11 @@ class TheImageComponent extends TheBaseElementComponent {
9282
9276
  }, { at: this.selection });
9283
9277
  }
9284
9278
  }
9285
- cancelUpload(event) {
9279
+ cancelUpload() {
9286
9280
  Transforms.removeNodes(this.editor, { at: this.selection });
9287
9281
  }
9288
9282
  isShouldOpen() {
9289
- const { theOptions: { richMedia } } = this.theContextService.getOptions();
9283
+ const { richMedia } = this.editor?.options;
9290
9284
  return (!this?.readonly &&
9291
9285
  richMedia &&
9292
9286
  this.isCollapsedAndNonReadonly &&
@@ -16274,14 +16268,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
16274
16268
  }] } });
16275
16269
 
16276
16270
  class TheEditorComponent {
16271
+ get options() {
16272
+ return this.editor?.options;
16273
+ }
16277
16274
  get theGlobalToolbarInstance() {
16278
16275
  return this.theGlobalToolbar ? this.theGlobalToolbar : this.globalToolbarInstance;
16279
16276
  }
16280
16277
  get maxHeight() {
16281
- return this.theOptions?.maxHeight ? `${this.theOptions?.maxHeight}px` : null;
16282
- }
16283
- get inlineToolbarVisible() {
16284
- return this.theOptions?.inlineToolbarVisible ?? this.presetConfig?.options?.inlineToolbarVisible;
16278
+ return this.options?.maxHeight ? `${this.options?.maxHeight}px` : null;
16285
16279
  }
16286
16280
  constructor(cdr, destroyRef, elementRef, injector, ngZone, viewContainerRef, theContextService, iconRegistry, presetConfig) {
16287
16281
  this.cdr = cdr;
@@ -16303,7 +16297,7 @@ class TheEditorComponent {
16303
16297
  this.onChangeCallback = () => { };
16304
16298
  this.onTouchedCallback = () => { };
16305
16299
  this.scrollSelectionIntoView = (e, domRange) => {
16306
- const { neededScrollIntoView } = this.theOptions;
16300
+ const { neededScrollIntoView } = e.options;
16307
16301
  if (neededScrollIntoView && !neededScrollIntoView(this.editor)) {
16308
16302
  return;
16309
16303
  }
@@ -16411,6 +16405,9 @@ class TheEditorComponent {
16411
16405
  }
16412
16406
  ngOnChanges(changes) {
16413
16407
  const options = changes.theOptions;
16408
+ if (options && !options.firstChange) {
16409
+ this.initializeOptions(options.currentValue);
16410
+ }
16414
16411
  if (options && !options.firstChange && !isEqual(options.currentValue?.toolbar, options.previousValue?.toolbar)) {
16415
16412
  this.toolbarCalculate();
16416
16413
  }
@@ -16430,13 +16427,10 @@ class TheEditorComponent {
16430
16427
  initialize() {
16431
16428
  const plugins = this.getPlugins();
16432
16429
  this.editor = withTheia(withHistory(withAngular(createEditor(), CLIPBOARD_FORMAT_KEY)), plugins);
16433
- this.editor.options = this.theOptions;
16434
- this.editor.disabled = this.theOptions?.disabled;
16435
- this.editor.extraElementOptions = this.theOptions?.extraElementOptions;
16436
16430
  setEditorUUID(this.editor, idCreator());
16437
16431
  this.initializeMobileMode();
16432
+ this.initializeOptions(this.theOptions);
16438
16433
  this.initializeContext();
16439
- this.initializeOptions();
16440
16434
  this.toolbarCalculate();
16441
16435
  this.initializeQuickInsert();
16442
16436
  this.initializeEvents();
@@ -16450,6 +16444,39 @@ class TheEditorComponent {
16450
16444
  this.applyAutoFocus();
16451
16445
  });
16452
16446
  }
16447
+ initializeOptions(theOptions) {
16448
+ const presetMode = this.presetConfig?.options?.mode;
16449
+ const presetInlineToolbarVisible = this.presetConfig?.options?.inlineToolbarVisible;
16450
+ const presetMenu = this.presetConfig?.options?.menu;
16451
+ const presetToolbarAlign = this.presetConfig?.options?.toolbar?.align;
16452
+ const presetGlobalToolbar = this.presetConfig?.options?.toolbar?.global;
16453
+ const presetInlineToolbar = this.presetConfig?.options?.toolbar?.inline;
16454
+ const optionsGlobalToolbar = theOptions?.toolbar?.global;
16455
+ const optionsInlineToolbar = theOptions?.toolbar?.inline;
16456
+ const options = {
16457
+ readonly: false,
16458
+ neededScrollIntoView: () => true,
16459
+ ...theOptions,
16460
+ mode: theOptions?.mode ?? presetMode ?? TheDataMode.html,
16461
+ inlineToolbarVisible: theOptions?.inlineToolbarVisible ?? presetInlineToolbarVisible,
16462
+ menu: theOptions?.menu ?? presetMenu ?? DefaultPluginMenu,
16463
+ toolbar: {
16464
+ align: theOptions?.toolbar?.align ?? presetToolbarAlign,
16465
+ global: optionsGlobalToolbar ?? presetGlobalToolbar ?? DefaultGlobalToolbarDefinition,
16466
+ inline: optionsInlineToolbar ?? presetInlineToolbar ?? DefaultInlineToolbarDefinition
16467
+ }
16468
+ };
16469
+ this.editor.options = options;
16470
+ this.editor.disabled = theOptions?.disabled;
16471
+ this.editor.extraElementOptions = options?.extraElementOptions;
16472
+ }
16473
+ initializeContext() {
16474
+ this.theContextService.initialize({
16475
+ editor: this.editor,
16476
+ nativeElement: this.elementRef.nativeElement,
16477
+ viewContainerRef: this.viewContainerRef
16478
+ });
16479
+ }
16453
16480
  getPlugins() {
16454
16481
  const defaultPlugins = internalPlugins();
16455
16482
  const presetPlugins = this.presetConfig?.plugins ?? [];
@@ -16461,12 +16488,8 @@ class TheEditorComponent {
16461
16488
  this.isMobileMode = modeConfig && modeConfig.mode === TheMode.mobile;
16462
16489
  }
16463
16490
  toolbarCalculate() {
16464
- const optionsGlobalToolbar = this.theOptions?.toolbar?.global;
16465
- const optionsInlineToolbar = this.theOptions?.toolbar?.inline;
16466
- const presetGlobalToolbar = this.presetConfig?.options?.toolbar?.global;
16467
- const presetInlineToolbar = this.presetConfig?.options?.toolbar?.inline;
16468
- const globalToolbar = optionsGlobalToolbar ?? presetGlobalToolbar;
16469
- const inlineToolbar = optionsInlineToolbar ?? presetInlineToolbar;
16491
+ const globalToolbar = this.options?.toolbar.global;
16492
+ const inlineToolbar = this.options?.toolbar?.inline;
16470
16493
  const { globalToolbarClass, toolbarEntity } = createToolbar(this.editor, globalToolbar, inlineToolbar);
16471
16494
  this.globalToolbarClass = globalToolbarClass;
16472
16495
  this.toolbarEntity = toolbarEntity;
@@ -16476,35 +16499,11 @@ class TheEditorComponent {
16476
16499
  this.theGlobalToolbarInstance.editor = this.editor;
16477
16500
  this.theGlobalToolbarInstance.toolbarItems = this.toolbarEntity.global;
16478
16501
  this.theGlobalToolbarInstance.containerClass = this.globalToolbarClass;
16479
- this.theGlobalToolbarInstance.align = this?.theOptions?.toolbar?.align;
16502
+ this.theGlobalToolbarInstance.align = this.options?.toolbar?.align;
16480
16503
  this.theGlobalToolbarInstance.setToolbarClass();
16481
16504
  this.theGlobalToolbarInstance.renderToolbarView();
16482
16505
  }
16483
16506
  }
16484
- initializeContext() {
16485
- this.theContextService.initialize({
16486
- theOptions: this.theOptions,
16487
- nativeElement: this.elementRef.nativeElement,
16488
- viewContainerRef: this.viewContainerRef
16489
- });
16490
- }
16491
- initializeOptions() {
16492
- const presetMode = this.presetConfig?.options?.mode;
16493
- const defaultMode = this.theOptions?.mode ?? presetMode ?? TheDataMode.html;
16494
- if (!this.theOptions) {
16495
- this.theOptions = {
16496
- readonly: false,
16497
- mode: defaultMode,
16498
- neededScrollIntoView: () => true
16499
- };
16500
- }
16501
- if (!this.theOptions.mode) {
16502
- this.theOptions = {
16503
- ...this.theOptions,
16504
- mode: defaultMode
16505
- };
16506
- }
16507
- }
16508
16507
  initializeQuickInsert() {
16509
16508
  const quickInsertPlugin = getPluginOptions(this.editor, PluginKeys.quickInsert);
16510
16509
  if (quickInsertPlugin.disabled || quickInsertPlugin.disabledPlus) {
@@ -16533,17 +16532,17 @@ class TheEditorComponent {
16533
16532
  });
16534
16533
  }
16535
16534
  applyAutoFocus() {
16536
- if (!this.theOptions?.disabled && !this.theOptions?.readonly) {
16537
- autoFocus(this.editor, this.theOptions?.autoFocus);
16535
+ if (!this.options?.disabled && !this.options?.readonly) {
16536
+ autoFocus(this.editor, this.options?.autoFocus);
16538
16537
  }
16539
16538
  }
16540
16539
  writeValue(value) {
16541
- const data = dataDeserialize(this.theOptions?.mode, value);
16540
+ const data = dataDeserialize(this.options?.mode, value);
16542
16541
  // data-deserialize
16543
16542
  this.editorValue = data;
16544
16543
  this.cdr.markForCheck();
16545
16544
  setTimeout(() => {
16546
- if (!this.theOptions.readonly && AngularEditor.isFocused(this.editor) && this.editor.selection) {
16545
+ if (!this.options.readonly && AngularEditor.isFocused(this.editor) && this.editor.selection) {
16547
16546
  const selection = this.editor.selection;
16548
16547
  Transforms.deselect(this.editor);
16549
16548
  Transforms.select(this.editor, selection);
@@ -16567,14 +16566,15 @@ class TheEditorComponent {
16567
16566
  this.onChangeCallback(newValue);
16568
16567
  }
16569
16568
  serializingValue(value) {
16570
- if (this.theOptions?.mode === TheDataMode.html) {
16569
+ const mode = this.options?.mode;
16570
+ if (mode === TheDataMode.html) {
16571
16571
  let htmlValue = '';
16572
16572
  const isEmptyContent$1 = isEmptyContent(value);
16573
16573
  value.forEach((element) => {
16574
16574
  let elementHtml = this.elementToHtml.get(element);
16575
16575
  if (elementHtml === undefined) {
16576
16576
  // serializing
16577
- elementHtml = dataSerializing(this.theOptions?.mode, [element]);
16577
+ elementHtml = dataSerializing(mode, [element]);
16578
16578
  htmlValue += elementHtml;
16579
16579
  this.elementToHtml.set(element, elementHtml);
16580
16580
  return;
@@ -16671,14 +16671,14 @@ class TheEditorComponent {
16671
16671
  };
16672
16672
  }
16673
16673
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TheEditorComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.DestroyRef }, { token: i0.ElementRef }, { token: i0.Injector }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: TheContextService }, { token: i4.ThyIconRegistry }, { token: THE_PRESET_CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
16674
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TheEditorComponent, selector: "the-editor, theEditor", inputs: { theOptions: "theOptions", thePlugins: "thePlugins", theGlobalToolbar: "theGlobalToolbar", theDecorate: "theDecorate", theOnError: "theOnError" }, outputs: { theOnSave: "theOnSave", theOnDOMEvent: "theOnDOMEvent", theEditorCreated: "theEditorCreated", theUploadingStatus: "theUploadingStatus" }, host: { properties: { "class.the-editor-readonly": "theOptions?.readonly", "class.the-mobile-editor": "isMobileMode" }, classAttribute: "the-editor" }, providers: [
16674
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TheEditorComponent, selector: "the-editor, theEditor", inputs: { theOptions: "theOptions", thePlugins: "thePlugins", theGlobalToolbar: "theGlobalToolbar", theDecorate: "theDecorate", theOnError: "theOnError" }, outputs: { theOnSave: "theOnSave", theOnDOMEvent: "theOnDOMEvent", theEditorCreated: "theEditorCreated", theUploadingStatus: "theUploadingStatus" }, host: { properties: { "class.the-editor-readonly": "editor.options?.readonly", "class.the-mobile-editor": "isMobileMode" }, classAttribute: "the-editor" }, providers: [
16675
16675
  TheContextService,
16676
16676
  {
16677
16677
  provide: NG_VALUE_ACCESSOR,
16678
16678
  useExisting: forwardRef(() => TheEditorComponent),
16679
16679
  multi: true
16680
16680
  }
16681
- ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "theEditableContainer", first: true, predicate: ["theEditableContainer"], descendants: true, read: ElementRef, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar && !isMobileMode\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [isStrictDecorate]=\"false\"\n [decorate]=\"decorate\"\n [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [beforeInput]=\"onSlaBeforeInput\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n [scrollSelectionIntoView]=\"scrollSelectionIntoView\"\n (ngModelChange)=\"valueChange($event)\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n\n <ng-container *ngIf=\"!isMobileMode\">\n <the-inline-toolbar\n *ngIf=\"!theOptions?.readonly && inlineToolbarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div *ngIf=\"!theOptions?.readonly\" theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n </ng-container>\n\n <the-template #templateInstance></the-template>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateEditable, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "scrollSelectionIntoView", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionUpdate", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$1.ThyImageGroupComponent, selector: "thy-image-group, [thyImageGroup]" }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { kind: "component", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { kind: "component", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "isVisible"] }, { kind: "component", type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16681
+ ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "theEditableContainer", first: true, predicate: ["theEditableContainer"], descendants: true, read: ElementRef, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<the-toolbar\n *ngIf=\"!options?.readonly && !theGlobalToolbar && !isMobileMode\"\n [ngClass]=\"{\n 'the-toolbar-disabled': options?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"options?.toolbar?.align\"\n></the-toolbar>\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': options?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [isStrictDecorate]=\"false\"\n [decorate]=\"decorate\"\n [placeholder]=\"options?.placeholder\"\n [placeholderDecorate]=\"options?.placeholderDecorate ? options?.placeholderDecorate : null\"\n [readonly]=\"options?.readonly || options?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [beforeInput]=\"onSlaBeforeInput\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n [scrollSelectionIntoView]=\"scrollSelectionIntoView\"\n (ngModelChange)=\"valueChange($event)\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n\n <ng-container *ngIf=\"!isMobileMode\">\n <the-inline-toolbar\n *ngIf=\"!options?.readonly && options?.inlineToolbarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div *ngIf=\"!options?.readonly\" theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n </ng-container>\n\n <the-template #templateInstance></the-template>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateEditable, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "scrollSelectionIntoView", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionUpdate", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$1.ThyImageGroupComponent, selector: "thy-image-group, [thyImageGroup]" }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { kind: "component", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { kind: "component", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "isVisible"] }, { kind: "component", type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16682
16682
  }
16683
16683
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TheEditorComponent, decorators: [{
16684
16684
  type: Component,
@@ -16691,9 +16691,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
16691
16691
  }
16692
16692
  ], host: {
16693
16693
  class: 'the-editor',
16694
- '[class.the-editor-readonly]': 'theOptions?.readonly',
16694
+ '[class.the-editor-readonly]': 'editor.options?.readonly',
16695
16695
  '[class.the-mobile-editor]': 'isMobileMode'
16696
- }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar && !isMobileMode\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [isStrictDecorate]=\"false\"\n [decorate]=\"decorate\"\n [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [beforeInput]=\"onSlaBeforeInput\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n [scrollSelectionIntoView]=\"scrollSelectionIntoView\"\n (ngModelChange)=\"valueChange($event)\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n\n <ng-container *ngIf=\"!isMobileMode\">\n <the-inline-toolbar\n *ngIf=\"!theOptions?.readonly && inlineToolbarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div *ngIf=\"!theOptions?.readonly\" theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n </ng-container>\n\n <the-template #templateInstance></the-template>\n</div>\n" }]
16696
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<the-toolbar\n *ngIf=\"!options?.readonly && !theGlobalToolbar && !isMobileMode\"\n [ngClass]=\"{\n 'the-toolbar-disabled': options?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"options?.toolbar?.align\"\n></the-toolbar>\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': options?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [isStrictDecorate]=\"false\"\n [decorate]=\"decorate\"\n [placeholder]=\"options?.placeholder\"\n [placeholderDecorate]=\"options?.placeholderDecorate ? options?.placeholderDecorate : null\"\n [readonly]=\"options?.readonly || options?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [beforeInput]=\"onSlaBeforeInput\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n [scrollSelectionIntoView]=\"scrollSelectionIntoView\"\n (ngModelChange)=\"valueChange($event)\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n\n <ng-container *ngIf=\"!isMobileMode\">\n <the-inline-toolbar\n *ngIf=\"!options?.readonly && options?.inlineToolbarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div *ngIf=\"!options?.readonly\" theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n </ng-container>\n\n <the-template #templateInstance></the-template>\n</div>\n" }]
16697
16697
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.DestroyRef }, { type: i0.ElementRef }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ViewContainerRef }, { type: TheContextService }, { type: i4.ThyIconRegistry }, { type: undefined, decorators: [{
16698
16698
  type: Optional
16699
16699
  }, {