@delon/util 17.0.5 → 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.
Files changed (64) hide show
  1. package/browser/cookie.service.d.ts +2 -5
  2. package/browser/scroll.service.d.ts +3 -6
  3. package/config/cache/cache.type.d.ts +26 -0
  4. package/decorator/convert.d.ts +8 -0
  5. package/decorator/zone-outside.d.ts +2 -2
  6. package/esm2022/array/array.service.mjs +4 -4
  7. package/esm2022/browser/cookie.service.mjs +11 -14
  8. package/esm2022/browser/copy.mjs +1 -1
  9. package/esm2022/browser/is-empty.mjs +1 -1
  10. package/esm2022/browser/scroll.service.mjs +11 -14
  11. package/esm2022/browser/style.mjs +1 -1
  12. package/esm2022/config/cache/cache.type.mjs +1 -1
  13. package/esm2022/config/config.service.mjs +3 -3
  14. package/esm2022/date-time/picker.mjs +1 -1
  15. package/esm2022/date-time/time.mjs +1 -1
  16. package/esm2022/decorator/convert.mjs +9 -1
  17. package/esm2022/decorator/zone-outside.mjs +3 -3
  18. package/esm2022/form/match-control.mjs +1 -1
  19. package/esm2022/format/currency.service.mjs +10 -15
  20. package/esm2022/format/string.mjs +1 -1
  21. package/esm2022/math/in-range.mjs +1 -1
  22. package/esm2022/math/round.mjs +1 -1
  23. package/esm2022/other/assert.mjs +1 -1
  24. package/esm2022/other/deep.mjs +1 -1
  25. package/esm2022/other/lazy.service.mjs +8 -11
  26. package/esm2022/other/logger.mjs +1 -1
  27. package/esm2022/pipes/currency/cny.pipe.mjs +14 -14
  28. package/esm2022/pipes/currency/mega.pipe.mjs +15 -19
  29. package/esm2022/pipes/currency/module.mjs +4 -4
  30. package/esm2022/pipes/currency/price.pipe.mjs +18 -18
  31. package/esm2022/pipes/filter/filter.pipe.mjs +9 -9
  32. package/esm2022/pipes/filter/module.mjs +4 -4
  33. package/esm2022/pipes/format/mask.pipe.mjs +23 -23
  34. package/esm2022/pipes/format/module.mjs +4 -4
  35. package/esm2022/token/window.mjs +1 -1
  36. package/fesm2022/array.mjs +3 -3
  37. package/fesm2022/array.mjs.map +1 -1
  38. package/fesm2022/browser.mjs +18 -24
  39. package/fesm2022/browser.mjs.map +1 -1
  40. package/fesm2022/config.mjs +3 -3
  41. package/fesm2022/date-time.mjs.map +1 -1
  42. package/fesm2022/decorator.mjs +10 -2
  43. package/fesm2022/decorator.mjs.map +1 -1
  44. package/fesm2022/form.mjs.map +1 -1
  45. package/fesm2022/format.mjs +9 -14
  46. package/fesm2022/format.mjs.map +1 -1
  47. package/fesm2022/math.mjs.map +1 -1
  48. package/fesm2022/other.mjs +7 -10
  49. package/fesm2022/other.mjs.map +1 -1
  50. package/fesm2022/pipe-currency.mjs +44 -48
  51. package/fesm2022/pipe-currency.mjs.map +1 -1
  52. package/fesm2022/pipe-filter.mjs +12 -12
  53. package/fesm2022/pipe-filter.mjs.map +1 -1
  54. package/fesm2022/pipe-format.mjs +26 -26
  55. package/fesm2022/pipe-format.mjs.map +1 -1
  56. package/fesm2022/token.mjs.map +1 -1
  57. package/format/currency.service.d.ts +3 -2
  58. package/other/lazy.service.d.ts +1 -2
  59. package/package.json +1 -1
  60. package/pipes/currency/cny.pipe.d.ts +7 -8
  61. package/pipes/currency/mega.pipe.d.ts +7 -8
  62. package/pipes/currency/price.pipe.d.ts +11 -12
  63. package/pipes/filter/filter.pipe.d.ts +5 -5
  64. package/pipes/format/mask.pipe.d.ts +19 -19
@@ -1,84 +1,80 @@
1
1
  import * as i0 from '@angular/core';
2
- import { LOCALE_ID, Pipe, Inject, NgModule } from '@angular/core';
3
- import * as i1 from '@delon/util/format';
2
+ import { inject, LOCALE_ID, Pipe, NgModule } from '@angular/core';
3
+ import { CurrencyService } from '@delon/util/format';
4
4
 
5
+ /**
6
+ * Large number format filter
7
+ *
8
+ * 大数据格式化
9
+ */
5
10
  class CurrencyMegaPipe {
6
- constructor(srv, locale) {
7
- this.srv = srv;
8
- this.isCN = false;
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: "17.0.2", ngImport: i0, type: CurrencyMegaPipe, deps: [{ token: i1.CurrencyService }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
21
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: CurrencyMegaPipe, isStandalone: true, name: "mega" }); }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CurrencyMegaPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
20
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: CurrencyMegaPipe, isStandalone: true, name: "mega" }); }
22
21
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: CurrencyMegaPipe, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CurrencyMegaPipe, decorators: [{
24
23
  type: Pipe,
25
24
  args: [{ name: 'mega', standalone: true }]
26
- }], ctorParameters: () => [{ type: i1.CurrencyService }, { type: undefined, decorators: [{
27
- type: Inject,
28
- args: [LOCALE_ID]
29
- }] }] });
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(srv) {
33
- this.srv = 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: "17.0.2", ngImport: i0, type: CurrencyPricePipe, deps: [{ token: i1.CurrencyService }], target: i0.ɵɵFactoryTarget.Pipe }); }
48
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: CurrencyPricePipe, isStandalone: true, name: "price" }); }
43
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CurrencyPricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
44
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: CurrencyPricePipe, isStandalone: true, name: "price" }); }
49
45
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: CurrencyPricePipe, decorators: [{
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CurrencyPricePipe, decorators: [{
51
47
  type: Pipe,
52
48
  args: [{ name: 'price', standalone: true }]
53
- }], ctorParameters: () => [{ type: i1.CurrencyService }] });
49
+ }] });
54
50
 
51
+ /**
52
+ * Converted into RMB notation.
53
+ *
54
+ * 转化成人民币表示法
55
+ */
55
56
  class CurrencyCNYPipe {
56
- constructor(srv) {
57
- this.srv = 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: "17.0.2", ngImport: i0, type: CurrencyCNYPipe, deps: [{ token: i1.CurrencyService }], target: i0.ɵɵFactoryTarget.Pipe }); }
68
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: CurrencyCNYPipe, isStandalone: true, name: "cny" }); }
63
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CurrencyCNYPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
64
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: CurrencyCNYPipe, isStandalone: true, name: "cny" }); }
69
65
  }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: CurrencyCNYPipe, decorators: [{
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CurrencyCNYPipe, decorators: [{
71
67
  type: Pipe,
72
68
  args: [{ name: 'cny', standalone: true }]
73
- }], ctorParameters: () => [{ type: i1.CurrencyService }] });
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: "17.0.2", ngImport: i0, type: CurrencyPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
78
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: CurrencyPipeModule, imports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe], exports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe] }); }
79
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: CurrencyPipeModule }); }
73
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CurrencyPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
74
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: CurrencyPipeModule, imports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe], exports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe] }); }
75
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CurrencyPipeModule }); }
80
76
  }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: CurrencyPipeModule, decorators: [{
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CurrencyPipeModule, decorators: [{
82
78
  type: NgModule,
83
79
  args: [{
84
80
  imports: PIPES,
@@ -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 { Inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core';\n\nimport { CurrencyMegaOptions, CurrencyService } from '@delon/util/format';\n\n@Pipe({ name: 'mega', standalone: true })\nexport class CurrencyMegaPipe implements PipeTransform {\n private isCN = false;\n constructor(\n private srv: CurrencyService,\n @Inject(LOCALE_ID) locale: string\n ) {\n this.isCN = locale.startsWith('zh');\n }\n\n /**\n * Large number format filter\n *\n * 大数据格式化\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 } from '@angular/core';\n\nimport { CurrencyFormatOptions, CurrencyService } from '@delon/util/format';\n\n@Pipe({ name: 'price', standalone: true })\nexport class CurrencyPricePipe implements PipeTransform {\n constructor(private srv: CurrencyService) {}\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 transform(value: number | string, options?: CurrencyFormatOptions): string {\n return this.srv.format(value, options);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { CurrencyCNYOptions, CurrencyService } from '@delon/util/format';\n\n@Pipe({ name: 'cny', standalone: true })\nexport class CurrencyCNYPipe implements PipeTransform {\n constructor(private srv: CurrencyService) {}\n\n /**\n * Converted into RMB notation.\n *\n * 转化成人民币表示法\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":";;;;MAKa,gBAAgB,CAAA;IAE3B,WACU,CAAA,GAAoB,EACT,MAAc,EAAA;QADzB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAiB;QAFtB,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;QAKnB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;KACrC;AAED;;;;AAIG;IACH,SAAS,CAAC,KAAsB,EAAE,OAA6B,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B,EAAA,CAAA,CAAA,EAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,OAAO,EAAE,KAAK;AACf,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
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 '@delon/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 '@delon/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 '@delon/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":";;;;AAIA;;;;AAIG;MAEU,gBAAgB,CAAA;AAD7B,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QACvC,IAAI,CAAA,IAAA,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAMnD,KAAA;IAJC,SAAS,CAAC,KAAsB,EAAE,OAA6B,EAAA;AAC7D,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC1C,OAAO,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;KAC1D;8GAPU,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;4GAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IA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E,IAAI,EAAE,CAAA;;;ACHvC,MAAM,KAAK,GAAG,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,CAAC,CAAC;MAMxD,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAlB,kBAAkB,EAAA,OAAA,EAAA,CANhB,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAApD,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;+GAMtD,kBAAkB,EAAA,CAAA,CAAA,EAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,OAAO,EAAE,KAAK;AACf,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
@@ -1,31 +1,31 @@
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
+ */
4
9
  // eslint-disable-next-line @angular-eslint/no-pipe-impure
5
10
  class FilterPipe {
6
- /**
7
- * Filter array
8
- *
9
- * 过滤数组
10
- */
11
11
  transform(array, matcher, ...args) {
12
12
  return array.filter(i => matcher(i, ...args));
13
13
  }
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
15
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: FilterPipe, isStandalone: true, name: "filter", pure: false }); }
14
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
15
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: FilterPipe, isStandalone: true, name: "filter", pure: false }); }
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: FilterPipe, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: FilterPipe, decorators: [{
18
18
  type: Pipe,
19
19
  args: [{ name: 'filter', standalone: true, pure: false }]
20
20
  }] });
21
21
 
22
22
  const PIPES = [FilterPipe];
23
23
  class FilterPipeModule {
24
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: FilterPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
25
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: FilterPipeModule, imports: [FilterPipe], exports: [FilterPipe] }); }
26
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: FilterPipeModule }); }
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: FilterPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
25
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: FilterPipeModule, imports: [FilterPipe], exports: [FilterPipe] }); }
26
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: FilterPipeModule }); }
27
27
  }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: FilterPipeModule, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: FilterPipeModule, decorators: [{
29
29
  type: NgModule,
30
30
  args: [{
31
31
  imports: PIPES,
@@ -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// eslint-disable-next-line @angular-eslint/no-pipe-impure\n@Pipe({ name: 'filter', standalone: true, pure: false })\nexport class FilterPipe implements PipeTransform {\n /**\n * Filter array\n *\n * 过滤数组\n */\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;MAEa,UAAU,CAAA;AACrB;;;;AAIG;AACH,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;8GARU,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;;;ACDvD,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;;;;"}
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';\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
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: "17.0.2", ngImport: i0, type: FormatMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
29
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: FormatMaskPipe, isStandalone: true, name: "mask" }); }
28
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: FormatMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
29
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: FormatMaskPipe, isStandalone: true, name: "mask" }); }
30
30
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: FormatMaskPipe, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: FormatMaskPipe, decorators: [{
32
32
  type: Pipe,
33
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: "17.0.2", ngImport: i0, type: FormatPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
39
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: FormatPipeModule, imports: [FormatMaskPipe], exports: [FormatMaskPipe] }); }
40
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: FormatPipeModule }); }
38
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: FormatPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
39
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: FormatPipeModule, imports: [FormatMaskPipe], exports: [FormatMaskPipe] }); }
40
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: FormatPipeModule }); }
41
41
  }
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: FormatPipeModule, decorators: [{
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: FormatPipeModule, decorators: [{
43
43
  type: NgModule,
44
44
  args: [{
45
45
  imports: PIPES,
@@ -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 '@delon/util/format';\n\n@Pipe({ name: 'mask', standalone: true })\nexport class FormatMaskPipe implements PipeTransform {\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 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":";;;;MAKa,cAAc,CAAA;AACzB;;;;;;;;;;;;;;;;;;AAkBG;IACH,SAAS,CAAC,KAAa,EAAE,IAA+B,EAAA;AACtD,QAAA,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;KAChC;8GAtBU,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;;;ACAxC,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;;;;"}
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 '@delon/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;;;;"}
@@ -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;AAC5C,SAAA;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;;;;"}
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;;;;"}
@@ -2,10 +2,11 @@ import { AlainConfigService } from '@delon/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: AlainConfigService, locale: string, _defaultCurrencyCode?: string);
9
+ constructor(cog: AlainConfigService);
9
10
  /**
10
11
  * Format a number with commas as thousands separators
11
12
  *
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delon/util",
3
- "version": "17.0.5",
3
+ "version": "17.2.0",
4
4
  "author": "cipchk<cipchk@qq.com>",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,14 +1,13 @@
1
1
  import { PipeTransform } from '@angular/core';
2
- import { CurrencyCNYOptions, CurrencyService } from '@delon/util/format';
2
+ import { CurrencyCNYOptions } from '@delon/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
13
  static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyCNYPipe, "cny", true>;
@@ -1,15 +1,14 @@
1
1
  import { PipeTransform } from '@angular/core';
2
- import { CurrencyMegaOptions, CurrencyService } from '@delon/util/format';
2
+ import { CurrencyMegaOptions } from '@delon/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
14
  static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyMegaPipe, "mega", true>;
@@ -1,18 +1,17 @@
1
1
  import { PipeTransform } from '@angular/core';
2
- import { CurrencyFormatOptions, CurrencyService } from '@delon/util/format';
2
+ import { CurrencyFormatOptions } from '@delon/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
17
  static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyPricePipe, "price", true>;
@@ -1,12 +1,12 @@
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
12
  static ɵpipe: i0.ɵɵPipeDeclaration<FilterPipe, "filter", true>;
@@ -1,26 +1,26 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import { FormatMaskOption } from '@delon/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
26
  static ɵpipe: i0.ɵɵPipeDeclaration<FormatMaskPipe, "mask", true>;