slate-angular 16.0.0 → 16.1.0-next.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.
- package/components/block-card/block-card.component.d.ts +3 -3
- package/components/children/children.component.d.ts +3 -8
- package/components/editable/editable.component.d.ts +21 -10
- package/components/element/default-element.component.d.ts +3 -3
- package/components/element/element.component.d.ts +3 -3
- package/components/leaf/default-leaf.component.d.ts +3 -3
- package/components/leaf/token.d.ts +4 -0
- package/components/leaves/leaves.component.d.ts +3 -16
- package/components/string/default-string.component.d.ts +3 -3
- package/components/string/string.component.d.ts +13 -5
- package/components/string/template.component.d.ts +3 -3
- package/components/text/default-text.component.d.ts +3 -3
- package/components/text/token.d.ts +5 -0
- package/components/text/void-text.component.d.ts +3 -3
- package/esm2022/components/block-card/block-card.component.mjs +6 -6
- package/esm2022/components/children/children.component.mjs +11 -36
- package/esm2022/components/editable/editable.component.mjs +129 -46
- package/esm2022/components/element/default-element.component.mjs +10 -8
- package/esm2022/components/element/element.component.mjs +10 -8
- package/esm2022/components/leaf/default-leaf.component.mjs +9 -7
- package/esm2022/components/leaf/token.mjs +3 -0
- package/esm2022/components/leaves/leaves.component.mjs +11 -55
- package/esm2022/components/string/default-string.component.mjs +7 -6
- package/esm2022/components/string/string.component.mjs +25 -14
- package/esm2022/components/string/template.component.mjs +6 -6
- package/esm2022/components/text/default-text.component.mjs +10 -8
- package/esm2022/components/text/token.mjs +4 -0
- package/esm2022/components/text/void-text.component.mjs +10 -8
- package/esm2022/module.mjs +53 -58
- package/esm2022/utils/throttle.mjs +18 -0
- package/esm2022/view/base.mjs +26 -9
- package/esm2022/view/container-item.mjs +1 -1
- package/esm2022/view/container.mjs +2 -82
- package/esm2022/view/context.mjs +1 -1
- package/esm2022/view/render/leaves-render.mjs +105 -0
- package/esm2022/view/render/list-render.mjs +250 -0
- package/esm2022/view/render/utils.mjs +104 -0
- package/fesm2022/slate-angular.mjs +905 -675
- package/fesm2022/slate-angular.mjs.map +1 -1
- package/module.d.ts +12 -14
- package/package.json +8 -3
- package/utils/throttle.d.ts +2 -0
- package/view/base.d.ts +11 -2
- package/view/container-item.d.ts +2 -2
- package/view/container.d.ts +3 -7
- package/view/context.d.ts +10 -4
- package/view/render/leaves-render.d.ts +20 -0
- package/view/render/list-render.d.ts +31 -0
- package/view/render/utils.d.ts +11 -0
- package/components/descendant/descendant.component.d.ts +0 -35
- package/components/leaf/leaf.component.d.ts +0 -16
- package/esm2022/components/descendant/descendant.component.mjs +0 -185
- package/esm2022/components/leaf/leaf.component.mjs +0 -37
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementRef, OnInit } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class SlateBlockCard implements OnInit {
|
|
4
4
|
private elementRef;
|
|
5
5
|
centerContianer: ElementRef;
|
|
6
6
|
centerRootNodes: HTMLElement[];
|
|
@@ -10,6 +10,6 @@ export declare class SlateBlockCardComponent implements OnInit {
|
|
|
10
10
|
ngOnInit(): void;
|
|
11
11
|
append(): void;
|
|
12
12
|
initializeCenter(rootNodes: HTMLElement[]): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateBlockCard, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateBlockCard, "slate-block-card, [slateBlockCard]", never, {}, {}, never, never, true, never>;
|
|
15
15
|
}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { OnInit, QueryList } from '@angular/core';
|
|
2
|
-
import { SlateDescendantComponent } from '../descendant/descendant.component';
|
|
3
1
|
import { Descendant } from 'slate';
|
|
4
2
|
import { SlateChildrenContext, SlateViewContext } from '../../view/context';
|
|
5
3
|
import { ViewContainer } from '../../view/container';
|
|
6
4
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
5
|
+
export declare class SlateChildren extends ViewContainer<any> {
|
|
8
6
|
children: Descendant[];
|
|
9
7
|
context: SlateChildrenContext;
|
|
10
8
|
viewContext: SlateViewContext;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
trackBy: (index: any, node: any) => any;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SlateChildrenComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SlateChildrenComponent, "slate-children", never, { "children": { "alias": "children"; "required": false; }; "context": { "alias": "context"; "required": false; }; "viewContext": { "alias": "viewContext"; "required": false; }; }, {}, never, never, false, never>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateChildren, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateChildren, "slate-children", never, { "children": { "alias": "children"; "required": false; }; "context": { "alias": "context"; "required": false; }; "viewContext": { "alias": "viewContext"; "required": false; }; }, {}, never, never, true, never>;
|
|
16
11
|
}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import { OnInit, Renderer2, ElementRef, OnDestroy, ChangeDetectorRef, NgZone, Injector, OnChanges, SimpleChanges, AfterViewChecked, DoCheck } from '@angular/core';
|
|
1
|
+
import { OnInit, Renderer2, ElementRef, OnDestroy, ChangeDetectorRef, NgZone, Injector, OnChanges, SimpleChanges, AfterViewChecked, DoCheck, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { Text as SlateText, Element, Editor, Range, NodeEntry } from 'slate';
|
|
3
3
|
import { AngularEditor } from '../../plugins/angular-editor';
|
|
4
4
|
import { DOMElement, DOMNode, DOMRange } from '../../utils/dom';
|
|
5
|
-
import {
|
|
5
|
+
import { SlateStringTemplate } from '../string/template.component';
|
|
6
6
|
import { SlateChildrenContext, SlateViewContext } from '../../view/context';
|
|
7
|
-
import { ViewType } from '../../types/view';
|
|
7
|
+
import { ComponentType, ViewType } from '../../types/view';
|
|
8
8
|
import { SlatePlaceholder } from '../../types/feature';
|
|
9
|
+
import { BaseElementComponent, BaseLeafComponent, BaseTextComponent } from '../../view/base';
|
|
10
|
+
import { ListRender } from '../../view/render/list-render';
|
|
9
11
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class
|
|
12
|
+
export declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewChecked, DoCheck {
|
|
11
13
|
elementRef: ElementRef;
|
|
12
14
|
renderer2: Renderer2;
|
|
13
15
|
cdr: ChangeDetectorRef;
|
|
14
16
|
private ngZone;
|
|
15
17
|
private injector;
|
|
18
|
+
defaultElement: ComponentType<BaseElementComponent>;
|
|
19
|
+
defaultText: ComponentType<BaseTextComponent>;
|
|
20
|
+
defaultVoidText: ComponentType<BaseTextComponent>;
|
|
21
|
+
defaultLeaf: ComponentType<BaseLeafComponent>;
|
|
16
22
|
viewContext: SlateViewContext;
|
|
17
23
|
context: SlateChildrenContext;
|
|
18
24
|
private destroy$;
|
|
@@ -57,9 +63,13 @@ export declare class SlateEditableComponent implements OnInit, OnChanges, OnDest
|
|
|
57
63
|
dataSlateNode: string;
|
|
58
64
|
dataGramm: boolean;
|
|
59
65
|
get hasBeforeInputSupport(): boolean;
|
|
60
|
-
templateComponent:
|
|
66
|
+
templateComponent: SlateStringTemplate;
|
|
61
67
|
templateElementRef: ElementRef<any>;
|
|
62
|
-
|
|
68
|
+
viewContainerRef: ViewContainerRef;
|
|
69
|
+
getOutletElement: () => any;
|
|
70
|
+
listRender: ListRender;
|
|
71
|
+
private throttleRAF;
|
|
72
|
+
constructor(elementRef: ElementRef, renderer2: Renderer2, cdr: ChangeDetectorRef, ngZone: NgZone, injector: Injector, defaultElement: ComponentType<BaseElementComponent>, defaultText: ComponentType<BaseTextComponent>, defaultVoidText: ComponentType<BaseTextComponent>, defaultLeaf: ComponentType<BaseLeafComponent>);
|
|
63
73
|
ngOnInit(): void;
|
|
64
74
|
ngOnChanges(simpleChanges: SimpleChanges): void;
|
|
65
75
|
registerOnChange(fn: any): void;
|
|
@@ -70,10 +80,11 @@ export declare class SlateEditableComponent implements OnInit, OnChanges, OnDest
|
|
|
70
80
|
onChange(): void;
|
|
71
81
|
ngAfterViewChecked(): void;
|
|
72
82
|
ngDoCheck(): void;
|
|
73
|
-
|
|
83
|
+
forceRender(): void;
|
|
84
|
+
render(): void;
|
|
85
|
+
updateContext(): boolean;
|
|
74
86
|
initializeContext(): void;
|
|
75
87
|
initializeViewContext(): void;
|
|
76
|
-
detectContext(): void;
|
|
77
88
|
composePlaceholderDecorate(editor: Editor): SlatePlaceholder[];
|
|
78
89
|
generateDecorations(): import("slate").BaseRange[];
|
|
79
90
|
private addEventListener;
|
|
@@ -96,8 +107,8 @@ export declare class SlateEditableComponent implements OnInit, OnChanges, OnDest
|
|
|
96
107
|
private onFallbackBeforeInput;
|
|
97
108
|
private isDOMEventHandled;
|
|
98
109
|
ngOnDestroy(): void;
|
|
99
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
100
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
110
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateEditable, never>;
|
|
111
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateEditable, "slate-editable", never, { "editor": { "alias": "editor"; "required": false; }; "renderElement": { "alias": "renderElement"; "required": false; }; "renderLeaf": { "alias": "renderLeaf"; "required": false; }; "renderText": { "alias": "renderText"; "required": false; }; "decorate": { "alias": "decorate"; "required": false; }; "placeholderDecorate": { "alias": "placeholderDecorate"; "required": false; }; "scrollSelectionIntoView": { "alias": "scrollSelectionIntoView"; "required": false; }; "isStrictDecorate": { "alias": "isStrictDecorate"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "beforeInput": { "alias": "beforeInput"; "required": false; }; "blur": { "alias": "blur"; "required": false; }; "click": { "alias": "click"; "required": false; }; "compositionEnd": { "alias": "compositionEnd"; "required": false; }; "compositionUpdate": { "alias": "compositionUpdate"; "required": false; }; "compositionStart": { "alias": "compositionStart"; "required": false; }; "copy": { "alias": "copy"; "required": false; }; "cut": { "alias": "cut"; "required": false; }; "dragOver": { "alias": "dragOver"; "required": false; }; "dragStart": { "alias": "dragStart"; "required": false; }; "dragEnd": { "alias": "dragEnd"; "required": false; }; "drop": { "alias": "drop"; "required": false; }; "focus": { "alias": "focus"; "required": false; }; "keydown": { "alias": "keydown"; "required": false; }; "paste": { "alias": "paste"; "required": false; }; "spellCheck": { "alias": "spellCheck"; "required": false; }; "autoCorrect": { "alias": "autoCorrect"; "required": false; }; "autoCapitalize": { "alias": "autoCapitalize"; "required": false; }; }, {}, never, never, true, never>;
|
|
101
112
|
}
|
|
102
113
|
export declare const defaultScrollSelectionIntoView: (editor: AngularEditor, domRange: DOMRange) => void;
|
|
103
114
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseElementComponent } from '../../view/base';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
3
|
+
export declare class SlateDefaultElement extends BaseElementComponent {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateDefaultElement, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateDefaultElement, "div[slateDefaultElement]", never, {}, {}, never, never, true, never>;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseElementComponent } from '../../view/base';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
3
|
+
export declare class SlateElement extends BaseElementComponent {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateElement, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateElement, "[slateElement]", never, {}, {}, never, ["*"], true, never>;
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { BaseLeafComponent } from '../../view/base';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class SlateDefaultLeaf extends BaseLeafComponent implements OnDestroy {
|
|
5
5
|
onContextChange(): void;
|
|
6
6
|
ngOnDestroy(): void;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateDefaultLeaf, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateDefaultLeaf, "span[slateDefaultLeaf]", never, {}, {}, never, never, true, never>;
|
|
9
9
|
}
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
import { AfterViewInit, OnChanges, OnInit, QueryList, SimpleChanges } from '@angular/core';
|
|
2
1
|
import { Text } from 'slate';
|
|
3
2
|
import { SlateLeafContext, SlateTextContext } from '../../view/context';
|
|
4
3
|
import { ViewContainer } from '../../view/container';
|
|
5
|
-
import { SlateLeafComponent } from '../leaf/leaf.component';
|
|
6
4
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
5
|
+
export declare class SlateLeaves extends ViewContainer<any> {
|
|
8
6
|
initialized: boolean;
|
|
9
7
|
leafContexts: SlateLeafContext[];
|
|
10
8
|
leaves: Text[];
|
|
11
9
|
context: SlateTextContext;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
getLeafContexts(): {
|
|
15
|
-
leaf: import("slate").BaseText;
|
|
16
|
-
text: import("slate").BaseText;
|
|
17
|
-
parent: import("slate").BaseElement;
|
|
18
|
-
index: number;
|
|
19
|
-
isLast: boolean;
|
|
20
|
-
}[];
|
|
21
|
-
ngOnChanges(simpleChanges: SimpleChanges): void;
|
|
22
|
-
trackBy(index: any, item: any): any;
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SlateLeavesComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SlateLeavesComponent, "slate-leaves", never, { "context": { "alias": "context"; "required": false; }; }, {}, never, never, false, never>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateLeaves, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateLeaves, "slate-leaves", never, { "context": { "alias": "context"; "required": false; }; }, {}, never, never, true, never>;
|
|
25
12
|
}
|
|
@@ -4,7 +4,7 @@ import { BaseComponent } from '../../view/base';
|
|
|
4
4
|
import { BeforeContextChange } from '../../view/before-context-change';
|
|
5
5
|
import { DOMElement } from '../../utils/dom';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class SlateDefaultString extends BaseComponent<SlateStringContext> implements OnInit, BeforeContextChange<SlateStringContext> {
|
|
8
8
|
elementRef: ElementRef<any>;
|
|
9
9
|
cdr: ChangeDetectorRef;
|
|
10
10
|
textNode?: Text;
|
|
@@ -18,6 +18,6 @@ export declare class SlateDefaultStringComponent extends BaseComponent<SlateStri
|
|
|
18
18
|
updateStringDOM(): void;
|
|
19
19
|
removeStringDOM(): void;
|
|
20
20
|
ngOnInit(): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateDefaultString, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateDefaultString, "span[slateDefaultString]", never, {}, {}, never, never, true, never>;
|
|
23
23
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { OnInit, OnChanges, ElementRef, ViewContainerRef, AfterViewInit } from '@angular/core';
|
|
2
2
|
import { ViewContainerItem } from '../../view/container-item';
|
|
3
3
|
import { SlateLeafContext, SlateStringContext } from '../../view/context';
|
|
4
|
-
import {
|
|
4
|
+
import { SlateDefaultString } from './default-string.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class
|
|
6
|
+
export declare class SlateString extends ViewContainerItem<SlateStringContext> implements OnInit, OnChanges, AfterViewInit {
|
|
7
7
|
private elementRef;
|
|
8
8
|
protected viewContainerRef: ViewContainerRef;
|
|
9
9
|
context: SlateLeafContext;
|
|
@@ -15,10 +15,18 @@ export declare class SlateStringComponent extends ViewContainerItem<SlateStringC
|
|
|
15
15
|
isEmptyText(): boolean;
|
|
16
16
|
isCompatibleString(): boolean;
|
|
17
17
|
isVoid(): boolean;
|
|
18
|
-
getViewType(): import("@angular/core").TemplateRef<any> | typeof
|
|
18
|
+
getViewType(): import("@angular/core").TemplateRef<any> | typeof SlateDefaultString;
|
|
19
19
|
getType(): SlateStringContext['type'];
|
|
20
20
|
getContext(): SlateStringContext;
|
|
21
21
|
memoizedContext(prev: SlateStringContext, next: SlateStringContext): boolean;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateString, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateString, "span[slateString]", never, { "context": { "alias": "context"; "required": false; }; }, {}, never, never, true, never>;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* TODO: remove when bump slate
|
|
27
|
+
* copy from slate
|
|
28
|
+
* @param editor
|
|
29
|
+
* @param element
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
export declare const isEmpty: (editor: any, element: any) => boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class SlateStringTemplate {
|
|
4
4
|
compatibleStringTemplate: TemplateRef<any>;
|
|
5
5
|
voidStringTemplate: TemplateRef<any>;
|
|
6
6
|
emptyTextTemplate: TemplateRef<any>;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateStringTemplate, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateStringTemplate, "slate-string-template", never, {}, {}, never, never, true, never>;
|
|
9
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseTextComponent } from '../../view/base';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
3
|
+
export declare class SlateDefaultText extends BaseTextComponent {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateDefaultText, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateDefaultText, "span[slateDefaultText]", never, {}, {}, never, never, true, never>;
|
|
6
6
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { ComponentType } from '../../types/view';
|
|
3
|
+
import { BaseTextComponent } from '../../view/base';
|
|
4
|
+
export declare const SLATE_DEFAULT_TEXT_COMPONENT_TOKEN: InjectionToken<ComponentType<BaseTextComponent<import("slate").BaseText>>>;
|
|
5
|
+
export declare const SLATE_DEFAULT_VOID_TEXT_COMPONENT_TOKEN: InjectionToken<ComponentType<BaseTextComponent<import("slate").BaseText>>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { OnInit, OnChanges } from '@angular/core';
|
|
2
2
|
import { BaseTextComponent } from '../../view/base';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class SlateVoidText extends BaseTextComponent implements OnInit, OnChanges {
|
|
5
5
|
isLeafBlock: boolean;
|
|
6
6
|
ngOnInit(): void;
|
|
7
7
|
ngOnChanges(): void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlateVoidText, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlateVoidText, "span[slateVoidText]", never, {}, {}, never, never, true, never>;
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, ViewChild } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export class
|
|
3
|
+
export class SlateBlockCard {
|
|
4
4
|
get nativeElement() {
|
|
5
5
|
return this.elementRef.nativeElement;
|
|
6
6
|
}
|
|
@@ -20,14 +20,14 @@ export class SlateBlockCardComponent {
|
|
|
20
20
|
initializeCenter(rootNodes) {
|
|
21
21
|
this.centerRootNodes = rootNodes;
|
|
22
22
|
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type:
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type:
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateBlockCard, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateBlockCard, isStandalone: true, 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>\n" }); }
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type:
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateBlockCard, decorators: [{
|
|
27
27
|
type: Component,
|
|
28
|
-
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>\n" }]
|
|
28
|
+
args: [{ selector: 'slate-block-card, [slateBlockCard]', standalone: true, 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>\n" }]
|
|
29
29
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { centerContianer: [{
|
|
30
30
|
type: ViewChild,
|
|
31
31
|
args: ['centerContianer', { static: true }]
|
|
32
32
|
}] } });
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2stY2FyZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9zcmMvY29tcG9uZW50cy9ibG9jay1jYXJkL2Jsb2NrLWNhcmQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vcGFja2FnZXMvc3JjL2NvbXBvbmVudHMvYmxvY2stY2FyZ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cGVuZCgpIHtcbiAgICAgICAgdGhpcy5jZW50ZXJSb290Tm9kZXMuZm9yRWFjaChcbiAgICAgICAgICAgIHJvb3ROb2RlID0+ICF0aGlzLmNlbnRlckNvbnRhaW5lckVsZW1lbnQuY29udGFpbnMocm9vdE5vZGUpICYmIHRoaXMuY2VudGVyQ29udGFpbmVyRWxlbWVudC5hcHBlbmRDaGlsZChyb290Tm9kZSlcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBpbml0aWFsaXplQ2VudGVyKHJvb3ROb2RlczogSFRNTEVsZW1lbnRbXSkge1xuICAgICAgICB0aGlzLmNlbnRlclJvb3ROb2RlcyA9IHJvb3ROb2RlcztcbiAgICB9XG59XG4iLCI8c3BhbiBjYXJkLXRhcmdldD1cImNhcmQtbGVmdFwiIGNsYXNzPVwiY2FyZC1sZWZ0XCI+e3sgJ1xcdUZFRkYnIH19PC9zcGFuPlxuPGRpdiBjYXJkLXRhcmdldD1cImNhcmQtY2VudGVyXCIgI2NlbnRlckNvbnRpYW5lcj48L2Rpdj5cbjxzcGFuIGNhcmQtdGFyZ2V0PVwiY2FyZC1yaWdodFwiIGNsYXNzPVwiY2FyZC1yaWdodFwiPnt7ICdcXHVGRUZGJyB9fTwvc3Bhbj5cbiJdfQ==
|
|
@@ -1,41 +1,19 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input
|
|
2
|
-
import { SlateDescendantComponent } from '../descendant/descendant.component';
|
|
3
|
-
import { AngularEditor } from '../../plugins/angular-editor';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
4
2
|
import { ViewContainer } from '../../view/container';
|
|
3
|
+
import { NgFor } from '@angular/common';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.trackBy = (index, node) => {
|
|
12
|
-
return this.viewContext.trackBy(node) || AngularEditor.findKey(this.viewContext.editor, node);
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
ngOnInit() { }
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateChildrenComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", 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
|
|
18
|
-
[descendant]="descendant"
|
|
19
|
-
[context]="context"
|
|
20
|
-
[viewContext]="viewContext"
|
|
21
|
-
[viewContext]="viewContext"
|
|
22
|
-
[index]="index"
|
|
23
|
-
*ngFor="let descendant of children; let index = index; trackBy: trackBy"
|
|
24
|
-
></slate-descendant>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.SlateDescendantComponent, selector: "slate-descendant", inputs: ["descendant", "context", "viewContext", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5
|
+
export class SlateChildren extends ViewContainer {
|
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateChildren, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
7
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateChildren, isStandalone: true, selector: "slate-children", inputs: { children: "children", context: "context", viewContext: "viewContext" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25
8
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type:
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateChildren, decorators: [{
|
|
27
10
|
type: Component,
|
|
28
11
|
args: [{
|
|
29
12
|
selector: 'slate-children',
|
|
30
|
-
template:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
[viewContext]="viewContext"
|
|
35
|
-
[index]="index"
|
|
36
|
-
*ngFor="let descendant of children; let index = index; trackBy: trackBy"
|
|
37
|
-
></slate-descendant>`,
|
|
38
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
13
|
+
template: ``,
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
standalone: true,
|
|
16
|
+
imports: [NgFor]
|
|
39
17
|
}]
|
|
40
18
|
}], propDecorators: { children: [{
|
|
41
19
|
type: Input
|
|
@@ -43,8 +21,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
|
|
|
43
21
|
type: Input
|
|
44
22
|
}], viewContext: [{
|
|
45
23
|
type: Input
|
|
46
|
-
}], childrenComponent: [{
|
|
47
|
-
type: ViewChildren,
|
|
48
|
-
args: [SlateDescendantComponent, { read: SlateDescendantComponent }]
|
|
49
24
|
}] } });
|
|
50
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hpbGRyZW4uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcGFja2FnZXMvc3JjL2NvbXBvbmVudHMvY2hpbGRyZW4vY2hpbGRyZW4uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVB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