@dotcms/angular 1.5.6 → 1.6.0-next.36
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/README.md +64 -47
- package/fesm2022/dotcms-angular.mjs +211 -224
- package/fesm2022/dotcms-angular.mjs.map +1 -1
- package/lib/components/dotcms-editable-text/dotcms-editable-text.component.d.ts.map +1 -1
- package/lib/components/dotcms-layout-body/components/container/container.component.d.ts +1 -5
- package/lib/components/dotcms-layout-body/components/container/container.component.d.ts.map +1 -1
- package/lib/components/dotcms-layout-body/components/contentlet/contentlet.component.d.ts +6 -12
- package/lib/components/dotcms-layout-body/components/contentlet/contentlet.component.d.ts.map +1 -1
- package/lib/store/dotcms.store.d.ts +16 -1
- package/lib/store/dotcms.store.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -8,8 +8,9 @@ import { createDotCMSClient } from '@dotcms/client';
|
|
|
8
8
|
import { EditorComponent, TINYMCE_SCRIPT_SRC } from '@tinymce/tinymce-angular';
|
|
9
9
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
10
10
|
import { __DOTCMS_UVE_EVENT__, BlockEditorDefaultBlocks } from '@dotcms/types/internal';
|
|
11
|
-
import { __DEFAULT_TINYMCE_CONFIG__, __BASE_TINYMCE_CONFIG_WITH_NO_DEFAULT__, __TINYMCE_PATH_ON_DOTCMS__, isValidBlocks, PRODUCTION_MODE, DEVELOPMENT_MODE, EMPTY_CONTAINER_STYLE_ANGULAR, getDotContentletAttributes, CUSTOM_NO_COMPONENT, getDotContainerAttributes, getContainersData, getContentletsInContainer, getColumnPositionClasses, combineClasses, DOT_SECTION_ID_PREFIX, registerStyleEditorSchemas } from '@dotcms/uve/internal';
|
|
12
|
-
import { Subject, of } from 'rxjs';
|
|
11
|
+
import { __DEFAULT_TINYMCE_CONFIG__, __BASE_TINYMCE_CONFIG_WITH_NO_DEFAULT__, __TINYMCE_PATH_ON_DOTCMS__, isValidBlocks, PRODUCTION_MODE, ANALYTICS_READY_EVENT, isDotAnalyticsActive, DEVELOPMENT_MODE, EMPTY_CONTAINER_STYLE_ANGULAR, getDotContentletAttributes, getAnalyticsContentletAttributes, CUSTOM_NO_COMPONENT, getDotContainerAttributes, getContainersData, getContentletsInContainer, getColumnPositionClasses, combineClasses, DOT_SECTION_ID_PREFIX, registerStyleEditorSchemas } from '@dotcms/uve/internal';
|
|
12
|
+
import { fromEvent, map, Subject, of } from 'rxjs';
|
|
13
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
13
14
|
import { finalize } from 'rxjs/operators';
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -44,10 +45,10 @@ class DotCMSShowWhenDirective {
|
|
|
44
45
|
this.#hasView = false;
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
48
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
48
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSShowWhenDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
49
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: DotCMSShowWhenDirective, isStandalone: true, selector: "[dotCMSShowWhen]", inputs: { dotCMSShowWhen: "dotCMSShowWhen" }, ngImport: i0 }); }
|
|
49
50
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSShowWhenDirective, decorators: [{
|
|
51
52
|
type: Directive,
|
|
52
53
|
args: [{
|
|
53
54
|
selector: '[dotCMSShowWhen]'
|
|
@@ -289,9 +290,13 @@ class DotCMSEditableTextComponent {
|
|
|
289
290
|
if (name !== __DOTCMS_UVE_EVENT__.UVE_COPY_CONTENTLET_INLINE_EDITING_SUCCESS) {
|
|
290
291
|
return;
|
|
291
292
|
}
|
|
292
|
-
const { oldInode, inode } = payload;
|
|
293
|
+
const { oldInode, inode, fieldName } = payload;
|
|
293
294
|
const currentInode = this.contentlet.inode;
|
|
294
|
-
|
|
295
|
+
const matchesInode = currentInode === oldInode || currentInode === inode;
|
|
296
|
+
// Match the field too: a contentlet's fields all share one inode, so an
|
|
297
|
+
// inode-only check focuses every editable field on the contentlet (the
|
|
298
|
+
// last one wins) instead of the one the user clicked.
|
|
299
|
+
if (matchesInode && fieldName === this.fieldName) {
|
|
295
300
|
this.editorComponent.editor.focus();
|
|
296
301
|
return;
|
|
297
302
|
}
|
|
@@ -404,8 +409,8 @@ class DotCMSEditableTextComponent {
|
|
|
404
409
|
didContentChange(editedContent) {
|
|
405
410
|
return this.content !== editedContent;
|
|
406
411
|
}
|
|
407
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
408
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
412
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSEditableTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
413
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DotCMSEditableTextComponent, isStandalone: true, selector: "dotcms-editable-text", inputs: { mode: "mode", format: "format", contentlet: "contentlet", fieldName: "fieldName" }, host: { listeners: { "window:message": "onMessage($event)" } }, providers: [
|
|
409
414
|
{
|
|
410
415
|
provide: TINYMCE_SCRIPT_SRC,
|
|
411
416
|
useFactory: () => {
|
|
@@ -415,7 +420,7 @@ class DotCMSEditableTextComponent {
|
|
|
415
420
|
}
|
|
416
421
|
], viewQueries: [{ propertyName: "editorComponent", first: true, predicate: EditorComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (isEditMode) {\n <editor\n #tinyEditor\n [init]=\"init\"\n [initialValue]=\"content\"\n (onMouseDown)=\"onMouseDown($event)\"\n (onFocusOut)=\"onFocusOut()\" />\n}\n", styles: [":host ::ng-deep .mce-content-body:not(.mce-edit-focus){outline:2px solid #006ce7;border-radius:4px}\n"], dependencies: [{ kind: "component", type: EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "disabled"] }] }); }
|
|
417
422
|
}
|
|
418
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSEditableTextComponent, decorators: [{
|
|
419
424
|
type: Component,
|
|
420
425
|
args: [{ selector: 'dotcms-editable-text', imports: [EditorComponent], providers: [
|
|
421
426
|
{
|
|
@@ -443,8 +448,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
443
448
|
}] } });
|
|
444
449
|
|
|
445
450
|
class DotCodeBlock {
|
|
446
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
447
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
451
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCodeBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
452
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotCodeBlock, isStandalone: true, selector: "dotcms-block-editor-renderer-code-block", ngImport: i0, template: `
|
|
448
453
|
<pre>
|
|
449
454
|
<code>
|
|
450
455
|
<ng-content />
|
|
@@ -452,7 +457,7 @@ class DotCodeBlock {
|
|
|
452
457
|
</pre>
|
|
453
458
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
454
459
|
}
|
|
455
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCodeBlock, decorators: [{
|
|
456
461
|
type: Component,
|
|
457
462
|
args: [{
|
|
458
463
|
selector: 'dotcms-block-editor-renderer-code-block',
|
|
@@ -467,14 +472,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
467
472
|
}]
|
|
468
473
|
}] });
|
|
469
474
|
class DotBlockQuote {
|
|
470
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
471
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
475
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotBlockQuote, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
476
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotBlockQuote, isStandalone: true, selector: "dotcms-block-editor-renderer-block-quote", ngImport: i0, template: `
|
|
472
477
|
<blockquote>
|
|
473
478
|
<ng-content />
|
|
474
479
|
</blockquote>
|
|
475
480
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
476
481
|
}
|
|
477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotBlockQuote, decorators: [{
|
|
478
483
|
type: Component,
|
|
479
484
|
args: [{
|
|
480
485
|
selector: 'dotcms-block-editor-renderer-block-quote',
|
|
@@ -499,8 +504,8 @@ class NoComponentProvided {
|
|
|
499
504
|
border: '1px solid #ed8936'
|
|
500
505
|
};
|
|
501
506
|
}
|
|
502
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
503
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
507
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: NoComponentProvided, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
508
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: NoComponentProvided, isStandalone: true, selector: "dotcms-no-component-provided", inputs: { contentType: "contentType" }, ngImport: i0, template: `
|
|
504
509
|
<div data-testid="no-component-provided" [style]="style">
|
|
505
510
|
<strong style="color: #c05621">Dev Warning</strong>
|
|
506
511
|
: No component or custom renderer provided for content type
|
|
@@ -519,7 +524,7 @@ class NoComponentProvided {
|
|
|
519
524
|
</div>
|
|
520
525
|
`, isInline: true }); }
|
|
521
526
|
}
|
|
522
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: NoComponentProvided, decorators: [{
|
|
523
528
|
type: Component,
|
|
524
529
|
args: [{
|
|
525
530
|
selector: 'dotcms-no-component-provided',
|
|
@@ -550,7 +555,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
550
555
|
*/
|
|
551
556
|
class DotContentletBlock {
|
|
552
557
|
constructor() {
|
|
553
|
-
this.$data = computed(() => this.node?.attrs?.['data'], ...(ngDevMode ? [{ debugName: "$data" }] : []));
|
|
558
|
+
this.$data = computed(() => this.node?.attrs?.['data'], ...(ngDevMode ? [{ debugName: "$data" }] : /* istanbul ignore next */ []));
|
|
554
559
|
this.DOT_CONTENT_NO_DATA_MESSAGE = '[DotCMSBlockEditorRenderer]: No data provided for Contentlet Block. Try to add a contentlet to the block editor. If the error persists, please contact the DotCMS support team.';
|
|
555
560
|
this.DOT_CONTENT_NO_MATCHING_COMPONENT_MESSAGE = (contentType) => `[DotCMSBlockEditorRenderer]: No matching component found for content type: ${contentType}. Provide a custom renderer for this content type to fix this error.`;
|
|
556
561
|
}
|
|
@@ -568,8 +573,8 @@ class DotContentletBlock {
|
|
|
568
573
|
console.warn(this.DOT_CONTENT_NO_MATCHING_COMPONENT_MESSAGE(contentType));
|
|
569
574
|
}
|
|
570
575
|
}
|
|
571
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
572
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
576
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotContentletBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
577
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DotContentletBlock, isStandalone: true, selector: "dotcms-block-editor-renderer-contentlet", inputs: { customRenderers: "customRenderers", node: "node" }, ngImport: i0, template: `
|
|
573
578
|
@if (contentComponent) {
|
|
574
579
|
<ng-container *ngComponentOutlet="contentComponent | async; inputs: { node: node }" />
|
|
575
580
|
} @else if (isDevMode) {
|
|
@@ -577,7 +582,7 @@ class DotContentletBlock {
|
|
|
577
582
|
}
|
|
578
583
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: NoComponentProvided, selector: "dotcms-no-component-provided", inputs: ["contentType"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
579
584
|
}
|
|
580
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotContentletBlock, decorators: [{
|
|
581
586
|
type: Component,
|
|
582
587
|
args: [{
|
|
583
588
|
selector: 'dotcms-block-editor-renderer-contentlet',
|
|
@@ -610,8 +615,8 @@ class DotGridBlock {
|
|
|
610
615
|
? rawCols
|
|
611
616
|
: [6, 6];
|
|
612
617
|
}
|
|
613
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
614
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
618
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotGridBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
619
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DotGridBlock, isStandalone: true, selector: "dotcms-block-editor-renderer-grid-block", inputs: { node: "node", customRenderers: "customRenderers" }, ngImport: i0, template: `
|
|
615
620
|
<div
|
|
616
621
|
data-type="gridBlock"
|
|
617
622
|
class="grid-block"
|
|
@@ -633,7 +638,7 @@ class DotGridBlock {
|
|
|
633
638
|
</div>
|
|
634
639
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }] }); }
|
|
635
640
|
}
|
|
636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotGridBlock, decorators: [{
|
|
637
642
|
type: Component,
|
|
638
643
|
args: [{
|
|
639
644
|
selector: 'dotcms-block-editor-renderer-grid-block',
|
|
@@ -668,7 +673,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
668
673
|
|
|
669
674
|
class DotImageBlock {
|
|
670
675
|
constructor() {
|
|
671
|
-
this.$srcURL = computed(() => this.attrs?.['src'], ...(ngDevMode ? [{ debugName: "$srcURL" }] : []));
|
|
676
|
+
this.$srcURL = computed(() => this.attrs?.['src'], ...(ngDevMode ? [{ debugName: "$srcURL" }] : /* istanbul ignore next */ []));
|
|
672
677
|
this.$wrapperStyle = computed(() => {
|
|
673
678
|
const textWrap = this.attrs?.['textWrap'];
|
|
674
679
|
const textAlign = this.attrs?.['textAlign'];
|
|
@@ -682,16 +687,16 @@ class DotImageBlock {
|
|
|
682
687
|
return { 'text-align': textAlign };
|
|
683
688
|
}
|
|
684
689
|
return {};
|
|
685
|
-
}, ...(ngDevMode ? [{ debugName: "$wrapperStyle" }] : []));
|
|
690
|
+
}, ...(ngDevMode ? [{ debugName: "$wrapperStyle" }] : /* istanbul ignore next */ []));
|
|
686
691
|
}
|
|
687
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
688
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
692
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotImageBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
693
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotImageBlock, isStandalone: true, selector: "dotcms-block-editor-renderer-image", inputs: { attrs: "attrs" }, ngImport: i0, template: `
|
|
689
694
|
<figure [style]="$wrapperStyle()">
|
|
690
695
|
<img [alt]="attrs?.['alt']" [src]="$srcURL()" />
|
|
691
696
|
</figure>
|
|
692
697
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
693
698
|
}
|
|
694
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotImageBlock, decorators: [{
|
|
695
700
|
type: Component,
|
|
696
701
|
args: [{
|
|
697
702
|
selector: 'dotcms-block-editor-renderer-image',
|
|
@@ -708,14 +713,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
708
713
|
}] } });
|
|
709
714
|
|
|
710
715
|
class DotBulletList {
|
|
711
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
712
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
716
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotBulletList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
717
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotBulletList, isStandalone: true, selector: "dotcms-block-editor-renderer-bullet-list", ngImport: i0, template: `
|
|
713
718
|
<ul>
|
|
714
719
|
<ng-content />
|
|
715
720
|
</ul>
|
|
716
721
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
717
722
|
}
|
|
718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotBulletList, decorators: [{
|
|
719
724
|
type: Component,
|
|
720
725
|
args: [{
|
|
721
726
|
selector: 'dotcms-block-editor-renderer-bullet-list',
|
|
@@ -728,14 +733,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
728
733
|
}]
|
|
729
734
|
}] });
|
|
730
735
|
class DotOrdererList {
|
|
731
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
732
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
736
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotOrdererList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
737
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotOrdererList, isStandalone: true, selector: "dotcms-block-editor-renderer-ordered-list", ngImport: i0, template: `
|
|
733
738
|
<ol>
|
|
734
739
|
<ng-content />
|
|
735
740
|
</ol>
|
|
736
741
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
737
742
|
}
|
|
738
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
743
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotOrdererList, decorators: [{
|
|
739
744
|
type: Component,
|
|
740
745
|
args: [{
|
|
741
746
|
selector: 'dotcms-block-editor-renderer-ordered-list',
|
|
@@ -748,14 +753,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
748
753
|
}]
|
|
749
754
|
}] });
|
|
750
755
|
class DotListItem {
|
|
751
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
752
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
756
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotListItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
757
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotListItem, isStandalone: true, selector: "dotcms-block-editor-renderer-list-item", ngImport: i0, template: `
|
|
753
758
|
<li>
|
|
754
759
|
<ng-content />
|
|
755
760
|
</li>
|
|
756
761
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
757
762
|
}
|
|
758
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotListItem, decorators: [{
|
|
759
764
|
type: Component,
|
|
760
765
|
args: [{
|
|
761
766
|
selector: 'dotcms-block-editor-renderer-list-item',
|
|
@@ -772,8 +777,8 @@ class DotTableBlock {
|
|
|
772
777
|
constructor() {
|
|
773
778
|
this.blockEditorItem = DotCMSBlockEditorItemComponent;
|
|
774
779
|
}
|
|
775
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
776
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
780
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotTableBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
781
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DotTableBlock, isStandalone: true, selector: "dotcms-block-editor-renderer-table", inputs: { content: "content", attrs: "attrs" }, ngImport: i0, template: `
|
|
777
782
|
<table
|
|
778
783
|
[attr.aria-label]="attrs?.['ariaLabel'] || null"
|
|
779
784
|
[attr.aria-labelledby]="attrs?.['ariaLabelledby'] || null">
|
|
@@ -818,7 +823,7 @@ class DotTableBlock {
|
|
|
818
823
|
</table>
|
|
819
824
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }] }); }
|
|
820
825
|
}
|
|
821
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotTableBlock, decorators: [{
|
|
822
827
|
type: Component,
|
|
823
828
|
args: [{
|
|
824
829
|
selector: 'dotcms-block-editor-renderer-table',
|
|
@@ -875,14 +880,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
875
880
|
}] } });
|
|
876
881
|
|
|
877
882
|
class DotParagraphBlock {
|
|
878
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
879
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
883
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotParagraphBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
884
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotParagraphBlock, isStandalone: true, selector: "dotcms-block-editor-renderer-paragraph", ngImport: i0, template: `
|
|
880
885
|
<p>
|
|
881
886
|
<ng-content />
|
|
882
887
|
</p>
|
|
883
888
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
884
889
|
}
|
|
885
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotParagraphBlock, decorators: [{
|
|
886
891
|
type: Component,
|
|
887
892
|
args: [{
|
|
888
893
|
selector: 'dotcms-block-editor-renderer-paragraph',
|
|
@@ -896,15 +901,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
896
901
|
}] });
|
|
897
902
|
class DotHeadingBlock {
|
|
898
903
|
constructor() {
|
|
899
|
-
this.level = input.required(...(ngDevMode ? [{ debugName: "level" }] : []));
|
|
904
|
+
this.level = input.required(...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
|
|
900
905
|
this.$normalizedLevel = computed(() => {
|
|
901
906
|
return this.level() != null && typeof this.level() === 'number'
|
|
902
907
|
? String(this.level())
|
|
903
908
|
: (this.level() ?? '1');
|
|
904
|
-
}, ...(ngDevMode ? [{ debugName: "$normalizedLevel" }] : []));
|
|
909
|
+
}, ...(ngDevMode ? [{ debugName: "$normalizedLevel" }] : /* istanbul ignore next */ []));
|
|
905
910
|
}
|
|
906
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
907
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
911
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotHeadingBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
912
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DotHeadingBlock, isStandalone: true, selector: "dotcms-block-editor-renderer-heading", inputs: { level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
908
913
|
@switch ($normalizedLevel()) {
|
|
909
914
|
@case ('1') {
|
|
910
915
|
<h1>
|
|
@@ -948,7 +953,7 @@ class DotHeadingBlock {
|
|
|
948
953
|
</ng-template>
|
|
949
954
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
950
955
|
}
|
|
951
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
956
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotHeadingBlock, decorators: [{
|
|
952
957
|
type: Component,
|
|
953
958
|
args: [{
|
|
954
959
|
selector: 'dotcms-block-editor-renderer-heading',
|
|
@@ -1003,7 +1008,7 @@ class DotTextBlock {
|
|
|
1003
1008
|
constructor() {
|
|
1004
1009
|
this.marks = [];
|
|
1005
1010
|
this.text = '';
|
|
1006
|
-
this.$remainingMarks = computed(() => this.marks?.slice(1), ...(ngDevMode ? [{ debugName: "$remainingMarks" }] : []));
|
|
1011
|
+
this.$remainingMarks = computed(() => this.marks?.slice(1), ...(ngDevMode ? [{ debugName: "$remainingMarks" }] : /* istanbul ignore next */ []));
|
|
1007
1012
|
this.$currentAttrs = computed(() => {
|
|
1008
1013
|
const attrs = { ...(this.marks?.[0]?.attrs || {}) };
|
|
1009
1014
|
if (attrs['class']) {
|
|
@@ -1011,10 +1016,10 @@ class DotTextBlock {
|
|
|
1011
1016
|
delete attrs['class'];
|
|
1012
1017
|
}
|
|
1013
1018
|
return attrs;
|
|
1014
|
-
}, ...(ngDevMode ? [{ debugName: "$currentAttrs" }] : []));
|
|
1019
|
+
}, ...(ngDevMode ? [{ debugName: "$currentAttrs" }] : /* istanbul ignore next */ []));
|
|
1015
1020
|
}
|
|
1016
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1017
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1021
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotTextBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1022
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DotTextBlock, isStandalone: true, selector: "dotcms-block-editor-renderer-text", inputs: { marks: "marks", text: "text" }, ngImport: i0, template: `
|
|
1018
1023
|
@switch (marks?.[0]?.type) {
|
|
1019
1024
|
@case ('link') {
|
|
1020
1025
|
<a
|
|
@@ -1062,7 +1067,7 @@ class DotTextBlock {
|
|
|
1062
1067
|
}
|
|
1063
1068
|
`, isInline: true, dependencies: [{ kind: "component", type: DotTextBlock, selector: "dotcms-block-editor-renderer-text", inputs: ["marks", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1064
1069
|
}
|
|
1065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotTextBlock, decorators: [{
|
|
1066
1071
|
type: Component,
|
|
1067
1072
|
args: [{
|
|
1068
1073
|
selector: 'dotcms-block-editor-renderer-text',
|
|
@@ -1136,8 +1141,8 @@ class DotUnknownBlockComponent {
|
|
|
1136
1141
|
get isEditMode() {
|
|
1137
1142
|
return getUVEState()?.mode === UVE_MODE.EDIT;
|
|
1138
1143
|
}
|
|
1139
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1140
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1144
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotUnknownBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1145
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DotUnknownBlockComponent, isStandalone: true, selector: "dotcms-block-editor-renderer-unknown", inputs: { node: "node" }, ngImport: i0, template: `
|
|
1141
1146
|
@if (isEditMode) {
|
|
1142
1147
|
<div [style]="style" data-testid="unknown-block-type">
|
|
1143
1148
|
<strong style="color: #c53030">Warning:</strong>
|
|
@@ -1155,7 +1160,7 @@ class DotUnknownBlockComponent {
|
|
|
1155
1160
|
}
|
|
1156
1161
|
`, isInline: true }); }
|
|
1157
1162
|
}
|
|
1158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotUnknownBlockComponent, decorators: [{
|
|
1159
1164
|
type: Component,
|
|
1160
1165
|
args: [{
|
|
1161
1166
|
selector: 'dotcms-block-editor-renderer-unknown',
|
|
@@ -1183,11 +1188,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1183
1188
|
|
|
1184
1189
|
class DotVideoBlock {
|
|
1185
1190
|
constructor() {
|
|
1186
|
-
this.$srcURL = computed(() => this.attrs?.['src'], ...(ngDevMode ? [{ debugName: "$srcURL" }] : []));
|
|
1187
|
-
this.$posterURL = computed(() => this.attrs?.['data']?.['thumbnail'], ...(ngDevMode ? [{ debugName: "$posterURL" }] : []));
|
|
1191
|
+
this.$srcURL = computed(() => this.attrs?.['src'], ...(ngDevMode ? [{ debugName: "$srcURL" }] : /* istanbul ignore next */ []));
|
|
1192
|
+
this.$posterURL = computed(() => this.attrs?.['data']?.['thumbnail'], ...(ngDevMode ? [{ debugName: "$posterURL" }] : /* istanbul ignore next */ []));
|
|
1188
1193
|
}
|
|
1189
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1190
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotVideoBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1195
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotVideoBlock, isStandalone: true, selector: "dotcms-block-editor-renderer-video", inputs: { attrs: "attrs" }, ngImport: i0, template: `
|
|
1191
1196
|
<video
|
|
1192
1197
|
[controls]="true"
|
|
1193
1198
|
preload="metadata"
|
|
@@ -1202,7 +1207,7 @@ class DotVideoBlock {
|
|
|
1202
1207
|
</video>
|
|
1203
1208
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1204
1209
|
}
|
|
1205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotVideoBlock, decorators: [{
|
|
1206
1211
|
type: Component,
|
|
1207
1212
|
args: [{
|
|
1208
1213
|
selector: 'dotcms-block-editor-renderer-video',
|
|
@@ -1230,10 +1235,10 @@ class DotCMSBlockEditorItemComponent {
|
|
|
1230
1235
|
constructor() {
|
|
1231
1236
|
this.BLOCKS = BlockEditorDefaultBlocks;
|
|
1232
1237
|
}
|
|
1233
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1234
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1238
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSBlockEditorItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1239
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DotCMSBlockEditorItemComponent, isStandalone: true, selector: "dotcms-block-editor-renderer-block", inputs: { content: "content", customRenderers: "customRenderers" }, ngImport: i0, template: "@for (node of content; track node) {\n @if (customRenderers?.[node.type]) {\n <ng-container\n *ngTemplateOutlet=\"\n customRender;\n context: { customRender: customRenderers?.[node.type], node: node }\n \" />\n } @else {\n @switch (node.type) {\n @case (BLOCKS.PARAGRAPH) {\n <dotcms-block-editor-renderer-paragraph [style]=\"node.attrs\">\n <dotcms-block-editor-renderer-block\n [content]=\"node.content\"\n [customRenderers]=\"customRenderers\" />\n </dotcms-block-editor-renderer-paragraph>\n }\n\n @case (BLOCKS.TEXT) {\n <dotcms-block-editor-renderer-text [marks]=\"node.marks\" [text]=\"node.text || ''\" />\n }\n\n @case (BLOCKS.HEADING) {\n <dotcms-block-editor-renderer-heading\n [style]=\"node.attrs || {}\"\n [level]=\"node.attrs?.['level'] || '1'\">\n <dotcms-block-editor-renderer-block\n [content]=\"node.content\"\n [customRenderers]=\"customRenderers\" />\n </dotcms-block-editor-renderer-heading>\n }\n\n @case (BLOCKS.BULLET_LIST) {\n <dotcms-block-editor-renderer-bullet-list>\n <dotcms-block-editor-renderer-block\n [content]=\"node.content\"\n [customRenderers]=\"customRenderers\" />\n </dotcms-block-editor-renderer-bullet-list>\n }\n\n @case (BLOCKS.ORDERED_LIST) {\n <dotcms-block-editor-renderer-ordered-list>\n <dotcms-block-editor-renderer-block\n [content]=\"node.content\"\n [customRenderers]=\"customRenderers\" />\n </dotcms-block-editor-renderer-ordered-list>\n }\n\n @case (BLOCKS.LIST_ITEM) {\n <dotcms-block-editor-renderer-list-item>\n <dotcms-block-editor-renderer-block\n [content]=\"node.content\"\n [customRenderers]=\"customRenderers\" />\n </dotcms-block-editor-renderer-list-item>\n }\n\n @case (BLOCKS.BLOCK_QUOTE) {\n <dotcms-block-editor-renderer-block-quote>\n <dotcms-block-editor-renderer-block\n [content]=\"node.content\"\n [customRenderers]=\"customRenderers\" />\n </dotcms-block-editor-renderer-block-quote>\n }\n\n @case (BLOCKS.CODE_BLOCK) {\n <dotcms-block-editor-renderer-code-block>\n <dotcms-block-editor-renderer-block\n [content]=\"node.content\"\n [customRenderers]=\"customRenderers\" />\n </dotcms-block-editor-renderer-code-block>\n }\n\n @case (BLOCKS.HARDBREAK) {\n <br />\n }\n\n @case (BLOCKS.HORIZONTAL_RULE) {\n <hr />\n }\n\n @case (BLOCKS.DOT_IMAGE) {\n <dotcms-block-editor-renderer-image [attrs]=\"node.attrs || {}\" />\n }\n\n @case (BLOCKS.DOT_VIDEO) {\n <dotcms-block-editor-renderer-video [attrs]=\"node.attrs || {}\" />\n }\n\n @case (BLOCKS.TABLE) {\n <dotcms-block-editor-renderer-table [content]=\"node.content\" [attrs]=\"node.attrs\" />\n }\n\n @case (BLOCKS.GRID_BLOCK) {\n <dotcms-block-editor-renderer-grid-block\n [node]=\"node\"\n [customRenderers]=\"customRenderers\" />\n }\n\n @case (BLOCKS.DOT_CONTENT) {\n <dotcms-block-editor-renderer-contentlet\n [node]=\"node\"\n [customRenderers]=\"customRenderers\" />\n }\n\n @default {\n <dotcms-block-editor-renderer-unknown [node]=\"node\" />\n }\n }\n }\n}\n\n<ng-template #customRender let-customRender=\"customRender\" let-node=\"node\">\n <ng-container *ngComponentOutlet=\"customRender | async; inputs: { node: node }\" />\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: DotCMSBlockEditorItemComponent, selector: "dotcms-block-editor-renderer-block", inputs: ["content", "customRenderers"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: DotParagraphBlock, selector: "dotcms-block-editor-renderer-paragraph" }, { kind: "component", type: DotTextBlock, selector: "dotcms-block-editor-renderer-text", inputs: ["marks", "text"] }, { kind: "component", type: DotHeadingBlock, selector: "dotcms-block-editor-renderer-heading", inputs: ["level"] }, { kind: "component", type: DotBulletList, selector: "dotcms-block-editor-renderer-bullet-list" }, { kind: "component", type: DotOrdererList, selector: "dotcms-block-editor-renderer-ordered-list" }, { kind: "component", type: DotListItem, selector: "dotcms-block-editor-renderer-list-item" }, { kind: "component", type: DotCodeBlock, selector: "dotcms-block-editor-renderer-code-block" }, { kind: "component", type: DotBlockQuote, selector: "dotcms-block-editor-renderer-block-quote" }, { kind: "component", type: DotImageBlock, selector: "dotcms-block-editor-renderer-image", inputs: ["attrs"] }, { kind: "component", type: DotVideoBlock, selector: "dotcms-block-editor-renderer-video", inputs: ["attrs"] }, { kind: "component", type: DotTableBlock, selector: "dotcms-block-editor-renderer-table", inputs: ["content", "attrs"] }, { kind: "component", type: DotGridBlock, selector: "dotcms-block-editor-renderer-grid-block", inputs: ["node", "customRenderers"] }, { kind: "component", type: DotContentletBlock, selector: "dotcms-block-editor-renderer-contentlet", inputs: ["customRenderers", "node"] }, { kind: "component", type: DotUnknownBlockComponent, selector: "dotcms-block-editor-renderer-unknown", inputs: ["node"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
1235
1240
|
}
|
|
1236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSBlockEditorItemComponent, decorators: [{
|
|
1237
1242
|
type: Component,
|
|
1238
1243
|
args: [{ selector: 'dotcms-block-editor-renderer-block', imports: [
|
|
1239
1244
|
NgTemplateOutlet,
|
|
@@ -1287,8 +1292,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1287
1292
|
*/
|
|
1288
1293
|
class DotCMSBlockEditorRendererComponent {
|
|
1289
1294
|
constructor() {
|
|
1290
|
-
this.$blockEditorState = signal({ error: null }, ...(ngDevMode ? [{ debugName: "$blockEditorState" }] : []));
|
|
1291
|
-
this.$isInEditMode = signal(getUVEState()?.mode === UVE_MODE.EDIT, ...(ngDevMode ? [{ debugName: "$isInEditMode" }] : []));
|
|
1295
|
+
this.$blockEditorState = signal({ error: null }, ...(ngDevMode ? [{ debugName: "$blockEditorState" }] : /* istanbul ignore next */ []));
|
|
1296
|
+
this.$isInEditMode = signal(getUVEState()?.mode === UVE_MODE.EDIT, ...(ngDevMode ? [{ debugName: "$isInEditMode" }] : /* istanbul ignore next */ []));
|
|
1292
1297
|
}
|
|
1293
1298
|
ngOnInit() {
|
|
1294
1299
|
const state = isValidBlocks(this.blocks);
|
|
@@ -1297,10 +1302,10 @@ class DotCMSBlockEditorRendererComponent {
|
|
|
1297
1302
|
}
|
|
1298
1303
|
this.$blockEditorState.set(isValidBlocks(this.blocks));
|
|
1299
1304
|
}
|
|
1300
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1301
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1305
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSBlockEditorRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1306
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DotCMSBlockEditorRendererComponent, isStandalone: true, selector: "dotcms-block-editor-renderer", inputs: { blocks: "blocks", customRenderers: "customRenderers", class: "class", style: "style" }, ngImport: i0, template: "@if ($blockEditorState().error && $isInEditMode()) {\n <div data-testid=\"invalid-blocks-message\">\n {{ $blockEditorState().error }}\n </div>\n} @else if (!$blockEditorState().error) {\n <div [class]=\"class\" [style]=\"style\">\n <dotcms-block-editor-renderer-block\n [content]=\"blocks.content\"\n [customRenderers]=\"customRenderers\" />\n </div>\n}\n", styles: [""], dependencies: [{ kind: "component", type: DotCMSBlockEditorItemComponent, selector: "dotcms-block-editor-renderer-block", inputs: ["content", "customRenderers"] }] }); }
|
|
1302
1307
|
}
|
|
1303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSBlockEditorRendererComponent, decorators: [{
|
|
1304
1309
|
type: Component,
|
|
1305
1310
|
args: [{ selector: 'dotcms-block-editor-renderer', imports: [DotCMSBlockEditorItemComponent], template: "@if ($blockEditorState().error && $isInEditMode()) {\n <div data-testid=\"invalid-blocks-message\">\n {{ $blockEditorState().error }}\n </div>\n} @else if (!$blockEditorState().error) {\n <div [class]=\"class\" [style]=\"style\">\n <dotcms-block-editor-renderer-block\n [content]=\"blocks.content\"\n [customRenderers]=\"customRenderers\" />\n </div>\n}\n" }]
|
|
1306
1311
|
}], propDecorators: { blocks: [{
|
|
@@ -1328,12 +1333,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1328
1333
|
* @internal
|
|
1329
1334
|
*/
|
|
1330
1335
|
class DotSemanticBulletList {
|
|
1331
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1332
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1336
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticBulletList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1337
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotSemanticBulletList, isStandalone: true, selector: "ul[dotBulletList]", ngImport: i0, template: `
|
|
1333
1338
|
<ng-content />
|
|
1334
1339
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1335
1340
|
}
|
|
1336
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticBulletList, decorators: [{
|
|
1337
1342
|
type: Component,
|
|
1338
1343
|
args: [{
|
|
1339
1344
|
selector: 'ul[dotBulletList]',
|
|
@@ -1344,12 +1349,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1344
1349
|
}]
|
|
1345
1350
|
}] });
|
|
1346
1351
|
class DotSemanticOrderedList {
|
|
1347
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1348
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1352
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticOrderedList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1353
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotSemanticOrderedList, isStandalone: true, selector: "ol[dotOrderedList]", ngImport: i0, template: `
|
|
1349
1354
|
<ng-content />
|
|
1350
1355
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1351
1356
|
}
|
|
1352
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1357
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticOrderedList, decorators: [{
|
|
1353
1358
|
type: Component,
|
|
1354
1359
|
args: [{
|
|
1355
1360
|
selector: 'ol[dotOrderedList]',
|
|
@@ -1360,12 +1365,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1360
1365
|
}]
|
|
1361
1366
|
}] });
|
|
1362
1367
|
class DotSemanticListItem {
|
|
1363
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1364
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1368
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticListItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1369
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotSemanticListItem, isStandalone: true, selector: "li[dotListItem]", ngImport: i0, template: `
|
|
1365
1370
|
<ng-content />
|
|
1366
1371
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1367
1372
|
}
|
|
1368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticListItem, decorators: [{
|
|
1369
1374
|
type: Component,
|
|
1370
1375
|
args: [{
|
|
1371
1376
|
selector: 'li[dotListItem]',
|
|
@@ -1376,12 +1381,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1376
1381
|
}]
|
|
1377
1382
|
}] });
|
|
1378
1383
|
class DotSemanticParagraph {
|
|
1379
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1380
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticParagraph, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1385
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotSemanticParagraph, isStandalone: true, selector: "p[dotParagraph]", ngImport: i0, template: `
|
|
1381
1386
|
<ng-content />
|
|
1382
1387
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1383
1388
|
}
|
|
1384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1389
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticParagraph, decorators: [{
|
|
1385
1390
|
type: Component,
|
|
1386
1391
|
args: [{
|
|
1387
1392
|
selector: 'p[dotParagraph]',
|
|
@@ -1392,12 +1397,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1392
1397
|
}]
|
|
1393
1398
|
}] });
|
|
1394
1399
|
class DotSemanticBlockQuote {
|
|
1395
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1396
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1400
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticBlockQuote, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1401
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotSemanticBlockQuote, isStandalone: true, selector: "blockquote[dotBlockQuote]", ngImport: i0, template: `
|
|
1397
1402
|
<ng-content />
|
|
1398
1403
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1399
1404
|
}
|
|
1400
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticBlockQuote, decorators: [{
|
|
1401
1406
|
type: Component,
|
|
1402
1407
|
args: [{
|
|
1403
1408
|
selector: 'blockquote[dotBlockQuote]',
|
|
@@ -1408,12 +1413,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1408
1413
|
}]
|
|
1409
1414
|
}] });
|
|
1410
1415
|
class DotSemanticCodeBlock {
|
|
1411
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1412
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1416
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticCodeBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1417
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DotSemanticCodeBlock, isStandalone: true, selector: "pre[dotCodeBlock]", ngImport: i0, template: `
|
|
1413
1418
|
<code><ng-content /></code>
|
|
1414
1419
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1415
1420
|
}
|
|
1416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotSemanticCodeBlock, decorators: [{
|
|
1417
1422
|
type: Component,
|
|
1418
1423
|
args: [{
|
|
1419
1424
|
selector: 'pre[dotCodeBlock]',
|
|
@@ -1451,18 +1456,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1451
1456
|
class DotCMSBlockEditorRendererNativeComponent {
|
|
1452
1457
|
constructor() {
|
|
1453
1458
|
/** The Block Editor `doc` node to render. */
|
|
1454
|
-
this.blocks = input(...(ngDevMode ? [undefined, { debugName: "blocks" }] : []));
|
|
1459
|
+
this.blocks = input(...(ngDevMode ? [undefined, { debugName: "blocks" }] : /* istanbul ignore next */ []));
|
|
1455
1460
|
/** Map of `node.type` → component to override the built-in render path. */
|
|
1456
|
-
this.customRenderers = input(undefined, ...(ngDevMode ? [{ debugName: "customRenderers" }] : []));
|
|
1461
|
+
this.customRenderers = input(undefined, ...(ngDevMode ? [{ debugName: "customRenderers" }] : /* istanbul ignore next */ []));
|
|
1457
1462
|
/**
|
|
1458
1463
|
* CSS class on the wrapper element. Aliased as `class` so consumers can
|
|
1459
1464
|
* pass `[class]="…"` like a normal Angular class binding.
|
|
1460
1465
|
*/
|
|
1461
|
-
this.cssClass = input(undefined, { ...(ngDevMode ? { debugName: "cssClass" } : {}), alias: 'class' });
|
|
1466
|
+
this.cssClass = input(undefined, { ...(ngDevMode ? { debugName: "cssClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
1462
1467
|
/** Inline style on the wrapper element. */
|
|
1463
|
-
this.style = input(undefined, ...(ngDevMode ? [{ debugName: "style" }] : []));
|
|
1464
|
-
this.$blockEditorState = signal({ error: null }, ...(ngDevMode ? [{ debugName: "$blockEditorState" }] : []));
|
|
1465
|
-
this.$isInEditMode = signal(getUVEState()?.mode === UVE_MODE.EDIT, ...(ngDevMode ? [{ debugName: "$isInEditMode" }] : []));
|
|
1468
|
+
this.style = input(undefined, ...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
|
|
1469
|
+
this.$blockEditorState = signal({ error: null }, ...(ngDevMode ? [{ debugName: "$blockEditorState" }] : /* istanbul ignore next */ []));
|
|
1470
|
+
this.$isInEditMode = signal(getUVEState()?.mode === UVE_MODE.EDIT, ...(ngDevMode ? [{ debugName: "$isInEditMode" }] : /* istanbul ignore next */ []));
|
|
1466
1471
|
this.BLOCKS = BlockEditorDefaultBlocks;
|
|
1467
1472
|
}
|
|
1468
1473
|
ngOnInit() {
|
|
@@ -1527,10 +1532,10 @@ class DotCMSBlockEditorRendererNativeComponent {
|
|
|
1527
1532
|
const span = valid ? rawCols[index] : 6;
|
|
1528
1533
|
return typeof span === 'number' ? span : 6;
|
|
1529
1534
|
}
|
|
1530
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1531
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: DotCMSBlockEditorRendererNativeComponent, isStandalone: true, selector: "dotcms-block-editor-renderer-native", inputs: { blocks: { classPropertyName: "blocks", publicName: "blocks", isSignal: true, isRequired: false, transformFunction: null }, customRenderers: { classPropertyName: "customRenderers", publicName: "customRenderers", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if ($blockEditorState().error && $isInEditMode()) {\n <div data-testid=\"invalid-blocks-message\">\n {{ $blockEditorState().error }}\n </div>\n} @else if (!$blockEditorState().error) {\n <div [class]=\"cssClass()\" [style]=\"style()\">\n <ng-container *ngTemplateOutlet=\"nodeList; context: { $implicit: blocks()?.content }\" />\n </div>\n}\n\n<!-- Renders a list of nodes by dispatching each one. -->\n<ng-template #nodeList let-content>\n @for (node of content; track node) {\n <ng-container *ngTemplateOutlet=\"dispatch; context: { $implicit: node }\" />\n }\n</ng-template>\n\n<!--\n Dispatches a single node to its semantic tag. The host ng-container of each\n ngTemplateOutlet renders as an HTML comment node, so a list item stays a true\n DOM child of its list element \u2014 the property that makes this AT-proof.\n-->\n<ng-template #dispatch let-node>\n @if (customRenderers()?.[node.type]) {\n <ng-container\n *ngTemplateOutlet=\"\n customRender;\n context: { customRender: customRenderers()?.[node.type], node: node }\n \" />\n } @else {\n @switch (node.type) {\n @case (BLOCKS.PARAGRAPH) {\n <p dotParagraph [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" />\n </p>\n }\n\n @case (BLOCKS.TEXT) {\n <ng-container\n *ngTemplateOutlet=\"\n textRun;\n context: { marks: node.marks, text: node.text || '' }\n \" />\n }\n\n @case (BLOCKS.HEADING) {\n @switch (asLevel(node.attrs?.['level'])) {\n @case ('1') {\n <h1 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h1>\n }\n @case ('2') {\n <h2 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h2>\n }\n @case ('3') {\n <h3 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h3>\n }\n @case ('4') {\n <h4 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h4>\n }\n @case ('5') {\n <h5 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h5>\n }\n @case ('6') {\n <h6 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h6>\n }\n @default {\n <!--\n Unknown level: fall back to <h2>, not <h1>. An\n unexpected <h1> in an article tanks the heading\n outline that assistive technology relies on, and\n articles typically already have a page <h1>.\n -->\n <h2 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h2>\n }\n }\n }\n\n @case (BLOCKS.BULLET_LIST) {\n <ul dotBulletList>\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" />\n </ul>\n }\n\n @case (BLOCKS.ORDERED_LIST) {\n <ol dotOrderedList>\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" />\n </ol>\n }\n\n @case (BLOCKS.LIST_ITEM) {\n <li dotListItem>\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" />\n </li>\n }\n\n @case (BLOCKS.BLOCK_QUOTE) {\n <blockquote dotBlockQuote>\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" />\n </blockquote>\n }\n\n @case (BLOCKS.CODE_BLOCK) {\n <pre dotCodeBlock>\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" /></pre>\n }\n\n @case (BLOCKS.HARDBREAK) {\n <br />\n }\n\n @case (BLOCKS.HORIZONTAL_RULE) {\n <hr />\n }\n\n @case (BLOCKS.DOT_IMAGE) {\n <figure [style]=\"imageStyle(node.attrs)\">\n <img\n [alt]=\"node.attrs?.['alt']\"\n [src]=\"node.attrs?.['src']\"\n style=\"max-width: 100%; height: auto\" />\n </figure>\n }\n\n @case (BLOCKS.DOT_VIDEO) {\n <video\n [controls]=\"true\"\n preload=\"metadata\"\n [poster]=\"videoPoster(node.attrs)\"\n [width]=\"node.attrs?.['width']\"\n [height]=\"node.attrs?.['height']\">\n <track default kind=\"captions\" srclang=\"en\" />\n <source [src]=\"node.attrs?.['src']\" [type]=\"node.attrs?.['mimeType']\" />\n Your browser does not support the\n <code>video</code>\n element.\n </video>\n }\n\n @case (BLOCKS.TABLE) {\n <table>\n <thead>\n @for (rowNode of node.content?.slice(0, 1); track $index) {\n <tr>\n @for (cellNode of rowNode.content; track $index) {\n <th\n [attr.colspan]=\"cellNode.attrs?.['colspan'] || 1\"\n [attr.rowspan]=\"cellNode.attrs?.['rowspan'] || 1\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: cellNode.content }\n \" />\n </th>\n }\n </tr>\n }\n </thead>\n <tbody>\n @for (rowNode of node.content?.slice(1); track $index) {\n <tr>\n @for (cellNode of rowNode.content; track $index) {\n <td\n [attr.colspan]=\"cellNode.attrs?.['colspan'] || 1\"\n [attr.rowspan]=\"cellNode.attrs?.['rowspan'] || 1\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: cellNode.content }\n \" />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n }\n\n @case (BLOCKS.GRID_BLOCK) {\n <div\n data-type=\"gridBlock\"\n class=\"grid-block\"\n style=\"display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem\">\n @for (column of node.content; track $index) {\n <div\n data-type=\"gridColumn\"\n class=\"grid-block__column\"\n [style.grid-column]=\"'span ' + columnSpan(node.attrs, $index)\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: column.content }\n \" />\n </div>\n }\n </div>\n }\n\n @case (BLOCKS.DOT_CONTENT) {\n <dotcms-block-editor-renderer-contentlet\n [node]=\"node\"\n [customRenderers]=\"customRenderers()\" />\n }\n\n @default {\n <dotcms-block-editor-renderer-unknown [node]=\"node\" />\n }\n }\n }\n</ng-template>\n\n<ng-template #customRender let-customRender=\"customRender\" let-node=\"node\">\n <ng-container *ngComponentOutlet=\"customRender | async; inputs: { node: node }\" />\n</ng-template>\n\n<!--\n Renders a text node and its marks as native inline elements (<strong>, <u>,\n <em>, <a>, ...) with no wrapper element. Recurses through itself (rendered as a\n comment node) one mark at a time, so stacked marks nest directly:\n <u><strong>text</strong></u>.\n-->\n<ng-template #textRun let-marks=\"marks\" let-text=\"text\">\n @switch (marks?.[0]?.type) {\n @case ('link') {\n @if (markAttrs(marks)['href']) {\n <a\n [attr.href]=\"markAttrs(marks)['href']\"\n [attr.target]=\"markAttrs(marks)['target'] || null\"\n [attr.title]=\"markAttrs(marks)['title'] || null\"\n [attr.aria-label]=\"markAttrs(marks)['aria-label'] || null\"\n [attr.rel]=\"\n markAttrs(marks)['rel'] ||\n (markAttrs(marks)['target'] === '_blank' ? 'noopener noreferrer' : null)\n \"\n [class]=\"markAttrs(marks)['class'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n textRun;\n context: { marks: restMarks(marks), text: text }\n \" />\n </a>\n } @else {\n <!--\n Malformed link mark with no href: a hrefless <a> isn't a\n link to assistive tech (no role, not focusable). Skip the\n element and recurse \u2014 any remaining marks (bold, etc.)\n still render around the text.\n -->\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n }\n }\n @case ('bold') {\n <strong>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </strong>\n }\n @case ('underline') {\n <u>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </u>\n }\n @case ('italic') {\n <em>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </em>\n }\n @case ('strike') {\n <s>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </s>\n }\n @case ('superscript') {\n <sup>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </sup>\n }\n @case ('subscript') {\n <sub>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </sub>\n }\n @default {\n @if (marks?.length) {\n <!-- Unknown mark type: skip it but keep rendering any marks beneath. -->\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n } @else {\n {{ text }}\n }\n }\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: DotSemanticParagraph, selector: "p[dotParagraph]" }, { kind: "component", type: DotSemanticBulletList, selector: "ul[dotBulletList]" }, { kind: "component", type: DotSemanticOrderedList, selector: "ol[dotOrderedList]" }, { kind: "component", type: DotSemanticListItem, selector: "li[dotListItem]" }, { kind: "component", type: DotSemanticBlockQuote, selector: "blockquote[dotBlockQuote]" }, { kind: "component", type: DotSemanticCodeBlock, selector: "pre[dotCodeBlock]" }, { kind: "component", type: DotContentletBlock, selector: "dotcms-block-editor-renderer-contentlet", inputs: ["customRenderers", "node"] }, { kind: "component", type: DotUnknownBlockComponent, selector: "dotcms-block-editor-renderer-unknown", inputs: ["node"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1535
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSBlockEditorRendererNativeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1536
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DotCMSBlockEditorRendererNativeComponent, isStandalone: true, selector: "dotcms-block-editor-renderer-native", inputs: { blocks: { classPropertyName: "blocks", publicName: "blocks", isSignal: true, isRequired: false, transformFunction: null }, customRenderers: { classPropertyName: "customRenderers", publicName: "customRenderers", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if ($blockEditorState().error && $isInEditMode()) {\n <div data-testid=\"invalid-blocks-message\">\n {{ $blockEditorState().error }}\n </div>\n} @else if (!$blockEditorState().error) {\n <div [class]=\"cssClass()\" [style]=\"style()\">\n <ng-container *ngTemplateOutlet=\"nodeList; context: { $implicit: blocks()?.content }\" />\n </div>\n}\n\n<!-- Renders a list of nodes by dispatching each one. -->\n<ng-template #nodeList let-content>\n @for (node of content; track node) {\n <ng-container *ngTemplateOutlet=\"dispatch; context: { $implicit: node }\" />\n }\n</ng-template>\n\n<!--\n Dispatches a single node to its semantic tag. The host ng-container of each\n ngTemplateOutlet renders as an HTML comment node, so a list item stays a true\n DOM child of its list element \u2014 the property that makes this AT-proof.\n-->\n<ng-template #dispatch let-node>\n @if (customRenderers()?.[node.type]) {\n <ng-container\n *ngTemplateOutlet=\"\n customRender;\n context: { customRender: customRenderers()?.[node.type], node: node }\n \" />\n } @else {\n @switch (node.type) {\n @case (BLOCKS.PARAGRAPH) {\n <p dotParagraph [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" />\n </p>\n }\n\n @case (BLOCKS.TEXT) {\n <ng-container\n *ngTemplateOutlet=\"\n textRun;\n context: { marks: node.marks, text: node.text || '' }\n \" />\n }\n\n @case (BLOCKS.HEADING) {\n @switch (asLevel(node.attrs?.['level'])) {\n @case ('1') {\n <h1 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h1>\n }\n @case ('2') {\n <h2 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h2>\n }\n @case ('3') {\n <h3 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h3>\n }\n @case ('4') {\n <h4 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h4>\n }\n @case ('5') {\n <h5 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h5>\n }\n @case ('6') {\n <h6 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h6>\n }\n @default {\n <!--\n Unknown level: fall back to <h2>, not <h1>. An\n unexpected <h1> in an article tanks the heading\n outline that assistive technology relies on, and\n articles typically already have a page <h1>.\n -->\n <h2 [style.text-align]=\"node.attrs?.['textAlign'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: node.content }\n \" />\n </h2>\n }\n }\n }\n\n @case (BLOCKS.BULLET_LIST) {\n <ul dotBulletList>\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" />\n </ul>\n }\n\n @case (BLOCKS.ORDERED_LIST) {\n <ol dotOrderedList>\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" />\n </ol>\n }\n\n @case (BLOCKS.LIST_ITEM) {\n <li dotListItem>\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" />\n </li>\n }\n\n @case (BLOCKS.BLOCK_QUOTE) {\n <blockquote dotBlockQuote>\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" />\n </blockquote>\n }\n\n @case (BLOCKS.CODE_BLOCK) {\n <pre dotCodeBlock>\n <ng-container\n *ngTemplateOutlet=\"nodeList; context: { $implicit: node.content }\" /></pre>\n }\n\n @case (BLOCKS.HARDBREAK) {\n <br />\n }\n\n @case (BLOCKS.HORIZONTAL_RULE) {\n <hr />\n }\n\n @case (BLOCKS.DOT_IMAGE) {\n <figure [style]=\"imageStyle(node.attrs)\">\n <img\n [alt]=\"node.attrs?.['alt']\"\n [src]=\"node.attrs?.['src']\"\n style=\"max-width: 100%; height: auto\" />\n </figure>\n }\n\n @case (BLOCKS.DOT_VIDEO) {\n <video\n [controls]=\"true\"\n preload=\"metadata\"\n [poster]=\"videoPoster(node.attrs)\"\n [width]=\"node.attrs?.['width']\"\n [height]=\"node.attrs?.['height']\">\n <track default kind=\"captions\" srclang=\"en\" />\n <source [src]=\"node.attrs?.['src']\" [type]=\"node.attrs?.['mimeType']\" />\n Your browser does not support the\n <code>video</code>\n element.\n </video>\n }\n\n @case (BLOCKS.TABLE) {\n <table>\n <thead>\n @for (rowNode of node.content?.slice(0, 1); track $index) {\n <tr>\n @for (cellNode of rowNode.content; track $index) {\n <th\n [attr.colspan]=\"cellNode.attrs?.['colspan'] || 1\"\n [attr.rowspan]=\"cellNode.attrs?.['rowspan'] || 1\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: cellNode.content }\n \" />\n </th>\n }\n </tr>\n }\n </thead>\n <tbody>\n @for (rowNode of node.content?.slice(1); track $index) {\n <tr>\n @for (cellNode of rowNode.content; track $index) {\n <td\n [attr.colspan]=\"cellNode.attrs?.['colspan'] || 1\"\n [attr.rowspan]=\"cellNode.attrs?.['rowspan'] || 1\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: cellNode.content }\n \" />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n }\n\n @case (BLOCKS.GRID_BLOCK) {\n <div\n data-type=\"gridBlock\"\n class=\"grid-block\"\n style=\"display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem\">\n @for (column of node.content; track $index) {\n <div\n data-type=\"gridColumn\"\n class=\"grid-block__column\"\n [style.grid-column]=\"'span ' + columnSpan(node.attrs, $index)\">\n <ng-container\n *ngTemplateOutlet=\"\n nodeList;\n context: { $implicit: column.content }\n \" />\n </div>\n }\n </div>\n }\n\n @case (BLOCKS.DOT_CONTENT) {\n <dotcms-block-editor-renderer-contentlet\n [node]=\"node\"\n [customRenderers]=\"customRenderers()\" />\n }\n\n @default {\n <dotcms-block-editor-renderer-unknown [node]=\"node\" />\n }\n }\n }\n</ng-template>\n\n<ng-template #customRender let-customRender=\"customRender\" let-node=\"node\">\n <ng-container *ngComponentOutlet=\"customRender | async; inputs: { node: node }\" />\n</ng-template>\n\n<!--\n Renders a text node and its marks as native inline elements (<strong>, <u>,\n <em>, <a>, ...) with no wrapper element. Recurses through itself (rendered as a\n comment node) one mark at a time, so stacked marks nest directly:\n <u><strong>text</strong></u>.\n-->\n<ng-template #textRun let-marks=\"marks\" let-text=\"text\">\n @switch (marks?.[0]?.type) {\n @case ('link') {\n @if (markAttrs(marks)['href']) {\n <a\n [attr.href]=\"markAttrs(marks)['href']\"\n [attr.target]=\"markAttrs(marks)['target'] || null\"\n [attr.title]=\"markAttrs(marks)['title'] || null\"\n [attr.aria-label]=\"markAttrs(marks)['aria-label'] || null\"\n [attr.rel]=\"\n markAttrs(marks)['rel'] ||\n (markAttrs(marks)['target'] === '_blank' ? 'noopener noreferrer' : null)\n \"\n [class]=\"markAttrs(marks)['class'] || null\">\n <ng-container\n *ngTemplateOutlet=\"\n textRun;\n context: { marks: restMarks(marks), text: text }\n \" />\n </a>\n } @else {\n <!--\n Malformed link mark with no href: a hrefless <a> isn't a\n link to assistive tech (no role, not focusable). Skip the\n element and recurse \u2014 any remaining marks (bold, etc.)\n still render around the text.\n -->\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n }\n }\n @case ('bold') {\n <strong>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </strong>\n }\n @case ('underline') {\n <u>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </u>\n }\n @case ('italic') {\n <em>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </em>\n }\n @case ('strike') {\n <s>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </s>\n }\n @case ('superscript') {\n <sup>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </sup>\n }\n @case ('subscript') {\n <sub>\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n </sub>\n }\n @default {\n @if (marks?.length) {\n <!-- Unknown mark type: skip it but keep rendering any marks beneath. -->\n <ng-container\n *ngTemplateOutlet=\"textRun; context: { marks: restMarks(marks), text: text }\" />\n } @else {\n {{ text }}\n }\n }\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: DotSemanticParagraph, selector: "p[dotParagraph]" }, { kind: "component", type: DotSemanticBulletList, selector: "ul[dotBulletList]" }, { kind: "component", type: DotSemanticOrderedList, selector: "ol[dotOrderedList]" }, { kind: "component", type: DotSemanticListItem, selector: "li[dotListItem]" }, { kind: "component", type: DotSemanticBlockQuote, selector: "blockquote[dotBlockQuote]" }, { kind: "component", type: DotSemanticCodeBlock, selector: "pre[dotCodeBlock]" }, { kind: "component", type: DotContentletBlock, selector: "dotcms-block-editor-renderer-contentlet", inputs: ["customRenderers", "node"] }, { kind: "component", type: DotUnknownBlockComponent, selector: "dotcms-block-editor-renderer-unknown", inputs: ["node"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1532
1537
|
}
|
|
1533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSBlockEditorRendererNativeComponent, decorators: [{
|
|
1534
1539
|
type: Component,
|
|
1535
1540
|
args: [{ selector: 'dotcms-block-editor-renderer-native', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1536
1541
|
NgTemplateOutlet,
|
|
@@ -1556,8 +1561,8 @@ class PageErrorMessageComponent {
|
|
|
1556
1561
|
ngOnInit() {
|
|
1557
1562
|
console.warn('Missing required layout.body property in page');
|
|
1558
1563
|
}
|
|
1559
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1560
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1564
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PageErrorMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1565
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: PageErrorMessageComponent, isStandalone: true, selector: "dotcms-page-error-message", ngImport: i0, template: `
|
|
1561
1566
|
<div
|
|
1562
1567
|
data-testid="error-message"
|
|
1563
1568
|
style="padding: 1rem; border: 1px solid #e0e0e0; border-radius: 4px;">
|
|
@@ -1574,7 +1579,7 @@ class PageErrorMessageComponent {
|
|
|
1574
1579
|
</div>
|
|
1575
1580
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1576
1581
|
}
|
|
1577
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1582
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: PageErrorMessageComponent, decorators: [{
|
|
1578
1583
|
type: Component,
|
|
1579
1584
|
args: [{
|
|
1580
1585
|
selector: 'dotcms-page-error-message',
|
|
@@ -1613,7 +1618,23 @@ const EMPTY_DOTCMS_PAGE_STORE = {
|
|
|
1613
1618
|
*/
|
|
1614
1619
|
class DotCMSStore {
|
|
1615
1620
|
constructor() {
|
|
1616
|
-
this.$store = signal(EMPTY_DOTCMS_PAGE_STORE, ...(ngDevMode ? [{ debugName: "$store" }] : []));
|
|
1621
|
+
this.$store = signal(EMPTY_DOTCMS_PAGE_STORE, ...(ngDevMode ? [{ debugName: "$store" }] : /* istanbul ignore next */ []));
|
|
1622
|
+
/**
|
|
1623
|
+
* @description Get whether DotCMS Analytics is active on the page. Used in
|
|
1624
|
+
* live mode to decide if the minimal contentlet attributes Analytics needs
|
|
1625
|
+
* should be kept.
|
|
1626
|
+
*
|
|
1627
|
+
* Analytics may initialize after the page renders, so we track its `ready`
|
|
1628
|
+
* event as a stream and project it into a signal. `fromEvent` registers via
|
|
1629
|
+
* zone-patched `addEventListener`, so change detection is scheduled without
|
|
1630
|
+
* any manual `NgZone` handling.
|
|
1631
|
+
* @readonly
|
|
1632
|
+
* @type {Signal<boolean>}
|
|
1633
|
+
* @memberof DotCMSStore
|
|
1634
|
+
*/
|
|
1635
|
+
this.$isAnalyticsActive = typeof window === 'undefined'
|
|
1636
|
+
? signal(false)
|
|
1637
|
+
: toSignal(fromEvent(window, ANALYTICS_READY_EVENT).pipe(map(() => isDotAnalyticsActive())), { initialValue: isDotAnalyticsActive() });
|
|
1617
1638
|
/**
|
|
1618
1639
|
* @description Get if the current context is in development mode
|
|
1619
1640
|
* @readonly
|
|
@@ -1626,7 +1647,7 @@ class DotCMSStore {
|
|
|
1626
1647
|
return uveState?.mode === UVE_MODE.EDIT;
|
|
1627
1648
|
}
|
|
1628
1649
|
return this.$store()?.mode === DEVELOPMENT_MODE;
|
|
1629
|
-
}, ...(ngDevMode ? [{ debugName: "$isDevMode" }] : []));
|
|
1650
|
+
}, ...(ngDevMode ? [{ debugName: "$isDevMode" }] : /* istanbul ignore next */ []));
|
|
1630
1651
|
}
|
|
1631
1652
|
/**
|
|
1632
1653
|
* @description Get the store
|
|
@@ -1645,10 +1666,10 @@ class DotCMSStore {
|
|
|
1645
1666
|
setStore(store) {
|
|
1646
1667
|
this.$store.set(store);
|
|
1647
1668
|
}
|
|
1648
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1649
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1669
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1670
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSStore, providedIn: 'root' }); }
|
|
1650
1671
|
}
|
|
1651
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSStore, decorators: [{
|
|
1652
1673
|
type: Injectable,
|
|
1653
1674
|
args: [{
|
|
1654
1675
|
providedIn: 'root'
|
|
@@ -1675,8 +1696,8 @@ class ContainerNotFoundComponent {
|
|
|
1675
1696
|
console.error(`Container with identifier ${this.identifier} not found`);
|
|
1676
1697
|
}
|
|
1677
1698
|
}
|
|
1678
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1679
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1699
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ContainerNotFoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1700
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: ContainerNotFoundComponent, isStandalone: true, selector: "dotcms-container-not-found", inputs: { identifier: "identifier" }, ngImport: i0, template: `
|
|
1680
1701
|
@if ($isDevMode()) {
|
|
1681
1702
|
<div [attr.data-testid]="'container-not-found'" [ngStyle]="emptyContainerStyle">
|
|
1682
1703
|
This container with identifier {{ identifier }} was not found.
|
|
@@ -1684,7 +1705,7 @@ class ContainerNotFoundComponent {
|
|
|
1684
1705
|
}
|
|
1685
1706
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
1686
1707
|
}
|
|
1687
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ContainerNotFoundComponent, decorators: [{
|
|
1688
1709
|
type: Component,
|
|
1689
1710
|
args: [{
|
|
1690
1711
|
selector: 'dotcms-container-not-found',
|
|
@@ -1714,8 +1735,8 @@ class EmptyContainerComponent {
|
|
|
1714
1735
|
this.$isDevMode = this.#dotCMSStore.$isDevMode;
|
|
1715
1736
|
}
|
|
1716
1737
|
#dotCMSStore;
|
|
1717
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1718
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1738
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: EmptyContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1739
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: EmptyContainerComponent, isStandalone: true, selector: "dotcms-empty-container", ngImport: i0, template: `
|
|
1719
1740
|
@if ($isDevMode()) {
|
|
1720
1741
|
<div [ngStyle]="emptyContainerStyle" data-testid="empty-container">
|
|
1721
1742
|
<span data-testid="empty-container-message" data-dot-object="empty-content">
|
|
@@ -1725,7 +1746,7 @@ class EmptyContainerComponent {
|
|
|
1725
1746
|
}
|
|
1726
1747
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
1727
1748
|
}
|
|
1728
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: EmptyContainerComponent, decorators: [{
|
|
1729
1750
|
type: Component,
|
|
1730
1751
|
args: [{
|
|
1731
1752
|
selector: 'dotcms-empty-container',
|
|
@@ -1752,8 +1773,8 @@ class FallbackComponent {
|
|
|
1752
1773
|
constructor() {
|
|
1753
1774
|
this.UserNoComponent = null;
|
|
1754
1775
|
}
|
|
1755
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1756
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1776
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: FallbackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1777
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: FallbackComponent, isStandalone: true, selector: "dotcms-fallback-component", inputs: { UserNoComponent: "UserNoComponent", contentlet: "contentlet" }, ngImport: i0, template: `
|
|
1757
1778
|
@if (UserNoComponent) {
|
|
1758
1779
|
<ng-container *ngComponentOutlet="UserNoComponent | async; inputs: { contentlet }" />
|
|
1759
1780
|
} @else {
|
|
@@ -1763,7 +1784,7 @@ class FallbackComponent {
|
|
|
1763
1784
|
}
|
|
1764
1785
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1765
1786
|
}
|
|
1766
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1787
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: FallbackComponent, decorators: [{
|
|
1767
1788
|
type: Component,
|
|
1768
1789
|
args: [{
|
|
1769
1790
|
selector: 'dotcms-fallback-component',
|
|
@@ -1795,43 +1816,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1795
1816
|
*/
|
|
1796
1817
|
class ContentletComponent {
|
|
1797
1818
|
constructor() {
|
|
1798
|
-
this.dotObject = 'contentlet';
|
|
1799
1819
|
this.#dotCMSStore = inject(DotCMSStore);
|
|
1800
|
-
this.$contentlet = signal(null, ...(ngDevMode ? [{ debugName: "$contentlet" }] : []));
|
|
1801
|
-
this.$UserComponent = signal(null, ...(ngDevMode ? [{ debugName: "$UserComponent" }] : []));
|
|
1802
|
-
this.$UserNoComponent = signal(null, ...(ngDevMode ? [{ debugName: "$UserNoComponent" }] : []));
|
|
1820
|
+
this.$contentlet = signal(null, ...(ngDevMode ? [{ debugName: "$contentlet" }] : /* istanbul ignore next */ []));
|
|
1821
|
+
this.$UserComponent = signal(null, ...(ngDevMode ? [{ debugName: "$UserComponent" }] : /* istanbul ignore next */ []));
|
|
1822
|
+
this.$UserNoComponent = signal(null, ...(ngDevMode ? [{ debugName: "$UserNoComponent" }] : /* istanbul ignore next */ []));
|
|
1803
1823
|
this.$isDevMode = this.#dotCMSStore.$isDevMode;
|
|
1804
|
-
this.$
|
|
1805
|
-
this.$
|
|
1824
|
+
this.$isAnalyticsActive = this.#dotCMSStore.$isAnalyticsActive;
|
|
1825
|
+
this.$haveContent = signal(false, ...(ngDevMode ? [{ debugName: "$haveContent" }] : /* istanbul ignore next */ []));
|
|
1826
|
+
this.$style = computed(() => this.$isDevMode() && !this.$haveContent() ? { minHeight: '4rem' } : {}, ...(ngDevMode ? [{ debugName: "$style" }] : /* istanbul ignore next */ []));
|
|
1806
1827
|
this.$dotAttributes = computed(() => {
|
|
1807
1828
|
const contentlet = this.$contentlet();
|
|
1808
|
-
if (!contentlet
|
|
1829
|
+
if (!contentlet)
|
|
1809
1830
|
return {};
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
this.onNumberOfPages = null;
|
|
1819
|
-
this.styleProperties = null;
|
|
1820
|
-
this.styleAttribute = null;
|
|
1831
|
+
if (this.$isDevMode()) {
|
|
1832
|
+
return getDotContentletAttributes(contentlet, this.containerData.identifier);
|
|
1833
|
+
}
|
|
1834
|
+
if (this.$isAnalyticsActive()) {
|
|
1835
|
+
return getAnalyticsContentletAttributes(contentlet);
|
|
1836
|
+
}
|
|
1837
|
+
return {};
|
|
1838
|
+
}, ...(ngDevMode ? [{ debugName: "$dotAttributes" }] : /* istanbul ignore next */ []));
|
|
1821
1839
|
}
|
|
1822
1840
|
#dotCMSStore;
|
|
1823
1841
|
ngOnChanges() {
|
|
1824
1842
|
this.$contentlet.set(this.contentlet);
|
|
1825
1843
|
this.setupComponents();
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
this.
|
|
1833
|
-
this.styleProperties = this.$dotAttributes()['data-dot-style-properties'] || null;
|
|
1834
|
-
this.styleAttribute = this.$style();
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Serializes the container data for the `data-dot-container` editor attribute.
|
|
1847
|
+
* Only consumed by the host binding while in edit mode.
|
|
1848
|
+
*/
|
|
1849
|
+
getContainerAttribute() {
|
|
1850
|
+
return JSON.stringify(this.containerData);
|
|
1835
1851
|
}
|
|
1836
1852
|
ngAfterViewInit() {
|
|
1837
1853
|
this.checkContent();
|
|
@@ -1852,8 +1868,8 @@ class ContentletComponent {
|
|
|
1852
1868
|
this.$haveContent.set(hasContent);
|
|
1853
1869
|
}
|
|
1854
1870
|
}
|
|
1855
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1856
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1871
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ContentletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1872
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: ContentletComponent, isStandalone: true, selector: "dotcms-contentlet", inputs: { contentlet: "contentlet", containerData: "containerData" }, host: { properties: { "attr.data-dot-object": "$isDevMode() ? 'contentlet' : null", "attr.data-dot-identifier": "$dotAttributes()['data-dot-identifier'] ?? null", "attr.data-dot-basetype": "$dotAttributes()['data-dot-basetype'] ?? null", "attr.data-dot-title": "$dotAttributes()['data-dot-title'] ?? null", "attr.data-dot-inode": "$dotAttributes()['data-dot-inode'] ?? null", "attr.data-dot-type": "$dotAttributes()['data-dot-type'] ?? null", "attr.data-dot-container": "$isDevMode() ? getContainerAttribute() : null", "attr.data-dot-on-number-of-pages": "$dotAttributes()['data-dot-on-number-of-pages'] ?? null", "attr.data-dot-style-properties": "$dotAttributes()['data-dot-style-properties'] ?? null", "style": "$style()" } }, viewQueries: [{ propertyName: "contentletRef", first: true, predicate: ["contentletRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
1857
1873
|
@if ($UserComponent()) {
|
|
1858
1874
|
<ng-container
|
|
1859
1875
|
*ngComponentOutlet="
|
|
@@ -1867,7 +1883,7 @@ class ContentletComponent {
|
|
|
1867
1883
|
}
|
|
1868
1884
|
`, isInline: true, dependencies: [{ kind: "component", type: FallbackComponent, selector: "dotcms-fallback-component", inputs: ["UserNoComponent", "contentlet"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1869
1885
|
}
|
|
1870
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1886
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ContentletComponent, decorators: [{
|
|
1871
1887
|
type: Component,
|
|
1872
1888
|
args: [{
|
|
1873
1889
|
selector: 'dotcms-contentlet',
|
|
@@ -1885,6 +1901,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1885
1901
|
[contentlet]="$contentlet() ?? contentlet" />
|
|
1886
1902
|
}
|
|
1887
1903
|
`,
|
|
1904
|
+
// Editor-only metadata (data-dot-object, data-dot-container, etc.) is bound
|
|
1905
|
+
// only in edit mode. In live mode we keep the minimal set Analytics needs
|
|
1906
|
+
// via $dotAttributes (empty when Analytics is inactive).
|
|
1907
|
+
host: {
|
|
1908
|
+
'[attr.data-dot-object]': "$isDevMode() ? 'contentlet' : null",
|
|
1909
|
+
'[attr.data-dot-identifier]': "$dotAttributes()['data-dot-identifier'] ?? null",
|
|
1910
|
+
'[attr.data-dot-basetype]': "$dotAttributes()['data-dot-basetype'] ?? null",
|
|
1911
|
+
'[attr.data-dot-title]': "$dotAttributes()['data-dot-title'] ?? null",
|
|
1912
|
+
'[attr.data-dot-inode]': "$dotAttributes()['data-dot-inode'] ?? null",
|
|
1913
|
+
'[attr.data-dot-type]': "$dotAttributes()['data-dot-type'] ?? null",
|
|
1914
|
+
'[attr.data-dot-container]': '$isDevMode() ? getContainerAttribute() : null',
|
|
1915
|
+
'[attr.data-dot-on-number-of-pages]': "$dotAttributes()['data-dot-on-number-of-pages'] ?? null",
|
|
1916
|
+
'[attr.data-dot-style-properties]': "$dotAttributes()['data-dot-style-properties'] ?? null",
|
|
1917
|
+
'[style]': '$style()'
|
|
1918
|
+
},
|
|
1888
1919
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1889
1920
|
}]
|
|
1890
1921
|
}], propDecorators: { contentlet: [{
|
|
@@ -1896,36 +1927,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1896
1927
|
}], contentletRef: [{
|
|
1897
1928
|
type: ViewChild,
|
|
1898
1929
|
args: ['contentletRef']
|
|
1899
|
-
}], dotObject: [{
|
|
1900
|
-
type: HostBinding,
|
|
1901
|
-
args: ['attr.data-dot-object']
|
|
1902
|
-
}], identifier: [{
|
|
1903
|
-
type: HostBinding,
|
|
1904
|
-
args: ['attr.data-dot-identifier']
|
|
1905
|
-
}], basetype: [{
|
|
1906
|
-
type: HostBinding,
|
|
1907
|
-
args: ['attr.data-dot-basetype']
|
|
1908
|
-
}], title: [{
|
|
1909
|
-
type: HostBinding,
|
|
1910
|
-
args: ['attr.data-dot-title']
|
|
1911
|
-
}], inode: [{
|
|
1912
|
-
type: HostBinding,
|
|
1913
|
-
args: ['attr.data-dot-inode']
|
|
1914
|
-
}], type: [{
|
|
1915
|
-
type: HostBinding,
|
|
1916
|
-
args: ['attr.data-dot-type']
|
|
1917
|
-
}], containerAttribute: [{
|
|
1918
|
-
type: HostBinding,
|
|
1919
|
-
args: ['attr.data-dot-container']
|
|
1920
|
-
}], onNumberOfPages: [{
|
|
1921
|
-
type: HostBinding,
|
|
1922
|
-
args: ['attr.data-dot-on-number-of-pages']
|
|
1923
|
-
}], styleProperties: [{
|
|
1924
|
-
type: HostBinding,
|
|
1925
|
-
args: ['attr.data-dot-style-properties']
|
|
1926
|
-
}], styleAttribute: [{
|
|
1927
|
-
type: HostBinding,
|
|
1928
|
-
args: ['style']
|
|
1929
1930
|
}] } });
|
|
1930
1931
|
|
|
1931
1932
|
/**
|
|
@@ -1939,21 +1940,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1939
1940
|
class ContainerComponent {
|
|
1940
1941
|
constructor() {
|
|
1941
1942
|
this.#dotCMSStore = inject(DotCMSStore);
|
|
1942
|
-
this.$containerData = signal(null, ...(ngDevMode ? [{ debugName: "$containerData" }] : []));
|
|
1943
|
-
this.$contentlets = signal([], ...(ngDevMode ? [{ debugName: "$contentlets" }] : []));
|
|
1944
|
-
this.$isEmpty = computed(() => this.$contentlets().length === 0, ...(ngDevMode ? [{ debugName: "$isEmpty" }] : []));
|
|
1943
|
+
this.$containerData = signal(null, ...(ngDevMode ? [{ debugName: "$containerData" }] : /* istanbul ignore next */ []));
|
|
1944
|
+
this.$contentlets = signal([], ...(ngDevMode ? [{ debugName: "$contentlets" }] : /* istanbul ignore next */ []));
|
|
1945
|
+
this.$isEmpty = computed(() => this.$contentlets().length === 0, ...(ngDevMode ? [{ debugName: "$isEmpty" }] : /* istanbul ignore next */ []));
|
|
1946
|
+
this.$isDevMode = this.#dotCMSStore.$isDevMode;
|
|
1945
1947
|
this.$dotAttributes = computed(() => {
|
|
1946
1948
|
const containerData = this.$containerData();
|
|
1947
|
-
if (!containerData || !this
|
|
1949
|
+
if (!containerData || !this.$isDevMode()) {
|
|
1948
1950
|
return {};
|
|
1949
1951
|
}
|
|
1950
1952
|
return getDotContainerAttributes(containerData);
|
|
1951
|
-
}, ...(ngDevMode ? [{ debugName: "$dotAttributes" }] : []));
|
|
1952
|
-
this.dotObject = 'container';
|
|
1953
|
-
this.acceptTypes = null;
|
|
1954
|
-
this.identifier = null;
|
|
1955
|
-
this.maxContentlets = null;
|
|
1956
|
-
this.uuid = null;
|
|
1953
|
+
}, ...(ngDevMode ? [{ debugName: "$dotAttributes" }] : /* istanbul ignore next */ []));
|
|
1957
1954
|
}
|
|
1958
1955
|
#dotCMSStore;
|
|
1959
1956
|
ngOnChanges() {
|
|
@@ -1963,13 +1960,9 @@ class ContainerComponent {
|
|
|
1963
1960
|
}
|
|
1964
1961
|
this.$containerData.set(getContainersData(page, this.container));
|
|
1965
1962
|
this.$contentlets.set(getContentletsInContainer(page, this.container));
|
|
1966
|
-
this.acceptTypes = this.$dotAttributes()['data-dot-accept-types'];
|
|
1967
|
-
this.identifier = this.$dotAttributes()['data-dot-identifier'];
|
|
1968
|
-
this.maxContentlets = this.$dotAttributes()['data-max-contentlets'];
|
|
1969
|
-
this.uuid = this.$dotAttributes()['data-dot-uuid'];
|
|
1970
1963
|
}
|
|
1971
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1972
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1964
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1965
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: ContainerComponent, isStandalone: true, selector: "dotcms-container", inputs: { container: "container" }, host: { properties: { "attr.data-dot-object": "$isDevMode() ? 'container' : null", "attr.data-dot-accept-types": "$dotAttributes()['data-dot-accept-types'] ?? null", "attr.data-dot-identifier": "$dotAttributes()['data-dot-identifier'] ?? null", "attr.data-max-contentlets": "$dotAttributes()['data-max-contentlets'] ?? null", "attr.data-dot-uuid": "$dotAttributes()['data-dot-uuid'] ?? null" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
1973
1966
|
@if (!$containerData()) {
|
|
1974
1967
|
<dotcms-container-not-found [identifier]="container.identifier" />
|
|
1975
1968
|
} @else if ($isEmpty()) {
|
|
@@ -1981,7 +1974,7 @@ class ContainerComponent {
|
|
|
1981
1974
|
}
|
|
1982
1975
|
`, isInline: true, dependencies: [{ kind: "component", type: ContainerNotFoundComponent, selector: "dotcms-container-not-found", inputs: ["identifier"] }, { kind: "component", type: EmptyContainerComponent, selector: "dotcms-empty-container" }, { kind: "component", type: ContentletComponent, selector: "dotcms-contentlet", inputs: ["contentlet", "containerData"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1983
1976
|
}
|
|
1984
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1977
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ContainerComponent, decorators: [{
|
|
1985
1978
|
type: Component,
|
|
1986
1979
|
args: [{
|
|
1987
1980
|
selector: 'dotcms-container',
|
|
@@ -1997,26 +1990,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1997
1990
|
}
|
|
1998
1991
|
}
|
|
1999
1992
|
`,
|
|
1993
|
+
// Container metadata is editor-only — bound only in edit mode so it never
|
|
1994
|
+
// leaks into live output. $dotAttributes is empty outside edit mode.
|
|
1995
|
+
host: {
|
|
1996
|
+
'[attr.data-dot-object]': "$isDevMode() ? 'container' : null",
|
|
1997
|
+
'[attr.data-dot-accept-types]': "$dotAttributes()['data-dot-accept-types'] ?? null",
|
|
1998
|
+
'[attr.data-dot-identifier]': "$dotAttributes()['data-dot-identifier'] ?? null",
|
|
1999
|
+
'[attr.data-max-contentlets]': "$dotAttributes()['data-max-contentlets'] ?? null",
|
|
2000
|
+
'[attr.data-dot-uuid]': "$dotAttributes()['data-dot-uuid'] ?? null"
|
|
2001
|
+
},
|
|
2000
2002
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2001
2003
|
}]
|
|
2002
2004
|
}], propDecorators: { container: [{
|
|
2003
2005
|
type: Input,
|
|
2004
2006
|
args: [{ required: true }]
|
|
2005
|
-
}], dotObject: [{
|
|
2006
|
-
type: HostBinding,
|
|
2007
|
-
args: ['attr.data-dot-object']
|
|
2008
|
-
}], acceptTypes: [{
|
|
2009
|
-
type: HostBinding,
|
|
2010
|
-
args: ['attr.data-dot-accept-types']
|
|
2011
|
-
}], identifier: [{
|
|
2012
|
-
type: HostBinding,
|
|
2013
|
-
args: ['attr.data-dot-identifier']
|
|
2014
|
-
}], maxContentlets: [{
|
|
2015
|
-
type: HostBinding,
|
|
2016
|
-
args: ['attr.data-max-contentlets']
|
|
2017
|
-
}], uuid: [{
|
|
2018
|
-
type: HostBinding,
|
|
2019
|
-
args: ['attr.data-dot-uuid']
|
|
2020
2007
|
}] } });
|
|
2021
2008
|
|
|
2022
2009
|
/**
|
|
@@ -2034,8 +2021,8 @@ class ColumnComponent {
|
|
|
2034
2021
|
const positionClasses = getColumnPositionClasses(this.column);
|
|
2035
2022
|
this.customClasses = combineClasses([positionClasses.startClass, positionClasses.endClass]);
|
|
2036
2023
|
}
|
|
2037
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2038
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2024
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2025
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: ColumnComponent, isStandalone: true, selector: "dotcms-column", inputs: { column: "column" }, host: { properties: { "class": "this.customClasses" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
2039
2026
|
<div [class]="column.styleClass" data-testid="dotcms-column">
|
|
2040
2027
|
@for (container of column.containers; track $index) {
|
|
2041
2028
|
<dotcms-container [container]="container" />
|
|
@@ -2043,7 +2030,7 @@ class ColumnComponent {
|
|
|
2043
2030
|
</div>
|
|
2044
2031
|
`, isInline: true, styles: [":host.col-start-1{grid-column-start:1}:host.col-start-2{grid-column-start:2}:host.col-start-3{grid-column-start:3}:host.col-start-4{grid-column-start:4}:host.col-start-5{grid-column-start:5}:host.col-start-6{grid-column-start:6}:host.col-start-7{grid-column-start:7}:host.col-start-8{grid-column-start:8}:host.col-start-9{grid-column-start:9}:host.col-start-10{grid-column-start:10}:host.col-start-11{grid-column-start:11}:host.col-start-12{grid-column-start:12}:host.col-end-1{grid-column-end:1}:host.col-end-2{grid-column-end:2}:host.col-end-3{grid-column-end:3}:host.col-end-4{grid-column-end:4}:host.col-end-5{grid-column-end:5}:host.col-end-6{grid-column-end:6}:host.col-end-7{grid-column-end:7}:host.col-end-8{grid-column-end:8}:host.col-end-9{grid-column-end:9}:host.col-end-10{grid-column-end:10}:host.col-end-11{grid-column-end:11}:host.col-end-12{grid-column-end:12}:host.col-end-13{grid-column-end:13}\n"], dependencies: [{ kind: "component", type: ContainerComponent, selector: "dotcms-container", inputs: ["container"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2045
2032
|
}
|
|
2046
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2033
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ColumnComponent, decorators: [{
|
|
2047
2034
|
type: Component,
|
|
2048
2035
|
args: [{ selector: 'dotcms-column', imports: [ContainerComponent], template: `
|
|
2049
2036
|
<div [class]="column.styleClass" data-testid="dotcms-column">
|
|
@@ -2070,15 +2057,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2070
2057
|
*/
|
|
2071
2058
|
class RowComponent {
|
|
2072
2059
|
constructor() {
|
|
2073
|
-
this.customClasses = signal('', ...(ngDevMode ? [{ debugName: "customClasses" }] : []));
|
|
2074
|
-
this.sectionId = signal('', ...(ngDevMode ? [{ debugName: "sectionId" }] : []));
|
|
2060
|
+
this.customClasses = signal('', ...(ngDevMode ? [{ debugName: "customClasses" }] : /* istanbul ignore next */ []));
|
|
2061
|
+
this.sectionId = signal('', ...(ngDevMode ? [{ debugName: "sectionId" }] : /* istanbul ignore next */ []));
|
|
2075
2062
|
}
|
|
2076
2063
|
ngOnChanges() {
|
|
2077
2064
|
this.customClasses.set(combineClasses(['dot-row-container', this.row.styleClass ?? '']));
|
|
2078
2065
|
this.sectionId.set(`${DOT_SECTION_ID_PREFIX}${this.sectionIndex}`);
|
|
2079
2066
|
}
|
|
2080
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2081
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2067
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2068
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: RowComponent, isStandalone: true, selector: "dotcms-row", inputs: { row: "row", sectionIndex: "sectionIndex" }, usesOnChanges: true, ngImport: i0, template: `
|
|
2082
2069
|
<div [id]="sectionId()" [class]="customClasses()">
|
|
2083
2070
|
<div class="dot-row" data-dot-object="row" data-testid="dotcms-row">
|
|
2084
2071
|
@for (column of row.columns; track $index) {
|
|
@@ -2088,7 +2075,7 @@ class RowComponent {
|
|
|
2088
2075
|
</div>
|
|
2089
2076
|
`, isInline: true, styles: [".dot-row{display:grid;grid-template-columns:repeat(12,1fr);gap:1rem}\n"], dependencies: [{ kind: "component", type: ColumnComponent, selector: "dotcms-column", inputs: ["column"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2090
2077
|
}
|
|
2091
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RowComponent, decorators: [{
|
|
2092
2079
|
type: Component,
|
|
2093
2080
|
args: [{ selector: 'dotcms-row', imports: [ColumnComponent], template: `
|
|
2094
2081
|
<div [id]="sectionId()" [class]="customClasses()">
|
|
@@ -2126,8 +2113,8 @@ class DotCMSLayoutBodyComponent {
|
|
|
2126
2113
|
this.mode = 'production';
|
|
2127
2114
|
this.#dotCMSStore = inject(DotCMSStore);
|
|
2128
2115
|
this.$isDevMode = this.#dotCMSStore.$isDevMode;
|
|
2129
|
-
this.$rows = signal([], ...(ngDevMode ? [{ debugName: "$rows" }] : []));
|
|
2130
|
-
this.$isEmpty = signal(false, ...(ngDevMode ? [{ debugName: "$isEmpty" }] : []));
|
|
2116
|
+
this.$rows = signal([], ...(ngDevMode ? [{ debugName: "$rows" }] : /* istanbul ignore next */ []));
|
|
2117
|
+
this.$isEmpty = signal(false, ...(ngDevMode ? [{ debugName: "$isEmpty" }] : /* istanbul ignore next */ []));
|
|
2131
2118
|
}
|
|
2132
2119
|
#dotCMSStore;
|
|
2133
2120
|
ngOnChanges() {
|
|
@@ -2139,8 +2126,8 @@ class DotCMSLayoutBodyComponent {
|
|
|
2139
2126
|
this.$isEmpty.set(!this.page?.layout?.body);
|
|
2140
2127
|
this.$rows.set(this.page?.layout?.body?.rows ?? []);
|
|
2141
2128
|
}
|
|
2142
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2143
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2129
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSLayoutBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2130
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DotCMSLayoutBodyComponent, isStandalone: true, selector: "dotcms-layout-body", inputs: { page: "page", components: "components", mode: "mode" }, providers: [DotCMSStore], usesOnChanges: true, ngImport: i0, template: `
|
|
2144
2131
|
@if ($isEmpty() && $isDevMode()) {
|
|
2145
2132
|
<dotcms-page-error-message />
|
|
2146
2133
|
} @else {
|
|
@@ -2150,7 +2137,7 @@ class DotCMSLayoutBodyComponent {
|
|
|
2150
2137
|
}
|
|
2151
2138
|
`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: PageErrorMessageComponent, selector: "dotcms-page-error-message" }, { kind: "component", type: RowComponent, selector: "dotcms-row", inputs: ["row", "sectionIndex"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2152
2139
|
}
|
|
2153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSLayoutBodyComponent, decorators: [{
|
|
2154
2141
|
type: Component,
|
|
2155
2142
|
args: [{ selector: 'dotcms-layout-body', imports: [PageErrorMessageComponent, RowComponent], providers: [DotCMSStore], template: `
|
|
2156
2143
|
@if ($isEmpty() && $isDevMode()) {
|
|
@@ -2251,10 +2238,10 @@ class DotCMSEditablePageService {
|
|
|
2251
2238
|
});
|
|
2252
2239
|
return unsubscribe;
|
|
2253
2240
|
}
|
|
2254
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2255
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
2241
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSEditablePageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2242
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSEditablePageService, providedIn: 'root' }); }
|
|
2256
2243
|
}
|
|
2257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DotCMSEditablePageService, decorators: [{
|
|
2258
2245
|
type: Injectable,
|
|
2259
2246
|
args: [{
|
|
2260
2247
|
providedIn: 'root'
|