@web-utils/component 4.0.15 → 5.0.0-beta01

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.
Files changed (307) hide show
  1. package/address-input/index.mjs +76 -76
  2. package/affix/index.mjs +71 -78
  3. package/aside-menu/index.mjs +20 -31
  4. package/avatar/index.mjs +94 -82
  5. package/awesome-button/index.mjs +54 -71
  6. package/capsule-tab/index.mjs +27 -32
  7. package/card/index.mjs +86 -71
  8. package/carousel/index.mjs +45 -34
  9. package/chat/index.mjs +440 -276
  10. package/chunk-file-uploader/index.mjs +2 -445
  11. package/chunk-file-uploader/style.css +1 -1
  12. package/chunks/ChunkFileUploader.C3EA0e5t.mjs +114 -0
  13. package/chunks/EditableTree.C_IJBL5b.mjs +648 -0
  14. package/chunks/ElementBaseInfo.DyuFR6fE.mjs +209 -0
  15. package/chunks/ElementDialog.C0IjriTW.mjs +681 -0
  16. package/chunks/ElementForm.ButuYDPA.mjs +627 -0
  17. package/chunks/ElementListeners.Dg3e_dmp.mjs +656 -0
  18. package/chunks/ElementMultiInstance.Dmi79FqA.mjs +290 -0
  19. package/chunks/ElementOtherConfig.C2AddGTp.mjs +51 -0
  20. package/chunks/ElementProperties.CfV8UF7L.mjs +196 -0
  21. package/chunks/ElementTaskConfig.Bn7ycGGn.mjs +446 -0
  22. package/chunks/FlowCondition.C6PdqOAW.mjs +194 -0
  23. package/chunks/FlowDesigner.uJYFfKpR.mjs +5101 -0
  24. package/chunks/FormBlock.BEENc22F.mjs +117 -0
  25. package/chunks/FormCascader.CaM-oEhv.mjs +1226 -0
  26. package/chunks/FormInputTime.Bg3UIP8H.mjs +1773 -0
  27. package/chunks/FormItem.H9OOvNzT.mjs +90 -0
  28. package/chunks/FormItemGroup.D9eRy-cZ.mjs +147 -0
  29. package/chunks/FormSelect.CanodoAI.mjs +1472 -0
  30. package/chunks/FormSwitch.DTqdaFjv.mjs +296 -0
  31. package/chunks/FormTemp.DiI5EfgK.mjs +139 -0
  32. package/chunks/FyCurd.DMj1dMK9.mjs +2622 -0
  33. package/chunks/FyForm.vgR8ujEF.mjs +904 -0
  34. package/chunks/FyFormDesign.DEWT6LsX.mjs +5600 -0
  35. package/chunks/FyUEditor.D_rEYfll.mjs +221 -0
  36. package/chunks/FyUpload.B2QKfTxF.mjs +504 -0
  37. package/chunks/Keyboard.ItiRy7Gb.mjs +379 -0
  38. package/chunks/MonacoEditor.Bd5Kui-Y.mjs +301 -0
  39. package/chunks/PageableTable.Bujb0NUx.mjs +658 -0
  40. package/chunks/RecordVideo.B35_dLty.mjs +116 -0
  41. package/chunks/SignalAndMessage.CYVzlFuL.mjs +198 -0
  42. package/chunks/SplitPane.Dw96M0Yf.mjs +219 -0
  43. package/chunks/TableColumn.DJYkznbJ.mjs +180 -0
  44. package/chunks/TableView.DyIdIxAg.mjs +484 -0
  45. package/chunks/Toolbar.DHuXJAoG.mjs +219 -0
  46. package/chunks/UserTaskListeners.Bp-2qkHs.mjs +599 -0
  47. package/chunks/VueCron.GfjodnyM.mjs +1766 -0
  48. package/chunks/VueTreeSelect.9Ywl-I8e.mjs +1872 -0
  49. package/chunks/_plugin-vue_export-helper.7vrlOII_.mjs +8 -0
  50. package/chunks/checkbox.emIuFmnt.mjs +437 -0
  51. package/chunks/confirmable-mixin.BBil7dto.mjs +1646 -0
  52. package/chunks/core.DJv6Qrae.mjs +51 -0
  53. package/chunks/dataformat.Bfr4nOcA.mjs +144 -0
  54. package/chunks/dic.DgDfnovD.mjs +116 -0
  55. package/chunks/dictionary.5eKjWeAp.mjs +19 -0
  56. package/chunks/dictionary.DxZxP0ej.mjs +87 -0
  57. package/chunks/event.B4iwtUNO.mjs +4 -0
  58. package/chunks/event.eJ-c1Z3a.mjs +224 -0
  59. package/chunks/focus-trap.DT4GnqQI.mjs +211 -0
  60. package/chunks/form-input.D25eDRMq.mjs +34 -0
  61. package/chunks/form-item.CgmUuw_n.mjs +714 -0
  62. package/chunks/form-pick.Axem0gOO.mjs +7 -0
  63. package/chunks/form-validate.B1KPCHqN.mjs +11 -0
  64. package/chunks/icon.CbS8-322.mjs +259 -0
  65. package/chunks/init.DwpukyOB.mjs +115 -0
  66. package/chunks/input.PejnqwSH.mjs +547 -0
  67. package/chunks/install.yLcn5MLL.mjs +84 -0
  68. package/chunks/message.BCmee5N0.mjs +400 -0
  69. package/chunks/overlay.DubSnqma.mjs +122 -0
  70. package/chunks/packages.BGjydzjm.mjs +56 -0
  71. package/chunks/permission.DgEVNWlh.mjs +16 -0
  72. package/chunks/photo-swipe.BB0SJZg9.mjs +55 -0
  73. package/chunks/radio.BotKXqJr.mjs +274 -0
  74. package/chunks/scroll.CzORc5Zk.mjs +28 -0
  75. package/chunks/scrollbar.CAmrlKi9.mjs +345 -0
  76. package/chunks/slot.C6Ozd2e7.mjs +25 -0
  77. package/chunks/style.BmlGmjpO.mjs +325 -0
  78. package/chunks/sub-table-plus-props.B_lLth3j.mjs +28 -0
  79. package/chunks/tab-mixin.u0EZpx3j.mjs +70 -0
  80. package/chunks/tag.DPi-PLbb.mjs +141 -0
  81. package/chunks/teleport._VGEzK4d.mjs +22 -0
  82. package/chunks/tooltip.D50x7Rva.mjs +1926 -0
  83. package/chunks/typescript.DiWBU4nj.mjs +4 -0
  84. package/chunks/use-aria.BW7nWOl1.mjs +17 -0
  85. package/chunks/use-composition.mUaomyno.mjs +47 -0
  86. package/chunks/use-deprecated.BfDSbZS9.mjs +12 -0
  87. package/chunks/use-empty-values.Dy_r78F6.mjs +263 -0
  88. package/chunks/use-form-item.wsRjehHp.mjs +47 -0
  89. package/chunks/use-global-config.C9hs-O_x.mjs +56 -0
  90. package/chunks/use-id.CFO5NeoV.mjs +15 -0
  91. package/chunks/use-size.DxrwTUwf.mjs +18 -0
  92. package/chunks/util.B3sjVZoZ.mjs +103 -0
  93. package/chunks/util.g-WQEec9.mjs +223 -0
  94. package/chunks/utilSelf.ZED4DmCU.mjs +46 -0
  95. package/chunks/utils.Cs2fYBrT.mjs +60 -0
  96. package/chunks/utils.DsGhtCIO.mjs +14 -0
  97. package/chunks/validator.C4-z_t9p.mjs +5 -0
  98. package/chunks/vnode.D_SioRnx.mjs +14 -0
  99. package/code-mirror-editor/index.mjs +89 -88
  100. package/comment/index.mjs +62 -57
  101. package/configComponents.mjs +40 -50
  102. package/confirm-button/index.mjs +34 -46
  103. package/confirmable/index.mjs +7 -17
  104. package/context-menu/index.mjs +195 -174
  105. package/count-up/index.mjs +97 -105
  106. package/custom-scrollbar/index.mjs +91 -98
  107. package/data-box/index.mjs +64 -47
  108. package/data-card/index.mjs +60 -49
  109. package/data-card-text/index.mjs +63 -51
  110. package/data-display/index.mjs +71 -53
  111. package/data-icons/index.mjs +70 -53
  112. package/data-imgtext/index.mjs +67 -46
  113. package/data-operatext/index.mjs +51 -42
  114. package/data-panel/index.mjs +57 -47
  115. package/data-pay/index.mjs +105 -52
  116. package/data-price/index.mjs +48 -42
  117. package/data-progress/index.mjs +67 -48
  118. package/data-rotate/index.mjs +61 -47
  119. package/data-table-picker/index.mjs +119 -74
  120. package/data-tabs/index.mjs +67 -47
  121. package/dialog-form/index.mjs +139 -89
  122. package/dynamic-table/index.mjs +166 -114
  123. package/e-charts/index.mjs +174 -200
  124. package/easy-popup/index.mjs +91 -102
  125. package/editable-progress/index.mjs +112 -85
  126. package/editable-tree/index.mjs +2 -485
  127. package/element-dialog/index.mjs +2 -307
  128. package/element-listeners/style.css +1 -0
  129. package/element-multi-instance/style.css +1 -0
  130. package/ellipsis/index.mjs +124 -148
  131. package/empty-view/index.mjs +48 -65
  132. package/error-view/index.mjs +39 -51
  133. package/flex-column/index.mjs +32 -51
  134. package/flex-item/index.mjs +54 -64
  135. package/flex-row/index.mjs +32 -39
  136. package/flex-scroller/index.mjs +29 -30
  137. package/flow/index.mjs +240 -248
  138. package/flow-designer/index.mjs +2 -5983
  139. package/flow-designer/style.css +1 -1
  140. package/flow-node/index.mjs +56 -64
  141. package/flow-viewer/index.mjs +159 -157
  142. package/form-block/index.mjs +2 -149
  143. package/form-button/index.mjs +35 -47
  144. package/form-card/index.mjs +14 -25
  145. package/form-cascader/index.mjs +2 -116
  146. package/form-checkbox/index.mjs +89 -71
  147. package/form-checkbox-group/index.mjs +161 -116
  148. package/form-date-picker/index.mjs +155 -144
  149. package/form-holder/index.mjs +137 -110
  150. package/form-input/index.mjs +113 -87
  151. package/form-input-cron-expression/index.mjs +97 -79
  152. package/form-input-email/index.mjs +64 -52
  153. package/form-input-id-card/index.mjs +72 -55
  154. package/form-input-phone-number/index.mjs +71 -57
  155. package/form-input-tag/index.mjs +88 -62
  156. package/form-input-time/index.mjs +2 -74
  157. package/form-item/index.mjs +2 -5
  158. package/form-item-config-provider/index.mjs +46 -60
  159. package/form-item-group/index.mjs +2 -160
  160. package/form-radio-group/index.mjs +161 -122
  161. package/form-select/index.mjs +2 -181
  162. package/form-switch/index.mjs +2 -55
  163. package/form-table/index.mjs +131 -85
  164. package/form-table-plus/index.mjs +164 -109
  165. package/form-textarea/index.mjs +90 -57
  166. package/form-tree-select/index.mjs +89 -72
  167. package/form-tree-select-multiple/index.mjs +92 -78
  168. package/form-view/index.mjs +275 -211
  169. package/fy-array/index.mjs +121 -74
  170. package/fy-article/index.mjs +73 -60
  171. package/fy-cascader/index.mjs +113 -91
  172. package/fy-checkbox/index.mjs +96 -66
  173. package/fy-code/index.mjs +48 -50
  174. package/fy-curd/index.mjs +2 -1903
  175. package/fy-date/index.mjs +76 -42
  176. package/fy-draggable/index.mjs +322 -318
  177. package/fy-dynamic/index.mjs +259 -227
  178. package/fy-empty/index.mjs +35 -36
  179. package/fy-form/index.mjs +2 -17
  180. package/fy-form-design/index.mjs +2 -2890
  181. package/fy-form-design/style.css +1 -1
  182. package/fy-from/crud/zh.d.ts +6 -6
  183. package/fy-input/index.mjs +117 -99
  184. package/fy-input-color/index.mjs +77 -56
  185. package/fy-input-icon/index.mjs +129 -85
  186. package/fy-input-map/index.mjs +242 -186
  187. package/fy-input-number/index.mjs +74 -50
  188. package/fy-input-table/index.mjs +160 -109
  189. package/fy-input-tree/index.mjs +259 -182
  190. package/fy-progress/index.mjs +36 -40
  191. package/fy-radio/index.mjs +53 -38
  192. package/fy-rate/index.mjs +86 -71
  193. package/fy-select/index.mjs +223 -140
  194. package/fy-slider/index.mjs +68 -44
  195. package/fy-switch/index.mjs +67 -42
  196. package/fy-tabs/index.mjs +46 -48
  197. package/fy-time/index.mjs +81 -53
  198. package/fy-title/index.mjs +18 -27
  199. package/fy-tree/index.mjs +382 -292
  200. package/fy-u-editor/index.mjs +2 -357
  201. package/fy-upload/index.mjs +2 -423
  202. package/guide-steps/index.mjs +72 -73
  203. package/helper-function.d.ts +2 -30
  204. package/helper-function.mjs +41 -67
  205. package/highlight-j-s/index.mjs +50 -59
  206. package/icon-card/index.mjs +34 -36
  207. package/icon-temp/index.mjs +27 -27
  208. package/iframe-window/index.mjs +39 -33
  209. package/image-cropper/index.mjs +171 -75
  210. package/image-preview/index.mjs +187 -118
  211. package/image-viewer/index.mjs +69 -66
  212. package/index.d.ts +3 -9
  213. package/index.mjs +173 -488
  214. package/input-number-range/index.mjs +78 -59
  215. package/j-s-x-component/index.mjs +13 -15
  216. package/keyboard/index.mjs +2 -369
  217. package/license/index.mjs +106 -115
  218. package/loading-view/index.mjs +39 -51
  219. package/login/index.mjs +252 -125
  220. package/monaco-editor/index.mjs +2 -7
  221. package/name-avatar/index.mjs +61 -53
  222. package/nav-bar/index.mjs +33 -31
  223. package/not-implement/index.mjs +10 -22
  224. package/notice/index.mjs +100 -94
  225. package/package.json +3 -3
  226. package/page/index.mjs +18 -25
  227. package/page-header/index.mjs +27 -33
  228. package/page-index/index.mjs +121 -100
  229. package/page-index-top/index.mjs +79 -79
  230. package/page-skeleton/index.mjs +48 -45
  231. package/page-skeleton-new/index.mjs +79 -50
  232. package/pageable-table/index.mjs +2 -522
  233. package/pageable-view/index.mjs +279 -275
  234. package/photo-swipe/index.d.ts +4 -0
  235. package/photo-swipe/index.mjs +33 -36
  236. package/picker-table-view/index.mjs +224 -126
  237. package/present-view/index.mjs +266 -200
  238. package/queue/index.mjs +45 -53
  239. package/record-video/index.mjs +2 -134
  240. package/resize-observer/index.mjs +43 -46
  241. package/search/index.mjs +116 -109
  242. package/sign/index.mjs +103 -110
  243. package/sign-panel/index.mjs +182 -141
  244. package/skeleton/index.mjs +51 -54
  245. package/skeleton-panel/index.mjs +33 -38
  246. package/split-pane/index.mjs +3 -197
  247. package/stateful/index.mjs +69 -73
  248. package/static-pageable-table/index.mjs +72 -66
  249. package/sub-table/index.mjs +508 -219
  250. package/sub-table-plus/index.mjs +592 -19
  251. package/swiper/index.mjs +128 -121
  252. package/tab/index.mjs +117 -119
  253. package/tab-item/index.mjs +48 -56
  254. package/table-column/index.mjs +2 -5
  255. package/table-view/index.mjs +3 -334
  256. package/tabs-view/index.mjs +109 -106
  257. package/tag-render/index.mjs +79 -69
  258. package/text-ellipsis/index.mjs +94 -78
  259. package/toolbar/index.mjs +2 -255
  260. package/toolbar-button/index.mjs +145 -121
  261. package/verify/index.mjs +58 -64
  262. package/vue-cron/index.mjs +2 -1188
  263. package/vue-qr-code/index.mjs +30 -54
  264. package/vue-quill-editor/index.mjs +123 -99
  265. package/vue-tags-input/index.mjs +348 -431
  266. package/vue-tree-select/index.mjs +2 -2627
  267. package/vue-video-player/index.mjs +135 -136
  268. package/watermark/index.mjs +46 -74
  269. package/web-types.json +197 -975
  270. package/x-input-tag/index.mjs +144 -109
  271. package/chunks/ElementTaskConfig.AvBOzAni.mjs +0 -325
  272. package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
  273. package/chunks/FyForm.DriwCJ7b.mjs +0 -765
  274. package/chunks/MonacoEditor.D31t4FTy.mjs +0 -327
  275. package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
  276. package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
  277. package/chunks/TableColumn.BzivvXMF.mjs +0 -337
  278. package/chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs +0 -10
  279. package/chunks/confirmable-mixin.BFZb6pcK.mjs +0 -86
  280. package/chunks/dataformat.DJoNBlmI.mjs +0 -154
  281. package/chunks/dic.BinnDitI.mjs +0 -128
  282. package/chunks/dictionary.DqiP9x2m.mjs +0 -25
  283. package/chunks/event.DSlcqYHL.mjs +0 -236
  284. package/chunks/form-input.BtS_J5a2.mjs +0 -31
  285. package/chunks/form-pick.BFTIVn_i.mjs +0 -11
  286. package/chunks/form-validate.CVarNHKX.mjs +0 -12
  287. package/chunks/helper.BiMLcEEk.mjs +0 -41
  288. package/chunks/index.BmYCjxZQ.mjs +0 -47
  289. package/chunks/index.CIfe3UB3.mjs +0 -16
  290. package/chunks/index.Cn7aq-Et.mjs +0 -184
  291. package/chunks/init.xOlFpTyZ.mjs +0 -122
  292. package/chunks/packages.ByyangTp.mjs +0 -58
  293. package/chunks/permission.CO31YIkD.mjs +0 -16
  294. package/chunks/slot.DXIbhGat.mjs +0 -27
  295. package/chunks/tab-mixin.BNK6dxLN.mjs +0 -81
  296. package/chunks/util.DI42t5GU.mjs +0 -241
  297. package/color-picker/index.mjs +0 -157
  298. package/egd-collapse/index.mjs +0 -62
  299. package/egd-collapse-item/index.mjs +0 -72
  300. package/form-input-number/index.mjs +0 -70
  301. package/form-input-number/style.css +0 -1
  302. package/input-number/index.mjs +0 -233
  303. package/input-number/style.css +0 -1
  304. package/keep-view-alive/index.mjs +0 -117
  305. package/search-popover/index.mjs +0 -118
  306. package/search-popover/style.css +0 -1
  307. /package/{base.css → utils/style.css} +0 -0
@@ -1,1188 +1,2 @@
1
- import H from "element-ui/lib/button";
2
- import p from "element-ui/lib/option";
3
- import v from "element-ui/lib/select";
4
- import o from "element-ui/lib/radio";
5
- import h from "element-ui/lib/input-number";
6
- import _ from "element-ui/lib/radio-group";
7
- import S from "element-ui/lib/tab-pane";
8
- import V from "element-ui/lib/tabs";
9
- import { formatDate as j } from "@web-utils/integrations/dayjs";
10
- import { copy as P } from "@web-utils/core";
11
- import { n as q } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
12
- const Q = {
13
- Seconds: {
14
- name: "秒",
15
- every: "每秒钟,允许的通配符[* / , -]",
16
- interval: ["从", "秒钟开始,每", "秒钟执行一次"],
17
- specific: "指定",
18
- cycle: ["周期从", " - ", "秒"]
19
- },
20
- Minutes: {
21
- name: "分",
22
- every: "每分钟,允许的通配符[* / , -]",
23
- interval: ["从", "分钟开始,每", "分钟执行一次"],
24
- specific: "指定",
25
- cycle: ["周期从", " - ", "分"]
26
- },
27
- Hours: {
28
- name: "时",
29
- every: "每小时,允许的通配符[* / , -]",
30
- interval: ["从", "小时开始,每", "小时执行一次"],
31
- specific: "指定",
32
- cycle: ["周期从", " - ", "小时"]
33
- },
34
- Day: {
35
- name: "天",
36
- every: "每一天,允许的通配符[* / , - L W]",
37
- intervalDay: ["从第", "天开始,每", "天执行一次"],
38
- specificDay: "指定天",
39
- lastDay: "每月的最后一天",
40
- lastWorkday: "每月的最后一个工作日",
41
- beforeEndMonth: ["每月倒数第", "天"],
42
- nearestWorkday: ["距离本月", "号最近的一个工作日(周一至周五)"]
43
- },
44
- Week: {
45
- name: "周",
46
- every: "每周,允许的通配符[* / , - L #]",
47
- intervalWeek: ["从", "开始,每", "天执行一次"],
48
- specificWeek: "指定星期",
49
- lastWeek: ["每月的最后一个"],
50
- someWeekday: ["每月第", "周的"]
51
- },
52
- Month: {
53
- name: "月",
54
- every: "每个月,允许的通配符[* / , -]",
55
- interval: ["从", "月开始,每", "月执行一次"],
56
- specific: "指定",
57
- cycle: ["周期从", " - ", "月"]
58
- },
59
- Year: {
60
- name: "年",
61
- every: "每一年,允许的通配符[* / , -]",
62
- interval: ["从", "年开始,每", "年执行一次"],
63
- specific: "指定",
64
- cycle: ["周期从", " - ", "年"]
65
- },
66
- Save: "确定",
67
- Close: "取消"
68
- }, I = (n, e) => n - e;
69
- function T(n, e) {
70
- return n.reduce((t, s, a) => (t.push(...e(s, a, n)), t), []);
71
- }
72
- const L = {
73
- "@yearly": "0 0 0 1 1 * *",
74
- "@annually": "0 0 0 1 1 * *",
75
- "@monthly": "0 0 0 1 * * *",
76
- "@weekly": "0 0 0 * * 0 *",
77
- "@daily": "0 0 0 * * * *",
78
- "@midnight": "0 0 0 * * * *",
79
- "@hourly": "0 0 * * * * *"
80
- }, R = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Z = new RegExp(R.join("|"), "g"), U = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], G = new RegExp(U.join("|"), "g"), $ = 275759;
81
- var C;
82
- (function(n) {
83
- n.IncrementLargerThanRange = "IncrementLargerThanRange";
84
- })(C || (C = {}));
85
- function F(n) {
86
- let e = n.trim().toLowerCase();
87
- L[e] && (e = L[e]);
88
- const t = e.split(/\s+/g);
89
- if (t.length < 5 || t.length > 7)
90
- throw new Error("Expression must have at least 5 fields, and no more than 7 fields");
91
- switch (t.length) {
92
- case 5:
93
- t.unshift("0");
94
- case 6:
95
- t.push("*");
96
- }
97
- return [
98
- new Y(t[0]),
99
- new Y(t[1]),
100
- new J(t[2]),
101
- new K(t[3], t[5]),
102
- new X(t[4]),
103
- new A(t[6])
104
- ];
105
- }
106
- function D(n, e, t) {
107
- const s = [];
108
- for (let a of n) {
109
- let r;
110
- a.step > 1 && a.step > (r = a.rangeLength(e, t)) && s.push({
111
- type: C.IncrementLargerThanRange,
112
- message: `Increment (${a.step}) is larger than range (${r}) for expression '${a.itemString}'`
113
- });
114
- }
115
- return s;
116
- }
117
- class x {
118
- constructor(e) {
119
- this.field = e;
120
- }
121
- parse() {
122
- return this.field.split(",").map((e) => k.parse(e, this.first, this.last, !0));
123
- }
124
- get items() {
125
- return this._items || (this._items = this.parse()), this._items;
126
- }
127
- get values() {
128
- return x.getValues(this.items, this.first, this.last);
129
- }
130
- get warnings() {
131
- return D(this.items, this.first, this.last);
132
- }
133
- static getValues(e, t, s) {
134
- return Array.from(new Set(T(e, (a) => a.values(t, s)))).sort(I);
135
- }
136
- }
137
- class k {
138
- constructor(e) {
139
- this.itemString = e, this.step = 1;
140
- }
141
- rangeLength(e, t) {
142
- var s, a, r, i;
143
- const c = (a = (s = this.range) === null || s === void 0 ? void 0 : s.from) !== null && a !== void 0 ? a : e, l = (i = (r = this.range) === null || r === void 0 ? void 0 : r.to) !== null && i !== void 0 ? i : t;
144
- return l < c ? t - c + (l - e) + 1 : l - c;
145
- }
146
- values(e, t) {
147
- const s = this.range ? this.range.from : e, a = this.rangeLength(e, t);
148
- return Array(Math.floor(a / this.step) + 1).fill(0).map((r, i) => e + (s - e + this.step * i) % (t - e + 1));
149
- }
150
- get any() {
151
- return this.range === void 0 && this.step === 1;
152
- }
153
- get single() {
154
- return !!this.range && this.range.from === this.range.to;
155
- }
156
- static parse(e, t, s, a = !1, r) {
157
- var i;
158
- const c = new k(e), [l, u, y, d, g] = (i = e.match(/^(?:(\*)|([0-9]+)|([0-9]+-[0-9]+))(?:\/([1-9][0-9]*))?$/)) !== null && i !== void 0 ? i : [];
159
- if (!l)
160
- throw new Error("Field item invalid format");
161
- if (g && (c.step = parseInt(g, 10)), y) {
162
- let m = parseInt(y, 10);
163
- if (m = r ? r(m) : m, m < t || m > s)
164
- throw new Error("Field item out of valid value range");
165
- c.range = {
166
- from: m,
167
- to: g ? void 0 : m
168
- };
169
- } else if (d) {
170
- const [m, w] = d.split("-").map((B) => {
171
- const O = parseInt(B, 10);
172
- return r ? r(O) : O;
173
- });
174
- if (m < t || m > s || w < t || w > s || w < m && !a)
175
- throw new Error("Field item range invalid, either value out of valid range or start greater than end in non wraparound field");
176
- c.range = {
177
- from: m,
178
- to: w
179
- };
180
- }
181
- return c;
182
- }
183
- }
184
- k.asterisk = new k("*");
185
- class Y extends x {
186
- constructor() {
187
- super(...arguments), this.first = 0, this.last = 59;
188
- }
189
- }
190
- class J extends x {
191
- constructor() {
192
- super(...arguments), this.first = 0, this.last = 23;
193
- }
194
- }
195
- class K {
196
- constructor(e, t) {
197
- this.lastDay = !1, this.lastWeekday = !1, this.daysItems = [], this.nearestWeekdayItems = [], this.daysOfWeekItems = [], this.lastDaysOfWeekItems = [], this.nthDaysOfWeekItems = [];
198
- for (let r of e.split(",").map((i) => i === "?" ? "*" : i))
199
- r === "l" ? this.lastDay = !0 : r === "lw" ? this.lastWeekday = !0 : r.endsWith("w") ? this.nearestWeekdayItems.push(k.parse(r.slice(0, -1), 1, 31)) : this.daysItems.push(k.parse(r, 1, 31));
200
- const s = t.replace(G, (r) => U.indexOf(r) + ""), a = (r) => k.parse(r, 0, 6, !0, (i) => i === 7 ? 0 : i);
201
- for (let r of s.split(",").map((i) => i === "?" ? "*" : i)) {
202
- const i = r.lastIndexOf("#");
203
- if (r.endsWith("l"))
204
- this.lastDaysOfWeekItems.push(a(r.slice(0, -1)));
205
- else if (i !== -1) {
206
- const c = r.slice(i + 1);
207
- if (!/^[1-5]$/.test(c))
208
- throw new Error("Field item nth of month (#) invalid");
209
- this.nthDaysOfWeekItems.push({
210
- item: a(r.slice(0, i)),
211
- nth: parseInt(c, 10)
212
- });
213
- } else
214
- this.daysOfWeekItems.push(a(r));
215
- }
216
- }
217
- get values() {
218
- return z.fromField(this);
219
- }
220
- get warnings() {
221
- const e = [], t = [
222
- ...this.daysItems,
223
- ...this.nearestWeekdayItems
224
- ], s = [
225
- ...this.daysOfWeekItems,
226
- ...this.lastDaysOfWeekItems,
227
- ...this.nthDaysOfWeekItems.map(({ item: a }) => a)
228
- ];
229
- return e.push(...D(t, 1, 31), ...D(s, 0, 6)), e;
230
- }
231
- get allDays() {
232
- return !this.lastDay && !this.lastWeekday && !this.nearestWeekdayItems.length && !this.lastDaysOfWeekItems.length && !this.nthDaysOfWeekItems.length && this.daysItems.length === 1 && this.daysItems[0].any && this.daysOfWeekItems.length === 1 && this.daysOfWeekItems[0].any;
233
- }
234
- }
235
- class z {
236
- constructor() {
237
- this.lastDay = !1, this.lastWeekday = !1, this.days = [], this.nearestWeekday = [], this.daysOfWeek = [], this.lastDaysOfWeek = [], this.nthDaysOfWeek = [];
238
- }
239
- static fromField(e) {
240
- const t = new z(), s = (r) => r.filter((i) => !i.any);
241
- t.lastDay = e.lastDay, t.lastWeekday = e.lastWeekday, t.days = x.getValues(e.allDays ? [k.asterisk] : s(e.daysItems), 1, 31), t.nearestWeekday = x.getValues(e.nearestWeekdayItems, 1, 31), t.daysOfWeek = x.getValues(s(e.daysOfWeekItems), 0, 6), t.lastDaysOfWeek = x.getValues(e.lastDaysOfWeekItems, 0, 6);
242
- const a = /* @__PURE__ */ new Set();
243
- for (let r of e.nthDaysOfWeekItems)
244
- for (let i of r.item.values(0, 6)) {
245
- let c = i * 10 + r.nth;
246
- a.has(c) || (a.add(c), t.nthDaysOfWeek.push([i, r.nth]));
247
- }
248
- return t;
249
- }
250
- getDays(e, t) {
251
- const s = new Set(this.days), a = new Date(e, t, 0).getDate(), r = new Date(e, t - 1, 1).getDay(), i = (c) => {
252
- c > a && (c = a);
253
- const l = (c + r - 1) % 7;
254
- let u = c + (l === 0 ? 1 : l === 6 ? -1 : 0);
255
- return u + (u < 1 ? 3 : u > a ? -3 : 0);
256
- };
257
- this.lastDay && s.add(a), this.lastWeekday && s.add(i(a));
258
- for (const c of this.nearestWeekday)
259
- s.add(i(c));
260
- if (this.daysOfWeek.length || this.lastDaysOfWeek.length || this.nthDaysOfWeek.length) {
261
- const c = Array(7).fill(0).map(() => []);
262
- for (let l = 1; l < 36; l++)
263
- c[(l + r - 1) % 7].push(l);
264
- for (const l of this.daysOfWeek)
265
- for (const u of c[l])
266
- s.add(u);
267
- for (const l of this.lastDaysOfWeek)
268
- for (let u = c[l].length - 1; u >= 0; u--)
269
- if (c[l][u] <= a) {
270
- s.add(c[l][u]);
271
- break;
272
- }
273
- for (const [l, u] of this.nthDaysOfWeek)
274
- s.add(c[l][u - 1]);
275
- }
276
- return Array.from(s).filter((c) => c <= a).sort(I);
277
- }
278
- }
279
- class X extends x {
280
- constructor(e) {
281
- super(e.replace(Z, (t) => R.indexOf(t) + 1 + "")), this.first = 1, this.last = 12;
282
- }
283
- }
284
- class A extends x {
285
- constructor(e) {
286
- super(e), this.first = 1970, this.last = 2099, this.items;
287
- }
288
- parse() {
289
- return this.field.split(",").map((e) => k.parse(e, 0, $));
290
- }
291
- get warnings() {
292
- return D(this.items, this.first, $);
293
- }
294
- nextYear(e) {
295
- var t;
296
- return (t = this.items.reduce((s, a) => {
297
- var r, i, c, l;
298
- if (a.any)
299
- s.push(e);
300
- else if (a.single) {
301
- const u = a.range.from;
302
- u >= e && s.push(u);
303
- } else {
304
- const u = (i = (r = a.range) === null || r === void 0 ? void 0 : r.from) !== null && i !== void 0 ? i : this.first;
305
- if (u > e)
306
- s.push(u);
307
- else {
308
- const y = u + Math.ceil((e - u) / a.step) * a.step;
309
- y <= ((l = (c = a.range) === null || c === void 0 ? void 0 : c.to) !== null && l !== void 0 ? l : $) && s.push(y);
310
- }
311
- }
312
- return s;
313
- }, []).sort(I)[0]) !== null && t !== void 0 ? t : null;
314
- }
315
- }
316
- class f {
317
- constructor(e, t = 1, s = 1, a = 0, r = 0, i = 0) {
318
- this.year = e, this.month = t, this.day = s, this.hour = a, this.minute = r, this.second = i;
319
- }
320
- static fromDate(e, t) {
321
- return t ? t.nativeDateToCronosDate(e) : new f(e.getFullYear(), e.getMonth() + 1, e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds());
322
- }
323
- toDate(e) {
324
- return e ? e.cronosDateToNativeDate(this) : new Date(this.year, this.month - 1, this.day, this.hour, this.minute, this.second);
325
- }
326
- static fromUTCTimestamp(e) {
327
- const t = new Date(e);
328
- return new f(t.getUTCFullYear(), t.getUTCMonth() + 1, t.getUTCDate(), t.getUTCHours(), t.getUTCMinutes(), t.getUTCSeconds());
329
- }
330
- toUTCTimestamp() {
331
- return Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second);
332
- }
333
- copyWith({ year: e = this.year, month: t = this.month, day: s = this.day, hour: a = this.hour, minute: r = this.minute, second: i = this.second } = {}) {
334
- return new f(e, t, s, a, r, i);
335
- }
336
- }
337
- const W = /* @__PURE__ */ new Map();
338
- class N {
339
- constructor(e) {
340
- if (typeof e == "number") {
341
- if (e > 840 || e < -840)
342
- throw new Error("Invalid offset");
343
- return this.fixedOffset = e, this;
344
- }
345
- const t = e.match(/^([+-]?)(0[1-9]|1[0-4])(?::?([0-5][0-9]))?$/);
346
- if (t)
347
- return this.fixedOffset = (t[1] === "-" ? -1 : 1) * (parseInt(t[2], 10) * 60 + (parseInt(t[3], 10) || 0)), this;
348
- if (W.has(e))
349
- return W.get(e);
350
- try {
351
- this.dateTimeFormat = new Intl.DateTimeFormat("en-US", {
352
- hour12: !1,
353
- timeZone: e,
354
- year: "numeric",
355
- month: "2-digit",
356
- day: "2-digit",
357
- hour: "2-digit",
358
- minute: "2-digit",
359
- second: "2-digit"
360
- });
361
- } catch {
362
- throw new Error("Invalid IANA name or offset");
363
- }
364
- this.zoneName = e;
365
- const s = (/* @__PURE__ */ new Date()).getUTCFullYear();
366
- this.winterOffset = this.offset(Date.UTC(s, 0, 1)), this.summerOffset = this.offset(Date.UTC(s, 5, 1)), W.set(e, this);
367
- }
368
- toString() {
369
- if (this.fixedOffset) {
370
- const e = Math.abs(this.fixedOffset);
371
- return [
372
- this.fixedOffset < 0 ? "-" : "+",
373
- Math.floor(e / 60).toString().padStart(2, "0"),
374
- (e % 60).toString().padStart(2, "0")
375
- ].join("");
376
- }
377
- return this.zoneName;
378
- }
379
- offset(e) {
380
- if (!this.dateTimeFormat)
381
- return this.fixedOffset || 0;
382
- const t = new Date(e), { year: s, month: a, day: r, hour: i, minute: c, second: l } = this.nativeDateToCronosDate(t), u = Date.UTC(s, a - 1, r, i, c, l), y = e - e % 1e3;
383
- return (u - y) / 6e4;
384
- }
385
- nativeDateToCronosDate(e) {
386
- return this.dateTimeFormat ? this.dateTimeFormat.formatToParts ? te(this.dateTimeFormat, e) : ee(this.dateTimeFormat, e) : f.fromUTCTimestamp(e.getTime() + (this.fixedOffset || 0) * 6e4);
387
- }
388
- cronosDateToNativeDate(e) {
389
- if (!this.dateTimeFormat)
390
- return new Date(e.toUTCTimestamp() - (this.fixedOffset || 0) * 6e4);
391
- const t = (e.month > 3 || e.month < 11 ? this.summerOffset : this.winterOffset) || 0, s = e.toUTCTimestamp();
392
- let a = s - t * 6e4;
393
- const r = this.offset(a);
394
- if (t === r)
395
- return new Date(a);
396
- a -= (r - t) * 6e4;
397
- const i = this.offset(a);
398
- return r === i ? new Date(a) : new Date(s - Math.min(r, i) * 6e4);
399
- }
400
- }
401
- function ee(n, e) {
402
- const t = n.format(e).replace(/\u200E/g, ""), s = t.match(/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/), [, a, r, i, c, l, u] = (s ?? []).map((y) => parseInt(y, 10));
403
- return new f(i, a, r, c % 24, l, u);
404
- }
405
- function te(n, e) {
406
- const t = n.formatToParts(e);
407
- return new f(parseInt(t[4].value, 10), parseInt(t[0].value, 10), parseInt(t[2].value, 10), parseInt(t[6].value, 10) % 24, parseInt(t[8].value, 10), parseInt(t[10].value, 10));
408
- }
409
- const b = 3600 * 1e3, E = (n, e) => e.findIndex((t) => t >= n);
410
- class M {
411
- constructor(e, t, s, a, r, i, c) {
412
- this.cronString = e, this.seconds = t, this.minutes = s, this.hours = a, this.days = r, this.months = i, this.years = c, this.skipRepeatedHour = !0, this.missingHour = "insert", this._warnings = null;
413
- }
414
- static parse(e, t = {}) {
415
- var s;
416
- const a = F(e);
417
- if (t.strict) {
418
- let i = T(a, (c) => c.warnings);
419
- if (typeof t.strict == "object" && (i = i.filter((c) => !!t.strict[c.type])), i.length > 0)
420
- throw new Error(`Strict mode: Parsing failed with ${i.length} warnings`);
421
- }
422
- const r = new M(e, a[0].values, a[1].values, a[2].values, a[3].values, a[4].values, a[5]);
423
- return r.timezone = t.timezone instanceof N ? t.timezone : t.timezone !== void 0 ? new N(t.timezone) : void 0, r.skipRepeatedHour = t.skipRepeatedHour !== void 0 ? t.skipRepeatedHour : r.skipRepeatedHour, r.missingHour = (s = t.missingHour) !== null && s !== void 0 ? s : r.missingHour, r;
424
- }
425
- get warnings() {
426
- if (!this._warnings) {
427
- const e = F(this.cronString);
428
- this._warnings = T(e, (t) => t.warnings);
429
- }
430
- return this._warnings;
431
- }
432
- toString() {
433
- var e, t;
434
- const s = !this.timezone || !!this.timezone.zoneName, a = Object.entries({
435
- tz: (t = (e = this.timezone) === null || e === void 0 ? void 0 : e.toString()) !== null && t !== void 0 ? t : "Local",
436
- skipRepeatedHour: s && this.skipRepeatedHour.toString(),
437
- missingHour: s && this.missingHour
438
- }).map(([r, i]) => i && r + ": " + i).filter((r) => r).join(", ");
439
- return `${this.cronString} (${a})`;
440
- }
441
- nextDate(e = /* @__PURE__ */ new Date()) {
442
- var t;
443
- const s = f.fromDate(e, this.timezone);
444
- if (((t = this.timezone) === null || t === void 0 ? void 0 : t.fixedOffset) !== void 0)
445
- return this._next(s).date;
446
- const a = e.getTime(), r = s.toUTCTimestamp(), i = f.fromDate(new Date(a - b), this.timezone).toUTCTimestamp(), c = f.fromDate(new Date(a + b), this.timezone).toUTCTimestamp(), l = c - r === 0, u = r - i === 0, y = r - i === b * 2;
447
- if (this.skipRepeatedHour && u)
448
- return this._next(s.copyWith({ minute: 59, second: 60 }), !1).date;
449
- if (this.missingHour === "offset" && y) {
450
- const m = this._next(s.copyWith({ hour: s.hour - 1 })).date;
451
- if (!m || m.getTime() > a)
452
- return m;
453
- }
454
- let { date: d, cronosDate: g } = this._next(s);
455
- return this.missingHour !== "offset" && g && d && g.copyWith({ hour: g.hour + 1 }).toDate(this.timezone).getTime() === d.getTime() ? this.missingHour === "insert" ? g.copyWith({ minute: 0, second: 0 }).toDate(this.timezone) : this._next(g.copyWith({ minute: 59, second: 59 })).date : (this.skipRepeatedHour || (l && (!d || d.getTime() > a + b) && (d = this._next(s.copyWith({ minute: 0, second: 0 }), !1).date), d && d < e && (d = new Date(d.getTime() + b))), d);
456
- }
457
- _next(e, t = !0) {
458
- const s = this._nextYear(t ? e.copyWith({ second: e.second + 1 }) : e);
459
- return {
460
- cronosDate: s,
461
- date: s ? s.toDate(this.timezone) : null
462
- };
463
- }
464
- nextNDates(e = /* @__PURE__ */ new Date(), t = 5) {
465
- const s = [];
466
- let a = e;
467
- for (let r = 0; r < t; r++) {
468
- const i = this.nextDate(a);
469
- if (!i)
470
- break;
471
- a = i, s.push(i);
472
- }
473
- return s;
474
- }
475
- _nextYear(e) {
476
- let t = e.year, s = null;
477
- for (; !s; ) {
478
- if (t = this.years.nextYear(t), t === null)
479
- return null;
480
- s = this._nextMonth(t === e.year ? e : new f(t)), t++;
481
- }
482
- return s;
483
- }
484
- _nextMonth(e) {
485
- let t = E(e.month, this.months), s = null;
486
- for (; !s; ) {
487
- const a = this.months[t];
488
- if (a === void 0)
489
- return null;
490
- s = this._nextDay(a === e.month ? e : new f(e.year, a)), t++;
491
- }
492
- return s;
493
- }
494
- _nextDay(e) {
495
- const t = this.days.getDays(e.year, e.month);
496
- let s = E(e.day, t), a = null;
497
- for (; !a; ) {
498
- const r = t[s];
499
- if (r === void 0)
500
- return null;
501
- a = this._nextHour(r === e.day ? e : new f(e.year, e.month, r)), s++;
502
- }
503
- return a;
504
- }
505
- _nextHour(e) {
506
- let t = E(e.hour, this.hours), s = null;
507
- for (; !s; ) {
508
- const a = this.hours[t];
509
- if (a === void 0)
510
- return null;
511
- s = this._nextMinute(a === e.hour ? e : new f(e.year, e.month, e.day, a)), t++;
512
- }
513
- return s;
514
- }
515
- _nextMinute(e) {
516
- let t = E(e.minute, this.minutes), s = null;
517
- for (; !s; ) {
518
- const a = this.minutes[t];
519
- if (a === void 0)
520
- return null;
521
- s = this._nextSecond(a === e.minute ? e : new f(e.year, e.month, e.day, e.hour, a)), t++;
522
- }
523
- return s;
524
- }
525
- _nextSecond(e) {
526
- const t = E(e.second, this.seconds), s = this.seconds[t];
527
- return s === void 0 ? null : e.copyWith({ second: s });
528
- }
529
- }
530
- const se = {
531
- name: "VueCron",
532
- props: {
533
- data: Object,
534
- expression: String,
535
- runsParser: Function,
536
- quartz: {
537
- type: Boolean,
538
- default: !0
539
- }
540
- },
541
- data() {
542
- const n = (/* @__PURE__ */ new Date()).getFullYear();
543
- return {
544
- currentYear: n,
545
- exps: [
546
- {
547
- type: "second",
548
- expression: ""
549
- },
550
- {
551
- type: "minute",
552
- expression: ""
553
- },
554
- {
555
- type: "hour",
556
- expression: ""
557
- },
558
- {
559
- type: "day",
560
- expression: ""
561
- },
562
- {
563
- type: "month",
564
- expression: ""
565
- },
566
- {
567
- type: "week",
568
- expression: ""
569
- },
570
- {
571
- type: "year",
572
- expression: ""
573
- }
574
- ],
575
- second: {
576
- cronEvery: "",
577
- incrementStart: "1",
578
- incrementIncrement: "3",
579
- rangeStart: "",
580
- rangeEnd: "",
581
- specificSpecific: []
582
- },
583
- minute: {
584
- cronEvery: "",
585
- incrementStart: "1",
586
- incrementIncrement: "3",
587
- rangeStart: "",
588
- rangeEnd: "",
589
- specificSpecific: []
590
- },
591
- hour: {
592
- cronEvery: "",
593
- incrementStart: "1",
594
- incrementIncrement: "3",
595
- rangeStart: "",
596
- rangeEnd: "",
597
- specificSpecific: []
598
- },
599
- day: {
600
- cronEvery: "",
601
- incrementStart: "1",
602
- incrementIncrement: "1",
603
- rangeStart: "",
604
- rangeEnd: "",
605
- specificSpecific: [],
606
- cronDaysBeforeEomMinus: "",
607
- cronDaysNearestWeekday: ""
608
- },
609
- week: {
610
- cronEvery: "",
611
- incrementStart: "0",
612
- incrementIncrement: "1",
613
- specificSpecific: [],
614
- cronLastSpecificDomDay: "0",
615
- cronNthDayDay: "0",
616
- cronNthDayNth: "1"
617
- },
618
- month: {
619
- cronEvery: "",
620
- incrementStart: "1",
621
- incrementIncrement: "3",
622
- rangeStart: "",
623
- rangeEnd: "",
624
- specificSpecific: []
625
- },
626
- year: {
627
- cronEvery: "",
628
- incrementStart: `${n}`,
629
- incrementIncrement: "1",
630
- rangeStart: "",
631
- rangeEnd: "",
632
- specificSpecific: []
633
- },
634
- output: {
635
- second: "",
636
- minute: "",
637
- hour: "",
638
- day: "",
639
- month: "",
640
- week: "",
641
- year: ""
642
- },
643
- runs: [],
644
- defaultStr: "0",
645
- weekOptions: [
646
- {
647
- value: "0",
648
- label: "星期天"
649
- },
650
- {
651
- value: "1",
652
- label: "星期一"
653
- },
654
- {
655
- value: "2",
656
- label: "星期二"
657
- },
658
- {
659
- value: "3",
660
- label: "星期三"
661
- },
662
- {
663
- value: "4",
664
- label: "星期四"
665
- },
666
- {
667
- value: "5",
668
- label: "星期五"
669
- },
670
- {
671
- value: "6",
672
- label: "星期六"
673
- }
674
- ]
675
- };
676
- },
677
- computed: {
678
- text() {
679
- return Q;
680
- },
681
- secondsText() {
682
- let n = "";
683
- switch (this.second.cronEvery.toString()) {
684
- case "1":
685
- n = "*";
686
- break;
687
- case "2":
688
- n = `${this.second.incrementStart}/${this.second.incrementIncrement}`;
689
- break;
690
- case "3":
691
- this.second.specificSpecific.forEach((t) => {
692
- n += `${t},`;
693
- }), n = n.slice(0, -1);
694
- break;
695
- case "4":
696
- n = `${this.second.rangeStart}-${this.second.rangeEnd}`;
697
- break;
698
- }
699
- return n || this.defaultStr;
700
- },
701
- minutesText() {
702
- let n = "";
703
- switch (this.minute.cronEvery.toString()) {
704
- case "1":
705
- n = "*";
706
- break;
707
- case "2":
708
- n = `${this.minute.incrementStart}/${this.minute.incrementIncrement}`;
709
- break;
710
- case "3":
711
- this.minute.specificSpecific.forEach((t) => {
712
- n += `${t},`;
713
- }), n = n.slice(0, -1);
714
- break;
715
- case "4":
716
- n = `${this.minute.rangeStart}-${this.minute.rangeEnd}`;
717
- break;
718
- }
719
- return n || this.defaultStr;
720
- },
721
- hoursText() {
722
- let n = "";
723
- switch (this.hour.cronEvery.toString()) {
724
- case "1":
725
- n = "*";
726
- break;
727
- case "2":
728
- n = `${this.hour.incrementStart}/${this.hour.incrementIncrement}`;
729
- break;
730
- case "3":
731
- this.hour.specificSpecific.forEach((t) => {
732
- n += `${t},`;
733
- }), n = n.slice(0, -1);
734
- break;
735
- case "4":
736
- n = `${this.hour.rangeStart}-${this.hour.rangeEnd}`;
737
- break;
738
- }
739
- return n || this.defaultStr;
740
- },
741
- daysText() {
742
- const n = this.day.cronEvery;
743
- if (!n)
744
- return "?";
745
- let e = "";
746
- switch (n.toString()) {
747
- case "1":
748
- e = "*";
749
- break;
750
- case "3":
751
- e = `${this.day.incrementStart}/${this.day.incrementIncrement}`;
752
- break;
753
- case "5":
754
- this.day.specificSpecific.forEach((t) => {
755
- e += `${t},`;
756
- }), e = e.slice(0, -1);
757
- break;
758
- case "6":
759
- e = "L";
760
- break;
761
- case "7":
762
- e = "LW";
763
- break;
764
- case "9":
765
- e = `L-${this.day.cronDaysBeforeEomMinus}`;
766
- break;
767
- case "10":
768
- e = `${this.day.cronDaysNearestWeekday}W`;
769
- break;
770
- }
771
- return e;
772
- },
773
- weeksText() {
774
- const n = this.week.cronEvery;
775
- if (!n)
776
- return "?";
777
- let e = "";
778
- switch (n.toString()) {
779
- case "1":
780
- e = "*";
781
- break;
782
- case "2":
783
- e = `${this.week.incrementStart}/${this.week.incrementIncrement}`;
784
- break;
785
- case "4":
786
- this.week.specificSpecific.forEach((t) => {
787
- e += `${t},`;
788
- }), e = e.slice(0, -1);
789
- break;
790
- case "8":
791
- e = `${this.week.cronLastSpecificDomDay}L`;
792
- break;
793
- case "11":
794
- e = `${this.week.cronNthDayDay}#${this.week.cronNthDayNth}`;
795
- break;
796
- }
797
- return e;
798
- },
799
- weeksTextQuartz() {
800
- const n = this.week.cronEvery;
801
- if (!n)
802
- return "?";
803
- let e = "";
804
- switch (n.toString()) {
805
- case "1":
806
- e = "*";
807
- break;
808
- case "2":
809
- e = `${this.week.incrementStart}/${this.week.incrementIncrement}`;
810
- break;
811
- case "4":
812
- e = this.week.specificSpecific.map((t) => Number(t) + 1).join(",");
813
- break;
814
- case "8":
815
- e = `${Number(this.week.cronLastSpecificDomDay) + 1}L`;
816
- break;
817
- case "11":
818
- e = `${Number(this.week.cronNthDayDay) + 1}#${this.week.cronNthDayNth}`;
819
- break;
820
- }
821
- return e;
822
- },
823
- monthsText() {
824
- let n = "";
825
- switch (this.month.cronEvery.toString()) {
826
- case "1":
827
- n = "*";
828
- break;
829
- case "2":
830
- n = `${this.month.incrementStart}/${this.month.incrementIncrement}`;
831
- break;
832
- case "3":
833
- this.month.specificSpecific.forEach((t) => {
834
- n += `${t},`;
835
- }), n = n.slice(0, -1);
836
- break;
837
- case "4":
838
- n = `${this.month.rangeStart}-${this.month.rangeEnd}`;
839
- break;
840
- }
841
- return n || "1";
842
- },
843
- yearsText() {
844
- let n = "";
845
- switch (this.year.cronEvery.toString()) {
846
- case "1":
847
- n = "*";
848
- break;
849
- case "2":
850
- n = `${this.year.incrementStart}/${this.year.incrementIncrement}`;
851
- break;
852
- case "3":
853
- this.year.specificSpecific.forEach((t) => {
854
- n += `${t},`;
855
- }), n = n.slice(0, -1);
856
- break;
857
- case "4":
858
- n = `${this.year.rangeStart}-${this.year.rangeEnd}`;
859
- break;
860
- }
861
- return n || "*";
862
- },
863
- cron() {
864
- return `${this.secondsText} ${this.minutesText} ${this.hoursText} ${this.daysText} ${this.monthsText} ${this.quartz ? this.weeksTextQuartz : this.weeksText} ${this.yearsText}`;
865
- }
866
- },
867
- watch: {
868
- data() {
869
- this.rest(this.$data);
870
- },
871
- cron: {
872
- immediate: !0,
873
- async handler() {
874
- const n = `${this.secondsText} ${this.minutesText} ${this.hoursText} ${this.daysText} ${this.monthsText} ${this.weeksText} ${this.yearsText}`;
875
- try {
876
- this.runsParser ? this.runs = await this.runsParser(n) : this.runs = M.parse(n).nextNDates(/* @__PURE__ */ new Date(), 5).map((e) => j(e));
877
- } catch (e) {
878
- console.error(e), this.runs = [e.message];
879
- }
880
- }
881
- },
882
- expression: {
883
- immediate: !0,
884
- handler: "resolveExpression"
885
- }
886
- },
887
- methods: {
888
- copyCron() {
889
- P(
890
- this.cron,
891
- () => {
892
- this.$message.success("复制成功");
893
- },
894
- () => {
895
- this.$message.error("复制失败");
896
- }
897
- );
898
- },
899
- getValue() {
900
- return this.cron;
901
- },
902
- change() {
903
- this.$emit("change", this.cron), this.close();
904
- },
905
- close() {
906
- this.$emit("close");
907
- },
908
- rest(n) {
909
- for (const e in n)
910
- if (n[e] instanceof Object)
911
- this.rest(n[e]);
912
- else
913
- switch (typeof n[e]) {
914
- case "object":
915
- n[e] = [];
916
- break;
917
- case "string":
918
- n[e] = "";
919
- break;
920
- }
921
- },
922
- // 反向解析表达式
923
- resolveExpression() {
924
- var e;
925
- if (!((e = this.expression) != null && e.length)) return;
926
- const n = this.expression.split(" ");
927
- if (n.length < 7)
928
- throw Error("表达式格式不正确");
929
- for (let t = 0; t < n.length; t++)
930
- this.exps[t].expression = n[t];
931
- this.exps.forEach((t) => {
932
- switch (this.output[t.type] = t.expression, t.type) {
933
- case "year":
934
- case "month":
935
- case "hour":
936
- case "minute":
937
- case "second":
938
- this.commonParser(this[t.type], t.expression);
939
- return;
940
- case "week":
941
- this.resolveWeek(t.expression);
942
- return;
943
- case "day":
944
- this.resolveDay(t.expression);
945
- }
946
- });
947
- },
948
- // 年,月,时,分,秒
949
- commonParser(n, e) {
950
- e === "*" ? this.resolveStar(n) : e.indexOf("-") >= 0 ? this.resolveLine(n, e) : e.indexOf("/") >= 0 ? this.resolveSlash(n, e) : this.resolveComma(n, e);
951
- },
952
- resolveWeek(n) {
953
- if (n.indexOf("/") >= 0)
954
- this.week.cronEvery = "2", this.resolveSlash(this.week, n);
955
- else if (n.indexOf(",") >= 0)
956
- this.week.cronEvery = "4", this.resolveComma(this.week, n);
957
- else if (n.indexOf("L") === n.length - 1)
958
- this.week.cronEvery = "8", this.week.cronLastSpecificDomDay = n.slice(0, -1);
959
- else if (n.indexOf("#") >= 0) {
960
- this.week.cronEvery = "11";
961
- const e = n.split("#");
962
- this.week.cronNthDayDay = e[0], this.week.cronNthDayNth = e[1];
963
- }
964
- },
965
- resolveDay(n) {
966
- n === "*" ? this.resolveStar(this.day) : n.indexOf("/") >= 0 ? this.resolveSlash(this.day, n, "3") : n === "L" ? this.day.cronEvery = "6" : n === "LW" ? this.day.cronEvery = "7" : /L-\d+/.test(n) ? (this.day.cronEvery = "9", this.day.cronDaysBeforeEomMinus = Number(n.match(/L-(\d+)/)[1])) : /\d+W/.test(n) ? (this.day.cronEvery = "10", this.day.cronDaysNearestWeekday = Number(n.match(/(\d+)W/))[1]) : n.indexOf(",") >= 0 && this.resolveComma(this.day, n, "5");
967
- },
968
- resolveStar(n, e = "1") {
969
- n.cronEvery = e;
970
- },
971
- resolveSlash(n, e, t = "2") {
972
- n.cronEvery = t;
973
- const s = e.split("/");
974
- n.incrementStart = s[0], n.incrementIncrement = s[1];
975
- },
976
- resolveLine(n, e, t = "4") {
977
- n.cronEvery = t;
978
- const s = e.split("-");
979
- n.rangeStart = s[0], n.rangeStart = s[1];
980
- },
981
- resolveComma(n, e, t = "3") {
982
- n.cronEvery = t, n.specificSpecific = e.split(",");
983
- },
984
- setSecond(n) {
985
- var e;
986
- n === "3" ? (e = this.second.specificSpecific) != null && e.length || (this.second.specificSpecific = [0]) : this.second.specificSpecific = [];
987
- },
988
- setMinute(n) {
989
- var e;
990
- n === "3" ? (e = this.minute.specificSpecific) != null && e.length || (this.minute.specificSpecific = [0]) : this.minute.specificSpecific = [];
991
- },
992
- setHour(n) {
993
- var e;
994
- n === "3" ? (e = this.hour.specificSpecific) != null && e.length || (this.hour.specificSpecific = [0]) : this.hour.specificSpecific = [];
995
- },
996
- setMonth(n) {
997
- var e;
998
- n === "3" ? (e = this.month.specificSpecific) != null && e.length || (this.month.specificSpecific = [1]) : this.month.specificSpecific = [];
999
- },
1000
- setYear(n) {
1001
- var e;
1002
- n === "3" ? (e = this.year.specificSpecific) != null && e.length || (this.year.specificSpecific = [(/* @__PURE__ */ new Date()).getFullYear()]) : this.year.specificSpecific = [];
1003
- },
1004
- setDay(n) {
1005
- var e;
1006
- this.week.cronEvery = "", n === "5" ? (e = this.day.specificSpecific) != null && e.length || (this.day.specificSpecific = [1]) : this.day.specificSpecific = [];
1007
- },
1008
- setWeek(n) {
1009
- var e;
1010
- this.day.cronEvery = "", n === "4" ? (e = this.week.specificSpecific) != null && e.length || (this.week.specificSpecific = ["1"]) : this.week.specificSpecific = [];
1011
- }
1012
- }
1013
- };
1014
- var ne = function() {
1015
- var e = this, t = e._self._c;
1016
- return t("div", { staticClass: "vue-cron" }, [t(V, { attrs: { type: "border-card" } }, [t(S, { scopedSlots: e._u([{ key: "label", fn: function() {
1017
- return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Seconds.name))])];
1018
- }, proxy: !0 }]) }, [t(_, { staticClass: "tabBody", on: { input: e.setSecond }, model: { value: e.second.cronEvery, callback: function(s) {
1019
- e.$set(e.second, "cronEvery", s);
1020
- }, expression: "second.cronEvery" } }, [t(o, { attrs: { label: "1" } }, [e._v(e._s(e.text.Seconds.every))]), t(o, { attrs: { label: "4" } }, [e._v(" " + e._s(e.text.Seconds.cycle[0]) + " "), t(h, { attrs: { size: "small", min: 0, max: 60 }, model: { value: e.second.rangeStart, callback: function(s) {
1021
- e.$set(e.second, "rangeStart", s);
1022
- }, expression: "second.rangeStart" } }), e._v(" " + e._s(e.text.Seconds.cycle[1] || "") + " "), t(h, { attrs: { size: "small", min: 1, max: 59 }, model: { value: e.second.rangeEnd, callback: function(s) {
1023
- e.$set(e.second, "rangeEnd", s);
1024
- }, expression: "second.rangeEnd" } }), e._v(" " + e._s(e.text.Seconds.cycle[2] || "") + " ")], 1), t(o, { attrs: { label: "2" } }, [e._v(" " + e._s(e.text.Seconds.interval[0]) + " "), t(h, { attrs: { size: "small", min: 0, max: 59 }, model: { value: e.second.incrementStart, callback: function(s) {
1025
- e.$set(e.second, "incrementStart", s);
1026
- }, expression: "second.incrementStart" } }), e._v(" " + e._s(e.text.Seconds.interval[1] || "") + " "), t(h, { attrs: { size: "small", min: 1, max: 60 }, model: { value: e.second.incrementIncrement, callback: function(s) {
1027
- e.$set(e.second, "incrementIncrement", s);
1028
- }, expression: "second.incrementIncrement" } }), e._v(" " + e._s(e.text.Seconds.interval[2] || "") + " ")], 1), t(o, { staticClass: "long", attrs: { label: "3" } }, [e._v(" " + e._s(e.text.Seconds.specific) + " "), t(v, { attrs: { size: "small", multiple: "" }, model: { value: e.second.specificSpecific, callback: function(s) {
1029
- e.$set(e.second, "specificSpecific", s);
1030
- }, expression: "second.specificSpecific" } }, e._l(60, function(s) {
1031
- return t(p, { key: s, attrs: { value: s - 1 } }, [e._v(e._s(s - 1))]);
1032
- }), 1)], 1)], 1)], 1), t(S, { scopedSlots: e._u([{ key: "label", fn: function() {
1033
- return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Minutes.name))])];
1034
- }, proxy: !0 }]) }, [t(_, { staticClass: "tabBody", on: { input: e.setMinute }, model: { value: e.minute.cronEvery, callback: function(s) {
1035
- e.$set(e.minute, "cronEvery", s);
1036
- }, expression: "minute.cronEvery" } }, [t(o, { attrs: { label: "1" } }, [e._v(e._s(e.text.Minutes.every))]), t(o, { attrs: { label: "4" } }, [e._v(" " + e._s(e.text.Minutes.cycle[0]) + " "), t(h, { attrs: { size: "small", min: 0, max: 60 }, model: { value: e.minute.rangeStart, callback: function(s) {
1037
- e.$set(e.minute, "rangeStart", s);
1038
- }, expression: "minute.rangeStart" } }), e._v(" " + e._s(e.text.Minutes.cycle[1]) + " "), t(h, { attrs: { size: "small", min: 1, max: 59 }, model: { value: e.minute.rangeEnd, callback: function(s) {
1039
- e.$set(e.minute, "rangeEnd", s);
1040
- }, expression: "minute.rangeEnd" } }), e._v(" " + e._s(e.text.Minutes.cycle[2]) + " ")], 1), t(o, { attrs: { label: "2" } }, [e._v(" " + e._s(e.text.Minutes.interval[0]) + " "), t(h, { attrs: { size: "small", min: 0, max: 59 }, model: { value: e.minute.incrementStart, callback: function(s) {
1041
- e.$set(e.minute, "incrementStart", s);
1042
- }, expression: "minute.incrementStart" } }), e._v(" " + e._s(e.text.Minutes.interval[1]) + " "), t(h, { attrs: { size: "small", min: 1, max: 60 }, model: { value: e.minute.incrementIncrement, callback: function(s) {
1043
- e.$set(e.minute, "incrementIncrement", s);
1044
- }, expression: "minute.incrementIncrement" } }), e._v(" " + e._s(e.text.Minutes.interval[2] || "") + " ")], 1), t(o, { staticClass: "long", attrs: { label: "3" } }, [e._v(" " + e._s(e.text.Minutes.specific) + " "), t(v, { attrs: { size: "small", multiple: "" }, model: { value: e.minute.specificSpecific, callback: function(s) {
1045
- e.$set(e.minute, "specificSpecific", s);
1046
- }, expression: "minute.specificSpecific" } }, e._l(60, function(s) {
1047
- return t(p, { key: s, attrs: { value: s - 1 } }, [e._v(e._s(s - 1))]);
1048
- }), 1)], 1)], 1)], 1), t(S, { scopedSlots: e._u([{ key: "label", fn: function() {
1049
- return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Hours.name))])];
1050
- }, proxy: !0 }]) }, [t(_, { staticClass: "tabBody", on: { input: e.setHour }, model: { value: e.hour.cronEvery, callback: function(s) {
1051
- e.$set(e.hour, "cronEvery", s);
1052
- }, expression: "hour.cronEvery" } }, [t(o, { attrs: { label: "1" }, model: { value: e.hour.cronEvery, callback: function(s) {
1053
- e.$set(e.hour, "cronEvery", s);
1054
- }, expression: "hour.cronEvery" } }, [e._v(e._s(e.text.Hours.every))]), t(o, { attrs: { label: "4" }, model: { value: e.hour.cronEvery, callback: function(s) {
1055
- e.$set(e.hour, "cronEvery", s);
1056
- }, expression: "hour.cronEvery" } }, [e._v(" " + e._s(e.text.Hours.cycle[0]) + " "), t(h, { attrs: { size: "small", min: 0, max: 23 }, model: { value: e.hour.rangeStart, callback: function(s) {
1057
- e.$set(e.hour, "rangeStart", s);
1058
- }, expression: "hour.rangeStart" } }), e._v(" " + e._s(e.text.Hours.cycle[1]) + " "), t(h, { attrs: { size: "small", min: 1, max: 23 }, model: { value: e.hour.rangeEnd, callback: function(s) {
1059
- e.$set(e.hour, "rangeEnd", s);
1060
- }, expression: "hour.rangeEnd" } }), e._v(" " + e._s(e.text.Hours.cycle[2]) + " ")], 1), t(o, { attrs: { label: "2" }, model: { value: e.hour.cronEvery, callback: function(s) {
1061
- e.$set(e.hour, "cronEvery", s);
1062
- }, expression: "hour.cronEvery" } }, [e._v(" " + e._s(e.text.Hours.interval[0]) + " "), t(h, { attrs: { size: "small", min: 0, max: 23 }, model: { value: e.hour.incrementStart, callback: function(s) {
1063
- e.$set(e.hour, "incrementStart", s);
1064
- }, expression: "hour.incrementStart" } }), e._v(" " + e._s(e.text.Hours.interval[1]) + " "), t(h, { attrs: { size: "small", min: 1, max: 23 }, model: { value: e.hour.incrementIncrement, callback: function(s) {
1065
- e.$set(e.hour, "incrementIncrement", s);
1066
- }, expression: "hour.incrementIncrement" } }), e._v(" " + e._s(e.text.Hours.interval[2]) + " ")], 1), t(o, { staticClass: "long", attrs: { label: "3" }, model: { value: e.hour.cronEvery, callback: function(s) {
1067
- e.$set(e.hour, "cronEvery", s);
1068
- }, expression: "hour.cronEvery" } }, [e._v(" " + e._s(e.text.Hours.specific) + " "), t(v, { attrs: { size: "small", multiple: "" }, model: { value: e.hour.specificSpecific, callback: function(s) {
1069
- e.$set(e.hour, "specificSpecific", s);
1070
- }, expression: "hour.specificSpecific" } }, e._l(24, function(s) {
1071
- return t(p, { key: s, attrs: { value: s - 1 } }, [e._v(e._s(s - 1))]);
1072
- }), 1)], 1)], 1)], 1), t(S, { scopedSlots: e._u([{ key: "label", fn: function() {
1073
- return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Day.name))])];
1074
- }, proxy: !0 }]) }, [t(_, { staticClass: "tabBody", on: { input: e.setDay }, model: { value: e.day.cronEvery, callback: function(s) {
1075
- e.$set(e.day, "cronEvery", s);
1076
- }, expression: "day.cronEvery" } }, [t(o, { attrs: { label: "1" }, model: { value: e.day.cronEvery, callback: function(s) {
1077
- e.$set(e.day, "cronEvery", s);
1078
- }, expression: "day.cronEvery" } }, [e._v(e._s(e.text.Day.every))]), t(o, { attrs: { label: "3" }, model: { value: e.day.cronEvery, callback: function(s) {
1079
- e.$set(e.day, "cronEvery", s);
1080
- }, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.intervalDay[0]) + " "), t(h, { attrs: { size: "small", min: 0, max: 31 }, model: { value: e.day.incrementStart, callback: function(s) {
1081
- e.$set(e.day, "incrementStart", s);
1082
- }, expression: "day.incrementStart" } }), e._v(" " + e._s(e.text.Day.intervalDay[1]) + " "), t(h, { attrs: { size: "small", min: 1, max: 31 }, model: { value: e.day.incrementIncrement, callback: function(s) {
1083
- e.$set(e.day, "incrementIncrement", s);
1084
- }, expression: "day.incrementIncrement" } }), e._v(" " + e._s(e.text.Day.intervalDay[2]) + " ")], 1), t(o, { staticClass: "long", attrs: { label: "5" }, model: { value: e.day.cronEvery, callback: function(s) {
1085
- e.$set(e.day, "cronEvery", s);
1086
- }, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.specificDay) + " "), t(v, { attrs: { size: "small", multiple: "" }, model: { value: e.day.specificSpecific, callback: function(s) {
1087
- e.$set(e.day, "specificSpecific", s);
1088
- }, expression: "day.specificSpecific" } }, e._l(31, function(s) {
1089
- return t(p, { key: s, attrs: { value: s } }, [e._v(e._s(s))]);
1090
- }), 1)], 1), t(o, { attrs: { label: "6" }, model: { value: e.day.cronEvery, callback: function(s) {
1091
- e.$set(e.day, "cronEvery", s);
1092
- }, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.lastDay) + " ")]), t(o, { attrs: { label: "7" }, model: { value: e.day.cronEvery, callback: function(s) {
1093
- e.$set(e.day, "cronEvery", s);
1094
- }, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.lastWorkday) + " ")]), t(o, { attrs: { label: "9" }, model: { value: e.day.cronEvery, callback: function(s) {
1095
- e.$set(e.day, "cronEvery", s);
1096
- }, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.beforeEndMonth[0]) + " "), t(h, { attrs: { size: "small", min: 1, max: 31 }, model: { value: e.day.cronDaysBeforeEomMinus, callback: function(s) {
1097
- e.$set(e.day, "cronDaysBeforeEomMinus", s);
1098
- }, expression: "day.cronDaysBeforeEomMinus" } }), e._v(" " + e._s(e.text.Day.beforeEndMonth[1]) + " ")], 1), t(o, { attrs: { label: "10" }, model: { value: e.day.cronEvery, callback: function(s) {
1099
- e.$set(e.day, "cronEvery", s);
1100
- }, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.nearestWorkday[0]) + " "), t(h, { attrs: { size: "small", min: 1, max: 31 }, model: { value: e.day.cronDaysNearestWeekday, callback: function(s) {
1101
- e.$set(e.day, "cronDaysNearestWeekday", s);
1102
- }, expression: "day.cronDaysNearestWeekday" } }), e._v(" " + e._s(e.text.Day.nearestWorkday[1]) + " ")], 1)], 1)], 1), t(S, { scopedSlots: e._u([{ key: "label", fn: function() {
1103
- return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Month.name))])];
1104
- }, proxy: !0 }]) }, [t(_, { staticClass: "tabBody", on: { input: e.setMonth }, model: { value: e.month.cronEvery, callback: function(s) {
1105
- e.$set(e.month, "cronEvery", s);
1106
- }, expression: "month.cronEvery" } }, [t(o, { attrs: { label: "1" }, model: { value: e.month.cronEvery, callback: function(s) {
1107
- e.$set(e.month, "cronEvery", s);
1108
- }, expression: "month.cronEvery" } }, [e._v(e._s(e.text.Month.every))]), t(o, { attrs: { label: "4" }, model: { value: e.month.cronEvery, callback: function(s) {
1109
- e.$set(e.month, "cronEvery", s);
1110
- }, expression: "month.cronEvery" } }, [e._v(" " + e._s(e.text.Month.cycle[0]) + " "), t(h, { attrs: { size: "small", min: 1, max: 12 }, model: { value: e.month.rangeStart, callback: function(s) {
1111
- e.$set(e.month, "rangeStart", s);
1112
- }, expression: "month.rangeStart" } }), e._v(" " + e._s(e.text.Month.cycle[1]) + " "), t(h, { attrs: { size: "small", min: 1, max: 12 }, model: { value: e.month.rangeEnd, callback: function(s) {
1113
- e.$set(e.month, "rangeEnd", s);
1114
- }, expression: "month.rangeEnd" } }), e._v(" " + e._s(e.text.Month.cycle[2]) + " ")], 1), t(o, { attrs: { label: "2" }, model: { value: e.month.cronEvery, callback: function(s) {
1115
- e.$set(e.month, "cronEvery", s);
1116
- }, expression: "month.cronEvery" } }, [e._v(" " + e._s(e.text.Month.interval[0]) + " "), t(h, { attrs: { size: "small", min: 0, max: 12 }, model: { value: e.month.incrementStart, callback: function(s) {
1117
- e.$set(e.month, "incrementStart", s);
1118
- }, expression: "month.incrementStart" } }), e._v(" " + e._s(e.text.Month.interval[1]) + " "), t(h, { attrs: { size: "small", min: 1, max: 12 }, model: { value: e.month.incrementIncrement, callback: function(s) {
1119
- e.$set(e.month, "incrementIncrement", s);
1120
- }, expression: "month.incrementIncrement" } }), e._v(" " + e._s(e.text.Month.interval[2]) + " ")], 1), t(o, { staticClass: "long", attrs: { label: "3" }, model: { value: e.month.cronEvery, callback: function(s) {
1121
- e.$set(e.month, "cronEvery", s);
1122
- }, expression: "month.cronEvery" } }, [e._v(" " + e._s(e.text.Month.specific) + " "), t(v, { attrs: { size: "small", multiple: "" }, model: { value: e.month.specificSpecific, callback: function(s) {
1123
- e.$set(e.month, "specificSpecific", s);
1124
- }, expression: "month.specificSpecific" } }, e._l(12, function(s) {
1125
- return t(p, { key: s, attrs: { label: s, value: s } });
1126
- }), 1)], 1)], 1)], 1), t(S, { scopedSlots: e._u([{ key: "label", fn: function() {
1127
- return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Week.name))])];
1128
- }, proxy: !0 }]) }, [t(_, { staticClass: "tabBody", on: { input: e.setWeek }, model: { value: e.week.cronEvery, callback: function(s) {
1129
- e.$set(e.week, "cronEvery", s);
1130
- }, expression: "week.cronEvery" } }, [t(o, { attrs: { label: "1" } }, [e._v(e._s(e.text.Week.every))]), t(o, { attrs: { label: "2" } }, [e._v(" " + e._s(e.text.Week.intervalWeek[0]) + " "), t(v, { attrs: { size: "small" }, model: { value: e.week.incrementStart, callback: function(s) {
1131
- e.$set(e.week, "incrementStart", s);
1132
- }, expression: "week.incrementStart" } }, e._l(e.weekOptions, function(s) {
1133
- return t(p, { key: s.value, attrs: { label: s.label, value: s.value } });
1134
- }), 1), e._v(" " + e._s(e.text.Week.intervalWeek[1]) + " "), t(h, { attrs: { size: "small", min: 1, max: 7 }, model: { value: e.week.incrementIncrement, callback: function(s) {
1135
- e.$set(e.week, "incrementIncrement", s);
1136
- }, expression: "week.incrementIncrement" } }), e._v(" " + e._s(e.text.Week.intervalWeek[2]) + " ")], 1), t(o, { staticClass: "long", attrs: { label: "4" } }, [e._v(" " + e._s(e.text.Week.specificWeek) + " "), t(v, { attrs: { size: "small", multiple: "" }, model: { value: e.week.specificSpecific, callback: function(s) {
1137
- e.$set(e.week, "specificSpecific", s);
1138
- }, expression: "week.specificSpecific" } }, e._l(e.weekOptions, function(s) {
1139
- return t(p, { key: s.value, attrs: { label: s.label, value: s.value } });
1140
- }), 1)], 1), t(o, { attrs: { label: "8" } }, [e._v(" " + e._s(e.text.Week.lastWeek[0]) + " "), t(v, { attrs: { size: "small" }, model: { value: e.week.cronLastSpecificDomDay, callback: function(s) {
1141
- e.$set(e.week, "cronLastSpecificDomDay", s);
1142
- }, expression: "week.cronLastSpecificDomDay" } }, e._l(e.weekOptions, function(s) {
1143
- return t(p, { key: s.value, attrs: { value: s.value, label: s.label } });
1144
- }), 1)], 1), t(o, { attrs: { label: "11" } }, [e._v(" " + e._s(e.text.Week.someWeekday[0]) + " "), t(h, { attrs: { size: "small", min: 1, max: 5 }, model: { value: e.week.cronNthDayNth, callback: function(s) {
1145
- e.$set(e.week, "cronNthDayNth", s);
1146
- }, expression: "week.cronNthDayNth" } }), e._v(" " + e._s(e.text.Week.someWeekday[1]) + " "), t(v, { attrs: { size: "small" }, model: { value: e.week.cronNthDayDay, callback: function(s) {
1147
- e.$set(e.week, "cronNthDayDay", s);
1148
- }, expression: "week.cronNthDayDay" } }, e._l(e.weekOptions, function(s) {
1149
- return t(p, { key: s.value, attrs: { label: s.label, value: s.value } });
1150
- }), 1)], 1)], 1)], 1), t(S, { scopedSlots: e._u([{ key: "label", fn: function() {
1151
- return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Year.name))])];
1152
- }, proxy: !0 }]) }, [t(_, { staticClass: "tabBody", on: { input: e.setYear }, model: { value: e.year.cronEvery, callback: function(s) {
1153
- e.$set(e.year, "cronEvery", s);
1154
- }, expression: "year.cronEvery" } }, [t(o, { attrs: { label: "1" }, model: { value: e.year.cronEvery, callback: function(s) {
1155
- e.$set(e.year, "cronEvery", s);
1156
- }, expression: "year.cronEvery" } }, [e._v(e._s(e.text.Year.every))]), t(o, { attrs: { label: "4" }, model: { value: e.year.cronEvery, callback: function(s) {
1157
- e.$set(e.year, "cronEvery", s);
1158
- }, expression: "year.cronEvery" } }, [e._v(" " + e._s(e.text.Year.cycle[0]) + " "), t(h, { attrs: { size: "small", min: e.currentYear, max: 2118 }, model: { value: e.year.rangeStart, callback: function(s) {
1159
- e.$set(e.year, "rangeStart", s);
1160
- }, expression: "year.rangeStart" } }), e._v(" " + e._s(e.text.Year.cycle[1]) + " "), t(h, { attrs: { size: "small", min: e.currentYear, max: 2118 }, model: { value: e.year.rangeEnd, callback: function(s) {
1161
- e.$set(e.year, "rangeEnd", s);
1162
- }, expression: "year.rangeEnd" } }), e._v(" " + e._s(e.text.Year.cycle[2]) + " ")], 1), t(o, { attrs: { label: "2" }, model: { value: e.year.cronEvery, callback: function(s) {
1163
- e.$set(e.year, "cronEvery", s);
1164
- }, expression: "year.cronEvery" } }, [e._v(" " + e._s(e.text.Year.interval[0]) + " "), t(h, { attrs: { size: "small", min: e.currentYear, max: 2118 }, model: { value: e.year.incrementStart, callback: function(s) {
1165
- e.$set(e.year, "incrementStart", s);
1166
- }, expression: "year.incrementStart" } }), e._v(" " + e._s(e.text.Year.interval[1]) + " "), t(h, { attrs: { size: "small", min: 1, max: 99 }, model: { value: e.year.incrementIncrement, callback: function(s) {
1167
- e.$set(e.year, "incrementIncrement", s);
1168
- }, expression: "year.incrementIncrement" } }), e._v(" " + e._s(e.text.Year.interval[2]) + " ")], 1), t(o, { staticClass: "long", attrs: { label: "3" }, model: { value: e.year.cronEvery, callback: function(s) {
1169
- e.$set(e.year, "cronEvery", s);
1170
- }, expression: "year.cronEvery" } }, [e._v(" " + e._s(e.text.Year.specific) + " "), t(v, { attrs: { size: "small", filterable: "", multiple: "" }, model: { value: e.year.specificSpecific, callback: function(s) {
1171
- e.$set(e.year, "specificSpecific", s);
1172
- }, expression: "year.specificSpecific" } }, e._l(100, function(s) {
1173
- return t(p, { key: s, attrs: { label: `${2017 + s}`, value: 2017 + s } });
1174
- }), 1)], 1)], 1)], 1)], 1), t("div", { staticStyle: { padding: "0 0 10px" } }, [t("div", { staticClass: "cron-expression", staticStyle: { "padding-top": "20px" } }, [t("p", { staticClass: "title" }, [e._v("Cron 表达式")]), t("div", { staticClass: "flex-row" }, [t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("秒")]), t("span", { staticClass: "field-value" }, [e._v(e._s(e.secondsText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v(" 分钟")]), t("span", { staticClass: "field-value" }, [e._v(e._s(e.minutesText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("小时")]), t("span", { staticClass: "field-value" }, [e._v(e._s(e.hoursText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("天")]), t("span", { staticClass: "field-value highlight" }, [e._v(e._s(e.daysText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("月")]), t("span", { staticClass: "field-value" }, [e._v(e._s(e.monthsText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("周")]), t("span", { staticClass: "field-value highlight" }, [e._v(e._s(e.quartz ? e.weeksTextQuartz : e.weeksText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("年")]), t("span", { staticClass: "field-value" }, [e._v(e._s(e.yearsText))])]), t("div", { staticClass: "flex-column flex-item", staticStyle: { padding: "0 10px" } }, [t("span", { staticClass: "field-name" }, [e._v("cron 完整表达式")]), t("span", { staticClass: "field-value", staticStyle: { width: "auto", cursor: "copy" }, on: { click: e.copyCron } }, [e._v(e._s(e.cron))])])])]), t("div", { staticClass: "cron-expression", staticStyle: { "margin-top": "10px" } }, [t("div", { staticStyle: { "margin-bottom": "10px" } }, [e._v("最近 5 次运行时间")]), e._l(e.runs, function(s) {
1175
- return t("ul", { key: s, staticStyle: { "padding-left": "18px" } }, [t("li", { staticStyle: { "margin-bottom": "4px" } }, [e._v(e._s(s))])]);
1176
- })], 2)]), t("div", { staticClass: "bottom" }, [t(H, { attrs: { type: "primary" }, on: { click: e.change } }, [e._v(e._s(e.text.Save))]), t(H, { attrs: { type: "primary" }, on: { click: e.close } }, [e._v(e._s(e.text.Close))])], 1)], 1);
1177
- }, ae = [], re = /* @__PURE__ */ q(
1178
- se,
1179
- ne,
1180
- ae,
1181
- !1,
1182
- null,
1183
- null
1184
- );
1185
- const ve = re.exports;
1186
- export {
1187
- ve as default
1188
- };
1
+ import { t as e } from "../chunks/VueCron.GfjodnyM.mjs";
2
+ export { e as default };