@yelon/util 12.0.19 → 13.0.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. package/{date-time/yelon-util-date-time.d.ts → array/array.d.ts} +1 -0
  2. package/array/array.service.d.ts +3 -0
  3. package/array/package.json +6 -7
  4. package/browser/browser.d.ts +1 -0
  5. package/browser/cookie.service.d.ts +3 -0
  6. package/browser/copy.d.ts +1 -1
  7. package/browser/package.json +5 -6
  8. package/browser/scroll.service.d.ts +3 -0
  9. package/config/config.d.ts +5 -0
  10. package/config/config.service.d.ts +3 -0
  11. package/config/package.json +6 -7
  12. package/date-time/date-time.d.ts +5 -0
  13. package/date-time/package.json +6 -7
  14. package/decorator/decorator.d.ts +5 -0
  15. package/decorator/package.json +6 -7
  16. package/{esm2015/array/array-type.service.js → esm2020/array/array-type.service.mjs} +0 -0
  17. package/esm2020/array/array.mjs +5 -0
  18. package/esm2020/array/array.service.mjs +278 -0
  19. package/{esm2015/array/index.js → esm2020/array/index.mjs} +0 -0
  20. package/{esm2015/browser/browser.js → esm2020/browser/browser.mjs} +0 -0
  21. package/esm2020/browser/cookie.service.mjs +103 -0
  22. package/esm2020/browser/copy.mjs +9 -0
  23. package/{esm2015/browser/index.js → esm2020/browser/index.mjs} +0 -0
  24. package/{esm2015/browser/is-empty.js → esm2020/browser/is-empty.mjs} +0 -0
  25. package/esm2020/browser/scroll.service.mjs +88 -0
  26. package/{esm2015/browser/style.js → esm2020/browser/style.mjs} +2 -2
  27. package/{esm2015/config/abc/date-picker.type.js → esm2020/config/abc/date-picker.type.mjs} +0 -0
  28. package/{esm2015/config/abc/error-collect.type.js → esm2020/config/abc/error-collect.type.mjs} +0 -0
  29. package/{esm2015/config/abc/image.type.js → esm2020/config/abc/image.type.mjs} +0 -0
  30. package/{esm2015/config/abc/index.js → esm2020/config/abc/index.mjs} +0 -0
  31. package/{esm2015/config/abc/loading.type.js → esm2020/config/abc/loading.type.mjs} +0 -0
  32. package/{esm2015/config/abc/lodop.type.js → esm2020/config/abc/lodop.type.mjs} +0 -0
  33. package/{esm2015/config/abc/media.type.js → esm2020/config/abc/media.type.mjs} +0 -0
  34. package/{esm2015/config/abc/onboarding.type.js → esm2020/config/abc/onboarding.type.mjs} +0 -0
  35. package/{esm2015/config/abc/page-header.type.js → esm2020/config/abc/page-header.type.mjs} +0 -0
  36. package/{esm2015/config/abc/pdf.type.js → esm2020/config/abc/pdf.type.mjs} +0 -0
  37. package/{esm2015/config/abc/qr.type.js → esm2020/config/abc/qr.type.mjs} +0 -0
  38. package/{esm2015/config/abc/se.type.js → esm2020/config/abc/se.type.mjs} +0 -0
  39. package/{esm2015/config/abc/sg.type.js → esm2020/config/abc/sg.type.mjs} +0 -0
  40. package/{esm2015/config/abc/st.type.js → esm2020/config/abc/st.type.mjs} +0 -0
  41. package/{esm2015/config/abc/sv.type.js → esm2020/config/abc/sv.type.mjs} +0 -0
  42. package/{esm2015/config/abc/xlsx.type.js → esm2020/config/abc/xlsx.type.mjs} +0 -0
  43. package/{esm2015/config/abc/zip.type.js → esm2020/config/abc/zip.type.mjs} +0 -0
  44. package/{esm2015/config/acl/acl.type.js → esm2020/config/acl/acl.type.mjs} +0 -0
  45. package/{esm2015/config/auth/auth.type.js → esm2020/config/auth/auth.type.mjs} +0 -0
  46. package/{esm2015/config/bis/bis.type.js → esm2020/config/bis/bis.type.mjs} +0 -0
  47. package/{esm2015/config/cache/cache.type.js → esm2020/config/cache/cache.type.mjs} +0 -0
  48. package/{esm2015/config/chart/chart.type.js → esm2020/config/chart/chart.type.mjs} +0 -0
  49. package/esm2020/config/config.mjs +5 -0
  50. package/esm2020/config/config.service.mjs +37 -0
  51. package/{esm2015/config/config.types.js → esm2020/config/config.types.mjs} +0 -0
  52. package/{esm2015/config/index.js → esm2020/config/index.mjs} +0 -0
  53. package/{esm2015/config/mock/mock.type.js → esm2020/config/mock/mock.type.mjs} +0 -0
  54. package/{esm2015/config/sf/sf.type.js → esm2020/config/sf/sf.type.mjs} +0 -0
  55. package/{esm2015/config/stomp/stomp.type.js → esm2020/config/stomp/stomp.type.mjs} +0 -0
  56. package/{esm2015/config/theme/http.type.js → esm2020/config/theme/http.type.mjs} +0 -0
  57. package/{esm2015/config/theme/i18n.type.js → esm2020/config/theme/i18n.type.mjs} +0 -0
  58. package/{esm2015/config/theme/index.js → esm2020/config/theme/index.mjs} +0 -0
  59. package/{esm2015/config/theme/responsive.type.js → esm2020/config/theme/responsive.type.mjs} +0 -0
  60. package/{esm2015/config/util/array.type.js → esm2020/config/util/array.type.mjs} +0 -0
  61. package/{esm2015/config/util/currency.type.js → esm2020/config/util/currency.type.mjs} +0 -0
  62. package/esm2020/date-time/date-time.mjs +5 -0
  63. package/{esm2015/date-time/index.js → esm2020/date-time/index.mjs} +0 -0
  64. package/esm2020/date-time/picker.mjs +116 -0
  65. package/{esm2015/date-time/time.js → esm2020/date-time/time.mjs} +6 -2
  66. package/esm2020/decorator/convert.mjs +58 -0
  67. package/esm2020/decorator/decorator.mjs +5 -0
  68. package/{esm2015/decorator/index.js → esm2020/decorator/index.mjs} +0 -0
  69. package/esm2020/decorator/zone-outside.mjs +57 -0
  70. package/esm2020/form/form.mjs +5 -0
  71. package/{esm2015/form/index.js → esm2020/form/index.mjs} +0 -0
  72. package/{esm2015/form/match-control.js → esm2020/form/match-control.mjs} +0 -0
  73. package/{esm2015/form/validators.js → esm2020/form/validators.mjs} +0 -0
  74. package/esm2020/format/currency.service.mjs +238 -0
  75. package/{esm2015/format/currency.types.js → esm2020/format/currency.types.mjs} +0 -0
  76. package/esm2020/format/format.mjs +5 -0
  77. package/{esm2015/format/index.js → esm2020/format/index.mjs} +0 -0
  78. package/esm2020/format/string.mjs +85 -0
  79. package/{esm2015/format/validate.js → esm2020/format/validate.mjs} +0 -0
  80. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  81. package/{esm2015/math/in-range.js → esm2020/math/in-range.mjs} +0 -0
  82. package/{esm2015/math/index.js → esm2020/math/index.mjs} +0 -0
  83. package/esm2020/math/math.mjs +5 -0
  84. package/{esm2015/math/round.js → esm2020/math/round.mjs} +0 -0
  85. package/{esm2015/other/assert.js → esm2020/other/assert.mjs} +0 -0
  86. package/{esm2015/other/deep.js → esm2020/other/deep.mjs} +0 -0
  87. package/{esm2015/other/index.js → esm2020/other/index.mjs} +0 -0
  88. package/esm2020/other/lazy.service.mjs +119 -0
  89. package/{esm2015/other/logger.js → esm2020/other/logger.mjs} +0 -0
  90. package/esm2020/other/other.mjs +5 -0
  91. package/{esm2015/other/resize.js → esm2020/other/resize.mjs} +0 -0
  92. package/{esm2015/other/url.js → esm2020/other/url.mjs} +0 -0
  93. package/esm2020/pipes/currency/cny.pipe.mjs +23 -0
  94. package/{esm2015/pipes/currency/index.js → esm2020/pipes/currency/index.mjs} +2 -1
  95. package/esm2020/pipes/currency/mega.pipe.mjs +29 -0
  96. package/esm2020/pipes/currency/module.mjs +19 -0
  97. package/esm2020/pipes/currency/pipe-currency.mjs +5 -0
  98. package/esm2020/pipes/currency/price.pipe.mjs +27 -0
  99. package/esm2020/pipes/filter/filter.pipe.mjs +19 -0
  100. package/{esm2015/pipes/filter/index.js → esm2020/pipes/filter/index.mjs} +0 -0
  101. package/esm2020/pipes/filter/module.mjs +17 -0
  102. package/{esm2015/other/yelon-util-other.js → esm2020/pipes/filter/pipe-filter.mjs} +1 -1
  103. package/{esm2015/pipes/format/index.js → esm2020/pipes/format/index.mjs} +0 -0
  104. package/esm2020/pipes/format/mask.pipe.mjs +34 -0
  105. package/esm2020/pipes/format/module.mjs +17 -0
  106. package/{esm2015/array/yelon-util-array.js → esm2020/pipes/format/pipe-format.mjs} +1 -1
  107. package/{esm2015/pipes/index.js → esm2020/pipes/index.mjs} +0 -0
  108. package/esm2020/pipes/pipes.mjs +5 -0
  109. package/{esm2015/token/index.js → esm2020/token/index.mjs} +0 -0
  110. package/{esm2015/token/page-visibility.js → esm2020/token/page-visibility.mjs} +0 -0
  111. package/esm2020/token/token.mjs +5 -0
  112. package/{esm2015/token/window.js → esm2020/token/window.mjs} +0 -0
  113. package/{esm2015/yelon-util.js → esm2020/yelon-util.mjs} +0 -0
  114. package/fesm2015/{yelon-util-array.js → array.mjs} +8 -10
  115. package/fesm2015/array.mjs.map +1 -0
  116. package/fesm2015/{browser.js → browser.mjs} +28 -42
  117. package/fesm2015/browser.mjs.map +1 -0
  118. package/fesm2015/{yelon-util-config.js → config.mjs} +14 -8
  119. package/fesm2015/config.mjs.map +1 -0
  120. package/fesm2015/{yelon-util-date-time.js → date-time.mjs} +1 -1
  121. package/fesm2015/date-time.mjs.map +1 -0
  122. package/fesm2015/{yelon-util-decorator.js → decorator.mjs} +8 -4
  123. package/fesm2015/decorator.mjs.map +1 -0
  124. package/fesm2015/{yelon-util-form.js → form.mjs} +1 -1
  125. package/fesm2015/form.mjs.map +1 -0
  126. package/fesm2015/{yelon-util-format.js → format.mjs} +18 -14
  127. package/fesm2015/format.mjs.map +1 -0
  128. package/fesm2015/{yelon-util-math.js → math.mjs} +1 -1
  129. package/fesm2015/math.mjs.map +1 -0
  130. package/fesm2015/{yelon-util-other.js → other.mjs} +12 -9
  131. package/fesm2015/other.mjs.map +1 -0
  132. package/fesm2015/pipe-currency.mjs +96 -0
  133. package/fesm2015/pipe-currency.mjs.map +1 -0
  134. package/fesm2015/pipe-filter.mjs +40 -0
  135. package/fesm2015/pipe-filter.mjs.map +1 -0
  136. package/fesm2015/pipe-format.mjs +55 -0
  137. package/fesm2015/pipe-format.mjs.map +1 -0
  138. package/fesm2015/{yelon-util-pipes.js → pipes.mjs} +1 -1
  139. package/fesm2015/pipes.mjs.map +1 -0
  140. package/fesm2015/{yelon-util-token.js → token.mjs} +1 -1
  141. package/fesm2015/token.mjs.map +1 -0
  142. package/fesm2015/{yelon-util.js → yelon-util.mjs} +1 -1
  143. package/fesm2015/yelon-util.mjs.map +1 -0
  144. package/fesm2020/array.mjs +285 -0
  145. package/fesm2020/array.mjs.map +1 -0
  146. package/fesm2020/browser.mjs +260 -0
  147. package/fesm2020/browser.mjs.map +1 -0
  148. package/fesm2020/config.mjs +54 -0
  149. package/fesm2020/config.mjs.map +1 -0
  150. package/fesm2020/date-time.mjs +210 -0
  151. package/fesm2020/date-time.mjs.map +1 -0
  152. package/fesm2020/decorator.mjs +121 -0
  153. package/fesm2020/decorator.mjs.map +1 -0
  154. package/fesm2020/form.mjs +118 -0
  155. package/fesm2020/form.mjs.map +1 -0
  156. package/fesm2020/format.mjs +431 -0
  157. package/fesm2020/format.mjs.map +1 -0
  158. package/fesm2020/math.mjs +85 -0
  159. package/fesm2020/math.mjs.map +1 -0
  160. package/fesm2020/other.mjs +318 -0
  161. package/fesm2020/other.mjs.map +1 -0
  162. package/fesm2020/pipe-currency.mjs +94 -0
  163. package/fesm2020/pipe-currency.mjs.map +1 -0
  164. package/fesm2020/pipe-filter.mjs +40 -0
  165. package/fesm2020/pipe-filter.mjs.map +1 -0
  166. package/fesm2020/pipe-format.mjs +55 -0
  167. package/fesm2020/pipe-format.mjs.map +1 -0
  168. package/fesm2020/pipes.mjs +8 -0
  169. package/fesm2020/pipes.mjs.map +1 -0
  170. package/fesm2020/token.mjs +38 -0
  171. package/fesm2020/token.mjs.map +1 -0
  172. package/fesm2020/yelon-util.mjs +16 -0
  173. package/fesm2020/yelon-util.mjs.map +1 -0
  174. package/{array/yelon-util-array.d.ts → form/form.d.ts} +1 -0
  175. package/form/package.json +6 -7
  176. package/format/currency.service.d.ts +3 -0
  177. package/format/format.d.ts +5 -0
  178. package/format/package.json +6 -7
  179. package/{config/yelon-util-config.d.ts → math/math.d.ts} +1 -0
  180. package/math/package.json +6 -7
  181. package/other/lazy.service.d.ts +3 -0
  182. package/{decorator/yelon-util-decorator.d.ts → other/other.d.ts} +1 -0
  183. package/other/package.json +6 -7
  184. package/package.json +132 -8
  185. package/pipes/currency/cny.pipe.d.ts +3 -0
  186. package/pipes/currency/index.d.ts +1 -0
  187. package/pipes/currency/mega.pipe.d.ts +3 -0
  188. package/pipes/currency/module.d.ts +7 -0
  189. package/pipes/currency/package.json +6 -7
  190. package/pipes/currency/pipe-currency.d.ts +5 -0
  191. package/pipes/currency/price.pipe.d.ts +3 -0
  192. package/pipes/filter/filter.pipe.d.ts +3 -0
  193. package/pipes/filter/module.d.ts +5 -0
  194. package/pipes/filter/package.json +6 -7
  195. package/pipes/filter/pipe-filter.d.ts +5 -0
  196. package/pipes/format/mask.pipe.d.ts +3 -0
  197. package/pipes/format/module.d.ts +5 -0
  198. package/pipes/format/package.json +6 -7
  199. package/pipes/format/pipe-format.d.ts +5 -0
  200. package/pipes/package.json +6 -7
  201. package/pipes/pipes.d.ts +5 -0
  202. package/token/package.json +6 -7
  203. package/token/token.d.ts +5 -0
  204. package/yelon-util.d.ts +1 -0
  205. package/array/yelon-util-array.metadata.json +0 -1
  206. package/browser/browser.metadata.json +0 -1
  207. package/bundles/browser.umd.js +0 -325
  208. package/bundles/browser.umd.js.map +0 -1
  209. package/bundles/yelon-util-array.umd.js +0 -641
  210. package/bundles/yelon-util-array.umd.js.map +0 -1
  211. package/bundles/yelon-util-config.umd.js +0 -411
  212. package/bundles/yelon-util-config.umd.js.map +0 -1
  213. package/bundles/yelon-util-date-time.umd.js +0 -238
  214. package/bundles/yelon-util-date-time.umd.js.map +0 -1
  215. package/bundles/yelon-util-decorator.umd.js +0 -462
  216. package/bundles/yelon-util-decorator.umd.js.map +0 -1
  217. package/bundles/yelon-util-form.umd.js +0 -135
  218. package/bundles/yelon-util-form.umd.js.map +0 -1
  219. package/bundles/yelon-util-format.umd.js +0 -785
  220. package/bundles/yelon-util-format.umd.js.map +0 -1
  221. package/bundles/yelon-util-math.umd.js +0 -104
  222. package/bundles/yelon-util-math.umd.js.map +0 -1
  223. package/bundles/yelon-util-other.umd.js +0 -733
  224. package/bundles/yelon-util-other.umd.js.map +0 -1
  225. package/bundles/yelon-util-pipes-currency.umd.js +0 -108
  226. package/bundles/yelon-util-pipes-currency.umd.js.map +0 -1
  227. package/bundles/yelon-util-pipes-filter.umd.js +0 -374
  228. package/bundles/yelon-util-pipes-filter.umd.js.map +0 -1
  229. package/bundles/yelon-util-pipes-format.umd.js +0 -66
  230. package/bundles/yelon-util-pipes-format.umd.js.map +0 -1
  231. package/bundles/yelon-util-pipes.umd.js +0 -38
  232. package/bundles/yelon-util-pipes.umd.js.map +0 -1
  233. package/bundles/yelon-util-token.umd.js +0 -49
  234. package/bundles/yelon-util-token.umd.js.map +0 -1
  235. package/bundles/yelon-util.umd.js +0 -86
  236. package/bundles/yelon-util.umd.js.map +0 -1
  237. package/config/yelon-util-config.metadata.json +0 -1
  238. package/date-time/yelon-util-date-time.metadata.json +0 -1
  239. package/decorator/yelon-util-decorator.metadata.json +0 -1
  240. package/esm2015/array/array.service.js +0 -250
  241. package/esm2015/browser/cookie.service.js +0 -104
  242. package/esm2015/browser/copy.js +0 -27
  243. package/esm2015/browser/scroll.service.js +0 -89
  244. package/esm2015/config/config.service.js +0 -34
  245. package/esm2015/config/yelon-util-config.js +0 -5
  246. package/esm2015/date-time/picker.js +0 -116
  247. package/esm2015/date-time/yelon-util-date-time.js +0 -5
  248. package/esm2015/decorator/convert.js +0 -56
  249. package/esm2015/decorator/yelon-util-decorator.js +0 -5
  250. package/esm2015/decorator/zone-outside.js +0 -55
  251. package/esm2015/form/yelon-util-form.js +0 -5
  252. package/esm2015/format/currency.service.js +0 -225
  253. package/esm2015/format/string.js +0 -76
  254. package/esm2015/format/yelon-util-format.js +0 -5
  255. package/esm2015/math/yelon-util-math.js +0 -5
  256. package/esm2015/other/lazy.service.js +0 -118
  257. package/esm2015/pipes/currency/cny.pipe.js +0 -22
  258. package/esm2015/pipes/currency/mega.pipe.js +0 -26
  259. package/esm2015/pipes/currency/module.js +0 -14
  260. package/esm2015/pipes/currency/price.pipe.js +0 -26
  261. package/esm2015/pipes/currency/yelon-util-pipes-currency.js +0 -6
  262. package/esm2015/pipes/filter/filter.pipe.js +0 -15
  263. package/esm2015/pipes/filter/module.js +0 -12
  264. package/esm2015/pipes/filter/yelon-util-pipes-filter.js +0 -5
  265. package/esm2015/pipes/format/mask.pipe.js +0 -30
  266. package/esm2015/pipes/format/module.js +0 -12
  267. package/esm2015/pipes/format/yelon-util-pipes-format.js +0 -5
  268. package/esm2015/pipes/yelon-util-pipes.js +0 -5
  269. package/esm2015/token/yelon-util-token.js +0 -5
  270. package/fesm2015/browser.js.map +0 -1
  271. package/fesm2015/yelon-util-array.js.map +0 -1
  272. package/fesm2015/yelon-util-config.js.map +0 -1
  273. package/fesm2015/yelon-util-date-time.js.map +0 -1
  274. package/fesm2015/yelon-util-decorator.js.map +0 -1
  275. package/fesm2015/yelon-util-form.js.map +0 -1
  276. package/fesm2015/yelon-util-format.js.map +0 -1
  277. package/fesm2015/yelon-util-math.js.map +0 -1
  278. package/fesm2015/yelon-util-other.js.map +0 -1
  279. package/fesm2015/yelon-util-pipes-currency.js +0 -87
  280. package/fesm2015/yelon-util-pipes-currency.js.map +0 -1
  281. package/fesm2015/yelon-util-pipes-filter.js +0 -32
  282. package/fesm2015/yelon-util-pipes-filter.js.map +0 -1
  283. package/fesm2015/yelon-util-pipes-format.js +0 -47
  284. package/fesm2015/yelon-util-pipes-format.js.map +0 -1
  285. package/fesm2015/yelon-util-pipes.js.map +0 -1
  286. package/fesm2015/yelon-util-token.js.map +0 -1
  287. package/fesm2015/yelon-util.js.map +0 -1
  288. package/form/yelon-util-form.d.ts +0 -4
  289. package/form/yelon-util-form.metadata.json +0 -1
  290. package/format/yelon-util-format.d.ts +0 -4
  291. package/format/yelon-util-format.metadata.json +0 -1
  292. package/math/yelon-util-math.d.ts +0 -4
  293. package/math/yelon-util-math.metadata.json +0 -1
  294. package/other/yelon-util-other.d.ts +0 -4
  295. package/other/yelon-util-other.metadata.json +0 -1
  296. package/pipes/currency/yelon-util-pipes-currency.d.ts +0 -5
  297. package/pipes/currency/yelon-util-pipes-currency.metadata.json +0 -1
  298. package/pipes/filter/yelon-util-pipes-filter.d.ts +0 -4
  299. package/pipes/filter/yelon-util-pipes-filter.metadata.json +0 -1
  300. package/pipes/format/yelon-util-pipes-format.d.ts +0 -4
  301. package/pipes/format/yelon-util-pipes-format.metadata.json +0 -1
  302. package/pipes/yelon-util-pipes.d.ts +0 -4
  303. package/pipes/yelon-util-pipes.metadata.json +0 -1
  304. package/token/yelon-util-token.d.ts +0 -4
  305. package/token/yelon-util-token.metadata.json +0 -1
  306. package/yelon-util.metadata.json +0 -1
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copy text to clipboard
3
+ *
4
+ * 复制字符串文档至剪贴板
5
+ */
6
+ export function copy(value) {
7
+ return navigator.clipboard.writeText(value);
8
+ }
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29weS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvYnJvd3Nlci9jb3B5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7O0dBSUc7QUFDRixNQUFNLFVBQVUsSUFBSSxDQUFDLEtBQWE7SUFDakMsT0FBTyxTQUFTLENBQUMsU0FBUyxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsQ0FBQztBQUM5QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5IHRleHQgdG8gY2xpcGJvYXJkXG4gKlxuICog5aSN5Yi25a2X56ym5Liy5paH5qGj6Iez5Ymq6LS05p2/XG4gKi9cbiBleHBvcnQgZnVuY3Rpb24gY29weSh2YWx1ZTogc3RyaW5nKTogUHJvbWlzZTx2b2lkPiB7XG4gIHJldHVybiBuYXZpZ2F0b3IuY2xpcGJvYXJkLndyaXRlVGV4dCh2YWx1ZSk7XG59XG4iXX0=
@@ -0,0 +1,88 @@
1
+ import { DOCUMENT } from '@angular/common';
2
+ import { Inject, Injectable } from '@angular/core';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "@angular/cdk/platform";
5
+ export class ScrollService {
6
+ constructor(_doc, platform) {
7
+ this._doc = _doc;
8
+ this.platform = platform;
9
+ }
10
+ _getDoc() {
11
+ return this._doc || document;
12
+ }
13
+ _getWin() {
14
+ const doc = this._getDoc();
15
+ return doc.defaultView || window;
16
+ }
17
+ /**
18
+ * 获取滚动条位置
19
+ *
20
+ * @param element 指定元素,默认 `window`
21
+ */
22
+ getScrollPosition(element) {
23
+ if (!this.platform.isBrowser) {
24
+ return [0, 0];
25
+ }
26
+ const win = this._getWin();
27
+ if (element && element !== win) {
28
+ return [element.scrollLeft, element.scrollTop];
29
+ }
30
+ else {
31
+ return [win.scrollX, win.scrollY];
32
+ }
33
+ }
34
+ /**
35
+ * 设置滚动条位置
36
+ *
37
+ * @param element 指定元素
38
+ */
39
+ scrollToPosition(element, position) {
40
+ if (!this.platform.isBrowser) {
41
+ return;
42
+ }
43
+ (element || this._getWin()).scrollTo(position[0], position[1]);
44
+ }
45
+ /**
46
+ * 设置滚动条至指定元素
47
+ *
48
+ * @param element 指定元素,默认 `document.body`
49
+ * @param topOffset 偏移值,默认 `0`
50
+ */
51
+ scrollToElement(element, topOffset = 0) {
52
+ if (!this.platform.isBrowser) {
53
+ return;
54
+ }
55
+ if (!element) {
56
+ element = this._getDoc().body;
57
+ }
58
+ element.scrollIntoView();
59
+ const win = this._getWin();
60
+ if (win && win.scrollBy) {
61
+ win.scrollBy(0, element.getBoundingClientRect().top - topOffset);
62
+ if (win.scrollY < 20) {
63
+ win.scrollBy(0, -win.scrollY);
64
+ }
65
+ }
66
+ }
67
+ /**
68
+ * 滚动至顶部
69
+ *
70
+ * @param topOffset 偏移值,默认 `0`
71
+ */
72
+ scrollToTop(topOffset = 0) {
73
+ if (!this.platform.isBrowser) {
74
+ return;
75
+ }
76
+ this.scrollToElement(this._getDoc().body, topOffset);
77
+ }
78
+ }
79
+ ScrollService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ScrollService, deps: [{ token: DOCUMENT }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
80
+ ScrollService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ScrollService, providedIn: 'root' });
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ScrollService, decorators: [{
82
+ type: Injectable,
83
+ args: [{ providedIn: 'root' }]
84
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
85
+ type: Inject,
86
+ args: [DOCUMENT]
87
+ }] }, { type: i1.Platform }]; } });
88
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xsLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2Jyb3dzZXIvc2Nyb2xsLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzNDLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7QUFLbkQsTUFBTSxPQUFPLGFBQWE7SUFVeEIsWUFBc0MsSUFBZSxFQUFVLFFBQWtCO1FBQTNDLFNBQUksR0FBSixJQUFJLENBQVc7UUFBVSxhQUFRLEdBQVIsUUFBUSxDQUFVO0lBQUcsQ0FBQztJQVQ3RSxPQUFPO1FBQ2IsT0FBTyxJQUFJLENBQUMsSUFBSSxJQUFJLFFBQVEsQ0FBQztJQUMvQixDQUFDO0lBRU8sT0FBTztRQUNiLE1BQU0sR0FBRyxHQUFHLElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQztRQUMzQixPQUFPLEdBQUcsQ0FBQyxXQUFXLElBQUksTUFBTSxDQUFDO0lBQ25DLENBQUM7SUFJRDs7OztPQUl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IGlmICh3aW4gJiYgd2luLnNjcm9sbEJ5KSB7XG4gICAgICB3aW4uc2Nyb2xsQnkoMCwgZWxlbWVudCEuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkudG9wIC0gdG9wT2Zmc2V0KTtcblxuICAgICAgaWYgKHdpbi5zY3JvbGxZIDwgMjApIHtcbiAgICAgICAgd2luLnNjcm9sbEJ5KDAsIC13aW4uc2Nyb2xsWSk7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgLyoqXG4gICAqIOa7muWKqOiHs+mhtumDqFxuICAgKlxuICAgKiBAcGFyYW0gdG9wT2Zmc2V0IOWBj+enu+WAvO+8jOm7mOiupCBgMGBcbiAgICovXG4gIHNjcm9sbFRvVG9wKHRvcE9mZnNldDogbnVtYmVyID0gMCk6IHZvaWQge1xuICAgIGlmICghdGhpcy5wbGF0Zm9ybS5pc0Jyb3dzZXIpIHtcbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgdGhpcy5zY3JvbGxUb0VsZW1lbnQodGhpcy5fZ2V0RG9jKCkuYm9keSwgdG9wT2Zmc2V0KTtcbiAgfVxufVxuIl19
@@ -32,7 +32,7 @@ export function updateHostClass(el, renderer, classMap, preClean = false) {
32
32
  else {
33
33
  removeClass(el, classMap, renderer);
34
34
  }
35
- classMap = Object.assign({}, classMap);
35
+ classMap = { ...classMap };
36
36
  addClass(el, classMap, renderer);
37
37
  }
38
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R5bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2Jyb3dzZXIvc3R5bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsU0FBUyxXQUFXLENBQUMsRUFBZSxFQUFFLFFBQXNDLEVBQUUsUUFBbUI7SUFDL0YsTUFBTSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsQ0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FxuICpcbiAqIOabtOaWsOWuv+S4u+e7hOS7tuagt+W8jyBgY2xhc3NgXG4gKlxuICogYGBgdHNcbiAqIHVwZGF0ZUhvc3RDbGFzcyhcbiAqICB0aGlzLmVsLm5hdGl2ZUVsZW1lbnQsXG4gKiAgdGhpcy5yZW5kZXJlcixcbiAqICB7XG4gKiAgICBbICdjbGFzc25hbWUnIF06IHRydWUsXG4gKiAgICBbICdjbGFzc25hbWUnIF06IHRoaXMudHlwZSA9PT0gJzEnLFxuICogICAgWyB0aGlzLmNscyBdOiB0cnVlLFxuICogICAgWyBgYS0ke3RoaXMuY2xzfWAgXTogdHJ1ZVxuICogIH0pXG4gKiBgYGBcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIHVwZGF0ZUhvc3RDbGFzcyhcbiAgZWw6IEhUTUxFbGVtZW50LFxuICByZW5kZXJlcjogUmVuZGVyZXIyLFxuICBjbGFzc01hcDogeyBba2xhc3M6IHN0cmluZ106IHVua25vd24gfSxcbiAgcHJlQ2xlYW46IGJvb2xlYW4gPSBmYWxzZVxuKTogdm9pZCB7XG4gIGlmIChwcmVDbGVhbiA9PT0gdHJ1ZSkge1xuICAgIHJlbmRlcmVyLnJlbW92ZUF0dHJpYnV0ZShlbCwgJ2NsYXNzJyk7XG4gIH0gZWxzZSB7XG4gICAgcmVtb3ZlQ2xhc3MoZWwsIGNsYXNzTWFwLCByZW5kZXJlcik7XG4gIH1cbiAgY2xhc3NNYXAgPSB7IC4uLmNsYXNzTWFwIH07XG4gIGFkZENsYXNzKGVsLCBjbGFzc01hcCwgcmVuZGVyZXIpO1xufVxuIl19
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9jb25maWcvY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -0,0 +1,37 @@
1
+ import { Inject, Injectable, Optional } from '@angular/core';
2
+ import { deepMergeKey } from '@yelon/util/other';
3
+ import { YUNZAI_CONFIG } from './config.types';
4
+ import * as i0 from "@angular/core";
5
+ export class YunzaiConfigService {
6
+ constructor(defaultConfig) {
7
+ this.config = { ...defaultConfig };
8
+ }
9
+ get(componentName, key) {
10
+ const res = (this.config[componentName] || {});
11
+ return key ? { [key]: res[key] } : res;
12
+ }
13
+ merge(componentName, ...defaultValues) {
14
+ return deepMergeKey({}, true, ...defaultValues, this.get(componentName));
15
+ }
16
+ attach(componentThis, componentName, defaultValues) {
17
+ Object.assign(componentThis, this.merge(componentName, defaultValues));
18
+ }
19
+ attachKey(componentThis, componentName, key) {
20
+ Object.assign(componentThis, this.get(componentName, key));
21
+ }
22
+ set(componentName, value) {
23
+ this.config[componentName] = { ...this.config[componentName], ...value };
24
+ }
25
+ }
26
+ YunzaiConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: YunzaiConfigService, deps: [{ token: YUNZAI_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
27
+ YunzaiConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: YunzaiConfigService, providedIn: 'root' });
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: YunzaiConfigService, decorators: [{
29
+ type: Injectable,
30
+ args: [{ providedIn: 'root' }]
31
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
32
+ type: Optional
33
+ }, {
34
+ type: Inject,
35
+ args: [YUNZAI_CONFIG]
36
+ }] }]; } });
37
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2NvbmZpZy9jb25maWcuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFJN0QsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBRWpELE9BQU8sRUFBaUMsYUFBYSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7O0FBRzlFLE1BQU0sT0FBTyxtQkFBbUI7SUFHOUIsWUFBK0MsYUFBNEI7UUFDekUsSUFBSSxDQUFDLE1BQU0sR0FBRyxFQUFFLEdBQUcsYUFBYSxFQUFFLENBQUM7SUFDckMsQ0FBQztJQUVELEdBQUcsQ0FBNEIsYUFBZ0IsRUFBRSxHQUFZO1FBQzNELE1BQU0sR0FBRyxHQUFHLENBQUUsSUFBSSxDQUFDLE1BQU0sQ0FBQyxhQUFhLENBQWdDLElBQUksRUFBRSxDQUFjLENBQUM7UUFDNUYsT0FBTyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxHQUFHLENBQUMsRUFBRSxHQUFHLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDO0lBQ3pDLENBQUM7SUFFRCxLQUFLLENBQTRCLGFBQWdCLEVBQUUsR0FBRyxhQUFxQztRQUN6RixPQUFPLFlBQVksQ0FBQyxFQUFFLEVBQUUsSUFBSSxFQUFFLEdBQ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W56YWlDb25maWdLZXk+KGNvbXBvbmVudFRoaXM6IHVua25vd24sIGNvbXBvbmVudE5hbWU6IFQsIGRlZmF1bHRWYWx1ZXM6IFl1bnphaUNvbmZpZ1tUXSk6IHZvaWQge1xuICAgIE9iamVjdC5hc3NpZ24oY29tcG9uZW50VGhpcywgdGhpcy5tZXJnZShjb21wb25lbnROYW1lLCBkZWZhdWx0VmFsdWVzKSk7XG4gIH1cblxuICBhdHRhY2hLZXk8VCBleHRlbmRzIFl1bnphaUNvbmZpZ0tleT4oY29tcG9uZW50VGhpczogdW5rbm93biwgY29tcG9uZW50TmFtZTogVCwga2V5OiBzdHJpbmcpOiB2b2lkIHtcbiAgICBPYmplY3QuYXNzaWduKGNvbXBvbmVudFRoaXMsIHRoaXMuZ2V0KGNvbXBvbmVudE5hbWUsIGtleSkpO1xuICB9XG5cbiAgc2V0PFQgZXh0ZW5kcyBZdW56YWlDb25maWdLZXk+KGNvbXBvbmVudE5hbWU6IFQsIHZhbHVlOiBZdW56YWlDb25maWdbVF0pOiB2b2lkIHtcbiAgICB0aGlzLmNvbmZpZ1tjb21wb25lbnROYW1lXSA9IHsgLi4udGhpcy5jb25maWdbY29tcG9uZW50TmFtZV0sIC4uLnZhbHVlIH07XG4gIH1cbn1cbiJdfQ==
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS10aW1lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9kYXRlLXRpbWUvZGF0ZS10aW1lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -0,0 +1,116 @@
1
+ import { addDays, addSeconds, differenceInCalendarDays, format } from 'date-fns';
2
+ // TODO: timezone process
3
+ export class DateTimePickerUtil {
4
+ /**
5
+ * Current local time
6
+ *
7
+ * 当前本地时间
8
+ */
9
+ get now() {
10
+ return new Date();
11
+ }
12
+ /**
13
+ * Current local date (not including time part)
14
+ *
15
+ * 当前本地日期(不包含时间部分)
16
+ */
17
+ get date() {
18
+ return this.removeTime(this.now);
19
+ }
20
+ /**
21
+ * Remove the time part of the date
22
+ *
23
+ * 移除日期的时间部分
24
+ */
25
+ removeTime(d) {
26
+ return new Date(d.toDateString());
27
+ }
28
+ /**
29
+ * Format date-time
30
+ *
31
+ * 格式化日期
32
+ */
33
+ format(d, formatString = 'yyyy-MM-dd HH:mm:ss') {
34
+ return format(d, formatString);
35
+ }
36
+ genTick(count) {
37
+ return new Array(count).fill(0).map((_, idx) => idx);
38
+ }
39
+ /**
40
+ * Calculate the number of days between two dates, `0` means the same day
41
+ *
42
+ * 计算两个日期相差天数,`0` 表示同一天
43
+ */
44
+ getDiffDays(dateLeft, dateRight) {
45
+ return differenceInCalendarDays(dateLeft, typeof dateRight === 'number' ? addDays(this.date, dateRight) : dateRight || this.date);
46
+ }
47
+ /**
48
+ * Disabled Before date (Default: today), Generally serves `nzDisabledDate`
49
+ *
50
+ * 禁用之前日期(默认:今天),一般服务于 `nzDisabledDate`
51
+ */
52
+ disabledBeforeDate(options) {
53
+ return (d) => this.getDiffDays(d, options?.offsetDays) < 0;
54
+ }
55
+ /**
56
+ * Disabled After date (Default: today), Generally serves `nzDisabledDate`
57
+ *
58
+ * 禁用之后日期(默认:今天),一般服务于 `nzDisabledDate`
59
+ */
60
+ disabledAfterDate(options) {
61
+ return (d) => this.getDiffDays(d, options?.offsetDays) > 0;
62
+ }
63
+ baseDisabledTime(type, offsetSeconds) {
64
+ const tick24 = this.genTick(24);
65
+ const tick60 = this.genTick(60);
66
+ return (current) => {
67
+ const cur = current;
68
+ if (cur == null) {
69
+ return {};
70
+ }
71
+ const now = addSeconds(this.now, offsetSeconds || 0);
72
+ const nowHours = now.getHours();
73
+ const nowMinutes = now.getMinutes();
74
+ const curHours = cur.getHours();
75
+ const isToday = this.getDiffDays(this.removeTime(cur)) === 0;
76
+ return {
77
+ nzDisabledHours: () => {
78
+ if (!isToday)
79
+ return [];
80
+ return type === 'before' ? tick24.slice(0, nowHours) : tick24.slice(nowHours + 1);
81
+ },
82
+ nzDisabledMinutes: () => {
83
+ if (isToday && curHours === nowHours) {
84
+ return type === 'before' ? tick60.slice(0, nowMinutes) : tick60.slice(nowMinutes + 1);
85
+ }
86
+ return [];
87
+ },
88
+ nzDisabledSeconds: () => {
89
+ if (isToday && curHours === nowHours && cur.getMinutes() === nowMinutes) {
90
+ const nowSeconds = now.getSeconds();
91
+ return type === 'before' ? tick60.slice(0, nowSeconds) : tick60.slice(nowSeconds + 1);
92
+ }
93
+ return [];
94
+ }
95
+ };
96
+ };
97
+ }
98
+ /**
99
+ * Disabled Before time (Default: now), Generally serves `nzDisabledTime`
100
+ *
101
+ * 禁用之前时间(默认:现在),一般服务于 `nzDisabledTime`
102
+ */
103
+ disabledBeforeTime(options) {
104
+ return this.baseDisabledTime('before', options?.offsetSeconds);
105
+ }
106
+ /**
107
+ * Disabled After time (Default: now), Generally serves `nzDisabledTime`
108
+ *
109
+ * 禁用之后时间(默认:现在),一般服务于 `nzDisabledTime`
110
+ */
111
+ disabledAfterTime(options) {
112
+ return this.baseDisabledTime('after', options?.offsetSeconds);
113
+ }
114
+ }
115
+ export const dateTimePickerUtil = new DateTimePickerUtil();
116
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGlja2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpb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ckhvdXJzID0gY3VyLmdldEhvdXJzKCk7XG4gICAgICBjb25zdCBpc1RvZGF5ID0gdGhpcy5nZXREaWZmRGF5cyh0aGlzLnJlbW92ZVRpbWUoY3VyKSkgPT09IDA7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBuekRpc2FibGVkSG91cnM6ICgpID0+IHtcbiAgICAgICAgICBpZiAoIWlzVG9kYXkpIHJldHVybiBbXTtcbiAgICAgICAgICByZXR1cm4gdHlwZSA9PT0gJ2JlZm9yZScgPyB0aWNrMjQuc2xpY2UoMCwgbm93SG91cnMpIDogdGljazI0LnNsaWNlKG5vd0hvdXJzICsgMSk7XG4gICAgICAgIH0sXG4gICAgICAgIG56RGlzYWJsZWRNaW51dGVzOiAoKSA9PiB7XG4gICAgICAgICAgaWYgKGlzVG9kYXkgJiYgY3VySG91cnMgPT09IG5vd0hvdXJzKSB7XG4gICAgICAgICAgICByZXR1cm4gdHlwZSA9PT0gJ2JlZm9yZScgPyB0aWNrNjAuc2xpY2UoMCwgbm93TWludXRlcykgOiB0aWNrNjAuc2xpY2Uobm93TWludXRlcyArIDEpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIH0sXG4gICAgICAgIG56RGlzYWJsZWRTZWNvbmRzOiAoKSA9PiB7XG4gICAgICAgICAgaWYgKGlzVG9kYXkgJiYgY3VySG91cnMgPT09IG5vd0hvdXJzICYmIGN1ci5nZXRNaW51dGVzKCkgPT09IG5vd01pbnV0ZXMpIHtcbiAgICAgICAgICAgIGNvbnN0IG5vd1NlY29uZHMgPSBub3cuZ2V0U2Vjb25kcygpO1xuICAgICAgICAgICAgcmV0dXJuIHR5cGUgPT09ICdiZWZvcmUnID8gdGljazYwLnNsaWNlKDAsIG5vd1NlY29uZHMpIDogdGljazYwLnNsaWNlKG5vd1NlY29uZHMgKyAxKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgICB9XG4gICAgICB9O1xuICAgIH07XG4gIH1cbiAgLyoqXG4gICAqIERpc2FibGVkIEJlZm9yZSB0aW1lIChEZWZhdWx0OiBub3cpLCBHZW5lcmFsbHkgc2VydmVzIGBuekRpc2FibGVkVGltZWBcbiAgICpcbiAgICog56aB55So5LmL5YmN5pe26Ze077yI6buY6K6k77ya546w5Zyo77yJ77yM5LiA6Iis5pyN5Yqh5LqOIGBuekRpc2FibGVkVGltZWBcbiAgICovXG4gIGRpc2FibGVkQmVmb3JlVGltZShvcHRpb25zPzogeyBvZmZzZXRTZWNvbmRzPzogbnVtYmVyIH0pOiBEaXNhYmxlZFRpbWVGbiB7XG4gICAgcmV0dXJuIHRoaXMuYmFzZURpc2FibGVkVGltZSgnYmVmb3JlJywgb3B0aW9ucz8ub2Zmc2V0U2Vjb25kcyk7XG4gIH1cbiAgLyoqXG4gICAqIERpc2FibGVkIEFmdGVyIHRpbWUgKERlZmF1bHQ6IG5vdyksIEdlbmVyYWxseSBzZXJ2ZXMgYG56RGlzYWJsZWRUaW1lYFxuICAgKlxuICAgKiDnpoHnlKjkuYvlkI7ml7bpl7TvvIjpu5jorqTvvJrnjrDlnKjvvInvvIzkuIDoiKzmnI3liqHkuo4gYG56RGlzYWJsZWRUaW1lYFxuICAgKi9cbiAgZGlzYWJsZWRBZnRlclRpbWUob3B0aW9ucz86IHsgb2Zmc2V0U2Vjb25kcz86IG51bWJlciB9KTogRGlzYWJsZWRUaW1lRm4ge1xuICAgIHJldHVybiB0aGlzLmJhc2VEaXNhYmxlZFRpbWUoJ2FmdGVyJywgb3B0aW9ucz8ub2Zmc2V0U2Vjb25kcyk7XG4gIH1cbn1cblxuZXhwb3J0IGNvbnN0IGRhdGVUaW1lUGlja2VyVXRpbCA9IG5ldyBEYXRlVGltZVBpY2tlclV0aWwoKTtcbiJdfQ==
@@ -65,7 +65,11 @@ export function fixEndTimeOfRange(dates) {
65
65
  export function toDate(value, options) {
66
66
  if (typeof options === 'string')
67
67
  options = { formatString: options };
68
- const { formatString, defaultValue } = Object.assign({ formatString: 'yyyy-MM-dd HH:mm:ss', defaultValue: new Date(NaN) }, options);
68
+ const { formatString, defaultValue } = {
69
+ formatString: 'yyyy-MM-dd HH:mm:ss',
70
+ defaultValue: new Date(NaN),
71
+ ...options
72
+ };
69
73
  if (value == null) {
70
74
  return defaultValue;
71
75
  }
@@ -81,4 +85,4 @@ export function toDate(value, options) {
81
85
  }
82
86
  return isNaN(tryDate) ? defaultValue : tryDate;
83
87
  }
84
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvZGF0ZS10aW1lL3RpbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLE9BQU8sRUFDUCxRQUFRLEVBQ1IsVUFBVSxFQUNWLFNBQVMsRUFDVCxTQUFTLEVBQ1QsS0FBSyxFQUNMLFFBQVEsRUFDUixVQUFVLEVBQ1YsWUFBWSxFQUNaLFdBQVcsRUFDWCxXQUFXLEVBQ1gsU0FBUyxFQUNULFFBQVEsRUFDUixRQUFRLEVBQ1QsTUFBTSxVQUFVLENBQUM7QUFJbEI7Ozs7Ozs7R0FPRztBQUNILE1BQU0sVUFBVSxlQUFlLENBQzdCLElBQTBHLEVBQzFHLElBQTZCO0lBRTdCLElBQUksR0FBRyxJQUFJO1FBQ1QsQ0FBQyxDQUFDLE9BQU8sSUFBSSxLQUFLLFFBQVE7WUFDeEIsQ0FBQyxDQUFDLEtBQUssQ0FBQyxJQUFJLEVBQUUscUJBQXFCLEVBQUUsSUFBSSxJQUFJLEVBQUUsQ0FBQztZQUNoRCxDQUFDLENBQUMsSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDO1FBQ2xCLENBQUMsQ0FBQyxJQUFJLElBQUksRUFBRSxDQUFDO0lBQ2YsTUFBTSxPQUFP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vbiB0b0RhdGUodmFsdWU6IERhdGUgfCBzdHJpbmcgfCBudW1iZXIsIG9wdGlvbnM/OiBUb0RhdGVPcHRpb25zKTogRGF0ZSB7XG4gIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ3N0cmluZycpIG9wdGlvbnMgPSB7IGZvcm1hdFN0cmluZzogb3B0aW9ucyB9O1xuICBjb25zdCB7IGZvcm1hdFN0cmluZywgZGVmYXVsdFZhbHVlIH0gPSB7XG4gICAgZm9ybWF0U3RyaW5nOiAneXl5eS1NTS1kZCBISDptbTpzcycsXG4gICAgZGVmYXVsdFZhbHVlOiBuZXcgRGF0ZShOYU4pLFxuICAgIC4uLm9wdGlvbnNcbiAgfTtcbiAgaWYgKHZhbHVlID09IG51bGwpIHtcbiAgICByZXR1cm4gZGVmYXVsdFZhbHVlO1xuICB9XG4gIGlmICh2YWx1ZSBpbnN0YW5jZW9mIERhdGUpIHtcbiAgICByZXR1cm4gdmFsdWU7XG4gIH1cbiAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ251bWJlcicgfHwgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycgJiYgL1swLTldezEwLDEzfS8udGVzdCh2YWx1ZSkpKSB7XG4gICAgcmV0dXJuIG5ldyBEYXRlKCt2YWx1ZSk7XG4gIH1cbiAgbGV0IHRyeURhdGUgPSBwYXJzZUlTTyh2YWx1ZSk7XG4gIGlmIChpc05hTih0cnlEYXRlIGFzIE56U2FmZUFueSkpIHtcbiAgICB0cnlEYXRlID0gcGFyc2UodmFsdWUsIGZvcm1hdFN0cmluZyEsIG5ldyBEYXRlKCkpO1xuICB9XG5cbiAgcmV0dXJuIGlzTmFOKHRyeURhdGUgYXMgTnpTYWZlQW55KSA/IGRlZmF1bHRWYWx1ZSA6IHRyeURhdGU7XG59XG4iXX0=
@@ -0,0 +1,58 @@
1
+ import { warn } from '@yelon/util/other';
2
+ function propDecoratorFactory(name, fallback, defaultValue) {
3
+ function propDecorator(target, propName, originalDescriptor) {
4
+ const privatePropName = `$$__${propName}`;
5
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
6
+ if (Object.prototype.hasOwnProperty.call(target, privatePropName)) {
7
+ warn(`The prop "${privatePropName}" is already exist, it will be overrided by ${name} decorator.`);
8
+ }
9
+ }
10
+ Object.defineProperty(target, privatePropName, {
11
+ configurable: true,
12
+ writable: true
13
+ });
14
+ return {
15
+ get() {
16
+ return originalDescriptor && originalDescriptor.get
17
+ ? originalDescriptor.get.bind(this)()
18
+ : this[privatePropName];
19
+ },
20
+ set(value) {
21
+ if (originalDescriptor && originalDescriptor.set) {
22
+ originalDescriptor.set.bind(this)(fallback(value, defaultValue));
23
+ }
24
+ this[privatePropName] = fallback(value, defaultValue);
25
+ }
26
+ };
27
+ }
28
+ return propDecorator;
29
+ }
30
+ export function toBoolean(value, defaultValue = false) {
31
+ return value == null ? defaultValue : `${value}` !== 'false';
32
+ }
33
+ /**
34
+ * Input decorator that handle a prop to do get/set automatically with toBoolean
35
+ *
36
+ * ```ts
37
+ * {AT}Input() {AT}InputBoolean() visible: boolean = false;
38
+ * {AT}Input() {AT}InputBoolean(null) visible: boolean = false;
39
+ * ```
40
+ */
41
+ export function InputBoolean(defaultValue = false) {
42
+ return propDecoratorFactory('InputBoolean', toBoolean, defaultValue);
43
+ }
44
+ export function toNumber(value, fallbackValue = 0) {
45
+ return !isNaN(parseFloat(value)) && !isNaN(Number(value)) ? Number(value) : fallbackValue;
46
+ }
47
+ /**
48
+ * Input decorator that handle a prop to do get/set automatically with toNumber
49
+ *
50
+ * ```ts
51
+ * {AT}Input() {AT}InputNumber() visible: number = 1;
52
+ * {AT}Input() {AT}InputNumber(null) visible: number = 2;
53
+ * ```
54
+ */
55
+ export function InputNumber(defaultValue = 0) {
56
+ return propDecoratorFactory('InputNumber', toNumber, defaultValue);
57
+ }
58
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udmVydC5qcyIsInNvdXJ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FOKE51bWJlcih2YWx1ZSkpID8gTnVtYmVyKHZhbHVlKSA6IGZhbGxiYWNrVmFsdWU7XG59XG5cbi8qKlxuICogSW5wdXQgZGVjb3JhdG9yIHRoYXQgaGFuZGxlIGEgcHJvcCB0byBkbyBnZXQvc2V0IGF1dG9tYXRpY2FsbHkgd2l0aCB0b051bWJlclxuICpcbiAqIGBgYHRzXG4gKiB7QVR9SW5wdXQoKSB7QVR9SW5wdXROdW1iZXIoKSB2aXNpYmxlOiBudW1iZXIgPSAxO1xuICoge0FUfUlucHV0KCkge0FUfUlucHV0TnVtYmVyKG51bGwpIHZpc2libGU6IG51bWJlciA9IDI7XG4gKiBgYGBcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIElucHV0TnVtYmVyKGRlZmF1bHRWYWx1ZTogbnVtYmVyIHwgbnVsbCA9IDApOiBOelNhZmVBbnkge1xuICByZXR1cm4gcHJvcERlY29yYXRvckZhY3RvcnkoJ0lucHV0TnVtYmVyJywgdG9OdW1iZXIsIGRlZmF1bHRWYWx1ZSk7XG59XG4iXX0=
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjb3JhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9kZWNvcmF0b3IvZGVjb3JhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -0,0 +1,57 @@
1
+ import { warn } from '@yelon/util/other';
2
+ function makeFn(type, options) {
3
+ return (_, __, descriptor) => {
4
+ const source = descriptor.value;
5
+ descriptor.value = function (...data) {
6
+ const that = this;
7
+ const ngZone = that[options?.ngZoneName || 'ngZone'];
8
+ if (!ngZone) {
9
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
10
+ warn(`ZoneOutside: Decorator should have 'ngZone' property with 'NgZone' class.`);
11
+ }
12
+ return source.call(this, ...data);
13
+ }
14
+ let res;
15
+ ngZone[type](() => {
16
+ res = source.call(this, ...data);
17
+ });
18
+ return res;
19
+ };
20
+ return descriptor;
21
+ };
22
+ }
23
+ /**
24
+ * The decoration method runs in `runOutsideAngular`
25
+ *
26
+ * 装饰方法运行在 `runOutsideAngular` 内
27
+ *
28
+ * ```ts
29
+ * class MockClass {
30
+ * constructor(public ngZone: NgZone) {}
31
+ *
32
+ * {AT}ZoneOutside()
33
+ * runOutsideAngular(): void {}
34
+ * }
35
+ * ```
36
+ */
37
+ export function ZoneOutside(options) {
38
+ return makeFn('runOutsideAngular', options);
39
+ }
40
+ /**
41
+ * The decoration method runs in `run`
42
+ *
43
+ * 装饰方法运行在 `run` 内
44
+ *
45
+ * ```ts
46
+ * class MockClass {
47
+ * constructor(public ngZone: NgZone) {}
48
+ *
49
+ * {AT}ZoneRun()
50
+ * run(): void {}
51
+ * }
52
+ * ```
53
+ */
54
+ export function ZoneRun(options) {
55
+ return makeFn('run', options);
56
+ }
57
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiem9uZS1vdXRzaWRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9kZWNvcmF0b3Ivem9uZS1vdXRzaWRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQVN6QyxTQUFTLE1BQU0sQ0FBQyx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TW9ja0NsYXNzIHtcbiAqICBjb25zdHJ1Y3RvcihwdWJsaWMgbmdab25lOiBOZ1pvbmUpIHt9XG4gKlxuICogIHtBVH1ab25lUnVuKClcbiAqICBydW4oKTogdm9pZCB7fVxuICogfVxuICogYGBgXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBab25lUnVuKG9wdGlvbnM/OiBab25lT3B0aW9ucyk6IERlY29yYXRvclR5cGUge1xuICByZXR1cm4gbWFrZUZuKCdydW4nLCBvcHRpb25zKTtcbn1cbiJdfQ==
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvZm9ybS9mb3JtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19