@tmdjr/ngx-editor-js2 19.0.3 → 20.0.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/fesm2022/tmdjr-ngx-editor-js2.mjs +154 -132
- package/fesm2022/tmdjr-ngx-editor-js2.mjs.map +1 -1
- package/index.d.ts +244 -5
- package/package.json +8 -7
- package/lib/components/blocks/header-block.component.d.ts +0 -17
- package/lib/components/blocks/paragraph-block.component.d.ts +0 -17
- package/lib/components/editor-js.component.d.ts +0 -17
- package/lib/components/toolbar/toolbar-block-options.component.d.ts +0 -12
- package/lib/components/toolbar/toolbar-blocks.component.d.ts +0 -15
- package/lib/components/toolbar/toolbar.component.d.ts +0 -22
- package/lib/components/toolbar-inline/toolbar-inline.component.d.ts +0 -21
- package/lib/directives/autofocus.directive.d.ts +0 -9
- package/lib/directives/clean-paste-data.directive.d.ts +0 -6
- package/lib/directives/control-accessor.directive.d.ts +0 -16
- package/lib/directives/toolbar-fab.directive.d.ts +0 -20
- package/lib/ngx-editor-js2.component.d.ts +0 -24
- package/lib/ngx-editor-js2.interface.d.ts +0 -43
- package/lib/services/block-movement.service.d.ts +0 -18
- package/lib/services/editor-js.service.d.ts +0 -25
- package/lib/services/ngx-editor-js2.service.d.ts +0 -48
- package/lib/services/tool-fab.service.d.ts +0 -25
- package/lib/services/toolbar-inline.service.d.ts +0 -13
- package/public-api.d.ts +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, input, forwardRef,
|
|
2
|
+
import { inject, ElementRef, input, forwardRef, HostListener, Directive, output, Component, signal, Injectable, ViewContainerRef, effect, InjectionToken, viewChild, EventEmitter, Renderer2, Output } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule, FormBuilder, FormsModule } from '@angular/forms';
|
|
5
5
|
import { startWith, combineLatest, map, firstValueFrom, of, from, tap, filter, defaultIfEmpty, Observable, lastValueFrom, forkJoin, iif, switchMap, mergeMap, BehaviorSubject, distinctUntilChanged, delay, exhaustMap, merge, fromEvent, debounceTime } from 'rxjs';
|
|
@@ -10,7 +10,7 @@ import * as i1 from '@angular/cdk/overlay';
|
|
|
10
10
|
import { OverlayModule, Overlay } from '@angular/cdk/overlay';
|
|
11
11
|
import * as i1$2 from '@angular/material/icon';
|
|
12
12
|
import { MatIcon, MatIconModule } from '@angular/material/icon';
|
|
13
|
-
import { AsyncPipe,
|
|
13
|
+
import { AsyncPipe, NgTemplateOutlet, NgClass } from '@angular/common';
|
|
14
14
|
import { toObservable } from '@angular/core/rxjs-interop';
|
|
15
15
|
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
|
16
16
|
import { MatInput } from '@angular/material/input';
|
|
@@ -37,8 +37,8 @@ class ControlAccessorDirective {
|
|
|
37
37
|
onInput() {
|
|
38
38
|
this.onChange(this.elementRef.nativeElement.innerHTML);
|
|
39
39
|
}
|
|
40
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
41
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
40
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ControlAccessorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
41
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: ControlAccessorDirective, isStandalone: true, selector: "[controlAccessor]", inputs: { defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "onBlur()", "input": "onInput()" } }, providers: [
|
|
42
42
|
{
|
|
43
43
|
provide: NG_VALUE_ACCESSOR,
|
|
44
44
|
useExisting: forwardRef(() => ControlAccessorDirective),
|
|
@@ -46,7 +46,7 @@ class ControlAccessorDirective {
|
|
|
46
46
|
},
|
|
47
47
|
], ngImport: i0 });
|
|
48
48
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ControlAccessorDirective, decorators: [{
|
|
50
50
|
type: Directive,
|
|
51
51
|
args: [{
|
|
52
52
|
selector: '[controlAccessor]',
|
|
@@ -72,10 +72,10 @@ class AutofocusDirective {
|
|
|
72
72
|
ngAfterContentInit() {
|
|
73
73
|
this.autofocus() && this.elementRef.nativeElement.focus?.();
|
|
74
74
|
}
|
|
75
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
76
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
75
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AutofocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
76
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: AutofocusDirective, isStandalone: true, selector: "[autofocus]", inputs: { autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
77
77
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AutofocusDirective, decorators: [{
|
|
79
79
|
type: Directive,
|
|
80
80
|
args: [{
|
|
81
81
|
selector: '[autofocus]',
|
|
@@ -102,8 +102,8 @@ class ToolbarBlockOptionsComponent {
|
|
|
102
102
|
handleAction(action) {
|
|
103
103
|
this.handleActionEmitter.emit(action);
|
|
104
104
|
}
|
|
105
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
106
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
105
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarBlockOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
106
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: ToolbarBlockOptionsComponent, isStandalone: true, selector: "toolbar-block-options", inputs: { blockOptionActions: { classPropertyName: "blockOptionActions", publicName: "blockOptionActions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { handleActionEmitter: "handleAction", moveBlockPositionEmitter: "moveBlockPosition" }, ngImport: i0, template: `
|
|
107
107
|
<div class="actions-panel mat-elevation-z24">
|
|
108
108
|
<div class="action-btn" matRipple (click)="movePosition(Position.UP)">
|
|
109
109
|
<mat-icon>arrow_upward</mat-icon>
|
|
@@ -128,9 +128,9 @@ class ToolbarBlockOptionsComponent {
|
|
|
128
128
|
</div>
|
|
129
129
|
}
|
|
130
130
|
</div>
|
|
131
|
-
`, isInline: true, styles: [":host .actions-panel{display:flex;flex-direction:row;flex-wrap:wrap;gap:1px;width:128px;max-height:128px;border-radius:4px;overflow:auto;background:var(--mat-sys-secondary)}:host .actions-panel .action-btn{cursor:pointer;width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:4px;color:var(--mat-sys-on-secondary);background:var(--mat-sys-secondary)}:host .actions-panel .action-btn:
|
|
131
|
+
`, isInline: true, styles: [":host .actions-panel{display:flex;flex-direction:row;flex-wrap:wrap;gap:1px;width:128px;max-height:128px;border-radius:4px;overflow:auto;background:var(--mat-sys-secondary)}:host .actions-panel .action-btn{cursor:pointer;width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:4px;color:var(--mat-sys-on-secondary);background:var(--mat-sys-secondary)}:host .actions-panel .action-btn:hover,:host .actions-panel .action-btn:focus{color:var(--mat-sys-secondary);background:var(--mat-sys-on-secondary)}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }] });
|
|
132
132
|
}
|
|
133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarBlockOptionsComponent, decorators: [{
|
|
134
134
|
type: Component,
|
|
135
135
|
args: [{ selector: 'toolbar-block-options', imports: [MatIcon, MatRipple], template: `
|
|
136
136
|
<div class="actions-panel mat-elevation-z24">
|
|
@@ -157,7 +157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
157
157
|
</div>
|
|
158
158
|
}
|
|
159
159
|
</div>
|
|
160
|
-
`, styles: [":host .actions-panel{display:flex;flex-direction:row;flex-wrap:wrap;gap:1px;width:128px;max-height:128px;border-radius:4px;overflow:auto;background:var(--mat-sys-secondary)}:host .actions-panel .action-btn{cursor:pointer;width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:4px;color:var(--mat-sys-on-secondary);background:var(--mat-sys-secondary)}:host .actions-panel .action-btn:
|
|
160
|
+
`, styles: [":host .actions-panel{display:flex;flex-direction:row;flex-wrap:wrap;gap:1px;width:128px;max-height:128px;border-radius:4px;overflow:auto;background:var(--mat-sys-secondary)}:host .actions-panel .action-btn{cursor:pointer;width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:4px;color:var(--mat-sys-on-secondary);background:var(--mat-sys-secondary)}:host .actions-panel .action-btn:hover,:host .actions-panel .action-btn:focus{color:var(--mat-sys-secondary);background:var(--mat-sys-on-secondary)}\n"] }]
|
|
161
161
|
}] });
|
|
162
162
|
|
|
163
163
|
class ToolbarBlocksComponent {
|
|
@@ -181,8 +181,8 @@ class ToolbarBlocksComponent {
|
|
|
181
181
|
addBlock(block) {
|
|
182
182
|
this.addBlockEmitter.emit(block?.component);
|
|
183
183
|
}
|
|
184
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
185
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
184
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarBlocksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
185
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: ToolbarBlocksComponent, isStandalone: true, selector: "toolbar-blocks", inputs: { supportedBlocks: { classPropertyName: "supportedBlocks", publicName: "supportedBlocks", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addBlockEmitter: "addBlock" }, ngImport: i0, template: `
|
|
186
186
|
<div class="block-list-container mat-elevation-z24">
|
|
187
187
|
<mat-form-field appearance="fill" color="accent">
|
|
188
188
|
<mat-label>Filter</mat-label>
|
|
@@ -205,9 +205,9 @@ class ToolbarBlocksComponent {
|
|
|
205
205
|
</mat-list>
|
|
206
206
|
}
|
|
207
207
|
</div>
|
|
208
|
-
`, isInline: true, styles: [":host .mat-mdc-list-base{padding-top:0;margin-top:-14px}:host .block-list-container{background:var(--mat-sys-secondary-container);border-radius:4px}:host .block-list-panel{max-width:280px;max-height:240px;border-bottom-left-radius:4px;border-bottom-right-radius:4px;overflow:auto;color:var(--mat-sys-on-secondary-container)}:host mat-list-item{cursor:pointer;-webkit-user-select:none;user-select:none}:host mat-list-item:
|
|
208
|
+
`, isInline: true, styles: [":host .mat-mdc-list-base{padding-top:0;margin-top:-14px}:host .block-list-container{background:var(--mat-sys-secondary-container);border-radius:4px}:host .block-list-panel{max-width:280px;max-height:240px;border-bottom-left-radius:4px;border-bottom-right-radius:4px;overflow:auto;color:var(--mat-sys-on-secondary-container)}:host mat-list-item{cursor:pointer;-webkit-user-select:none;user-select:none}:host mat-list-item:hover,:host mat-list-item:focus{background:var(--mat-sys-surface-bright)}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
|
|
209
209
|
}
|
|
210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarBlocksComponent, decorators: [{
|
|
211
211
|
type: Component,
|
|
212
212
|
args: [{ selector: 'toolbar-blocks', imports: [
|
|
213
213
|
MatFormField,
|
|
@@ -241,7 +241,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
241
241
|
</mat-list>
|
|
242
242
|
}
|
|
243
243
|
</div>
|
|
244
|
-
`, styles: [":host .mat-mdc-list-base{padding-top:0;margin-top:-14px}:host .block-list-container{background:var(--mat-sys-secondary-container);border-radius:4px}:host .block-list-panel{max-width:280px;max-height:240px;border-bottom-left-radius:4px;border-bottom-right-radius:4px;overflow:auto;color:var(--mat-sys-on-secondary-container)}:host mat-list-item{cursor:pointer;-webkit-user-select:none;user-select:none}:host mat-list-item:
|
|
244
|
+
`, styles: [":host .mat-mdc-list-base{padding-top:0;margin-top:-14px}:host .block-list-container{background:var(--mat-sys-secondary-container);border-radius:4px}:host .block-list-panel{max-width:280px;max-height:240px;border-bottom-left-radius:4px;border-bottom-right-radius:4px;overflow:auto;color:var(--mat-sys-on-secondary-container)}:host mat-list-item{cursor:pointer;-webkit-user-select:none;user-select:none}:host mat-list-item:hover,:host mat-list-item:focus{background:var(--mat-sys-surface-bright)}\n"] }]
|
|
245
245
|
}] });
|
|
246
246
|
|
|
247
247
|
class ToolbarComponent {
|
|
@@ -276,8 +276,8 @@ class ToolbarComponent {
|
|
|
276
276
|
this.openBlocks.set(false);
|
|
277
277
|
this.openBlocksOption.set(false);
|
|
278
278
|
}
|
|
279
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
280
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
279
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
280
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: ToolbarComponent, isStandalone: true, selector: "toolbar", inputs: { componentContextPositionIndex: { classPropertyName: "componentContextPositionIndex", publicName: "componentContextPositionIndex", isSignal: true, isRequired: true, transformFunction: null }, supportedBlocks: { classPropertyName: "supportedBlocks", publicName: "supportedBlocks", isSignal: true, isRequired: true, transformFunction: null }, blockOptionActions: { classPropertyName: "blockOptionActions", publicName: "blockOptionActions", isSignal: true, isRequired: false, transformFunction: null }, actionCallback: { classPropertyName: "actionCallback", publicName: "actionCallback", isSignal: true, isRequired: false, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: false, transformFunction: null }, addBlockCallback: { classPropertyName: "addBlockCallback", publicName: "addBlockCallback", isSignal: true, isRequired: true, transformFunction: null }, moveBlockPositionCallback: { classPropertyName: "moveBlockPositionCallback", publicName: "moveBlockPositionCallback", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
281
281
|
<div class="toolbar-buttons-container">
|
|
282
282
|
<div
|
|
283
283
|
class="toolbar-buttons mat-elevation-z4"
|
|
@@ -333,9 +333,9 @@ class ToolbarComponent {
|
|
|
333
333
|
(moveBlockPosition)="moveBlockPosition($event)"
|
|
334
334
|
></toolbar-block-options>
|
|
335
335
|
</ng-template>
|
|
336
|
-
`, isInline: true, styles: [":host .toolbar-buttons-container{position:relative;display:flex;gap:10px}:host .toolbar-buttons{cursor:pointer;width:30px;height:30px;display:flex;justify-content:center;align-items:center;border-radius:4px;margin-bottom:14px;-webkit-user-select:none;user-select:none;color:var(--mat-sys-on-tertiary-container);background:var(--mat-sys-tertiary-container)}:host .toolbar-buttons:
|
|
336
|
+
`, isInline: true, styles: [":host .toolbar-buttons-container{position:relative;display:flex;gap:10px}:host .toolbar-buttons{cursor:pointer;width:30px;height:30px;display:flex;justify-content:center;align-items:center;border-radius:4px;margin-bottom:14px;-webkit-user-select:none;user-select:none;color:var(--mat-sys-on-tertiary-container);background:var(--mat-sys-tertiary-container)}:host .toolbar-buttons:hover,:host .toolbar-buttons:focus{background:var(--mat-sys-surface-bright)}@media (min-width: 768px){:host{position:absolute;margin-left:-80px;top:0}}\n"], dependencies: [{ kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ToolbarBlockOptionsComponent, selector: "toolbar-block-options", inputs: ["blockOptionActions"], outputs: ["handleAction", "moveBlockPosition"] }, { kind: "component", type: ToolbarBlocksComponent, selector: "toolbar-blocks", inputs: ["supportedBlocks"], outputs: ["addBlock"] }] });
|
|
337
337
|
}
|
|
338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarComponent, decorators: [{
|
|
339
339
|
type: Component,
|
|
340
340
|
args: [{ selector: 'toolbar', imports: [
|
|
341
341
|
CdkDragHandle,
|
|
@@ -399,7 +399,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
399
399
|
(moveBlockPosition)="moveBlockPosition($event)"
|
|
400
400
|
></toolbar-block-options>
|
|
401
401
|
</ng-template>
|
|
402
|
-
`, styles: [":host .toolbar-buttons-container{position:relative;display:flex;gap:10px}:host .toolbar-buttons{cursor:pointer;width:30px;height:30px;display:flex;justify-content:center;align-items:center;border-radius:4px;margin-bottom:14px;-webkit-user-select:none;user-select:none;color:var(--mat-sys-on-tertiary-container);background:var(--mat-sys-tertiary-container)}:host .toolbar-buttons:
|
|
402
|
+
`, styles: [":host .toolbar-buttons-container{position:relative;display:flex;gap:10px}:host .toolbar-buttons{cursor:pointer;width:30px;height:30px;display:flex;justify-content:center;align-items:center;border-radius:4px;margin-bottom:14px;-webkit-user-select:none;user-select:none;color:var(--mat-sys-on-tertiary-container);background:var(--mat-sys-tertiary-container)}:host .toolbar-buttons:hover,:host .toolbar-buttons:focus{background:var(--mat-sys-surface-bright)}@media (min-width: 768px){:host{position:absolute;margin-left:-80px;top:0}}\n"] }]
|
|
403
403
|
}] });
|
|
404
404
|
|
|
405
405
|
class BlockMovementService {
|
|
@@ -435,10 +435,10 @@ class BlockMovementService {
|
|
|
435
435
|
removeBlockComponent(ngxEditor, index, clear = false) {
|
|
436
436
|
return of(Array.from(this.componentRefMap.values())).pipe(filter((componentRefs) => clear || componentRefs.length !== 1), map((componentRefs) => componentRefs.find((componentRef) => ngxEditor.indexOf(componentRef.hostView) === index - 1)), map((componentRef) => this.componentRefMap.delete(componentRef?.instance ?? {})), tap((successful) => successful && ngxEditor.remove(index - 1)), defaultIfEmpty(false));
|
|
437
437
|
}
|
|
438
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
439
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
438
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: BlockMovementService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
439
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: BlockMovementService, providedIn: 'root' });
|
|
440
440
|
}
|
|
441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: BlockMovementService, decorators: [{
|
|
442
442
|
type: Injectable,
|
|
443
443
|
args: [{
|
|
444
444
|
providedIn: 'root',
|
|
@@ -527,10 +527,10 @@ class EditorJsService {
|
|
|
527
527
|
this.ngxEditor.clear();
|
|
528
528
|
}), defaultIfEmpty(false));
|
|
529
529
|
}
|
|
530
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
531
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
530
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: EditorJsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
531
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: EditorJsService, providedIn: 'root' });
|
|
532
532
|
}
|
|
533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: EditorJsService, decorators: [{
|
|
534
534
|
type: Injectable,
|
|
535
535
|
args: [{
|
|
536
536
|
providedIn: 'root',
|
|
@@ -569,10 +569,10 @@ class ToolFabService {
|
|
|
569
569
|
movePositionAction(action, index, formControlName) {
|
|
570
570
|
return lastValueFrom(this.editorJsService.determineMovePositionAction(action, index, formControlName));
|
|
571
571
|
}
|
|
572
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
573
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
572
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolFabService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
573
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolFabService, providedIn: 'root' });
|
|
574
574
|
}
|
|
575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolFabService, decorators: [{
|
|
576
576
|
type: Injectable,
|
|
577
577
|
args: [{
|
|
578
578
|
providedIn: 'root',
|
|
@@ -601,10 +601,10 @@ class ToolbarFabDirective {
|
|
|
601
601
|
this.autofocus() && this.onMouseEnter();
|
|
602
602
|
});
|
|
603
603
|
}
|
|
604
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
605
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
604
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarFabDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
605
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: ToolbarFabDirective, isStandalone: true, selector: "[toolbarFab]", inputs: { autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, blockOptionActions: { classPropertyName: "blockOptionActions", publicName: "blockOptionActions", isSignal: true, isRequired: false, transformFunction: null }, actionCallback: { classPropertyName: "actionCallback", publicName: "actionCallback", isSignal: true, isRequired: true, transformFunction: null }, componentContextPositionIndex: { classPropertyName: "componentContextPositionIndex", publicName: "componentContextPositionIndex", isSignal: true, isRequired: true, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter()" } }, ngImport: i0 });
|
|
606
606
|
}
|
|
607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
607
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarFabDirective, decorators: [{
|
|
608
608
|
type: Directive,
|
|
609
609
|
args: [{
|
|
610
610
|
selector: '[toolbarFab]',
|
|
@@ -620,10 +620,10 @@ class CleanPasteDataDirective {
|
|
|
620
620
|
const text = event.clipboardData?.getData('text/plain');
|
|
621
621
|
document.execCommand('insertText', false, text);
|
|
622
622
|
}
|
|
623
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
624
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
623
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: CleanPasteDataDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
624
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.4", type: CleanPasteDataDirective, isStandalone: true, selector: "[cleanPasteData]", host: { listeners: { "paste": "onPaste($event)" } }, ngImport: i0 });
|
|
625
625
|
}
|
|
626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: CleanPasteDataDirective, decorators: [{
|
|
627
627
|
type: Directive,
|
|
628
628
|
args: [{
|
|
629
629
|
selector: '[cleanPasteData]',
|
|
@@ -652,46 +652,58 @@ class HeaderBlockComponent {
|
|
|
652
652
|
actionCallback(selectedAction) {
|
|
653
653
|
this.savedAction.set(selectedAction);
|
|
654
654
|
}
|
|
655
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
656
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
<
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
</
|
|
655
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: HeaderBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
656
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: HeaderBlockComponent, isStandalone: true, selector: "header-block", inputs: { sortIndex: { classPropertyName: "sortIndex", publicName: "sortIndex", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: true, transformFunction: null }, blockOptionActions: { classPropertyName: "blockOptionActions", publicName: "blockOptionActions", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "cdk-drag-animating" }, hostDirectives: [{ directive: i1$1.CdkDrag }], ngImport: i0, template: `
|
|
657
|
+
@switch (savedAction()) {
|
|
658
|
+
@case ('h1') {
|
|
659
|
+
<h1>
|
|
660
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
661
|
+
</h1>
|
|
662
|
+
}
|
|
663
|
+
@case ('h2') {
|
|
664
|
+
<h2>
|
|
665
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
666
|
+
</h2>
|
|
667
|
+
}
|
|
668
|
+
@case ('h3') {
|
|
669
|
+
<h3>
|
|
670
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
671
|
+
</h3>
|
|
672
|
+
}
|
|
673
|
+
@case ('h4') {
|
|
674
|
+
<h4>
|
|
675
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
676
|
+
</h4>
|
|
677
|
+
}
|
|
678
|
+
@case ('h5') {
|
|
679
|
+
<h5>
|
|
680
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
681
|
+
</h5>
|
|
682
|
+
}
|
|
683
|
+
@case ('h6') {
|
|
684
|
+
<h6>
|
|
685
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
686
|
+
</h6>
|
|
687
|
+
}
|
|
688
|
+
}
|
|
677
689
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
<ng-template [formGroup]="formGroup()" #sharedHeaderTemplate>
|
|
691
|
+
<span
|
|
692
|
+
controlAccessor
|
|
693
|
+
cleanPasteData
|
|
694
|
+
contentEditable
|
|
695
|
+
toolbarFab
|
|
696
|
+
[defaultValue]="formGroup().get(formControlName())?.value"
|
|
697
|
+
[actionCallback]="actionCallbackBind"
|
|
698
|
+
[blockOptionActions]="blockOptionActions()"
|
|
699
|
+
[autofocus]="autofocus()"
|
|
700
|
+
[formControlName]="formControlName()"
|
|
701
|
+
[componentContextPositionIndex]="sortIndex()"
|
|
702
|
+
></span>
|
|
703
|
+
</ng-template>
|
|
704
|
+
`, isInline: true, styles: [":host{display:block;position:relative}:host :is(h1,h2,h3,h4,h5,h6){margin:0}:host :is(h1,h2,h3,h4,h5,h6) span{display:block;line-height:inherit}:host h1>*{font:var(--mat-sys-display-large)}:host h2>*{font:var(--mat-sys-display-medium)}:host h3>*{font:var(--mat-sys-display-small)}:host h4>*{font:var(--mat-sys-headline-large)}:host h5>*{font:var(--mat-sys-headline-medium)}:host h6>*{font:var(--mat-sys-headline-small)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: ControlAccessorDirective, selector: "[controlAccessor]", inputs: ["defaultValue"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: ToolbarFabDirective, selector: "[toolbarFab]", inputs: ["autofocus", "blockOptionActions", "actionCallback", "componentContextPositionIndex", "formControlName"] }, { kind: "directive", type: CleanPasteDataDirective, selector: "[cleanPasteData]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
693
705
|
}
|
|
694
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: HeaderBlockComponent, decorators: [{
|
|
695
707
|
type: Component,
|
|
696
708
|
args: [{ selector: 'header-block', host: { class: 'cdk-drag-animating' }, hostDirectives: [CdkDrag], imports: [
|
|
697
709
|
ReactiveFormsModule,
|
|
@@ -699,46 +711,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
699
711
|
AutofocusDirective,
|
|
700
712
|
ToolbarFabDirective,
|
|
701
713
|
CleanPasteDataDirective,
|
|
702
|
-
|
|
703
|
-
NgSwitchCase,
|
|
704
|
-
NgTemplateOutlet,
|
|
714
|
+
NgTemplateOutlet
|
|
705
715
|
], template: `
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
<
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
</
|
|
716
|
+
@switch (savedAction()) {
|
|
717
|
+
@case ('h1') {
|
|
718
|
+
<h1>
|
|
719
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
720
|
+
</h1>
|
|
721
|
+
}
|
|
722
|
+
@case ('h2') {
|
|
723
|
+
<h2>
|
|
724
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
725
|
+
</h2>
|
|
726
|
+
}
|
|
727
|
+
@case ('h3') {
|
|
728
|
+
<h3>
|
|
729
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
730
|
+
</h3>
|
|
731
|
+
}
|
|
732
|
+
@case ('h4') {
|
|
733
|
+
<h4>
|
|
734
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
735
|
+
</h4>
|
|
736
|
+
}
|
|
737
|
+
@case ('h5') {
|
|
738
|
+
<h5>
|
|
739
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
740
|
+
</h5>
|
|
741
|
+
}
|
|
742
|
+
@case ('h6') {
|
|
743
|
+
<h6>
|
|
744
|
+
<ng-container *ngTemplateOutlet="sharedHeaderTemplate"></ng-container>
|
|
745
|
+
</h6>
|
|
746
|
+
}
|
|
747
|
+
}
|
|
726
748
|
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
749
|
+
<ng-template [formGroup]="formGroup()" #sharedHeaderTemplate>
|
|
750
|
+
<span
|
|
751
|
+
controlAccessor
|
|
752
|
+
cleanPasteData
|
|
753
|
+
contentEditable
|
|
754
|
+
toolbarFab
|
|
755
|
+
[defaultValue]="formGroup().get(formControlName())?.value"
|
|
756
|
+
[actionCallback]="actionCallbackBind"
|
|
757
|
+
[blockOptionActions]="blockOptionActions()"
|
|
758
|
+
[autofocus]="autofocus()"
|
|
759
|
+
[formControlName]="formControlName()"
|
|
760
|
+
[componentContextPositionIndex]="sortIndex()"
|
|
761
|
+
></span>
|
|
762
|
+
</ng-template>
|
|
763
|
+
`, styles: [":host{display:block;position:relative}:host :is(h1,h2,h3,h4,h5,h6){margin:0}:host :is(h1,h2,h3,h4,h5,h6) span{display:block;line-height:inherit}:host h1>*{font:var(--mat-sys-display-large)}:host h2>*{font:var(--mat-sys-display-medium)}:host h3>*{font:var(--mat-sys-display-small)}:host h4>*{font:var(--mat-sys-headline-large)}:host h5>*{font:var(--mat-sys-headline-medium)}:host h6>*{font:var(--mat-sys-headline-small)}\n"] }]
|
|
742
764
|
}] });
|
|
743
765
|
|
|
744
766
|
class ParagraphBlockComponent {
|
|
@@ -760,8 +782,8 @@ class ParagraphBlockComponent {
|
|
|
760
782
|
actionCallback(action) {
|
|
761
783
|
this.savedAction.update(() => action);
|
|
762
784
|
}
|
|
763
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
764
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
785
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ParagraphBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
786
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: ParagraphBlockComponent, isStandalone: true, selector: "paragraph-block", inputs: { sortIndex: { classPropertyName: "sortIndex", publicName: "sortIndex", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: true, transformFunction: null }, blockOptionActions: { classPropertyName: "blockOptionActions", publicName: "blockOptionActions", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "cdk-drag-animating" }, hostDirectives: [{ directive: i1$1.CdkDrag }], ngImport: i0, template: `
|
|
765
787
|
<ng-container [formGroup]="formGroup()">
|
|
766
788
|
<p
|
|
767
789
|
controlAccessor
|
|
@@ -779,7 +801,7 @@ class ParagraphBlockComponent {
|
|
|
779
801
|
</ng-container>
|
|
780
802
|
`, isInline: true, styles: [":host{display:block;position:relative}:host .small{font:var(--mat-sys-body-small)}:host .medium{font:var(--mat-sys-body-medium)}:host .large{font:var(--mat-sys-body-large)}:host .title-small{font:var(--mat-sys-title-small)}:host .title-medium{font:var(--mat-sys-title-medium)}:host .title-large{font:var(--mat-sys-title-large)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: ControlAccessorDirective, selector: "[controlAccessor]", inputs: ["defaultValue"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: ToolbarFabDirective, selector: "[toolbarFab]", inputs: ["autofocus", "blockOptionActions", "actionCallback", "componentContextPositionIndex", "formControlName"] }, { kind: "directive", type: CleanPasteDataDirective, selector: "[cleanPasteData]" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
781
803
|
}
|
|
782
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ParagraphBlockComponent, decorators: [{
|
|
783
805
|
type: Component,
|
|
784
806
|
args: [{ selector: 'paragraph-block', host: { class: 'cdk-drag-animating' }, hostDirectives: [CdkDrag], imports: [
|
|
785
807
|
ReactiveFormsModule,
|
|
@@ -872,10 +894,10 @@ class NgxEditorJs2Service {
|
|
|
872
894
|
addBlocksToEditorJs(blocks) {
|
|
873
895
|
return combineLatest(blocks.map((block) => this.editorJsService.addBlockComponent(block)));
|
|
874
896
|
}
|
|
875
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
876
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
897
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxEditorJs2Service, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
898
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxEditorJs2Service, providedIn: 'root' });
|
|
877
899
|
}
|
|
878
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxEditorJs2Service, decorators: [{
|
|
879
901
|
type: Injectable,
|
|
880
902
|
args: [{
|
|
881
903
|
providedIn: 'root',
|
|
@@ -918,14 +940,14 @@ class EditorJsComponent {
|
|
|
918
940
|
});
|
|
919
941
|
});
|
|
920
942
|
}
|
|
921
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
922
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
943
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: EditorJsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
944
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.4", type: EditorJsComponent, isStandalone: true, selector: "editor-js", inputs: { bootstrapEditorJs: { classPropertyName: "bootstrapEditorJs", publicName: "bootstrapEditorJs", isSignal: true, isRequired: false, transformFunction: null }, blocks: { classPropertyName: "blocks", publicName: "blocks", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "ngxEditor", first: true, predicate: ["ngxEditor"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: `
|
|
923
945
|
<div cdkDropList class="block-list" (cdkDropListDropped)="drop($event)">
|
|
924
946
|
<ng-container #ngxEditor></ng-container>
|
|
925
947
|
</div>
|
|
926
948
|
`, isInline: true, styles: [":host{display:block}:host .block-list{min-height:60px}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }] });
|
|
927
949
|
}
|
|
928
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: EditorJsComponent, decorators: [{
|
|
929
951
|
type: Component,
|
|
930
952
|
args: [{ selector: 'editor-js', imports: [CdkDropList], template: `
|
|
931
953
|
<div cdkDropList class="block-list" (cdkDropListDropped)="drop($event)">
|
|
@@ -984,8 +1006,8 @@ class ToolbarInlineComponent {
|
|
|
984
1006
|
document.execCommand('createLink', false, this.url);
|
|
985
1007
|
this.closeOverlayEmitter.emit();
|
|
986
1008
|
}
|
|
987
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
988
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1009
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarInlineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1010
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: ToolbarInlineComponent, isStandalone: true, selector: "toolbar-inline", inputs: { selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { closeOverlayEmitter: "closeOverlay" }, host: { classAttribute: "mat-elevation-z24" }, ngImport: i0, template: `
|
|
989
1011
|
<div class="panel">
|
|
990
1012
|
@for (item of options; track $index) {
|
|
991
1013
|
<div class="inline-option" (click)="addInlineTag(item.action)">
|
|
@@ -1018,7 +1040,7 @@ class ToolbarInlineComponent {
|
|
|
1018
1040
|
}
|
|
1019
1041
|
`, isInline: true, styles: [":host{color:var(--mat-sys-on-secondary);background:var(--mat-sys-secondary);border-radius:8px}:host .panel{display:flex;width:230px;flex-wrap:wrap;gap:1px}:host .inline-option{cursor:pointer;width:32px;height:32px;display:flex;align-items:center;justify-content:center}:host .block-option-input{width:197px;height:32px;border:none;outline:none;color:var(--mat-sys-on-secondary);background-color:transparent;box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1020
1042
|
}
|
|
1021
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarInlineComponent, decorators: [{
|
|
1022
1044
|
type: Component,
|
|
1023
1045
|
args: [{ selector: 'toolbar-inline', imports: [MatListModule, MatIconModule, FormsModule], host: { class: 'mat-elevation-z24' }, template: `
|
|
1024
1046
|
<div class="panel">
|
|
@@ -1114,10 +1136,10 @@ class ToolbarInlineService {
|
|
|
1114
1136
|
]),
|
|
1115
1137
|
});
|
|
1116
1138
|
}
|
|
1117
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1118
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarInlineService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1140
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarInlineService, providedIn: 'root' });
|
|
1119
1141
|
}
|
|
1120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ToolbarInlineService, decorators: [{
|
|
1121
1143
|
type: Injectable,
|
|
1122
1144
|
args: [{
|
|
1123
1145
|
providedIn: 'root',
|
|
@@ -1138,15 +1160,15 @@ class NgxEditorJs2Component {
|
|
|
1138
1160
|
this.ngxEditorJs2Service.loadBlocks$,
|
|
1139
1161
|
fromEvent(document, 'selectionchange').pipe(debounceTime(200), switchMap((event) => this.inlineToolbarSerivce.determineToDisplayInlineToolbarBlock(event)))
|
|
1140
1162
|
]);
|
|
1141
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1142
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1163
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxEditorJs2Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1164
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: NgxEditorJs2Component, isStandalone: true, selector: "ngx-editor-js2", inputs: { blocks: { classPropertyName: "blocks", publicName: "blocks", isSignal: true, isRequired: false, transformFunction: null }, requestBlocks: { classPropertyName: "requestBlocks", publicName: "requestBlocks", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { blocksRequested: "blocksRequested" }, ngImport: i0, template: `
|
|
1143
1165
|
<editor-js
|
|
1144
1166
|
[blocks]="blocks()"
|
|
1145
1167
|
[bootstrapEditorJs]="bootstrapEditorJs$ | async"
|
|
1146
1168
|
></editor-js>
|
|
1147
1169
|
`, isInline: true, dependencies: [{ kind: "component", type: EditorJsComponent, selector: "editor-js", inputs: ["bootstrapEditorJs", "blocks"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
|
|
1148
1170
|
}
|
|
1149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxEditorJs2Component, decorators: [{
|
|
1150
1172
|
type: Component,
|
|
1151
1173
|
args: [{
|
|
1152
1174
|
selector: 'ngx-editor-js2',
|