diff --git a/projects/templates/src/lib/components/po-modal-password-recovery/po-modal-password-recovery.component.html b/projects/templates/src/lib/components/po-modal-password-recovery/po-modal-password-recovery.component.html index e1a7175094..0bed89b5cb 100644 --- a/projects/templates/src/lib/components/po-modal-password-recovery/po-modal-password-recovery.component.html +++ b/projects/templates/src/lib/components/po-modal-password-recovery/po-modal-password-recovery.component.html @@ -2,117 +2,134 @@ #recoveryModal p-hide-close p-size="auto" - [ngSwitch]="modalType" [p-components-size]="componentsSize" [p-primary-action]="primaryAction" [p-secondary-action]="secondaryAction" [p-title]="modalTitle" >
-
-
- {{ emailModalPhrases.firstPhrase }} -
-
-
-
- - + @switch (modalType) { + @case ('email') { +
+
+ {{ emailModalPhrases.firstPhrase }}
+
+ + @if (modalPasswordRecoveryTypeAll) { +
+ + +
+ } -
- - +
+ @if (type === 'email' || type === 'all') { + + + } - - -
+ @if (type === 'sms') { + + + } +
-
- - +
+ @if (invalidEmail && control.dirty) { + + + } +
+ +
+
+ {{ emailModalPhrases.secondPhrase }} + @if (contactEmail) { + + {{ literals.prepositionIn }} + + {{ contactEmail }} + + + } + {{ endpoint }}
- -
-
- {{ emailModalPhrases.secondPhrase }} - - {{ literals.prepositionIn }} - - {{ contactEmail }} - - - {{ endpoint }} -
-
+
+ } -
-
{{ literals.sentSmsCodePhrase }}
-
-
- - -
- - - - + @case ('smsCode') { +
+
{{ literals.sentSmsCodePhrase }}
+
+ + + +
+ @if (invalidEmail) { + + + } + @if (showCustomCodeError) { + + + } +
+
- -
-
- {{ literals.sendAgainPhrase }} - {{ literals.sendAgain }} -
-
+
+ {{ literals.sendAgainPhrase }} + {{ literals.sendAgain }} +
+
+ } -
- -
- {{ literals.emailSentConfirmationPhrase }} -
-
+ @case ('confirmation') { +
+ +
+ {{ literals.emailSentConfirmationPhrase }} +
+
+ } + }
diff --git a/projects/ui/src/lib/components/po-calendar/po-calendar-wrapper/po-calendar-wrapper.component.html b/projects/ui/src/lib/components/po-calendar/po-calendar-wrapper/po-calendar-wrapper.component.html index b32d0d9041..0d0a96b575 100644 --- a/projects/ui/src/lib/components/po-calendar/po-calendar-wrapper/po-calendar-wrapper.component.html +++ b/projects/ui/src/lib/components/po-calendar/po-calendar-wrapper/po-calendar-wrapper.component.html @@ -1,5 +1,5 @@
- + @if (isDayVisible) { {{ displayMonth }} {{ displayYear }} -
-
- {{ weekDay }} -
+ @for (weekDay of displayWeekDays; track weekDay) { +
+ {{ weekDay }} +
+ }
-
-
- - {{ day.getDate() }} - -
+ @for (day of displayDays; track day) { +
+ @if (day !== 0) { + + {{ $any(day).getDate() }} + + } +
+ }
-
+ } - + @if (isMonthVisible) { {{ displayYear }} -
@@ -49,50 +51,50 @@
-
- - {{ month }} - -
+ @for (month of displayMonths; track month; let i = $index) { +
+ + {{ month }} + +
+ }
-
+ } - + @if (isYearVisible) { {{ displayStartDecade }} - {{ displayFinalDecade }} -
{{ yearLabel }}
-
-
- - {{ year }} - -
+ @for (year of displayDecade; track year; let i = $index) { +
+ + {{ year }} + +
+ }
-
+ } - + @if (!range) { - + }
diff --git a/projects/ui/src/lib/components/po-context-tabs/po-context-tab-button/po-context-tab-button.component.html b/projects/ui/src/lib/components/po-context-tabs/po-context-tab-button/po-context-tab-button.component.html index 3dd962879b..26e14e8c49 100644 --- a/projects/ui/src/lib/components/po-context-tabs/po-context-tab-button/po-context-tab-button.component.html +++ b/projects/ui/src/lib/components/po-context-tabs/po-context-tab-button/po-context-tab-button.component.html @@ -19,19 +19,16 @@ {{ label }} -
- -
+ @if (!hideClose) { +
+ +
+ }
diff --git a/projects/ui/src/lib/components/po-context-tabs/po-context-tabs.component.html b/projects/ui/src/lib/components/po-context-tabs/po-context-tabs.component.html index 844c16b486..5159ec8b42 100644 --- a/projects/ui/src/lib/components/po-context-tabs/po-context-tabs.component.html +++ b/projects/ui/src/lib/components/po-context-tabs/po-context-tabs.component.html @@ -1,45 +1,47 @@
- - - - + @for (tab of tabs; track trackByFn($index, tab)) { + @if (!tab.removed) { + + + } + } - - + @if (isShowTabDropdown) { + + + }
diff --git a/projects/ui/src/lib/components/po-context-tabs/samples/sample-po-context-tabs-business-conf/sample-po-context-tabs-business-conf.component.html b/projects/ui/src/lib/components/po-context-tabs/samples/sample-po-context-tabs-business-conf/sample-po-context-tabs-business-conf.component.html index 5d63cfc311..801a7b9b95 100644 --- a/projects/ui/src/lib/components/po-context-tabs/samples/sample-po-context-tabs-business-conf/sample-po-context-tabs-business-conf.component.html +++ b/projects/ui/src/lib/components/po-context-tabs/samples/sample-po-context-tabs-business-conf/sample-po-context-tabs-business-conf.component.html @@ -1,64 +1,64 @@ - -
-
-
-
- -
-
- -
-
-
- -
-
- + @for (speaker of speakers; track speaker) { + +
+
+
+
+ +
+
+
-
- +
+
+ +
+
+ +
+
+ +
-
-
-
- -
- -
TFace Conference Week
-
From 21th September until 26th setember 2018
-
-
-
- - - - {{ speaker.createdDate | date: 'MM/dd/yyyy' }} + +
+
+ +
TFace Conference Week
+
From 21th September until 26th setember 2018
+
+
+
+ + + + {{ speaker.createdDate | date: 'MM/dd/yyyy' }} +
+
+ + + + Av. Braz Leme, 1000, Santana +
-
- - - - Av. Braz Leme, 1000, Santana +
+ +
-
-
- - -
-
+ +
-
- + + }
diff --git a/projects/ui/src/lib/components/po-context-tabs/samples/sample-po-context-tabs-labs/sample-po-context-tabs-labs.component.html b/projects/ui/src/lib/components/po-context-tabs/samples/sample-po-context-tabs-labs/sample-po-context-tabs-labs.component.html index bca707f093..3d3ac304c5 100644 --- a/projects/ui/src/lib/components/po-context-tabs/samples/sample-po-context-tabs-labs/sample-po-context-tabs-labs.component.html +++ b/projects/ui/src/lib/components/po-context-tabs/samples/sample-po-context-tabs-labs/sample-po-context-tabs-labs.component.html @@ -1,16 +1,17 @@ - -
Tab Content {{ i }}
-
+ @for (tab of tabs; track tab; let i = $index) { + +
Tab Content {{ i }}
+
+ }
diff --git a/projects/ui/src/lib/components/po-list-view/po-list-view.component.html b/projects/ui/src/lib/components/po-list-view/po-list-view.component.html index 98e328c7c6..15894ee072 100644 --- a/projects/ui/src/lib/components/po-list-view/po-list-view.component.html +++ b/projects/ui/src/lib/components/po-list-view/po-list-view.component.html @@ -3,137 +3,153 @@ [class.po-list-view-main-container]="!showHeader" [style.height.px]="height" > -
-
-
- + @if (showHeader) { +
+
+
+ +
-
+ }
- -
- {{ literals.noData }} -
-
+ @if (!hasItems()) { + +
+ {{ literals.noData }} +
+
+ } - + @for (item of items; track $index; let index = $index) {
-
-
- -
- - {{ getItemTitle(item) }} - - - {{ getItemTitle(item) }} - - - {{ getItemTitle(item) }} - -
+
+ @if (select) { +
+ +
+ } + @switch (checkTitleType(item)) { + @case ('externalLink') { + + {{ getItemTitle(item) }} + + } -
- - + @case ('internalLink') { + + {{ getItemTitle(item) }} + + } + + @case ('noLink') { + + {{ getItemTitle(item) }} + + } + }
-
-
- + @if (showButtonsActions) { +
+ + +
+ } + + @if (showPopupActions) { +
+
+ +
-
+ }
-
- - -
+ @if (hasContentTemplate) { +
+ + +
+ } -
- - -
+ + +
+ }
-
- - -
+ @if (hasDetailTemplate) { +
+ + +
+ } - + }
-
- - -
+@if (displayShowMoreButton) { +
+ + +
+} diff --git a/projects/ui/src/lib/components/po-list-view/po-list-view.component.spec.ts b/projects/ui/src/lib/components/po-list-view/po-list-view.component.spec.ts index 1a1bc0d1ef..ef9c148109 100644 --- a/projects/ui/src/lib/components/po-list-view/po-list-view.component.spec.ts +++ b/projects/ui/src/lib/components/po-list-view/po-list-view.component.spec.ts @@ -194,12 +194,6 @@ describe('PoListViewComponent:', () => { expect(component.showDetail.emit).toHaveBeenCalledWith(detail); }); - it('trackBy: should return `index`', () => { - const index = 1; - - expect(component.trackBy(index)).toBe(index); - }); - it('visibleActions: should be `false` if doesn`t have action.', () => { component.actions = undefined; diff --git a/projects/ui/src/lib/components/po-list-view/po-list-view.component.ts b/projects/ui/src/lib/components/po-list-view/po-list-view.component.ts index 271db12c21..f48f2001ca 100644 --- a/projects/ui/src/lib/components/po-list-view/po-list-view.component.ts +++ b/projects/ui/src/lib/components/po-list-view/po-list-view.component.ts @@ -136,10 +136,6 @@ export class PoListViewComponent extends PoListViewBaseComponent implements Afte : listViewAction[property]; } - trackBy(index) { - return index; - } - togglePopup(item, targetRef: HTMLElement) { this.popupTarget = targetRef; this.changeDetector.detectChanges(); diff --git a/projects/ui/src/lib/components/po-stepper/po-stepper.component.html b/projects/ui/src/lib/components/po-stepper/po-stepper.component.html index 4b7c84f327..1d1f44c6a1 100644 --- a/projects/ui/src/lib/components/po-stepper/po-stepper.component.html +++ b/projects/ui/src/lib/components/po-stepper/po-stepper.component.html @@ -1,18 +1,18 @@
- + @for (step of stepList; track trackByFn($any(step)); let index = $index) {
-
- + @if (index > 0) { +
+ } - -
+ @if (index < stepList.length - 1) { +
+ }
-
+ }
-
- -
+ @if (usePoSteps) { +
+ +
+ }
diff --git a/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.html b/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.html index 003daa589d..e128504051 100644 --- a/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.html +++ b/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.html @@ -1,10 +1,11 @@ - - +@for (column of icons; track $index) { + + +} diff --git a/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.spec.ts b/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.spec.ts index 04a8727065..af94224e6a 100644 --- a/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.spec.ts +++ b/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.spec.ts @@ -258,13 +258,6 @@ describe('PoTableColumnIconComponent:', () => { expect(fakeColumnIcon.action).toBeUndefined(); }); - it('trackByFunction: should return index', () => { - const fakeIndex = 'teste'; - const trackBy = component.trackByFunction(fakeIndex); - - expect(trackBy).toBe(fakeIndex); - }); - it('convertToColumnIcon: should convert to columnIcon pattern if pass string', () => { const icon = 'po-icon-copy'; const columnIcons: Array = [{ value: icon }]; diff --git a/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.ts b/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.ts index 1cf6ec7b5c..84da9bbc4d 100644 --- a/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.ts +++ b/projects/ui/src/lib/components/po-table/po-table-column-icon/po-table-column-icon.component.ts @@ -67,10 +67,6 @@ export class PoTableColumnIconComponent { return column.disabled ? column.disabled(this.row) : false; } - trackByFunction(index) { - return index; - } - private convertToColumnIcon(rowIcons: Array | Array | string): Array { if (Array.isArray(rowIcons)) { return (rowIcons).map(rowIcon => (typeof rowIcon === 'string' ? { value: rowIcon } : rowIcon)); diff --git a/projects/ui/src/lib/components/po-table/po-table-list-manager/po-table-list-manager.component.html b/projects/ui/src/lib/components/po-table/po-table-list-manager/po-table-list-manager.component.html index 188c5de0ea..2075c2aa9f 100644 --- a/projects/ui/src/lib/components/po-table/po-table-list-manager/po-table-list-manager.component.html +++ b/projects/ui/src/lib/components/po-table/po-table-list-manager/po-table-list-manager.component.html @@ -1,7 +1,7 @@ @if (existedFixedItem()) {

{{ literals.fixedColumns }}

- @for (option of checkboxGroupOptionsView; track trackByFn($index)) { + @for (option of checkboxGroupOptionsView; track $index) { @if (isFixed(option)) {
  • {{ literals.otherColumns }}

    - @for (option of checkboxGroupOptionsView; track trackByFn($index)) { + @for (option of checkboxGroupOptionsView; track $index) { @if (!isFixed(option)) {
  • @if (!isFixed(option)) {