Skip to content

Commit

Permalink
Finish migration from @ecodev/natural to @ecodev/natural-layout #…
Browse files Browse the repository at this point in the history
…10361

Some CSS classes such as `no-margin-top` used to come from
`@ecodev/natural`, but since a2b1015,
they must all come from `@ecodev/natural-layout` and use the `nat-`
prefix.
  • Loading branch information
PowerKiKi committed May 23, 2024
1 parent 71a45c8 commit 88c37dd
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
</div>
}
@if (!model.id) {
<div class="mat-headline-5 no-margin newLabel">{{ newLabel }}</div>
<div class="mat-headline-5 nat-no-margin newLabel">{{ newLabel }}</div>
}
@if (model.id) {
<div class="mat-headline-5 no-margin label">{{ model.name || model.fullName || label }}</div>
<div class="mat-headline-5 nat-no-margin label">{{ model.name || model.fullName || label }}</div>
}
<div>
<ng-content />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@
</div>

@if (!loading && !dataSource.data.length) {
<div class="margin-v" i18n>Aucun résultat</div>
<div i18n>Aucun résultat</div>
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}

@if (!loading && dataSource.data?.length === 0) {
<div class="margin-v mat-body">
<div class="nat-margin-vertical mat-body">
<span i18n>Aucun résultat</span>
</div>
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/detail/detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1 class="mat-headline-4">NaturalAbstractDetail</h1>

<mat-tab-group naturalLinkableTab>
<mat-tab label="Tab 1" id="tab-1">
<div [formGroup]="form" class="detail-body padding-top">
<div [formGroup]="form" class="detail-body nat-padding-top">
<div class="nat-horizontal nat-wrap nat-left nat-gap">
<mat-form-field>
<mat-label>Name</mat-label>
Expand Down
8 changes: 4 additions & 4 deletions src/app/editor/editor.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<natural-editor [(ngModel)]="htmlStringBasic" [disabled]="disabled" />

<div>
<h1 class="mat-headline-4 margin-bottom">Preview</h1>
<h1 class="mat-headline-4 nat-margin-bottom">Preview</h1>
<div [innerHTML]="htmlStringBasic" class="preview">&nbsp;</div>
</div>

<div>
<h1 class="mat-headline-4 margin-bottom">Debug</h1>
<h1 class="mat-headline-4 nat-margin-bottom">Debug</h1>
<p class="debug">{{ htmlStringBasic }}</p>
</div>
</div>
Expand All @@ -26,12 +26,12 @@ <h1 class="mat-headline-4 margin-bottom">Debug</h1>
/>

<div>
<h1 class="mat-headline-4 margin-bottom">Preview</h1>
<h1 class="mat-headline-4 nat-margin-bottom">Preview</h1>
<div [innerHTML]="htmlStringAdvanced" class="preview" [naturalCustomCss]="css">&nbsp;</div>
</div>

<div>
<h1 class="mat-headline-4 margin-bottom">Debug</h1>
<h1 class="mat-headline-4 nat-margin-bottom">Debug</h1>
<p class="debug">{{ htmlStringAdvanced }}</p>
</div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions src/app/list/list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ <h1 class="mat-headline-4">NaturalAbstractList</h1>
@if (dataSource) {
<div class="nat-expand nat-vertical">
<div class="nat-horizontal">
<div class="mat-headline-6 no-margin nat-expand">{{ routeData?.title }}</div>
<div class="mat-headline-6 nat-no-margin nat-expand">{{ routeData?.title }}</div>
<natural-columns-picker
[availableColumns]="availableColumns"
[selections]="selectedColumns"
Expand All @@ -12,7 +12,7 @@ <h1 class="mat-headline-4">NaturalAbstractList</h1>
/>
</div>
<div class="nat-vertical">
<div class="margin-v nat-horizontal" overflow>
<div class="nat-margin-vertical nat-horizontal" overflow>
<natural-search
(selectionChange)="search($event)"
[facets]="naturalSearchFacets"
Expand Down Expand Up @@ -74,12 +74,10 @@ <h1 class="mat-headline-4">NaturalAbstractList</h1>
</table>
</div>
@if (dataSource.data?.length === 0) {
<div class="margin nat-center nat-vertical">
<div>Pas de résultats</div>
</div>
<div class="nat-margin nat-center nat-vertical"> Pas de résultats </div>
}
@if (!dataSource.data) {
<div class="margin nat-center nat-vertical">
<div class="nat-margin nat-center nat-vertical">
<mat-progress-spinner [diameter]="40" mode="indeterminate" />
</div>
}
Expand Down
10 changes: 4 additions & 6 deletions src/app/navigable-list/navigable-list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ <h1 class="mat-headline-4">NaturalAbstractNavigableList</h1>
<div class="nat-vertical">
<div class="nat-horizontal nat-wrap">
@for (item of breadcrumbs; track item) {
<a [routerLink]="getChildLink(item)" class="no-padding" mat-button>
<a [routerLink]="getChildLink(item)" class="nat-no-padding" mat-button>
<mat-icon naturalIcon="chevron_right" />
<span>{{ item.name }}</span>
</a>
}
</div>
<div class="margin-v nat-horizontal" overflow>
<div class="nat-margin-vertical nat-horizontal" overflow>
<natural-search
(selectionChange)="search($event)"
[facets]="naturalSearchFacets"
Expand Down Expand Up @@ -78,12 +78,10 @@ <h1 class="mat-headline-4">NaturalAbstractNavigableList</h1>
</table>
</div>
@if (dataSource.data?.length === 0) {
<div class="margin nat-center nat-vertical">
<div>Pas de résultats</div>
</div>
<div class="nat-margin nat-center nat-vertical"> Pas de résultats </div>
}
@if (!dataSource.data) {
<div class="margin nat-center nat-vertical">
<div class="nat-margin nat-center nat-vertical">
<mat-progress-spinner [diameter]="40" mode="indeterminate" />
</div>
}
Expand Down

0 comments on commit 88c37dd

Please sign in to comment.