diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.html b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.html index 2a0a996889f6..eabe8a8706ba 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.html +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.html @@ -31,10 +31,11 @@ formControlName="generatedText" pInputTextarea> - + @if (generatedText.value) { + + } } @if (vm.status === ComponentStatus.LOADING) { diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.ts index 439efb2b6eed..9ea9722cc4ba 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.ts @@ -1,6 +1,6 @@ import { Observable } from 'rxjs'; -import { AsyncPipe, NgIf } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { Component, DestroyRef, ElementRef, inject, OnInit, ViewChild } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; @@ -44,7 +44,6 @@ interface AIContentForm { ButtonModule, TooltipModule, SkeletonModule, - NgIf, AsyncPipe, DotEmptyContainerComponent, ConfirmDialogModule, diff --git a/core-web/libs/block-editor/src/lib/extensions/asset-form/components/dot-upload-asset/components/dot-asset-preview/dot-asset-preview.component.html b/core-web/libs/block-editor/src/lib/extensions/asset-form/components/dot-upload-asset/components/dot-asset-preview/dot-asset-preview.component.html index a1b0701e050e..c503d40a32ad 100644 --- a/core-web/libs/block-editor/src/lib/extensions/asset-form/components/dot-upload-asset/components/dot-asset-preview/dot-asset-preview.component.html +++ b/core-web/libs/block-editor/src/lib/extensions/asset-form/components/dot-upload-asset/components/dot-asset-preview/dot-asset-preview.component.html @@ -1,11 +1,13 @@ - - +@switch (type) { + @case ('image') { - - + } + @case ('video') { - -

Select an accepted asset type

-
+ } + @default { +

Select an accepted asset type

+ } +} diff --git a/core-web/libs/block-editor/src/lib/extensions/asset-uploader/components/upload-placeholder/upload-placeholder.component.html b/core-web/libs/block-editor/src/lib/extensions/asset-uploader/components/upload-placeholder/upload-placeholder.component.html index f986da096e85..abf8a4386998 100644 --- a/core-web/libs/block-editor/src/lib/extensions/asset-uploader/components/upload-placeholder/upload-placeholder.component.html +++ b/core-web/libs/block-editor/src/lib/extensions/asset-uploader/components/upload-placeholder/upload-placeholder.component.html @@ -1,20 +1,23 @@ - -
-
- -
- -
-
- - Uploading video, wait until finished. +@switch (type) { + @case ('video') { +
+
+ +
+
+
+ + Uploading video, wait until finished. +
+
-
-
- Uploading... - + } + @default { + Uploading... + } +} diff --git a/core-web/libs/block-editor/src/lib/extensions/asset-uploader/components/upload-placeholder/upload-placeholder.component.ts b/core-web/libs/block-editor/src/lib/extensions/asset-uploader/components/upload-placeholder/upload-placeholder.component.ts index 217673b01255..235c5216f66e 100644 --- a/core-web/libs/block-editor/src/lib/extensions/asset-uploader/components/upload-placeholder/upload-placeholder.component.ts +++ b/core-web/libs/block-editor/src/lib/extensions/asset-uploader/components/upload-placeholder/upload-placeholder.component.ts @@ -1,4 +1,3 @@ -import { CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, Component, EventEmitter, Output, Input } from '@angular/core'; import { ButtonModule } from 'primeng/button'; @@ -11,7 +10,7 @@ import { DotSpinnerModule } from '@dotcms/ui'; styleUrls: ['./upload-placeholder.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [CommonModule, ButtonModule, DotSpinnerModule] + imports: [ButtonModule, DotSpinnerModule] }) export class UploadPlaceholderComponent { @Output() cancel = new EventEmitter(); diff --git a/core-web/libs/block-editor/src/lib/extensions/bubble-form/bubble-form.component.html b/core-web/libs/block-editor/src/lib/extensions/bubble-form/bubble-form.component.html index 2af9b8dae17c..cb75f27513af 100644 --- a/core-web/libs/block-editor/src/lib/extensions/bubble-form/bubble-form.component.html +++ b/core-web/libs/block-editor/src/lib/extensions/bubble-form/bubble-form.component.html @@ -1,54 +1,57 @@ -
-
- - - - - - - - - - - - This field is required - -
- -
- - -
-
+@if (form) { +
+ @for (control of dynamicControls; track control) { +
+ @switch (control.type) { + @case ('checkbox') { + + + } + @default { + + + } + } + @if (form.controls[control.key].invalid && form.controls[control.key].dirty) { + This field is required + } +
+ } +
+ + +
+
+} diff --git a/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/bubble-link-form.component.html b/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/bubble-link-form.component.html index 49c5c886d0f9..67f1f142b492 100644 --- a/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/bubble-link-form.component.html +++ b/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/bubble-link-form.component.html @@ -24,39 +24,44 @@
-
+ @if (showSuggestions || currentLink) { +
+ } -
- - language - {{ currentLink }} - - -
-
- + @if (currentLink && !showSuggestions) { +
+ + language + {{ currentLink }} + +
+
+ +
+
-
-
+ } - + @if (showSuggestions) { + + } - + @if (!showSuggestions && currentLink) { + + }
diff --git a/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/components/form-actions/form-actions.component.html b/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/components/form-actions/form-actions.component.html index 760040c5956c..9204c84a7c68 100644 --- a/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/components/form-actions/form-actions.component.html +++ b/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/components/form-actions/form-actions.component.html @@ -1,18 +1,20 @@ -
-
- - +@if (link.length) { +
+
+ + +
-
+} diff --git a/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/components/suggestion-page/suggestion-page.component.html b/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/components/suggestion-page/suggestion-page.component.html index 2163b10fe9f5..b3f8b6e53375 100644 --- a/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/components/suggestion-page/suggestion-page.component.html +++ b/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/components/suggestion-page/suggestion-page.component.html @@ -1,23 +1,21 @@ -
- - - -
- - - - - - - - +@if (items.length) { +
+ + @for (item of items; track item; let i = $index) { + + } + +
+} @else { + @if (loading) { + + } @else { + + } +} diff --git a/core-web/libs/block-editor/src/lib/extensions/bubble-menu/bubble-menu.component.html b/core-web/libs/block-editor/src/lib/extensions/bubble-menu/bubble-menu.component.html index 51ef85905c01..9d1b0a8f14c5 100644 --- a/core-web/libs/block-editor/src/lib/extensions/bubble-menu/bubble-menu.component.html +++ b/core-web/libs/block-editor/src/lib/extensions/bubble-menu/bubble-menu.component.html @@ -1,13 +1,15 @@
- + @if (selected) {
-
- + } + @for (item of items; track item; let i = $index) { -
-
+ @if (item.divider) { +
+ } + }
diff --git a/core-web/libs/block-editor/src/lib/extensions/floating-button/floating-button.component.html b/core-web/libs/block-editor/src/lib/extensions/floating-button/floating-button.component.html index 5f70099613a3..e58f3a9d43cd 100644 --- a/core-web/libs/block-editor/src/lib/extensions/floating-button/floating-button.component.html +++ b/core-web/libs/block-editor/src/lib/extensions/floating-button/floating-button.component.html @@ -1,15 +1,14 @@ - - - +@if (label !== status.ERROR) { + +} @else {
@@ -17,4 +16,4 @@ contact support
-
+} diff --git a/core-web/libs/block-editor/src/lib/shared/components/empty-message/empty-message.component.html b/core-web/libs/block-editor/src/lib/shared/components/empty-message/empty-message.component.html index 79661bd05373..25654a20e4a6 100644 --- a/core-web/libs/block-editor/src/lib/shared/components/empty-message/empty-message.component.html +++ b/core-web/libs/block-editor/src/lib/shared/components/empty-message/empty-message.component.html @@ -1,10 +1,11 @@

- +@if (showBackBtn) { + +} 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 e02b27ad656b..8e816c0b0e30 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 @@ -1,24 +1,27 @@
- {{ url }} - - - - + @if (icon) { + {{ url }} + } @else { + @if (data?.contentlet) { + + } @else { + + } + }
{{ label }} - {{ data.contentlet.url }} -
- - {{ data.contentlet.language | lowercase }} -
+ @if (page) { + {{ data.contentlet.url }} + } + @if (data?.contentlet) { +
+ + {{ data.contentlet.language | lowercase }} +
+ }
- - - - diff --git a/core-web/libs/block-editor/src/lib/shared/components/suggestion-loading-list/suggestion-loading-list.component.html b/core-web/libs/block-editor/src/lib/shared/components/suggestion-loading-list/suggestion-loading-list.component.html index 82b813f51f8d..bb030c6e9413 100644 --- a/core-web/libs/block-editor/src/lib/shared/components/suggestion-loading-list/suggestion-loading-list.component.html +++ b/core-web/libs/block-editor/src/lib/shared/components/suggestion-loading-list/suggestion-loading-list.component.html @@ -1,15 +1,17 @@ -
-
-
-
-
- - -
-
- - +@for (item of items; track item) { +
+
+
+
+
+ + +
+
+ + +
-
+} diff --git a/core-web/libs/block-editor/src/lib/shared/components/suggestions/suggestions.component.html b/core-web/libs/block-editor/src/lib/shared/components/suggestions/suggestions.component.html index e20ca9b99b5d..a39db46d6de0 100644 --- a/core-web/libs/block-editor/src/lib/shared/components/suggestions/suggestions.component.html +++ b/core-web/libs/block-editor/src/lib/shared/components/suggestions/suggestions.component.html @@ -1,25 +1,30 @@ -
-

{{ title }}

- - - - -
-
-
-
-
- - +@if (items.length) { +
+ @if (!!title) { +

{{ title }}

+ } + + @for (item of items; track item; let i = $index) { + @if (item.id !== 'divider') { + + } @else { +
+ } + +
+
+ } +
+
+} @else { -
+}