Skip to content

Commit

Permalink
feat(kit)!: DataListDropdownManager move into separate module (#2317)
Browse files Browse the repository at this point in the history
  • Loading branch information
waterplea authored and splincode committed Aug 24, 2022
1 parent 81b937c commit 34647e9
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 6 deletions.
3 changes: 0 additions & 3 deletions projects/core/components/data-list/data-list.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';

import {TuiDataListComponent} from './data-list.component';
import {TuiDataListDirective} from './data-list.directive';
import {TuiDataListDropdownManagerDirective} from './data-list-dropdown-manager.directive';
import {TuiOptGroupDirective} from './opt-group.directive';
import {TuiOptionComponent} from './option/option.component';

Expand All @@ -16,14 +15,12 @@ import {TuiOptionComponent} from './option/option.component';
TuiOptionComponent,
TuiOptGroupDirective,
TuiDataListDirective,
TuiDataListDropdownManagerDirective,
],
exports: [
TuiDataListComponent,
TuiOptionComponent,
TuiOptGroupDirective,
TuiDataListDirective,
TuiDataListDropdownManagerDirective,
],
})
export class TuiDataListModule {}
1 change: 0 additions & 1 deletion projects/core/components/data-list/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export * from './data-list.component';
export * from './data-list.directive';
export * from './data-list.module';
export * from './data-list-dropdown-manager.directive';
export * from './opt-group.directive';
export * from './option/option.component';
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
} from '@taiga-ui/core';
import {
TuiArrowModule,
TuiDataListDropdownManagerModule,
TuiDropdownHoverModule,
TuiInputDateRangeModule,
TuiInputModule,
Expand Down Expand Up @@ -49,6 +50,7 @@ import {TuiDataListExample6} from './examples/6';
TuiArrowModule,
TuiNotificationModule,
TuiDataListModule,
TuiDataListDropdownManagerModule,
TuiSvgModule,
TuiHostedDropdownModule,
TuiButtonModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@
heading="Submenu"
[content]="example2"
>
<tui-notification
i18n
class="tui-space_bottom-3"
>
Use
<code>TuiDataListDropdownManagerModule</code>
for nested menus
</tui-notification>
<tui-data-list-example-2></tui-data-list-example-2>
</tui-doc-example>

Expand All @@ -64,6 +72,14 @@
heading="Complex"
[content]="example5"
>
<tui-notification
i18n
class="tui-space_bottom-3"
>
Use
<code>TuiDataListDropdownManagerModule</code>
for nested menus
</tui-notification>
<tui-data-list-example-5></tui-data-list-example-5>
</tui-doc-example>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
tuiPure,
tuiTypedFromEvent,
} from '@taiga-ui/cdk';
import {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';
import {TuiDropdownDirective} from '@taiga-ui/core';
import {EMPTY, merge, Observable} from 'rxjs';
import {
debounceTime,
Expand All @@ -26,7 +26,6 @@ import {
tap,
} from 'rxjs/operators';

// TODO: 3.0 Move into separate module
@Directive({
selector: `tui-data-list[tuiDataListDropdownManager]`,
})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {NgModule} from '@angular/core';

import {TuiDataListDropdownManagerDirective} from './data-list-dropdown-manager.directive';

@NgModule({
declarations: [TuiDataListDropdownManagerDirective],
exports: [TuiDataListDropdownManagerDirective],
})
export class TuiDataListDropdownManagerModule {}
2 changes: 2 additions & 0 deletions projects/kit/directives/data-list-dropdown-manager/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './data-list-dropdown-manager.directive';
export * from './data-list-dropdown-manager.module';
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ngPackage": {
"lib": {
"entryFile": "index.ts"
}
}
}
1 change: 1 addition & 0 deletions projects/kit/directives/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from '@taiga-ui/kit/directives/data-list-dropdown-manager';
export * from '@taiga-ui/kit/directives/dropdown-context';
export * from '@taiga-ui/kit/directives/dropdown-hover';
export * from '@taiga-ui/kit/directives/dropdown-selection';
Expand Down

0 comments on commit 34647e9

Please sign in to comment.