Skip to content

Commit

Permalink
chore: fix badged-content migration, add some identifiers migration (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirpotekhin authored Aug 6, 2024
1 parent 333658f commit b68dba5
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifierMulti[] = [
from: {name: 'TuiPaginationModule', moduleSpecifier: '@taiga-ui/kit'},
to: {name: 'TuiPagination', moduleSpecifier: '@taiga-ui/kit'},
},
{
from: {name: 'TuiPlatformModule', moduleSpecifier: '@taiga-ui/cdk'},
to: {name: 'TuiPlatform', moduleSpecifier: '@taiga-ui/cdk'},
},
{
from: {
name: 'tuiIconResolverProvider',
moduleSpecifier: '@taiga-ui/experimental',
},
to: {name: 'tuiIconResolverProvider', moduleSpecifier: '@taiga-ui/core'},
},
{
from: {name: 'TuiAutoFocusModule', moduleSpecifier: '@taiga-ui/cdk'},
to: {name: 'TuiAutoFocus', moduleSpecifier: '@taiga-ui/cdk'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function migrateBadgedContent({

recorder.insertRight(
insertTo + templateOffset - 1,
'[style.--tui-radius.%]="50"',
' [style.--tui-radius.%]="50"',
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ export class Test {
}`;

const TEMPLATE_BEFORE = `
<tui-badged-content [colorTop]="status || ''">
<p class="day">
{{ day?.activity?.date?.day }}
</p>
</tui-badged-content>
<tui-badged-content
colorTop="var(--tui-error-fill)"
size="l"
Expand Down Expand Up @@ -72,12 +77,22 @@ const TEMPLATE_BEFORE = `
`;

const TEMPLATE_AFTER = `
<tui-badged-content [style.--tui-radius.%]="50">
<tui-badge-notification
size="xs"
tuiSlot="top"
[style.color]="'status || '''"
></tui-badge-notification>
<p class="day">
{{ day?.activity?.date?.day }}
</p>
</tui-badged-content>
<tui-badged-content
${''}
${''}
class="tui-space_right-5"
${''}
[style.--tui-radius.%]="50">
[style.--tui-radius.%]="50">
<tui-badge-notification
size="xs"
tuiSlot="top"
Expand All @@ -96,7 +111,7 @@ const TEMPLATE_AFTER = `
${''}
class="tui-space_right-5"
${''}
[style.--tui-radius.%]="50"><tui-badge-notification
[style.--tui-radius.%]="50"><tui-badge-notification
size="l"
tuiSlot="top"
${''}
Expand All @@ -119,7 +134,7 @@ const TEMPLATE_AFTER = `
<!-- Taiga migration TODO: contentTop and contentBottom inputs has been removed. Use ng-content, see taiga-ui.dev/components/badged-content -->
<tui-badged-content
${''}
[style.--tui-radius.%]="50">
[style.--tui-radius.%]="50">
<tui-avatar></tui-avatar>
</tui-badged-content>
`;
Expand Down

0 comments on commit b68dba5

Please sign in to comment.