@king-design/vue 3.1.4-beta.1 → 3.1.4

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 (544) hide show
  1. package/__tests__/__snapshots__/Vue Next Demos.md +261 -255
  2. package/components/affix/index.d.ts +2 -2
  3. package/components/affix/index.js +0 -5
  4. package/components/affix/index.spec.js +84 -108
  5. package/components/affix/index.vdt.js +7 -10
  6. package/components/affix/styles.js +1 -1
  7. package/components/affix/useStyle.js +8 -19
  8. package/components/badge/index.js +0 -5
  9. package/components/badge/index.vdt.js +7 -11
  10. package/components/badge/styles.js +1 -3
  11. package/components/breadcrumb/index.js +0 -7
  12. package/components/breadcrumb/index.spec.js +6 -6
  13. package/components/breadcrumb/index.vdt.js +5 -14
  14. package/components/breadcrumb/item.js +0 -8
  15. package/components/breadcrumb/item.vdt.js +3 -6
  16. package/components/breadcrumb/styles.js +1 -4
  17. package/components/button/dynamicButton.d.ts +1 -1
  18. package/components/button/dynamicButton.js +2 -5
  19. package/components/button/group.js +2 -13
  20. package/components/button/group.vdt.js +5 -8
  21. package/components/button/index.js +3 -27
  22. package/components/button/index.spec.js +74 -96
  23. package/components/button/index.vdt.js +21 -31
  24. package/components/button/styles.d.ts +2 -2
  25. package/components/button/styles.js +8 -53
  26. package/components/card/column.js +0 -5
  27. package/components/card/column.vdt.js +5 -10
  28. package/components/card/index.js +0 -7
  29. package/components/card/index.vdt.js +5 -17
  30. package/components/card/styles.js +3 -6
  31. package/components/carousel/index.js +1 -19
  32. package/components/carousel/index.spec.js +127 -163
  33. package/components/carousel/index.vdt.js +12 -16
  34. package/components/carousel/item.js +0 -5
  35. package/components/carousel/item.vdt.js +4 -7
  36. package/components/carousel/styles.js +2 -3
  37. package/components/carousel/useAutoplay.js +0 -4
  38. package/components/carousel/useItems.js +4 -20
  39. package/components/carousel/useSlide.js +57 -89
  40. package/components/cascader/index.d.ts +1 -1
  41. package/components/cascader/index.js +3 -18
  42. package/components/cascader/index.spec.js +300 -377
  43. package/components/cascader/index.vdt.js +15 -33
  44. package/components/cascader/styles.js +2 -8
  45. package/components/cascader/useFields.js +1 -4
  46. package/components/cascader/useFilterable.js +2 -19
  47. package/components/cascader/useLabel.js +1 -9
  48. package/components/cascader/useLoad.js +22 -35
  49. package/components/cascader/useValue.d.ts +2 -2
  50. package/components/cascader/useValue.js +5 -26
  51. package/components/checkbox/index.js +5 -27
  52. package/components/checkbox/index.spec.js +129 -171
  53. package/components/checkbox/index.vdt.js +12 -16
  54. package/components/checkbox/styles.js +1 -13
  55. package/components/code/crossDomain.js +2 -9
  56. package/components/code/index.js +0 -9
  57. package/components/code/index.spec.js +46 -55
  58. package/components/code/index.vdt.js +6 -14
  59. package/components/code/styles.js +0 -1
  60. package/components/code/useEditor.js +5 -10
  61. package/components/collapse/index.d.ts +1 -1
  62. package/components/collapse/index.js +3 -17
  63. package/components/collapse/index.spec.js +47 -60
  64. package/components/collapse/index.vdt.js +4 -12
  65. package/components/collapse/item.js +0 -10
  66. package/components/collapse/item.vdt.js +7 -14
  67. package/components/collapse/styles.js +2 -5
  68. package/components/colorpicker/drag.js +0 -5
  69. package/components/colorpicker/index.js +0 -7
  70. package/components/colorpicker/index.spec.js +211 -259
  71. package/components/colorpicker/index.vdt.js +8 -11
  72. package/components/colorpicker/panel.js +0 -5
  73. package/components/colorpicker/panel.vdt.js +21 -26
  74. package/components/colorpicker/styles.js +4 -15
  75. package/components/colorpicker/useDrag.js +22 -26
  76. package/components/colorpicker/useInput.js +0 -16
  77. package/components/colorpicker/usePointer.js +15 -18
  78. package/components/colorpicker/useValue.js +2 -7
  79. package/components/config/index.js +3 -8
  80. package/components/config/index.spec.js +37 -50
  81. package/components/context.d.ts +2 -2
  82. package/components/context.js +2 -21
  83. package/components/copy/index.js +0 -7
  84. package/components/copy/index.spec.js +64 -86
  85. package/components/copy/index.vdt.js +4 -7
  86. package/components/copy/styles.js +0 -1
  87. package/components/copy/useCopy.js +13 -23
  88. package/components/datepicker/basepicker.d.ts +8 -8
  89. package/components/datepicker/basepicker.js +20 -90
  90. package/components/datepicker/calendar.js +0 -11
  91. package/components/datepicker/calendar.vdt.js +11 -15
  92. package/components/datepicker/constants.js +0 -1
  93. package/components/datepicker/dayjs.js +1 -1
  94. package/components/datepicker/helpers.js +3 -15
  95. package/components/datepicker/index.js +6 -32
  96. package/components/datepicker/index.spec.js +1154 -1464
  97. package/components/datepicker/index.vdt.js +20 -34
  98. package/components/datepicker/shortcuts.d.ts +1 -1
  99. package/components/datepicker/shortcuts.js +0 -4
  100. package/components/datepicker/styles.js +3 -12
  101. package/components/datepicker/time.d.ts +1 -1
  102. package/components/datepicker/time.js +3 -23
  103. package/components/datepicker/time.vdt.js +4 -5
  104. package/components/datepicker/useDays.js +2 -9
  105. package/components/datepicker/useDisabled.js +6 -23
  106. package/components/datepicker/useFocusDate.js +0 -2
  107. package/components/datepicker/useFormats.js +6 -15
  108. package/components/datepicker/useKeyboards.js +20 -36
  109. package/components/datepicker/useMonths.js +0 -6
  110. package/components/datepicker/usePanel.js +0 -10
  111. package/components/datepicker/useShowDate.js +10 -37
  112. package/components/datepicker/useStatus.js +3 -15
  113. package/components/datepicker/useValue.js +20 -38
  114. package/components/datepicker/useYears.js +4 -15
  115. package/components/diagram/diagram.js +17 -43
  116. package/components/diagram/diagram.vdt.js +2 -5
  117. package/components/diagram/graph.js +6 -6
  118. package/components/diagram/index.js +7 -7
  119. package/components/diagram/index.spec.js +369 -495
  120. package/components/diagram/layouts/circle.js +6 -14
  121. package/components/diagram/layouts/flow.js +7 -15
  122. package/components/diagram/layouts/layout.js +6 -28
  123. package/components/diagram/layouts/organic.js +3 -11
  124. package/components/diagram/layouts/partition.js +4 -12
  125. package/components/diagram/layouts/radial.js +6 -18
  126. package/components/diagram/layouts/stack.js +6 -14
  127. package/components/diagram/layouts/tree.js +11 -21
  128. package/components/diagram/mxgraph/handler/mxConnectionHandler.js +15 -22
  129. package/components/diagram/mxgraph/handler/mxConstraintHandler.js +4 -4
  130. package/components/diagram/mxgraph/handler/mxEdgeHandler.js +11 -15
  131. package/components/diagram/mxgraph/handler/mxGraphHandler.js +6 -9
  132. package/components/diagram/mxgraph/handler/mxRubberband.js +4 -4
  133. package/components/diagram/mxgraph/handler/mxVertexHandler.js +7 -10
  134. package/components/diagram/mxgraph/index.js +0 -2
  135. package/components/diagram/mxgraph/mx.js +3 -3
  136. package/components/diagram/mxgraph/shape/mxCloud.js +2 -2
  137. package/components/diagram/mxgraph/shape/mxCylinder.js +4 -9
  138. package/components/diagram/mxgraph/shape/mxEllipse.js +2 -2
  139. package/components/diagram/mxgraph/shape/mxHexagon.js +2 -2
  140. package/components/diagram/mxgraph/shape/mxLine.js +2 -2
  141. package/components/diagram/mxgraph/shape/mxRectangleShape.js +2 -2
  142. package/components/diagram/mxgraph/shape/mxRhombus.js +6 -12
  143. package/components/diagram/mxgraph/shape/mxShape.js +0 -1
  144. package/components/diagram/mxgraph/shape/mxTriangle.js +2 -2
  145. package/components/diagram/mxgraph/util/mxConstants.js +2 -2
  146. package/components/diagram/mxgraph/util/mxGuide.js +5 -7
  147. package/components/diagram/mxgraph/view/mxCellEditor.js +16 -29
  148. package/components/diagram/mxgraph/view/mxCellRenderer.js +0 -2
  149. package/components/diagram/mxgraph/view/mxGraph.js +14 -32
  150. package/components/diagram/shapes/base.d.ts +1 -1
  151. package/components/diagram/shapes/base.js +9 -39
  152. package/components/diagram/shapes/callout.js +10 -23
  153. package/components/diagram/shapes/circle.js +3 -10
  154. package/components/diagram/shapes/document.js +5 -16
  155. package/components/diagram/shapes/ellipse.js +0 -5
  156. package/components/diagram/shapes/generateShapes.d.ts +1 -1
  157. package/components/diagram/shapes/generateShapes.js +0 -9
  158. package/components/diagram/shapes/hexagon.js +9 -26
  159. package/components/diagram/shapes/image.js +1 -9
  160. package/components/diagram/shapes/line.d.ts +2 -2
  161. package/components/diagram/shapes/line.js +13 -48
  162. package/components/diagram/shapes/parallelogram.js +9 -26
  163. package/components/diagram/shapes/rectangle.js +1 -9
  164. package/components/diagram/shapes/shape.js +6 -35
  165. package/components/diagram/shapes/square.js +3 -11
  166. package/components/diagram/shapes/text.js +0 -5
  167. package/components/diagram/styles.js +0 -1
  168. package/components/dialog/alert.vdt.js +9 -20
  169. package/components/dialog/base.js +1 -29
  170. package/components/dialog/base.vdt.js +14 -31
  171. package/components/dialog/index.js +6 -31
  172. package/components/dialog/index.spec.js +456 -627
  173. package/components/dialog/staticMethods.d.ts +1 -1
  174. package/components/dialog/staticMethods.js +2 -13
  175. package/components/dialog/styles.js +3 -14
  176. package/components/dialog/useDraggable.js +0 -6
  177. package/components/dialog/useEscClosable.js +4 -12
  178. package/components/dialog/useFixBody.d.ts +1 -1
  179. package/components/dialog/useFixBody.js +0 -11
  180. package/components/dialog/usePosition.js +0 -5
  181. package/components/drawer/index.js +0 -5
  182. package/components/drawer/index.spec.js +128 -170
  183. package/components/drawer/index.vdt.js +3 -9
  184. package/components/drawer/styles.d.ts +2 -2
  185. package/components/drawer/styles.js +1 -4
  186. package/components/dropdown/dropdown.d.ts +2 -2
  187. package/components/dropdown/dropdown.js +39 -90
  188. package/components/dropdown/index.js +2 -6
  189. package/components/dropdown/index.spec.js +388 -496
  190. package/components/dropdown/item.js +4 -25
  191. package/components/dropdown/item.vdt.js +5 -8
  192. package/components/dropdown/menu.js +12 -29
  193. package/components/dropdown/menu.vdt.js +5 -13
  194. package/components/dropdown/styles.js +2 -11
  195. package/components/dropdown/useKeyboard.d.ts +2 -2
  196. package/components/dropdown/useKeyboard.js +8 -30
  197. package/components/dropdown/usePosition.d.ts +1 -1
  198. package/components/dropdown/usePosition.js +12 -21
  199. package/components/dropdown/useTransition.js +0 -8
  200. package/components/editable/index.d.ts +1 -1
  201. package/components/editable/index.js +4 -28
  202. package/components/editable/index.spec.js +152 -189
  203. package/components/editable/index.vdt.js +8 -11
  204. package/components/editable/styles.js +1 -2
  205. package/components/form/form.js +0 -18
  206. package/components/form/form.vdt.js +4 -7
  207. package/components/form/index.spec.js +1082 -1316
  208. package/components/form/item.d.ts +1 -1
  209. package/components/form/item.js +0 -12
  210. package/components/form/item.vdt.js +17 -31
  211. package/components/form/methods.d.ts +5 -5
  212. package/components/form/methods.js +2 -12
  213. package/components/form/styles.js +2 -10
  214. package/components/form/useDirty.js +2 -8
  215. package/components/form/useError.js +2 -10
  216. package/components/form/useValidate.d.ts +1 -1
  217. package/components/form/useValidate.js +8 -24
  218. package/components/grid/col.d.ts +3 -3
  219. package/components/grid/col.js +0 -7
  220. package/components/grid/col.vdt.js +8 -13
  221. package/components/grid/constants.d.ts +6 -6
  222. package/components/grid/row.js +0 -5
  223. package/components/grid/row.vdt.js +5 -8
  224. package/components/grid/styles.js +2 -8
  225. package/components/grid/useBreakpoints.js +0 -5
  226. package/components/grid/useGutter.js +9 -27
  227. package/components/icon/index.js +0 -10
  228. package/components/icon/index.vdt.js +8 -14
  229. package/components/icon/styles.js +1 -4
  230. package/components/input/index.d.ts +3 -3
  231. package/components/input/index.js +0 -13
  232. package/components/input/index.spec.js +185 -239
  233. package/components/input/index.vdt.js +46 -57
  234. package/components/input/search.js +0 -20
  235. package/components/input/search.vdt.js +6 -9
  236. package/components/input/styles.js +2 -29
  237. package/components/input/useAutoRows.js +6 -18
  238. package/components/input/useAutoWidth.js +0 -5
  239. package/components/input/useFocus.js +0 -2
  240. package/components/input/useFrozen.js +0 -6
  241. package/components/input/useShowPassword.js +2 -5
  242. package/components/layout/aside.js +6 -18
  243. package/components/layout/aside.vdt.js +5 -9
  244. package/components/layout/body.js +5 -18
  245. package/components/layout/footer.js +1 -10
  246. package/components/layout/header.js +9 -23
  247. package/components/layout/index.spec.js +24 -34
  248. package/components/layout/layout.js +9 -24
  249. package/components/layout/styles.js +6 -17
  250. package/components/layout/template.vdt.js +2 -4
  251. package/components/layout/useParse.js +0 -7
  252. package/components/menu/index.spec.js +189 -242
  253. package/components/menu/item.js +3 -16
  254. package/components/menu/item.vdt.js +22 -38
  255. package/components/menu/menu.js +2 -11
  256. package/components/menu/menu.vdt.js +6 -12
  257. package/components/menu/styles.js +4 -23
  258. package/components/menu/useDropdown.js +4 -10
  259. package/components/menu/useExpanded.js +0 -14
  260. package/components/menu/useHighlight.js +26 -36
  261. package/components/message/index.spec.js +58 -73
  262. package/components/message/message.js +0 -19
  263. package/components/message/message.vdt.js +6 -9
  264. package/components/message/messages.js +0 -12
  265. package/components/message/messages.vdt.js +0 -1
  266. package/components/message/styles.js +2 -11
  267. package/components/pagination/index.d.ts +1 -1
  268. package/components/pagination/index.js +10 -46
  269. package/components/pagination/index.spec.js +133 -173
  270. package/components/pagination/index.vdt.js +14 -32
  271. package/components/pagination/styles.js +3 -9
  272. package/components/popover/content.js +1 -5
  273. package/components/popover/content.vdt.js +4 -14
  274. package/components/popover/index.js +5 -10
  275. package/components/popover/index.spec.js +113 -150
  276. package/components/popover/styles.js +1 -1
  277. package/components/portal.d.ts +1 -1
  278. package/components/portal.js +2 -30
  279. package/components/position.d.ts +12 -12
  280. package/components/position.js +32 -88
  281. package/components/progress/index.d.ts +6 -6
  282. package/components/progress/index.js +0 -12
  283. package/components/progress/index.spec.js +143 -191
  284. package/components/progress/index.vdt.js +8 -17
  285. package/components/progress/styles.js +1 -7
  286. package/components/progress/useColor.js +2 -7
  287. package/components/progress/useStatus.d.ts +1 -1
  288. package/components/progress/useStatus.js +2 -5
  289. package/components/radio/index.js +3 -18
  290. package/components/radio/index.spec.js +111 -149
  291. package/components/radio/index.vdt.js +14 -17
  292. package/components/radio/styles.js +1 -13
  293. package/components/rate/index.js +0 -7
  294. package/components/rate/index.spec.js +64 -79
  295. package/components/rate/index.vdt.js +8 -21
  296. package/components/rate/styles.js +1 -4
  297. package/components/rate/useActiveValue.js +2 -7
  298. package/components/scrollSelect/index.d.ts +2 -2
  299. package/components/scrollSelect/index.js +0 -7
  300. package/components/scrollSelect/index.spec.js +100 -131
  301. package/components/scrollSelect/index.vdt.js +6 -12
  302. package/components/scrollSelect/styles.js +1 -8
  303. package/components/scrollSelect/useList.js +3 -17
  304. package/components/scrollSelect/useMouseEvents.js +31 -49
  305. package/components/scrollSelect/useTranslate.js +1 -11
  306. package/components/select/base.d.ts +2 -2
  307. package/components/select/base.js +3 -33
  308. package/components/select/base.vdt.js +27 -46
  309. package/components/select/group.js +0 -5
  310. package/components/select/group.vdt.js +4 -10
  311. package/components/select/index.spec.js +370 -464
  312. package/components/select/menu.js +0 -5
  313. package/components/select/menu.vdt.js +18 -33
  314. package/components/select/option.js +2 -16
  315. package/components/select/option.vdt.js +7 -14
  316. package/components/select/select.js +3 -20
  317. package/components/select/select.vdt.js +9 -17
  318. package/components/select/styles.js +3 -34
  319. package/components/select/useBaseLabel.d.ts +1 -1
  320. package/components/select/useBaseLabel.js +4 -17
  321. package/components/select/useCard.js +0 -4
  322. package/components/select/useDraggble.js +2 -2
  323. package/components/select/useEqualWidth.js +0 -1
  324. package/components/select/useFilterable.js +9 -27
  325. package/components/select/useFocusout.js +0 -8
  326. package/components/select/useInput.js +6 -10
  327. package/components/select/useLabel.js +3 -13
  328. package/components/select/useSearchable.js +0 -10
  329. package/components/skeleton/item.d.ts +1 -1
  330. package/components/skeleton/item.js +0 -7
  331. package/components/skeleton/item.vdt.js +1 -6
  332. package/components/skeleton/skeleton.js +0 -7
  333. package/components/skeleton/skeleton.vdt.js +6 -12
  334. package/components/skeleton/styles.d.ts +1 -1
  335. package/components/skeleton/styles.js +2 -3
  336. package/components/slider/index.d.ts +1 -1
  337. package/components/slider/index.js +0 -7
  338. package/components/slider/index.spec.js +502 -624
  339. package/components/slider/index.vdt.js +35 -50
  340. package/components/slider/styles.js +1 -19
  341. package/components/slider/useClick.js +2 -11
  342. package/components/slider/useDraggable.js +23 -34
  343. package/components/slider/useKeyboard.js +7 -18
  344. package/components/slider/useMarks.d.ts +5 -5
  345. package/components/slider/useMarks.js +5 -13
  346. package/components/slider/usePoints.d.ts +2 -2
  347. package/components/slider/usePoints.js +7 -21
  348. package/components/slider/useStyles.d.ts +1 -1
  349. package/components/slider/useStyles.js +5 -10
  350. package/components/slider/useTooltip.js +2 -10
  351. package/components/slider/useValue.d.ts +1 -1
  352. package/components/slider/useValue.js +7 -24
  353. package/components/spin/index.js +0 -7
  354. package/components/spin/index.vdt.js +4 -11
  355. package/components/spin/styles.js +1 -3
  356. package/components/spinner/index.d.ts +4 -4
  357. package/components/spinner/index.js +6 -18
  358. package/components/spinner/index.spec.js +359 -460
  359. package/components/spinner/index.vdt.js +12 -15
  360. package/components/spinner/styles.js +1 -11
  361. package/components/spinner/useChange.js +4 -16
  362. package/components/spinner/useFormatter.js +6 -16
  363. package/components/spinner/useStep.d.ts +3 -3
  364. package/components/spinner/useStep.js +2 -20
  365. package/components/spinner/useValue.js +14 -32
  366. package/components/split/index.js +0 -7
  367. package/components/split/index.spec.js +223 -267
  368. package/components/split/index.vdt.js +8 -17
  369. package/components/split/memo.js +0 -6
  370. package/components/split/styles.d.ts +1 -1
  371. package/components/split/styles.js +1 -9
  372. package/components/split/useDraggable.js +11 -35
  373. package/components/split/useSize.js +2 -5
  374. package/components/steps/index.js +2 -13
  375. package/components/steps/index.spec.js +21 -27
  376. package/components/steps/index.vdt.js +9 -12
  377. package/components/steps/step.js +0 -5
  378. package/components/steps/step.vdt.js +8 -12
  379. package/components/steps/styles.js +1 -38
  380. package/components/switch/index.js +2 -23
  381. package/components/switch/index.spec.js +194 -234
  382. package/components/switch/index.vdt.js +16 -32
  383. package/components/switch/styles.js +4 -12
  384. package/components/switch/useDraggable.js +10 -18
  385. package/components/table/cell.js +0 -9
  386. package/components/table/cell.vdt.js +14 -21
  387. package/components/table/column.d.ts +1 -1
  388. package/components/table/column.js +0 -5
  389. package/components/table/column.vdt.js +25 -37
  390. package/components/table/exportTable.js +46 -57
  391. package/components/table/index.spec.js +817 -1026
  392. package/components/table/row.d.ts +1 -1
  393. package/components/table/row.js +12 -44
  394. package/components/table/row.vdt.js +27 -38
  395. package/components/table/styles.js +2 -18
  396. package/components/table/table.d.ts +5 -5
  397. package/components/table/table.js +18 -50
  398. package/components/table/table.vdt.js +61 -86
  399. package/components/table/useChecked.d.ts +1 -1
  400. package/components/table/useChecked.js +20 -61
  401. package/components/table/useColumns.js +3 -16
  402. package/components/table/useDisableRow.js +2 -12
  403. package/components/table/useDraggable.js +4 -8
  404. package/components/table/useExpandable.js +2 -5
  405. package/components/table/useFixedColumns.d.ts +1 -1
  406. package/components/table/useFixedColumns.js +3 -20
  407. package/components/table/useGroup.d.ts +1 -1
  408. package/components/table/useGroup.js +7 -25
  409. package/components/table/useMerge.d.ts +4 -4
  410. package/components/table/useMerge.js +2 -14
  411. package/components/table/usePagination.js +4 -18
  412. package/components/table/useResetRowStatus.js +2 -6
  413. package/components/table/useResizable.js +4 -21
  414. package/components/table/useScroll.d.ts +1 -1
  415. package/components/table/useScroll.js +0 -3
  416. package/components/table/useSelected.js +2 -5
  417. package/components/table/useSortable.js +2 -8
  418. package/components/table/useStickyHeader.js +3 -7
  419. package/components/table/useStickyScrollbar.js +6 -16
  420. package/components/table/useTree.js +1 -12
  421. package/components/table/useWidth.js +14 -30
  422. package/components/tabs/index.js +29 -51
  423. package/components/tabs/index.spec.js +97 -129
  424. package/components/tabs/index.vdt.js +13 -16
  425. package/components/tabs/styles.js +1 -23
  426. package/components/tabs/tab.js +0 -10
  427. package/components/tabs/tab.vdt.js +6 -10
  428. package/components/tabs/useActiveBar.js +2 -11
  429. package/components/tabs/useScroll.js +10 -30
  430. package/components/tag/base.js +0 -11
  431. package/components/tag/index.js +2 -4
  432. package/components/tag/index.spec.js +123 -156
  433. package/components/tag/index.vdt.js +8 -15
  434. package/components/tag/styles.d.ts +1 -1
  435. package/components/tag/styles.js +2 -18
  436. package/components/tag/tags.d.ts +2 -2
  437. package/components/tag/tags.js +0 -7
  438. package/components/tag/tags.vdt.js +10 -18
  439. package/components/tag/useChildren.js +0 -5
  440. package/components/tag/useDraggable.js +6 -15
  441. package/components/tag/useNowrap.js +10 -27
  442. package/components/timeline/item.js +0 -7
  443. package/components/timeline/item.vdt.js +4 -9
  444. package/components/timeline/styles.d.ts +2 -2
  445. package/components/timeline/styles.js +2 -6
  446. package/components/timeline/timeline.js +0 -5
  447. package/components/timeline/timeline.vdt.js +2 -5
  448. package/components/timepicker/index.js +2 -7
  449. package/components/timepicker/index.spec.js +293 -368
  450. package/components/timepicker/panelPicker.js +2 -11
  451. package/components/timepicker/panelPicker.vdt.js +14 -24
  452. package/components/timepicker/selectPicker.js +0 -5
  453. package/components/timepicker/selectPicker.vdt.js +5 -10
  454. package/components/timepicker/styles.js +1 -2
  455. package/components/timepicker/useDisabled.js +2 -4
  456. package/components/timepicker/useFormats.js +4 -13
  457. package/components/timepicker/useStep.d.ts +1 -1
  458. package/components/timepicker/useStep.js +8 -17
  459. package/components/timepicker/useValue.js +16 -21
  460. package/components/tip/index.js +0 -2
  461. package/components/tip/index.vdt.js +5 -17
  462. package/components/tip/styles.js +1 -4
  463. package/components/tooltip/content.js +0 -28
  464. package/components/tooltip/content.vdt.js +15 -27
  465. package/components/tooltip/index.js +3 -7
  466. package/components/tooltip/index.spec.js +400 -527
  467. package/components/tooltip/styles.d.ts +1 -1
  468. package/components/tooltip/styles.js +3 -13
  469. package/components/tooltip/tooltip.js +2 -15
  470. package/components/tooltip/useArrow.js +11 -14
  471. package/components/transfer/index.d.ts +1 -1
  472. package/components/transfer/index.js +1 -13
  473. package/components/transfer/index.spec.js +159 -194
  474. package/components/transfer/index.vdt.js +17 -36
  475. package/components/transfer/styles.js +1 -11
  476. package/components/transfer/useCheck.d.ts +1 -1
  477. package/components/transfer/useCheck.js +1 -16
  478. package/components/transfer/useFilter.d.ts +1 -1
  479. package/components/transfer/useFilter.js +9 -30
  480. package/components/transfer/useTransfer.js +10 -26
  481. package/components/tree/index.d.ts +3 -3
  482. package/components/tree/index.js +3 -22
  483. package/components/tree/index.spec.js +310 -388
  484. package/components/tree/index.vdt.js +12 -24
  485. package/components/tree/styles.js +3 -17
  486. package/components/tree/useChecked.js +3 -27
  487. package/components/tree/useDraggable.js +14 -44
  488. package/components/tree/useExpanded.js +28 -46
  489. package/components/tree/useFilter.js +3 -10
  490. package/components/tree/useNodes.d.ts +3 -3
  491. package/components/tree/useNodes.js +0 -4
  492. package/components/tree/useSelected.js +21 -38
  493. package/components/tree/useTransitionEvent.js +3 -5
  494. package/components/treeSelect/index.js +9 -37
  495. package/components/treeSelect/index.spec.js +123 -160
  496. package/components/treeSelect/index.vdt.js +14 -20
  497. package/components/treeSelect/styles.js +1 -2
  498. package/components/treeSelect/useValue.js +0 -11
  499. package/components/types.d.ts +3 -3
  500. package/components/upload/ajaxUploader.d.ts +1 -1
  501. package/components/upload/ajaxUploader.js +0 -17
  502. package/components/upload/index.d.ts +4 -4
  503. package/components/upload/index.js +0 -14
  504. package/components/upload/index.spec.js +142 -248
  505. package/components/upload/index.vdt.js +12 -28
  506. package/components/upload/styles.js +2 -28
  507. package/components/upload/useAccept.js +2 -10
  508. package/components/upload/useDrag.js +0 -7
  509. package/components/upload/useFiles.js +103 -148
  510. package/components/upload/useShowImage.js +0 -3
  511. package/components/upload/useUpload.js +47 -69
  512. package/components/utils.d.ts +6 -6
  513. package/components/utils.js +12 -56
  514. package/components/virtual.js +9 -37
  515. package/components/wave/index.js +5 -32
  516. package/components/wave/styles.js +1 -1
  517. package/hooks/useDelayClose.js +2 -7
  518. package/hooks/useDocumentClick.js +8 -16
  519. package/hooks/useDraggable.d.ts +1 -1
  520. package/hooks/useDraggable.js +0 -9
  521. package/hooks/useKeyboard.d.ts +3 -3
  522. package/hooks/useKeyboard.js +0 -10
  523. package/hooks/useMouseOutsidable.js +0 -8
  524. package/hooks/useReceive.d.ts +1 -1
  525. package/hooks/useReceive.js +0 -4
  526. package/hooks/useRecordComponent.js +0 -6
  527. package/hooks/useResizeObserver.js +0 -2
  528. package/hooks/useRouter.js +7 -18
  529. package/hooks/useShowHideEvents.js +0 -3
  530. package/hooks/useState.d.ts +2 -2
  531. package/hooks/useState.js +2 -6
  532. package/i18n/en-US.js +0 -1
  533. package/i18n/index.d.ts +1 -1
  534. package/i18n/index.js +0 -7
  535. package/index.d.ts +2 -2
  536. package/index.js +2 -3
  537. package/package.json +2 -2
  538. package/styles/global.js +2 -5
  539. package/styles/keyframes.js +0 -1
  540. package/styles/theme.d.ts +1 -1
  541. package/styles/theme.js +2 -5
  542. package/styles/utils.d.ts +1 -1
  543. package/styles/utils.js +3 -17
  544. package/yarn-error.log +517 -633
@@ -1,23 +1,20 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxGraphHandler = mx.mxGraphHandler;
4
- mxGraphHandler.prototype.maxLivePreview = 16; // Enables guides
5
-
6
- mxGraphHandler.prototype.guidesEnabled = true; // Removes parents where all child cells are moved out
7
-
8
- mxGraphHandler.prototype.removeEmptyParents = true; // Select descendant if we select unselectable children
9
-
4
+ mxGraphHandler.prototype.maxLivePreview = 16;
5
+ // Enables guides
6
+ mxGraphHandler.prototype.guidesEnabled = true;
7
+ // Removes parents where all child cells are moved out
8
+ mxGraphHandler.prototype.removeEmptyParents = true;
9
+ // Select descendant if we select unselectable children
10
10
  var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent;
11
-
12
11
  mxGraphHandler.prototype.getInitialCellForEvent = function () {
13
12
  var graph = this.graph;
14
13
  var model = graph.getModel();
15
14
  var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments);
16
-
17
15
  while (!graph.isCellSelectable(cell) && model.isVertex(cell)) {
18
16
  cell = model.getParent(cell);
19
17
  }
20
-
21
18
  return cell;
22
19
  };
23
20
  }
@@ -1,8 +1,8 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
- var mxRubberband = mx.mxRubberband; // Enables fading of rubberband
4
-
5
- mxRubberband.prototype.fadeOut = true; // Increases default rubberband opacity (default is 20)
6
-
3
+ var mxRubberband = mx.mxRubberband;
4
+ // Enables fading of rubberband
5
+ mxRubberband.prototype.fadeOut = true;
6
+ // Increases default rubberband opacity (default is 20)
7
7
  mxRubberband.prototype.defaultOpacity = 30;
8
8
  }
@@ -3,27 +3,24 @@ import '../util/mxConstants';
3
3
  var mainHandle;
4
4
  export default function () {
5
5
  var mxVertexHandler = mx.mxVertexHandler,
6
- mxImage = mx.mxImage,
7
- mxConstants = mx.mxConstants,
8
- mxEvent = mx.mxEvent;
9
- mainHandle = createSvgImage(18, 18, "<circle cx=\"9\" cy=\"9\" r=\"5\" stroke=\"#fff\" fill=\"" + mxConstants.HANDLE_FILLCOLOR + "\" stroke-width=\"1\"/>"); // set sizer shape
10
-
6
+ mxImage = mx.mxImage,
7
+ mxConstants = mx.mxConstants,
8
+ mxEvent = mx.mxEvent;
9
+ mainHandle = createSvgImage(18, 18, "<circle cx=\"9\" cy=\"9\" r=\"5\" stroke=\"#fff\" fill=\"" + mxConstants.HANDLE_FILLCOLOR + "\" stroke-width=\"1\"/>");
10
+ // set sizer shape
11
11
  var rotationHandle = new mxImage('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAVCAYAAACkCdXRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4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B7C93DylCtdM8qABhLc5TumV6KQigUeubjfwcAHkQJ94ndWeYAAAAASUVORK5CYII=', 19, 21);
12
12
  var secondaryHandle = createSvgImage(16, 16, '<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');
13
13
  mxVertexHandler.prototype.rotationEnabled = true;
14
14
  mxVertexHandler.prototype.handleImage = mainHandle;
15
15
  mxVertexHandler.prototype.secondaryHandle = secondaryHandle;
16
16
  var createSizerShape = mxVertexHandler.prototype.createSizerShape;
17
-
18
17
  mxVertexHandler.prototype.createSizerShape = function (bounds, index, fillColor) {
19
18
  if (index === mxEvent.ROTATION_HANDLE) {
20
19
  this.handleImage = rotationHandle;
21
20
  }
22
-
23
21
  return createSizerShape.apply(this, arguments);
24
- }; // Adds rotation handle and live preview
25
-
26
-
22
+ };
23
+ // Adds rotation handle and live preview
27
24
  mxVertexHandler.prototype.manageSizers = true;
28
25
  mxVertexHandler.prototype.livePreview = true;
29
26
  }
@@ -20,7 +20,6 @@ import mxConstraintHandlerSetup from './handler/mxConstraintHandler';
20
20
  import mxEdgeHandlerSetup from './handler/mxEdgeHandler';
21
21
  import mxGraphHandlerSetup from './handler/mxGraphHandler';
22
22
  import mxRubberbandSetup from './handler/mxRubberband';
23
-
24
23
  if (hasDocumentAvailable) {
25
24
  mxConstantsSetup();
26
25
  mxGuideSetup();
@@ -43,5 +42,4 @@ if (hasDocumentAvailable) {
43
42
  mxGraphHandlerSetup();
44
43
  mxRubberbandSetup();
45
44
  }
46
-
47
45
  export default mx;
@@ -1,12 +1,12 @@
1
1
  import mx from 'mxgraphx';
2
- import { hasDocumentAvailable } from 'intact-shared'; // only support running in browser
3
-
2
+ import { hasDocumentAvailable } from 'intact-shared';
3
+ // only support running in browser
4
4
  var doll = hasDocumentAvailable ? mx({
5
5
  mxLoadResources: false,
6
6
  mxLoadStylesheets: false
7
7
  }) : {};
8
8
  var mxImage = doll.mxImage,
9
- mxLog = doll.mxLog;
9
+ mxLog = doll.mxLog;
10
10
  export default doll;
11
11
  export function createSvgImage(w, h, data) {
12
12
  var tmp = unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' + '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="' + w + 'px" height="' + h + 'px" ' + 'version="1.1">' + data + '</svg>'));
@@ -1,7 +1,7 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxCloud = mx.mxCloud,
4
- mxConnectionConstraint = mx.mxConnectionConstraint,
5
- mxPoint = mx.mxPoint;
4
+ mxConnectionConstraint = mx.mxConnectionConstraint,
5
+ mxPoint = mx.mxPoint;
6
6
  mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false), new mxConnectionConstraint(new mxPoint(0.4, 0.1), false), new mxConnectionConstraint(new mxPoint(0.16, 0.55), false), new mxConnectionConstraint(new mxPoint(0.07, 0.4), false), new mxConnectionConstraint(new mxPoint(0.31, 0.8), false), new mxConnectionConstraint(new mxPoint(0.13, 0.77), false), new mxConnectionConstraint(new mxPoint(0.8, 0.8), false), new mxConnectionConstraint(new mxPoint(0.55, 0.95), false), new mxConnectionConstraint(new mxPoint(0.875, 0.5), false), new mxConnectionConstraint(new mxPoint(0.96, 0.7), false), new mxConnectionConstraint(new mxPoint(0.625, 0.2), false), new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)];
7
7
  }
@@ -1,30 +1,25 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxCylinder = mx.mxCylinder,
4
- mxUtils = mx.mxUtils,
5
- mxRectangle = mx.mxRectangle,
6
- mxConnectionConstraint = mx.mxConnectionConstraint,
7
- mxPoint = mx.mxPoint;
4
+ mxUtils = mx.mxUtils,
5
+ mxRectangle = mx.mxRectangle,
6
+ mxConnectionConstraint = mx.mxConnectionConstraint,
7
+ mxPoint = mx.mxPoint;
8
8
  var cylinderGetCylinderSize = mxCylinder.prototype.getCylinderSize;
9
-
10
9
  mxCylinder.prototype.getCylinderSize = function (x, y, w, h) {
11
10
  var size = mxUtils.getValue(this.style, 'size');
12
-
13
11
  if (size != null) {
14
12
  return h * Math.max(0, Math.min(1, size));
15
13
  } else {
16
14
  return cylinderGetCylinderSize.apply(this, arguments);
17
15
  }
18
16
  };
19
-
20
17
  mxCylinder.prototype.getLabelMargins = function (rect) {
21
18
  if (mxUtils.getValue(this.style, 'boundedLbl', false)) {
22
19
  var size = mxUtils.getValue(this.style, 'size', 0.15) * 2;
23
20
  return new mxRectangle(0, Math.min(this.maxHeight * this.scale, rect.height * size), 0, 0);
24
21
  }
25
-
26
22
  return null;
27
23
  };
28
-
29
24
  mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false), new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.85, 0.05), false), new mxConnectionConstraint(new mxPoint(0, 0.3), true), new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(0, 0.7), true), new mxConnectionConstraint(new mxPoint(1, 0.3), true), new mxConnectionConstraint(new mxPoint(1, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.7), true), new mxConnectionConstraint(new mxPoint(0.15, 0.95), false), new mxConnectionConstraint(new mxPoint(0.5, 1), true), new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)];
30
25
  }
@@ -1,7 +1,7 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxEllipse = mx.mxEllipse,
4
- mxConnectionConstraint = mx.mxConnectionConstraint,
5
- mxPoint = mx.mxPoint;
4
+ mxConnectionConstraint = mx.mxConnectionConstraint,
5
+ mxPoint = mx.mxPoint;
6
6
  mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true), new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true), new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true), new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxHexagon = mx.mxHexagon,
4
- mxConnectionConstraint = mx.mxConnectionConstraint,
5
- mxPoint = mx.mxPoint;
4
+ mxConnectionConstraint = mx.mxConnectionConstraint,
5
+ mxPoint = mx.mxPoint;
6
6
  mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.625, 0), true), new mxConnectionConstraint(new mxPoint(0, 0.25), true), new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(0, 0.75), true), new mxConnectionConstraint(new mxPoint(1, 0.25), true), new mxConnectionConstraint(new mxPoint(1, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.75), true), new mxConnectionConstraint(new mxPoint(0.375, 1), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true), new mxConnectionConstraint(new mxPoint(0.625, 1), true)];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxLine = mx.mxLine,
4
- mxConnectionConstraint = mx.mxConnectionConstraint,
5
- mxPoint = mx.mxPoint;
4
+ mxConnectionConstraint = mx.mxConnectionConstraint,
5
+ mxPoint = mx.mxPoint;
6
6
  mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false), new mxConnectionConstraint(new mxPoint(0.25, 0.5), false), new mxConnectionConstraint(new mxPoint(0.75, 0.5), false), new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxRectangleShape = mx.mxRectangleShape,
4
- mxConnectionConstraint = mx.mxConnectionConstraint,
5
- mxPoint = mx.mxPoint;
4
+ mxConnectionConstraint = mx.mxConnectionConstraint,
5
+ mxPoint = mx.mxPoint;
6
6
  mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.75, 0), true), new mxConnectionConstraint(new mxPoint(0, 0.25), true), new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(0, 0.75), true), new mxConnectionConstraint(new mxPoint(1, 0.25), true), new mxConnectionConstraint(new mxPoint(1, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.75), true), new mxConnectionConstraint(new mxPoint(0.25, 1), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true), new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
7
7
  }
@@ -1,39 +1,33 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxRhombus = mx.mxRhombus,
4
- mxConstants = mx.mxConstants,
5
- mxRectangle = mx.mxRectangle,
6
- mxEllipse = mx.mxEllipse; // Overrides painting of rhombus shape to allow for double style
7
-
4
+ mxConstants = mx.mxConstants,
5
+ mxRectangle = mx.mxRectangle,
6
+ mxEllipse = mx.mxEllipse;
7
+ // Overrides painting of rhombus shape to allow for double style
8
8
  var mxRhombusPaintVertexShape = mxRhombus.prototype.paintVertexShape;
9
-
10
9
  mxRhombus.prototype.getLabelBounds = function (rect) {
11
10
  if (this.style['double'] == 1) {
12
11
  var margin = (Math.max(2, this.strokewidth + 1) * 2 + parseFloat(this.style[mxConstants.STYLE_MARGIN] || 0)) * this.scale;
13
12
  return new mxRectangle(rect.x + margin, rect.y + margin, rect.width - 2 * margin, rect.height - 2 * margin);
14
13
  }
15
-
16
14
  return rect;
17
15
  };
18
-
19
16
  mxRhombus.prototype.paintVertexShape = function (c, x, y, w, h) {
20
17
  mxRhombusPaintVertexShape.apply(this, arguments);
21
-
22
18
  if (!this.outline && this.style['double'] == 1) {
23
19
  var margin = Math.max(2, this.strokewidth + 1) * 2 + parseFloat(this.style[mxConstants.STYLE_MARGIN] || 0);
24
20
  x += margin;
25
21
  y += margin;
26
22
  w -= 2 * margin;
27
23
  h -= 2 * margin;
28
-
29
24
  if (w > 0 && h > 0) {
30
- c.setShadow(false); // Workaround for closure compiler bug where the lines with x and y above
25
+ c.setShadow(false);
26
+ // Workaround for closure compiler bug where the lines with x and y above
31
27
  // are removed if arguments is used as second argument in call below.
32
-
33
28
  mxRhombusPaintVertexShape.apply(this, [c, x, y, w, h]);
34
29
  }
35
30
  }
36
31
  };
37
-
38
32
  mxRhombus.prototype.constraints = mxEllipse.prototype.constraints;
39
33
  }
@@ -1,7 +1,6 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxShape = mx.mxShape;
4
-
5
4
  mxShape.prototype.getConstraints = function () {
6
5
  return null;
7
6
  };
@@ -1,7 +1,7 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxTriangle = mx.mxTriangle,
4
- mxConnectionConstraint = mx.mxConnectionConstraint,
5
- mxPoint = mx.mxPoint;
4
+ mxConnectionConstraint = mx.mxConnectionConstraint,
5
+ mxPoint = mx.mxPoint;
6
6
  mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true), new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(0, 0.75), true), new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true), new mxConnectionConstraint(new mxPoint(1, 0.5), true)];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
- var mxConstants = mx.mxConstants; // Sets colors for handles
4
-
3
+ var mxConstants = mx.mxConstants;
4
+ // Sets colors for handles
5
5
  mxConstants.HANDLE_FILLCOLOR = '#29b6f2';
6
6
  mxConstants.HANDLE_STROKECOLOR = '#0088cf';
7
7
  mxConstants.VERTEX_SELECTION_COLOR = '#00a8ff';
@@ -1,19 +1,17 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxGuide = mx.mxGuide,
4
- mxPolyline = mx.mxPolyline,
5
- mxConstants = mx.mxConstants,
6
- mxEvent = mx.mxEvent;
4
+ mxPolyline = mx.mxPolyline,
5
+ mxConstants = mx.mxConstants,
6
+ mxEvent = mx.mxEvent;
7
7
  /**
8
8
  * No dashed shapes.
9
9
  */
10
-
11
10
  mxGuide.prototype.createGuideShape = function () {
12
11
  var guide = new mxPolyline([], mxConstants.GUIDE_COLOR, mxConstants.GUIDE_STROKEWIDTH);
13
12
  return guide;
14
- }; // Alt disables guides
15
-
16
-
13
+ };
14
+ // Alt disables guides
17
15
  mxGuide.prototype.isEnabledForEvent = function (evt) {
18
16
  return !mxEvent.isAltDown(evt);
19
17
  };
@@ -1,8 +1,8 @@
1
1
  import mx from '../mx';
2
2
  export default function () {
3
3
  var mxCellEditor = mx.mxCellEditor,
4
- mxUtils = mx.mxUtils,
5
- mxClient = mx.mxClient;
4
+ mxUtils = mx.mxUtils,
5
+ mxClient = mx.mxClient;
6
6
  mxCellEditor.prototype.blurEnabled = true;
7
7
  /**
8
8
  * HTML in-place editor
@@ -11,58 +11,49 @@ export default function () {
11
11
  // var state = this.graph.view.getState(this.editingCell);
12
12
  // return state != null && state.style['html'] == 1;
13
13
  // };
14
-
15
14
  var mxCellEditorGetInitialValue = mxCellEditor.prototype.getInitialValue;
16
-
17
15
  mxCellEditor.prototype.getInitialValue = function (state, trigger) {
18
16
  if (mxUtils.getValue(state.style, 'html', '0') == '0') {
19
17
  return mxCellEditorGetInitialValue.apply(this, arguments);
20
18
  } else {
21
19
  var result = this.graph.getEditingValue(state.cell, trigger);
22
-
23
20
  if (mxUtils.getValue(state.style, 'nl2Br', '1') == '1') {
24
21
  result = result.replace(/\n/g, '<br/>');
25
- } // result = this.graph.sanitizeHtml(result, true);
26
-
27
-
22
+ }
23
+ // result = this.graph.sanitizeHtml(result, true);
28
24
  return result;
29
25
  }
30
26
  };
31
27
  /**
32
28
  * HTML in-place editor
33
29
  */
34
-
35
-
36
30
  mxCellEditor.prototype.escapeCancelsEditing = false;
37
31
  var mxCellEditorStartEditing = mxCellEditor.prototype.startEditing;
38
-
39
32
  mxCellEditor.prototype.startEditing = function (cell, trigger) {
40
- mxCellEditorStartEditing.apply(this, arguments); // Overrides class in case of HTML content to add
33
+ mxCellEditorStartEditing.apply(this, arguments);
34
+ // Overrides class in case of HTML content to add
41
35
  // dashed borders for divs and table cells
42
-
43
36
  var state = this.graph.view.getState(cell);
44
-
45
37
  if (state != null && state.style['html'] == 1) {
46
38
  this.textarea.className = 'mxCellEditor';
47
39
  } else {
48
40
  this.textarea.className = 'mxCellEditor mxPlainTextEditor';
49
- } // Toggles markup vs wysiwyg mode
50
-
51
-
52
- this.codeViewMode = false; // Stores current selection range when switching between markup and code
53
-
54
- this.switchSelectionState = null; // Selects editing cell
55
-
56
- this.graph.setSelectionCell(cell); // Enables focus outline for edges and edge labels
57
-
41
+ }
42
+ // Toggles markup vs wysiwyg mode
43
+ this.codeViewMode = false;
44
+ // Stores current selection range when switching between markup and code
45
+ this.switchSelectionState = null;
46
+ // Selects editing cell
47
+ this.graph.setSelectionCell(cell);
48
+ // Enables focus outline for edges and edge labels
58
49
  var parent = this.graph.getModel().getParent(cell);
59
50
  var geo = this.graph.getCellGeometry(cell);
60
-
61
51
  if (this.graph.getModel().isEdge(parent) && geo != null && geo.relative || this.graph.getModel().isEdge(cell)) {
62
52
  // Quirks does not support outline at all so use border instead
63
53
  if (mxClient.IS_QUIRKS) {
64
54
  this.textarea.style.border = 'gray dotted 1px';
65
- } // IE>8 and FF on Windows uses outline default of none
55
+ }
56
+ // IE>8 and FF on Windows uses outline default of none
66
57
  else if (mxClient.IS_IE || mxClient.IS_IE11 || mxClient.IS_FF && mxClient.IS_WIN) {
67
58
  this.textarea.style.outline = 'gray dotted 1px';
68
59
  } else {
@@ -73,21 +64,17 @@ export default function () {
73
64
  this.textarea.style.border = '';
74
65
  }
75
66
  };
76
-
77
67
  var mxCellEditorGetCurrentValue = mxCellEditor.prototype.getCurrentValue;
78
-
79
68
  mxCellEditor.prototype.getCurrentValue = function (state) {
80
69
  if (mxUtils.getValue(state.style, 'html', '0') == '0') {
81
70
  return mxCellEditorGetCurrentValue.apply(this, arguments);
82
71
  } else {
83
72
  var result = this.textarea.innerHTML;
84
-
85
73
  if (mxUtils.getValue(state.style, 'nl2Br', '1') == '1') {
86
74
  result = result.replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>');
87
75
  } else {
88
76
  result = result.replace(/\r\n/g, '').replace(/\n/g, '');
89
77
  }
90
-
91
78
  return result;
92
79
  }
93
80
  };
@@ -4,9 +4,7 @@ export default function () {
4
4
  /**
5
5
  * support render DOM as label
6
6
  */
7
-
8
7
  var getLabelValue = mxCellRenderer.prototype.getLabelValue;
9
-
10
8
  mxCellRenderer.prototype.getLabelValue = function (state) {
11
9
  return state.cell.value;
12
10
  };
@@ -1,21 +1,21 @@
1
- import mx from '../mx'; // import expandedImage from 'mxgraphx/javascript/src/images/expanded.gif';
1
+ import mx from '../mx';
2
+ // import expandedImage from 'mxgraphx/javascript/src/images/expanded.gif';
2
3
  // import collapsedImage from 'mxgraphx/javascript/src/images/collapsed.gif';
3
-
4
4
  export default function () {
5
5
  var mxGraph = mx.mxGraph,
6
- mxConstants = mx.mxConstants,
7
- mxUtils = mx.mxUtils,
8
- mxConnectionConstraint = mx.mxConnectionConstraint,
9
- mxPoint = mx.mxPoint,
10
- mxRectangle = mx.mxRectangle,
11
- mxImage = mx.mxImage;
6
+ mxConstants = mx.mxConstants,
7
+ mxUtils = mx.mxUtils,
8
+ mxConnectionConstraint = mx.mxConnectionConstraint,
9
+ mxPoint = mx.mxPoint,
10
+ mxRectangle = mx.mxRectangle,
11
+ mxImage = mx.mxImage;
12
12
  var expandedImage = "data:image/gif;base64,R0lGODlhCQAJAPcAAAAAAHuUrXuctYSMlISUnISUpYSUrYScpYScrYSctYyUnIyUpZScnJScpaXG3q21va29xq3G1q3G3rW9xr3GzsbGxsbOzsbO1sbO3sbW1s7W1tbe597e3t7n597v9+fn3ufv9+fv/+f3/+/v7+/v9+/39+////f37/f39/f/////9////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////ywAAAAACQAJAAAIUwAdBChAoMGAAQQiJBBhwkSKhyYKIBCRAgSKFSk8EASRYsUJFCM0KkgBoGTJDQUYkBjB8kOHCwUGbOCgoQKHCjAXYIAwYcKDCRAKRChAlCDRCAEBADs=";
13
- var collapsedImage = "data:image/gif;base64,R0lGODlhCQAJAPcAAAAAABAICHuUrXuctYSMlISUnISUpYSUrYScrYyUnIyUpYycpZScnJScpaXG3q3G1q3G3rW1vbW9xrW9zsbGzsbO3sbW3s7Oztbe3tbe597e3t7e597n7+fn7+/v7+/3/+////f39/f//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////ywAAAAACQAJAAAIUgAdCDBQoAADAgseCADBUIRDEAYMgPggAkCIDx8QKMA4AsCIEBwKEKgIIAAAABgMMNjgwYNFDRYMEOCAQQOACxQqFFBQQUIEnz8NPIhINOKDgAAAOw=="; // Adds support for HTML labels via style. Note: Currently, only the Java
13
+ var collapsedImage = "data:image/gif;base64,R0lGODlhCQAJAPcAAAAAABAICHuUrXuctYSMlISUnISUpYSUrYScrYyUnIyUpYycpZScnJScpaXG3q3G1q3G3rW1vbW9xrW9zsbGzsbO3sbW3s7Oztbe3tbe597e3t7e597n7+fn7+/v7+/3/+////f39/f//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////ywAAAAACQAJAAAIUgAdCDBQoAADAgseCADBUIRDEAYMgPggAkCIDx8QKMA4AsCIEBwKEKgIIAAAABgMMNjgwYNFDRYMEOCAQQOACxQqFFBQQUIEnz8NPIhINOKDgAAAOw==";
14
+ // Adds support for HTML labels via style. Note: Currently, only the Java
14
15
  // backend supports HTML labels but CSS support is limited to the following:
15
16
  // http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
16
17
  // TODO: Wrap should not affect isHtmlLabel output (should be handled later)
17
18
  // const isHtmlLabel = mxGraph.prototype.isHtmlLabel;
18
-
19
19
  mxGraph.prototype.isHtmlLabel = function (cell) {
20
20
  var state = this.view.getState(cell);
21
21
  var style = state != null ? state.style : this.getCellStyle(cell);
@@ -24,27 +24,22 @@ export default function () {
24
24
  /**
25
25
  * Overrides method to provide connection constraints for shapes.
26
26
  */
27
-
28
-
29
27
  mxGraph.prototype.getAllConnectionConstraints = function (terminal, source) {
30
28
  if (terminal != null) {
31
29
  var constraints = mxUtils.getValue(terminal.style, 'points', null);
32
-
33
30
  if (constraints != null) {
34
31
  // Requires an array of arrays with x, y (0..1), an optional
35
32
  // [perimeter (0 or 1), dx, and dy] eg. points=[[0,0,1,-10,10],[0,1,0],[1,1]]
36
33
  var result = [];
37
-
38
34
  try {
39
35
  var c = JSON.parse(constraints);
40
-
41
36
  for (var i = 0; i < c.length; i++) {
42
37
  var tmp = c[i];
43
38
  result.push(new mxConnectionConstraint(new mxPoint(tmp[0], tmp[1]), tmp.length > 2 ? tmp[2] != '0' : true, null, tmp.length > 3 ? tmp[3] : 0, tmp.length > 4 ? tmp[4] : 0));
44
39
  }
45
- } catch (e) {// ignore
40
+ } catch (e) {
41
+ // ignore
46
42
  }
47
-
48
43
  return result;
49
44
  } else if (terminal.shape != null && terminal.shape.bounds != null) {
50
45
  var dir = terminal.shape.direction;
@@ -52,15 +47,12 @@ export default function () {
52
47
  var scale = terminal.shape.scale;
53
48
  var w = bounds.width / scale;
54
49
  var h = bounds.height / scale;
55
-
56
50
  if (dir == mxConstants.DIRECTION_NORTH || dir == mxConstants.DIRECTION_SOUTH) {
57
51
  var tmp = w;
58
52
  w = h;
59
53
  h = tmp;
60
54
  }
61
-
62
55
  constraints = terminal.shape.getConstraints(terminal.style, w, h);
63
-
64
56
  if (constraints != null) {
65
57
  return constraints;
66
58
  } else if (terminal.shape.stencil != null && terminal.shape.stencil.constraints != null) {
@@ -70,14 +62,11 @@ export default function () {
70
62
  }
71
63
  }
72
64
  }
73
-
74
65
  return null;
75
66
  };
76
67
  /**
77
68
  * Returns a point that specifies the location for inserting cells.
78
69
  */
79
-
80
-
81
70
  mxGraph.prototype.getInsertPoint = function () {
82
71
  var gs = this.getGridSize();
83
72
  var dx = this.container.scrollLeft / this.view.scale - this.view.translate.x;
@@ -88,12 +77,11 @@ export default function () {
88
77
  dy = Math.max(dy, layout.y * page.height);
89
78
  return new mxPoint(this.snap(dx + gs), this.snap(dy + gs));
90
79
  };
91
-
92
80
  mxGraph.prototype.getFreeInsertPoint = function () {
93
81
  var view = this.view;
94
82
  var bds = this.getGraphBounds();
95
- var pt = this.getInsertPoint(); // Places at same x-coord and 2 grid sizes below existing graph
96
-
83
+ var pt = this.getInsertPoint();
84
+ // Places at same x-coord and 2 grid sizes below existing graph
97
85
  var x = this.snap(Math.round(Math.max(pt.x, bds.x / view.scale - view.translate.x + (bds.width == 0 ? 2 * this.gridSize : 0))));
98
86
  var y = this.snap(Math.round(Math.max(pt.y, (bds.y + bds.height) / view.scale - view.translate.y + 2 * this.gridSize)));
99
87
  return new mxPoint(x, y);
@@ -104,12 +92,9 @@ export default function () {
104
92
  * left page and width and height are the vertical and horizontal
105
93
  * page count.
106
94
  */
107
-
108
-
109
95
  mxGraph.prototype.getPageLayout = function () {
110
96
  var size = this.getPageSize();
111
97
  var bounds = this.getGraphBounds();
112
-
113
98
  if (bounds.width == 0 || bounds.height == 0) {
114
99
  return new mxRectangle(0, 0, 1, 1);
115
100
  } else {
@@ -128,12 +113,9 @@ export default function () {
128
113
  /**
129
114
  * Returns the size of the page format scaled with the page size.
130
115
  */
131
-
132
-
133
116
  mxGraph.prototype.getPageSize = function () {
134
117
  return new mxRectangle(0, 0, this.pageFormat.width * this.pageScale, this.pageFormat.height * this.pageScale);
135
118
  };
136
-
137
119
  mxGraph.prototype.expandedImage = new mxImage(expandedImage, 9, 9);
138
120
  mxGraph.prototype.collapsedImage = new mxImage(collapsedImage, 9, 9);
139
121
  }
@@ -1,6 +1,6 @@
1
1
  import { Component, TypeDefs, VNodeComponentClass } from 'intact-vue-next';
2
2
  import type { Diagram } from '../diagram';
3
- export declare type Cell = {
3
+ export type Cell = {
4
4
  data?: any;
5
5
  instance?: DBase;
6
6
  vertex?: boolean;