-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(package): individual module imports for pipe directives (#384)
This allows components to be imported individually without having to install an unused, optional dependency. Deprecations - PipeModule: Use SearchHighlightModule, SortArrayModule, or TruncateModule
- Loading branch information
Showing
18 changed files
with
115 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export { PipeModule } from './pipe.module'; | ||
export { SearchHighlightPipe } from './search-highlight/search-highlight.pipe'; | ||
export { SortArrayPipe } from './sort-array/sort-array.pipe'; | ||
export { TruncatePipe } from './truncate/truncate.pipe'; | ||
|
||
export * from './search-highlight/index'; | ||
export * from './sort-array/index'; | ||
export * from './truncate/index'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,39 @@ | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { SearchHighlightPipeModule } from './search-highlight/search-highlight.pipe.module'; | ||
import { SearchHighlightPipe } from './search-highlight/search-highlight.pipe'; | ||
import { SortArrayPipeModule } from './sort-array/sort-array.pipe.module'; | ||
import { SortArrayPipe } from './sort-array/sort-array.pipe'; | ||
import { TruncatePipeModule } from './truncate/truncate.pipe.module'; | ||
import { TruncatePipe } from './truncate/truncate.pipe'; | ||
|
||
export { | ||
SearchHighlightPipe, | ||
SortArrayPipe, | ||
TruncatePipe | ||
}; | ||
|
||
/** | ||
* A module containing objects associated with pipes | ||
* | ||
* @deprecated Use individual module imports | ||
* | ||
* import { | ||
* SearchHighlightModule, | ||
* SortArrayModule, | ||
* TruncateModule | ||
* } from 'patternfly-ng/pipe'; | ||
*/ | ||
@NgModule({ | ||
declarations: [ | ||
SearchHighlightPipe, | ||
SortArrayPipe, | ||
TruncatePipe | ||
], | ||
exports: [ | ||
SearchHighlightPipe, | ||
SortArrayPipe, | ||
TruncatePipe | ||
imports: [ | ||
SearchHighlightPipeModule, | ||
SortArrayPipeModule, | ||
TruncatePipeModule | ||
] | ||
}) | ||
export class PipeModule { } | ||
export class PipeModule { | ||
constructor() { | ||
console.log('patternfly-ng: PipeModule is deprecated; use SearchHighlightModule, ' + | ||
'SortArrayModule, or TruncateModule'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { SearchHighlightPipeModule } from './search-highlight.pipe.module'; | ||
export { SearchHighlightPipe } from './search-highlight.pipe'; |
15 changes: 15 additions & 0 deletions
15
src/app/pipe/search-highlight/search-highlight.pipe.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { SearchHighlightPipe } from './search-highlight.pipe'; | ||
|
||
/** | ||
* A module containing objects associated with the search highlight pipe | ||
*/ | ||
@NgModule({ | ||
declarations: [ | ||
SearchHighlightPipe | ||
], | ||
exports: [ | ||
SearchHighlightPipe | ||
] | ||
}) | ||
export class SearchHighlightPipeModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { SortArrayPipeModule } from './sort-array.pipe.module'; | ||
export { SortArrayPipe } from './sort-array.pipe'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { SortArrayPipe } from './sort-array.pipe'; | ||
|
||
/** | ||
* A module containing objects associated with the sort array pipe | ||
*/ | ||
@NgModule({ | ||
declarations: [ | ||
SortArrayPipe | ||
], | ||
exports: [ | ||
SortArrayPipe | ||
] | ||
}) | ||
export class SortArrayPipeModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { TruncatePipeModule } from './truncate.pipe.module'; | ||
export { TruncatePipe } from './truncate.pipe'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { TruncatePipe } from './truncate.pipe'; | ||
|
||
/** | ||
* A module containing objects associated with the truncate pipe | ||
*/ | ||
@NgModule({ | ||
declarations: [ | ||
TruncatePipe | ||
], | ||
exports: [ | ||
TruncatePipe | ||
] | ||
}) | ||
export class TruncatePipeModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters