croco-html 20.4.5 → 20.4.6
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/croco-html.mjs +14 -4
- package/fesm2022/croco-html.mjs.map +1 -1
- package/index.d.ts +3 -1
- package/package.json +1 -1
package/fesm2022/croco-html.mjs
CHANGED
|
@@ -3428,9 +3428,10 @@ class TagEditorService {
|
|
|
3428
3428
|
|
|
3429
3429
|
class DefinedCustomEditorBlockComponent {
|
|
3430
3430
|
set tagService(data) {
|
|
3431
|
+
this._tagServiceSub$.next();
|
|
3431
3432
|
this._tagService = data;
|
|
3432
3433
|
this._tagService.tag$
|
|
3433
|
-
.pipe(
|
|
3434
|
+
.pipe(takeUntil(this._tagServiceSub$))
|
|
3434
3435
|
.subscribe(tag => {
|
|
3435
3436
|
this._tag = tag;
|
|
3436
3437
|
this._cdr.markForCheck();
|
|
@@ -3443,7 +3444,8 @@ class DefinedCustomEditorBlockComponent {
|
|
|
3443
3444
|
constructor(_options) {
|
|
3444
3445
|
this._options = _options;
|
|
3445
3446
|
this._cdr = inject(ChangeDetectorRef);
|
|
3446
|
-
this.
|
|
3447
|
+
this._destroy$ = new Subject();
|
|
3448
|
+
this._tagServiceSub$ = new Subject();
|
|
3447
3449
|
this.useDynamicComponent = false;
|
|
3448
3450
|
}
|
|
3449
3451
|
ngOnInit() {
|
|
@@ -3457,7 +3459,11 @@ class DefinedCustomEditorBlockComponent {
|
|
|
3457
3459
|
this._cdr.markForCheck();
|
|
3458
3460
|
}
|
|
3459
3461
|
ngOnDestroy() {
|
|
3460
|
-
this.
|
|
3462
|
+
this._tagServiceSub$.next();
|
|
3463
|
+
this._tagServiceSub$.complete();
|
|
3464
|
+
this._destroy$.next();
|
|
3465
|
+
this._destroy$.complete();
|
|
3466
|
+
this.dynamicContainerRef?.destroy();
|
|
3461
3467
|
}
|
|
3462
3468
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DefinedCustomEditorBlockComponent, deps: [{ token: CrocoHtmlOptionsToken }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3463
3469
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: DefinedCustomEditorBlockComponent, isStandalone: true, selector: "croco-html-defined-custom-editor-block", inputs: { tagService: "tagService" }, viewQueries: [{ propertyName: "viewContainerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-container #container>\n @if (!useDynamicComponent) {\n <div>\n \u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0438 \u0434\u043B\u044F {{_tag.tagDescription.tag}} \u043D\u0435 \u043E\u043F\u0438\u0441\u0430\u043D.\n </div>\n <div>\n \u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 CrocoHtmlOptions.definedCustomTagViewRenderers[{{_tag.tagDescription.tag}}].editorComponent\n </div>\n }\n</ng-container>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -3478,11 +3484,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
3478
3484
|
|
|
3479
3485
|
class MainEditorBlockComponent {
|
|
3480
3486
|
set tag(data) {
|
|
3487
|
+
this._tagSub$.next();
|
|
3481
3488
|
this._tag = data;
|
|
3482
3489
|
this._tagService = new TagEditorService();
|
|
3483
3490
|
this._tagService.tag$.next(this._tag);
|
|
3484
3491
|
this._tagService.presentOrEdit$
|
|
3485
|
-
.pipe(takeUntil(this.
|
|
3492
|
+
.pipe(takeUntil(this._tagSub$))
|
|
3486
3493
|
.subscribe(val => {
|
|
3487
3494
|
this.presentOrEdit = val;
|
|
3488
3495
|
this._cdr.markForCheck();
|
|
@@ -3492,6 +3499,7 @@ class MainEditorBlockComponent {
|
|
|
3492
3499
|
this._options = _options;
|
|
3493
3500
|
this.textTags = TextTags.allTextTags;
|
|
3494
3501
|
this.unsubscribe = new Subject();
|
|
3502
|
+
this._tagSub$ = new Subject();
|
|
3495
3503
|
this._cdr = inject(ChangeDetectorRef);
|
|
3496
3504
|
this._tag = null;
|
|
3497
3505
|
this.presentOrEdit = true;
|
|
@@ -3513,6 +3521,8 @@ class MainEditorBlockComponent {
|
|
|
3513
3521
|
this.onTagRemoved.emit(this._tag);
|
|
3514
3522
|
}
|
|
3515
3523
|
ngOnDestroy() {
|
|
3524
|
+
this._tagSub$.next();
|
|
3525
|
+
this._tagSub$.complete();
|
|
3516
3526
|
this.unsubscribe.next();
|
|
3517
3527
|
this.unsubscribe.complete();
|
|
3518
3528
|
}
|