matcha-components 20.244.0 → 20.245.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.
|
@@ -14776,7 +14776,12 @@ class MatchaTextEditorComponent {
|
|
|
14776
14776
|
});
|
|
14777
14777
|
}
|
|
14778
14778
|
ngOnDestroy() {
|
|
14779
|
-
|
|
14779
|
+
try {
|
|
14780
|
+
this._editor?.destroy();
|
|
14781
|
+
}
|
|
14782
|
+
catch {
|
|
14783
|
+
// DOM may already be detached during Angular route navigation
|
|
14784
|
+
}
|
|
14780
14785
|
this._editor = null;
|
|
14781
14786
|
this._editorReady = false;
|
|
14782
14787
|
}
|
|
@@ -14889,28 +14894,6 @@ class MatchaTextEditorComponent {
|
|
|
14889
14894
|
toolbar_sticky: 0,
|
|
14890
14895
|
...buildSunEditorConfig(this._config),
|
|
14891
14896
|
events: {
|
|
14892
|
-
onload: () => {
|
|
14893
|
-
// Defer to next tick so this._editor is guaranteed assigned
|
|
14894
|
-
// (onload can fire synchronously inside SUNEDITOR.create())
|
|
14895
|
-
setTimeout(() => {
|
|
14896
|
-
if (!this._editor)
|
|
14897
|
-
return;
|
|
14898
|
-
this._editorReady = true;
|
|
14899
|
-
if (this._pendingValue) {
|
|
14900
|
-
this._isSettingValue = true;
|
|
14901
|
-
this._editor.html.set(this._pendingValue);
|
|
14902
|
-
this._pendingValue = '';
|
|
14903
|
-
setTimeout(() => { this._isSettingValue = false; }, 0);
|
|
14904
|
-
}
|
|
14905
|
-
const el = this._el.nativeElement.querySelector('.sun-editor');
|
|
14906
|
-
if (el)
|
|
14907
|
-
el.style.display = '';
|
|
14908
|
-
this._ngZone.run(() => {
|
|
14909
|
-
this.isLoading = false;
|
|
14910
|
-
this._cdr.detectChanges();
|
|
14911
|
-
});
|
|
14912
|
-
}, 0);
|
|
14913
|
-
},
|
|
14914
14897
|
onChange: ({ data }) => {
|
|
14915
14898
|
if (this._isSettingValue)
|
|
14916
14899
|
return;
|
|
@@ -14928,6 +14911,23 @@ class MatchaTextEditorComponent {
|
|
|
14928
14911
|
const sunEditorEl = this._el.nativeElement.querySelector('.sun-editor');
|
|
14929
14912
|
if (sunEditorEl)
|
|
14930
14913
|
sunEditorEl.style.display = 'none';
|
|
14914
|
+
setTimeout(() => {
|
|
14915
|
+
if (!this._editor)
|
|
14916
|
+
return;
|
|
14917
|
+
this._editorReady = true;
|
|
14918
|
+
if (this._pendingValue) {
|
|
14919
|
+
this._isSettingValue = true;
|
|
14920
|
+
this._editor.html.set(this._pendingValue);
|
|
14921
|
+
this._pendingValue = '';
|
|
14922
|
+
setTimeout(() => { this._isSettingValue = false; }, 0);
|
|
14923
|
+
}
|
|
14924
|
+
if (sunEditorEl)
|
|
14925
|
+
sunEditorEl.style.display = '';
|
|
14926
|
+
this._ngZone.run(() => {
|
|
14927
|
+
this.isLoading = false;
|
|
14928
|
+
this._cdr.detectChanges();
|
|
14929
|
+
});
|
|
14930
|
+
}, 100);
|
|
14931
14931
|
}
|
|
14932
14932
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MatchaTextEditorComponent, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14933
14933
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: MatchaTextEditorComponent, isStandalone: false, selector: "matcha-text-editor", inputs: { value: "value", config: "config" }, outputs: { contentChange: "contentChange" }, host: { properties: { "attr.disabled": "this.disabledAttr" } }, providers: [
|