Skip to content

Commit

Permalink
refactor!: Sensitive move to kit, make it standalone (#6960)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirpotekhin authored Mar 7, 2024
1 parent ec85174 commit 5ac9963
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 68 deletions.
18 changes: 9 additions & 9 deletions projects/demo/src/modules/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,6 @@ export const ROUTES: Routes = [
title: 'Segmented',
},
},
{
path: 'experimental/sensitive',
loadChildren: async () =>
(await import('../experimental/sensitive/sensitive.module'))
.ExampleTuiSensitiveModule,
data: {
title: 'Sensitive',
},
},
{
path: 'experimental/surface',
loadChildren: async () =>
Expand Down Expand Up @@ -617,6 +608,15 @@ export const ROUTES: Routes = [
title: 'Fade',
},
},
{
path: 'directives/sensitive',
loadChildren: async () =>
(await import('../directives/sensitive/sensitive.module'))
.ExampleTuiSensitiveModule,
data: {
title: 'Sensitive',
},
},
{
path: 'components/input-inline',
loadChildren: async () =>
Expand Down
12 changes: 6 additions & 6 deletions projects/demo/src/modules/app/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -927,12 +927,6 @@ export const pages: TuiDocPages = [
keywords: 'tabs, control, radio, navigation, навигация, вкладки, таб',
route: '/experimental/segmented',
},
{
section: 'Experimental',
title: 'Sensitive',
keywords: 'sensitive, pixel, mask, пиксель, маска',
route: '/experimental/sensitive',
},
{
section: 'Experimental',
title: 'Surface',
Expand Down Expand Up @@ -1381,6 +1375,12 @@ export const pages: TuiDocPages = [
keywords: 'overflow, ellipsis, gradient, clamp, line',
route: '/directives/fade',
},
{
section: 'Tools',
title: 'Sensitive',
keywords: 'sensitive, pixel, mask, пиксель, маска',
route: '/directives/sensitive',
},
],
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
```ts
import {NgModule} from '@angular/core';
import {TuiSensitiveModule} from '@taiga-ui/experimental';
import {TuiSensitiveDirective} from '@taiga-ui/kit';

// ...

@NgModule({
imports: [
// ...
TuiSensitiveModule,
TuiSensitiveDirective,
],
})
export class MyModule {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {tuiGetDocModules} from '@taiga-ui/addon-doc';
import {TuiNotificationModule} from '@taiga-ui/core';
import {TuiButtonModule, TuiSensitiveModule} from '@taiga-ui/experimental';
import {TuiBadgeDirective, TuiToggleModule} from '@taiga-ui/kit';
import {TuiButtonModule} from '@taiga-ui/experimental';
import {TuiBadgeDirective, TuiSensitiveDirective, TuiToggleModule} from '@taiga-ui/kit';

import {TuiSensitiveExample1} from './examples/1';
import {TuiSensitiveExample2} from './examples/2';
Expand All @@ -14,7 +14,7 @@ import {ExampleTuiSensitiveComponent} from './sensitive.component';
imports: [
FormsModule,
CommonModule,
TuiSensitiveModule,
TuiSensitiveDirective,
TuiNotificationModule,
TuiToggleModule,
TuiBadgeDirective,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<tui-doc-page
header="Sensitive"
package="EXPERIMENTAL"
package="KIT"
type="directives"
>
<ng-template pageTab>
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/modules/experimental/cell/cell.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
TuiCellModule,
TuiCheckboxModule,
TuiIconModule,
TuiSensitiveModule,
TuiSurfaceModule,
TuiThumbnailCardModule,
TuiTitleModule,
Expand All @@ -34,6 +33,7 @@ import {
TuiFadeDirective,
TuiProgressModule,
TuiSelectModule,
TuiSensitiveDirective,
} from '@taiga-ui/kit';

import {ExampleTuiCellComponent} from './cell.component';
Expand Down Expand Up @@ -66,7 +66,7 @@ import {TuiCellExample7} from './examples/7';
TuiIconModule,
TuiCheckboxModule,
TuiLoaderModule,
TuiSensitiveModule,
TuiSensitiveDirective,
TuiSurfaceModule,
TuiSelectModule,
TuiDataListWrapperModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
TuiButtonModule,
TuiHeaderDirective,
TuiIconModule,
TuiSensitiveModule,
TuiTitleModule,
TuiToggleModule,
} from '@taiga-ui/experimental';
Expand All @@ -21,6 +20,7 @@ import {
TuiBadgeNotificationComponent,
TuiDataListWrapperModule,
TuiSelectModule,
TuiSensitiveDirective,
} from '@taiga-ui/kit';

import {TuiHeaderExample1} from './examples/1';
Expand All @@ -39,7 +39,7 @@ import {ExampleTuiCellComponent} from './header.component';
TuiHeaderDirective,
TuiTitleModule,
TuiIconModule,
TuiSensitiveModule,
TuiSensitiveDirective,
TuiSelectModule,
TuiDataListWrapperModule,
TuiTextfieldControllerModule,
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion projects/experimental/directives/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ export * from '@taiga-ui/experimental/directives/card';
export * from '@taiga-ui/experimental/directives/cell';
export * from '@taiga-ui/experimental/directives/header';
export * from '@taiga-ui/experimental/directives/progress-segmented';
export * from '@taiga-ui/experimental/directives/sensitive';
export * from '@taiga-ui/experimental/directives/surface';
export * from '@taiga-ui/experimental/directives/title';
10 changes: 0 additions & 10 deletions projects/experimental/directives/sensitive/sensitive.module.ts

This file was deleted.

1 change: 1 addition & 0 deletions projects/kit/directives/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export * from '@taiga-ui/kit/directives/highlight';
export * from '@taiga-ui/kit/directives/lazy-loading';
export * from '@taiga-ui/kit/directives/present';
export * from '@taiga-ui/kit/directives/project-class';
export * from '@taiga-ui/kit/directives/sensitive';
export * from '@taiga-ui/kit/directives/unfinished-validator';
export * from '@taiga-ui/kit/directives/unmask-handler';
export * from '@taiga-ui/kit/directives/value-accessor';
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './sensitive.component';
export * from './sensitive.directive';
export * from './sensitive.module';
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {TuiSensitiveComponent} from './sensitive.component';
const rowsInSvg = 3;

@Directive({
standalone: true,
selector: '[tuiSensitive]',
providers: [ResizeObserverService],
host: {
Expand Down

0 comments on commit 5ac9963

Please sign in to comment.