Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scandit-capacitor-datacapture-barcode

Package Overview
Dependencies
Maintainers
3
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scandit-capacitor-datacapture-barcode - npm Package Compare versions

Comparing version 6.17.2 to 6.18.0-beta.1

android/src/main/java/com/scandit/capacitor/datacapture/barcode/count/callbacks/BarcodeCountCaptureListCallback.kt

1

dist/esm/scandit-capacitor-datacapture-barcode/src/definitions.js

@@ -0,1 +1,2 @@

export {};
//# sourceMappingURL=definitions.js.map

@@ -0,2 +1,3 @@

export * from './definitions';
export * from './web';
//# sourceMappingURL=index.js.map

@@ -48,9 +48,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class SymbologyDescription {
constructor(symbology) {
if (!symbology) {
return;
}
return SymbologyDescription.all[SymbologyDescription.all
.findIndex(description => description.identifier === symbology)];
}
static get all() {

@@ -86,2 +79,9 @@ return this.defaults().SymbologyDescriptions;

}
constructor(symbology) {
if (!symbology) {
return;
}
return SymbologyDescription.all[SymbologyDescription.all
.findIndex(description => description.identifier === symbology)];
}
}

@@ -246,2 +246,29 @@ export class SymbologySettings extends DefaultSerializeable {

}
export class TargetBarcode extends DefaultSerializeable {
get data() {
return this._data;
}
get quantity() {
return this._quantity;
}
static create(data, quantity) {
return new TargetBarcode(data, quantity);
}
static fromJSON(json) {
const data = json.data;
const quantity = json.quantity;
return TargetBarcode.create(data, quantity);
}
constructor(data, quantity) {
super();
this._data = data;
this._quantity = quantity;
}
}
__decorate([
nameForSerialization('data')
], TargetBarcode.prototype, "_data", void 0);
__decorate([
nameForSerialization('quantity')
], TargetBarcode.prototype, "_quantity", void 0);
//# sourceMappingURL=Barcode.js.map

@@ -61,11 +61,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

addListener(listener) {
var _a;
if (this.listeners.includes(listener)) {
return;
}
(_a = this.listenerProxy) === null || _a === void 0 ? void 0 : _a.addListener(listener);
this.listeners.push(listener);
}
removeListener(listener) {
var _a;
if (!this.listeners.includes(listener)) {
return;
}
(_a = this.listenerProxy) === null || _a === void 0 ? void 0 : _a.removeListener(listener);
this.listeners.splice(this.listeners.indexOf(listener), 1);

@@ -72,0 +76,0 @@ }

14

dist/esm/scandit-capacitor-datacapture-barcode/src/ts/BarcodeCapture+Related.js

@@ -50,9 +50,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class BarcodeCaptureOverlay extends DefaultSerializeable {
constructor() {
super();
this.type = 'barcodeCapture';
this._shouldShowScanAreaGuides = false;
this._viewfinder = null;
this._brush = BarcodeCaptureOverlay.defaultBrush;
}
static get defaultBrush() {

@@ -104,2 +97,9 @@ // tslint:disable-next-line:no-console

}
constructor() {
super();
this.type = 'barcodeCapture';
this._shouldShowScanAreaGuides = false;
this._viewfinder = null;
this._brush = BarcodeCaptureOverlay.defaultBrush;
}
}

@@ -106,0 +106,0 @@ __decorate([

@@ -11,10 +11,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class BarcodeCaptureSettings extends DefaultSerializeable {
constructor() {
super();
this.codeDuplicateFilter = Capacitor.defaults.BarcodeCapture.BarcodeCaptureSettings.codeDuplicateFilter;
this.locationSelection = null;
this.enabledCompositeTypes = [];
this.properties = {};
this.symbologies = {};
}
get compositeTypeDescriptions() {

@@ -30,2 +22,10 @@ return Capacitor.defaults.CompositeTypeDescriptions.reduce((descriptions, description) => {

}
constructor() {
super();
this.codeDuplicateFilter = Capacitor.defaults.BarcodeCapture.BarcodeCaptureSettings.codeDuplicateFilter;
this.locationSelection = null;
this.enabledCompositeTypes = [];
this.properties = {};
this.symbologies = {};
}
settingsForSymbology(symbology) {

@@ -32,0 +32,0 @@ if (!this.symbologies[symbology]) {

@@ -83,2 +83,5 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class BarcodeSelectionAimerSelection extends DefaultSerializeable {
static get aimerSelection() {
return new BarcodeSelectionAimerSelection();
}
constructor() {

@@ -90,5 +93,2 @@ super();

}
static get aimerSelection() {
return new BarcodeSelectionAimerSelection();
}
}

@@ -164,13 +164,2 @@ class PrivateBarcodeSelectionAimerSelection {

export class BarcodeSelectionBasicOverlay extends DefaultSerializeable {
constructor() {
super();
this.type = 'barcodeSelectionBasic';
this._trackedBrush = new Brush(Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultTrackedBrush.fillColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultTrackedBrush.strokeColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultTrackedBrush.strokeWidth);
this._aimedBrush = new Brush(Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultAimedBrush.fillColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultAimedBrush.strokeColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultAimedBrush.strokeWidth);
this._selectedBrush = new Brush(Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectedBrush.fillColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectedBrush.strokeColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectedBrush.strokeWidth);
this._selectingBrush = new Brush(Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectingBrush.fillColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectingBrush.strokeColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectingBrush.strokeWidth);
this._shouldShowScanAreaGuides = false;
this._shouldShowHints = true;
this._viewfinder = new AimerViewfinder();
}
get trackedBrush() {

@@ -255,2 +244,13 @@ return this._trackedBrush;

}
constructor() {
super();
this.type = 'barcodeSelectionBasic';
this._trackedBrush = new Brush(Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultTrackedBrush.fillColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultTrackedBrush.strokeColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultTrackedBrush.strokeWidth);
this._aimedBrush = new Brush(Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultAimedBrush.fillColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultAimedBrush.strokeColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultAimedBrush.strokeWidth);
this._selectedBrush = new Brush(Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectedBrush.fillColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectedBrush.strokeColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectedBrush.strokeWidth);
this._selectingBrush = new Brush(Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectingBrush.fillColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectingBrush.strokeColor, Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.styles[Capacitor.defaults.BarcodeSelection.BarcodeSelectionBasicOverlay.defaultStyle].DefaultSelectingBrush.strokeWidth);
this._shouldShowScanAreaGuides = false;
this._shouldShowHints = true;
this._viewfinder = new AimerViewfinder();
}
}

@@ -257,0 +257,0 @@ __decorate([

@@ -11,2 +11,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class BarcodeSelectionSettings extends DefaultSerializeable {
get enabledSymbologies() {
return Object.keys(this.symbologies)
.filter(symbology => this.symbologies[symbology].isEnabled);
}
constructor() {

@@ -20,6 +24,2 @@ super();

}
get enabledSymbologies() {
return Object.keys(this.symbologies)
.filter(symbology => this.symbologies[symbology].isEnabled);
}
settingsForSymbology(symbology) {

@@ -26,0 +26,0 @@ if (!this.symbologies[symbology]) {

@@ -58,9 +58,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class BarcodeTrackingBasicOverlay extends DefaultSerializeable {
constructor() {
super();
this.type = 'barcodeTrackingBasic';
this._defaultBrush = new Brush(Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.styles[Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.defaultStyle].DefaultBrush.fillColor, Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.styles[Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.defaultStyle].DefaultBrush.strokeColor, Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.styles[Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.defaultStyle].DefaultBrush.strokeWidth);
this._shouldShowScanAreaGuides = false;
this.listener = null;
}
static get defaultBrush() {

@@ -115,2 +108,9 @@ // tslint:disable-next-line:no-console

}
constructor() {
super();
this.type = 'barcodeTrackingBasic';
this._defaultBrush = new Brush(Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.styles[Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.defaultStyle].DefaultBrush.fillColor, Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.styles[Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.defaultStyle].DefaultBrush.strokeColor, Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.styles[Capacitor.defaults.BarcodeTracking.BarcodeTrackingBasicOverlay.defaultStyle].DefaultBrush.strokeWidth);
this._shouldShowScanAreaGuides = false;
this.listener = null;
}
setBrushForTrackedBarcode(brush, trackedBarcode) {

@@ -148,8 +148,2 @@ return this.proxy.setBrushForTrackedBarcode(brush, trackedBarcode);

export class BarcodeTrackingAdvancedOverlay extends DefaultSerializeable {
constructor() {
super();
this.type = 'barcodeTrackingAdvanced';
this._shouldShowScanAreaGuides = false;
this.listener = null;
}
get shouldShowScanAreaGuides() {

@@ -177,2 +171,8 @@ return this._shouldShowScanAreaGuides;

}
constructor() {
super();
this.type = 'barcodeTrackingAdvanced';
this._shouldShowScanAreaGuides = false;
this.listener = null;
}
setViewForTrackedBarcode(view, trackedBarcode) {

@@ -179,0 +179,0 @@ return this.proxy.setViewForTrackedBarcode(view, trackedBarcode);

@@ -9,8 +9,2 @@ import { DefaultSerializeable } from '../../../scandit-capacitor-datacapture-core/src/ts/Serializeable';

export class BarcodeTrackingSettings extends DefaultSerializeable {
constructor() {
super();
this.scenario = null;
this.properties = {};
this.symbologies = {};
}
get enabledSymbologies() {

@@ -25,2 +19,8 @@ return Object.keys(this.symbologies)

}
constructor() {
super();
this.scenario = null;
this.properties = {};
this.symbologies = {};
}
settingsForSymbology(symbology) {

@@ -27,0 +27,0 @@ if (!this.symbologies[symbology]) {

@@ -16,2 +16,5 @@ import { CameraProxy } from '../../../../scandit-capacitor-datacapture-core/src/ts/Capacitor/CameraProxy';

}
constructor() {
this.notifyListeners = this.notifyListeners.bind(this);
}
initialize() {

@@ -23,8 +26,24 @@ this.subscribeListener();

}
addListener(listener) {
if (listener.didScan) {
window.Capacitor.Plugins[Capacitor.pluginName]
.addListener(BarcodeCaptureListenerEvent.DidScan, this.notifyListeners);
}
if (listener.didUpdateSession) {
window.Capacitor.Plugins[Capacitor.pluginName]
.addListener(BarcodeCaptureListenerEvent.DidUpdateSession, this.notifyListeners);
}
}
removeListener(listener) {
if (listener.didScan) {
window.Capacitor.Plugins[Capacitor.pluginName]
.removeListener(BarcodeCaptureListenerEvent.DidScan, this.notifyListeners);
}
if (listener.didUpdateSession) {
window.Capacitor.Plugins[Capacitor.pluginName]
.removeListener(BarcodeCaptureListenerEvent.DidUpdateSession, this.notifyListeners);
}
}
subscribeListener() {
window.Capacitor.Plugins[Capacitor.pluginName][CapacitorFunction.SubscribeBarcodeCaptureListener]();
window.Capacitor.Plugins[Capacitor.pluginName]
.addListener(BarcodeCaptureListenerEvent.DidScan, this.notifyListeners.bind(this));
window.Capacitor.Plugins[Capacitor.pluginName]
.addListener(BarcodeCaptureListenerEvent.DidUpdateSession, this.notifyListeners.bind(this));
}

@@ -31,0 +50,0 @@ notifyListeners(event) {

@@ -20,3 +20,9 @@ import { Defaults } from './Defaults';

ResetBarcodeSelection = "resetBarcodeSelection",
UnfreezeCameraInBarcodeSelection = "unfreezeCameraInBarcodeSelection"
UnfreezeCameraInBarcodeSelection = "unfreezeCameraInBarcodeSelection",
SubscribeBarcodeCountListener = "registerBarcodeCountListener",
UnsubscribeBarcodeCountListener = "unregisterBarcodeCountListener",
ResetBarcodeCountSession = "resetBarcodeCountSession",
StartBarcodeCountScanningPhase = "startScanningPhase",
EndBarcodeCountScanningPhase = "endScanningPhase",
SetBarcodeCountCaptureList = "setBarcodeCountCaptureList"
}

@@ -26,3 +32,3 @@ export declare const Capacitor: {

defaults: Defaults;
exec: (success: Function | null, error: Function | null, functionName: string, args: Optional<[any]>) => void;
exec: (success: Optional<Function>, error: Optional<Function>, functionName: string, args: Optional<[any]>) => void;
};

@@ -29,0 +35,0 @@ export interface CapacitorWindow extends Window {

@@ -33,2 +33,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

CapacitorFunction["UnfreezeCameraInBarcodeSelection"] = "unfreezeCameraInBarcodeSelection";
CapacitorFunction["SubscribeBarcodeCountListener"] = "registerBarcodeCountListener";
CapacitorFunction["UnsubscribeBarcodeCountListener"] = "unregisterBarcodeCountListener";
CapacitorFunction["ResetBarcodeCountSession"] = "resetBarcodeCountSession";
CapacitorFunction["StartBarcodeCountScanningPhase"] = "startScanningPhase";
CapacitorFunction["EndBarcodeCountScanningPhase"] = "endScanningPhase";
CapacitorFunction["SetBarcodeCountCaptureList"] = "setBarcodeCountCaptureList";
})(CapacitorFunction || (CapacitorFunction = {}));

@@ -43,11 +49,11 @@ const pluginName = 'ScanditBarcodeNative';

export const getDefaults = () => __awaiter(void 0, void 0, void 0, function* () {
yield window.Capacitor.Plugins[pluginName][CapacitorFunction.GetDefaults]()
.then((defaultsJSON) => {
try {
const defaultsJSON = yield window.Capacitor.Plugins[pluginName][CapacitorFunction.GetDefaults]();
const defaults = defaultsFromJSON(defaultsJSON);
Capacitor.defaults = defaults;
})
.catch((error) => {
}
catch (error) {
// tslint:disable-next-line:no-console
console.warn(error);
});
}
return Capacitor.defaults;

@@ -54,0 +60,0 @@ });

@@ -5,2 +5,3 @@ import { CameraSettings } from '../../../../scandit-capacitor-datacapture-core/src/ts/Camera+Related';

import { PrivateCompositeTypeDescription, SymbologyDescription, SymbologySettings } from '../Barcode';
import { BarcodeCountDefaults, BarcodeCountDefaultsJSON } from './BarcodeCountDefaults';
declare type BarcodeCaptureOverlayStyle = any;

@@ -87,2 +88,3 @@ declare type BarcodeTrackingBasicOverlayStyle = any;

};
BarcodeCount: BarcodeCountDefaults;
}

@@ -162,4 +164,5 @@ export interface DefaultsJSON {

};
BarcodeCount: BarcodeCountDefaultsJSON;
}
export declare const defaultsFromJSON: (json: DefaultsJSON) => Defaults;
export {};

@@ -5,4 +5,5 @@ import { CameraSettings } from '../../../../scandit-capacitor-datacapture-core/src/ts/Camera+Related';

import { SymbologyDescription, SymbologySettings, } from '../Barcode';
import { barcodeCountDefaultsFromJSON } from './BarcodeCountDefaults';
export const defaultsFromJSON = (json) => {
return {
const defaults = {
SymbologySettings: Object.keys(json.SymbologySettings)

@@ -176,4 +177,6 @@ .reduce((settings, identifier) => {

},
BarcodeCount: barcodeCountDefaultsFromJSON(json)
};
return defaults;
};
//# sourceMappingURL=Defaults.js.map
import { Size } from '../../../scandit-capacitor-datacapture-core/src/ts/Common';
import { DefaultSerializeable } from '../../../scandit-capacitor-datacapture-core/src/ts/Serializeable';
export class TrackedBarcodeView extends DefaultSerializeable {
constructor(encodedData, options) {
super();
if (options == null) {
options = { scale: 1 };
}
this.data = encodedData;
this.options = options;
}
static withHTMLElement(element, options) {

@@ -61,3 +53,11 @@ return this.getEncodedImageData(element).then(data => new TrackedBarcodeView(data, options));

}
constructor(encodedData, options) {
super();
if (options == null) {
options = { scale: 1 };
}
this.data = encodedData;
this.options = options;
}
}
//# sourceMappingURL=TrackedBarcodeView.js.map

@@ -1,2 +0,2 @@

import { ScanditBarcodePluginInterface } from './definitions';
import { ScanditBarcodeCountNativeInterface, ScanditBarcodePluginInterface } from './definitions';
export * from './definitions';

@@ -7,1 +7,2 @@ export declare class ScanditBarcodePluginImplementation implements ScanditBarcodePluginInterface {

export declare const ScanditBarcodePlugin: ScanditBarcodePluginImplementation;
export declare const ScanditBarcodeCountPluginNative: ScanditBarcodeCountNativeInterface;

@@ -13,3 +13,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import { Capacitor as CapacitorBarcode, getDefaults } from './ts/Capacitor/Capacitor';
import { Barcode, Checksum, CompositeFlag, CompositeType, EncodingRange, LocalizedOnlyBarcode, Range, Symbology, SymbologyDescription, SymbologySettings, TrackedBarcode, } from './ts/Barcode';
export * from './definitions';
import { Barcode, Checksum, CompositeFlag, CompositeType, EncodingRange, LocalizedOnlyBarcode, Range, Symbology, SymbologyDescription, SymbologySettings, TrackedBarcode, TargetBarcode } from './ts/Barcode';
import { BarcodeCapture, } from './ts/BarcodeCapture';

@@ -25,2 +26,9 @@ import { BarcodeSelection, } from './ts/BarcodeSelection';

import { TrackedBarcodeView, } from './ts/TrackedBarcodeView';
import { BarcodeCount } from './ts/BarcodeCount';
import { BarcodeCountFeedback, BarcodeCountSession } from './ts/BarcodeCount+Related';
import { BarcodeCountSettings } from './ts/BarcodeCountSettings';
import { BarcodeCountView, BarcodeCountViewStyle } from './ts/BarcodeCountView';
import { BarcodeCountToolbarSettings } from './ts/BarcodeCountView+Related';
import { BarcodeCountCaptureList, BarcodeCountCaptureListSession } from './ts/BarcodeCountCaptureList';
import { BarcodeFilterSettings, BarcodeFilterHighlightType, BarcodeFilterHighlightSettingsBrush } from './ts/BarcodeFilterSettings';
export class ScanditBarcodePluginImplementation {

@@ -60,2 +68,3 @@ initialize(coreDefaults) {

TrackedBarcode,
TargetBarcode,
BarcodeTrackingBasicOverlay,

@@ -68,2 +77,14 @@ BarcodeTrackingBasicOverlayStyle,

TrackedBarcodeView,
BarcodeCount,
BarcodeCountFeedback,
BarcodeCountSession,
BarcodeCountSettings,
BarcodeCountView,
BarcodeCountViewStyle,
BarcodeCountCaptureList,
BarcodeCountCaptureListSession,
BarcodeCountToolbarSettings,
BarcodeFilterSettings,
BarcodeFilterHighlightType,
BarcodeFilterHighlightSettingsBrush
};

@@ -85,2 +106,3 @@ CapacitorCore.defaults = coreDefaults;

export const ScanditBarcodePlugin = new ScanditBarcodePluginImplementation();
export const ScanditBarcodeCountPluginNative = registerPlugin('ScanditBarcodeNative');
//# sourceMappingURL=web.js.map

@@ -52,19 +52,2 @@ import { Capacitor } from './Capacitor/Capacitor';

export class CameraSettings extends DefaultSerializeable {
constructor(settings) {
super();
this.preferredResolution = Capacitor.defaults.Camera.Settings.preferredResolution;
this.zoomFactor = Capacitor.defaults.Camera.Settings.zoomFactor;
this.zoomGestureZoomFactor = Capacitor.defaults.Camera.Settings.zoomGestureZoomFactor;
this.api = 0;
this.focus = {
range: Capacitor.defaults.Camera.Settings.focusRange,
focusGestureStrategy: Capacitor.defaults.Camera.Settings.focusGestureStrategy,
shouldPreferSmoothAutoFocus: Capacitor.defaults.Camera.Settings.shouldPreferSmoothAutoFocus,
};
if (settings !== undefined && settings !== null) {
Object.getOwnPropertyNames(settings).forEach(propertyName => {
this[propertyName] = settings[propertyName];
});
}
}
get focusRange() {

@@ -101,2 +84,19 @@ return this.focus.range;

}
constructor(settings) {
super();
this.preferredResolution = Capacitor.defaults.Camera.Settings.preferredResolution;
this.zoomFactor = Capacitor.defaults.Camera.Settings.zoomFactor;
this.zoomGestureZoomFactor = Capacitor.defaults.Camera.Settings.zoomGestureZoomFactor;
this.api = 0;
this.focus = {
range: Capacitor.defaults.Camera.Settings.focusRange,
focusGestureStrategy: Capacitor.defaults.Camera.Settings.focusGestureStrategy,
shouldPreferSmoothAutoFocus: Capacitor.defaults.Camera.Settings.shouldPreferSmoothAutoFocus,
};
if (settings !== undefined && settings !== null) {
Object.getOwnPropertyNames(settings).forEach(propertyName => {
this[propertyName] = settings[propertyName];
});
}
}
setProperty(name, value) {

@@ -103,0 +103,0 @@ this[name] = value;

@@ -31,4 +31,4 @@ import { Defaults } from './Defaults';

defaults: Defaults;
exec: (success: Function | null, error: Function | null, functionName: string, args: Optional<[any]>) => void;
exec: (success: Optional<Function>, error: Optional<Function>, functionName: string, args: Optional<[any]>) => void;
};
export declare const getDefaults: () => Promise<Defaults>;

@@ -10,3 +10,3 @@ export declare class CapacitorError {

}
export declare const capacitorExec: (successCallback: Function | null, errorCallback: Function | null, pluginName: string, functionName: string, args: Optional<[any]>) => void;
export declare const capacitorExec: (successCallback: Optional<Function>, errorCallback: Optional<Function>, pluginName: string, functionName: string, args: Optional<[any]>) => void;
export declare const doReturnWithFinish: (finishCallbackID: string, result: any) => any;
export class CapacitorError {
constructor(code, message) {
this.code = code;
this.message = message;
}
static fromJSON(json) {

@@ -14,2 +10,6 @@ if (json && json.code && json.message) {

}
constructor(code, message) {
this.code = code;
this.message = message;
}
}

@@ -16,0 +16,0 @@ export const capacitorExec = (successCallback, errorCallback, pluginName, functionName, args) => {

import { ContextStatus } from '../DataCaptureContext+Related';
import { Capacitor, CapacitorFunction } from './Capacitor';
import { doReturnWithFinish } from './CommonCapacitor';
var DataCaptureContextListenerEvent;

@@ -57,3 +56,3 @@ (function (DataCaptureContextListenerEvent) {

// listener subscriptions.
return doReturnWithFinish('', null);
return;
}

@@ -76,5 +75,5 @@ event = Object.assign(Object.assign(Object.assign({}, event), event.argument), { argument: undefined });

});
return doReturnWithFinish(event.name, null);
return;
}
}
//# sourceMappingURL=DataCaptureContextProxy.js.map

@@ -9,7 +9,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class Point extends DefaultSerializeable {
constructor(x, y) {
super();
this._x = x;
this._y = y;
}
get x() {

@@ -24,2 +19,7 @@ return this._x;

}
constructor(x, y) {
super();
this._x = x;
this._y = y;
}
}

@@ -33,9 +33,2 @@ __decorate([

export class Quadrilateral extends DefaultSerializeable {
constructor(topLeft, topRight, bottomRight, bottomLeft) {
super();
this._topLeft = topLeft;
this._topRight = topRight;
this._bottomRight = bottomRight;
this._bottomLeft = bottomLeft;
}
get topLeft() {

@@ -56,2 +49,9 @@ return this._topLeft;

}
constructor(topLeft, topRight, bottomRight, bottomLeft) {
super();
this._topLeft = topLeft;
this._topRight = topRight;
this._bottomRight = bottomRight;
this._bottomLeft = bottomLeft;
}
}

@@ -77,7 +77,2 @@ __decorate([

export class NumberWithUnit extends DefaultSerializeable {
constructor(value, unit) {
super();
this._value = value;
this._unit = unit;
}
get value() {

@@ -92,2 +87,7 @@ return this._value;

}
constructor(value, unit) {
super();
this._value = value;
this._unit = unit;
}
}

@@ -101,7 +101,2 @@ __decorate([

export class PointWithUnit extends DefaultSerializeable {
constructor(x, y) {
super();
this._x = x;
this._y = y;
}
get x() {

@@ -119,2 +114,7 @@ return this._x;

}
constructor(x, y) {
super();
this._x = x;
this._y = y;
}
}

@@ -128,7 +128,2 @@ __decorate([

export class Rect extends DefaultSerializeable {
constructor(origin, size) {
super();
this._origin = origin;
this._size = size;
}
get origin() {

@@ -140,2 +135,7 @@ return this._origin;

}
constructor(origin, size) {
super();
this._origin = origin;
this._size = size;
}
}

@@ -149,7 +149,2 @@ __decorate([

export class RectWithUnit extends DefaultSerializeable {
constructor(origin, size) {
super();
this._origin = origin;
this._size = size;
}
get origin() {

@@ -161,2 +156,7 @@ return this._origin;

}
constructor(origin, size) {
super();
this._origin = origin;
this._size = size;
}
}

@@ -170,7 +170,2 @@ __decorate([

export class SizeWithUnit extends DefaultSerializeable {
constructor(width, height) {
super();
this._width = width;
this._height = height;
}
get width() {

@@ -182,2 +177,7 @@ return this._width;

}
constructor(width, height) {
super();
this._width = width;
this._height = height;
}
}

@@ -191,7 +191,2 @@ __decorate([

export class Size extends DefaultSerializeable {
constructor(width, height) {
super();
this._width = width;
this._height = height;
}
get width() {

@@ -206,2 +201,7 @@ return this._width;

}
constructor(width, height) {
super();
this._width = width;
this._height = height;
}
}

@@ -215,6 +215,2 @@ __decorate([

export class SizeWithAspect {
constructor(size, aspect) {
this._size = size;
this._aspect = aspect;
}
get size() {

@@ -226,2 +222,6 @@ return this._size;

}
constructor(size, aspect) {
this._size = size;
this._aspect = aspect;
}
}

@@ -347,9 +347,2 @@ __decorate([

export class MarginsWithUnit extends DefaultSerializeable {
constructor(left, right, top, bottom) {
super();
this._left = left;
this._right = right;
this._top = top;
this._bottom = bottom;
}
get left() {

@@ -373,2 +366,9 @@ return this._left;

}
constructor(left, right, top, bottom) {
super();
this._left = left;
this._right = right;
this._top = top;
this._bottom = bottom;
}
}

@@ -388,5 +388,2 @@ __decorate([

export class Color {
constructor(hex) {
this.hexadecimalString = hex;
}
get redComponent() {

@@ -459,2 +456,5 @@ return this.hexadecimalString.slice(0, 2);

}
constructor(hex) {
this.hexadecimalString = hex;
}
withAlpha(alpha) {

@@ -461,0 +461,0 @@ const newHex = this.hexadecimalString.slice(0, 6) + Color.numberToHex(Color.normalizeAlpha(alpha));

@@ -22,15 +22,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class DataCaptureContext extends DefaultSerializeable {
constructor(licenseKey, deviceName) {
super();
this.licenseKey = licenseKey;
this.deviceName = deviceName;
this.framework = 'capacitor';
this.frameworkVersion = (() => Capacitor.defaults.capacitorVersion)();
this.settings = new DataCaptureContextSettings();
this._frameSource = null;
this.view = null;
this.modes = [];
this.components = [];
this.listeners = [];
}
// TODO: adjust when readding framedata to the api https://jira.scandit.com/browse/SDC-1159

@@ -61,2 +48,15 @@ // @ignoreFromSerialization

}
constructor(licenseKey, deviceName) {
super();
this.licenseKey = licenseKey;
this.deviceName = deviceName;
this.framework = 'capacitor';
this.frameworkVersion = (() => Capacitor.defaults.capacitorVersion)();
this.settings = new DataCaptureContextSettings();
this._frameSource = null;
this.view = null;
this.modes = [];
this.components = [];
this.listeners = [];
}
setFrameSource(frameSource) {

@@ -63,0 +63,0 @@ this._frameSource = frameSource;

@@ -130,27 +130,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class DataCaptureView extends DefaultSerializeable {
constructor() {
super();
this._context = null;
this.scanAreaMargins = Capacitor.defaults.DataCaptureView.scanAreaMargins;
this.pointOfInterest = Capacitor.defaults.DataCaptureView.pointOfInterest;
this.logoAnchor = Capacitor.defaults.DataCaptureView.logoAnchor;
this.logoOffset = Capacitor.defaults.DataCaptureView.logoOffset;
this.focusGesture = Capacitor.defaults.DataCaptureView.focusGesture;
this.zoomGesture = Capacitor.defaults.DataCaptureView.zoomGesture;
this.logoStyle = Capacitor.defaults.DataCaptureView.logoStyle;
this.overlays = [];
this.controls = [];
this.listeners = [];
this.htmlElement = null;
this._htmlElementState = new HTMLElementState();
this.scrollListener = this.elementDidChange.bind(this);
this.domObserver = new MutationObserver(this.elementDidChange.bind(this));
this.orientationChangeListener = (() => {
this.elementDidChange();
// SDC-1784 -> workaround because at the moment of this callback the element doesn't have the updated size.
setTimeout(this.elementDidChange.bind(this), 100);
setTimeout(this.elementDidChange.bind(this), 300);
setTimeout(this.elementDidChange.bind(this), 1000);
});
}
get context() {

@@ -196,2 +171,3 @@ return this._context;

}
// eslint-disable-next-line @typescript-eslint/member-ordering
static forContext(context) {

@@ -202,2 +178,28 @@ const view = new DataCaptureView();

}
// eslint-disable-next-line @typescript-eslint/member-ordering
constructor() {
super();
this._context = null;
this.scanAreaMargins = Capacitor.defaults.DataCaptureView.scanAreaMargins;
this.pointOfInterest = Capacitor.defaults.DataCaptureView.pointOfInterest;
this.logoAnchor = Capacitor.defaults.DataCaptureView.logoAnchor;
this.logoOffset = Capacitor.defaults.DataCaptureView.logoOffset;
this.focusGesture = Capacitor.defaults.DataCaptureView.focusGesture;
this.zoomGesture = Capacitor.defaults.DataCaptureView.zoomGesture;
this.logoStyle = Capacitor.defaults.DataCaptureView.logoStyle;
this.overlays = [];
this.controls = [];
this.listeners = [];
this.htmlElement = null;
this._htmlElementState = new HTMLElementState();
this.scrollListener = this.elementDidChange.bind(this);
this.domObserver = new MutationObserver(this.elementDidChange.bind(this));
this.orientationChangeListener = (() => {
this.elementDidChange();
// SDC-1784 -> workaround because at the moment of this callback the element doesn't have the updated size.
setTimeout(this.elementDidChange.bind(this), 100);
setTimeout(this.elementDidChange.bind(this), 300);
setTimeout(this.elementDidChange.bind(this), 1000);
});
}
connectToElement(element) {

@@ -204,0 +206,0 @@ this.htmlElement = element;

@@ -16,6 +16,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class Vibration extends DefaultSerializeable {
constructor(type) {
super();
this.type = type;
}
static fromJSON(json) {

@@ -33,9 +29,8 @@ return new Vibration(json.type);

}
constructor(type) {
super();
this.type = type;
}
}
export class Sound extends DefaultSerializeable {
constructor(resource) {
super();
this.resource = null;
this.resource = resource;
}
static fromJSON(json) {

@@ -47,2 +42,7 @@ return new Sound(json.resource);

}
constructor(resource) {
super();
this.resource = null;
this.resource = resource;
}
}

@@ -53,10 +53,2 @@ __decorate([

export class Feedback extends DefaultSerializeable {
constructor(vibration, sound) {
super();
this._vibration = null;
this._sound = null;
this._vibration = vibration;
this._sound = sound;
this.initialize();
}
static get defaultFeedback() {

@@ -74,2 +66,10 @@ return new Feedback(Vibration.defaultVibration, Sound.defaultSound);

}
constructor(vibration, sound) {
super();
this._vibration = null;
this._sound = null;
this._vibration = vibration;
this._sound = sound;
this.initialize();
}
emit() {

@@ -76,0 +76,0 @@ if (!this.proxy) {

@@ -12,2 +12,5 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class RadiusLocationSelection extends DefaultSerializeable {
get radius() {
return this._radius;
}
constructor(radius) {

@@ -18,5 +21,2 @@ super();

}
get radius() {
return this._radius;
}
}

@@ -23,0 +23,0 @@ __decorate([

@@ -11,7 +11,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class Brush extends DefaultSerializeable {
constructor(fillColor = Capacitor.defaults.Brush.fillColor, strokeColor = Capacitor.defaults.Brush.strokeColor, strokeWidth = Capacitor.defaults.Brush.strokeWidth) {
super();
this.fill = { color: fillColor };
this.stroke = { color: strokeColor, width: strokeWidth };
}
static get transparent() {

@@ -30,2 +25,7 @@ const transparentBlack = Color.fromRGBA(255, 255, 255, 0);

}
constructor(fillColor = Capacitor.defaults.Brush.fillColor, strokeColor = Capacitor.defaults.Brush.strokeColor, strokeWidth = Capacitor.defaults.Brush.strokeWidth) {
super();
this.fill = { color: fillColor };
this.stroke = { color: strokeColor, width: strokeWidth };
}
}

@@ -52,2 +52,5 @@ // tslint:disable-next-line:variable-name

export class RectangularViewfinder extends DefaultSerializeable {
get sizeWithUnitAndAspect() {
return this._sizeWithUnitAndAspect;
}
constructor(style, lineStyle) {

@@ -69,5 +72,2 @@ super();

}
get sizeWithUnitAndAspect() {
return this._sizeWithUnitAndAspect;
}
get style() {

@@ -74,0 +74,0 @@ return this._style;

@@ -25,7 +25,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

export class RectangularViewfinderAnimation extends DefaultSerializeable {
constructor(isLooping) {
super();
this._isLooping = false;
this._isLooping = isLooping;
}
static fromJSON(json) {

@@ -40,2 +35,7 @@ if (json === null) {

}
constructor(isLooping) {
super();
this._isLooping = false;
this._isLooping = isLooping;
}
}

@@ -42,0 +42,0 @@ __decorate([

{
"name": "scandit-capacitor-datacapture-barcode",
"version": "6.17.2",
"version": "6.18.0-beta.1",
"description": "Scandit Data Capture SDK for Capacitor",

@@ -17,3 +17,3 @@ "license": "Apache-2.0",

"postbuild": "node ./scripts/normalize-d-ts.js",
"lint": "tslint --project . && npm run swiftlint -- lint",
"lint": "eslint ./src",
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",

@@ -26,3 +26,3 @@ "swiftlint": "node-swiftlint",

"dependencies": {
"scandit-capacitor-datacapture-core": "6.17.2"
"scandit-capacitor-datacapture-core": "6.18.0-beta.1"
},

@@ -36,9 +36,12 @@ "devDependencies": {

"@rollup/plugin-node-resolve": "^15.0.1",
"@types/node": "18.15.3",
"prettier": "^2.0.5",
"prettier-plugin-java": "^2.0.0",
"rimraf": "^4.1.2",
"rimraf": "4.4.0",
"rollup": "^2.79.1",
"swiftlint": "^1.0.1",
"typescript": "~3.8.3",
"eslint": "^7.32.0"
"typescript": "4.9.5",
"eslint": "8.37.0",
"@typescript-eslint/parser": "5.57.1",
"@typescript-eslint/eslint-plugin": "5.57.1"
},

@@ -45,0 +48,0 @@ "files": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc