@sapui5/sap.ndc 1.96.0 → 1.96.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ndc",
3
- "version": "1.96.0",
3
+ "version": "1.96.2",
4
4
  "description": "SAPUI5 Library sap.ndc",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -5,7 +5,7 @@
5
5
  <vendor>SAP SE</vendor>
6
6
  <copyright>SAPUI5
7
7
  * (c) Copyright 2009-2021 SAP SE. All rights reserved.</copyright>
8
- <version>1.96.0</version>
8
+ <version>1.96.2</version>
9
9
 
10
10
  <documentation>SAPUI5 library with controls with native device capabilities.</documentation>
11
11
 
@@ -42,11 +42,13 @@ sap.ui.define([
42
42
  *
43
43
  * Here is an example of how to trigger the scan function of BarcodeScanner:
44
44
  * <pre>
45
- * sap.ndc.BarcodeScanner.scan(
45
+ * sap.ui.require(["sap/ndc/BarcodeScanner"], function(BarcodeScanner) {
46
+ * BarcodeScanner.scan(
46
47
  * function (oResult) { / * process scan result * / },
47
48
  * function (oError) { / * handle scan error * / },
48
49
  * function (oResult) { / * handle input dialog change * / }
49
50
  * );
51
+ * });
50
52
  * </pre>
51
53
  *
52
54
  * @author SAP SE
@@ -330,6 +332,7 @@ sap.ui.define([
330
332
  }
331
333
  }),
332
334
  afterClose: function() {
335
+ closeZXingScanContain();
333
336
  oScanDialog.destroyContent();
334
337
  oScanDialog.destroy();
335
338
  oScanDialog = null;
@@ -510,6 +513,7 @@ sap.ui.define([
510
513
  if (oZXingScannerAPI) {
511
514
  oZXingScannerAPI.reset();
512
515
  oZXingScannerAPI.stopContinuousDecode();
516
+ oZXingScannerAPI.reader.reset();
513
517
  }
514
518
  }
515
519
 
@@ -521,10 +525,6 @@ sap.ui.define([
521
525
  * Starts the bar code scanning process either showing the live input from the camera or displaying a dialog
522
526
  * to enter the value directly if the bar code scanning feature is not available.
523
527
  *
524
- * <pre>
525
- * sap.ndc.BarcodeScanner.scan(fnSuccess, fnFail, fnLiveUpdate, dialogTitle)
526
- * </pre>
527
- *
528
528
  * The bar code scanning is done asynchronously. When it is triggered, this function returns without waiting for
529
529
  * the scanning process to finish. The applications have to provide callback functions to react to the events of
530
530
  * a successful scanning, an error during scanning, and the live input on the dialog.
@@ -535,21 +535,23 @@ sap.ui.define([
535
535
  * dialog's input field. An example:
536
536
  *
537
537
  * <pre>
538
- * sap.ndc.BarcodeScanner.scan(
539
- * function (mResult) {
540
- * alert("We got a bar code\n" +
541
- * "Result: " + mResult.text + "\n" +
542
- * "Format: " + mResult.format + "\n" +
543
- * "Cancelled: " + mResult.cancelled);
544
- * },
545
- * function (Error) {
546
- * alert("Scanning failed: " + Error);
547
- * },
548
- * function (mParams) {
549
- * alert("Value entered: " + mParams.newValue);
550
- * },
551
- * "Enter Product Bar Code"
552
- * );
538
+ * sap.ui.require(["sap/ndc/BarcodeScanner"], function(BarcodeScanner) {
539
+ * BarcodeScanner.scan(
540
+ * function (mResult) {
541
+ * alert("We got a bar code\n" +
542
+ * "Result: " + mResult.text + "\n" +
543
+ * "Format: " + mResult.format + "\n" +
544
+ * "Cancelled: " + mResult.cancelled);
545
+ * },
546
+ * function (Error) {
547
+ * alert("Scanning failed: " + Error);
548
+ * },
549
+ * function (mParams) {
550
+ * alert("Value entered: " + mParams.newValue);
551
+ * },
552
+ * "Enter Product Bar Code"
553
+ * );
554
+ * });
553
555
  * </pre>
554
556
  *
555
557
  * @param {function} [fnSuccess] Function to be called when the scanning is done or cancelled
@@ -32,7 +32,7 @@ sap.ui.define(['sap/m/library', 'sap/ui/core/library'],
32
32
  ],
33
33
  elements: [],
34
34
  noLibraryCSS: true,
35
- version: "1.96.0"
35
+ version: "1.96.2"
36
36
  });
37
37
 
38
38
  return sap.ndc;
@@ -8839,7 +8839,11 @@
8839
8839
  if (readers.length === 0) {
8840
8840
  readers.push(new EAN13Reader());
8841
8841
  // UPC-A is covered by EAN-13
8842
- readers.push(new UPCAReader());
8842
+ // ##### BEGIN: MODIFIED BY SAP
8843
+ // Add UPCAReader() into readers array
8844
+ // see https://github.com/zxing-js/library/pull/304
8845
+ readers.push(new UPCAReader());
8846
+ // ##### END: MODIFIED BY SAP
8843
8847
  readers.push(new EAN8Reader());
8844
8848
  readers.push(new UPCEReader());
8845
8849
  }