mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-11 09:40:43 +01:00
1 line
2.2 KiB
Plaintext
1 line
2.2 KiB
Plaintext
{"version":3,"file":"SearchBox-CH3IEr_n.js","sources":["../../../resources/js/components/SearchBox.vue"],"sourcesContent":["<script setup>\n const props = defineProps({\n keyword: String,\n hasNoBackground: {\n type: Boolean,\n default: false\n },\n placeholder: String,\n })\n const searchInput = ref(null)\n\n onMounted(() => {\n document.addEventListener('keydown', keyListener)\n })\n\n onUnmounted(() => {\n document.removeEventListener('keydown', keyListener)\n })\n\n /**\n * Attach an event listen for ctrl+F\n */\n function keyListener(e) {\n if (e.key === \"f\" && (e.ctrlKey || e.metaKey)) {\n e.preventDefault();\n searchInput.value?.focus()\n }\n }\n</script>\n\n<template>\n <div role=\"search\" class=\"field\">\n <div class=\"control has-icons-right\">\n <input\n ref=\"searchInput\"\n id=\"txtSearch\"\n type=\"search\"\n tabindex=\"1\"\n :aria-label=\"$t('commons.search')\"\n :title=\"$t('commons.search')\"\n :placeholder=\"placeholder\"\n class=\"input is-rounded is-search\"\n :class=\"{ 'has-no-background': hasNoBackground }\"\n :value=\"keyword\"\n v-on:keyup=\"$emit('update:keyword', $event.target.value)\">\n <span class=\"icon is-small is-right\">\n <button type=\"button\" v-if=\"keyword != ''\" id=\"btnClearSearch\" tabindex=\"1\" :title=\"$t('commons.clear_search')\" class=\"clear-selection delete\" @click=\"$emit('update:keyword','')\"></button>\n <FontAwesomeIcon v-else :icon=\"['fas', 'search']\" />\n </span>\n </div>\n </div>\n</template>"],"names":["searchInput","ref","onMounted","keyListener","onUnmounted","_a"],"mappings":"idASI,MAAMA,EAAcC,EAAI,IAAI,EAE5BC,EAAU,IAAM,CACZ,SAAS,iBAAiB,UAAWC,CAAW,CACnD,CAAA,EAEDC,EAAY,IAAM,CACd,SAAS,oBAAoB,UAAWD,CAAW,CACtD,CAAA,EAKD,SAASA,EAAY,EAAG,OAChB,EAAE,MAAQ,MAAQ,EAAE,SAAW,EAAE,WACjC,EAAE,eAAgB,GAClBE,EAAAL,EAAY,QAAZ,MAAAK,EAAmB,QAE/B"} |