Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Component: ui5-barcode-scanner #3187

Closed
ilhan007 opened this issue Apr 26, 2021 · 1 comment
Closed

New Component: ui5-barcode-scanner #3187

ilhan007 opened this issue Apr 26, 2021 · 1 comment

Comments

@ilhan007
Copy link
Member

ilhan007 commented Apr 26, 2021

Background

The SAP Fiori Client will be soon deprecated and it used to offer a Barcode scanner widget.
To deprecate the SAP Fiori Client we first need to provide the B

Solution
Barcode Scanner as a web component - a thin layer around the third-party ZXing library.

API

Methods

  • open
  • close

Events

  • "scan-success"
  • "scan-error"

Usage

<ui5-button id="btn"></ui5-button>

<ui5-barcode-scanner id="scanner"></ui5-barcode-scanner>
// open scanner from arbitrary element
btn.addEventListener("click", () => {
       scanner.open();
});

// react on scan-success
scanner.addEventListener("scan-success", (e) => {
  const result = e.detail.result;
  scanner.close();
});

// react on scan-error
scanner.addEventListener("scan-error", (e) => {
 scanner.close();
});
@ilhan007 ilhan007 added this to the 1.0.0-rc.17 milestone Apr 26, 2021
@ilhan007 ilhan007 changed the title New Component: Barcode Scanner New Component: ui5-barcode-scanner Apr 26, 2021
@ilhan007
Copy link
Member Author

ilhan007 commented Aug 4, 2021

Closed with: #3489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 1.0.0-rc.15 (released Aug)
Development

No branches or pull requests

3 participants