Replace unmaintained HammerJS dependency with VueUse

Ref: https://github.com/hammerjs/hammer.js/issues/1278

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2023-03-15 17:19:25 +01:00 коммит произвёл Ferdinand Thiessen
Родитель 4630c9b9aa
Коммит 0917f4b747
4 изменённых файлов: 86 добавлений и 189 удалений

204
package-lock.json сгенерированный
Просмотреть файл

@ -24,13 +24,13 @@
"@nextcloud/vue-select": "^3.21.2",
"@skjnldsv/sanitize-svg": "^1.0.2",
"@vueuse/components": "^10.0.2",
"@vueuse/core": "^10.1.2",
"clone": "^2.1.2",
"debounce": "1.2.1",
"emoji-mart-vue-fast": "^12.0.1",
"escape-html": "^1.0.3",
"floating-vue": "^1.0.0-beta.19",
"focus-trap": "^7.1.0",
"hammerjs": "^2.0.8",
"linkify-string": "^4.0.0",
"md5": "^2.3.0",
"node-polyfill-webpack-plugin": "^2.0.1",
@ -2032,9 +2032,9 @@
"integrity": "sha512-EvYTiXet5XqweYGClEmpu3BoxmsQ4hkj3QaYA6qEnigCWffTP3vNRwBReTdrwDwo7OoJ3wM8Uoe9Uk4n+d4hfg=="
},
"node_modules/@floating-ui/dom": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.2.8.tgz",
"integrity": "sha512-XLwhYV90MxiHDq6S0rzFZj00fnDM+A1R9jhSioZoMsa7G0Q0i+Q4x40ajR8FHSdYDE1bgjG45mIWe6jtv9UPmg==",
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.2.7.tgz",
"integrity": "sha512-DyqylONj1ZaBnzj+uBnVfzdjjCkFCL2aA9ESHLyUOGSqb03RpbLMImP1ekIQXYs4KLk9jAjJfZAU8hXfWSahEg==",
"dependencies": {
"@floating-ui/core": "^1.2.6"
}
@ -3178,8 +3178,8 @@
},
"node_modules/@nextcloud/webpack-vue-config": {
"version": "5.5.1",
"resolved": "git+ssh://git@github.com/nextcloud/webpack-vue-config.git#92927e0a1744690648ecb08ff5a5ad8fdfb5d079",
"integrity": "sha512-KseLhvnKvVPqpQOJa1sOYG8p7sPJ3RsRnb+X6spUJqgVc70ha9Ize9amrqah0qMI6cgKrBkxqmpcakfXp7JV9A==",
"resolved": "git+ssh://git@github.com/nextcloud/webpack-vue-config.git#d1717d4b597e30af0ca6f1ad957e9dfc88e03c42",
"integrity": "sha512-2Q3kPnsvkKeENG3rruTjAE1oz/9w0u5QMKO8oh9arL2TIO2aswkDKBtkmu6q7Po3tE+3B2f+ggHq1PNkhtwu6w==",
"dev": true,
"license": "AGPL-3.0-or-later",
"engines": {
@ -5844,16 +5844,6 @@
"node": ">=8"
}
},
"node_modules/bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"dependencies": {
"file-uri-to-path": "1.0.0"
}
},
"node_modules/blob-util": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz",
@ -8146,9 +8136,9 @@
"dev": true
},
"node_modules/cypress": {
"version": "12.12.0",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-12.12.0.tgz",
"integrity": "sha512-UU5wFQ7SMVCR/hyKok/KmzG6fpZgBHHfrXcHzDmPHWrT+UUetxFzQgt7cxCszlwfozckzwkd22dxMwl/vNkWRw==",
"version": "12.11.0",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-12.11.0.tgz",
"integrity": "sha512-TJE+CCWI26Hwr5Msb9GpQhFLubdYooW0fmlPwTsfiyxmngqc7+SZGLPeIkj2dTSSZSEtpQVzOzvcnzH0o8G7Vw==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
@ -10911,13 +10901,6 @@
"url": "https://opencollective.com/webpack"
}
},
"node_modules/file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"node_modules/filesize": {
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/filesize/-/filesize-8.0.7.tgz",
@ -11122,11 +11105,11 @@
}
},
"node_modules/focus-trap": {
"version": "7.4.1",
"resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.4.1.tgz",
"integrity": "sha512-rnXP5ERIjlo1gEZp7hQb4ekYqUxRuSDQeyWvxhahH3/GkWtd8h8g1C8Eu/KGpuvbUWNVeogK0kuzzrM4u2Z9jA==",
"version": "7.4.0",
"resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.4.0.tgz",
"integrity": "sha512-yI7FwUqU4TVb+7t6PaQ3spT/42r/KLEi8mtdGoQo2li/kFzmu9URmalTvw7xCCJtSOyhBxscvEAmvjeN9iHARg==",
"dependencies": {
"tabbable": "^6.1.2"
"tabbable": "^6.1.1"
}
},
"node_modules/follow-redirects": {
@ -11547,20 +11530,6 @@
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"dev": true
},
"node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@ -11762,15 +11731,15 @@
"dev": true
},
"node_modules/glob": {
"version": "10.2.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.2.4.tgz",
"integrity": "sha512-fDboBse/sl1oXSLhIp0FcCJgzW9KmhC/q8ULTKC82zc+DL3TL7FNb8qlt5qqXN53MsKEUSIcb+7DLmEygOE5Yw==",
"version": "10.2.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.2.2.tgz",
"integrity": "sha512-Xsa0BcxIC6th9UwNjZkhrMtNo/MnyRL8jGCP+uEwhA5oFOCY1f2s1/oNKY47xQ0Bg5nkjsfAEIej1VeH62bDDQ==",
"dev": true,
"dependencies": {
"foreground-child": "^3.1.0",
"jackspeak": "^2.0.3",
"minimatch": "^9.0.0",
"minipass": "^5.0.0 || ^6.0.0",
"minipass": "^5.0.0",
"path-scurry": "^1.7.0"
},
"bin": {
@ -12033,14 +12002,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/hammerjs": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
"integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/handle-thing": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz",
@ -17500,13 +17461,6 @@
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
"dev": true
},
"node_modules/nan": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",
"dev": true,
"optional": true
},
"node_modules/nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
@ -22547,9 +22501,9 @@
"dev": true
},
"node_modules/tabbable": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.1.2.tgz",
"integrity": "sha512-qCN98uP7i9z0fIS4amQ5zbGBOq+OSigYeGvPy7NDk8Y9yncqDZ9pRPgfsc2PJIVM9RrJj7GIfuRgmjoUU9zTHQ=="
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.1.1.tgz",
"integrity": "sha512-4kl5w+nCB44EVRdO0g/UGoOp3vlwgycUVtkk/7DPyeLZUCuNFFKCFG6/t/DgHLrUPHjrZg6s5tNm+56Q2B0xyg=="
},
"node_modules/table": {
"version": "6.8.1",
@ -24267,9 +24221,9 @@
}
},
"node_modules/vue-eslint-parser": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.3.0.tgz",
"integrity": "sha512-48IxT9d0+wArT1+3wNIy0tascRoywqSUe2E1YalIC1L8jsUGe5aJQItWfRok7DVFGz3UYvzEI7n5wiTXsCMAcQ==",
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.2.1.tgz",
"integrity": "sha512-tPOex4n6jit4E7h68auOEbDMwE58XiP4dylfaVTCOVCouR45g+QFDBjgIdEU52EXJxKyjgh91dLfN2rxUcV0bQ==",
"dev": true,
"dependencies": {
"debug": "^4.3.4",
@ -25033,25 +24987,6 @@
"node": ">=6"
}
},
"node_modules/vue-styleguidist/node_modules/fsevents": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"dependencies": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
},
"engines": {
"node": ">= 4.0"
}
},
"node_modules/vue-styleguidist/node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
@ -28686,9 +28621,9 @@
"integrity": "sha512-EvYTiXet5XqweYGClEmpu3BoxmsQ4hkj3QaYA6qEnigCWffTP3vNRwBReTdrwDwo7OoJ3wM8Uoe9Uk4n+d4hfg=="
},
"@floating-ui/dom": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.2.8.tgz",
"integrity": "sha512-XLwhYV90MxiHDq6S0rzFZj00fnDM+A1R9jhSioZoMsa7G0Q0i+Q4x40ajR8FHSdYDE1bgjG45mIWe6jtv9UPmg==",
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.2.7.tgz",
"integrity": "sha512-DyqylONj1ZaBnzj+uBnVfzdjjCkFCL2aA9ESHLyUOGSqb03RpbLMImP1ekIQXYs4KLk9jAjJfZAU8hXfWSahEg==",
"requires": {
"@floating-ui/core": "^1.2.6"
}
@ -29551,10 +29486,10 @@
"requires": {}
},
"@nextcloud/webpack-vue-config": {
"version": "git+ssh://git@github.com/nextcloud/webpack-vue-config.git#92927e0a1744690648ecb08ff5a5ad8fdfb5d079",
"integrity": "sha512-KseLhvnKvVPqpQOJa1sOYG8p7sPJ3RsRnb+X6spUJqgVc70ha9Ize9amrqah0qMI6cgKrBkxqmpcakfXp7JV9A==",
"version": "git+ssh://git@github.com/nextcloud/webpack-vue-config.git#d1717d4b597e30af0ca6f1ad957e9dfc88e03c42",
"integrity": "sha512-2Q3kPnsvkKeENG3rruTjAE1oz/9w0u5QMKO8oh9arL2TIO2aswkDKBtkmu6q7Po3tE+3B2f+ggHq1PNkhtwu6w==",
"dev": true,
"from": "@nextcloud/webpack-vue-config@github:nextcloud/webpack-vue-config#92927e0a1744690648ecb08ff5a5ad8fdfb5d079",
"from": "@nextcloud/webpack-vue-config@github:nextcloud/webpack-vue-config#master",
"requires": {}
},
"@nicolo-ribaudo/eslint-scope-5-internals": {
@ -31643,16 +31578,6 @@
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true
},
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
},
"blob-util": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz",
@ -33443,9 +33368,9 @@
"dev": true
},
"cypress": {
"version": "12.12.0",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-12.12.0.tgz",
"integrity": "sha512-UU5wFQ7SMVCR/hyKok/KmzG6fpZgBHHfrXcHzDmPHWrT+UUetxFzQgt7cxCszlwfozckzwkd22dxMwl/vNkWRw==",
"version": "12.11.0",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-12.11.0.tgz",
"integrity": "sha512-TJE+CCWI26Hwr5Msb9GpQhFLubdYooW0fmlPwTsfiyxmngqc7+SZGLPeIkj2dTSSZSEtpQVzOzvcnzH0o8G7Vw==",
"dev": true,
"requires": {
"@cypress/request": "^2.88.10",
@ -35592,13 +35517,6 @@
}
}
},
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"filesize": {
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/filesize/-/filesize-8.0.7.tgz",
@ -35775,11 +35693,11 @@
}
},
"focus-trap": {
"version": "7.4.1",
"resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.4.1.tgz",
"integrity": "sha512-rnXP5ERIjlo1gEZp7hQb4ekYqUxRuSDQeyWvxhahH3/GkWtd8h8g1C8Eu/KGpuvbUWNVeogK0kuzzrM4u2Z9jA==",
"version": "7.4.0",
"resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.4.0.tgz",
"integrity": "sha512-yI7FwUqU4TVb+7t6PaQ3spT/42r/KLEi8mtdGoQo2li/kFzmu9URmalTvw7xCCJtSOyhBxscvEAmvjeN9iHARg==",
"requires": {
"tabbable": "^6.1.2"
"tabbable": "^6.1.1"
}
},
"follow-redirects": {
@ -36101,13 +36019,6 @@
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"dev": true
},
"fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"optional": true
},
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@ -36266,15 +36177,15 @@
"dev": true
},
"glob": {
"version": "10.2.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.2.4.tgz",
"integrity": "sha512-fDboBse/sl1oXSLhIp0FcCJgzW9KmhC/q8ULTKC82zc+DL3TL7FNb8qlt5qqXN53MsKEUSIcb+7DLmEygOE5Yw==",
"version": "10.2.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.2.2.tgz",
"integrity": "sha512-Xsa0BcxIC6th9UwNjZkhrMtNo/MnyRL8jGCP+uEwhA5oFOCY1f2s1/oNKY47xQ0Bg5nkjsfAEIej1VeH62bDDQ==",
"dev": true,
"requires": {
"foreground-child": "^3.1.0",
"jackspeak": "^2.0.3",
"minimatch": "^9.0.0",
"minipass": "^5.0.0 || ^6.0.0",
"minipass": "^5.0.0",
"path-scurry": "^1.7.0"
},
"dependencies": {
@ -36463,11 +36374,6 @@
"duplexer": "^0.1.2"
}
},
"hammerjs": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
"integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ=="
},
"handle-thing": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz",
@ -40486,13 +40392,6 @@
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
"dev": true
},
"nan": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",
"dev": true,
"optional": true
},
"nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
@ -44378,9 +44277,9 @@
"dev": true
},
"tabbable": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.1.2.tgz",
"integrity": "sha512-qCN98uP7i9z0fIS4amQ5zbGBOq+OSigYeGvPy7NDk8Y9yncqDZ9pRPgfsc2PJIVM9RrJj7GIfuRgmjoUU9zTHQ=="
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.1.1.tgz",
"integrity": "sha512-4kl5w+nCB44EVRdO0g/UGoOp3vlwgycUVtkk/7DPyeLZUCuNFFKCFG6/t/DgHLrUPHjrZg6s5tNm+56Q2B0xyg=="
},
"table": {
"version": "6.8.1",
@ -45742,9 +45641,9 @@
}
},
"vue-eslint-parser": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.3.0.tgz",
"integrity": "sha512-48IxT9d0+wArT1+3wNIy0tascRoywqSUe2E1YalIC1L8jsUGe5aJQItWfRok7DVFGz3UYvzEI7n5wiTXsCMAcQ==",
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.2.1.tgz",
"integrity": "sha512-tPOex4n6jit4E7h68auOEbDMwE58XiP4dylfaVTCOVCouR45g+QFDBjgIdEU52EXJxKyjgh91dLfN2rxUcV0bQ==",
"dev": true,
"requires": {
"debug": "^4.3.4",
@ -46332,17 +46231,6 @@
"locate-path": "^3.0.0"
}
},
"fsevents": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
},
"glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",

Просмотреть файл

@ -55,13 +55,13 @@
"@nextcloud/vue-select": "^3.21.2",
"@skjnldsv/sanitize-svg": "^1.0.2",
"@vueuse/components": "^10.0.2",
"@vueuse/core": "^10.1.2",
"clone": "^2.1.2",
"debounce": "1.2.1",
"emoji-mart-vue-fast": "^12.0.1",
"escape-html": "^1.0.3",
"floating-vue": "^1.0.0-beta.19",
"focus-trap": "^7.1.0",
"hammerjs": "^2.0.8",
"linkify-string": "^4.0.0",
"md5": "^2.3.0",
"node-polyfill-webpack-plugin": "^2.0.1",

Просмотреть файл

@ -120,11 +120,11 @@ import isMobile from '../../mixins/isMobile/index.js'
import { getBuilder } from '@nextcloud/browser-storage'
import { emit } from '@nextcloud/event-bus'
import Hammer from 'hammerjs'
import 'splitpanes/dist/splitpanes.css'
import { useSwipe } from '@vueuse/core'
import { Splitpanes, Pane } from 'splitpanes'
import 'splitpanes/dist/splitpanes.css'
const browserStorage = getBuilder('nextcloud').persist().build()
/**
@ -214,8 +214,9 @@ export default {
data() {
return {
contentHeight: 0,
hasList: false,
swiping: {},
listPaneSize: this.restorePaneConfig(),
}
},
@ -271,33 +272,35 @@ export default {
mounted() {
if (this.allowSwipeNavigation) {
this.mc = new Hammer(this.$el, { cssProps: { userSelect: 'text' } })
this.mc.on('swipeleft swiperight', this.handleSwipe)
this.swiping = useSwipe(this.$el, {
onSwipeEnd: this.handleSwipe,
})
}
this.checkListSlot()
this.restorePaneConfig()
},
beforeDestroy() {
this.mc.off('swipeleft swiperight', this.handleSwipe)
},
methods: {
// handle the swipe event
handleSwipe(e) {
/**
* handle the swipe event
*
* @param {TouchEvent} e The touch event
* @param {import('@vueuse/core').SwipeDirection} direction The swipe direction of the event
*/
handleSwipe(e, direction) {
const minSwipeX = 70
const touchzone = 40
const startX = e.srcEvent.pageX - e.deltaX
const hasEnoughDistance = Math.abs(e.deltaX) > minSwipeX
if (hasEnoughDistance && startX < touchzone) {
emit('toggle-navigation', {
open: true,
})
} else if (hasEnoughDistance && startX < touchzone + 300) {
emit('toggle-navigation', {
open: false,
})
const touchZone = 300
if (Math.abs(this.swiping.lengthX) > minSwipeX) {
if (this.swiping.coordsStart.x < (touchZone / 2) && direction === 'right') {
emit('toggle-navigation', {
open: true,
})
} else if (this.swiping.coordsStart.x < touchZone * 1.5 && direction === 'left') {
emit('toggle-navigation', {
open: false,
})
}
}
},

Просмотреть файл

@ -322,7 +322,7 @@ import Pause from 'vue-material-design-icons/Pause.vue'
import Play from 'vue-material-design-icons/Play.vue'
import { createFocusTrap } from 'focus-trap'
import Hammer from 'hammerjs'
import { useSwipe } from '@vueuse/core'
export default {
name: 'NcModal',
@ -552,9 +552,8 @@ export default {
mounted() {
// init clear view
this.useFocusTrap()
this.mc = new Hammer(this.$refs.mask)
this.mc.on('swipeleft swiperight', e => {
this.handleSwipe(e)
useSwipe(this.$refs.mask, {
onSwipeEnd: this.handleSwipe,
})
if (this.container) {
@ -629,12 +628,19 @@ export default {
break
}
},
handleSwipe(e) {
/**
* handle the swipe event
*
* @param {TouchEvent} e The touch event
* @param {import('@vueuse/core').SwipeDirection} direction Swipe direction
*/
handleSwipe(e, direction) {
if (this.enableSwipe) {
if (e.type === 'swipeleft') {
if (direction === 'left') {
// swiping to left to go to the next item
this.next(e)
} else if (e.type === 'swiperight') {
} else if (direction === 'right') {
// swiping to right to go back to the previous item
this.previous(e)
}