hs-admin-ui 15.7.3 → 15.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/401-Jc5vTlZw.js +1 -0
- package/dist/401-U3q-D5Ah.mjs +56 -0
- package/dist/404-CxL8Ya8v.js +1 -0
- package/dist/404-CxL8Ya8v.js.gz +0 -0
- package/dist/404-ZVtpZUWB.mjs +61 -0
- package/dist/404-ZVtpZUWB.mjs.gz +0 -0
- package/dist/account-B04VbY9v.mjs +215 -0
- package/dist/account-BBUs1NEL.js +1 -0
- package/dist/aside-D2c5Ezl4.js +1 -0
- package/dist/aside-NidRIsNr.mjs +164 -0
- package/dist/baseBtnConfig-C6KLedE5.mjs +273 -0
- package/dist/baseBtnConfig-DRxjBT8Z.js +1 -0
- package/dist/baseFormConfig-BaFbaMWd.mjs +722 -0
- package/dist/baseFormConfig-BaFbaMWd.mjs.gz +0 -0
- package/dist/baseFormConfig-D5Q35Bo3.js +1 -0
- package/dist/baseFormConfig-D9aWIG6Q.mjs +504 -0
- package/dist/baseFormConfig-D9aWIG6Q.mjs.gz +0 -0
- package/dist/baseFormConfig-flEamE_J.js +1 -0
- package/dist/baseTableConfig-CCbQxa9v.js +1 -0
- package/dist/baseTableConfig-CCbQxa9v.js.gz +0 -0
- package/dist/baseTableConfig-CJLiQBh3.mjs +2624 -0
- package/dist/baseTableConfig-CJLiQBh3.mjs.gz +0 -0
- package/dist/bcFormConfig-BYWMAoxm.js +1 -0
- package/dist/bcFormConfig-Bk1eGBGA.mjs +234 -0
- package/dist/bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-BhP9IFVf.mjs +131 -0
- package/dist/bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-Cmsxv4Nt.js +1 -0
- package/dist/bcSwitchSystems.vue_vue_type_script_setup_true_lang-AFU0J6cR.mjs +101 -0
- package/dist/bcSwitchSystems.vue_vue_type_script_setup_true_lang-DH1BMT8T.js +1 -0
- package/dist/btnIndex-BFJT6WPH.js +1 -0
- package/dist/btnIndex-C2W8FGTn.mjs +287 -0
- package/dist/btnIndex-C2W8FGTn.mjs.gz +0 -0
- package/dist/classic-B6Phfi8f.js +1 -0
- package/dist/classic-BMosXP6_.mjs +81 -0
- package/dist/cloneConfigDialog-BuN4zGCJ.mjs +817 -0
- package/dist/cloneConfigDialog-BuN4zGCJ.mjs.gz +0 -0
- package/dist/cloneConfigDialog-Dr85HHmc.js +1 -0
- package/dist/cloneConfigDialog-Dr85HHmc.js.gz +0 -0
- package/dist/columns-BDvgYwbe.mjs +87 -0
- package/dist/columns-DJNZ7SC9.js +1 -0
- package/dist/columnsAside-0Sy9YAlH.mjs +220 -0
- package/dist/columnsAside-CHsVnzgc.js +1 -0
- package/dist/contextmenu-BF004H_M.js +1 -0
- package/dist/contextmenu-BQdnsuvm.js +1 -0
- package/dist/contextmenu-BkOtD8AC.mjs +125 -0
- package/dist/contextmenu-Dsu2_hDI.mjs +125 -0
- package/dist/copyMenuConfig-BwZ3xA7K.mjs +4 -0
- package/dist/copyMenuConfig-D_H775pO.js +1 -0
- package/dist/copyMenuConfig.vue_vue_type_script_setup_true_lang-Cg2uLcye.js +1 -0
- package/dist/copyMenuConfig.vue_vue_type_script_setup_true_lang-ictuYlAQ.mjs +85 -0
- package/dist/copySystem-BrxfrIch.mjs +4 -0
- package/dist/copySystem-CZTYuS08.js +1 -0
- package/dist/copySystem.vue_vue_type_script_setup_true_lang-T7MZDCT8.js +1 -0
- package/dist/copySystem.vue_vue_type_script_setup_true_lang-_T2c-n79.mjs +78 -0
- package/dist/defaults-DdMKSavi.js +1 -0
- package/dist/defaults-DsrlBdJP.mjs +86 -0
- package/dist/dialog-BpY5TPcI.mjs +365 -0
- package/dist/dialog-BpY5TPcI.mjs.gz +0 -0
- package/dist/dialog-BqgXJ0KP.js +1 -0
- package/dist/dialog-BsYLjk3k.js +1 -0
- package/dist/dialog-CckDFZju.mjs +4 -0
- package/dist/dialog-D0ZFYtnz.mjs +10 -0
- package/dist/dialog-DFaPvoIB.mjs +4 -0
- package/dist/dialog-DQP53khI.mjs +359 -0
- package/dist/dialog-DQP53khI.mjs.gz +0 -0
- package/dist/dialog-DZEREoJ-.js +1 -0
- package/dist/dialog-DxBOYlwo.js +1 -0
- package/dist/dialog-TFJ52Qpk.js +1 -0
- package/dist/dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-Ck1bIcvQ.mjs +220 -0
- package/dist/dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-DlO2H7fC.js +1 -0
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-BorUozN1.mjs +694 -0
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-BorUozN1.mjs.gz +0 -0
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-CyWoS8PU.js +1 -0
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-CyWoS8PU.js.gz +0 -0
- package/dist/dictDialog-DIU7ApWn.js +1 -0
- package/dist/dictDialog-Q5gu4xqg.mjs +4 -0
- package/dist/dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-B-Wu2Tce.js +1 -0
- package/dist/dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-P5tjI1p8.mjs +154 -0
- package/dist/dictItemDialog-CtjNkfwp.mjs +4 -0
- package/dist/dictItemDialog-Zdh3NYCL.js +1 -0
- package/dist/dictItemDialog.vue_vue_type_script_setup_true_lang-BJHXM8YL.js +1 -0
- package/dist/dictItemDialog.vue_vue_type_script_setup_true_lang-gaTmJ_ac.mjs +231 -0
- package/dist/favicon.ico +0 -0
- package/dist/formConfig-C_f0_aQA.js +1 -0
- package/dist/formConfig-C_f0_aQA.js.gz +0 -0
- package/dist/formConfig-YXZcu8cs.mjs +592 -0
- package/dist/formConfig-YXZcu8cs.mjs.gz +0 -0
- package/dist/header-GxzesV0n.js +1 -0
- package/dist/header-eGAqob-2.mjs +28 -0
- package/dist/horizontal-BOUN-4_-.mjs +151 -0
- package/dist/horizontal-CrKSRNp2.js +1 -0
- package/dist/hsAttrBtn-CMf6Q2W7.mjs +4 -0
- package/dist/hsAttrBtn-CiZoMDFU.js +1 -0
- package/dist/hsAttrBtn.vue_vue_type_script_setup_true_lang-DAVb07Fy.mjs +128 -0
- package/dist/hsAttrBtn.vue_vue_type_script_setup_true_lang-DXgOVoC2.js +1 -0
- package/dist/hsAttrForm-BQbSI2gg.js +1 -0
- package/dist/hsAttrForm-BTR6R3GC.mjs +4 -0
- package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-CLm_xsS7.js +1 -0
- package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-D4NDWvvu.mjs +439 -0
- package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-D4NDWvvu.mjs.gz +0 -0
- package/dist/hsBtnConfigList-Ca6iZrJb.mjs +117 -0
- package/dist/hsBtnConfigList-D3hNsaB0.js +1 -0
- package/dist/hsBtnItemConfig-C7D1Izky.mjs +4 -0
- package/dist/hsBtnItemConfig-DNEmlLU6.js +1 -0
- package/dist/hsBtnItemConfig.vue_vue_type_script_setup_true_lang-2PVMP0Kg.mjs +147 -0
- package/dist/hsBtnItemConfig.vue_vue_type_script_setup_true_lang-Bzr_e9LJ.js +1 -0
- package/dist/hsBtnPanel-BNgqwbpJ.mjs +4 -0
- package/dist/hsBtnPanel-Dsuy6E7L.js +1 -0
- package/dist/hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-CEhtJQyf.mjs +67 -0
- package/dist/hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-CcVaFzyZ.js +1 -0
- package/dist/hsCheckbox-BKa_El3s.js +1 -0
- package/dist/hsCheckbox-CalDndlZ.mjs +4 -0
- package/dist/hsCheckbox.vue_vue_type_script_setup_true_lang-Dh-lqGjq.js +1 -0
- package/dist/hsCheckbox.vue_vue_type_script_setup_true_lang-XCUyHi8X.mjs +28 -0
- package/dist/hsExpand-DSiTmEb6.js +1 -0
- package/dist/hsExpand-nds0-5dc.mjs +4 -0
- package/dist/hsExpand.vue_vue_type_script_setup_true_lang-6lxZz11F.mjs +285 -0
- package/dist/hsExpand.vue_vue_type_script_setup_true_lang-VJYdNAoB.js +1 -0
- package/dist/hsFormConfig-DGzH2RKV.mjs +207 -0
- package/dist/hsFormConfig-DXPPOi0L.js +1 -0
- package/dist/hsFormConfigList-BXX5aXhb.js +1 -0
- package/dist/hsFormConfigList-DDnrIBlr.mjs +414 -0
- package/dist/hsFormConfigList-DDnrIBlr.mjs.gz +0 -0
- package/dist/hsFormPanel-CKYtFzlk.js +1 -0
- package/dist/hsFormPanel-DusC3BsY.mjs +238 -0
- package/dist/hsFormPanel-DusC3BsY.mjs.gz +0 -0
- package/dist/hsFormParse-C1O74bsB.mjs +4 -0
- package/dist/hsFormParse-OyaJj4me.js +1 -0
- package/dist/hsFormParse.vue_vue_type_script_setup_true_lang-DDL3Tjt4.mjs +242 -0
- package/dist/hsFormParse.vue_vue_type_script_setup_true_lang-g3onjHVQ.js +1 -0
- package/dist/hsPanelItem-BPr6VTIV.mjs +4 -0
- package/dist/hsPanelItem-Z1Tgxy3W.js +1 -0
- package/dist/hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-X4TNi6Fs.mjs +86 -0
- package/dist/hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-aWJ283Ks.js +1 -0
- package/dist/iframes-CWdXFiYU.mjs +122 -0
- package/dist/iframes-DnAW1ZV2.js +1 -0
- package/dist/index copy-B-12ec_8.js +1 -0
- package/dist/index copy-BBpiqo_4.js +1 -0
- package/dist/index copy-Cg1hADM8.mjs +69 -0
- package/dist/index copy-DVQKP7eh.mjs +134 -0
- package/dist/index-0s1xl4ZT.js +1 -0
- package/dist/index-4ncpQ4eO.js +1 -0
- package/dist/index-6RO6Bwn-.mjs +89 -0
- package/dist/index-7j1JJVRQ.mjs +47 -0
- package/dist/index-8QafLZ6n.mjs +50 -0
- package/dist/index-8lSidknV.mjs +30 -0
- package/dist/index-9-H8NAr6.js +1 -0
- package/dist/index-9XqqeAl8.js +1 -0
- package/dist/index-B1Sg9jtT.js +1 -0
- package/dist/index-B4LSh8Yg.mjs +95 -0
- package/dist/index-B5HFPaMT.js +1 -0
- package/dist/index-BBSkmxtw.mjs +152 -0
- package/dist/index-BEfISdke.mjs +1009 -0
- package/dist/index-BEfISdke.mjs.gz +0 -0
- package/dist/index-BErymucF.js +1 -0
- package/dist/index-BGG9Ey1a.mjs +4 -0
- package/dist/index-BIgnSPCb.js +1 -0
- package/dist/index-BMVU_A5q.js +1 -0
- package/dist/index-BUXaaFqo.js +1 -0
- package/dist/index-BUrEmvH2.js +1 -0
- package/dist/index-BUrEmvH2.js.gz +0 -0
- package/dist/index-BZliZo4g.mjs +258287 -0
- package/dist/index-BZliZo4g.mjs.gz +0 -0
- package/dist/index-B_qFmKhb.mjs +213 -0
- package/dist/index-BaEGjJje.mjs +285 -0
- package/dist/index-BhMp70XH.mjs +94 -0
- package/dist/index-BizP8n_Z.js +1 -0
- package/dist/index-BmxiEp5H.mjs +65 -0
- package/dist/index-BpbPko7T.mjs +73 -0
- package/dist/index-Bw0DU9t5.js +1 -0
- package/dist/index-C---ZGxz.js +1 -0
- package/dist/index-C-r9kHQ8.js +1 -0
- package/dist/index-C0886NJP.mjs +14 -0
- package/dist/index-C0CTSB8n.js +1 -0
- package/dist/index-C2iReNZe.js +1 -0
- package/dist/index-C2iReNZe.js.gz +0 -0
- package/dist/index-C35k9SiM.mjs +5403 -0
- package/dist/index-C35k9SiM.mjs.gz +0 -0
- package/dist/index-C7Pf1oFt.js +1 -0
- package/dist/index-CBhQ0smE.mjs +22 -0
- package/dist/index-CCOzoC14.mjs +133 -0
- package/dist/index-CCgQi82k.js +1 -0
- package/dist/index-CNtDe6D7.js +1 -0
- package/dist/index-CRnV5ppm.js +1 -0
- package/dist/index-CUE6cOFE.mjs +76 -0
- package/dist/index-CWmG3j1W.js +1 -0
- package/dist/index-CX65LzpF.js +1 -0
- package/dist/index-CZ2hSZcc.js +1 -0
- package/dist/index-CZ2hSZcc.js.gz +0 -0
- package/dist/index-CbCppT2z.js +1 -0
- package/dist/index-CbgKih92.js +1 -0
- package/dist/index-CiBmjHCp.js +1 -0
- package/dist/index-CmBaolog.js +1 -0
- package/dist/index-D2F1xkyI.js +1 -0
- package/dist/index-D2giXyZP.mjs +172 -0
- package/dist/index-D6BFutq0.mjs +51 -0
- package/dist/index-DAQOTixk.mjs +65 -0
- package/dist/index-DEykAVeO.js +1 -0
- package/dist/index-DHHcO6BG.js +1 -0
- package/dist/index-DNOsvCXb.mjs +4 -0
- package/dist/index-DRCvk6jz.js +1 -0
- package/dist/index-DT3c6iM1.mjs +49 -0
- package/dist/index-DTTPCD9d.js +1 -0
- package/dist/index-DUHvBBoF.mjs +10 -0
- package/dist/index-DZ_UFJE2.mjs +43 -0
- package/dist/index-Da5FeolC.mjs +403 -0
- package/dist/index-Da5FeolC.mjs.gz +0 -0
- package/dist/index-DfO1_8An.mjs +262 -0
- package/dist/index-DiIxvNen.mjs +23 -0
- package/dist/index-DkEPn5UY.mjs +73 -0
- package/dist/index-DmAwRXRf.js +1 -0
- package/dist/index-DmTmklo8.mjs +4 -0
- package/dist/index-DnmQabWE.js +1 -0
- package/dist/index-Do4RqN5g.js +110 -0
- package/dist/index-Do4RqN5g.js.gz +0 -0
- package/dist/index-Dr_LbQPS.mjs +254 -0
- package/dist/index-DstGjbPe.mjs +119 -0
- package/dist/index-DtBAD5tj.mjs +10 -0
- package/dist/index-DtQQjgRK.mjs +200 -0
- package/dist/index-DtSCKpP0.mjs +331 -0
- package/dist/index-DtSCKpP0.mjs.gz +0 -0
- package/dist/index-Dy8d7jZB.mjs +173 -0
- package/dist/index-EpQQ4mux.mjs +4 -0
- package/dist/index-L6fpDKx0.mjs +4 -0
- package/dist/index-Ml7ktoQ-.js +1 -0
- package/dist/index-PCI3lWru.mjs +38 -0
- package/dist/index-SDXzzl1Z.js +1 -0
- package/dist/index-XdSOpi4N.js +1 -0
- package/dist/index-YLQocP_3.js +1 -0
- package/dist/index-Z83-84L3.js +1 -0
- package/dist/index-bQ03Pi6f.js +1 -0
- package/dist/index-cWE1Ofjn.js +1 -0
- package/dist/index-dq7XmEdZ.mjs +131 -0
- package/dist/index-ewmkWdba.mjs +2208 -0
- package/dist/index-ewmkWdba.mjs.gz +0 -0
- package/dist/index-feq0FF6W.mjs +23 -0
- package/dist/index-g_BDa62N.mjs +19 -0
- package/dist/index-rz2oIWhA.js +1 -0
- package/dist/index-utPWUvbG.js +1 -0
- package/dist/index-yLk4jnOR.mjs +67 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +169 -135
- package/dist/index.vue_vue_type_script_setup_true_lang-Bo5cVive.mjs +97 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-C0vyivch.mjs +103 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-CBGnRm-4.js +1 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-CbSFX56U.mjs +267 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-CbSFX56U.mjs.gz +0 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-CyDhlurB.js +1 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-DZ6c7AU5.js +1 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-DcMSvAcM.mjs +194 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-sRX7HPMJ.js +1 -0
- package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-64c_V6Dm.js +1 -0
- package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-ufc9L2Mb.mjs +288 -0
- package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-ufc9L2Mb.mjs.gz +0 -0
- package/dist/lib-generate-test-usersig.min.js +2 -0
- package/dist/lib-generate-test-usersig.min.js.gz +0 -0
- package/dist/link-CCd2xEmn.mjs +63 -0
- package/dist/link-Dbun-a6e.js +1 -0
- package/dist/list-6l4SUZ4q.js +1 -0
- package/dist/list-Di_20lJh.mjs +85 -0
- package/dist/logo-mini-BQ9BrQ1U.mjs +4 -0
- package/dist/logo-mini-DwRdfcE7.js +1 -0
- package/dist/main-BWiworX0.js +1 -0
- package/dist/main-jemkj3EZ.mjs +72 -0
- package/dist/mobile-BR2JHrqR.mjs +115 -0
- package/dist/mobile-DY7tvA1k.js +1 -0
- package/dist/parent-Bos5XABG.js +1 -0
- package/dist/parent-DT_NDN05.mjs +131 -0
- package/dist/popup-Bj6krYSG.mjs +4 -0
- package/dist/popup-D_3ApLMO.js +1 -0
- package/dist/popup.vue_vue_type_script_setup_true_name_replaceRules_lang-DzGjlCfy.js +1 -0
- package/dist/popup.vue_vue_type_script_setup_true_name_replaceRules_lang-ub92Ki9a.mjs +89 -0
- package/dist/roleItem--rI4I-c1.js +1 -0
- package/dist/roleItem-h5Eeebxh.mjs +103 -0
- package/dist/saveForm-DHCK_OxI.mjs +160 -0
- package/dist/saveForm-vm93y-Uf.js +1 -0
- package/dist/scan-9rwZpho8.js +1 -0
- package/dist/scan-9rwZpho8.js.gz +0 -0
- package/dist/scan-BxvkGqI-.mjs +945 -0
- package/dist/scan-BxvkGqI-.mjs.gz +0 -0
- package/dist/search-BcSxfaP6.mjs +114 -0
- package/dist/search-DybExrhZ.js +1 -0
- package/dist/selectConfig-DomXUnH2.mjs +546 -0
- package/dist/selectConfig-DomXUnH2.mjs.gz +0 -0
- package/dist/selectConfig-G64DfLaI.js +1 -0
- package/dist/shortcutList-BXBGQdNn.mjs +76 -0
- package/dist/shortcutList-WSi4lUlm.js +1 -0
- package/dist/style.css +1 -0
- package/dist/style.css.gz +0 -0
- package/dist/subItem-BJqj_KWa.mjs +77 -0
- package/dist/subItem-DnXQbPlk.js +1 -0
- package/dist/tagsView-MpZvuDeV.mjs +2695 -0
- package/dist/tagsView-MpZvuDeV.mjs.gz +0 -0
- package/dist/tagsView-qohkQESy.js +8 -0
- package/dist/tagsView-qohkQESy.js.gz +0 -0
- package/dist/transverse-CtjFmdcO.js +1 -0
- package/dist/transverse-Dq45GPHf.mjs +65 -0
- package/dist/types/components/business/bcBox/bcBox.vue.d.ts +66 -0
- package/dist/types/{src/components → components}/business/bcBox/utils.d.ts +11 -10
- package/dist/types/components/business/bcBreadcrumb/bcBreadcrumb.vue.d.ts +23 -0
- package/dist/types/{src/components → components}/business/bcBreadcrumb/index.d.ts +2 -1
- package/dist/types/components/business/bcForm/baseForm.vue.d.ts +273 -0
- package/dist/types/components/business/bcForm/bcForm.vue.d.ts +42 -0
- package/dist/types/{src/components → components}/business/bcForm/type.d.ts +7 -6
- package/dist/types/components/business/bcForm/useGuide.d.ts +564 -0
- package/dist/types/components/business/bcSystemAuth/components/data.vue.d.ts +3 -0
- package/dist/types/components/business/bcSystemAuth/components/dict.vue.d.ts +3 -0
- package/dist/types/components/business/bcSystemAuth/components/fastSet/popup.vue.d.ts +17 -0
- package/dist/types/components/business/bcSystemAuth/components/field.vue.d.ts +3 -0
- package/dist/types/components/business/bcSystemAuth/components/form.vue.d.ts +13 -0
- package/dist/types/{src/components → components}/business/bcSystemAuth/components/selectAll/index.d.ts +3 -2
- package/dist/types/components/business/bcSystemAuth/components/selectAll/index.vue.d.ts +5 -0
- package/dist/types/components/business/bcSystemAuth/components/table.vue.d.ts +13 -0
- package/dist/types/components/business/bcSystemAuth/components/widget/btns.vue.d.ts +15 -0
- package/dist/types/components/business/bcSystemAuth/components/widget/form.vue.d.ts +15 -0
- package/dist/types/components/business/bcSystemAuth/components/widget/tab.vue.d.ts +45 -0
- package/dist/types/components/business/bcSystemAuth/components/widget/tables.vue.d.ts +15 -0
- package/dist/types/components/business/bcSystemAuth/components/widget/tablesWraper.vue.d.ts +15 -0
- package/dist/types/{src/components → components}/business/bcSystemAuth/fastStore.d.ts +49 -48
- package/dist/types/{src/components → components}/business/bcSystemAuth/fastUtils.d.ts +30 -28
- package/dist/types/components/business/bcSystemAuth/index.d.ts +3 -0
- package/dist/types/components/business/bcSystemAuth/index.vue.d.ts +26 -0
- package/dist/types/{src/components → components}/business/bcSystemAuth/store.d.ts +49 -48
- package/dist/types/components/business/bcSystemAuth/type.d.ts +42 -0
- package/dist/types/components/business/bcSystemAuth/useAuth.d.ts +28 -0
- package/dist/types/{src/components → components}/business/bcSystemAuth/utils.d.ts +30 -28
- package/dist/types/components/business/bcSystemField/components/field.vue.d.ts +3 -0
- package/dist/types/components/business/bcSystemField/components/form.vue.d.ts +13 -0
- package/dist/types/{src/components → components}/business/bcSystemField/components/selectAll/index.d.ts +5 -4
- package/dist/types/components/business/bcSystemField/components/selectAll/index.vue.d.ts +5 -0
- package/dist/types/components/business/bcSystemField/components/table.vue.d.ts +13 -0
- package/dist/types/components/business/bcSystemField/components/widget/form.vue.d.ts +15 -0
- package/dist/types/components/business/bcSystemField/components/widget/tab.vue.d.ts +45 -0
- package/dist/types/components/business/bcSystemField/components/widget/tables.vue.d.ts +15 -0
- package/dist/types/components/business/bcSystemField/components/widget/tablesWraper.vue.d.ts +15 -0
- package/dist/types/components/business/bcSystemField/index.d.ts +3 -0
- package/dist/types/components/business/bcSystemField/index.vue.d.ts +16 -0
- package/dist/types/{src/components → components}/business/bcSystemField/store.d.ts +40 -39
- package/dist/types/components/business/bcSystemField/useAuth.d.ts +16 -0
- package/dist/types/{src/components → components}/business/bcSystemField/utils.d.ts +21 -20
- package/dist/types/components/business/bcTable/bcFormTable.vue.d.ts +142 -0
- package/dist/types/components/business/bcTable/bcTable.vue.d.ts +51 -0
- package/dist/types/components/business/bcTable/components/btn/btn.vue.d.ts +77 -0
- package/dist/types/components/business/bcTable/components/popup/index.d.ts +3 -0
- package/dist/types/components/business/bcTable/components/query/components/sortForm/sortForm.vue.d.ts +23 -0
- package/dist/types/components/business/bcTable/components/query/drag.vue.d.ts +244 -0
- package/dist/types/components/business/bcTable/components/query/query.vue.d.ts +249 -0
- package/dist/types/{src/components → components}/business/bcTable/components/query/useQuickSearch.d.ts +3 -2
- package/dist/types/components/business/bcTable/components/table/colgroup.vue.d.ts +28 -0
- package/dist/types/components/business/bcTable/components/table/column.vue.d.ts +35 -0
- package/dist/types/components/business/bcTable/components/table/components/sortColumn/sortColumn.vue.d.ts +25 -0
- package/dist/types/{src/components → components}/business/bcTable/components/table/components/sortColumn/types.d.ts +2 -1
- package/dist/types/components/business/bcTable/components/table/table.vue.d.ts +67 -0
- package/dist/types/{src/components → components}/business/bcTable/components/table/useTable.d.ts +5 -5
- package/dist/types/components/business/bcTable/components/table/useTableHeight.d.ts +25 -0
- package/dist/types/{src/components → components}/business/bcTable/methods/cellDetailMethod.d.ts +1 -0
- package/dist/types/{src/components → components}/business/bcTable/methods/filterAgeMethod.d.ts +1 -0
- package/dist/types/{src/components → components}/business/bcTable/methods/footerMethod.d.ts +2 -1
- package/dist/types/{src/components → components}/business/bcTable/methods/formBtnMethod.d.ts +2 -1
- package/dist/types/{src/components → components}/business/bcTable/methods/index.d.ts +2 -1
- package/dist/types/{src/components → components}/business/bcTable/utils/authField.d.ts +2 -1
- package/dist/types/{src/components → components}/business/bcTable/utils/onFormKey.d.ts +5 -4
- package/dist/types/{src/components → components}/business/bcTable/utils/onTableKey.d.ts +6 -5
- package/dist/types/{src/components → components}/business/bcTable/utils/parseTable.d.ts +21 -20
- package/dist/types/{src/components → components}/business/bcTable/utils/type.d.ts +12 -11
- package/dist/types/{src/components → components}/business/bcTable/utils/useBcTable.d.ts +7084 -7074
- package/dist/types/{src/components → components}/business/bcTable/utils/useButon.d.ts +6 -5
- package/dist/types/components/business/bcTable/utils/useFormTableHeight.d.ts +20 -0
- package/dist/types/{src/components → components}/business/bcTable/utils/useKeydownEvent.d.ts +18 -17
- package/dist/types/{src/components → components}/business/bcVisual/bcVisual.vue.d.ts +8 -9
- package/dist/types/{src/components → components}/business/bcVisual/components/setting/dragItem.vue.d.ts +9 -16
- package/dist/types/components/business/bcVisual/components/setting/extendItem.vue.d.ts +13 -0
- package/dist/types/components/business/bcVisual/components/setting/setting.vue.d.ts +3 -0
- package/dist/types/{src/components → components}/business/bcVisual/components/setting/useDrag.d.ts +4 -2
- package/dist/types/components/business/bcVisual/components/table/table.vue.d.ts +6 -0
- package/dist/types/components/business/bcVisual/components/updateName/popup.vue.d.ts +17 -0
- package/dist/types/components/business/bcVisual/components/updateSql/addCondition.vue.d.ts +23 -0
- package/dist/types/{src/components → components}/business/bcVisual/components/updateSql/index.d.ts +2 -1
- package/dist/types/{src/components → components}/business/bcVisual/components/updateSql/nodeTree/index.d.ts +2 -1
- package/dist/types/components/business/bcVisual/components/updateSql/nodeTree/index.vue.d.ts +21 -0
- package/dist/types/components/business/bcVisual/components/updateSql/nodeTree/nodeTree.vue.d.ts +19 -0
- package/dist/types/components/business/bcVisual/components/updateSql/popup.vue.d.ts +17 -0
- package/dist/types/{src/components → components}/business/bcVisual/useTableFormat.d.ts +29 -28
- package/dist/types/{src/components → components}/business/bcVisual/utils.d.ts +3 -1
- package/dist/types/index.d.ts +1 -32
- package/dist/types/plugins/index.d.ts +33 -0
- package/dist/types/{src/types → types}/auth.d.ts +2 -1
- package/dist/types/{src/types → types}/components.d.ts +2 -1
- package/dist/types/{src/types → types}/customData.d.ts +19 -16
- package/dist/types/{src/types → types}/form.d.ts +2 -1
- package/dist/types/{src/types → types}/formItem/autocomplete.d.ts +2 -1
- package/dist/types/{src/types → types}/formItem/checkbox.d.ts +2 -1
- package/dist/types/{src/types → types}/formItem/input.d.ts +2 -1
- package/dist/types/{src/types → types}/formItem/inputGroup.d.ts +2 -1
- package/dist/types/{src/types → types}/formItem/inputNumber.d.ts +2 -1
- package/dist/types/{src/types → types}/formItem/radio.d.ts +2 -1
- package/dist/types/{src/types → types}/formItem/selelct.d.ts +2 -1
- package/dist/types/{src/types → types}/formItem/treeSelect.d.ts +2 -1
- package/dist/types/types/system.d.ts +14 -0
- package/dist/types/{src/utils → utils}/arrayOperation.d.ts +1 -1
- package/dist/types/utils/authFunction.d.ts +18 -0
- package/dist/types/utils/build.d.ts +11 -0
- package/dist/types/{src/utils → utils}/common.d.ts +4 -3
- package/dist/types/utils/commonFunction.d.ts +29 -0
- package/dist/types/{src/utils → utils}/download.d.ts +4 -4
- package/dist/types/utils/file.d.ts +6 -0
- package/dist/types/{src/utils → utils}/getDataType.d.ts +3 -2
- package/dist/types/utils/getStyleSheets.d.ts +11 -0
- package/dist/types/utils/index.d.ts +29 -0
- package/dist/types/{src/utils/loading/index.d.ts → utils/loading.d.ts} +1 -1
- package/dist/types/utils/lodash.d.ts +3 -0
- package/dist/types/{src/utils → utils}/mitt.d.ts +3 -2
- package/dist/types/{src/utils → utils}/number.d.ts +14 -2
- package/dist/types/{src/utils → utils}/other.d.ts +12 -11
- package/dist/types/utils/request/index.d.ts +6 -0
- package/dist/types/{src/utils → utils}/request/interceptors/request/authorization.interceptor.d.ts +2 -1
- package/dist/types/{src/utils → utils}/request/interceptors/request/result.type.interceptor.d.ts +2 -6
- package/dist/types/{src/utils → utils}/request/interceptors/request/undefined-params-handler.interceptor.d.ts +2 -13
- package/dist/types/{src/utils → utils}/request/interceptors/response/error-handler.interceptor.d.ts +2 -1
- package/dist/types/{src/utils → utils}/request/repeatRequest.d.ts +2 -1
- package/dist/types/utils/request/request.d.ts +7 -0
- package/dist/types/utils/setIconfont.d.ts +11 -0
- package/dist/types/utils/showMessage.d.ts +6 -0
- package/dist/types/utils/showMessageBox.d.ts +6 -0
- package/dist/types/utils/showNotification.d.ts +6 -0
- package/dist/types/{src/utils → utils}/showPopup/index.d.ts +6 -5
- package/dist/types/{src/utils → utils}/storage.d.ts +14 -12
- package/dist/types/{src/utils → utils}/tree.d.ts +4 -3
- package/dist/types/{src/utils → utils}/url.d.ts +3 -2
- package/dist/useConfigInfo-2zEYLSSs.js +1 -0
- package/dist/useConfigInfo-PTkkdx-l.mjs +19 -0
- package/dist/user-CPU46u3H.mjs +246 -0
- package/dist/user-Cj_jy-GX.js +1 -0
- package/dist/userNews-B9FYesFD.js +1 -0
- package/dist/userNews-DwgJaHO9.mjs +72 -0
- package/dist/userSelect-DiHaJW0H.js +1 -0
- package/dist/userSelect-FRo6g1CV.mjs +4 -0
- package/dist/userSelect.vue_vue_type_script_setup_true_lang-Bf8Yt4Uq.js +1 -0
- package/dist/userSelect.vue_vue_type_script_setup_true_lang-CRDGG54O.mjs +100 -0
- package/dist/vertical-B8-cHXnQ.js +1 -0
- package/dist/vertical-DW4LqEcz.mjs +133 -0
- package/package.json +39 -16
- package/dist/bcIcon-D87eJ-Yx.js +0 -1
- package/dist/bcIcon-wecvhPTY.mjs +0 -4
- package/dist/index-DKuNUnol.js +0 -349
- package/dist/index-nZnB2jTn.mjs +0 -144186
- package/dist/index.css +0 -1
- package/dist/types/element-plus.d.ts +0 -557
- package/dist/types/src/components/base/Affix/index.d.ts +0 -1
- package/dist/types/src/components/base/Affix/src/Affix.vue.d.ts +0 -3
- package/dist/types/src/components/base/Alert/index.d.ts +0 -1
- package/dist/types/src/components/base/Alert/src/Alert.vue.d.ts +0 -3
- package/dist/types/src/components/base/Aside/index.d.ts +0 -1
- package/dist/types/src/components/base/Aside/src/Aside.vue.d.ts +0 -3
- package/dist/types/src/components/base/Autocomplete/index.d.ts +0 -1
- package/dist/types/src/components/base/Autocomplete/src/Autocomplete.vue.d.ts +0 -3
- package/dist/types/src/components/base/Backtop/index.d.ts +0 -1
- package/dist/types/src/components/base/Backtop/src/Backtop.vue.d.ts +0 -3
- package/dist/types/src/components/base/Badge/index.d.ts +0 -1
- package/dist/types/src/components/base/Badge/src/Badge.vue.d.ts +0 -3
- package/dist/types/src/components/base/Button/index.d.ts +0 -2
- package/dist/types/src/components/base/Button/src/Button.vue.d.ts +0 -3
- package/dist/types/src/components/base/Button/src/ButtonGroup.vue.d.ts +0 -3
- package/dist/types/src/components/base/Calendar/index.d.ts +0 -1
- package/dist/types/src/components/base/Calendar/src/Calendar.vue.d.ts +0 -3
- package/dist/types/src/components/base/Card/index.d.ts +0 -1
- package/dist/types/src/components/base/Card/src/Card.vue.d.ts +0 -3
- package/dist/types/src/components/base/Carousel/index.d.ts +0 -2
- package/dist/types/src/components/base/Carousel/src/Carousel.vue.d.ts +0 -3
- package/dist/types/src/components/base/Carousel/src/CarouselItem.vue.d.ts +0 -3
- package/dist/types/src/components/base/Cascader/index.d.ts +0 -2
- package/dist/types/src/components/base/Cascader/src/Cascader.vue.d.ts +0 -3
- package/dist/types/src/components/base/Cascader/src/CascaderPanel.vue.d.ts +0 -3
- package/dist/types/src/components/base/Checkbox/index.d.ts +0 -3
- package/dist/types/src/components/base/Checkbox/src/Checkbox.vue.d.ts +0 -3
- package/dist/types/src/components/base/Checkbox/src/CheckboxButton.vue.d.ts +0 -3
- package/dist/types/src/components/base/Checkbox/src/CheckboxGroup.vue.d.ts +0 -3
- package/dist/types/src/components/base/Col/index.d.ts +0 -1
- package/dist/types/src/components/base/Col/src/Col.vue.d.ts +0 -3
- package/dist/types/src/components/base/Collapse/index.d.ts +0 -2
- package/dist/types/src/components/base/Collapse/src/Collapse.vue.d.ts +0 -3
- package/dist/types/src/components/base/Collapse/src/CollapseItem.vue.d.ts +0 -3
- package/dist/types/src/components/base/ColorPicker/index.d.ts +0 -1
- package/dist/types/src/components/base/ColorPicker/src/ColorPicker.vue.d.ts +0 -3
- package/dist/types/src/components/base/Container/index.d.ts +0 -1
- package/dist/types/src/components/base/Container/src/Container.vue.d.ts +0 -3
- package/dist/types/src/components/base/DatePicker/index.d.ts +0 -1
- package/dist/types/src/components/base/DatePicker/src/DatePicker.vue.d.ts +0 -3
- package/dist/types/src/components/base/Descriptions/index.d.ts +0 -2
- package/dist/types/src/components/base/Descriptions/src/Descriptions.vue.d.ts +0 -3
- package/dist/types/src/components/base/Descriptions/src/DescriptionsItem.vue.d.ts +0 -3
- package/dist/types/src/components/base/Dialog/index.d.ts +0 -1
- package/dist/types/src/components/base/Dialog/src/Dialog.vue.d.ts +0 -3
- package/dist/types/src/components/base/Divider/index.d.ts +0 -1
- package/dist/types/src/components/base/Divider/src/Divider.vue.d.ts +0 -3
- package/dist/types/src/components/base/Drawer/index.d.ts +0 -1
- package/dist/types/src/components/base/Drawer/src/Drawer.vue.d.ts +0 -3
- package/dist/types/src/components/base/Dropdown/index.d.ts +0 -3
- package/dist/types/src/components/base/Dropdown/src/Dropdown.vue.d.ts +0 -3
- package/dist/types/src/components/base/Dropdown/src/DropdownItem.vue.d.ts +0 -3
- package/dist/types/src/components/base/Dropdown/src/DropdownMenu.vue.d.ts +0 -3
- package/dist/types/src/components/base/Empty/index.d.ts +0 -1
- package/dist/types/src/components/base/Empty/src/Empty.vue.d.ts +0 -3
- package/dist/types/src/components/base/Footer/index.d.ts +0 -1
- package/dist/types/src/components/base/Footer/src/Footer.vue.d.ts +0 -3
- package/dist/types/src/components/base/Form/index.d.ts +0 -2
- package/dist/types/src/components/base/Form/src/Form.vue.d.ts +0 -3
- package/dist/types/src/components/base/Form/src/FormItem.vue.d.ts +0 -3
- package/dist/types/src/components/base/Header/index.d.ts +0 -1
- package/dist/types/src/components/base/Header/src/Header.vue.d.ts +0 -3
- package/dist/types/src/components/base/Icon/index.d.ts +0 -1
- package/dist/types/src/components/base/Icon/src/Icon.vue.d.ts +0 -3
- package/dist/types/src/components/base/Image/index.d.ts +0 -1
- package/dist/types/src/components/base/Image/src/Image.vue.d.ts +0 -3
- package/dist/types/src/components/base/ImageViewer/index.d.ts +0 -1
- package/dist/types/src/components/base/ImageViewer/src/ImageViewer.vue.d.ts +0 -3
- package/dist/types/src/components/base/Input/index.d.ts +0 -1
- package/dist/types/src/components/base/Input/src/Input.vue.d.ts +0 -30
- package/dist/types/src/components/base/InputNumber/index.d.ts +0 -1
- package/dist/types/src/components/base/InputNumber/src/InputNumber.vue.d.ts +0 -3
- package/dist/types/src/components/base/Main/index.d.ts +0 -1
- package/dist/types/src/components/base/Main/src/Main.vue.d.ts +0 -3
- package/dist/types/src/components/base/Menu/index.d.ts +0 -3
- package/dist/types/src/components/base/Menu/src/Menu.vue.d.ts +0 -3
- package/dist/types/src/components/base/Menu/src/MenuItem.vue.d.ts +0 -3
- package/dist/types/src/components/base/Menu/src/SubMenu.vue.d.ts +0 -3
- package/dist/types/src/components/base/Pagination/index.d.ts +0 -1
- package/dist/types/src/components/base/Pagination/src/Pagination.vue.d.ts +0 -3
- package/dist/types/src/components/base/Popconfirm/index.d.ts +0 -1
- package/dist/types/src/components/base/Popconfirm/src/Popconfirm.vue.d.ts +0 -3
- package/dist/types/src/components/base/Popover/index.d.ts +0 -1
- package/dist/types/src/components/base/Popover/src/Popover.vue.d.ts +0 -3
- package/dist/types/src/components/base/Progress/index.d.ts +0 -1
- package/dist/types/src/components/base/Progress/src/Progress.vue.d.ts +0 -3
- package/dist/types/src/components/base/Qr/index.d.ts +0 -1
- package/dist/types/src/components/base/Qr/src/Qr.vue.d.ts +0 -3
- package/dist/types/src/components/base/Radio/index.d.ts +0 -3
- package/dist/types/src/components/base/Radio/src/Radio.vue.d.ts +0 -3
- package/dist/types/src/components/base/Radio/src/RadioButton.vue.d.ts +0 -3
- package/dist/types/src/components/base/Radio/src/RadioGroup.vue.d.ts +0 -3
- package/dist/types/src/components/base/Rate/index.d.ts +0 -1
- package/dist/types/src/components/base/Rate/src/Rate.vue.d.ts +0 -3
- package/dist/types/src/components/base/Result/index.d.ts +0 -1
- package/dist/types/src/components/base/Result/src/Result.vue.d.ts +0 -3
- package/dist/types/src/components/base/Row/index.d.ts +0 -1
- package/dist/types/src/components/base/Row/src/Row.vue.d.ts +0 -3
- package/dist/types/src/components/base/Scrollbar/index.d.ts +0 -1
- package/dist/types/src/components/base/Scrollbar/src/Scrollbar.vue.d.ts +0 -3
- package/dist/types/src/components/base/Select/index.d.ts +0 -3
- package/dist/types/src/components/base/Select/src/Option.vue.d.ts +0 -3
- package/dist/types/src/components/base/Select/src/OptionGroup.vue.d.ts +0 -3
- package/dist/types/src/components/base/Select/src/Select.vue.d.ts +0 -37
- package/dist/types/src/components/base/SelectV2/index.d.ts +0 -1
- package/dist/types/src/components/base/SelectV2/src/SelectV2.vue.d.ts +0 -3
- package/dist/types/src/components/base/Slider/index.d.ts +0 -1
- package/dist/types/src/components/base/Slider/src/Slider.vue.d.ts +0 -3
- package/dist/types/src/components/base/Steps/index.d.ts +0 -1
- package/dist/types/src/components/base/Steps/src/Step.vue.d.ts +0 -3
- package/dist/types/src/components/base/Steps/src/Steps.vue.d.ts +0 -3
- package/dist/types/src/components/base/Switch/index.d.ts +0 -1
- package/dist/types/src/components/base/Switch/src/Switch.vue.d.ts +0 -3
- package/dist/types/src/components/base/Table/index.d.ts +0 -2
- package/dist/types/src/components/base/Table/src/Table.vue.d.ts +0 -3
- package/dist/types/src/components/base/Table/src/TableColumn.vue.d.ts +0 -3
- package/dist/types/src/components/base/Tabs/index.d.ts +0 -2
- package/dist/types/src/components/base/Tabs/src/TabPane.vue.d.ts +0 -3
- package/dist/types/src/components/base/Tabs/src/Tabs.vue.d.ts +0 -3
- package/dist/types/src/components/base/Tag/index.d.ts +0 -2
- package/dist/types/src/components/base/Tag/src/CheckTag.vue.d.ts +0 -3
- package/dist/types/src/components/base/Tag/src/Tag.vue.d.ts +0 -3
- package/dist/types/src/components/base/Text/index.d.ts +0 -1
- package/dist/types/src/components/base/Text/src/Text.vue.d.ts +0 -3
- package/dist/types/src/components/base/TimePicker/index.d.ts +0 -1
- package/dist/types/src/components/base/TimePicker/src/TimePicker.vue.d.ts +0 -3
- package/dist/types/src/components/base/TimeSelect/index.d.ts +0 -1
- package/dist/types/src/components/base/TimeSelect/src/TimeSelect.vue.d.ts +0 -3
- package/dist/types/src/components/base/Tooltip/index.d.ts +0 -1
- package/dist/types/src/components/base/Tooltip/src/Tooltip.vue.d.ts +0 -3
- package/dist/types/src/components/base/Tour/index.d.ts +0 -2
- package/dist/types/src/components/base/Tour/src/Tour.vue.d.ts +0 -3
- package/dist/types/src/components/base/Tour/src/TourStep.vue.d.ts +0 -3
- package/dist/types/src/components/base/Transfer/index.d.ts +0 -1
- package/dist/types/src/components/base/Transfer/src/Transfer.vue.d.ts +0 -3
- package/dist/types/src/components/base/Tree/index.d.ts +0 -1
- package/dist/types/src/components/base/Tree/src/Tree.vue.d.ts +0 -3
- package/dist/types/src/components/base/TreeSelect/index.d.ts +0 -1
- package/dist/types/src/components/base/TreeSelect/src/TreeSelect.vue.d.ts +0 -3
- package/dist/types/src/components/base/TreeV2/index.d.ts +0 -1
- package/dist/types/src/components/base/TreeV2/src/TreeV2.vue.d.ts +0 -3
- package/dist/types/src/components/base/Upload/index.d.ts +0 -1
- package/dist/types/src/components/base/Upload/src/Upload.vue.d.ts +0 -3
- package/dist/types/src/components/base/Watermark/index.d.ts +0 -1
- package/dist/types/src/components/base/Watermark/src/Watermark.vue.d.ts +0 -3
- package/dist/types/src/components/base/components.d.ts +0 -60
- package/dist/types/src/components/base/index.d.ts +0 -174
- package/dist/types/src/components/business/bcBox/bcBox.vue.d.ts +0 -48
- package/dist/types/src/components/business/bcBreadcrumb/bcBreadcrumb.vue.d.ts +0 -14
- package/dist/types/src/components/business/bcButton/bcButton.vue.d.ts +0 -38
- package/dist/types/src/components/business/bcCheckbox/bcCheckbox.vue.d.ts +0 -23
- package/dist/types/src/components/business/bcContextBox/bcContextBox.vue.d.ts +0 -40
- package/dist/types/src/components/business/bcContextBox/useContextMenu.d.ts +0 -34
- package/dist/types/src/components/business/bcDivider/bcDivider.vue.d.ts +0 -38
- package/dist/types/src/components/business/bcFace/bcFace.vue.d.ts +0 -24
- package/dist/types/src/components/business/bcForm/baseForm.vue.d.ts +0 -275
- package/dist/types/src/components/business/bcForm/bcForm.vue.d.ts +0 -33
- package/dist/types/src/components/business/bcForm/useGuide.d.ts +0 -559
- package/dist/types/src/components/business/bcGroup/bcGroup.vue.d.ts +0 -36
- package/dist/types/src/components/business/bcIcon/bcIcon.vue.d.ts +0 -27
- package/dist/types/src/components/business/bcInputGroup/bcInputGroup.vue.d.ts +0 -20
- package/dist/types/src/components/business/bcRadio/bcRadio.vue.d.ts +0 -18
- package/dist/types/src/components/business/bcSelect/bcSelect.vue.d.ts +0 -33
- package/dist/types/src/components/business/bcSignature/index.vue.d.ts +0 -19
- package/dist/types/src/components/business/bcSystemAuth/components/data.vue.d.ts +0 -3
- package/dist/types/src/components/business/bcSystemAuth/components/dict.vue.d.ts +0 -3
- package/dist/types/src/components/business/bcSystemAuth/components/fastSet/popup.vue.d.ts +0 -17
- package/dist/types/src/components/business/bcSystemAuth/components/field.vue.d.ts +0 -3
- package/dist/types/src/components/business/bcSystemAuth/components/form.vue.d.ts +0 -11
- package/dist/types/src/components/business/bcSystemAuth/components/selectAll/index.vue.d.ts +0 -5
- package/dist/types/src/components/business/bcSystemAuth/components/table.vue.d.ts +0 -11
- package/dist/types/src/components/business/bcSystemAuth/components/widget/btns.vue.d.ts +0 -11
- package/dist/types/src/components/business/bcSystemAuth/components/widget/form.vue.d.ts +0 -11
- package/dist/types/src/components/business/bcSystemAuth/components/widget/tab.vue.d.ts +0 -17
- package/dist/types/src/components/business/bcSystemAuth/components/widget/tables.vue.d.ts +0 -11
- package/dist/types/src/components/business/bcSystemAuth/components/widget/tablesWraper.vue.d.ts +0 -11
- package/dist/types/src/components/business/bcSystemAuth/index.d.ts +0 -2
- package/dist/types/src/components/business/bcSystemAuth/index.vue.d.ts +0 -17
- package/dist/types/src/components/business/bcSystemAuth/type.d.ts +0 -342
- package/dist/types/src/components/business/bcSystemAuth/useAuth.d.ts +0 -26
- package/dist/types/src/components/business/bcSystemField/components/field.vue.d.ts +0 -3
- package/dist/types/src/components/business/bcSystemField/components/form.vue.d.ts +0 -11
- package/dist/types/src/components/business/bcSystemField/components/selectAll/index.vue.d.ts +0 -5
- package/dist/types/src/components/business/bcSystemField/components/table.vue.d.ts +0 -11
- package/dist/types/src/components/business/bcSystemField/components/widget/form.vue.d.ts +0 -11
- package/dist/types/src/components/business/bcSystemField/components/widget/tab.vue.d.ts +0 -17
- package/dist/types/src/components/business/bcSystemField/components/widget/tables.vue.d.ts +0 -11
- package/dist/types/src/components/business/bcSystemField/components/widget/tablesWraper.vue.d.ts +0 -11
- package/dist/types/src/components/business/bcSystemField/index.d.ts +0 -2
- package/dist/types/src/components/business/bcSystemField/index.vue.d.ts +0 -7
- package/dist/types/src/components/business/bcSystemField/useAuth.d.ts +0 -14
- package/dist/types/src/components/business/bcTable/bcFormTable.vue.d.ts +0 -143
- package/dist/types/src/components/business/bcTable/bcTable.vue.d.ts +0 -32
- package/dist/types/src/components/business/bcTable/components/btn/btn.vue.d.ts +0 -58
- package/dist/types/src/components/business/bcTable/components/popup/index.d.ts +0 -2
- package/dist/types/src/components/business/bcTable/components/popup/popup.vue.d.ts +0 -49
- package/dist/types/src/components/business/bcTable/components/query/components/sortForm/sortForm.vue.d.ts +0 -14
- package/dist/types/src/components/business/bcTable/components/query/drag.vue.d.ts +0 -222
- package/dist/types/src/components/business/bcTable/components/query/query.vue.d.ts +0 -226
- package/dist/types/src/components/business/bcTable/components/table/colgroup.vue.d.ts +0 -25
- package/dist/types/src/components/business/bcTable/components/table/column.vue.d.ts +0 -49
- package/dist/types/src/components/business/bcTable/components/table/components/sortColumn/sortColumn.vue.d.ts +0 -16
- package/dist/types/src/components/business/bcTable/components/table/table.vue.d.ts +0 -64
- package/dist/types/src/components/business/bcTable/components/table/useTableHeight.d.ts +0 -23
- package/dist/types/src/components/business/bcTable/utils/useFormTableHeight.d.ts +0 -18
- package/dist/types/src/components/business/bcTabs/bcTabs.vue.d.ts +0 -61
- package/dist/types/src/components/business/bcTabs/components/BetterScroll/index.d.ts +0 -2
- package/dist/types/src/components/business/bcTabs/components/BetterScroll/index.vue.d.ts +0 -33
- package/dist/types/src/components/business/bcTreeSearch/bcTreeSearch.vue.d.ts +0 -55
- package/dist/types/src/components/business/bcTreeSelect/bcTreeSelect.vue.d.ts +0 -28
- package/dist/types/src/components/business/bcTrtc/bcTrtc.vue.d.ts +0 -104
- package/dist/types/src/components/business/bcTrtc/hooks/useOperateLog.d.ts +0 -8
- package/dist/types/src/components/business/bcTrtc/hooks/useTrtcRoomEvent.d.ts +0 -50
- package/dist/types/src/components/business/bcTrtc/type.d.ts +0 -124
- package/dist/types/src/components/business/bcTrtc/useTrtc.d.ts +0 -39
- package/dist/types/src/components/business/bcTrtc/util/generateTestUserSig.d.ts +0 -64
- package/dist/types/src/components/business/bcTrtc/util/lib-generate-test-usersig-es.min.d.ts +0 -20
- package/dist/types/src/components/business/bcTrtc/util/utils.d.ts +0 -4
- package/dist/types/src/components/business/bcUpload/bcUpload.vue.d.ts +0 -13
- package/dist/types/src/components/business/bcUpload/component/highSpeedCamera.vue.d.ts +0 -19
- package/dist/types/src/components/business/bcUpload/component/qwebchannel.d.ts +0 -15
- package/dist/types/src/components/business/bcUpload/component/type.d.ts +0 -44
- package/dist/types/src/components/business/bcUpload/type.d.ts +0 -83
- package/dist/types/src/components/business/bcUpload/upload.vue.d.ts +0 -272
- package/dist/types/src/components/business/bcUpload/useUpload.d.ts +0 -21
- package/dist/types/src/components/business/bcVisual/components/setting/extendItem.vue.d.ts +0 -13
- package/dist/types/src/components/business/bcVisual/components/setting/setting.vue.d.ts +0 -3
- package/dist/types/src/components/business/bcVisual/components/table/table.vue.d.ts +0 -6
- package/dist/types/src/components/business/bcVisual/components/updateName/popup.vue.d.ts +0 -17
- package/dist/types/src/components/business/bcVisual/components/updateSql/addCondition.vue.d.ts +0 -23
- package/dist/types/src/components/business/bcVisual/components/updateSql/nodeTree/index.vue.d.ts +0 -21
- package/dist/types/src/components/business/bcVisual/components/updateSql/nodeTree/nodeTree.vue.d.ts +0 -27
- package/dist/types/src/components/business/bcVisual/components/updateSql/popup.vue.d.ts +0 -17
- package/dist/types/src/components/business/index.d.ts +0 -52
- package/dist/types/src/hooks/index.d.ts +0 -3
- package/dist/types/src/hooks/onKeyStroke.d.ts +0 -13
- package/dist/types/src/hooks/useExpose.d.ts +0 -23
- package/dist/types/src/hooks/useKeyStroke.d.ts +0 -22
- package/dist/types/src/utils/commonFunction.d.ts +0 -14
- package/dist/types/src/utils/index.d.ts +0 -26
- package/dist/types/src/utils/lodash.d.ts +0 -2
- package/dist/types/src/utils/request/index.d.ts +0 -6
- package/dist/types/src/utils/request/request.d.ts +0 -6
- package/dist/types/src/utils/showMessage.d.ts +0 -3
- package/dist/types/src/utils/showMessageBox.d.ts +0 -3
- package/dist/types/src/utils/showNotification.d.ts +0 -3
- package/dist/types/src/utils/showPopup/showPopup.vue.d.ts +0 -56
- package/dist/types/vxe-table.d.ts +0 -3
- /package/dist/types/{src/components → components}/business/bcSystemAuth/components/fastSet/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/business/bcSystemAuth/components/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/business/bcSystemAuth/components/widget/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/business/bcSystemField/components/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/business/bcSystemField/components/widget/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/business/bcTable/components/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/business/bcTable/components/query/components/sortForm/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/business/bcTable/components/table/components/sortColumn/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/business/bcVisual/components/updateName/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/business/bcVisual/type.d.ts +0 -0
- /package/dist/types/{src/types → types}/formItem/button.d.ts +0 -0
- /package/dist/types/{src/types → types}/formItem/index.d.ts +0 -0
- /package/dist/types/{src/types → types}/index.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/cfprint.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/crypto.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/device_info.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/formatTime.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/request/interceptors/request/index.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/request/interceptors/response/index.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/shortcutList.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/theme.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/toolsValidate.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/update.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/watermark.d.ts +0 -0
|
@@ -0,0 +1,2695 @@
|
|
|
1
|
+
import { defineComponent, defineAsyncComponent, ref, reactive, computed, onBeforeMount, onUnmounted, onBeforeUpdate, onMounted, watch, resolveComponent, createElementBlock, openBlock, normalizeClass, createVNode, withModifiers, withCtx, createElementVNode, Fragment, renderList, createCommentVNode, createBlock, toDisplayString, unref, nextTick } from "vue";
|
|
2
|
+
import { useRoute, useRouter, onBeforeRouteUpdate } from "vue-router";
|
|
3
|
+
import { storeToRefs } from "pinia";
|
|
4
|
+
import { $ as useTagsViewRoutes, a as useThemeConfig, C as useRoutesList, u as useKeepALiveNames, a0 as other, m as mittBus, b as ElMessage, a1 as isObjectValueEqual, S as Session, a2 as dynamicRoutes, _ as _export_sfc } from "./index-BZliZo4g.mjs";
|
|
5
|
+
/**!
|
|
6
|
+
* Sortable 1.15.6
|
|
7
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
8
|
+
* @author owenm <owen23355@gmail.com>
|
|
9
|
+
* @license MIT
|
|
10
|
+
*/
|
|
11
|
+
function ownKeys(object, enumerableOnly) {
|
|
12
|
+
var keys = Object.keys(object);
|
|
13
|
+
if (Object.getOwnPropertySymbols) {
|
|
14
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
15
|
+
if (enumerableOnly) {
|
|
16
|
+
symbols = symbols.filter(function(sym) {
|
|
17
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
keys.push.apply(keys, symbols);
|
|
21
|
+
}
|
|
22
|
+
return keys;
|
|
23
|
+
}
|
|
24
|
+
function _objectSpread2(target) {
|
|
25
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
26
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
27
|
+
if (i % 2) {
|
|
28
|
+
ownKeys(Object(source), true).forEach(function(key) {
|
|
29
|
+
_defineProperty(target, key, source[key]);
|
|
30
|
+
});
|
|
31
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
32
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
33
|
+
} else {
|
|
34
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
35
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return target;
|
|
40
|
+
}
|
|
41
|
+
function _typeof(obj) {
|
|
42
|
+
"@babel/helpers - typeof";
|
|
43
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
44
|
+
_typeof = function(obj2) {
|
|
45
|
+
return typeof obj2;
|
|
46
|
+
};
|
|
47
|
+
} else {
|
|
48
|
+
_typeof = function(obj2) {
|
|
49
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return _typeof(obj);
|
|
53
|
+
}
|
|
54
|
+
function _defineProperty(obj, key, value) {
|
|
55
|
+
if (key in obj) {
|
|
56
|
+
Object.defineProperty(obj, key, {
|
|
57
|
+
value,
|
|
58
|
+
enumerable: true,
|
|
59
|
+
configurable: true,
|
|
60
|
+
writable: true
|
|
61
|
+
});
|
|
62
|
+
} else {
|
|
63
|
+
obj[key] = value;
|
|
64
|
+
}
|
|
65
|
+
return obj;
|
|
66
|
+
}
|
|
67
|
+
function _extends() {
|
|
68
|
+
_extends = Object.assign || function(target) {
|
|
69
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
70
|
+
var source = arguments[i];
|
|
71
|
+
for (var key in source) {
|
|
72
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
73
|
+
target[key] = source[key];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return target;
|
|
78
|
+
};
|
|
79
|
+
return _extends.apply(this, arguments);
|
|
80
|
+
}
|
|
81
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
82
|
+
if (source == null) return {};
|
|
83
|
+
var target = {};
|
|
84
|
+
var sourceKeys = Object.keys(source);
|
|
85
|
+
var key, i;
|
|
86
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
87
|
+
key = sourceKeys[i];
|
|
88
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
89
|
+
target[key] = source[key];
|
|
90
|
+
}
|
|
91
|
+
return target;
|
|
92
|
+
}
|
|
93
|
+
function _objectWithoutProperties(source, excluded) {
|
|
94
|
+
if (source == null) return {};
|
|
95
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
96
|
+
var key, i;
|
|
97
|
+
if (Object.getOwnPropertySymbols) {
|
|
98
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
99
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
100
|
+
key = sourceSymbolKeys[i];
|
|
101
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
102
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
103
|
+
target[key] = source[key];
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return target;
|
|
107
|
+
}
|
|
108
|
+
var version = "1.15.6";
|
|
109
|
+
function userAgent(pattern) {
|
|
110
|
+
if (typeof window !== "undefined" && window.navigator) {
|
|
111
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(pattern);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
|
|
115
|
+
var Edge = userAgent(/Edge/i);
|
|
116
|
+
var FireFox = userAgent(/firefox/i);
|
|
117
|
+
var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
|
|
118
|
+
var IOS = userAgent(/iP(ad|od|hone)/i);
|
|
119
|
+
var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
|
|
120
|
+
var captureMode = {
|
|
121
|
+
capture: false,
|
|
122
|
+
passive: false
|
|
123
|
+
};
|
|
124
|
+
function on(el, event, fn) {
|
|
125
|
+
el.addEventListener(event, fn, !IE11OrLess && captureMode);
|
|
126
|
+
}
|
|
127
|
+
function off(el, event, fn) {
|
|
128
|
+
el.removeEventListener(event, fn, !IE11OrLess && captureMode);
|
|
129
|
+
}
|
|
130
|
+
function matches(el, selector) {
|
|
131
|
+
if (!selector) return;
|
|
132
|
+
selector[0] === ">" && (selector = selector.substring(1));
|
|
133
|
+
if (el) {
|
|
134
|
+
try {
|
|
135
|
+
if (el.matches) {
|
|
136
|
+
return el.matches(selector);
|
|
137
|
+
} else if (el.msMatchesSelector) {
|
|
138
|
+
return el.msMatchesSelector(selector);
|
|
139
|
+
} else if (el.webkitMatchesSelector) {
|
|
140
|
+
return el.webkitMatchesSelector(selector);
|
|
141
|
+
}
|
|
142
|
+
} catch (_) {
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
function getParentOrHost(el) {
|
|
149
|
+
return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
|
|
150
|
+
}
|
|
151
|
+
function closest(el, selector, ctx, includeCTX) {
|
|
152
|
+
if (el) {
|
|
153
|
+
ctx = ctx || document;
|
|
154
|
+
do {
|
|
155
|
+
if (selector != null && (selector[0] === ">" ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
|
|
156
|
+
return el;
|
|
157
|
+
}
|
|
158
|
+
if (el === ctx) break;
|
|
159
|
+
} while (el = getParentOrHost(el));
|
|
160
|
+
}
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
var R_SPACE = /\s+/g;
|
|
164
|
+
function toggleClass(el, name, state) {
|
|
165
|
+
if (el && name) {
|
|
166
|
+
if (el.classList) {
|
|
167
|
+
el.classList[state ? "add" : "remove"](name);
|
|
168
|
+
} else {
|
|
169
|
+
var className = (" " + el.className + " ").replace(R_SPACE, " ").replace(" " + name + " ", " ");
|
|
170
|
+
el.className = (className + (state ? " " + name : "")).replace(R_SPACE, " ");
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function css(el, prop, val) {
|
|
175
|
+
var style = el && el.style;
|
|
176
|
+
if (style) {
|
|
177
|
+
if (val === void 0) {
|
|
178
|
+
if (document.defaultView && document.defaultView.getComputedStyle) {
|
|
179
|
+
val = document.defaultView.getComputedStyle(el, "");
|
|
180
|
+
} else if (el.currentStyle) {
|
|
181
|
+
val = el.currentStyle;
|
|
182
|
+
}
|
|
183
|
+
return prop === void 0 ? val : val[prop];
|
|
184
|
+
} else {
|
|
185
|
+
if (!(prop in style) && prop.indexOf("webkit") === -1) {
|
|
186
|
+
prop = "-webkit-" + prop;
|
|
187
|
+
}
|
|
188
|
+
style[prop] = val + (typeof val === "string" ? "" : "px");
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function matrix(el, selfOnly) {
|
|
193
|
+
var appliedTransforms = "";
|
|
194
|
+
if (typeof el === "string") {
|
|
195
|
+
appliedTransforms = el;
|
|
196
|
+
} else {
|
|
197
|
+
do {
|
|
198
|
+
var transform = css(el, "transform");
|
|
199
|
+
if (transform && transform !== "none") {
|
|
200
|
+
appliedTransforms = transform + " " + appliedTransforms;
|
|
201
|
+
}
|
|
202
|
+
} while (!selfOnly && (el = el.parentNode));
|
|
203
|
+
}
|
|
204
|
+
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
205
|
+
return matrixFn && new matrixFn(appliedTransforms);
|
|
206
|
+
}
|
|
207
|
+
function find(ctx, tagName, iterator) {
|
|
208
|
+
if (ctx) {
|
|
209
|
+
var list = ctx.getElementsByTagName(tagName), i = 0, n = list.length;
|
|
210
|
+
if (iterator) {
|
|
211
|
+
for (; i < n; i++) {
|
|
212
|
+
iterator(list[i], i);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return list;
|
|
216
|
+
}
|
|
217
|
+
return [];
|
|
218
|
+
}
|
|
219
|
+
function getWindowScrollingElement() {
|
|
220
|
+
var scrollingElement = document.scrollingElement;
|
|
221
|
+
if (scrollingElement) {
|
|
222
|
+
return scrollingElement;
|
|
223
|
+
} else {
|
|
224
|
+
return document.documentElement;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
|
|
228
|
+
if (!el.getBoundingClientRect && el !== window) return;
|
|
229
|
+
var elRect, top, left, bottom, right, height, width;
|
|
230
|
+
if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
|
|
231
|
+
elRect = el.getBoundingClientRect();
|
|
232
|
+
top = elRect.top;
|
|
233
|
+
left = elRect.left;
|
|
234
|
+
bottom = elRect.bottom;
|
|
235
|
+
right = elRect.right;
|
|
236
|
+
height = elRect.height;
|
|
237
|
+
width = elRect.width;
|
|
238
|
+
} else {
|
|
239
|
+
top = 0;
|
|
240
|
+
left = 0;
|
|
241
|
+
bottom = window.innerHeight;
|
|
242
|
+
right = window.innerWidth;
|
|
243
|
+
height = window.innerHeight;
|
|
244
|
+
width = window.innerWidth;
|
|
245
|
+
}
|
|
246
|
+
if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
|
|
247
|
+
container = container || el.parentNode;
|
|
248
|
+
if (!IE11OrLess) {
|
|
249
|
+
do {
|
|
250
|
+
if (container && container.getBoundingClientRect && (css(container, "transform") !== "none" || relativeToNonStaticParent && css(container, "position") !== "static")) {
|
|
251
|
+
var containerRect = container.getBoundingClientRect();
|
|
252
|
+
top -= containerRect.top + parseInt(css(container, "border-top-width"));
|
|
253
|
+
left -= containerRect.left + parseInt(css(container, "border-left-width"));
|
|
254
|
+
bottom = top + elRect.height;
|
|
255
|
+
right = left + elRect.width;
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
} while (container = container.parentNode);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if (undoScale && el !== window) {
|
|
262
|
+
var elMatrix = matrix(container || el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d;
|
|
263
|
+
if (elMatrix) {
|
|
264
|
+
top /= scaleY;
|
|
265
|
+
left /= scaleX;
|
|
266
|
+
width /= scaleX;
|
|
267
|
+
height /= scaleY;
|
|
268
|
+
bottom = top + height;
|
|
269
|
+
right = left + width;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return {
|
|
273
|
+
top,
|
|
274
|
+
left,
|
|
275
|
+
bottom,
|
|
276
|
+
right,
|
|
277
|
+
width,
|
|
278
|
+
height
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
function isScrolledPast(el, elSide, parentSide) {
|
|
282
|
+
var parent = getParentAutoScrollElement(el, true), elSideVal = getRect(el)[elSide];
|
|
283
|
+
while (parent) {
|
|
284
|
+
var parentSideVal = getRect(parent)[parentSide], visible = void 0;
|
|
285
|
+
{
|
|
286
|
+
visible = elSideVal >= parentSideVal;
|
|
287
|
+
}
|
|
288
|
+
if (!visible) return parent;
|
|
289
|
+
if (parent === getWindowScrollingElement()) break;
|
|
290
|
+
parent = getParentAutoScrollElement(parent, false);
|
|
291
|
+
}
|
|
292
|
+
return false;
|
|
293
|
+
}
|
|
294
|
+
function getChild(el, childNum, options, includeDragEl) {
|
|
295
|
+
var currentChild = 0, i = 0, children = el.children;
|
|
296
|
+
while (i < children.length) {
|
|
297
|
+
if (children[i].style.display !== "none" && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
|
|
298
|
+
if (currentChild === childNum) {
|
|
299
|
+
return children[i];
|
|
300
|
+
}
|
|
301
|
+
currentChild++;
|
|
302
|
+
}
|
|
303
|
+
i++;
|
|
304
|
+
}
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
function lastChild(el, selector) {
|
|
308
|
+
var last = el.lastElementChild;
|
|
309
|
+
while (last && (last === Sortable.ghost || css(last, "display") === "none" || selector && !matches(last, selector))) {
|
|
310
|
+
last = last.previousElementSibling;
|
|
311
|
+
}
|
|
312
|
+
return last || null;
|
|
313
|
+
}
|
|
314
|
+
function index(el, selector) {
|
|
315
|
+
var index2 = 0;
|
|
316
|
+
if (!el || !el.parentNode) {
|
|
317
|
+
return -1;
|
|
318
|
+
}
|
|
319
|
+
while (el = el.previousElementSibling) {
|
|
320
|
+
if (el.nodeName.toUpperCase() !== "TEMPLATE" && el !== Sortable.clone && (!selector || matches(el, selector))) {
|
|
321
|
+
index2++;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return index2;
|
|
325
|
+
}
|
|
326
|
+
function getRelativeScrollOffset(el) {
|
|
327
|
+
var offsetLeft = 0, offsetTop = 0, winScroller = getWindowScrollingElement();
|
|
328
|
+
if (el) {
|
|
329
|
+
do {
|
|
330
|
+
var elMatrix = matrix(el), scaleX = elMatrix.a, scaleY = elMatrix.d;
|
|
331
|
+
offsetLeft += el.scrollLeft * scaleX;
|
|
332
|
+
offsetTop += el.scrollTop * scaleY;
|
|
333
|
+
} while (el !== winScroller && (el = el.parentNode));
|
|
334
|
+
}
|
|
335
|
+
return [offsetLeft, offsetTop];
|
|
336
|
+
}
|
|
337
|
+
function indexOfObject(arr, obj) {
|
|
338
|
+
for (var i in arr) {
|
|
339
|
+
if (!arr.hasOwnProperty(i)) continue;
|
|
340
|
+
for (var key in obj) {
|
|
341
|
+
if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
return -1;
|
|
345
|
+
}
|
|
346
|
+
function getParentAutoScrollElement(el, includeSelf) {
|
|
347
|
+
if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
|
|
348
|
+
var elem = el;
|
|
349
|
+
var gotSelf = false;
|
|
350
|
+
do {
|
|
351
|
+
if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
|
|
352
|
+
var elemCSS = css(elem);
|
|
353
|
+
if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == "auto" || elemCSS.overflowX == "scroll") || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == "auto" || elemCSS.overflowY == "scroll")) {
|
|
354
|
+
if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
|
|
355
|
+
if (gotSelf || includeSelf) return elem;
|
|
356
|
+
gotSelf = true;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
} while (elem = elem.parentNode);
|
|
360
|
+
return getWindowScrollingElement();
|
|
361
|
+
}
|
|
362
|
+
function extend(dst, src) {
|
|
363
|
+
if (dst && src) {
|
|
364
|
+
for (var key in src) {
|
|
365
|
+
if (src.hasOwnProperty(key)) {
|
|
366
|
+
dst[key] = src[key];
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return dst;
|
|
371
|
+
}
|
|
372
|
+
function isRectEqual(rect1, rect2) {
|
|
373
|
+
return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
|
|
374
|
+
}
|
|
375
|
+
var _throttleTimeout;
|
|
376
|
+
function throttle(callback, ms) {
|
|
377
|
+
return function() {
|
|
378
|
+
if (!_throttleTimeout) {
|
|
379
|
+
var args = arguments, _this = this;
|
|
380
|
+
if (args.length === 1) {
|
|
381
|
+
callback.call(_this, args[0]);
|
|
382
|
+
} else {
|
|
383
|
+
callback.apply(_this, args);
|
|
384
|
+
}
|
|
385
|
+
_throttleTimeout = setTimeout(function() {
|
|
386
|
+
_throttleTimeout = void 0;
|
|
387
|
+
}, ms);
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
function cancelThrottle() {
|
|
392
|
+
clearTimeout(_throttleTimeout);
|
|
393
|
+
_throttleTimeout = void 0;
|
|
394
|
+
}
|
|
395
|
+
function scrollBy(el, x, y) {
|
|
396
|
+
el.scrollLeft += x;
|
|
397
|
+
el.scrollTop += y;
|
|
398
|
+
}
|
|
399
|
+
function clone(el) {
|
|
400
|
+
var Polymer = window.Polymer;
|
|
401
|
+
var $ = window.jQuery || window.Zepto;
|
|
402
|
+
if (Polymer && Polymer.dom) {
|
|
403
|
+
return Polymer.dom(el).cloneNode(true);
|
|
404
|
+
} else if ($) {
|
|
405
|
+
return $(el).clone(true)[0];
|
|
406
|
+
} else {
|
|
407
|
+
return el.cloneNode(true);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
function getChildContainingRectFromElement(container, options, ghostEl2) {
|
|
411
|
+
var rect = {};
|
|
412
|
+
Array.from(container.children).forEach(function(child) {
|
|
413
|
+
var _rect$left, _rect$top, _rect$right, _rect$bottom;
|
|
414
|
+
if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl2) return;
|
|
415
|
+
var childRect = getRect(child);
|
|
416
|
+
rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);
|
|
417
|
+
rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);
|
|
418
|
+
rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);
|
|
419
|
+
rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);
|
|
420
|
+
});
|
|
421
|
+
rect.width = rect.right - rect.left;
|
|
422
|
+
rect.height = rect.bottom - rect.top;
|
|
423
|
+
rect.x = rect.left;
|
|
424
|
+
rect.y = rect.top;
|
|
425
|
+
return rect;
|
|
426
|
+
}
|
|
427
|
+
var expando = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
428
|
+
function AnimationStateManager() {
|
|
429
|
+
var animationStates = [], animationCallbackId;
|
|
430
|
+
return {
|
|
431
|
+
captureAnimationState: function captureAnimationState() {
|
|
432
|
+
animationStates = [];
|
|
433
|
+
if (!this.options.animation) return;
|
|
434
|
+
var children = [].slice.call(this.el.children);
|
|
435
|
+
children.forEach(function(child) {
|
|
436
|
+
if (css(child, "display") === "none" || child === Sortable.ghost) return;
|
|
437
|
+
animationStates.push({
|
|
438
|
+
target: child,
|
|
439
|
+
rect: getRect(child)
|
|
440
|
+
});
|
|
441
|
+
var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);
|
|
442
|
+
if (child.thisAnimationDuration) {
|
|
443
|
+
var childMatrix = matrix(child, true);
|
|
444
|
+
if (childMatrix) {
|
|
445
|
+
fromRect.top -= childMatrix.f;
|
|
446
|
+
fromRect.left -= childMatrix.e;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
child.fromRect = fromRect;
|
|
450
|
+
});
|
|
451
|
+
},
|
|
452
|
+
addAnimationState: function addAnimationState(state) {
|
|
453
|
+
animationStates.push(state);
|
|
454
|
+
},
|
|
455
|
+
removeAnimationState: function removeAnimationState(target) {
|
|
456
|
+
animationStates.splice(indexOfObject(animationStates, {
|
|
457
|
+
target
|
|
458
|
+
}), 1);
|
|
459
|
+
},
|
|
460
|
+
animateAll: function animateAll(callback) {
|
|
461
|
+
var _this = this;
|
|
462
|
+
if (!this.options.animation) {
|
|
463
|
+
clearTimeout(animationCallbackId);
|
|
464
|
+
if (typeof callback === "function") callback();
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
var animating = false, animationTime = 0;
|
|
468
|
+
animationStates.forEach(function(state) {
|
|
469
|
+
var time = 0, target = state.target, fromRect = target.fromRect, toRect = getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state.rect, targetMatrix = matrix(target, true);
|
|
470
|
+
if (targetMatrix) {
|
|
471
|
+
toRect.top -= targetMatrix.f;
|
|
472
|
+
toRect.left -= targetMatrix.e;
|
|
473
|
+
}
|
|
474
|
+
target.toRect = toRect;
|
|
475
|
+
if (target.thisAnimationDuration) {
|
|
476
|
+
if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
|
|
477
|
+
(animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
|
|
478
|
+
time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
if (!isRectEqual(toRect, fromRect)) {
|
|
482
|
+
target.prevFromRect = fromRect;
|
|
483
|
+
target.prevToRect = toRect;
|
|
484
|
+
if (!time) {
|
|
485
|
+
time = _this.options.animation;
|
|
486
|
+
}
|
|
487
|
+
_this.animate(target, animatingRect, toRect, time);
|
|
488
|
+
}
|
|
489
|
+
if (time) {
|
|
490
|
+
animating = true;
|
|
491
|
+
animationTime = Math.max(animationTime, time);
|
|
492
|
+
clearTimeout(target.animationResetTimer);
|
|
493
|
+
target.animationResetTimer = setTimeout(function() {
|
|
494
|
+
target.animationTime = 0;
|
|
495
|
+
target.prevFromRect = null;
|
|
496
|
+
target.fromRect = null;
|
|
497
|
+
target.prevToRect = null;
|
|
498
|
+
target.thisAnimationDuration = null;
|
|
499
|
+
}, time);
|
|
500
|
+
target.thisAnimationDuration = time;
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
clearTimeout(animationCallbackId);
|
|
504
|
+
if (!animating) {
|
|
505
|
+
if (typeof callback === "function") callback();
|
|
506
|
+
} else {
|
|
507
|
+
animationCallbackId = setTimeout(function() {
|
|
508
|
+
if (typeof callback === "function") callback();
|
|
509
|
+
}, animationTime);
|
|
510
|
+
}
|
|
511
|
+
animationStates = [];
|
|
512
|
+
},
|
|
513
|
+
animate: function animate(target, currentRect, toRect, duration) {
|
|
514
|
+
if (duration) {
|
|
515
|
+
css(target, "transition", "");
|
|
516
|
+
css(target, "transform", "");
|
|
517
|
+
var elMatrix = matrix(this.el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d, translateX = (currentRect.left - toRect.left) / (scaleX || 1), translateY = (currentRect.top - toRect.top) / (scaleY || 1);
|
|
518
|
+
target.animatingX = !!translateX;
|
|
519
|
+
target.animatingY = !!translateY;
|
|
520
|
+
css(target, "transform", "translate3d(" + translateX + "px," + translateY + "px,0)");
|
|
521
|
+
this.forRepaintDummy = repaint(target);
|
|
522
|
+
css(target, "transition", "transform " + duration + "ms" + (this.options.easing ? " " + this.options.easing : ""));
|
|
523
|
+
css(target, "transform", "translate3d(0,0,0)");
|
|
524
|
+
typeof target.animated === "number" && clearTimeout(target.animated);
|
|
525
|
+
target.animated = setTimeout(function() {
|
|
526
|
+
css(target, "transition", "");
|
|
527
|
+
css(target, "transform", "");
|
|
528
|
+
target.animated = false;
|
|
529
|
+
target.animatingX = false;
|
|
530
|
+
target.animatingY = false;
|
|
531
|
+
}, duration);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
function repaint(target) {
|
|
537
|
+
return target.offsetWidth;
|
|
538
|
+
}
|
|
539
|
+
function calculateRealTime(animatingRect, fromRect, toRect, options) {
|
|
540
|
+
return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
|
|
541
|
+
}
|
|
542
|
+
var plugins = [];
|
|
543
|
+
var defaults = {
|
|
544
|
+
initializeByDefault: true
|
|
545
|
+
};
|
|
546
|
+
var PluginManager = {
|
|
547
|
+
mount: function mount(plugin) {
|
|
548
|
+
for (var option2 in defaults) {
|
|
549
|
+
if (defaults.hasOwnProperty(option2) && !(option2 in plugin)) {
|
|
550
|
+
plugin[option2] = defaults[option2];
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
plugins.forEach(function(p) {
|
|
554
|
+
if (p.pluginName === plugin.pluginName) {
|
|
555
|
+
throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
plugins.push(plugin);
|
|
559
|
+
},
|
|
560
|
+
pluginEvent: function pluginEvent(eventName, sortable, evt) {
|
|
561
|
+
var _this = this;
|
|
562
|
+
this.eventCanceled = false;
|
|
563
|
+
evt.cancel = function() {
|
|
564
|
+
_this.eventCanceled = true;
|
|
565
|
+
};
|
|
566
|
+
var eventNameGlobal = eventName + "Global";
|
|
567
|
+
plugins.forEach(function(plugin) {
|
|
568
|
+
if (!sortable[plugin.pluginName]) return;
|
|
569
|
+
if (sortable[plugin.pluginName][eventNameGlobal]) {
|
|
570
|
+
sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
|
|
571
|
+
sortable
|
|
572
|
+
}, evt));
|
|
573
|
+
}
|
|
574
|
+
if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
|
|
575
|
+
sortable[plugin.pluginName][eventName](_objectSpread2({
|
|
576
|
+
sortable
|
|
577
|
+
}, evt));
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
},
|
|
581
|
+
initializePlugins: function initializePlugins(sortable, el, defaults2, options) {
|
|
582
|
+
plugins.forEach(function(plugin) {
|
|
583
|
+
var pluginName = plugin.pluginName;
|
|
584
|
+
if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
|
|
585
|
+
var initialized = new plugin(sortable, el, sortable.options);
|
|
586
|
+
initialized.sortable = sortable;
|
|
587
|
+
initialized.options = sortable.options;
|
|
588
|
+
sortable[pluginName] = initialized;
|
|
589
|
+
_extends(defaults2, initialized.defaults);
|
|
590
|
+
});
|
|
591
|
+
for (var option2 in sortable.options) {
|
|
592
|
+
if (!sortable.options.hasOwnProperty(option2)) continue;
|
|
593
|
+
var modified = this.modifyOption(sortable, option2, sortable.options[option2]);
|
|
594
|
+
if (typeof modified !== "undefined") {
|
|
595
|
+
sortable.options[option2] = modified;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
getEventProperties: function getEventProperties(name, sortable) {
|
|
600
|
+
var eventProperties = {};
|
|
601
|
+
plugins.forEach(function(plugin) {
|
|
602
|
+
if (typeof plugin.eventProperties !== "function") return;
|
|
603
|
+
_extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
|
|
604
|
+
});
|
|
605
|
+
return eventProperties;
|
|
606
|
+
},
|
|
607
|
+
modifyOption: function modifyOption(sortable, name, value) {
|
|
608
|
+
var modifiedValue;
|
|
609
|
+
plugins.forEach(function(plugin) {
|
|
610
|
+
if (!sortable[plugin.pluginName]) return;
|
|
611
|
+
if (plugin.optionListeners && typeof plugin.optionListeners[name] === "function") {
|
|
612
|
+
modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
return modifiedValue;
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
function dispatchEvent(_ref) {
|
|
619
|
+
var sortable = _ref.sortable, rootEl2 = _ref.rootEl, name = _ref.name, targetEl = _ref.targetEl, cloneEl2 = _ref.cloneEl, toEl = _ref.toEl, fromEl = _ref.fromEl, oldIndex2 = _ref.oldIndex, newIndex2 = _ref.newIndex, oldDraggableIndex2 = _ref.oldDraggableIndex, newDraggableIndex2 = _ref.newDraggableIndex, originalEvent = _ref.originalEvent, putSortable2 = _ref.putSortable, extraEventProperties = _ref.extraEventProperties;
|
|
620
|
+
sortable = sortable || rootEl2 && rootEl2[expando];
|
|
621
|
+
if (!sortable) return;
|
|
622
|
+
var evt, options = sortable.options, onName = "on" + name.charAt(0).toUpperCase() + name.substr(1);
|
|
623
|
+
if (window.CustomEvent && !IE11OrLess && !Edge) {
|
|
624
|
+
evt = new CustomEvent(name, {
|
|
625
|
+
bubbles: true,
|
|
626
|
+
cancelable: true
|
|
627
|
+
});
|
|
628
|
+
} else {
|
|
629
|
+
evt = document.createEvent("Event");
|
|
630
|
+
evt.initEvent(name, true, true);
|
|
631
|
+
}
|
|
632
|
+
evt.to = toEl || rootEl2;
|
|
633
|
+
evt.from = fromEl || rootEl2;
|
|
634
|
+
evt.item = targetEl || rootEl2;
|
|
635
|
+
evt.clone = cloneEl2;
|
|
636
|
+
evt.oldIndex = oldIndex2;
|
|
637
|
+
evt.newIndex = newIndex2;
|
|
638
|
+
evt.oldDraggableIndex = oldDraggableIndex2;
|
|
639
|
+
evt.newDraggableIndex = newDraggableIndex2;
|
|
640
|
+
evt.originalEvent = originalEvent;
|
|
641
|
+
evt.pullMode = putSortable2 ? putSortable2.lastPutMode : void 0;
|
|
642
|
+
var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
|
|
643
|
+
for (var option2 in allEventProperties) {
|
|
644
|
+
evt[option2] = allEventProperties[option2];
|
|
645
|
+
}
|
|
646
|
+
if (rootEl2) {
|
|
647
|
+
rootEl2.dispatchEvent(evt);
|
|
648
|
+
}
|
|
649
|
+
if (options[onName]) {
|
|
650
|
+
options[onName].call(sortable, evt);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
var _excluded = ["evt"];
|
|
654
|
+
var pluginEvent2 = function pluginEvent3(eventName, sortable) {
|
|
655
|
+
var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, originalEvent = _ref.evt, data = _objectWithoutProperties(_ref, _excluded);
|
|
656
|
+
PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
|
|
657
|
+
dragEl,
|
|
658
|
+
parentEl,
|
|
659
|
+
ghostEl,
|
|
660
|
+
rootEl,
|
|
661
|
+
nextEl,
|
|
662
|
+
lastDownEl,
|
|
663
|
+
cloneEl,
|
|
664
|
+
cloneHidden,
|
|
665
|
+
dragStarted: moved,
|
|
666
|
+
putSortable,
|
|
667
|
+
activeSortable: Sortable.active,
|
|
668
|
+
originalEvent,
|
|
669
|
+
oldIndex,
|
|
670
|
+
oldDraggableIndex,
|
|
671
|
+
newIndex,
|
|
672
|
+
newDraggableIndex,
|
|
673
|
+
hideGhostForTarget: _hideGhostForTarget,
|
|
674
|
+
unhideGhostForTarget: _unhideGhostForTarget,
|
|
675
|
+
cloneNowHidden: function cloneNowHidden() {
|
|
676
|
+
cloneHidden = true;
|
|
677
|
+
},
|
|
678
|
+
cloneNowShown: function cloneNowShown() {
|
|
679
|
+
cloneHidden = false;
|
|
680
|
+
},
|
|
681
|
+
dispatchSortableEvent: function dispatchSortableEvent(name) {
|
|
682
|
+
_dispatchEvent({
|
|
683
|
+
sortable,
|
|
684
|
+
name,
|
|
685
|
+
originalEvent
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
}, data));
|
|
689
|
+
};
|
|
690
|
+
function _dispatchEvent(info) {
|
|
691
|
+
dispatchEvent(_objectSpread2({
|
|
692
|
+
putSortable,
|
|
693
|
+
cloneEl,
|
|
694
|
+
targetEl: dragEl,
|
|
695
|
+
rootEl,
|
|
696
|
+
oldIndex,
|
|
697
|
+
oldDraggableIndex,
|
|
698
|
+
newIndex,
|
|
699
|
+
newDraggableIndex
|
|
700
|
+
}, info));
|
|
701
|
+
}
|
|
702
|
+
var dragEl, parentEl, ghostEl, rootEl, nextEl, lastDownEl, cloneEl, cloneHidden, oldIndex, newIndex, oldDraggableIndex, newDraggableIndex, activeGroup, putSortable, awaitingDragStarted = false, ignoreNextClick = false, sortables = [], tapEvt, touchEvt, lastDx, lastDy, tapDistanceLeft, tapDistanceTop, moved, lastTarget, lastDirection, pastFirstInvertThresh = false, isCircumstantialInvert = false, targetMoveDistance, ghostRelativeParent, ghostRelativeParentInitialScroll = [], _silent = false, savedInputChecked = [];
|
|
703
|
+
var documentExists = typeof document !== "undefined", PositionGhostAbsolutely = IOS, CSSFloatProperty = Edge || IE11OrLess ? "cssFloat" : "float", supportDraggable = documentExists && !ChromeForAndroid && !IOS && "draggable" in document.createElement("div"), supportCssPointerEvents = function() {
|
|
704
|
+
if (!documentExists) return;
|
|
705
|
+
if (IE11OrLess) {
|
|
706
|
+
return false;
|
|
707
|
+
}
|
|
708
|
+
var el = document.createElement("x");
|
|
709
|
+
el.style.cssText = "pointer-events:auto";
|
|
710
|
+
return el.style.pointerEvents === "auto";
|
|
711
|
+
}(), _detectDirection = function _detectDirection2(el, options) {
|
|
712
|
+
var elCSS = css(el), elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), child1 = getChild(el, 0, options), child2 = getChild(el, 1, options), firstChildCSS = child1 && css(child1), secondChildCSS = child2 && css(child2), firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width, secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
|
|
713
|
+
if (elCSS.display === "flex") {
|
|
714
|
+
return elCSS.flexDirection === "column" || elCSS.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
715
|
+
}
|
|
716
|
+
if (elCSS.display === "grid") {
|
|
717
|
+
return elCSS.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
718
|
+
}
|
|
719
|
+
if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== "none") {
|
|
720
|
+
var touchingSideChild2 = firstChildCSS["float"] === "left" ? "left" : "right";
|
|
721
|
+
return child2 && (secondChildCSS.clear === "both" || secondChildCSS.clear === touchingSideChild2) ? "vertical" : "horizontal";
|
|
722
|
+
}
|
|
723
|
+
return child1 && (firstChildCSS.display === "block" || firstChildCSS.display === "flex" || firstChildCSS.display === "table" || firstChildCSS.display === "grid" || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === "none" || child2 && elCSS[CSSFloatProperty] === "none" && firstChildWidth + secondChildWidth > elWidth) ? "vertical" : "horizontal";
|
|
724
|
+
}, _dragElInRowColumn = function _dragElInRowColumn2(dragRect, targetRect, vertical) {
|
|
725
|
+
var dragElS1Opp = vertical ? dragRect.left : dragRect.top, dragElS2Opp = vertical ? dragRect.right : dragRect.bottom, dragElOppLength = vertical ? dragRect.width : dragRect.height, targetS1Opp = vertical ? targetRect.left : targetRect.top, targetS2Opp = vertical ? targetRect.right : targetRect.bottom, targetOppLength = vertical ? targetRect.width : targetRect.height;
|
|
726
|
+
return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
|
|
727
|
+
}, _detectNearestEmptySortable = function _detectNearestEmptySortable2(x, y) {
|
|
728
|
+
var ret;
|
|
729
|
+
sortables.some(function(sortable) {
|
|
730
|
+
var threshold = sortable[expando].options.emptyInsertThreshold;
|
|
731
|
+
if (!threshold || lastChild(sortable)) return;
|
|
732
|
+
var rect = getRect(sortable), insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold, insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
|
|
733
|
+
if (insideHorizontally && insideVertically) {
|
|
734
|
+
return ret = sortable;
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
return ret;
|
|
738
|
+
}, _prepareGroup = function _prepareGroup2(options) {
|
|
739
|
+
function toFn(value, pull) {
|
|
740
|
+
return function(to, from, dragEl2, evt) {
|
|
741
|
+
var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
|
|
742
|
+
if (value == null && (pull || sameGroup)) {
|
|
743
|
+
return true;
|
|
744
|
+
} else if (value == null || value === false) {
|
|
745
|
+
return false;
|
|
746
|
+
} else if (pull && value === "clone") {
|
|
747
|
+
return value;
|
|
748
|
+
} else if (typeof value === "function") {
|
|
749
|
+
return toFn(value(to, from, dragEl2, evt), pull)(to, from, dragEl2, evt);
|
|
750
|
+
} else {
|
|
751
|
+
var otherGroup = (pull ? to : from).options.group.name;
|
|
752
|
+
return value === true || typeof value === "string" && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
var group = {};
|
|
757
|
+
var originalGroup = options.group;
|
|
758
|
+
if (!originalGroup || _typeof(originalGroup) != "object") {
|
|
759
|
+
originalGroup = {
|
|
760
|
+
name: originalGroup
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
group.name = originalGroup.name;
|
|
764
|
+
group.checkPull = toFn(originalGroup.pull, true);
|
|
765
|
+
group.checkPut = toFn(originalGroup.put);
|
|
766
|
+
group.revertClone = originalGroup.revertClone;
|
|
767
|
+
options.group = group;
|
|
768
|
+
}, _hideGhostForTarget = function _hideGhostForTarget2() {
|
|
769
|
+
if (!supportCssPointerEvents && ghostEl) {
|
|
770
|
+
css(ghostEl, "display", "none");
|
|
771
|
+
}
|
|
772
|
+
}, _unhideGhostForTarget = function _unhideGhostForTarget2() {
|
|
773
|
+
if (!supportCssPointerEvents && ghostEl) {
|
|
774
|
+
css(ghostEl, "display", "");
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
if (documentExists && !ChromeForAndroid) {
|
|
778
|
+
document.addEventListener("click", function(evt) {
|
|
779
|
+
if (ignoreNextClick) {
|
|
780
|
+
evt.preventDefault();
|
|
781
|
+
evt.stopPropagation && evt.stopPropagation();
|
|
782
|
+
evt.stopImmediatePropagation && evt.stopImmediatePropagation();
|
|
783
|
+
ignoreNextClick = false;
|
|
784
|
+
return false;
|
|
785
|
+
}
|
|
786
|
+
}, true);
|
|
787
|
+
}
|
|
788
|
+
var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent2(evt) {
|
|
789
|
+
if (dragEl) {
|
|
790
|
+
evt = evt.touches ? evt.touches[0] : evt;
|
|
791
|
+
var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
|
|
792
|
+
if (nearest) {
|
|
793
|
+
var event = {};
|
|
794
|
+
for (var i in evt) {
|
|
795
|
+
if (evt.hasOwnProperty(i)) {
|
|
796
|
+
event[i] = evt[i];
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
event.target = event.rootEl = nearest;
|
|
800
|
+
event.preventDefault = void 0;
|
|
801
|
+
event.stopPropagation = void 0;
|
|
802
|
+
nearest[expando]._onDragOver(event);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
var _checkOutsideTargetEl = function _checkOutsideTargetEl2(evt) {
|
|
807
|
+
if (dragEl) {
|
|
808
|
+
dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
|
|
809
|
+
}
|
|
810
|
+
};
|
|
811
|
+
function Sortable(el, options) {
|
|
812
|
+
if (!(el && el.nodeType && el.nodeType === 1)) {
|
|
813
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
|
|
814
|
+
}
|
|
815
|
+
this.el = el;
|
|
816
|
+
this.options = options = _extends({}, options);
|
|
817
|
+
el[expando] = this;
|
|
818
|
+
var defaults2 = {
|
|
819
|
+
group: null,
|
|
820
|
+
sort: true,
|
|
821
|
+
disabled: false,
|
|
822
|
+
store: null,
|
|
823
|
+
handle: null,
|
|
824
|
+
draggable: /^[uo]l$/i.test(el.nodeName) ? ">li" : ">*",
|
|
825
|
+
swapThreshold: 1,
|
|
826
|
+
// percentage; 0 <= x <= 1
|
|
827
|
+
invertSwap: false,
|
|
828
|
+
// invert always
|
|
829
|
+
invertedSwapThreshold: null,
|
|
830
|
+
// will be set to same as swapThreshold if default
|
|
831
|
+
removeCloneOnHide: true,
|
|
832
|
+
direction: function direction() {
|
|
833
|
+
return _detectDirection(el, this.options);
|
|
834
|
+
},
|
|
835
|
+
ghostClass: "sortable-ghost",
|
|
836
|
+
chosenClass: "sortable-chosen",
|
|
837
|
+
dragClass: "sortable-drag",
|
|
838
|
+
ignore: "a, img",
|
|
839
|
+
filter: null,
|
|
840
|
+
preventOnFilter: true,
|
|
841
|
+
animation: 0,
|
|
842
|
+
easing: null,
|
|
843
|
+
setData: function setData(dataTransfer, dragEl2) {
|
|
844
|
+
dataTransfer.setData("Text", dragEl2.textContent);
|
|
845
|
+
},
|
|
846
|
+
dropBubble: false,
|
|
847
|
+
dragoverBubble: false,
|
|
848
|
+
dataIdAttr: "data-id",
|
|
849
|
+
delay: 0,
|
|
850
|
+
delayOnTouchOnly: false,
|
|
851
|
+
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
852
|
+
forceFallback: false,
|
|
853
|
+
fallbackClass: "sortable-fallback",
|
|
854
|
+
fallbackOnBody: false,
|
|
855
|
+
fallbackTolerance: 0,
|
|
856
|
+
fallbackOffset: {
|
|
857
|
+
x: 0,
|
|
858
|
+
y: 0
|
|
859
|
+
},
|
|
860
|
+
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
861
|
+
supportPointer: Sortable.supportPointer !== false && "PointerEvent" in window && (!Safari || IOS),
|
|
862
|
+
emptyInsertThreshold: 5
|
|
863
|
+
};
|
|
864
|
+
PluginManager.initializePlugins(this, el, defaults2);
|
|
865
|
+
for (var name in defaults2) {
|
|
866
|
+
!(name in options) && (options[name] = defaults2[name]);
|
|
867
|
+
}
|
|
868
|
+
_prepareGroup(options);
|
|
869
|
+
for (var fn in this) {
|
|
870
|
+
if (fn.charAt(0) === "_" && typeof this[fn] === "function") {
|
|
871
|
+
this[fn] = this[fn].bind(this);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
this.nativeDraggable = options.forceFallback ? false : supportDraggable;
|
|
875
|
+
if (this.nativeDraggable) {
|
|
876
|
+
this.options.touchStartThreshold = 1;
|
|
877
|
+
}
|
|
878
|
+
if (options.supportPointer) {
|
|
879
|
+
on(el, "pointerdown", this._onTapStart);
|
|
880
|
+
} else {
|
|
881
|
+
on(el, "mousedown", this._onTapStart);
|
|
882
|
+
on(el, "touchstart", this._onTapStart);
|
|
883
|
+
}
|
|
884
|
+
if (this.nativeDraggable) {
|
|
885
|
+
on(el, "dragover", this);
|
|
886
|
+
on(el, "dragenter", this);
|
|
887
|
+
}
|
|
888
|
+
sortables.push(this.el);
|
|
889
|
+
options.store && options.store.get && this.sort(options.store.get(this) || []);
|
|
890
|
+
_extends(this, AnimationStateManager());
|
|
891
|
+
}
|
|
892
|
+
Sortable.prototype = /** @lends Sortable.prototype */
|
|
893
|
+
{
|
|
894
|
+
constructor: Sortable,
|
|
895
|
+
_isOutsideThisEl: function _isOutsideThisEl(target) {
|
|
896
|
+
if (!this.el.contains(target) && target !== this.el) {
|
|
897
|
+
lastTarget = null;
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
_getDirection: function _getDirection(evt, target) {
|
|
901
|
+
return typeof this.options.direction === "function" ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
|
|
902
|
+
},
|
|
903
|
+
_onTapStart: function _onTapStart(evt) {
|
|
904
|
+
if (!evt.cancelable) return;
|
|
905
|
+
var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === "touch" && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, filter = options.filter;
|
|
906
|
+
_saveInputCheckedState(el);
|
|
907
|
+
if (dragEl) {
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
910
|
+
if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
if (originalTarget.isContentEditable) {
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === "SELECT") {
|
|
917
|
+
return;
|
|
918
|
+
}
|
|
919
|
+
target = closest(target, options.draggable, el, false);
|
|
920
|
+
if (target && target.animated) {
|
|
921
|
+
return;
|
|
922
|
+
}
|
|
923
|
+
if (lastDownEl === target) {
|
|
924
|
+
return;
|
|
925
|
+
}
|
|
926
|
+
oldIndex = index(target);
|
|
927
|
+
oldDraggableIndex = index(target, options.draggable);
|
|
928
|
+
if (typeof filter === "function") {
|
|
929
|
+
if (filter.call(this, evt, target, this)) {
|
|
930
|
+
_dispatchEvent({
|
|
931
|
+
sortable: _this,
|
|
932
|
+
rootEl: originalTarget,
|
|
933
|
+
name: "filter",
|
|
934
|
+
targetEl: target,
|
|
935
|
+
toEl: el,
|
|
936
|
+
fromEl: el
|
|
937
|
+
});
|
|
938
|
+
pluginEvent2("filter", _this, {
|
|
939
|
+
evt
|
|
940
|
+
});
|
|
941
|
+
preventOnFilter && evt.preventDefault();
|
|
942
|
+
return;
|
|
943
|
+
}
|
|
944
|
+
} else if (filter) {
|
|
945
|
+
filter = filter.split(",").some(function(criteria) {
|
|
946
|
+
criteria = closest(originalTarget, criteria.trim(), el, false);
|
|
947
|
+
if (criteria) {
|
|
948
|
+
_dispatchEvent({
|
|
949
|
+
sortable: _this,
|
|
950
|
+
rootEl: criteria,
|
|
951
|
+
name: "filter",
|
|
952
|
+
targetEl: target,
|
|
953
|
+
fromEl: el,
|
|
954
|
+
toEl: el
|
|
955
|
+
});
|
|
956
|
+
pluginEvent2("filter", _this, {
|
|
957
|
+
evt
|
|
958
|
+
});
|
|
959
|
+
return true;
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
if (filter) {
|
|
963
|
+
preventOnFilter && evt.preventDefault();
|
|
964
|
+
return;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
if (options.handle && !closest(originalTarget, options.handle, el, false)) {
|
|
968
|
+
return;
|
|
969
|
+
}
|
|
970
|
+
this._prepareDragStart(evt, touch, target);
|
|
971
|
+
},
|
|
972
|
+
_prepareDragStart: function _prepareDragStart(evt, touch, target) {
|
|
973
|
+
var _this = this, el = _this.el, options = _this.options, ownerDocument = el.ownerDocument, dragStartFn;
|
|
974
|
+
if (target && !dragEl && target.parentNode === el) {
|
|
975
|
+
var dragRect = getRect(target);
|
|
976
|
+
rootEl = el;
|
|
977
|
+
dragEl = target;
|
|
978
|
+
parentEl = dragEl.parentNode;
|
|
979
|
+
nextEl = dragEl.nextSibling;
|
|
980
|
+
lastDownEl = target;
|
|
981
|
+
activeGroup = options.group;
|
|
982
|
+
Sortable.dragged = dragEl;
|
|
983
|
+
tapEvt = {
|
|
984
|
+
target: dragEl,
|
|
985
|
+
clientX: (touch || evt).clientX,
|
|
986
|
+
clientY: (touch || evt).clientY
|
|
987
|
+
};
|
|
988
|
+
tapDistanceLeft = tapEvt.clientX - dragRect.left;
|
|
989
|
+
tapDistanceTop = tapEvt.clientY - dragRect.top;
|
|
990
|
+
this._lastX = (touch || evt).clientX;
|
|
991
|
+
this._lastY = (touch || evt).clientY;
|
|
992
|
+
dragEl.style["will-change"] = "all";
|
|
993
|
+
dragStartFn = function dragStartFn2() {
|
|
994
|
+
pluginEvent2("delayEnded", _this, {
|
|
995
|
+
evt
|
|
996
|
+
});
|
|
997
|
+
if (Sortable.eventCanceled) {
|
|
998
|
+
_this._onDrop();
|
|
999
|
+
return;
|
|
1000
|
+
}
|
|
1001
|
+
_this._disableDelayedDragEvents();
|
|
1002
|
+
if (!FireFox && _this.nativeDraggable) {
|
|
1003
|
+
dragEl.draggable = true;
|
|
1004
|
+
}
|
|
1005
|
+
_this._triggerDragStart(evt, touch);
|
|
1006
|
+
_dispatchEvent({
|
|
1007
|
+
sortable: _this,
|
|
1008
|
+
name: "choose",
|
|
1009
|
+
originalEvent: evt
|
|
1010
|
+
});
|
|
1011
|
+
toggleClass(dragEl, options.chosenClass, true);
|
|
1012
|
+
};
|
|
1013
|
+
options.ignore.split(",").forEach(function(criteria) {
|
|
1014
|
+
find(dragEl, criteria.trim(), _disableDraggable);
|
|
1015
|
+
});
|
|
1016
|
+
on(ownerDocument, "dragover", nearestEmptyInsertDetectEvent);
|
|
1017
|
+
on(ownerDocument, "mousemove", nearestEmptyInsertDetectEvent);
|
|
1018
|
+
on(ownerDocument, "touchmove", nearestEmptyInsertDetectEvent);
|
|
1019
|
+
if (options.supportPointer) {
|
|
1020
|
+
on(ownerDocument, "pointerup", _this._onDrop);
|
|
1021
|
+
!this.nativeDraggable && on(ownerDocument, "pointercancel", _this._onDrop);
|
|
1022
|
+
} else {
|
|
1023
|
+
on(ownerDocument, "mouseup", _this._onDrop);
|
|
1024
|
+
on(ownerDocument, "touchend", _this._onDrop);
|
|
1025
|
+
on(ownerDocument, "touchcancel", _this._onDrop);
|
|
1026
|
+
}
|
|
1027
|
+
if (FireFox && this.nativeDraggable) {
|
|
1028
|
+
this.options.touchStartThreshold = 4;
|
|
1029
|
+
dragEl.draggable = true;
|
|
1030
|
+
}
|
|
1031
|
+
pluginEvent2("delayStart", this, {
|
|
1032
|
+
evt
|
|
1033
|
+
});
|
|
1034
|
+
if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
|
|
1035
|
+
if (Sortable.eventCanceled) {
|
|
1036
|
+
this._onDrop();
|
|
1037
|
+
return;
|
|
1038
|
+
}
|
|
1039
|
+
if (options.supportPointer) {
|
|
1040
|
+
on(ownerDocument, "pointerup", _this._disableDelayedDrag);
|
|
1041
|
+
on(ownerDocument, "pointercancel", _this._disableDelayedDrag);
|
|
1042
|
+
} else {
|
|
1043
|
+
on(ownerDocument, "mouseup", _this._disableDelayedDrag);
|
|
1044
|
+
on(ownerDocument, "touchend", _this._disableDelayedDrag);
|
|
1045
|
+
on(ownerDocument, "touchcancel", _this._disableDelayedDrag);
|
|
1046
|
+
}
|
|
1047
|
+
on(ownerDocument, "mousemove", _this._delayedDragTouchMoveHandler);
|
|
1048
|
+
on(ownerDocument, "touchmove", _this._delayedDragTouchMoveHandler);
|
|
1049
|
+
options.supportPointer && on(ownerDocument, "pointermove", _this._delayedDragTouchMoveHandler);
|
|
1050
|
+
_this._dragStartTimer = setTimeout(dragStartFn, options.delay);
|
|
1051
|
+
} else {
|
|
1052
|
+
dragStartFn();
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
_delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(e) {
|
|
1057
|
+
var touch = e.touches ? e.touches[0] : e;
|
|
1058
|
+
if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
|
|
1059
|
+
this._disableDelayedDrag();
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
_disableDelayedDrag: function _disableDelayedDrag() {
|
|
1063
|
+
dragEl && _disableDraggable(dragEl);
|
|
1064
|
+
clearTimeout(this._dragStartTimer);
|
|
1065
|
+
this._disableDelayedDragEvents();
|
|
1066
|
+
},
|
|
1067
|
+
_disableDelayedDragEvents: function _disableDelayedDragEvents() {
|
|
1068
|
+
var ownerDocument = this.el.ownerDocument;
|
|
1069
|
+
off(ownerDocument, "mouseup", this._disableDelayedDrag);
|
|
1070
|
+
off(ownerDocument, "touchend", this._disableDelayedDrag);
|
|
1071
|
+
off(ownerDocument, "touchcancel", this._disableDelayedDrag);
|
|
1072
|
+
off(ownerDocument, "pointerup", this._disableDelayedDrag);
|
|
1073
|
+
off(ownerDocument, "pointercancel", this._disableDelayedDrag);
|
|
1074
|
+
off(ownerDocument, "mousemove", this._delayedDragTouchMoveHandler);
|
|
1075
|
+
off(ownerDocument, "touchmove", this._delayedDragTouchMoveHandler);
|
|
1076
|
+
off(ownerDocument, "pointermove", this._delayedDragTouchMoveHandler);
|
|
1077
|
+
},
|
|
1078
|
+
_triggerDragStart: function _triggerDragStart(evt, touch) {
|
|
1079
|
+
touch = touch || evt.pointerType == "touch" && evt;
|
|
1080
|
+
if (!this.nativeDraggable || touch) {
|
|
1081
|
+
if (this.options.supportPointer) {
|
|
1082
|
+
on(document, "pointermove", this._onTouchMove);
|
|
1083
|
+
} else if (touch) {
|
|
1084
|
+
on(document, "touchmove", this._onTouchMove);
|
|
1085
|
+
} else {
|
|
1086
|
+
on(document, "mousemove", this._onTouchMove);
|
|
1087
|
+
}
|
|
1088
|
+
} else {
|
|
1089
|
+
on(dragEl, "dragend", this);
|
|
1090
|
+
on(rootEl, "dragstart", this._onDragStart);
|
|
1091
|
+
}
|
|
1092
|
+
try {
|
|
1093
|
+
if (document.selection) {
|
|
1094
|
+
_nextTick(function() {
|
|
1095
|
+
document.selection.empty();
|
|
1096
|
+
});
|
|
1097
|
+
} else {
|
|
1098
|
+
window.getSelection().removeAllRanges();
|
|
1099
|
+
}
|
|
1100
|
+
} catch (err) {
|
|
1101
|
+
}
|
|
1102
|
+
},
|
|
1103
|
+
_dragStarted: function _dragStarted(fallback, evt) {
|
|
1104
|
+
awaitingDragStarted = false;
|
|
1105
|
+
if (rootEl && dragEl) {
|
|
1106
|
+
pluginEvent2("dragStarted", this, {
|
|
1107
|
+
evt
|
|
1108
|
+
});
|
|
1109
|
+
if (this.nativeDraggable) {
|
|
1110
|
+
on(document, "dragover", _checkOutsideTargetEl);
|
|
1111
|
+
}
|
|
1112
|
+
var options = this.options;
|
|
1113
|
+
!fallback && toggleClass(dragEl, options.dragClass, false);
|
|
1114
|
+
toggleClass(dragEl, options.ghostClass, true);
|
|
1115
|
+
Sortable.active = this;
|
|
1116
|
+
fallback && this._appendGhost();
|
|
1117
|
+
_dispatchEvent({
|
|
1118
|
+
sortable: this,
|
|
1119
|
+
name: "start",
|
|
1120
|
+
originalEvent: evt
|
|
1121
|
+
});
|
|
1122
|
+
} else {
|
|
1123
|
+
this._nulling();
|
|
1124
|
+
}
|
|
1125
|
+
},
|
|
1126
|
+
_emulateDragOver: function _emulateDragOver() {
|
|
1127
|
+
if (touchEvt) {
|
|
1128
|
+
this._lastX = touchEvt.clientX;
|
|
1129
|
+
this._lastY = touchEvt.clientY;
|
|
1130
|
+
_hideGhostForTarget();
|
|
1131
|
+
var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
|
|
1132
|
+
var parent = target;
|
|
1133
|
+
while (target && target.shadowRoot) {
|
|
1134
|
+
target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
|
|
1135
|
+
if (target === parent) break;
|
|
1136
|
+
parent = target;
|
|
1137
|
+
}
|
|
1138
|
+
dragEl.parentNode[expando]._isOutsideThisEl(target);
|
|
1139
|
+
if (parent) {
|
|
1140
|
+
do {
|
|
1141
|
+
if (parent[expando]) {
|
|
1142
|
+
var inserted = void 0;
|
|
1143
|
+
inserted = parent[expando]._onDragOver({
|
|
1144
|
+
clientX: touchEvt.clientX,
|
|
1145
|
+
clientY: touchEvt.clientY,
|
|
1146
|
+
target,
|
|
1147
|
+
rootEl: parent
|
|
1148
|
+
});
|
|
1149
|
+
if (inserted && !this.options.dragoverBubble) {
|
|
1150
|
+
break;
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
target = parent;
|
|
1154
|
+
} while (parent = getParentOrHost(parent));
|
|
1155
|
+
}
|
|
1156
|
+
_unhideGhostForTarget();
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
_onTouchMove: function _onTouchMove(evt) {
|
|
1160
|
+
if (tapEvt) {
|
|
1161
|
+
var options = this.options, fallbackTolerance = options.fallbackTolerance, fallbackOffset = options.fallbackOffset, touch = evt.touches ? evt.touches[0] : evt, ghostMatrix = ghostEl && matrix(ghostEl, true), scaleX = ghostEl && ghostMatrix && ghostMatrix.a, scaleY = ghostEl && ghostMatrix && ghostMatrix.d, relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent), dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1), dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);
|
|
1162
|
+
if (!Sortable.active && !awaitingDragStarted) {
|
|
1163
|
+
if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
|
|
1164
|
+
return;
|
|
1165
|
+
}
|
|
1166
|
+
this._onDragStart(evt, true);
|
|
1167
|
+
}
|
|
1168
|
+
if (ghostEl) {
|
|
1169
|
+
if (ghostMatrix) {
|
|
1170
|
+
ghostMatrix.e += dx - (lastDx || 0);
|
|
1171
|
+
ghostMatrix.f += dy - (lastDy || 0);
|
|
1172
|
+
} else {
|
|
1173
|
+
ghostMatrix = {
|
|
1174
|
+
a: 1,
|
|
1175
|
+
b: 0,
|
|
1176
|
+
c: 0,
|
|
1177
|
+
d: 1,
|
|
1178
|
+
e: dx,
|
|
1179
|
+
f: dy
|
|
1180
|
+
};
|
|
1181
|
+
}
|
|
1182
|
+
var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
|
|
1183
|
+
css(ghostEl, "webkitTransform", cssMatrix);
|
|
1184
|
+
css(ghostEl, "mozTransform", cssMatrix);
|
|
1185
|
+
css(ghostEl, "msTransform", cssMatrix);
|
|
1186
|
+
css(ghostEl, "transform", cssMatrix);
|
|
1187
|
+
lastDx = dx;
|
|
1188
|
+
lastDy = dy;
|
|
1189
|
+
touchEvt = touch;
|
|
1190
|
+
}
|
|
1191
|
+
evt.cancelable && evt.preventDefault();
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
_appendGhost: function _appendGhost() {
|
|
1195
|
+
if (!ghostEl) {
|
|
1196
|
+
var container = this.options.fallbackOnBody ? document.body : rootEl, rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container), options = this.options;
|
|
1197
|
+
if (PositionGhostAbsolutely) {
|
|
1198
|
+
ghostRelativeParent = container;
|
|
1199
|
+
while (css(ghostRelativeParent, "position") === "static" && css(ghostRelativeParent, "transform") === "none" && ghostRelativeParent !== document) {
|
|
1200
|
+
ghostRelativeParent = ghostRelativeParent.parentNode;
|
|
1201
|
+
}
|
|
1202
|
+
if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
|
|
1203
|
+
if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
|
|
1204
|
+
rect.top += ghostRelativeParent.scrollTop;
|
|
1205
|
+
rect.left += ghostRelativeParent.scrollLeft;
|
|
1206
|
+
} else {
|
|
1207
|
+
ghostRelativeParent = getWindowScrollingElement();
|
|
1208
|
+
}
|
|
1209
|
+
ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
|
|
1210
|
+
}
|
|
1211
|
+
ghostEl = dragEl.cloneNode(true);
|
|
1212
|
+
toggleClass(ghostEl, options.ghostClass, false);
|
|
1213
|
+
toggleClass(ghostEl, options.fallbackClass, true);
|
|
1214
|
+
toggleClass(ghostEl, options.dragClass, true);
|
|
1215
|
+
css(ghostEl, "transition", "");
|
|
1216
|
+
css(ghostEl, "transform", "");
|
|
1217
|
+
css(ghostEl, "box-sizing", "border-box");
|
|
1218
|
+
css(ghostEl, "margin", 0);
|
|
1219
|
+
css(ghostEl, "top", rect.top);
|
|
1220
|
+
css(ghostEl, "left", rect.left);
|
|
1221
|
+
css(ghostEl, "width", rect.width);
|
|
1222
|
+
css(ghostEl, "height", rect.height);
|
|
1223
|
+
css(ghostEl, "opacity", "0.8");
|
|
1224
|
+
css(ghostEl, "position", PositionGhostAbsolutely ? "absolute" : "fixed");
|
|
1225
|
+
css(ghostEl, "zIndex", "100000");
|
|
1226
|
+
css(ghostEl, "pointerEvents", "none");
|
|
1227
|
+
Sortable.ghost = ghostEl;
|
|
1228
|
+
container.appendChild(ghostEl);
|
|
1229
|
+
css(ghostEl, "transform-origin", tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + "% " + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + "%");
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
1232
|
+
_onDragStart: function _onDragStart(evt, fallback) {
|
|
1233
|
+
var _this = this;
|
|
1234
|
+
var dataTransfer = evt.dataTransfer;
|
|
1235
|
+
var options = _this.options;
|
|
1236
|
+
pluginEvent2("dragStart", this, {
|
|
1237
|
+
evt
|
|
1238
|
+
});
|
|
1239
|
+
if (Sortable.eventCanceled) {
|
|
1240
|
+
this._onDrop();
|
|
1241
|
+
return;
|
|
1242
|
+
}
|
|
1243
|
+
pluginEvent2("setupClone", this);
|
|
1244
|
+
if (!Sortable.eventCanceled) {
|
|
1245
|
+
cloneEl = clone(dragEl);
|
|
1246
|
+
cloneEl.removeAttribute("id");
|
|
1247
|
+
cloneEl.draggable = false;
|
|
1248
|
+
cloneEl.style["will-change"] = "";
|
|
1249
|
+
this._hideClone();
|
|
1250
|
+
toggleClass(cloneEl, this.options.chosenClass, false);
|
|
1251
|
+
Sortable.clone = cloneEl;
|
|
1252
|
+
}
|
|
1253
|
+
_this.cloneId = _nextTick(function() {
|
|
1254
|
+
pluginEvent2("clone", _this);
|
|
1255
|
+
if (Sortable.eventCanceled) return;
|
|
1256
|
+
if (!_this.options.removeCloneOnHide) {
|
|
1257
|
+
rootEl.insertBefore(cloneEl, dragEl);
|
|
1258
|
+
}
|
|
1259
|
+
_this._hideClone();
|
|
1260
|
+
_dispatchEvent({
|
|
1261
|
+
sortable: _this,
|
|
1262
|
+
name: "clone"
|
|
1263
|
+
});
|
|
1264
|
+
});
|
|
1265
|
+
!fallback && toggleClass(dragEl, options.dragClass, true);
|
|
1266
|
+
if (fallback) {
|
|
1267
|
+
ignoreNextClick = true;
|
|
1268
|
+
_this._loopId = setInterval(_this._emulateDragOver, 50);
|
|
1269
|
+
} else {
|
|
1270
|
+
off(document, "mouseup", _this._onDrop);
|
|
1271
|
+
off(document, "touchend", _this._onDrop);
|
|
1272
|
+
off(document, "touchcancel", _this._onDrop);
|
|
1273
|
+
if (dataTransfer) {
|
|
1274
|
+
dataTransfer.effectAllowed = "move";
|
|
1275
|
+
options.setData && options.setData.call(_this, dataTransfer, dragEl);
|
|
1276
|
+
}
|
|
1277
|
+
on(document, "drop", _this);
|
|
1278
|
+
css(dragEl, "transform", "translateZ(0)");
|
|
1279
|
+
}
|
|
1280
|
+
awaitingDragStarted = true;
|
|
1281
|
+
_this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
|
|
1282
|
+
on(document, "selectstart", _this);
|
|
1283
|
+
moved = true;
|
|
1284
|
+
window.getSelection().removeAllRanges();
|
|
1285
|
+
if (Safari) {
|
|
1286
|
+
css(document.body, "user-select", "none");
|
|
1287
|
+
}
|
|
1288
|
+
},
|
|
1289
|
+
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1290
|
+
_onDragOver: function _onDragOver(evt) {
|
|
1291
|
+
var el = this.el, target = evt.target, dragRect, targetRect, revert, options = this.options, group = options.group, activeSortable = Sortable.active, isOwner = activeGroup === group, canSort = options.sort, fromSortable = putSortable || activeSortable, vertical, _this = this, completedFired = false;
|
|
1292
|
+
if (_silent) return;
|
|
1293
|
+
function dragOverEvent(name, extra) {
|
|
1294
|
+
pluginEvent2(name, _this, _objectSpread2({
|
|
1295
|
+
evt,
|
|
1296
|
+
isOwner,
|
|
1297
|
+
axis: vertical ? "vertical" : "horizontal",
|
|
1298
|
+
revert,
|
|
1299
|
+
dragRect,
|
|
1300
|
+
targetRect,
|
|
1301
|
+
canSort,
|
|
1302
|
+
fromSortable,
|
|
1303
|
+
target,
|
|
1304
|
+
completed,
|
|
1305
|
+
onMove: function onMove(target2, after2) {
|
|
1306
|
+
return _onMove(rootEl, el, dragEl, dragRect, target2, getRect(target2), evt, after2);
|
|
1307
|
+
},
|
|
1308
|
+
changed
|
|
1309
|
+
}, extra));
|
|
1310
|
+
}
|
|
1311
|
+
function capture() {
|
|
1312
|
+
dragOverEvent("dragOverAnimationCapture");
|
|
1313
|
+
_this.captureAnimationState();
|
|
1314
|
+
if (_this !== fromSortable) {
|
|
1315
|
+
fromSortable.captureAnimationState();
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
function completed(insertion) {
|
|
1319
|
+
dragOverEvent("dragOverCompleted", {
|
|
1320
|
+
insertion
|
|
1321
|
+
});
|
|
1322
|
+
if (insertion) {
|
|
1323
|
+
if (isOwner) {
|
|
1324
|
+
activeSortable._hideClone();
|
|
1325
|
+
} else {
|
|
1326
|
+
activeSortable._showClone(_this);
|
|
1327
|
+
}
|
|
1328
|
+
if (_this !== fromSortable) {
|
|
1329
|
+
toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
|
|
1330
|
+
toggleClass(dragEl, options.ghostClass, true);
|
|
1331
|
+
}
|
|
1332
|
+
if (putSortable !== _this && _this !== Sortable.active) {
|
|
1333
|
+
putSortable = _this;
|
|
1334
|
+
} else if (_this === Sortable.active && putSortable) {
|
|
1335
|
+
putSortable = null;
|
|
1336
|
+
}
|
|
1337
|
+
if (fromSortable === _this) {
|
|
1338
|
+
_this._ignoreWhileAnimating = target;
|
|
1339
|
+
}
|
|
1340
|
+
_this.animateAll(function() {
|
|
1341
|
+
dragOverEvent("dragOverAnimationComplete");
|
|
1342
|
+
_this._ignoreWhileAnimating = null;
|
|
1343
|
+
});
|
|
1344
|
+
if (_this !== fromSortable) {
|
|
1345
|
+
fromSortable.animateAll();
|
|
1346
|
+
fromSortable._ignoreWhileAnimating = null;
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
|
|
1350
|
+
lastTarget = null;
|
|
1351
|
+
}
|
|
1352
|
+
if (!options.dragoverBubble && !evt.rootEl && target !== document) {
|
|
1353
|
+
dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
|
|
1354
|
+
!insertion && nearestEmptyInsertDetectEvent(evt);
|
|
1355
|
+
}
|
|
1356
|
+
!options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
|
|
1357
|
+
return completedFired = true;
|
|
1358
|
+
}
|
|
1359
|
+
function changed() {
|
|
1360
|
+
newIndex = index(dragEl);
|
|
1361
|
+
newDraggableIndex = index(dragEl, options.draggable);
|
|
1362
|
+
_dispatchEvent({
|
|
1363
|
+
sortable: _this,
|
|
1364
|
+
name: "change",
|
|
1365
|
+
toEl: el,
|
|
1366
|
+
newIndex,
|
|
1367
|
+
newDraggableIndex,
|
|
1368
|
+
originalEvent: evt
|
|
1369
|
+
});
|
|
1370
|
+
}
|
|
1371
|
+
if (evt.preventDefault !== void 0) {
|
|
1372
|
+
evt.cancelable && evt.preventDefault();
|
|
1373
|
+
}
|
|
1374
|
+
target = closest(target, options.draggable, el, true);
|
|
1375
|
+
dragOverEvent("dragOver");
|
|
1376
|
+
if (Sortable.eventCanceled) return completedFired;
|
|
1377
|
+
if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
|
|
1378
|
+
return completed(false);
|
|
1379
|
+
}
|
|
1380
|
+
ignoreNextClick = false;
|
|
1381
|
+
if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
|
|
1382
|
+
vertical = this._getDirection(evt, target) === "vertical";
|
|
1383
|
+
dragRect = getRect(dragEl);
|
|
1384
|
+
dragOverEvent("dragOverValid");
|
|
1385
|
+
if (Sortable.eventCanceled) return completedFired;
|
|
1386
|
+
if (revert) {
|
|
1387
|
+
parentEl = rootEl;
|
|
1388
|
+
capture();
|
|
1389
|
+
this._hideClone();
|
|
1390
|
+
dragOverEvent("revert");
|
|
1391
|
+
if (!Sortable.eventCanceled) {
|
|
1392
|
+
if (nextEl) {
|
|
1393
|
+
rootEl.insertBefore(dragEl, nextEl);
|
|
1394
|
+
} else {
|
|
1395
|
+
rootEl.appendChild(dragEl);
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
return completed(true);
|
|
1399
|
+
}
|
|
1400
|
+
var elLastChild = lastChild(el, options.draggable);
|
|
1401
|
+
if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
|
|
1402
|
+
if (elLastChild === dragEl) {
|
|
1403
|
+
return completed(false);
|
|
1404
|
+
}
|
|
1405
|
+
if (elLastChild && el === evt.target) {
|
|
1406
|
+
target = elLastChild;
|
|
1407
|
+
}
|
|
1408
|
+
if (target) {
|
|
1409
|
+
targetRect = getRect(target);
|
|
1410
|
+
}
|
|
1411
|
+
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
|
|
1412
|
+
capture();
|
|
1413
|
+
if (elLastChild && elLastChild.nextSibling) {
|
|
1414
|
+
el.insertBefore(dragEl, elLastChild.nextSibling);
|
|
1415
|
+
} else {
|
|
1416
|
+
el.appendChild(dragEl);
|
|
1417
|
+
}
|
|
1418
|
+
parentEl = el;
|
|
1419
|
+
changed();
|
|
1420
|
+
return completed(true);
|
|
1421
|
+
}
|
|
1422
|
+
} else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
|
|
1423
|
+
var firstChild = getChild(el, 0, options, true);
|
|
1424
|
+
if (firstChild === dragEl) {
|
|
1425
|
+
return completed(false);
|
|
1426
|
+
}
|
|
1427
|
+
target = firstChild;
|
|
1428
|
+
targetRect = getRect(target);
|
|
1429
|
+
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
|
|
1430
|
+
capture();
|
|
1431
|
+
el.insertBefore(dragEl, firstChild);
|
|
1432
|
+
parentEl = el;
|
|
1433
|
+
changed();
|
|
1434
|
+
return completed(true);
|
|
1435
|
+
}
|
|
1436
|
+
} else if (target.parentNode === el) {
|
|
1437
|
+
targetRect = getRect(target);
|
|
1438
|
+
var direction = 0, targetBeforeFirstSwap, differentLevel = dragEl.parentNode !== el, differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical), side1 = vertical ? "top" : "left", scrolledPastTop = isScrolledPast(target, "top", "top") || isScrolledPast(dragEl, "top", "top"), scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
|
|
1439
|
+
if (lastTarget !== target) {
|
|
1440
|
+
targetBeforeFirstSwap = targetRect[side1];
|
|
1441
|
+
pastFirstInvertThresh = false;
|
|
1442
|
+
isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
|
|
1443
|
+
}
|
|
1444
|
+
direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
|
|
1445
|
+
var sibling;
|
|
1446
|
+
if (direction !== 0) {
|
|
1447
|
+
var dragIndex = index(dragEl);
|
|
1448
|
+
do {
|
|
1449
|
+
dragIndex -= direction;
|
|
1450
|
+
sibling = parentEl.children[dragIndex];
|
|
1451
|
+
} while (sibling && (css(sibling, "display") === "none" || sibling === ghostEl));
|
|
1452
|
+
}
|
|
1453
|
+
if (direction === 0 || sibling === target) {
|
|
1454
|
+
return completed(false);
|
|
1455
|
+
}
|
|
1456
|
+
lastTarget = target;
|
|
1457
|
+
lastDirection = direction;
|
|
1458
|
+
var nextSibling = target.nextElementSibling, after = false;
|
|
1459
|
+
after = direction === 1;
|
|
1460
|
+
var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
|
|
1461
|
+
if (moveVector !== false) {
|
|
1462
|
+
if (moveVector === 1 || moveVector === -1) {
|
|
1463
|
+
after = moveVector === 1;
|
|
1464
|
+
}
|
|
1465
|
+
_silent = true;
|
|
1466
|
+
setTimeout(_unsilent, 30);
|
|
1467
|
+
capture();
|
|
1468
|
+
if (after && !nextSibling) {
|
|
1469
|
+
el.appendChild(dragEl);
|
|
1470
|
+
} else {
|
|
1471
|
+
target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
|
|
1472
|
+
}
|
|
1473
|
+
if (scrolledPastTop) {
|
|
1474
|
+
scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
|
|
1475
|
+
}
|
|
1476
|
+
parentEl = dragEl.parentNode;
|
|
1477
|
+
if (targetBeforeFirstSwap !== void 0 && !isCircumstantialInvert) {
|
|
1478
|
+
targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
|
|
1479
|
+
}
|
|
1480
|
+
changed();
|
|
1481
|
+
return completed(true);
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
if (el.contains(dragEl)) {
|
|
1485
|
+
return completed(false);
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
return false;
|
|
1489
|
+
},
|
|
1490
|
+
_ignoreWhileAnimating: null,
|
|
1491
|
+
_offMoveEvents: function _offMoveEvents() {
|
|
1492
|
+
off(document, "mousemove", this._onTouchMove);
|
|
1493
|
+
off(document, "touchmove", this._onTouchMove);
|
|
1494
|
+
off(document, "pointermove", this._onTouchMove);
|
|
1495
|
+
off(document, "dragover", nearestEmptyInsertDetectEvent);
|
|
1496
|
+
off(document, "mousemove", nearestEmptyInsertDetectEvent);
|
|
1497
|
+
off(document, "touchmove", nearestEmptyInsertDetectEvent);
|
|
1498
|
+
},
|
|
1499
|
+
_offUpEvents: function _offUpEvents() {
|
|
1500
|
+
var ownerDocument = this.el.ownerDocument;
|
|
1501
|
+
off(ownerDocument, "mouseup", this._onDrop);
|
|
1502
|
+
off(ownerDocument, "touchend", this._onDrop);
|
|
1503
|
+
off(ownerDocument, "pointerup", this._onDrop);
|
|
1504
|
+
off(ownerDocument, "pointercancel", this._onDrop);
|
|
1505
|
+
off(ownerDocument, "touchcancel", this._onDrop);
|
|
1506
|
+
off(document, "selectstart", this);
|
|
1507
|
+
},
|
|
1508
|
+
_onDrop: function _onDrop(evt) {
|
|
1509
|
+
var el = this.el, options = this.options;
|
|
1510
|
+
newIndex = index(dragEl);
|
|
1511
|
+
newDraggableIndex = index(dragEl, options.draggable);
|
|
1512
|
+
pluginEvent2("drop", this, {
|
|
1513
|
+
evt
|
|
1514
|
+
});
|
|
1515
|
+
parentEl = dragEl && dragEl.parentNode;
|
|
1516
|
+
newIndex = index(dragEl);
|
|
1517
|
+
newDraggableIndex = index(dragEl, options.draggable);
|
|
1518
|
+
if (Sortable.eventCanceled) {
|
|
1519
|
+
this._nulling();
|
|
1520
|
+
return;
|
|
1521
|
+
}
|
|
1522
|
+
awaitingDragStarted = false;
|
|
1523
|
+
isCircumstantialInvert = false;
|
|
1524
|
+
pastFirstInvertThresh = false;
|
|
1525
|
+
clearInterval(this._loopId);
|
|
1526
|
+
clearTimeout(this._dragStartTimer);
|
|
1527
|
+
_cancelNextTick(this.cloneId);
|
|
1528
|
+
_cancelNextTick(this._dragStartId);
|
|
1529
|
+
if (this.nativeDraggable) {
|
|
1530
|
+
off(document, "drop", this);
|
|
1531
|
+
off(el, "dragstart", this._onDragStart);
|
|
1532
|
+
}
|
|
1533
|
+
this._offMoveEvents();
|
|
1534
|
+
this._offUpEvents();
|
|
1535
|
+
if (Safari) {
|
|
1536
|
+
css(document.body, "user-select", "");
|
|
1537
|
+
}
|
|
1538
|
+
css(dragEl, "transform", "");
|
|
1539
|
+
if (evt) {
|
|
1540
|
+
if (moved) {
|
|
1541
|
+
evt.cancelable && evt.preventDefault();
|
|
1542
|
+
!options.dropBubble && evt.stopPropagation();
|
|
1543
|
+
}
|
|
1544
|
+
ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
|
|
1545
|
+
if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== "clone") {
|
|
1546
|
+
cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
|
|
1547
|
+
}
|
|
1548
|
+
if (dragEl) {
|
|
1549
|
+
if (this.nativeDraggable) {
|
|
1550
|
+
off(dragEl, "dragend", this);
|
|
1551
|
+
}
|
|
1552
|
+
_disableDraggable(dragEl);
|
|
1553
|
+
dragEl.style["will-change"] = "";
|
|
1554
|
+
if (moved && !awaitingDragStarted) {
|
|
1555
|
+
toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
|
|
1556
|
+
}
|
|
1557
|
+
toggleClass(dragEl, this.options.chosenClass, false);
|
|
1558
|
+
_dispatchEvent({
|
|
1559
|
+
sortable: this,
|
|
1560
|
+
name: "unchoose",
|
|
1561
|
+
toEl: parentEl,
|
|
1562
|
+
newIndex: null,
|
|
1563
|
+
newDraggableIndex: null,
|
|
1564
|
+
originalEvent: evt
|
|
1565
|
+
});
|
|
1566
|
+
if (rootEl !== parentEl) {
|
|
1567
|
+
if (newIndex >= 0) {
|
|
1568
|
+
_dispatchEvent({
|
|
1569
|
+
rootEl: parentEl,
|
|
1570
|
+
name: "add",
|
|
1571
|
+
toEl: parentEl,
|
|
1572
|
+
fromEl: rootEl,
|
|
1573
|
+
originalEvent: evt
|
|
1574
|
+
});
|
|
1575
|
+
_dispatchEvent({
|
|
1576
|
+
sortable: this,
|
|
1577
|
+
name: "remove",
|
|
1578
|
+
toEl: parentEl,
|
|
1579
|
+
originalEvent: evt
|
|
1580
|
+
});
|
|
1581
|
+
_dispatchEvent({
|
|
1582
|
+
rootEl: parentEl,
|
|
1583
|
+
name: "sort",
|
|
1584
|
+
toEl: parentEl,
|
|
1585
|
+
fromEl: rootEl,
|
|
1586
|
+
originalEvent: evt
|
|
1587
|
+
});
|
|
1588
|
+
_dispatchEvent({
|
|
1589
|
+
sortable: this,
|
|
1590
|
+
name: "sort",
|
|
1591
|
+
toEl: parentEl,
|
|
1592
|
+
originalEvent: evt
|
|
1593
|
+
});
|
|
1594
|
+
}
|
|
1595
|
+
putSortable && putSortable.save();
|
|
1596
|
+
} else {
|
|
1597
|
+
if (newIndex !== oldIndex) {
|
|
1598
|
+
if (newIndex >= 0) {
|
|
1599
|
+
_dispatchEvent({
|
|
1600
|
+
sortable: this,
|
|
1601
|
+
name: "update",
|
|
1602
|
+
toEl: parentEl,
|
|
1603
|
+
originalEvent: evt
|
|
1604
|
+
});
|
|
1605
|
+
_dispatchEvent({
|
|
1606
|
+
sortable: this,
|
|
1607
|
+
name: "sort",
|
|
1608
|
+
toEl: parentEl,
|
|
1609
|
+
originalEvent: evt
|
|
1610
|
+
});
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
if (Sortable.active) {
|
|
1615
|
+
if (newIndex == null || newIndex === -1) {
|
|
1616
|
+
newIndex = oldIndex;
|
|
1617
|
+
newDraggableIndex = oldDraggableIndex;
|
|
1618
|
+
}
|
|
1619
|
+
_dispatchEvent({
|
|
1620
|
+
sortable: this,
|
|
1621
|
+
name: "end",
|
|
1622
|
+
toEl: parentEl,
|
|
1623
|
+
originalEvent: evt
|
|
1624
|
+
});
|
|
1625
|
+
this.save();
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
this._nulling();
|
|
1630
|
+
},
|
|
1631
|
+
_nulling: function _nulling() {
|
|
1632
|
+
pluginEvent2("nulling", this);
|
|
1633
|
+
rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
|
|
1634
|
+
savedInputChecked.forEach(function(el) {
|
|
1635
|
+
el.checked = true;
|
|
1636
|
+
});
|
|
1637
|
+
savedInputChecked.length = lastDx = lastDy = 0;
|
|
1638
|
+
},
|
|
1639
|
+
handleEvent: function handleEvent(evt) {
|
|
1640
|
+
switch (evt.type) {
|
|
1641
|
+
case "drop":
|
|
1642
|
+
case "dragend":
|
|
1643
|
+
this._onDrop(evt);
|
|
1644
|
+
break;
|
|
1645
|
+
case "dragenter":
|
|
1646
|
+
case "dragover":
|
|
1647
|
+
if (dragEl) {
|
|
1648
|
+
this._onDragOver(evt);
|
|
1649
|
+
_globalDragOver(evt);
|
|
1650
|
+
}
|
|
1651
|
+
break;
|
|
1652
|
+
case "selectstart":
|
|
1653
|
+
evt.preventDefault();
|
|
1654
|
+
break;
|
|
1655
|
+
}
|
|
1656
|
+
},
|
|
1657
|
+
/**
|
|
1658
|
+
* Serializes the item into an array of string.
|
|
1659
|
+
* @returns {String[]}
|
|
1660
|
+
*/
|
|
1661
|
+
toArray: function toArray() {
|
|
1662
|
+
var order = [], el, children = this.el.children, i = 0, n = children.length, options = this.options;
|
|
1663
|
+
for (; i < n; i++) {
|
|
1664
|
+
el = children[i];
|
|
1665
|
+
if (closest(el, options.draggable, this.el, false)) {
|
|
1666
|
+
order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
return order;
|
|
1670
|
+
},
|
|
1671
|
+
/**
|
|
1672
|
+
* Sorts the elements according to the array.
|
|
1673
|
+
* @param {String[]} order order of the items
|
|
1674
|
+
*/
|
|
1675
|
+
sort: function sort(order, useAnimation) {
|
|
1676
|
+
var items = {}, rootEl2 = this.el;
|
|
1677
|
+
this.toArray().forEach(function(id, i) {
|
|
1678
|
+
var el = rootEl2.children[i];
|
|
1679
|
+
if (closest(el, this.options.draggable, rootEl2, false)) {
|
|
1680
|
+
items[id] = el;
|
|
1681
|
+
}
|
|
1682
|
+
}, this);
|
|
1683
|
+
useAnimation && this.captureAnimationState();
|
|
1684
|
+
order.forEach(function(id) {
|
|
1685
|
+
if (items[id]) {
|
|
1686
|
+
rootEl2.removeChild(items[id]);
|
|
1687
|
+
rootEl2.appendChild(items[id]);
|
|
1688
|
+
}
|
|
1689
|
+
});
|
|
1690
|
+
useAnimation && this.animateAll();
|
|
1691
|
+
},
|
|
1692
|
+
/**
|
|
1693
|
+
* Save the current sorting
|
|
1694
|
+
*/
|
|
1695
|
+
save: function save() {
|
|
1696
|
+
var store = this.options.store;
|
|
1697
|
+
store && store.set && store.set(this);
|
|
1698
|
+
},
|
|
1699
|
+
/**
|
|
1700
|
+
* 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.
|
|
1701
|
+
* @param {HTMLElement} el
|
|
1702
|
+
* @param {String} [selector] default: `options.draggable`
|
|
1703
|
+
* @returns {HTMLElement|null}
|
|
1704
|
+
*/
|
|
1705
|
+
closest: function closest$1(el, selector) {
|
|
1706
|
+
return closest(el, selector || this.options.draggable, this.el, false);
|
|
1707
|
+
},
|
|
1708
|
+
/**
|
|
1709
|
+
* Set/get option
|
|
1710
|
+
* @param {string} name
|
|
1711
|
+
* @param {*} [value]
|
|
1712
|
+
* @returns {*}
|
|
1713
|
+
*/
|
|
1714
|
+
option: function option(name, value) {
|
|
1715
|
+
var options = this.options;
|
|
1716
|
+
if (value === void 0) {
|
|
1717
|
+
return options[name];
|
|
1718
|
+
} else {
|
|
1719
|
+
var modifiedValue = PluginManager.modifyOption(this, name, value);
|
|
1720
|
+
if (typeof modifiedValue !== "undefined") {
|
|
1721
|
+
options[name] = modifiedValue;
|
|
1722
|
+
} else {
|
|
1723
|
+
options[name] = value;
|
|
1724
|
+
}
|
|
1725
|
+
if (name === "group") {
|
|
1726
|
+
_prepareGroup(options);
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1730
|
+
/**
|
|
1731
|
+
* Destroy
|
|
1732
|
+
*/
|
|
1733
|
+
destroy: function destroy() {
|
|
1734
|
+
pluginEvent2("destroy", this);
|
|
1735
|
+
var el = this.el;
|
|
1736
|
+
el[expando] = null;
|
|
1737
|
+
off(el, "mousedown", this._onTapStart);
|
|
1738
|
+
off(el, "touchstart", this._onTapStart);
|
|
1739
|
+
off(el, "pointerdown", this._onTapStart);
|
|
1740
|
+
if (this.nativeDraggable) {
|
|
1741
|
+
off(el, "dragover", this);
|
|
1742
|
+
off(el, "dragenter", this);
|
|
1743
|
+
}
|
|
1744
|
+
Array.prototype.forEach.call(el.querySelectorAll("[draggable]"), function(el2) {
|
|
1745
|
+
el2.removeAttribute("draggable");
|
|
1746
|
+
});
|
|
1747
|
+
this._onDrop();
|
|
1748
|
+
this._disableDelayedDragEvents();
|
|
1749
|
+
sortables.splice(sortables.indexOf(this.el), 1);
|
|
1750
|
+
this.el = el = null;
|
|
1751
|
+
},
|
|
1752
|
+
_hideClone: function _hideClone() {
|
|
1753
|
+
if (!cloneHidden) {
|
|
1754
|
+
pluginEvent2("hideClone", this);
|
|
1755
|
+
if (Sortable.eventCanceled) return;
|
|
1756
|
+
css(cloneEl, "display", "none");
|
|
1757
|
+
if (this.options.removeCloneOnHide && cloneEl.parentNode) {
|
|
1758
|
+
cloneEl.parentNode.removeChild(cloneEl);
|
|
1759
|
+
}
|
|
1760
|
+
cloneHidden = true;
|
|
1761
|
+
}
|
|
1762
|
+
},
|
|
1763
|
+
_showClone: function _showClone(putSortable2) {
|
|
1764
|
+
if (putSortable2.lastPutMode !== "clone") {
|
|
1765
|
+
this._hideClone();
|
|
1766
|
+
return;
|
|
1767
|
+
}
|
|
1768
|
+
if (cloneHidden) {
|
|
1769
|
+
pluginEvent2("showClone", this);
|
|
1770
|
+
if (Sortable.eventCanceled) return;
|
|
1771
|
+
if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
|
|
1772
|
+
rootEl.insertBefore(cloneEl, dragEl);
|
|
1773
|
+
} else if (nextEl) {
|
|
1774
|
+
rootEl.insertBefore(cloneEl, nextEl);
|
|
1775
|
+
} else {
|
|
1776
|
+
rootEl.appendChild(cloneEl);
|
|
1777
|
+
}
|
|
1778
|
+
if (this.options.group.revertClone) {
|
|
1779
|
+
this.animate(dragEl, cloneEl);
|
|
1780
|
+
}
|
|
1781
|
+
css(cloneEl, "display", "");
|
|
1782
|
+
cloneHidden = false;
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
};
|
|
1786
|
+
function _globalDragOver(evt) {
|
|
1787
|
+
if (evt.dataTransfer) {
|
|
1788
|
+
evt.dataTransfer.dropEffect = "move";
|
|
1789
|
+
}
|
|
1790
|
+
evt.cancelable && evt.preventDefault();
|
|
1791
|
+
}
|
|
1792
|
+
function _onMove(fromEl, toEl, dragEl2, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
|
|
1793
|
+
var evt, sortable = fromEl[expando], onMoveFn = sortable.options.onMove, retVal;
|
|
1794
|
+
if (window.CustomEvent && !IE11OrLess && !Edge) {
|
|
1795
|
+
evt = new CustomEvent("move", {
|
|
1796
|
+
bubbles: true,
|
|
1797
|
+
cancelable: true
|
|
1798
|
+
});
|
|
1799
|
+
} else {
|
|
1800
|
+
evt = document.createEvent("Event");
|
|
1801
|
+
evt.initEvent("move", true, true);
|
|
1802
|
+
}
|
|
1803
|
+
evt.to = toEl;
|
|
1804
|
+
evt.from = fromEl;
|
|
1805
|
+
evt.dragged = dragEl2;
|
|
1806
|
+
evt.draggedRect = dragRect;
|
|
1807
|
+
evt.related = targetEl || toEl;
|
|
1808
|
+
evt.relatedRect = targetRect || getRect(toEl);
|
|
1809
|
+
evt.willInsertAfter = willInsertAfter;
|
|
1810
|
+
evt.originalEvent = originalEvent;
|
|
1811
|
+
fromEl.dispatchEvent(evt);
|
|
1812
|
+
if (onMoveFn) {
|
|
1813
|
+
retVal = onMoveFn.call(sortable, evt, originalEvent);
|
|
1814
|
+
}
|
|
1815
|
+
return retVal;
|
|
1816
|
+
}
|
|
1817
|
+
function _disableDraggable(el) {
|
|
1818
|
+
el.draggable = false;
|
|
1819
|
+
}
|
|
1820
|
+
function _unsilent() {
|
|
1821
|
+
_silent = false;
|
|
1822
|
+
}
|
|
1823
|
+
function _ghostIsFirst(evt, vertical, sortable) {
|
|
1824
|
+
var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));
|
|
1825
|
+
var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
|
|
1826
|
+
var spacer = 10;
|
|
1827
|
+
return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;
|
|
1828
|
+
}
|
|
1829
|
+
function _ghostIsLast(evt, vertical, sortable) {
|
|
1830
|
+
var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));
|
|
1831
|
+
var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
|
|
1832
|
+
var spacer = 10;
|
|
1833
|
+
return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;
|
|
1834
|
+
}
|
|
1835
|
+
function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
|
|
1836
|
+
var mouseOnAxis = vertical ? evt.clientY : evt.clientX, targetLength = vertical ? targetRect.height : targetRect.width, targetS1 = vertical ? targetRect.top : targetRect.left, targetS2 = vertical ? targetRect.bottom : targetRect.right, invert = false;
|
|
1837
|
+
if (!invertSwap) {
|
|
1838
|
+
if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
|
|
1839
|
+
if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
|
|
1840
|
+
pastFirstInvertThresh = true;
|
|
1841
|
+
}
|
|
1842
|
+
if (!pastFirstInvertThresh) {
|
|
1843
|
+
if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance : mouseOnAxis > targetS2 - targetMoveDistance) {
|
|
1844
|
+
return -lastDirection;
|
|
1845
|
+
}
|
|
1846
|
+
} else {
|
|
1847
|
+
invert = true;
|
|
1848
|
+
}
|
|
1849
|
+
} else {
|
|
1850
|
+
if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
|
|
1851
|
+
return _getInsertDirection(target);
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
invert = invert || invertSwap;
|
|
1856
|
+
if (invert) {
|
|
1857
|
+
if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
|
|
1858
|
+
return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
return 0;
|
|
1862
|
+
}
|
|
1863
|
+
function _getInsertDirection(target) {
|
|
1864
|
+
if (index(dragEl) < index(target)) {
|
|
1865
|
+
return 1;
|
|
1866
|
+
} else {
|
|
1867
|
+
return -1;
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
function _generateId(el) {
|
|
1871
|
+
var str = el.tagName + el.className + el.src + el.href + el.textContent, i = str.length, sum = 0;
|
|
1872
|
+
while (i--) {
|
|
1873
|
+
sum += str.charCodeAt(i);
|
|
1874
|
+
}
|
|
1875
|
+
return sum.toString(36);
|
|
1876
|
+
}
|
|
1877
|
+
function _saveInputCheckedState(root) {
|
|
1878
|
+
savedInputChecked.length = 0;
|
|
1879
|
+
var inputs = root.getElementsByTagName("input");
|
|
1880
|
+
var idx = inputs.length;
|
|
1881
|
+
while (idx--) {
|
|
1882
|
+
var el = inputs[idx];
|
|
1883
|
+
el.checked && savedInputChecked.push(el);
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
function _nextTick(fn) {
|
|
1887
|
+
return setTimeout(fn, 0);
|
|
1888
|
+
}
|
|
1889
|
+
function _cancelNextTick(id) {
|
|
1890
|
+
return clearTimeout(id);
|
|
1891
|
+
}
|
|
1892
|
+
if (documentExists) {
|
|
1893
|
+
on(document, "touchmove", function(evt) {
|
|
1894
|
+
if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
|
|
1895
|
+
evt.preventDefault();
|
|
1896
|
+
}
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1899
|
+
Sortable.utils = {
|
|
1900
|
+
on,
|
|
1901
|
+
off,
|
|
1902
|
+
css,
|
|
1903
|
+
find,
|
|
1904
|
+
is: function is(el, selector) {
|
|
1905
|
+
return !!closest(el, selector, el, false);
|
|
1906
|
+
},
|
|
1907
|
+
extend,
|
|
1908
|
+
throttle,
|
|
1909
|
+
closest,
|
|
1910
|
+
toggleClass,
|
|
1911
|
+
clone,
|
|
1912
|
+
index,
|
|
1913
|
+
nextTick: _nextTick,
|
|
1914
|
+
cancelNextTick: _cancelNextTick,
|
|
1915
|
+
detectDirection: _detectDirection,
|
|
1916
|
+
getChild,
|
|
1917
|
+
expando
|
|
1918
|
+
};
|
|
1919
|
+
Sortable.get = function(element) {
|
|
1920
|
+
return element[expando];
|
|
1921
|
+
};
|
|
1922
|
+
Sortable.mount = function() {
|
|
1923
|
+
for (var _len = arguments.length, plugins2 = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1924
|
+
plugins2[_key] = arguments[_key];
|
|
1925
|
+
}
|
|
1926
|
+
if (plugins2[0].constructor === Array) plugins2 = plugins2[0];
|
|
1927
|
+
plugins2.forEach(function(plugin) {
|
|
1928
|
+
if (!plugin.prototype || !plugin.prototype.constructor) {
|
|
1929
|
+
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
|
|
1930
|
+
}
|
|
1931
|
+
if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
|
|
1932
|
+
PluginManager.mount(plugin);
|
|
1933
|
+
});
|
|
1934
|
+
};
|
|
1935
|
+
Sortable.create = function(el, options) {
|
|
1936
|
+
return new Sortable(el, options);
|
|
1937
|
+
};
|
|
1938
|
+
Sortable.version = version;
|
|
1939
|
+
var autoScrolls = [], scrollEl, scrollRootEl, scrolling = false, lastAutoScrollX, lastAutoScrollY, touchEvt$1, pointerElemChangedInterval;
|
|
1940
|
+
function AutoScrollPlugin() {
|
|
1941
|
+
function AutoScroll() {
|
|
1942
|
+
this.defaults = {
|
|
1943
|
+
scroll: true,
|
|
1944
|
+
forceAutoScrollFallback: false,
|
|
1945
|
+
scrollSensitivity: 30,
|
|
1946
|
+
scrollSpeed: 10,
|
|
1947
|
+
bubbleScroll: true
|
|
1948
|
+
};
|
|
1949
|
+
for (var fn in this) {
|
|
1950
|
+
if (fn.charAt(0) === "_" && typeof this[fn] === "function") {
|
|
1951
|
+
this[fn] = this[fn].bind(this);
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
AutoScroll.prototype = {
|
|
1956
|
+
dragStarted: function dragStarted(_ref) {
|
|
1957
|
+
var originalEvent = _ref.originalEvent;
|
|
1958
|
+
if (this.sortable.nativeDraggable) {
|
|
1959
|
+
on(document, "dragover", this._handleAutoScroll);
|
|
1960
|
+
} else {
|
|
1961
|
+
if (this.options.supportPointer) {
|
|
1962
|
+
on(document, "pointermove", this._handleFallbackAutoScroll);
|
|
1963
|
+
} else if (originalEvent.touches) {
|
|
1964
|
+
on(document, "touchmove", this._handleFallbackAutoScroll);
|
|
1965
|
+
} else {
|
|
1966
|
+
on(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
},
|
|
1970
|
+
dragOverCompleted: function dragOverCompleted(_ref2) {
|
|
1971
|
+
var originalEvent = _ref2.originalEvent;
|
|
1972
|
+
if (!this.options.dragOverBubble && !originalEvent.rootEl) {
|
|
1973
|
+
this._handleAutoScroll(originalEvent);
|
|
1974
|
+
}
|
|
1975
|
+
},
|
|
1976
|
+
drop: function drop3() {
|
|
1977
|
+
if (this.sortable.nativeDraggable) {
|
|
1978
|
+
off(document, "dragover", this._handleAutoScroll);
|
|
1979
|
+
} else {
|
|
1980
|
+
off(document, "pointermove", this._handleFallbackAutoScroll);
|
|
1981
|
+
off(document, "touchmove", this._handleFallbackAutoScroll);
|
|
1982
|
+
off(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1983
|
+
}
|
|
1984
|
+
clearPointerElemChangedInterval();
|
|
1985
|
+
clearAutoScrolls();
|
|
1986
|
+
cancelThrottle();
|
|
1987
|
+
},
|
|
1988
|
+
nulling: function nulling() {
|
|
1989
|
+
touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
|
|
1990
|
+
autoScrolls.length = 0;
|
|
1991
|
+
},
|
|
1992
|
+
_handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
|
|
1993
|
+
this._handleAutoScroll(evt, true);
|
|
1994
|
+
},
|
|
1995
|
+
_handleAutoScroll: function _handleAutoScroll(evt, fallback) {
|
|
1996
|
+
var _this = this;
|
|
1997
|
+
var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, elem = document.elementFromPoint(x, y);
|
|
1998
|
+
touchEvt$1 = evt;
|
|
1999
|
+
if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
|
|
2000
|
+
autoScroll(evt, this.options, elem, fallback);
|
|
2001
|
+
var ogElemScroller = getParentAutoScrollElement(elem, true);
|
|
2002
|
+
if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
|
|
2003
|
+
pointerElemChangedInterval && clearPointerElemChangedInterval();
|
|
2004
|
+
pointerElemChangedInterval = setInterval(function() {
|
|
2005
|
+
var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
|
|
2006
|
+
if (newElem !== ogElemScroller) {
|
|
2007
|
+
ogElemScroller = newElem;
|
|
2008
|
+
clearAutoScrolls();
|
|
2009
|
+
}
|
|
2010
|
+
autoScroll(evt, _this.options, newElem, fallback);
|
|
2011
|
+
}, 10);
|
|
2012
|
+
lastAutoScrollX = x;
|
|
2013
|
+
lastAutoScrollY = y;
|
|
2014
|
+
}
|
|
2015
|
+
} else {
|
|
2016
|
+
if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
|
|
2017
|
+
clearAutoScrolls();
|
|
2018
|
+
return;
|
|
2019
|
+
}
|
|
2020
|
+
autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
};
|
|
2024
|
+
return _extends(AutoScroll, {
|
|
2025
|
+
pluginName: "scroll",
|
|
2026
|
+
initializeByDefault: true
|
|
2027
|
+
});
|
|
2028
|
+
}
|
|
2029
|
+
function clearAutoScrolls() {
|
|
2030
|
+
autoScrolls.forEach(function(autoScroll2) {
|
|
2031
|
+
clearInterval(autoScroll2.pid);
|
|
2032
|
+
});
|
|
2033
|
+
autoScrolls = [];
|
|
2034
|
+
}
|
|
2035
|
+
function clearPointerElemChangedInterval() {
|
|
2036
|
+
clearInterval(pointerElemChangedInterval);
|
|
2037
|
+
}
|
|
2038
|
+
var autoScroll = throttle(function(evt, options, rootEl2, isFallback) {
|
|
2039
|
+
if (!options.scroll) return;
|
|
2040
|
+
var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, sens = options.scrollSensitivity, speed = options.scrollSpeed, winScroller = getWindowScrollingElement();
|
|
2041
|
+
var scrollThisInstance = false, scrollCustomFn;
|
|
2042
|
+
if (scrollRootEl !== rootEl2) {
|
|
2043
|
+
scrollRootEl = rootEl2;
|
|
2044
|
+
clearAutoScrolls();
|
|
2045
|
+
scrollEl = options.scroll;
|
|
2046
|
+
scrollCustomFn = options.scrollFn;
|
|
2047
|
+
if (scrollEl === true) {
|
|
2048
|
+
scrollEl = getParentAutoScrollElement(rootEl2, true);
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
var layersOut = 0;
|
|
2052
|
+
var currentParent = scrollEl;
|
|
2053
|
+
do {
|
|
2054
|
+
var el = currentParent, rect = getRect(el), top = rect.top, bottom = rect.bottom, left = rect.left, right = rect.right, width = rect.width, height = rect.height, canScrollX = void 0, canScrollY = void 0, scrollWidth = el.scrollWidth, scrollHeight = el.scrollHeight, elCSS = css(el), scrollPosX = el.scrollLeft, scrollPosY = el.scrollTop;
|
|
2055
|
+
if (el === winScroller) {
|
|
2056
|
+
canScrollX = width < scrollWidth && (elCSS.overflowX === "auto" || elCSS.overflowX === "scroll" || elCSS.overflowX === "visible");
|
|
2057
|
+
canScrollY = height < scrollHeight && (elCSS.overflowY === "auto" || elCSS.overflowY === "scroll" || elCSS.overflowY === "visible");
|
|
2058
|
+
} else {
|
|
2059
|
+
canScrollX = width < scrollWidth && (elCSS.overflowX === "auto" || elCSS.overflowX === "scroll");
|
|
2060
|
+
canScrollY = height < scrollHeight && (elCSS.overflowY === "auto" || elCSS.overflowY === "scroll");
|
|
2061
|
+
}
|
|
2062
|
+
var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
|
|
2063
|
+
var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
|
|
2064
|
+
if (!autoScrolls[layersOut]) {
|
|
2065
|
+
for (var i = 0; i <= layersOut; i++) {
|
|
2066
|
+
if (!autoScrolls[i]) {
|
|
2067
|
+
autoScrolls[i] = {};
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
|
|
2072
|
+
autoScrolls[layersOut].el = el;
|
|
2073
|
+
autoScrolls[layersOut].vx = vx;
|
|
2074
|
+
autoScrolls[layersOut].vy = vy;
|
|
2075
|
+
clearInterval(autoScrolls[layersOut].pid);
|
|
2076
|
+
if (vx != 0 || vy != 0) {
|
|
2077
|
+
scrollThisInstance = true;
|
|
2078
|
+
autoScrolls[layersOut].pid = setInterval((function() {
|
|
2079
|
+
if (isFallback && this.layer === 0) {
|
|
2080
|
+
Sortable.active._onTouchMove(touchEvt$1);
|
|
2081
|
+
}
|
|
2082
|
+
var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
|
|
2083
|
+
var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
|
|
2084
|
+
if (typeof scrollCustomFn === "function") {
|
|
2085
|
+
if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== "continue") {
|
|
2086
|
+
return;
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
|
|
2090
|
+
}).bind({
|
|
2091
|
+
layer: layersOut
|
|
2092
|
+
}), 24);
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
layersOut++;
|
|
2096
|
+
} while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
|
|
2097
|
+
scrolling = scrollThisInstance;
|
|
2098
|
+
}, 30);
|
|
2099
|
+
var drop = function drop2(_ref) {
|
|
2100
|
+
var originalEvent = _ref.originalEvent, putSortable2 = _ref.putSortable, dragEl2 = _ref.dragEl, activeSortable = _ref.activeSortable, dispatchSortableEvent = _ref.dispatchSortableEvent, hideGhostForTarget = _ref.hideGhostForTarget, unhideGhostForTarget = _ref.unhideGhostForTarget;
|
|
2101
|
+
if (!originalEvent) return;
|
|
2102
|
+
var toSortable = putSortable2 || activeSortable;
|
|
2103
|
+
hideGhostForTarget();
|
|
2104
|
+
var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
|
|
2105
|
+
var target = document.elementFromPoint(touch.clientX, touch.clientY);
|
|
2106
|
+
unhideGhostForTarget();
|
|
2107
|
+
if (toSortable && !toSortable.el.contains(target)) {
|
|
2108
|
+
dispatchSortableEvent("spill");
|
|
2109
|
+
this.onSpill({
|
|
2110
|
+
dragEl: dragEl2,
|
|
2111
|
+
putSortable: putSortable2
|
|
2112
|
+
});
|
|
2113
|
+
}
|
|
2114
|
+
};
|
|
2115
|
+
function Revert() {
|
|
2116
|
+
}
|
|
2117
|
+
Revert.prototype = {
|
|
2118
|
+
startIndex: null,
|
|
2119
|
+
dragStart: function dragStart(_ref2) {
|
|
2120
|
+
var oldDraggableIndex2 = _ref2.oldDraggableIndex;
|
|
2121
|
+
this.startIndex = oldDraggableIndex2;
|
|
2122
|
+
},
|
|
2123
|
+
onSpill: function onSpill(_ref3) {
|
|
2124
|
+
var dragEl2 = _ref3.dragEl, putSortable2 = _ref3.putSortable;
|
|
2125
|
+
this.sortable.captureAnimationState();
|
|
2126
|
+
if (putSortable2) {
|
|
2127
|
+
putSortable2.captureAnimationState();
|
|
2128
|
+
}
|
|
2129
|
+
var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
|
|
2130
|
+
if (nextSibling) {
|
|
2131
|
+
this.sortable.el.insertBefore(dragEl2, nextSibling);
|
|
2132
|
+
} else {
|
|
2133
|
+
this.sortable.el.appendChild(dragEl2);
|
|
2134
|
+
}
|
|
2135
|
+
this.sortable.animateAll();
|
|
2136
|
+
if (putSortable2) {
|
|
2137
|
+
putSortable2.animateAll();
|
|
2138
|
+
}
|
|
2139
|
+
},
|
|
2140
|
+
drop
|
|
2141
|
+
};
|
|
2142
|
+
_extends(Revert, {
|
|
2143
|
+
pluginName: "revertOnSpill"
|
|
2144
|
+
});
|
|
2145
|
+
function Remove() {
|
|
2146
|
+
}
|
|
2147
|
+
Remove.prototype = {
|
|
2148
|
+
onSpill: function onSpill2(_ref4) {
|
|
2149
|
+
var dragEl2 = _ref4.dragEl, putSortable2 = _ref4.putSortable;
|
|
2150
|
+
var parentSortable = putSortable2 || this.sortable;
|
|
2151
|
+
parentSortable.captureAnimationState();
|
|
2152
|
+
dragEl2.parentNode && dragEl2.parentNode.removeChild(dragEl2);
|
|
2153
|
+
parentSortable.animateAll();
|
|
2154
|
+
},
|
|
2155
|
+
drop
|
|
2156
|
+
};
|
|
2157
|
+
_extends(Remove, {
|
|
2158
|
+
pluginName: "removeOnSpill"
|
|
2159
|
+
});
|
|
2160
|
+
Sortable.mount(new AutoScrollPlugin());
|
|
2161
|
+
Sortable.mount(Remove, Revert);
|
|
2162
|
+
const _hoisted_1 = ["data-url", "onContextmenu", "onMousedown", "onClick"];
|
|
2163
|
+
const _hoisted_2 = {
|
|
2164
|
+
key: 0,
|
|
2165
|
+
class: "iconfont icon-webicon318 layout-navbars-tagsview-ul-li-iconfont"
|
|
2166
|
+
};
|
|
2167
|
+
const __default__ = defineComponent({
|
|
2168
|
+
name: "layoutTagsView"
|
|
2169
|
+
});
|
|
2170
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
2171
|
+
...__default__,
|
|
2172
|
+
setup(__props) {
|
|
2173
|
+
const Contextmenu = defineAsyncComponent(() => import("./contextmenu-Dsu2_hDI.mjs"));
|
|
2174
|
+
const tagsRefs = ref([]);
|
|
2175
|
+
const scrollbarRef = ref();
|
|
2176
|
+
const contextmenuRef = ref();
|
|
2177
|
+
const tagsUlRef = ref();
|
|
2178
|
+
const stores = useTagsViewRoutes();
|
|
2179
|
+
const storesThemeConfig = useThemeConfig();
|
|
2180
|
+
const storesTagsViewRoutes = useTagsViewRoutes();
|
|
2181
|
+
const storesRoutesList = useRoutesList();
|
|
2182
|
+
const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
2183
|
+
const { tagsViewRoutes } = storeToRefs(storesTagsViewRoutes);
|
|
2184
|
+
const { routesList } = storeToRefs(storesRoutesList);
|
|
2185
|
+
const storesKeepALiveNames = useKeepALiveNames();
|
|
2186
|
+
const route = useRoute();
|
|
2187
|
+
const router = useRouter();
|
|
2188
|
+
const state = reactive({
|
|
2189
|
+
routeActive: "",
|
|
2190
|
+
routePath: route.path,
|
|
2191
|
+
dropdown: { x: "", y: "" },
|
|
2192
|
+
sortable: "",
|
|
2193
|
+
tagsRefsIndex: 0,
|
|
2194
|
+
tagsViewList: [],
|
|
2195
|
+
tagsViewRoutesList: []
|
|
2196
|
+
});
|
|
2197
|
+
const setTagsStyle = computed(() => {
|
|
2198
|
+
return themeConfig.value.tagsStyle;
|
|
2199
|
+
});
|
|
2200
|
+
const getThemeConfig = computed(() => {
|
|
2201
|
+
return themeConfig.value;
|
|
2202
|
+
});
|
|
2203
|
+
const setTagsViewNameI18n = computed(() => {
|
|
2204
|
+
return (v) => {
|
|
2205
|
+
return other.setTagsViewNameI18n(v);
|
|
2206
|
+
};
|
|
2207
|
+
});
|
|
2208
|
+
const isActive = (v) => {
|
|
2209
|
+
if (getThemeConfig.value.isShareTagsView) {
|
|
2210
|
+
return v.path === state.routePath;
|
|
2211
|
+
} else {
|
|
2212
|
+
if (v.query && Object.keys(v.query).length || v.params && Object.keys(v.params).length) {
|
|
2213
|
+
return v.url ? v.url === state.routeActive : v.path === state.routeActive;
|
|
2214
|
+
} else {
|
|
2215
|
+
return v.path === state.routePath;
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
};
|
|
2219
|
+
const addBrowserSetSession = (tagsViewList) => {
|
|
2220
|
+
Session.set("tagsViewList", tagsViewList);
|
|
2221
|
+
};
|
|
2222
|
+
const setTagsViewHighlight = (v) => {
|
|
2223
|
+
var _a;
|
|
2224
|
+
let params = v.query && Object.keys(v.query).length > 0 ? v.query : v.params;
|
|
2225
|
+
if (!params || Object.keys(params).length <= 0) return v.path;
|
|
2226
|
+
let path = "";
|
|
2227
|
+
for (let i in params) {
|
|
2228
|
+
path += params[i];
|
|
2229
|
+
}
|
|
2230
|
+
return `${((_a = v.meta) == null ? void 0 : _a.isDynamic) ? v.meta.isDynamicPath : v.path}-${path}`;
|
|
2231
|
+
};
|
|
2232
|
+
const solveAddTagsView = async (path, to) => {
|
|
2233
|
+
var _a, _b;
|
|
2234
|
+
let isDynamicPath = ((_a = to == null ? void 0 : to.meta) == null ? void 0 : _a.isDynamic) ? to.meta.isDynamicPath : path;
|
|
2235
|
+
let current = state.tagsViewList.filter(
|
|
2236
|
+
(v) => {
|
|
2237
|
+
var _a2, _b2;
|
|
2238
|
+
return v.path === isDynamicPath && isObjectValueEqual(
|
|
2239
|
+
((_a2 = to == null ? void 0 : to.meta) == null ? void 0 : _a2.isDynamic) ? v.params ? v.params : null : v.query ? v.query : null,
|
|
2240
|
+
((_b2 = to == null ? void 0 : to.meta) == null ? void 0 : _b2.isDynamic) ? (to == null ? void 0 : to.params) ? to == null ? void 0 : to.params : null : (to == null ? void 0 : to.query) ? to == null ? void 0 : to.query : null
|
|
2241
|
+
);
|
|
2242
|
+
}
|
|
2243
|
+
);
|
|
2244
|
+
if (current.length <= 0) {
|
|
2245
|
+
let findItem = state.tagsViewRoutesList.find((v) => v.path === isDynamicPath);
|
|
2246
|
+
if (!findItem) return false;
|
|
2247
|
+
if (findItem.meta.isAffix) return false;
|
|
2248
|
+
if (findItem.meta.isLink && !findItem.meta.isIframe) return false;
|
|
2249
|
+
((_b = to == null ? void 0 : to.meta) == null ? void 0 : _b.isDynamic) ? findItem.params = to.params : findItem.query = to == null ? void 0 : to.query;
|
|
2250
|
+
findItem.url = setTagsViewHighlight(findItem);
|
|
2251
|
+
state.tagsViewList.push({ ...findItem });
|
|
2252
|
+
addBrowserSetSession(state.tagsViewList);
|
|
2253
|
+
}
|
|
2254
|
+
};
|
|
2255
|
+
const singleAddTagsView = (path, to) => {
|
|
2256
|
+
var _a;
|
|
2257
|
+
let isDynamicPath = ((_a = to == null ? void 0 : to.meta) == null ? void 0 : _a.isDynamic) ? to.meta.isDynamicPath : path;
|
|
2258
|
+
state.tagsViewList.forEach((v) => {
|
|
2259
|
+
var _a2, _b, _c;
|
|
2260
|
+
if (v.path === isDynamicPath && !isObjectValueEqual(
|
|
2261
|
+
((_a2 = to == null ? void 0 : to.meta) == null ? void 0 : _a2.isDynamic) ? v.params ? v.params : null : v.query ? v.query : null,
|
|
2262
|
+
((_b = to == null ? void 0 : to.meta) == null ? void 0 : _b.isDynamic) ? (to == null ? void 0 : to.params) ? to == null ? void 0 : to.params : null : (to == null ? void 0 : to.query) ? to == null ? void 0 : to.query : null
|
|
2263
|
+
)) {
|
|
2264
|
+
((_c = to == null ? void 0 : to.meta) == null ? void 0 : _c.isDynamic) ? v.params = to.params : v.query = to == null ? void 0 : to.query;
|
|
2265
|
+
v.url = setTagsViewHighlight(v);
|
|
2266
|
+
addBrowserSetSession(state.tagsViewList);
|
|
2267
|
+
}
|
|
2268
|
+
});
|
|
2269
|
+
};
|
|
2270
|
+
const addTagsView = (path, to) => {
|
|
2271
|
+
return nextTick().then(async () => {
|
|
2272
|
+
var _a, _b, _c;
|
|
2273
|
+
let item;
|
|
2274
|
+
if ((_a = to == null ? void 0 : to.meta) == null ? void 0 : _a.isDynamic) {
|
|
2275
|
+
if (!getThemeConfig.value.isShareTagsView) await solveAddTagsView(path, to);
|
|
2276
|
+
else await singleAddTagsView(path, to);
|
|
2277
|
+
if (state.tagsViewList.some((v) => {
|
|
2278
|
+
var _a2;
|
|
2279
|
+
return v.path === ((_a2 = to == null ? void 0 : to.meta) == null ? void 0 : _a2.isDynamicPath);
|
|
2280
|
+
})) {
|
|
2281
|
+
addBrowserSetSession(state.tagsViewList);
|
|
2282
|
+
return false;
|
|
2283
|
+
}
|
|
2284
|
+
item = state.tagsViewRoutesList.find((v) => {
|
|
2285
|
+
var _a2;
|
|
2286
|
+
return v.path === ((_a2 = to == null ? void 0 : to.meta) == null ? void 0 : _a2.isDynamicPath);
|
|
2287
|
+
});
|
|
2288
|
+
} else {
|
|
2289
|
+
if (!getThemeConfig.value.isShareTagsView) await solveAddTagsView(path, to);
|
|
2290
|
+
else await singleAddTagsView(path, to);
|
|
2291
|
+
if (state.tagsViewList.some((v) => v.path === path)) {
|
|
2292
|
+
addBrowserSetSession(state.tagsViewList);
|
|
2293
|
+
return false;
|
|
2294
|
+
}
|
|
2295
|
+
item = state.tagsViewRoutesList.find((v) => v.path === path);
|
|
2296
|
+
}
|
|
2297
|
+
if (!item) return false;
|
|
2298
|
+
if (((_b = item == null ? void 0 : item.meta) == null ? void 0 : _b.isLink) && !item.meta.isIframe) return false;
|
|
2299
|
+
if ((_c = to == null ? void 0 : to.meta) == null ? void 0 : _c.isDynamic) item.params = (to == null ? void 0 : to.params) ? to == null ? void 0 : to.params : route.params;
|
|
2300
|
+
else item.query = (to == null ? void 0 : to.query) ? to == null ? void 0 : to.query : route.query;
|
|
2301
|
+
item.url = setTagsViewHighlight(item);
|
|
2302
|
+
await state.tagsViewList.push({ ...item });
|
|
2303
|
+
await addBrowserSetSession(state.tagsViewList);
|
|
2304
|
+
});
|
|
2305
|
+
};
|
|
2306
|
+
const tagsViewmoveToCurrentTag = () => {
|
|
2307
|
+
return nextTick().then(async () => {
|
|
2308
|
+
var _a, _b;
|
|
2309
|
+
if (tagsRefs.value.length <= 0) return false;
|
|
2310
|
+
let liDom = tagsRefs.value[state.tagsRefsIndex];
|
|
2311
|
+
let liIndex = state.tagsRefsIndex;
|
|
2312
|
+
let liLength = tagsRefs.value.length;
|
|
2313
|
+
let liFirst = tagsRefs.value[0];
|
|
2314
|
+
let liLast = tagsRefs.value[tagsRefs.value.length - 1];
|
|
2315
|
+
let scrollRefs = (_b = (_a = scrollbarRef.value) == null ? void 0 : _a.$refs) == null ? void 0 : _b.wrapRef;
|
|
2316
|
+
let scrollS = scrollRefs.scrollWidth;
|
|
2317
|
+
let offsetW = scrollRefs.offsetWidth;
|
|
2318
|
+
let scrollL = scrollRefs.scrollLeft;
|
|
2319
|
+
let liPrevTag = tagsRefs.value[state.tagsRefsIndex - 1];
|
|
2320
|
+
let liNextTag = tagsRefs.value[state.tagsRefsIndex + 1];
|
|
2321
|
+
let beforePrevL = 0;
|
|
2322
|
+
let afterNextL = 0;
|
|
2323
|
+
if (liDom === liFirst) {
|
|
2324
|
+
scrollRefs.scrollLeft = 0;
|
|
2325
|
+
} else if (liDom === liLast) {
|
|
2326
|
+
scrollRefs.scrollLeft = scrollS - offsetW;
|
|
2327
|
+
} else {
|
|
2328
|
+
if (liIndex === 0) beforePrevL = liFirst.offsetLeft - 5;
|
|
2329
|
+
else beforePrevL = (liPrevTag == null ? void 0 : liPrevTag.offsetLeft) - 5;
|
|
2330
|
+
if (liIndex === liLength) afterNextL = liLast.offsetLeft + liLast.offsetWidth + 5;
|
|
2331
|
+
else afterNextL = liNextTag.offsetLeft + liNextTag.offsetWidth + 5;
|
|
2332
|
+
if (afterNextL > scrollL + offsetW) {
|
|
2333
|
+
scrollRefs.scrollLeft = afterNextL - offsetW;
|
|
2334
|
+
} else if (beforePrevL < scrollL) {
|
|
2335
|
+
scrollRefs.scrollLeft = beforePrevL;
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
scrollbarRef.value.update();
|
|
2339
|
+
});
|
|
2340
|
+
};
|
|
2341
|
+
const getTagsRefsIndex = (path) => {
|
|
2342
|
+
return nextTick().then(async () => {
|
|
2343
|
+
let tagsViewList = await state.tagsViewList;
|
|
2344
|
+
state.tagsRefsIndex = tagsViewList.findIndex((v) => {
|
|
2345
|
+
if (getThemeConfig.value.isShareTagsView) {
|
|
2346
|
+
return v.path === path;
|
|
2347
|
+
} else {
|
|
2348
|
+
return v.url === path;
|
|
2349
|
+
}
|
|
2350
|
+
});
|
|
2351
|
+
await tagsViewmoveToCurrentTag();
|
|
2352
|
+
});
|
|
2353
|
+
};
|
|
2354
|
+
const initTagsView = async () => {
|
|
2355
|
+
if (Session.get("tagsViewList") && getThemeConfig.value.isCacheTagsView) {
|
|
2356
|
+
state.tagsViewList = Session.get("tagsViewList");
|
|
2357
|
+
} else {
|
|
2358
|
+
await state.tagsViewRoutesList.map((v) => {
|
|
2359
|
+
var _a;
|
|
2360
|
+
if (v.path === "/home") {
|
|
2361
|
+
v.meta.isAffix = true;
|
|
2362
|
+
}
|
|
2363
|
+
if (((_a = v.meta) == null ? void 0 : _a.isAffix) && !v.meta.isHide) {
|
|
2364
|
+
v.url = setTagsViewHighlight(v);
|
|
2365
|
+
state.tagsViewList.push({ ...v });
|
|
2366
|
+
}
|
|
2367
|
+
});
|
|
2368
|
+
await addTagsView(route.path, route);
|
|
2369
|
+
}
|
|
2370
|
+
await getTagsRefsIndex(getThemeConfig.value.isShareTagsView ? state.routePath : state.routeActive);
|
|
2371
|
+
};
|
|
2372
|
+
const getTagsViewRoutes = async () => {
|
|
2373
|
+
state.routeActive = await setTagsViewHighlight(route);
|
|
2374
|
+
state.routePath = await route.meta.isDynamic ? route.meta.isDynamicPath : route.path;
|
|
2375
|
+
state.tagsViewList = [];
|
|
2376
|
+
state.tagsViewRoutesList = tagsViewRoutes.value;
|
|
2377
|
+
await initTagsView();
|
|
2378
|
+
};
|
|
2379
|
+
const transUrlParams = (v) => {
|
|
2380
|
+
var _a, _b;
|
|
2381
|
+
let params = v.query && Object.keys(v.query).length > 0 ? v.query : v.params;
|
|
2382
|
+
if (!params) return "";
|
|
2383
|
+
let path = "";
|
|
2384
|
+
for (let [key, value] of Object.entries(params)) {
|
|
2385
|
+
if ((_a = v.meta) == null ? void 0 : _a.isDynamic) path += `/${value}`;
|
|
2386
|
+
else path += `&${key}=${value}`;
|
|
2387
|
+
}
|
|
2388
|
+
if ((_b = v.meta) == null ? void 0 : _b.isDynamic) {
|
|
2389
|
+
return v.isFnClick ? decodeURI(v.path) : `${v.path.split(":")[0]}${path.replace(/^\//, "")}`;
|
|
2390
|
+
} else {
|
|
2391
|
+
return `${v.path}${path.replace(/^&/, "?")}`;
|
|
2392
|
+
}
|
|
2393
|
+
};
|
|
2394
|
+
const refreshCurrentTagsView = async (fullPath) => {
|
|
2395
|
+
const decodeURIPath = decodeURI(fullPath);
|
|
2396
|
+
let item = {};
|
|
2397
|
+
state.tagsViewList.forEach((v) => {
|
|
2398
|
+
v.transUrl = transUrlParams(v);
|
|
2399
|
+
if (v.transUrl) {
|
|
2400
|
+
if (v.transUrl === transUrlParams(v)) item = v;
|
|
2401
|
+
} else {
|
|
2402
|
+
if (v.path === decodeURIPath) item = v;
|
|
2403
|
+
}
|
|
2404
|
+
});
|
|
2405
|
+
if (!item) return false;
|
|
2406
|
+
await storesKeepALiveNames.delCachedView(item);
|
|
2407
|
+
mittBus.emit("onTagsViewRefreshRouterView", fullPath);
|
|
2408
|
+
};
|
|
2409
|
+
const closeCurrentTagsView = (path) => {
|
|
2410
|
+
state.tagsViewList.map((v, k, arr) => {
|
|
2411
|
+
var _a;
|
|
2412
|
+
if (!((_a = v.meta) == null ? void 0 : _a.isAffix)) {
|
|
2413
|
+
if (getThemeConfig.value.isShareTagsView ? v.path === path : v.url === path) {
|
|
2414
|
+
storesKeepALiveNames.delCachedView(v);
|
|
2415
|
+
state.tagsViewList.splice(k, 1);
|
|
2416
|
+
setTimeout(() => {
|
|
2417
|
+
if (state.tagsViewList.length === k && getThemeConfig.value.isShareTagsView ? state.routePath === path : state.routeActive === path) {
|
|
2418
|
+
if (arr[arr.length - 1].meta.isDynamic) {
|
|
2419
|
+
if (k !== arr.length) router.push({ name: arr[k].name, params: arr[k].params });
|
|
2420
|
+
else router.push({ name: arr[arr.length - 1].name, params: arr[arr.length - 1].params });
|
|
2421
|
+
} else {
|
|
2422
|
+
if (k !== arr.length) router.push({ path: arr[k].path, query: arr[k].query });
|
|
2423
|
+
else router.push({ path: arr[arr.length - 1].path, query: arr[arr.length - 1].query });
|
|
2424
|
+
}
|
|
2425
|
+
} else {
|
|
2426
|
+
if (state.tagsViewList.length !== k && getThemeConfig.value.isShareTagsView ? state.routePath === path : state.routeActive === path) {
|
|
2427
|
+
if (arr[k].meta.isDynamic) {
|
|
2428
|
+
router.push({ name: arr[k].name, params: arr[k].params });
|
|
2429
|
+
} else {
|
|
2430
|
+
router.push({ path: arr[k].path, query: arr[k].query });
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
}, 0);
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
});
|
|
2438
|
+
addBrowserSetSession(state.tagsViewList);
|
|
2439
|
+
};
|
|
2440
|
+
const closeOtherTagsView = async (path) => {
|
|
2441
|
+
const currentItem = state.tagsViewList.find((i) => i.path === path);
|
|
2442
|
+
storesKeepALiveNames.delOthersCachedViews(currentItem);
|
|
2443
|
+
if (Session.get("tagsViewList")) {
|
|
2444
|
+
state.tagsViewList = [];
|
|
2445
|
+
Session.get("tagsViewList").map((v) => {
|
|
2446
|
+
var _a;
|
|
2447
|
+
if (((_a = v.meta) == null ? void 0 : _a.isAffix) && !v.meta.isHide) {
|
|
2448
|
+
v.url = setTagsViewHighlight(v);
|
|
2449
|
+
state.tagsViewList.push({ ...v });
|
|
2450
|
+
}
|
|
2451
|
+
});
|
|
2452
|
+
await addTagsView(path, route);
|
|
2453
|
+
addBrowserSetSession(state.tagsViewList);
|
|
2454
|
+
}
|
|
2455
|
+
};
|
|
2456
|
+
const closeAllTagsView = () => {
|
|
2457
|
+
if (Session.get("tagsViewList")) {
|
|
2458
|
+
storesKeepALiveNames.delAllCachedViews();
|
|
2459
|
+
state.tagsViewList = [];
|
|
2460
|
+
Session.get("tagsViewList").map((v) => {
|
|
2461
|
+
var _a;
|
|
2462
|
+
if (((_a = v.meta) == null ? void 0 : _a.isAffix) && !v.meta.isHide) {
|
|
2463
|
+
v.url = setTagsViewHighlight(v);
|
|
2464
|
+
state.tagsViewList.push({ ...v });
|
|
2465
|
+
}
|
|
2466
|
+
});
|
|
2467
|
+
addBrowserSetSession(state.tagsViewList);
|
|
2468
|
+
const home = dynamicRoutes.find((i) => i.path === "/");
|
|
2469
|
+
home && router.push(home.redirect);
|
|
2470
|
+
}
|
|
2471
|
+
};
|
|
2472
|
+
const openCurrenFullscreen = async (path) => {
|
|
2473
|
+
const item = state.tagsViewList.find((v) => getThemeConfig.value.isShareTagsView ? v.path === path : v.url === path);
|
|
2474
|
+
if (item.meta.isDynamic) await router.push({ name: item.name, params: item.params });
|
|
2475
|
+
else await router.push({ name: item.name, query: item.query });
|
|
2476
|
+
stores.setCurrenFullscreen(true);
|
|
2477
|
+
};
|
|
2478
|
+
const getCurrentRouteItem = (item) => {
|
|
2479
|
+
let resItem = {};
|
|
2480
|
+
state.tagsViewList.forEach((v) => {
|
|
2481
|
+
v.transUrl = transUrlParams(v);
|
|
2482
|
+
if (v.transUrl) {
|
|
2483
|
+
if (v.transUrl === transUrlParams(v) && v.transUrl === item.commonUrl) resItem = v;
|
|
2484
|
+
} else {
|
|
2485
|
+
if (v.path === decodeURI(item.path)) resItem = v;
|
|
2486
|
+
}
|
|
2487
|
+
});
|
|
2488
|
+
if (!resItem) return null;
|
|
2489
|
+
else return resItem;
|
|
2490
|
+
};
|
|
2491
|
+
const onCurrentContextmenuClick = async (item) => {
|
|
2492
|
+
item.commonUrl = transUrlParams(item);
|
|
2493
|
+
if (!getCurrentRouteItem(item)) return ElMessage({ type: "warning", message: "请正确输入路径及完整参数(query、params)" });
|
|
2494
|
+
const { path, name, params, query, meta, url } = getCurrentRouteItem(item);
|
|
2495
|
+
switch (item.contextMenuClickId) {
|
|
2496
|
+
case 0:
|
|
2497
|
+
if (meta.isDynamic) await router.push({ name, params });
|
|
2498
|
+
else await router.push({ path, query });
|
|
2499
|
+
refreshCurrentTagsView(route.fullPath);
|
|
2500
|
+
break;
|
|
2501
|
+
case 1:
|
|
2502
|
+
closeCurrentTagsView(getThemeConfig.value.isShareTagsView ? path : url);
|
|
2503
|
+
break;
|
|
2504
|
+
case 2:
|
|
2505
|
+
if (meta.isDynamic) await router.push({ name, params });
|
|
2506
|
+
else await router.push({ path, query });
|
|
2507
|
+
await closeOtherTagsView(path);
|
|
2508
|
+
break;
|
|
2509
|
+
case 3:
|
|
2510
|
+
closeAllTagsView();
|
|
2511
|
+
break;
|
|
2512
|
+
case 4:
|
|
2513
|
+
openCurrenFullscreen(getThemeConfig.value.isShareTagsView ? path : url);
|
|
2514
|
+
break;
|
|
2515
|
+
}
|
|
2516
|
+
};
|
|
2517
|
+
const onContextmenu = (v, e) => {
|
|
2518
|
+
const { clientX, clientY } = e;
|
|
2519
|
+
state.dropdown.x = clientX;
|
|
2520
|
+
state.dropdown.y = clientY;
|
|
2521
|
+
contextmenuRef.value.openContextmenu(v);
|
|
2522
|
+
};
|
|
2523
|
+
const onMousedownMenu = (v, e) => {
|
|
2524
|
+
var _a;
|
|
2525
|
+
if (!((_a = v.meta) == null ? void 0 : _a.isAffix) && e.button === 1) {
|
|
2526
|
+
const item = Object.assign({}, { contextMenuClickId: 1, ...v });
|
|
2527
|
+
onCurrentContextmenuClick(item);
|
|
2528
|
+
}
|
|
2529
|
+
};
|
|
2530
|
+
const onTagsClick = (v, k) => {
|
|
2531
|
+
state.tagsRefsIndex = k;
|
|
2532
|
+
router.push(v);
|
|
2533
|
+
if (getThemeConfig.value.layout === "columns") {
|
|
2534
|
+
const item = routesList.value.find((r) => r.path.indexOf(`/${v.path.split("/")[1]}`) > -1);
|
|
2535
|
+
!item.children ? getThemeConfig.value.isCollapse = true : getThemeConfig.value.isCollapse = false;
|
|
2536
|
+
}
|
|
2537
|
+
};
|
|
2538
|
+
const onHandleScroll = (e) => {
|
|
2539
|
+
scrollbarRef.value.$refs.wrapRef.scrollLeft += e.wheelDelta / 4;
|
|
2540
|
+
};
|
|
2541
|
+
const initSortable = async () => {
|
|
2542
|
+
const el = document.querySelector(".layout-navbars-tagsview-ul");
|
|
2543
|
+
if (!el) return false;
|
|
2544
|
+
state.sortable.el && state.sortable.destroy();
|
|
2545
|
+
state.sortable = Sortable.create(el, {
|
|
2546
|
+
animation: 300,
|
|
2547
|
+
dataIdAttr: "data-url",
|
|
2548
|
+
disabled: getThemeConfig.value.isSortableTagsView ? false : true,
|
|
2549
|
+
onEnd: () => {
|
|
2550
|
+
const sortEndList = [];
|
|
2551
|
+
state.sortable.toArray().map((val) => {
|
|
2552
|
+
state.tagsViewList.map((v) => {
|
|
2553
|
+
if (v.url === val) sortEndList.push({ ...v });
|
|
2554
|
+
});
|
|
2555
|
+
});
|
|
2556
|
+
addBrowserSetSession(sortEndList);
|
|
2557
|
+
}
|
|
2558
|
+
});
|
|
2559
|
+
};
|
|
2560
|
+
const onSortableResize = async () => {
|
|
2561
|
+
await initSortable();
|
|
2562
|
+
if (other.isMobile()) state.sortable.el && state.sortable.destroy();
|
|
2563
|
+
};
|
|
2564
|
+
onBeforeMount(() => {
|
|
2565
|
+
onSortableResize();
|
|
2566
|
+
window.addEventListener("resize", onSortableResize);
|
|
2567
|
+
mittBus.on("onCurrentContextmenuClick", (data) => {
|
|
2568
|
+
data.isFnClick = true;
|
|
2569
|
+
onCurrentContextmenuClick(data);
|
|
2570
|
+
});
|
|
2571
|
+
mittBus.on("openOrCloseSortable", async () => {
|
|
2572
|
+
await initSortable();
|
|
2573
|
+
});
|
|
2574
|
+
mittBus.on("openShareTagsView", () => {
|
|
2575
|
+
if (getThemeConfig.value.isShareTagsView) {
|
|
2576
|
+
router.push("/");
|
|
2577
|
+
state.tagsViewList = [];
|
|
2578
|
+
state.tagsViewRoutesList.map((v) => {
|
|
2579
|
+
var _a;
|
|
2580
|
+
if (((_a = v.meta) == null ? void 0 : _a.isAffix) && !v.meta.isHide) {
|
|
2581
|
+
v.url = setTagsViewHighlight(v);
|
|
2582
|
+
state.tagsViewList.push({ ...v });
|
|
2583
|
+
}
|
|
2584
|
+
});
|
|
2585
|
+
}
|
|
2586
|
+
});
|
|
2587
|
+
});
|
|
2588
|
+
onUnmounted(() => {
|
|
2589
|
+
mittBus.off("onCurrentContextmenuClick", () => {
|
|
2590
|
+
});
|
|
2591
|
+
mittBus.off("openOrCloseSortable", () => {
|
|
2592
|
+
});
|
|
2593
|
+
mittBus.off("openShareTagsView", () => {
|
|
2594
|
+
});
|
|
2595
|
+
window.removeEventListener("resize", onSortableResize);
|
|
2596
|
+
});
|
|
2597
|
+
onBeforeUpdate(() => {
|
|
2598
|
+
tagsRefs.value = [];
|
|
2599
|
+
});
|
|
2600
|
+
onMounted(async () => {
|
|
2601
|
+
await getTagsViewRoutes();
|
|
2602
|
+
await initSortable();
|
|
2603
|
+
});
|
|
2604
|
+
onBeforeRouteUpdate(async (to) => {
|
|
2605
|
+
state.routeActive = setTagsViewHighlight(to);
|
|
2606
|
+
state.routePath = to.meta.isDynamic ? to.meta.isDynamicPath : to.path;
|
|
2607
|
+
await addTagsView(to.path, to);
|
|
2608
|
+
getTagsRefsIndex(getThemeConfig.value.isShareTagsView ? state.routePath : state.routeActive);
|
|
2609
|
+
});
|
|
2610
|
+
watch(
|
|
2611
|
+
() => tagsViewRoutes.value,
|
|
2612
|
+
async (val) => {
|
|
2613
|
+
if (val.length === state.tagsViewRoutesList.length) return false;
|
|
2614
|
+
await getTagsViewRoutes();
|
|
2615
|
+
},
|
|
2616
|
+
{
|
|
2617
|
+
deep: true
|
|
2618
|
+
}
|
|
2619
|
+
);
|
|
2620
|
+
return (_ctx, _cache) => {
|
|
2621
|
+
const _component_SvgIcon = resolveComponent("SvgIcon");
|
|
2622
|
+
const _component_el_scrollbar = resolveComponent("el-scrollbar");
|
|
2623
|
+
return openBlock(), createElementBlock("div", {
|
|
2624
|
+
class: normalizeClass(["layout-navbars-tagsview", { "layout-navbars-tagsview-shadow": getThemeConfig.value.layout === "classic" }])
|
|
2625
|
+
}, [
|
|
2626
|
+
createVNode(_component_el_scrollbar, {
|
|
2627
|
+
ref_key: "scrollbarRef",
|
|
2628
|
+
ref: scrollbarRef,
|
|
2629
|
+
onWheel: withModifiers(onHandleScroll, ["prevent"])
|
|
2630
|
+
}, {
|
|
2631
|
+
default: withCtx(() => [
|
|
2632
|
+
createElementVNode("ul", {
|
|
2633
|
+
class: normalizeClass(["layout-navbars-tagsview-ul", setTagsStyle.value]),
|
|
2634
|
+
ref_key: "tagsUlRef",
|
|
2635
|
+
ref: tagsUlRef
|
|
2636
|
+
}, [
|
|
2637
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(state.tagsViewList, (v, k) => {
|
|
2638
|
+
return openBlock(), createElementBlock("li", {
|
|
2639
|
+
key: k,
|
|
2640
|
+
class: normalizeClass(["layout-navbars-tagsview-ul-li", { "is-active": isActive(v) }]),
|
|
2641
|
+
"data-url": v.url,
|
|
2642
|
+
onContextmenu: withModifiers(($event) => onContextmenu(v, $event), ["prevent"]),
|
|
2643
|
+
onMousedown: ($event) => onMousedownMenu(v, $event),
|
|
2644
|
+
onClick: ($event) => onTagsClick(v, k),
|
|
2645
|
+
ref_for: true,
|
|
2646
|
+
ref: (el) => {
|
|
2647
|
+
if (el) tagsRefs.value[k] = el;
|
|
2648
|
+
}
|
|
2649
|
+
}, [
|
|
2650
|
+
isActive(v) ? (openBlock(), createElementBlock("i", _hoisted_2)) : createCommentVNode("", true),
|
|
2651
|
+
!isActive(v) && getThemeConfig.value.isTagsviewIcon ? (openBlock(), createBlock(_component_SvgIcon, {
|
|
2652
|
+
key: 1,
|
|
2653
|
+
name: v.meta.icon,
|
|
2654
|
+
class: "pr5"
|
|
2655
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
2656
|
+
createElementVNode("span", null, toDisplayString(setTagsViewNameI18n.value(v)), 1),
|
|
2657
|
+
isActive(v) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2658
|
+
createVNode(_component_SvgIcon, {
|
|
2659
|
+
name: "ele-RefreshRight",
|
|
2660
|
+
class: "ml5 layout-navbars-tagsview-ul-li-refresh",
|
|
2661
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => refreshCurrentTagsView(_ctx.$route.fullPath), ["stop"]))
|
|
2662
|
+
}),
|
|
2663
|
+
!v.meta.isAffix ? (openBlock(), createBlock(_component_SvgIcon, {
|
|
2664
|
+
key: 0,
|
|
2665
|
+
name: "ele-Close",
|
|
2666
|
+
class: "layout-navbars-tagsview-ul-li-icon layout-icon-active",
|
|
2667
|
+
onClick: withModifiers(($event) => closeCurrentTagsView(getThemeConfig.value.isShareTagsView ? v.path : v.url), ["stop"])
|
|
2668
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
2669
|
+
], 64)) : createCommentVNode("", true),
|
|
2670
|
+
!v.meta.isAffix ? (openBlock(), createBlock(_component_SvgIcon, {
|
|
2671
|
+
key: 3,
|
|
2672
|
+
name: "ele-Close",
|
|
2673
|
+
class: "layout-navbars-tagsview-ul-li-icon layout-icon-three",
|
|
2674
|
+
onClick: withModifiers(($event) => closeCurrentTagsView(getThemeConfig.value.isShareTagsView ? v.path : v.url), ["stop"])
|
|
2675
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
2676
|
+
], 42, _hoisted_1);
|
|
2677
|
+
}), 128))
|
|
2678
|
+
], 2)
|
|
2679
|
+
]),
|
|
2680
|
+
_: 1
|
|
2681
|
+
}, 512),
|
|
2682
|
+
createVNode(unref(Contextmenu), {
|
|
2683
|
+
dropdown: state.dropdown,
|
|
2684
|
+
ref_key: "contextmenuRef",
|
|
2685
|
+
ref: contextmenuRef,
|
|
2686
|
+
onCurrentContextmenuClick
|
|
2687
|
+
}, null, 8, ["dropdown"])
|
|
2688
|
+
], 2);
|
|
2689
|
+
};
|
|
2690
|
+
}
|
|
2691
|
+
});
|
|
2692
|
+
const tagsView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-97b76a44"]]);
|
|
2693
|
+
export {
|
|
2694
|
+
tagsView as default
|
|
2695
|
+
};
|