ngx-st-date-format 15.0.14 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{esm2020 → esm2022}/lib/ngx-st-date-format.module.mjs +19 -19
- package/esm2022/lib/pipes/date-format.pipe.mjs +27 -0
- package/esm2022/lib/pipes/date-time-format.pipe.mjs +27 -0
- package/esm2022/lib/pipes/time-format.pipe.mjs +33 -0
- package/{esm2020 → esm2022}/ngx-st-date-format.mjs +4 -4
- package/{esm2020 → esm2022}/public-api.mjs +7 -7
- package/{fesm2015 → fesm2022}/ngx-st-date-format.mjs +94 -94
- package/{fesm2015 → fesm2022}/ngx-st-date-format.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/ngx-st-date-format.module.d.ts +9 -9
- package/lib/pipes/date-format.pipe.d.ts +8 -8
- package/lib/pipes/date-time-format.pipe.d.ts +8 -8
- package/lib/pipes/time-format.pipe.d.ts +8 -8
- package/package.json +7 -13
- package/public-api.d.ts +4 -4
- package/esm2020/lib/pipes/date-format.pipe.mjs +0 -27
- package/esm2020/lib/pipes/date-time-format.pipe.mjs +0 -27
- package/esm2020/lib/pipes/time-format.pipe.mjs +0 -33
- package/fesm2020/ngx-st-date-format.mjs +0 -108
- package/fesm2020/ngx-st-date-format.mjs.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { DateFormatPipe } from './pipes/date-format.pipe';
|
|
3
|
-
import { DateTimeFormatPipe } from './pipes/date-time-format.pipe';
|
|
4
|
-
import { TimeFormatPipe } from './pipes/time-format.pipe';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export class StDateFormatModule {
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12
|
-
type: NgModule,
|
|
13
|
-
args: [{
|
|
14
|
-
declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
15
|
-
imports: [],
|
|
16
|
-
exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
17
|
-
}]
|
|
18
|
-
}] });
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { DateFormatPipe } from './pipes/date-format.pipe';
|
|
3
|
+
import { DateTimeFormatPipe } from './pipes/date-time-format.pipe';
|
|
4
|
+
import { TimeFormatPipe } from './pipes/time-format.pipe';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export class StDateFormatModule {
|
|
7
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StDateFormatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
8
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: StDateFormatModule, declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe], exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe] }); }
|
|
9
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StDateFormatModule }); }
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StDateFormatModule, decorators: [{
|
|
12
|
+
type: NgModule,
|
|
13
|
+
args: [{
|
|
14
|
+
declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
15
|
+
imports: [],
|
|
16
|
+
exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
17
|
+
}]
|
|
18
|
+
}] });
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXN0LWRhdGUtZm9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GltZS1mb3JtYXQucGlwZSc7XHJcbmltcG9ydCB7IFRpbWVGb3JtYXRQaXBlIH0gZnJvbSAnLi9waXBlcy90aW1lLWZvcm1hdC5waXBlJztcclxuXHJcbkBOZ01vZHVsZSh7XHJcbiAgZGVjbGFyYXRpb25zOiBbRGF0ZUZvcm1hdFBpcGUsIERhdGVUaW1lRm9ybWF0UGlwZSwgVGltZUZvcm1hdFBpcGVdLFxyXG4gIGltcG9ydHM6IFtdLFxyXG4gIGV4cG9ydHM6IFtEYXRlRm9ybWF0UGlwZSwgRGF0ZVRpbWVGb3JtYXRQaXBlLCBUaW1lRm9ybWF0UGlwZV0sXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBTdERhdGVGb3JtYXRNb2R1bGUge31cclxuIl19
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Pipe } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class DateFormatPipe {
|
|
4
|
+
constructor() { }
|
|
5
|
+
transform(value) {
|
|
6
|
+
if (value) {
|
|
7
|
+
if (value instanceof Date) {
|
|
8
|
+
return value.toLocaleDateString();
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return new Date(value).toLocaleDateString();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
19
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DateFormatPipe, name: "stDateFormatPipe" }); }
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateFormatPipe, decorators: [{
|
|
22
|
+
type: Pip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6ICdzdERhdGVGb3JtYXRQaXBlJyxcclxufSlcclxuZXhwb3J0IGNsYXNzIERhdGVGb3JtYXRQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XHJcbiAgY29uc3RydWN0b3IoKSB7fVxyXG5cclxuICB0cmFuc2Zvcm0odmFsdWU6IHN0cmluZyB8IERhdGUgfCB1bmRlZmluZWQpOiBzdHJpbmcge1xyXG4gICAgaWYgKHZhbHVlKSB7XHJcbiAgICAgIGlmICh2YWx1ZSBpbnN0YW5jZW9mIERhdGUpIHtcclxuICAgICAgICByZXR1cm4gdmFsdWUudG9Mb2NhbGVEYXRlU3RyaW5nKCk7XHJcbiAgICAgIH1cclxuICAgICAgZWxzZSB7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBEYXRlKHZhbHVlKS50b0xvY2FsZURhdGVTdHJpbmcoKTtcclxuICAgICAgfVxyXG4gICAgfVxyXG4gICAgZWxzZSB7XHJcbiAgICAgIHJldHVybiAnJztcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Pipe } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class DateTimeFormatPipe {
|
|
4
|
+
constructor() { }
|
|
5
|
+
transform(value) {
|
|
6
|
+
if (value) {
|
|
7
|
+
if (value instanceof Date) {
|
|
8
|
+
return value.toLocaleString();
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return new Date(value).toLocaleString();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateTimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
19
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DateTimeFormatPipe, name: "stDateTimeFormatPipe" }); }
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateTimeFormatPipe, decorators: [{
|
|
22
|
+
type: Pipe,
|
|
23
|
+
args: [{
|
|
24
|
+
name: 'stDateTimeFormatPipe',
|
|
25
|
+
}]
|
|
26
|
+
}], ctorParameters: () => [] });
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS10aW1lLWZvcm1hdC5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXN0LWRhdGUtZm9ybWF0L3NyYy9saWIvcGlwZXMvZGF0ZS10aW1lLWZvcm1hdC5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxJQUFJLEVBQWdCLE1BQU0sZUFBZSxDQUFDOztBQUtsRCxNQUFNLE9BQU8sa0JBQWtCO0lBQzdCLGdCQUFlLENBQUM7SUFFaEIsU0FBUyxDQUFDLEtBQWdDO1FBQ3hDLElBQUksS0FBSyxFQUFFLENBQUM7WUFDVixJQUFJLEtBQUssWUFBWSxJQUFJLEVBQUUsQ0FBQztnQkFDMUIsT0FBTyxLQUFLLENBQUMsY0FBYyxFQUFFLENBQUM7WUFDaEMsQ0FBQztpQkFBTSxDQUFDO2dCQUNOLE9BQU8sSUFBSSxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsY0FBYyxFQUFFLENBQUM7WUFDMUMsQ0FBQztRQUNILENBQUM7YUFBTSxDQUFDO1lBQ04sT0FBTyxFQUFFLENBQUM7UUFDWixDQUFDO0lBQ0gsQ0FBQzsrR0FiVSxrQkFBa0I7NkdBQWxCLGtCQUFrQjs7NEZBQWxCLGtCQUFrQjtrQkFIOUIsSUFBSTttQkFBQztvQkFDSixJQUFJLEVBQUUsc0JBQXNCO2lCQUM3QiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7UGlwZSwgUGlwZVRyYW5zZm9ybX0gZnJvbSBcIkBhbmd1bGFyL2NvcmVcIjtcclxuXHJcbkBQaXBlKHtcclxuICBuYW1lOiAnc3REYXRlVGltZUZvcm1hdFBpcGUnLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgRGF0ZVRpbWVGb3JtYXRQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XHJcbiAgY29uc3RydWN0b3IoKSB7fVxyXG5cclxuICB0cmFuc2Zvcm0odmFsdWU6IHN0cmluZyB8IERhdGUgfCB1bmRlZmluZWQpOiBzdHJpbmcge1xyXG4gICAgaWYgKHZhbHVlKSB7XHJcbiAgICAgIGlmICh2YWx1ZSBpbnN0YW5jZW9mIERhdGUpIHtcclxuICAgICAgICByZXR1cm4gdmFsdWUudG9Mb2NhbGVTdHJpbmcoKTtcclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICByZXR1cm4gbmV3IERhdGUodmFsdWUpLnRvTG9jYWxlU3RyaW5nKCk7XHJcbiAgICAgIH1cclxuICAgIH0gZWxzZSB7XHJcbiAgICAgIHJldHVybiAnJztcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Pipe } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class TimeFormatPipe {
|
|
4
|
+
constructor() { }
|
|
5
|
+
transform(value) {
|
|
6
|
+
if (value) {
|
|
7
|
+
if (value instanceof Date) {
|
|
8
|
+
return value.toLocaleTimeString([], {
|
|
9
|
+
hour: '2-digit',
|
|
10
|
+
minute: '2-digit',
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return new Date(value).toLocaleTimeString([], {
|
|
15
|
+
hour: '2-digit',
|
|
16
|
+
minute: '2-digit',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return '';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
25
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: TimeFormatPipe, name: "stTimeFormatPipe" }); }
|
|
26
|
+
}
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TimeFormatPipe, decorators: [{
|
|
28
|
+
type: Pipe,
|
|
29
|
+
args: [{
|
|
30
|
+
name: 'stTimeFormatPipe',
|
|
31
|
+
}]
|
|
32
|
+
}], ctorParameters: () => [] });
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS1mb3JtYXQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zdC1kYXRlLWZvcm1hdC9zcmMvbGliL3BpcGVzL3RpbWUtZm9ybWF0LnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLElBQUksRUFBZ0IsTUFBTSxlQUFlLENBQUM7O0FBS2xELE1BQU0sT0FBTyxjQUFjO0lBQ3pCLGdCQUFlLENBQUM7SUFFaEIsU0FBUyxDQUFDLEtBQWdDO1FBQ3hDLElBQUksS0FBSyxFQUFFLENBQUM7WUFDVixJQUFJLEtBQUssWUFBWSxJQUFJLEVBQUUsQ0FBQztnQkFDMUIsT0FBTyxLQUFLLENBQUMsa0JBQWtCLENBQUMsRUFBRSxFQUFFO29CQUNsQyxJQUFJL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fVxyXG4gICAgICBlbHNlIHtcclxuICAgICAgICByZXR1cm4gbmV3IERhdGUodmFsdWUpLnRvTG9jYWxlVGltZVN0cmluZyhbXSwge1xyXG4gICAgICAgICAgaG91cjogJzItZGlnaXQnLFxyXG4gICAgICAgICAgbWludXRlOiAnMi1kaWdpdCcsXHJcbiAgICAgICAgfSk7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIGVsc2Uge1xyXG4gICAgICByZXR1cm4gJyc7XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
5
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXN0LWRhdGUtZm9ybWF0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvbmd4LXN0LWRhdGUtZm9ybWF0L3NyYy9uZ3gtc3QtZGF0ZS1mb3JtYXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of ngx-st-date-format
|
|
3
|
-
*/
|
|
4
|
-
export * from './lib/pipes/date-format.pipe';
|
|
5
|
-
export * from './lib/pipes/date-time-format.pipe';
|
|
6
|
-
export * from './lib/pipes/time-format.pipe';
|
|
7
|
-
export * from './lib/ngx-st-date-format.module';
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of ngx-st-date-format
|
|
3
|
+
*/
|
|
4
|
+
export * from './lib/pipes/date-format.pipe';
|
|
5
|
+
export * from './lib/pipes/date-time-format.pipe';
|
|
6
|
+
export * from './lib/pipes/time-format.pipe';
|
|
7
|
+
export * from './lib/ngx-st-date-format.module';
|
|
8
8
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1zdC1kYXRlLWZvcm1hdC9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyxtQ0FBbUMsQ0FBQztBQUNsRCxjQUFjLDhCQUE4QixDQUFDO0FBQzdDLGNBQWMsaUNBQWlDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbmd4LXN0LWRhdGUtZm9ybWF0XHJcbiAqL1xyXG5cclxuZXhwb3J0ICogZnJvbSAnLi9saWIvcGlwZXMvZGF0ZS1mb3JtYXQucGlwZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL2RhdGUtdGltZS1mb3JtYXQucGlwZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL3RpbWUtZm9ybWF0LnBpcGUnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtc3QtZGF0ZS1mb3JtYXQubW9kdWxlJztcclxuIl19
|
|
@@ -1,107 +1,107 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Pipe, NgModule } from '@angular/core';
|
|
3
3
|
|
|
4
|
-
class DateFormatPipe {
|
|
5
|
-
constructor() { }
|
|
6
|
-
transform(value) {
|
|
7
|
-
if (value) {
|
|
8
|
-
if (value instanceof Date) {
|
|
9
|
-
return value.toLocaleDateString();
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return new Date(value).toLocaleDateString();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
return '';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
23
|
-
type: Pipe,
|
|
24
|
-
args: [{
|
|
25
|
-
name: 'stDateFormatPipe',
|
|
26
|
-
}]
|
|
27
|
-
}], ctorParameters:
|
|
4
|
+
class DateFormatPipe {
|
|
5
|
+
constructor() { }
|
|
6
|
+
transform(value) {
|
|
7
|
+
if (value) {
|
|
8
|
+
if (value instanceof Date) {
|
|
9
|
+
return value.toLocaleDateString();
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return new Date(value).toLocaleDateString();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
20
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DateFormatPipe, name: "stDateFormatPipe" }); }
|
|
21
|
+
}
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateFormatPipe, decorators: [{
|
|
23
|
+
type: Pipe,
|
|
24
|
+
args: [{
|
|
25
|
+
name: 'stDateFormatPipe',
|
|
26
|
+
}]
|
|
27
|
+
}], ctorParameters: () => [] });
|
|
28
28
|
|
|
29
|
-
class DateTimeFormatPipe {
|
|
30
|
-
constructor() { }
|
|
31
|
-
transform(value) {
|
|
32
|
-
if (value) {
|
|
33
|
-
if (value instanceof Date) {
|
|
34
|
-
return value.toLocaleString();
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return new Date(value).toLocaleString();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
return '';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
48
|
-
type: Pipe,
|
|
49
|
-
args: [{
|
|
50
|
-
name: 'stDateTimeFormatPipe',
|
|
51
|
-
}]
|
|
52
|
-
}], ctorParameters:
|
|
29
|
+
class DateTimeFormatPipe {
|
|
30
|
+
constructor() { }
|
|
31
|
+
transform(value) {
|
|
32
|
+
if (value) {
|
|
33
|
+
if (value instanceof Date) {
|
|
34
|
+
return value.toLocaleString();
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return new Date(value).toLocaleString();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return '';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateTimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
45
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DateTimeFormatPipe, name: "stDateTimeFormatPipe" }); }
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateTimeFormatPipe, decorators: [{
|
|
48
|
+
type: Pipe,
|
|
49
|
+
args: [{
|
|
50
|
+
name: 'stDateTimeFormatPipe',
|
|
51
|
+
}]
|
|
52
|
+
}], ctorParameters: () => [] });
|
|
53
53
|
|
|
54
|
-
class TimeFormatPipe {
|
|
55
|
-
constructor() { }
|
|
56
|
-
transform(value) {
|
|
57
|
-
if (value) {
|
|
58
|
-
if (value instanceof Date) {
|
|
59
|
-
return value.toLocaleTimeString([], {
|
|
60
|
-
hour: '2-digit',
|
|
61
|
-
minute: '2-digit',
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
return new Date(value).toLocaleTimeString([], {
|
|
66
|
-
hour: '2-digit',
|
|
67
|
-
minute: '2-digit',
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
return '';
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
79
|
-
type: Pipe,
|
|
80
|
-
args: [{
|
|
81
|
-
name: 'stTimeFormatPipe',
|
|
82
|
-
}]
|
|
83
|
-
}], ctorParameters:
|
|
54
|
+
class TimeFormatPipe {
|
|
55
|
+
constructor() { }
|
|
56
|
+
transform(value) {
|
|
57
|
+
if (value) {
|
|
58
|
+
if (value instanceof Date) {
|
|
59
|
+
return value.toLocaleTimeString([], {
|
|
60
|
+
hour: '2-digit',
|
|
61
|
+
minute: '2-digit',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return new Date(value).toLocaleTimeString([], {
|
|
66
|
+
hour: '2-digit',
|
|
67
|
+
minute: '2-digit',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return '';
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
76
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: TimeFormatPipe, name: "stTimeFormatPipe" }); }
|
|
77
|
+
}
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TimeFormatPipe, decorators: [{
|
|
79
|
+
type: Pipe,
|
|
80
|
+
args: [{
|
|
81
|
+
name: 'stTimeFormatPipe',
|
|
82
|
+
}]
|
|
83
|
+
}], ctorParameters: () => [] });
|
|
84
84
|
|
|
85
|
-
class StDateFormatModule {
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
91
|
-
type: NgModule,
|
|
92
|
-
args: [{
|
|
93
|
-
declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
94
|
-
imports: [],
|
|
95
|
-
exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
96
|
-
}]
|
|
85
|
+
class StDateFormatModule {
|
|
86
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StDateFormatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
87
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: StDateFormatModule, declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe], exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe] }); }
|
|
88
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StDateFormatModule }); }
|
|
89
|
+
}
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StDateFormatModule, decorators: [{
|
|
91
|
+
type: NgModule,
|
|
92
|
+
args: [{
|
|
93
|
+
declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
94
|
+
imports: [],
|
|
95
|
+
exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
96
|
+
}]
|
|
97
97
|
}] });
|
|
98
98
|
|
|
99
|
-
/*
|
|
100
|
-
* Public API Surface of ngx-st-date-format
|
|
99
|
+
/*
|
|
100
|
+
* Public API Surface of ngx-st-date-format
|
|
101
101
|
*/
|
|
102
102
|
|
|
103
|
-
/**
|
|
104
|
-
* Generated bundle index. Do not edit.
|
|
103
|
+
/**
|
|
104
|
+
* Generated bundle index. Do not edit.
|
|
105
105
|
*/
|
|
106
106
|
|
|
107
107
|
export { DateFormatPipe, DateTimeFormatPipe, StDateFormatModule, TimeFormatPipe };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-st-date-format.mjs","sources":["../../../projects/ngx-st-date-format/src/lib/pipes/date-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/date-time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/ngx-st-date-format.module.ts","../../../projects/ngx-st-date-format/src/public-api.ts","../../../projects/ngx-st-date-format/src/ngx-st-date-format.ts"],"sourcesContent":["import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stDateFormatPipe',\r\n})\r\nexport class DateFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleDateString();\r\n }\r\n else {\r\n return new Date(value).toLocaleDateString();\r\n }\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stDateTimeFormatPipe',\r\n})\r\nexport class DateTimeFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleString();\r\n } else {\r\n return new Date(value).toLocaleString();\r\n }\r\n } else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stTimeFormatPipe',\r\n})\r\nexport class TimeFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleTimeString([], {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n });\r\n }\r\n else {\r\n return new Date(value).toLocaleTimeString([], {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n });\r\n }\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { DateFormatPipe } from './pipes/date-format.pipe';\r\nimport { DateTimeFormatPipe } from './pipes/date-time-format.pipe';\r\nimport { TimeFormatPipe } from './pipes/time-format.pipe';\r\n\r\n@NgModule({\r\n declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],\r\n imports: [],\r\n exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],\r\n})\r\nexport class StDateFormatModule {}\r\n","/*\r\n * Public API Surface of ngx-st-date-format\r\n */\r\n\r\nexport * from './lib/pipes/date-format.pipe';\r\nexport * from './lib/pipes/date-time-format.pipe';\r\nexport * from './lib/pipes/time-format.pipe';\r\nexport * from './lib/ngx-st-date-format.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,cAAc,CAAA;AACzB,IAAA,WAAA,GAAA
|
|
1
|
+
{"version":3,"file":"ngx-st-date-format.mjs","sources":["../../../projects/ngx-st-date-format/src/lib/pipes/date-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/date-time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/ngx-st-date-format.module.ts","../../../projects/ngx-st-date-format/src/public-api.ts","../../../projects/ngx-st-date-format/src/ngx-st-date-format.ts"],"sourcesContent":["import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stDateFormatPipe',\r\n})\r\nexport class DateFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleDateString();\r\n }\r\n else {\r\n return new Date(value).toLocaleDateString();\r\n }\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stDateTimeFormatPipe',\r\n})\r\nexport class DateTimeFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleString();\r\n } else {\r\n return new Date(value).toLocaleString();\r\n }\r\n } else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stTimeFormatPipe',\r\n})\r\nexport class TimeFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleTimeString([], {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n });\r\n }\r\n else {\r\n return new Date(value).toLocaleTimeString([], {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n });\r\n }\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { DateFormatPipe } from './pipes/date-format.pipe';\r\nimport { DateTimeFormatPipe } from './pipes/date-time-format.pipe';\r\nimport { TimeFormatPipe } from './pipes/time-format.pipe';\r\n\r\n@NgModule({\r\n declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],\r\n imports: [],\r\n exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],\r\n})\r\nexport class StDateFormatModule {}\r\n","/*\r\n * Public API Surface of ngx-st-date-format\r\n */\r\n\r\nexport * from './lib/pipes/date-format.pipe';\r\nexport * from './lib/pipes/date-time-format.pipe';\r\nexport * from './lib/pipes/time-format.pipe';\r\nexport * from './lib/ngx-st-date-format.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,cAAc,CAAA;AACzB,IAAA,WAAA,GAAA;AAEA,IAAA,SAAS,CAAC,KAAgC,EAAA;QACxC,IAAI,KAAK,EAAE;AACT,YAAA,IAAI,KAAK,YAAY,IAAI,EAAE;AACzB,gBAAA,OAAO,KAAK,CAAC,kBAAkB,EAAE;;iBAE9B;gBACH,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,kBAAkB,EAAE;;;aAG1C;AACH,YAAA,OAAO,EAAE;;;+GAbF,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAd,cAAc,EAAA,IAAA,EAAA,kBAAA,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,kBAAkB;AACzB,iBAAA;;;MCCY,kBAAkB,CAAA;AAC7B,IAAA,WAAA,GAAA;AAEA,IAAA,SAAS,CAAC,KAAgC,EAAA;QACxC,IAAI,KAAK,EAAE;AACT,YAAA,IAAI,KAAK,YAAY,IAAI,EAAE;AACzB,gBAAA,OAAO,KAAK,CAAC,cAAc,EAAE;;iBACxB;gBACL,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC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AA,QAAA,EAAA,CAAA,CAAA;gHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAJd,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAEvD,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;gHAEjD,kBAAkB,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAC;AAClE,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAC;AAC9D,iBAAA;;;ACTD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
/// <amd-module name="ngx-st-date-format" />
|
|
5
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="ngx-st-date-format" />
|
|
5
|
+
export * from './public-api';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./pipes/date-format.pipe";
|
|
3
|
-
import * as i2 from "./pipes/date-time-format.pipe";
|
|
4
|
-
import * as i3 from "./pipes/time-format.pipe";
|
|
5
|
-
export declare class StDateFormatModule {
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StDateFormatModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<StDateFormatModule, [typeof i1.DateFormatPipe, typeof i2.DateTimeFormatPipe, typeof i3.TimeFormatPipe], never, [typeof i1.DateFormatPipe, typeof i2.DateTimeFormatPipe, typeof i3.TimeFormatPipe]>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<StDateFormatModule>;
|
|
9
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./pipes/date-format.pipe";
|
|
3
|
+
import * as i2 from "./pipes/date-time-format.pipe";
|
|
4
|
+
import * as i3 from "./pipes/time-format.pipe";
|
|
5
|
+
export declare class StDateFormatModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StDateFormatModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StDateFormatModule, [typeof i1.DateFormatPipe, typeof i2.DateTimeFormatPipe, typeof i3.TimeFormatPipe], never, [typeof i1.DateFormatPipe, typeof i2.DateTimeFormatPipe, typeof i3.TimeFormatPipe]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<StDateFormatModule>;
|
|
9
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PipeTransform } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class DateFormatPipe implements PipeTransform {
|
|
4
|
-
constructor();
|
|
5
|
-
transform(value: string | Date | undefined): string;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateFormatPipe, never>;
|
|
7
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<DateFormatPipe, "stDateFormatPipe", false>;
|
|
8
|
-
}
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DateFormatPipe implements PipeTransform {
|
|
4
|
+
constructor();
|
|
5
|
+
transform(value: string | Date | undefined): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateFormatPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DateFormatPipe, "stDateFormatPipe", false>;
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PipeTransform } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class DateTimeFormatPipe implements PipeTransform {
|
|
4
|
-
constructor();
|
|
5
|
-
transform(value: string | Date | undefined): string;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeFormatPipe, never>;
|
|
7
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<DateTimeFormatPipe, "stDateTimeFormatPipe", false>;
|
|
8
|
-
}
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DateTimeFormatPipe implements PipeTransform {
|
|
4
|
+
constructor();
|
|
5
|
+
transform(value: string | Date | undefined): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeFormatPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DateTimeFormatPipe, "stDateTimeFormatPipe", false>;
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PipeTransform } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TimeFormatPipe implements PipeTransform {
|
|
4
|
-
constructor();
|
|
5
|
-
transform(value: string | Date | undefined): string;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TimeFormatPipe, never>;
|
|
7
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TimeFormatPipe, "stTimeFormatPipe", false>;
|
|
8
|
-
}
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TimeFormatPipe implements PipeTransform {
|
|
4
|
+
constructor();
|
|
5
|
+
transform(value: string | Date | undefined): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimeFormatPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TimeFormatPipe, "stTimeFormatPipe", false>;
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-st-date-format",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^17.3.12",
|
|
6
|
+
"@angular/core": "^17.3.12"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"tslib": "^2.3.0"
|
|
10
10
|
},
|
|
11
|
-
"module": "
|
|
12
|
-
"es2020": "fesm2020/ngx-st-date-format.mjs",
|
|
13
|
-
"esm2020": "esm2020/ngx-st-date-format.mjs",
|
|
14
|
-
"fesm2020": "fesm2020/ngx-st-date-format.mjs",
|
|
15
|
-
"fesm2015": "fesm2015/ngx-st-date-format.mjs",
|
|
11
|
+
"module": "fesm2022/ngx-st-date-format.mjs",
|
|
16
12
|
"typings": "index.d.ts",
|
|
17
13
|
"exports": {
|
|
18
14
|
"./package.json": {
|
|
@@ -20,11 +16,9 @@
|
|
|
20
16
|
},
|
|
21
17
|
".": {
|
|
22
18
|
"types": "./index.d.ts",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"node": "./fesm2015/ngx-st-date-format.mjs",
|
|
27
|
-
"default": "./fesm2020/ngx-st-date-format.mjs"
|
|
19
|
+
"esm2022": "./esm2022/ngx-st-date-format.mjs",
|
|
20
|
+
"esm": "./esm2022/ngx-st-date-format.mjs",
|
|
21
|
+
"default": "./fesm2022/ngx-st-date-format.mjs"
|
|
28
22
|
}
|
|
29
23
|
},
|
|
30
24
|
"sideEffects": false
|
package/public-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './lib/pipes/date-format.pipe';
|
|
2
|
-
export * from './lib/pipes/date-time-format.pipe';
|
|
3
|
-
export * from './lib/pipes/time-format.pipe';
|
|
4
|
-
export * from './lib/ngx-st-date-format.module';
|
|
1
|
+
export * from './lib/pipes/date-format.pipe';
|
|
2
|
+
export * from './lib/pipes/date-time-format.pipe';
|
|
3
|
+
export * from './lib/pipes/time-format.pipe';
|
|
4
|
+
export * from './lib/ngx-st-date-format.module';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Pipe } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class DateFormatPipe {
|
|
4
|
-
constructor() { }
|
|
5
|
-
transform(value) {
|
|
6
|
-
if (value) {
|
|
7
|
-
if (value instanceof Date) {
|
|
8
|
-
return value.toLocaleDateString();
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
return new Date(value).toLocaleDateString();
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
return '';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
DateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
20
|
-
DateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, name: "stDateFormatPipe" });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, decorators: [{
|
|
22
|
-
type: Pipe,
|
|
23
|
-
args: [{
|
|
24
|
-
name: 'stDateFormatPipe',
|
|
25
|
-
}]
|
|
26
|
-
}], ctorParameters: function () { return []; } });
|
|
27
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1mb3JtYXQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1z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ZSkge1xyXG4gICAgICAgIHJldHVybiB2YWx1ZS50b0xvY2FsZURhdGVTdHJpbmcoKTtcclxuICAgICAgfVxyXG4gICAgICBlbHNlIHtcclxuICAgICAgICByZXR1cm4gbmV3IERhdGUodmFsdWUpLnRvTG9jYWxlRGF0ZVN0cmluZygpO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICBlbHNlIHtcclxuICAgICAgcmV0dXJuICcnO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Pipe } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class DateTimeFormatPipe {
|
|
4
|
-
constructor() { }
|
|
5
|
-
transform(value) {
|
|
6
|
-
if (value) {
|
|
7
|
-
if (value instanceof Date) {
|
|
8
|
-
return value.toLocaleString();
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
return new Date(value).toLocaleString();
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
return '';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
DateTimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
20
|
-
DateTimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, name: "stDateTimeFormatPipe" });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, decorators: [{
|
|
22
|
-
type: Pipe,
|
|
23
|
-
args: [{
|
|
24
|
-
name: 'stDateTimeFormatPipe',
|
|
25
|
-
}]
|
|
26
|
-
}], ctorParameters: function () { return []; } });
|
|
27
|
-
//# sourceMappingURL=data:application/json;base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Y3RvcigpIHt9XHJcblxyXG4gIHRyYW5zZm9ybSh2YWx1ZTogc3RyaW5nIHwgRGF0ZSB8IHVuZGVmaW5lZCk6IHN0cmluZyB7XHJcbiAgICBpZiAodmFsdWUpIHtcclxuICAgICAgaWYgKHZhbHVlIGluc3RhbmNlb2YgRGF0ZSkge1xyXG4gICAgICAgIHJldHVybiB2YWx1ZS50b0xvY2FsZVN0cmluZygpO1xyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIHJldHVybiBuZXcgRGF0ZSh2YWx1ZSkudG9Mb2NhbGVTdHJpbmcoKTtcclxuICAgICAgfVxyXG4gICAgfSBlbHNlIHtcclxuICAgICAgcmV0dXJuICcnO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Pipe } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class TimeFormatPipe {
|
|
4
|
-
constructor() { }
|
|
5
|
-
transform(value) {
|
|
6
|
-
if (value) {
|
|
7
|
-
if (value instanceof Date) {
|
|
8
|
-
return value.toLocaleTimeString([], {
|
|
9
|
-
hour: '2-digit',
|
|
10
|
-
minute: '2-digit',
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
return new Date(value).toLocaleTimeString([], {
|
|
15
|
-
hour: '2-digit',
|
|
16
|
-
minute: '2-digit',
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
return '';
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
TimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
26
|
-
TimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, name: "stTimeFormatPipe" });
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, decorators: [{
|
|
28
|
-
type: Pipe,
|
|
29
|
-
args: [{
|
|
30
|
-
name: 'stTimeFormatPipe',
|
|
31
|
-
}]
|
|
32
|
-
}], ctorParameters: function () { return []; } });
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS1mb3JtYXQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zdC1kYXRlLWZvcm1hdC9zcmMvbGliL3BpcGVzL3RpbWUtZm9ybWF0LnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLElBQUksRUFBZ0IsTUFBTSxlQUFlLENBQUM7O0FBS2xELE1BQU0sT0FBTyxjQUFjO0lBQ3pCLGdCQUFlLENBQUM7SUFFaEIsU0FBUyxDQUFDLEtBQWdDO1FBQ3hDLElBQUksS0FBSyxFQUFFO1lBQ1QsSUFBSSxLQUFLLFlBQVksSUFBSSxFQUFFO2dCQUN6QixPQUFPLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxFQUFFLEVBQUU7b0JBQ2xDLElBQUksRUFBRSxTQUFTO29CQUNmLE1BQU0sRUFBRSxTQUFTO2lCQUNsQixDQUFDLENBQUM7YUFDSjtpQkFDSTtnQkFDSCxPQUFPLElBQUksSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLGtCQUFrQixDQUFDLEVBQUUsRUFBRTtvQkFDNUMsSUFBSSxFQUFFLFNBQVM7b0JBQ2YsTUFBTSxFQUFFLFNBQVM7aUJBQ2xCLENBQUMsQ0FBQzthQUNKO1NBQ0Y7YUFDSTtZQUNILE9BQU8sRUFBRSxDQUFDO1NBQ1g7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@angular/core';
|
|
2
|
-
import { Pipe, NgModule } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
class DateFormatPipe {
|
|
5
|
-
constructor() { }
|
|
6
|
-
transform(value) {
|
|
7
|
-
if (value) {
|
|
8
|
-
if (value instanceof Date) {
|
|
9
|
-
return value.toLocaleDateString();
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return new Date(value).toLocaleDateString();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
return '';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
DateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
21
|
-
DateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, name: "stDateFormatPipe" });
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, decorators: [{
|
|
23
|
-
type: Pipe,
|
|
24
|
-
args: [{
|
|
25
|
-
name: 'stDateFormatPipe',
|
|
26
|
-
}]
|
|
27
|
-
}], ctorParameters: function () { return []; } });
|
|
28
|
-
|
|
29
|
-
class DateTimeFormatPipe {
|
|
30
|
-
constructor() { }
|
|
31
|
-
transform(value) {
|
|
32
|
-
if (value) {
|
|
33
|
-
if (value instanceof Date) {
|
|
34
|
-
return value.toLocaleString();
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return new Date(value).toLocaleString();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
return '';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
DateTimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
46
|
-
DateTimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, name: "stDateTimeFormatPipe" });
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, decorators: [{
|
|
48
|
-
type: Pipe,
|
|
49
|
-
args: [{
|
|
50
|
-
name: 'stDateTimeFormatPipe',
|
|
51
|
-
}]
|
|
52
|
-
}], ctorParameters: function () { return []; } });
|
|
53
|
-
|
|
54
|
-
class TimeFormatPipe {
|
|
55
|
-
constructor() { }
|
|
56
|
-
transform(value) {
|
|
57
|
-
if (value) {
|
|
58
|
-
if (value instanceof Date) {
|
|
59
|
-
return value.toLocaleTimeString([], {
|
|
60
|
-
hour: '2-digit',
|
|
61
|
-
minute: '2-digit',
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
return new Date(value).toLocaleTimeString([], {
|
|
66
|
-
hour: '2-digit',
|
|
67
|
-
minute: '2-digit',
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
return '';
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
TimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
77
|
-
TimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, name: "stTimeFormatPipe" });
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, decorators: [{
|
|
79
|
-
type: Pipe,
|
|
80
|
-
args: [{
|
|
81
|
-
name: 'stTimeFormatPipe',
|
|
82
|
-
}]
|
|
83
|
-
}], ctorParameters: function () { return []; } });
|
|
84
|
-
|
|
85
|
-
class StDateFormatModule {
|
|
86
|
-
}
|
|
87
|
-
StDateFormatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
88
|
-
StDateFormatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe], exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe] });
|
|
89
|
-
StDateFormatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule });
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, decorators: [{
|
|
91
|
-
type: NgModule,
|
|
92
|
-
args: [{
|
|
93
|
-
declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
94
|
-
imports: [],
|
|
95
|
-
exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
96
|
-
}]
|
|
97
|
-
}] });
|
|
98
|
-
|
|
99
|
-
/*
|
|
100
|
-
* Public API Surface of ngx-st-date-format
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Generated bundle index. Do not edit.
|
|
105
|
-
*/
|
|
106
|
-
|
|
107
|
-
export { DateFormatPipe, DateTimeFormatPipe, StDateFormatModule, TimeFormatPipe };
|
|
108
|
-
//# sourceMappingURL=ngx-st-date-format.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-st-date-format.mjs","sources":["../../../projects/ngx-st-date-format/src/lib/pipes/date-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/date-time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/ngx-st-date-format.module.ts","../../../projects/ngx-st-date-format/src/public-api.ts","../../../projects/ngx-st-date-format/src/ngx-st-date-format.ts"],"sourcesContent":["import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stDateFormatPipe',\r\n})\r\nexport class DateFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleDateString();\r\n }\r\n else {\r\n return new Date(value).toLocaleDateString();\r\n }\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stDateTimeFormatPipe',\r\n})\r\nexport class DateTimeFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleString();\r\n } else {\r\n return new Date(value).toLocaleString();\r\n }\r\n } else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stTimeFormatPipe',\r\n})\r\nexport class TimeFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleTimeString([], {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n });\r\n }\r\n else {\r\n return new Date(value).toLocaleTimeString([], {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n });\r\n }\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { DateFormatPipe } from './pipes/date-format.pipe';\r\nimport { DateTimeFormatPipe } from './pipes/date-time-format.pipe';\r\nimport { TimeFormatPipe } from './pipes/time-format.pipe';\r\n\r\n@NgModule({\r\n declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],\r\n imports: [],\r\n exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],\r\n})\r\nexport class StDateFormatModule {}\r\n","/*\r\n * Public API Surface of ngx-st-date-format\r\n */\r\n\r\nexport * from './lib/pipes/date-format.pipe';\r\nexport * from './lib/pipes/date-time-format.pipe';\r\nexport * from './lib/pipes/time-format.pipe';\r\nexport * from './lib/ngx-st-date-format.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,cAAc,CAAA;AACzB,IAAA,WAAA,GAAA,GAAgB;AAEhB,IAAA,SAAS,CAAC,KAAgC,EAAA;AACxC,QAAA,IAAI,KAAK,EAAE;YACT,IAAI,KAAK,YAAY,IAAI,EAAE;AACzB,gBAAA,OAAO,KAAK,CAAC,kBAAkB,EAAE,CAAC;AACnC,aAAA;AACI,iBAAA;gBACH,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,kBAAkB,EAAE,CAAC;AAC7C,aAAA;AACF,SAAA;AACI,aAAA;AACH,YAAA,OAAO,EAAE,CAAC;AACX,SAAA;KACF;;4GAfU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;0GAAd,cAAc,EAAA,IAAA,EAAA,kBAAA,EAAA,CAAA,CAAA;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,kBAAkB;AACzB,iBAAA,CAAA;;;MCCY,kBAAkB,CAAA;AAC7B,IAAA,WAAA,GAAA,GAAgB;AAEhB,IAAA,SAAS,CAAC,KAAgC,EAAA;AACxC,QAAA,IAAI,KAAK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