@yelon/util 12.0.18 → 13.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (313) 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/abc/pdf.type.d.ts +1 -1
  10. package/config/abc/qr.type.d.ts +1 -1
  11. package/config/config.d.ts +5 -0
  12. package/config/config.service.d.ts +3 -0
  13. package/config/package.json +6 -7
  14. package/date-time/date-time.d.ts +5 -0
  15. package/date-time/package.json +6 -7
  16. package/decorator/decorator.d.ts +5 -0
  17. package/decorator/package.json +6 -7
  18. package/{esm2015/array/array-type.service.js → esm2020/array/array-type.service.mjs} +0 -0
  19. package/esm2020/array/array.mjs +5 -0
  20. package/esm2020/array/array.service.mjs +278 -0
  21. package/{esm2015/array/index.js → esm2020/array/index.mjs} +0 -0
  22. package/{esm2015/browser/browser.js → esm2020/browser/browser.mjs} +0 -0
  23. package/esm2020/browser/cookie.service.mjs +103 -0
  24. package/esm2020/browser/copy.mjs +9 -0
  25. package/{esm2015/browser/index.js → esm2020/browser/index.mjs} +0 -0
  26. package/{esm2015/browser/is-empty.js → esm2020/browser/is-empty.mjs} +0 -0
  27. package/esm2020/browser/scroll.service.mjs +88 -0
  28. package/{esm2015/browser/style.js → esm2020/browser/style.mjs} +2 -2
  29. package/{esm2015/config/abc/date-picker.type.js → esm2020/config/abc/date-picker.type.mjs} +0 -0
  30. package/{esm2015/config/abc/error-collect.type.js → esm2020/config/abc/error-collect.type.mjs} +0 -0
  31. package/{esm2015/config/abc/image.type.js → esm2020/config/abc/image.type.mjs} +0 -0
  32. package/{esm2015/config/abc/index.js → esm2020/config/abc/index.mjs} +0 -0
  33. package/{esm2015/config/abc/loading.type.js → esm2020/config/abc/loading.type.mjs} +0 -0
  34. package/{esm2015/config/abc/lodop.type.js → esm2020/config/abc/lodop.type.mjs} +0 -0
  35. package/{esm2015/config/abc/media.type.js → esm2020/config/abc/media.type.mjs} +0 -0
  36. package/{esm2015/config/abc/onboarding.type.js → esm2020/config/abc/onboarding.type.mjs} +0 -0
  37. package/{esm2015/config/abc/page-header.type.js → esm2020/config/abc/page-header.type.mjs} +0 -0
  38. package/esm2020/config/abc/pdf.type.mjs +2 -0
  39. package/esm2020/config/abc/qr.type.mjs +2 -0
  40. package/{esm2015/config/abc/se.type.js → esm2020/config/abc/se.type.mjs} +0 -0
  41. package/{esm2015/config/abc/sg.type.js → esm2020/config/abc/sg.type.mjs} +0 -0
  42. package/{esm2015/config/abc/st.type.js → esm2020/config/abc/st.type.mjs} +0 -0
  43. package/{esm2015/config/abc/sv.type.js → esm2020/config/abc/sv.type.mjs} +0 -0
  44. package/{esm2015/config/abc/xlsx.type.js → esm2020/config/abc/xlsx.type.mjs} +0 -0
  45. package/{esm2015/config/abc/zip.type.js → esm2020/config/abc/zip.type.mjs} +0 -0
  46. package/{esm2015/config/acl/acl.type.js → esm2020/config/acl/acl.type.mjs} +0 -0
  47. package/{esm2015/config/auth/auth.type.js → esm2020/config/auth/auth.type.mjs} +0 -0
  48. package/{esm2015/config/bis/bis.type.js → esm2020/config/bis/bis.type.mjs} +0 -0
  49. package/{esm2015/config/cache/cache.type.js → esm2020/config/cache/cache.type.mjs} +0 -0
  50. package/{esm2015/config/chart/chart.type.js → esm2020/config/chart/chart.type.mjs} +0 -0
  51. package/esm2020/config/config.mjs +5 -0
  52. package/esm2020/config/config.service.mjs +37 -0
  53. package/{esm2015/config/config.types.js → esm2020/config/config.types.mjs} +0 -0
  54. package/{esm2015/config/index.js → esm2020/config/index.mjs} +0 -0
  55. package/{esm2015/config/mock/mock.type.js → esm2020/config/mock/mock.type.mjs} +0 -0
  56. package/{esm2015/config/sf/sf.type.js → esm2020/config/sf/sf.type.mjs} +0 -0
  57. package/{esm2015/config/stomp/stomp.type.js → esm2020/config/stomp/stomp.type.mjs} +0 -0
  58. package/{esm2015/config/theme/http.type.js → esm2020/config/theme/http.type.mjs} +0 -0
  59. package/{esm2015/config/theme/i18n.type.js → esm2020/config/theme/i18n.type.mjs} +0 -0
  60. package/{esm2015/config/theme/index.js → esm2020/config/theme/index.mjs} +0 -0
  61. package/{esm2015/config/theme/responsive.type.js → esm2020/config/theme/responsive.type.mjs} +0 -0
  62. package/{esm2015/config/util/array.type.js → esm2020/config/util/array.type.mjs} +0 -0
  63. package/{esm2015/config/util/currency.type.js → esm2020/config/util/currency.type.mjs} +0 -0
  64. package/esm2020/date-time/date-time.mjs +5 -0
  65. package/{esm2015/date-time/index.js → esm2020/date-time/index.mjs} +0 -0
  66. package/esm2020/date-time/picker.mjs +116 -0
  67. package/{esm2015/date-time/time.js → esm2020/date-time/time.mjs} +6 -2
  68. package/esm2020/decorator/convert.mjs +58 -0
  69. package/esm2020/decorator/decorator.mjs +5 -0
  70. package/{esm2015/decorator/index.js → esm2020/decorator/index.mjs} +0 -0
  71. package/esm2020/decorator/zone-outside.mjs +57 -0
  72. package/esm2020/form/form.mjs +5 -0
  73. package/{esm2015/form/index.js → esm2020/form/index.mjs} +0 -0
  74. package/{esm2015/form/match-control.js → esm2020/form/match-control.mjs} +0 -0
  75. package/{esm2015/form/validators.js → esm2020/form/validators.mjs} +0 -0
  76. package/esm2020/format/currency.service.mjs +238 -0
  77. package/{esm2015/format/currency.types.js → esm2020/format/currency.types.mjs} +0 -0
  78. package/esm2020/format/format.mjs +5 -0
  79. package/{esm2015/format/index.js → esm2020/format/index.mjs} +0 -0
  80. package/esm2020/format/string.mjs +85 -0
  81. package/{esm2015/format/validate.js → esm2020/format/validate.mjs} +0 -0
  82. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  83. package/{esm2015/math/in-range.js → esm2020/math/in-range.mjs} +0 -0
  84. package/{esm2015/math/index.js → esm2020/math/index.mjs} +0 -0
  85. package/esm2020/math/math.mjs +5 -0
  86. package/{esm2015/math/round.js → esm2020/math/round.mjs} +0 -0
  87. package/{esm2015/other/assert.js → esm2020/other/assert.mjs} +0 -0
  88. package/{esm2015/other/deep.js → esm2020/other/deep.mjs} +0 -0
  89. package/{esm2015/other/index.js → esm2020/other/index.mjs} +3 -1
  90. package/esm2020/other/lazy.service.mjs +104 -0
  91. package/{esm2015/other/logger.js → esm2020/other/logger.mjs} +0 -0
  92. package/esm2020/other/other.mjs +5 -0
  93. package/esm2020/other/resize.mjs +4 -0
  94. package/esm2020/other/url.mjs +13 -0
  95. package/esm2020/pipes/currency/cny.pipe.mjs +23 -0
  96. package/{esm2015/pipes/currency/index.js → esm2020/pipes/currency/index.mjs} +2 -1
  97. package/esm2020/pipes/currency/mega.pipe.mjs +29 -0
  98. package/esm2020/pipes/currency/module.mjs +19 -0
  99. package/esm2020/pipes/currency/pipe-currency.mjs +5 -0
  100. package/esm2020/pipes/currency/price.pipe.mjs +27 -0
  101. package/esm2020/pipes/filter/filter.pipe.mjs +19 -0
  102. package/{esm2015/pipes/filter/index.js → esm2020/pipes/filter/index.mjs} +0 -0
  103. package/esm2020/pipes/filter/module.mjs +17 -0
  104. package/{esm2015/other/yelon-util-other.js → esm2020/pipes/filter/pipe-filter.mjs} +1 -1
  105. package/{esm2015/pipes/format/index.js → esm2020/pipes/format/index.mjs} +0 -0
  106. package/esm2020/pipes/format/mask.pipe.mjs +34 -0
  107. package/esm2020/pipes/format/module.mjs +17 -0
  108. package/{esm2015/array/yelon-util-array.js → esm2020/pipes/format/pipe-format.mjs} +1 -1
  109. package/{esm2015/pipes/index.js → esm2020/pipes/index.mjs} +0 -0
  110. package/esm2020/pipes/pipes.mjs +5 -0
  111. package/{esm2015/token/index.js → esm2020/token/index.mjs} +0 -0
  112. package/{esm2015/token/page-visibility.js → esm2020/token/page-visibility.mjs} +0 -0
  113. package/esm2020/token/token.mjs +5 -0
  114. package/{esm2015/token/window.js → esm2020/token/window.mjs} +0 -0
  115. package/{esm2015/yelon-util.js → esm2020/yelon-util.mjs} +0 -0
  116. package/fesm2015/{yelon-util-array.js → array.mjs} +8 -10
  117. package/fesm2015/array.mjs.map +1 -0
  118. package/fesm2015/{browser.js → browser.mjs} +28 -42
  119. package/fesm2015/browser.mjs.map +1 -0
  120. package/fesm2015/{yelon-util-config.js → config.mjs} +14 -8
  121. package/fesm2015/config.mjs.map +1 -0
  122. package/fesm2015/{yelon-util-date-time.js → date-time.mjs} +1 -1
  123. package/fesm2015/date-time.mjs.map +1 -0
  124. package/fesm2015/{yelon-util-decorator.js → decorator.mjs} +8 -4
  125. package/fesm2015/decorator.mjs.map +1 -0
  126. package/fesm2015/{yelon-util-form.js → form.mjs} +1 -1
  127. package/fesm2015/form.mjs.map +1 -0
  128. package/fesm2015/{yelon-util-format.js → format.mjs} +18 -14
  129. package/fesm2015/format.mjs.map +1 -0
  130. package/fesm2015/{yelon-util-math.js → math.mjs} +1 -1
  131. package/fesm2015/math.mjs.map +1 -0
  132. package/fesm2015/{yelon-util-other.js → other.mjs} +35 -30
  133. package/fesm2015/other.mjs.map +1 -0
  134. package/fesm2015/pipe-currency.mjs +96 -0
  135. package/fesm2015/pipe-currency.mjs.map +1 -0
  136. package/fesm2015/pipe-filter.mjs +40 -0
  137. package/fesm2015/pipe-filter.mjs.map +1 -0
  138. package/fesm2015/pipe-format.mjs +55 -0
  139. package/fesm2015/pipe-format.mjs.map +1 -0
  140. package/fesm2015/{yelon-util-pipes.js → pipes.mjs} +1 -1
  141. package/fesm2015/pipes.mjs.map +1 -0
  142. package/fesm2015/{yelon-util-token.js → token.mjs} +1 -1
  143. package/fesm2015/token.mjs.map +1 -0
  144. package/fesm2015/{yelon-util.js → yelon-util.mjs} +1 -1
  145. package/fesm2015/yelon-util.mjs.map +1 -0
  146. package/fesm2020/array.mjs +285 -0
  147. package/fesm2020/array.mjs.map +1 -0
  148. package/fesm2020/browser.mjs +260 -0
  149. package/fesm2020/browser.mjs.map +1 -0
  150. package/fesm2020/config.mjs +54 -0
  151. package/fesm2020/config.mjs.map +1 -0
  152. package/fesm2020/date-time.mjs +210 -0
  153. package/fesm2020/date-time.mjs.map +1 -0
  154. package/fesm2020/decorator.mjs +121 -0
  155. package/fesm2020/decorator.mjs.map +1 -0
  156. package/fesm2020/form.mjs +118 -0
  157. package/fesm2020/form.mjs.map +1 -0
  158. package/fesm2020/format.mjs +431 -0
  159. package/fesm2020/format.mjs.map +1 -0
  160. package/fesm2020/math.mjs +85 -0
  161. package/fesm2020/math.mjs.map +1 -0
  162. package/fesm2020/other.mjs +303 -0
  163. package/fesm2020/other.mjs.map +1 -0
  164. package/fesm2020/pipe-currency.mjs +94 -0
  165. package/fesm2020/pipe-currency.mjs.map +1 -0
  166. package/fesm2020/pipe-filter.mjs +40 -0
  167. package/fesm2020/pipe-filter.mjs.map +1 -0
  168. package/fesm2020/pipe-format.mjs +55 -0
  169. package/fesm2020/pipe-format.mjs.map +1 -0
  170. package/fesm2020/pipes.mjs +8 -0
  171. package/fesm2020/pipes.mjs.map +1 -0
  172. package/fesm2020/token.mjs +38 -0
  173. package/fesm2020/token.mjs.map +1 -0
  174. package/fesm2020/yelon-util.mjs +16 -0
  175. package/fesm2020/yelon-util.mjs.map +1 -0
  176. package/{array/yelon-util-array.d.ts → form/form.d.ts} +1 -0
  177. package/form/package.json +6 -7
  178. package/format/currency.service.d.ts +3 -0
  179. package/format/format.d.ts +5 -0
  180. package/format/package.json +6 -7
  181. package/{config/yelon-util-config.d.ts → math/math.d.ts} +1 -0
  182. package/math/package.json +6 -7
  183. package/other/index.d.ts +2 -0
  184. package/other/lazy.service.d.ts +3 -0
  185. package/{decorator/yelon-util-decorator.d.ts → other/other.d.ts} +1 -0
  186. package/other/package.json +6 -7
  187. package/other/resize.d.ts +1 -0
  188. package/other/url.d.ts +2 -0
  189. package/package.json +132 -8
  190. package/pipes/currency/cny.pipe.d.ts +3 -0
  191. package/pipes/currency/index.d.ts +1 -0
  192. package/pipes/currency/mega.pipe.d.ts +3 -0
  193. package/pipes/currency/module.d.ts +7 -0
  194. package/pipes/currency/package.json +6 -7
  195. package/pipes/currency/pipe-currency.d.ts +5 -0
  196. package/pipes/currency/price.pipe.d.ts +3 -0
  197. package/pipes/filter/filter.pipe.d.ts +3 -0
  198. package/pipes/filter/module.d.ts +5 -0
  199. package/pipes/filter/package.json +6 -7
  200. package/pipes/filter/pipe-filter.d.ts +5 -0
  201. package/pipes/format/mask.pipe.d.ts +3 -0
  202. package/pipes/format/module.d.ts +5 -0
  203. package/pipes/format/package.json +6 -7
  204. package/pipes/format/pipe-format.d.ts +5 -0
  205. package/pipes/package.json +6 -7
  206. package/pipes/pipes.d.ts +5 -0
  207. package/token/package.json +6 -7
  208. package/token/token.d.ts +5 -0
  209. package/yelon-util.d.ts +1 -0
  210. package/array/yelon-util-array.metadata.json +0 -1
  211. package/browser/browser.metadata.json +0 -1
  212. package/bundles/browser.umd.js +0 -325
  213. package/bundles/browser.umd.js.map +0 -1
  214. package/bundles/yelon-util-array.umd.js +0 -641
  215. package/bundles/yelon-util-array.umd.js.map +0 -1
  216. package/bundles/yelon-util-config.umd.js +0 -411
  217. package/bundles/yelon-util-config.umd.js.map +0 -1
  218. package/bundles/yelon-util-date-time.umd.js +0 -238
  219. package/bundles/yelon-util-date-time.umd.js.map +0 -1
  220. package/bundles/yelon-util-decorator.umd.js +0 -462
  221. package/bundles/yelon-util-decorator.umd.js.map +0 -1
  222. package/bundles/yelon-util-form.umd.js +0 -135
  223. package/bundles/yelon-util-form.umd.js.map +0 -1
  224. package/bundles/yelon-util-format.umd.js +0 -785
  225. package/bundles/yelon-util-format.umd.js.map +0 -1
  226. package/bundles/yelon-util-math.umd.js +0 -104
  227. package/bundles/yelon-util-math.umd.js.map +0 -1
  228. package/bundles/yelon-util-other.umd.js +0 -714
  229. package/bundles/yelon-util-other.umd.js.map +0 -1
  230. package/bundles/yelon-util-pipes-currency.umd.js +0 -108
  231. package/bundles/yelon-util-pipes-currency.umd.js.map +0 -1
  232. package/bundles/yelon-util-pipes-filter.umd.js +0 -374
  233. package/bundles/yelon-util-pipes-filter.umd.js.map +0 -1
  234. package/bundles/yelon-util-pipes-format.umd.js +0 -66
  235. package/bundles/yelon-util-pipes-format.umd.js.map +0 -1
  236. package/bundles/yelon-util-pipes.umd.js +0 -38
  237. package/bundles/yelon-util-pipes.umd.js.map +0 -1
  238. package/bundles/yelon-util-token.umd.js +0 -49
  239. package/bundles/yelon-util-token.umd.js.map +0 -1
  240. package/bundles/yelon-util.umd.js +0 -86
  241. package/bundles/yelon-util.umd.js.map +0 -1
  242. package/config/yelon-util-config.metadata.json +0 -1
  243. package/date-time/yelon-util-date-time.metadata.json +0 -1
  244. package/decorator/yelon-util-decorator.metadata.json +0 -1
  245. package/esm2015/array/array.service.js +0 -250
  246. package/esm2015/browser/cookie.service.js +0 -104
  247. package/esm2015/browser/copy.js +0 -27
  248. package/esm2015/browser/scroll.service.js +0 -89
  249. package/esm2015/config/abc/pdf.type.js +0 -2
  250. package/esm2015/config/abc/qr.type.js +0 -2
  251. package/esm2015/config/config.service.js +0 -34
  252. package/esm2015/config/yelon-util-config.js +0 -5
  253. package/esm2015/date-time/picker.js +0 -116
  254. package/esm2015/date-time/yelon-util-date-time.js +0 -5
  255. package/esm2015/decorator/convert.js +0 -56
  256. package/esm2015/decorator/yelon-util-decorator.js +0 -5
  257. package/esm2015/decorator/zone-outside.js +0 -55
  258. package/esm2015/form/yelon-util-form.js +0 -5
  259. package/esm2015/format/currency.service.js +0 -225
  260. package/esm2015/format/string.js +0 -76
  261. package/esm2015/format/yelon-util-format.js +0 -5
  262. package/esm2015/math/yelon-util-math.js +0 -5
  263. package/esm2015/other/lazy.service.js +0 -118
  264. package/esm2015/pipes/currency/cny.pipe.js +0 -22
  265. package/esm2015/pipes/currency/mega.pipe.js +0 -26
  266. package/esm2015/pipes/currency/module.js +0 -14
  267. package/esm2015/pipes/currency/price.pipe.js +0 -26
  268. package/esm2015/pipes/currency/yelon-util-pipes-currency.js +0 -6
  269. package/esm2015/pipes/filter/filter.pipe.js +0 -15
  270. package/esm2015/pipes/filter/module.js +0 -12
  271. package/esm2015/pipes/filter/yelon-util-pipes-filter.js +0 -5
  272. package/esm2015/pipes/format/mask.pipe.js +0 -30
  273. package/esm2015/pipes/format/module.js +0 -12
  274. package/esm2015/pipes/format/yelon-util-pipes-format.js +0 -5
  275. package/esm2015/pipes/yelon-util-pipes.js +0 -5
  276. package/esm2015/token/yelon-util-token.js +0 -5
  277. package/fesm2015/browser.js.map +0 -1
  278. package/fesm2015/yelon-util-array.js.map +0 -1
  279. package/fesm2015/yelon-util-config.js.map +0 -1
  280. package/fesm2015/yelon-util-date-time.js.map +0 -1
  281. package/fesm2015/yelon-util-decorator.js.map +0 -1
  282. package/fesm2015/yelon-util-form.js.map +0 -1
  283. package/fesm2015/yelon-util-format.js.map +0 -1
  284. package/fesm2015/yelon-util-math.js.map +0 -1
  285. package/fesm2015/yelon-util-other.js.map +0 -1
  286. package/fesm2015/yelon-util-pipes-currency.js +0 -87
  287. package/fesm2015/yelon-util-pipes-currency.js.map +0 -1
  288. package/fesm2015/yelon-util-pipes-filter.js +0 -32
  289. package/fesm2015/yelon-util-pipes-filter.js.map +0 -1
  290. package/fesm2015/yelon-util-pipes-format.js +0 -47
  291. package/fesm2015/yelon-util-pipes-format.js.map +0 -1
  292. package/fesm2015/yelon-util-pipes.js.map +0 -1
  293. package/fesm2015/yelon-util-token.js.map +0 -1
  294. package/fesm2015/yelon-util.js.map +0 -1
  295. package/form/yelon-util-form.d.ts +0 -4
  296. package/form/yelon-util-form.metadata.json +0 -1
  297. package/format/yelon-util-format.d.ts +0 -4
  298. package/format/yelon-util-format.metadata.json +0 -1
  299. package/math/yelon-util-math.d.ts +0 -4
  300. package/math/yelon-util-math.metadata.json +0 -1
  301. package/other/yelon-util-other.d.ts +0 -4
  302. package/other/yelon-util-other.metadata.json +0 -1
  303. package/pipes/currency/yelon-util-pipes-currency.d.ts +0 -5
  304. package/pipes/currency/yelon-util-pipes-currency.metadata.json +0 -1
  305. package/pipes/filter/yelon-util-pipes-filter.d.ts +0 -4
  306. package/pipes/filter/yelon-util-pipes-filter.metadata.json +0 -1
  307. package/pipes/format/yelon-util-pipes-format.d.ts +0 -4
  308. package/pipes/format/yelon-util-pipes-format.metadata.json +0 -1
  309. package/pipes/yelon-util-pipes.d.ts +0 -4
  310. package/pipes/yelon-util-pipes.metadata.json +0 -1
  311. package/token/yelon-util-token.d.ts +0 -4
  312. package/token/yelon-util-token.metadata.json +0 -1
  313. package/yelon-util.metadata.json +0 -1
@@ -0,0 +1,103 @@
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
+ /**
6
+ * A set of simple Cookie manipulation classes.
7
+ *
8
+ * 一组简单的 Cookie 操作类。
9
+ */
10
+ export class CookieService {
11
+ constructor(_doc, platform) {
12
+ this._doc = _doc;
13
+ this.platform = platform;
14
+ }
15
+ get doc() {
16
+ return this._doc || document;
17
+ }
18
+ /**
19
+ * Original cookie value
20
+ *
21
+ * 原始Cookie值
22
+ */
23
+ get cookie() {
24
+ return this.platform.isBrowser ? this.doc.cookie : '';
25
+ }
26
+ /**
27
+ * Get all cookie key-value pairs
28
+ *
29
+ * 获取所有Cookie键值对
30
+ */
31
+ getAll() {
32
+ const ret = {};
33
+ const arr = this.cookie.split('; ');
34
+ for (let i = 0; i < arr.length; i++) {
35
+ const cookie = arr[i];
36
+ const index = cookie.indexOf('=');
37
+ if (index > 0) {
38
+ const name = decodeURIComponent(cookie.substring(0, index));
39
+ if (ret[name] == null) {
40
+ ret[name] = decodeURIComponent(cookie.substring(index + 1));
41
+ }
42
+ }
43
+ }
44
+ return ret;
45
+ }
46
+ /**
47
+ * Get the value of given cookie `key`
48
+ *
49
+ * 获取指定 `key` 的值
50
+ */
51
+ get(key) {
52
+ return this.getAll()[key];
53
+ }
54
+ /**
55
+ * Sets a value for given cookie key
56
+ *
57
+ * 设置指定 Cookie 键的值
58
+ */
59
+ put(key, value, options) {
60
+ if (!this.platform.isBrowser) {
61
+ return;
62
+ }
63
+ const opt = { path: '/', ...options };
64
+ if (typeof opt.expires === 'number') {
65
+ opt.expires = new Date(+new Date() + opt.expires * 1e3);
66
+ }
67
+ if (typeof opt.expires !== 'string') {
68
+ opt.expires = opt.expires ? opt.expires.toUTCString() : '';
69
+ }
70
+ const optStr = opt;
71
+ const attributes = Object.keys(optStr)
72
+ .filter(k => optStr[k] && optStr[k] !== true)
73
+ .map(k => `${k}=${optStr[k].split(';')[0]}`)
74
+ .join(';');
75
+ this.doc.cookie = `${encodeURIComponent(String(key))}=${encodeURIComponent(String(value))}${attributes ? `; ${attributes}` : ''}`;
76
+ }
77
+ /**
78
+ * Remove given cookie
79
+ *
80
+ * 移除指定 Cookie
81
+ */
82
+ remove(key, options) {
83
+ this.put(key, undefined, options);
84
+ }
85
+ /**
86
+ * Remove all cookies
87
+ *
88
+ * 移除所有 Cookies
89
+ */
90
+ removeAll() {
91
+ this.doc.cookie = '';
92
+ }
93
+ }
94
+ CookieService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CookieService, deps: [{ token: DOCUMENT }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
95
+ CookieService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CookieService, providedIn: 'root' });
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CookieService, decorators: [{
97
+ type: Injectable,
98
+ args: [{ providedIn: 'root' }]
99
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
100
+ type: Inject,
101
+ args: [DOCUMENT]
102
+ }] }, { type: i1.Platform }]; } });
103
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29va2llLnNlcnZpY2UuanM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 /**
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.3", 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.3", ngImport: i0, type: ScrollService, providedIn: 'root' });
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xsLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2Jyb3dzZXIvc2Nyb2xsLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzNDLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7QUFLbkQsTUFBTSxPQUFPLGFBQWE7SUFVeEIsWUFBc0MsSUFBZSxFQUFVLFFBQWtCO1FBQTNDLFNBQUksR0FBSixJQUFJLENBQVc7UUFBVSxhQUFRLEdBQVIsUUFBUSxDQUFVO0lBQUcsQ0FBQztJQVQ3RSxPQUFPO1FBQ2IsT0FBTyxJQUFJLENBQUMsSUFBSSxJQUFJLFFBQVEsQ0FBQztJQUMvQixDQUFDO0lBRU8sT0FBTztRQUNiLE1BQU0sR0FBRyxHQUFHLElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQztRQUMzQixPQUFPLEdBQUcsQ0FBQyxXQUFXLElBQUksTUFBTSxDQUFDO0lBQ25DLENBQUM7SUFJRDs7OztPQUlHO0lBQ0gsaUJBQWlCLENBQUMsT0FBMEI7UUFDMUMsSUFBSSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsU0FBUyxFQUFFO1lBQzVCLE9BQU8sQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7U0FDZjtRQUVELE1BQU0sR0FBRyxHQUFHLElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQztR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yb2xsWSk7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgLyoqXG4gICAqIOa7muWKqOiHs+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R5bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2Jyb3dzZXIvc3R5bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsU0FBUyxXQUFXLENBQUMsRUFBZSxFQUFFLFFBQXNDLEVBQUUsUUFBbUI7SUFDL0YsTUFBTSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxRQUFRLENBQUMsV0FBVyxDQUFDLEVBQUUsRUFBRSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQ3RFLENBQUM7QUFFRCxTQUFTLFFBQVEsQ0FBQyxFQUFlLEVBQUUsUUFBc0MsRUFBRSxRQUFtQjtJQUM1RixLQUFLLE1BQU0sQ0FB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gIOS5i+mXtO+8jOm7mOiupO+8mmAxYCAqL1xuICBiYWNrZ3JvdW5kQWxwaGE/OiBudW1iZXI7XG4gIC8qKiDliY3mma/vvIzpu5jorqTvvJpgYmxhY2tgICovXG4gIGZvcmVncm91bmQ/OiBzdHJpbmc7XG4gIC8qKiDliY3mma/pgI/mmI7nuqfliKvvvIzojIPlm7TvvJpgMC0xYCDkuYvpl7TvvIzpu5jorqTvvJpgMWAgKi9cbiAgZm9yZWdyb3VuZEFscGhhPzogbnVtYmVyO1xuICAvKiog6K+v5beu5qCh5q2j57qn5Yir77yM6buY6K6k77yaYExgICovXG4gIGxldmVsPzogJ0wnIHwgJ00nIHwgJ1EnIHwgJ0gnO1xuICAvKiog5LqM57u056CB6L6T5Ye65Zu+54mHTUlNReexu+Wei++8jOm7mOiupO+8mmBpbWFnZS9wbmdgICovXG4gIG1pbWU/OiBzdHJpbmc7XG4gIC8qKiDlhoXovrnot53vvIjljZXkvY3vvJpweO+8ie+8jOm7mOiupO+8mmAxMGAgKi9cbiAgcGFkZGluZz86IG51bWJlcjtcbiAgLyoqIOWkp+Wwj++8iOWNleS9je+8mnB477yJ77yM6buY6K6k77yaYDIyMGAgKi9cbiAgc2l6ZT86IG51bWJlcjtcbiAgZGVsYXk/OiBudW1iZXI7XG59XG4iXX0=
@@ -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.3", 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.3", ngImport: i0, type: YunzaiConfigService, providedIn: 'root' });
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLnNlcnZpY2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hpcywgdGhpcy5tZXJnZShjb21wb25lbnROYW1lLCBkZWZhdWx0VmFsdWVzKSk7XG4gIH1cblxuICBhdHRhY2hLZXk8VCBleHRlbmRzIFl1bnphaUNvbmZpZ0tleT4oY29tcG9uZW50VGhpczogdW5rbm93biwgY29tcG9uZW50TmFtZTogVCwga2V5OiBzdHJpbmcpOiB2b2lkIHtcbiAgICBPYmplY3QuYXNzaWduKGNvbXBvbmVudFRoaXMsIHRoaXMuZ2V0KGNvbXBvbmVudE5hbWUsIGtleSkpO1xuICB9XG5cbiAgc2V0PFQgZXh0ZW5kcyBZdW56YWlDb25maWdLZXk+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGlja2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9kYXRlLXRpbWUvcGlja2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsVUFBVSxFQUFFLHdCQUF3QixFQUFFLE1BQU0sRUFBRSxNQUFNLFVBQVUsQ0FBQztBQ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SG91cnM6ICgpID0+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvZGF0ZS10aW1lL3RpbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLE9BQU8sRUFDUCxRQUFRLEVBQ1IsVUFBVSxFQUNWLFNBQVMsRUFDVCxTQUFTLEVBQ1QsS0FBSyxFQUNMLFFBQVEsRUFDUixVQUFVLEVBQ1YsWUFBWSxFQUNaLFdBQVcsRUFDWCxXQUFXLEVBQ1gsU0FBUyxFQUNULFFBQVEsRUFDUixRQUFRLEVBQ1QsTUFBTSxVQUFVLENBQUM7QUFJbEI7Ozs7Ozs7R0FPRztBQUNILE1BQU0sVUFBVSxlQUFlLENBQzdCLElBQTBHLEVBQzFHLElBQTZCO0lBRTdCLElBQUksR0FBRyxJQUFJO1FBQ1QsQ0FBQyxDQUFDLE9BQU8sSUFBSSxLQUFLLFFBQVE7WUFDeEIsQ0FBQyxDQUFDLEtBQUssQ0FBQyxJQUFJLEVBQUUscUJBQXFCLEVBQUUsSUFBSSxJQUFJLEVBQUUsQ0FBQztZQUNoRCxDQUFDLENBQUMsSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDO1FBQ2xCLENBQUMsQ0FBQyxJQUFJLElBQUksRUFBRSxDQUFDO0lBQ2YsTUFBTSxPQUFPLEdBQXdCLEVBQUUsWUFBWSxFQUFFLENBQUMsRUFBRSxDQUFDO0lBRXpELElBQUksR0FBaUIsQ0FBQztJQUN0QixRQUFRLElBQUksRUFBRTtRQUNaLEtBQUssT0FBTztZQUNWLEdBQUcsR0FBRyxDQUFDLElBQUksRUFBRSxJ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