@worktile/theia 19.2.0 → 19.3.0

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.
@@ -2015,8 +2015,16 @@ class TheBaseElement extends BaseElementComponent {
2015
2015
  this.nativeElement.classList.add(`slate-element-${this.element.type}`, blockClass);
2016
2016
  if (this.editor) {
2017
2017
  const isVisible = this.editor.isVisible(this.element);
2018
+ const isBlockCard = this.editor.isBlockCard(this.element);
2018
2019
  if (!isVisible) {
2019
- toggleHeadingRelatedElement(this.editor, this.element, isVisible);
2020
+ if (isBlockCard) {
2021
+ setTimeout(() => {
2022
+ toggleHeadingRelatedElement(this.editor, this.element, isVisible);
2023
+ }, 0);
2024
+ }
2025
+ else {
2026
+ toggleHeadingRelatedElement(this.editor, this.element, isVisible);
2027
+ }
2020
2028
  }
2021
2029
  }
2022
2030
  }
@@ -3823,20 +3831,20 @@ class TheToolbarComponent {
3823
3831
  const { iconComponent, type, dropdownMode, dropdownItemKey, includes, ...args } = item;
3824
3832
  const viewComponent = this.viewComponentType(type);
3825
3833
  const compRef = this.toolbarContainer.createComponent(iconComponent ? iconComponent : viewComponent);
3826
- compRef.instance.editor = this.editor;
3827
- compRef.instance.toolbarItem = item;
3834
+ compRef.setInput('editor', this.editor);
3835
+ compRef.setInput('toolbarItem', item);
3828
3836
  this.components.set(item.key, compRef);
3829
3837
  if (item.type === ToolbarItemType.dropdown) {
3830
3838
  const dropdownRef = compRef;
3831
- dropdownRef.instance.dropdownItemKey = item.dropdownItemKey;
3832
- dropdownRef.instance.menus = includes;
3833
- dropdownRef.instance.mode = dropdownMode;
3839
+ dropdownRef.setInput('dropdownItemKey', item.dropdownItemKey);
3840
+ dropdownRef.setInput('menus', includes);
3841
+ dropdownRef.setInput('mode', dropdownMode);
3834
3842
  }
3835
3843
  }
3836
3844
  createToolbarSplit() {
3837
3845
  const compRef = this.toolbarContainer.createComponent(ThyDivider);
3838
- compRef.instance.thyVertical = true;
3839
- compRef.instance.thyColor = 'light';
3846
+ compRef.setInput('thyVertical', true);
3847
+ compRef.setInput('thyColor', 'light');
3840
3848
  compRef.location.nativeElement.classList.add('mx-2');
3841
3849
  }
3842
3850
  createMoreGroup(group) {
@@ -11557,11 +11565,12 @@ class TheImage extends TheBaseElement {
11557
11565
  imageClick() {
11558
11566
  const index = this.imageGroup.images.findIndex(item => item === this.imageDirective);
11559
11567
  const imageGroup = this.imageGroup.images.map(item => {
11568
+ const imageMeta = item.thyImageMeta();
11560
11569
  return {
11561
- originUrl: item.thyOriginSrc,
11562
- thumbUrl: item.thyPreviewSrc,
11563
- name: item.thyImageMeta.name,
11564
- size: item.thyImageMeta.size
11570
+ originUrl: item.thyOriginSrc(),
11571
+ thumbUrl: item.thyPreviewSrc(),
11572
+ name: imageMeta.name,
11573
+ size: imageMeta.size
11565
11574
  };
11566
11575
  });
11567
11576
  const { originUrl, thumbUrl, name, size } = this.element;