diff --git a/core-web/libs/block-editor/src/lib/block-editor.module.ts b/core-web/libs/block-editor/src/lib/block-editor.module.ts index d4ea4982160..bd63a98a684 100644 --- a/core-web/libs/block-editor/src/lib/block-editor.module.ts +++ b/core-web/libs/block-editor/src/lib/block-editor.module.ts @@ -29,7 +29,8 @@ import { DotFieldRequiredDirective, DotMessagePipe, DotSpinnerComponent, - DotContentletStatusBadgeComponent + DotContentletStatusBadgeComponent, + DotContentThumbnailComponent } from '@dotcms/ui'; //Editor @@ -78,7 +79,8 @@ const initTranslations = (dotMessageService: DotMessageService) => { DragHandleDirective, DotContextMenuComponent, DotAddButtonComponent, - DotContentletStatusBadgeComponent + DotContentletStatusBadgeComponent, + DotContentThumbnailComponent ], declarations: [ EditorDirective, diff --git a/core-web/libs/block-editor/src/lib/nodes/contentlet-block/contentlet-block.component.html b/core-web/libs/block-editor/src/lib/nodes/contentlet-block/contentlet-block.component.html index 5b5a8577dc8..17a1bc6cce8 100644 --- a/core-web/libs/block-editor/src/lib/nodes/contentlet-block/contentlet-block.component.html +++ b/core-web/libs/block-editor/src/lib/nodes/contentlet-block/contentlet-block.component.html @@ -2,12 +2,10 @@
- + iconSize="72px" + class="relative h-[94px] w-[94px]" />
diff --git a/core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.css b/core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.css index 0dc1936a60c..0a8694ea23b 100644 --- a/core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.css +++ b/core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.css @@ -28,9 +28,7 @@ width: 32px; } -.icon-wrapper dot-contentlet-thumbnail { - align-items: center; - display: block; +.icon-wrapper dot-content-thumbnail { position: relative; width: 42px; height: 42px; @@ -43,7 +41,7 @@ } .icon-wrapper.page, -.icon-wrapper.page dot-contentlet-thumbnail { +.icon-wrapper.page dot-content-thumbnail { flex-basis: 64px; height: 64px; width: 64px; diff --git a/core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.html b/core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.html index c21a1b35c9a..3e051e04821 100644 --- a/core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.html +++ b/core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.html @@ -3,11 +3,7 @@ {{ url }} } @else { @if (data?.contentlet) { - + } @else { } diff --git a/core-web/libs/block-editor/src/lib/shared/shared.module.ts b/core-web/libs/block-editor/src/lib/shared/shared.module.ts index a49172b5bf6..38bfeca5080 100644 --- a/core-web/libs/block-editor/src/lib/shared/shared.module.ts +++ b/core-web/libs/block-editor/src/lib/shared/shared.module.ts @@ -5,7 +5,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { ButtonModule } from 'primeng/button'; import { TagModule } from 'primeng/tag'; -import { DotContentletStatusBadgeComponent } from '@dotcms/ui'; +import { DotContentletStatusBadgeComponent, DotContentThumbnailComponent } from '@dotcms/ui'; // Shared import { @@ -26,7 +26,8 @@ import { SuggestionsService } from './services'; ReactiveFormsModule, ButtonModule, TagModule, - DotContentletStatusBadgeComponent + DotContentletStatusBadgeComponent, + DotContentThumbnailComponent ], declarations: [ SuggestionsComponent, diff --git a/core-web/libs/dotcms-webcomponents/src/components.d.ts b/core-web/libs/dotcms-webcomponents/src/components.d.ts index d6e8a0d372e..328b8083b09 100644 --- a/core-web/libs/dotcms-webcomponents/src/components.d.ts +++ b/core-web/libs/dotcms-webcomponents/src/components.d.ts @@ -450,6 +450,13 @@ export namespace Components { */ "size": string; } + /** + * @deprecated Angular code must use `DotContentThumbnailComponent` + * (`dot-content-thumbnail`) from `@dotcms/ui` instead — pass the contentlet + * via its `contentlet`/`options` inputs or a resolved model via `thumbnail`. + * This web component remains only for Stencil-internal use + * (`dot-card-contentlet`) and legacy JSP pages. See dotCMS/core#36295. + */ interface DotContentletThumbnail { /** * @default '' @@ -1840,6 +1847,13 @@ declare global { prototype: HTMLDotContentletLockIconElement; new (): HTMLDotContentletLockIconElement; }; + /** + * @deprecated Angular code must use `DotContentThumbnailComponent` + * (`dot-content-thumbnail`) from `@dotcms/ui` instead — pass the contentlet + * via its `contentlet`/`options` inputs or a resolved model via `thumbnail`. + * This web component remains only for Stencil-internal use + * (`dot-card-contentlet`) and legacy JSP pages. See dotCMS/core#36295. + */ interface HTMLDotContentletThumbnailElement extends Components.DotContentletThumbnail, HTMLStencilElement { } var HTMLDotContentletThumbnailElement: { @@ -2751,6 +2765,13 @@ declare namespace LocalJSX { */ "size"?: string; } + /** + * @deprecated Angular code must use `DotContentThumbnailComponent` + * (`dot-content-thumbnail`) from `@dotcms/ui` instead — pass the contentlet + * via its `contentlet`/`options` inputs or a resolved model via `thumbnail`. + * This web component remains only for Stencil-internal use + * (`dot-card-contentlet`) and legacy JSP pages. See dotCMS/core#36295. + */ interface DotContentletThumbnail { /** * @default '' @@ -3891,6 +3912,13 @@ declare module "@stencil/core" { */ "dot-contentlet-icon": LocalJSX.DotContentletIcon & JSXBase.HTMLAttributes; "dot-contentlet-lock-icon": LocalJSX.DotContentletLockIcon & JSXBase.HTMLAttributes; + /** + * @deprecated Angular code must use `DotContentThumbnailComponent` + * (`dot-content-thumbnail`) from `@dotcms/ui` instead — pass the contentlet + * via its `contentlet`/`options` inputs or a resolved model via `thumbnail`. + * This web component remains only for Stencil-internal use + * (`dot-card-contentlet`) and legacy JSP pages. See dotCMS/core#36295. + */ "dot-contentlet-thumbnail": LocalJSX.DotContentletThumbnail & JSXBase.HTMLAttributes; "dot-context-menu": LocalJSX.DotContextMenu & JSXBase.HTMLAttributes; "dot-data-view-button": LocalJSX.DotDataViewButton & JSXBase.HTMLAttributes; diff --git a/core-web/libs/dotcms-webcomponents/src/elements/dot-contentlet-thumbnail/dot-contentlet-thumbnail.tsx b/core-web/libs/dotcms-webcomponents/src/elements/dot-contentlet-thumbnail/dot-contentlet-thumbnail.tsx index 3c5869f4ad0..0bd228d800f 100644 --- a/core-web/libs/dotcms-webcomponents/src/elements/dot-contentlet-thumbnail/dot-contentlet-thumbnail.tsx +++ b/core-web/libs/dotcms-webcomponents/src/elements/dot-contentlet-thumbnail/dot-contentlet-thumbnail.tsx @@ -5,6 +5,13 @@ import { Component, h, Host, Prop, State } from '@stencil/core'; import { DotContentletItem } from '../../models/dot-contentlet-item.model'; +/** + * @deprecated Angular code must use `DotContentThumbnailComponent` + * (`dot-content-thumbnail`) from `@dotcms/ui` instead — pass the contentlet + * via its `contentlet`/`options` inputs or a resolved model via `thumbnail`. + * This web component remains only for Stencil-internal use + * (`dot-card-contentlet`) and legacy JSP pages. See dotCMS/core#36295. + */ @Component({ tag: 'dot-contentlet-thumbnail', styleUrl: 'dot-contentlet-thumbnail.scss' diff --git a/core-web/libs/dotcms-webcomponents/src/elements/dot-contentlet-thumbnail/readme.md b/core-web/libs/dotcms-webcomponents/src/elements/dot-contentlet-thumbnail/readme.md index e78b1227215..b827f615f28 100644 --- a/core-web/libs/dotcms-webcomponents/src/elements/dot-contentlet-thumbnail/readme.md +++ b/core-web/libs/dotcms-webcomponents/src/elements/dot-contentlet-thumbnail/readme.md @@ -3,6 +3,12 @@ +> **[DEPRECATED]** Angular code must use `DotContentThumbnailComponent` +(`dot-content-thumbnail`) from `@dotcms/ui` instead — pass the contentlet +via its `contentlet`/`options` inputs or a resolved model via `thumbnail`. +This web component remains only for Stencil-internal use +(`dot-card-contentlet`) and legacy JSP pages. See dotCMS/core#36295. + ## Properties | Property | Attribute | Description | Type | Default | diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-file-field-preview/dot-file-field-preview.component.html b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-file-field-preview/dot-file-field-preview.component.html index 2a8e2a1ae6b..dc8e615f751 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-file-field-preview/dot-file-field-preview.component.html +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-file-field-preview/dot-file-field-preview.component.html @@ -15,19 +15,10 @@ } @else {
- @if (fileInfo.source === 'temp') { - - } @else { - - } +