-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
### Proposed Changes * Part of Custom Component Category-Field. Get, show and navigate categories ### Checklist - [x] Tests - [x] Translations - [ ] Security Implications Contemplated (add notes if applicable) ### Additional Info ### Walkthrough video https://github.com/dotCMS/core/assets/1909643/0793a077-62e3-4d11-bd46-f72d7f2dcd31 --------- Co-authored-by: Freddy Montes <[email protected]>
- Loading branch information
Showing
40 changed files
with
1,573 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...mponents/dot-category-field-category-list/dot-category-field-category-list.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<div class="w-full category-list__header">Root</div> | ||
<div | ||
[ngClass]="{ 'no-overflow-x-yet': emptyColumns().length }" | ||
class="flex-1 category-list__category-list"> | ||
@for (column of categories(); let index = $index; track index) { | ||
<!--dynamic columns--> | ||
<div #categoryColumn class="category-list__category-column" data-testId="category-column"> | ||
@for (item of column; track item.inode) { | ||
<div | ||
data-testId="category-item" | ||
class="flex align-content-center align-items-center category-list__item" | ||
[ngClass]="{ 'category-list__item--selected': item.checked }" | ||
(click)="itemClicked.emit({ index, item })"> | ||
<p-checkbox [(ngModel)]="itemsSelected" [value]="item.key" /> | ||
|
||
<label | ||
data-testId="category-item-label" | ||
class="flex flex-grow-1 category-list__item-label" | ||
[ngClass]="{ 'cursor-pointer': item.childrenCount > 0 }" | ||
[for]="item.key" | ||
>{{ item.categoryName }}</label | ||
> | ||
|
||
@if (item.childrenCount > 0) { | ||
<i | ||
data-testId="category-item-with-child" | ||
class="pi pi-chevron-right category-list__item-icon"></i> | ||
} | ||
</div> | ||
} | ||
</div> | ||
} | ||
|
||
<!--Fake empty columns--> | ||
@for (_ of emptyColumns(); track _) { | ||
<div | ||
class="flex-grow-1 category-list__category-column" | ||
data-testId="category-column-empty"></div> | ||
} | ||
</div> |
Oops, something went wrong.