@libs-ui/services-format-date 0.1.1-1

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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # services-format-date
2
+
3
+ This library was generated with [Nx](https://nx.dev).
@@ -0,0 +1,15 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { formatDate } from '@libs-ui/utils';
3
+ import * as i0 from "@angular/core";
4
+ export class FormatDateService {
5
+ transform(time, format = 'YYYY/MM/DD HH:mm', lang) {
6
+ return formatDate(time, format, lang) || '';
7
+ }
8
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FormatDateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FormatDateService, providedIn: 'root' });
10
+ }
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FormatDateService, decorators: [{
12
+ type: Injectable,
13
+ args: [{ providedIn: 'root' }]
14
+ }] });
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWF0LWRhdGUuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMtdWkvc2VydmljZXMvZm9ybWF0LWRhdGUvc3JjL2Zvcm1hdC1kYXRlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7O0FBSTVDLE1BQU0sT0FBTyxpQkFBaUI7SUFDckIsU0FBUyxDQUFDLElBQXNELEVBQUUsTUFB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HVCQUF1QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9mb3JtYXQtZGF0ZS5zZXJ2aWNlJztcbiJdfQ==
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlicy11aS1zZXJ2aWNlcy1mb3JtYXQtZGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMtdWkvc2VydmljZXMvZm9ybWF0LWRhdGUvc3JjL2xpYnMtdWktc2VydmljZXMtZm9ybWF0LWRhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
@@ -0,0 +1,22 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable } from '@angular/core';
3
+ import { formatDate } from '@libs-ui/utils';
4
+
5
+ class FormatDateService {
6
+ transform(time, format = 'YYYY/MM/DD HH:mm', lang) {
7
+ return formatDate(time, format, lang) || '';
8
+ }
9
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FormatDateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FormatDateService, providedIn: 'root' });
11
+ }
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FormatDateService, decorators: [{
13
+ type: Injectable,
14
+ args: [{ providedIn: 'root' }]
15
+ }] });
16
+
17
+ /**
18
+ * Generated bundle index. Do not edit.
19
+ */
20
+
21
+ export { FormatDateService };
22
+ //# sourceMappingURL=libs-ui-services-format-date.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libs-ui-services-format-date.mjs","sources":["../../../../../libs-ui/services/format-date/src/format-date.service.ts","../../../../../libs-ui/services/format-date/src/libs-ui-services-format-date.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { formatDate } from '@libs-ui/utils';\nimport dayjs from 'dayjs';\n\n@Injectable({ providedIn: 'root' })\nexport class FormatDateService {\n public transform(time: string | number | dayjs.Dayjs | undefined | null, format = 'YYYY/MM/DD HH:mm', lang?: string): string {\n return formatDate(time, format, lang) || '';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAKa,iBAAiB,CAAA;AACrB,IAAA,SAAS,CAAC,IAAsD,EAAE,MAAM,GAAG,kBAAkB,EAAE,IAAa,EAAA;QACjH,OAAO,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE;IAC7C;wGAHW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cADJ,MAAM,EAAA,CAAA;;4FACnB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACJlC;;AAEG;;;;"}
@@ -0,0 +1,7 @@
1
+ import dayjs from 'dayjs';
2
+ import * as i0 from "@angular/core";
3
+ export declare class FormatDateService {
4
+ transform(time: string | number | dayjs.Dayjs | undefined | null, format?: string, lang?: string): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormatDateService, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormatDateService>;
7
+ }
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './format-date.service';
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@libs-ui/services-format-date",
3
+ "version": "0.1.1-1",
4
+ "peerDependencies": {
5
+ "@angular/core": ">=18.0.0",
6
+ "dayjs": "1.11.5",
7
+ "@libs-ui/utils": "0.1.1-1"
8
+ },
9
+ "sideEffects": false,
10
+ "module": "fesm2022/libs-ui-services-format-date.mjs",
11
+ "typings": "index.d.ts",
12
+ "exports": {
13
+ "./package.json": {
14
+ "default": "./package.json"
15
+ },
16
+ ".": {
17
+ "types": "./index.d.ts",
18
+ "esm2022": "./esm2022/libs-ui-services-format-date.mjs",
19
+ "esm": "./esm2022/libs-ui-services-format-date.mjs",
20
+ "default": "./fesm2022/libs-ui-services-format-date.mjs"
21
+ }
22
+ },
23
+ "dependencies": {
24
+ "tslib": "^2.3.0"
25
+ }
26
+ }