@yelon/util 16.4.6 → 17.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/README.md +6 -2
- package/browser/cookie.service.d.ts +2 -5
- package/browser/is-empty.d.ts +2 -2
- package/browser/scroll.service.d.ts +3 -6
- package/config/auth/auth.type.d.ts +2 -10
- package/config/cache/cache.type.d.ts +26 -0
- package/config/config.types.d.ts +5 -2
- package/config/index.d.ts +2 -2
- package/config/mock/mock.type.d.ts +0 -4
- package/config/theme/http.type.d.ts +3 -2
- package/config/theme/pipe.type.d.ts +3 -0
- package/date-time/time.d.ts +16 -8
- package/decorator/convert.d.ts +8 -0
- package/decorator/zone-outside.d.ts +2 -2
- package/esm2022/array/array-type.service.mjs +1 -1
- package/esm2022/array/array.service.mjs +6 -5
- package/esm2022/browser/cookie.service.mjs +11 -14
- package/esm2022/browser/copy.mjs +1 -1
- package/esm2022/browser/is-empty.mjs +3 -3
- package/esm2022/browser/scroll.service.mjs +11 -14
- package/esm2022/browser/style.mjs +1 -1
- package/esm2022/config/auth/auth.type.mjs +1 -1
- package/esm2022/config/cache/cache.type.mjs +1 -1
- package/esm2022/config/config.service.mjs +7 -6
- package/esm2022/config/config.types.mjs +5 -2
- package/esm2022/config/index.mjs +3 -3
- package/esm2022/config/mock/mock.type.mjs +1 -1
- package/esm2022/config/theme/http.type.mjs +1 -1
- package/esm2022/config/theme/pipe.type.mjs +2 -0
- package/esm2022/date-time/picker.mjs +1 -1
- package/esm2022/date-time/time.mjs +16 -11
- package/esm2022/decorator/convert.mjs +9 -1
- package/esm2022/decorator/zone-outside.mjs +3 -3
- package/esm2022/form/match-control.mjs +1 -1
- package/esm2022/format/currency.service.mjs +10 -15
- package/esm2022/format/string.mjs +1 -1
- package/esm2022/index.mjs +1 -2
- package/esm2022/math/in-range.mjs +1 -1
- package/esm2022/math/round.mjs +1 -1
- package/esm2022/mcache/localStorageUtils.mjs +1 -1
- package/esm2022/mtypes/header-menu.type.mjs +1 -1
- package/esm2022/mtypes/menu.type.mjs +1 -1
- package/esm2022/mtypes/page.mjs +1 -1
- package/esm2022/other/assert.mjs +2 -2
- package/esm2022/other/deep.mjs +1 -1
- package/esm2022/other/favicon.mjs +1 -1
- package/esm2022/other/index.mjs +2 -2
- package/esm2022/other/lazy.service.mjs +8 -11
- package/esm2022/other/logger.mjs +1 -1
- package/esm2022/other/path-to-regexp.service.mjs +6 -6
- package/esm2022/pipes/currency/cny.pipe.mjs +15 -15
- package/esm2022/pipes/currency/mega.pipe.mjs +16 -20
- package/esm2022/pipes/currency/module.mjs +6 -6
- package/esm2022/pipes/currency/price.pipe.mjs +19 -19
- package/esm2022/pipes/filter/filter.pipe.mjs +11 -10
- package/esm2022/pipes/filter/module.mjs +6 -6
- package/esm2022/pipes/format/mask.pipe.mjs +24 -24
- package/esm2022/pipes/format/module.mjs +6 -6
- package/esm2022/token/window.mjs +1 -1
- package/fesm2022/array.mjs +5 -4
- package/fesm2022/array.mjs.map +1 -1
- package/fesm2022/browser.mjs +20 -26
- package/fesm2022/browser.mjs.map +1 -1
- package/fesm2022/config.mjs +11 -7
- package/fesm2022/config.mjs.map +1 -1
- package/fesm2022/date-time.mjs +15 -10
- package/fesm2022/date-time.mjs.map +1 -1
- package/fesm2022/decorator.mjs +10 -2
- package/fesm2022/decorator.mjs.map +1 -1
- package/fesm2022/form.mjs.map +1 -1
- package/fesm2022/format.mjs +9 -14
- package/fesm2022/format.mjs.map +1 -1
- package/fesm2022/math.mjs.map +1 -1
- package/fesm2022/mcache.mjs.map +1 -1
- package/fesm2022/mtypes.mjs.map +1 -1
- package/fesm2022/other.mjs +17 -20
- package/fesm2022/other.mjs.map +1 -1
- package/fesm2022/pipe-currency.mjs +48 -52
- package/fesm2022/pipe-currency.mjs.map +1 -1
- package/fesm2022/pipe-filter.mjs +15 -14
- package/fesm2022/pipe-filter.mjs.map +1 -1
- package/fesm2022/pipe-format.mjs +28 -28
- package/fesm2022/pipe-format.mjs.map +1 -1
- package/fesm2022/token.mjs.map +1 -1
- package/fesm2022/yelon-util.mjs +0 -1
- package/fesm2022/yelon-util.mjs.map +1 -1
- package/format/currency.service.d.ts +3 -2
- package/index.d.ts +0 -1
- package/mtypes/header-menu.type.d.ts +3 -2
- package/mtypes/menu.type.d.ts +6 -5
- package/mtypes/page.d.ts +2 -1
- package/other/index.d.ts +1 -1
- package/other/lazy.service.d.ts +1 -2
- package/other/path-to-regexp.service.d.ts +12 -11
- package/package.json +14 -20
- package/pipes/currency/cny.pipe.d.ts +8 -9
- package/pipes/currency/mega.pipe.d.ts +8 -9
- package/pipes/currency/module.d.ts +1 -1
- package/pipes/currency/price.pipe.d.ts +12 -13
- package/pipes/filter/filter.pipe.d.ts +6 -6
- package/pipes/filter/module.d.ts +1 -1
- package/pipes/format/mask.pipe.d.ts +20 -20
- package/pipes/format/module.d.ts +1 -1
- package/analysis/global-event.subject.d.ts +0 -7
- package/analysis/index.d.ts +0 -1
- package/esm2022/analysis/analysis.mjs +0 -5
- package/esm2022/analysis/global-event.subject.mjs +0 -17
- package/esm2022/analysis/index.mjs +0 -2
- package/fesm2022/analysis.mjs +0 -24
- package/fesm2022/analysis.mjs.map +0 -1
@@ -1,87 +1,83 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { LOCALE_ID, Pipe,
|
3
|
-
import
|
2
|
+
import { inject, LOCALE_ID, Pipe, NgModule } from '@angular/core';
|
3
|
+
import { CurrencyService } from '@yelon/util/format';
|
4
4
|
|
5
|
+
/**
|
6
|
+
* Large number format filter
|
7
|
+
*
|
8
|
+
* 大数据格式化
|
9
|
+
*/
|
5
10
|
class CurrencyMegaPipe {
|
6
|
-
constructor(
|
7
|
-
this.srv =
|
8
|
-
this.isCN =
|
9
|
-
this.isCN = locale.startsWith('zh');
|
11
|
+
constructor() {
|
12
|
+
this.srv = inject(CurrencyService);
|
13
|
+
this.isCN = inject(LOCALE_ID).startsWith('zh');
|
10
14
|
}
|
11
|
-
/**
|
12
|
-
* Large number format filter
|
13
|
-
*
|
14
|
-
* 大数据格式化
|
15
|
-
*/
|
16
15
|
transform(value, options) {
|
17
16
|
const res = this.srv.mega(value, options);
|
18
17
|
return res.value + (this.isCN ? res.unitI18n : res.unit);
|
19
18
|
}
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
21
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyMegaPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
20
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: CurrencyMegaPipe, isStandalone: true, name: "mega" }); }
|
22
21
|
}
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyMegaPipe, decorators: [{
|
24
23
|
type: Pipe,
|
25
|
-
args: [{ name: 'mega' }]
|
26
|
-
}]
|
27
|
-
type: Inject,
|
28
|
-
args: [LOCALE_ID]
|
29
|
-
}] }]; } });
|
24
|
+
args: [{ name: 'mega', standalone: true }]
|
25
|
+
}] });
|
30
26
|
|
27
|
+
/**
|
28
|
+
* Format a number with commas as thousands separators
|
29
|
+
*
|
30
|
+
* 格式化货币,用逗号将数字格式化为千位分隔符
|
31
|
+
* ```ts
|
32
|
+
* 10000 => `10,000`
|
33
|
+
* 10000.567 => `10,000.57`
|
34
|
+
* ```
|
35
|
+
*/
|
31
36
|
class CurrencyPricePipe {
|
32
|
-
constructor(
|
33
|
-
this.srv =
|
37
|
+
constructor() {
|
38
|
+
this.srv = inject(CurrencyService);
|
34
39
|
}
|
35
|
-
/**
|
36
|
-
* Format a number with commas as thousands separators
|
37
|
-
*
|
38
|
-
* 格式化货币,用逗号将数字格式化为千位分隔符
|
39
|
-
* ```ts
|
40
|
-
* 10000 => `10,000`
|
41
|
-
* 10000.567 => `10,000.57`
|
42
|
-
* ```
|
43
|
-
*/
|
44
40
|
transform(value, options) {
|
45
41
|
return this.srv.format(value, options);
|
46
42
|
}
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
48
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyPricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
44
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: CurrencyPricePipe, isStandalone: true, name: "price" }); }
|
49
45
|
}
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyPricePipe, decorators: [{
|
51
47
|
type: Pipe,
|
52
|
-
args: [{ name: 'price' }]
|
53
|
-
}]
|
48
|
+
args: [{ name: 'price', standalone: true }]
|
49
|
+
}] });
|
54
50
|
|
51
|
+
/**
|
52
|
+
* Converted into RMB notation.
|
53
|
+
*
|
54
|
+
* 转化成人民币表示法
|
55
|
+
*/
|
55
56
|
class CurrencyCNYPipe {
|
56
|
-
constructor(
|
57
|
-
this.srv =
|
57
|
+
constructor() {
|
58
|
+
this.srv = inject(CurrencyService);
|
58
59
|
}
|
59
|
-
/**
|
60
|
-
* Converted into RMB notation.
|
61
|
-
*
|
62
|
-
* 转化成人民币表示法
|
63
|
-
*/
|
64
60
|
transform(value, options) {
|
65
61
|
return this.srv.cny(value, options);
|
66
62
|
}
|
67
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
68
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyCNYPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
64
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: CurrencyCNYPipe, isStandalone: true, name: "cny" }); }
|
69
65
|
}
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyCNYPipe, decorators: [{
|
71
67
|
type: Pipe,
|
72
|
-
args: [{ name: 'cny' }]
|
73
|
-
}]
|
68
|
+
args: [{ name: 'cny', standalone: true }]
|
69
|
+
}] });
|
74
70
|
|
75
71
|
const PIPES = [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe];
|
76
72
|
class CurrencyPipeModule {
|
77
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
78
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
79
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
74
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: CurrencyPipeModule, imports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe], exports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe] }); }
|
75
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyPipeModule }); }
|
80
76
|
}
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
77
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyPipeModule, decorators: [{
|
82
78
|
type: NgModule,
|
83
79
|
args: [{
|
84
|
-
|
80
|
+
imports: PIPES,
|
85
81
|
exports: PIPES
|
86
82
|
}]
|
87
83
|
}] });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipe-currency.mjs","sources":["../../../../packages/util/pipes/currency/mega.pipe.ts","../../../../packages/util/pipes/currency/price.pipe.ts","../../../../packages/util/pipes/currency/cny.pipe.ts","../../../../packages/util/pipes/currency/module.ts","../../../../packages/util/pipes/currency/pipe-currency.ts"],"sourcesContent":["import {
|
1
|
+
{"version":3,"file":"pipe-currency.mjs","sources":["../../../../packages/util/pipes/currency/mega.pipe.ts","../../../../packages/util/pipes/currency/price.pipe.ts","../../../../packages/util/pipes/currency/cny.pipe.ts","../../../../packages/util/pipes/currency/module.ts","../../../../packages/util/pipes/currency/pipe-currency.ts"],"sourcesContent":["import { LOCALE_ID, Pipe, PipeTransform, inject } from '@angular/core';\n\nimport { CurrencyMegaOptions, CurrencyService } from '@yelon/util/format';\n\n/**\n * Large number format filter\n *\n * 大数据格式化\n */\n@Pipe({ name: 'mega', standalone: true })\nexport class CurrencyMegaPipe implements PipeTransform {\n private readonly srv = inject(CurrencyService);\n private isCN = inject(LOCALE_ID).startsWith('zh');\n\n transform(value: number | string, options?: CurrencyMegaOptions): string {\n const res = this.srv.mega(value, options);\n return res.value + (this.isCN ? res.unitI18n : res.unit);\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\n\nimport { CurrencyFormatOptions, CurrencyService } from '@yelon/util/format';\n\n/**\n * Format a number with commas as thousands separators\n *\n * 格式化货币,用逗号将数字格式化为千位分隔符\n * ```ts\n * 10000 => `10,000`\n * 10000.567 => `10,000.57`\n * ```\n */\n@Pipe({ name: 'price', standalone: true })\nexport class CurrencyPricePipe implements PipeTransform {\n private readonly srv = inject(CurrencyService);\n\n transform(value: number | string, options?: CurrencyFormatOptions): string {\n return this.srv.format(value, options);\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\n\nimport { CurrencyCNYOptions, CurrencyService } from '@yelon/util/format';\n\n/**\n * Converted into RMB notation.\n *\n * 转化成人民币表示法\n */\n@Pipe({ name: 'cny', standalone: true })\nexport class CurrencyCNYPipe implements PipeTransform {\n private readonly srv = inject(CurrencyService);\n\n transform(value: number | string, options?: CurrencyCNYOptions): string {\n return this.srv.cny(value, options);\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { CurrencyCNYPipe } from './cny.pipe';\nimport { CurrencyMegaPipe } from './mega.pipe';\nimport { CurrencyPricePipe } from './price.pipe';\n\nconst PIPES = [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe];\n\n@NgModule({\n imports: PIPES,\n exports: PIPES\n})\nexport class CurrencyPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
package/fesm2022/pipe-filter.mjs
CHANGED
@@ -1,33 +1,34 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { Pipe, NgModule } from '@angular/core';
|
3
3
|
|
4
|
+
/**
|
5
|
+
* Filter array
|
6
|
+
*
|
7
|
+
* 过滤数组
|
8
|
+
*/
|
9
|
+
// eslint-disable-next-line @angular-eslint/no-pipe-impure
|
4
10
|
class FilterPipe {
|
5
|
-
/**
|
6
|
-
* Filter array
|
7
|
-
*
|
8
|
-
* 过滤数组
|
9
|
-
*/
|
10
11
|
transform(array, matcher, ...args) {
|
11
12
|
return array.filter(i => matcher(i, ...args));
|
12
13
|
}
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
14
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
15
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: FilterPipe, isStandalone: true, name: "filter", pure: false }); }
|
15
16
|
}
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FilterPipe, decorators: [{
|
17
18
|
type: Pipe,
|
18
|
-
args: [{ name: 'filter' }]
|
19
|
+
args: [{ name: 'filter', standalone: true, pure: false }]
|
19
20
|
}] });
|
20
21
|
|
21
22
|
const PIPES = [FilterPipe];
|
22
23
|
class FilterPipeModule {
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
24
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
25
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FilterPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
25
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: FilterPipeModule, imports: [FilterPipe], exports: [FilterPipe] }); }
|
26
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FilterPipeModule }); }
|
26
27
|
}
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FilterPipeModule, decorators: [{
|
28
29
|
type: NgModule,
|
29
30
|
args: [{
|
30
|
-
|
31
|
+
imports: PIPES,
|
31
32
|
exports: PIPES
|
32
33
|
}]
|
33
34
|
}] });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipe-filter.mjs","sources":["../../../../packages/util/pipes/filter/filter.pipe.ts","../../../../packages/util/pipes/filter/module.ts","../../../../packages/util/pipes/filter/pipe-filter.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Pipe({ name: 'filter' })\nexport class FilterPipe implements PipeTransform {\n
|
1
|
+
{"version":3,"file":"pipe-filter.mjs","sources":["../../../../packages/util/pipes/filter/filter.pipe.ts","../../../../packages/util/pipes/filter/module.ts","../../../../packages/util/pipes/filter/pipe-filter.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * Filter array\n *\n * 过滤数组\n */\n// eslint-disable-next-line @angular-eslint/no-pipe-impure\n@Pipe({ name: 'filter', standalone: true, pure: false })\nexport class FilterPipe implements PipeTransform {\n transform<T>(array: readonly T[], matcher: (item: T, ...args: NzSafeAny[]) => boolean, ...args: NzSafeAny[]): T[] {\n return array.filter(i => matcher(i, ...args));\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { FilterPipe } from './filter.pipe';\n\nconst PIPES = [FilterPipe];\n\n@NgModule({\n imports: PIPES,\n exports: PIPES\n})\nexport class FilterPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAIA;;;;AAIG;AACH;MAEa,UAAU,CAAA;AACrB,IAAA,SAAS,CAAI,KAAmB,EAAE,OAAmD,EAAE,GAAG,IAAiB,EAAA;AACzG,QAAA,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;KAC/C;8GAHU,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;4GAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA,CAAA,EAAA;;2FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBADtB,IAAI;mBAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;;;ACNvD,MAAM,KAAK,GAAG,CAAC,UAAU,CAAC,CAAC;MAMd,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAhB,gBAAgB,EAAA,OAAA,EAAA,CANd,UAAU,CAAA,EAAA,OAAA,EAAA,CAAV,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;+GAMZ,gBAAgB,EAAA,CAAA,CAAA,EAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,OAAO,EAAE,KAAK;AACf,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
package/fesm2022/pipe-format.mjs
CHANGED
@@ -2,47 +2,47 @@ import * as i0 from '@angular/core';
|
|
2
2
|
import { Pipe, NgModule } from '@angular/core';
|
3
3
|
import { formatMask } from '@yelon/util/format';
|
4
4
|
|
5
|
+
/**
|
6
|
+
* Format mask
|
7
|
+
*
|
8
|
+
* 格式化掩码
|
9
|
+
*
|
10
|
+
* | 字符 | 描述 |
|
11
|
+
* | --- | --- |
|
12
|
+
* | `0` | 任意数字,若该位置字符不符合,则默认为 `0` 填充 |
|
13
|
+
* | `9` | 任意数字 |
|
14
|
+
* | `#` | 任意字符 |
|
15
|
+
* | `U` | 转换大写 |
|
16
|
+
* | `L` | 转换小写 |
|
17
|
+
* | `*` | 转换为 `*` 字符 |
|
18
|
+
*
|
19
|
+
* ```ts
|
20
|
+
* formatMask('123', '(###)') => (123)
|
21
|
+
* formatMask('15900000000', '999****9999') => 159****0000
|
22
|
+
* ```
|
23
|
+
*/
|
5
24
|
class FormatMaskPipe {
|
6
|
-
/**
|
7
|
-
* Format mask
|
8
|
-
*
|
9
|
-
* 格式化掩码
|
10
|
-
*
|
11
|
-
* | 字符 | 描述 |
|
12
|
-
* | --- | --- |
|
13
|
-
* | `0` | 任意数字,若该位置字符不符合,则默认为 `0` 填充 |
|
14
|
-
* | `9` | 任意数字 |
|
15
|
-
* | `#` | 任意字符 |
|
16
|
-
* | `U` | 转换大写 |
|
17
|
-
* | `L` | 转换小写 |
|
18
|
-
* | `*` | 转换为 `*` 字符 |
|
19
|
-
*
|
20
|
-
* ```ts
|
21
|
-
* formatMask('123', '(###)') => (123)
|
22
|
-
* formatMask('15900000000', '999****9999') => 159****0000
|
23
|
-
* ```
|
24
|
-
*/
|
25
25
|
transform(value, mask) {
|
26
26
|
return formatMask(value, mask);
|
27
27
|
}
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
29
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormatMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
29
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: FormatMaskPipe, isStandalone: true, name: "mask" }); }
|
30
30
|
}
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormatMaskPipe, decorators: [{
|
32
32
|
type: Pipe,
|
33
|
-
args: [{ name: 'mask' }]
|
33
|
+
args: [{ name: 'mask', standalone: true }]
|
34
34
|
}] });
|
35
35
|
|
36
36
|
const PIPES = [FormatMaskPipe];
|
37
37
|
class FormatPipeModule {
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
39
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
40
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
38
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormatPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
39
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: FormatPipeModule, imports: [FormatMaskPipe], exports: [FormatMaskPipe] }); }
|
40
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormatPipeModule }); }
|
41
41
|
}
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormatPipeModule, decorators: [{
|
43
43
|
type: NgModule,
|
44
44
|
args: [{
|
45
|
-
|
45
|
+
imports: PIPES,
|
46
46
|
exports: PIPES
|
47
47
|
}]
|
48
48
|
}] });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipe-format.mjs","sources":["../../../../packages/util/pipes/format/mask.pipe.ts","../../../../packages/util/pipes/format/module.ts","../../../../packages/util/pipes/format/pipe-format.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\nimport { formatMask, FormatMaskOption } from '@yelon/util/format';\n\n
|
1
|
+
{"version":3,"file":"pipe-format.mjs","sources":["../../../../packages/util/pipes/format/mask.pipe.ts","../../../../packages/util/pipes/format/module.ts","../../../../packages/util/pipes/format/pipe-format.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\nimport { formatMask, FormatMaskOption } from '@yelon/util/format';\n\n/**\n * Format mask\n *\n * 格式化掩码\n *\n * | 字符 | 描述 |\n * | --- | --- |\n * | `0` | 任意数字,若该位置字符不符合,则默认为 `0` 填充 |\n * | `9` | 任意数字 |\n * | `#` | 任意字符 |\n * | `U` | 转换大写 |\n * | `L` | 转换小写 |\n * | `*` | 转换为 `*` 字符 |\n *\n * ```ts\n * formatMask('123', '(###)') => (123)\n * formatMask('15900000000', '999****9999') => 159****0000\n * ```\n */\n@Pipe({ name: 'mask', standalone: true })\nexport class FormatMaskPipe implements PipeTransform {\n transform(value: string, mask: string | FormatMaskOption): string {\n return formatMask(value, mask);\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { FormatMaskPipe } from './mask.pipe';\n\nconst PIPES = [FormatMaskPipe];\n\n@NgModule({\n imports: PIPES,\n exports: PIPES\n})\nexport class FormatPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAIA;;;;;;;;;;;;;;;;;;AAkBG;MAEU,cAAc,CAAA;IACzB,SAAS,CAAC,KAAa,EAAE,IAA+B,EAAA;AACtD,QAAA,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;KAChC;8GAHU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;4GAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;;;ACnBxC,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,CAAC;MAMlB,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAhB,gBAAgB,EAAA,OAAA,EAAA,CANd,cAAc,CAAA,EAAA,OAAA,EAAA,CAAd,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;+GAMhB,gBAAgB,EAAA,CAAA,CAAA,EAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,OAAO,EAAE,KAAK;AACf,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
package/fesm2022/token.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"token.mjs","sources":["../../../../packages/util/token/window.ts","../../../../packages/util/token/page-visibility.ts","../../../../packages/util/token/token.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { inject, InjectionToken } from '@angular/core';\n\n/**\n * Access to global `window` object\n *\n * 访问全局 `window` 对象\n */\nexport const WINDOW = new InjectionToken<Window>('WINDOW', {\n factory: () => {\n const { defaultView } = inject(DOCUMENT);\n if (!defaultView) {\n throw new Error('Window is not available');\n }\n return defaultView;\n }\n});\n","import { DOCUMENT } from '@angular/common';\nimport { inject, InjectionToken } from '@angular/core';\nimport { fromEvent, Observable, distinctUntilChanged, map, share, startWith } from 'rxjs';\n\n/**\n * Use the `visibilitychange` event to monitor whether the browser tab is visible, which is generally used when the user leaves the browser tab to temp interrupt the backend to continue sending requests\n *\n * 通过 `visibilitychange` 事件来监听浏览器选项卡是否可见,一般用于当用户离开应用时暂时中断后端持续发送请求时\n */\nexport const PAGE_VISIBILITY = new InjectionToken<Observable<boolean>>('PAGE_VISIBILITY`', {\n factory: () => {\n const doc = inject(DOCUMENT);\n return fromEvent(doc, 'visibilitychange').pipe(\n startWith(0),\n map(() => !doc.hidden),\n distinctUntilChanged(),\n share()\n );\n }\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;;;;AAIG;MACU,MAAM,GAAG,IAAI,cAAc,CAAS,QAAQ,EAAE;IACzD,OAAO,EAAE,MAAK;QACZ,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI,CAAC,WAAW,EAAE;AAChB,YAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"token.mjs","sources":["../../../../packages/util/token/window.ts","../../../../packages/util/token/page-visibility.ts","../../../../packages/util/token/token.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { inject, InjectionToken } from '@angular/core';\n\n/**\n * Access to global `window` object\n *\n * 访问全局 `window` 对象\n */\nexport const WINDOW = new InjectionToken<Window>('WINDOW', {\n factory: () => {\n const { defaultView } = inject(DOCUMENT);\n if (!defaultView) {\n throw new Error('Window is not available');\n }\n return defaultView;\n }\n});\n","import { DOCUMENT } from '@angular/common';\nimport { inject, InjectionToken } from '@angular/core';\nimport { fromEvent, Observable, distinctUntilChanged, map, share, startWith } from 'rxjs';\n\n/**\n * Use the `visibilitychange` event to monitor whether the browser tab is visible, which is generally used when the user leaves the browser tab to temp interrupt the backend to continue sending requests\n *\n * 通过 `visibilitychange` 事件来监听浏览器选项卡是否可见,一般用于当用户离开应用时暂时中断后端持续发送请求时\n */\nexport const PAGE_VISIBILITY = new InjectionToken<Observable<boolean>>('PAGE_VISIBILITY`', {\n factory: () => {\n const doc = inject(DOCUMENT);\n return fromEvent(doc, 'visibilitychange').pipe(\n startWith(0),\n map(() => !doc.hidden),\n distinctUntilChanged(),\n share()\n );\n }\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;;;;AAIG;MACU,MAAM,GAAG,IAAI,cAAc,CAAS,QAAQ,EAAE;IACzD,OAAO,EAAE,MAAK;QACZ,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI,CAAC,WAAW,EAAE;AAChB,YAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC5C;AACD,QAAA,OAAO,WAAW,CAAC;KACpB;AACF,CAAA;;ACZD;;;;AAIG;MACU,eAAe,GAAG,IAAI,cAAc,CAAsB,kBAAkB,EAAE;IACzF,OAAO,EAAE,MAAK;AACZ,QAAA,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC7B,QAAA,OAAO,SAAS,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC,IAAI,CAC5C,SAAS,CAAC,CAAC,CAAC,EACZ,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EACtB,oBAAoB,EAAE,EACtB,KAAK,EAAE,CACR,CAAC;KACH;AACF,CAAA;;ACnBD;;AAEG;;;;"}
|
package/fesm2022/yelon-util.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"yelon-util.mjs","sources":["../../../../packages/util/yelon-util.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"yelon-util.mjs","sources":["../../../../packages/util/yelon-util.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;AAEG"}
|
@@ -2,10 +2,11 @@ import { YunzaiConfigService } from '@yelon/util/config';
|
|
2
2
|
import { CurrencyCNYOptions, CurrencyFormatOptions, CurrencyMegaOptions, CurrencyMegaResult } from './currency.types';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export declare class CurrencyService {
|
5
|
-
private locale;
|
5
|
+
private readonly locale;
|
6
|
+
private readonly defCurrencyCode;
|
6
7
|
private c;
|
7
8
|
private readonly currencyPipe;
|
8
|
-
constructor(cog: YunzaiConfigService
|
9
|
+
constructor(cog: YunzaiConfigService);
|
9
10
|
/**
|
10
11
|
* Format a number with commas as thousands separators
|
11
12
|
*
|
package/index.d.ts
CHANGED
package/mtypes/menu.type.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
+
import { NzSafeAny } from 'ng-zorro-antd/core/types';
|
1
2
|
export interface YunzaiMenu {
|
2
|
-
[key: string]:
|
3
|
+
[key: string]: NzSafeAny;
|
3
4
|
appCode: string;
|
4
5
|
appIconUrl: string;
|
5
6
|
appType: string;
|
@@ -33,8 +34,8 @@ export interface YunzaiMenu {
|
|
33
34
|
version: number;
|
34
35
|
}
|
35
36
|
export interface YunzaiMenuAttribute {
|
36
|
-
defaultRoute:
|
37
|
-
dataPlatform:
|
38
|
-
targetUser:
|
39
|
-
starConfig:
|
37
|
+
defaultRoute: NzSafeAny;
|
38
|
+
dataPlatform: NzSafeAny;
|
39
|
+
targetUser: NzSafeAny;
|
40
|
+
starConfig: NzSafeAny;
|
40
41
|
}
|
package/mtypes/page.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { NzSafeAny } from 'ng-zorro-antd/core/types';
|
1
2
|
export interface YunzaiPageParam<T> {
|
2
3
|
pageNum?: number;
|
3
4
|
pageSize?: number;
|
@@ -29,7 +30,7 @@ export interface YunzaiPageResult<T> {
|
|
29
30
|
totalElements: number;
|
30
31
|
totalPages: number;
|
31
32
|
}
|
32
|
-
export declare class YunzaiPageBuilder<T extends
|
33
|
+
export declare class YunzaiPageBuilder<T extends NzSafeAny | unknown> {
|
33
34
|
private page;
|
34
35
|
pageNum(pageNum: number): this;
|
35
36
|
pageSize(pageSize: number): this;
|
package/other/index.d.ts
CHANGED
package/other/lazy.service.d.ts
CHANGED
@@ -23,11 +23,10 @@ export interface LazyLoadOptions {
|
|
23
23
|
* 延迟加载资源(js 或 css)服务
|
24
24
|
*/
|
25
25
|
export declare class LazyService {
|
26
|
-
private doc;
|
26
|
+
private readonly doc;
|
27
27
|
private list;
|
28
28
|
private cached;
|
29
29
|
private _notify;
|
30
|
-
constructor(doc: NzSafeAny);
|
31
30
|
get change(): Observable<LazyResult[]>;
|
32
31
|
clear(): void;
|
33
32
|
private attachAttributes;
|
@@ -1,9 +1,10 @@
|
|
1
|
+
import { NzSafeAny } from 'ng-zorro-antd/core/types';
|
1
2
|
import * as i0 from "@angular/core";
|
2
3
|
export declare class PathToRegexpService {
|
3
4
|
constructor();
|
4
5
|
DEFAULT_DELIMITER: string;
|
5
6
|
PATH_REGEXP: RegExp;
|
6
|
-
parse(str:
|
7
|
+
parse(str: NzSafeAny, options: NzSafeAny): (string | {
|
7
8
|
name: string | number;
|
8
9
|
prefix: string;
|
9
10
|
delimiter: any;
|
@@ -11,16 +12,16 @@ export declare class PathToRegexpService {
|
|
11
12
|
repeat: boolean;
|
12
13
|
pattern: any;
|
13
14
|
})[];
|
14
|
-
compile(str:
|
15
|
-
tokensToFunction(tokens:
|
16
|
-
escapeString(str:
|
17
|
-
escapeGroup(group:
|
18
|
-
flags(options:
|
19
|
-
regexpToRegexp(path:
|
20
|
-
arrayToRegexp(path:
|
21
|
-
stringToRegexp(path:
|
22
|
-
tokensToRegExp(tokens:
|
23
|
-
pathToRegexp(path:
|
15
|
+
compile(str: NzSafeAny, options: NzSafeAny): (data: any, options: any) => string;
|
16
|
+
tokensToFunction(tokens: NzSafeAny, options: NzSafeAny): (data: NzSafeAny, options: NzSafeAny) => string;
|
17
|
+
escapeString(str: NzSafeAny): any;
|
18
|
+
escapeGroup(group: NzSafeAny): any;
|
19
|
+
flags(options: NzSafeAny): "" | "i";
|
20
|
+
regexpToRegexp(path: NzSafeAny, keys: NzSafeAny): any;
|
21
|
+
arrayToRegexp(path: NzSafeAny, keys: NzSafeAny, options: NzSafeAny): RegExp;
|
22
|
+
stringToRegexp(path: NzSafeAny, keys: NzSafeAny, options: NzSafeAny): RegExp;
|
23
|
+
tokensToRegExp(tokens: NzSafeAny, keys: NzSafeAny, options: NzSafeAny): RegExp;
|
24
|
+
pathToRegexp(path: NzSafeAny, keys: NzSafeAny, options: NzSafeAny): any;
|
24
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<PathToRegexpService, never>;
|
25
26
|
static ɵprov: i0.ɵɵInjectableDeclaration<PathToRegexpService>;
|
26
27
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@yelon/util",
|
3
|
-
"version": "
|
4
|
-
"author": "
|
3
|
+
"version": "17.2.0",
|
4
|
+
"author": "yunzai-bot<yunzai-bot@outlook.com>",
|
5
5
|
"license": "MIT",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
@@ -35,18 +35,18 @@
|
|
35
35
|
"esm": "./esm2022/yelon-util.mjs",
|
36
36
|
"default": "./fesm2022/yelon-util.mjs"
|
37
37
|
},
|
38
|
-
"./analysis": {
|
39
|
-
"types": "./analysis/index.d.ts",
|
40
|
-
"esm2022": "./esm2022/analysis/analysis.mjs",
|
41
|
-
"esm": "./esm2022/analysis/analysis.mjs",
|
42
|
-
"default": "./fesm2022/analysis.mjs"
|
43
|
-
},
|
44
38
|
"./array": {
|
45
39
|
"types": "./array/index.d.ts",
|
46
40
|
"esm2022": "./esm2022/array/array.mjs",
|
47
41
|
"esm": "./esm2022/array/array.mjs",
|
48
42
|
"default": "./fesm2022/array.mjs"
|
49
43
|
},
|
44
|
+
"./browser": {
|
45
|
+
"types": "./browser/index.d.ts",
|
46
|
+
"esm2022": "./esm2022/browser/browser.mjs",
|
47
|
+
"esm": "./esm2022/browser/browser.mjs",
|
48
|
+
"default": "./fesm2022/browser.mjs"
|
49
|
+
},
|
50
50
|
"./config": {
|
51
51
|
"types": "./config/index.d.ts",
|
52
52
|
"esm2022": "./esm2022/config/config.mjs",
|
@@ -59,12 +59,6 @@
|
|
59
59
|
"esm": "./esm2022/date-time/date-time.mjs",
|
60
60
|
"default": "./fesm2022/date-time.mjs"
|
61
61
|
},
|
62
|
-
"./browser": {
|
63
|
-
"types": "./browser/index.d.ts",
|
64
|
-
"esm2022": "./esm2022/browser/browser.mjs",
|
65
|
-
"esm": "./esm2022/browser/browser.mjs",
|
66
|
-
"default": "./fesm2022/browser.mjs"
|
67
|
-
},
|
68
62
|
"./decorator": {
|
69
63
|
"types": "./decorator/index.d.ts",
|
70
64
|
"esm2022": "./esm2022/decorator/decorator.mjs",
|
@@ -95,18 +89,18 @@
|
|
95
89
|
"esm": "./esm2022/mcache/mcache.mjs",
|
96
90
|
"default": "./fesm2022/mcache.mjs"
|
97
91
|
},
|
98
|
-
"./other": {
|
99
|
-
"types": "./other/index.d.ts",
|
100
|
-
"esm2022": "./esm2022/other/other.mjs",
|
101
|
-
"esm": "./esm2022/other/other.mjs",
|
102
|
-
"default": "./fesm2022/other.mjs"
|
103
|
-
},
|
104
92
|
"./mtypes": {
|
105
93
|
"types": "./mtypes/index.d.ts",
|
106
94
|
"esm2022": "./esm2022/mtypes/mtypes.mjs",
|
107
95
|
"esm": "./esm2022/mtypes/mtypes.mjs",
|
108
96
|
"default": "./fesm2022/mtypes.mjs"
|
109
97
|
},
|
98
|
+
"./other": {
|
99
|
+
"types": "./other/index.d.ts",
|
100
|
+
"esm2022": "./esm2022/other/other.mjs",
|
101
|
+
"esm": "./esm2022/other/other.mjs",
|
102
|
+
"default": "./fesm2022/other.mjs"
|
103
|
+
},
|
110
104
|
"./pipes": {
|
111
105
|
"types": "./pipes/index.d.ts",
|
112
106
|
"esm2022": "./esm2022/pipes/pipes.mjs",
|
@@ -1,15 +1,14 @@
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
2
|
-
import { CurrencyCNYOptions
|
2
|
+
import { CurrencyCNYOptions } from '@yelon/util/format';
|
3
3
|
import * as i0 from "@angular/core";
|
4
|
+
/**
|
5
|
+
* Converted into RMB notation.
|
6
|
+
*
|
7
|
+
* 转化成人民币表示法
|
8
|
+
*/
|
4
9
|
export declare class CurrencyCNYPipe implements PipeTransform {
|
5
|
-
private srv;
|
6
|
-
constructor(srv: CurrencyService);
|
7
|
-
/**
|
8
|
-
* Converted into RMB notation.
|
9
|
-
*
|
10
|
-
* 转化成人民币表示法
|
11
|
-
*/
|
10
|
+
private readonly srv;
|
12
11
|
transform(value: number | string, options?: CurrencyCNYOptions): string;
|
13
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyCNYPipe, never>;
|
14
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyCNYPipe, "cny",
|
13
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyCNYPipe, "cny", true>;
|
15
14
|
}
|
@@ -1,16 +1,15 @@
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
2
|
-
import { CurrencyMegaOptions
|
2
|
+
import { CurrencyMegaOptions } from '@yelon/util/format';
|
3
3
|
import * as i0 from "@angular/core";
|
4
|
+
/**
|
5
|
+
* Large number format filter
|
6
|
+
*
|
7
|
+
* 大数据格式化
|
8
|
+
*/
|
4
9
|
export declare class CurrencyMegaPipe implements PipeTransform {
|
5
|
-
private srv;
|
10
|
+
private readonly srv;
|
6
11
|
private isCN;
|
7
|
-
constructor(srv: CurrencyService, locale: string);
|
8
|
-
/**
|
9
|
-
* Large number format filter
|
10
|
-
*
|
11
|
-
* 大数据格式化
|
12
|
-
*/
|
13
12
|
transform(value: number | string, options?: CurrencyMegaOptions): string;
|
14
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyMegaPipe, never>;
|
15
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyMegaPipe, "mega",
|
14
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyMegaPipe, "mega", true>;
|
16
15
|
}
|
@@ -4,6 +4,6 @@ import * as i2 from "./price.pipe";
|
|
4
4
|
import * as i3 from "./cny.pipe";
|
5
5
|
export declare class CurrencyPipeModule {
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyPipeModule, never>;
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CurrencyPipeModule, [typeof i1.CurrencyMegaPipe, typeof i2.CurrencyPricePipe, typeof i3.CurrencyCNYPipe],
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CurrencyPipeModule, never, [typeof i1.CurrencyMegaPipe, typeof i2.CurrencyPricePipe, typeof i3.CurrencyCNYPipe], [typeof i1.CurrencyMegaPipe, typeof i2.CurrencyPricePipe, typeof i3.CurrencyCNYPipe]>;
|
8
8
|
static ɵinj: i0.ɵɵInjectorDeclaration<CurrencyPipeModule>;
|
9
9
|
}
|