make pipes standalone

This commit is contained in:
Dan Percic 2022-07-28 11:39:44 +03:00
parent 8829491cb4
commit 4844b6998b
7 changed files with 14 additions and 9 deletions

View File

@ -4,7 +4,7 @@ import { MatIconModule } from '@angular/material/icon';
import { TranslateModule } from '@ngx-translate/core';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { SortByPipe } from './sorting';
import { CapitalizePipe, CommonUiOptions, HumanizePipe, IqserAppConfig, ModuleWithOptions } from './utils';
import { CommonUiOptions, IqserAppConfig, ModuleWithOptions } from './utils';
import {
HiddenActionComponent,
LogoComponent,
@ -32,7 +32,6 @@ import { DragDropFileUploadDirective } from './upload-file/drag-drop-file-upload
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { ConfirmationDialogComponent } from './dialog';
import { MatTooltipModule } from '@angular/material/tooltip';
import { HumanizeCamelCasePipe } from './utils/pipes/humanize-camel-case.pipe';
import { ApiPathInterceptor, IqserConfigService, IqserUserPreferenceService } from './services';
import { DefaultUserPreferenceService } from './services/default-user-preference.service';
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
@ -73,7 +72,7 @@ const components = [
DragDropFileUploadDirective,
];
const pipes = [SortByPipe, HumanizePipe, CapitalizePipe, HumanizeCamelCasePipe];
const pipes = [SortByPipe];
@NgModule({
declarations: [...components, ...pipes],

View File

@ -1 +1,4 @@
export * from './log.pipe';
export * from './pipes/log.pipe';
export * from './pipes/humanize-camel-case.pipe';
export * from './pipes/capitalize.pipe';
export * from './pipes/humanize.pipe';

View File

@ -1,8 +1,9 @@
import { Pipe, PipeTransform } from '@angular/core';
import { capitalize } from '../functions';
import { capitalize } from '../../utils';
@Pipe({
name: 'capitalize',
standalone: true,
})
export class CapitalizePipe implements PipeTransform {
transform(value: string): string {

View File

@ -1,8 +1,9 @@
import { Pipe, PipeTransform } from '@angular/core';
import { humanizeCamelCase } from '../functions';
import { humanizeCamelCase } from '../../utils';
@Pipe({
name: 'humanizeCamelCase',
standalone: true,
})
export class HumanizeCamelCasePipe implements PipeTransform {
transform(item: string): string {

View File

@ -1,8 +1,9 @@
import { Pipe, PipeTransform } from '@angular/core';
import { humanize } from '../functions';
import { humanize } from '../../utils';
@Pipe({
name: 'humanize',
standalone: true,
})
export class HumanizePipe implements PipeTransform {
transform(item: string, lowercase = false): string {

View File

@ -1,8 +1,8 @@
export * from './functions';
export * from './operators';
export * from './auto-unsubscribe.directive';
export * from './pipes/humanize.pipe';
export * from './pipes/capitalize.pipe';
export * from '../standalone/pipes/humanize.pipe';
export * from '../standalone/pipes/capitalize.pipe';
export * from './types/events.type';
export * from './types/utility-types';
export * from './types/tooltip-positions.type';