From e23b8ac8f7e641cd909c3491b3d6eefda46a38fa Mon Sep 17 00:00:00 2001 From: danielswiatek Date: Sun, 8 Sep 2024 00:06:45 +0200 Subject: [PATCH] refactor: Add intl-tel-input package for phone number input --- frontend/package.json | 1 + .../BasicInputs/BasicInputPhoneNumber.vue | 92 +++++++++++++++++++ .../components/UIComponents/KontaktItem.vue | 3 +- .../forms/person/FormContactGeneral.vue | 4 +- package-lock.json | 7 ++ 5 files changed, 104 insertions(+), 3 deletions(-) create mode 100644 frontend/src/components/BasicInputs/BasicInputPhoneNumber.vue diff --git a/frontend/package.json b/frontend/package.json index 8c3ffb4e..50481dd3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -28,6 +28,7 @@ "@vueuse/core": "^10.6.1", "crypto-js": "^4.2.0", "http2-proxy": "^5.0.53", + "intl-tel-input": "^24.4.0", "remixicon": "^3.5.0", "socket.io-client": "^4.7.2", "vue": "^3.4.18", diff --git a/frontend/src/components/BasicInputs/BasicInputPhoneNumber.vue b/frontend/src/components/BasicInputs/BasicInputPhoneNumber.vue new file mode 100644 index 00000000..f5dbfa78 --- /dev/null +++ b/frontend/src/components/BasicInputs/BasicInputPhoneNumber.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/frontend/src/components/UIComponents/KontaktItem.vue b/frontend/src/components/UIComponents/KontaktItem.vue index 0a02538c..a85a08f6 100644 --- a/frontend/src/components/UIComponents/KontaktItem.vue +++ b/frontend/src/components/UIComponents/KontaktItem.vue @@ -3,6 +3,7 @@ import { TrashIcon } from '@heroicons/vue/24/outline' import { ref, watch } from 'vue' import BasicCheckbox from '../BasicInputs/BasicCheckbox.vue' +import BasicInputPhoneNumber from '../BasicInputs/BasicInputPhoneNumber.vue' import BasicInput from '@/components/BasicInputs/BasicInput.vue' import type { TKontaktSchema } from '@codeanker/api' @@ -45,7 +46,7 @@ watch( placeholder="Nachname eingeben" required /> - - = 0.4" } }, + "node_modules/intl-tel-input": { + "version": "24.4.0", + "resolved": "https://registry.npmjs.org/intl-tel-input/-/intl-tel-input-24.4.0.tgz", + "integrity": "sha512-2ownVbJ//ccQSoZM6uEIe3THWiIuQqY+NSFTW89ttMzazSSEJVFUtsnxOKQcytwg8ZtcsFh2of/PhcuiZDNzBQ==", + "license": "MIT" + }, "node_modules/is-array-buffer": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz",