systemrobotassistant 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of systemrobotassistant might be problematic. Click here for more details.

Files changed (369) hide show
  1. package/.eslintignore +6 -0
  2. package/.eslintrc +45 -0
  3. package/.gitlab-ci.yml +52 -0
  4. package/.lecprc.ts +76 -0
  5. package/.yarnrc +1 -0
  6. package/CHANGELOG.md +114 -0
  7. package/README.md +14 -0
  8. package/custom-amd-plugin.ts +46 -0
  9. package/es/component/answer-itme/index.d.ts +20 -0
  10. package/es/component/answer-itme/index.d.ts.map +1 -0
  11. package/es/component/answer-itme/index.js +41 -0
  12. package/es/component/answer-itme/style.css +35 -0
  13. package/es/component/data-container/index.d.ts +19 -0
  14. package/es/component/data-container/index.d.ts.map +1 -0
  15. package/es/component/data-container/index.js +37 -0
  16. package/es/component/data-container/style.css +26 -0
  17. package/es/component/days-tab/index.d.ts +6 -0
  18. package/es/component/days-tab/index.d.ts.map +1 -0
  19. package/es/component/days-tab/index.js +119 -0
  20. package/es/component/days-tab/style.css +43 -0
  21. package/es/component/days-tab/utils.d.ts +32 -0
  22. package/es/component/days-tab/utils.d.ts.map +1 -0
  23. package/es/component/days-tab/utils.js +98 -0
  24. package/es/component/error-boundary/index.d.ts +2 -0
  25. package/es/component/error-boundary/index.d.ts.map +1 -0
  26. package/es/component/error-boundary/index.js +33 -0
  27. package/es/component/it-notice-modal/columns.d.ts +11 -0
  28. package/es/component/it-notice-modal/columns.d.ts.map +1 -0
  29. package/es/component/it-notice-modal/columns.js +108 -0
  30. package/es/component/it-notice-modal/double-tab.d.ts +6 -0
  31. package/es/component/it-notice-modal/double-tab.d.ts.map +1 -0
  32. package/es/component/it-notice-modal/double-tab.js +94 -0
  33. package/es/component/it-notice-modal/index.d.ts +6 -0
  34. package/es/component/it-notice-modal/index.d.ts.map +1 -0
  35. package/es/component/it-notice-modal/index.js +488 -0
  36. package/es/component/it-notice-modal/server.d.ts +8 -0
  37. package/es/component/it-notice-modal/server.d.ts.map +1 -0
  38. package/es/component/it-notice-modal/server.js +43 -0
  39. package/es/component/it-notice-modal/single-tab.d.ts +6 -0
  40. package/es/component/it-notice-modal/single-tab.d.ts.map +1 -0
  41. package/es/component/it-notice-modal/single-tab.js +82 -0
  42. package/es/component/it-notice-modal/style.css +301 -0
  43. package/es/component/it-notice-modal/utils.d.ts +2 -0
  44. package/es/component/it-notice-modal/utils.d.ts.map +1 -0
  45. package/es/component/it-notice-modal/utils.js +8 -0
  46. package/es/component/it-notice-tab/index.d.ts +6 -0
  47. package/es/component/it-notice-tab/index.d.ts.map +1 -0
  48. package/es/component/it-notice-tab/index.js +206 -0
  49. package/es/component/it-notice-tab/server.d.ts +3 -0
  50. package/es/component/it-notice-tab/server.d.ts.map +1 -0
  51. package/es/component/it-notice-tab/server.js +13 -0
  52. package/es/component/it-notice-tab/style.css +103 -0
  53. package/es/component/mail-list-modal/index.d.ts +2 -0
  54. package/es/component/mail-list-modal/index.d.ts.map +1 -0
  55. package/es/component/mail-list-modal/index.js +306 -0
  56. package/es/component/mail-list-modal/server.d.ts +7 -0
  57. package/es/component/mail-list-modal/server.d.ts.map +1 -0
  58. package/es/component/mail-list-modal/server.js +38 -0
  59. package/es/component/mail-list-modal/style.css +132 -0
  60. package/es/component/myself-chat-card/index.d.ts +15 -0
  61. package/es/component/myself-chat-card/index.d.ts.map +1 -0
  62. package/es/component/myself-chat-card/index.js +25 -0
  63. package/es/component/myself-chat-card/style.css +22 -0
  64. package/es/component/need-answer/index.d.ts +15 -0
  65. package/es/component/need-answer/index.d.ts.map +1 -0
  66. package/es/component/need-answer/index.js +60 -0
  67. package/es/component/need-answer/style.css +19 -0
  68. package/es/component/opppsition-chat-card/index.d.ts +11 -0
  69. package/es/component/opppsition-chat-card/index.d.ts.map +1 -0
  70. package/es/component/opppsition-chat-card/index.js +25 -0
  71. package/es/component/opppsition-chat-card/style.css +23 -0
  72. package/es/component/question-library/index.d.ts +10 -0
  73. package/es/component/question-library/index.d.ts.map +1 -0
  74. package/es/component/question-library/index.js +291 -0
  75. package/es/component/question-library/server.d.ts +4 -0
  76. package/es/component/question-library/server.d.ts.map +1 -0
  77. package/es/component/question-library/server.js +19 -0
  78. package/es/component/question-library/style.css +75 -0
  79. package/es/component/question-tag/index.d.ts +11 -0
  80. package/es/component/question-tag/index.d.ts.map +1 -0
  81. package/es/component/question-tag/index.js +23 -0
  82. package/es/component/question-tag/style.css +12 -0
  83. package/es/component/recommend-questions-card/index.d.ts +10 -0
  84. package/es/component/recommend-questions-card/index.d.ts.map +1 -0
  85. package/es/component/recommend-questions-card/index.js +104 -0
  86. package/es/component/recommend-questions-card/style.css +54 -0
  87. package/es/component/scroll-view/index.d.ts +3 -0
  88. package/es/component/scroll-view/index.d.ts.map +1 -0
  89. package/es/component/scroll-view/index.js +2 -0
  90. package/es/component/scroll-view/scroll-view.d.ts +18 -0
  91. package/es/component/scroll-view/scroll-view.d.ts.map +1 -0
  92. package/es/component/scroll-view/scroll-view.js +66 -0
  93. package/es/component/scroll-view/style.css +34 -0
  94. package/es/component/tab/index.d.ts +2 -0
  95. package/es/component/tab/index.d.ts.map +1 -0
  96. package/es/component/tab/index.js +18 -0
  97. package/es/component/tab/style.css +26 -0
  98. package/es/component/tips-answer/index.d.ts +15 -0
  99. package/es/component/tips-answer/index.d.ts.map +1 -0
  100. package/es/component/tips-answer/index.js +28 -0
  101. package/es/component/tips-answer/style.css +10 -0
  102. package/es/images/expire-robot.svg +16 -0
  103. package/es/images/pc-invalid.svg +11 -0
  104. package/es/images/screenshot-5.png +0 -0
  105. package/es/index.d.ts +92 -0
  106. package/es/index.d.ts.map +1 -0
  107. package/es/index.js +506 -0
  108. package/es/js/const.d.ts +41 -0
  109. package/es/js/const.d.ts.map +1 -0
  110. package/es/js/const.js +46 -0
  111. package/es/js/gen-render-promise.d.ts +9 -0
  112. package/es/js/gen-render-promise.d.ts.map +1 -0
  113. package/es/js/gen-render-promise.js +30 -0
  114. package/es/js/get-time.d.ts +15 -0
  115. package/es/js/get-time.d.ts.map +1 -0
  116. package/es/js/get-time.js +35 -0
  117. package/es/js/hfc-space.d.ts +16 -0
  118. package/es/js/hfc-space.d.ts.map +1 -0
  119. package/es/js/hfc-space.js +71 -0
  120. package/es/js/render-special.d.ts +16 -0
  121. package/es/js/render-special.d.ts.map +1 -0
  122. package/es/js/render-special.js +53 -0
  123. package/es/js/request/fetch.d.ts +10 -0
  124. package/es/js/request/fetch.d.ts.map +1 -0
  125. package/es/js/request/fetch.js +81 -0
  126. package/es/js/request/request.d.ts +3 -0
  127. package/es/js/request/request.d.ts.map +1 -0
  128. package/es/js/request/request.js +63 -0
  129. package/es/js/showMessage.d.ts +15 -0
  130. package/es/js/showMessage.d.ts.map +1 -0
  131. package/es/js/showMessage.js +75 -0
  132. package/es/js/state-immer.d.ts +3 -0
  133. package/es/js/state-immer.d.ts.map +1 -0
  134. package/es/js/state-immer.js +19 -0
  135. package/es/js/timer-executor.d.ts +3 -0
  136. package/es/js/timer-executor.d.ts.map +1 -0
  137. package/es/js/timer-executor.js +83 -0
  138. package/es/js/to-hfc.d.ts +2 -0
  139. package/es/js/to-hfc.d.ts.map +1 -0
  140. package/es/js/to-hfc.js +8 -0
  141. package/es/js/utils.d.ts +3 -0
  142. package/es/js/utils.d.ts.map +1 -0
  143. package/es/js/utils.js +11 -0
  144. package/es/jsx/chat-modal.d.ts +16 -0
  145. package/es/jsx/chat-modal.d.ts.map +1 -0
  146. package/es/jsx/chat-modal.js +268 -0
  147. package/es/server.d.ts +8 -0
  148. package/es/server.d.ts.map +1 -0
  149. package/es/server.js +44 -0
  150. package/es/style.css +174 -0
  151. package/lib/component/answer-itme/index.d.ts +20 -0
  152. package/lib/component/answer-itme/index.d.ts.map +1 -0
  153. package/lib/component/answer-itme/index.js +51 -0
  154. package/lib/component/answer-itme/style.css +35 -0
  155. package/lib/component/data-container/index.d.ts +19 -0
  156. package/lib/component/data-container/index.d.ts.map +1 -0
  157. package/lib/component/data-container/index.js +45 -0
  158. package/lib/component/data-container/style.css +26 -0
  159. package/lib/component/days-tab/index.d.ts +6 -0
  160. package/lib/component/days-tab/index.d.ts.map +1 -0
  161. package/lib/component/days-tab/index.js +129 -0
  162. package/lib/component/days-tab/style.css +43 -0
  163. package/lib/component/days-tab/utils.d.ts +32 -0
  164. package/lib/component/days-tab/utils.d.ts.map +1 -0
  165. package/lib/component/days-tab/utils.js +110 -0
  166. package/lib/component/error-boundary/index.d.ts +2 -0
  167. package/lib/component/error-boundary/index.d.ts.map +1 -0
  168. package/lib/component/error-boundary/index.js +40 -0
  169. package/lib/component/it-notice-modal/columns.d.ts +11 -0
  170. package/lib/component/it-notice-modal/columns.d.ts.map +1 -0
  171. package/lib/component/it-notice-modal/columns.js +116 -0
  172. package/lib/component/it-notice-modal/double-tab.d.ts +6 -0
  173. package/lib/component/it-notice-modal/double-tab.d.ts.map +1 -0
  174. package/lib/component/it-notice-modal/double-tab.js +104 -0
  175. package/lib/component/it-notice-modal/index.d.ts +6 -0
  176. package/lib/component/it-notice-modal/index.d.ts.map +1 -0
  177. package/lib/component/it-notice-modal/index.js +499 -0
  178. package/lib/component/it-notice-modal/server.d.ts +8 -0
  179. package/lib/component/it-notice-modal/server.d.ts.map +1 -0
  180. package/lib/component/it-notice-modal/server.js +55 -0
  181. package/lib/component/it-notice-modal/single-tab.d.ts +6 -0
  182. package/lib/component/it-notice-modal/single-tab.d.ts.map +1 -0
  183. package/lib/component/it-notice-modal/single-tab.js +92 -0
  184. package/lib/component/it-notice-modal/style.css +301 -0
  185. package/lib/component/it-notice-modal/utils.d.ts +2 -0
  186. package/lib/component/it-notice-modal/utils.d.ts.map +1 -0
  187. package/lib/component/it-notice-modal/utils.js +15 -0
  188. package/lib/component/it-notice-tab/index.d.ts +6 -0
  189. package/lib/component/it-notice-tab/index.d.ts.map +1 -0
  190. package/lib/component/it-notice-tab/index.js +216 -0
  191. package/lib/component/it-notice-tab/server.d.ts +3 -0
  192. package/lib/component/it-notice-tab/server.d.ts.map +1 -0
  193. package/lib/component/it-notice-tab/server.js +20 -0
  194. package/lib/component/it-notice-tab/style.css +103 -0
  195. package/lib/component/mail-list-modal/index.d.ts +2 -0
  196. package/lib/component/mail-list-modal/index.d.ts.map +1 -0
  197. package/lib/component/mail-list-modal/index.js +316 -0
  198. package/lib/component/mail-list-modal/server.d.ts +7 -0
  199. package/lib/component/mail-list-modal/server.d.ts.map +1 -0
  200. package/lib/component/mail-list-modal/server.js +50 -0
  201. package/lib/component/mail-list-modal/style.css +132 -0
  202. package/lib/component/myself-chat-card/index.d.ts +15 -0
  203. package/lib/component/myself-chat-card/index.d.ts.map +1 -0
  204. package/lib/component/myself-chat-card/index.js +35 -0
  205. package/lib/component/myself-chat-card/style.css +22 -0
  206. package/lib/component/need-answer/index.d.ts +15 -0
  207. package/lib/component/need-answer/index.d.ts.map +1 -0
  208. package/lib/component/need-answer/index.js +70 -0
  209. package/lib/component/need-answer/style.css +19 -0
  210. package/lib/component/opppsition-chat-card/index.d.ts +11 -0
  211. package/lib/component/opppsition-chat-card/index.d.ts.map +1 -0
  212. package/lib/component/opppsition-chat-card/index.js +35 -0
  213. package/lib/component/opppsition-chat-card/style.css +23 -0
  214. package/lib/component/question-library/index.d.ts +10 -0
  215. package/lib/component/question-library/index.d.ts.map +1 -0
  216. package/lib/component/question-library/index.js +301 -0
  217. package/lib/component/question-library/server.d.ts +4 -0
  218. package/lib/component/question-library/server.d.ts.map +1 -0
  219. package/lib/component/question-library/server.js +27 -0
  220. package/lib/component/question-library/style.css +75 -0
  221. package/lib/component/question-tag/index.d.ts +11 -0
  222. package/lib/component/question-tag/index.d.ts.map +1 -0
  223. package/lib/component/question-tag/index.js +33 -0
  224. package/lib/component/question-tag/style.css +12 -0
  225. package/lib/component/recommend-questions-card/index.d.ts +10 -0
  226. package/lib/component/recommend-questions-card/index.d.ts.map +1 -0
  227. package/lib/component/recommend-questions-card/index.js +114 -0
  228. package/lib/component/recommend-questions-card/style.css +54 -0
  229. package/lib/component/scroll-view/index.d.ts +3 -0
  230. package/lib/component/scroll-view/index.d.ts.map +1 -0
  231. package/lib/component/scroll-view/index.js +10 -0
  232. package/lib/component/scroll-view/scroll-view.d.ts +18 -0
  233. package/lib/component/scroll-view/scroll-view.d.ts.map +1 -0
  234. package/lib/component/scroll-view/scroll-view.js +76 -0
  235. package/lib/component/scroll-view/style.css +34 -0
  236. package/lib/component/tab/index.d.ts +2 -0
  237. package/lib/component/tab/index.d.ts.map +1 -0
  238. package/lib/component/tab/index.js +28 -0
  239. package/lib/component/tab/style.css +26 -0
  240. package/lib/component/tips-answer/index.d.ts +15 -0
  241. package/lib/component/tips-answer/index.d.ts.map +1 -0
  242. package/lib/component/tips-answer/index.js +38 -0
  243. package/lib/component/tips-answer/style.css +10 -0
  244. package/lib/images/expire-robot.svg +16 -0
  245. package/lib/images/pc-invalid.svg +11 -0
  246. package/lib/images/screenshot-5.png +0 -0
  247. package/lib/index.d.ts +92 -0
  248. package/lib/index.d.ts.map +1 -0
  249. package/lib/index.js +516 -0
  250. package/lib/js/const.d.ts +41 -0
  251. package/lib/js/const.d.ts.map +1 -0
  252. package/lib/js/const.js +55 -0
  253. package/lib/js/gen-render-promise.d.ts +9 -0
  254. package/lib/js/gen-render-promise.d.ts.map +1 -0
  255. package/lib/js/gen-render-promise.js +37 -0
  256. package/lib/js/get-time.d.ts +15 -0
  257. package/lib/js/get-time.d.ts.map +1 -0
  258. package/lib/js/get-time.js +43 -0
  259. package/lib/js/hfc-space.d.ts +16 -0
  260. package/lib/js/hfc-space.d.ts.map +1 -0
  261. package/lib/js/hfc-space.js +91 -0
  262. package/lib/js/render-special.d.ts +16 -0
  263. package/lib/js/render-special.d.ts.map +1 -0
  264. package/lib/js/render-special.js +61 -0
  265. package/lib/js/request/fetch.d.ts +10 -0
  266. package/lib/js/request/fetch.d.ts.map +1 -0
  267. package/lib/js/request/fetch.js +88 -0
  268. package/lib/js/request/request.d.ts +3 -0
  269. package/lib/js/request/request.d.ts.map +1 -0
  270. package/lib/js/request/request.js +71 -0
  271. package/lib/js/showMessage.d.ts +15 -0
  272. package/lib/js/showMessage.d.ts.map +1 -0
  273. package/lib/js/showMessage.js +83 -0
  274. package/lib/js/state-immer.d.ts +3 -0
  275. package/lib/js/state-immer.d.ts.map +1 -0
  276. package/lib/js/state-immer.js +27 -0
  277. package/lib/js/timer-executor.d.ts +3 -0
  278. package/lib/js/timer-executor.d.ts.map +1 -0
  279. package/lib/js/timer-executor.js +91 -0
  280. package/lib/js/to-hfc.d.ts +2 -0
  281. package/lib/js/to-hfc.d.ts.map +1 -0
  282. package/lib/js/to-hfc.js +14 -0
  283. package/lib/js/utils.d.ts +3 -0
  284. package/lib/js/utils.d.ts.map +1 -0
  285. package/lib/js/utils.js +19 -0
  286. package/lib/jsx/chat-modal.d.ts +16 -0
  287. package/lib/jsx/chat-modal.d.ts.map +1 -0
  288. package/lib/jsx/chat-modal.js +278 -0
  289. package/lib/server.d.ts +8 -0
  290. package/lib/server.d.ts.map +1 -0
  291. package/lib/server.js +58 -0
  292. package/lib/style.css +174 -0
  293. package/package.json +57 -0
  294. package/rct.config.js +8 -0
  295. package/src/component/answer-itme/index.jsx +64 -0
  296. package/src/component/answer-itme/style.less +37 -0
  297. package/src/component/data-container/index.jsx +45 -0
  298. package/src/component/data-container/style.less +27 -0
  299. package/src/component/days-tab/index.jsx +114 -0
  300. package/src/component/days-tab/style.less +55 -0
  301. package/src/component/days-tab/utils.js +87 -0
  302. package/src/component/error-boundary/index.jsx +39 -0
  303. package/src/component/it-notice-modal/columns.js +102 -0
  304. package/src/component/it-notice-modal/double-tab.jsx +83 -0
  305. package/src/component/it-notice-modal/index.jsx +404 -0
  306. package/src/component/it-notice-modal/server.js +43 -0
  307. package/src/component/it-notice-modal/single-tab.jsx +70 -0
  308. package/src/component/it-notice-modal/style.less +367 -0
  309. package/src/component/it-notice-modal/utils.js +8 -0
  310. package/src/component/it-notice-tab/index.jsx +196 -0
  311. package/src/component/it-notice-tab/server.js +14 -0
  312. package/src/component/it-notice-tab/style.less +120 -0
  313. package/src/component/mail-list-modal/index.jsx +270 -0
  314. package/src/component/mail-list-modal/server.js +38 -0
  315. package/src/component/mail-list-modal/style.less +154 -0
  316. package/src/component/myself-chat-card/index.jsx +27 -0
  317. package/src/component/myself-chat-card/style.less +30 -0
  318. package/src/component/need-answer/index.jsx +56 -0
  319. package/src/component/need-answer/style.less +21 -0
  320. package/src/component/opppsition-chat-card/index.jsx +25 -0
  321. package/src/component/opppsition-chat-card/style.less +33 -0
  322. package/src/component/question-library/index.jsx +316 -0
  323. package/src/component/question-library/server.js +19 -0
  324. package/src/component/question-library/style.less +102 -0
  325. package/src/component/question-tag/index.jsx +27 -0
  326. package/src/component/question-tag/style.less +15 -0
  327. package/src/component/recommend-questions-card/index.jsx +111 -0
  328. package/src/component/recommend-questions-card/style.less +66 -0
  329. package/src/component/scroll-view/index.js +3 -0
  330. package/src/component/scroll-view/scroll-view.jsx +74 -0
  331. package/src/component/scroll-view/style.less +37 -0
  332. package/src/component/tab/index.jsx +17 -0
  333. package/src/component/tab/style.less +26 -0
  334. package/src/component/tips-answer/index.jsx +38 -0
  335. package/src/component/tips-answer/style.less +11 -0
  336. package/src/images/expire-robot.svg +16 -0
  337. package/src/images/pc-invalid.svg +11 -0
  338. package/src/images/screenshot-5.png +0 -0
  339. package/src/index.jsx +554 -0
  340. package/src/js/const.js +48 -0
  341. package/src/js/gen-render-promise.js +32 -0
  342. package/src/js/get-time.js +35 -0
  343. package/src/js/hfc-space.js +91 -0
  344. package/src/js/render-special.js +64 -0
  345. package/src/js/request/fetch.js +87 -0
  346. package/src/js/request/request.js +74 -0
  347. package/src/js/showMessage.js +81 -0
  348. package/src/js/state-immer.js +12 -0
  349. package/src/js/timer-executor.js +37 -0
  350. package/src/js/to-hfc.js +9 -0
  351. package/src/js/utils.js +13 -0
  352. package/src/jsx/chat-modal.jsx +254 -0
  353. package/src/main.js +1 -0
  354. package/src/server.js +45 -0
  355. package/src/style.less +229 -0
  356. package/test/cases/case-01.assert.js +6 -0
  357. package/test/cases/case-01.source.jsx +17 -0
  358. package/test/cases/case-02.assert.js +6 -0
  359. package/test/cases/case-02.source.jsx +25 -0
  360. package/test/cases/case-02.style.less +15 -0
  361. package/test/cases/case-03.source.jsx +69 -0
  362. package/test/cases/case-03.style.less +3 -0
  363. package/tsconfig.json +48 -0
  364. package/typings.d.ts +5 -0
  365. package/umd/b415d90208c277ba3703.png +0 -0
  366. package/umd/index.css +1753 -0
  367. package/umd/index.js +36258 -0
  368. package/umd/index.min.css +1 -0
  369. package/umd/index.min.js +657 -0
package/es/js/const.js ADDED
@@ -0,0 +1,46 @@
1
+ export var contentType = {
2
+ OPPOSITION: 2,
3
+ // 对方的回答
4
+ MYSELF: 1,
5
+ // 自己的问题
6
+
7
+ TIPS: 3,
8
+ // 说明更新了
9
+
10
+ NEEDANSWER: 4 // 需要更新
11
+ };
12
+
13
+ // 不用包t了
14
+ export var TIPS = {
15
+ globalCount: {
16
+ content: 'SHEIN标准与规范',
17
+ link: '/direction'
18
+ },
19
+ guideCount: {
20
+ content: '新手指南',
21
+ link: '/guide'
22
+ },
23
+ problemCount: {
24
+ content: '问题库',
25
+ link: '/question/list'
26
+ }
27
+ };
28
+
29
+ // 不用包t了
30
+ export var TABS = [{
31
+ label: '问题库',
32
+ value: 1,
33
+ icon: 'problem-base'
34
+ }, {
35
+ label: '对接人',
36
+ value: 2,
37
+ icon: 'qiyeweixin'
38
+ }, {
39
+ label: '系统报障',
40
+ value: 3
41
+ }, {
42
+ label: '版本计划',
43
+ value: 4,
44
+ icon: 'pc-notice',
45
+ popoverContent: '版本计划展示产研未来两周的上线计划(含今日)'
46
+ }];
@@ -0,0 +1,9 @@
1
+ export default genRenderPromise;
2
+ /**
3
+ *
4
+ * @param {ReactNode} InnerComponent
5
+ * @param {String} name
6
+ * @returns {Promise}
7
+ */
8
+ declare function genRenderPromise(InnerComponent: ReactNode, name: string, useHistory: any): Promise<any>;
9
+ //# sourceMappingURL=gen-render-promise.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gen-render-promise.d.ts","sourceRoot":"","sources":["../../src/js/gen-render-promise.js"],"names":[],"mappings":";AAGA;;;;;GAKG;AACH,0GAoBC"}
@@ -0,0 +1,30 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import React from 'react';
3
+ import Render from "./render-special";
4
+
5
+ /**
6
+ *
7
+ * @param {ReactNode} InnerComponent
8
+ * @param {String} name
9
+ * @returns {Promise}
10
+ */
11
+ var genRenderPromise = (InnerComponent, name, useHistory) => function () {
12
+ var record = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
13
+ var render = new Render(name, useHistory);
14
+ return new Promise((resolve, reject) => {
15
+ var el = /*#__PURE__*/React.createElement(InnerComponent, _extends({}, record, {
16
+ onOk: res => {
17
+ render.unmountComponentAtNode();
18
+ render = null;
19
+ resolve(res);
20
+ },
21
+ onClose: rej => {
22
+ render.unmountComponentAtNode();
23
+ render = null;
24
+ reject(rej);
25
+ }
26
+ }));
27
+ render.render(el);
28
+ });
29
+ };
30
+ export default genRenderPromise;
@@ -0,0 +1,15 @@
1
+ export default function getNow(): string;
2
+ /**
3
+ * 获取指定时间的前几天或者后几天
4
+ * @param date 时间 2012-12-12
5
+ * @param day 前几天 如2 或者后几天 如-2
6
+ * @returns {String} 如2012-12-10
7
+ */
8
+ export function getNextOrPreDate(date: any, day: any): string;
9
+ /**
10
+ * 获取指定时间的当周的周一和周日
11
+ * @param date 时间 2012-12-12
12
+ * @returns {Array} [2012-12-09,2012-12-15]
13
+ */
14
+ export function getWeekByDate(date: any): any[];
15
+ //# sourceMappingURL=get-time.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-time.d.ts","sourceRoot":"","sources":["../../src/js/get-time.js"],"names":[],"mappings":"AAAA,yCAOC;AAED;;;;;GAKG;AACH,8DAOC;AAED;;;;GAIG;AACH,gDAKC"}
@@ -0,0 +1,35 @@
1
+ export default function getNow() {
2
+ var now = new Date();
3
+ var h = now.getHours();
4
+ h = h < 10 ? `0${h}` : h;
5
+ var m = now.getMinutes();
6
+ m = m < 10 ? `0${m}` : m;
7
+ return `${h}:${m}`;
8
+ }
9
+
10
+ /**
11
+ * 获取指定时间的前几天或者后几天
12
+ * @param date 时间 2012-12-12
13
+ * @param day 前几天 如2 或者后几天 如-2
14
+ * @returns {String} 如2012-12-10
15
+ */
16
+ export function getNextOrPreDate(date, day) {
17
+ var dd = new Date(date);
18
+ dd.setDate(dd.getDate() + day);
19
+ var y = dd.getFullYear();
20
+ var m = dd.getMonth() + 1 < 10 ? `0${dd.getMonth() + 1}` : dd.getMonth() + 1;
21
+ var d = dd.getDate() < 10 ? `0${dd.getDate()}` : dd.getDate();
22
+ return `${y}-${m}-${d}`;
23
+ }
24
+
25
+ /**
26
+ * 获取指定时间的当周的周一和周日
27
+ * @param date 时间 2012-12-12
28
+ * @returns {Array} [2012-12-09,2012-12-15]
29
+ */
30
+ export function getWeekByDate(date) {
31
+ var dt = new Date(date).getDay() === 0 ? 7 : new Date(date).getDay();
32
+ var pre = getNextOrPreDate(date, -dt + 1);
33
+ var next = getNextOrPreDate(date, 7 - dt);
34
+ return [pre, next];
35
+ }
@@ -0,0 +1,16 @@
1
+ export function setHfcSpace(str: any): void;
2
+ export function getHfcSpace(): any;
3
+ export function setHfcUserName(str: any): void;
4
+ export function getHfcUserName(): any;
5
+ export function setTranslateFn(fn: any): void;
6
+ export function getTranslateFn(): any;
7
+ export function setHfcToken(str: any): void;
8
+ export function getHfcToken(): string | null;
9
+ export function setLocalStorage(obj: any): void;
10
+ export function getLocalStorage(key: any): string | null;
11
+ export function setHfcEnv(str: any): void;
12
+ export function getOrigin(): any;
13
+ export function setTokenInvalidCallback(fn: any): void;
14
+ export function invokeTokenInvalidCallback(res: any): void;
15
+ export function clearAll(): void;
16
+ //# sourceMappingURL=hfc-space.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hfc-space.d.ts","sourceRoot":"","sources":["../../src/js/hfc-space.js"],"names":[],"mappings":"AAIA,4CAEC;AAED,mCAEC;AAED,+CAEC;AAED,sCAEC;AAED,8CAEC;AAED,sCAEC;AAID,4CAEC;AAED,6CAEC;AAED,gDAYC;AAED,yDAEC;AAID,0CAEC;AASD,iCAEC;AAID,uDAEC;AAED,2DAIC;AAED,iCAKC"}
@@ -0,0 +1,71 @@
1
+ var hfcSpace;
2
+ var hfcUserName;
3
+ var translateFn;
4
+ export function setHfcSpace(str) {
5
+ hfcSpace = str;
6
+ }
7
+ export function getHfcSpace() {
8
+ return hfcSpace;
9
+ }
10
+ export function setHfcUserName(str) {
11
+ hfcUserName = str;
12
+ }
13
+ export function getHfcUserName() {
14
+ return hfcUserName;
15
+ }
16
+ export function setTranslateFn(fn) {
17
+ translateFn = fn;
18
+ }
19
+ export function getTranslateFn() {
20
+ return translateFn;
21
+ }
22
+ var setHfcTokenKey = '$$hfc_token';
23
+ export function setHfcToken(str) {
24
+ window.localStorage.setItem(setHfcTokenKey, str);
25
+ }
26
+ export function getHfcToken() {
27
+ return window.localStorage.getItem(setHfcTokenKey);
28
+ }
29
+ export function setLocalStorage(obj) {
30
+ var keyList = Object.keys(obj);
31
+ if (keyList.length > 0) {
32
+ keyList.forEach(key => {
33
+ var value = obj[key];
34
+ if (typeof obj[key] === 'object') {
35
+ value = JSON.stringify(obj[key]);
36
+ }
37
+ window.localStorage.setItem(key, String(value));
38
+ });
39
+ }
40
+ }
41
+ export function getLocalStorage(key) {
42
+ return window.localStorage.getItem(key);
43
+ }
44
+ var env;
45
+ export function setHfcEnv(str) {
46
+ env = str;
47
+ }
48
+ var origin = {
49
+ dev: 'hfc-dev01.dotfashion.cn',
50
+ test: 'hfc-test01.dotfashion.cn',
51
+ sit: 'hfc-sit01.dotfashion.cn',
52
+ online: 'hfc.dotfashion.cn'
53
+ };
54
+ export function getOrigin() {
55
+ return origin[env];
56
+ }
57
+ var tokenInvalidCallback;
58
+ export function setTokenInvalidCallback(fn) {
59
+ tokenInvalidCallback = fn;
60
+ }
61
+ export function invokeTokenInvalidCallback(res) {
62
+ if (typeof tokenInvalidCallback === 'function') {
63
+ tokenInvalidCallback(res);
64
+ }
65
+ }
66
+ export function clearAll() {
67
+ window.localStorage.removeItem(setHfcTokenKey);
68
+ env = undefined;
69
+ hfcSpace = undefined;
70
+ hfcUserName = undefined;
71
+ }
@@ -0,0 +1,16 @@
1
+ export default Render;
2
+ declare class Render {
3
+ constructor(name: any, useHistory: any);
4
+ div: HTMLDivElement | null;
5
+ name: any;
6
+ hidden: boolean;
7
+ useHistory: any;
8
+ create(): void;
9
+ remove(): void;
10
+ render(element: any): void;
11
+ unmountComponentAtNode(): void;
12
+ historyListener: any;
13
+ hide(): void;
14
+ show(): void;
15
+ }
16
+ //# sourceMappingURL=render-special.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-special.d.ts","sourceRoot":"","sources":["../../src/js/render-special.js"],"names":[],"mappings":";AAIA;IACE,wCAUC;IATC,2BAAe;IACf,UAAoC;IACpC,gBAAmB;IACnB,gBAA4B;IAQ9B,eAcC;IAED,eAOC;IAYD,2BAGC;IAED,+BAGC;IAnCG,qBAIE;IAaN,aAGC;IAED,aAGC;CAWF"}
@@ -0,0 +1,53 @@
1
+ import ReactDom from 'react-dom';
2
+ import { createHashHistory } from 'history';
3
+ var hashHistory = createHashHistory();
4
+ class Render {
5
+ constructor(name, useHistory) {
6
+ this.div = null;
7
+ this.name = name || 'render-special';
8
+ this.hidden = false;
9
+ this.useHistory = useHistory;
10
+ this.create = this.create.bind(this);
11
+ this.remove = this.remove.bind(this);
12
+ this.render = this.render.bind(this);
13
+ this.unmountComponentAtNode = this.unmountComponentAtNode.bind(this);
14
+ }
15
+ create() {
16
+ this.div = document.createElement('div');
17
+ this.div.setAttribute('tool-element', this.name);
18
+ document.body.appendChild(this.div);
19
+ if (this.hidden) this.div.style.display = 'none';else this.div.style.display = '';
20
+ if (this.useHistory) {
21
+ this.historyListener = hashHistory.listen(() => {
22
+ if (this.div) {
23
+ this.unmountComponentAtNode();
24
+ }
25
+ });
26
+ }
27
+ }
28
+ remove() {
29
+ if (typeof this.historyListener === 'function') {
30
+ this.historyListener();
31
+ this.historyListener = null;
32
+ }
33
+ document.body.removeChild(this.div);
34
+ this.div = null;
35
+ }
36
+ hide() {
37
+ this.hidden = true;
38
+ if (this.div) this.div.style.display = 'none';
39
+ }
40
+ show() {
41
+ this.hidden = false;
42
+ if (this.div) this.div.style.display = '';
43
+ }
44
+ render(element) {
45
+ if (!this.div) this.create();
46
+ ReactDom.render(element, this.div);
47
+ }
48
+ unmountComponentAtNode() {
49
+ ReactDom.unmountComponentAtNode(this.div);
50
+ this.remove();
51
+ }
52
+ }
53
+ export default Render;
@@ -0,0 +1,10 @@
1
+ export function checkStatus(response: any, t: any): any;
2
+ /**
3
+ * Requests a URL, returning a promise.
4
+ *
5
+ * @param {string} url The URL we want to request
6
+ * @param {object} [options] The options we want to pass to "fetch"
7
+ * @return {object} An object containing either "data" or "err"
8
+ */
9
+ export default function request(api: any, options?: object | undefined): object;
10
+ //# sourceMappingURL=fetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/js/request/fetch.js"],"names":[],"mappings":"AAqBA,wDAUC;AAED;;;;;;GAMG;AACH,yEAFY,MAAM,CAgDjB"}
@@ -0,0 +1,81 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ import { fetch } from 'sheinq';
5
+ import { Message } from 'shineout';
6
+ import { getTranslateFn } from "../hfc-space";
7
+ var codeMessage = {
8
+ 200: '服务器成功返回请求的数据',
9
+ 201: '新建或修改数据成功。',
10
+ 202: '一个请求已经进入后台排队(异步任务)',
11
+ 204: '删除数据成功。',
12
+ 400: '发出的请求有错误,服务器没有进行新建或修改数据,的操作。',
13
+ 401: '用户没有权限(令牌、用户名、密码错误)。',
14
+ 403: '用户得到授权,但是访问是被禁止的。',
15
+ 404: '发出的请求针对的是不存在的记录,服务器没有进行操作',
16
+ 406: '请求的格式不可得。',
17
+ 410: '请求的资源被永久删除,且不会再得到的。',
18
+ 422: '当创建一个对象时,发生一个验证错误。',
19
+ 500: '服务器发生错误,请检查服务器',
20
+ 502: '网关错误,请稍后再试',
21
+ 503: '服务不可用,服务器暂时过载或维护',
22
+ 504: '网关超时'
23
+ };
24
+ export function checkStatus(response, t) {
25
+ if (response.status >= 200 && response.status < 300) {
26
+ return response;
27
+ }
28
+ var errortext = t(codeMessage[response.status] || response.statusText);
29
+ // Message.info('网络开小差了哦~')
30
+ var error = new Error(errortext);
31
+ error.name = response.status;
32
+ error.response = response;
33
+ throw error;
34
+ }
35
+
36
+ /**
37
+ * Requests a URL, returning a promise.
38
+ *
39
+ * @param {string} url The URL we want to request
40
+ * @param {object} [options] The options we want to pass to "fetch"
41
+ * @return {object} An object containing either "data" or "err"
42
+ */
43
+ export default function request(api, options) {
44
+ // 拼接api
45
+
46
+ // 获取翻译函数
47
+ var translateFn = getTranslateFn();
48
+ function t(str) {
49
+ return translateFn ? translateFn(str) : str;
50
+ }
51
+ var newOptions = _objectSpread({}, options);
52
+ if (newOptions.file && newOptions.method === 'GET') {
53
+ newOptions.headers = _objectSpread({
54
+ Accept: 'application/octet-stream',
55
+ 'Content-Type': 'application/octet-stream; charset=utf-8'
56
+ }, newOptions.headers);
57
+ return fetch(api, newOptions).then(res => {
58
+ if (res.body instanceof ReadableStream) return res.blob();
59
+ Message.error(t('文件类型错误!'));
60
+ return null;
61
+ }).catch(e => {
62
+ throw e;
63
+ });
64
+ }
65
+ if (newOptions.method === 'POST' || newOptions.method === 'PUT') {
66
+ newOptions.headers = _objectSpread({
67
+ Accept: 'application/json',
68
+ 'Content-Type': 'application/json; charset=utf-8'
69
+ }, newOptions.headers);
70
+ newOptions.body = JSON.stringify(newOptions.body);
71
+ }
72
+ return fetch(api, newOptions).then(response => checkStatus(response, t)).then(response => {
73
+ if (newOptions.method === 'DELETE' || response.status === 204) {
74
+ return response.text();
75
+ }
76
+ return response.json();
77
+ }).catch(e => ({
78
+ code: -109,
79
+ msg: `${e.name} ${e.response}`
80
+ }));
81
+ }
@@ -0,0 +1,3 @@
1
+ export default function postRequest(api: any, condition: any, checkCodedisabled: any): any;
2
+ export function testPostRequest(api: any, params: any, result: any): Promise<any>;
3
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/js/request/request.js"],"names":[],"mappings":"AA2CA,2FAeC;AAED,kFAaC"}
@@ -0,0 +1,63 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ import { getHfcSpace, getHfcToken, getOrigin, invokeTokenInvalidCallback, getLocalStorage } from "../hfc-space";
5
+ import request from "./fetch";
6
+ var CODE = {
7
+ SUCCESS: '0',
8
+ TOKEN_INVALID: '40000',
9
+ INVALID_SPACE: '50000',
10
+ INVALID_CODE: '21102',
11
+ BAN: '121101',
12
+ UN_VALID: '121102',
13
+ NO_FOUND: '121103'
14
+ };
15
+ var checkCode = (result, api, checkCodedisabled) => {
16
+ // 不检测code
17
+ if (checkCodedisabled) {
18
+ return result;
19
+ }
20
+ if (result.code === CODE.SUCCESS) return result;
21
+ if ([CODE.TOKEN_INVALID, CODE.INVALID_SPACE, CODE.INVALID_CODE, CODE.BAN, CODE.UN_VALID, CODE.NO_FOUND].includes(result.code)) {
22
+ // 登录失效回调
23
+ invokeTokenInvalidCallback(result);
24
+ // 登录失效也不弹报错了
25
+ return undefined;
26
+ }
27
+
28
+ // 报错提醒全部干掉吧
29
+ // showMessage((result && result.msg) || '报错了接口')
30
+ return undefined;
31
+ };
32
+ export default function postRequest(api, condition, checkCodedisabled) {
33
+ var requestApi = `https://${getOrigin()}${api}`;
34
+ var body = _objectSpread({}, condition);
35
+ var hfcSpace = getHfcSpace();
36
+ var headers = {
37
+ 'hfc-space': hfcSpace,
38
+ 'hfc-token': getHfcToken(),
39
+ language: getLocalStorage(`${hfcSpace}-lang`) || 'CN'
40
+ };
41
+ var defaultOptions = {
42
+ credentials: 'include'
43
+ };
44
+ return request(requestApi, _objectSpread({
45
+ method: 'POST',
46
+ body,
47
+ headers
48
+ }, defaultOptions)).then(result => checkCode(result, requestApi, checkCodedisabled));
49
+ }
50
+ export function testPostRequest(api, params, result) {
51
+ // eslint-disable-next-line no-console
52
+ console.log('api', api);
53
+ // eslint-disable-next-line no-console
54
+ console.log('params', params);
55
+ return new Promise(resolve => {
56
+ setTimeout(() => {
57
+ resolve({
58
+ code: '0',
59
+ info: result
60
+ });
61
+ }, 1000);
62
+ });
63
+ }
@@ -0,0 +1,15 @@
1
+ export default showMessage;
2
+ /**
3
+ * 一般最后一个才能作为默认参数
4
+ * @funcNmae showMessage
5
+ * @param msg string 消息内容
6
+ * @param isSuccess bool 是否显示toast或dialog
7
+ * @param options.time number 消息持续时间,单位毫秒
8
+ * @param options.cb func 浮窗结束或者点击后的回调方法
9
+ * @param options.onClose 点击蒙层的回调方法
10
+ */
11
+ declare function showMessage(msg: any, isSuccess?: boolean, options?: {
12
+ time: number;
13
+ cb: () => void;
14
+ }): void;
15
+ //# sourceMappingURL=showMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showMessage.d.ts","sourceRoot":"","sources":["../../src/js/showMessage.js"],"names":[],"mappings":";AA6BA;;;;;;;;GAQG;AACH;;;SAwCC"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * @cn showMessage
3
+ */
4
+ import { Modal, Message } from 'shineout';
5
+ var noop = () => null;
6
+ class Throttle {
7
+ constructor() {
8
+ this.task = {};
9
+ this.push = key => {
10
+ this.task[key] = Date.now();
11
+ };
12
+ this.pop = key => {
13
+ delete this.task[key];
14
+ };
15
+ this.isRunning = key => this.task.hasOwnProperty(key);
16
+ }
17
+ }
18
+ var throttle = new Throttle();
19
+ var defaultOptions = {
20
+ time: 10000,
21
+ cb: () => {}
22
+ };
23
+
24
+ /**
25
+ * 一般最后一个才能作为默认参数
26
+ * @funcNmae showMessage
27
+ * @param msg string 消息内容
28
+ * @param isSuccess bool 是否显示toast或dialog
29
+ * @param options.time number 消息持续时间,单位毫秒
30
+ * @param options.cb func 浮窗结束或者点击后的回调方法
31
+ * @param options.onClose 点击蒙层的回调方法
32
+ */
33
+ var showMessage = function showMessage(msg) {
34
+ var isSuccess = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
35
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultOptions;
36
+ var _options$time = options.time,
37
+ time = _options$time === void 0 ? defaultOptions.time : _options$time;
38
+ var _options$cb = options.cb,
39
+ cb = _options$cb === void 0 ? noop : _options$cb,
40
+ onClose = options.onClose;
41
+ time = isSuccess ? 3000 : time;
42
+ var modal;
43
+ var handle = setTimeout(() => {
44
+ throttle.pop(msg);
45
+ if (modal) modal();
46
+ if (cb) cb();
47
+ }, time);
48
+ if (!throttle.isRunning(msg)) {
49
+ throttle.push(msg);
50
+ if (isSuccess) {
51
+ Message.success(msg, time / 1000, {
52
+ hideClose: true
53
+ });
54
+ throttle.pop(msg);
55
+ clearTimeout(handle);
56
+ if (cb) cb();
57
+ } else {
58
+ modal = Modal.error({
59
+ title: msg,
60
+ maskClosable: true,
61
+ onOk() {
62
+ throttle.pop(msg);
63
+ clearTimeout(handle);
64
+ if (cb) cb();
65
+ },
66
+ onClose() {
67
+ throttle.pop(msg);
68
+ clearTimeout(handle);
69
+ if (onClose) onClose();
70
+ }
71
+ });
72
+ }
73
+ }
74
+ };
75
+ export default showMessage;
@@ -0,0 +1,3 @@
1
+ export default useStateByImmer;
2
+ declare function useStateByImmer(defaultState: any): any[];
3
+ //# sourceMappingURL=state-immer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-immer.d.ts","sourceRoot":"","sources":["../../src/js/state-immer.js"],"names":[],"mappings":";AAGA,2DAMC"}
@@ -0,0 +1,19 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { useState } from 'react';
8
+ import produce from 'immer';
9
+ var useStateByImmer = defaultState => {
10
+ var _useState = useState(defaultState),
11
+ _useState2 = _slicedToArray(_useState, 2),
12
+ value = _useState2[0],
13
+ updater = _useState2[1];
14
+ return [value, newValue => {
15
+ if (typeof newValue === 'function') return updater(produce(newValue));
16
+ return updater(produce(draftValue => Object.assign(draftValue, newValue)));
17
+ }];
18
+ };
19
+ export default useStateByImmer;
@@ -0,0 +1,3 @@
1
+ declare function _default(zIndex: any, t: any): Promise<void>;
2
+ export default _default;
3
+ //# sourceMappingURL=timer-executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timer-executor.d.ts","sourceRoot":"","sources":["../../src/js/timer-executor.js"],"names":[],"mappings":"AAMe,8DA8Bd"}