From 7212cb80a80e848b4a28347910c0ee658fd76125 Mon Sep 17 00:00:00 2001 From: Nicolas Molina Monroy Date: Mon, 19 Aug 2024 16:40:08 -0400 Subject: [PATCH] chore(edit-content): use the new angular syntax (#29626) ### Parent Issue https://github.com/dotCMS/core/issues/29625 ### Task Using the command `nx g @angular/core:control-flow `to migrate to the new Angular syntax ### Proposed Objective Use the new Angular syntax to improve performance and code maintainability. ### Checklist - [x] Tests - [x] Translations - [x] Security Implications Contemplated (add notes if applicable) --- .../content/dot-edit-content.component.ts | 4 +- ...t-content-aside-information.component.html | 30 +-- .../dot-edit-content-aside.component.ts | 8 +- .../dot-edit-content-form.component.html | 60 +++--- .../src/lib/edit-content.shell.component.html | 1 - .../src/lib/edit-content.shell.component.ts | 5 +- .../edit-content.layout.component.html | 48 ++--- .../edit-content.layout.component.ts | 4 +- ...ot-binary-field-url-mode.component.spec.ts | 2 +- .../dot-binary-field-url-mode.component.ts | 6 +- ...edit-content-calendar-field.component.html | 2 +- ...t-edit-content-calendar-field.component.ts | 3 +- ...-category-field-list-skeleton.component.ts | 3 +- ...ot-category-field-search-list.component.ts | 2 - .../dot-category-field-search.component.ts | 3 +- .../dot-category-field-selected.component.ts | 2 - .../dot-table-skeleton.component.html | 4 +- .../dot-table-skeleton.component.ts | 3 +- ...edit-content-checkbox-field.component.html | 15 +- ...t-edit-content-checkbox-field.component.ts | 3 +- ...t-edit-content-custom-field.component.html | 11 +- ...dot-edit-content-custom-field.component.ts | 4 +- .../componentes/treeselect.component.ts | 179 ++++++++++-------- ...ot-edit-content-radio-field.component.html | 15 +- .../dot-edit-content-radio-field.component.ts | 3 +- 25 files changed, 212 insertions(+), 208 deletions(-) delete mode 100644 core-web/libs/edit-content/src/lib/edit-content.shell.component.html diff --git a/core-web/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.ts b/core-web/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.ts index e3a3f2f83a56..4484bebc6876 100644 --- a/core-web/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.ts +++ b/core-web/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.ts @@ -2,7 +2,7 @@ import { fromEvent, merge, Observable, of, Subject } from 'rxjs'; import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; -import { ActivatedRoute, NavigationEnd, NavigationStart, Router } from '@angular/router'; +import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; import { DialogService } from 'primeng/dynamicdialog'; @@ -194,7 +194,7 @@ browse from the page internal links takeUntil(this.destroy$), filter((event) => event instanceof NavigationEnd) ) - .subscribe((_event: NavigationStart) => { + .subscribe(() => { this.getExperimentResolverData(); }); diff --git a/core-web/libs/edit-content/src/lib/components/dot-edit-content-aside/components/dot-content-aside-information/dot-content-aside-information.component.html b/core-web/libs/edit-content/src/lib/components/dot-edit-content-aside/components/dot-content-aside-information/dot-content-aside-information.component.html index 15356991f411..3567c36a0454 100644 --- a/core-web/libs/edit-content/src/lib/components/dot-edit-content-aside/components/dot-content-aside-information/dot-content-aside-information.component.html +++ b/core-web/libs/edit-content/src/lib/components/dot-edit-content-aside/components/dot-content-aside-information/dot-content-aside-information.component.html @@ -1,16 +1,16 @@
- - + @if (contentlet | contentletStatus; as status) { + + } + @if (contentlet?.inode; as inode) { + + }