Skip to content

Commit

Permalink
refactor: rename TuiBadgeDirective to TuiBadge (#7839)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Jun 19, 2024
1 parent 33dc632 commit 0fe169f
Show file tree
Hide file tree
Showing 45 changed files with 104 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
TuiNotification,
TuiTextfield,
} from '@taiga-ui/core';
import {TuiBadgeDirective, TuiDataListWrapper, TuiSwitch} from '@taiga-ui/kit';
import {TuiBadge, TuiDataListWrapper, TuiSwitch} from '@taiga-ui/kit';
import {
TuiInputNumberModule,
TuiSelectModule,
Expand Down Expand Up @@ -67,7 +67,7 @@ import {TuiDocTypeReferencePipe} from './pipes/type-reference.pipe';
NgForOf,
TuiStripOptionalPipe,
TuiIsOptionalPipe,
TuiBadgeDirective,
TuiBadge,
NgTemplateOutlet,
TuiDocTypeReferencePipe,
TuiSelectModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,11 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifierMulti[] = [
},
{
from: {name: 'TuiBadgeModule', moduleSpecifier: '@taiga-ui/experimental'},
to: {name: 'TuiBadgeDirective', moduleSpecifier: '@taiga-ui/kit'},
to: {name: 'TuiBadge', moduleSpecifier: '@taiga-ui/kit'},
},
{
from: {name: 'TuiBadgeModule', moduleSpecifier: '@taiga-ui/kit'},
to: {name: 'TuiBadgeDirective', moduleSpecifier: '@taiga-ui/kit'},
to: {name: 'TuiBadge', moduleSpecifier: '@taiga-ui/kit'},
},
{
from: {name: 'TuiClickOutsideModule', moduleSpecifier: '@taiga-ui/cdk'},
Expand Down Expand Up @@ -398,7 +398,7 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifierMulti[] = [
name: 'TuiBadgeNotificationModule',
moduleSpecifier: '@taiga-ui/experimental',
},
to: {name: 'TuiBadgeNotificationComponent', moduleSpecifier: '@taiga-ui/kit'},
to: {name: 'TuiBadgeNotification', moduleSpecifier: '@taiga-ui/kit'},
},
{
from: {name: 'TuiBadgedContentModule', moduleSpecifier: '@taiga-ui/kit'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import { TuiBadgeModule } from "@taiga-ui/experimental";
export class Test {
}`;

const COMPONENT_AFTER = `import { TuiBadgeDirective } from "@taiga-ui/kit";
const COMPONENT_AFTER = `import { TuiBadge } from "@taiga-ui/kit";
@Component({
standalone: true,
templateUrl: './test.template.html',
imports: [TuiBadgeDirective]
imports: [TuiBadge]
})
export class Test {
}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiPlatform} from '@taiga-ui/cdk';
import {TuiBadgeNotificationComponent} from '@taiga-ui/kit';
import {TuiBadgeNotification} from '@taiga-ui/kit';

@Component({
standalone: true,
imports: [TuiPlatform, TuiBadgeNotificationComponent],
imports: [TuiPlatform, TuiBadgeNotification],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiBadgeNotificationComponent} from '@taiga-ui/kit';
import {TuiBadgeNotification} from '@taiga-ui/kit';

@Component({
standalone: true,
imports: [TuiBadgeNotificationComponent],
imports: [TuiBadgeNotification],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import {changeDetection} from '@demo/emulate/change-detection';
import {TuiDemo} from '@demo/utils';
import type {TuiSizeL, TuiSizeXS} from '@taiga-ui/core';
import {TuiLabel} from '@taiga-ui/core';
import {TuiBadgeNotificationComponent} from '@taiga-ui/kit';
import {TuiBadgeNotification} from '@taiga-ui/kit';

@Component({
standalone: true,
imports: [TuiDemo, TuiBadgeNotificationComponent, TuiLabel],
imports: [TuiDemo, TuiBadgeNotification, TuiLabel],
templateUrl: './index.html',
changeDetection,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiRepeatTimes} from '@taiga-ui/cdk';
import {TuiBadgeDirective} from '@taiga-ui/kit';
import {TuiBadge} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-badge-example-1',
imports: [TuiBadgeDirective, TuiRepeatTimes],
imports: [TuiBadge, TuiRepeatTimes],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiBadgeDirective} from '@taiga-ui/kit';
import {TuiBadge} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-badge-example-2',
imports: [TuiBadgeDirective],
imports: [TuiBadge],
templateUrl: './index.html',
encapsulation,
changeDetection,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiPlatform} from '@taiga-ui/cdk';
import {TuiIcon} from '@taiga-ui/core';
import {TuiBadgeDirective} from '@taiga-ui/kit';
import {TuiBadge} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-badge-example-3',
imports: [TuiBadgeDirective, TuiPlatform, TuiIcon],
imports: [TuiBadge, TuiPlatform, TuiIcon],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiBadgeDirective, TuiFadeDirective} from '@taiga-ui/kit';
import {TuiBadge, TuiFadeDirective} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-badge-example-4',
imports: [TuiBadgeDirective, TuiFadeDirective],
imports: [TuiBadge, TuiFadeDirective],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiBadgeDirective} from '@taiga-ui/kit';
import {TuiBadge} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-badge-example-5',
imports: [TuiBadgeDirective],
imports: [TuiBadge],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiBadgeDirective, tuiBadgeOptionsProvider} from '@taiga-ui/kit';
import {TuiBadge, tuiBadgeOptionsProvider} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-badge-example-6',
imports: [TuiBadgeDirective],
imports: [TuiBadge],
templateUrl: './index.html',
encapsulation,
changeDetection,
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/modules/components/badge/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {changeDetection} from '@demo/emulate/change-detection';
import {TuiDemo} from '@demo/utils';
import {type TuiRawLoaderContent} from '@taiga-ui/addon-doc';
import {type TuiSizeS, type TuiSizeXL} from '@taiga-ui/core';
import {TuiBadgeDirective, TuiFadeDirective, TuiRadioListComponent} from '@taiga-ui/kit';
import {TuiBadge, TuiFadeDirective, TuiRadioListComponent} from '@taiga-ui/kit';

import {TuiBadgeExample1} from './examples/1';
import {TuiBadgeExample2} from './examples/2';
Expand All @@ -16,7 +16,7 @@ import {TuiBadgeExample6} from './examples/6';
@Component({
standalone: true,
imports: [
TuiBadgeDirective,
TuiBadge,
TuiFadeDirective,
TuiRadioListComponent,
FormsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,11 @@ import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiIcon} from '@taiga-ui/core';
import {
TuiAvatar,
TuiBadgedContentComponent,
TuiBadgeDirective,
TuiBadgeNotificationComponent,
} from '@taiga-ui/kit';
import {TuiAvatar, TuiBadge, TuiBadgedContent, TuiBadgeNotification} from '@taiga-ui/kit';

@Component({
standalone: true,
imports: [
TuiBadgedContentComponent,
TuiBadgeNotificationComponent,
TuiAvatar,
TuiIcon,
TuiBadgeDirective,
],
imports: [TuiBadgedContent, TuiBadgeNotification, TuiAvatar, TuiIcon, TuiBadge],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,11 @@ import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiIcon} from '@taiga-ui/core';
import {
TuiAvatar,
TuiBadgedContentComponent,
TuiBadgeDirective,
TuiBadgeNotificationComponent,
} from '@taiga-ui/kit';
import {TuiAvatar, TuiBadge, TuiBadgedContent, TuiBadgeNotification} from '@taiga-ui/kit';

@Component({
standalone: true,
imports: [
TuiBadgedContentComponent,
TuiBadgeNotificationComponent,
TuiAvatar,
TuiIcon,
TuiBadgeDirective,
],
imports: [TuiBadgedContent, TuiBadgeNotification, TuiAvatar, TuiIcon, TuiBadge],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@ import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiButton, TuiIcon} from '@taiga-ui/core';
import {
TuiBadgedContentComponent,
TuiBadgeDirective,
TuiBadgeNotificationComponent,
} from '@taiga-ui/kit';
import {TuiBadge, TuiBadgedContent, TuiBadgeNotification} from '@taiga-ui/kit';
import {TuiInputModule} from '@taiga-ui/legacy';

@Component({
standalone: true,
imports: [
TuiBadgedContentComponent,
TuiBadgeNotificationComponent,
TuiBadgedContent,
TuiBadgeNotification,
TuiInputModule,
TuiIcon,
TuiButton,
TuiBadgeDirective,
TuiBadge,
],
templateUrl: './index.html',
styleUrls: ['./index.less'],
Expand Down
10 changes: 3 additions & 7 deletions projects/demo/src/modules/components/badged-content/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@ import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {TuiDemo} from '@demo/utils';
import {TuiFallbackSrcPipe} from '@taiga-ui/core';
import {
TuiAvatar,
TuiBadgedContentComponent,
TuiBadgeNotificationComponent,
} from '@taiga-ui/kit';
import {TuiAvatar, TuiBadgedContent, TuiBadgeNotification} from '@taiga-ui/kit';

@Component({
standalone: true,
imports: [
AsyncPipe,
TuiBadgedContentComponent,
TuiBadgeNotificationComponent,
TuiBadgedContent,
TuiBadgeNotification,
TuiAvatar,
TuiFallbackSrcPipe,
TuiDemo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiAmountPipe} from '@taiga-ui/addon-commerce';
import {TUI_IS_MOBILE} from '@taiga-ui/cdk';
import {TuiTitle} from '@taiga-ui/core';
import {TuiAvatar, TuiBadgeDirective, TuiCommentDirective} from '@taiga-ui/kit';
import {TuiAvatar, TuiBadge, TuiCommentDirective} from '@taiga-ui/kit';
import {TuiBlockDetails} from '@taiga-ui/layout';

@Component({
Expand All @@ -16,7 +16,7 @@ import {TuiBlockDetails} from '@taiga-ui/layout';
TuiCommentDirective,
TuiAmountPipe,
TuiBlockDetails,
TuiBadgeDirective,
TuiBadge,
TuiTitle,
],
templateUrl: './index.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {encapsulation} from '@demo/emulate/encapsulation';
import {tuiAmountOptionsProvider, TuiAmountPipe} from '@taiga-ui/addon-commerce';
import {TUI_IS_MOBILE} from '@taiga-ui/cdk';
import {TuiTitle} from '@taiga-ui/core';
import {TuiAvatar, TuiBadgeDirective, TuiFadeDirective} from '@taiga-ui/kit';
import {TuiAvatar, TuiBadge, TuiFadeDirective} from '@taiga-ui/kit';
import {TuiBlockDetails} from '@taiga-ui/layout';

@Component({
Expand All @@ -15,7 +15,7 @@ import {TuiBlockDetails} from '@taiga-ui/layout';
TuiAvatar,
TuiAmountPipe,
TuiBlockDetails,
TuiBadgeDirective,
TuiBadge,
TuiTitle,
TuiFadeDirective,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiIcon, TuiSurface, TuiTitle} from '@taiga-ui/core';
import {TuiBadgeDirective} from '@taiga-ui/kit';
import {TuiBadge} from '@taiga-ui/kit';
import {TuiCardMedium} from '@taiga-ui/layout';

@Component({
standalone: true,
imports: [TuiCardMedium, TuiSurface, TuiBadgeDirective, TuiIcon, TuiTitle],
imports: [TuiCardMedium, TuiSurface, TuiBadge, TuiIcon, TuiTitle],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiIcon, TuiSurface, TuiTitle} from '@taiga-ui/core';
import {TuiBadgeDirective} from '@taiga-ui/kit';
import {TuiBadge} from '@taiga-ui/kit';
import {TuiCardMedium} from '@taiga-ui/layout';

@Component({
standalone: true,
imports: [TuiBadgeDirective, TuiIcon, TuiCardMedium, TuiSurface, TuiTitle],
imports: [TuiBadge, TuiIcon, TuiCardMedium, TuiSurface, TuiTitle],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
11 changes: 3 additions & 8 deletions projects/demo/src/modules/components/cell/examples/2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@ import {FormsModule} from '@angular/forms';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiIcon} from '@taiga-ui/core';
import {
TuiAvatar,
TuiBadgedContentComponent,
TuiBadgeDirective,
TuiSwitch,
} from '@taiga-ui/kit';
import {TuiAvatar, TuiBadge, TuiBadgedContent, TuiSwitch} from '@taiga-ui/kit';
import {TuiCell} from '@taiga-ui/layout';

@Component({
standalone: true,
imports: [
TuiCell,
TuiBadgedContentComponent,
TuiBadgeDirective,
TuiBadgedContent,
TuiBadge,
TuiIcon,
TuiAvatar,
TuiSwitch,
Expand Down
Loading

0 comments on commit 0fe169f

Please sign in to comment.