@yelon/util 13.4.2 → 13.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/browser/cookie.service.d.ts +1 -1
  2. package/browser/copy.d.ts +1 -1
  3. package/config/abc/media.type.d.ts +1 -1
  4. package/config/abc/st.type.d.ts +17 -0
  5. package/config/sf/sf.type.d.ts +6 -0
  6. package/esm2020/array/array.service.mjs +4 -4
  7. package/esm2020/browser/cookie.service.mjs +5 -5
  8. package/esm2020/browser/copy.mjs +21 -2
  9. package/esm2020/browser/scroll.service.mjs +4 -4
  10. package/esm2020/config/abc/media.type.mjs +1 -1
  11. package/esm2020/config/abc/st.type.mjs +1 -1
  12. package/esm2020/config/config.service.mjs +4 -4
  13. package/esm2020/config/sf/sf.type.mjs +1 -1
  14. package/esm2020/format/currency.service.mjs +4 -4
  15. package/esm2020/format/string.mjs +1 -1
  16. package/esm2020/other/lazy.service.mjs +5 -6
  17. package/esm2020/pipes/currency/cny.pipe.mjs +4 -4
  18. package/esm2020/pipes/currency/mega.pipe.mjs +4 -4
  19. package/esm2020/pipes/currency/module.mjs +5 -5
  20. package/esm2020/pipes/currency/price.pipe.mjs +4 -4
  21. package/esm2020/pipes/filter/filter.pipe.mjs +4 -4
  22. package/esm2020/pipes/filter/module.mjs +5 -5
  23. package/esm2020/pipes/format/mask.pipe.mjs +4 -4
  24. package/esm2020/pipes/format/module.mjs +5 -5
  25. package/esm2020/token/page-visibility.mjs +2 -3
  26. package/fesm2015/array.mjs +3 -3
  27. package/fesm2015/array.mjs.map +1 -1
  28. package/fesm2015/browser.mjs +27 -8
  29. package/fesm2015/browser.mjs.map +1 -1
  30. package/fesm2015/config.mjs +3 -3
  31. package/fesm2015/config.mjs.map +1 -1
  32. package/fesm2015/format.mjs +3 -3
  33. package/fesm2015/format.mjs.map +1 -1
  34. package/fesm2015/other.mjs +4 -5
  35. package/fesm2015/other.mjs.map +1 -1
  36. package/fesm2015/pipe-currency.mjs +13 -13
  37. package/fesm2015/pipe-currency.mjs.map +1 -1
  38. package/fesm2015/pipe-filter.mjs +7 -7
  39. package/fesm2015/pipe-filter.mjs.map +1 -1
  40. package/fesm2015/pipe-format.mjs +7 -7
  41. package/fesm2015/pipe-format.mjs.map +1 -1
  42. package/fesm2015/token.mjs +1 -2
  43. package/fesm2015/token.mjs.map +1 -1
  44. package/fesm2020/array.mjs +3 -3
  45. package/fesm2020/array.mjs.map +1 -1
  46. package/fesm2020/browser.mjs +27 -8
  47. package/fesm2020/browser.mjs.map +1 -1
  48. package/fesm2020/config.mjs +3 -3
  49. package/fesm2020/config.mjs.map +1 -1
  50. package/fesm2020/format.mjs +3 -3
  51. package/fesm2020/format.mjs.map +1 -1
  52. package/fesm2020/other.mjs +4 -5
  53. package/fesm2020/other.mjs.map +1 -1
  54. package/fesm2020/pipe-currency.mjs +13 -13
  55. package/fesm2020/pipe-currency.mjs.map +1 -1
  56. package/fesm2020/pipe-filter.mjs +7 -7
  57. package/fesm2020/pipe-filter.mjs.map +1 -1
  58. package/fesm2020/pipe-format.mjs +7 -7
  59. package/fesm2020/pipe-format.mjs.map +1 -1
  60. package/fesm2020/token.mjs +1 -2
  61. package/fesm2020/token.mjs.map +1 -1
  62. package/package.json +1 -1
@@ -18,9 +18,9 @@ class CurrencyMegaPipe {
18
18
  return res.value + (this.isCN ? res.unitI18n : res.unit);
19
19
  }
20
20
  }
21
- CurrencyMegaPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyMegaPipe, deps: [{ token: i1.CurrencyService }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
22
- CurrencyMegaPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyMegaPipe, name: "mega" });
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyMegaPipe, decorators: [{
21
+ CurrencyMegaPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyMegaPipe, deps: [{ token: i1.CurrencyService }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
22
+ CurrencyMegaPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyMegaPipe, name: "mega" });
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyMegaPipe, decorators: [{
24
24
  type: Pipe,
25
25
  args: [{ name: 'mega' }]
26
26
  }], ctorParameters: function () { return [{ type: i1.CurrencyService }, { type: undefined, decorators: [{
@@ -45,9 +45,9 @@ class CurrencyPricePipe {
45
45
  return this.srv.format(value, options);
46
46
  }
47
47
  }
48
- CurrencyPricePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyPricePipe, deps: [{ token: i1.CurrencyService }], target: i0.ɵɵFactoryTarget.Pipe });
49
- CurrencyPricePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyPricePipe, name: "price" });
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyPricePipe, decorators: [{
48
+ CurrencyPricePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyPricePipe, deps: [{ token: i1.CurrencyService }], target: i0.ɵɵFactoryTarget.Pipe });
49
+ CurrencyPricePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyPricePipe, name: "price" });
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyPricePipe, decorators: [{
51
51
  type: Pipe,
52
52
  args: [{ name: 'price' }]
53
53
  }], ctorParameters: function () { return [{ type: i1.CurrencyService }]; } });
@@ -65,9 +65,9 @@ class CurrencyCNYPipe {
65
65
  return this.srv.cny(value, options);
66
66
  }
67
67
  }
68
- CurrencyCNYPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyCNYPipe, deps: [{ token: i1.CurrencyService }], target: i0.ɵɵFactoryTarget.Pipe });
69
- CurrencyCNYPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyCNYPipe, name: "cny" });
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyCNYPipe, decorators: [{
68
+ CurrencyCNYPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyCNYPipe, deps: [{ token: i1.CurrencyService }], target: i0.ɵɵFactoryTarget.Pipe });
69
+ CurrencyCNYPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyCNYPipe, name: "cny" });
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyCNYPipe, decorators: [{
71
71
  type: Pipe,
72
72
  args: [{ name: 'cny' }]
73
73
  }], ctorParameters: function () { return [{ type: i1.CurrencyService }]; } });
@@ -75,10 +75,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
75
75
  const PIPES = [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe];
76
76
  class CurrencyPipeModule {
77
77
  }
78
- CurrencyPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
79
- CurrencyPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyPipeModule, declarations: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe], exports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe] });
80
- CurrencyPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyPipeModule });
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CurrencyPipeModule, decorators: [{
78
+ CurrencyPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
79
+ CurrencyPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyPipeModule, declarations: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe], exports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe] });
80
+ CurrencyPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyPipeModule });
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyPipeModule, decorators: [{
82
82
  type: NgModule,
83
83
  args: [{
84
84
  declarations: 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 '@yelon/util/format';\n\n@Pipe({ name: 'mega' })\nexport class CurrencyMegaPipe implements PipeTransform {\n private isCN = false;\n constructor(private srv: CurrencyService, @Inject(LOCALE_ID) locale: string) {\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 '@yelon/util/format';\n\n@Pipe({ name: 'price' })\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 '@yelon/util/format';\n\n@Pipe({ name: 'cny' })\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 declarations: 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,WAAoB,CAAA,GAAoB,EAAqB,MAAc,EAAA;QAAvD,IAAG,CAAA,GAAA,GAAH,GAAG,CAAiB;QADhC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AAA;AACR,oBAAA,YAAY,EAAE,KAAK;AACnB,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 { Inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core';\n\nimport { CurrencyMegaOptions, CurrencyService } from '@yelon/util/format';\n\n@Pipe({ name: 'mega' })\nexport class CurrencyMegaPipe implements PipeTransform {\n private isCN = false;\n constructor(private srv: CurrencyService, @Inject(LOCALE_ID) locale: string) {\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 '@yelon/util/format';\n\n@Pipe({ name: 'price' })\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 '@yelon/util/format';\n\n@Pipe({ name: 'cny' })\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 declarations: 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,WAAoB,CAAA,GAAoB,EAAqB,MAAc,EAAA;QAAvD,IAAG,CAAA,GAAA,GAAH,GAAG,CAAiB;QADhC,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;QAEnB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;KACrC;AAED;;;;AAIG;IACH,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;;AAdU,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,iDAEuB,SAAS,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAFhD,gBAAgB,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,CAAA;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,IAAI;mBAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;;0BAGuB,MAAM;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;MAMxD,kBAAkB,CAAA;;gHAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAlB,kBAAkB,EAAA,YAAA,EAAA,CANhB,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAApD,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;iHAMtD,kBAAkB,EAAA,CAAA,CAAA;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,KAAK;AACnB,oBAAA,OAAO,EAAE,KAAK;AACf,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
@@ -11,9 +11,9 @@ class FilterPipe {
11
11
  return array.filter(i => matcher(i, ...args));
12
12
  }
13
13
  }
14
- FilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
15
- FilterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FilterPipe, name: "filter" });
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FilterPipe, decorators: [{
14
+ FilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
15
+ FilterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterPipe, name: "filter" });
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterPipe, decorators: [{
17
17
  type: Pipe,
18
18
  args: [{ name: 'filter' }]
19
19
  }] });
@@ -21,10 +21,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
21
21
  const PIPES = [FilterPipe];
22
22
  class FilterPipeModule {
23
23
  }
24
- FilterPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FilterPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
25
- FilterPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FilterPipeModule, declarations: [FilterPipe], exports: [FilterPipe] });
26
- FilterPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FilterPipeModule });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FilterPipeModule, decorators: [{
24
+ FilterPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
25
+ FilterPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterPipeModule, declarations: [FilterPipe], exports: [FilterPipe] });
26
+ FilterPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterPipeModule });
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterPipeModule, decorators: [{
28
28
  type: NgModule,
29
29
  args: [{
30
30
  declarations: 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@Pipe({ name: 'filter' })\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 declarations: PIPES,\n exports: PIPES\n})\nexport class FilterPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAKa,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;;uGARU,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;qGAAV,UAAU,EAAA,IAAA,EAAA,QAAA,EAAA,CAAA,CAAA;2FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBADtB,IAAI;mBAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;;;ACAxB,MAAM,KAAK,GAAG,CAAC,UAAU,CAAC,CAAC;MAMd,gBAAgB,CAAA;;6GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;8GAAhB,gBAAgB,EAAA,YAAA,EAAA,CANd,UAAU,CAAA,EAAA,OAAA,EAAA,CAAV,UAAU,CAAA,EAAA,CAAA,CAAA;8GAMZ,gBAAgB,EAAA,CAAA,CAAA;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,KAAK;AACnB,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@Pipe({ name: 'filter' })\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 declarations: PIPES,\n exports: PIPES\n})\nexport class FilterPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAKa,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;;wGARU,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;sGAAV,UAAU,EAAA,IAAA,EAAA,QAAA,EAAA,CAAA,CAAA;4FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBADtB,IAAI;mBAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;;;ACAxB,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;+GAAhB,gBAAgB,EAAA,YAAA,EAAA,CANd,UAAU,CAAA,EAAA,OAAA,EAAA,CAAV,UAAU,CAAA,EAAA,CAAA,CAAA;+GAMZ,gBAAgB,EAAA,CAAA,CAAA;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,KAAK;AACnB,oBAAA,OAAO,EAAE,KAAK;AACf,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
@@ -26,9 +26,9 @@ class FormatMaskPipe {
26
26
  return formatMask(value, mask);
27
27
  }
28
28
  }
29
- FormatMaskPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FormatMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
30
- FormatMaskPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FormatMaskPipe, name: "mask" });
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FormatMaskPipe, decorators: [{
29
+ FormatMaskPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
30
+ FormatMaskPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatMaskPipe, name: "mask" });
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatMaskPipe, decorators: [{
32
32
  type: Pipe,
33
33
  args: [{ name: 'mask' }]
34
34
  }] });
@@ -36,10 +36,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
36
36
  const PIPES = [FormatMaskPipe];
37
37
  class FormatPipeModule {
38
38
  }
39
- FormatPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FormatPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
40
- FormatPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FormatPipeModule, declarations: [FormatMaskPipe], exports: [FormatMaskPipe] });
41
- FormatPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FormatPipeModule });
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FormatPipeModule, decorators: [{
39
+ FormatPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
40
+ FormatPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatPipeModule, declarations: [FormatMaskPipe], exports: [FormatMaskPipe] });
41
+ FormatPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatPipeModule });
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatPipeModule, decorators: [{
43
43
  type: NgModule,
44
44
  args: [{
45
45
  declarations: 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 '@yelon/util/format';\n\n@Pipe({ name: 'mask' })\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 declarations: 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;;2GAtBU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;yGAAd,cAAc,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,CAAA;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,IAAI;mBAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;;;ACAtB,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,CAAC;MAMlB,gBAAgB,CAAA;;6GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;8GAAhB,gBAAgB,EAAA,YAAA,EAAA,CANd,cAAc,CAAA,EAAA,OAAA,EAAA,CAAd,cAAc,CAAA,EAAA,CAAA,CAAA;8GAMhB,gBAAgB,EAAA,CAAA,CAAA;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,KAAK;AACnB,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 '@yelon/util/format';\n\n@Pipe({ name: 'mask' })\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 declarations: 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;;4GAtBU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;0GAAd,cAAc,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,CAAA;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,IAAI;mBAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;;;ACAtB,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;+GAAhB,gBAAgB,EAAA,YAAA,EAAA,CANd,cAAc,CAAA,EAAA,OAAA,EAAA,CAAd,cAAc,CAAA,EAAA,CAAA,CAAA;+GAMhB,gBAAgB,EAAA,CAAA,CAAA;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,KAAK;AACnB,oBAAA,OAAO,EAAE,KAAK;AACf,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
@@ -1,7 +1,6 @@
1
1
  import { DOCUMENT } from '@angular/common';
2
2
  import { InjectionToken, inject } from '@angular/core';
3
- import { fromEvent } from 'rxjs';
4
- import { startWith, map, distinctUntilChanged, share } from 'rxjs/operators';
3
+ import { fromEvent, startWith, map, distinctUntilChanged, share } from 'rxjs';
5
4
 
6
5
  /**
7
6
  * Access to global `window` object
@@ -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 } from 'rxjs';\nimport { distinctUntilChanged, map, share, startWith } from 'rxjs/operators';\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;;ACXD;;;;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;;ACpBD;;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;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;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yelon/util",
3
- "version": "13.4.2",
3
+ "version": "13.5.2",
4
4
  "author": "devcui<devcui@outlook.com>",
5
5
  "license": "MIT",
6
6
  "dependencies": {