From 99fee68057882828d61b31145715c901bf9b8e72 Mon Sep 17 00:00:00 2001 From: Paulo Bernardo Date: Mon, 6 Nov 2023 16:15:48 -0300 Subject: [PATCH] feat: prevent emoji in whatsapp template button --- src/components/BaseInput.vue | 61 +++++++++++++++++++ .../FormTabContentButtons.vue | 13 ++-- 2 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 src/components/BaseInput.vue diff --git a/src/components/BaseInput.vue b/src/components/BaseInput.vue new file mode 100644 index 00000000..111593ce --- /dev/null +++ b/src/components/BaseInput.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/src/components/whatsAppTemplates/FormTabContentButtons.vue b/src/components/whatsAppTemplates/FormTabContentButtons.vue index d1a9aaf3..2c429875 100644 --- a/src/components/whatsAppTemplates/FormTabContentButtons.vue +++ b/src/components/whatsAppTemplates/FormTabContentButtons.vue @@ -49,14 +49,15 @@ /> - @@ -111,13 +112,14 @@ currentButtons[index].button_type === 'URL', }" > -
import { mapGetters } from 'vuex'; import { getCountries, getCountryCallingCode } from 'libphonenumber-js'; + import BaseInput from '../BaseInput.vue'; export default { name: 'FormTabContentButtons', + components: { BaseInput }, props: { disableInputs: { type: Boolean, @@ -210,6 +214,7 @@ }, data() { return { + EMOJI_REGEX: /\p{Emoji_Presentation}/gu, buttonOptions: [ { value: '',