@pantograph/vue 0.22.6 → 0.23.1
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/dist/ActionButton/index.js +1 -1
- package/dist/ActionButton/index.umd.cjs +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-BuoyyieN.js → ActionButton.vue_vue_type_script_setup_true_lang-C40QLnax.js} +3 -3
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-DaglRgvB.js → ActionButton.vue_vue_type_script_setup_true_lang-Zbt1lDGL.js} +1 -1
- package/dist/Alert/index.js +1 -1
- package/dist/Alert/index.umd.cjs +1 -1
- package/dist/{Alert.vue_vue_type_style_index_0_lang-0LOAObnE.js → Alert.vue_vue_type_style_index_0_lang-DugtMNn6.js} +5 -5
- package/dist/{Alert.vue_vue_type_style_index_0_lang-CJp5SNlM.js → Alert.vue_vue_type_style_index_0_lang-x6PDS57O.js} +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar/index.umd.cjs +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-C7WmfBbR.js → Avatar.vue_vue_type_style_index_0_lang-DTxpdu2k.js} +5 -5
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-CQkfLDC5.js → Avatar.vue_vue_type_style_index_0_lang-Dbdnz5VW.js} +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs +1 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge/index.umd.cjs +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-CXsn0nkw.js → Badge.vue_vue_type_script_setup_true_lang-Dc6rezGr.js} +3 -3
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-lu-gu5b5.js → Badge.vue_vue_type_script_setup_true_lang-hG6klYy2.js} +1 -1
- package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-BuXOyFVD.js → BaseBadge.vue_vue_type_style_index_0_lang-BMX9MX3W.js} +2 -2
- package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-BLAg02qH.js → BaseBadge.vue_vue_type_style_index_0_lang-VEdsFDiH.js} +1 -1
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-CLVtjY8d.js → BaseButton.vue_vue_type_style_index_0_lang-BGYEuhbj.js} +6 -6
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-L4DRwvWw.js → BaseButton.vue_vue_type_style_index_0_lang-CcVDY3yV.js} +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/Button/index.umd.cjs +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-DY2BNT1y.js → Button.vue_vue_type_script_setup_true_lang--np1Hw7N.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-DQesYwzL.js → Button.vue_vue_type_script_setup_true_lang-bjhWtH8H.js} +3 -3
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/ButtonGroup/index.umd.cjs +1 -1
- package/dist/{ButtonGroup.vue_vue_type_script_setup_true_lang-pO76J3IF.js → ButtonGroup.vue_vue_type_script_setup_true_lang-BF_Oo7Zk.js} +1 -1
- package/dist/{ButtonGroup.vue_vue_type_script_setup_true_lang-MzFTjLDZ.js → ButtonGroup.vue_vue_type_script_setup_true_lang-CfOMjVlH.js} +1 -1
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/index.js +1 -1
- package/dist/Checkbox/index.umd.cjs +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-cKjwhSu-.js → Checkbox.vue_vue_type_style_index_0_lang-5tG-1ejh.js} +3 -3
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-BdcW-RZN.js → Checkbox.vue_vue_type_style_index_0_lang-DaWMPx_d.js} +1 -1
- package/dist/CheckboxGroup/index.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs +1 -1
- package/dist/Chip/index.js +2 -2
- package/dist/Chip/index.umd.cjs +1 -1
- package/dist/Chip.vue_vue_type_style_index_0_lang-Ci2Oqnfd.js +121 -0
- package/dist/Chip.vue_vue_type_style_index_0_lang-DqVcmql_.js +1 -0
- package/dist/ChipGroup/ChipGroup.d.ts +3 -0
- package/dist/ChipGroup/index.js +1 -1
- package/dist/ChipGroup/index.umd.cjs +1 -1
- package/dist/ChipGroup.vue_vue_type_style_index_0_lang-Bln1W3La.js +77 -0
- package/dist/ChipGroup.vue_vue_type_style_index_0_lang-ZlvXsJHD.js +1 -0
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ColorPicker/index.umd.cjs +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-D9uXTo6A.js → ColorPicker.vue_vue_type_style_index_0_lang-B8rVS60w.js} +3 -3
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-C_oiAMBb.js → ColorPicker.vue_vue_type_style_index_0_lang-BnjCOPow.js} +1 -1
- package/dist/ColorSwatch/index.js +1 -1
- package/dist/ColorSwatch/index.umd.cjs +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-3IRstZgE.js → ColorSwatch.vue_vue_type_style_index_0_lang-BCkqRsud.js} +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-CONqtEmS.js → ColorSwatch.vue_vue_type_style_index_0_lang-CjQa4I-g.js} +4 -4
- package/dist/ColorSwatchGroup/index.js +1 -1
- package/dist/ColorSwatchGroup/index.umd.cjs +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-rZ0DAGiR.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-BxBlKgbC.js} +5 -5
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-BMyF1WYM.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-DBbTuynH.js} +1 -1
- package/dist/ColorTrigger/index.js +1 -1
- package/dist/ColorTrigger/index.umd.cjs +1 -1
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-D5A9MniE.js → ColorTrigger.vue_vue_type_style_index_0_lang-BNTg203W.js} +4 -4
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-B-HxrWXr.js → ColorTrigger.vue_vue_type_style_index_0_lang-Brci1et_.js} +1 -1
- package/dist/ConfigProvider/index.js +2 -2
- package/dist/ConfigProvider/index.umd.cjs +1 -1
- package/dist/DataTable/index.js +1 -1
- package/dist/DataTable/index.umd.cjs +1 -1
- package/dist/DataTable/useLazyLoading.d.ts +8 -0
- package/dist/{DataTable.vue_vue_type_style_index_0_lang-Z5d8lFtY.js → DataTable.vue_vue_type_style_index_0_lang-CRVmec4j.js} +270 -279
- package/dist/DataTable.vue_vue_type_style_index_0_lang-ygPXw5Mi.js +1 -0
- package/dist/Divider/index.js +1 -1
- package/dist/Divider/index.umd.cjs +1 -1
- package/dist/{Divider.vue_vue_type_style_index_0_lang-DapqjSGc.js → Divider.vue_vue_type_style_index_0_lang-B6fQsp1Y.js} +1 -1
- package/dist/{Divider.vue_vue_type_style_index_0_lang-DuAAwNmp.js → Divider.vue_vue_type_style_index_0_lang-DoEWjJx6.js} +1 -1
- package/dist/DropZone/index.js +1 -1
- package/dist/DropZone/index.umd.cjs +1 -1
- package/dist/{DropZone.vue_vue_type_style_index_0_lang-BV4SAR-C.js → DropZone.vue_vue_type_style_index_0_lang-CH23eQwT.js} +3 -3
- package/dist/{DropZone.vue_vue_type_style_index_0_lang-BKZKDO-V.js → DropZone.vue_vue_type_style_index_0_lang-oJc56iXj.js} +1 -1
- package/dist/Empty/index.js +1 -1
- package/dist/Empty/index.umd.cjs +1 -1
- package/dist/{Empty.vue_vue_type_style_index_0_lang-Do6r0xM0.js → Empty.vue_vue_type_style_index_0_lang-C4a5JepF.js} +2 -2
- package/dist/{Empty.vue_vue_type_style_index_0_lang-o-PAGM69.js → Empty.vue_vue_type_style_index_0_lang-DHvpu4sq.js} +1 -1
- package/dist/FloatButton/index.js +1 -1
- package/dist/FloatButton/index.umd.cjs +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-Dp8_A9bR.js → FloatButton.vue_vue_type_script_setup_true_lang-BGZBnlXi.js} +3 -3
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-BM21wcnb.js → FloatButton.vue_vue_type_script_setup_true_lang-CaKIkb0P.js} +1 -1
- package/dist/Form/index.js +1 -1
- package/dist/Form/index.umd.cjs +1 -1
- package/dist/GOPicker/GOPicker.d.ts +2 -2
- package/dist/GOPicker/index.js +1 -1
- package/dist/GOPicker/index.umd.cjs +1 -1
- package/dist/{GOPicker.vue_vue_type_style_index_0_lang-BCRl-aBB.js → GOPicker.vue_vue_type_style_index_0_lang-CjqAqI_W.js} +1 -1
- package/dist/{GOPicker.vue_vue_type_style_index_0_lang-CX_x2Kmv.js → GOPicker.vue_vue_type_style_index_0_lang-cFBk9_vx.js} +11 -11
- package/dist/GraphicalObject/index.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs +1 -1
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-geqZb2IY.js → GraphicalObject.vue_vue_type_script_setup_true_lang-BZCn44kG.js} +4 -4
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-Cs85tVJU.js → GraphicalObject.vue_vue_type_script_setup_true_lang-Byz-BOG1.js} +1 -1
- package/dist/GraphicalObjectGroup/index.js +1 -1
- package/dist/GraphicalObjectGroup/index.umd.cjs +1 -1
- package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-DSIv18t_.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-COvFyzfP.js} +3 -3
- package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-C2ubwE2W.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-DiSPJXBZ.js} +1 -1
- package/dist/Icon/index.js +1 -1
- package/dist/Icon/index.umd.cjs +1 -1
- package/dist/{Icon.vue_vue_type_style_index_0_lang-DCBjku2G.js → Icon.vue_vue_type_style_index_0_lang-Cc8Uh2lr.js} +3 -3
- package/dist/{Icon.vue_vue_type_style_index_0_lang-m8dwDy4r.js → Icon.vue_vue_type_style_index_0_lang-Kn_r4tp8.js} +11 -11
- package/dist/IconButton/index.js +1 -1
- package/dist/IconButton/index.umd.cjs +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-Di_GIbFf.js → IconButton.vue_vue_type_script_setup_true_lang-BjFzPsUi.js} +3 -3
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-C49Y9h7k.js → IconButton.vue_vue_type_script_setup_true_lang-CGb0HxvX.js} +1 -1
- package/dist/Image/index.js +1 -1
- package/dist/Image/index.umd.cjs +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-CIWgfjfn.js → Image.vue_vue_type_style_index_0_lang-3vJwTwh4.js} +3 -3
- package/dist/{Image.vue_vue_type_style_index_0_lang-4AzaV6m3.js → Image.vue_vue_type_style_index_0_lang-DVDZ0ova.js} +1 -1
- package/dist/IndentLevel/index.js +1 -1
- package/dist/IndentLevel/index.umd.cjs +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-BnU3U7f0.js → IndentLevel.vue_vue_type_style_index_0_lang-BWLdpspA.js} +5 -5
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-CeUKjmVg.js → IndentLevel.vue_vue_type_style_index_0_lang-DVx2S15S.js} +1 -1
- package/dist/Indicator/index.js +1 -1
- package/dist/Indicator/index.umd.cjs +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-D8LgY6cc.js → Indicator.vue_vue_type_script_setup_true_lang-B1mn9s7i.js} +3 -3
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-vbGXlfQf.js → Indicator.vue_vue_type_script_setup_true_lang-_V0q7Zly.js} +1 -1
- package/dist/Input/Input.d.ts +2 -2
- package/dist/Input/index.js +1 -1
- package/dist/Input/index.umd.cjs +1 -1
- package/dist/{Input.vue_vue_type_style_index_0_lang-CPZg-HuC.js → Input.vue_vue_type_style_index_0_lang-BFNYYFfe.js} +4 -4
- package/dist/{Input.vue_vue_type_style_index_0_lang-Cfjllz6E.js → Input.vue_vue_type_style_index_0_lang-HuiLdgsj.js} +1 -1
- package/dist/Kbd/index.js +1 -1
- package/dist/Kbd/index.umd.cjs +1 -1
- package/dist/{Kbd.vue_vue_type_style_index_0_lang-DCL5O9Je.js → Kbd.vue_vue_type_style_index_0_lang-CuYfgo6l.js} +1 -1
- package/dist/{Kbd.vue_vue_type_style_index_0_lang-Bd2oUt5y.js → Kbd.vue_vue_type_style_index_0_lang-uEudChpD.js} +2 -2
- package/dist/Label/index.js +1 -1
- package/dist/Label/index.umd.cjs +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/Link/index.umd.cjs +1 -1
- package/dist/{Link.vue_vue_type_style_index_0_lang-jkeeGcel.js → Link.vue_vue_type_style_index_0_lang-AsoIRQm_.js} +2 -2
- package/dist/{Link.vue_vue_type_style_index_0_lang-CZtbe6e7.js → Link.vue_vue_type_style_index_0_lang-BgwJE1ku.js} +1 -1
- package/dist/Menu/index.js +1 -1
- package/dist/Menu/index.umd.cjs +1 -1
- package/dist/{Menu.vue_vue_type_style_index_0_lang-BTYGoWOL.js → Menu.vue_vue_type_style_index_0_lang-CFuwm984.js} +4 -4
- package/dist/{Menu.vue_vue_type_style_index_0_lang-BkAp2Lox.js → Menu.vue_vue_type_style_index_0_lang-CiyZmFBO.js} +1 -1
- package/dist/MenuItem/index.js +1 -1
- package/dist/MenuItem/index.umd.cjs +1 -1
- package/dist/Popover/Popover.d.ts +15 -14
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/Popover/index.umd.cjs +1 -1
- package/dist/Popover/utils.d.ts +25 -0
- package/dist/Popover.vue_vue_type_style_index_0_lang-B-MX4Q7D.js +242 -0
- package/dist/Popover.vue_vue_type_style_index_0_lang-BnKgARrA.js +1 -0
- package/dist/RadioGroup/index.js +1 -1
- package/dist/RadioGroup/index.umd.cjs +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-xBg4P78b.js → RadioGroup.vue_vue_type_script_setup_true_lang-Dq66i_P9.js} +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-Cymmyiys.js → RadioGroup.vue_vue_type_script_setup_true_lang-bWA97IMn.js} +3 -3
- package/dist/ScrollContainer/ScrollContainer.d.ts +6 -398
- package/dist/ScrollContainer/index.js +1 -1
- package/dist/ScrollContainer/index.umd.cjs +1 -1
- package/dist/ScrollContainer.vue_vue_type_style_index_0_lang-CMdXXxZr.js +1 -0
- package/dist/{ScrollContainer.vue_vue_type_style_index_0_lang-CSCDhOQB.js → ScrollContainer.vue_vue_type_style_index_0_lang-CZgFGbH_.js} +47 -47
- package/dist/Select/Select.d.ts +55 -0
- package/dist/Select/Select.model.d.ts +4 -0
- package/dist/Select/SelectLabel.d.ts +16 -0
- package/dist/Select/SelectOption.d.ts +19 -0
- package/dist/Select/SelectTrigger.d.ts +11 -0
- package/dist/Select/SelectWrapper.d.ts +4 -0
- package/dist/Select/context.d.ts +28 -0
- package/dist/Select/index.d.ts +6 -0
- package/dist/Select/index.js +10 -0
- package/dist/Select/index.umd.cjs +1 -0
- package/dist/Select/types.d.ts +126 -0
- package/dist/Select.vue_vue_type_style_index_0_lang-ClYkFAEj.js +696 -0
- package/dist/Select.vue_vue_type_style_index_0_lang-RdNEKYeJ.js +1 -0
- package/dist/Shortcut/index.js +1 -1
- package/dist/Shortcut/index.umd.cjs +1 -1
- package/dist/{Shortcut.vue_vue_type_style_index_0_lang-DH3I9lTB.js → Shortcut.vue_vue_type_style_index_0_lang-DIDsOrKm.js} +1 -1
- package/dist/{Shortcut.vue_vue_type_style_index_0_lang-CPjV7eLg.js → Shortcut.vue_vue_type_style_index_0_lang-DXBz4Ysp.js} +3 -3
- package/dist/Skeleton/index.js +1 -1
- package/dist/Skeleton/index.umd.cjs +1 -1
- package/dist/{Skeleton.vue_vue_type_style_index_0_lang-BRov9v5C.js → Skeleton.vue_vue_type_style_index_0_lang-CWNX_-Jl.js} +1 -1
- package/dist/{Skeleton.vue_vue_type_style_index_0_lang-aSGb2hn6.js → Skeleton.vue_vue_type_style_index_0_lang-Xi8CteLp.js} +1 -1
- package/dist/Spinner/index.js +1 -1
- package/dist/Spinner/index.umd.cjs +1 -1
- package/dist/{Spinner.vue_vue_type_style_index_0_lang-Cm7J5cBI.js → Spinner.vue_vue_type_style_index_0_lang-17QUeFmj.js} +1 -1
- package/dist/{Spinner.vue_vue_type_style_index_0_lang-DAY9kBO9.js → Spinner.vue_vue_type_style_index_0_lang-DxV3D_9N.js} +2 -2
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/Switch/index.umd.cjs +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-DT_Mfcov.js → Switch.vue_vue_type_style_index_0_lang-BrkQxi9f.js} +3 -3
- package/dist/{Switch.vue_vue_type_style_index_0_lang-RuK62YKH.js → Switch.vue_vue_type_style_index_0_lang-DISD-AzJ.js} +1 -1
- package/dist/{THead.vue_vue_type_style_index_0_lang-DHLQWjez.js → THead.vue_vue_type_style_index_0_lang-BcVlFS1z.js} +2 -2
- package/dist/{THead.vue_vue_type_style_index_0_lang-B63h1RF2.js → THead.vue_vue_type_style_index_0_lang-Ck81v68E.js} +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Table/index.umd.cjs +1 -1
- package/dist/Textarea/Textarea.d.ts +15 -1109
- package/dist/Textarea/index.js +1 -1
- package/dist/Textarea/index.umd.cjs +1 -1
- package/dist/Textarea.vue_vue_type_style_index_0_lang-CJHHqEWa.js +1 -0
- package/dist/Textarea.vue_vue_type_style_index_0_lang-DnQgUyjY.js +164 -0
- package/dist/Tree/Tree.d.ts +1 -3
- package/dist/Tree/Tree.model.d.ts +15 -17
- package/dist/Tree/TreeNode.d.ts +0 -2
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/index.umd.cjs +1 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-B1CdkAl_.js +1805 -0
- package/dist/Tree.vue_vue_type_style_index_0_lang-Br1Uyot0.js +6 -0
- package/dist/element-BfQuKSll.js +47 -0
- package/dist/element-BjE0SVc4.js +1 -0
- package/dist/{index-IdtPmXeP.js → index-BbGUveIH.js} +4 -4
- package/dist/{index-BRvIONa8.js → index-zMkg_RCw.js} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +125 -117
- package/dist/index.umd.cjs +1 -1
- package/dist/options-CWrQ7gsa.js +1 -0
- package/dist/options-D4et5euX.js +10 -0
- package/dist/style/index.css +1 -1
- package/dist/types/index.d.ts +8 -0
- package/dist/{uniq--f9h-zgJ.js → uniq-Ci_ZUo6O.js} +1 -1
- package/dist/{uniq-Dci8Hrey.js → uniq-D8HAKpFq.js} +5 -5
- package/dist/{useInputDataStates-6_JS7YSj.js → useInputDataStates-BVOCxFWp.js} +1 -1
- package/dist/{useInputDataStates-B4OO_nST.js → useInputDataStates-C6bS7MJv.js} +1 -1
- package/dist/useLazyLoading-H6VG5aE-.js +1 -0
- package/dist/useLazyLoading-Zo-PEp2E.js +26 -0
- package/dist/utils/element.d.ts +6 -5
- package/dist/utils/index.js +3 -3
- package/dist/utils/index.umd.cjs +1 -1
- package/dist/utils/options.d.ts +1 -0
- package/dist/utils/useInputDataStates.d.ts +2 -2
- package/package.json +14 -11
- package/dist/Chip.vue_vue_type_style_index_0_lang-Dm0XEZi9.js +0 -1
- package/dist/Chip.vue_vue_type_style_index_0_lang-Ds9wwrDe.js +0 -114
- package/dist/ChipGroup.vue_vue_type_style_index_0_lang-CQQWaqyE.js +0 -74
- package/dist/ChipGroup.vue_vue_type_style_index_0_lang-DBzKqYIo.js +0 -1
- package/dist/DataTable.vue_vue_type_style_index_0_lang-BgpOZZrN.js +0 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-BDJSd1rV.js +0 -152
- package/dist/Popover.vue_vue_type_style_index_0_lang-BXkQ071D.js +0 -1
- package/dist/ScrollContainer.vue_vue_type_style_index_0_lang-CmXa5MIq.js +0 -1
- package/dist/Textarea.vue_vue_type_style_index_0_lang-Boeqy4Fg.js +0 -163
- package/dist/Textarea.vue_vue_type_style_index_0_lang-CO_e3cQV.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-B4vwt46r.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-Dv5zm7Sb.js +0 -528
- package/dist/element-BURaVF00.js +0 -1
- package/dist/element-CayrDxFe.js +0 -30
- package/dist/options-B4iSAKol.js +0 -1
- package/dist/options-JBqnVZUl.js +0 -9
|
@@ -0,0 +1,1805 @@
|
|
|
1
|
+
import { defineComponent as tn, useSlots as nn, computed as A, useTemplateRef as _n, resolveComponent as Dn, createElementBlock as Xe, openBlock as me, mergeProps as st, unref as m, createCommentVNode as Ye, createVNode as ut, withDirectives as Cn, normalizeClass as Ae, withKeys as Xt, withCtx as Te, createBlock as Ue, renderSlot as $e, normalizeProps as Ge, guardReactiveProps as He, withModifiers as Yt, Fragment as Tn, createElementVNode as xn, toDisplayString as In, createSlots as on, renderList as rn, vShow as kn, ref as Le, watch as ot } from "vue";
|
|
2
|
+
import { generateVariantClassList as we, getBemElement as fe, getBemModifier as Ot, getBemBlock as On, usePCId as Nn } from "@pantograph/utils";
|
|
3
|
+
import { cva as an } from "class-variance-authority";
|
|
4
|
+
import { r as j, f as Pn, u as An, v as Lt, q as Fn, w as $t, s as Mn } from "./Icon.vue_vue_type_style_index_0_lang-Kn_r4tp8.js";
|
|
5
|
+
import { u as Gt } from "./uniq-D8HAKpFq.js";
|
|
6
|
+
import { g as ln } from "./options-D4et5euX.js";
|
|
7
|
+
import { createContext as Bn, RovingFocusItem as Rn, RovingFocusGroup as Kn } from "reka-ui";
|
|
8
|
+
import { _ as zn } from "./IndentLevel.vue_vue_type_style_index_0_lang-BWLdpspA.js";
|
|
9
|
+
import { _ as Xn } from "./Checkbox.vue_vue_type_style_index_0_lang-5tG-1ejh.js";
|
|
10
|
+
import { U as Yn, u as Ln } from "./useInputDataStates-BVOCxFWp.js";
|
|
11
|
+
import { useElementSize as $n } from "@vueuse/core";
|
|
12
|
+
import sn from "vuedraggable";
|
|
13
|
+
import { last as Gn } from "lodash-es";
|
|
14
|
+
/**!
|
|
15
|
+
* Sortable 1.15.6
|
|
16
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
17
|
+
* @author owenm <owen23355@gmail.com>
|
|
18
|
+
* @license MIT
|
|
19
|
+
*/
|
|
20
|
+
function Ht(o, e) {
|
|
21
|
+
var n = Object.keys(o);
|
|
22
|
+
if (Object.getOwnPropertySymbols) {
|
|
23
|
+
var t = Object.getOwnPropertySymbols(o);
|
|
24
|
+
e && (t = t.filter(function(i) {
|
|
25
|
+
return Object.getOwnPropertyDescriptor(o, i).enumerable;
|
|
26
|
+
})), n.push.apply(n, t);
|
|
27
|
+
}
|
|
28
|
+
return n;
|
|
29
|
+
}
|
|
30
|
+
function be(o) {
|
|
31
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
32
|
+
var n = arguments[e] != null ? arguments[e] : {};
|
|
33
|
+
e % 2 ? Ht(Object(n), !0).forEach(function(t) {
|
|
34
|
+
Hn(o, t, n[t]);
|
|
35
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(n)) : Ht(Object(n)).forEach(function(t) {
|
|
36
|
+
Object.defineProperty(o, t, Object.getOwnPropertyDescriptor(n, t));
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return o;
|
|
40
|
+
}
|
|
41
|
+
function dt(o) {
|
|
42
|
+
"@babel/helpers - typeof";
|
|
43
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? dt = function(e) {
|
|
44
|
+
return typeof e;
|
|
45
|
+
} : dt = function(e) {
|
|
46
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
47
|
+
}, dt(o);
|
|
48
|
+
}
|
|
49
|
+
function Hn(o, e, n) {
|
|
50
|
+
return e in o ? Object.defineProperty(o, e, {
|
|
51
|
+
value: n,
|
|
52
|
+
enumerable: !0,
|
|
53
|
+
configurable: !0,
|
|
54
|
+
writable: !0
|
|
55
|
+
}) : o[e] = n, o;
|
|
56
|
+
}
|
|
57
|
+
function Se() {
|
|
58
|
+
return Se = Object.assign || function(o) {
|
|
59
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
60
|
+
var n = arguments[e];
|
|
61
|
+
for (var t in n)
|
|
62
|
+
Object.prototype.hasOwnProperty.call(n, t) && (o[t] = n[t]);
|
|
63
|
+
}
|
|
64
|
+
return o;
|
|
65
|
+
}, Se.apply(this, arguments);
|
|
66
|
+
}
|
|
67
|
+
function Vn(o, e) {
|
|
68
|
+
if (o == null) return {};
|
|
69
|
+
var n = {}, t = Object.keys(o), i, r;
|
|
70
|
+
for (r = 0; r < t.length; r++)
|
|
71
|
+
i = t[r], !(e.indexOf(i) >= 0) && (n[i] = o[i]);
|
|
72
|
+
return n;
|
|
73
|
+
}
|
|
74
|
+
function Wn(o, e) {
|
|
75
|
+
if (o == null) return {};
|
|
76
|
+
var n = Vn(o, e), t, i;
|
|
77
|
+
if (Object.getOwnPropertySymbols) {
|
|
78
|
+
var r = Object.getOwnPropertySymbols(o);
|
|
79
|
+
for (i = 0; i < r.length; i++)
|
|
80
|
+
t = r[i], !(e.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(o, t) && (n[t] = o[t]);
|
|
81
|
+
}
|
|
82
|
+
return n;
|
|
83
|
+
}
|
|
84
|
+
var jn = "1.15.6";
|
|
85
|
+
function Ee(o) {
|
|
86
|
+
if (typeof window < "u" && window.navigator)
|
|
87
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(o);
|
|
88
|
+
}
|
|
89
|
+
var _e = Ee(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), tt = Ee(/Edge/i), Vt = Ee(/firefox/i), qe = Ee(/safari/i) && !Ee(/chrome/i) && !Ee(/android/i), Mt = Ee(/iP(ad|od|hone)/i), un = Ee(/chrome/i) && Ee(/android/i), dn = {
|
|
90
|
+
capture: !1,
|
|
91
|
+
passive: !1
|
|
92
|
+
};
|
|
93
|
+
function I(o, e, n) {
|
|
94
|
+
o.addEventListener(e, n, !_e && dn);
|
|
95
|
+
}
|
|
96
|
+
function x(o, e, n) {
|
|
97
|
+
o.removeEventListener(e, n, !_e && dn);
|
|
98
|
+
}
|
|
99
|
+
function gt(o, e) {
|
|
100
|
+
if (e) {
|
|
101
|
+
if (e[0] === ">" && (e = e.substring(1)), o)
|
|
102
|
+
try {
|
|
103
|
+
if (o.matches)
|
|
104
|
+
return o.matches(e);
|
|
105
|
+
if (o.msMatchesSelector)
|
|
106
|
+
return o.msMatchesSelector(e);
|
|
107
|
+
if (o.webkitMatchesSelector)
|
|
108
|
+
return o.webkitMatchesSelector(e);
|
|
109
|
+
} catch {
|
|
110
|
+
return !1;
|
|
111
|
+
}
|
|
112
|
+
return !1;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function cn(o) {
|
|
116
|
+
return o.host && o !== document && o.host.nodeType ? o.host : o.parentNode;
|
|
117
|
+
}
|
|
118
|
+
function ce(o, e, n, t) {
|
|
119
|
+
if (o) {
|
|
120
|
+
n = n || document;
|
|
121
|
+
do {
|
|
122
|
+
if (e != null && (e[0] === ">" ? o.parentNode === n && gt(o, e) : gt(o, e)) || t && o === n)
|
|
123
|
+
return o;
|
|
124
|
+
if (o === n) break;
|
|
125
|
+
} while (o = cn(o));
|
|
126
|
+
}
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
var Wt = /\s+/g;
|
|
130
|
+
function ne(o, e, n) {
|
|
131
|
+
if (o && e)
|
|
132
|
+
if (o.classList)
|
|
133
|
+
o.classList[n ? "add" : "remove"](e);
|
|
134
|
+
else {
|
|
135
|
+
var t = (" " + o.className + " ").replace(Wt, " ").replace(" " + e + " ", " ");
|
|
136
|
+
o.className = (t + (n ? " " + e : "")).replace(Wt, " ");
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function E(o, e, n) {
|
|
140
|
+
var t = o && o.style;
|
|
141
|
+
if (t) {
|
|
142
|
+
if (n === void 0)
|
|
143
|
+
return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(o, "") : o.currentStyle && (n = o.currentStyle), e === void 0 ? n : n[e];
|
|
144
|
+
!(e in t) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), t[e] = n + (typeof n == "string" ? "" : "px");
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function Ke(o, e) {
|
|
148
|
+
var n = "";
|
|
149
|
+
if (typeof o == "string")
|
|
150
|
+
n = o;
|
|
151
|
+
else
|
|
152
|
+
do {
|
|
153
|
+
var t = E(o, "transform");
|
|
154
|
+
t && t !== "none" && (n = t + " " + n);
|
|
155
|
+
} while (!e && (o = o.parentNode));
|
|
156
|
+
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
157
|
+
return i && new i(n);
|
|
158
|
+
}
|
|
159
|
+
function fn(o, e, n) {
|
|
160
|
+
if (o) {
|
|
161
|
+
var t = o.getElementsByTagName(e), i = 0, r = t.length;
|
|
162
|
+
if (n)
|
|
163
|
+
for (; i < r; i++)
|
|
164
|
+
n(t[i], i);
|
|
165
|
+
return t;
|
|
166
|
+
}
|
|
167
|
+
return [];
|
|
168
|
+
}
|
|
169
|
+
function ve() {
|
|
170
|
+
var o = document.scrollingElement;
|
|
171
|
+
return o || document.documentElement;
|
|
172
|
+
}
|
|
173
|
+
function X(o, e, n, t, i) {
|
|
174
|
+
if (!(!o.getBoundingClientRect && o !== window)) {
|
|
175
|
+
var r, a, l, s, u, p, f;
|
|
176
|
+
if (o !== window && o.parentNode && o !== ve() ? (r = o.getBoundingClientRect(), a = r.top, l = r.left, s = r.bottom, u = r.right, p = r.height, f = r.width) : (a = 0, l = 0, s = window.innerHeight, u = window.innerWidth, p = window.innerHeight, f = window.innerWidth), (e || n) && o !== window && (i = i || o.parentNode, !_e))
|
|
177
|
+
do
|
|
178
|
+
if (i && i.getBoundingClientRect && (E(i, "transform") !== "none" || n && E(i, "position") !== "static")) {
|
|
179
|
+
var b = i.getBoundingClientRect();
|
|
180
|
+
a -= b.top + parseInt(E(i, "border-top-width")), l -= b.left + parseInt(E(i, "border-left-width")), s = a + r.height, u = l + r.width;
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
while (i = i.parentNode);
|
|
184
|
+
if (t && o !== window) {
|
|
185
|
+
var v = Ke(i || o), C = v && v.a, T = v && v.d;
|
|
186
|
+
v && (a /= T, l /= C, f /= C, p /= T, s = a + p, u = l + f);
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
top: a,
|
|
190
|
+
left: l,
|
|
191
|
+
bottom: s,
|
|
192
|
+
right: u,
|
|
193
|
+
width: f,
|
|
194
|
+
height: p
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
function jt(o, e, n) {
|
|
199
|
+
for (var t = Ie(o, !0), i = X(o)[e]; t; ) {
|
|
200
|
+
var r = X(t)[n], a = void 0;
|
|
201
|
+
if (a = i >= r, !a) return t;
|
|
202
|
+
if (t === ve()) break;
|
|
203
|
+
t = Ie(t, !1);
|
|
204
|
+
}
|
|
205
|
+
return !1;
|
|
206
|
+
}
|
|
207
|
+
function ze(o, e, n, t) {
|
|
208
|
+
for (var i = 0, r = 0, a = o.children; r < a.length; ) {
|
|
209
|
+
if (a[r].style.display !== "none" && a[r] !== S.ghost && (t || a[r] !== S.dragged) && ce(a[r], n.draggable, o, !1)) {
|
|
210
|
+
if (i === e)
|
|
211
|
+
return a[r];
|
|
212
|
+
i++;
|
|
213
|
+
}
|
|
214
|
+
r++;
|
|
215
|
+
}
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
function Bt(o, e) {
|
|
219
|
+
for (var n = o.lastElementChild; n && (n === S.ghost || E(n, "display") === "none" || e && !gt(n, e)); )
|
|
220
|
+
n = n.previousElementSibling;
|
|
221
|
+
return n || null;
|
|
222
|
+
}
|
|
223
|
+
function se(o, e) {
|
|
224
|
+
var n = 0;
|
|
225
|
+
if (!o || !o.parentNode)
|
|
226
|
+
return -1;
|
|
227
|
+
for (; o = o.previousElementSibling; )
|
|
228
|
+
o.nodeName.toUpperCase() !== "TEMPLATE" && o !== S.clone && (!e || gt(o, e)) && n++;
|
|
229
|
+
return n;
|
|
230
|
+
}
|
|
231
|
+
function Ut(o) {
|
|
232
|
+
var e = 0, n = 0, t = ve();
|
|
233
|
+
if (o)
|
|
234
|
+
do {
|
|
235
|
+
var i = Ke(o), r = i.a, a = i.d;
|
|
236
|
+
e += o.scrollLeft * r, n += o.scrollTop * a;
|
|
237
|
+
} while (o !== t && (o = o.parentNode));
|
|
238
|
+
return [e, n];
|
|
239
|
+
}
|
|
240
|
+
function Un(o, e) {
|
|
241
|
+
for (var n in o)
|
|
242
|
+
if (o.hasOwnProperty(n)) {
|
|
243
|
+
for (var t in e)
|
|
244
|
+
if (e.hasOwnProperty(t) && e[t] === o[n][t]) return Number(n);
|
|
245
|
+
}
|
|
246
|
+
return -1;
|
|
247
|
+
}
|
|
248
|
+
function Ie(o, e) {
|
|
249
|
+
if (!o || !o.getBoundingClientRect) return ve();
|
|
250
|
+
var n = o, t = !1;
|
|
251
|
+
do
|
|
252
|
+
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
253
|
+
var i = E(n);
|
|
254
|
+
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
255
|
+
if (!n.getBoundingClientRect || n === document.body) return ve();
|
|
256
|
+
if (t || e) return n;
|
|
257
|
+
t = !0;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
while (n = n.parentNode);
|
|
261
|
+
return ve();
|
|
262
|
+
}
|
|
263
|
+
function qn(o, e) {
|
|
264
|
+
if (o && e)
|
|
265
|
+
for (var n in e)
|
|
266
|
+
e.hasOwnProperty(n) && (o[n] = e[n]);
|
|
267
|
+
return o;
|
|
268
|
+
}
|
|
269
|
+
function Et(o, e) {
|
|
270
|
+
return Math.round(o.top) === Math.round(e.top) && Math.round(o.left) === Math.round(e.left) && Math.round(o.height) === Math.round(e.height) && Math.round(o.width) === Math.round(e.width);
|
|
271
|
+
}
|
|
272
|
+
var Ze;
|
|
273
|
+
function hn(o, e) {
|
|
274
|
+
return function() {
|
|
275
|
+
if (!Ze) {
|
|
276
|
+
var n = arguments, t = this;
|
|
277
|
+
n.length === 1 ? o.call(t, n[0]) : o.apply(t, n), Ze = setTimeout(function() {
|
|
278
|
+
Ze = void 0;
|
|
279
|
+
}, e);
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function Zn() {
|
|
284
|
+
clearTimeout(Ze), Ze = void 0;
|
|
285
|
+
}
|
|
286
|
+
function pn(o, e, n) {
|
|
287
|
+
o.scrollLeft += e, o.scrollTop += n;
|
|
288
|
+
}
|
|
289
|
+
function gn(o) {
|
|
290
|
+
var e = window.Polymer, n = window.jQuery || window.Zepto;
|
|
291
|
+
return e && e.dom ? e.dom(o).cloneNode(!0) : n ? n(o).clone(!0)[0] : o.cloneNode(!0);
|
|
292
|
+
}
|
|
293
|
+
function mn(o, e, n) {
|
|
294
|
+
var t = {};
|
|
295
|
+
return Array.from(o.children).forEach(function(i) {
|
|
296
|
+
var r, a, l, s;
|
|
297
|
+
if (!(!ce(i, e.draggable, o, !1) || i.animated || i === n)) {
|
|
298
|
+
var u = X(i);
|
|
299
|
+
t.left = Math.min((r = t.left) !== null && r !== void 0 ? r : 1 / 0, u.left), t.top = Math.min((a = t.top) !== null && a !== void 0 ? a : 1 / 0, u.top), t.right = Math.max((l = t.right) !== null && l !== void 0 ? l : -1 / 0, u.right), t.bottom = Math.max((s = t.bottom) !== null && s !== void 0 ? s : -1 / 0, u.bottom);
|
|
300
|
+
}
|
|
301
|
+
}), t.width = t.right - t.left, t.height = t.bottom - t.top, t.x = t.left, t.y = t.top, t;
|
|
302
|
+
}
|
|
303
|
+
var ee = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
304
|
+
function Qn() {
|
|
305
|
+
var o = [], e;
|
|
306
|
+
return {
|
|
307
|
+
captureAnimationState: function() {
|
|
308
|
+
if (o = [], !!this.options.animation) {
|
|
309
|
+
var t = [].slice.call(this.el.children);
|
|
310
|
+
t.forEach(function(i) {
|
|
311
|
+
if (!(E(i, "display") === "none" || i === S.ghost)) {
|
|
312
|
+
o.push({
|
|
313
|
+
target: i,
|
|
314
|
+
rect: X(i)
|
|
315
|
+
});
|
|
316
|
+
var r = be({}, o[o.length - 1].rect);
|
|
317
|
+
if (i.thisAnimationDuration) {
|
|
318
|
+
var a = Ke(i, !0);
|
|
319
|
+
a && (r.top -= a.f, r.left -= a.e);
|
|
320
|
+
}
|
|
321
|
+
i.fromRect = r;
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
addAnimationState: function(t) {
|
|
327
|
+
o.push(t);
|
|
328
|
+
},
|
|
329
|
+
removeAnimationState: function(t) {
|
|
330
|
+
o.splice(Un(o, {
|
|
331
|
+
target: t
|
|
332
|
+
}), 1);
|
|
333
|
+
},
|
|
334
|
+
animateAll: function(t) {
|
|
335
|
+
var i = this;
|
|
336
|
+
if (!this.options.animation) {
|
|
337
|
+
clearTimeout(e), typeof t == "function" && t();
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
var r = !1, a = 0;
|
|
341
|
+
o.forEach(function(l) {
|
|
342
|
+
var s = 0, u = l.target, p = u.fromRect, f = X(u), b = u.prevFromRect, v = u.prevToRect, C = l.rect, T = Ke(u, !0);
|
|
343
|
+
T && (f.top -= T.f, f.left -= T.e), u.toRect = f, u.thisAnimationDuration && Et(b, f) && !Et(p, f) && // Make sure animatingRect is on line between toRect & fromRect
|
|
344
|
+
(C.top - f.top) / (C.left - f.left) === (p.top - f.top) / (p.left - f.left) && (s = eo(C, b, v, i.options)), Et(f, p) || (u.prevFromRect = p, u.prevToRect = f, s || (s = i.options.animation), i.animate(u, C, f, s)), s && (r = !0, a = Math.max(a, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
345
|
+
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
346
|
+
}, s), u.thisAnimationDuration = s);
|
|
347
|
+
}), clearTimeout(e), r ? e = setTimeout(function() {
|
|
348
|
+
typeof t == "function" && t();
|
|
349
|
+
}, a) : typeof t == "function" && t(), o = [];
|
|
350
|
+
},
|
|
351
|
+
animate: function(t, i, r, a) {
|
|
352
|
+
if (a) {
|
|
353
|
+
E(t, "transition", ""), E(t, "transform", "");
|
|
354
|
+
var l = Ke(this.el), s = l && l.a, u = l && l.d, p = (i.left - r.left) / (s || 1), f = (i.top - r.top) / (u || 1);
|
|
355
|
+
t.animatingX = !!p, t.animatingY = !!f, E(t, "transform", "translate3d(" + p + "px," + f + "px,0)"), this.forRepaintDummy = Jn(t), E(t, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), E(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() {
|
|
356
|
+
E(t, "transition", ""), E(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1;
|
|
357
|
+
}, a);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
function Jn(o) {
|
|
363
|
+
return o.offsetWidth;
|
|
364
|
+
}
|
|
365
|
+
function eo(o, e, n, t) {
|
|
366
|
+
return Math.sqrt(Math.pow(e.top - o.top, 2) + Math.pow(e.left - o.left, 2)) / Math.sqrt(Math.pow(e.top - n.top, 2) + Math.pow(e.left - n.left, 2)) * t.animation;
|
|
367
|
+
}
|
|
368
|
+
var Fe = [], St = {
|
|
369
|
+
initializeByDefault: !0
|
|
370
|
+
}, nt = {
|
|
371
|
+
mount: function(e) {
|
|
372
|
+
for (var n in St)
|
|
373
|
+
St.hasOwnProperty(n) && !(n in e) && (e[n] = St[n]);
|
|
374
|
+
Fe.forEach(function(t) {
|
|
375
|
+
if (t.pluginName === e.pluginName)
|
|
376
|
+
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
|
|
377
|
+
}), Fe.push(e);
|
|
378
|
+
},
|
|
379
|
+
pluginEvent: function(e, n, t) {
|
|
380
|
+
var i = this;
|
|
381
|
+
this.eventCanceled = !1, t.cancel = function() {
|
|
382
|
+
i.eventCanceled = !0;
|
|
383
|
+
};
|
|
384
|
+
var r = e + "Global";
|
|
385
|
+
Fe.forEach(function(a) {
|
|
386
|
+
n[a.pluginName] && (n[a.pluginName][r] && n[a.pluginName][r](be({
|
|
387
|
+
sortable: n
|
|
388
|
+
}, t)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](be({
|
|
389
|
+
sortable: n
|
|
390
|
+
}, t)));
|
|
391
|
+
});
|
|
392
|
+
},
|
|
393
|
+
initializePlugins: function(e, n, t, i) {
|
|
394
|
+
Fe.forEach(function(l) {
|
|
395
|
+
var s = l.pluginName;
|
|
396
|
+
if (!(!e.options[s] && !l.initializeByDefault)) {
|
|
397
|
+
var u = new l(e, n, e.options);
|
|
398
|
+
u.sortable = e, u.options = e.options, e[s] = u, Se(t, u.defaults);
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
for (var r in e.options)
|
|
402
|
+
if (e.options.hasOwnProperty(r)) {
|
|
403
|
+
var a = this.modifyOption(e, r, e.options[r]);
|
|
404
|
+
typeof a < "u" && (e.options[r] = a);
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
getEventProperties: function(e, n) {
|
|
408
|
+
var t = {};
|
|
409
|
+
return Fe.forEach(function(i) {
|
|
410
|
+
typeof i.eventProperties == "function" && Se(t, i.eventProperties.call(n[i.pluginName], e));
|
|
411
|
+
}), t;
|
|
412
|
+
},
|
|
413
|
+
modifyOption: function(e, n, t) {
|
|
414
|
+
var i;
|
|
415
|
+
return Fe.forEach(function(r) {
|
|
416
|
+
e[r.pluginName] && r.optionListeners && typeof r.optionListeners[n] == "function" && (i = r.optionListeners[n].call(e[r.pluginName], t));
|
|
417
|
+
}), i;
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
function to(o) {
|
|
421
|
+
var e = o.sortable, n = o.rootEl, t = o.name, i = o.targetEl, r = o.cloneEl, a = o.toEl, l = o.fromEl, s = o.oldIndex, u = o.newIndex, p = o.oldDraggableIndex, f = o.newDraggableIndex, b = o.originalEvent, v = o.putSortable, C = o.extraEventProperties;
|
|
422
|
+
if (e = e || n && n[ee], !!e) {
|
|
423
|
+
var T, $ = e.options, H = "on" + t.charAt(0).toUpperCase() + t.substr(1);
|
|
424
|
+
window.CustomEvent && !_e && !tt ? T = new CustomEvent(t, {
|
|
425
|
+
bubbles: !0,
|
|
426
|
+
cancelable: !0
|
|
427
|
+
}) : (T = document.createEvent("Event"), T.initEvent(t, !0, !0)), T.to = a || n, T.from = l || n, T.item = i || n, T.clone = r, T.oldIndex = s, T.newIndex = u, T.oldDraggableIndex = p, T.newDraggableIndex = f, T.originalEvent = b, T.pullMode = v ? v.lastPutMode : void 0;
|
|
428
|
+
var k = be(be({}, C), nt.getEventProperties(t, e));
|
|
429
|
+
for (var K in k)
|
|
430
|
+
T[K] = k[K];
|
|
431
|
+
n && n.dispatchEvent(T), $[H] && $[H].call(e, T);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
var no = ["evt"], J = function(e, n) {
|
|
435
|
+
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = t.evt, r = Wn(t, no);
|
|
436
|
+
nt.pluginEvent.bind(S)(e, n, be({
|
|
437
|
+
dragEl: d,
|
|
438
|
+
parentEl: B,
|
|
439
|
+
ghostEl: D,
|
|
440
|
+
rootEl: P,
|
|
441
|
+
nextEl: Pe,
|
|
442
|
+
lastDownEl: ct,
|
|
443
|
+
cloneEl: F,
|
|
444
|
+
cloneHidden: xe,
|
|
445
|
+
dragStarted: Ve,
|
|
446
|
+
putSortable: G,
|
|
447
|
+
activeSortable: S.active,
|
|
448
|
+
originalEvent: i,
|
|
449
|
+
oldIndex: Re,
|
|
450
|
+
oldDraggableIndex: Qe,
|
|
451
|
+
newIndex: oe,
|
|
452
|
+
newDraggableIndex: Ce,
|
|
453
|
+
hideGhostForTarget: wn,
|
|
454
|
+
unhideGhostForTarget: En,
|
|
455
|
+
cloneNowHidden: function() {
|
|
456
|
+
xe = !0;
|
|
457
|
+
},
|
|
458
|
+
cloneNowShown: function() {
|
|
459
|
+
xe = !1;
|
|
460
|
+
},
|
|
461
|
+
dispatchSortableEvent: function(l) {
|
|
462
|
+
q({
|
|
463
|
+
sortable: n,
|
|
464
|
+
name: l,
|
|
465
|
+
originalEvent: i
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
}, r));
|
|
469
|
+
};
|
|
470
|
+
function q(o) {
|
|
471
|
+
to(be({
|
|
472
|
+
putSortable: G,
|
|
473
|
+
cloneEl: F,
|
|
474
|
+
targetEl: d,
|
|
475
|
+
rootEl: P,
|
|
476
|
+
oldIndex: Re,
|
|
477
|
+
oldDraggableIndex: Qe,
|
|
478
|
+
newIndex: oe,
|
|
479
|
+
newDraggableIndex: Ce
|
|
480
|
+
}, o));
|
|
481
|
+
}
|
|
482
|
+
var d, B, D, P, Pe, ct, F, xe, Re, oe, Qe, Ce, it, G, Be = !1, mt = !1, vt = [], Oe, de, _t, Dt, qt, Zt, Ve, Me, Je, et = !1, rt = !1, ft, W, Ct = [], Nt = !1, bt = [], wt = typeof document < "u", at = Mt, Qt = tt || _e ? "cssFloat" : "float", oo = wt && !un && !Mt && "draggable" in document.createElement("div"), vn = function() {
|
|
483
|
+
if (wt) {
|
|
484
|
+
if (_e)
|
|
485
|
+
return !1;
|
|
486
|
+
var o = document.createElement("x");
|
|
487
|
+
return o.style.cssText = "pointer-events:auto", o.style.pointerEvents === "auto";
|
|
488
|
+
}
|
|
489
|
+
}(), bn = function(e, n) {
|
|
490
|
+
var t = E(e), i = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), r = ze(e, 0, n), a = ze(e, 1, n), l = r && E(r), s = a && E(a), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + X(r).width, p = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + X(a).width;
|
|
491
|
+
if (t.display === "flex")
|
|
492
|
+
return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
493
|
+
if (t.display === "grid")
|
|
494
|
+
return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
495
|
+
if (r && l.float && l.float !== "none") {
|
|
496
|
+
var f = l.float === "left" ? "left" : "right";
|
|
497
|
+
return a && (s.clear === "both" || s.clear === f) ? "vertical" : "horizontal";
|
|
498
|
+
}
|
|
499
|
+
return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= i && t[Qt] === "none" || a && t[Qt] === "none" && u + p > i) ? "vertical" : "horizontal";
|
|
500
|
+
}, io = function(e, n, t) {
|
|
501
|
+
var i = t ? e.left : e.top, r = t ? e.right : e.bottom, a = t ? e.width : e.height, l = t ? n.left : n.top, s = t ? n.right : n.bottom, u = t ? n.width : n.height;
|
|
502
|
+
return i === l || r === s || i + a / 2 === l + u / 2;
|
|
503
|
+
}, ro = function(e, n) {
|
|
504
|
+
var t;
|
|
505
|
+
return vt.some(function(i) {
|
|
506
|
+
var r = i[ee].options.emptyInsertThreshold;
|
|
507
|
+
if (!(!r || Bt(i))) {
|
|
508
|
+
var a = X(i), l = e >= a.left - r && e <= a.right + r, s = n >= a.top - r && n <= a.bottom + r;
|
|
509
|
+
if (l && s)
|
|
510
|
+
return t = i;
|
|
511
|
+
}
|
|
512
|
+
}), t;
|
|
513
|
+
}, yn = function(e) {
|
|
514
|
+
function n(r, a) {
|
|
515
|
+
return function(l, s, u, p) {
|
|
516
|
+
var f = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
|
|
517
|
+
if (r == null && (a || f))
|
|
518
|
+
return !0;
|
|
519
|
+
if (r == null || r === !1)
|
|
520
|
+
return !1;
|
|
521
|
+
if (a && r === "clone")
|
|
522
|
+
return r;
|
|
523
|
+
if (typeof r == "function")
|
|
524
|
+
return n(r(l, s, u, p), a)(l, s, u, p);
|
|
525
|
+
var b = (a ? l : s).options.group.name;
|
|
526
|
+
return r === !0 || typeof r == "string" && r === b || r.join && r.indexOf(b) > -1;
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
var t = {}, i = e.group;
|
|
530
|
+
(!i || dt(i) != "object") && (i = {
|
|
531
|
+
name: i
|
|
532
|
+
}), t.name = i.name, t.checkPull = n(i.pull, !0), t.checkPut = n(i.put), t.revertClone = i.revertClone, e.group = t;
|
|
533
|
+
}, wn = function() {
|
|
534
|
+
!vn && D && E(D, "display", "none");
|
|
535
|
+
}, En = function() {
|
|
536
|
+
!vn && D && E(D, "display", "");
|
|
537
|
+
};
|
|
538
|
+
wt && !un && document.addEventListener("click", function(o) {
|
|
539
|
+
if (mt)
|
|
540
|
+
return o.preventDefault(), o.stopPropagation && o.stopPropagation(), o.stopImmediatePropagation && o.stopImmediatePropagation(), mt = !1, !1;
|
|
541
|
+
}, !0);
|
|
542
|
+
var Ne = function(e) {
|
|
543
|
+
if (d) {
|
|
544
|
+
e = e.touches ? e.touches[0] : e;
|
|
545
|
+
var n = ro(e.clientX, e.clientY);
|
|
546
|
+
if (n) {
|
|
547
|
+
var t = {};
|
|
548
|
+
for (var i in e)
|
|
549
|
+
e.hasOwnProperty(i) && (t[i] = e[i]);
|
|
550
|
+
t.target = t.rootEl = n, t.preventDefault = void 0, t.stopPropagation = void 0, n[ee]._onDragOver(t);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}, ao = function(e) {
|
|
554
|
+
d && d.parentNode[ee]._isOutsideThisEl(e.target);
|
|
555
|
+
};
|
|
556
|
+
function S(o, e) {
|
|
557
|
+
if (!(o && o.nodeType && o.nodeType === 1))
|
|
558
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));
|
|
559
|
+
this.el = o, this.options = e = Se({}, e), o[ee] = this;
|
|
560
|
+
var n = {
|
|
561
|
+
group: null,
|
|
562
|
+
sort: !0,
|
|
563
|
+
disabled: !1,
|
|
564
|
+
store: null,
|
|
565
|
+
handle: null,
|
|
566
|
+
draggable: /^[uo]l$/i.test(o.nodeName) ? ">li" : ">*",
|
|
567
|
+
swapThreshold: 1,
|
|
568
|
+
// percentage; 0 <= x <= 1
|
|
569
|
+
invertSwap: !1,
|
|
570
|
+
// invert always
|
|
571
|
+
invertedSwapThreshold: null,
|
|
572
|
+
// will be set to same as swapThreshold if default
|
|
573
|
+
removeCloneOnHide: !0,
|
|
574
|
+
direction: function() {
|
|
575
|
+
return bn(o, this.options);
|
|
576
|
+
},
|
|
577
|
+
ghostClass: "sortable-ghost",
|
|
578
|
+
chosenClass: "sortable-chosen",
|
|
579
|
+
dragClass: "sortable-drag",
|
|
580
|
+
ignore: "a, img",
|
|
581
|
+
filter: null,
|
|
582
|
+
preventOnFilter: !0,
|
|
583
|
+
animation: 0,
|
|
584
|
+
easing: null,
|
|
585
|
+
setData: function(a, l) {
|
|
586
|
+
a.setData("Text", l.textContent);
|
|
587
|
+
},
|
|
588
|
+
dropBubble: !1,
|
|
589
|
+
dragoverBubble: !1,
|
|
590
|
+
dataIdAttr: "data-id",
|
|
591
|
+
delay: 0,
|
|
592
|
+
delayOnTouchOnly: !1,
|
|
593
|
+
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
594
|
+
forceFallback: !1,
|
|
595
|
+
fallbackClass: "sortable-fallback",
|
|
596
|
+
fallbackOnBody: !1,
|
|
597
|
+
fallbackTolerance: 0,
|
|
598
|
+
fallbackOffset: {
|
|
599
|
+
x: 0,
|
|
600
|
+
y: 0
|
|
601
|
+
},
|
|
602
|
+
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
603
|
+
supportPointer: S.supportPointer !== !1 && "PointerEvent" in window && (!qe || Mt),
|
|
604
|
+
emptyInsertThreshold: 5
|
|
605
|
+
};
|
|
606
|
+
nt.initializePlugins(this, o, n);
|
|
607
|
+
for (var t in n)
|
|
608
|
+
!(t in e) && (e[t] = n[t]);
|
|
609
|
+
yn(e);
|
|
610
|
+
for (var i in this)
|
|
611
|
+
i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
612
|
+
this.nativeDraggable = e.forceFallback ? !1 : oo, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? I(o, "pointerdown", this._onTapStart) : (I(o, "mousedown", this._onTapStart), I(o, "touchstart", this._onTapStart)), this.nativeDraggable && (I(o, "dragover", this), I(o, "dragenter", this)), vt.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), Se(this, Qn());
|
|
613
|
+
}
|
|
614
|
+
S.prototype = /** @lends Sortable.prototype */
|
|
615
|
+
{
|
|
616
|
+
constructor: S,
|
|
617
|
+
_isOutsideThisEl: function(e) {
|
|
618
|
+
!this.el.contains(e) && e !== this.el && (Me = null);
|
|
619
|
+
},
|
|
620
|
+
_getDirection: function(e, n) {
|
|
621
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n, d) : this.options.direction;
|
|
622
|
+
},
|
|
623
|
+
_onTapStart: function(e) {
|
|
624
|
+
if (e.cancelable) {
|
|
625
|
+
var n = this, t = this.el, i = this.options, r = i.preventOnFilter, a = e.type, l = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (l || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, p = i.filter;
|
|
626
|
+
if (go(t), !d && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || i.disabled) && !u.isContentEditable && !(!this.nativeDraggable && qe && s && s.tagName.toUpperCase() === "SELECT") && (s = ce(s, i.draggable, t, !1), !(s && s.animated) && ct !== s)) {
|
|
627
|
+
if (Re = se(s), Qe = se(s, i.draggable), typeof p == "function") {
|
|
628
|
+
if (p.call(this, e, s, this)) {
|
|
629
|
+
q({
|
|
630
|
+
sortable: n,
|
|
631
|
+
rootEl: u,
|
|
632
|
+
name: "filter",
|
|
633
|
+
targetEl: s,
|
|
634
|
+
toEl: t,
|
|
635
|
+
fromEl: t
|
|
636
|
+
}), J("filter", n, {
|
|
637
|
+
evt: e
|
|
638
|
+
}), r && e.preventDefault();
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
} else if (p && (p = p.split(",").some(function(f) {
|
|
642
|
+
if (f = ce(u, f.trim(), t, !1), f)
|
|
643
|
+
return q({
|
|
644
|
+
sortable: n,
|
|
645
|
+
rootEl: f,
|
|
646
|
+
name: "filter",
|
|
647
|
+
targetEl: s,
|
|
648
|
+
fromEl: t,
|
|
649
|
+
toEl: t
|
|
650
|
+
}), J("filter", n, {
|
|
651
|
+
evt: e
|
|
652
|
+
}), !0;
|
|
653
|
+
}), p)) {
|
|
654
|
+
r && e.preventDefault();
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
i.handle && !ce(u, i.handle, t, !1) || this._prepareDragStart(e, l, s);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
_prepareDragStart: function(e, n, t) {
|
|
662
|
+
var i = this, r = i.el, a = i.options, l = r.ownerDocument, s;
|
|
663
|
+
if (t && !d && t.parentNode === r) {
|
|
664
|
+
var u = X(t);
|
|
665
|
+
if (P = r, d = t, B = d.parentNode, Pe = d.nextSibling, ct = t, it = a.group, S.dragged = d, Oe = {
|
|
666
|
+
target: d,
|
|
667
|
+
clientX: (n || e).clientX,
|
|
668
|
+
clientY: (n || e).clientY
|
|
669
|
+
}, qt = Oe.clientX - u.left, Zt = Oe.clientY - u.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, d.style["will-change"] = "all", s = function() {
|
|
670
|
+
if (J("delayEnded", i, {
|
|
671
|
+
evt: e
|
|
672
|
+
}), S.eventCanceled) {
|
|
673
|
+
i._onDrop();
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
676
|
+
i._disableDelayedDragEvents(), !Vt && i.nativeDraggable && (d.draggable = !0), i._triggerDragStart(e, n), q({
|
|
677
|
+
sortable: i,
|
|
678
|
+
name: "choose",
|
|
679
|
+
originalEvent: e
|
|
680
|
+
}), ne(d, a.chosenClass, !0);
|
|
681
|
+
}, a.ignore.split(",").forEach(function(p) {
|
|
682
|
+
fn(d, p.trim(), Tt);
|
|
683
|
+
}), I(l, "dragover", Ne), I(l, "mousemove", Ne), I(l, "touchmove", Ne), a.supportPointer ? (I(l, "pointerup", i._onDrop), !this.nativeDraggable && I(l, "pointercancel", i._onDrop)) : (I(l, "mouseup", i._onDrop), I(l, "touchend", i._onDrop), I(l, "touchcancel", i._onDrop)), Vt && this.nativeDraggable && (this.options.touchStartThreshold = 4, d.draggable = !0), J("delayStart", this, {
|
|
684
|
+
evt: e
|
|
685
|
+
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(tt || _e))) {
|
|
686
|
+
if (S.eventCanceled) {
|
|
687
|
+
this._onDrop();
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
a.supportPointer ? (I(l, "pointerup", i._disableDelayedDrag), I(l, "pointercancel", i._disableDelayedDrag)) : (I(l, "mouseup", i._disableDelayedDrag), I(l, "touchend", i._disableDelayedDrag), I(l, "touchcancel", i._disableDelayedDrag)), I(l, "mousemove", i._delayedDragTouchMoveHandler), I(l, "touchmove", i._delayedDragTouchMoveHandler), a.supportPointer && I(l, "pointermove", i._delayedDragTouchMoveHandler), i._dragStartTimer = setTimeout(s, a.delay);
|
|
691
|
+
} else
|
|
692
|
+
s();
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
_delayedDragTouchMoveHandler: function(e) {
|
|
696
|
+
var n = e.touches ? e.touches[0] : e;
|
|
697
|
+
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
698
|
+
},
|
|
699
|
+
_disableDelayedDrag: function() {
|
|
700
|
+
d && Tt(d), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
701
|
+
},
|
|
702
|
+
_disableDelayedDragEvents: function() {
|
|
703
|
+
var e = this.el.ownerDocument;
|
|
704
|
+
x(e, "mouseup", this._disableDelayedDrag), x(e, "touchend", this._disableDelayedDrag), x(e, "touchcancel", this._disableDelayedDrag), x(e, "pointerup", this._disableDelayedDrag), x(e, "pointercancel", this._disableDelayedDrag), x(e, "mousemove", this._delayedDragTouchMoveHandler), x(e, "touchmove", this._delayedDragTouchMoveHandler), x(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
705
|
+
},
|
|
706
|
+
_triggerDragStart: function(e, n) {
|
|
707
|
+
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? I(document, "pointermove", this._onTouchMove) : n ? I(document, "touchmove", this._onTouchMove) : I(document, "mousemove", this._onTouchMove) : (I(d, "dragend", this), I(P, "dragstart", this._onDragStart));
|
|
708
|
+
try {
|
|
709
|
+
document.selection ? ht(function() {
|
|
710
|
+
document.selection.empty();
|
|
711
|
+
}) : window.getSelection().removeAllRanges();
|
|
712
|
+
} catch {
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
_dragStarted: function(e, n) {
|
|
716
|
+
if (Be = !1, P && d) {
|
|
717
|
+
J("dragStarted", this, {
|
|
718
|
+
evt: n
|
|
719
|
+
}), this.nativeDraggable && I(document, "dragover", ao);
|
|
720
|
+
var t = this.options;
|
|
721
|
+
!e && ne(d, t.dragClass, !1), ne(d, t.ghostClass, !0), S.active = this, e && this._appendGhost(), q({
|
|
722
|
+
sortable: this,
|
|
723
|
+
name: "start",
|
|
724
|
+
originalEvent: n
|
|
725
|
+
});
|
|
726
|
+
} else
|
|
727
|
+
this._nulling();
|
|
728
|
+
},
|
|
729
|
+
_emulateDragOver: function() {
|
|
730
|
+
if (de) {
|
|
731
|
+
this._lastX = de.clientX, this._lastY = de.clientY, wn();
|
|
732
|
+
for (var e = document.elementFromPoint(de.clientX, de.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(de.clientX, de.clientY), e !== n); )
|
|
733
|
+
n = e;
|
|
734
|
+
if (d.parentNode[ee]._isOutsideThisEl(e), n)
|
|
735
|
+
do {
|
|
736
|
+
if (n[ee]) {
|
|
737
|
+
var t = void 0;
|
|
738
|
+
if (t = n[ee]._onDragOver({
|
|
739
|
+
clientX: de.clientX,
|
|
740
|
+
clientY: de.clientY,
|
|
741
|
+
target: e,
|
|
742
|
+
rootEl: n
|
|
743
|
+
}), t && !this.options.dragoverBubble)
|
|
744
|
+
break;
|
|
745
|
+
}
|
|
746
|
+
e = n;
|
|
747
|
+
} while (n = cn(n));
|
|
748
|
+
En();
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
_onTouchMove: function(e) {
|
|
752
|
+
if (Oe) {
|
|
753
|
+
var n = this.options, t = n.fallbackTolerance, i = n.fallbackOffset, r = e.touches ? e.touches[0] : e, a = D && Ke(D, !0), l = D && a && a.a, s = D && a && a.d, u = at && W && Ut(W), p = (r.clientX - Oe.clientX + i.x) / (l || 1) + (u ? u[0] - Ct[0] : 0) / (l || 1), f = (r.clientY - Oe.clientY + i.y) / (s || 1) + (u ? u[1] - Ct[1] : 0) / (s || 1);
|
|
754
|
+
if (!S.active && !Be) {
|
|
755
|
+
if (t && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < t)
|
|
756
|
+
return;
|
|
757
|
+
this._onDragStart(e, !0);
|
|
758
|
+
}
|
|
759
|
+
if (D) {
|
|
760
|
+
a ? (a.e += p - (_t || 0), a.f += f - (Dt || 0)) : a = {
|
|
761
|
+
a: 1,
|
|
762
|
+
b: 0,
|
|
763
|
+
c: 0,
|
|
764
|
+
d: 1,
|
|
765
|
+
e: p,
|
|
766
|
+
f
|
|
767
|
+
};
|
|
768
|
+
var b = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
769
|
+
E(D, "webkitTransform", b), E(D, "mozTransform", b), E(D, "msTransform", b), E(D, "transform", b), _t = p, Dt = f, de = r;
|
|
770
|
+
}
|
|
771
|
+
e.cancelable && e.preventDefault();
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
_appendGhost: function() {
|
|
775
|
+
if (!D) {
|
|
776
|
+
var e = this.options.fallbackOnBody ? document.body : P, n = X(d, !0, at, !0, e), t = this.options;
|
|
777
|
+
if (at) {
|
|
778
|
+
for (W = e; E(W, "position") === "static" && E(W, "transform") === "none" && W !== document; )
|
|
779
|
+
W = W.parentNode;
|
|
780
|
+
W !== document.body && W !== document.documentElement ? (W === document && (W = ve()), n.top += W.scrollTop, n.left += W.scrollLeft) : W = ve(), Ct = Ut(W);
|
|
781
|
+
}
|
|
782
|
+
D = d.cloneNode(!0), ne(D, t.ghostClass, !1), ne(D, t.fallbackClass, !0), ne(D, t.dragClass, !0), E(D, "transition", ""), E(D, "transform", ""), E(D, "box-sizing", "border-box"), E(D, "margin", 0), E(D, "top", n.top), E(D, "left", n.left), E(D, "width", n.width), E(D, "height", n.height), E(D, "opacity", "0.8"), E(D, "position", at ? "absolute" : "fixed"), E(D, "zIndex", "100000"), E(D, "pointerEvents", "none"), S.ghost = D, e.appendChild(D), E(D, "transform-origin", qt / parseInt(D.style.width) * 100 + "% " + Zt / parseInt(D.style.height) * 100 + "%");
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
_onDragStart: function(e, n) {
|
|
786
|
+
var t = this, i = e.dataTransfer, r = t.options;
|
|
787
|
+
if (J("dragStart", this, {
|
|
788
|
+
evt: e
|
|
789
|
+
}), S.eventCanceled) {
|
|
790
|
+
this._onDrop();
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
J("setupClone", this), S.eventCanceled || (F = gn(d), F.removeAttribute("id"), F.draggable = !1, F.style["will-change"] = "", this._hideClone(), ne(F, this.options.chosenClass, !1), S.clone = F), t.cloneId = ht(function() {
|
|
794
|
+
J("clone", t), !S.eventCanceled && (t.options.removeCloneOnHide || P.insertBefore(F, d), t._hideClone(), q({
|
|
795
|
+
sortable: t,
|
|
796
|
+
name: "clone"
|
|
797
|
+
}));
|
|
798
|
+
}), !n && ne(d, r.dragClass, !0), n ? (mt = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (x(document, "mouseup", t._onDrop), x(document, "touchend", t._onDrop), x(document, "touchcancel", t._onDrop), i && (i.effectAllowed = "move", r.setData && r.setData.call(t, i, d)), I(document, "drop", t), E(d, "transform", "translateZ(0)")), Be = !0, t._dragStartId = ht(t._dragStarted.bind(t, n, e)), I(document, "selectstart", t), Ve = !0, window.getSelection().removeAllRanges(), qe && E(document.body, "user-select", "none");
|
|
799
|
+
},
|
|
800
|
+
// Returns true - if no further action is needed (either inserted or another condition)
|
|
801
|
+
_onDragOver: function(e) {
|
|
802
|
+
var n = this.el, t = e.target, i, r, a, l = this.options, s = l.group, u = S.active, p = it === s, f = l.sort, b = G || u, v, C = this, T = !1;
|
|
803
|
+
if (Nt) return;
|
|
804
|
+
function $(y, O) {
|
|
805
|
+
J(y, C, be({
|
|
806
|
+
evt: e,
|
|
807
|
+
isOwner: p,
|
|
808
|
+
axis: v ? "vertical" : "horizontal",
|
|
809
|
+
revert: a,
|
|
810
|
+
dragRect: i,
|
|
811
|
+
targetRect: r,
|
|
812
|
+
canSort: f,
|
|
813
|
+
fromSortable: b,
|
|
814
|
+
target: t,
|
|
815
|
+
completed: k,
|
|
816
|
+
onMove: function(le, g) {
|
|
817
|
+
return lt(P, n, d, i, le, X(le), e, g);
|
|
818
|
+
},
|
|
819
|
+
changed: K
|
|
820
|
+
}, O));
|
|
821
|
+
}
|
|
822
|
+
function H() {
|
|
823
|
+
$("dragOverAnimationCapture"), C.captureAnimationState(), C !== b && b.captureAnimationState();
|
|
824
|
+
}
|
|
825
|
+
function k(y) {
|
|
826
|
+
return $("dragOverCompleted", {
|
|
827
|
+
insertion: y
|
|
828
|
+
}), y && (p ? u._hideClone() : u._showClone(C), C !== b && (ne(d, G ? G.options.ghostClass : u.options.ghostClass, !1), ne(d, l.ghostClass, !0)), G !== C && C !== S.active ? G = C : C === S.active && G && (G = null), b === C && (C._ignoreWhileAnimating = t), C.animateAll(function() {
|
|
829
|
+
$("dragOverAnimationComplete"), C._ignoreWhileAnimating = null;
|
|
830
|
+
}), C !== b && (b.animateAll(), b._ignoreWhileAnimating = null)), (t === d && !d.animated || t === n && !t.animated) && (Me = null), !l.dragoverBubble && !e.rootEl && t !== document && (d.parentNode[ee]._isOutsideThisEl(e.target), !y && Ne(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), T = !0;
|
|
831
|
+
}
|
|
832
|
+
function K() {
|
|
833
|
+
oe = se(d), Ce = se(d, l.draggable), q({
|
|
834
|
+
sortable: C,
|
|
835
|
+
name: "change",
|
|
836
|
+
toEl: n,
|
|
837
|
+
newIndex: oe,
|
|
838
|
+
newDraggableIndex: Ce,
|
|
839
|
+
originalEvent: e
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = ce(t, l.draggable, n, !0), $("dragOver"), S.eventCanceled) return T;
|
|
843
|
+
if (d.contains(e.target) || t.animated && t.animatingX && t.animatingY || C._ignoreWhileAnimating === t)
|
|
844
|
+
return k(!1);
|
|
845
|
+
if (mt = !1, u && !l.disabled && (p ? f || (a = B !== P) : G === this || (this.lastPutMode = it.checkPull(this, u, d, e)) && s.checkPut(this, u, d, e))) {
|
|
846
|
+
if (v = this._getDirection(e, t) === "vertical", i = X(d), $("dragOverValid"), S.eventCanceled) return T;
|
|
847
|
+
if (a)
|
|
848
|
+
return B = P, H(), this._hideClone(), $("revert"), S.eventCanceled || (Pe ? P.insertBefore(d, Pe) : P.appendChild(d)), k(!0);
|
|
849
|
+
var M = Bt(n, l.draggable);
|
|
850
|
+
if (!M || co(e, v, this) && !M.animated) {
|
|
851
|
+
if (M === d)
|
|
852
|
+
return k(!1);
|
|
853
|
+
if (M && n === e.target && (t = M), t && (r = X(t)), lt(P, n, d, i, t, r, e, !!t) !== !1)
|
|
854
|
+
return H(), M && M.nextSibling ? n.insertBefore(d, M.nextSibling) : n.appendChild(d), B = n, K(), k(!0);
|
|
855
|
+
} else if (M && uo(e, v, this)) {
|
|
856
|
+
var U = ze(n, 0, l, !0);
|
|
857
|
+
if (U === d)
|
|
858
|
+
return k(!1);
|
|
859
|
+
if (t = U, r = X(t), lt(P, n, d, i, t, r, e, !1) !== !1)
|
|
860
|
+
return H(), n.insertBefore(d, U), B = n, K(), k(!0);
|
|
861
|
+
} else if (t.parentNode === n) {
|
|
862
|
+
r = X(t);
|
|
863
|
+
var R = 0, ie, re = d.parentNode !== n, N = !io(d.animated && d.toRect || i, t.animated && t.toRect || r, v), ye = v ? "top" : "left", ae = jt(t, "top", "top") || jt(d, "top", "top"), he = ae ? ae.scrollTop : void 0;
|
|
864
|
+
Me !== t && (ie = r[ye], et = !1, rt = !N && l.invertSwap || re), R = fo(e, t, r, v, N ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, rt, Me === t);
|
|
865
|
+
var V;
|
|
866
|
+
if (R !== 0) {
|
|
867
|
+
var L = se(d);
|
|
868
|
+
do
|
|
869
|
+
L -= R, V = B.children[L];
|
|
870
|
+
while (V && (E(V, "display") === "none" || V === D));
|
|
871
|
+
}
|
|
872
|
+
if (R === 0 || V === t)
|
|
873
|
+
return k(!1);
|
|
874
|
+
Me = t, Je = R;
|
|
875
|
+
var pe = t.nextElementSibling, Z = !1;
|
|
876
|
+
Z = R === 1;
|
|
877
|
+
var De = lt(P, n, d, i, t, r, e, Z);
|
|
878
|
+
if (De !== !1)
|
|
879
|
+
return (De === 1 || De === -1) && (Z = De === 1), Nt = !0, setTimeout(so, 30), H(), Z && !pe ? n.appendChild(d) : t.parentNode.insertBefore(d, Z ? pe : t), ae && pn(ae, 0, he - ae.scrollTop), B = d.parentNode, ie !== void 0 && !rt && (ft = Math.abs(ie - X(t)[ye])), K(), k(!0);
|
|
880
|
+
}
|
|
881
|
+
if (n.contains(d))
|
|
882
|
+
return k(!1);
|
|
883
|
+
}
|
|
884
|
+
return !1;
|
|
885
|
+
},
|
|
886
|
+
_ignoreWhileAnimating: null,
|
|
887
|
+
_offMoveEvents: function() {
|
|
888
|
+
x(document, "mousemove", this._onTouchMove), x(document, "touchmove", this._onTouchMove), x(document, "pointermove", this._onTouchMove), x(document, "dragover", Ne), x(document, "mousemove", Ne), x(document, "touchmove", Ne);
|
|
889
|
+
},
|
|
890
|
+
_offUpEvents: function() {
|
|
891
|
+
var e = this.el.ownerDocument;
|
|
892
|
+
x(e, "mouseup", this._onDrop), x(e, "touchend", this._onDrop), x(e, "pointerup", this._onDrop), x(e, "pointercancel", this._onDrop), x(e, "touchcancel", this._onDrop), x(document, "selectstart", this);
|
|
893
|
+
},
|
|
894
|
+
_onDrop: function(e) {
|
|
895
|
+
var n = this.el, t = this.options;
|
|
896
|
+
if (oe = se(d), Ce = se(d, t.draggable), J("drop", this, {
|
|
897
|
+
evt: e
|
|
898
|
+
}), B = d && d.parentNode, oe = se(d), Ce = se(d, t.draggable), S.eventCanceled) {
|
|
899
|
+
this._nulling();
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
Be = !1, rt = !1, et = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Pt(this.cloneId), Pt(this._dragStartId), this.nativeDraggable && (x(document, "drop", this), x(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), qe && E(document.body, "user-select", ""), E(d, "transform", ""), e && (Ve && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), D && D.parentNode && D.parentNode.removeChild(D), (P === B || G && G.lastPutMode !== "clone") && F && F.parentNode && F.parentNode.removeChild(F), d && (this.nativeDraggable && x(d, "dragend", this), Tt(d), d.style["will-change"] = "", Ve && !Be && ne(d, G ? G.options.ghostClass : this.options.ghostClass, !1), ne(d, this.options.chosenClass, !1), q({
|
|
903
|
+
sortable: this,
|
|
904
|
+
name: "unchoose",
|
|
905
|
+
toEl: B,
|
|
906
|
+
newIndex: null,
|
|
907
|
+
newDraggableIndex: null,
|
|
908
|
+
originalEvent: e
|
|
909
|
+
}), P !== B ? (oe >= 0 && (q({
|
|
910
|
+
rootEl: B,
|
|
911
|
+
name: "add",
|
|
912
|
+
toEl: B,
|
|
913
|
+
fromEl: P,
|
|
914
|
+
originalEvent: e
|
|
915
|
+
}), q({
|
|
916
|
+
sortable: this,
|
|
917
|
+
name: "remove",
|
|
918
|
+
toEl: B,
|
|
919
|
+
originalEvent: e
|
|
920
|
+
}), q({
|
|
921
|
+
rootEl: B,
|
|
922
|
+
name: "sort",
|
|
923
|
+
toEl: B,
|
|
924
|
+
fromEl: P,
|
|
925
|
+
originalEvent: e
|
|
926
|
+
}), q({
|
|
927
|
+
sortable: this,
|
|
928
|
+
name: "sort",
|
|
929
|
+
toEl: B,
|
|
930
|
+
originalEvent: e
|
|
931
|
+
})), G && G.save()) : oe !== Re && oe >= 0 && (q({
|
|
932
|
+
sortable: this,
|
|
933
|
+
name: "update",
|
|
934
|
+
toEl: B,
|
|
935
|
+
originalEvent: e
|
|
936
|
+
}), q({
|
|
937
|
+
sortable: this,
|
|
938
|
+
name: "sort",
|
|
939
|
+
toEl: B,
|
|
940
|
+
originalEvent: e
|
|
941
|
+
})), S.active && ((oe == null || oe === -1) && (oe = Re, Ce = Qe), q({
|
|
942
|
+
sortable: this,
|
|
943
|
+
name: "end",
|
|
944
|
+
toEl: B,
|
|
945
|
+
originalEvent: e
|
|
946
|
+
}), this.save()))), this._nulling();
|
|
947
|
+
},
|
|
948
|
+
_nulling: function() {
|
|
949
|
+
J("nulling", this), P = d = B = D = Pe = F = ct = xe = Oe = de = Ve = oe = Ce = Re = Qe = Me = Je = G = it = S.dragged = S.ghost = S.clone = S.active = null, bt.forEach(function(e) {
|
|
950
|
+
e.checked = !0;
|
|
951
|
+
}), bt.length = _t = Dt = 0;
|
|
952
|
+
},
|
|
953
|
+
handleEvent: function(e) {
|
|
954
|
+
switch (e.type) {
|
|
955
|
+
case "drop":
|
|
956
|
+
case "dragend":
|
|
957
|
+
this._onDrop(e);
|
|
958
|
+
break;
|
|
959
|
+
case "dragenter":
|
|
960
|
+
case "dragover":
|
|
961
|
+
d && (this._onDragOver(e), lo(e));
|
|
962
|
+
break;
|
|
963
|
+
case "selectstart":
|
|
964
|
+
e.preventDefault();
|
|
965
|
+
break;
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
/**
|
|
969
|
+
* Serializes the item into an array of string.
|
|
970
|
+
* @returns {String[]}
|
|
971
|
+
*/
|
|
972
|
+
toArray: function() {
|
|
973
|
+
for (var e = [], n, t = this.el.children, i = 0, r = t.length, a = this.options; i < r; i++)
|
|
974
|
+
n = t[i], ce(n, a.draggable, this.el, !1) && e.push(n.getAttribute(a.dataIdAttr) || po(n));
|
|
975
|
+
return e;
|
|
976
|
+
},
|
|
977
|
+
/**
|
|
978
|
+
* Sorts the elements according to the array.
|
|
979
|
+
* @param {String[]} order order of the items
|
|
980
|
+
*/
|
|
981
|
+
sort: function(e, n) {
|
|
982
|
+
var t = {}, i = this.el;
|
|
983
|
+
this.toArray().forEach(function(r, a) {
|
|
984
|
+
var l = i.children[a];
|
|
985
|
+
ce(l, this.options.draggable, i, !1) && (t[r] = l);
|
|
986
|
+
}, this), n && this.captureAnimationState(), e.forEach(function(r) {
|
|
987
|
+
t[r] && (i.removeChild(t[r]), i.appendChild(t[r]));
|
|
988
|
+
}), n && this.animateAll();
|
|
989
|
+
},
|
|
990
|
+
/**
|
|
991
|
+
* Save the current sorting
|
|
992
|
+
*/
|
|
993
|
+
save: function() {
|
|
994
|
+
var e = this.options.store;
|
|
995
|
+
e && e.set && e.set(this);
|
|
996
|
+
},
|
|
997
|
+
/**
|
|
998
|
+
* For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
|
|
999
|
+
* @param {HTMLElement} el
|
|
1000
|
+
* @param {String} [selector] default: `options.draggable`
|
|
1001
|
+
* @returns {HTMLElement|null}
|
|
1002
|
+
*/
|
|
1003
|
+
closest: function(e, n) {
|
|
1004
|
+
return ce(e, n || this.options.draggable, this.el, !1);
|
|
1005
|
+
},
|
|
1006
|
+
/**
|
|
1007
|
+
* Set/get option
|
|
1008
|
+
* @param {string} name
|
|
1009
|
+
* @param {*} [value]
|
|
1010
|
+
* @returns {*}
|
|
1011
|
+
*/
|
|
1012
|
+
option: function(e, n) {
|
|
1013
|
+
var t = this.options;
|
|
1014
|
+
if (n === void 0)
|
|
1015
|
+
return t[e];
|
|
1016
|
+
var i = nt.modifyOption(this, e, n);
|
|
1017
|
+
typeof i < "u" ? t[e] = i : t[e] = n, e === "group" && yn(t);
|
|
1018
|
+
},
|
|
1019
|
+
/**
|
|
1020
|
+
* Destroy
|
|
1021
|
+
*/
|
|
1022
|
+
destroy: function() {
|
|
1023
|
+
J("destroy", this);
|
|
1024
|
+
var e = this.el;
|
|
1025
|
+
e[ee] = null, x(e, "mousedown", this._onTapStart), x(e, "touchstart", this._onTapStart), x(e, "pointerdown", this._onTapStart), this.nativeDraggable && (x(e, "dragover", this), x(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(n) {
|
|
1026
|
+
n.removeAttribute("draggable");
|
|
1027
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), vt.splice(vt.indexOf(this.el), 1), this.el = e = null;
|
|
1028
|
+
},
|
|
1029
|
+
_hideClone: function() {
|
|
1030
|
+
if (!xe) {
|
|
1031
|
+
if (J("hideClone", this), S.eventCanceled) return;
|
|
1032
|
+
E(F, "display", "none"), this.options.removeCloneOnHide && F.parentNode && F.parentNode.removeChild(F), xe = !0;
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
_showClone: function(e) {
|
|
1036
|
+
if (e.lastPutMode !== "clone") {
|
|
1037
|
+
this._hideClone();
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
if (xe) {
|
|
1041
|
+
if (J("showClone", this), S.eventCanceled) return;
|
|
1042
|
+
d.parentNode == P && !this.options.group.revertClone ? P.insertBefore(F, d) : Pe ? P.insertBefore(F, Pe) : P.appendChild(F), this.options.group.revertClone && this.animate(d, F), E(F, "display", ""), xe = !1;
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
};
|
|
1046
|
+
function lo(o) {
|
|
1047
|
+
o.dataTransfer && (o.dataTransfer.dropEffect = "move"), o.cancelable && o.preventDefault();
|
|
1048
|
+
}
|
|
1049
|
+
function lt(o, e, n, t, i, r, a, l) {
|
|
1050
|
+
var s, u = o[ee], p = u.options.onMove, f;
|
|
1051
|
+
return window.CustomEvent && !_e && !tt ? s = new CustomEvent("move", {
|
|
1052
|
+
bubbles: !0,
|
|
1053
|
+
cancelable: !0
|
|
1054
|
+
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = e, s.from = o, s.dragged = n, s.draggedRect = t, s.related = i || e, s.relatedRect = r || X(e), s.willInsertAfter = l, s.originalEvent = a, o.dispatchEvent(s), p && (f = p.call(u, s, a)), f;
|
|
1055
|
+
}
|
|
1056
|
+
function Tt(o) {
|
|
1057
|
+
o.draggable = !1;
|
|
1058
|
+
}
|
|
1059
|
+
function so() {
|
|
1060
|
+
Nt = !1;
|
|
1061
|
+
}
|
|
1062
|
+
function uo(o, e, n) {
|
|
1063
|
+
var t = X(ze(n.el, 0, n.options, !0)), i = mn(n.el, n.options, D), r = 10;
|
|
1064
|
+
return e ? o.clientX < i.left - r || o.clientY < t.top && o.clientX < t.right : o.clientY < i.top - r || o.clientY < t.bottom && o.clientX < t.left;
|
|
1065
|
+
}
|
|
1066
|
+
function co(o, e, n) {
|
|
1067
|
+
var t = X(Bt(n.el, n.options.draggable)), i = mn(n.el, n.options, D), r = 10;
|
|
1068
|
+
return e ? o.clientX > i.right + r || o.clientY > t.bottom && o.clientX > t.left : o.clientY > i.bottom + r || o.clientX > t.right && o.clientY > t.top;
|
|
1069
|
+
}
|
|
1070
|
+
function fo(o, e, n, t, i, r, a, l) {
|
|
1071
|
+
var s = t ? o.clientY : o.clientX, u = t ? n.height : n.width, p = t ? n.top : n.left, f = t ? n.bottom : n.right, b = !1;
|
|
1072
|
+
if (!a) {
|
|
1073
|
+
if (l && ft < u * i) {
|
|
1074
|
+
if (!et && (Je === 1 ? s > p + u * r / 2 : s < f - u * r / 2) && (et = !0), et)
|
|
1075
|
+
b = !0;
|
|
1076
|
+
else if (Je === 1 ? s < p + ft : s > f - ft)
|
|
1077
|
+
return -Je;
|
|
1078
|
+
} else if (s > p + u * (1 - i) / 2 && s < f - u * (1 - i) / 2)
|
|
1079
|
+
return ho(e);
|
|
1080
|
+
}
|
|
1081
|
+
return b = b || a, b && (s < p + u * r / 2 || s > f - u * r / 2) ? s > p + u / 2 ? 1 : -1 : 0;
|
|
1082
|
+
}
|
|
1083
|
+
function ho(o) {
|
|
1084
|
+
return se(d) < se(o) ? 1 : -1;
|
|
1085
|
+
}
|
|
1086
|
+
function po(o) {
|
|
1087
|
+
for (var e = o.tagName + o.className + o.src + o.href + o.textContent, n = e.length, t = 0; n--; )
|
|
1088
|
+
t += e.charCodeAt(n);
|
|
1089
|
+
return t.toString(36);
|
|
1090
|
+
}
|
|
1091
|
+
function go(o) {
|
|
1092
|
+
bt.length = 0;
|
|
1093
|
+
for (var e = o.getElementsByTagName("input"), n = e.length; n--; ) {
|
|
1094
|
+
var t = e[n];
|
|
1095
|
+
t.checked && bt.push(t);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
function ht(o) {
|
|
1099
|
+
return setTimeout(o, 0);
|
|
1100
|
+
}
|
|
1101
|
+
function Pt(o) {
|
|
1102
|
+
return clearTimeout(o);
|
|
1103
|
+
}
|
|
1104
|
+
wt && I(document, "touchmove", function(o) {
|
|
1105
|
+
(S.active || Be) && o.cancelable && o.preventDefault();
|
|
1106
|
+
});
|
|
1107
|
+
S.utils = {
|
|
1108
|
+
on: I,
|
|
1109
|
+
off: x,
|
|
1110
|
+
css: E,
|
|
1111
|
+
find: fn,
|
|
1112
|
+
is: function(e, n) {
|
|
1113
|
+
return !!ce(e, n, e, !1);
|
|
1114
|
+
},
|
|
1115
|
+
extend: qn,
|
|
1116
|
+
throttle: hn,
|
|
1117
|
+
closest: ce,
|
|
1118
|
+
toggleClass: ne,
|
|
1119
|
+
clone: gn,
|
|
1120
|
+
index: se,
|
|
1121
|
+
nextTick: ht,
|
|
1122
|
+
cancelNextTick: Pt,
|
|
1123
|
+
detectDirection: bn,
|
|
1124
|
+
getChild: ze,
|
|
1125
|
+
expando: ee
|
|
1126
|
+
};
|
|
1127
|
+
S.get = function(o) {
|
|
1128
|
+
return o[ee];
|
|
1129
|
+
};
|
|
1130
|
+
S.mount = function() {
|
|
1131
|
+
for (var o = arguments.length, e = new Array(o), n = 0; n < o; n++)
|
|
1132
|
+
e[n] = arguments[n];
|
|
1133
|
+
e[0].constructor === Array && (e = e[0]), e.forEach(function(t) {
|
|
1134
|
+
if (!t.prototype || !t.prototype.constructor)
|
|
1135
|
+
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));
|
|
1136
|
+
t.utils && (S.utils = be(be({}, S.utils), t.utils)), nt.mount(t);
|
|
1137
|
+
});
|
|
1138
|
+
};
|
|
1139
|
+
S.create = function(o, e) {
|
|
1140
|
+
return new S(o, e);
|
|
1141
|
+
};
|
|
1142
|
+
S.version = jn;
|
|
1143
|
+
var z = [], We, At, Ft = !1, xt, It, yt, je;
|
|
1144
|
+
function mo() {
|
|
1145
|
+
function o() {
|
|
1146
|
+
this.defaults = {
|
|
1147
|
+
scroll: !0,
|
|
1148
|
+
forceAutoScrollFallback: !1,
|
|
1149
|
+
scrollSensitivity: 30,
|
|
1150
|
+
scrollSpeed: 10,
|
|
1151
|
+
bubbleScroll: !0
|
|
1152
|
+
};
|
|
1153
|
+
for (var e in this)
|
|
1154
|
+
e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
|
|
1155
|
+
}
|
|
1156
|
+
return o.prototype = {
|
|
1157
|
+
dragStarted: function(n) {
|
|
1158
|
+
var t = n.originalEvent;
|
|
1159
|
+
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? I(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? I(document, "touchmove", this._handleFallbackAutoScroll) : I(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1160
|
+
},
|
|
1161
|
+
dragOverCompleted: function(n) {
|
|
1162
|
+
var t = n.originalEvent;
|
|
1163
|
+
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1164
|
+
},
|
|
1165
|
+
drop: function() {
|
|
1166
|
+
this.sortable.nativeDraggable ? x(document, "dragover", this._handleAutoScroll) : (x(document, "pointermove", this._handleFallbackAutoScroll), x(document, "touchmove", this._handleFallbackAutoScroll), x(document, "mousemove", this._handleFallbackAutoScroll)), Jt(), pt(), Zn();
|
|
1167
|
+
},
|
|
1168
|
+
nulling: function() {
|
|
1169
|
+
yt = At = We = Ft = je = xt = It = null, z.length = 0;
|
|
1170
|
+
},
|
|
1171
|
+
_handleFallbackAutoScroll: function(n) {
|
|
1172
|
+
this._handleAutoScroll(n, !0);
|
|
1173
|
+
},
|
|
1174
|
+
_handleAutoScroll: function(n, t) {
|
|
1175
|
+
var i = this, r = (n.touches ? n.touches[0] : n).clientX, a = (n.touches ? n.touches[0] : n).clientY, l = document.elementFromPoint(r, a);
|
|
1176
|
+
if (yt = n, t || this.options.forceAutoScrollFallback || tt || _e || qe) {
|
|
1177
|
+
kt(n, this.options, l, t);
|
|
1178
|
+
var s = Ie(l, !0);
|
|
1179
|
+
Ft && (!je || r !== xt || a !== It) && (je && Jt(), je = setInterval(function() {
|
|
1180
|
+
var u = Ie(document.elementFromPoint(r, a), !0);
|
|
1181
|
+
u !== s && (s = u, pt()), kt(n, i.options, u, t);
|
|
1182
|
+
}, 10), xt = r, It = a);
|
|
1183
|
+
} else {
|
|
1184
|
+
if (!this.options.bubbleScroll || Ie(l, !0) === ve()) {
|
|
1185
|
+
pt();
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
1188
|
+
kt(n, this.options, Ie(l, !1), !1);
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
}, Se(o, {
|
|
1192
|
+
pluginName: "scroll",
|
|
1193
|
+
initializeByDefault: !0
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
function pt() {
|
|
1197
|
+
z.forEach(function(o) {
|
|
1198
|
+
clearInterval(o.pid);
|
|
1199
|
+
}), z = [];
|
|
1200
|
+
}
|
|
1201
|
+
function Jt() {
|
|
1202
|
+
clearInterval(je);
|
|
1203
|
+
}
|
|
1204
|
+
var kt = hn(function(o, e, n, t) {
|
|
1205
|
+
if (e.scroll) {
|
|
1206
|
+
var i = (o.touches ? o.touches[0] : o).clientX, r = (o.touches ? o.touches[0] : o).clientY, a = e.scrollSensitivity, l = e.scrollSpeed, s = ve(), u = !1, p;
|
|
1207
|
+
At !== n && (At = n, pt(), We = e.scroll, p = e.scrollFn, We === !0 && (We = Ie(n, !0)));
|
|
1208
|
+
var f = 0, b = We;
|
|
1209
|
+
do {
|
|
1210
|
+
var v = b, C = X(v), T = C.top, $ = C.bottom, H = C.left, k = C.right, K = C.width, M = C.height, U = void 0, R = void 0, ie = v.scrollWidth, re = v.scrollHeight, N = E(v), ye = v.scrollLeft, ae = v.scrollTop;
|
|
1211
|
+
v === s ? (U = K < ie && (N.overflowX === "auto" || N.overflowX === "scroll" || N.overflowX === "visible"), R = M < re && (N.overflowY === "auto" || N.overflowY === "scroll" || N.overflowY === "visible")) : (U = K < ie && (N.overflowX === "auto" || N.overflowX === "scroll"), R = M < re && (N.overflowY === "auto" || N.overflowY === "scroll"));
|
|
1212
|
+
var he = U && (Math.abs(k - i) <= a && ye + K < ie) - (Math.abs(H - i) <= a && !!ye), V = R && (Math.abs($ - r) <= a && ae + M < re) - (Math.abs(T - r) <= a && !!ae);
|
|
1213
|
+
if (!z[f])
|
|
1214
|
+
for (var L = 0; L <= f; L++)
|
|
1215
|
+
z[L] || (z[L] = {});
|
|
1216
|
+
(z[f].vx != he || z[f].vy != V || z[f].el !== v) && (z[f].el = v, z[f].vx = he, z[f].vy = V, clearInterval(z[f].pid), (he != 0 || V != 0) && (u = !0, z[f].pid = setInterval((function() {
|
|
1217
|
+
t && this.layer === 0 && S.active._onTouchMove(yt);
|
|
1218
|
+
var pe = z[this.layer].vy ? z[this.layer].vy * l : 0, Z = z[this.layer].vx ? z[this.layer].vx * l : 0;
|
|
1219
|
+
typeof p == "function" && p.call(S.dragged.parentNode[ee], Z, pe, o, yt, z[this.layer].el) !== "continue" || pn(z[this.layer].el, Z, pe);
|
|
1220
|
+
}).bind({
|
|
1221
|
+
layer: f
|
|
1222
|
+
}), 24))), f++;
|
|
1223
|
+
} while (e.bubbleScroll && b !== s && (b = Ie(b, !1)));
|
|
1224
|
+
Ft = u;
|
|
1225
|
+
}
|
|
1226
|
+
}, 30), Sn = function(e) {
|
|
1227
|
+
var n = e.originalEvent, t = e.putSortable, i = e.dragEl, r = e.activeSortable, a = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1228
|
+
if (n) {
|
|
1229
|
+
var u = t || r;
|
|
1230
|
+
l();
|
|
1231
|
+
var p = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, f = document.elementFromPoint(p.clientX, p.clientY);
|
|
1232
|
+
s(), u && !u.el.contains(f) && (a("spill"), this.onSpill({
|
|
1233
|
+
dragEl: i,
|
|
1234
|
+
putSortable: t
|
|
1235
|
+
}));
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1238
|
+
function Rt() {
|
|
1239
|
+
}
|
|
1240
|
+
Rt.prototype = {
|
|
1241
|
+
startIndex: null,
|
|
1242
|
+
dragStart: function(e) {
|
|
1243
|
+
var n = e.oldDraggableIndex;
|
|
1244
|
+
this.startIndex = n;
|
|
1245
|
+
},
|
|
1246
|
+
onSpill: function(e) {
|
|
1247
|
+
var n = e.dragEl, t = e.putSortable;
|
|
1248
|
+
this.sortable.captureAnimationState(), t && t.captureAnimationState();
|
|
1249
|
+
var i = ze(this.sortable.el, this.startIndex, this.options);
|
|
1250
|
+
i ? this.sortable.el.insertBefore(n, i) : this.sortable.el.appendChild(n), this.sortable.animateAll(), t && t.animateAll();
|
|
1251
|
+
},
|
|
1252
|
+
drop: Sn
|
|
1253
|
+
};
|
|
1254
|
+
Se(Rt, {
|
|
1255
|
+
pluginName: "revertOnSpill"
|
|
1256
|
+
});
|
|
1257
|
+
function Kt() {
|
|
1258
|
+
}
|
|
1259
|
+
Kt.prototype = {
|
|
1260
|
+
onSpill: function(e) {
|
|
1261
|
+
var n = e.dragEl, t = e.putSortable, i = t || this.sortable;
|
|
1262
|
+
i.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), i.animateAll();
|
|
1263
|
+
},
|
|
1264
|
+
drop: Sn
|
|
1265
|
+
};
|
|
1266
|
+
Se(Kt, {
|
|
1267
|
+
pluginName: "removeOnSpill"
|
|
1268
|
+
});
|
|
1269
|
+
S.mount(new mo());
|
|
1270
|
+
S.mount(Kt, Rt);
|
|
1271
|
+
const vo = ["sm", "md", "lg"], en = { none: "gap-none", sm: "gap-sm", md: "gap-md", lg: "gap-lg" }, [bo, yo] = Bn("CheckboxGroup"), wo = ["data-parents", "data-key", "data-draggable"], Eo = /* @__PURE__ */ tn({
|
|
1272
|
+
...ln("TreeNode"),
|
|
1273
|
+
__name: "TreeNode",
|
|
1274
|
+
props: {
|
|
1275
|
+
item: {},
|
|
1276
|
+
level: { default: 1 },
|
|
1277
|
+
parentKeys: {}
|
|
1278
|
+
},
|
|
1279
|
+
setup(o) {
|
|
1280
|
+
const e = o, n = nn(), t = bo(), i = an(t.prefixes.node, {
|
|
1281
|
+
variants: {
|
|
1282
|
+
disabled: we("disabled", t.prefixes.node),
|
|
1283
|
+
active: we("active", t.prefixes.node),
|
|
1284
|
+
hasChildren: we("has-children", t.prefixes.node)
|
|
1285
|
+
}
|
|
1286
|
+
}), r = A(() => {
|
|
1287
|
+
switch (t.size.value) {
|
|
1288
|
+
case "sm":
|
|
1289
|
+
return "2xsm";
|
|
1290
|
+
case "md":
|
|
1291
|
+
case "lg":
|
|
1292
|
+
return "xsm";
|
|
1293
|
+
}
|
|
1294
|
+
}), a = A(() => {
|
|
1295
|
+
switch (t.size.value) {
|
|
1296
|
+
case "sm":
|
|
1297
|
+
return "2xsm";
|
|
1298
|
+
default:
|
|
1299
|
+
return "xsm";
|
|
1300
|
+
}
|
|
1301
|
+
}), l = (y) => t.getNodeField(y, "children"), s = (y) => t.getNodeField(y, "key"), u = A(() => l(j(e.item))), p = A(() => t.getNodeField(e.item, "leaf")), f = A(() => {
|
|
1302
|
+
var y;
|
|
1303
|
+
return (y = t.props) != null && y.draggable ? t.getNodeField(e.item, "draggable") ?? !0 : !1;
|
|
1304
|
+
}), b = A(() => s(e.item)), v = A(
|
|
1305
|
+
() => !!(t.disabled.value || t.getNodeField(e.item, "disabled"))
|
|
1306
|
+
), C = A(
|
|
1307
|
+
() => {
|
|
1308
|
+
var y;
|
|
1309
|
+
return !!((y = u.value) != null && y.some((O) => t.expandedKeys.value.includes(s(O))));
|
|
1310
|
+
}
|
|
1311
|
+
), T = A(
|
|
1312
|
+
() => {
|
|
1313
|
+
var y, O;
|
|
1314
|
+
return !((y = t.dragging.value) != null && y.key && ((O = t.dragging.value) == null ? void 0 : O.key) === b.value) && t.expandedKeys.value.includes(b.value);
|
|
1315
|
+
}
|
|
1316
|
+
), $ = A(() => {
|
|
1317
|
+
var y, O;
|
|
1318
|
+
return !!(!t.dragging.value.value && ((y = t.props) != null && y.showLine) && T.value && ((O = u.value) != null && O.length));
|
|
1319
|
+
}), H = () => {
|
|
1320
|
+
v.value || t.onSelect(e.item);
|
|
1321
|
+
}, k = A(() => !!t.model.value.includes(b.value)), K = A(() => {
|
|
1322
|
+
const y = (g = e.item) => {
|
|
1323
|
+
const h = l(g);
|
|
1324
|
+
return (h == null ? void 0 : h.length) && h.every((_) => t.checked.value.includes(s(_)));
|
|
1325
|
+
}, O = (g = e.item) => {
|
|
1326
|
+
const h = l(g);
|
|
1327
|
+
return h != null && h.length ? !!(h != null && h.some(
|
|
1328
|
+
(_) => t.checked.value.includes(s(_)) || O(_)
|
|
1329
|
+
)) : !1;
|
|
1330
|
+
}, ue = t.checked.value.includes(b.value);
|
|
1331
|
+
return y() ? (ue || t.onCheck(e.item), !0) : O() ? (ue && t.onCheck(e.item), "indeterminate") : !!ue;
|
|
1332
|
+
}), M = () => {
|
|
1333
|
+
var ue;
|
|
1334
|
+
if (!((ue = u.value) != null && ue.length)) return t.onCheck(e.item);
|
|
1335
|
+
const y = (le = e.item) => {
|
|
1336
|
+
const g = l(le);
|
|
1337
|
+
return g != null && g.length ? g.reduce((h, _) => {
|
|
1338
|
+
const c = l(_), w = s(_);
|
|
1339
|
+
return c != null && c.length ? [...h, w, ...y(_)] : [...h, w];
|
|
1340
|
+
}, []) : [];
|
|
1341
|
+
}, O = y();
|
|
1342
|
+
return t.onCheck(e.item, {
|
|
1343
|
+
keys: [b.value, ...O],
|
|
1344
|
+
value: !t.checked.value.includes(b.value)
|
|
1345
|
+
});
|
|
1346
|
+
}, U = A(() => [...e.parentKeys ?? [], b.value]), R = (y) => {
|
|
1347
|
+
t.onExpandKey(e.item, y);
|
|
1348
|
+
}, ie = A(() => t.dragging.value.key === b.value ? t.dragging.value.level ?? e.level : e.level), re = A(() => ie.value + 1), N = A(() => {
|
|
1349
|
+
switch (t.size.value) {
|
|
1350
|
+
case "sm":
|
|
1351
|
+
return "2xsm";
|
|
1352
|
+
case "md":
|
|
1353
|
+
return "xsm";
|
|
1354
|
+
case "lg":
|
|
1355
|
+
return "sm";
|
|
1356
|
+
}
|
|
1357
|
+
}), { rootBindings: ye, inputBindings: ae } = Yn({
|
|
1358
|
+
getDisabled: () => v.value
|
|
1359
|
+
}), he = A(
|
|
1360
|
+
() => {
|
|
1361
|
+
var y, O;
|
|
1362
|
+
return !!((y = u.value) != null && y.length || (O = t.props) != null && O.lazyLoad && !p.value);
|
|
1363
|
+
}
|
|
1364
|
+
), V = _n("indent"), { width: L, height: pe } = $n(V), Z = () => {
|
|
1365
|
+
t.dir.value === "ltr" ? R(!1) : R(!0);
|
|
1366
|
+
}, De = () => {
|
|
1367
|
+
t.dir.value === "rtl" ? R(!1) : R(!0);
|
|
1368
|
+
};
|
|
1369
|
+
return (y, O) => {
|
|
1370
|
+
var le, g, h, _, c, w, Y, ke;
|
|
1371
|
+
const ue = Dn("TreeNode", !0);
|
|
1372
|
+
return me(), Xe("div", st({
|
|
1373
|
+
"data-parents": (le = m(t).props) != null && le.draggable ? y.parentKeys : void 0,
|
|
1374
|
+
"data-key": (g = m(t).props) != null && g.draggable ? b.value : void 0,
|
|
1375
|
+
"data-draggable": (h = m(t).props) != null && h.draggable ? !v.value && f.value : void 0,
|
|
1376
|
+
class: [
|
|
1377
|
+
(_ = u.value) != null && _.length ? m(t).prefixes.group : "",
|
|
1378
|
+
m(fe)(m(t).prefixes.node, "root"),
|
|
1379
|
+
m(t).getNodeField(y.item, "class"),
|
|
1380
|
+
{
|
|
1381
|
+
[m(Ot)(m(t).prefixes.group, "child-expanded")]: C.value,
|
|
1382
|
+
[m(Ot)(m(t).prefixes.group, "draggable")]: (c = m(t).props) == null ? void 0 : c.draggable
|
|
1383
|
+
}
|
|
1384
|
+
]
|
|
1385
|
+
}, m(ye), {
|
|
1386
|
+
style: {
|
|
1387
|
+
"--ptc-tree-node-indent-height": `${m(pe)}px`,
|
|
1388
|
+
"--ptc-tree-node-indent-width": `${m(L)}px`
|
|
1389
|
+
}
|
|
1390
|
+
}), [
|
|
1391
|
+
$.value ? (me(), Xe("div", {
|
|
1392
|
+
key: 0,
|
|
1393
|
+
class: Ae(m(fe)(m(t).prefixes.group, "line"))
|
|
1394
|
+
}, null, 2)) : Ye("", !0),
|
|
1395
|
+
ut(m(Rn), st({
|
|
1396
|
+
as: "div",
|
|
1397
|
+
tabStopId: b.value,
|
|
1398
|
+
onKeyup: [
|
|
1399
|
+
Xt(Z, ["left"]),
|
|
1400
|
+
Xt(De, ["right"])
|
|
1401
|
+
],
|
|
1402
|
+
focusable: !v.value,
|
|
1403
|
+
class: [
|
|
1404
|
+
m(i)({
|
|
1405
|
+
disabled: v.value,
|
|
1406
|
+
active: k.value,
|
|
1407
|
+
hasChildren: he.value
|
|
1408
|
+
})
|
|
1409
|
+
]
|
|
1410
|
+
}, m(ae), { onClick: H }), {
|
|
1411
|
+
default: Te(() => {
|
|
1412
|
+
var Q, ge, te, zt;
|
|
1413
|
+
return [
|
|
1414
|
+
(Q = m(t).props) != null && Q.draggable ? (me(), Xe("span", {
|
|
1415
|
+
key: 0,
|
|
1416
|
+
class: Ae(m(t).prefixes.draggable)
|
|
1417
|
+
}, [
|
|
1418
|
+
m(t).dragging.value.key !== b.value && !m(t).dragging.value.value ? (me(), Ue(Pn, {
|
|
1419
|
+
key: 0,
|
|
1420
|
+
icon: "tabler:grip-vertical",
|
|
1421
|
+
size: a.value,
|
|
1422
|
+
class: Ae(m(t).prefixes.draggableIcon)
|
|
1423
|
+
}, {
|
|
1424
|
+
default: Te(() => [
|
|
1425
|
+
$e(y.$slots, "dragTrigger", Ge(He({ ...y.item, selected: k.value, checked: K.value, disabled: v.value, unFocusable: !0 })))
|
|
1426
|
+
]),
|
|
1427
|
+
_: 3
|
|
1428
|
+
}, 8, ["size", "class"])) : Ye("", !0)
|
|
1429
|
+
], 2)) : Ye("", !0),
|
|
1430
|
+
ut(zn, {
|
|
1431
|
+
ref_key: "indent",
|
|
1432
|
+
ref: V,
|
|
1433
|
+
level: ie.value,
|
|
1434
|
+
children: he.value,
|
|
1435
|
+
size: N.value,
|
|
1436
|
+
expanded: T.value,
|
|
1437
|
+
showLine: !1,
|
|
1438
|
+
class: Ae(m(fe)(m(t).prefixes.node, "indent")),
|
|
1439
|
+
loading: m(t).getNodeField(y.item, "loading"),
|
|
1440
|
+
"branch-icon": m(t).getNodeField(y.item, "switcherIcon") ?? ((ge = m(t).props) == null ? void 0 : ge.switcherIcon),
|
|
1441
|
+
"no-rotate-branch": m(t).getNodeField(y.item, "noRotateSwitcherIcon") ?? ((te = m(t).props) == null ? void 0 : te.noRotateSwitcherIcon),
|
|
1442
|
+
onToggleExpand: O[0] || (O[0] = Yt((So) => R(), ["stop"]))
|
|
1443
|
+
}, {
|
|
1444
|
+
default: Te(() => [
|
|
1445
|
+
$e(y.$slots, "switcherIcon", Ge(He({ ...y.item, selected: k.value, checked: K.value, expanded: T.value, disabled: v.value, unFocusable: !0 })))
|
|
1446
|
+
]),
|
|
1447
|
+
_: 3
|
|
1448
|
+
}, 8, ["level", "children", "size", "expanded", "class", "loading", "branch-icon", "no-rotate-branch"]),
|
|
1449
|
+
m(t).dragging.value.key !== b.value || !m(t).dragging.value.value ? (me(), Xe(Tn, { key: 1 }, [
|
|
1450
|
+
(zt = m(t).props) != null && zt.checkbox ? (me(), Ue(Xn, {
|
|
1451
|
+
key: 0,
|
|
1452
|
+
size: r.value,
|
|
1453
|
+
onClick: O[1] || (O[1] = Yt(() => {
|
|
1454
|
+
}, ["stop"])),
|
|
1455
|
+
modelValue: K.value,
|
|
1456
|
+
"onUpdate:modelValue": M,
|
|
1457
|
+
disabled: v.value
|
|
1458
|
+
}, null, 8, ["size", "modelValue", "disabled"])) : Ye("", !0),
|
|
1459
|
+
$e(y.$slots, "title", Ge(He({ ...y.item, selected: k.value, checked: K.value, disabled: v.value, unFocusable: !0 })), () => [
|
|
1460
|
+
xn("div", {
|
|
1461
|
+
class: Ae(m(fe)(m(t).prefixes.node, "title"))
|
|
1462
|
+
}, In(m(t).getNodeField(y.item, "title")), 3)
|
|
1463
|
+
])
|
|
1464
|
+
], 64)) : (me(), Xe("div", {
|
|
1465
|
+
key: 2,
|
|
1466
|
+
class: Ae(m(fe)(m(t).prefixes.node, "slot"))
|
|
1467
|
+
}, null, 2))
|
|
1468
|
+
];
|
|
1469
|
+
}),
|
|
1470
|
+
_: 3
|
|
1471
|
+
}, 16, ["tabStopId", "focusable", "class"]),
|
|
1472
|
+
m(t).dragging.value.value || m(t).dragging.value.key || (w = u.value) != null && w.length && (T.value || m(t).props.forceMount) ? Cn((me(), Ue(m(sn), st({
|
|
1473
|
+
key: 1,
|
|
1474
|
+
class: m(t).prefixes.groupList,
|
|
1475
|
+
"data-parents": (Y = m(t).props) != null && Y.draggable ? U.value : void 0,
|
|
1476
|
+
"data-level": (ke = m(t).props) != null && ke.draggable ? re.value : void 0,
|
|
1477
|
+
tag: "div",
|
|
1478
|
+
list: u.value
|
|
1479
|
+
}, m(t).getSortableProps(y.item)), {
|
|
1480
|
+
item: Te(({ element: Q }) => [
|
|
1481
|
+
ut(ue, {
|
|
1482
|
+
item: Q,
|
|
1483
|
+
parentKeys: U.value,
|
|
1484
|
+
level: re.value
|
|
1485
|
+
}, on({ _: 2 }, [
|
|
1486
|
+
rn(Object.keys(n), (ge) => ({
|
|
1487
|
+
name: ge,
|
|
1488
|
+
fn: Te((te) => [
|
|
1489
|
+
$e(y.$slots, ge, Ge(He(te)))
|
|
1490
|
+
])
|
|
1491
|
+
}))
|
|
1492
|
+
]), 1032, ["item", "parentKeys", "level"])
|
|
1493
|
+
]),
|
|
1494
|
+
_: 3
|
|
1495
|
+
}, 16, ["class", "data-parents", "data-level", "list"])), [
|
|
1496
|
+
[kn, T.value]
|
|
1497
|
+
]) : Ye("", !0)
|
|
1498
|
+
], 16, wo);
|
|
1499
|
+
};
|
|
1500
|
+
}
|
|
1501
|
+
}), Bo = /* @__PURE__ */ tn({
|
|
1502
|
+
...ln("Tree"),
|
|
1503
|
+
__name: "Tree",
|
|
1504
|
+
props: {
|
|
1505
|
+
class: {},
|
|
1506
|
+
size: { default: "md" },
|
|
1507
|
+
gap: {},
|
|
1508
|
+
dir: {},
|
|
1509
|
+
data: {},
|
|
1510
|
+
modelValue: {},
|
|
1511
|
+
value: {},
|
|
1512
|
+
checkedKeys: {},
|
|
1513
|
+
expandedKeys: {},
|
|
1514
|
+
multiple: { type: Boolean },
|
|
1515
|
+
checkbox: { type: Boolean },
|
|
1516
|
+
defaultExpandAll: { type: Boolean },
|
|
1517
|
+
selectable: { type: Boolean },
|
|
1518
|
+
showLine: { type: Boolean },
|
|
1519
|
+
inlineNode: { type: Boolean },
|
|
1520
|
+
lazyLoad: { type: Boolean },
|
|
1521
|
+
forceMount: { type: Boolean },
|
|
1522
|
+
fieldNames: {},
|
|
1523
|
+
groupName: {},
|
|
1524
|
+
getSortableProps: {},
|
|
1525
|
+
switcherIcon: {},
|
|
1526
|
+
noRotateSwitcherIcon: { type: Boolean },
|
|
1527
|
+
draggable: { type: Boolean },
|
|
1528
|
+
disabled: { type: Boolean }
|
|
1529
|
+
},
|
|
1530
|
+
emits: ["update:modelValue", "update:value", "update:expandedKeys", "update:checkedKeys", "expand", "select", "check", "dragStart", "dragEnd", "move", "choose", "unchoose"],
|
|
1531
|
+
setup(o, { emit: e }) {
|
|
1532
|
+
const n = o, t = e, i = nn(), r = On("tree"), a = fe(r, "node"), l = fe(a, "group"), s = fe(a, "draggable"), u = fe(s, "icon"), p = fe(l, "list"), f = {
|
|
1533
|
+
node: a,
|
|
1534
|
+
group: l,
|
|
1535
|
+
draggable: s,
|
|
1536
|
+
draggableIcon: u,
|
|
1537
|
+
groupList: p
|
|
1538
|
+
}, b = an(r, {
|
|
1539
|
+
variants: {
|
|
1540
|
+
size: we(vo, r),
|
|
1541
|
+
gap: we(en, r),
|
|
1542
|
+
selectable: we("selectable", r),
|
|
1543
|
+
disabled: we("disabled", r),
|
|
1544
|
+
inlineNode: we("inline-node", r),
|
|
1545
|
+
dragging: we("dragging", r)
|
|
1546
|
+
}
|
|
1547
|
+
}), v = (g, h) => {
|
|
1548
|
+
var c;
|
|
1549
|
+
const _ = Lt(g, h);
|
|
1550
|
+
return (c = n.fieldNames) != null && c[h] ? Lt(g, n.fieldNames[h], _) : _;
|
|
1551
|
+
}, C = Le(j(n.data)), T = A(() => j(C.value)), $ = () => {
|
|
1552
|
+
if (!n.lazyLoad) {
|
|
1553
|
+
const g = [], h = (_) => {
|
|
1554
|
+
for (const c of _) {
|
|
1555
|
+
const w = v(c, "children");
|
|
1556
|
+
w != null && w.length && (g.push(v(c, "key")), h(w));
|
|
1557
|
+
}
|
|
1558
|
+
};
|
|
1559
|
+
return h(C.value), g;
|
|
1560
|
+
}
|
|
1561
|
+
return [];
|
|
1562
|
+
}, H = Le(
|
|
1563
|
+
n.expandedKeys ?? (n.defaultExpandAll ? $() : [])
|
|
1564
|
+
);
|
|
1565
|
+
ot(
|
|
1566
|
+
() => [n.defaultExpandAll, n.expandedKeys],
|
|
1567
|
+
([g, h], [_, c]) => {
|
|
1568
|
+
h !== c ? H.value = n.expandedKeys ?? [] : g && !_ && (H.value = $());
|
|
1569
|
+
}
|
|
1570
|
+
);
|
|
1571
|
+
const k = A({
|
|
1572
|
+
get() {
|
|
1573
|
+
return n.expandedKeys ? n.expandedKeys : H.value;
|
|
1574
|
+
},
|
|
1575
|
+
set(g) {
|
|
1576
|
+
n.expandedKeys || (H.value = g), t("update:expandedKeys", g);
|
|
1577
|
+
}
|
|
1578
|
+
});
|
|
1579
|
+
ot(
|
|
1580
|
+
() => n.data,
|
|
1581
|
+
() => {
|
|
1582
|
+
C.value = j(n.data);
|
|
1583
|
+
const g = $();
|
|
1584
|
+
k.value = k.value.filter((h) => g.includes(h));
|
|
1585
|
+
},
|
|
1586
|
+
{ deep: !0 }
|
|
1587
|
+
);
|
|
1588
|
+
const K = Le(n.modelValue ?? n.value ?? []);
|
|
1589
|
+
ot(
|
|
1590
|
+
() => [n.modelValue, n.value],
|
|
1591
|
+
() => {
|
|
1592
|
+
K.value = n.modelValue ?? n.value ?? [];
|
|
1593
|
+
}
|
|
1594
|
+
);
|
|
1595
|
+
const M = A({
|
|
1596
|
+
get() {
|
|
1597
|
+
return n.modelValue ?? n.value ? n.modelValue ?? n.value : K.value;
|
|
1598
|
+
},
|
|
1599
|
+
set(g) {
|
|
1600
|
+
g && ((n.modelValue ?? n.value) || (K.value = g), t("update:modelValue", g), t("update:value", g));
|
|
1601
|
+
}
|
|
1602
|
+
}), { getDisabled: U, getSize: R } = Ln(), ie = (g) => {
|
|
1603
|
+
var h, _;
|
|
1604
|
+
if (n.selectable && !U.value) {
|
|
1605
|
+
let c = j(M.value ?? []);
|
|
1606
|
+
const w = v(g, "key");
|
|
1607
|
+
n.multiple ? (h = M.value) != null && h.includes(w) ? c = j((_ = M.value) == null ? void 0 : _.filter((Y) => Y !== w)) : c = j([...M.value ?? [], w]) : c.includes(w) ? c = [] : c = [w], M.value = c, t("select", g, c.includes(w));
|
|
1608
|
+
}
|
|
1609
|
+
}, re = Le(n.checkedKeys ?? []);
|
|
1610
|
+
ot(
|
|
1611
|
+
() => n.checkedKeys,
|
|
1612
|
+
() => {
|
|
1613
|
+
re.value = n.checkedKeys ?? [];
|
|
1614
|
+
}
|
|
1615
|
+
);
|
|
1616
|
+
const N = A({
|
|
1617
|
+
get() {
|
|
1618
|
+
return n.checkedKeys ? n.checkedKeys : re.value;
|
|
1619
|
+
},
|
|
1620
|
+
set(g) {
|
|
1621
|
+
n.checkedKeys || (re.value = g), t("update:checkedKeys", g);
|
|
1622
|
+
}
|
|
1623
|
+
}), ye = (g, h) => {
|
|
1624
|
+
if (n.checkbox && !U.value) {
|
|
1625
|
+
let _ = j(N.value);
|
|
1626
|
+
const c = v(g, "key");
|
|
1627
|
+
h != null && h.keys.length ? h.value ? _ = Gt([...h.keys, ..._]) : _ = j(N.value.filter((Y) => !h.keys.includes(Y))) : N.value.includes(c) ? _ = j(N.value.filter((Y) => Y !== c)) : _ = j([...N.value, c]), N.value = _;
|
|
1628
|
+
const w = (h == null ? void 0 : h.value) ?? N.value.includes(c);
|
|
1629
|
+
t("check", g, w, (h == null ? void 0 : h.keys) ?? c);
|
|
1630
|
+
}
|
|
1631
|
+
}, ae = (g, h) => {
|
|
1632
|
+
let _ = !0;
|
|
1633
|
+
const c = v(g, "key");
|
|
1634
|
+
let w = j(k.value);
|
|
1635
|
+
h || h !== !1 && !w.includes(c) ? (w = Gt([...w, c]), _ = !0) : (w = w.filter((Y) => Y !== c), _ = !1), k.value = w, t("expand", g, _);
|
|
1636
|
+
}, he = A(() => {
|
|
1637
|
+
if (n.gap) {
|
|
1638
|
+
if (typeof n.gap == "number") return `${n.gap}px`;
|
|
1639
|
+
if (!Object.keys(en).includes(n.gap)) return n.gap;
|
|
1640
|
+
}
|
|
1641
|
+
}), V = n.groupName ?? Nn(r), L = Le({
|
|
1642
|
+
key: void 0,
|
|
1643
|
+
value: !1,
|
|
1644
|
+
level: void 0
|
|
1645
|
+
}), pe = A(
|
|
1646
|
+
() => Ot(fe(r, "dragging_item"), R.value)
|
|
1647
|
+
), Z = (g) => {
|
|
1648
|
+
var h;
|
|
1649
|
+
return (h = g.getAttribute("data-parents")) == null ? void 0 : h.split(",");
|
|
1650
|
+
}, De = A(() => {
|
|
1651
|
+
const g = [], h = (_, c) => {
|
|
1652
|
+
_ != null && _.length && _.forEach((w, Y) => {
|
|
1653
|
+
const ke = [
|
|
1654
|
+
"title",
|
|
1655
|
+
"disabled",
|
|
1656
|
+
"draggable",
|
|
1657
|
+
"leaf",
|
|
1658
|
+
"loading",
|
|
1659
|
+
"class",
|
|
1660
|
+
"switcherIcon",
|
|
1661
|
+
"noRotateSwitcherIcon"
|
|
1662
|
+
];
|
|
1663
|
+
let Q = v(w, "key");
|
|
1664
|
+
if (!Q) {
|
|
1665
|
+
const te = Gn(j(c) ?? []);
|
|
1666
|
+
te && (Q = `${te}-${Y}`), Q = `${Y}`;
|
|
1667
|
+
}
|
|
1668
|
+
Q = String(Q), g.push(
|
|
1669
|
+
Fn(
|
|
1670
|
+
{
|
|
1671
|
+
...Object.fromEntries(ke.map((te) => [te, v(w, te)])),
|
|
1672
|
+
parentKeys: c,
|
|
1673
|
+
key: Q
|
|
1674
|
+
},
|
|
1675
|
+
Mn
|
|
1676
|
+
)
|
|
1677
|
+
);
|
|
1678
|
+
const ge = v(w, "children");
|
|
1679
|
+
if (ge != null && ge.length) {
|
|
1680
|
+
const te = j(c) ?? [];
|
|
1681
|
+
te.push(Q), h(ge, te);
|
|
1682
|
+
}
|
|
1683
|
+
});
|
|
1684
|
+
};
|
|
1685
|
+
return h(j(C.value)), g;
|
|
1686
|
+
}), y = (g) => {
|
|
1687
|
+
const h = Z(g), _ = g.getAttribute("data-key") ?? "";
|
|
1688
|
+
return De.value.find(
|
|
1689
|
+
(c) => {
|
|
1690
|
+
var w, Y, ke;
|
|
1691
|
+
return (!((w = c.parentKeys) != null && w.length) && !(h != null && h.length) || ((Y = c.parentKeys) == null ? void 0 : Y.length) && (h == null ? void 0 : h.length) && c.parentKeys.length === h.length && ((ke = c.parentKeys) == null ? void 0 : ke.every((Q) => h.includes(Q)))) && _ === c.key;
|
|
1692
|
+
}
|
|
1693
|
+
);
|
|
1694
|
+
}, O = (g) => {
|
|
1695
|
+
var _;
|
|
1696
|
+
const h = ((_ = n.getSortableProps) == null ? void 0 : _.call(n, g)) || {};
|
|
1697
|
+
return {
|
|
1698
|
+
...h,
|
|
1699
|
+
group: $t(V) ? V(g) : V,
|
|
1700
|
+
animation: 150,
|
|
1701
|
+
forceFallback: !0,
|
|
1702
|
+
fallbackOnBody: !0,
|
|
1703
|
+
filter: "[data-draggable=false]",
|
|
1704
|
+
handle: `.${f.node} .${f.draggable} .${f.draggableIcon}`,
|
|
1705
|
+
// swapThreshold: 0.65,
|
|
1706
|
+
dataIdAttr: "data-key",
|
|
1707
|
+
dragClass: pe.value,
|
|
1708
|
+
onChoose(c) {
|
|
1709
|
+
const w = y(c == null ? void 0 : c.item);
|
|
1710
|
+
w && (L.value.key = v(w, "key")), t("choose", c);
|
|
1711
|
+
},
|
|
1712
|
+
onStart(c) {
|
|
1713
|
+
if (typeof document < "u") {
|
|
1714
|
+
const w = document.querySelector(`.${pe.value}`);
|
|
1715
|
+
w != null && w.style && (w.style.direction = le.value ?? "ltr");
|
|
1716
|
+
}
|
|
1717
|
+
L.value.value = !0, t("dragStart", c);
|
|
1718
|
+
},
|
|
1719
|
+
onUnchoose(c) {
|
|
1720
|
+
L.value.key = void 0, L.value.level = void 0, t("unchoose", c);
|
|
1721
|
+
},
|
|
1722
|
+
onEnd(c) {
|
|
1723
|
+
L.value.value = !1;
|
|
1724
|
+
const w = {
|
|
1725
|
+
...c,
|
|
1726
|
+
node: y(c == null ? void 0 : c.item),
|
|
1727
|
+
oldParents: Z(c == null ? void 0 : c.item),
|
|
1728
|
+
newParents: Z(c == null ? void 0 : c.to)
|
|
1729
|
+
};
|
|
1730
|
+
C.value = j(n.data), t("dragEnd", w);
|
|
1731
|
+
},
|
|
1732
|
+
onMove(c, w) {
|
|
1733
|
+
var Y;
|
|
1734
|
+
if (L.value.level = Number(((Y = c == null ? void 0 : c.to) == null ? void 0 : Y.getAttribute("data-level")) ?? "1"), t("move", c, w), $t(h.onMove)) return h.onMove(c, w);
|
|
1735
|
+
},
|
|
1736
|
+
itemKey: (c) => v(c, "key")
|
|
1737
|
+
};
|
|
1738
|
+
}, { getDir: ue } = An(), le = ue();
|
|
1739
|
+
return yo({
|
|
1740
|
+
size: R,
|
|
1741
|
+
disabled: U,
|
|
1742
|
+
props: n,
|
|
1743
|
+
expandedKeys: k,
|
|
1744
|
+
model: M,
|
|
1745
|
+
dir: le,
|
|
1746
|
+
checked: N,
|
|
1747
|
+
onExpandKey: ae,
|
|
1748
|
+
onSelect: ie,
|
|
1749
|
+
onCheck: ye,
|
|
1750
|
+
getNodeField: v,
|
|
1751
|
+
getSortableProps: O,
|
|
1752
|
+
dragging: L,
|
|
1753
|
+
prefixes: f
|
|
1754
|
+
}), (g, h) => (me(), Ue(m(Kn), {
|
|
1755
|
+
"as-child": "",
|
|
1756
|
+
orientation: "vertical",
|
|
1757
|
+
dir: m(le)
|
|
1758
|
+
}, {
|
|
1759
|
+
default: Te(() => [
|
|
1760
|
+
ut(m(sn), st({
|
|
1761
|
+
role: "tree",
|
|
1762
|
+
class: [
|
|
1763
|
+
m(b)({
|
|
1764
|
+
size: m(R),
|
|
1765
|
+
gap: n.gap ?? m(R),
|
|
1766
|
+
selectable: n.selectable,
|
|
1767
|
+
disabled: m(U),
|
|
1768
|
+
inlineNode: n.inlineNode,
|
|
1769
|
+
dragging: !!L.value.value
|
|
1770
|
+
}),
|
|
1771
|
+
n.class
|
|
1772
|
+
],
|
|
1773
|
+
style: {
|
|
1774
|
+
"--ptc-tree-gap": he.value
|
|
1775
|
+
},
|
|
1776
|
+
tag: "div",
|
|
1777
|
+
list: T.value
|
|
1778
|
+
}, O()), {
|
|
1779
|
+
item: Te(({ element: _ }) => [
|
|
1780
|
+
(me(), Ue(Eo, {
|
|
1781
|
+
key: v(_, "key"),
|
|
1782
|
+
item: _
|
|
1783
|
+
}, on({ _: 2 }, [
|
|
1784
|
+
rn(Object.keys(i), (c) => ({
|
|
1785
|
+
name: c,
|
|
1786
|
+
fn: Te((w) => [
|
|
1787
|
+
$e(g.$slots, c, Ge(He(w)))
|
|
1788
|
+
])
|
|
1789
|
+
}))
|
|
1790
|
+
]), 1032, ["item"]))
|
|
1791
|
+
]),
|
|
1792
|
+
_: 3
|
|
1793
|
+
}, 16, ["class", "style", "list"])
|
|
1794
|
+
]),
|
|
1795
|
+
_: 3
|
|
1796
|
+
}, 8, ["dir"]));
|
|
1797
|
+
}
|
|
1798
|
+
});
|
|
1799
|
+
export {
|
|
1800
|
+
vo as T,
|
|
1801
|
+
Bo as _,
|
|
1802
|
+
en as a,
|
|
1803
|
+
bo as i,
|
|
1804
|
+
yo as p
|
|
1805
|
+
};
|