slate-angular 14.1.0 → 14.1.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.
Files changed (39) hide show
  1. package/components/block-card/block-card.component.d.ts +1 -1
  2. package/components/children/children.component.d.ts +1 -1
  3. package/components/descendant/descendant.component.d.ts +1 -1
  4. package/components/editable/editable.component.d.ts +1 -1
  5. package/components/element/default-element.component.d.ts +1 -1
  6. package/components/element/element.component.d.ts +1 -1
  7. package/components/leaf/default-leaf.component.d.ts +1 -1
  8. package/components/leaf/leaf.component.d.ts +1 -1
  9. package/components/leaves/leaves.component.d.ts +1 -1
  10. package/components/string/string.component.d.ts +1 -1
  11. package/components/string/template.component.d.ts +1 -1
  12. package/components/text/default-text.component.d.ts +1 -1
  13. package/components/text/void-text.component.d.ts +1 -1
  14. package/esm2020/components/block-card/block-card.component.mjs +3 -3
  15. package/esm2020/components/children/children.component.mjs +6 -6
  16. package/esm2020/components/descendant/descendant.component.mjs +3 -3
  17. package/esm2020/components/editable/editable.component.mjs +20 -9
  18. package/esm2020/components/element/default-element.component.mjs +3 -3
  19. package/esm2020/components/element/element.component.mjs +3 -3
  20. package/esm2020/components/leaf/default-leaf.component.mjs +3 -3
  21. package/esm2020/components/leaf/leaf.component.mjs +3 -3
  22. package/esm2020/components/leaves/leaves.component.mjs +6 -6
  23. package/esm2020/components/string/string.component.mjs +3 -3
  24. package/esm2020/components/string/template.component.mjs +3 -3
  25. package/esm2020/components/text/default-text.component.mjs +3 -3
  26. package/esm2020/components/text/void-text.component.mjs +3 -3
  27. package/esm2020/module.mjs +6 -6
  28. package/esm2020/view/base.mjs +29 -19
  29. package/esm2020/view/container-item.mjs +3 -3
  30. package/esm2020/view/container.mjs +3 -3
  31. package/fesm2015/slate-angular.mjs +117 -96
  32. package/fesm2015/slate-angular.mjs.map +1 -1
  33. package/fesm2020/slate-angular.mjs +117 -96
  34. package/fesm2020/slate-angular.mjs.map +1 -1
  35. package/{slate-angular.d.ts → index.d.ts} +0 -0
  36. package/package.json +3 -3
  37. package/view/base.d.ts +6 -4
  38. package/view/container-item.d.ts +1 -1
  39. package/view/container.d.ts +1 -1
@@ -1,14 +1,14 @@
1
1
  import { Editor, Range, Transforms, Path, Element, Text as Text$1, Node } from 'slate';
2
2
  import { isKeyHotkey } from 'is-hotkey';
3
3
  import * as i0 from '@angular/core';
4
- import { TemplateRef, Component, ViewChild, Directive, Input, HostBinding, ChangeDetectionStrategy, ViewChildren, InjectionToken, Inject, forwardRef, ElementRef, NgModule } from '@angular/core';
4
+ import { TemplateRef, Component, ChangeDetectionStrategy, ViewChild, Directive, Input, HostBinding, ViewChildren, InjectionToken, Inject, forwardRef, ElementRef, NgModule } from '@angular/core';
5
5
  import { __rest } from 'tslib';
6
6
  import getDirection from 'direction';
7
7
  import { Subject } from 'rxjs';
8
8
  import Debug from 'debug';
9
9
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
10
10
  import { HistoryEditor } from 'slate-history';
11
- import * as i2 from '@angular/common';
11
+ import * as i1 from '@angular/common';
12
12
  import { CommonModule } from '@angular/common';
13
13
 
14
14
  /**
@@ -1615,6 +1615,30 @@ var SlateErrorCode;
1615
1615
  SlateErrorCode[SlateErrorCode["InvalidValueError"] = 4100] = "InvalidValueError";
1616
1616
  })(SlateErrorCode || (SlateErrorCode = {}));
1617
1617
 
1618
+ class SlateStringTemplateComponent {
1619
+ }
1620
+ SlateStringTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateStringTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1621
+ SlateStringTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateStringTemplateComponent, selector: "slate-string-template", viewQueries: [{ propertyName: "stringTemplate", first: true, predicate: ["stringTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "compatStringTemplate", first: true, predicate: ["compatStringTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "emptyStringTemplate", first: true, predicate: ["emptyStringTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "emptyTextTemplate", first: true, predicate: ["emptyTextTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "lineBreakEmptyStringTemplate", first: true, predicate: ["lineBreakEmptyStringTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #stringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-string=\"true\">{{ context.text }}</span>\n</ng-template>\n<ng-template #compatStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <!-- Compatible with Chinese input in Chrome with \\n -->\n <span editable-text data-slate-string=\"true\">{{ context.text }}<span data-slate-zero-width>{{'\\uFEFF'}}</span></span>\n</ng-template>\n<ng-template #emptyStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #emptyTextTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" data-slate-length=\"0\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #lineBreakEmptyStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"n\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF'\n }}<br /></span>\n</ng-template>", changeDetection: i0.ChangeDetectionStrategy.OnPush });
1622
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateStringTemplateComponent, decorators: [{
1623
+ type: Component,
1624
+ args: [{ selector: 'slate-string-template', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #stringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-string=\"true\">{{ context.text }}</span>\n</ng-template>\n<ng-template #compatStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <!-- Compatible with Chinese input in Chrome with \\n -->\n <span editable-text data-slate-string=\"true\">{{ context.text }}<span data-slate-zero-width>{{'\\uFEFF'}}</span></span>\n</ng-template>\n<ng-template #emptyStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #emptyTextTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" data-slate-length=\"0\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #lineBreakEmptyStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"n\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF'\n }}<br /></span>\n</ng-template>" }]
1625
+ }], propDecorators: { stringTemplate: [{
1626
+ type: ViewChild,
1627
+ args: ['stringTemplate', { read: TemplateRef, static: true }]
1628
+ }], compatStringTemplate: [{
1629
+ type: ViewChild,
1630
+ args: ['compatStringTemplate', { read: TemplateRef, static: true }]
1631
+ }], emptyStringTemplate: [{
1632
+ type: ViewChild,
1633
+ args: ['emptyStringTemplate', { read: TemplateRef, static: true }]
1634
+ }], emptyTextTemplate: [{
1635
+ type: ViewChild,
1636
+ args: ['emptyTextTemplate', { read: TemplateRef, static: true }]
1637
+ }], lineBreakEmptyStringTemplate: [{
1638
+ type: ViewChild,
1639
+ args: ['lineBreakEmptyStringTemplate', { read: TemplateRef, static: true }]
1640
+ }] } });
1641
+
1618
1642
  class SlateBlockCardComponent {
1619
1643
  constructor(elementRef) {
1620
1644
  this.elementRef = elementRef;
@@ -1636,9 +1660,9 @@ class SlateBlockCardComponent {
1636
1660
  this.centerRootNodes = rootNodes;
1637
1661
  }
1638
1662
  }
1639
- SlateBlockCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateBlockCardComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1640
- SlateBlockCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateBlockCardComponent, selector: "slate-block-card, [slateBlockCard]", viewQueries: [{ propertyName: "centerContianer", first: true, predicate: ["centerContianer"], descendants: true, static: true }], ngImport: i0, template: "<span card-target=\"card-left\" class=\"card-left\">{{ '\\uFEFF' }}</span>\n<div card-target=\"card-center\" #centerContianer></div>\n<span card-target=\"card-right\" class=\"card-right\">{{ '\\uFEFF' }}</span>" });
1641
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateBlockCardComponent, decorators: [{
1663
+ SlateBlockCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateBlockCardComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1664
+ SlateBlockCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateBlockCardComponent, selector: "slate-block-card, [slateBlockCard]", viewQueries: [{ propertyName: "centerContianer", first: true, predicate: ["centerContianer"], descendants: true, static: true }], ngImport: i0, template: "<span card-target=\"card-left\" class=\"card-left\">{{ '\\uFEFF' }}</span>\n<div card-target=\"card-center\" #centerContianer></div>\n<span card-target=\"card-right\" class=\"card-right\">{{ '\\uFEFF' }}</span>" });
1665
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateBlockCardComponent, decorators: [{
1642
1666
  type: Component,
1643
1667
  args: [{ selector: 'slate-block-card, [slateBlockCard]', template: "<span card-target=\"card-left\" class=\"card-left\">{{ '\\uFEFF' }}</span>\n<div card-target=\"card-center\" #centerContianer></div>\n<span card-target=\"card-right\" class=\"card-right\">{{ '\\uFEFF' }}</span>" }]
1644
1668
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { centerContianer: [{
@@ -1737,9 +1761,9 @@ class ViewContainerItem {
1737
1761
  }
1738
1762
  }
1739
1763
  }
1740
- ViewContainerItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ViewContainerItem, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1741
- ViewContainerItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: ViewContainerItem, inputs: { viewContext: "viewContext" }, ngImport: i0 });
1742
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ViewContainerItem, decorators: [{
1764
+ ViewContainerItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ViewContainerItem, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1765
+ ViewContainerItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: ViewContainerItem, inputs: { viewContext: "viewContext" }, ngImport: i0 });
1766
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ViewContainerItem, decorators: [{
1743
1767
  type: Directive
1744
1768
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { viewContext: [{
1745
1769
  type: Input
@@ -1777,9 +1801,9 @@ class BaseComponent {
1777
1801
  return this.elementRef.nativeElement;
1778
1802
  }
1779
1803
  }
1780
- BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
1781
- BaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: BaseComponent, inputs: { context: "context", viewContext: "viewContext" }, ngImport: i0 });
1782
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseComponent, decorators: [{
1804
+ BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BaseComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
1805
+ BaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: BaseComponent, inputs: { context: "context", viewContext: "viewContext" }, ngImport: i0 });
1806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BaseComponent, decorators: [{
1783
1807
  type: Directive
1784
1808
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { context: [{
1785
1809
  type: Input
@@ -1816,18 +1840,28 @@ class BaseLeafComponent extends BaseComponent {
1816
1840
  // Issue occurs when the span node of the placeholder is before the slateString span node
1817
1841
  if (this.context.leaf['placeholder']) {
1818
1842
  if (!this.placeholderElement) {
1819
- this.placeholderElement = document.createElement('span');
1820
- this.placeholderElement.innerText = this.context.leaf['placeholder'];
1821
- this.placeholderElement.contentEditable = 'false';
1822
- this.placeholderElement.setAttribute('data-slate-placeholder', 'true');
1823
- this.nativeElement.classList.add('leaf-with-placeholder');
1824
- this.nativeElement.appendChild(this.placeholderElement);
1843
+ this.createPlaceholder();
1825
1844
  }
1845
+ this.updatePlaceholder();
1826
1846
  }
1827
1847
  else {
1828
1848
  this.destroyPlaceholder();
1829
1849
  }
1830
1850
  }
1851
+ createPlaceholder() {
1852
+ const placeholderElement = document.createElement('span');
1853
+ placeholderElement.innerText = this.context.leaf['placeholder'];
1854
+ placeholderElement.contentEditable = 'false';
1855
+ placeholderElement.setAttribute('data-slate-placeholder', 'true');
1856
+ this.placeholderElement = placeholderElement;
1857
+ this.nativeElement.classList.add('leaf-with-placeholder');
1858
+ this.nativeElement.appendChild(placeholderElement);
1859
+ }
1860
+ updatePlaceholder() {
1861
+ if (this.placeholderElement.innerText !== this.context.leaf['placeholder']) {
1862
+ this.placeholderElement.innerText = this.context.leaf['placeholder'];
1863
+ }
1864
+ }
1831
1865
  destroyPlaceholder() {
1832
1866
  if (this.placeholderElement) {
1833
1867
  this.placeholderElement.remove();
@@ -1836,9 +1870,9 @@ class BaseLeafComponent extends BaseComponent {
1836
1870
  }
1837
1871
  }
1838
1872
  }
1839
- BaseLeafComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseLeafComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1840
- BaseLeafComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: BaseLeafComponent, host: { properties: { "attr.data-slate-leaf": "this.isSlateLeaf" } }, usesInheritance: true, ngImport: i0 });
1841
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseLeafComponent, decorators: [{
1873
+ BaseLeafComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BaseLeafComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1874
+ BaseLeafComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: BaseLeafComponent, host: { properties: { "attr.data-slate-leaf": "this.isSlateLeaf" } }, usesInheritance: true, ngImport: i0 });
1875
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BaseLeafComponent, decorators: [{
1842
1876
  type: Directive
1843
1877
  }], propDecorators: { isSlateLeaf: [{
1844
1878
  type: HostBinding,
@@ -1911,9 +1945,9 @@ class BaseElementComponent extends BaseComponent {
1911
1945
  };
1912
1946
  }
1913
1947
  }
1914
- BaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1915
- BaseElementComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: BaseElementComponent, usesInheritance: true, ngImport: i0 });
1916
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseElementComponent, decorators: [{
1948
+ BaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1949
+ BaseElementComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: BaseElementComponent, usesInheritance: true, ngImport: i0 });
1950
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BaseElementComponent, decorators: [{
1917
1951
  type: Directive
1918
1952
  }] });
1919
1953
  /**
@@ -1948,9 +1982,9 @@ class BaseTextComponent extends BaseComponent {
1948
1982
  this.updateWeakMap();
1949
1983
  }
1950
1984
  }
1951
- BaseTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1952
- BaseTextComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: BaseTextComponent, usesInheritance: true, ngImport: i0 });
1953
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseTextComponent, decorators: [{
1985
+ BaseTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BaseTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1986
+ BaseTextComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: BaseTextComponent, usesInheritance: true, ngImport: i0 });
1987
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BaseTextComponent, decorators: [{
1954
1988
  type: Directive
1955
1989
  }] });
1956
1990
 
@@ -2045,9 +2079,9 @@ class ViewContainer {
2045
2079
  record.item.appendBlockCardElement();
2046
2080
  }
2047
2081
  }
2048
- ViewContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ViewContainer, deps: [{ token: i0.ElementRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
2049
- ViewContainer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: ViewContainer, inputs: { viewContext: "viewContext" }, ngImport: i0 });
2050
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ViewContainer, decorators: [{
2082
+ ViewContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ViewContainer, deps: [{ token: i0.ElementRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
2083
+ ViewContainer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: ViewContainer, inputs: { viewContext: "viewContext" }, ngImport: i0 });
2084
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ViewContainer, decorators: [{
2051
2085
  type: Directive
2052
2086
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.IterableDiffers }]; }, propDecorators: { viewContext: [{
2053
2087
  type: Input
@@ -2108,9 +2142,9 @@ class SlateStringComponent extends ViewContainerItem {
2108
2142
  return false;
2109
2143
  }
2110
2144
  }
2111
- SlateStringComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateStringComponent, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
2112
- SlateStringComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateStringComponent, selector: "span[slateString]", inputs: { context: "context" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateStringComponent, decorators: [{
2145
+ SlateStringComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateStringComponent, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
2146
+ SlateStringComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateStringComponent, selector: "span[slateString]", inputs: { context: "context" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateStringComponent, decorators: [{
2114
2148
  type: Component,
2115
2149
  args: [{
2116
2150
  selector: 'span[slateString]',
@@ -2131,9 +2165,9 @@ class SlateDefaultLeafComponent extends BaseLeafComponent {
2131
2165
  this.destroyPlaceholder();
2132
2166
  }
2133
2167
  }
2134
- SlateDefaultLeafComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateDefaultLeafComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2135
- SlateDefaultLeafComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateDefaultLeafComponent, selector: "span[slateDefaultLeaf]", host: { attributes: { "data-slate-leaf": "true" } }, usesInheritance: true, ngImport: i0, template: `<span slateString [context]="context" [viewContext]="viewContext"><span>`, isInline: true, components: [{ type: SlateStringComponent, selector: "span[slateString]", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateDefaultLeafComponent, decorators: [{
2168
+ SlateDefaultLeafComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateDefaultLeafComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2169
+ SlateDefaultLeafComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateDefaultLeafComponent, selector: "span[slateDefaultLeaf]", host: { attributes: { "data-slate-leaf": "true" } }, usesInheritance: true, ngImport: i0, template: `<span slateString [context]="context" [viewContext]="viewContext"><span>`, isInline: true, dependencies: [{ kind: "component", type: SlateStringComponent, selector: "span[slateString]", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateDefaultLeafComponent, decorators: [{
2137
2171
  type: Component,
2138
2172
  args: [{
2139
2173
  selector: 'span[slateDefaultLeaf]',
@@ -2165,9 +2199,9 @@ class SlateLeafComponent extends ViewContainerItem {
2165
2199
  this.updateView();
2166
2200
  }
2167
2201
  }
2168
- SlateLeafComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateLeafComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2169
- SlateLeafComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateLeafComponent, selector: "slate-leaf", inputs: { context: "context" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2170
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateLeafComponent, decorators: [{
2202
+ SlateLeafComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateLeafComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2203
+ SlateLeafComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateLeafComponent, selector: "slate-leaf", inputs: { context: "context" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateLeafComponent, decorators: [{
2171
2205
  type: Component,
2172
2206
  args: [{
2173
2207
  selector: 'slate-leaf',
@@ -2215,13 +2249,13 @@ class SlateLeavesComponent extends ViewContainer {
2215
2249
  return index;
2216
2250
  }
2217
2251
  }
2218
- SlateLeavesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateLeavesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2219
- SlateLeavesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateLeavesComponent, selector: "slate-leaves", inputs: { context: "context" }, viewQueries: [{ propertyName: "childrenComponent", predicate: SlateLeafComponent, descendants: true, read: SlateLeafComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `<slate-leaf
2252
+ SlateLeavesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateLeavesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2253
+ SlateLeavesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateLeavesComponent, selector: "slate-leaves", inputs: { context: "context" }, viewQueries: [{ propertyName: "childrenComponent", predicate: SlateLeafComponent, descendants: true, read: SlateLeafComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `<slate-leaf
2220
2254
  [context]="context" [viewContext]="viewContext"
2221
2255
  [viewContext]="viewContext"
2222
2256
  *ngFor="let context of leafContexts; trackBy: trackBy"></slate-leaf>
2223
- `, isInline: true, components: [{ type: SlateLeafComponent, selector: "slate-leaf", inputs: ["context"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2224
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateLeavesComponent, decorators: [{
2257
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SlateLeafComponent, selector: "slate-leaf", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateLeavesComponent, decorators: [{
2225
2259
  type: Component,
2226
2260
  args: [{
2227
2261
  selector: 'slate-leaves',
@@ -2241,9 +2275,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
2241
2275
 
2242
2276
  class SlateDefaultTextComponent extends BaseTextComponent {
2243
2277
  }
2244
- SlateDefaultTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateDefaultTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2245
- SlateDefaultTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateDefaultTextComponent, selector: "span[slateDefaultText]", host: { attributes: { "data-slate-node": "text" } }, usesInheritance: true, ngImport: i0, template: `<slate-leaves [context]="context" [viewContext]="viewContext" [viewContext]="viewContext"></slate-leaves>`, isInline: true, components: [{ type: SlateLeavesComponent, selector: "slate-leaves", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateDefaultTextComponent, decorators: [{
2278
+ SlateDefaultTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateDefaultTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2279
+ SlateDefaultTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateDefaultTextComponent, selector: "span[slateDefaultText]", host: { attributes: { "data-slate-node": "text" } }, usesInheritance: true, ngImport: i0, template: `<slate-leaves [context]="context" [viewContext]="viewContext" [viewContext]="viewContext"></slate-leaves>`, isInline: true, dependencies: [{ kind: "component", type: SlateLeavesComponent, selector: "slate-leaves", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateDefaultTextComponent, decorators: [{
2247
2281
  type: Component,
2248
2282
  args: [{
2249
2283
  selector: 'span[slateDefaultText]',
@@ -2267,9 +2301,9 @@ class SlateVoidTextComponent extends BaseTextComponent {
2267
2301
  this.isLeafBlock = AngularEditor.isLeafBlock(this.viewContext.editor, this.context.parent);
2268
2302
  }
2269
2303
  }
2270
- SlateVoidTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateVoidTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2271
- SlateVoidTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateVoidTextComponent, selector: "span[slateVoidText]", host: { attributes: { "data-slate-spacer": "true", "data-slate-node": "text" }, properties: { "attr.contenteditable": "isLeafBlock" }, classAttribute: "slate-spacer" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `<slate-leaves [context]="context" [viewContext]="viewContext" [viewContext]="viewContext"></slate-leaves>`, isInline: true, components: [{ type: SlateLeavesComponent, selector: "slate-leaves", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2272
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateVoidTextComponent, decorators: [{
2304
+ SlateVoidTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateVoidTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2305
+ SlateVoidTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateVoidTextComponent, selector: "span[slateVoidText]", host: { attributes: { "data-slate-spacer": "true", "data-slate-node": "text" }, properties: { "attr.contenteditable": "isLeafBlock" }, classAttribute: "slate-spacer" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `<slate-leaves [context]="context" [viewContext]="viewContext" [viewContext]="viewContext"></slate-leaves>`, isInline: true, dependencies: [{ kind: "component", type: SlateLeavesComponent, selector: "slate-leaves", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2306
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateVoidTextComponent, decorators: [{
2273
2307
  type: Component,
2274
2308
  args: [{
2275
2309
  selector: 'span[slateVoidText]',
@@ -2429,9 +2463,9 @@ class SlateDescendantComponent extends ViewContainerItem {
2429
2463
  }
2430
2464
  }
2431
2465
  }
2432
- SlateDescendantComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateDescendantComponent, deps: [{ token: i0.ViewContainerRef }, { token: SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
2433
- SlateDescendantComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateDescendantComponent, selector: "slate-descendant", inputs: { descendant: "descendant", context: "context", viewContext: "viewContext", index: "index" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateDescendantComponent, decorators: [{
2466
+ SlateDescendantComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateDescendantComponent, deps: [{ token: i0.ViewContainerRef }, { token: SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
2467
+ SlateDescendantComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateDescendantComponent, selector: "slate-descendant", inputs: { descendant: "descendant", context: "context", viewContext: "viewContext", index: "index" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateDescendantComponent, decorators: [{
2435
2469
  type: Component,
2436
2470
  args: [{
2437
2471
  selector: 'slate-descendant',
@@ -2463,14 +2497,14 @@ class SlateChildrenComponent extends ViewContainer {
2463
2497
  ngOnInit() {
2464
2498
  }
2465
2499
  }
2466
- SlateChildrenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateChildrenComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2467
- SlateChildrenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateChildrenComponent, selector: "slate-children", inputs: { children: "children", context: "context", viewContext: "viewContext" }, viewQueries: [{ propertyName: "childrenComponent", predicate: SlateDescendantComponent, descendants: true, read: SlateDescendantComponent }], usesInheritance: true, ngImport: i0, template: `<slate-descendant
2500
+ SlateChildrenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateChildrenComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2501
+ SlateChildrenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateChildrenComponent, selector: "slate-children", inputs: { children: "children", context: "context", viewContext: "viewContext" }, viewQueries: [{ propertyName: "childrenComponent", predicate: SlateDescendantComponent, descendants: true, read: SlateDescendantComponent }], usesInheritance: true, ngImport: i0, template: `<slate-descendant
2468
2502
  [descendant]="descendant"
2469
2503
  [context]="context" [viewContext]="viewContext"
2470
2504
  [viewContext]="viewContext"
2471
2505
  [index]="index"
2472
- *ngFor="let descendant of children;let index = index; trackBy: trackBy"></slate-descendant>`, isInline: true, components: [{ type: SlateDescendantComponent, selector: "slate-descendant", inputs: ["descendant", "context", "viewContext", "index"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2473
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateChildrenComponent, decorators: [{
2506
+ *ngFor="let descendant of children;let index = index; trackBy: trackBy"></slate-descendant>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SlateDescendantComponent, selector: "slate-descendant", inputs: ["descendant", "context", "viewContext", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2507
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateChildrenComponent, decorators: [{
2474
2508
  type: Component,
2475
2509
  args: [{
2476
2510
  selector: 'slate-children',
@@ -2493,30 +2527,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
2493
2527
  args: [SlateDescendantComponent, { read: SlateDescendantComponent }]
2494
2528
  }] } });
2495
2529
 
2496
- class SlateStringTemplateComponent {
2497
- }
2498
- SlateStringTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateStringTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2499
- SlateStringTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateStringTemplateComponent, selector: "slate-string-template", viewQueries: [{ propertyName: "stringTemplate", first: true, predicate: ["stringTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "compatStringTemplate", first: true, predicate: ["compatStringTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "emptyStringTemplate", first: true, predicate: ["emptyStringTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "emptyTextTemplate", first: true, predicate: ["emptyTextTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "lineBreakEmptyStringTemplate", first: true, predicate: ["lineBreakEmptyStringTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #stringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-string=\"true\">{{ context.text }}</span>\n</ng-template>\n<ng-template #compatStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <!-- Compatible with Chinese input in Chrome with \\n -->\n <span editable-text data-slate-string=\"true\">{{ context.text }}<span data-slate-zero-width>{{'\\uFEFF'}}</span></span>\n</ng-template>\n<ng-template #emptyStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #emptyTextTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" data-slate-length=\"0\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #lineBreakEmptyStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"n\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF'\n }}<br /></span>\n</ng-template>", changeDetection: i0.ChangeDetectionStrategy.OnPush });
2500
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateStringTemplateComponent, decorators: [{
2501
- type: Component,
2502
- args: [{ selector: 'slate-string-template', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #stringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-string=\"true\">{{ context.text }}</span>\n</ng-template>\n<ng-template #compatStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <!-- Compatible with Chinese input in Chrome with \\n -->\n <span editable-text data-slate-string=\"true\">{{ context.text }}<span data-slate-zero-width>{{'\\uFEFF'}}</span></span>\n</ng-template>\n<ng-template #emptyStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #emptyTextTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" data-slate-length=\"0\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #lineBreakEmptyStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"n\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF'\n }}<br /></span>\n</ng-template>" }]
2503
- }], propDecorators: { stringTemplate: [{
2504
- type: ViewChild,
2505
- args: ['stringTemplate', { read: TemplateRef, static: true }]
2506
- }], compatStringTemplate: [{
2507
- type: ViewChild,
2508
- args: ['compatStringTemplate', { read: TemplateRef, static: true }]
2509
- }], emptyStringTemplate: [{
2510
- type: ViewChild,
2511
- args: ['emptyStringTemplate', { read: TemplateRef, static: true }]
2512
- }], emptyTextTemplate: [{
2513
- type: ViewChild,
2514
- args: ['emptyTextTemplate', { read: TemplateRef, static: true }]
2515
- }], lineBreakEmptyStringTemplate: [{
2516
- type: ViewChild,
2517
- args: ['lineBreakEmptyStringTemplate', { read: TemplateRef, static: true }]
2518
- }] } });
2519
-
2520
2530
  const timeDebug = Debug('slate-angular-time');
2521
2531
  // not correctly clipboardData on beforeinput
2522
2532
  const forceOnDOMPaste = IS_SAFARI;
@@ -2584,6 +2594,10 @@ class SlateEditableComponent {
2584
2594
  if (decorateChange) {
2585
2595
  this.forceFlush();
2586
2596
  }
2597
+ const placeholderChange = simpleChanges['placeholder'];
2598
+ if (placeholderChange) {
2599
+ this.detectContext();
2600
+ }
2587
2601
  const readonlyChange = simpleChanges['readonly'];
2588
2602
  if (readonlyChange) {
2589
2603
  IS_READONLY.set(this.editor, this.readonly);
@@ -2644,6 +2658,7 @@ class SlateEditableComponent {
2644
2658
  try {
2645
2659
  const { selection } = this.editor;
2646
2660
  const root = AngularEditor.findDocumentOrShadowRoot(this.editor);
2661
+ const { activeElement } = root;
2647
2662
  const domSelection = root.getSelection();
2648
2663
  if (this.isComposing || !domSelection || !AngularEditor.isFocused(this.editor)) {
2649
2664
  return;
@@ -2668,6 +2683,10 @@ class SlateEditableComponent {
2668
2683
  Range.equals(AngularEditor.toSlateRange(this.editor, domSelection), selection)) {
2669
2684
  return;
2670
2685
  }
2686
+ // prevent updating native selection when active element is void element
2687
+ if (isTargetInsideVoid(this.editor, activeElement)) {
2688
+ return;
2689
+ }
2671
2690
  // when <Editable/> is being controlled through external value
2672
2691
  // then its children might just change - DOM responds to it on its own
2673
2692
  // but Slate's value is not being updated through any operation
@@ -2859,8 +2878,10 @@ class SlateEditableComponent {
2859
2878
  // for example, double-click the last cell of the table to select a non-editable DOM
2860
2879
  const range = AngularEditor.toSlateRange(this.editor, domSelection);
2861
2880
  if (this.editor.selection && Range.equals(range, this.editor.selection) && !hasStringTarget(domSelection)) {
2862
- // force adjust DOMSelection
2863
- this.toNativeSelection();
2881
+ if (!isTargetInsideVoid(this.editor, activeElement)) {
2882
+ // force adjust DOMSelection
2883
+ this.toNativeSelection();
2884
+ }
2864
2885
  }
2865
2886
  else {
2866
2887
  Transforms.select(this.editor, range);
@@ -3414,13 +3435,13 @@ class SlateEditableComponent {
3414
3435
  EDITOR_TO_ON_CHANGE.delete(this.editor);
3415
3436
  }
3416
3437
  }
3417
- SlateEditableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateEditableComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
3418
- SlateEditableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateEditableComponent, selector: "slate-editable", inputs: { editor: "editor", renderElement: "renderElement", renderLeaf: "renderLeaf", renderText: "renderText", decorate: "decorate", placeholderDecorate: "placeholderDecorate", isStrictDecorate: "isStrictDecorate", trackBy: "trackBy", readonly: "readonly", placeholder: "placeholder", beforeInput: "beforeInput", blur: "blur", click: "click", compositionEnd: "compositionEnd", compositionStart: "compositionStart", copy: "copy", cut: "cut", dragOver: "dragOver", dragStart: "dragStart", dragEnd: "dragEnd", drop: "drop", focus: "focus", keydown: "keydown", paste: "paste", spellCheck: "spellCheck", autoCorrect: "autoCorrect", autoCapitalize: "autoCapitalize" }, host: { properties: { "attr.contenteditable": "readonly ? undefined : true", "attr.role": "readonly ? undefined : 'textbox'", "attr.spellCheck": "!hasBeforeInputSupport ? false : spellCheck", "attr.autoCorrect": "!hasBeforeInputSupport ? 'false' : autoCorrect", "attr.autoCapitalize": "!hasBeforeInputSupport ? 'false' : autoCapitalize", "attr.data-slate-editor": "this.dataSlateEditor", "attr.data-slate-node": "this.dataSlateNode", "attr.data-gramm": "this.dataGramm" }, classAttribute: "slate-editable-container" }, providers: [{
3438
+ SlateEditableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateEditableComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
3439
+ SlateEditableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateEditableComponent, selector: "slate-editable", inputs: { editor: "editor", renderElement: "renderElement", renderLeaf: "renderLeaf", renderText: "renderText", decorate: "decorate", placeholderDecorate: "placeholderDecorate", isStrictDecorate: "isStrictDecorate", trackBy: "trackBy", readonly: "readonly", placeholder: "placeholder", beforeInput: "beforeInput", blur: "blur", click: "click", compositionEnd: "compositionEnd", compositionStart: "compositionStart", copy: "copy", cut: "cut", dragOver: "dragOver", dragStart: "dragStart", dragEnd: "dragEnd", drop: "drop", focus: "focus", keydown: "keydown", paste: "paste", spellCheck: "spellCheck", autoCorrect: "autoCorrect", autoCapitalize: "autoCapitalize" }, host: { properties: { "attr.contenteditable": "readonly ? undefined : true", "attr.role": "readonly ? undefined : 'textbox'", "attr.spellCheck": "!hasBeforeInputSupport ? false : spellCheck", "attr.autoCorrect": "!hasBeforeInputSupport ? 'false' : autoCorrect", "attr.autoCapitalize": "!hasBeforeInputSupport ? 'false' : autoCapitalize", "attr.data-slate-editor": "this.dataSlateEditor", "attr.data-slate-node": "this.dataSlateNode", "attr.data-gramm": "this.dataGramm" }, classAttribute: "slate-editable-container" }, providers: [{
3419
3440
  provide: NG_VALUE_ACCESSOR,
3420
3441
  useExisting: forwardRef(() => SlateEditableComponent),
3421
3442
  multi: true
3422
- }], viewQueries: [{ propertyName: "templateComponent", first: true, predicate: ["templateComponent"], descendants: true, static: true }, { propertyName: "templateElementRef", first: true, predicate: ["templateComponent"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<slate-children [children]=\"editor.children\" [context]=\"context\" [viewContext]=\"viewContext\"></slate-children>\n<slate-string-template #templateComponent></slate-string-template>", components: [{ type: SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: SlateStringTemplateComponent, selector: "slate-string-template" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3423
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateEditableComponent, decorators: [{
3443
+ }], viewQueries: [{ propertyName: "templateComponent", first: true, predicate: ["templateComponent"], descendants: true, static: true }, { propertyName: "templateElementRef", first: true, predicate: ["templateComponent"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<slate-children [children]=\"editor.children\" [context]=\"context\" [viewContext]=\"viewContext\"></slate-children>\n<slate-string-template #templateComponent></slate-string-template>", dependencies: [{ kind: "component", type: SlateStringTemplateComponent, selector: "slate-string-template" }, { kind: "component", type: SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateEditableComponent, decorators: [{
3424
3445
  type: Component,
3425
3446
  args: [{ selector: 'slate-editable', host: {
3426
3447
  class: 'slate-editable-container',
@@ -3561,9 +3582,9 @@ const preventInsertFromComposition = (event, editor) => {
3561
3582
 
3562
3583
  class SlateElementComponent extends BaseElementComponent {
3563
3584
  }
3564
- SlateElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3565
- SlateElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateElementComponent, selector: "[slateElement]", usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children><ng-content></ng-content>', isInline: true, components: [{ type: SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3566
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateElementComponent, decorators: [{
3585
+ SlateElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3586
+ SlateElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateElementComponent, selector: "[slateElement]", usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children><ng-content></ng-content>', isInline: true, dependencies: [{ kind: "component", type: SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3587
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateElementComponent, decorators: [{
3567
3588
  type: Component,
3568
3589
  args: [{
3569
3590
  selector: '[slateElement]',
@@ -3574,9 +3595,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
3574
3595
 
3575
3596
  class SlateDefaultElementComponent extends BaseElementComponent {
3576
3597
  }
3577
- SlateDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3578
- SlateDefaultElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: SlateDefaultElementComponent, selector: "div[slateDefaultElement]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, components: [{ type: SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3579
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateDefaultElementComponent, decorators: [{
3598
+ SlateDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3599
+ SlateDefaultElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SlateDefaultElementComponent, selector: "div[slateDefaultElement]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3600
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateDefaultElementComponent, decorators: [{
3580
3601
  type: Component,
3581
3602
  args: [{
3582
3603
  selector: 'div[slateDefaultElement]',
@@ -3587,8 +3608,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
3587
3608
 
3588
3609
  class SlateModule {
3589
3610
  }
3590
- SlateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3591
- SlateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateModule, declarations: [SlateEditableComponent,
3611
+ SlateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3612
+ SlateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SlateModule, declarations: [SlateEditableComponent,
3592
3613
  SlateDefaultElementComponent,
3593
3614
  SlateElementComponent,
3594
3615
  SlateVoidTextComponent,
@@ -3601,13 +3622,13 @@ SlateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "1
3601
3622
  SlateLeafComponent,
3602
3623
  SlateLeavesComponent,
3603
3624
  SlateDefaultLeafComponent], imports: [CommonModule], exports: [SlateEditableComponent, SlateChildrenComponent, SlateElementComponent, SlateLeavesComponent, SlateStringComponent] });
3604
- SlateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateModule, providers: [
3625
+ SlateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateModule, providers: [
3605
3626
  {
3606
3627
  provide: SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN,
3607
3628
  useValue: SlateDefaultElementComponent
3608
3629
  },
3609
- ], imports: [[CommonModule]] });
3610
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SlateModule, decorators: [{
3630
+ ], imports: [CommonModule] });
3631
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SlateModule, decorators: [{
3611
3632
  type: NgModule,
3612
3633
  args: [{
3613
3634
  declarations: [