ngx-obelisco-example
Version:
Componentes funcionales y reutilizables para Angular.
57 lines (51 loc) • 2.91 kB
JavaScript
import * as i0 from '@angular/core';
import { Pipe } from '@angular/core';
class DayMonthFormatPipe {
transform(value) {
const locateDateString = value.toLocaleDateString('es', { weekday: 'short' });
const dateCapitalized = locateDateString.charAt(0).toUpperCase() + locateDateString.slice(1);
return `${dateCapitalized} ${value.getDate()}/${value.getMonth() + 1}`;
}
}
DayMonthFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DayMonthFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
DayMonthFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DayMonthFormatPipe, isStandalone: true, name: "dayMonthFormat" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DayMonthFormatPipe, decorators: [{
type: Pipe,
args: [{
name: 'dayMonthFormat',
standalone: true
}]
}] });
class HoursFormatPipe {
transform(value) {
return value.map((e, index) => (value.length - 1 === index ? ` ${e} hs` : `${e} |`)).join(' ');
}
}
HoursFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HoursFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
HoursFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: HoursFormatPipe, isStandalone: true, name: "hoursFormat" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HoursFormatPipe, decorators: [{
type: Pipe,
args: [{
name: 'hoursFormat',
standalone: true
}]
}] });
class NumberDayMonthFormatPipe {
transform(value) {
return value.toLocaleDateString('es', { day: 'numeric', month: 'long' });
}
}
NumberDayMonthFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NumberDayMonthFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
NumberDayMonthFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NumberDayMonthFormatPipe, isStandalone: true, name: "numberDayMonthFormatPipe" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NumberDayMonthFormatPipe, decorators: [{
type: Pipe,
args: [{
name: 'numberDayMonthFormatPipe',
standalone: true
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { DayMonthFormatPipe, HoursFormatPipe, NumberDayMonthFormatPipe };
//# sourceMappingURL=ngx-obelisco-example-pipes.mjs.map