@dotcms/angular 0.0.1-alpha.36 → 0.0.1-alpha.38

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.
Files changed (30) hide show
  1. package/README.md +128 -78
  2. package/esm2022/lib/components/dot-editable-text/dot-editable-text.component.mjs +3 -3
  3. package/esm2022/lib/components/no-component/no-component.component.mjs +11 -6
  4. package/esm2022/lib/layout/column/column.component.mjs +16 -4
  5. package/esm2022/lib/layout/container/container.component.mjs +52 -4
  6. package/esm2022/lib/layout/contentlet/contentlet.component.mjs +59 -4
  7. package/esm2022/lib/layout/dotcms-layout/dotcms-layout.component.mjs +17 -4
  8. package/esm2022/lib/layout/row/row.component.mjs +10 -4
  9. package/esm2022/lib/models/index.mjs +1 -1
  10. package/esm2022/lib/services/dotcms-context/page-context.service.mjs +3 -3
  11. package/esm2022/lib/utils/index.mjs +23 -1
  12. package/fesm2022/dotcms-angular.mjs +187 -26
  13. package/fesm2022/dotcms-angular.mjs.map +1 -1
  14. package/lib/components/no-component/no-component.component.d.ts +11 -2
  15. package/lib/components/no-component/no-component.component.d.ts.map +1 -1
  16. package/lib/layout/column/column.component.d.ts +18 -0
  17. package/lib/layout/column/column.component.d.ts.map +1 -1
  18. package/lib/layout/container/container.component.d.ts +54 -0
  19. package/lib/layout/container/container.component.d.ts.map +1 -1
  20. package/lib/layout/contentlet/contentlet.component.d.ts +67 -0
  21. package/lib/layout/contentlet/contentlet.component.d.ts.map +1 -1
  22. package/lib/layout/dotcms-layout/dotcms-layout.component.d.ts +16 -3
  23. package/lib/layout/dotcms-layout/dotcms-layout.component.d.ts.map +1 -1
  24. package/lib/layout/row/row.component.d.ts +12 -0
  25. package/lib/layout/row/row.component.d.ts.map +1 -1
  26. package/lib/models/index.d.ts +29 -0
  27. package/lib/models/index.d.ts.map +1 -1
  28. package/lib/utils/index.d.ts +14 -0
  29. package/lib/utils/index.d.ts.map +1 -1
  30. package/package.json +2 -2
@@ -235,8 +235,8 @@ class DotEditableTextComponent {
235
235
  didContentChange(editedContent) {
236
236
  return this.content !== editedContent;
237
237
  }
238
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: DotEditableTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
239
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.9", type: DotEditableTextComponent, isStandalone: true, selector: "dot-editable-text", inputs: { mode: "mode", format: "format", contentlet: "contentlet", fieldName: "fieldName" }, host: { listeners: { "window:message": "onMessage($event)" } }, providers: [
238
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DotEditableTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
239
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: DotEditableTextComponent, isStandalone: true, selector: "dot-editable-text", inputs: { mode: "mode", format: "format", contentlet: "contentlet", fieldName: "fieldName" }, host: { listeners: { "window:message": "onMessage($event)" } }, providers: [
240
240
  {
241
241
  provide: TINYMCE_SCRIPT_SRC,
242
242
  useFactory: () => {
@@ -245,7 +245,7 @@ class DotEditableTextComponent {
245
245
  }
246
246
  ], viewQueries: [{ propertyName: "editorComponent", first: true, predicate: EditorComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (isInsideEditor) {\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):hover{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"] }] }); }
247
247
  }
248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: DotEditableTextComponent, decorators: [{
248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DotEditableTextComponent, decorators: [{
249
249
  type: Component,
250
250
  args: [{ selector: 'dot-editable-text', standalone: true, imports: [EditorComponent], providers: [
251
251
  {
@@ -331,10 +331,10 @@ class PageContextService {
331
331
  pageAsset
332
332
  });
333
333
  }
334
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: PageContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
335
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: PageContextService, providedIn: 'root' }); }
334
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: PageContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
335
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: PageContextService, providedIn: 'root' }); }
336
336
  }
337
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: PageContextService, decorators: [{
337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: PageContextService, decorators: [{
338
338
  type: Injectable,
339
339
  args: [{
340
340
  providedIn: 'root'
@@ -343,6 +343,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
343
343
 
344
344
  //Changed the type, to avoid SQ issue.
345
345
  //This should be put inside a lib
346
+ /**
347
+ * Represents a mapping of numbers to corresponding CSS class names for column end values.
348
+ * @typedef {Record<number, string | null>} EndClassMap
349
+ */
346
350
  const endClassMap = {
347
351
  1: 'col-end-1',
348
352
  2: 'col-end-2',
@@ -360,6 +364,10 @@ const endClassMap = {
360
364
  };
361
365
  //Changed the type, to avoid SQ issue.
362
366
  //This should be put inside a lib
367
+ /**
368
+ * Represents a mapping of numbers to CSS class names for starting columns.
369
+ * @typedef {Record<number, string | null>} StartClassMap
370
+ */
363
371
  const startClassMap = {
364
372
  1: 'col-start-1',
365
373
  2: 'col-start-2',
@@ -374,6 +382,13 @@ const startClassMap = {
374
382
  11: 'col-start-11',
375
383
  12: 'col-start-12'
376
384
  };
385
+ /**
386
+ * Retrieves the data for a set of containers.
387
+ *
388
+ * @param containers - The DotCMSPageAssetContainer object containing the containers.
389
+ * @param containerRef - The DotCMSContainer object representing the container reference.
390
+ * @returns An object containing the container data, accept types, contentlets, and variant ID.
391
+ */
377
392
  const getContainersData = (containers, containerRef) => {
378
393
  const { identifier, uuid } = containerRef;
379
394
  const { containerStructures, container } = containers[identifier];
@@ -389,6 +404,13 @@ const getContainersData = (containers, containerRef) => {
389
404
  variantId
390
405
  };
391
406
  };
407
+ /**
408
+ * Returns the position style classes based on the start and end values.
409
+ * Used to set the grid column start and end values.
410
+ * @param start - The start value.
411
+ * @param end - The end value.
412
+ * @returns An object containing the startClass and endClass.
413
+ */
392
414
  const getPositionStyleClasses = (start, end) => {
393
415
  const startClass = startClassMap[start];
394
416
  const endClass = endClassMap[end];
@@ -399,19 +421,24 @@ const getPositionStyleClasses = (start, end) => {
399
421
  };
400
422
 
401
423
  /**
402
- * This is part of the Angular SDK.
403
- * This is a component for the `NoComponentComponent` component.
424
+ * This component is responsible to display a message when there is no component for a contentlet.
425
+ *
426
+ * @export
427
+ * @class NoComponent
404
428
  */
405
429
  class NoComponent {
406
430
  constructor() {
431
+ /**
432
+ * The data-testid attribute used for identifying the component during testing.
433
+ */
407
434
  this.testId = 'no-component';
408
435
  }
409
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
410
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: NoComponent, isStandalone: true, selector: "dotcms-no-component", inputs: { contentlet: "contentlet" }, host: { properties: { "attr.data-testid": "this.testId" } }, ngImport: i0, template: `
436
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
437
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NoComponent, isStandalone: true, selector: "dotcms-no-component", inputs: { contentlet: "contentlet" }, host: { properties: { "attr.data-testid": "this.testId" } }, ngImport: i0, template: `
411
438
  No Component for {{ contentlet.contentType }}
412
439
  `, isInline: true, styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
413
440
  }
414
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NoComponent, decorators: [{
441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NoComponent, decorators: [{
415
442
  type: Component,
416
443
  args: [{ selector: 'dotcms-no-component', standalone: true, template: `
417
444
  No Component for {{ contentlet.contentType }}
@@ -423,15 +450,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
423
450
  args: ['attr.data-testid']
424
451
  }] } });
425
452
 
453
+ /**
454
+ * This component is responsible to display a contentlet.
455
+ *
456
+ * @export
457
+ * @class ContentletComponent
458
+ * @implements {OnChanges}
459
+ */
426
460
  class ContentletComponent {
427
461
  constructor() {
462
+ /**
463
+ * The identifier of contentlet component.
464
+ *
465
+ * @type {(string | null)}
466
+ * @memberof ContentletComponent
467
+ */
428
468
  this.identifier = null;
469
+ /**
470
+ * The base type of contentlet component.
471
+ *
472
+ * @type {(string | null)}
473
+ * @memberof ContentletComponent
474
+ */
429
475
  this.baseType = null;
476
+ /**
477
+ * The title of contentlet component.
478
+ *
479
+ * @type {(string | null)}
480
+ * @memberof ContentletComponent
481
+ */
430
482
  this.title = null;
483
+ /**
484
+ * The inode of contentlet component.
485
+ *
486
+ * @type {(string | null)}
487
+ * @memberof ContentletComponent
488
+ */
431
489
  this.inode = null;
490
+ /**
491
+ * The type of contentlet component.
492
+ *
493
+ * @type {(string | null)}
494
+ * @memberof ContentletComponent
495
+ */
432
496
  this.dotType = null;
497
+ /**
498
+ * The container of contentlet component.
499
+ *
500
+ * @type {(string | null)}
501
+ * @memberof ContentletComponent
502
+ */
433
503
  this.dotContainer = null;
504
+ /**
505
+ * The number of pages where the contentlet appears
506
+ *
507
+ * @type {(string | null)}
508
+ * @memberof ContentletComponent
509
+ */
434
510
  this.numberOfPages = null;
511
+ /**
512
+ * The content of contentlet component.
513
+ *
514
+ * @type {(string | null)}
515
+ * @memberof ContentletComponent
516
+ */
435
517
  this.dotContent = null;
436
518
  }
437
519
  ngOnChanges() {
@@ -444,10 +526,10 @@ class ContentletComponent {
444
526
  this.numberOfPages = this.contentlet['onNumberOfPages'];
445
527
  this.dotContent = 'contentlet';
446
528
  }
447
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
448
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: ContentletComponent, isStandalone: true, selector: "dotcms-contentlet-wrapper", inputs: { contentlet: "contentlet", container: "container" }, host: { properties: { "attr.data-dot-identifier": "this.identifier", "attr.data-dot-basetype": "this.baseType", "attr.data-dot-title": "this.title", "attr.data-dot-inode": "this.inode", "attr.data-dot-type": "this.dotType", "attr.data-dot-container": "this.dotContainer", "attr.data-dot-on-number-of-pages": "this.numberOfPages", "attr.data-dot-object": "this.dotContent" } }, usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
529
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: ContentletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
530
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: ContentletComponent, isStandalone: true, selector: "dotcms-contentlet-wrapper", inputs: { contentlet: "contentlet", container: "container" }, host: { properties: { "attr.data-dot-identifier": "this.identifier", "attr.data-dot-basetype": "this.baseType", "attr.data-dot-title": "this.title", "attr.data-dot-inode": "this.inode", "attr.data-dot-type": "this.dotType", "attr.data-dot-container": "this.dotContainer", "attr.data-dot-on-number-of-pages": "this.numberOfPages", "attr.data-dot-object": "this.dotContent" } }, usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
449
531
  }
450
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentletComponent, decorators: [{
532
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: ContentletComponent, decorators: [{
451
533
  type: Component,
452
534
  args: [{
453
535
  selector: 'dotcms-contentlet-wrapper',
@@ -486,6 +568,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
486
568
  args: ['attr.data-dot-object']
487
569
  }] } });
488
570
 
571
+ /**
572
+ * This component is responsible to display a container with contentlets.
573
+ *
574
+ * @export
575
+ * @class ContainerComponent
576
+ * @implements {OnChanges}
577
+ */
489
578
  class ContainerComponent {
490
579
  constructor() {
491
580
  this.pageContextService = inject(PageContextService);
@@ -494,12 +583,53 @@ class ContainerComponent {
494
583
  this.$contentlets = signal([]);
495
584
  this.$dotContainer = signal(null);
496
585
  this.$dotContainerAsString = computed(() => JSON.stringify(this.$dotContainer()));
586
+ /**
587
+ * The accept types for the container component.
588
+ *
589
+ * @type {(string | null)}
590
+ * @memberof ContainerComponent
591
+ */
497
592
  this.acceptTypes = null;
593
+ /**
594
+ * The identifier for the container component.
595
+ *
596
+ * @type {(string | null)}
597
+ * @memberof ContainerComponent
598
+ */
498
599
  this.identifier = null;
600
+ /**
601
+ * The max contentlets for the container component.
602
+ *
603
+ * @type {(number | null)}
604
+ * @memberof ContainerComponent
605
+ */
499
606
  this.maxContentlets = null;
607
+ /**
608
+ * The uuid for the container component.
609
+ *
610
+ * @type {(string | null)}
611
+ * @memberof ContainerComponent
612
+ */
500
613
  this.uuid = null;
614
+ /**
615
+ * The class for the container component.
616
+ *
617
+ * @type {(string | null)}
618
+ * @memberof ContainerComponent
619
+ */
501
620
  this.class = null;
621
+ /**
622
+ * The dot object for the container component.
623
+ *
624
+ * @type {(string | null)}
625
+ * @memberof ContainerComponent
626
+ */
502
627
  this.dotObject = null;
628
+ /**
629
+ * The data-testid attribute used for identifying the component during testing.
630
+ *
631
+ * @memberof ContainerComponent
632
+ */
503
633
  this.testId = 'dot-container';
504
634
  }
505
635
  ngOnChanges() {
@@ -525,10 +655,10 @@ class ContainerComponent {
525
655
  this.dotObject = 'container';
526
656
  }
527
657
  }
528
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
529
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.9", type: ContainerComponent, isStandalone: true, selector: "dotcms-container", inputs: { container: "container" }, host: { properties: { "attr.data-dot-accept-types": "this.acceptTypes", "attr.data-dot-identifier": "this.identifier", "attr.data-max-contentlets": "this.maxContentlets", "attr.data-dot-uuid": "this.uuid", "class": "this.class", "attr.data-dot-object": "this.dotObject", "attr.data-testid": "this.testId" } }, usesOnChanges: true, ngImport: i0, template: "@if ($isInsideEditor()) {\n @if ($contentlets().length) {\n @for (contentlet of $contentlets(); track $index) {\n <dotcms-contentlet-wrapper\n [contentlet]=\"contentlet\"\n [container]=\"$dotContainerAsString()\">\n <ng-container\n *ngComponentOutlet=\"\n (componentsMap[contentlet.contentType] || componentsMap['CustomNoComponent']\n | async) || NoComponent;\n inputs: { contentlet }\n \" />\n </dotcms-contentlet-wrapper>\n }\n } @else {\n This container is empty.\n }\n} @else {\n @for (contentlet of $contentlets(); track $index) {\n <ng-container\n *ngComponentOutlet=\"\n componentsMap[contentlet.contentType] | async;\n inputs: { contentlet }\n \" />\n }\n}\n", styles: [":host.empty-container{width:100%;background-color:#ecf0fd;display:flex;justify-content:center;align-items:center;color:#030e32;height:10rem}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "component", type: ContentletComponent, selector: "dotcms-contentlet-wrapper", inputs: ["contentlet", "container"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
658
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: ContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
659
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: ContainerComponent, isStandalone: true, selector: "dotcms-container", inputs: { container: "container" }, host: { properties: { "attr.data-dot-accept-types": "this.acceptTypes", "attr.data-dot-identifier": "this.identifier", "attr.data-max-contentlets": "this.maxContentlets", "attr.data-dot-uuid": "this.uuid", "class": "this.class", "attr.data-dot-object": "this.dotObject", "attr.data-testid": "this.testId" } }, usesOnChanges: true, ngImport: i0, template: "@if ($isInsideEditor()) {\n @if ($contentlets().length) {\n @for (contentlet of $contentlets(); track $index) {\n <dotcms-contentlet-wrapper\n [contentlet]=\"contentlet\"\n [container]=\"$dotContainerAsString()\">\n <ng-container\n *ngComponentOutlet=\"\n (componentsMap[contentlet.contentType] || componentsMap['CustomNoComponent']\n | async) || NoComponent;\n inputs: { contentlet }\n \" />\n </dotcms-contentlet-wrapper>\n }\n } @else {\n This container is empty.\n }\n} @else {\n @for (contentlet of $contentlets(); track $index) {\n <ng-container\n *ngComponentOutlet=\"\n componentsMap[contentlet.contentType] | async;\n inputs: { contentlet }\n \" />\n }\n}\n", styles: [":host.empty-container{width:100%;background-color:#ecf0fd;display:flex;justify-content:center;align-items:center;color:#030e32;height:10rem}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "component", type: ContentletComponent, selector: "dotcms-contentlet-wrapper", inputs: ["contentlet", "container"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
530
660
  }
531
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContainerComponent, decorators: [{
661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: ContainerComponent, decorators: [{
532
662
  type: Component,
533
663
  args: [{ selector: 'dotcms-container', standalone: true, imports: [AsyncPipe, NgComponentOutlet, NoComponent, ContentletComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if ($isInsideEditor()) {\n @if ($contentlets().length) {\n @for (contentlet of $contentlets(); track $index) {\n <dotcms-contentlet-wrapper\n [contentlet]=\"contentlet\"\n [container]=\"$dotContainerAsString()\">\n <ng-container\n *ngComponentOutlet=\"\n (componentsMap[contentlet.contentType] || componentsMap['CustomNoComponent']\n | async) || NoComponent;\n inputs: { contentlet }\n \" />\n </dotcms-contentlet-wrapper>\n }\n } @else {\n This container is empty.\n }\n} @else {\n @for (contentlet of $contentlets(); track $index) {\n <ng-container\n *ngComponentOutlet=\"\n componentsMap[contentlet.contentType] | async;\n inputs: { contentlet }\n \" />\n }\n}\n", styles: [":host.empty-container{width:100%;background-color:#ecf0fd;display:flex;justify-content:center;align-items:center;color:#030e32;height:10rem}\n"] }]
534
664
  }], propDecorators: { container: [{
@@ -557,22 +687,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
557
687
  args: ['attr.data-testid']
558
688
  }] } });
559
689
 
690
+ /**
691
+ * This component is responsible to display a column with containers.
692
+ *
693
+ * @export
694
+ * @class ColumnComponent
695
+ * @implements {OnInit}
696
+ */
560
697
  class ColumnComponent {
561
698
  constructor() {
699
+ /**
700
+ * The data-testid attribute used for identifying the component during testing.
701
+ *
702
+ * @memberof ColumnComponent
703
+ */
562
704
  this.containerClasses = '';
563
705
  }
564
706
  ngOnInit() {
565
707
  const { startClass, endClass } = getPositionStyleClasses(this.column.leftOffset, this.column.width + this.column.leftOffset);
566
708
  this.containerClasses = `${startClass} ${endClass}`;
567
709
  }
568
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
569
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.9", type: ColumnComponent, isStandalone: true, selector: "dotcms-column", inputs: { column: "column" }, host: { properties: { "class": "this.containerClasses" } }, ngImport: i0, template: `
710
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: ColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
711
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: ColumnComponent, isStandalone: true, selector: "dotcms-column", inputs: { column: "column" }, host: { properties: { "class": "this.containerClasses" } }, ngImport: i0, template: `
570
712
  @for (container of column.containers; track $index) {
571
713
  <dotcms-container [container]="container" />
572
714
  }
573
715
  `, 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 }); }
574
716
  }
575
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ColumnComponent, decorators: [{
717
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: ColumnComponent, decorators: [{
576
718
  type: Component,
577
719
  args: [{ selector: 'dotcms-column', standalone: true, imports: [ContainerComponent], template: `
578
720
  @for (container of column.containers; track $index) {
@@ -586,15 +728,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
586
728
  args: ['class']
587
729
  }] } });
588
730
 
731
+ /**
732
+ * This component is responsible to display a row with columns.
733
+ *
734
+ * @export
735
+ * @class RowComponent
736
+ */
589
737
  class RowComponent {
590
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: RowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
591
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.9", type: RowComponent, isStandalone: true, selector: "dotcms-row", inputs: { row: "row" }, ngImport: i0, template: `
738
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: RowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
739
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: RowComponent, isStandalone: true, selector: "dotcms-row", inputs: { row: "row" }, ngImport: i0, template: `
592
740
  @for (column of row.columns; track $index) {
593
741
  <dotcms-column [column]="column" />
594
742
  }
595
743
  `, isInline: true, styles: [":host{display:grid;grid-template-columns:repeat(12,1fr);gap:1rem;row-gap:1rem}\n"], dependencies: [{ kind: "component", type: ColumnComponent, selector: "dotcms-column", inputs: ["column"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
596
744
  }
597
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: RowComponent, decorators: [{
745
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: RowComponent, decorators: [{
598
746
  type: Component,
599
747
  args: [{ selector: 'dotcms-row', standalone: true, imports: [ColumnComponent], template: `
600
748
  @for (column of row.columns; track $index) {
@@ -620,12 +768,25 @@ class DotcmsLayoutComponent {
620
768
  this.destroyRef$ = inject(DestroyRef);
621
769
  this.pageAsset$ = this.pageContextService.currentPage$;
622
770
  }
771
+ /**
772
+ * Represents the DotCMS page asset.
773
+ *
774
+ * @type {DotCMSPageAsset}
775
+ * @memberof DotcmsLayoutComponent
776
+ */
623
777
  set pageAsset(value) {
624
778
  this._pageAsset = value;
625
779
  if (!value.layout) {
626
780
  console.warn('Warning: pageAsset does not have a `layout` property. Might be using an advaced template or your dotCMS instance not have a enterprise license.');
627
781
  }
628
782
  }
783
+ /**
784
+ * Returns the DotCMS page asset.
785
+ *
786
+ * @readonly
787
+ * @type {DotCMSPageAsset}
788
+ * @memberof DotcmsLayoutComponent
789
+ */
629
790
  get pageAsset() {
630
791
  return this._pageAsset;
631
792
  }
@@ -655,8 +816,8 @@ class DotcmsLayoutComponent {
655
816
  }
656
817
  this.client.editor.off('changes');
657
818
  }
658
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: DotcmsLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
659
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.9", type: DotcmsLayoutComponent, isStandalone: true, selector: "dotcms-layout", inputs: { pageAsset: "pageAsset", components: "components", onReload: "onReload", editor: "editor" }, ngImport: i0, template: `
819
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DotcmsLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
820
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: DotcmsLayoutComponent, isStandalone: true, selector: "dotcms-layout", inputs: { pageAsset: "pageAsset", components: "components", onReload: "onReload", editor: "editor" }, ngImport: i0, template: `
660
821
  @if (pageAsset$ | async; as page) {
661
822
  @for (row of this.page?.layout?.body?.rows; track $index) {
662
823
  <dotcms-row [row]="row" />
@@ -664,7 +825,7 @@ class DotcmsLayoutComponent {
664
825
  }
665
826
  `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: RowComponent, selector: "dotcms-row", inputs: ["row"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
666
827
  }
667
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: DotcmsLayoutComponent, decorators: [{
828
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: DotcmsLayoutComponent, decorators: [{
668
829
  type: Component,
669
830
  args: [{ selector: 'dotcms-layout', standalone: true, imports: [RowComponent, AsyncPipe], template: `
670
831
  @if (pageAsset$ | async; as page) {