hs-admin-ui 15.7.9 → 15.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bcIcon-D9krnuq8.js +1 -0
- package/dist/bcIcon-DDdxeOEV.mjs +4 -0
- package/dist/index-CMRRy4ZY.mjs +144180 -0
- package/dist/index-D9YCFra1.js +349 -0
- package/dist/index.css +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +135 -169
- package/dist/types/element-plus.d.ts +557 -0
- package/dist/types/index.d.ts +32 -1
- package/dist/types/src/components/base/Affix/index.d.ts +1 -0
- package/dist/types/src/components/base/Affix/src/Affix.vue.d.ts +3 -0
- package/dist/types/src/components/base/Alert/index.d.ts +1 -0
- package/dist/types/src/components/base/Alert/src/Alert.vue.d.ts +3 -0
- package/dist/types/src/components/base/Aside/index.d.ts +1 -0
- package/dist/types/src/components/base/Aside/src/Aside.vue.d.ts +3 -0
- package/dist/types/src/components/base/Autocomplete/index.d.ts +1 -0
- package/dist/types/src/components/base/Autocomplete/src/Autocomplete.vue.d.ts +3 -0
- package/dist/types/src/components/base/Backtop/index.d.ts +1 -0
- package/dist/types/src/components/base/Backtop/src/Backtop.vue.d.ts +3 -0
- package/dist/types/src/components/base/Badge/index.d.ts +1 -0
- package/dist/types/src/components/base/Badge/src/Badge.vue.d.ts +3 -0
- package/dist/types/src/components/base/Button/index.d.ts +2 -0
- package/dist/types/src/components/base/Button/src/Button.vue.d.ts +3 -0
- package/dist/types/src/components/base/Button/src/ButtonGroup.vue.d.ts +3 -0
- package/dist/types/src/components/base/Calendar/index.d.ts +1 -0
- package/dist/types/src/components/base/Calendar/src/Calendar.vue.d.ts +3 -0
- package/dist/types/src/components/base/Card/index.d.ts +1 -0
- package/dist/types/src/components/base/Card/src/Card.vue.d.ts +3 -0
- package/dist/types/src/components/base/Carousel/index.d.ts +2 -0
- package/dist/types/src/components/base/Carousel/src/Carousel.vue.d.ts +3 -0
- package/dist/types/src/components/base/Carousel/src/CarouselItem.vue.d.ts +3 -0
- package/dist/types/src/components/base/Cascader/index.d.ts +2 -0
- package/dist/types/src/components/base/Cascader/src/Cascader.vue.d.ts +3 -0
- package/dist/types/src/components/base/Cascader/src/CascaderPanel.vue.d.ts +3 -0
- package/dist/types/src/components/base/Checkbox/index.d.ts +3 -0
- package/dist/types/src/components/base/Checkbox/src/Checkbox.vue.d.ts +3 -0
- package/dist/types/src/components/base/Checkbox/src/CheckboxButton.vue.d.ts +3 -0
- package/dist/types/src/components/base/Checkbox/src/CheckboxGroup.vue.d.ts +3 -0
- package/dist/types/src/components/base/Col/index.d.ts +1 -0
- package/dist/types/src/components/base/Col/src/Col.vue.d.ts +3 -0
- package/dist/types/src/components/base/Collapse/index.d.ts +2 -0
- package/dist/types/src/components/base/Collapse/src/Collapse.vue.d.ts +3 -0
- package/dist/types/src/components/base/Collapse/src/CollapseItem.vue.d.ts +3 -0
- package/dist/types/src/components/base/ColorPicker/index.d.ts +1 -0
- package/dist/types/src/components/base/ColorPicker/src/ColorPicker.vue.d.ts +3 -0
- package/dist/types/src/components/base/Container/index.d.ts +1 -0
- package/dist/types/src/components/base/Container/src/Container.vue.d.ts +3 -0
- package/dist/types/src/components/base/DatePicker/index.d.ts +1 -0
- package/dist/types/src/components/base/DatePicker/src/DatePicker.vue.d.ts +3 -0
- package/dist/types/src/components/base/Descriptions/index.d.ts +2 -0
- package/dist/types/src/components/base/Descriptions/src/Descriptions.vue.d.ts +3 -0
- package/dist/types/src/components/base/Descriptions/src/DescriptionsItem.vue.d.ts +3 -0
- package/dist/types/src/components/base/Dialog/index.d.ts +1 -0
- package/dist/types/src/components/base/Dialog/src/Dialog.vue.d.ts +3 -0
- package/dist/types/src/components/base/Divider/index.d.ts +1 -0
- package/dist/types/src/components/base/Divider/src/Divider.vue.d.ts +3 -0
- package/dist/types/src/components/base/Drawer/index.d.ts +1 -0
- package/dist/types/src/components/base/Drawer/src/Drawer.vue.d.ts +3 -0
- package/dist/types/src/components/base/Dropdown/index.d.ts +3 -0
- package/dist/types/src/components/base/Dropdown/src/Dropdown.vue.d.ts +3 -0
- package/dist/types/src/components/base/Dropdown/src/DropdownItem.vue.d.ts +3 -0
- package/dist/types/src/components/base/Dropdown/src/DropdownMenu.vue.d.ts +3 -0
- package/dist/types/src/components/base/Empty/index.d.ts +1 -0
- package/dist/types/src/components/base/Empty/src/Empty.vue.d.ts +3 -0
- package/dist/types/src/components/base/Footer/index.d.ts +1 -0
- package/dist/types/src/components/base/Footer/src/Footer.vue.d.ts +3 -0
- package/dist/types/src/components/base/Form/index.d.ts +2 -0
- package/dist/types/src/components/base/Form/src/Form.vue.d.ts +3 -0
- package/dist/types/src/components/base/Form/src/FormItem.vue.d.ts +3 -0
- package/dist/types/src/components/base/Header/index.d.ts +1 -0
- package/dist/types/src/components/base/Header/src/Header.vue.d.ts +3 -0
- package/dist/types/src/components/base/Icon/index.d.ts +1 -0
- package/dist/types/src/components/base/Icon/src/Icon.vue.d.ts +3 -0
- package/dist/types/src/components/base/Image/index.d.ts +1 -0
- package/dist/types/src/components/base/Image/src/Image.vue.d.ts +3 -0
- package/dist/types/src/components/base/ImageViewer/index.d.ts +1 -0
- package/dist/types/src/components/base/ImageViewer/src/ImageViewer.vue.d.ts +3 -0
- package/dist/types/src/components/base/Input/index.d.ts +1 -0
- package/dist/types/src/components/base/Input/src/Input.vue.d.ts +30 -0
- package/dist/types/src/components/base/InputNumber/index.d.ts +1 -0
- package/dist/types/src/components/base/InputNumber/src/InputNumber.vue.d.ts +3 -0
- package/dist/types/src/components/base/Main/index.d.ts +1 -0
- package/dist/types/src/components/base/Main/src/Main.vue.d.ts +3 -0
- package/dist/types/src/components/base/Menu/index.d.ts +3 -0
- package/dist/types/src/components/base/Menu/src/Menu.vue.d.ts +3 -0
- package/dist/types/src/components/base/Menu/src/MenuItem.vue.d.ts +3 -0
- package/dist/types/src/components/base/Menu/src/SubMenu.vue.d.ts +3 -0
- package/dist/types/src/components/base/Pagination/index.d.ts +1 -0
- package/dist/types/src/components/base/Pagination/src/Pagination.vue.d.ts +3 -0
- package/dist/types/src/components/base/Popconfirm/index.d.ts +1 -0
- package/dist/types/src/components/base/Popconfirm/src/Popconfirm.vue.d.ts +3 -0
- package/dist/types/src/components/base/Popover/index.d.ts +1 -0
- package/dist/types/src/components/base/Popover/src/Popover.vue.d.ts +3 -0
- package/dist/types/src/components/base/Progress/index.d.ts +1 -0
- package/dist/types/src/components/base/Progress/src/Progress.vue.d.ts +3 -0
- package/dist/types/src/components/base/Qr/index.d.ts +1 -0
- package/dist/types/src/components/base/Qr/src/Qr.vue.d.ts +3 -0
- package/dist/types/src/components/base/Radio/index.d.ts +3 -0
- package/dist/types/src/components/base/Radio/src/Radio.vue.d.ts +3 -0
- package/dist/types/src/components/base/Radio/src/RadioButton.vue.d.ts +3 -0
- package/dist/types/src/components/base/Radio/src/RadioGroup.vue.d.ts +3 -0
- package/dist/types/src/components/base/Rate/index.d.ts +1 -0
- package/dist/types/src/components/base/Rate/src/Rate.vue.d.ts +3 -0
- package/dist/types/src/components/base/Result/index.d.ts +1 -0
- package/dist/types/src/components/base/Result/src/Result.vue.d.ts +3 -0
- package/dist/types/src/components/base/Row/index.d.ts +1 -0
- package/dist/types/src/components/base/Row/src/Row.vue.d.ts +3 -0
- package/dist/types/src/components/base/Scrollbar/index.d.ts +1 -0
- package/dist/types/src/components/base/Scrollbar/src/Scrollbar.vue.d.ts +3 -0
- package/dist/types/src/components/base/Select/index.d.ts +3 -0
- package/dist/types/src/components/base/Select/src/Option.vue.d.ts +3 -0
- package/dist/types/src/components/base/Select/src/OptionGroup.vue.d.ts +3 -0
- package/dist/types/src/components/base/Select/src/Select.vue.d.ts +37 -0
- package/dist/types/src/components/base/SelectV2/index.d.ts +1 -0
- package/dist/types/src/components/base/SelectV2/src/SelectV2.vue.d.ts +3 -0
- package/dist/types/src/components/base/Slider/index.d.ts +1 -0
- package/dist/types/src/components/base/Slider/src/Slider.vue.d.ts +3 -0
- package/dist/types/src/components/base/Steps/index.d.ts +1 -0
- package/dist/types/src/components/base/Steps/src/Step.vue.d.ts +3 -0
- package/dist/types/src/components/base/Steps/src/Steps.vue.d.ts +3 -0
- package/dist/types/src/components/base/Switch/index.d.ts +1 -0
- package/dist/types/src/components/base/Switch/src/Switch.vue.d.ts +3 -0
- package/dist/types/src/components/base/Table/index.d.ts +2 -0
- package/dist/types/src/components/base/Table/src/Table.vue.d.ts +3 -0
- package/dist/types/src/components/base/Table/src/TableColumn.vue.d.ts +3 -0
- package/dist/types/src/components/base/Tabs/index.d.ts +2 -0
- package/dist/types/src/components/base/Tabs/src/TabPane.vue.d.ts +3 -0
- package/dist/types/src/components/base/Tabs/src/Tabs.vue.d.ts +3 -0
- package/dist/types/src/components/base/Tag/index.d.ts +2 -0
- package/dist/types/src/components/base/Tag/src/CheckTag.vue.d.ts +3 -0
- package/dist/types/src/components/base/Tag/src/Tag.vue.d.ts +3 -0
- package/dist/types/src/components/base/Text/index.d.ts +1 -0
- package/dist/types/src/components/base/Text/src/Text.vue.d.ts +3 -0
- package/dist/types/src/components/base/TimePicker/index.d.ts +1 -0
- package/dist/types/src/components/base/TimePicker/src/TimePicker.vue.d.ts +3 -0
- package/dist/types/src/components/base/TimeSelect/index.d.ts +1 -0
- package/dist/types/src/components/base/TimeSelect/src/TimeSelect.vue.d.ts +3 -0
- package/dist/types/src/components/base/Tooltip/index.d.ts +1 -0
- package/dist/types/src/components/base/Tooltip/src/Tooltip.vue.d.ts +3 -0
- package/dist/types/src/components/base/Tour/index.d.ts +2 -0
- package/dist/types/src/components/base/Tour/src/Tour.vue.d.ts +3 -0
- package/dist/types/src/components/base/Tour/src/TourStep.vue.d.ts +3 -0
- package/dist/types/src/components/base/Transfer/index.d.ts +1 -0
- package/dist/types/src/components/base/Transfer/src/Transfer.vue.d.ts +3 -0
- package/dist/types/src/components/base/Tree/index.d.ts +1 -0
- package/dist/types/src/components/base/Tree/src/Tree.vue.d.ts +3 -0
- package/dist/types/src/components/base/TreeSelect/index.d.ts +1 -0
- package/dist/types/src/components/base/TreeSelect/src/TreeSelect.vue.d.ts +3 -0
- package/dist/types/src/components/base/TreeV2/index.d.ts +1 -0
- package/dist/types/src/components/base/TreeV2/src/TreeV2.vue.d.ts +3 -0
- package/dist/types/src/components/base/Upload/index.d.ts +1 -0
- package/dist/types/src/components/base/Upload/src/Upload.vue.d.ts +3 -0
- package/dist/types/src/components/base/Watermark/index.d.ts +1 -0
- package/dist/types/src/components/base/Watermark/src/Watermark.vue.d.ts +3 -0
- package/dist/types/src/components/base/components.d.ts +60 -0
- package/dist/types/src/components/base/index.d.ts +174 -0
- package/dist/types/src/components/business/bcBox/bcBox.vue.d.ts +48 -0
- package/dist/types/{components → src/components}/business/bcBox/utils.d.ts +10 -11
- package/dist/types/src/components/business/bcBreadcrumb/bcBreadcrumb.vue.d.ts +14 -0
- package/dist/types/{components → src/components}/business/bcBreadcrumb/index.d.ts +1 -2
- package/dist/types/src/components/business/bcButton/bcButton.vue.d.ts +40 -0
- package/dist/types/src/components/business/bcCheckbox/bcCheckbox.vue.d.ts +23 -0
- package/dist/types/src/components/business/bcContextBox/bcContextBox.vue.d.ts +40 -0
- package/dist/types/src/components/business/bcContextBox/useContextMenu.d.ts +34 -0
- package/dist/types/src/components/business/bcDivider/bcDivider.vue.d.ts +38 -0
- package/dist/types/src/components/business/bcFace/bcFace.vue.d.ts +24 -0
- package/dist/types/src/components/business/bcForm/baseForm.vue.d.ts +275 -0
- package/dist/types/src/components/business/bcForm/bcForm.vue.d.ts +33 -0
- package/dist/types/{components → src/components}/business/bcForm/type.d.ts +6 -7
- package/dist/types/src/components/business/bcForm/useGuide.d.ts +559 -0
- package/dist/types/src/components/business/bcGroup/bcGroup.vue.d.ts +36 -0
- package/dist/types/src/components/business/bcIcon/bcIcon.vue.d.ts +27 -0
- package/dist/types/src/components/business/bcInputGroup/bcInputGroup.vue.d.ts +20 -0
- package/dist/types/src/components/business/bcRadio/bcRadio.vue.d.ts +18 -0
- package/dist/types/src/components/business/bcSelect/bcSelect.vue.d.ts +33 -0
- package/dist/types/src/components/business/bcSignature/index.vue.d.ts +19 -0
- package/dist/types/src/components/business/bcSystemAuth/components/data.vue.d.ts +3 -0
- package/dist/types/src/components/business/bcSystemAuth/components/dict.vue.d.ts +3 -0
- package/dist/types/src/components/business/bcSystemAuth/components/fastSet/popup.vue.d.ts +17 -0
- package/dist/types/src/components/business/bcSystemAuth/components/field.vue.d.ts +3 -0
- package/dist/types/src/components/business/bcSystemAuth/components/form.vue.d.ts +11 -0
- package/dist/types/{components → src/components}/business/bcSystemAuth/components/selectAll/index.d.ts +2 -3
- package/dist/types/src/components/business/bcSystemAuth/components/selectAll/index.vue.d.ts +5 -0
- package/dist/types/src/components/business/bcSystemAuth/components/table.vue.d.ts +11 -0
- package/dist/types/src/components/business/bcSystemAuth/components/widget/btns.vue.d.ts +11 -0
- package/dist/types/src/components/business/bcSystemAuth/components/widget/form.vue.d.ts +11 -0
- package/dist/types/src/components/business/bcSystemAuth/components/widget/tab.vue.d.ts +17 -0
- package/dist/types/src/components/business/bcSystemAuth/components/widget/tables.vue.d.ts +11 -0
- package/dist/types/src/components/business/bcSystemAuth/components/widget/tablesWraper.vue.d.ts +11 -0
- package/dist/types/{components → src/components}/business/bcSystemAuth/fastStore.d.ts +48 -49
- package/dist/types/{components → src/components}/business/bcSystemAuth/fastUtils.d.ts +28 -30
- package/dist/types/src/components/business/bcSystemAuth/index.d.ts +2 -0
- package/dist/types/src/components/business/bcSystemAuth/index.vue.d.ts +17 -0
- package/dist/types/{components → src/components}/business/bcSystemAuth/store.d.ts +48 -49
- package/dist/types/src/components/business/bcSystemAuth/type.d.ts +342 -0
- package/dist/types/src/components/business/bcSystemAuth/useAuth.d.ts +26 -0
- package/dist/types/{components → src/components}/business/bcSystemAuth/utils.d.ts +28 -30
- package/dist/types/src/components/business/bcSystemField/components/field.vue.d.ts +3 -0
- package/dist/types/src/components/business/bcSystemField/components/form.vue.d.ts +11 -0
- package/dist/types/{components → src/components}/business/bcSystemField/components/selectAll/index.d.ts +4 -5
- package/dist/types/src/components/business/bcSystemField/components/selectAll/index.vue.d.ts +5 -0
- package/dist/types/src/components/business/bcSystemField/components/table.vue.d.ts +11 -0
- package/dist/types/src/components/business/bcSystemField/components/widget/form.vue.d.ts +11 -0
- package/dist/types/src/components/business/bcSystemField/components/widget/tab.vue.d.ts +17 -0
- package/dist/types/src/components/business/bcSystemField/components/widget/tables.vue.d.ts +11 -0
- package/dist/types/src/components/business/bcSystemField/components/widget/tablesWraper.vue.d.ts +11 -0
- package/dist/types/src/components/business/bcSystemField/index.d.ts +2 -0
- package/dist/types/src/components/business/bcSystemField/index.vue.d.ts +7 -0
- package/dist/types/{components → src/components}/business/bcSystemField/store.d.ts +39 -40
- package/dist/types/src/components/business/bcSystemField/useAuth.d.ts +14 -0
- package/dist/types/{components → src/components}/business/bcSystemField/utils.d.ts +20 -21
- package/dist/types/src/components/business/bcTable/bcFormTable.vue.d.ts +143 -0
- package/dist/types/src/components/business/bcTable/bcTable.vue.d.ts +32 -0
- package/dist/types/src/components/business/bcTable/components/btn/btn.vue.d.ts +58 -0
- package/dist/types/src/components/business/bcTable/components/popup/index.d.ts +2 -0
- package/dist/types/src/components/business/bcTable/components/popup/popup.vue.d.ts +49 -0
- package/dist/types/src/components/business/bcTable/components/query/components/sortForm/sortForm.vue.d.ts +14 -0
- package/dist/types/src/components/business/bcTable/components/query/drag.vue.d.ts +222 -0
- package/dist/types/src/components/business/bcTable/components/query/query.vue.d.ts +226 -0
- package/dist/types/{components → src/components}/business/bcTable/components/query/useQuickSearch.d.ts +2 -3
- package/dist/types/src/components/business/bcTable/components/table/colgroup.vue.d.ts +25 -0
- package/dist/types/src/components/business/bcTable/components/table/column.vue.d.ts +49 -0
- package/dist/types/src/components/business/bcTable/components/table/components/sortColumn/sortColumn.vue.d.ts +16 -0
- package/dist/types/{components → src/components}/business/bcTable/components/table/components/sortColumn/types.d.ts +1 -2
- package/dist/types/src/components/business/bcTable/components/table/table.vue.d.ts +64 -0
- package/dist/types/{components → src/components}/business/bcTable/components/table/useTable.d.ts +5 -5
- package/dist/types/src/components/business/bcTable/components/table/useTableHeight.d.ts +23 -0
- package/dist/types/{components → src/components}/business/bcTable/methods/cellDetailMethod.d.ts +0 -1
- package/dist/types/{components → src/components}/business/bcTable/methods/filterAgeMethod.d.ts +0 -1
- package/dist/types/{components → src/components}/business/bcTable/methods/footerMethod.d.ts +1 -2
- package/dist/types/{components → src/components}/business/bcTable/methods/formBtnMethod.d.ts +1 -2
- package/dist/types/{components → src/components}/business/bcTable/methods/index.d.ts +1 -2
- package/dist/types/{components → src/components}/business/bcTable/utils/authField.d.ts +1 -2
- package/dist/types/{components → src/components}/business/bcTable/utils/onFormKey.d.ts +4 -5
- package/dist/types/{components → src/components}/business/bcTable/utils/onTableKey.d.ts +5 -6
- package/dist/types/{components → src/components}/business/bcTable/utils/parseTable.d.ts +20 -21
- package/dist/types/{components → src/components}/business/bcTable/utils/type.d.ts +11 -12
- package/dist/types/{components → src/components}/business/bcTable/utils/useBcTable.d.ts +7079 -7089
- package/dist/types/{components → src/components}/business/bcTable/utils/useButon.d.ts +5 -6
- package/dist/types/src/components/business/bcTable/utils/useFormTableHeight.d.ts +18 -0
- package/dist/types/{components → src/components}/business/bcTable/utils/useKeydownEvent.d.ts +17 -18
- package/dist/types/src/components/business/bcTabs/bcTabs.vue.d.ts +61 -0
- package/dist/types/src/components/business/bcTabs/components/BetterScroll/index.d.ts +2 -0
- package/dist/types/src/components/business/bcTabs/components/BetterScroll/index.vue.d.ts +33 -0
- package/dist/types/src/components/business/bcTreeSearch/bcTreeSearch.vue.d.ts +55 -0
- package/dist/types/src/components/business/bcTreeSelect/bcTreeSelect.vue.d.ts +28 -0
- package/dist/types/src/components/business/bcTrtc/bcTrtc.vue.d.ts +104 -0
- package/dist/types/src/components/business/bcTrtc/hooks/useOperateLog.d.ts +8 -0
- package/dist/types/src/components/business/bcTrtc/hooks/useTrtcRoomEvent.d.ts +50 -0
- package/dist/types/src/components/business/bcTrtc/type.d.ts +124 -0
- package/dist/types/src/components/business/bcTrtc/useTrtc.d.ts +39 -0
- package/dist/types/src/components/business/bcTrtc/util/generateTestUserSig.d.ts +64 -0
- package/dist/types/src/components/business/bcTrtc/util/lib-generate-test-usersig-es.min.d.ts +20 -0
- package/dist/types/src/components/business/bcTrtc/util/utils.d.ts +4 -0
- package/dist/types/src/components/business/bcUpload/bcUpload.vue.d.ts +13 -0
- package/dist/types/src/components/business/bcUpload/component/highSpeedCamera.vue.d.ts +19 -0
- package/dist/types/src/components/business/bcUpload/component/qwebchannel.d.ts +15 -0
- package/dist/types/src/components/business/bcUpload/component/type.d.ts +44 -0
- package/dist/types/src/components/business/bcUpload/type.d.ts +83 -0
- package/dist/types/src/components/business/bcUpload/upload.vue.d.ts +272 -0
- package/dist/types/src/components/business/bcUpload/useUpload.d.ts +21 -0
- package/dist/types/{components → src/components}/business/bcVisual/bcVisual.vue.d.ts +9 -8
- package/dist/types/{components → src/components}/business/bcVisual/components/setting/dragItem.vue.d.ts +16 -9
- package/dist/types/src/components/business/bcVisual/components/setting/extendItem.vue.d.ts +13 -0
- package/dist/types/src/components/business/bcVisual/components/setting/setting.vue.d.ts +3 -0
- package/dist/types/{components → src/components}/business/bcVisual/components/setting/useDrag.d.ts +2 -4
- package/dist/types/src/components/business/bcVisual/components/table/table.vue.d.ts +6 -0
- package/dist/types/src/components/business/bcVisual/components/updateName/popup.vue.d.ts +17 -0
- package/dist/types/src/components/business/bcVisual/components/updateSql/addCondition.vue.d.ts +23 -0
- package/dist/types/{components → src/components}/business/bcVisual/components/updateSql/index.d.ts +1 -2
- package/dist/types/{components → src/components}/business/bcVisual/components/updateSql/nodeTree/index.d.ts +1 -2
- package/dist/types/src/components/business/bcVisual/components/updateSql/nodeTree/index.vue.d.ts +21 -0
- package/dist/types/src/components/business/bcVisual/components/updateSql/nodeTree/nodeTree.vue.d.ts +27 -0
- package/dist/types/src/components/business/bcVisual/components/updateSql/popup.vue.d.ts +17 -0
- package/dist/types/{components → src/components}/business/bcVisual/useTableFormat.d.ts +28 -29
- package/dist/types/{components → src/components}/business/bcVisual/utils.d.ts +1 -3
- package/dist/types/src/components/business/index.d.ts +52 -0
- package/dist/types/src/hooks/index.d.ts +3 -0
- package/dist/types/src/hooks/onKeyStroke.d.ts +13 -0
- package/dist/types/src/hooks/useExpose.d.ts +23 -0
- package/dist/types/src/hooks/useKeyStroke.d.ts +22 -0
- package/dist/types/{types → src/types}/auth.d.ts +1 -2
- package/dist/types/{types → src/types}/components.d.ts +1 -2
- package/dist/types/{types → src/types}/customData.d.ts +16 -19
- package/dist/types/{types → src/types}/form.d.ts +1 -2
- package/dist/types/{types → src/types}/formItem/autocomplete.d.ts +1 -2
- package/dist/types/{types → src/types}/formItem/checkbox.d.ts +1 -2
- package/dist/types/{types → src/types}/formItem/input.d.ts +1 -2
- package/dist/types/{types → src/types}/formItem/inputGroup.d.ts +1 -2
- package/dist/types/{types → src/types}/formItem/inputNumber.d.ts +1 -2
- package/dist/types/{types → src/types}/formItem/radio.d.ts +1 -2
- package/dist/types/{types → src/types}/formItem/selelct.d.ts +1 -2
- package/dist/types/{types → src/types}/formItem/treeSelect.d.ts +1 -2
- package/dist/types/{utils → src/utils}/arrayOperation.d.ts +1 -1
- package/dist/types/{utils → src/utils}/common.d.ts +3 -4
- package/dist/types/src/utils/commonFunction.d.ts +14 -0
- package/dist/types/{utils → src/utils}/download.d.ts +4 -4
- package/dist/types/{utils → src/utils}/getDataType.d.ts +2 -3
- package/dist/types/src/utils/index.d.ts +26 -0
- package/dist/types/{utils/loading.d.ts → src/utils/loading/index.d.ts} +1 -1
- package/dist/types/src/utils/lodash.d.ts +2 -0
- package/dist/types/{utils → src/utils}/mitt.d.ts +2 -3
- package/dist/types/{utils → src/utils}/number.d.ts +2 -14
- package/dist/types/{utils → src/utils}/other.d.ts +11 -12
- package/dist/types/src/utils/request/index.d.ts +6 -0
- package/dist/types/{utils → src/utils}/request/interceptors/request/authorization.interceptor.d.ts +1 -2
- package/dist/types/{utils → src/utils}/request/interceptors/request/result.type.interceptor.d.ts +6 -2
- package/dist/types/{utils → src/utils}/request/interceptors/request/undefined-params-handler.interceptor.d.ts +13 -2
- package/dist/types/{utils → src/utils}/request/interceptors/response/error-handler.interceptor.d.ts +1 -2
- package/dist/types/{utils → src/utils}/request/repeatRequest.d.ts +1 -2
- package/dist/types/src/utils/request/request.d.ts +6 -0
- package/dist/types/src/utils/showMessage.d.ts +3 -0
- package/dist/types/src/utils/showMessageBox.d.ts +3 -0
- package/dist/types/src/utils/showNotification.d.ts +3 -0
- package/dist/types/{utils → src/utils}/showPopup/index.d.ts +5 -6
- package/dist/types/src/utils/showPopup/showPopup.vue.d.ts +56 -0
- package/dist/types/{utils → src/utils}/storage.d.ts +12 -14
- package/dist/types/{utils → src/utils}/tree.d.ts +3 -4
- package/dist/types/{utils → src/utils}/url.d.ts +2 -3
- package/dist/types/vxe-table.d.ts +3 -0
- package/package.json +16 -39
- package/LICENSE +0 -21
- package/dist/401-BlM5q_g-.mjs +0 -56
- package/dist/401-Bo_QA5Fo.js +0 -1
- package/dist/404-BYJby0Oi.mjs +0 -61
- package/dist/404-BYJby0Oi.mjs.gz +0 -0
- package/dist/404-jTTCKJNg.js +0 -1
- package/dist/404-jTTCKJNg.js.gz +0 -0
- package/dist/account-BRK3tZKc.js +0 -1
- package/dist/account-ilVpGdGH.mjs +0 -215
- package/dist/aside-5u9e_-Rp.mjs +0 -164
- package/dist/aside-BKZ-OlTP.js +0 -1
- package/dist/baseBtnConfig-C6KLedE5.mjs +0 -273
- package/dist/baseBtnConfig-DRxjBT8Z.js +0 -1
- package/dist/baseFormConfig-BaFbaMWd.mjs +0 -722
- package/dist/baseFormConfig-BaFbaMWd.mjs.gz +0 -0
- package/dist/baseFormConfig-CSyA4kTg.mjs +0 -504
- package/dist/baseFormConfig-CSyA4kTg.mjs.gz +0 -0
- package/dist/baseFormConfig-CYgc6V2g.js +0 -1
- package/dist/baseFormConfig-D5Q35Bo3.js +0 -1
- package/dist/baseTableConfig-6WRe8rDM.mjs +0 -2624
- package/dist/baseTableConfig-6WRe8rDM.mjs.gz +0 -0
- package/dist/baseTableConfig-C6IDcU0g.js +0 -1
- package/dist/baseTableConfig-C6IDcU0g.js.gz +0 -0
- package/dist/bcFormConfig-DoLVqIr4.mjs +0 -234
- package/dist/bcFormConfig-DzpOGz-m.js +0 -1
- package/dist/bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-DEakn1bL.mjs +0 -131
- package/dist/bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-DVy1L2nO.js +0 -1
- package/dist/bcSwitchSystems.vue_vue_type_script_setup_true_lang-DCGGzxo0.js +0 -1
- package/dist/bcSwitchSystems.vue_vue_type_script_setup_true_lang-DiZ76eyX.mjs +0 -101
- package/dist/btnIndex-BU6_Lgv3.mjs +0 -287
- package/dist/btnIndex-BU6_Lgv3.mjs.gz +0 -0
- package/dist/btnIndex-BYSMHQP-.js +0 -1
- package/dist/classic-CZ5jdtx0.js +0 -1
- package/dist/classic-Dm7VTY5J.mjs +0 -81
- package/dist/cloneConfigDialog-DIj9CUjJ.mjs +0 -817
- package/dist/cloneConfigDialog-DIj9CUjJ.mjs.gz +0 -0
- package/dist/cloneConfigDialog-TSUUyv9s.js +0 -1
- package/dist/cloneConfigDialog-TSUUyv9s.js.gz +0 -0
- package/dist/columns-CjXL-oE4.js +0 -1
- package/dist/columns-jTuNR_F4.mjs +0 -87
- package/dist/columnsAside-CLxxZNXo.mjs +0 -220
- package/dist/columnsAside-DLUbPkxh.js +0 -1
- package/dist/contextmenu-BamKr8IA.js +0 -1
- package/dist/contextmenu-Civj9yUS.mjs +0 -125
- package/dist/contextmenu-DtfFP8IO.mjs +0 -125
- package/dist/contextmenu-YsE3L-dB.js +0 -1
- package/dist/copyMenuConfig-DCjEoK5v.mjs +0 -4
- package/dist/copyMenuConfig-gd65a3RC.js +0 -1
- package/dist/copyMenuConfig.vue_vue_type_script_setup_true_lang-5Jz16QPo.js +0 -1
- package/dist/copyMenuConfig.vue_vue_type_script_setup_true_lang-BFA7qI18.mjs +0 -85
- package/dist/copySystem-CRf-zh9G.js +0 -1
- package/dist/copySystem-DBKbUuzU.mjs +0 -4
- package/dist/copySystem.vue_vue_type_script_setup_true_lang-BpIW8Rs7.js +0 -1
- package/dist/copySystem.vue_vue_type_script_setup_true_lang-Dp6K4ZPg.mjs +0 -78
- package/dist/defaults-DMH96QfT.mjs +0 -86
- package/dist/defaults-DlAHrNSO.js +0 -1
- package/dist/dialog-B_KS2otQ.mjs +0 -4
- package/dist/dialog-BpY5TPcI.mjs +0 -365
- package/dist/dialog-BpY5TPcI.mjs.gz +0 -0
- package/dist/dialog-Cu0CJXJR.mjs +0 -4
- package/dist/dialog-D5eV0gxD.mjs +0 -10
- package/dist/dialog-DD2puMT_.js +0 -1
- package/dist/dialog-DDL8gmtT.js +0 -1
- package/dist/dialog-DQP53khI.mjs +0 -359
- package/dist/dialog-DQP53khI.mjs.gz +0 -0
- package/dist/dialog-DsAzp4Nc.js +0 -1
- package/dist/dialog-DxBOYlwo.js +0 -1
- package/dist/dialog-TFJ52Qpk.js +0 -1
- package/dist/dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-ecFz1B6I.mjs +0 -220
- package/dist/dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-kd12ebSy.js +0 -1
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-BbmW4qwo.js +0 -1
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-BbmW4qwo.js.gz +0 -0
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-kYLsske7.mjs +0 -694
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-kYLsske7.mjs.gz +0 -0
- package/dist/dictDialog-BQ4b4nFI.js +0 -1
- package/dist/dictDialog-ZMamr0ZZ.mjs +0 -4
- package/dist/dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-BtFVx7zg.mjs +0 -154
- package/dist/dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-CgP7jKXr.js +0 -1
- package/dist/dictItemDialog-B5XYJXXR.mjs +0 -4
- package/dist/dictItemDialog-BZCOz1je.js +0 -1
- package/dist/dictItemDialog.vue_vue_type_script_setup_true_lang-BTAKd62E.js +0 -1
- package/dist/dictItemDialog.vue_vue_type_script_setup_true_lang-DbzDaqAf.mjs +0 -231
- package/dist/favicon.ico +0 -0
- package/dist/formConfig-EnNDrsXl.mjs +0 -592
- package/dist/formConfig-EnNDrsXl.mjs.gz +0 -0
- package/dist/formConfig-EvG_KMjq.js +0 -1
- package/dist/formConfig-EvG_KMjq.js.gz +0 -0
- package/dist/header-CJn5ZfnT.js +0 -1
- package/dist/header-_FT9tTGW.mjs +0 -28
- package/dist/horizontal-DNL1D1-M.mjs +0 -151
- package/dist/horizontal-hgY32trC.js +0 -1
- package/dist/hsAttrBtn-ChySkAD4.mjs +0 -4
- package/dist/hsAttrBtn-DMpk4Tpx.js +0 -1
- package/dist/hsAttrBtn.vue_vue_type_script_setup_true_lang-1EVeiUB6.js +0 -1
- package/dist/hsAttrBtn.vue_vue_type_script_setup_true_lang-C5gyfyIV.mjs +0 -128
- package/dist/hsAttrForm-CyQXJKL6.js +0 -1
- package/dist/hsAttrForm-D1giqvO1.mjs +0 -4
- package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-Dw6Xd3YW.js +0 -1
- package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-oxy3MMDf.mjs +0 -439
- package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-oxy3MMDf.mjs.gz +0 -0
- package/dist/hsBtnConfigList-BwzBiOgr.js +0 -1
- package/dist/hsBtnConfigList-ka6iO9u5.mjs +0 -117
- package/dist/hsBtnItemConfig-D7APNh5b.mjs +0 -4
- package/dist/hsBtnItemConfig-PwfkkSjP.js +0 -1
- package/dist/hsBtnItemConfig.vue_vue_type_script_setup_true_lang-BcF9s_t7.js +0 -1
- package/dist/hsBtnItemConfig.vue_vue_type_script_setup_true_lang-DhtnXiRo.mjs +0 -147
- package/dist/hsBtnPanel-B3_PpOx1.js +0 -1
- package/dist/hsBtnPanel-CfWQO5Yj.mjs +0 -4
- package/dist/hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-BRRvl3m9.mjs +0 -67
- package/dist/hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-WxsVtQoc.js +0 -1
- package/dist/hsCheckbox-BKa_El3s.js +0 -1
- package/dist/hsCheckbox-CalDndlZ.mjs +0 -4
- package/dist/hsCheckbox.vue_vue_type_script_setup_true_lang-Dh-lqGjq.js +0 -1
- package/dist/hsCheckbox.vue_vue_type_script_setup_true_lang-XCUyHi8X.mjs +0 -28
- package/dist/hsExpand-CPM-nNHm.js +0 -1
- package/dist/hsExpand-DxwmN1tA.mjs +0 -4
- package/dist/hsExpand.vue_vue_type_script_setup_true_lang-Dlu-fUiD.mjs +0 -285
- package/dist/hsExpand.vue_vue_type_script_setup_true_lang-xTcppBR0.js +0 -1
- package/dist/hsFormConfig-C4ciKuQQ.js +0 -1
- package/dist/hsFormConfig-oUbaU1I8.mjs +0 -207
- package/dist/hsFormConfigList-CvO9_-yH.js +0 -1
- package/dist/hsFormConfigList-D22P1SPx.mjs +0 -414
- package/dist/hsFormConfigList-D22P1SPx.mjs.gz +0 -0
- package/dist/hsFormPanel-BgKBv3R4.mjs +0 -238
- package/dist/hsFormPanel-BgKBv3R4.mjs.gz +0 -0
- package/dist/hsFormPanel-rf7405we.js +0 -1
- package/dist/hsFormParse-BJXuJ4Ap.mjs +0 -4
- package/dist/hsFormParse-Cbw_w3kr.js +0 -1
- package/dist/hsFormParse.vue_vue_type_script_setup_true_lang-DewfGMUJ.mjs +0 -242
- package/dist/hsFormParse.vue_vue_type_script_setup_true_lang-DhCHbkft.js +0 -1
- package/dist/hsPanelItem-DoFI4Td_.js +0 -1
- package/dist/hsPanelItem-Dvw5Xfgg.mjs +0 -4
- package/dist/hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-Bt6r9TZf.mjs +0 -86
- package/dist/hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-CzeSpu7q.js +0 -1
- package/dist/iframes-CWdXFiYU.mjs +0 -122
- package/dist/iframes-DnAW1ZV2.js +0 -1
- package/dist/index copy-B20iHEzm.mjs +0 -134
- package/dist/index copy-CRLKjXgw.js +0 -1
- package/dist/index copy-qsl_Cz0F.js +0 -1
- package/dist/index copy-vj8JtHui.mjs +0 -69
- package/dist/index-2cLSyOu4.mjs +0 -403
- package/dist/index-2cLSyOu4.mjs.gz +0 -0
- package/dist/index-4WkYxlVk.mjs +0 -131
- package/dist/index-4ncpQ4eO.js +0 -1
- package/dist/index-66A0dfxV.mjs +0 -95
- package/dist/index-6m-Zcn-q.js +0 -1
- package/dist/index-9-SK9FVJ.js +0 -1
- package/dist/index-B45hVvU9.mjs +0 -10
- package/dist/index-B6Iitxd9.mjs +0 -50
- package/dist/index-B6g-9ve6.mjs +0 -73
- package/dist/index-B8p9_cpY.mjs +0 -258289
- package/dist/index-B8p9_cpY.mjs.gz +0 -0
- package/dist/index-BDNL6vVh.js +0 -1
- package/dist/index-BDV6agxz.mjs +0 -22
- package/dist/index-BF32C3XO.js +0 -1
- package/dist/index-BFqTB98X.js +0 -1
- package/dist/index-BIgnSPCb.js +0 -1
- package/dist/index-BSdnLWle.mjs +0 -1009
- package/dist/index-BSdnLWle.mjs.gz +0 -0
- package/dist/index-BUJyZVH6.js +0 -1
- package/dist/index-BUcC4gD1.js +0 -110
- package/dist/index-BUcC4gD1.js.gz +0 -0
- package/dist/index-BX2TCVhI.js +0 -1
- package/dist/index-BXj-m_QU.mjs +0 -65
- package/dist/index-Bak90RK3.js +0 -1
- package/dist/index-BbDp5GL2.js +0 -1
- package/dist/index-Be5QcYb1.js +0 -1
- package/dist/index-BhMp70XH.mjs +0 -94
- package/dist/index-BlncRtDu.mjs +0 -213
- package/dist/index-BmxF4Rq-.js +0 -1
- package/dist/index-BrTyWpWz.js +0 -1
- package/dist/index-BwZWYngT.mjs +0 -14
- package/dist/index-ByE-Ghra.mjs +0 -4
- package/dist/index-C5uVtRxK.mjs +0 -4
- package/dist/index-C66bLfX7.mjs +0 -5403
- package/dist/index-C66bLfX7.mjs.gz +0 -0
- package/dist/index-C7UwTam3.js +0 -1
- package/dist/index-CEiNZm8f.js +0 -1
- package/dist/index-CHuCRx52.js +0 -1
- package/dist/index-CLJ404NA.mjs +0 -4
- package/dist/index-CQ9HULGA.js +0 -1
- package/dist/index-CTjkH_Wv.mjs +0 -89
- package/dist/index-CUE6cOFE.mjs +0 -76
- package/dist/index-CUHWC_OL.js +0 -1
- package/dist/index-CW4OWAEr.mjs +0 -65
- package/dist/index-CYuht4Th.mjs +0 -51
- package/dist/index-CZsXRpIN.js +0 -1
- package/dist/index-CbCppT2z.js +0 -1
- package/dist/index-CbgKih92.js +0 -1
- package/dist/index-Cn4LcIGB.js +0 -1
- package/dist/index-CpETTGp9.mjs +0 -2208
- package/dist/index-CpETTGp9.mjs.gz +0 -0
- package/dist/index-CpHenprW.mjs +0 -23
- package/dist/index-D-w2sUKg.mjs +0 -285
- package/dist/index-D1ExEnW1.js +0 -1
- package/dist/index-D5cTXNyh.js +0 -1
- package/dist/index-D6DzO6fV.mjs +0 -4
- package/dist/index-DBj7IN1r.js +0 -1
- package/dist/index-DEykAVeO.js +0 -1
- package/dist/index-DHHcO6BG.js +0 -1
- package/dist/index-DIbNridm.js +0 -1
- package/dist/index-DIzQj293.mjs +0 -4
- package/dist/index-DLbJH16Z.js +0 -1
- package/dist/index-DRRJUz_-.mjs +0 -73
- package/dist/index-DT3c6iM1.mjs +0 -49
- package/dist/index-DZ_UFJE2.mjs +0 -43
- package/dist/index-DZtEyYb2.mjs +0 -133
- package/dist/index-Dd9PdxaZ.js +0 -1
- package/dist/index-Defqrlha.js +0 -1
- package/dist/index-DhwXABy-.mjs +0 -200
- package/dist/index-DmxRNn0a.js +0 -1
- package/dist/index-DpL-wDyT.mjs +0 -47
- package/dist/index-Du8HrrrI.mjs +0 -30
- package/dist/index-DvcVe6OS.js +0 -1
- package/dist/index-E4SluhdQ.js +0 -1
- package/dist/index-E4SluhdQ.js.gz +0 -0
- package/dist/index-H0auNlrG.js +0 -1
- package/dist/index-OWB7DJzr.mjs +0 -10
- package/dist/index-OcEeKuZx.mjs +0 -67
- package/dist/index-PCI3lWru.mjs +0 -38
- package/dist/index-VC2NjBxE.mjs +0 -254
- package/dist/index-W6b8kigp.mjs +0 -152
- package/dist/index-WjdRiWAr.js +0 -1
- package/dist/index-Z83-84L3.js +0 -1
- package/dist/index-bDjpMN-I.mjs +0 -331
- package/dist/index-bDjpMN-I.mjs.gz +0 -0
- package/dist/index-ecVV8iQ5.js +0 -1
- package/dist/index-ecVV8iQ5.js.gz +0 -0
- package/dist/index-feq0FF6W.mjs +0 -23
- package/dist/index-g_BDa62N.mjs +0 -19
- package/dist/index-iMRuNPhx.js +0 -1
- package/dist/index-lPH7I4ZV.js +0 -1
- package/dist/index-lcjlHtTM.js +0 -1
- package/dist/index-ngUeuLCY.mjs +0 -119
- package/dist/index-p5axrses.mjs +0 -262
- package/dist/index-qkia8MBs.js +0 -1
- package/dist/index-qmspgcZh.mjs +0 -173
- package/dist/index-rfqCl2Kx.js +0 -1
- package/dist/index-rfqCl2Kx.js.gz +0 -0
- package/dist/index-wYWfrLhW.mjs +0 -172
- package/dist/index.vue_vue_type_script_setup_true_lang-C5yWC5iv.mjs +0 -194
- package/dist/index.vue_vue_type_script_setup_true_lang-CjSyMdNZ.js +0 -1
- package/dist/index.vue_vue_type_script_setup_true_lang-D09jZWrV.mjs +0 -267
- package/dist/index.vue_vue_type_script_setup_true_lang-D09jZWrV.mjs.gz +0 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-D3BpKELM.js +0 -1
- package/dist/index.vue_vue_type_script_setup_true_lang-DFnIHuqt.mjs +0 -103
- package/dist/index.vue_vue_type_script_setup_true_lang-IYpAU7dz.mjs +0 -97
- package/dist/index.vue_vue_type_script_setup_true_lang-O6Ui2xKr.js +0 -1
- package/dist/index.vue_vue_type_script_setup_true_lang-ZPh36D_p.js +0 -1
- package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-BKhSPbGe.js +0 -1
- package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-BtT1-wTD.mjs +0 -288
- package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-BtT1-wTD.mjs.gz +0 -0
- package/dist/lib-generate-test-usersig.min.js +0 -2
- package/dist/lib-generate-test-usersig.min.js.gz +0 -0
- package/dist/link-7fl17XVb.js +0 -1
- package/dist/link-DCqhQmHl.mjs +0 -63
- package/dist/list-C64Pps9q.mjs +0 -85
- package/dist/list-Cfdh9YeV.js +0 -1
- package/dist/logo-mini-BQ9BrQ1U.mjs +0 -4
- package/dist/logo-mini-DwRdfcE7.js +0 -1
- package/dist/main-CYFKItn2.js +0 -1
- package/dist/main-Dk3cL6DT.mjs +0 -72
- package/dist/mobile-CmyNGxO7.js +0 -1
- package/dist/mobile-lH45gj78.mjs +0 -115
- package/dist/parent-DgeDCvel.js +0 -1
- package/dist/parent-Z3Gtuapy.mjs +0 -131
- package/dist/popup-BGBOgNbl.js +0 -1
- package/dist/popup-o6C8khWa.mjs +0 -4
- package/dist/popup.vue_vue_type_script_setup_true_name_replaceRules_lang-B9C2Jm2X.mjs +0 -89
- package/dist/popup.vue_vue_type_script_setup_true_name_replaceRules_lang-Cb8WwlgE.js +0 -1
- package/dist/roleItem-DJBnLnvt.js +0 -1
- package/dist/roleItem-OVIMEKUp.mjs +0 -103
- package/dist/saveForm-BVCoIREF.mjs +0 -160
- package/dist/saveForm-Bd1FexRX.js +0 -1
- package/dist/scan-LJSUYdNh.js +0 -1
- package/dist/scan-LJSUYdNh.js.gz +0 -0
- package/dist/scan-Nn9oVdkc.mjs +0 -945
- package/dist/scan-Nn9oVdkc.mjs.gz +0 -0
- package/dist/search-C8wRmosS.mjs +0 -114
- package/dist/search-DfOoOk9c.js +0 -1
- package/dist/selectConfig-46C7fd6S.js +0 -1
- package/dist/selectConfig-BRthHw2-.mjs +0 -546
- package/dist/selectConfig-BRthHw2-.mjs.gz +0 -0
- package/dist/shortcutList-BXBGQdNn.mjs +0 -76
- package/dist/shortcutList-WSi4lUlm.js +0 -1
- package/dist/style.css +0 -1
- package/dist/style.css.gz +0 -0
- package/dist/subItem-CYHSTtj-.js +0 -1
- package/dist/subItem-DZGUO_Hg.mjs +0 -77
- package/dist/tagsView-Bi6oDkC3.js +0 -8
- package/dist/tagsView-Bi6oDkC3.js.gz +0 -0
- package/dist/tagsView-C2uglhO1.mjs +0 -2695
- package/dist/tagsView-C2uglhO1.mjs.gz +0 -0
- package/dist/transverse-CesMO5Ck.js +0 -1
- package/dist/transverse-DBc9UlFA.mjs +0 -65
- package/dist/types/components/business/bcBox/bcBox.vue.d.ts +0 -66
- package/dist/types/components/business/bcBreadcrumb/bcBreadcrumb.vue.d.ts +0 -23
- package/dist/types/components/business/bcForm/baseForm.vue.d.ts +0 -273
- package/dist/types/components/business/bcForm/bcForm.vue.d.ts +0 -42
- package/dist/types/components/business/bcForm/useGuide.d.ts +0 -564
- package/dist/types/components/business/bcSystemAuth/components/data.vue.d.ts +0 -3
- package/dist/types/components/business/bcSystemAuth/components/dict.vue.d.ts +0 -3
- package/dist/types/components/business/bcSystemAuth/components/fastSet/popup.vue.d.ts +0 -17
- package/dist/types/components/business/bcSystemAuth/components/field.vue.d.ts +0 -3
- package/dist/types/components/business/bcSystemAuth/components/form.vue.d.ts +0 -13
- package/dist/types/components/business/bcSystemAuth/components/selectAll/index.vue.d.ts +0 -5
- package/dist/types/components/business/bcSystemAuth/components/table.vue.d.ts +0 -13
- package/dist/types/components/business/bcSystemAuth/components/widget/btns.vue.d.ts +0 -15
- package/dist/types/components/business/bcSystemAuth/components/widget/form.vue.d.ts +0 -15
- package/dist/types/components/business/bcSystemAuth/components/widget/tab.vue.d.ts +0 -45
- package/dist/types/components/business/bcSystemAuth/components/widget/tables.vue.d.ts +0 -15
- package/dist/types/components/business/bcSystemAuth/components/widget/tablesWraper.vue.d.ts +0 -15
- package/dist/types/components/business/bcSystemAuth/index.d.ts +0 -3
- package/dist/types/components/business/bcSystemAuth/index.vue.d.ts +0 -26
- package/dist/types/components/business/bcSystemAuth/type.d.ts +0 -42
- package/dist/types/components/business/bcSystemAuth/useAuth.d.ts +0 -28
- package/dist/types/components/business/bcSystemField/components/field.vue.d.ts +0 -3
- package/dist/types/components/business/bcSystemField/components/form.vue.d.ts +0 -13
- package/dist/types/components/business/bcSystemField/components/selectAll/index.vue.d.ts +0 -5
- package/dist/types/components/business/bcSystemField/components/table.vue.d.ts +0 -13
- package/dist/types/components/business/bcSystemField/components/widget/form.vue.d.ts +0 -15
- package/dist/types/components/business/bcSystemField/components/widget/tab.vue.d.ts +0 -45
- package/dist/types/components/business/bcSystemField/components/widget/tables.vue.d.ts +0 -15
- package/dist/types/components/business/bcSystemField/components/widget/tablesWraper.vue.d.ts +0 -15
- package/dist/types/components/business/bcSystemField/index.d.ts +0 -3
- package/dist/types/components/business/bcSystemField/index.vue.d.ts +0 -16
- package/dist/types/components/business/bcSystemField/useAuth.d.ts +0 -16
- package/dist/types/components/business/bcTable/bcFormTable.vue.d.ts +0 -142
- package/dist/types/components/business/bcTable/bcTable.vue.d.ts +0 -51
- package/dist/types/components/business/bcTable/components/btn/btn.vue.d.ts +0 -77
- package/dist/types/components/business/bcTable/components/popup/index.d.ts +0 -3
- package/dist/types/components/business/bcTable/components/query/components/sortForm/sortForm.vue.d.ts +0 -23
- package/dist/types/components/business/bcTable/components/query/drag.vue.d.ts +0 -244
- package/dist/types/components/business/bcTable/components/query/query.vue.d.ts +0 -249
- package/dist/types/components/business/bcTable/components/table/colgroup.vue.d.ts +0 -28
- package/dist/types/components/business/bcTable/components/table/column.vue.d.ts +0 -35
- package/dist/types/components/business/bcTable/components/table/components/sortColumn/sortColumn.vue.d.ts +0 -25
- package/dist/types/components/business/bcTable/components/table/table.vue.d.ts +0 -67
- package/dist/types/components/business/bcTable/components/table/useTableHeight.d.ts +0 -25
- package/dist/types/components/business/bcTable/utils/useFormTableHeight.d.ts +0 -20
- package/dist/types/components/business/bcVisual/components/setting/extendItem.vue.d.ts +0 -13
- package/dist/types/components/business/bcVisual/components/setting/setting.vue.d.ts +0 -3
- package/dist/types/components/business/bcVisual/components/table/table.vue.d.ts +0 -6
- package/dist/types/components/business/bcVisual/components/updateName/popup.vue.d.ts +0 -17
- package/dist/types/components/business/bcVisual/components/updateSql/addCondition.vue.d.ts +0 -23
- package/dist/types/components/business/bcVisual/components/updateSql/nodeTree/index.vue.d.ts +0 -21
- package/dist/types/components/business/bcVisual/components/updateSql/nodeTree/nodeTree.vue.d.ts +0 -19
- package/dist/types/components/business/bcVisual/components/updateSql/popup.vue.d.ts +0 -17
- package/dist/types/plugins/index.d.ts +0 -33
- package/dist/types/types/system.d.ts +0 -14
- package/dist/types/utils/authFunction.d.ts +0 -18
- package/dist/types/utils/build.d.ts +0 -11
- package/dist/types/utils/commonFunction.d.ts +0 -29
- package/dist/types/utils/file.d.ts +0 -6
- package/dist/types/utils/getStyleSheets.d.ts +0 -11
- package/dist/types/utils/index.d.ts +0 -29
- package/dist/types/utils/lodash.d.ts +0 -3
- package/dist/types/utils/request/index.d.ts +0 -6
- package/dist/types/utils/request/request.d.ts +0 -7
- package/dist/types/utils/setIconfont.d.ts +0 -11
- package/dist/types/utils/showMessage.d.ts +0 -6
- package/dist/types/utils/showMessageBox.d.ts +0 -6
- package/dist/types/utils/showNotification.d.ts +0 -6
- package/dist/useConfigInfo-2zEYLSSs.js +0 -1
- package/dist/useConfigInfo-PTkkdx-l.mjs +0 -19
- package/dist/user-B0eLT8MH.mjs +0 -246
- package/dist/user-DFm8D_Wg.js +0 -1
- package/dist/userNews-CuTBYfL9.js +0 -1
- package/dist/userNews-DTsXXPhl.mjs +0 -72
- package/dist/userSelect-BzDfBump.mjs +0 -4
- package/dist/userSelect-DrvmDzYf.js +0 -1
- package/dist/userSelect.vue_vue_type_script_setup_true_lang-CmxF68fq.js +0 -1
- package/dist/userSelect.vue_vue_type_script_setup_true_lang-DDVp4ZiP.mjs +0 -100
- package/dist/vertical-CNKTv1Fx.js +0 -1
- package/dist/vertical-CYqf_G2I.mjs +0 -133
- /package/dist/types/{components → src/components}/business/bcSystemAuth/components/fastSet/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/business/bcSystemAuth/components/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/business/bcSystemAuth/components/widget/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/business/bcSystemField/components/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/business/bcSystemField/components/widget/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/business/bcTable/components/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/business/bcTable/components/query/components/sortForm/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/business/bcTable/components/table/components/sortColumn/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/business/bcVisual/components/updateName/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/business/bcVisual/type.d.ts +0 -0
- /package/dist/types/{types → src/types}/formItem/button.d.ts +0 -0
- /package/dist/types/{types → src/types}/formItem/index.d.ts +0 -0
- /package/dist/types/{types → src/types}/index.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/cfprint.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/crypto.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/device_info.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/formatTime.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/request/interceptors/request/index.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/request/interceptors/response/index.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/shortcutList.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/theme.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/toolsValidate.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/update.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/watermark.d.ts +0 -0
|
@@ -1,2695 +0,0 @@
|
|
|
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-B8p9_cpY.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-DtfFP8IO.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
|
-
};
|