Skip to content

Commit

Permalink
feat(ng2-search-filter): bring up to date with angular and standalone
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Hall <[email protected]>
  • Loading branch information
Jordan-Hall committed Mar 19, 2024
1 parent 4f0a95c commit fb16dec
Show file tree
Hide file tree
Showing 20 changed files with 7 additions and 4,971 deletions.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion angular-pkgs/ng2-search-filter/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './lib/ng2-search-filter/ng2-search-filter.component';
export * from './lib/ng2-filter.module';
export * from './lib/ng2-filter.pipe';
14 changes: 0 additions & 14 deletions angular-pkgs/ng2-search-filter/src/lib/.editorconfig

This file was deleted.

31 changes: 0 additions & 31 deletions angular-pkgs/ng2-search-filter/src/lib/.gitignore

This file was deleted.

19 changes: 0 additions & 19 deletions angular-pkgs/ng2-search-filter/src/lib/.npmignore

This file was deleted.

21 changes: 0 additions & 21 deletions angular-pkgs/ng2-search-filter/src/lib/SYSTEMJS.md

This file was deleted.

17 changes: 0 additions & 17 deletions angular-pkgs/ng2-search-filter/src/lib/index.metadata.json

This file was deleted.

2 changes: 0 additions & 2 deletions angular-pkgs/ng2-search-filter/src/lib/index.ts

This file was deleted.

55 changes: 0 additions & 55 deletions angular-pkgs/ng2-search-filter/src/lib/karma-test-shim.js

This file was deleted.

51 changes: 0 additions & 51 deletions angular-pkgs/ng2-search-filter/src/lib/karma.conf.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { Ng2SearchPipe } from './ng2-filter.pipe';

@NgModule({
declarations: [Ng2SearchPipe],
imports: [Ng2SearchPipe],
exports: [Ng2SearchPipe]
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Pipe, PipeTransform, Injectable } from "@angular/core";

@Pipe({
name: 'filter',
pure: false
pure: false,
standalone: true,
})
@Injectable()
export class Ng2SearchPipe implements PipeTransform {
Expand All @@ -12,7 +13,7 @@ export class Ng2SearchPipe implements PipeTransform {
* @param term term's search
* @param excludes array of strings which will ignored during search
*/
transform(items: any, term: string, excludes: any = []): any {
transform(items: any, term: string | null | undefined, excludes: any = []): any {
if (!term || !items) return items;

return Ng2SearchPipe.filter(items, term, excludes);
Expand All @@ -30,7 +31,7 @@ export class Ng2SearchPipe implements PipeTransform {
const toCompare = term.toLowerCase();

function checkInside(item: any, term: string) {

if (typeof item === "string" && item.toString().toLowerCase().includes(toCompare)) {
return true;
}
Expand Down
82 changes: 0 additions & 82 deletions angular-pkgs/ng2-search-filter/src/lib/package.json

This file was deleted.

2 changes: 0 additions & 2 deletions angular-pkgs/ng2-search-filter/src/lib/public_api.ts

This file was deleted.

29 changes: 0 additions & 29 deletions angular-pkgs/ng2-search-filter/src/lib/tsconfig.json

This file was deleted.

Loading

0 comments on commit fb16dec

Please sign in to comment.