@king-design/vue 2.1.4 → 2.1.6
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 +5 -0
- package/components/affix/index.spec.js +108 -84
- package/components/affix/index.vdt.js +8 -5
- package/components/affix/useStyle.js +19 -8
- package/components/badge/index.js +2 -0
- package/components/badge/index.vdt.js +9 -5
- package/components/badge/styles.js +2 -0
- package/components/breadcrumb/index.js +4 -0
- package/components/breadcrumb/index.spec.js +6 -6
- package/components/breadcrumb/index.vdt.js +14 -5
- package/components/breadcrumb/item.js +8 -0
- package/components/breadcrumb/item.vdt.js +6 -3
- package/components/breadcrumb/styles.js +3 -0
- package/components/button/dynamicButton.d.ts +1 -1
- package/components/button/dynamicButton.js +5 -2
- package/components/button/group.js +10 -2
- package/components/button/group.vdt.js +7 -4
- package/components/button/index.js +27 -3
- package/components/button/index.spec.js +96 -74
- package/components/button/index.vdt.js +29 -19
- package/components/button/styles.d.ts +2 -2
- package/components/button/styles.js +48 -4
- package/components/card/column.js +2 -0
- package/components/card/column.vdt.js +10 -5
- package/components/card/index.js +4 -0
- package/components/card/index.vdt.js +16 -4
- package/components/carousel/index.js +19 -1
- package/components/carousel/index.spec.js +163 -127
- package/components/carousel/index.vdt.js +15 -12
- package/components/carousel/item.js +2 -0
- package/components/carousel/item.vdt.js +7 -4
- package/components/carousel/styles.js +1 -0
- package/components/carousel/useAutoplay.js +4 -0
- package/components/carousel/useItems.js +20 -4
- package/components/carousel/useSlide.js +89 -57
- package/components/cascader/index.d.ts +45 -0
- package/components/cascader/index.js +18 -3
- package/components/cascader/index.spec.js +445 -354
- package/components/cascader/index.vdt.js +31 -14
- package/components/cascader/styles.js +6 -0
- package/components/cascader/useFields.js +4 -1
- package/components/cascader/useFilterable.js +19 -2
- package/components/cascader/useLabel.js +9 -1
- package/components/cascader/useLoad.js +35 -22
- package/components/cascader/useValue.d.ts +2 -2
- package/components/cascader/useValue.js +26 -5
- package/components/checkbox/index.js +27 -5
- package/components/checkbox/index.spec.js +171 -129
- package/components/checkbox/index.vdt.js +16 -12
- package/components/checkbox/styles.js +10 -0
- package/components/code/crossDomain.js +9 -2
- package/components/code/index.js +9 -0
- package/components/code/index.spec.js +55 -46
- package/components/code/index.vdt.js +14 -6
- package/components/code/styles.js +1 -0
- package/components/code/useEditor.js +10 -5
- package/components/collapse/index.d.ts +1 -1
- package/components/collapse/index.js +14 -3
- package/components/collapse/index.spec.js +60 -47
- package/components/collapse/index.vdt.js +12 -4
- package/components/collapse/item.js +10 -0
- package/components/collapse/item.vdt.js +14 -7
- package/components/collapse/styles.js +1 -0
- package/components/colorpicker/drag.js +5 -0
- package/components/colorpicker/index.js +4 -0
- package/components/colorpicker/index.spec.js +259 -211
- package/components/colorpicker/index.vdt.js +11 -8
- package/components/colorpicker/panel.js +5 -0
- package/components/colorpicker/panel.vdt.js +26 -21
- package/components/colorpicker/styles.js +13 -2
- package/components/colorpicker/useDrag.js +26 -22
- package/components/colorpicker/useInput.js +16 -0
- package/components/colorpicker/usePointer.js +18 -15
- package/components/colorpicker/useValue.js +7 -2
- package/components/context.d.ts +2 -2
- package/components/context.js +19 -2
- package/components/datepicker/basepicker.d.ts +8 -8
- package/components/datepicker/basepicker.js +90 -20
- package/components/datepicker/calendar.js +11 -0
- package/components/datepicker/calendar.vdt.js +14 -11
- package/components/datepicker/constants.js +1 -0
- package/components/datepicker/dayjs.js +1 -1
- package/components/datepicker/helpers.js +15 -3
- package/components/datepicker/index.d.ts +63 -0
- package/components/datepicker/index.js +32 -6
- package/components/datepicker/index.spec.js +1448 -1141
- package/components/datepicker/index.vdt.js +34 -20
- package/components/datepicker/shortcuts.d.ts +1 -1
- package/components/datepicker/shortcuts.js +4 -0
- package/components/datepicker/styles.js +8 -0
- package/components/datepicker/time.d.ts +1 -1
- package/components/datepicker/time.js +23 -3
- package/components/datepicker/time.vdt.js +5 -4
- package/components/datepicker/useDays.js +9 -2
- package/components/datepicker/useDisabled.js +23 -6
- package/components/datepicker/useFocusDate.js +2 -0
- package/components/datepicker/useFormats.js +15 -6
- package/components/datepicker/useKeyboards.js +36 -20
- package/components/datepicker/useMonths.js +6 -0
- package/components/datepicker/usePanel.js +10 -0
- package/components/datepicker/useShowDate.js +37 -10
- package/components/datepicker/useStatus.js +15 -3
- package/components/datepicker/useValue.js +35 -22
- package/components/datepicker/useYears.js +15 -4
- package/components/diagram/diagram.js +43 -17
- package/components/diagram/diagram.vdt.js +5 -2
- 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 +495 -369
- package/components/diagram/layouts/circle.js +14 -6
- package/components/diagram/layouts/flow.js +15 -7
- package/components/diagram/layouts/layout.js +28 -6
- package/components/diagram/layouts/organic.js +11 -3
- package/components/diagram/layouts/partition.js +12 -4
- package/components/diagram/layouts/radial.js +18 -6
- package/components/diagram/layouts/stack.js +14 -6
- package/components/diagram/layouts/tree.js +21 -11
- package/components/diagram/mxgraph/handler/mxConnectionHandler.js +22 -15
- package/components/diagram/mxgraph/handler/mxConstraintHandler.js +4 -4
- package/components/diagram/mxgraph/handler/mxEdgeHandler.js +15 -11
- package/components/diagram/mxgraph/handler/mxGraphHandler.js +9 -6
- package/components/diagram/mxgraph/handler/mxRubberband.js +4 -4
- package/components/diagram/mxgraph/handler/mxVertexHandler.js +10 -7
- package/components/diagram/mxgraph/index.js +2 -0
- package/components/diagram/mxgraph/mx.js +3 -3
- package/components/diagram/mxgraph/shape/mxCloud.js +2 -2
- package/components/diagram/mxgraph/shape/mxCylinder.js +9 -4
- 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 +12 -6
- package/components/diagram/mxgraph/shape/mxShape.js +1 -0
- 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 +7 -5
- package/components/diagram/mxgraph/view/mxCellEditor.js +29 -16
- package/components/diagram/mxgraph/view/mxCellRenderer.js +2 -0
- package/components/diagram/mxgraph/view/mxGraph.js +32 -14
- package/components/diagram/shapes/base.d.ts +1 -1
- package/components/diagram/shapes/base.js +39 -9
- package/components/diagram/shapes/callout.js +23 -10
- package/components/diagram/shapes/circle.js +10 -3
- package/components/diagram/shapes/document.js +16 -5
- package/components/diagram/shapes/ellipse.js +5 -0
- package/components/diagram/shapes/generateShapes.d.ts +1 -1
- package/components/diagram/shapes/generateShapes.js +9 -0
- package/components/diagram/shapes/hexagon.js +26 -9
- package/components/diagram/shapes/image.js +9 -1
- package/components/diagram/shapes/line.d.ts +2 -2
- package/components/diagram/shapes/line.js +48 -13
- package/components/diagram/shapes/parallelogram.js +26 -9
- package/components/diagram/shapes/rectangle.js +9 -1
- package/components/diagram/shapes/shape.js +35 -6
- package/components/diagram/shapes/square.js +11 -3
- package/components/diagram/shapes/text.js +5 -0
- package/components/diagram/styles.js +1 -0
- package/components/dialog/alert.vdt.js +19 -9
- package/components/dialog/base.js +29 -1
- package/components/dialog/base.vdt.js +29 -14
- package/components/dialog/index.js +31 -6
- package/components/dialog/index.spec.js +554 -406
- package/components/dialog/staticMethods.d.ts +1 -1
- package/components/dialog/staticMethods.js +13 -2
- package/components/dialog/styles.js +11 -0
- package/components/dialog/useDraggable.js +6 -0
- package/components/dialog/useEscClosable.js +12 -4
- package/components/dialog/useFixBody.d.ts +1 -1
- package/components/dialog/useFixBody.js +11 -0
- package/components/dialog/usePosition.js +5 -0
- package/components/drawer/index.js +5 -0
- package/components/drawer/index.spec.js +168 -126
- package/components/drawer/index.vdt.js +9 -3
- package/components/drawer/styles.d.ts +2 -2
- package/components/drawer/styles.js +4 -0
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +89 -33
- package/components/dropdown/index.js +6 -2
- package/components/dropdown/index.spec.js +496 -388
- package/components/dropdown/item.js +25 -4
- package/components/dropdown/item.vdt.js +8 -5
- package/components/dropdown/menu.js +29 -12
- package/components/dropdown/menu.vdt.js +13 -5
- package/components/dropdown/styles.js +9 -0
- package/components/dropdown/useKeyboard.d.ts +2 -2
- package/components/dropdown/useKeyboard.js +30 -8
- package/components/dropdown/usePosition.d.ts +1 -1
- package/components/dropdown/usePosition.js +22 -12
- package/components/dropdown/useTransition.js +8 -0
- package/components/editable/index.d.ts +1 -1
- package/components/editable/index.js +28 -4
- package/components/editable/index.spec.js +189 -152
- package/components/editable/index.vdt.js +11 -8
- package/components/editable/styles.js +1 -0
- package/components/form/form.js +18 -0
- package/components/form/form.vdt.js +7 -4
- package/components/form/index.spec.js +1280 -1057
- package/components/form/item.d.ts +1 -1
- package/components/form/item.js +12 -0
- package/components/form/item.vdt.js +31 -17
- package/components/form/methods.d.ts +5 -5
- package/components/form/methods.js +12 -2
- package/components/form/styles.js +8 -0
- package/components/form/useDirty.js +7 -2
- package/components/form/useError.js +10 -2
- package/components/form/useValidate.d.ts +1 -1
- package/components/form/useValidate.js +24 -8
- package/components/grid/col.d.ts +3 -3
- package/components/grid/col.js +7 -0
- package/components/grid/col.vdt.js +13 -8
- package/components/grid/constants.d.ts +6 -6
- package/components/grid/row.js +5 -0
- package/components/grid/row.vdt.js +8 -5
- package/components/grid/styles.js +7 -0
- package/components/grid/useBreakpoints.js +5 -0
- package/components/grid/useGutter.js +25 -5
- package/components/icon/index.js +10 -0
- package/components/icon/index.vdt.js +13 -7
- package/components/icon/styles.js +1 -0
- package/components/input/index.d.ts +3 -3
- package/components/input/index.js +14 -0
- package/components/input/index.spec.js +239 -185
- package/components/input/index.vdt.js +49 -39
- package/components/input/search.js +20 -0
- package/components/input/search.vdt.js +9 -6
- package/components/input/styles.js +26 -0
- package/components/input/useAutoRows.js +18 -6
- package/components/input/useAutoWidth.js +5 -0
- package/components/input/useFrozen.js +6 -0
- package/components/input/useShowPassword.js +5 -2
- package/components/layout/aside.js +17 -5
- package/components/layout/aside.vdt.js +9 -5
- package/components/layout/body.js +17 -5
- package/components/layout/footer.js +7 -1
- package/components/layout/header.js +21 -7
- package/components/layout/layout.js +24 -9
- package/components/layout/styles.js +13 -2
- package/components/layout/template.vdt.js +4 -2
- package/components/layout/useParse.js +7 -0
- package/components/menu/index.spec.js +242 -189
- package/components/menu/item.js +16 -3
- package/components/menu/item.vdt.js +32 -20
- package/components/menu/menu.js +11 -2
- package/components/menu/menu.vdt.js +12 -6
- package/components/menu/styles.js +18 -0
- package/components/menu/useDropdown.js +9 -4
- package/components/menu/useExpanded.js +14 -0
- package/components/menu/useHighlight.js +36 -26
- package/components/message/index.spec.js +73 -58
- package/components/message/message.js +19 -0
- package/components/message/message.vdt.js +8 -5
- package/components/message/messages.js +12 -0
- package/components/message/messages.vdt.js +1 -0
- package/components/message/styles.js +9 -0
- package/components/pagination/index.d.ts +1 -1
- package/components/pagination/index.js +46 -10
- package/components/pagination/index.spec.js +173 -133
- package/components/pagination/index.vdt.js +34 -14
- package/components/pagination/styles.js +4 -0
- package/components/portal.d.ts +1 -1
- package/components/portal.js +29 -2
- package/components/position.d.ts +12 -12
- package/components/position.js +88 -32
- package/components/progress/index.d.ts +6 -6
- package/components/progress/index.js +12 -0
- package/components/progress/index.spec.js +191 -143
- package/components/progress/index.vdt.js +11 -8
- package/components/progress/styles.js +6 -0
- package/components/progress/useColor.js +7 -2
- package/components/progress/useStatus.d.ts +1 -1
- package/components/progress/useStatus.js +5 -2
- package/components/radio/index.js +18 -3
- package/components/radio/index.spec.js +149 -111
- package/components/radio/index.vdt.js +17 -14
- package/components/radio/styles.js +10 -0
- package/components/rate/index.js +7 -0
- package/components/rate/index.spec.js +79 -64
- package/components/rate/index.vdt.js +21 -8
- package/components/rate/styles.js +3 -0
- package/components/rate/useActiveValue.js +7 -2
- package/components/scrollSelect/index.d.ts +2 -2
- package/components/scrollSelect/index.js +7 -0
- package/components/scrollSelect/index.spec.js +131 -100
- package/components/scrollSelect/index.vdt.js +11 -6
- package/components/scrollSelect/styles.js +7 -0
- package/components/scrollSelect/useList.js +17 -3
- package/components/scrollSelect/useMouseEvents.js +49 -31
- package/components/scrollSelect/useTranslate.js +11 -1
- package/components/select/base.js +35 -5
- package/components/select/base.vdt.js +38 -23
- package/components/select/group.js +5 -0
- package/components/select/group.vdt.js +10 -4
- package/components/select/index.spec.js +452 -361
- package/components/select/menu.js +5 -0
- package/components/select/menu.vdt.js +33 -18
- package/components/select/option.js +16 -2
- package/components/select/option.vdt.js +14 -7
- package/components/select/select.d.ts +33 -0
- package/components/select/select.js +20 -3
- package/components/select/select.vdt.js +17 -9
- package/components/select/styles.js +33 -0
- package/components/select/useBaseLabel.d.ts +1 -1
- package/components/select/useBaseLabel.js +17 -4
- package/components/select/useCard.js +4 -0
- package/components/select/useEqualWidth.js +1 -0
- package/components/select/useFilterable.js +27 -5
- package/components/select/useFocusout.js +8 -0
- package/components/select/useInput.js +10 -6
- package/components/select/useLabel.js +13 -3
- package/components/select/useSearchable.js +10 -0
- package/components/skeleton/item.d.ts +1 -1
- package/components/skeleton/item.js +4 -0
- package/components/skeleton/item.vdt.js +6 -1
- package/components/skeleton/skeleton.js +4 -0
- package/components/skeleton/skeleton.vdt.js +12 -6
- package/components/skeleton/style.d.ts +1 -1
- package/components/skeleton/style.js +1 -0
- package/components/slider/index.d.ts +1 -1
- package/components/slider/index.js +7 -0
- package/components/slider/index.spec.js +585 -467
- package/components/slider/index.vdt.js +45 -32
- package/components/slider/styles.js +14 -0
- package/components/slider/useClick.js +11 -2
- package/components/slider/useDraggable.js +34 -23
- package/components/slider/useKeyboard.js +18 -7
- package/components/slider/useMarks.d.ts +5 -5
- package/components/slider/useMarks.js +13 -5
- package/components/slider/usePoints.d.ts +2 -2
- package/components/slider/usePoints.js +21 -7
- package/components/slider/useStyles.d.ts +1 -1
- package/components/slider/useStyles.js +10 -5
- package/components/slider/useTooltip.js +10 -2
- package/components/slider/useValue.d.ts +1 -1
- package/components/slider/useValue.js +22 -7
- package/components/spin/index.js +4 -0
- package/components/spin/index.vdt.js +11 -4
- package/components/spin/styles.js +2 -0
- package/components/spinner/index.d.ts +4 -4
- package/components/spinner/index.js +24 -9
- package/components/spinner/index.spec.js +460 -359
- package/components/spinner/index.vdt.js +13 -10
- package/components/spinner/styles.js +3 -0
- package/components/spinner/useChange.js +16 -4
- package/components/spinner/useFormatter.js +16 -6
- package/components/spinner/useStep.d.ts +3 -3
- package/components/spinner/useStep.js +20 -2
- package/components/spinner/useValue.js +26 -11
- package/components/split/index.js +7 -0
- package/components/split/index.spec.js +267 -223
- package/components/split/index.vdt.js +17 -8
- package/components/split/style.d.ts +1 -1
- package/components/split/style.js +8 -0
- package/components/split/useDraggable.js +35 -11
- package/components/split/useSize.js +5 -2
- package/components/steps/context.d.ts +2 -2
- package/components/steps/index.js +10 -2
- package/components/steps/index.spec.js +27 -21
- package/components/steps/index.vdt.js +10 -8
- package/components/steps/step.js +2 -0
- package/components/steps/step.vdt.js +12 -8
- package/components/steps/styles.js +27 -0
- package/components/switch/index.js +23 -2
- package/components/switch/index.spec.js +224 -188
- package/components/switch/index.vdt.js +32 -16
- package/components/switch/styles.js +14 -3
- package/components/switch/useDraggable.js +18 -10
- package/components/table/cell.js +6 -0
- package/components/table/cell.vdt.js +21 -14
- package/components/table/column.d.ts +1 -1
- package/components/table/column.js +5 -0
- package/components/table/column.vdt.js +30 -19
- package/components/table/exportTable.js +56 -45
- package/components/table/index.spec.js +984 -780
- package/components/table/row.d.ts +1 -1
- package/components/table/row.js +41 -12
- package/components/table/row.vdt.js +39 -27
- package/components/table/styles.js +11 -0
- package/components/table/table.d.ts +5 -5
- package/components/table/table.js +50 -18
- package/components/table/table.vdt.js +85 -61
- package/components/table/useChecked.d.ts +1 -1
- package/components/table/useChecked.js +61 -20
- package/components/table/useColumns.js +16 -3
- package/components/table/useDisableRow.js +12 -2
- package/components/table/useDraggable.js +12 -4
- package/components/table/useExpandable.js +5 -2
- package/components/table/useFixedColumns.d.ts +1 -1
- package/components/table/useFixedColumns.js +23 -4
- package/components/table/useGroup.d.ts +1 -1
- package/components/table/useGroup.js +24 -7
- package/components/table/useMerge.d.ts +4 -4
- package/components/table/useMerge.js +14 -2
- package/components/table/usePagination.js +18 -4
- package/components/table/useResizable.js +10 -2
- package/components/table/useRestRowStatus.js +6 -2
- package/components/table/useScroll.d.ts +1 -1
- package/components/table/useScroll.js +3 -0
- package/components/table/useSelected.js +5 -2
- package/components/table/useSortable.js +8 -2
- package/components/table/useStickyHeader.js +7 -3
- package/components/table/useStickyScrollbar.js +16 -6
- package/components/table/useTree.js +12 -1
- package/components/table/useWidth.js +30 -14
- package/components/tabs/index.js +51 -29
- package/components/tabs/index.spec.js +74 -56
- package/components/tabs/index.vdt.js +16 -13
- package/components/tabs/styles.js +16 -0
- package/components/tabs/tab.js +10 -0
- package/components/tabs/tab.vdt.js +10 -6
- package/components/tabs/useActiveBar.js +11 -2
- package/components/tabs/useScroll.js +20 -4
- package/components/tag/base.js +8 -0
- package/components/tag/index.js +4 -2
- package/components/tag/index.spec.js +25 -19
- package/components/tag/index.vdt.js +15 -8
- package/components/tag/styles.js +9 -0
- package/components/timeline/item.js +4 -0
- package/components/timeline/item.vdt.js +9 -4
- package/components/timeline/styles.d.ts +2 -2
- package/components/timeline/styles.js +4 -0
- package/components/timeline/timeline.js +2 -0
- package/components/timeline/timeline.vdt.js +5 -2
- package/components/timepicker/index.js +7 -2
- package/components/timepicker/index.spec.js +368 -293
- package/components/timepicker/panelPicker.d.ts +54 -0
- package/components/timepicker/panelPicker.js +11 -2
- package/components/timepicker/panelPicker.vdt.js +24 -14
- package/components/timepicker/selectPicker.js +5 -0
- package/components/timepicker/selectPicker.vdt.js +10 -5
- package/components/timepicker/styles.js +1 -0
- package/components/timepicker/useDisabled.js +4 -2
- package/components/timepicker/useFormats.js +13 -4
- package/components/timepicker/useStep.d.ts +1 -1
- package/components/timepicker/useStep.js +17 -8
- package/components/timepicker/useValue.js +21 -16
- package/components/tip/index.js +2 -0
- package/components/tip/index.vdt.js +17 -5
- package/components/tip/styles.js +3 -0
- package/components/tooltip/content.js +28 -0
- package/components/tooltip/content.vdt.js +25 -15
- package/components/tooltip/index.js +7 -3
- package/components/tooltip/index.spec.js +572 -434
- package/components/tooltip/styles.d.ts +1 -1
- package/components/tooltip/styles.js +10 -2
- package/components/tooltip/tooltip.js +15 -2
- package/components/tooltip/useArrow.js +14 -11
- package/components/transfer/index.d.ts +1 -1
- package/components/transfer/index.js +13 -1
- package/components/transfer/index.spec.js +194 -159
- package/components/transfer/index.vdt.js +34 -16
- package/components/transfer/styles.js +10 -0
- package/components/transfer/useCheck.d.ts +1 -1
- package/components/transfer/useCheck.js +15 -1
- package/components/transfer/useFilter.d.ts +1 -1
- package/components/transfer/useFilter.js +30 -9
- package/components/transfer/useTransfer.js +26 -10
- package/components/tree/index.d.ts +3 -3
- package/components/tree/index.js +22 -4
- package/components/tree/index.spec.js +355 -285
- package/components/tree/index.vdt.js +23 -12
- package/components/tree/styles.js +16 -2
- package/components/tree/useChecked.js +26 -3
- package/components/tree/useDraggable.js +42 -12
- package/components/tree/useExpanded.js +43 -26
- package/components/tree/useFilter.js +10 -3
- package/components/tree/useNodes.d.ts +1 -1
- package/components/tree/useNodes.js +4 -0
- package/components/tree/useSelected.js +38 -21
- package/components/tree/useTransitionEvent.js +5 -3
- package/components/treeSelect/index.d.ts +27 -0
- package/components/treeSelect/index.js +36 -9
- package/components/treeSelect/index.spec.js +160 -123
- package/components/treeSelect/index.vdt.js +20 -14
- package/components/treeSelect/styles.js +1 -0
- package/components/treeSelect/useValue.js +11 -0
- package/components/types.d.ts +3 -3
- package/components/upload/ajaxUploader.d.ts +1 -1
- package/components/upload/ajaxUploader.js +17 -0
- package/components/upload/index.d.ts +4 -4
- package/components/upload/index.js +14 -0
- package/components/upload/index.spec.js +249 -142
- package/components/upload/index.vdt.js +27 -12
- package/components/upload/styles.js +30 -0
- package/components/upload/useAccept.js +10 -2
- package/components/upload/useDrag.js +7 -0
- package/components/upload/useFiles.js +145 -103
- package/components/upload/useShowImage.js +3 -0
- package/components/upload/useUpload.js +69 -47
- package/components/utils.d.ts +3 -3
- package/components/utils.js +47 -12
- package/components/virtual.js +37 -9
- package/components/wave/index.js +31 -5
- package/hooks/useDelayClose.js +6 -2
- package/hooks/useDocumentClick.js +16 -8
- package/hooks/useDraggable.d.ts +1 -1
- package/hooks/useDraggable.js +9 -0
- package/hooks/useKeyboard.d.ts +3 -3
- package/hooks/useKeyboard.js +10 -0
- package/hooks/useMouseOutsidable.js +8 -0
- package/hooks/useReceive.d.ts +1 -1
- package/hooks/useReceive.js +4 -0
- package/hooks/useRecordComponent.js +6 -0
- package/hooks/useRouter.js +18 -7
- package/hooks/useShowHideEvents.js +3 -0
- package/hooks/useState.d.ts +2 -2
- package/hooks/useState.js +6 -2
- package/i18n/en-US.js +1 -0
- package/i18n/index.d.ts +1 -1
- package/i18n/index.js +7 -0
- package/index.d.ts +2 -2
- package/index.js +3 -2
- package/package.json +2 -2
- package/styles/global.js +3 -2
- package/styles/keyframes.js +1 -0
- package/styles/theme.d.ts +1 -1
- package/styles/theme.js +7 -4
- package/styles/utils.d.ts +1 -1
- package/styles/utils.js +17 -3
- package/yarn-error.log +0 -1013
|
@@ -7,9 +7,10 @@ import mx from '../mxgraph';
|
|
|
7
7
|
import { DBase } from './base';
|
|
8
8
|
import { isNullOrUndefined } from 'intact-shared';
|
|
9
9
|
var mxCell = mx.mxCell,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
mxGeometry = mx.mxGeometry,
|
|
11
|
+
mxPoint = mx.mxPoint;
|
|
12
12
|
var arrows = ['none', 'classic', 'classicThin', 'block', 'blockThin', 'open', 'openThin', 'oval', 'diamond', 'diamondThin'];
|
|
13
|
+
|
|
13
14
|
var typeDefs = _extends({}, DBase.typeDefs, {
|
|
14
15
|
type: ['rounded', 'sharp', 'curved', 'straight'],
|
|
15
16
|
startArrow: arrows,
|
|
@@ -21,6 +22,7 @@ var typeDefs = _extends({}, DBase.typeDefs, {
|
|
|
21
22
|
from: [String, Number],
|
|
22
23
|
to: [String, Number]
|
|
23
24
|
});
|
|
25
|
+
|
|
24
26
|
var defaults = function defaults() {
|
|
25
27
|
return _extends({}, DBase.defaults(), {
|
|
26
28
|
startArrow: 'none',
|
|
@@ -30,12 +32,16 @@ var defaults = function defaults() {
|
|
|
30
32
|
type: 'straight'
|
|
31
33
|
});
|
|
32
34
|
};
|
|
35
|
+
|
|
33
36
|
export var DLine = /*#__PURE__*/function (_DBase) {
|
|
34
37
|
_inheritsLoose(DLine, _DBase);
|
|
38
|
+
|
|
35
39
|
function DLine() {
|
|
36
40
|
return _DBase.apply(this, arguments) || this;
|
|
37
41
|
}
|
|
42
|
+
|
|
38
43
|
var _proto = DLine.prototype;
|
|
44
|
+
|
|
39
45
|
_proto.startDraw = function startDraw() {
|
|
40
46
|
var graph = this.diagram.graph;
|
|
41
47
|
var cell = this.cell;
|
|
@@ -44,24 +50,28 @@ export var DLine = /*#__PURE__*/function (_DBase) {
|
|
|
44
50
|
this.setTerminal();
|
|
45
51
|
graph.addCell(cell);
|
|
46
52
|
};
|
|
53
|
+
|
|
47
54
|
_proto.setTerminal = function setTerminal() {
|
|
48
55
|
var _this$get = this.get(),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
from = _this$get.from,
|
|
57
|
+
to = _this$get.to,
|
|
58
|
+
startPoint = _this$get.startPoint,
|
|
59
|
+
endPoint = _this$get.endPoint;
|
|
60
|
+
|
|
53
61
|
var diagram = this.diagram;
|
|
54
62
|
var graph = diagram.graph;
|
|
55
63
|
var shapes = diagram.shapes;
|
|
56
64
|
var cell = this.cell;
|
|
57
65
|
var geo = cell.getGeometry();
|
|
58
66
|
var tmp;
|
|
67
|
+
|
|
59
68
|
if (isNullOrUndefined(from) || !(tmp = shapes.get(from))) {
|
|
60
69
|
cell.setTerminal(null, true);
|
|
61
70
|
geo.setTerminalPoint(_construct(mxPoint, startPoint), true);
|
|
62
71
|
} else {
|
|
63
72
|
cell.setTerminal(tmp.cell, true);
|
|
64
73
|
}
|
|
74
|
+
|
|
65
75
|
if (isNullOrUndefined(to) || !(tmp = shapes.get(to))) {
|
|
66
76
|
cell.setTerminal(null, false);
|
|
67
77
|
geo.setTerminalPoint(_construct(mxPoint, endPoint), false);
|
|
@@ -69,29 +79,38 @@ export var DLine = /*#__PURE__*/function (_DBase) {
|
|
|
69
79
|
cell.setTerminal(tmp.cell, false);
|
|
70
80
|
}
|
|
71
81
|
};
|
|
82
|
+
|
|
72
83
|
_proto.addToDigram = function addToDigram() {
|
|
73
84
|
this.diagram.addLine(this);
|
|
74
85
|
};
|
|
86
|
+
|
|
75
87
|
_proto.deleteFromDiagram = function deleteFromDiagram() {
|
|
76
88
|
this.diagram.deleteLine(this);
|
|
77
89
|
};
|
|
90
|
+
|
|
78
91
|
_proto.getStylesheet = function getStylesheet() {
|
|
79
92
|
var _this$get2 = this.get(),
|
|
80
|
-
|
|
81
|
-
|
|
93
|
+
startArrow = _this$get2.startArrow,
|
|
94
|
+
endArrow = _this$get2.endArrow;
|
|
95
|
+
|
|
82
96
|
return "startArrow=" + startArrow + ";endArrow=" + endArrow + ";html=1;fontSize=12;";
|
|
83
97
|
};
|
|
98
|
+
|
|
84
99
|
_proto.getGeometry = function getGeometry() {
|
|
85
100
|
var geo = new mxGeometry(0, 0, 0, 0);
|
|
86
101
|
geo.relative = true;
|
|
87
102
|
return geo;
|
|
88
103
|
};
|
|
104
|
+
|
|
89
105
|
_proto.genStyles = function genStyles() {
|
|
90
106
|
return _extends({}, this.genStylesForExitAndEntry(), this.genStylesForType(), _DBase.prototype.genStyles.call(this));
|
|
91
107
|
};
|
|
108
|
+
|
|
92
109
|
_proto.updateProps = function updateProps(model, lastProps, nextProps) {
|
|
93
110
|
var _context;
|
|
111
|
+
|
|
94
112
|
_DBase.prototype.updateProps.call(this, model, lastProps, nextProps);
|
|
113
|
+
|
|
95
114
|
if (_findInstanceProperty(_context = ['from', 'to', 'startPoint', 'endPoint']).call(_context, function (key) {
|
|
96
115
|
return lastProps[key] !== nextProps[key];
|
|
97
116
|
})) {
|
|
@@ -99,57 +118,73 @@ export var DLine = /*#__PURE__*/function (_DBase) {
|
|
|
99
118
|
this.setTerminal();
|
|
100
119
|
}
|
|
101
120
|
};
|
|
121
|
+
|
|
102
122
|
_proto.genStylesForExitAndEntry = function genStylesForExitAndEntry() {
|
|
103
123
|
var styles = {};
|
|
124
|
+
|
|
104
125
|
var _this$get3 = this.get(),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
126
|
+
from = _this$get3.from,
|
|
127
|
+
exit = _this$get3.exit,
|
|
128
|
+
to = _this$get3.to,
|
|
129
|
+
entry = _this$get3.entry;
|
|
130
|
+
|
|
109
131
|
if (!isNullOrUndefined(from) && exit) {
|
|
110
132
|
styles.exitX = exit[0];
|
|
111
133
|
styles.exitY = exit[1];
|
|
112
134
|
styles.perimeter = 0;
|
|
113
135
|
}
|
|
136
|
+
|
|
114
137
|
if (!isNullOrUndefined(to) && entry) {
|
|
115
138
|
styles.entryX = entry[0];
|
|
116
139
|
styles.entryY = entry[1];
|
|
117
140
|
styles.perimeter = 0;
|
|
118
141
|
}
|
|
142
|
+
|
|
119
143
|
return styles;
|
|
120
144
|
};
|
|
145
|
+
|
|
121
146
|
_proto.genStylesForType = function genStylesForType() {
|
|
122
147
|
var styles = {};
|
|
148
|
+
|
|
123
149
|
var _this$get4 = this.get(),
|
|
124
|
-
|
|
150
|
+
type = _this$get4.type;
|
|
151
|
+
|
|
125
152
|
if (type !== 'straight') {
|
|
126
153
|
styles.edgeStyle = 'orthogonalEdgeStyle';
|
|
127
154
|
}
|
|
155
|
+
|
|
128
156
|
switch (type) {
|
|
129
157
|
case 'rounded':
|
|
130
158
|
styles.rounded = 1;
|
|
131
159
|
styles.curved = null;
|
|
132
160
|
break;
|
|
161
|
+
|
|
133
162
|
case 'curved':
|
|
134
163
|
styles.rounded = 0;
|
|
135
164
|
styles.curved = 1;
|
|
136
165
|
break;
|
|
166
|
+
|
|
137
167
|
case 'sharp':
|
|
138
168
|
styles.rounded = 0;
|
|
139
169
|
styles.curved = null;
|
|
140
170
|
break;
|
|
171
|
+
|
|
141
172
|
default:
|
|
142
173
|
styles.edgeStyle = 'straight';
|
|
143
174
|
styles.curved = null;
|
|
144
175
|
styles.noEdgeStyle = null;
|
|
145
176
|
break;
|
|
146
177
|
}
|
|
178
|
+
|
|
147
179
|
return styles;
|
|
148
180
|
};
|
|
181
|
+
|
|
149
182
|
return DLine;
|
|
150
183
|
}(DBase);
|
|
184
|
+
|
|
151
185
|
DLine.template = function () {
|
|
152
186
|
return h('dline', null, this.get('children'));
|
|
153
187
|
};
|
|
188
|
+
|
|
154
189
|
DLine.typeDefs = typeDefs;
|
|
155
190
|
DLine.defaults = defaults;
|
|
@@ -4,56 +4,68 @@ import { DShape } from './shape';
|
|
|
4
4
|
import mx from '../mxgraph';
|
|
5
5
|
import { hasDocumentAvailable } from 'intact-shared';
|
|
6
6
|
var mxActor = mx.mxActor,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
mxUtils = mx.mxUtils,
|
|
8
|
+
mxCellRenderer = mx.mxCellRenderer,
|
|
9
|
+
mxConstants = mx.mxConstants,
|
|
10
|
+
mxPoint = mx.mxPoint,
|
|
11
|
+
mxRectangleShape = mx.mxRectangleShape,
|
|
12
|
+
mxPerimeter = mx.mxPerimeter,
|
|
13
|
+
mxStyleRegistry = mx.mxStyleRegistry;
|
|
14
14
|
export var DParallelogram = /*#__PURE__*/function (_DShape) {
|
|
15
15
|
_inheritsLoose(DParallelogram, _DShape);
|
|
16
|
+
|
|
16
17
|
function DParallelogram() {
|
|
17
18
|
return _DShape.apply(this, arguments) || this;
|
|
18
19
|
}
|
|
20
|
+
|
|
19
21
|
DParallelogram.defaults = function defaults() {
|
|
20
22
|
return _extends({}, DShape.defaults(), {
|
|
21
23
|
width: 120,
|
|
22
24
|
height: 60
|
|
23
25
|
});
|
|
24
26
|
};
|
|
27
|
+
|
|
25
28
|
var _proto = DParallelogram.prototype;
|
|
29
|
+
|
|
26
30
|
_proto.getStylesheet = function getStylesheet() {
|
|
27
31
|
return 'shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;';
|
|
28
32
|
};
|
|
33
|
+
|
|
29
34
|
return DParallelogram;
|
|
30
35
|
}(DShape);
|
|
31
36
|
DParallelogram.displayName = 'DParallelogram';
|
|
37
|
+
|
|
32
38
|
if (hasDocumentAvailable) {
|
|
33
39
|
// Parallelogram shape
|
|
34
40
|
var ParallelogramShape = function ParallelogramShape() {
|
|
35
41
|
mxActor.call(this);
|
|
36
42
|
};
|
|
43
|
+
|
|
37
44
|
mxUtils.extend(ParallelogramShape, mxActor);
|
|
38
45
|
ParallelogramShape.prototype.size = 0.2;
|
|
39
46
|
/* istanbul ignore next */
|
|
47
|
+
|
|
40
48
|
ParallelogramShape.prototype.isRoundable = function () {
|
|
41
49
|
return true;
|
|
42
50
|
};
|
|
51
|
+
|
|
43
52
|
ParallelogramShape.prototype.redrawPath = function (c, x, y, w, h) {
|
|
44
53
|
var dx = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));
|
|
45
54
|
var arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;
|
|
46
55
|
this.addPoints(c, [new mxPoint(0, h), new mxPoint(dx, 0), new mxPoint(w, 0), new mxPoint(w - dx, h)], this.isRounded, arcSize, true);
|
|
47
56
|
c.end();
|
|
48
57
|
};
|
|
58
|
+
|
|
49
59
|
mxCellRenderer.registerShape('parallelogram', ParallelogramShape);
|
|
50
|
-
ParallelogramShape.prototype.constraints = mxRectangleShape.prototype.constraints;
|
|
51
|
-
|
|
60
|
+
ParallelogramShape.prototype.constraints = mxRectangleShape.prototype.constraints; // Parallelogram Perimeter
|
|
61
|
+
|
|
52
62
|
mxPerimeter.ParallelogramPerimeter = function (bounds, vertex, next, orthogonal) {
|
|
53
63
|
var size = ParallelogramShape.prototype.size;
|
|
64
|
+
|
|
54
65
|
if (vertex != null) {
|
|
55
66
|
size = mxUtils.getValue(vertex.style, 'size', size);
|
|
56
67
|
}
|
|
68
|
+
|
|
57
69
|
var x = bounds.x;
|
|
58
70
|
var y = bounds.y;
|
|
59
71
|
var w = bounds.width;
|
|
@@ -61,6 +73,7 @@ if (hasDocumentAvailable) {
|
|
|
61
73
|
var direction = vertex != null ? mxUtils.getValue(vertex.style, mxConstants.STYLE_DIRECTION, mxConstants.DIRECTION_EAST) : mxConstants.DIRECTION_EAST;
|
|
62
74
|
var vertical = direction == mxConstants.DIRECTION_NORTH || direction == mxConstants.DIRECTION_SOUTH;
|
|
63
75
|
var points;
|
|
76
|
+
|
|
64
77
|
if (vertical) {
|
|
65
78
|
var dy = h * Math.max(0, Math.min(1, size));
|
|
66
79
|
points = [new mxPoint(x, y), new mxPoint(x + w, y + dy), new mxPoint(x + w, y + h), new mxPoint(x, y + h - dy), new mxPoint(x, y)];
|
|
@@ -68,9 +81,11 @@ if (hasDocumentAvailable) {
|
|
|
68
81
|
var dx = w * Math.max(0, Math.min(1, size));
|
|
69
82
|
points = [new mxPoint(x + dx, y), new mxPoint(x + w, y), new mxPoint(x + w - dx, y + h), new mxPoint(x, y + h), new mxPoint(x + dx, y)];
|
|
70
83
|
}
|
|
84
|
+
|
|
71
85
|
var cx = bounds.getCenterX();
|
|
72
86
|
var cy = bounds.getCenterY();
|
|
73
87
|
var p1 = new mxPoint(cx, cy);
|
|
88
|
+
|
|
74
89
|
if (orthogonal) {
|
|
75
90
|
if (next.x < x || next.x > x + w) {
|
|
76
91
|
p1.y = next.y;
|
|
@@ -78,7 +93,9 @@ if (hasDocumentAvailable) {
|
|
|
78
93
|
p1.x = next.x;
|
|
79
94
|
}
|
|
80
95
|
}
|
|
96
|
+
|
|
81
97
|
return mxUtils.getPerimeterPoint(points, p1, next);
|
|
82
98
|
};
|
|
99
|
+
|
|
83
100
|
mxStyleRegistry.putValue('parallelogramPerimeter', mxPerimeter.ParallelogramPerimeter);
|
|
84
101
|
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
2
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
3
3
|
import { DShape } from './shape';
|
|
4
|
+
|
|
4
5
|
var typeDefs = _extends({}, DShape.typeDefs, {
|
|
5
6
|
rounded: [Number, String]
|
|
6
7
|
});
|
|
8
|
+
|
|
7
9
|
export var DRectangle = /*#__PURE__*/function (_DShape) {
|
|
8
10
|
_inheritsLoose(DRectangle, _DShape);
|
|
11
|
+
|
|
9
12
|
function DRectangle() {
|
|
10
13
|
return _DShape.apply(this, arguments) || this;
|
|
11
14
|
}
|
|
15
|
+
|
|
12
16
|
DRectangle.defaults = function defaults() {
|
|
13
17
|
return _extends({}, DShape.defaults(), {
|
|
14
18
|
width: 120,
|
|
@@ -16,12 +20,16 @@ export var DRectangle = /*#__PURE__*/function (_DShape) {
|
|
|
16
20
|
rounded: 0
|
|
17
21
|
});
|
|
18
22
|
};
|
|
23
|
+
|
|
19
24
|
var _proto = DRectangle.prototype;
|
|
25
|
+
|
|
20
26
|
_proto.getStylesheet = function getStylesheet() {
|
|
21
27
|
var _this$get = this.get(),
|
|
22
|
-
|
|
28
|
+
rounded = _this$get.rounded;
|
|
29
|
+
|
|
23
30
|
return "rounded=" + (+rounded ? 1 : 0) + ";whiteSpace=wrap;html=1;arcSize=" + rounded;
|
|
24
31
|
};
|
|
32
|
+
|
|
25
33
|
return DRectangle;
|
|
26
34
|
}(DShape);
|
|
27
35
|
DRectangle.displayName = 'DRectangle';
|
|
@@ -8,8 +8,9 @@ import { isStringOrNumber, isNullOrUndefined } from 'intact-shared';
|
|
|
8
8
|
import { SHAPE } from '../constants';
|
|
9
9
|
import { DBase } from './base';
|
|
10
10
|
var mxCell = mx.mxCell,
|
|
11
|
-
|
|
11
|
+
mxGeometry = mx.mxGeometry;
|
|
12
12
|
var strOrNum = [String, Number];
|
|
13
|
+
|
|
13
14
|
var typeDefs = _extends({}, DBase.typeDefs, {
|
|
14
15
|
left: strOrNum,
|
|
15
16
|
top: strOrNum,
|
|
@@ -22,6 +23,7 @@ var typeDefs = _extends({}, DBase.typeDefs, {
|
|
|
22
23
|
editable: Boolean,
|
|
23
24
|
connectable: Boolean
|
|
24
25
|
});
|
|
26
|
+
|
|
25
27
|
var defaults = function defaults() {
|
|
26
28
|
return _extends({}, DBase.defaults(), {
|
|
27
29
|
left: 0,
|
|
@@ -30,14 +32,19 @@ var defaults = function defaults() {
|
|
|
30
32
|
height: 0
|
|
31
33
|
});
|
|
32
34
|
};
|
|
35
|
+
|
|
33
36
|
export var DShape = /*#__PURE__*/function (_DBase) {
|
|
34
37
|
_inheritsLoose(DShape, _DBase);
|
|
38
|
+
|
|
35
39
|
function DShape() {
|
|
36
40
|
var _context;
|
|
41
|
+
|
|
37
42
|
var _this;
|
|
43
|
+
|
|
38
44
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
39
45
|
args[_key] = arguments[_key];
|
|
40
46
|
}
|
|
47
|
+
|
|
41
48
|
_this = _DBase.call.apply(_DBase, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
42
49
|
_this.wrapperRef = createRef();
|
|
43
50
|
_this.hasElement = false;
|
|
@@ -45,35 +52,44 @@ export var DShape = /*#__PURE__*/function (_DBase) {
|
|
|
45
52
|
_this.parent = inject(SHAPE, null);
|
|
46
53
|
return _this;
|
|
47
54
|
}
|
|
55
|
+
|
|
48
56
|
var _proto = DShape.prototype;
|
|
57
|
+
|
|
49
58
|
_proto.init = function init() {
|
|
50
59
|
var _this2 = this;
|
|
60
|
+
|
|
51
61
|
// shape can nest
|
|
52
62
|
provide(SHAPE, this);
|
|
53
63
|
this.on('$receive:children', function (children) {
|
|
54
64
|
_this2.children = mapChildren(children, function (vNode) {
|
|
55
65
|
if (isStringOrNumber(vNode)) return vNode;
|
|
66
|
+
|
|
56
67
|
if (isComponentClass(vNode)) {
|
|
57
68
|
var proto = vNode.tag.prototype;
|
|
69
|
+
|
|
58
70
|
if (proto instanceof DShape) {
|
|
59
71
|
return vNode;
|
|
60
72
|
}
|
|
61
73
|
}
|
|
74
|
+
|
|
62
75
|
_this2.hasElement = true;
|
|
63
76
|
return vNode;
|
|
64
77
|
});
|
|
65
78
|
});
|
|
66
79
|
};
|
|
80
|
+
|
|
67
81
|
_proto.updated = function updated() {
|
|
68
82
|
var model = this.diagram.graph.model;
|
|
69
83
|
var geo = this.getGeometry();
|
|
70
84
|
model.setGeometry(this.cell, geo);
|
|
71
85
|
};
|
|
86
|
+
|
|
72
87
|
_proto.beforeUnmount = function beforeUnmount() {
|
|
73
88
|
var graph = this.diagram.graph;
|
|
74
89
|
this.deleteFromDiagram();
|
|
75
90
|
graph.removeCells([this.cell], false);
|
|
76
91
|
};
|
|
92
|
+
|
|
77
93
|
_proto.startDraw = function startDraw() {
|
|
78
94
|
var diagram = this.diagram;
|
|
79
95
|
var cell = this.cell;
|
|
@@ -82,41 +98,54 @@ export var DShape = /*#__PURE__*/function (_DBase) {
|
|
|
82
98
|
this.setStyle();
|
|
83
99
|
diagram.graph.addCell(cell, parentCell);
|
|
84
100
|
};
|
|
101
|
+
|
|
85
102
|
_proto.addToDigram = function addToDigram() {
|
|
86
103
|
this.diagram.addShape(this);
|
|
87
104
|
};
|
|
105
|
+
|
|
88
106
|
_proto.deleteFromDiagram = function deleteFromDiagram() {
|
|
89
107
|
this.diagram.deleteShape(this);
|
|
90
108
|
};
|
|
109
|
+
|
|
91
110
|
_proto.getGeometry = function getGeometry() {
|
|
92
111
|
var _this$get = this.get(),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
112
|
+
width = _this$get.width,
|
|
113
|
+
height = _this$get.height,
|
|
114
|
+
top = _this$get.top,
|
|
115
|
+
left = _this$get.left;
|
|
116
|
+
|
|
97
117
|
return new mxGeometry(+left, +top, +width, +height);
|
|
98
118
|
};
|
|
119
|
+
|
|
99
120
|
_proto.getValue = function getValue() {
|
|
100
121
|
var _this$get2 = this.get(),
|
|
101
|
-
|
|
122
|
+
label = _this$get2.label;
|
|
123
|
+
|
|
102
124
|
return isNullOrUndefined(label) ? this.hasElement && this.wrapperRef.value || null : String(label);
|
|
103
125
|
};
|
|
126
|
+
|
|
104
127
|
_proto.setStyle = function setStyle() {
|
|
105
128
|
// if hasElement, disable edit
|
|
106
129
|
this.diagram.graph.setCellStyles('editable', this.hasElement ? 0 : 1, [this.cell]);
|
|
130
|
+
|
|
107
131
|
_DBase.prototype.setStyle.call(this);
|
|
108
132
|
};
|
|
133
|
+
|
|
109
134
|
return DShape;
|
|
110
135
|
}(DBase);
|
|
136
|
+
|
|
111
137
|
DShape.template = function () {
|
|
112
138
|
var children = this.children;
|
|
139
|
+
|
|
113
140
|
if (children && children.length) {
|
|
114
141
|
children = h('div', {
|
|
115
142
|
ref: this.wrapperRef
|
|
116
143
|
}, children);
|
|
117
144
|
}
|
|
145
|
+
|
|
118
146
|
var Ctor = this.constructor;
|
|
119
147
|
return h(Ctor.displayName || Ctor.name, null, children);
|
|
120
148
|
};
|
|
149
|
+
|
|
121
150
|
DShape.typeDefs = typeDefs;
|
|
122
151
|
DShape.defaults = defaults;
|
|
@@ -5,26 +5,34 @@ import mx from '../mxgraph';
|
|
|
5
5
|
var mxGeometry = mx.mxGeometry;
|
|
6
6
|
export var DSquare = /*#__PURE__*/function (_DRectangle) {
|
|
7
7
|
_inheritsLoose(DSquare, _DRectangle);
|
|
8
|
+
|
|
8
9
|
function DSquare() {
|
|
9
10
|
return _DRectangle.apply(this, arguments) || this;
|
|
10
11
|
}
|
|
12
|
+
|
|
11
13
|
DSquare.defaults = function defaults() {
|
|
12
14
|
return _extends({}, DRectangle.defaults(), {
|
|
13
15
|
width: 80
|
|
14
16
|
});
|
|
15
17
|
};
|
|
18
|
+
|
|
16
19
|
var _proto = DSquare.prototype;
|
|
20
|
+
|
|
17
21
|
_proto.getStylesheet = function getStylesheet() {
|
|
18
22
|
var stylesheet = _DRectangle.prototype.getStylesheet.call(this);
|
|
23
|
+
|
|
19
24
|
return stylesheet + "aspect=fixed;";
|
|
20
25
|
};
|
|
26
|
+
|
|
21
27
|
_proto.getGeometry = function getGeometry() {
|
|
22
28
|
var _this$get = this.get(),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
width = _this$get.width,
|
|
30
|
+
left = _this$get.left,
|
|
31
|
+
top = _this$get.top;
|
|
32
|
+
|
|
26
33
|
return new mxGeometry(+left, +top, +width, +width);
|
|
27
34
|
};
|
|
35
|
+
|
|
28
36
|
return DSquare;
|
|
29
37
|
}(DRectangle);
|
|
30
38
|
DSquare.displayName = 'DSquare';
|
|
@@ -3,19 +3,24 @@ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
|
3
3
|
import { DShape } from './shape';
|
|
4
4
|
export var DText = /*#__PURE__*/function (_DShape) {
|
|
5
5
|
_inheritsLoose(DText, _DShape);
|
|
6
|
+
|
|
6
7
|
function DText() {
|
|
7
8
|
return _DShape.apply(this, arguments) || this;
|
|
8
9
|
}
|
|
10
|
+
|
|
9
11
|
DText.defaults = function defaults() {
|
|
10
12
|
return _extends({}, DShape.defaults(), {
|
|
11
13
|
width: 40,
|
|
12
14
|
height: 20
|
|
13
15
|
});
|
|
14
16
|
};
|
|
17
|
+
|
|
15
18
|
var _proto = DText.prototype;
|
|
19
|
+
|
|
16
20
|
_proto.getStylesheet = function getStylesheet() {
|
|
17
21
|
return "text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;";
|
|
18
22
|
};
|
|
23
|
+
|
|
19
24
|
return DText;
|
|
20
25
|
}(DShape);
|
|
21
26
|
DText.displayName = 'DText';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
|
|
2
3
|
import { css } from '@emotion/css';
|
|
3
4
|
import '../../styles/global';
|
|
4
5
|
export function makeStyles() {
|
|
@@ -4,18 +4,21 @@ import { Button } from '../button';
|
|
|
4
4
|
import { makeAlertStyles } from './styles';
|
|
5
5
|
export default function ($props, $blocks, $__proto__) {
|
|
6
6
|
var _classNameObj;
|
|
7
|
+
|
|
7
8
|
$blocks || ($blocks = {});
|
|
8
9
|
$props || ($props = {});
|
|
9
10
|
var $this = this;
|
|
11
|
+
|
|
10
12
|
var _this$get = this.get(),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
type = _this$get.type,
|
|
14
|
+
content = _this$get.content,
|
|
15
|
+
hideIcon = _this$get.hideIcon,
|
|
16
|
+
hideFooter = _this$get.hideFooter,
|
|
17
|
+
hideClose = _this$get.hideClose,
|
|
18
|
+
title = _this$get.title,
|
|
19
|
+
iconClassName = _this$get.iconClassName,
|
|
20
|
+
icon = _this$get.icon;
|
|
21
|
+
|
|
19
22
|
var classNameObj = (_classNameObj = {
|
|
20
23
|
'k-alert-dialog': true
|
|
21
24
|
}, _classNameObj["k-" + type] = true, _classNameObj['k-with-title'] = title, _classNameObj[makeAlertStyles()] = true, _classNameObj);
|
|
@@ -23,14 +26,17 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
23
26
|
'className': _$cn(classNameObj)
|
|
24
27
|
}, function ($blocks) {
|
|
25
28
|
var _$blocks = {},
|
|
26
|
-
|
|
29
|
+
__$blocks = _$ex({}, $blocks);
|
|
30
|
+
|
|
27
31
|
return (_$blocks['header'] = function ($super) {
|
|
28
32
|
return null;
|
|
29
33
|
}, __$blocks['header'] = function ($super, data) {
|
|
30
34
|
var block = $blocks['header'];
|
|
35
|
+
|
|
31
36
|
var callBlock = function callBlock() {
|
|
32
37
|
return _$blocks['header'].call($this, $super, data);
|
|
33
38
|
};
|
|
39
|
+
|
|
34
40
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
35
41
|
}), (_$blocks['body'] = function ($super) {
|
|
36
42
|
return [_$ce(2, 'div', [!hideIcon && !icon ? _$cc(Icon, {
|
|
@@ -43,17 +49,21 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
43
49
|
}) : undefined, icon], 0, 'k-dialog-tip-icon'), _$ce(2, 'div', [title ? _$ce(2, 'div', title, 0, 'k-alert-dialog-title') : undefined, content], 0, 'k-alert-dialog-wrapper')];
|
|
44
50
|
}, __$blocks['body'] = function ($super, data) {
|
|
45
51
|
var block = $blocks['body'];
|
|
52
|
+
|
|
46
53
|
var callBlock = function callBlock() {
|
|
47
54
|
return _$blocks['body'].call($this, $super, data);
|
|
48
55
|
};
|
|
56
|
+
|
|
49
57
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
50
58
|
}), (_$blocks['footer'] = function ($super) {
|
|
51
59
|
return hideFooter ? null : $super();
|
|
52
60
|
}, __$blocks['footer'] = function ($super, data) {
|
|
53
61
|
var block = $blocks['footer'];
|
|
62
|
+
|
|
54
63
|
var callBlock = function callBlock() {
|
|
55
64
|
return _$blocks['footer'].call($this, $super, data);
|
|
56
65
|
};
|
|
66
|
+
|
|
57
67
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
58
68
|
}), __$blocks;
|
|
59
69
|
}.call($this, $blocks), $__proto__);
|