croco-html 20.4.2 → 20.4.4
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 +34 -1
- package/fesm2022/croco-html.mjs.map +1 -1
- package/index.d.ts +8 -1
- package/package.json +1 -1
package/fesm2022/croco-html.mjs
CHANGED
|
@@ -335,6 +335,7 @@ class FileImageTagService {
|
|
|
335
335
|
attrs[FileImageTagDataConsts.ScreenMediaRequest] = fileData.screenMediaRequest;
|
|
336
336
|
}
|
|
337
337
|
return {
|
|
338
|
+
trackingId: crypto.randomUUID(),
|
|
338
339
|
tagDescription: {
|
|
339
340
|
tag: FileImageTagDataConsts.TagName,
|
|
340
341
|
displayValue: this.shortDescription,
|
|
@@ -346,6 +347,7 @@ class FileImageTagService {
|
|
|
346
347
|
}
|
|
347
348
|
getDefaultValue() {
|
|
348
349
|
return {
|
|
350
|
+
trackingId: crypto.randomUUID(),
|
|
349
351
|
tagDescription: {
|
|
350
352
|
tag: this.tagName,
|
|
351
353
|
displayValue: this.shortDescription,
|
|
@@ -385,6 +387,7 @@ class TextTagHtmlMarkupTagService {
|
|
|
385
387
|
toBodyTag(data) {
|
|
386
388
|
let textTagData = data.data;
|
|
387
389
|
return {
|
|
390
|
+
trackingId: crypto.randomUUID(),
|
|
388
391
|
tagDescription: {
|
|
389
392
|
tag: this.tagName,
|
|
390
393
|
displayValue: this.shortDescription,
|
|
@@ -394,8 +397,9 @@ class TextTagHtmlMarkupTagService {
|
|
|
394
397
|
innerHtml: BodyTagsExtensions.sanitizeInnerHtml(textTagData.html)
|
|
395
398
|
};
|
|
396
399
|
}
|
|
397
|
-
getDefaultValue(
|
|
400
|
+
getDefaultValue(_) {
|
|
398
401
|
return {
|
|
402
|
+
trackingId: crypto.randomUUID(),
|
|
399
403
|
tagDescription: {
|
|
400
404
|
tag: this.tagName,
|
|
401
405
|
displayValue: this.shortDescription,
|
|
@@ -437,6 +441,7 @@ class ExternalVideoTagService {
|
|
|
437
441
|
toBodyTag(data) {
|
|
438
442
|
let fileData = data.data;
|
|
439
443
|
return {
|
|
444
|
+
trackingId: crypto.randomUUID(),
|
|
440
445
|
tagDescription: {
|
|
441
446
|
tag: data.tagName,
|
|
442
447
|
displayValue: this.shortDescription,
|
|
@@ -459,6 +464,7 @@ class ExternalVideoTagService {
|
|
|
459
464
|
innerHtml = props.htmlRaw;
|
|
460
465
|
}
|
|
461
466
|
return {
|
|
467
|
+
trackingId: crypto.randomUUID(),
|
|
462
468
|
tagDescription: {
|
|
463
469
|
tag: this.tagName,
|
|
464
470
|
displayValue: this.shortDescription,
|
|
@@ -491,6 +497,7 @@ class HtmlRawTagService {
|
|
|
491
497
|
}
|
|
492
498
|
toBodyTag(data) {
|
|
493
499
|
return {
|
|
500
|
+
trackingId: crypto.randomUUID(),
|
|
494
501
|
tagDescription: {
|
|
495
502
|
tag: HtmlRawTagDataConsts.TagName,
|
|
496
503
|
displayValue: this.shortDescription,
|
|
@@ -502,6 +509,7 @@ class HtmlRawTagService {
|
|
|
502
509
|
}
|
|
503
510
|
getDefaultValue(props) {
|
|
504
511
|
return {
|
|
512
|
+
trackingId: crypto.randomUUID(),
|
|
505
513
|
tagDescription: {
|
|
506
514
|
tag: this.tagName,
|
|
507
515
|
displayValue: this.shortDescription,
|
|
@@ -539,6 +547,7 @@ class DownloadButtonTagService {
|
|
|
539
547
|
toBodyTag(data) {
|
|
540
548
|
let fileData = data.data;
|
|
541
549
|
return {
|
|
550
|
+
trackingId: crypto.randomUUID(),
|
|
542
551
|
tagDescription: {
|
|
543
552
|
tag: data.tagName,
|
|
544
553
|
displayValue: this.shortDescription,
|
|
@@ -550,6 +559,7 @@ class DownloadButtonTagService {
|
|
|
550
559
|
}
|
|
551
560
|
getDefaultValue(props) {
|
|
552
561
|
return {
|
|
562
|
+
trackingId: crypto.randomUUID(),
|
|
553
563
|
tagDescription: {
|
|
554
564
|
tag: this.tagName,
|
|
555
565
|
displayValue: this.shortDescription,
|
|
@@ -592,6 +602,7 @@ class ButtonTagService {
|
|
|
592
602
|
toBodyTag(data) {
|
|
593
603
|
let fileData = data.data;
|
|
594
604
|
return {
|
|
605
|
+
trackingId: crypto.randomUUID(),
|
|
595
606
|
tagDescription: {
|
|
596
607
|
tag: data.tagName,
|
|
597
608
|
displayValue: this.shortDescription,
|
|
@@ -603,6 +614,7 @@ class ButtonTagService {
|
|
|
603
614
|
}
|
|
604
615
|
getDefaultValue(props) {
|
|
605
616
|
return {
|
|
617
|
+
trackingId: crypto.randomUUID(),
|
|
606
618
|
tagDescription: {
|
|
607
619
|
tag: this.tagName,
|
|
608
620
|
displayValue: this.shortDescription,
|
|
@@ -646,6 +658,7 @@ class CustomWidgetTagService {
|
|
|
646
658
|
toBodyTag(data) {
|
|
647
659
|
let customWidgetTagData = data.data;
|
|
648
660
|
return {
|
|
661
|
+
trackingId: crypto.randomUUID(),
|
|
649
662
|
tagDescription: {
|
|
650
663
|
tag: data.tagName,
|
|
651
664
|
displayValue: this.shortDescription,
|
|
@@ -657,6 +670,7 @@ class CustomWidgetTagService {
|
|
|
657
670
|
}
|
|
658
671
|
getDefaultValue(props) {
|
|
659
672
|
return {
|
|
673
|
+
trackingId: crypto.randomUUID(),
|
|
660
674
|
tagDescription: {
|
|
661
675
|
tag: this.tagName,
|
|
662
676
|
displayValue: this.shortDescription,
|
|
@@ -752,6 +766,7 @@ class LinkTagService {
|
|
|
752
766
|
[LinkTagAttrs.Title]: tagData.title
|
|
753
767
|
};
|
|
754
768
|
return {
|
|
769
|
+
trackingId: crypto.randomUUID(),
|
|
755
770
|
tagDescription: {
|
|
756
771
|
tag: data.tagName,
|
|
757
772
|
displayValue: this.shortDescription,
|
|
@@ -763,6 +778,7 @@ class LinkTagService {
|
|
|
763
778
|
}
|
|
764
779
|
getDefaultValue(props) {
|
|
765
780
|
return {
|
|
781
|
+
trackingId: crypto.randomUUID(),
|
|
766
782
|
tagDescription: {
|
|
767
783
|
tag: this.tagName,
|
|
768
784
|
displayValue: this.shortDescription,
|
|
@@ -873,6 +889,7 @@ class FileAudioTagService {
|
|
|
873
889
|
attrs[FileAudioTagDataConsts.TitleAttrName] = fileData.title;
|
|
874
890
|
}
|
|
875
891
|
return {
|
|
892
|
+
trackingId: crypto.randomUUID(),
|
|
876
893
|
tagDescription: {
|
|
877
894
|
tag: FileAudioTagDataConsts.TagName,
|
|
878
895
|
displayValue: this.shortDescription,
|
|
@@ -884,6 +901,7 @@ class FileAudioTagService {
|
|
|
884
901
|
}
|
|
885
902
|
getDefaultValue() {
|
|
886
903
|
return {
|
|
904
|
+
trackingId: crypto.randomUUID(),
|
|
887
905
|
tagDescription: {
|
|
888
906
|
tag: this.tagName,
|
|
889
907
|
displayValue: this.shortDescription,
|
|
@@ -1159,6 +1177,7 @@ class TableTagService {
|
|
|
1159
1177
|
toBodyTag(data) {
|
|
1160
1178
|
let tableData = data.data;
|
|
1161
1179
|
return {
|
|
1180
|
+
trackingId: crypto.randomUUID(),
|
|
1162
1181
|
tagDescription: {
|
|
1163
1182
|
tag: data.tagName,
|
|
1164
1183
|
displayValue: this.shortDescription,
|
|
@@ -1170,6 +1189,7 @@ class TableTagService {
|
|
|
1170
1189
|
}
|
|
1171
1190
|
getDefaultValue(props) {
|
|
1172
1191
|
return {
|
|
1192
|
+
trackingId: crypto.randomUUID(),
|
|
1173
1193
|
tagDescription: {
|
|
1174
1194
|
tag: this.tagName,
|
|
1175
1195
|
displayValue: this.shortDescription,
|
|
@@ -1243,6 +1263,7 @@ class BodyTagsExtensions {
|
|
|
1243
1263
|
return this.getTagService(tagName, options).toBodyTag(data);
|
|
1244
1264
|
}
|
|
1245
1265
|
return {
|
|
1266
|
+
trackingId: crypto.randomUUID(),
|
|
1246
1267
|
tagDescription: {
|
|
1247
1268
|
tag: Tags.UnsupportedTag,
|
|
1248
1269
|
displayValue: "Неподдерживаемый тег",
|
|
@@ -1489,6 +1510,7 @@ class AddFilesBtnComponent {
|
|
|
1489
1510
|
}
|
|
1490
1511
|
buildFileTags(fileIds) {
|
|
1491
1512
|
return fileIds.map(fileId => ({
|
|
1513
|
+
trackingId: crypto.randomUUID(),
|
|
1492
1514
|
presentOrEdit: true,
|
|
1493
1515
|
tagDescription: {
|
|
1494
1516
|
tag: FileImageTagDataConsts.TagName,
|
|
@@ -2693,6 +2715,9 @@ class HtmlRawEditorComponent {
|
|
|
2693
2715
|
this._tagService.tag$
|
|
2694
2716
|
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
2695
2717
|
.subscribe(tag => {
|
|
2718
|
+
if (this._tag.trackingId === tag.trackingId) {
|
|
2719
|
+
return;
|
|
2720
|
+
}
|
|
2696
2721
|
this._tag = tag;
|
|
2697
2722
|
this.onHtmlChanged();
|
|
2698
2723
|
});
|
|
@@ -2878,6 +2903,8 @@ class NullVisualEditorLogger {
|
|
|
2878
2903
|
}
|
|
2879
2904
|
onRemove(_) {
|
|
2880
2905
|
}
|
|
2906
|
+
onHtmlChanged(html) {
|
|
2907
|
+
}
|
|
2881
2908
|
}
|
|
2882
2909
|
|
|
2883
2910
|
class ConsoleVisualEditorLogger {
|
|
@@ -2892,6 +2919,9 @@ class ConsoleVisualEditorLogger {
|
|
|
2892
2919
|
onRemove(index) {
|
|
2893
2920
|
console.log("onRemove", index);
|
|
2894
2921
|
}
|
|
2922
|
+
onHtmlChanged(html) {
|
|
2923
|
+
console.log("onHtmlChanged", html);
|
|
2924
|
+
}
|
|
2895
2925
|
}
|
|
2896
2926
|
|
|
2897
2927
|
class XmlTagViewComponent {
|
|
@@ -3729,6 +3759,7 @@ class VisualEditorComponent {
|
|
|
3729
3759
|
const tags = [];
|
|
3730
3760
|
fileIdsString.forEach(fileId => {
|
|
3731
3761
|
const tag = {
|
|
3762
|
+
trackingId: crypto.randomUUID(),
|
|
3732
3763
|
tagDescription: {
|
|
3733
3764
|
tag: FileImageTagDataConsts.TagName,
|
|
3734
3765
|
displayValue: "Изображение",
|
|
@@ -3757,6 +3788,7 @@ class VisualEditorComponent {
|
|
|
3757
3788
|
const line = lines[i];
|
|
3758
3789
|
if (line.length > 0) {
|
|
3759
3790
|
tags.push({
|
|
3791
|
+
trackingId: crypto.randomUUID(),
|
|
3760
3792
|
tagDescription,
|
|
3761
3793
|
innerHtml: line,
|
|
3762
3794
|
attributes: {
|
|
@@ -4013,6 +4045,7 @@ class MainEditorComponent {
|
|
|
4013
4045
|
this.html = html;
|
|
4014
4046
|
this.onHtmlChanged.emit(html);
|
|
4015
4047
|
this._cdref.markForCheck();
|
|
4048
|
+
this.logger.onHtmlChanged(html);
|
|
4016
4049
|
}
|
|
4017
4050
|
textAreaModelChangedHandler() {
|
|
4018
4051
|
this.recalculateBodyTags();
|