@yelon/util 15.2.4 → 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,29 +1,29 @@
1
- import type { NzSafeAny } from 'ng-zorro-antd/core/types';
2
- /**
3
- * Get the time range, return `[ Date, Date]` for the start and end dates
4
- *
5
- * 获取时间范围
6
- *
7
- * @param type 类型,带 `-` 表示过去一个时间,若指定 `number` 表示天数
8
- * @param time 开始时间
9
- * @param ignoreMaxTime 忽略追加结束日期的最大时间值
10
- */
11
- export declare function getTimeDistance(type: 'today' | '-today' | 'yesterday' | 'week' | '-week' | 'month' | '-month' | 'year' | '-year' | number, time?: Date | string | number, options?: {
12
- ignoreMaxTime?: boolean;
13
- }): [Date, Date];
14
- /**
15
- * fix time is the most, big value
16
- */
17
- export declare function fixEndTimeOfRange(dates: [Date, Date]): [Date, Date];
18
- export type ToDateOptions = string | {
19
- formatString?: string;
20
- defaultValue?: NzSafeAny;
21
- };
22
- /**
23
- * Return the date parsed from string using the given format string
24
- * - If the argument is a number, it is treated as a timestamp.
25
- *
26
- * @param formatString If parsing fails try to parse the date by pressing `formatString`
27
- * @param defaultValue If parsing fails returned default value, default: `new Date(NaN)`
28
- */
29
- export declare function toDate(value?: Date | string | number | null, options?: ToDateOptions): Date;
1
+ import type { NzSafeAny } from 'ng-zorro-antd/core/types';
2
+ /**
3
+ * Get the time range, return `[ Date, Date]` for the start and end dates
4
+ *
5
+ * 获取时间范围
6
+ *
7
+ * @param type 类型,带 `-` 表示过去一个时间,若指定 `number` 表示天数
8
+ * @param time 开始时间
9
+ * @param ignoreMaxTime 忽略追加结束日期的最大时间值
10
+ */
11
+ export declare function getTimeDistance(type: 'today' | '-today' | 'yesterday' | 'week' | '-week' | 'month' | '-month' | 'year' | '-year' | number, time?: Date | string | number, options?: {
12
+ ignoreMaxTime?: boolean;
13
+ }): [Date, Date];
14
+ /**
15
+ * fix time is the most, big value
16
+ */
17
+ export declare function fixEndTimeOfRange(dates: [Date, Date]): [Date, Date];
18
+ export type ToDateOptions = string | {
19
+ formatString?: string;
20
+ defaultValue?: NzSafeAny;
21
+ };
22
+ /**
23
+ * Return the date parsed from string using the given format string
24
+ * - If the argument is a number, it is treated as a timestamp.
25
+ *
26
+ * @param formatString If parsing fails try to parse the date by pressing `formatString`
27
+ * @param defaultValue If parsing fails returned default value, default: `new Date(NaN)`
28
+ */
29
+ export declare function toDate(value?: Date | string | number | null, options?: ToDateOptions): Date;
@@ -1,24 +1,24 @@
1
- import type { NzSafeAny } from 'ng-zorro-antd/core/types';
2
- export type BooleanInput = boolean | string | undefined | null;
3
- export type NumberInput = number | string | undefined | null;
4
- export declare function toBoolean(value: unknown, defaultValue?: boolean | null | undefined): boolean | null | undefined;
5
- /**
6
- * Input decorator that handle a prop to do get/set automatically with toBoolean
7
- *
8
- * ```ts
9
- * {AT}Input() {AT}InputBoolean() visible: boolean = false;
10
- * {AT}Input() {AT}InputBoolean(null) visible: boolean = false;
11
- * ```
12
- */
13
- export declare function InputBoolean(defaultValue?: boolean | null): NzSafeAny;
14
- export declare function toNumber(value: unknown): number;
15
- export declare function toNumber<D>(value: unknown, fallback: D): number | D;
16
- /**
17
- * Input decorator that handle a prop to do get/set automatically with toNumber
18
- *
19
- * ```ts
20
- * {AT}Input() {AT}InputNumber() visible: number = 1;
21
- * {AT}Input() {AT}InputNumber(null) visible: number = 2;
22
- * ```
23
- */
24
- export declare function InputNumber(defaultValue?: number | null): NzSafeAny;
1
+ import type { NzSafeAny } from 'ng-zorro-antd/core/types';
2
+ export type BooleanInput = boolean | string | undefined | null;
3
+ export type NumberInput = number | string | undefined | null;
4
+ export declare function toBoolean(value: unknown, defaultValue?: boolean | null | undefined): boolean | null | undefined;
5
+ /**
6
+ * Input decorator that handle a prop to do get/set automatically with toBoolean
7
+ *
8
+ * ```ts
9
+ * {AT}Input() {AT}InputBoolean() visible: boolean = false;
10
+ * {AT}Input() {AT}InputBoolean(null) visible: boolean = false;
11
+ * ```
12
+ */
13
+ export declare function InputBoolean(defaultValue?: boolean | null): NzSafeAny;
14
+ export declare function toNumber(value: unknown): number;
15
+ export declare function toNumber<D>(value: unknown, fallback: D): number | D;
16
+ /**
17
+ * Input decorator that handle a prop to do get/set automatically with toNumber
18
+ *
19
+ * ```ts
20
+ * {AT}Input() {AT}InputNumber() visible: number = 1;
21
+ * {AT}Input() {AT}InputNumber(null) visible: number = 2;
22
+ * ```
23
+ */
24
+ export declare function InputNumber(defaultValue?: number | null): NzSafeAny;
@@ -1,2 +1,2 @@
1
- export * from './convert';
2
- export * from './zone-outside';
1
+ export * from './convert';
2
+ export * from './zone-outside';
@@ -1,35 +1,35 @@
1
- export interface ZoneOptions {
2
- ngZoneName?: string;
3
- }
4
- type DecoratorType = (target: unknown, fn: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
5
- /**
6
- * The decoration method runs in `runOutsideAngular`
7
- *
8
- * 装饰方法运行在 `runOutsideAngular` 内
9
- *
10
- * ```ts
11
- * class MockClass {
12
- * constructor(public ngZone: NgZone) {}
13
- *
14
- * {AT}ZoneOutside()
15
- * runOutsideAngular(): void {}
16
- * }
17
- * ```
18
- */
19
- export declare function ZoneOutside(options?: ZoneOptions): DecoratorType;
20
- /**
21
- * The decoration method runs in `run`
22
- *
23
- * 装饰方法运行在 `run` 内
24
- *
25
- * ```ts
26
- * class MockClass {
27
- * constructor(public ngZone: NgZone) {}
28
- *
29
- * {AT}ZoneRun()
30
- * run(): void {}
31
- * }
32
- * ```
33
- */
34
- export declare function ZoneRun(options?: ZoneOptions): DecoratorType;
35
- export {};
1
+ export interface ZoneOptions {
2
+ ngZoneName?: string;
3
+ }
4
+ type DecoratorType = (target: unknown, fn: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
5
+ /**
6
+ * The decoration method runs in `runOutsideAngular`
7
+ *
8
+ * 装饰方法运行在 `runOutsideAngular` 内
9
+ *
10
+ * ```ts
11
+ * class MockClass {
12
+ * constructor(public ngZone: NgZone) {}
13
+ *
14
+ * {AT}ZoneOutside()
15
+ * runOutsideAngular(): void {}
16
+ * }
17
+ * ```
18
+ */
19
+ export declare function ZoneOutside(options?: ZoneOptions): DecoratorType;
20
+ /**
21
+ * The decoration method runs in `run`
22
+ *
23
+ * 装饰方法运行在 `run` 内
24
+ *
25
+ * ```ts
26
+ * class MockClass {
27
+ * constructor(public ngZone: NgZone) {}
28
+ *
29
+ * {AT}ZoneRun()
30
+ * run(): void {}
31
+ * }
32
+ * ```
33
+ */
34
+ export declare function ZoneRun(options?: ZoneOptions): DecoratorType;
35
+ export {};
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './index';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
5
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5hbHlzaXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2FuYWx5c2lzL2FuYWx5c2lzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -0,0 +1,18 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ class GlobalEventSubjectService {
5
+ constructor() {
6
+ this.clickEvents = new Subject();
7
+ }
8
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: GlobalEventSubjectService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
9
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: GlobalEventSubjectService, providedIn: 'root' }); }
10
+ }
11
+ export { GlobalEventSubjectService };
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: GlobalEventSubjectService, decorators: [{
13
+ type: Injectable,
14
+ args: [{
15
+ providedIn: 'root'
16
+ }]
17
+ }] });
18
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsLWV2ZW50LnN1YmplY3QuanMiLCJzb3VyY2V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QUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2dsb2JhbC1ldmVudC5zdWJqZWN0JztcclxuIl19
1
+ export * from './global-event.subject';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2FuYWx5c2lzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsd0JBQXdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2dsb2JhbC1ldmVudC5zdWJqZWN0JztcbiJdfQ==
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJyYXktdHlwZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9hcnJheS9hcnJheS10eXBlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgTnpUcmVlTm9kZSB9IGZyb20gJ25nLXpvcnJvLWFudGQvY29yZS90cmVlJztcblxuZXhwb3J0IGludGVyZmFjZSBBcnJheVNlcnZpY2VUcmVlVG9BcnJPcHRpb25zPFQgZXh0ZW5kcyBvYmplY3QgPSBhbnk+IHtcbiAgLyoqIOa3seW6pumhueWQje+8jOm7mOiupO+8mmAnZGVlcCdgICovXG4gIGRlZXBNYXBOYW1lPzogc3RyaW5nO1xuICAvKiog5omB5bmz5ZCO5pWw57uE55qE54i25pWw5o2u6aG55ZCN77yM6buY6K6k77yaYCdwYXJlbnQnYCAqL1xuICBwYXJlbnRNYXBOY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uICBba2V5OiBudW1iZXJdOiBhbnk7XG59XG4iXX0=
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './index';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
5
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJyYXkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2FycmF5L2FycmF5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -0,0 +1,278 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { NzTreeNode } from 'ng-zorro-antd/core/tree';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "@yelon/util/config";
5
+ class ArrayService {
6
+ constructor(cog) {
7
+ this.c = cog.merge('utilArray', {
8
+ deepMapName: 'deep',
9
+ parentMapName: 'parent',
10
+ idMapName: 'id',
11
+ parentIdMapName: 'parent_id',
12
+ childrenMapName: 'children',
13
+ titleMapName: 'title',
14
+ checkedMapname: 'checked',
15
+ selectedMapname: 'selected',
16
+ expandedMapname: 'expanded',
17
+ disabledMapname: 'disabled'
18
+ });
19
+ }
20
+ /**
21
+ * Convert tree structure to array structure
22
+ *
23
+ * 将树结构转换成数组结构
24
+ */
25
+ treeToArr(tree, options) {
26
+ const opt = {
27
+ deepMapName: this.c.deepMapName,
28
+ parentMapName: this.c.parentMapName,
29
+ childrenMapName: this.c.childrenMapName,
30
+ clearChildren: true,
31
+ cb: null,
32
+ ...options
33
+ };
34
+ const result = [];
35
+ const inFn = (list, parent, deep = 0) => {
36
+ for (const i of list) {
37
+ i[opt.deepMapName] = deep;
38
+ i[opt.parentMapName] = parent;
39
+ if (opt.cb) {
40
+ opt.cb(i, parent, deep);
41
+ }
42
+ result.push(i);
43
+ const children = i[opt.childrenMapName];
44
+ if (children != null && Array.isArray(children) && children.length > 0) {
45
+ inFn(children, i, deep + 1);
46
+ }
47
+ if (opt.clearChildren) {
48
+ delete i[opt.childrenMapName];
49
+ }
50
+ }
51
+ };
52
+ inFn(tree, null);
53
+ return result;
54
+ }
55
+ /**
56
+ * Convert array structure to tree structure
57
+ *
58
+ * 数组转换成树数据
59
+ */
60
+ arrToTree(arr, options) {
61
+ if (!Array.isArray(arr) || arr.length === 0) {
62
+ return [];
63
+ }
64
+ const opt = {
65
+ idMapName: this.c.idMapName,
66
+ parentIdMapName: this.c.parentIdMapName,
67
+ childrenMapName: this.c.childrenMapName,
68
+ cb: null,
69
+ ...options
70
+ };
71
+ const tree = [];
72
+ const childrenOf = {};
73
+ let rootPid = opt.rootParentIdValue;
74
+ const arrType = arr;
75
+ if (!rootPid) {
76
+ const pids = arrType.map(i => i[opt.parentIdMapName]);
77
+ const emptyPid = pids.findIndex(w => w == null);
78
+ rootPid = emptyPid !== -1 ? pids[emptyPid] : pids.sort()[0];
79
+ }
80
+ for (const item of arrType) {
81
+ const id = item[opt.idMapName];
82
+ const pid = item[opt.parentIdMapName];
83
+ childrenOf[id] = childrenOf[id] || [];
84
+ item[opt.childrenMapName] = childrenOf[id];
85
+ if (opt.cb) {
86
+ opt.cb(item);
87
+ }
88
+ if (pid !== rootPid) {
89
+ childrenOf[pid] = childrenOf[pid] || [];
90
+ childrenOf[pid].push(item);
91
+ }
92
+ else {
93
+ tree.push(item);
94
+ }
95
+ }
96
+ return tree;
97
+ }
98
+ /**
99
+ * 数组转换成 `nz-tree` 数据源,通过 `options` 转化项名,也可以使用 `options.cb` 更高级决定数据项
100
+ */
101
+ arrToTreeNode(arr, options) {
102
+ const opt = {
103
+ idMapName: this.c.idMapName,
104
+ parentIdMapName: this.c.parentIdMapName,
105
+ titleMapName: this.c.titleMapName,
106
+ isLeafMapName: 'isLeaf',
107
+ checkedMapname: this.c.checkedMapname,
108
+ selectedMapname: this.c.selectedMapname,
109
+ expandedMapname: this.c.expandedMapname,
110
+ disabledMapname: this.c.disabledMapname,
111
+ cb: null,
112
+ ...options
113
+ };
114
+ const tree = this.arrToTree(arr, {
115
+ idMapName: opt.idMapName,
116
+ parentIdMapName: opt.parentIdMapName,
117
+ childrenMapName: 'children'
118
+ });
119
+ this.visitTree(tree, (item, parent, deep) => {
120
+ item.key = item[opt.idMapName];
121
+ item.title = item[opt.titleMapName];
122
+ item.checked = item[opt.checkedMapname];
123
+ item.selected = item[opt.selectedMapname];
124
+ item.expanded = item[opt.expandedMapname];
125
+ item.disabled = item[opt.disabledMapname];
126
+ if (item[opt.isLeafMapName] == null) {
127
+ item.isLeaf = item.children.length === 0;
128
+ }
129
+ else {
130
+ item.isLeaf = item[opt.isLeafMapName];
131
+ }
132
+ if (opt.cb) {
133
+ opt.cb(item, parent, deep);
134
+ }
135
+ });
136
+ return tree.map(node => new NzTreeNode(node));
137
+ }
138
+ /**
139
+ * 递归访问整个树
140
+ */
141
+ visitTree(tree, cb, options) {
142
+ options = {
143
+ childrenMapName: this.c.childrenMapName,
144
+ ...options
145
+ };
146
+ const inFn = (data, parent, deep) => {
147
+ for (const item of data) {
148
+ cb(item, parent, deep);
149
+ const childrenVal = item[options.childrenMapName];
150
+ if (Array.isArray(childrenVal) && childrenVal.length > 0) {
151
+ inFn(childrenVal, item, deep + 1);
152
+ }
153
+ }
154
+ };
155
+ inFn(tree, null, 1);
156
+ }
157
+ /**
158
+ * Return the value of the first tree value in the tree where predicate is true, and `undefined` otherwise
159
+ *
160
+ * 根据条件返回树的第一个值,否则返回 `undefined`
161
+ */
162
+ findTree(tree, predicate, options) {
163
+ let res;
164
+ this.visitTree(tree, item => {
165
+ if (res === undefined && predicate(item)) {
166
+ res = item;
167
+ }
168
+ }, options);
169
+ return res;
170
+ }
171
+ /**
172
+ * 获取所有已经选中的 `key` 值
173
+ */
174
+ getKeysByTreeNode(tree, options) {
175
+ const opt = {
176
+ includeHalfChecked: true,
177
+ ...options
178
+ };
179
+ const keys = [];
180
+ this.visitTree(tree, (item, parent, deep) => {
181
+ if (item.isChecked || (opt.includeHalfChecked && item.isHalfChecked)) {
182
+ keys.push(opt.cb ? opt.cb(item, parent, deep) : opt.keyMapName ? item.origin[opt.keyMapName] : item.key);
183
+ }
184
+ });
185
+ return keys;
186
+ }
187
+ baseFlat(array, depth, result = []) {
188
+ let index = -1;
189
+ while (++index < array.length) {
190
+ const value = array[index];
191
+ if (depth > 0 && Array.isArray(value)) {
192
+ if (depth > 1) {
193
+ this.baseFlat(value, depth - 1, result);
194
+ }
195
+ else {
196
+ let pushIndex = -1;
197
+ const offset = result.length;
198
+ while (++pushIndex < value.length) {
199
+ result[offset + pushIndex] = value[pushIndex];
200
+ }
201
+ }
202
+ }
203
+ else {
204
+ result[result.length] = value;
205
+ }
206
+ }
207
+ return result;
208
+ }
209
+ /**
210
+ * Recursively flattens array
211
+ *
212
+ * 递归扁平数组
213
+ * ```ts
214
+ * srv.flat([1, [2, 3, [4, 5, [6]]]]) => [1,2,3,4,5,6]
215
+ * srv.flat([1, [2, 3, [4, 5, [6]]]], 1) => [1,2,3,[4, 5, [6]]]
216
+ * ```
217
+ */
218
+ flat(array, depth = 1 / 0) {
219
+ return Array.isArray(array) ? this.baseFlat(array, depth) : array;
220
+ }
221
+ /**
222
+ * Group the array
223
+ *
224
+ * 对数组进行分组
225
+ * ```ts
226
+ * srv.groupBy([6.1, 4.2, 6.3], Math.floor) => {"4":[4.2],"6":[6.1,6.3]}
227
+ * srv.groupBy(['one', 'two', 'three'], v => v.length) => {"3":["one","two"],"5":["three"]}
228
+ * ```
229
+ */
230
+ groupBy(array, iteratee) {
231
+ if (!Array.isArray(array)) {
232
+ return {};
233
+ }
234
+ return array.reduce((result, value) => {
235
+ const key = iteratee(value);
236
+ if (Object.prototype.hasOwnProperty.call(result, key)) {
237
+ result[key].push(value);
238
+ }
239
+ else {
240
+ result[key] = [value];
241
+ }
242
+ return result;
243
+ }, {});
244
+ }
245
+ /**
246
+ * Creates a duplicate-free version of an array
247
+ *
248
+ * 创建去重后的数组
249
+ * ```ts
250
+ * uniq([1, 2, 2, 3, 1]) => [1,2,3]
251
+ * uniq([{ a: 1 }, { a: 1 }, { a: 2 }], 'a') => [{"a":1},{"a":2}]
252
+ * uniq([{ a: 1 }, { a: 1 }, { a: 2 }], i => (i.a === 1 ? 'a' : 'b')) => [{"a":1},{"a":2}]
253
+ * ```
254
+ */
255
+ uniq(array, predicate) {
256
+ return Array.from(array
257
+ .reduce((map, value) => {
258
+ const key = predicate
259
+ ? typeof predicate === 'string'
260
+ ? value[predicate]
261
+ : predicate(value)
262
+ : value;
263
+ if (!map.has(key)) {
264
+ map.set(key, value);
265
+ }
266
+ return map;
267
+ }, new Map())
268
+ .values());
269
+ }
270
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: ArrayService, deps: [{ token: i1.YunzaiConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
271
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: ArrayService, providedIn: 'root' }); }
272
+ }
273
+ export { ArrayService };
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: ArrayService, decorators: [{
275
+ type: Injectable,
276
+ args: [{ providedIn: 'root' }]
277
+ }], ctorParameters: function () { return [{ type: i1.YunzaiConfigService }]; } });
278
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJyYXkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ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XSwgJ2EnKSA9PiBbe1wiYVwiOjF9LHtcImFcIjoyfV1cbiAgICogdW5pcShbeyBhOiAxIH0sIHsgYTogMSB9LCB7IGE6IDIgfV0sIGkgPT4gKGkuYSA9PT0gMSA/ICdhJyA6ICdiJykpID0+IFt7XCJhXCI6MX0se1wiYVwiOjJ9XVxuICAgKiBgYGBcbiAgICovXG4gIHVuaXE8VD4oYXJyYXk6IHJlYWRvbmx5IFRbXSwgcHJlZGljYXRlPzogc3RyaW5nIHwgKCh2YWx1ZTogVCkgPT4gc3RyaW5nIHwgbnVtYmVyIHwgYm9vbGVhbikpOiBUW10ge1xuICAgIHJldHVybiBBcnJheS5mcm9tKFxuICAgICAgYXJyYXlcbiAgICAgICAgLnJlZHVjZSgobWFwLCB2YWx1ZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IHByZWRpY2F0ZVxuICAgICAgICAgICAgPyB0eXBlb2YgcHJlZGljYXRlID09PSAnc3RyaW5nJ1xuICAgICAgICAgICAgICA/ICh2YWx1ZSBhcyBhbnkpW3ByZWRpY2F0ZV1cbiAgICAgICAgICAgICAgOiBwcmVkaWNhdGUhKHZhbHVlKVxuICAgICAgICAgICAgOiB2YWx1ZTtcbiAgICAgICAgICBpZiAoIW1hcC5oYXMoa2V5KSkge1xuICAgICAgICAgICAgbWFwLnNldChrZXksIHZhbHVlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG1hcDtcbiAgICAgICAgfSwgbmV3IE1hcDxzdHJpbmcgfCBudW1iZXIgfCBib29sZWFuLCBUPigpKVxuICAgICAgICAudmFsdWVzKClcbiAgICApO1xuICB9XG59XG4iXX0=
@@ -1,3 +1,3 @@
1
- export * from './array.service';
2
- export * from './array-type.service';
1
+ export * from './array.service';
2
+ export * from './array-type.service';
3
3
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2FycmF5L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxzQkFBc0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vYXJyYXkuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2FycmF5LXR5cGUuc2VydmljZSc7XG4iXX0=
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './index';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
5
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJvd3Nlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvYnJvd3Nlci9icm93c2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19