-
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.
Cherry pick template issues for pre release (#25971)
* Fix #25917: Template Builder file containers were saving with Identifier instead of Path (#25920) * dev (gridstack utils): add getContainerReference * dev (template builder store): implement getContainerReference * fix (palette content type module): add DotMessagePipe import * feedback (template builder): moved getContainerReference from utils to box component * feedback (template builder box test): enhance testing * fix (containers mock): fix merge errors * Fix #25937: Template Builder Enhancing error and request handling (#25942) * fix (template save and publish): enhancing error and request handling * feedback (dot templates service): delete old save and publish * fix (gridstack utils): EMPTY_ROWS_VALUE was being modified by reference * Fix #25926: Template Builder fixing wrong classes deletion (#25928) * dev (add style classes module): refactor to support remove any class * fix (template builder story): console error due to missing import * Fix #25926 Reimplement the autocomplete component (#25935) * Reimplement the autocomplete component * dev (add styles autocomplete): enhance functionality * Fix filtering and styling. * Fix the filtering and language messages * Add tests for JsonClassesService * Test are not running * fix (add styles dialog): now tests are running * Fix tests * Update mocks --------- Co-authored-by: Jalinson Diaz <zjaaaldev@gmail.com> * Fix #25926 Templater Builder: Fixing link target * Fixing test (#25911) --------- Co-authored-by: Jalinson Diaz <zjaaaldev@gmail.com> Co-authored-by: Rafael Velazco <rjvelazco21@gmail.com> Co-authored-by: Manuel Rojas <manuel.rojas.21@gmail.com>
- Loading branch information
1 parent
8b3e4f1
commit 5df882d
Showing
29 changed files
with
536 additions
and
666 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
74 changes: 44 additions & 30 deletions
74
...plate-builder/components/add-style-classes-dialog/add-style-classes-dialog.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 |
---|---|---|
@@ -1,30 +1,44 @@ | ||
<ng-container *ngIf="vm$ | async as vm"> | ||
<div class="dialog__auto-complete-container field"> | ||
<div class="p-fluid"> | ||
<p-autoComplete | ||
[ngModel]="vm.selectedClasses" | ||
[suggestions]="vm.filteredClasses" | ||
[multiple]="true" | ||
[completeOnFocus]="true" | ||
[size]="446" | ||
[tabindex]="1" | ||
(onSelect)="onSelect($event)" | ||
(onUnselect)="onUnselect()" | ||
(completeMethod)="filterClasses($event)" | ||
(onKeyUp)="onKeyUp($event)" | ||
dataKey="cssClass" | ||
field="cssClass" | ||
appendTo="body" | ||
inputId="auto-complete-input" | ||
name="class" | ||
type="text" | ||
> | ||
</p-autoComplete> | ||
</div> | ||
</div> | ||
<div class="dialog__actions-container"> | ||
<p-button (onClick)="saveClass(vm.selectedClasses)" data-testId="update-btn"> | ||
{{ 'dot.template.builder.classes.dialog.update.button' | dm }}</p-button | ||
> | ||
</div> | ||
</ng-container> | ||
<div class="dialog__auto-complete-container field"> | ||
<p-autoComplete | ||
class="p-fluid" | ||
[(ngModel)]="selectedClasses" | ||
[unique]="true" | ||
[suggestions]="filteredSuggestions" | ||
[size]="446" | ||
[multiple]="true" | ||
[dropdown]="isJsonClasses$ | async" | ||
[autofocus]="true" | ||
(onKeyUp)="onKeyUp($event)" | ||
(completeMethod)="filterClasses($event)" | ||
data-testId="autocomplete" | ||
inputId="auto-complete-input" | ||
appendTo="body"> | ||
</p-autoComplete> | ||
<ng-container *ngIf="isJsonClasses$ | async; else suggestionNotes"> | ||
<ul data-testId="list"> | ||
<li> | ||
<i class="pi pi-info-circle"></i> | ||
{{ 'dot.template.builder.autocomplete.has.suggestions' | dm }} | ||
</li> | ||
</ul> | ||
</ng-container> | ||
|
||
<ng-template #suggestionNotes> | ||
<ul data-testId="list"> | ||
<li> | ||
<i class="pi pi-info-circle"></i> | ||
{{ 'dot.template.builder.autocomplete.no.suggestions' | dm }} | ||
</li> | ||
<li> | ||
<i class="pi pi-check-circle"></i> | ||
<span | ||
[innerHTML]="'dot.template.builder.autocomplete.setup.suggestions' | dm"></span> | ||
</li> | ||
</ul> | ||
</ng-template> | ||
</div> | ||
<div class="dialog__actions-container"> | ||
<p-button (onClick)="save()" data-testId="update-btn"> | ||
{{ 'dot.template.builder.classes.dialog.update.button' | dm }}</p-button | ||
> | ||
</div> |
41 changes: 24 additions & 17 deletions
41
...plate-builder/components/add-style-classes-dialog/add-style-classes-dialog.component.scss
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 |
---|---|---|
@@ -1,30 +1,37 @@ | ||
@use "variables" as *; | ||
|
||
:host { | ||
width: 33.875rem; | ||
display: block; | ||
} | ||
|
||
.dialog__auto-complete-container { | ||
.auto-complete-container__label { | ||
margin: 0; | ||
color: $black; | ||
} | ||
} | ||
|
||
.dialog__actions-container { | ||
display: flex; | ||
justify-content: end; | ||
padding: 1.25rem $spacing-5; | ||
} | ||
|
||
::ng-deep { | ||
.p-autocomplete.p-autocomplete-multiple | ||
.p-autocomplete-multiple-container | ||
.p-autocomplete-token { | ||
margin-right: 0; | ||
} | ||
p-autoComplete { | ||
margin-bottom: $spacing-3; | ||
display: block; | ||
} | ||
|
||
ul { | ||
color: $color-palette-gray-700; | ||
display: flex; | ||
flex-direction: column; | ||
font-size: $font-size-sm; | ||
gap: $spacing-1; | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
li { | ||
display: flex; | ||
align-items: center; | ||
gap: $spacing-0; | ||
} | ||
|
||
.p-autocomplete-multiple-container { | ||
gap: 0.25rem; | ||
} | ||
.pi { | ||
color: $color-palette-gray; | ||
} |
Oops, something went wrong.