@king-design/vue 2.1.2 → 2.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.
- package/components/affix/index.d.ts +2 -2
- package/components/affix/index.js +0 -5
- package/components/affix/index.spec.js +84 -108
- package/components/affix/index.vdt.js +5 -8
- package/components/affix/useStyle.js +8 -19
- package/components/badge/index.js +0 -2
- package/components/badge/index.vdt.js +5 -9
- package/components/badge/styles.js +0 -2
- package/components/breadcrumb/index.js +0 -4
- package/components/breadcrumb/index.spec.js +6 -6
- package/components/breadcrumb/index.vdt.js +5 -14
- package/components/breadcrumb/item.js +0 -8
- package/components/breadcrumb/item.vdt.js +3 -6
- package/components/breadcrumb/styles.js +0 -3
- package/components/button/dynamicButton.d.ts +1 -1
- package/components/button/dynamicButton.js +2 -5
- package/components/button/group.js +2 -10
- package/components/button/group.vdt.js +4 -7
- package/components/button/index.js +3 -27
- package/components/button/index.spec.js +74 -96
- package/components/button/index.vdt.js +19 -29
- package/components/button/styles.d.ts +2 -2
- package/components/button/styles.js +4 -48
- package/components/card/column.js +0 -2
- package/components/card/column.vdt.js +5 -10
- package/components/card/index.js +0 -4
- package/components/card/index.vdt.js +4 -16
- package/components/carousel/index.js +1 -19
- package/components/carousel/index.spec.js +127 -163
- package/components/carousel/index.vdt.js +12 -15
- package/components/carousel/item.js +0 -2
- package/components/carousel/item.vdt.js +4 -7
- package/components/carousel/styles.js +0 -1
- package/components/carousel/useAutoplay.js +0 -4
- package/components/carousel/useItems.js +4 -20
- package/components/carousel/useSlide.js +57 -89
- package/components/cascader/index.js +3 -18
- package/components/cascader/index.spec.js +365 -379
- package/components/cascader/index.vdt.js +14 -31
- package/components/cascader/styles.js +0 -6
- package/components/cascader/useFields.js +1 -4
- package/components/cascader/useFilterable.js +2 -19
- package/components/cascader/useLabel.js +1 -9
- package/components/cascader/useLoad.js +22 -35
- package/components/cascader/useValue.d.ts +2 -2
- package/components/cascader/useValue.js +6 -27
- package/components/checkbox/index.js +5 -27
- package/components/checkbox/index.spec.js +129 -171
- package/components/checkbox/index.vdt.js +12 -16
- package/components/checkbox/styles.js +0 -10
- package/components/code/crossDomain.js +2 -9
- package/components/code/index.js +0 -9
- package/components/code/index.spec.js +46 -55
- package/components/code/index.vdt.js +6 -14
- package/components/code/styles.js +0 -1
- package/components/code/useEditor.js +5 -10
- package/components/collapse/index.d.ts +1 -1
- package/components/collapse/index.js +3 -14
- package/components/collapse/index.spec.js +47 -60
- package/components/collapse/index.vdt.js +4 -12
- package/components/collapse/item.js +0 -10
- package/components/collapse/item.vdt.js +7 -14
- package/components/collapse/styles.js +0 -1
- package/components/colorpicker/drag.js +0 -5
- package/components/colorpicker/index.js +0 -4
- package/components/colorpicker/index.spec.js +211 -259
- package/components/colorpicker/index.vdt.js +8 -11
- package/components/colorpicker/panel.js +0 -5
- package/components/colorpicker/panel.vdt.js +21 -26
- package/components/colorpicker/styles.js +2 -13
- package/components/colorpicker/useDrag.js +22 -26
- package/components/colorpicker/useInput.js +0 -16
- package/components/colorpicker/usePointer.js +15 -18
- package/components/colorpicker/useValue.js +2 -7
- package/components/context.d.ts +2 -2
- package/components/context.js +2 -19
- package/components/datepicker/basepicker.d.ts +8 -8
- package/components/datepicker/basepicker.js +20 -90
- package/components/datepicker/calendar.js +0 -11
- package/components/datepicker/calendar.vdt.js +11 -14
- package/components/datepicker/constants.js +0 -1
- package/components/datepicker/dayjs.js +1 -1
- package/components/datepicker/helpers.js +3 -15
- package/components/datepicker/index.js +6 -32
- package/components/datepicker/index.spec.js +1141 -1448
- package/components/datepicker/index.vdt.js +20 -34
- package/components/datepicker/shortcuts.d.ts +1 -1
- package/components/datepicker/shortcuts.js +0 -4
- package/components/datepicker/styles.js +0 -8
- package/components/datepicker/time.d.ts +1 -1
- package/components/datepicker/time.js +3 -23
- package/components/datepicker/time.vdt.js +4 -5
- package/components/datepicker/useDays.js +2 -9
- package/components/datepicker/useDisabled.js +6 -23
- package/components/datepicker/useFocusDate.js +0 -2
- package/components/datepicker/useFormats.js +6 -15
- package/components/datepicker/useKeyboards.js +20 -36
- package/components/datepicker/useMonths.js +0 -6
- package/components/datepicker/usePanel.js +0 -10
- package/components/datepicker/useShowDate.js +10 -37
- package/components/datepicker/useStatus.js +3 -15
- package/components/datepicker/useValue.js +22 -35
- package/components/datepicker/useYears.js +4 -15
- package/components/diagram/diagram.js +17 -43
- package/components/diagram/diagram.vdt.js +2 -5
- package/components/diagram/graph.js +6 -6
- package/components/diagram/index.d.ts +1 -1
- package/components/diagram/index.js +7 -7
- package/components/diagram/index.spec.js +369 -495
- package/components/diagram/layouts/circle.js +6 -14
- package/components/diagram/layouts/flow.js +7 -15
- package/components/diagram/layouts/layout.js +6 -28
- package/components/diagram/layouts/organic.js +3 -11
- package/components/diagram/layouts/partition.js +4 -12
- package/components/diagram/layouts/radial.js +6 -18
- package/components/diagram/layouts/stack.js +6 -14
- package/components/diagram/layouts/tree.js +11 -21
- package/components/diagram/mxgraph/handler/mxConnectionHandler.js +15 -22
- package/components/diagram/mxgraph/handler/mxConstraintHandler.js +4 -4
- package/components/diagram/mxgraph/handler/mxEdgeHandler.js +11 -15
- package/components/diagram/mxgraph/handler/mxGraphHandler.js +6 -9
- package/components/diagram/mxgraph/handler/mxRubberband.js +4 -4
- package/components/diagram/mxgraph/handler/mxVertexHandler.js +7 -10
- package/components/diagram/mxgraph/index.js +0 -2
- package/components/diagram/mxgraph/mx.js +3 -3
- package/components/diagram/mxgraph/shape/mxCloud.js +2 -2
- package/components/diagram/mxgraph/shape/mxCylinder.js +4 -9
- package/components/diagram/mxgraph/shape/mxEllipse.js +2 -2
- package/components/diagram/mxgraph/shape/mxHexagon.js +2 -2
- package/components/diagram/mxgraph/shape/mxLine.js +2 -2
- package/components/diagram/mxgraph/shape/mxRectangleShape.js +2 -2
- package/components/diagram/mxgraph/shape/mxRhombus.js +6 -12
- package/components/diagram/mxgraph/shape/mxShape.js +0 -1
- package/components/diagram/mxgraph/shape/mxTriangle.js +2 -2
- package/components/diagram/mxgraph/util/mxConstants.js +2 -2
- package/components/diagram/mxgraph/util/mxGuide.js +5 -7
- package/components/diagram/mxgraph/view/mxCellEditor.js +16 -29
- package/components/diagram/mxgraph/view/mxCellRenderer.js +0 -2
- package/components/diagram/mxgraph/view/mxGraph.js +14 -32
- package/components/diagram/shapes/base.d.ts +1 -1
- package/components/diagram/shapes/base.js +9 -39
- package/components/diagram/shapes/callout.js +10 -23
- package/components/diagram/shapes/circle.js +3 -10
- package/components/diagram/shapes/document.js +5 -16
- package/components/diagram/shapes/ellipse.js +0 -5
- package/components/diagram/shapes/generateShapes.d.ts +1 -1
- package/components/diagram/shapes/generateShapes.js +0 -9
- package/components/diagram/shapes/hexagon.js +9 -26
- package/components/diagram/shapes/image.js +1 -9
- package/components/diagram/shapes/line.d.ts +2 -2
- package/components/diagram/shapes/line.js +13 -48
- package/components/diagram/shapes/parallelogram.js +9 -26
- package/components/diagram/shapes/rectangle.js +1 -9
- package/components/diagram/shapes/shape.js +6 -35
- package/components/diagram/shapes/square.js +3 -11
- package/components/diagram/shapes/text.js +0 -5
- package/components/diagram/styles.js +0 -1
- package/components/dialog/alert.vdt.js +9 -19
- package/components/dialog/base.js +1 -29
- package/components/dialog/base.vdt.js +14 -29
- package/components/dialog/index.js +6 -31
- package/components/dialog/index.spec.js +416 -503
- package/components/dialog/staticMethods.d.ts +1 -1
- package/components/dialog/staticMethods.js +2 -13
- package/components/dialog/styles.js +0 -11
- package/components/dialog/useDraggable.js +0 -6
- package/components/dialog/useEscClosable.js +4 -12
- package/components/dialog/useFixBody.d.ts +1 -1
- package/components/dialog/useFixBody.js +0 -11
- package/components/dialog/usePosition.js +7 -5
- package/components/drawer/index.js +0 -5
- package/components/drawer/index.spec.js +126 -168
- package/components/drawer/index.vdt.js +3 -9
- package/components/drawer/styles.d.ts +2 -2
- package/components/drawer/styles.js +0 -4
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +33 -89
- package/components/dropdown/index.js +2 -6
- package/components/dropdown/index.spec.js +388 -496
- package/components/dropdown/item.js +4 -25
- package/components/dropdown/item.vdt.js +5 -8
- package/components/dropdown/menu.js +14 -29
- package/components/dropdown/menu.vdt.js +5 -13
- package/components/dropdown/styles.js +0 -9
- package/components/dropdown/useKeyboard.d.ts +2 -2
- package/components/dropdown/useKeyboard.js +8 -30
- package/components/dropdown/usePosition.d.ts +2 -1
- package/components/dropdown/usePosition.js +33 -28
- package/components/dropdown/useTransition.js +0 -8
- package/components/editable/index.d.ts +1 -1
- package/components/editable/index.js +4 -28
- package/components/editable/index.spec.js +152 -189
- package/components/editable/index.vdt.js +8 -11
- package/components/editable/styles.js +0 -1
- package/components/form/form.js +0 -18
- package/components/form/form.vdt.js +4 -7
- package/components/form/index.spec.js +1057 -1280
- package/components/form/item.d.ts +1 -1
- package/components/form/item.js +0 -12
- package/components/form/item.vdt.js +17 -31
- package/components/form/methods.d.ts +5 -5
- package/components/form/methods.js +2 -12
- package/components/form/styles.js +0 -8
- package/components/form/useDirty.js +2 -7
- package/components/form/useError.js +2 -10
- package/components/form/useValidate.d.ts +1 -1
- package/components/form/useValidate.js +8 -24
- package/components/grid/col.d.ts +3 -3
- package/components/grid/col.js +0 -7
- package/components/grid/col.vdt.js +8 -13
- package/components/grid/constants.d.ts +6 -6
- package/components/grid/row.js +0 -5
- package/components/grid/row.vdt.js +5 -8
- package/components/grid/styles.js +0 -7
- package/components/grid/useBreakpoints.js +0 -5
- package/components/grid/useGutter.js +5 -25
- package/components/icon/index.js +0 -10
- package/components/icon/index.vdt.js +7 -13
- package/components/icon/styles.js +0 -1
- package/components/input/index.d.ts +3 -3
- package/components/input/index.js +0 -14
- package/components/input/index.spec.js +185 -239
- package/components/input/index.vdt.js +39 -49
- package/components/input/search.js +0 -20
- package/components/input/search.vdt.js +6 -9
- package/components/input/styles.js +0 -26
- package/components/input/useAutoRows.js +6 -18
- package/components/input/useAutoWidth.js +0 -5
- package/components/input/useFrozen.js +0 -6
- package/components/input/useShowPassword.js +2 -5
- package/components/layout/aside.js +5 -17
- package/components/layout/aside.vdt.js +5 -9
- package/components/layout/body.js +5 -17
- package/components/layout/footer.js +1 -7
- package/components/layout/header.js +7 -21
- package/components/layout/layout.js +9 -24
- package/components/layout/styles.js +2 -13
- package/components/layout/template.vdt.js +2 -4
- package/components/layout/useParse.js +0 -7
- package/components/menu/index.spec.js +189 -242
- package/components/menu/item.js +3 -16
- package/components/menu/item.vdt.js +20 -32
- package/components/menu/menu.js +2 -11
- package/components/menu/menu.vdt.js +6 -12
- package/components/menu/styles.js +0 -18
- package/components/menu/useDropdown.js +4 -9
- package/components/menu/useExpanded.js +0 -14
- package/components/menu/useHighlight.js +26 -36
- package/components/message/index.spec.js +58 -73
- package/components/message/message.js +0 -19
- package/components/message/message.vdt.js +5 -8
- package/components/message/messages.js +0 -12
- package/components/message/messages.vdt.js +0 -1
- package/components/message/styles.js +0 -9
- package/components/pagination/index.d.ts +1 -1
- package/components/pagination/index.js +10 -46
- package/components/pagination/index.spec.js +133 -173
- package/components/pagination/index.vdt.js +14 -34
- package/components/pagination/styles.js +0 -4
- package/components/portal.d.ts +1 -1
- package/components/portal.js +13 -28
- package/components/position.d.ts +12 -12
- package/components/position.js +32 -88
- package/components/progress/index.d.ts +6 -6
- package/components/progress/index.js +0 -12
- package/components/progress/index.spec.js +143 -191
- package/components/progress/index.vdt.js +8 -11
- package/components/progress/styles.js +0 -6
- package/components/progress/useColor.js +2 -7
- package/components/progress/useStatus.d.ts +1 -1
- package/components/progress/useStatus.js +2 -5
- package/components/radio/index.js +3 -18
- package/components/radio/index.spec.js +111 -149
- package/components/radio/index.vdt.js +14 -17
- package/components/radio/styles.js +0 -10
- package/components/rate/index.js +0 -7
- package/components/rate/index.spec.js +64 -79
- package/components/rate/index.vdt.js +8 -21
- package/components/rate/styles.js +0 -3
- package/components/rate/useActiveValue.js +2 -7
- package/components/scrollSelect/index.d.ts +2 -2
- package/components/scrollSelect/index.js +0 -7
- package/components/scrollSelect/index.spec.js +100 -131
- package/components/scrollSelect/index.vdt.js +6 -11
- package/components/scrollSelect/styles.js +0 -7
- package/components/scrollSelect/useList.js +3 -17
- package/components/scrollSelect/useMouseEvents.js +31 -49
- package/components/scrollSelect/useTranslate.js +1 -11
- package/components/select/base.js +5 -35
- package/components/select/base.vdt.js +23 -38
- package/components/select/group.js +0 -5
- package/components/select/group.vdt.js +4 -10
- package/components/select/index.spec.js +361 -452
- package/components/select/menu.js +0 -5
- package/components/select/menu.vdt.js +18 -33
- package/components/select/option.js +2 -16
- package/components/select/option.vdt.js +7 -14
- package/components/select/select.js +3 -20
- package/components/select/select.vdt.js +9 -17
- package/components/select/styles.js +0 -33
- package/components/select/useBaseLabel.d.ts +1 -1
- package/components/select/useBaseLabel.js +4 -17
- package/components/select/useCard.js +0 -4
- package/components/select/useEqualWidth.js +0 -1
- package/components/select/useFilterable.js +5 -27
- package/components/select/useFocusout.d.ts +1 -1
- package/components/select/useFocusout.js +1 -9
- package/components/select/useInput.js +6 -10
- package/components/select/useLabel.js +3 -13
- package/components/select/useSearchable.js +0 -10
- package/components/skeleton/item.d.ts +1 -1
- package/components/skeleton/item.js +0 -4
- package/components/skeleton/item.vdt.js +1 -6
- package/components/skeleton/skeleton.js +0 -4
- package/components/skeleton/skeleton.vdt.js +6 -12
- package/components/skeleton/style.d.ts +1 -1
- package/components/skeleton/style.js +0 -1
- package/components/slider/index.d.ts +1 -1
- package/components/slider/index.js +0 -7
- package/components/slider/index.spec.js +467 -585
- package/components/slider/index.vdt.js +32 -45
- package/components/slider/styles.js +0 -14
- package/components/slider/useClick.js +2 -11
- package/components/slider/useDraggable.js +23 -34
- package/components/slider/useKeyboard.js +7 -18
- package/components/slider/useMarks.d.ts +5 -5
- package/components/slider/useMarks.js +5 -13
- package/components/slider/usePoints.d.ts +2 -2
- package/components/slider/usePoints.js +7 -21
- package/components/slider/useStyles.d.ts +1 -1
- package/components/slider/useStyles.js +5 -10
- package/components/slider/useTooltip.js +2 -10
- package/components/slider/useValue.d.ts +1 -1
- package/components/slider/useValue.js +7 -22
- package/components/spin/index.js +0 -4
- package/components/spin/index.vdt.js +4 -11
- package/components/spin/styles.js +0 -2
- package/components/spinner/index.d.ts +4 -4
- package/components/spinner/index.js +9 -24
- package/components/spinner/index.spec.js +359 -460
- package/components/spinner/index.vdt.js +10 -13
- package/components/spinner/styles.js +0 -3
- package/components/spinner/useChange.js +4 -16
- package/components/spinner/useFormatter.js +6 -16
- package/components/spinner/useStep.d.ts +3 -3
- package/components/spinner/useStep.js +2 -20
- package/components/spinner/useValue.js +11 -26
- package/components/split/index.js +0 -7
- package/components/split/index.spec.js +223 -267
- package/components/split/index.vdt.js +8 -17
- package/components/split/style.d.ts +1 -1
- package/components/split/style.js +0 -8
- package/components/split/useDraggable.js +11 -35
- package/components/split/useSize.js +2 -5
- package/components/steps/context.d.ts +2 -2
- package/components/steps/index.js +2 -10
- package/components/steps/index.spec.js +21 -27
- package/components/steps/index.vdt.js +8 -10
- package/components/steps/step.js +0 -2
- package/components/steps/step.vdt.js +8 -12
- package/components/steps/styles.js +0 -27
- package/components/switch/index.js +2 -23
- package/components/switch/index.spec.js +188 -224
- package/components/switch/index.vdt.js +16 -32
- package/components/switch/styles.js +3 -14
- package/components/switch/useDraggable.js +10 -18
- package/components/table/cell.js +0 -6
- package/components/table/cell.vdt.js +14 -21
- package/components/table/column.d.ts +1 -1
- package/components/table/column.js +0 -5
- package/components/table/column.vdt.js +19 -30
- package/components/table/exportTable.js +45 -56
- package/components/table/index.spec.js +780 -984
- package/components/table/row.d.ts +1 -1
- package/components/table/row.js +18 -40
- package/components/table/row.vdt.js +27 -39
- package/components/table/styles.js +0 -11
- package/components/table/table.d.ts +5 -5
- package/components/table/table.js +18 -50
- package/components/table/table.vdt.js +61 -85
- package/components/table/useChecked.d.ts +1 -1
- package/components/table/useChecked.js +20 -61
- package/components/table/useColumns.js +3 -16
- package/components/table/useDisableRow.js +2 -12
- package/components/table/useDraggable.js +4 -12
- package/components/table/useExpandable.js +2 -5
- package/components/table/useFixedColumns.d.ts +1 -1
- package/components/table/useFixedColumns.js +4 -23
- package/components/table/useGroup.d.ts +1 -1
- package/components/table/useGroup.js +7 -24
- package/components/table/useMerge.d.ts +4 -4
- package/components/table/useMerge.js +2 -14
- package/components/table/usePagination.js +4 -18
- package/components/table/useResizable.js +2 -10
- package/components/table/useRestRowStatus.js +2 -6
- package/components/table/useScroll.d.ts +1 -1
- package/components/table/useScroll.js +0 -3
- package/components/table/useSelected.js +2 -5
- package/components/table/useSortable.js +2 -8
- package/components/table/useStickyHeader.js +3 -7
- package/components/table/useStickyScrollbar.js +6 -16
- package/components/table/useTree.js +1 -12
- package/components/table/useWidth.js +14 -30
- package/components/tabs/index.js +29 -51
- package/components/tabs/index.spec.js +56 -74
- package/components/tabs/index.vdt.js +13 -16
- package/components/tabs/styles.js +0 -16
- package/components/tabs/tab.js +0 -10
- package/components/tabs/tab.vdt.js +6 -10
- package/components/tabs/useActiveBar.js +2 -11
- package/components/tabs/useScroll.js +4 -20
- package/components/tag/base.js +0 -8
- package/components/tag/index.js +2 -4
- package/components/tag/index.spec.js +19 -25
- package/components/tag/index.vdt.js +8 -15
- package/components/tag/styles.js +0 -9
- package/components/timeline/item.js +0 -4
- package/components/timeline/item.vdt.js +4 -9
- package/components/timeline/styles.d.ts +2 -2
- package/components/timeline/styles.js +0 -4
- package/components/timeline/timeline.js +0 -2
- package/components/timeline/timeline.vdt.js +2 -5
- package/components/timepicker/index.js +2 -7
- package/components/timepicker/index.spec.js +293 -368
- package/components/timepicker/panelPicker.js +2 -11
- package/components/timepicker/panelPicker.vdt.js +14 -24
- package/components/timepicker/selectPicker.js +0 -5
- package/components/timepicker/selectPicker.vdt.js +5 -10
- package/components/timepicker/styles.js +0 -1
- package/components/timepicker/useDisabled.js +2 -4
- package/components/timepicker/useFormats.js +4 -13
- package/components/timepicker/useStep.d.ts +1 -1
- package/components/timepicker/useStep.js +8 -17
- package/components/timepicker/useValue.js +16 -21
- package/components/tip/index.js +0 -2
- package/components/tip/index.vdt.js +5 -17
- package/components/tip/styles.js +0 -3
- package/components/tooltip/content.js +0 -28
- package/components/tooltip/content.vdt.js +15 -25
- package/components/tooltip/index.js +3 -7
- package/components/tooltip/index.spec.js +434 -572
- package/components/tooltip/styles.d.ts +1 -1
- package/components/tooltip/styles.js +2 -10
- package/components/tooltip/tooltip.js +2 -15
- package/components/tooltip/useArrow.js +11 -14
- package/components/transfer/index.d.ts +1 -1
- package/components/transfer/index.js +1 -13
- package/components/transfer/index.spec.js +159 -194
- package/components/transfer/index.vdt.js +16 -34
- package/components/transfer/styles.js +0 -10
- package/components/transfer/useCheck.d.ts +1 -1
- package/components/transfer/useCheck.js +1 -15
- package/components/transfer/useFilter.d.ts +1 -1
- package/components/transfer/useFilter.js +9 -30
- package/components/transfer/useTransfer.js +10 -26
- package/components/tree/index.d.ts +3 -3
- package/components/tree/index.js +4 -22
- package/components/tree/index.spec.js +285 -355
- package/components/tree/index.vdt.js +12 -23
- package/components/tree/styles.js +2 -16
- package/components/tree/useChecked.js +3 -26
- package/components/tree/useDraggable.js +12 -42
- package/components/tree/useExpanded.js +26 -43
- package/components/tree/useFilter.js +3 -10
- package/components/tree/useNodes.d.ts +1 -1
- package/components/tree/useNodes.js +0 -4
- package/components/tree/useSelected.js +21 -38
- package/components/tree/useTransitionEvent.js +3 -5
- package/components/treeSelect/index.js +9 -36
- package/components/treeSelect/index.spec.js +123 -160
- package/components/treeSelect/index.vdt.js +14 -20
- package/components/treeSelect/styles.js +0 -1
- package/components/treeSelect/useValue.js +0 -11
- package/components/types.d.ts +3 -3
- package/components/upload/ajaxUploader.d.ts +1 -1
- package/components/upload/ajaxUploader.js +0 -17
- package/components/upload/index.d.ts +4 -4
- package/components/upload/index.js +0 -14
- package/components/upload/index.spec.js +142 -249
- package/components/upload/index.vdt.js +12 -27
- package/components/upload/styles.js +0 -30
- package/components/upload/useAccept.js +2 -10
- package/components/upload/useDrag.js +0 -7
- package/components/upload/useFiles.js +103 -145
- package/components/upload/useShowImage.js +0 -3
- package/components/upload/useUpload.js +47 -69
- package/components/utils.d.ts +4 -3
- package/components/utils.js +24 -43
- package/components/virtual.js +14 -39
- package/components/wave/index.js +5 -31
- package/hooks/useDelayClose.js +2 -6
- package/hooks/useDocumentClick.js +8 -16
- package/hooks/useDraggable.d.ts +1 -1
- package/hooks/useDraggable.js +0 -9
- package/hooks/useKeyboard.d.ts +3 -3
- package/hooks/useKeyboard.js +0 -10
- package/hooks/useMouseOutsidable.js +0 -8
- package/hooks/useReceive.d.ts +1 -1
- package/hooks/useReceive.js +0 -4
- package/hooks/useRecordComponent.js +0 -6
- package/hooks/useRouter.js +7 -18
- package/hooks/useShowHideEvents.js +0 -3
- package/hooks/useState.d.ts +2 -2
- package/hooks/useState.js +2 -6
- package/i18n/en-US.js +0 -1
- package/i18n/index.d.ts +1 -1
- package/i18n/index.js +0 -7
- package/index.d.ts +2 -2
- package/index.js +2 -3
- package/package.json +2 -2
- package/styles/global.js +2 -3
- package/styles/keyframes.js +0 -1
- package/styles/theme.d.ts +1 -1
- package/styles/theme.js +4 -7
- package/styles/utils.d.ts +1 -1
- package/styles/utils.js +3 -17
- package/yarn-error.log +1013 -0
- package/components/cascader/index.d.ts +0 -45
- package/components/datepicker/index.d.ts +0 -63
- package/components/select/select.d.ts +0 -33
- package/components/timepicker/panelPicker.d.ts +0 -54
- package/components/treeSelect/index.d.ts +0 -27
|
@@ -3,50 +3,42 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
3
3
|
import { DLayout } from './layout';
|
|
4
4
|
import mx from '../mxgraph';
|
|
5
5
|
var mxCircleLayout = mx.mxCircleLayout;
|
|
6
|
-
|
|
7
6
|
var typeDefs = _extends({}, DLayout.typeDefs, {
|
|
8
7
|
x0: [Number, String],
|
|
9
8
|
y0: [Number, String]
|
|
10
9
|
});
|
|
11
|
-
|
|
12
10
|
var defaults = function defaults() {
|
|
13
11
|
return _extends({}, DLayout.defaults(), {
|
|
14
12
|
x0: 0,
|
|
15
13
|
y0: 0
|
|
16
14
|
});
|
|
17
15
|
};
|
|
18
|
-
|
|
19
16
|
export var DCircleLayout = /*#__PURE__*/function (_DLayout) {
|
|
20
17
|
_inheritsLoose(DCircleLayout, _DLayout);
|
|
21
|
-
|
|
22
18
|
function DCircleLayout() {
|
|
23
19
|
return _DLayout.apply(this, arguments) || this;
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
var _proto = DCircleLayout.prototype;
|
|
27
|
-
|
|
28
22
|
_proto.getLayout = function getLayout(graph) {
|
|
29
23
|
var _this$get = this.get(),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
x0 = _this$get.x0,
|
|
25
|
+
y0 = _this$get.y0;
|
|
26
|
+
var layout = new mxCircleLayout(graph);
|
|
27
|
+
// layout.radius = radius;
|
|
35
28
|
layout.moveCircle = true;
|
|
36
29
|
layout.x0 = x0;
|
|
37
30
|
layout.y0 = y0;
|
|
38
31
|
layout.disableEdgeStyle = false;
|
|
39
32
|
return layout;
|
|
40
33
|
};
|
|
41
|
-
|
|
42
34
|
_proto.execute = function execute(layout, cells, parent, graph) {
|
|
43
35
|
if (!cells.length) return;
|
|
44
36
|
var tmp = parent.cell;
|
|
45
|
-
layout.execute(tmp);
|
|
37
|
+
layout.execute(tmp);
|
|
38
|
+
// if (graph.getModel().isVertex(tmp)) {
|
|
46
39
|
// graph.updateGroupBounds([tmp], graph.gridSize * 2, true);
|
|
47
40
|
// }
|
|
48
41
|
};
|
|
49
|
-
|
|
50
42
|
return DCircleLayout;
|
|
51
43
|
}(DLayout);
|
|
52
44
|
DCircleLayout.displayName = 'DCircleLayout';
|
|
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
3
3
|
import { DLayout } from './layout';
|
|
4
4
|
import mx from '../mxgraph';
|
|
5
5
|
var mxHierarchicalLayout = mx.mxHierarchicalLayout,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
mxConstants = mx.mxConstants;
|
|
8
7
|
var typeDefs = _extends({}, DLayout.typeDefs, {
|
|
9
8
|
type: ['horizontal', 'vertical'],
|
|
10
9
|
intraCellSpacing: [Number, String],
|
|
@@ -13,7 +12,6 @@ var typeDefs = _extends({}, DLayout.typeDefs, {
|
|
|
13
12
|
resizeParent: Boolean,
|
|
14
13
|
parentBorder: [Number, String]
|
|
15
14
|
});
|
|
16
|
-
|
|
17
15
|
var defaults = function defaults() {
|
|
18
16
|
return _extends({}, DLayout.defaults(), {
|
|
19
17
|
// The spacing buffer added between cells on the same layer.
|
|
@@ -28,25 +26,20 @@ var defaults = function defaults() {
|
|
|
28
26
|
parentBorder: 0
|
|
29
27
|
});
|
|
30
28
|
};
|
|
31
|
-
|
|
32
29
|
export var DFlowLayout = /*#__PURE__*/function (_DLayout) {
|
|
33
30
|
_inheritsLoose(DFlowLayout, _DLayout);
|
|
34
|
-
|
|
35
31
|
function DFlowLayout() {
|
|
36
32
|
return _DLayout.apply(this, arguments) || this;
|
|
37
33
|
}
|
|
38
|
-
|
|
39
34
|
var _proto = DFlowLayout.prototype;
|
|
40
|
-
|
|
41
35
|
_proto.getLayout = function getLayout(graph) {
|
|
42
36
|
var _this$get = this.get(),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
type = _this$get.type,
|
|
38
|
+
interHierarchySpacing = _this$get.interHierarchySpacing,
|
|
39
|
+
interRankCellSpacing = _this$get.interRankCellSpacing,
|
|
40
|
+
intraCellSpacing = _this$get.intraCellSpacing,
|
|
41
|
+
resizeParent = _this$get.resizeParent,
|
|
42
|
+
parentBorder = _this$get.parentBorder;
|
|
50
43
|
var direction = type === 'horizontal' ? mxConstants.DIRECTION_WEST : mxConstants.DIRECTION_NORTH;
|
|
51
44
|
var layout = new mxHierarchicalLayout(graph, direction);
|
|
52
45
|
layout.intraCellSpacing = +intraCellSpacing;
|
|
@@ -59,7 +52,6 @@ export var DFlowLayout = /*#__PURE__*/function (_DLayout) {
|
|
|
59
52
|
layout.maintainParentLocation = true;
|
|
60
53
|
return layout;
|
|
61
54
|
};
|
|
62
|
-
|
|
63
55
|
return DFlowLayout;
|
|
64
56
|
}(DLayout);
|
|
65
57
|
DFlowLayout.displayName = 'DFlowLayout';
|
|
@@ -12,88 +12,68 @@ var typeDefs = {
|
|
|
12
12
|
left: [String, Number],
|
|
13
13
|
top: [String, Number]
|
|
14
14
|
};
|
|
15
|
-
|
|
16
15
|
var defaults = function defaults() {
|
|
17
16
|
return {
|
|
18
17
|
left: 0,
|
|
19
18
|
top: 0
|
|
20
19
|
};
|
|
21
20
|
};
|
|
22
|
-
|
|
23
21
|
export var DLayout = /*#__PURE__*/function (_Component) {
|
|
24
22
|
_inheritsLoose(DLayout, _Component);
|
|
25
|
-
|
|
26
23
|
function DLayout() {
|
|
27
24
|
var _context;
|
|
28
|
-
|
|
29
25
|
var _this;
|
|
30
|
-
|
|
31
26
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
32
27
|
args[_key] = arguments[_key];
|
|
33
28
|
}
|
|
34
|
-
|
|
35
29
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
36
30
|
_this.diagram = inject(DIAGRAM);
|
|
37
31
|
_this.shapes = new _Set();
|
|
38
32
|
_this.shape = inject(SHAPE, null);
|
|
39
33
|
return _this;
|
|
40
34
|
}
|
|
41
|
-
|
|
42
35
|
var _proto = DLayout.prototype;
|
|
43
|
-
|
|
44
36
|
_proto.init = function init() {
|
|
45
37
|
provide(LAYOUT, this);
|
|
46
38
|
};
|
|
47
|
-
|
|
48
39
|
_proto.mounted = function mounted() {
|
|
49
40
|
this.diagram.addLayout(this);
|
|
50
41
|
};
|
|
51
|
-
|
|
52
42
|
_proto.beforeUnmount = function beforeUnmount() {
|
|
53
43
|
this.diagram.deleteLayout(this);
|
|
54
44
|
};
|
|
55
|
-
|
|
56
45
|
_proto.addShape = function addShape(shape) {
|
|
57
46
|
this.shapes.add(shape);
|
|
58
47
|
};
|
|
59
|
-
|
|
60
48
|
_proto.deleteShape = function deleteShape(shape) {
|
|
61
49
|
this.shapes.delete(shape);
|
|
62
50
|
};
|
|
63
|
-
|
|
64
51
|
_proto.draw = function draw() {
|
|
65
52
|
var _context2;
|
|
66
|
-
|
|
67
53
|
var _this$get = this.get(),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
54
|
+
left = _this$get.left,
|
|
55
|
+
top = _this$get.top;
|
|
71
56
|
var diagram = this.diagram;
|
|
72
57
|
var graph = diagram.graph;
|
|
73
|
-
var layout = this.getLayout(graph);
|
|
58
|
+
var layout = this.getLayout(graph);
|
|
59
|
+
// Allows the layout to move cells even though cells
|
|
74
60
|
// aren't movable in the graph
|
|
75
|
-
|
|
76
61
|
layout.isVertexMovable = function () {
|
|
77
62
|
return true;
|
|
78
63
|
};
|
|
79
|
-
|
|
80
64
|
var cells = _mapInstanceProperty(_context2 = _Array$from(this.shapes)).call(_context2, function (shape) {
|
|
81
65
|
return shape.cell;
|
|
82
66
|
});
|
|
83
|
-
|
|
84
67
|
var parent = this.shape ? this.shape : this.diagram;
|
|
85
|
-
this.execute(layout, cells, parent, graph);
|
|
86
|
-
|
|
68
|
+
this.execute(layout, cells, parent, graph);
|
|
69
|
+
// move cells totally
|
|
87
70
|
graph.moveCells(cells, +left, +top);
|
|
88
71
|
};
|
|
89
|
-
|
|
90
72
|
_proto.execute = function execute(layout, cells, parent, graph) {
|
|
91
73
|
layout.execute(parent.cell, cells);
|
|
92
74
|
};
|
|
93
|
-
|
|
94
75
|
return DLayout;
|
|
95
76
|
}(Component);
|
|
96
|
-
|
|
97
77
|
DLayout.template = function () {
|
|
98
78
|
if (process.env.NODE_ENV !== 'production') {
|
|
99
79
|
eachChildren(this.get('children'), function (vNode) {
|
|
@@ -102,10 +82,8 @@ DLayout.template = function () {
|
|
|
102
82
|
error("DLayout can only contain DShape or DLine, but " + vNode.tag + " found.");
|
|
103
83
|
});
|
|
104
84
|
}
|
|
105
|
-
|
|
106
85
|
var constructor = this.constructor;
|
|
107
86
|
return h(constructor.displayName, null, this.get('children'));
|
|
108
87
|
};
|
|
109
|
-
|
|
110
88
|
DLayout.typeDefs = typeDefs;
|
|
111
89
|
DLayout.defaults = defaults;
|
|
@@ -3,45 +3,37 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
3
3
|
import { DLayout } from './layout';
|
|
4
4
|
import mx from '../mxgraph';
|
|
5
5
|
var mxFastOrganicLayout = mx.mxFastOrganicLayout;
|
|
6
|
-
|
|
7
6
|
var typeDefs = _extends({}, DLayout.typeDefs, {
|
|
8
7
|
forceConstant: [Number, String]
|
|
9
8
|
});
|
|
10
|
-
|
|
11
9
|
var defaults = function defaults() {
|
|
12
10
|
return _extends({}, DLayout.defaults(), {
|
|
13
11
|
// The force constant by which the attractive forces are divided and the replusive forces are multiple by the square of. The value equates to the average radius there is of free space around each node.
|
|
14
12
|
forceConstant: 50
|
|
15
13
|
});
|
|
16
14
|
};
|
|
17
|
-
|
|
18
15
|
export var DOrganicLayout = /*#__PURE__*/function (_DLayout) {
|
|
19
16
|
_inheritsLoose(DOrganicLayout, _DLayout);
|
|
20
|
-
|
|
21
17
|
function DOrganicLayout() {
|
|
22
18
|
return _DLayout.apply(this, arguments) || this;
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
var _proto = DOrganicLayout.prototype;
|
|
26
|
-
|
|
27
21
|
_proto.getLayout = function getLayout(graph) {
|
|
28
22
|
var _this$get = this.get(),
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
forceConstant = _this$get.forceConstant;
|
|
31
24
|
var layout = new mxFastOrganicLayout(graph);
|
|
32
25
|
layout.forceConstant = +forceConstant;
|
|
33
26
|
layout.disableEdgeStyle = false;
|
|
34
27
|
return layout;
|
|
35
28
|
};
|
|
36
|
-
|
|
37
29
|
_proto.execute = function execute(layout, cells, parent, graph) {
|
|
38
30
|
if (!cells.length) return;
|
|
39
31
|
var tmp = parent.cell;
|
|
40
|
-
layout.execute(tmp);
|
|
32
|
+
layout.execute(tmp);
|
|
33
|
+
// if (graph.getModel().isVertex(tmp)) {
|
|
41
34
|
// graph.updateGroupBounds([tmp], graph.gridSize * 2, true);
|
|
42
35
|
// }
|
|
43
36
|
};
|
|
44
|
-
|
|
45
37
|
return DOrganicLayout;
|
|
46
38
|
}(DLayout);
|
|
47
39
|
DOrganicLayout.displayName = 'DOrganicLayout';
|
|
@@ -3,14 +3,12 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
3
3
|
import { DLayout } from './layout';
|
|
4
4
|
import mx from '../mxgraph';
|
|
5
5
|
var mxPartitionLayout = mx.mxPartitionLayout;
|
|
6
|
-
|
|
7
6
|
var typeDefs = _extends({}, DLayout.typeDefs, {
|
|
8
7
|
type: ['horizontal', 'vertical'],
|
|
9
8
|
spacing: [Number, String],
|
|
10
9
|
border: [Number, String],
|
|
11
10
|
resizeVertices: Boolean
|
|
12
11
|
});
|
|
13
|
-
|
|
14
12
|
var defaults = function defaults() {
|
|
15
13
|
return _extends({}, DLayout.defaults(), {
|
|
16
14
|
type: 'horizontal',
|
|
@@ -22,30 +20,24 @@ var defaults = function defaults() {
|
|
|
22
20
|
resizeVertices: true
|
|
23
21
|
});
|
|
24
22
|
};
|
|
25
|
-
|
|
26
23
|
export var DPartitionLayout = /*#__PURE__*/function (_DLayout) {
|
|
27
24
|
_inheritsLoose(DPartitionLayout, _DLayout);
|
|
28
|
-
|
|
29
25
|
function DPartitionLayout() {
|
|
30
26
|
return _DLayout.apply(this, arguments) || this;
|
|
31
27
|
}
|
|
32
|
-
|
|
33
28
|
var _proto = DPartitionLayout.prototype;
|
|
34
|
-
|
|
35
29
|
_proto.getLayout = function getLayout(graph) {
|
|
36
30
|
var _this$get = this.get(),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
type = _this$get.type,
|
|
32
|
+
spacing = _this$get.spacing,
|
|
33
|
+
border = _this$get.border,
|
|
34
|
+
resizeVertices = _this$get.resizeVertices;
|
|
42
35
|
var layout = new mxPartitionLayout(graph, type === 'horizontal');
|
|
43
36
|
layout.spacing = +spacing;
|
|
44
37
|
layout.border = +border;
|
|
45
38
|
layout.resizeVertices = resizeVertices;
|
|
46
39
|
return layout;
|
|
47
40
|
};
|
|
48
|
-
|
|
49
41
|
return DPartitionLayout;
|
|
50
42
|
}(DLayout);
|
|
51
43
|
DPartitionLayout.displayName = 'DPartitionLayout';
|
|
@@ -3,14 +3,12 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
3
3
|
import { DLayout } from './layout';
|
|
4
4
|
import mx from '../mxgraph';
|
|
5
5
|
var mxRadialTreeLayout = mx.mxRadialTreeLayout;
|
|
6
|
-
|
|
7
6
|
var typeDefs = _extends({}, DLayout.typeDefs, {
|
|
8
7
|
levelDistance: [Number, String],
|
|
9
8
|
nodeDistance: [Number, String],
|
|
10
9
|
rootx: [Number, String],
|
|
11
10
|
rooty: [Number, String]
|
|
12
11
|
});
|
|
13
|
-
|
|
14
12
|
var defaults = function defaults() {
|
|
15
13
|
return _extends({}, DLayout.defaults(), {
|
|
16
14
|
levelDistance: 60,
|
|
@@ -19,50 +17,40 @@ var defaults = function defaults() {
|
|
|
19
17
|
rooty: 0
|
|
20
18
|
});
|
|
21
19
|
};
|
|
22
|
-
|
|
23
20
|
export var DRadialLayout = /*#__PURE__*/function (_DLayout) {
|
|
24
21
|
_inheritsLoose(DRadialLayout, _DLayout);
|
|
25
|
-
|
|
26
22
|
function DRadialLayout() {
|
|
27
23
|
return _DLayout.apply(this, arguments) || this;
|
|
28
24
|
}
|
|
29
|
-
|
|
30
25
|
var _proto = DRadialLayout.prototype;
|
|
31
|
-
|
|
32
26
|
_proto.getLayout = function getLayout(graph) {
|
|
33
27
|
var _this$get = this.get(),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
levelDistance = _this$get.levelDistance,
|
|
29
|
+
nodeDistance = _this$get.nodeDistance;
|
|
37
30
|
var layout = new mxRadialTreeLayout(graph);
|
|
38
31
|
layout.autoRadius = true;
|
|
39
32
|
layout.nodeDistance = +nodeDistance;
|
|
40
|
-
layout.levelDistance = +levelDistance;
|
|
41
|
-
|
|
33
|
+
layout.levelDistance = +levelDistance;
|
|
34
|
+
// layout.useBoundingBox = false;
|
|
42
35
|
layout.edgeRouting = false;
|
|
43
36
|
return layout;
|
|
44
37
|
};
|
|
45
|
-
|
|
46
38
|
_proto.execute = function execute(layout, cells, parent, graph) {
|
|
47
39
|
if (!cells.length) return;
|
|
48
40
|
var roots = graph.findTreeRoots(parent.cell);
|
|
49
41
|
var tmp = cells[0];
|
|
50
|
-
|
|
51
42
|
if (roots && roots.length) {
|
|
52
43
|
tmp = roots[0];
|
|
53
44
|
}
|
|
54
|
-
|
|
55
45
|
var _this$get2 = this.get(),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
rootx = _this$get2.rootx,
|
|
47
|
+
rooty = _this$get2.rooty;
|
|
59
48
|
var geo = tmp.getGeometry().clone();
|
|
60
49
|
if (rootx != null) geo.x = +rootx;
|
|
61
50
|
if (rooty != null) geo.y = +rooty;
|
|
62
51
|
graph.model.setGeometry(tmp, geo);
|
|
63
52
|
layout.execute(parent.cell, tmp);
|
|
64
53
|
};
|
|
65
|
-
|
|
66
54
|
return DRadialLayout;
|
|
67
55
|
}(DLayout);
|
|
68
56
|
DRadialLayout.displayName = 'DRadialLayout';
|
|
@@ -4,7 +4,6 @@ import _fillInstanceProperty from "@babel/runtime-corejs3/core-js/instance/fill"
|
|
|
4
4
|
import { DLayout } from './layout';
|
|
5
5
|
import mx from '../mxgraph';
|
|
6
6
|
var mxStackLayout = mx.mxStackLayout;
|
|
7
|
-
|
|
8
7
|
var typeDefs = _extends({}, DLayout.typeDefs, {
|
|
9
8
|
type: ['horizontal', 'vertical'],
|
|
10
9
|
spacing: [Number, String],
|
|
@@ -13,7 +12,6 @@ var typeDefs = _extends({}, DLayout.typeDefs, {
|
|
|
13
12
|
border: [Number, String],
|
|
14
13
|
resizeParent: Boolean
|
|
15
14
|
});
|
|
16
|
-
|
|
17
15
|
var defaults = function defaults() {
|
|
18
16
|
return _extends({}, DLayout.defaults(), {
|
|
19
17
|
type: 'horizontal',
|
|
@@ -29,25 +27,20 @@ var defaults = function defaults() {
|
|
|
29
27
|
resizeParent: false
|
|
30
28
|
});
|
|
31
29
|
};
|
|
32
|
-
|
|
33
30
|
export var DStackLayout = /*#__PURE__*/function (_DLayout) {
|
|
34
31
|
_inheritsLoose(DStackLayout, _DLayout);
|
|
35
|
-
|
|
36
32
|
function DStackLayout() {
|
|
37
33
|
return _DLayout.apply(this, arguments) || this;
|
|
38
34
|
}
|
|
39
|
-
|
|
40
35
|
var _proto = DStackLayout.prototype;
|
|
41
|
-
|
|
42
36
|
_proto.getLayout = function getLayout(graph) {
|
|
43
37
|
var _this$get = this.get(),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
38
|
+
type = _this$get.type,
|
|
39
|
+
spacing = _this$get.spacing,
|
|
40
|
+
wrap = _this$get.wrap,
|
|
41
|
+
fill = _fillInstanceProperty(_this$get),
|
|
42
|
+
border = _this$get.border,
|
|
43
|
+
resizeParent = _this$get.resizeParent;
|
|
51
44
|
var layout = new mxStackLayout(graph, type === 'horizontal');
|
|
52
45
|
layout.spacing = +spacing;
|
|
53
46
|
layout.wrap = wrap ? +wrap : null;
|
|
@@ -56,7 +49,6 @@ export var DStackLayout = /*#__PURE__*/function (_DLayout) {
|
|
|
56
49
|
layout.resizeParent = resizeParent;
|
|
57
50
|
return layout;
|
|
58
51
|
};
|
|
59
|
-
|
|
60
52
|
return DStackLayout;
|
|
61
53
|
}(DLayout);
|
|
62
54
|
DStackLayout.displayName = 'DStackLayout';
|
|
@@ -3,7 +3,6 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
3
3
|
import { DLayout } from './layout';
|
|
4
4
|
import mx from '../mxgraph';
|
|
5
5
|
var mxCompactTreeLayout = mx.mxCompactTreeLayout;
|
|
6
|
-
|
|
7
6
|
var typeDefs = _extends({}, DLayout.typeDefs, {
|
|
8
7
|
type: ['horizontal', 'vertical'],
|
|
9
8
|
levelDistance: [Number, String],
|
|
@@ -11,7 +10,6 @@ var typeDefs = _extends({}, DLayout.typeDefs, {
|
|
|
11
10
|
resizeParent: Boolean,
|
|
12
11
|
groupPadding: [Number, String]
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var defaults = function defaults() {
|
|
16
14
|
return _extends({}, DLayout.defaults(), {
|
|
17
15
|
type: 'horizontal',
|
|
@@ -23,51 +21,43 @@ var defaults = function defaults() {
|
|
|
23
21
|
groupPadding: 0
|
|
24
22
|
});
|
|
25
23
|
};
|
|
26
|
-
|
|
27
24
|
export var DTreeLayout = /*#__PURE__*/function (_DLayout) {
|
|
28
25
|
_inheritsLoose(DTreeLayout, _DLayout);
|
|
29
|
-
|
|
30
26
|
function DTreeLayout() {
|
|
31
27
|
return _DLayout.apply(this, arguments) || this;
|
|
32
28
|
}
|
|
33
|
-
|
|
34
29
|
var _proto = DTreeLayout.prototype;
|
|
35
|
-
|
|
36
30
|
_proto.getLayout = function getLayout(graph) {
|
|
37
31
|
var _this$get = this.get(),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
type = _this$get.type,
|
|
33
|
+
levelDistance = _this$get.levelDistance,
|
|
34
|
+
nodeDistance = _this$get.nodeDistance,
|
|
35
|
+
resizeParent = _this$get.resizeParent,
|
|
36
|
+
groupPadding = _this$get.groupPadding;
|
|
44
37
|
var layout = new mxCompactTreeLayout(graph, type === 'horizontal');
|
|
45
38
|
layout.nodeDistance = +nodeDistance;
|
|
46
|
-
layout.groupPadding = +groupPadding;
|
|
47
|
-
|
|
39
|
+
layout.groupPadding = +groupPadding;
|
|
40
|
+
// layout.moveTree = true;
|
|
48
41
|
layout.maintainParentLocation = true;
|
|
49
42
|
layout.resizeParent = resizeParent;
|
|
50
|
-
layout.levelDistance = +levelDistance;
|
|
51
|
-
|
|
43
|
+
layout.levelDistance = +levelDistance;
|
|
44
|
+
// layout.useBoundingBox = false;
|
|
52
45
|
layout.edgeRouting = false;
|
|
53
46
|
return layout;
|
|
54
47
|
};
|
|
55
|
-
|
|
56
48
|
_proto.execute = function execute(layout, cells, parent, graph) {
|
|
57
49
|
if (!cells.length) return;
|
|
58
50
|
var roots = graph.findTreeRoots(parent.cell);
|
|
59
51
|
var tmp = cells[0];
|
|
60
|
-
|
|
61
52
|
if (roots && roots.length) {
|
|
62
53
|
tmp = roots[0];
|
|
63
54
|
}
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
layout.execute(parent.cell, tmp);
|
|
56
|
+
// tmp = graph.getModel().getParent(tmp);
|
|
66
57
|
// if (graph.getModel().isVertex(tmp)) {
|
|
67
58
|
// graph.updateGroupBounds([tmp], graph.gridSize * 2, true);
|
|
68
59
|
// }
|
|
69
60
|
};
|
|
70
|
-
|
|
71
61
|
return DTreeLayout;
|
|
72
62
|
}(DLayout);
|
|
73
63
|
DTreeLayout.displayName = 'DTreeLayout';
|
|
@@ -2,49 +2,42 @@ import _Object$assign from "@babel/runtime-corejs3/core-js/object/assign";
|
|
|
2
2
|
import mx from '../mx';
|
|
3
3
|
export default function () {
|
|
4
4
|
var mxConnectionHandler = mx.mxConnectionHandler,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
mxConstants = mx.mxConstants,
|
|
6
|
+
mxCellState = mx.mxCellState;
|
|
7
|
+
// mxConnectionHandler.prototype.outlineConnect = true;
|
|
7
8
|
// Overrides edge preview to use current edge shape and default style
|
|
8
|
-
|
|
9
9
|
mxConnectionHandler.prototype.livePreview = true;
|
|
10
|
-
mxConnectionHandler.prototype.cursor = 'crosshair';
|
|
11
|
-
|
|
10
|
+
mxConnectionHandler.prototype.cursor = 'crosshair';
|
|
11
|
+
// Overrides dashed state with current edge style
|
|
12
12
|
var connectionHandlerCreateShape = mxConnectionHandler.prototype.createShape;
|
|
13
|
-
|
|
14
13
|
mxConnectionHandler.prototype.createShape = function () {
|
|
15
|
-
var shape = connectionHandlerCreateShape.apply(this, arguments);
|
|
16
|
-
|
|
14
|
+
var shape = connectionHandlerCreateShape.apply(this, arguments);
|
|
15
|
+
// shape.isDashed = this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED] == '1';
|
|
17
16
|
shape.isDashed = false;
|
|
18
17
|
return shape;
|
|
19
18
|
};
|
|
20
|
-
|
|
21
19
|
var defaultEdgeStyle = {
|
|
22
20
|
'edgeStyle': 'orthogonalEdgeStyle',
|
|
23
21
|
'rounded': '0',
|
|
24
22
|
'jettySize': 'auto',
|
|
25
23
|
'orthogonalLoop': '1'
|
|
26
|
-
};
|
|
27
|
-
|
|
24
|
+
};
|
|
25
|
+
// Uses current edge style for connect preview
|
|
28
26
|
mxConnectionHandler.prototype.createEdgeState = function () {
|
|
29
27
|
var style = 'html=1;';
|
|
30
|
-
|
|
31
28
|
for (var key in defaultEdgeStyle) {
|
|
32
29
|
style += key + "=" + defaultEdgeStyle[key] + ";";
|
|
33
30
|
}
|
|
34
|
-
|
|
35
31
|
var edge = this.graph.createEdge(null, null, null, null, null, style);
|
|
36
32
|
var state = new mxCellState(this.graph.view, edge, this.graph.getCellStyle(edge));
|
|
37
|
-
|
|
38
33
|
_Object$assign(state.style, defaultEdgeStyle);
|
|
39
|
-
|
|
40
34
|
return state;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
};
|
|
36
|
+
// Overrides live preview to keep current style
|
|
37
|
+
mxConnectionHandler.prototype.updatePreview = function () {
|
|
38
|
+
// do not change color of preview
|
|
39
|
+
};
|
|
40
|
+
// Disables built-in connection starts
|
|
48
41
|
mxConnectionHandler.prototype.isValidSource = function () {
|
|
49
42
|
return false;
|
|
50
43
|
};
|
|
@@ -2,10 +2,10 @@ import mx, { createSvgImage } from '../mx';
|
|
|
2
2
|
import '../util/mxConstants';
|
|
3
3
|
export default function () {
|
|
4
4
|
var mxConstraintHandler = mx.mxConstraintHandler,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
mxConstraintHandler.prototype.pointImage = createSvgImage(5, 5, '<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="' + mxConstants.HANDLE_FILLCOLOR + '"/>');
|
|
8
|
-
|
|
5
|
+
mxConstants = mx.mxConstants,
|
|
6
|
+
mxEllipse = mx.mxEllipse;
|
|
7
|
+
mxConstraintHandler.prototype.pointImage = createSvgImage(5, 5, '<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="' + mxConstants.HANDLE_FILLCOLOR + '"/>');
|
|
8
|
+
// Overrides highlight shape for connection points
|
|
9
9
|
mxConstraintHandler.prototype.createHighlightShape = function () {
|
|
10
10
|
var hl = new mxEllipse(null, this.highlightColor, this.highlightColor, 0);
|
|
11
11
|
hl.opacity = mxConstants.HIGHLIGHT_OPACITY;
|
|
@@ -3,41 +3,37 @@ import '../util/mxConstants';
|
|
|
3
3
|
import { mainHandle } from './mxVertexHandler';
|
|
4
4
|
export default function () {
|
|
5
5
|
var mxEdgeHandler = mx.mxEdgeHandler,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
mxConstants = mx.mxConstants,
|
|
7
|
+
mxElbowEdgeHandler = mx.mxElbowEdgeHandler,
|
|
8
|
+
mxImageShape = mx.mxImageShape,
|
|
9
|
+
mxRectangleShape = mx.mxRectangleShape,
|
|
10
|
+
mxRectangle = mx.mxRectangle;
|
|
11
11
|
var terminalHandle = createSvgImage(18, 18, '<circle cx="9" cy="9" r="5" stroke="#fff" fill="' + mxConstants.HANDLE_FILLCOLOR + '" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>');
|
|
12
12
|
var fixedHandle = createSvgImage(18, 18, '<circle cx="9" cy="9" r="5" stroke="#fff" fill="' + mxConstants.HANDLE_FILLCOLOR + '" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>');
|
|
13
|
-
mxEdgeHandler.prototype.handleImage = mainHandle;
|
|
13
|
+
mxEdgeHandler.prototype.handleImage = mainHandle;
|
|
14
|
+
// mxEdgeHandler.prototype.terminalHandleImage = terminalHandle;
|
|
14
15
|
// mxEdgeHandler.prototype.fixedHandleImage = fixedHandle;
|
|
15
16
|
// mxEdgeHandler.prototype.labelHandleImage = secondaryHandle;
|
|
16
17
|
// Shows secondary handle for fixed connection points
|
|
17
|
-
|
|
18
18
|
mxEdgeHandler.prototype.createHandleShape = function (index) {
|
|
19
19
|
var source = index != null && index == 0;
|
|
20
20
|
var terminalState = this.state.getVisibleTerminalState(source);
|
|
21
21
|
var c = index != null && (index == 0 || index >= this.state.absolutePoints.length - 1 || this.constructor == mxElbowEdgeHandler && index == 2) ? this.graph.getConnectionConstraint(this.state, terminalState, source) : null;
|
|
22
22
|
var pt = c != null ? this.graph.getConnectionPoint(this.state.getVisibleTerminalState(source), c) : null;
|
|
23
23
|
var img = pt != null ? fixedHandle : c != null && terminalState != null ? terminalHandle : this.handleImage;
|
|
24
|
-
|
|
25
24
|
if (img != null) {
|
|
26
|
-
var shape = new mxImageShape(new mxRectangle(0, 0, img.width, img.height), img.src);
|
|
27
|
-
|
|
25
|
+
var shape = new mxImageShape(new mxRectangle(0, 0, img.width, img.height), img.src);
|
|
26
|
+
// Allows HTML rendering of the images
|
|
28
27
|
shape.preserveImageAspect = false;
|
|
29
28
|
return shape;
|
|
30
29
|
} else {
|
|
31
30
|
var s = mxConstants.HANDLE_SIZE;
|
|
32
|
-
|
|
33
31
|
if (this.preferHtml) {
|
|
34
32
|
s -= 1;
|
|
35
33
|
}
|
|
36
|
-
|
|
37
34
|
return new mxRectangleShape(new mxRectangle(0, 0, s, s), mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
|
|
38
35
|
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
};
|
|
37
|
+
// Enables snapping waypoints to terminals
|
|
42
38
|
mxEdgeHandler.prototype.snapToTerminals = true;
|
|
43
39
|
}
|