@yelon/util 15.2.6 → 16.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +22 -22
  3. package/analysis/global-event.subject.d.ts +7 -7
  4. package/analysis/index.d.ts +1 -1
  5. package/array/array-type.service.d.ts +68 -68
  6. package/array/array.service.d.ts +78 -78
  7. package/array/index.d.ts +2 -2
  8. package/browser/cookie.service.d.ts +67 -67
  9. package/browser/copy.d.ts +6 -6
  10. package/browser/index.d.ts +5 -5
  11. package/browser/is-empty.d.ts +6 -6
  12. package/browser/scroll.service.d.ts +37 -37
  13. package/browser/style.d.ts +21 -21
  14. package/config/abc/date-picker.type.d.ts +52 -52
  15. package/config/abc/error-collect.type.d.ts +10 -10
  16. package/config/abc/exception.type.d.ts +9 -9
  17. package/config/abc/image.type.d.ts +15 -15
  18. package/config/abc/index.d.ts +17 -17
  19. package/config/abc/loading.type.d.ts +31 -31
  20. package/config/abc/lodop.type.d.ts +33 -33
  21. package/config/abc/media.type.d.ts +11 -11
  22. package/config/abc/onboarding.type.d.ts +4 -4
  23. package/config/abc/page-header.type.d.ts +39 -39
  24. package/config/abc/pdf.type.d.ts +35 -35
  25. package/config/abc/qr.type.d.ts +25 -25
  26. package/config/abc/se.type.d.ts +32 -32
  27. package/config/abc/sg.type.d.ts +10 -10
  28. package/config/abc/st.type.d.ts +465 -465
  29. package/config/abc/sv.type.d.ts +14 -14
  30. package/config/abc/xlsx.type.d.ts +12 -12
  31. package/config/abc/zip.type.d.ts +10 -10
  32. package/config/acl/acl.type.d.ts +32 -32
  33. package/config/auth/auth.type.d.ts +55 -55
  34. package/config/bis/bis.type.d.ts +7 -7
  35. package/config/cache/cache.type.d.ts +40 -40
  36. package/config/chart/chart.type.d.ts +33 -33
  37. package/config/config.service.d.ts +13 -13
  38. package/config/config.types.d.ts +48 -48
  39. package/config/index.d.ts +14 -14
  40. package/config/mock/mock.type.d.ts +18 -18
  41. package/config/sf/sf.type.d.ts +133 -133
  42. package/config/socket/socket.type.d.ts +4 -4
  43. package/config/theme/http.type.d.ts +14 -14
  44. package/config/theme/i18n.type.d.ts +14 -14
  45. package/config/theme/index.d.ts +3 -3
  46. package/config/theme/responsive.type.d.ts +12 -12
  47. package/config/util/array.type.d.ts +22 -22
  48. package/config/util/currency.type.d.ts +39 -39
  49. package/date-time/index.d.ts +2 -2
  50. package/date-time/picker.d.ts +68 -68
  51. package/date-time/time.d.ts +29 -29
  52. package/decorator/convert.d.ts +24 -24
  53. package/decorator/index.d.ts +2 -2
  54. package/decorator/zone-outside.d.ts +35 -35
  55. package/{esm2020 → esm2022}/analysis/analysis.mjs +4 -4
  56. package/esm2022/analysis/global-event.subject.mjs +18 -0
  57. package/{esm2020 → esm2022}/analysis/index.mjs +2 -2
  58. package/{esm2020 → esm2022}/array/array-type.service.mjs +1 -1
  59. package/{esm2020 → esm2022}/array/array.mjs +4 -4
  60. package/esm2022/array/array.service.mjs +278 -0
  61. package/{esm2020 → esm2022}/array/index.mjs +2 -2
  62. package/{esm2020 → esm2022}/browser/browser.mjs +4 -4
  63. package/esm2022/browser/cookie.service.mjs +104 -0
  64. package/{esm2020 → esm2022}/browser/copy.mjs +27 -27
  65. package/{esm2020 → esm2022}/browser/index.mjs +5 -5
  66. package/{esm2020 → esm2022}/browser/is-empty.mjs +18 -18
  67. package/esm2022/browser/scroll.service.mjs +89 -0
  68. package/{esm2020 → esm2022}/browser/style.mjs +37 -37
  69. package/{esm2020 → esm2022}/config/abc/date-picker.type.mjs +1 -1
  70. package/{esm2020 → esm2022}/config/abc/error-collect.type.mjs +1 -1
  71. package/{esm2020 → esm2022}/config/abc/exception.type.mjs +1 -1
  72. package/{esm2020 → esm2022}/config/abc/image.type.mjs +1 -1
  73. package/{esm2020 → esm2022}/config/abc/index.mjs +17 -17
  74. package/{esm2020 → esm2022}/config/abc/loading.type.mjs +1 -1
  75. package/{esm2020 → esm2022}/config/abc/lodop.type.mjs +1 -1
  76. package/{esm2020 → esm2022}/config/abc/media.type.mjs +1 -1
  77. package/{esm2020 → esm2022}/config/abc/onboarding.type.mjs +1 -1
  78. package/{esm2020 → esm2022}/config/abc/page-header.type.mjs +1 -1
  79. package/esm2022/config/abc/pdf.type.mjs +2 -0
  80. package/{esm2020 → esm2022}/config/abc/qr.type.mjs +1 -1
  81. package/{esm2020 → esm2022}/config/abc/se.type.mjs +1 -1
  82. package/{esm2020 → esm2022}/config/abc/sg.type.mjs +1 -1
  83. package/{esm2020 → esm2022}/config/abc/st.type.mjs +1 -1
  84. package/{esm2020 → esm2022}/config/abc/sv.type.mjs +2 -2
  85. package/{esm2020 → esm2022}/config/abc/xlsx.type.mjs +1 -1
  86. package/{esm2020 → esm2022}/config/abc/zip.type.mjs +1 -1
  87. package/{esm2020 → esm2022}/config/acl/acl.type.mjs +1 -1
  88. package/{esm2020 → esm2022}/config/auth/auth.type.mjs +1 -1
  89. package/{esm2020 → esm2022}/config/bis/bis.type.mjs +1 -1
  90. package/{esm2020 → esm2022}/config/cache/cache.type.mjs +1 -1
  91. package/{esm2020 → esm2022}/config/chart/chart.type.mjs +1 -1
  92. package/{esm2020 → esm2022}/config/config.mjs +4 -4
  93. package/esm2022/config/config.service.mjs +38 -0
  94. package/{esm2020 → esm2022}/config/config.types.mjs +8 -8
  95. package/{esm2020 → esm2022}/config/index.mjs +14 -14
  96. package/{esm2020 → esm2022}/config/mock/mock.type.mjs +1 -1
  97. package/{esm2020 → esm2022}/config/sf/sf.type.mjs +1 -1
  98. package/{esm2020 → esm2022}/config/socket/socket.type.mjs +1 -1
  99. package/{esm2020 → esm2022}/config/theme/http.type.mjs +1 -1
  100. package/{esm2020 → esm2022}/config/theme/i18n.type.mjs +1 -1
  101. package/{esm2020 → esm2022}/config/theme/index.mjs +3 -3
  102. package/{esm2020 → esm2022}/config/theme/responsive.type.mjs +1 -1
  103. package/{esm2020 → esm2022}/config/util/array.type.mjs +1 -1
  104. package/{esm2020 → esm2022}/config/util/currency.type.mjs +1 -1
  105. package/{esm2020 → esm2022}/date-time/date-time.mjs +4 -4
  106. package/{esm2020 → esm2022}/date-time/index.mjs +2 -2
  107. package/{esm2020 → esm2022}/date-time/picker.mjs +115 -115
  108. package/{esm2020 → esm2022}/date-time/time.mjs +88 -88
  109. package/{esm2020 → esm2022}/decorator/convert.mjs +57 -57
  110. package/{esm2020 → esm2022}/decorator/decorator.mjs +4 -4
  111. package/{esm2020 → esm2022}/decorator/index.mjs +2 -2
  112. package/{esm2020 → esm2022}/decorator/zone-outside.mjs +56 -56
  113. package/{esm2020 → esm2022}/form/form.mjs +4 -4
  114. package/{esm2020 → esm2022}/form/index.mjs +2 -2
  115. package/{esm2020 → esm2022}/form/match-control.mjs +29 -29
  116. package/{esm2020 → esm2022}/form/validators.mjs +80 -80
  117. package/esm2022/format/currency.service.mjs +239 -0
  118. package/{esm2020 → esm2022}/format/currency.types.mjs +7 -7
  119. package/{esm2020 → esm2022}/format/format.mjs +4 -4
  120. package/{esm2020 → esm2022}/format/index.mjs +4 -4
  121. package/{esm2020 → esm2022}/format/string.mjs +84 -84
  122. package/{esm2020 → esm2022}/format/validate.mjs +93 -93
  123. package/{esm2020 → esm2022}/index.mjs +12 -12
  124. package/{esm2020 → esm2022}/math/in-range.mjs +24 -24
  125. package/{esm2020 → esm2022}/math/index.mjs +2 -2
  126. package/{esm2020 → esm2022}/math/math.mjs +4 -4
  127. package/{esm2020 → esm2022}/math/round.mjs +52 -52
  128. package/{esm2020 → esm2022}/other/assert.mjs +66 -66
  129. package/{esm2020 → esm2022}/other/deep.mjs +77 -77
  130. package/{esm2020 → esm2022}/other/favicon.mjs +28 -28
  131. package/{esm2020 → esm2022}/other/index.mjs +7 -7
  132. package/esm2022/other/lazy.service.mjs +133 -0
  133. package/{esm2020 → esm2022}/other/logger.mjs +32 -32
  134. package/{esm2020 → esm2022}/other/other.mjs +4 -4
  135. package/esm2022/other/path-to-regexp.service.mjs +240 -0
  136. package/{esm2020 → esm2022}/other/resize.mjs +3 -3
  137. package/esm2022/pipes/currency/cny.pipe.mjs +24 -0
  138. package/{esm2020 → esm2022}/pipes/currency/index.mjs +4 -4
  139. package/esm2022/pipes/currency/mega.pipe.mjs +30 -0
  140. package/esm2022/pipes/currency/module.mjs +20 -0
  141. package/{esm2020 → esm2022}/pipes/currency/pipe-currency.mjs +4 -4
  142. package/esm2022/pipes/currency/price.pipe.mjs +28 -0
  143. package/esm2022/pipes/filter/filter.pipe.mjs +20 -0
  144. package/{esm2020 → esm2022}/pipes/filter/index.mjs +2 -2
  145. package/esm2022/pipes/filter/module.mjs +18 -0
  146. package/{esm2020 → esm2022}/pipes/filter/pipe-filter.mjs +4 -4
  147. package/{esm2020 → esm2022}/pipes/format/index.mjs +2 -2
  148. package/esm2022/pipes/format/mask.pipe.mjs +35 -0
  149. package/esm2022/pipes/format/module.mjs +18 -0
  150. package/{esm2020 → esm2022}/pipes/format/pipe-format.mjs +4 -4
  151. package/{esm2020 → esm2022}/pipes/index.mjs +3 -3
  152. package/{esm2020 → esm2022}/pipes/pipes.mjs +4 -4
  153. package/{esm2020 → esm2022}/token/index.mjs +2 -2
  154. package/{esm2020 → esm2022}/token/page-visibility.mjs +14 -14
  155. package/{esm2020 → esm2022}/token/token.mjs +4 -4
  156. package/{esm2020 → esm2022}/token/window.mjs +16 -16
  157. package/{esm2020 → esm2022}/yelon-util.mjs +4 -4
  158. package/{fesm2020 → fesm2022}/analysis.mjs +24 -24
  159. package/fesm2022/analysis.mjs.map +1 -0
  160. package/{fesm2020 → fesm2022}/array.mjs +284 -284
  161. package/{fesm2015 → fesm2022}/array.mjs.map +1 -1
  162. package/{fesm2020 → fesm2022}/browser.mjs +279 -279
  163. package/{fesm2020 → fesm2022}/browser.mjs.map +1 -1
  164. package/{fesm2020 → fesm2022}/config.mjs +54 -54
  165. package/{fesm2020 → fesm2022}/config.mjs.map +1 -1
  166. package/{fesm2020 → fesm2022}/date-time.mjs +211 -211
  167. package/{fesm2020 → fesm2022}/decorator.mjs +121 -121
  168. package/{fesm2020 → fesm2022}/form.mjs +118 -118
  169. package/{fesm2020 → fesm2022}/format.mjs +431 -431
  170. package/{fesm2020 → fesm2022}/format.mjs.map +1 -1
  171. package/{fesm2020 → fesm2022}/math.mjs +85 -85
  172. package/{fesm2020 → fesm2022}/other.mjs +586 -586
  173. package/{fesm2020 → fesm2022}/other.mjs.map +1 -1
  174. package/{fesm2020 → fesm2022}/pipe-currency.mjs +94 -94
  175. package/{fesm2020 → fesm2022}/pipe-currency.mjs.map +1 -1
  176. package/fesm2022/pipe-filter.mjs +40 -0
  177. package/{fesm2015 → fesm2022}/pipe-filter.mjs.map +1 -1
  178. package/{fesm2020 → fesm2022}/pipe-format.mjs +55 -55
  179. package/{fesm2015 → fesm2022}/pipe-format.mjs.map +1 -1
  180. package/{fesm2015 → fesm2022}/pipes.mjs +8 -8
  181. package/{fesm2020 → fesm2022}/token.mjs +37 -37
  182. package/{fesm2015 → fesm2022}/yelon-util.mjs +17 -17
  183. package/form/index.d.ts +2 -2
  184. package/form/match-control.d.ts +15 -15
  185. package/form/validators.d.ts +62 -62
  186. package/format/currency.service.d.ts +37 -37
  187. package/format/currency.types.d.ts +77 -77
  188. package/format/index.d.ts +4 -4
  189. package/format/string.d.ts +44 -44
  190. package/format/validate.d.ts +72 -72
  191. package/index.d.ts +12 -12
  192. package/math/in-range.d.ts +14 -14
  193. package/math/index.d.ts +2 -2
  194. package/math/round.d.ts +33 -33
  195. package/other/assert.d.ts +36 -36
  196. package/other/deep.d.ts +35 -35
  197. package/other/favicon.d.ts +2 -2
  198. package/other/index.d.ts +7 -7
  199. package/other/lazy.service.d.ts +48 -48
  200. package/other/logger.d.ts +5 -5
  201. package/other/path-to-regexp.service.d.ts +26 -26
  202. package/other/resize.d.ts +1 -1
  203. package/package.json +129 -165
  204. package/pipes/currency/cny.pipe.d.ts +15 -15
  205. package/pipes/currency/index.d.ts +4 -4
  206. package/pipes/currency/mega.pipe.d.ts +16 -16
  207. package/pipes/currency/module.d.ts +9 -9
  208. package/pipes/currency/price.pipe.d.ts +19 -19
  209. package/pipes/filter/filter.pipe.d.ts +13 -13
  210. package/pipes/filter/index.d.ts +2 -2
  211. package/pipes/filter/module.d.ts +7 -7
  212. package/pipes/format/index.d.ts +2 -2
  213. package/pipes/format/mask.pipe.d.ts +27 -27
  214. package/pipes/format/module.d.ts +7 -7
  215. package/pipes/index.d.ts +3 -3
  216. package/token/index.d.ts +2 -2
  217. package/token/page-visibility.d.ts +8 -8
  218. package/token/window.d.ts +7 -7
  219. package/esm2020/analysis/global-event.subject.mjs +0 -17
  220. package/esm2020/array/array.service.mjs +0 -277
  221. package/esm2020/browser/cookie.service.mjs +0 -103
  222. package/esm2020/browser/scroll.service.mjs +0 -88
  223. package/esm2020/config/abc/pdf.type.mjs +0 -2
  224. package/esm2020/config/config.service.mjs +0 -37
  225. package/esm2020/format/currency.service.mjs +0 -238
  226. package/esm2020/other/lazy.service.mjs +0 -132
  227. package/esm2020/other/path-to-regexp.service.mjs +0 -239
  228. package/esm2020/pipes/currency/cny.pipe.mjs +0 -23
  229. package/esm2020/pipes/currency/mega.pipe.mjs +0 -29
  230. package/esm2020/pipes/currency/module.mjs +0 -19
  231. package/esm2020/pipes/currency/price.pipe.mjs +0 -27
  232. package/esm2020/pipes/filter/filter.pipe.mjs +0 -19
  233. package/esm2020/pipes/filter/module.mjs +0 -17
  234. package/esm2020/pipes/format/mask.pipe.mjs +0 -34
  235. package/esm2020/pipes/format/module.mjs +0 -17
  236. package/fesm2015/analysis.mjs +0 -24
  237. package/fesm2015/analysis.mjs.map +0 -1
  238. package/fesm2015/array.mjs +0 -254
  239. package/fesm2015/browser.mjs +0 -283
  240. package/fesm2015/browser.mjs.map +0 -1
  241. package/fesm2015/config.mjs +0 -56
  242. package/fesm2015/config.mjs.map +0 -1
  243. package/fesm2015/date-time.mjs +0 -207
  244. package/fesm2015/date-time.mjs.map +0 -1
  245. package/fesm2015/decorator.mjs +0 -121
  246. package/fesm2015/decorator.mjs.map +0 -1
  247. package/fesm2015/form.mjs +0 -118
  248. package/fesm2015/format.mjs +0 -413
  249. package/fesm2015/format.mjs.map +0 -1
  250. package/fesm2015/math.mjs +0 -85
  251. package/fesm2015/other.mjs +0 -589
  252. package/fesm2015/other.mjs.map +0 -1
  253. package/fesm2015/pipe-currency.mjs +0 -96
  254. package/fesm2015/pipe-currency.mjs.map +0 -1
  255. package/fesm2015/pipe-filter.mjs +0 -40
  256. package/fesm2015/pipe-format.mjs +0 -55
  257. package/fesm2015/token.mjs +0 -37
  258. package/fesm2020/analysis.mjs.map +0 -1
  259. package/fesm2020/array.mjs.map +0 -1
  260. package/fesm2020/form.mjs.map +0 -1
  261. package/fesm2020/math.mjs.map +0 -1
  262. package/fesm2020/pipe-filter.mjs +0 -40
  263. package/fesm2020/pipe-filter.mjs.map +0 -1
  264. package/fesm2020/pipe-format.mjs.map +0 -1
  265. package/fesm2020/pipes.mjs +0 -8
  266. package/fesm2020/pipes.mjs.map +0 -1
  267. package/fesm2020/token.mjs.map +0 -1
  268. package/fesm2020/yelon-util.mjs +0 -17
  269. package/fesm2020/yelon-util.mjs.map +0 -1
  270. /package/{fesm2020 → fesm2022}/date-time.mjs.map +0 -0
  271. /package/{fesm2020 → fesm2022}/decorator.mjs.map +0 -0
  272. /package/{fesm2015 → fesm2022}/form.mjs.map +0 -0
  273. /package/{fesm2015 → fesm2022}/math.mjs.map +0 -0
  274. /package/{fesm2015 → fesm2022}/pipes.mjs.map +0 -0
  275. /package/{fesm2015 → fesm2022}/token.mjs.map +0 -0
  276. /package/{fesm2015 → fesm2022}/yelon-util.mjs.map +0 -0
@@ -1,239 +0,0 @@
1
- /* eslint-disable @typescript-eslint/explicit-function-return-type */
2
- import { Injectable } from '@angular/core';
3
- import * as i0 from "@angular/core";
4
- export class PathToRegexpService {
5
- constructor() {
6
- this.DEFAULT_DELIMITER = '/';
7
- this.PATH_REGEXP = new RegExp(['(\\\\.)', '(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?'].join('|'), 'g');
8
- }
9
- parse(str, options) {
10
- const tokens = [];
11
- let key = 0;
12
- let index = 0;
13
- let path = '';
14
- const defaultDelimiter = (options && options.delimiter) || this.DEFAULT_DELIMITER;
15
- const whitelist = (options && options.whitelist) || undefined;
16
- let pathEscaped = false;
17
- let res;
18
- while ((res = this.PATH_REGEXP.exec(str)) !== null) {
19
- const m = res[0];
20
- const escaped = res[1];
21
- const offset = res.index;
22
- path += str.slice(index, offset);
23
- index = offset + m.length;
24
- // Ignore already escaped sequences.
25
- if (escaped) {
26
- path += escaped[1];
27
- pathEscaped = true;
28
- continue;
29
- }
30
- let prev = '';
31
- const name = res[2];
32
- const capture = res[3];
33
- const group = res[4];
34
- const modifier = res[5];
35
- if (!pathEscaped && path.length) {
36
- const k = path.length - 1;
37
- const c = path[k];
38
- const matches = whitelist ? whitelist.indexOf(c) > -1 : true;
39
- if (matches) {
40
- prev = c;
41
- path = path.slice(0, k);
42
- }
43
- }
44
- // Push the current path onto the tokens.
45
- if (path) {
46
- tokens.push(path);
47
- path = '';
48
- pathEscaped = false;
49
- }
50
- const repeat = modifier === '+' || modifier === '*';
51
- const optional = modifier === '?' || modifier === '*';
52
- const pattern = capture || group;
53
- const delimiter = prev || defaultDelimiter;
54
- tokens.push({
55
- name: name || key++,
56
- prefix: prev,
57
- delimiter: delimiter,
58
- optional: optional,
59
- repeat: repeat,
60
- pattern: pattern
61
- ? this.escapeGroup(pattern)
62
- : `[^${this.escapeString(delimiter === defaultDelimiter ? delimiter : delimiter + defaultDelimiter)}]+?`
63
- });
64
- }
65
- // Push any remaining characters.
66
- if (path || index < str.length) {
67
- tokens.push(path + str.substr(index));
68
- }
69
- return tokens;
70
- }
71
- compile(str, options) {
72
- return this.tokensToFunction(this.parse(str, options), options);
73
- }
74
- tokensToFunction(tokens, options) {
75
- const matches = new Array(tokens.length);
76
- for (let i = 0; i < tokens.length; i++) {
77
- if (typeof tokens[i] === 'object') {
78
- matches[i] = new RegExp(`^(?:${tokens[i].pattern})$`, this.flags(options));
79
- }
80
- }
81
- return function (data, options) {
82
- let path = '';
83
- const encode = (options && options.encode) || encodeURIComponent;
84
- const validate = options ? options.validate !== false : true;
85
- for (let i = 0; i < tokens.length; i++) {
86
- const token = tokens[i];
87
- if (typeof token === 'string') {
88
- path += token;
89
- continue;
90
- }
91
- const value = data ? data[token.name] : undefined;
92
- let segment;
93
- if (Array.isArray(value)) {
94
- if (!token.repeat) {
95
- throw new TypeError(`Expected "${token.name}" to not repeat, but got array`);
96
- }
97
- if (value.length === 0) {
98
- if (token.optional) {
99
- continue;
100
- }
101
- throw new TypeError(`Expected "${token.name}" to not be empty`);
102
- }
103
- for (let j = 0; j < value.length; j++) {
104
- segment = encode(value[j], token);
105
- if (validate && !matches[i].test(segment)) {
106
- throw new TypeError(`Expected all "${token.name}" to match "${token.pattern}"`);
107
- }
108
- path += (j === 0 ? token.prefix : token.delimiter) + segment;
109
- }
110
- continue;
111
- }
112
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
113
- segment = encode(String(value), token);
114
- if (validate && !matches[i].test(segment)) {
115
- throw new TypeError(`Expected "${token.name}" to match "${token.pattern}", but got "${segment}"`);
116
- }
117
- path += token.prefix + segment;
118
- continue;
119
- }
120
- if (token.optional) {
121
- continue;
122
- }
123
- throw new TypeError(`Expected "${token.name}" to be ${token.repeat ? 'an array' : 'a string'}`);
124
- }
125
- return path;
126
- };
127
- }
128
- escapeString(str) {
129
- return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, '\\$1');
130
- }
131
- escapeGroup(group) {
132
- return group.replace(/([=!:$/()])/g, '\\$1');
133
- }
134
- flags(options) {
135
- return options && options.sensitive ? '' : 'i';
136
- }
137
- regexpToRegexp(path, keys) {
138
- if (!keys) {
139
- return path;
140
- }
141
- const groups = path.source.match(/\((?!\?)/g);
142
- if (groups) {
143
- for (let i = 0; i < groups.length; i++) {
144
- keys.push({
145
- name: i,
146
- prefix: null,
147
- delimiter: null,
148
- optional: false,
149
- repeat: false,
150
- pattern: null
151
- });
152
- }
153
- }
154
- return path;
155
- }
156
- arrayToRegexp(path, keys, options) {
157
- const parts = [];
158
- for (let i = 0; i < path.length; i++) {
159
- parts.push(this.pathToRegexp(path[i], keys, options).source);
160
- }
161
- return new RegExp(`(?:${parts.join('|')})`, this.flags(options));
162
- }
163
- stringToRegexp(path, keys, options) {
164
- return this.tokensToRegExp(this.parse(path, options), keys, options);
165
- }
166
- tokensToRegExp(tokens, keys, options) {
167
- options = options || {};
168
- const strict = options.strict;
169
- const start = options.start !== false;
170
- const end = options.end !== false;
171
- const delimiter = options.delimiter || this.DEFAULT_DELIMITER;
172
- const endsWith = []
173
- .concat(options.endsWith || [])
174
- .map(this.escapeString)
175
- .concat('$')
176
- .join('|');
177
- let route = start ? '^' : '';
178
- for (let i = 0; i < tokens.length; i++) {
179
- const token = tokens[i];
180
- if (typeof token === 'string') {
181
- route += this.escapeString(token);
182
- }
183
- else {
184
- const capture = token.repeat
185
- ? `(?:${token.pattern})(?:${this.escapeString(token.delimiter)}(?:${token.pattern}))*`
186
- : token.pattern;
187
- if (keys) {
188
- keys.push(token);
189
- }
190
- if (token.optional) {
191
- if (!token.prefix) {
192
- route += `(${capture})?`;
193
- }
194
- else {
195
- route += `(?:${this.escapeString(token.prefix)}(${capture}))?`;
196
- }
197
- }
198
- else {
199
- route += `${this.escapeString(token.prefix)}(${capture})`;
200
- }
201
- }
202
- }
203
- if (end) {
204
- if (!strict) {
205
- route += `(?:${this.escapeString(delimiter)})?`;
206
- }
207
- route += endsWith === '$' ? '$' : `(?=${endsWith})`;
208
- }
209
- else {
210
- const endToken = tokens[tokens.length - 1];
211
- const isEndDelimited = typeof endToken === 'string' ? endToken[endToken.length - 1] === delimiter : endToken === undefined;
212
- if (!strict) {
213
- route += `(?:${this.escapeString(delimiter)}(?=${endsWith}))?`;
214
- }
215
- if (!isEndDelimited) {
216
- route += `(?=${this.escapeString(delimiter)}|${endsWith})`;
217
- }
218
- }
219
- return new RegExp(route, this.flags(options));
220
- }
221
- pathToRegexp(path, keys, options) {
222
- if (path instanceof RegExp) {
223
- return this.regexpToRegexp(path, keys);
224
- }
225
- if (Array.isArray(path)) {
226
- return this.arrayToRegexp(/** @type {!Array} */ path, keys, options);
227
- }
228
- return this.stringToRegexp(/** @type {string} */ path, keys, options);
229
- }
230
- }
231
- PathToRegexpService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PathToRegexpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
232
- PathToRegexpService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PathToRegexpService, providedIn: 'root' });
233
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PathToRegexpService, decorators: [{
234
- type: Injectable,
235
- args: [{
236
- providedIn: 'root'
237
- }]
238
- }], ctorParameters: function () { return []; } });
239
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0aC10by1yZWdleHAuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvb3RoZXIvcGF0aC10by1yZWdleHAuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxxRUFBcUU7QUFDckUsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFLM0MsTUFBTSxPQUFPLG1CQUFtQjtJQUM5QjtRQUNBLHNCQUFpQixHQUFHLEdBQUcsQ0FBQztRQUV4QixnQkFBVyxHQUFHLElBQUksTUFBTSxDQUN0QixDQUFDLFNBQVMsRUFBRSxxRkFBcUYsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsRUFDNUcsR0FBRyxDQUNKLENBQUM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ofSkpP2A7XG4gICAgICB9XG4gICAgICBpZiAoIWlzRW5kRGVsaW1pdGVkKSB7XG4gICAgICAgIHJvdXRlICs9IGAoPz0ke3RoaXMuZXNjYXBlU3RyaW5nKGRlbGltaXRlcil9fCR7ZW5kc1dpdGh9KWA7XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG5ldyBSZWdFeHAocm91dGUsIHRoaXMuZmxhZ3Mob3B0aW9ucykpO1xuICB9XG5cbiAgcGF0aFRvUmVnZXhwKHBhdGg6IGFueSwga2V5czogYW55LCBvcHRpb25zOiBhbnkpIHtcbiAgICBpZiAocGF0aCBpbnN0YW5jZW9mIFJlZ0V4cCkge1xuICAgICAgcmV0dXJuIHRoaXMucmVnZXhwVG9SZWdleHAocGF0aCwga2V5cyk7XG4gICAgfVxuXG4gICAgaWYgKEFycmF5LmlzQXJyYXkocGF0aCkpIHtcbiAgICAgIHJldHVybiB0aGlzLmFycmF5VG9SZWdleHAoLyoqIEB0eXBlIHshQXJyYXl9ICovIHBhdGgsIGtleXMsIG9wdGlvbnMpO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLnN0cmluZ1RvUmVnZXhwKC8qKiBAdHlwZSB7c3RyaW5nfSAqLyBwYXRoLCBrZXlzLCBvcHRpb25zKTtcbiAgfVxufVxuIl19
@@ -1,23 +0,0 @@
1
- import { Pipe } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@yelon/util/format";
4
- export class CurrencyCNYPipe {
5
- constructor(srv) {
6
- this.srv = srv;
7
- }
8
- /**
9
- * Converted into RMB notation.
10
- *
11
- * 转化成人民币表示法
12
- */
13
- transform(value, options) {
14
- return this.srv.cny(value, options);
15
- }
16
- }
17
- CurrencyCNYPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CurrencyCNYPipe, deps: [{ token: i1.CurrencyService }], target: i0.ɵɵFactoryTarget.Pipe });
18
- CurrencyCNYPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: CurrencyCNYPipe, name: "cny" });
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CurrencyCNYPipe, decorators: [{
20
- type: Pipe,
21
- args: [{ name: 'cny' }]
22
- }], ctorParameters: function () { return [{ type: i1.CurrencyService }]; } });
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY255LnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL3BpcGVzL2N1cnJlbmN5L2NueS5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDOzs7QUFLcEQsTUFBTSxPQUFPLGVBQWU7SUFDMUIsWUFBb0IsR0FBb0I7UUFBcEIsUUFBRyxHQUFILEdBQUcsQ0FBaUI7SUFBRyxDQUFDO0lBRTVDOzs7O09BSUc7SUFDSCxTQUFTLENBQUMsS0FBc0IsRUFBRSxPQUE0QjtRQUM1RCxPQUFPLElBQUksQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLEtBQUssRUFBRSxPQUFPLENBQUMsQ0FBQztJQUN0QyxDQUFDOzs0R0FWVSxlQUFlOzBHQUFmLGVBQWU7MkZBQWYsZUFBZTtrQkFEM0IsSUFBSTttQkFBQyxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCB7IEN1cnJlbmN5Q05ZT3B0aW9ucywgQ3VycmVuY3lTZXJ2aWNlIH0gZnJvbSAnQHllbG9uL3V0aWwvZm9ybWF0JztcblxuQFBpcGUoeyBuYW1lOiAnY255JyB9KVxuZXhwb3J0IGNsYXNzIEN1cnJlbmN5Q05ZUGlwZSBpbXBsZW1lbnRzIFBpcGVUcmFuc2Zvcm0ge1xuICBjb25zdHJ1Y3Rvcihwcml2YXRlIHNydjogQ3VycmVuY3lTZXJ2aWNlKSB7fVxuXG4gIC8qKlxuICAgKiBDb252ZXJ0ZWQgaW50byBSTUIgbm90YXRpb24uXG4gICAqXG4gICAqIOi9rOWMluaIkOS6uuawkeW4geihqOekuuazlVxuICAgKi9cbiAgdHJhbnNmb3JtKHZhbHVlOiBudW1iZXIgfCBzdHJpbmcsIG9wdGlvbnM/OiBDdXJyZW5jeUNOWU9wdGlvbnMpOiBzdHJpbmcge1xuICAgIHJldHVybiB0aGlzLnNydi5jbnkodmFsdWUsIG9wdGlvbnMpO1xuICB9XG59XG4iXX0=
@@ -1,29 +0,0 @@
1
- import { Inject, LOCALE_ID, Pipe } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@yelon/util/format";
4
- export class CurrencyMegaPipe {
5
- constructor(srv, locale) {
6
- this.srv = srv;
7
- this.isCN = false;
8
- this.isCN = locale.startsWith('zh');
9
- }
10
- /**
11
- * Large number format filter
12
- *
13
- * 大数据格式化
14
- */
15
- transform(value, options) {
16
- const res = this.srv.mega(value, options);
17
- return res.value + (this.isCN ? res.unitI18n : res.unit);
18
- }
19
- }
20
- CurrencyMegaPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CurrencyMegaPipe, deps: [{ token: i1.CurrencyService }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
21
- CurrencyMegaPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: CurrencyMegaPipe, name: "mega" });
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CurrencyMegaPipe, decorators: [{
23
- type: Pipe,
24
- args: [{ name: 'mega' }]
25
- }], ctorParameters: function () { return [{ type: i1.CurrencyService }, { type: undefined, decorators: [{
26
- type: Inject,
27
- args: [LOCALE_ID]
28
- }] }]; } });
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVnYS5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9waXBlcy9jdXJyZW5jeS9tZWdhLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQzs7O0FBS3ZFLE1BQU0sT0FBTyxnQkFBZ0I7SUFFM0IsWUFBb0IsR0FBb0IsRUFBcUIsTUFBYztRQUF2RCxRQUFHLEdBQUgsR0FBRyxDQUFpQjtRQURoQyxTQUFJLEdBQUcsS0FBSyxDQUFDO1FBRW5CLElBQUksQ0FBQyxJQUFJLEdBQUcsTUFBTSxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUN0QyxDQUFDO0lBRUQ7Ozs7T0FJRztJQUNILFNBQVMsQ0FBQyxLQUFzQixFQUFFLE9BQTZCO1FBQzdELE1BQU0sR0FBRyxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLEtBQUssRUFBRSxPQUFPLENBQUMsQ0FBQztRQUMxQyxPQUFPLEdBQUcsQ0FBQyxLQUFLLEdBQUcsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDM0QsQ0FBQzs7NkdBZFUsZ0JBQWdCLGlEQUV1QixTQUFTOzJ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Module } from '@angular/core';
2
- import { CurrencyCNYPipe } from './cny.pipe';
3
- import { CurrencyMegaPipe } from './mega.pipe';
4
- import { CurrencyPricePipe } from './price.pipe';
5
- import * as i0 from "@angular/core";
6
- const PIPES = [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe];
7
- export class CurrencyPipeModule {
8
- }
9
- CurrencyPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CurrencyPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
- CurrencyPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: CurrencyPipeModule, declarations: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe], exports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe] });
11
- CurrencyPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CurrencyPipeModule });
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CurrencyPipeModule, decorators: [{
13
- type: NgModule,
14
- args: [{
15
- declarations: PIPES,
16
- exports: PIPES
17
- }]
18
- }] });
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9waXBlcy9jdXJyZW5jeS9tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sWUFBWSxDQUFDO0FBQzdDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUMvQyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxjQUFjLENBQUM7O0FBRWpELE1BQU0sS0FBSyxHQUFHLENBQUMsZ0JBQWdCLEVBQUUsaUJBQWlCLEVBQUUsZUFBZSxDQUFDLENBQUM7QUFNckUsTUFBTSxPQUFPLGtCQUFrQjs7K0dBQWxCLGtCQUFrQjtnSEFBbEIsa0JBQWtCLGlCQU5oQixnQkFBZ0IsRUFBRSxpQkFBaUIsRUFBRSxlQUFlLGFBQXBELGdCQUFnQixFQUFFLGlCQUFpQixFQUFFLGVBQWU7Z0hBTXRELGtCQUFrQjsyRkFBbEIsa0JBQWtCO2tCQUo5QixRQUFRO21CQUFDO29CQUNSLFlBQVksRUFBRSxLQUFLO29CQUNuQixPQUFPLEVBQUUsS0FBSztpQkFDZiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCB7IEN1cnJlbmN5Q05ZUGlwZSB9IGZyb20gJy4vY255LnBpcGUnO1xuaW1wb3J0IHsgQ3VycmVuY3lNZWdhUGlwZSB9IGZyb20gJy4vbWVnYS5waXBlJztcbmltcG9ydCB7IEN1cnJlbmN5UHJpY2VQaXBlIH0gZnJvbSAnLi9wcmljZS5waXBlJztcblxuY29uc3QgUElQRVMgPSBbQ3VycmVuY3lNZWdhUGlwZSwgQ3VycmVuY3lQcmljZVBpcGUsIEN1cnJlbmN5Q05ZUGlwZV07XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogUElQRVMsXG4gIGV4cG9ydHM6IFBJUEVTXG59KVxuZXhwb3J0IGNsYXNzIEN1cnJlbmN5UGlwZU1vZHVsZSB7fVxuIl19
@@ -1,27 +0,0 @@
1
- import { Pipe } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@yelon/util/format";
4
- export class CurrencyPricePipe {
5
- constructor(srv) {
6
- this.srv = srv;
7
- }
8
- /**
9
- * Format a number with commas as thousands separators
10
- *
11
- * 格式化货币,用逗号将数字格式化为千位分隔符
12
- * ```ts
13
- * 10000 => `10,000`
14
- * 10000.567 => `10,000.57`
15
- * ```
16
- */
17
- transform(value, options) {
18
- return this.srv.format(value, options);
19
- }
20
- }
21
- CurrencyPricePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CurrencyPricePipe, deps: [{ token: i1.CurrencyService }], target: i0.ɵɵFactoryTarget.Pipe });
22
- CurrencyPricePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: CurrencyPricePipe, name: "price" });
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CurrencyPricePipe, decorators: [{
24
- type: Pipe,
25
- args: [{ name: 'price' }]
26
- }], ctorParameters: function () { return [{ type: i1.CurrencyService }]; } });
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpY2UucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvcGlwZXMvY3VycmVuY3kvcHJpY2UucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQzs7O0FBS3BELE1BQU0sT0FBTyxpQkFBaUI7SUFDNUIsWUFBb0IsR0FBb0I7UUFBcEIsUUFBRyxHQUFILEdBQUcsQ0FBaUI7SUFBRyxDQUFDO0lBQzVDOzs7Ozs7OztPQVFHO0lBQ0gsU0FBUyxDQUFDLEtBQXNCLEVBQUUsT0FBK0I7UUFDL0QsT0FBTyxJQUFJLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxLQUFLLEVBQUUsT0FBTyxDQUFDLENBQUM7SUFDekMsQ0FBQzs7OEdBYlUsaUJBQWlCOzRHQUFqQixpQkFBaUI7MkZBQWpCLGlCQUFpQjtrQkFEN0IsSUFBSTttQkFBQyxFQUFFLElBQUksRUFBRSxPQUFPLEVBQUUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCB7IEN1cnJlbmN5Rm9ybWF0T3B0aW9ucywgQ3VycmVuY3lTZXJ2aWNlIH0gZnJvbSAnQHllbG9uL3V0aWwvZm9ybWF0JztcblxuQFBpcGUoeyBuYW1lOiAncHJpY2UnIH0pXG5leHBvcnQgY2xhc3MgQ3VycmVuY3lQcmljZVBpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcbiAgY29uc3RydWN0b3IocHJpdmF0ZSBzcnY6IEN1cnJlbmN5U2VydmljZSkge31cbiAgLyoqXG4gICAqIEZvcm1hdCBhIG51bWJlciB3aXRoIGNvbW1hcyBhcyB0aG91c2FuZHMgc2VwYXJhdG9yc1xuICAgKlxuICAgKiDmoLzlvI/ljJbotKfluIHvvIznlKjpgJflj7flsIbmlbDlrZfmoLzlvI/ljJbkuLrljYPkvY3liIbpmpTnrKZcbiAgICogYGBgdHNcbiAgICogMTAwMDAgPT4gYDEwLDAwMGBcbiAgICogMTAwMDAuNTY3ID0+IGAxMCwwMDAuNTdgXG4gICAqIGBgYFxuICAgKi9cbiAgdHJhbnNmb3JtKHZhbHVlOiBudW1iZXIgfCBzdHJpbmcsIG9wdGlvbnM/OiBDdXJyZW5jeUZvcm1hdE9wdGlvbnMpOiBzdHJpbmcge1xuICAgIHJldHVybiB0aGlzLnNydi5mb3JtYXQodmFsdWUsIG9wdGlvbnMpO1xuICB9XG59XG4iXX0=
@@ -1,19 +0,0 @@
1
- import { Pipe } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class FilterPipe {
4
- /**
5
- * Filter array
6
- *
7
- * 过滤数组
8
- */
9
- transform(array, matcher, ...args) {
10
- return array.filter(i => matcher(i, ...args));
11
- }
12
- }
13
- FilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
14
- FilterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FilterPipe, name: "filter" });
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FilterPipe, decorators: [{
16
- type: Pipe,
17
- args: [{ name: 'filter' }]
18
- }] });
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL3BpcGVzL2ZpbHRlci9maWx0ZXIucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQzs7QUFLcEQsTUFBTSxPQUFPLFVBQVU7SUFDckI7Ozs7T0FJRztJQUNILFNBQVMsQ0FBSSxLQUFtQixFQUFFLE9BQW1ELEVBQUUsR0FBRyxJQUFpQjtRQUN6RyxPQUFPLEtBQUssQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxFQUFFLEdBQUcsSUFBSSxDQUFDLENBQUMsQ0FBQztJQUNoRCxDQUFDOzt1R0FSVSxVQUFVO3FHQUFWLFVBQVU7MkZBQVYsVUFBVTtrQkFEdEIsSUFBSTttQkFBQyxFQUFFLElBQUksRUFBRSxRQUFRLEVBQUUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCB0eXBlIHsgTnpTYWZlQW55IH0gZnJvbSAnbmctem9ycm8tYW50ZC9jb3JlL3R5cGVzJztcblxuQFBpcGUoeyBuYW1lOiAnZmlsdGVyJyB9KVxuZXhwb3J0IGNsYXNzIEZpbHRlclBpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcbiAgLyoqXG4gICAqIEZpbHRlciBhcnJheVxuICAgKlxuICAgKiDov4fmu6TmlbDnu4RcbiAgICovXG4gIHRyYW5zZm9ybTxUPihhcnJheTogcmVhZG9ubHkgVFtdLCBtYXRjaGVyOiAoaXRlbTogVCwgLi4uYXJnczogTnpTYWZlQW55W10pID0+IGJvb2xlYW4sIC4uLmFyZ3M6IE56U2FmZUFueVtdKTogVFtdIHtcbiAgICByZXR1cm4gYXJyYXkuZmlsdGVyKGkgPT4gbWF0Y2hlcihpLCAuLi5hcmdzKSk7XG4gIH1cbn1cbiJdfQ==
@@ -1,17 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { FilterPipe } from './filter.pipe';
3
- import * as i0 from "@angular/core";
4
- const PIPES = [FilterPipe];
5
- export class FilterPipeModule {
6
- }
7
- FilterPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FilterPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8
- FilterPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FilterPipeModule, declarations: [FilterPipe], exports: [FilterPipe] });
9
- FilterPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FilterPipeModule });
10
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FilterPipeModule, decorators: [{
11
- type: NgModule,
12
- args: [{
13
- declarations: PIPES,
14
- exports: PIPES
15
- }]
16
- }] });
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9waXBlcy9maWx0ZXIvbW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFekMsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFFM0MsTUFBTSxLQUFLLEdBQUcsQ0FBQyxVQUFVLENBQUMsQ0FBQztBQU0zQixNQUFNLE9BQU8sZ0JBQWdCOzs2R0FBaEIsZ0JBQWdCOzhHQUFoQixnQkFBZ0IsaUJBTmQsVUFBVSxhQUFWLFVBQVU7OEdBTVosZ0JBQWdCOzJGQUFoQixnQkFBZ0I7a0JBSjVCLFFBQVE7bUJBQUM7b0JBQ1IsWUFBWSxFQUFFLEtBQUs7b0JBQ25CLE9BQU8sRUFBRSxLQUFLO2lCQUNmIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgRmlsdGVyUGlwZSB9IGZyb20gJy4vZmlsdGVyLnBpcGUnO1xuXG5jb25zdCBQSVBFUyA9IFtGaWx0ZXJQaXBlXTtcblxuQE5nTW9kdWxlKHtcbiAgZGVjbGFyYXRpb25zOiBQSVBFUyxcbiAgZXhwb3J0czogUElQRVNcbn0pXG5leHBvcnQgY2xhc3MgRmlsdGVyUGlwZU1vZHVsZSB7fVxuIl19
@@ -1,34 +0,0 @@
1
- import { Pipe } from '@angular/core';
2
- import { formatMask } from '@yelon/util/format';
3
- import * as i0 from "@angular/core";
4
- export class FormatMaskPipe {
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
- transform(value, mask) {
25
- return formatMask(value, mask);
26
- }
27
- }
28
- FormatMaskPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FormatMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
29
- FormatMaskPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FormatMaskPipe, name: "mask" });
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FormatMaskPipe, decorators: [{
31
- type: Pipe,
32
- args: [{ name: 'mask' }]
33
- }] });
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9waXBlcy9mb3JtYXQvbWFzay5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDO0FBRXBELE9BQU8sRUFBRSxVQUFVLEVBQW9CLE1BQU0sb0JBQW9CLENBQUM7O0FBR2xFLE1BQU0sT0FBTyxjQUFjO0lBQ3pCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7T0FrQkc7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5MDAwMDAwMDAnLCAnOTk5KioqKjk5OTknKSA9PiAxNTkqKioqMDAwMFxuICAgKiBgYGBcbiAgICovXG4gIHRyYW5zZm9ybSh2YWx1ZTogc3RyaW5nLCBtYXNrOiBzdHJpbmcgfCBGb3JtYXRNYXNrT3B0aW9uKTogc3RyaW5nIHtcbiAgICByZXR1cm4gZm9ybWF0TWFzayh2YWx1ZSwgbWFzayk7XG4gIH1cbn1cbiJdfQ==
@@ -1,17 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { FormatMaskPipe } from './mask.pipe';
3
- import * as i0 from "@angular/core";
4
- const PIPES = [FormatMaskPipe];
5
- export class FormatPipeModule {
6
- }
7
- FormatPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FormatPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8
- FormatPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FormatPipeModule, declarations: [FormatMaskPipe], exports: [FormatMaskPipe] });
9
- FormatPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FormatPipeModule });
10
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FormatPipeModule, decorators: [{
11
- type: NgModule,
12
- args: [{
13
- declarations: PIPES,
14
- exports: PIPES
15
- }]
16
- }] });
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9waXBlcy9mb3JtYXQvbW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFekMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGFBQWEsQ0FBQzs7QUFFN0MsTUFBTSxLQUFLLEdBQUcsQ0FBQyxjQUFjLENBQUMsQ0FBQztBQU0vQixNQUFNLE9BQU8sZ0JBQWdCOzs2R0FBaEIsZ0JBQWdCOzhHQUFoQixnQkFBZ0IsaUJBTmQsY0FBYyxhQUFkLGNBQWM7OEdBTWhCLGdCQUFnQjsyRkFBaEIsZ0JBQWdCO2tCQUo1QixRQUFRO21CQUFDO29CQUNSLFlBQVksRUFBRSxLQUFLO29CQUNuQixPQUFPLEVBQUUsS0FBSztpQkFDZiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCB7IEZvcm1hdE1hc2tQaXBlIH0gZnJvbSAnLi9tYXNrLnBpcGUnO1xuXG5jb25zdCBQSVBFUyA9IFtGb3JtYXRNYXNrUGlwZV07XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogUElQRVMsXG4gIGV4cG9ydHM6IFBJUEVTXG59KVxuZXhwb3J0IGNsYXNzIEZvcm1hdFBpcGVNb2R1bGUge31cbiJdfQ==
@@ -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
- }
10
- GlobalEventSubjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GlobalEventSubjectService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11
- GlobalEventSubjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GlobalEventSubjectService, providedIn: 'root' });
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", 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';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class GlobalEventSubjectService {\r\n public clickEvents = new Subject<Event>();\r\n}\r\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;KAC3C;;sHAFY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzB,yBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cAFxB,MAAM,EAAA,CAAA,CAAA;2FAEP,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAHrC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;ACLD;;AAEG;;;;"}