@yelon/util 16.4.6 → 17.2.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/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,19 +1,18 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { CurrencyFormatOptions
|
|
2
|
+
import { CurrencyFormatOptions } from '@yelon/util/format';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Format a number with commas as thousands separators
|
|
6
|
+
*
|
|
7
|
+
* 格式化货币,用逗号将数字格式化为千位分隔符
|
|
8
|
+
* ```ts
|
|
9
|
+
* 10000 => `10,000`
|
|
10
|
+
* 10000.567 => `10,000.57`
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
4
13
|
export declare class CurrencyPricePipe implements PipeTransform {
|
|
5
|
-
private srv;
|
|
6
|
-
constructor(srv: CurrencyService);
|
|
7
|
-
/**
|
|
8
|
-
* Format a number with commas as thousands separators
|
|
9
|
-
*
|
|
10
|
-
* 格式化货币,用逗号将数字格式化为千位分隔符
|
|
11
|
-
* ```ts
|
|
12
|
-
* 10000 => `10,000`
|
|
13
|
-
* 10000.567 => `10,000.57`
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
14
|
+
private readonly srv;
|
|
16
15
|
transform(value: number | string, options?: CurrencyFormatOptions): string;
|
|
17
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyPricePipe, never>;
|
|
18
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyPricePipe, "price",
|
|
17
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyPricePipe, "price", true>;
|
|
19
18
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import type { NzSafeAny } from 'ng-zorro-antd/core/types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Filter array
|
|
6
|
+
*
|
|
7
|
+
* 过滤数组
|
|
8
|
+
*/
|
|
4
9
|
export declare class FilterPipe implements PipeTransform {
|
|
5
|
-
/**
|
|
6
|
-
* Filter array
|
|
7
|
-
*
|
|
8
|
-
* 过滤数组
|
|
9
|
-
*/
|
|
10
10
|
transform<T>(array: readonly T[], matcher: (item: T, ...args: NzSafeAny[]) => boolean, ...args: NzSafeAny[]): T[];
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterPipe, never>;
|
|
12
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<FilterPipe, "filter",
|
|
12
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FilterPipe, "filter", true>;
|
|
13
13
|
}
|
package/pipes/filter/module.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./filter.pipe";
|
|
3
3
|
export declare class FilterPipeModule {
|
|
4
4
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterPipeModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FilterPipeModule, [typeof i1.FilterPipe],
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FilterPipeModule, never, [typeof i1.FilterPipe], [typeof i1.FilterPipe]>;
|
|
6
6
|
static ɵinj: i0.ɵɵInjectorDeclaration<FilterPipeModule>;
|
|
7
7
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import { FormatMaskOption } from '@yelon/util/format';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Format mask
|
|
6
|
+
*
|
|
7
|
+
* 格式化掩码
|
|
8
|
+
*
|
|
9
|
+
* | 字符 | 描述 |
|
|
10
|
+
* | --- | --- |
|
|
11
|
+
* | `0` | 任意数字,若该位置字符不符合,则默认为 `0` 填充 |
|
|
12
|
+
* | `9` | 任意数字 |
|
|
13
|
+
* | `#` | 任意字符 |
|
|
14
|
+
* | `U` | 转换大写 |
|
|
15
|
+
* | `L` | 转换小写 |
|
|
16
|
+
* | `*` | 转换为 `*` 字符 |
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* formatMask('123', '(###)') => (123)
|
|
20
|
+
* formatMask('15900000000', '999****9999') => 159****0000
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
4
23
|
export declare class FormatMaskPipe implements PipeTransform {
|
|
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
|
-
*/
|
|
24
24
|
transform(value: string, mask: string | FormatMaskOption): string;
|
|
25
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormatMaskPipe, never>;
|
|
26
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<FormatMaskPipe, "mask",
|
|
26
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FormatMaskPipe, "mask", true>;
|
|
27
27
|
}
|
package/pipes/format/module.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./mask.pipe";
|
|
3
3
|
export declare class FormatPipeModule {
|
|
4
4
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormatPipeModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormatPipeModule, [typeof i1.FormatMaskPipe],
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormatPipeModule, never, [typeof i1.FormatMaskPipe], [typeof i1.FormatMaskPipe]>;
|
|
6
6
|
static ɵinj: i0.ɵɵInjectorDeclaration<FormatPipeModule>;
|
|
7
7
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Subject } from 'rxjs';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class GlobalEventSubjectService {
|
|
4
|
-
clickEvents: Subject<Event>;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalEventSubjectService, never>;
|
|
6
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<GlobalEventSubjectService>;
|
|
7
|
-
}
|
package/analysis/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './global-event.subject';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5hbHlzaXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2FuYWx5c2lzL2FuYWx5c2lzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class GlobalEventSubjectService {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.clickEvents = new Subject();
|
|
7
|
-
}
|
|
8
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GlobalEventSubjectService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
9
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GlobalEventSubjectService, providedIn: 'root' }); }
|
|
10
|
-
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GlobalEventSubjectService, decorators: [{
|
|
12
|
-
type: Injectable,
|
|
13
|
-
args: [{
|
|
14
|
-
providedIn: 'root'
|
|
15
|
-
}]
|
|
16
|
-
}] });
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsLWV2ZW50LnN1YmplY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2FuYWx5c2lzL2dsb2JhbC1ldmVudC5zdWJqZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQzs7QUFLL0IsTUFBTSxPQUFPLHlCQUF5QjtJQUh0QztRQUlTLGdCQUFXLEdBQUcsSUFBSSxPQUFPLEVBQVMsQ0FBQztLQUMzQzsrR0FGWSx5QkFBeUI7bUhBQXpCLHlCQUF5QixjQUZ4QixNQUFNOzs0RkFFUCx5QkFBeUI7a0JBSHJDLFVBQVU7bUJBQUM7b0JBQ1YsVUFBVSxFQUFFLE1BQU07aUJBQ25CIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0YWJsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgU3ViamVjdCB9IGZyb20gJ3J4anMnO1xuXG5ASW5qZWN0YWJsZSh7XG4gIHByb3ZpZGVkSW46ICdyb290J1xufSlcbmV4cG9ydCBjbGFzcyBHbG9iYWxFdmVudFN1YmplY3RTZXJ2aWNlIHtcbiAgcHVibGljIGNsaWNrRXZlbnRzID0gbmV3IFN1YmplY3Q8RXZlbnQ+KCk7XG59XG4iXX0=
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from './global-event.subject';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2FuYWx5c2lzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsd0JBQXdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2dsb2JhbC1ldmVudC5zdWJqZWN0JztcbiJdfQ==
|
package/fesm2022/analysis.mjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
|
|
5
|
-
class GlobalEventSubjectService {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.clickEvents = new Subject();
|
|
8
|
-
}
|
|
9
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GlobalEventSubjectService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
10
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GlobalEventSubjectService, providedIn: 'root' }); }
|
|
11
|
-
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GlobalEventSubjectService, decorators: [{
|
|
13
|
-
type: Injectable,
|
|
14
|
-
args: [{
|
|
15
|
-
providedIn: 'root'
|
|
16
|
-
}]
|
|
17
|
-
}] });
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Generated bundle index. Do not edit.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
export { GlobalEventSubjectService };
|
|
24
|
-
//# sourceMappingURL=analysis.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analysis.mjs","sources":["../../../../packages/util/analysis/global-event.subject.ts","../../../../packages/util/analysis/analysis.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GlobalEventSubjectService {\n public clickEvents = new Subject<Event>();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,yBAAyB,CAAA;AAHtC,IAAA,WAAA,GAAA;AAIS,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,OAAO,EAAS,CAAC;AAC3C,KAAA;+GAFY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cAFxB,MAAM,EAAA,CAAA,CAAA,EAAA;;4FAEP,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAHrC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACLD;;AAEG;;;;"}
|