From 1285dc18d395d3a804e4960b0112a4af2d315895 Mon Sep 17 00:00:00 2001 From: Chirag Chhatrala <60499540+chiragchhatrala@users.noreply.github.com> Date: Fri, 3 Jan 2025 20:37:58 +0530 Subject: [PATCH] Support for Barcode reader (#650) * Add Barcode Input Component and Integrate Quagga for Scanning - Introduced a new BarcodeInput component for scanning barcodes using the Quagga library. - Updated package.json and package-lock.json to include Quagga as a dependency. - Enhanced form themes to accommodate the new BarcodeInput component. - Added localization support for barcode scanning actions in English. - Updated blocks_types.json to register the new barcode input type. These changes improve the application's functionality by allowing users to scan barcodes directly within forms, enhancing user experience and data input efficiency. * Update Barcode scanner UI * Barcode decoder as user selection * improve barcode --- client/components/forms/BarcodeInput.vue | 171 ++++++ .../forms/components/CameraUpload.vue | 55 +- .../components/forms/components/VSelect.vue | 10 +- .../components/open/forms/OpenFormField.vue | 7 +- .../forms/fields/components/FieldOptions.vue | 34 +- client/data/blocks_types.json | 9 + client/i18n/lang/ar.json | 3 + client/i18n/lang/bn.json | 3 + client/i18n/lang/de.json | 3 + client/i18n/lang/en.json | 3 + client/i18n/lang/es.json | 3 + client/i18n/lang/fr.json | 3 + client/i18n/lang/hi.json | 3 + client/i18n/lang/ja.json | 3 + client/i18n/lang/jv.json | 3 + client/i18n/lang/ko.json | 3 + client/i18n/lang/mr.json | 3 + client/i18n/lang/pa.json | 3 + client/i18n/lang/pt.json | 3 + client/i18n/lang/ru.json | 3 + client/i18n/lang/ta.json | 3 + client/i18n/lang/te.json | 3 + client/i18n/lang/tr.json | 3 + client/i18n/lang/ur.json | 3 + client/i18n/lang/vi.json | 3 + client/i18n/lang/zh.json | 3 + client/lib/forms/themes/form-themes.js | 12 +- client/package-lock.json | 495 +++++++++++++++++- client/package.json | 1 + 29 files changed, 839 insertions(+), 15 deletions(-) create mode 100644 client/components/forms/BarcodeInput.vue diff --git a/client/components/forms/BarcodeInput.vue b/client/components/forms/BarcodeInput.vue new file mode 100644 index 00000000..e652af87 --- /dev/null +++ b/client/components/forms/BarcodeInput.vue @@ -0,0 +1,171 @@ + + + + + \ No newline at end of file diff --git a/client/components/forms/components/CameraUpload.vue b/client/components/forms/components/CameraUpload.vue index 39184cb1..07eb11f3 100644 --- a/client/components/forms/components/CameraUpload.vue +++ b/client/components/forms/components/CameraUpload.vue @@ -21,6 +21,7 @@ class="p-2 px-4 flex items-center justify-center text-xs space-x-2" > @@ -98,9 +99,10 @@