Skip to content

Commit

Permalink
chore re-apply prettier to core-web with nx format (#29329)
Browse files Browse the repository at this point in the history
### Proposed Changes
* change 1
* change 2

### Checklist
- [ ] Tests
- [ ] Translations
- [ ] Security Implications Contemplated (add notes if applicable)

### Additional Info
** any additional useful context or info **

### Screenshots
Original             |  Updated
:-------------------------:|:-------------------------:
** original screenshot **  |  ** updated screenshot **
  • Loading branch information
oidacra authored Jul 23, 2024
1 parent 9bee608 commit 28c6d14
Show file tree
Hide file tree
Showing 239 changed files with 1,417 additions and 1,387 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
</ng-template>

<ng-template #labelField let-field="field">
<label [for]="field.name" [checkIsRequiredControl]="field.name" dotFieldRequired>{{
field.label
}}</label>
<label [for]="field.name" [checkIsRequiredControl]="field.name" dotFieldRequired>
{{ field.label }}
</label>
</ng-template>
<div class="dot-apps-configuration-detail__form" #formContainer>
<div
Expand All @@ -30,9 +30,9 @@
type="button"></button>
<ng-container
*ngTemplateOutlet="warningIcon; context: { field: field }"></ng-container>
<span class="form__group-hint"
><markdown>{{ field.hint }}</markdown></span
>
<span class="form__group-hint">
<markdown>{{ field.hint }}</markdown>
</span>
</ng-container>
<ng-container *ngSwitchCase="'STRING'">
<ng-container
Expand All @@ -46,9 +46,9 @@
#inputTextarea
pInputTextarea
autoResize="autoResize"></textarea>
<span class="p-field-hint"
><markdown>{{ field.hint }}</markdown></span
>
<span class="p-field-hint">
<markdown>{{ field.hint }}</markdown>
</span>
</ng-container>
<ng-container *ngSwitchCase="'BOOL'">
<p-checkbox
Expand All @@ -62,9 +62,9 @@
binary="true"></p-checkbox>
<ng-container
*ngTemplateOutlet="warningIcon; context: { field: field }"></ng-container>
<span class="p-field-hint"
><markdown>{{ field.hint }}</markdown></span
>
<span class="p-field-hint">
<markdown>{{ field.hint }}</markdown>
</span>
</ng-container>
<ng-container *ngSwitchCase="'SELECT'">
<ng-container
Expand All @@ -78,9 +78,9 @@
required: field.required
}"
[options]="field.options"></p-dropdown>
<span class="p-field-hint"
><markdown>{{ field.hint }}</markdown></span
>
<span class="p-field-hint">
<markdown>{{ field.hint }}</markdown>
</span>
</ng-container>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { InputTextModule } from 'primeng/inputtext';
import { InputTextareaModule } from 'primeng/inputtextarea';
import { TooltipModule } from 'primeng/tooltip';

import { DotIconModule, DotFieldRequiredDirective } from '@dotcms/ui';
import { DotFieldRequiredDirective, DotIconModule } from '@dotcms/ui';

import { DotAppsConfigurationDetailFormComponent } from './dot-apps-configuration-detail-form.component';

Expand Down Expand Up @@ -107,7 +107,9 @@ const formState = {
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'markdown',
template: `<ng-content></ng-content>`
template: `
<ng-content></ng-content>
`
})
class MockMarkdownComponent {}

Expand Down Expand Up @@ -170,7 +172,9 @@ describe('DotAppsConfigurationDetailFormComponent', () => {
it('should load Label, Textarea & Hint with right attributes', () => {
const row = de.query(By.css('[data-testid="name"]'));
expect(row.query(By.css('markdown'))).toBeTruthy();
expect(row.query(By.css('label')).nativeElement.textContent).toBe(secrets[0].label);
expect(row.query(By.css('label')).nativeElement.textContent.trim()).toBe(
secrets[0].label
);
expect(
row
.query(By.css('label'))
Expand Down Expand Up @@ -204,7 +208,9 @@ describe('DotAppsConfigurationDetailFormComponent', () => {
it('should load Label, Select & Hint with right attributes', () => {
const row = de.query(By.css('[data-testid="select"]'));
expect(row.query(By.css('markdown'))).toBeTruthy();
expect(row.query(By.css('label')).nativeElement.textContent).toBe(secrets[3].label);
expect(row.query(By.css('label')).nativeElement.textContent.trim()).toBe(
secrets[3].label
);
expect(row.query(By.css('p-dropdown')).nativeElement.id).toBe(secrets[3].name);
expect(row.query(By.css('p-dropdown')).componentInstance.options).toBe(
secrets[3].options
Expand All @@ -219,7 +225,9 @@ describe('DotAppsConfigurationDetailFormComponent', () => {

it('should load Label, Button & Hint with right attributes', () => {
const row = de.query(By.css('[data-testid="integration"]'));
expect(row.query(By.css('label')).nativeElement.textContent).toBe(secrets[4].label);
expect(row.query(By.css('label')).nativeElement.textContent.trim()).toBe(
secrets[4].label
);
expect(row.query(By.css('button')).nativeElement.id).toBe(secrets[4].name);
expect(row.query(By.css('.form__group-hint')).nativeElement.textContent).toBe(
secrets[4].hint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ <h3 (click)="goToApps(app.key)" class="dot-apps-configuration__service-name">
<dot-copy-link [copy]="app.key" [label]="app.key"></dot-copy-link>
</div>
</header>
<span class="dot-apps-configuration__configurations"
>{{
<span class="dot-apps-configuration__configurations">
{{
app.configurationsCount
? app.configurationsCount + ' ' + ('apps.configurations' | dm)
: ('apps.no.configurations' | dm)
Expand All @@ -31,12 +31,12 @@ <h3 (click)="goToApps(app.key)" class="dot-apps-configuration__service-name">
<a
*ngIf="app.description.length > 270"
(click)="showMore = !showMore"
class="dot-apps-configuration__description__link_show-more"
>{{
class="dot-apps-configuration__description__link_show-more">
{{
showMore
? ('apps.confirmation.description.show.less' | dm)
: ('apps.confirmation.description.show.more' | dm)
}}</a
>
}}
</a>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import { MockDotMessageService, MockDotRouterService } from '@dotcms/utils-testi
import { DotAppsConfigurationHeaderComponent } from './dot-apps-configuration-header.component';

@Component({
template: `<dot-apps-configuration-header [app]="app"></dot-apps-configuration-header>`
template: `
<dot-apps-configuration-header [app]="app"></dot-apps-configuration-header>
`
})
class TestHostComponent {
app: DotApp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@
(click)="editConfigurationSite($event, site)"
styleClass="p-button-text p-button-rounded p-button-sm"
icon="pi pi-plus"
data-testId="add">
</p-button>
data-testId="add"></p-button>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import { DotAppsCardComponent } from './dot-apps-card.component';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'markdown',
template: `<ng-content></ng-content>`
template: `
<ng-content></ng-content>
`
})
class MockMarkdownComponent {}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<dot-portlet-base>
<dot-not-license *ngIf="!canAccessPortlet; else licensed" />
<ng-template #licensed
><div class="dot-apps__container">
<ng-template #licensed>
<div class="dot-apps__container">
<div class="dot-apps__header">
<input
[placeholder]="('apps.search.placeholder' | dm) || ''"
Expand All @@ -11,11 +11,9 @@
<div class="dot-apps__header-actions">
<div class="dot-apps__header-info">
<dot-icon name="help" size="18"></dot-icon>
<a
href="https://dotcms.com/docs/latest/apps-integrations"
target="_blank"
>{{ 'apps.link.info' | dm }}</a
>
<a href="https://dotcms.com/docs/latest/apps-integrations" target="_blank">
{{ 'apps.link.info' | dm }}
</a>
</div>
<button
(click)="confirmImportExport('Import')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<p-breadcrumb
(onItemClick)="updateBreadCrumb($event)"
[model]="vm.categoryBreadCrumbs"
[home]="breadCrumbHome">
</p-breadcrumb>
[home]="breadCrumbHome"></p-breadcrumb>
</div>
<div class="category_listing">
<p-table
Expand Down Expand Up @@ -45,9 +44,9 @@
</div>
<div class="w-2">
<div class="p-inputgroup">
<span class="border-right-none p-inputgroup-addon"
><i class="pi pi-search"></i
></span>
<span class="border-right-none p-inputgroup-addon">
<i class="pi pi-search"></i>
</span>
<input
(input)="dataTable.filterGlobal($event.target.value, 'contains')"
[placeholder]="'message.category.search' | dm"
Expand Down Expand Up @@ -136,8 +135,7 @@
[attr.data-testId]="category.categoryId"
[actions]="vm.categoriesActions"
[item]="category"
class="listing-categories__action-button">
</dot-action-menu-button>
class="listing-categories__action-button"></dot-action-menu-button>
</ng-container>
</ng-template>
<ng-template #last>
Expand All @@ -162,8 +160,7 @@
[title]="'message.category.empty.title' | dm"
[content]="'message.category.empty.content' | dm"
[buttonLabel]="'message.category.empty.button.label' | dm"
icon="web">
</dot-empty-state>
icon="web"></dot-empty-state>
</ng-template>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ import { DotCategoriesListComponent } from './dot-categories-list.component';

@Component({
selector: 'dot-test-host-component',
template: ` <dot-categories-list></dot-categories-list>`
template: `
<dot-categories-list></dot-categories-list>
`
})
class TestHostComponent {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,16 @@
</td>
<td [ngStyle]="{ 'text-align': vm.tableColumns[0].textAlign }">
{{ rowData.name }}
<ng-container *ngIf="rowData.path"
>-
<span class="container-listing__path">{{
rowData.path
}}</span></ng-container
>
<ng-container *ngIf="rowData.path">
-
<span class="container-listing__path">{{ rowData.path }}</span>
</ng-container>
</td>
<td [ngStyle]="{ 'text-align': vm.tableColumns[1].textAlign }">
<dot-state-icon
[labels]="vm.stateLabels"
[state]="getContainerState(rowData)"
size="14px">
</dot-state-icon>
size="14px"></dot-state-icon>
</td>
<td [ngStyle]="{ 'text-align': vm.tableColumns[2].textAlign }">
{{ rowData.friendlyName }}
Expand All @@ -118,8 +115,7 @@
[attr.data-testid]="rowData.identifier"
[actions]="setContainerActions(rowData)"
[item]="rowData"
class="listing-datatable__action-button">
</dot-action-menu-button>
class="listing-datatable__action-button"></dot-action-menu-button>
</td>
</tr>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export class IframeMockComponent {

@Component({
selector: `dot-host-component`,
template: `<dot-container-history [containerId]="containerId"></dot-container-history>`
template: `
<dot-container-history [containerId]="containerId"></dot-container-history>
`
})
class DotTestHostComponent {
containerId = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export class IframeMockComponent {

@Component({
selector: `dot-host-component`,
template: `<dot-container-permissions [containerId]="containerId"></dot-container-permissions>`
template: `
<dot-container-permissions [containerId]="containerId"></dot-container-permissions>
`
})
class DotTestHostComponent {
containerId = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
</div>
<div class="dot-container-properties__title-container">
<div class="field">
<label class="block" for="title">{{
'message.containers.create.title' | dm
}}</label>
<label class="block" for="title">
{{ 'message.containers.create.title' | dm }}
</label>
<div class="dot-container-properties__title-container-content">
<input
[required]="true"
Expand All @@ -38,9 +38,9 @@
</div>
</div>
<div class="field">
<label class="block" for="description">{{
'message.containers.create.description' | dm
}}</label>
<label class="block" for="description">
{{ 'message.containers.create.description' | dm }}
</label>
<input
class="dot-container-properties__description-input w-25rem"
id="description"
Expand All @@ -50,9 +50,9 @@
pInputText />
</div>
<div class="field">
<label class="block" dotFieldRequired for="max-contents">{{
'message.containers.create.max_contents' | dm
}}</label>
<label class="block" dotFieldRequired for="max-contents">
{{ 'message.containers.create.max_contents' | dm }}
</label>
<input
[required]="true"
class="dot-container-properties__max-contents-input"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
type="button"></button>
</div>
<div *ngIf="isEditorVisible" class="field mb-0" [@enterAnimation]>
<label class="block" data-testId="label">{{
'message.containers.create.' + label | dm
}}</label>
<label class="block" data-testId="label">
{{ 'message.containers.create.' + label | dm }}
</label>
<dot-textarea-content
(blur)="onTouched()"
(input)="onTouched()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ import { DotLoopEditorComponent } from './dot-loop-editor.component';

@Component({
selector: `dot-host-component`,
template: `<dot-loop-editor
(buttonClick)="showLoopInput()"
[formControl]="editor"
[label]="label"
[isEditorVisible]="isEditorVisible"></dot-loop-editor>`
template: `
<dot-loop-editor
(buttonClick)="showLoopInput()"
[formControl]="editor"
[label]="label"
[isEditorVisible]="isEditorVisible"></dot-loop-editor>
`
})
class DotTestHostComponent {
isEditorVisible = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
[languageId]="blockEditorInput.languageId"
[showVideoThumbnail]="showVideoThumbnail"
[value]="blockEditorInput.content"
#blockEditor>
</dot-block-editor>
#blockEditor></dot-block-editor>
<footer>
<button
(click)="closeSidebar()"
Expand Down
Loading

0 comments on commit 28c6d14

Please sign in to comment.