@capgo/capacitor-zebra-datawedge 8.2.1 → 8.2.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/README.md CHANGED
@@ -317,6 +317,10 @@ setIgnoreDisabledProfiles(options: IgnoreDisabledProfilesResult) => Promise<void
317
317
  registerForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>) => Promise<void>
318
318
  ```
319
319
 
320
+ Completes when the notification command is dispatched to DataWedge.
321
+ This does not confirm registration, policy approval, or scanner readiness;
322
+ observe notification events to determine the scanner's state.
323
+
320
324
  | Param | Type |
321
325
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
322
326
  | **`options`** | <code><a href="#omit">Omit</a>&lt;<a href="#registerfornotificationoptions">RegisterForNotificationOptions</a>, 'callback'&gt;</code> |
@@ -345,6 +349,10 @@ come from the physical trigger.
345
349
  unRegisterForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>) => Promise<void>
346
350
  ```
347
351
 
352
+ Completes when the unregistration command is dispatched to DataWedge.
353
+ This does not confirm unregistration or policy approval; notifications may already be queued.
354
+ Dispose of local listeners separately when using the low-level API.
355
+
348
356
  | Param | Type |
349
357
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
350
358
  | **`options`** | <code><a href="#omit">Omit</a>&lt;<a href="#registerfornotificationoptions">RegisterForNotificationOptions</a>, 'callback'&gt;</code> |
@@ -1,5 +1,6 @@
1
1
  ext {
2
2
  junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
+ robolectricVersion = project.hasProperty('robolectricVersion') ? rootProject.ext.robolectricVersion : '4.14.1'
3
4
  androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
4
5
  androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.16.0'
5
6
  androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
@@ -55,6 +56,7 @@ dependencies {
55
56
  implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
56
57
  implementation "androidx.core:core:$androidxCoreVersion"
57
58
  testImplementation "junit:junit:$junitVersion"
59
+ testImplementation "org.robolectric:robolectric:$robolectricVersion"
58
60
  androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
59
61
  androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
60
62
  }
@@ -221,7 +221,7 @@ public class ZebraDataWedgePlugin extends Plugin {
221
221
  options.putString(ZebraDataWedge.EXTRA_NOTIFICATION_TYPE, notificationType);
222
222
  Intent intent = ZebraDataWedge.newIntent();
223
223
  intent.putExtra(ZebraDataWedge.CMD_REGISTER_FOR_NOTIFICATION, options);
224
- sendCommand(call, intent, "register-for-notification", this::emptyResponse);
224
+ dispatchNotification(intent, call);
225
225
  }
226
226
 
227
227
  @PluginMethod
@@ -245,7 +245,7 @@ public class ZebraDataWedgePlugin extends Plugin {
245
245
  options.putString(ZebraDataWedge.EXTRA_NOTIFICATION_TYPE, notificationType);
246
246
  Intent intent = ZebraDataWedge.newIntent();
247
247
  intent.putExtra(ZebraDataWedge.CMD_UNREGISTER_FOR_NOTIFICATION, options);
248
- sendCommand(call, intent, "unregister-for-notification", this::emptyResponse);
248
+ dispatchNotification(intent, call);
249
249
  }
250
250
 
251
251
  @PluginMethod
@@ -270,6 +270,7 @@ public class ZebraDataWedgePlugin extends Plugin {
270
270
  }
271
271
  Bundle options = new Bundle();
272
272
  options.putString("PROFILE_NAME", profileName);
273
+ options.putString("APP_LIST", ""); // Associations are returned only when explicitly requested.
273
274
  Intent intent = ZebraDataWedge.newIntent();
274
275
  intent.putExtra(ZebraDataWedge.CMD_GET_CONFIG, options);
275
276
  sendCommand(call, intent, "get-associated-apps", (response) -> {
@@ -288,6 +289,7 @@ public class ZebraDataWedgePlugin extends Plugin {
288
289
  }
289
290
  Bundle options = new Bundle();
290
291
  options.putString("PROFILE_NAME", profileName);
292
+ options.putString("APP_LIST", ""); // Associations are returned only when explicitly requested.
291
293
  JSONArray pluginConfigs = call.getArray("pluginConfigs");
292
294
  if (pluginConfigs != null && pluginConfigs.length() > 0) {
293
295
  ArrayList<Bundle> bundles = new ArrayList<>();
@@ -656,6 +658,16 @@ public class ZebraDataWedgePlugin extends Plugin {
656
658
  sendBroadcast(intent, call);
657
659
  }
658
660
 
661
+ private void dispatchNotification(Intent intent, PluginCall call) {
662
+ try {
663
+ getContext().sendBroadcast(intent);
664
+ } catch (Exception exception) {
665
+ call.reject("DataWedge notification transport failed.", "DATAWEDGE_TRANSPORT", exception);
666
+ return;
667
+ }
668
+ call.resolve();
669
+ }
670
+
659
671
  private void sendBroadcast(Intent intent, PluginCall call) {
660
672
  try {
661
673
  getContext().sendBroadcast(intent);
@@ -849,7 +861,14 @@ public class ZebraDataWedgePlugin extends Plugin {
849
861
  }
850
862
  JSObject item = new JSObject();
851
863
  item.put("packageName", app.getString("PACKAGE_NAME"));
852
- item.put("activityList", ZebraDataWedge.stringArrayToJSArray(app.getStringArray("ACTIVITY_LIST")));
864
+ Object activities = app.get("ACTIVITY_LIST");
865
+ if (activities instanceof String[]) {
866
+ item.put("activityList", ZebraDataWedge.stringArrayToJSArray((String[]) activities));
867
+ } else if (activities instanceof ArrayList<?>) {
868
+ item.put("activityList", ZebraDataWedge.listToJSArray((ArrayList<?>) activities));
869
+ } else {
870
+ item.put("activityList", new JSArray());
871
+ }
853
872
  result.put(item);
854
873
  }
855
874
  return result;
@@ -929,10 +948,11 @@ public class ZebraDataWedgePlugin extends Plugin {
929
948
 
930
949
  private ArrayList<Bundle> extractAppList(Bundle bundle) {
931
950
  Object raw = bundle.get("APP_LIST");
932
- if (raw instanceof Bundle[]) {
933
- Bundle[] values = (Bundle[]) raw;
951
+ if (raw instanceof android.os.Parcelable[]) {
934
952
  ArrayList<Bundle> result = new ArrayList<>();
935
- Collections.addAll(result, values);
953
+ for (android.os.Parcelable value : (android.os.Parcelable[]) raw) {
954
+ if (value instanceof Bundle) result.add((Bundle) value);
955
+ }
936
956
  return result;
937
957
  }
938
958
  if (raw instanceof ArrayList<?>) {
@@ -959,9 +979,11 @@ public class ZebraDataWedgePlugin extends Plugin {
959
979
  }
960
980
  return result;
961
981
  }
962
- if (raw instanceof Bundle[]) {
982
+ if (raw instanceof android.os.Parcelable[]) {
963
983
  ArrayList<Bundle> result = new ArrayList<>();
964
- Collections.addAll(result, (Bundle[]) raw);
984
+ for (android.os.Parcelable value : (android.os.Parcelable[]) raw) {
985
+ if (value instanceof Bundle) result.add((Bundle) value);
986
+ }
965
987
  return result;
966
988
  }
967
989
  }
@@ -1005,7 +1027,8 @@ public class ZebraDataWedgePlugin extends Plugin {
1005
1027
  ret.put("id", bundle.getString("SCANNER_IDENTIFIER"));
1006
1028
  ret.put(
1007
1029
  "connectionState",
1008
- "true".equalsIgnoreCase(bundle.getString("SCANNER_CONNECTION_STATE")) || bundle.getBoolean("SCANNER_CONNECTION_STATE")
1030
+ Boolean.TRUE.equals(bundle.get("SCANNER_CONNECTION_STATE")) ||
1031
+ "true".equalsIgnoreCase(String.valueOf(bundle.get("SCANNER_CONNECTION_STATE")))
1009
1032
  );
1010
1033
  return ret;
1011
1034
  }
package/dist/docs.json CHANGED
@@ -171,7 +171,7 @@
171
171
  ],
172
172
  "returns": "Promise<void>",
173
173
  "tags": [],
174
- "docs": "",
174
+ "docs": "Completes when the notification command is dispatched to DataWedge.\nThis does not confirm registration, policy approval, or scanner readiness;\nobserve notification events to determine the scanner's state.",
175
175
  "complexTypes": [
176
176
  "Omit",
177
177
  "RegisterForNotificationOptions"
@@ -208,7 +208,7 @@
208
208
  ],
209
209
  "returns": "Promise<void>",
210
210
  "tags": [],
211
- "docs": "",
211
+ "docs": "Completes when the unregistration command is dispatched to DataWedge.\nThis does not confirm unregistration or policy approval; notifications may already be queued.\nDispose of local listeners separately when using the low-level API.",
212
212
  "complexTypes": [
213
213
  "Omit",
214
214
  "RegisterForNotificationOptions"
@@ -217,6 +217,11 @@ export interface ZebraDataWedgePlugin extends Plugin {
217
217
  setConfig(options: SetConfigOptions): Promise<void>;
218
218
  setDisabledAppList(options: SetDisabledAppListOptions): Promise<void>;
219
219
  setIgnoreDisabledProfiles(options: IgnoreDisabledProfilesResult): Promise<void>;
220
+ /**
221
+ * Completes when the notification command is dispatched to DataWedge.
222
+ * This does not confirm registration, policy approval, or scanner readiness;
223
+ * observe notification events to determine the scanner's state.
224
+ */
220
225
  registerForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void>;
221
226
  /**
222
227
  * Registers a DataWedge scan broadcast intent action in the Android plugin receiver (runtime only;
@@ -224,6 +229,11 @@ export interface ZebraDataWedgePlugin extends Plugin {
224
229
  * come from the physical trigger.
225
230
  */
226
231
  registerScanIntentAction(options: RegisterScanIntentActionOptions): Promise<void>;
232
+ /**
233
+ * Completes when the unregistration command is dispatched to DataWedge.
234
+ * This does not confirm unregistration or policy approval; notifications may already be queued.
235
+ * Dispose of local listeners separately when using the low-level API.
236
+ */
227
237
  unRegisterForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void>;
228
238
  enumerateScanners(): Promise<{
229
239
  scanners: ZebraDeviceScanner[];
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kEAA2C,CAAA;IAC3C,8CAAuB,CAAA;IACvB,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;AACnB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAED,MAAM,CAAN,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,0EAA6C,CAAA;IAC7C,8DAAiC,CAAA;IACjC,8DAAiC,CAAA;AACnC,CAAC,EAJW,yBAAyB,KAAzB,yBAAyB,QAIpC;AAED,MAAM,CAAN,IAAY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uC,CAAA;IACvC,kEAA+C,CAAA;IAC/C,sDAAmC,CAAA;IACnC,0EAAuD,CAAA;IACvD,gEAA6C,CAAA;IAC7C,oEAAiD,CAAA;IACjD,8DAA2C,CAAA;IAC3C,wDAAqC,CAAA;IACrC,8EAA2D,CAAA;IAC3D,4DAAyC,CAAA;IACzC,0DAAuC,CAAA;IACvC,wEAAqD,CAAA;IACrD,sEAAmD,CAAA;IACnD,oEAAiD,CAAA;IACjD,kEAA+C,CAAA;IAC/C,sCAAmB,CAAA;AACrB,CAAC,EAhCW,eAAe,KAAf,eAAe,QAgC1B","sourcesContent":["import type { Plugin, PluginListenerHandle } from '@capacitor/core';\n\nexport interface PluginVersionResult {\n version: string;\n}\n\nexport enum DataWedgeConfigMode {\n CREATE_IF_NOT_EXIST = 'CREATE_IF_NOT_EXIST',\n OVERWRITE = 'OVERWRITE',\n REMOVE = 'REMOVE',\n UPDATE = 'UPDATE',\n}\n\nexport enum DataWedgeNotificationType {\n CONFIGURATION_UPDATE = 'CONFIGURATION_UPDATE',\n PROFILE_SWITCH = 'PROFILE_SWITCH',\n SCANNER_STATUS = 'SCANNER_STATUS',\n}\n\nexport enum DataWedgePlugin {\n ADF = 'ADF',\n BARCODE = 'BARCODE',\n BDF = 'BDF',\n DCP = 'DCP',\n EKB = 'EKB',\n INTENT = 'INTENT',\n IP = 'IP',\n KEYSTROKE = 'KEYSTROKE',\n MSR = 'MSR',\n RFID = 'RFID',\n SERIAL = 'SERIAL',\n TOKENS = 'TOKENS',\n VOICE = 'VOICE',\n}\n\nexport enum ScannerIdentifier {\n AUTO = 'AUTO',\n BLUETOOTH_DS3678 = 'BLUETOOTH_DS3678',\n BLUETOOTH_RS6000 = 'BLUETOOTH_RS6000',\n BLUETOOTH_SSI = 'BLUETOOTH_SSI',\n INTERNAL_CAMERA = 'INTERNAL_CAMERA',\n INTERNAL_IMAGER = 'INTERNAL_IMAGER',\n INTERNAL_LASER = 'INTERNAL_LASER',\n PLUGABLE_SSI = 'PLUGABLE_SSI',\n PLUGABLE_SSI_RS5000 = 'PLUGABLE_SSI_RS5000',\n SERIAL_SSI = 'SERIAL_SSI',\n USB_SSI_DS3608 = 'USB_SSI_DS3608',\n}\n\nexport enum ScannerStatus {\n CONNECTED = 'CONNECTED',\n DISABLED = 'DISABLED',\n DISCONNECTED = 'DISCONNECTED',\n IDLE = 'IDLE',\n SCANNING = 'SCANNING',\n WAITING = 'WAITING',\n}\n\nexport enum ZebraErrorCodes {\n APP_ALREADY_ASSOCIATED = 'APP_ALREADY_ASSOCIATED',\n APP_ALREADY_IN_DISABLED_LIST = 'APP_ALREADY_IN_DISABLED_LIST',\n BUNDLE_EMPTY = 'BUNDLE_EMPTY',\n CANNOT_READ_FILE = 'CANNOT_READ_FILE',\n CONFIG_FILE_NOT_EXIST = 'CONFIG_FILE_NOT_EXIST',\n DATAWEDGE_ALREADY_DISABLED = 'DATAWEDGE_ALREADY_DISABLED',\n DATAWEDGE_ALREADY_ENABLED = 'DATAWEDGE_ALREADY_ENABLED',\n DATAWEDGE_DISABLED = 'DATAWEDGE_DISABLED',\n DEVICE_NOT_CONNECTED = 'DEVICE_NOT_CONNECTED',\n DEVICE_NOT_SUPPORTED = 'DEVICE_NOT_SUPPORTED',\n INPUT_NOT_ENABLED = 'INPUT_NOT_ENABLED',\n INVALID_CONFIG_FILE = 'INVALID_CONFIG_FILE',\n INVALID_FILE_NAME = 'INVALID_FILE_NAME',\n INVALID_FOLDER_PATH = 'INVALID_FOLDER_PATH',\n OPERATION_NOT_ALLOWED = 'OPERATION_NOT_ALLOWED',\n PARAMETER_INVALID = 'PARAMETER_INVALID',\n PLUGIN_BUNDLE_INVALID = 'PLUGIN_BUNDLE_INVALID',\n PLUGIN_DISABLED = 'PLUGIN_DISABLED',\n PLUGIN_DISABLED_IN_CONFIG = 'PLUGIN_DISABLED_IN_CONFIG',\n PLUGIN_NOT_SUPPORTED = 'PLUGIN_NOT_SUPPORTED',\n PROFILE_ALREADY_EXISTS = 'PROFILE_ALREADY_EXISTS',\n PROFILE_ALREADY_SET = 'PROFILE_ALREADY_SET',\n PROFILE_DISABLED = 'PROFILE_DISABLED',\n PROFILE_HAS_APP_ASSOCIATION = 'PROFILE_HAS_APP_ASSOCIATION',\n PROFILE_NAME_EMPTY = 'PROFILE_NAME_EMPTY',\n PROFILE_NOT_FOUND = 'PROFILE_NOT_FOUND',\n SCANNER_ALREADY_DISABLED = 'SCANNER_ALREADY_DISABLED',\n SCANNER_ALREADY_ENABLED = 'SCANNER_ALREADY_ENABLED',\n SCANNER_DISABLE_FAILED = 'SCANNER_DISABLE_FAILED',\n SCANNER_ENABLE_FAILED = 'SCANNER_ENABLE_FAILED',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport type DataWedgeScalar = string | number | boolean | null;\nexport type DataWedgeParameterValue =\n | DataWedgeScalar\n | DataWedgeScalar[]\n | DataWedgePluginParameters\n | DataWedgePluginParameters[];\n\nexport interface DataWedgePluginParameters {\n [key: string]: DataWedgeParameterValue;\n}\n\nexport interface CloneProfileOptions {\n destProfileName: string;\n sourceProfileName: string;\n}\n\nexport interface CreateProfileOptions {\n profileName: string;\n}\n\nexport interface DataWedgeAppConfig {\n activityList: string[];\n packageName: string;\n}\n\nexport interface DataWedgeNotifyOptions {\n deviceIdentifier: string;\n notificationSettings: number[];\n}\n\nexport interface DataWedgePluginConfig {\n outputPluginName?: DataWedgePlugin;\n paramList: DataWedgePluginParameters;\n pluginName: DataWedgePlugin;\n resetConfig?: boolean;\n}\n\nexport interface DeleteProfileOptions {\n profileNames: string[];\n}\n\nexport interface PluginConfigOptions {\n outputPluginName?: DataWedgePlugin;\n pluginName: DataWedgePlugin;\n}\n\nexport interface GetConfigOptions {\n pluginConfigs?: PluginConfigOptions[];\n profileName: string;\n}\n\nexport interface ImportConfigOptions {\n fileList?: string[];\n folderPath: string;\n}\n\nexport interface RegisterForNotificationOptions {\n appName?: string;\n callback?: (notification: ZebraNotificationEvent) => void;\n intentAction?: string;\n notificationType: DataWedgeNotificationType;\n}\n\nexport interface RegisterScanIntentActionOptions {\n /** DataWedge intent action used for barcode scan broadcasts (physical trigger or soft scan). */\n intentAction: string;\n}\n\nexport interface RenameProfileOptions {\n currentProfileName: string;\n newProfileName: string;\n}\n\nexport interface ReportingOptions {\n reportingEnabled: boolean;\n reportingGenerateOption?: 'manual' | 'auto' | 'both';\n reportingShowForManualImport?: boolean;\n}\n\nexport interface SetConfigOptions {\n appList?: DataWedgeAppConfig[];\n configMode?: DataWedgeConfigMode;\n pluginConfigs?: DataWedgePluginConfig[];\n profileEnabled?: boolean;\n profileName: string;\n /**\n * Registers this intent action in the plugin receiver after a successful `setConfig` (runtime only;\n * call again on every app start). `INTENT` entries in `pluginConfigs` also register their\n * `intent_action` values automatically after a successful `setConfig`, whether or not\n * `scanIntentAction` is supplied.\n */\n scanIntentAction?: string;\n}\n\nexport interface SetDisabledAppListOptions {\n appList?: DataWedgeAppConfig[];\n configMode: DataWedgeConfigMode;\n}\n\nexport interface SwitchScannerParamsOptions {\n scannerIdentifier: ScannerIdentifier;\n scannerParams: DataWedgePluginParameters;\n}\n\nexport interface ZebraDeviceScanner {\n connectionState: boolean;\n id?: string;\n index: number;\n name: string;\n}\n\nexport interface ZebraDeviceVersionInfo {\n barcodeVersion?: string;\n dataWedgeVersion?: string;\n decoderVersion?: string;\n scannerFirmwareVersions?: string[];\n simulScanVersion?: string;\n}\n\nexport interface ZebraError {\n code: ZebraErrorCodes | string;\n message: string;\n}\n\nexport interface ZebraProfileConfiguration {\n appList?: DataWedgeAppConfig[];\n pluginConfigList: DataWedgePluginConfig[];\n profileEnabled: boolean;\n profileName: string;\n}\n\nexport interface ZebraScanResult {\n data: string;\n decodedMode?: string;\n intentAction?: string;\n labelType?: string;\n source?: string;\n}\n\nexport interface ZebraNotificationEvent {\n notificationType: string;\n profileName?: string;\n scannerStatus?: ScannerStatus | string;\n status?: string;\n raw: Record<string, unknown>;\n}\n\nexport interface DataWedgeStatusResult {\n isEnabled: boolean;\n}\n\nexport interface IgnoreDisabledProfilesResult {\n enabled: boolean;\n}\n\nexport interface ZebraDataWedgePlugin extends Plugin {\n cloneProfile(options: CloneProfileOptions): Promise<void>;\n createProfile(options: CreateProfileOptions): Promise<void>;\n deleteProfile(options: DeleteProfileOptions): Promise<void>;\n importConfig(options: ImportConfigOptions): Promise<void>;\n renameProfile(options: RenameProfileOptions): Promise<void>;\n restoreConfig(): Promise<void>;\n setConfig(options: SetConfigOptions): Promise<void>;\n setDisabledAppList(options: SetDisabledAppListOptions): Promise<void>;\n setIgnoreDisabledProfiles(options: IgnoreDisabledProfilesResult): Promise<void>;\n registerForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void>;\n /**\n * Registers a DataWedge scan broadcast intent action in the Android plugin receiver (runtime only;\n * call again on every app start). Use when your profile uses a custom `intent_action` and scans\n * come from the physical trigger.\n */\n registerScanIntentAction(options: RegisterScanIntentActionOptions): Promise<void>;\n unRegisterForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void>;\n enumerateScanners(): Promise<{ scanners: ZebraDeviceScanner[] }>;\n getActiveProfile(): Promise<{ profileName: string }>;\n getAssociatedApps(options: { profileName: string }): Promise<{ appList: DataWedgeAppConfig[] }>;\n getConfig(options: GetConfigOptions): Promise<ZebraProfileConfiguration>;\n getDatawedgeStatus(): Promise<DataWedgeStatusResult>;\n getDisabledAppList(): Promise<{ appList: DataWedgeAppConfig[] }>;\n getIgnoreDisabledProfiles(): Promise<IgnoreDisabledProfilesResult>;\n getProfilesList(): Promise<{ profiles: string[] }>;\n getScannerStatus(): Promise<{ status: ScannerStatus | string }>;\n getVersionInfo(): Promise<ZebraDeviceVersionInfo>;\n disableDatawedge(): Promise<void>;\n disableScannerInput(): Promise<void>;\n enableDatawedge(): Promise<void>;\n enableScannerInput(): Promise<void>;\n enumerateTriggers(): Promise<{ triggers: string[] }>;\n notify(options: DataWedgeNotifyOptions): Promise<void>;\n resetDefaultProfile(): Promise<void>;\n setDefaultProfile(options: { profileName: string }): Promise<void>;\n setReportingOptions(options: ReportingOptions): Promise<void>;\n softRfidTrigger(): Promise<ZebraScanResult>;\n softScanTrigger(options: { intentAction: string }): Promise<ZebraScanResult>;\n switchScanner(options: { scannerIndex?: string; scannerIdentifier?: ScannerIdentifier }): Promise<void>;\n switchScannerParams(options: SwitchScannerParamsOptions): Promise<void>;\n switchToProfile(options: { profileName: string }): Promise<void>;\n getPluginVersion(): Promise<PluginVersionResult>;\n addListener(eventName: 'scan', listenerFunc: (event: ZebraScanResult) => void): Promise<PluginListenerHandle>;\n addListener(\n eventName: 'notification',\n listenerFunc: (event: ZebraNotificationEvent) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kEAA2C,CAAA;IAC3C,8CAAuB,CAAA;IACvB,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;AACnB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAED,MAAM,CAAN,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,0EAA6C,CAAA;IAC7C,8DAAiC,CAAA;IACjC,8DAAiC,CAAA;AACnC,CAAC,EAJW,yBAAyB,KAAzB,yBAAyB,QAIpC;AAED,MAAM,CAAN,IAAY,eAcX;AAdD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,sCAAmB,CAAA;IACnB,8BAAW,CAAA;IACX,8BAAW,CAAA;IACX,8BAAW,CAAA;IACX,oCAAiB,CAAA;IACjB,4BAAS,CAAA;IACT,0CAAuB,CAAA;IACvB,8BAAW,CAAA;IACX,gCAAa,CAAA;IACb,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,kCAAe,CAAA;AACjB,CAAC,EAdW,eAAe,KAAf,eAAe,QAc1B;AAED,MAAM,CAAN,IAAY,iBAYX;AAZD,WAAY,iB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AgC1B","sourcesContent":["import type { Plugin, PluginListenerHandle } from '@capacitor/core';\n\nexport interface PluginVersionResult {\n version: string;\n}\n\nexport enum DataWedgeConfigMode {\n CREATE_IF_NOT_EXIST = 'CREATE_IF_NOT_EXIST',\n OVERWRITE = 'OVERWRITE',\n REMOVE = 'REMOVE',\n UPDATE = 'UPDATE',\n}\n\nexport enum DataWedgeNotificationType {\n CONFIGURATION_UPDATE = 'CONFIGURATION_UPDATE',\n PROFILE_SWITCH = 'PROFILE_SWITCH',\n SCANNER_STATUS = 'SCANNER_STATUS',\n}\n\nexport enum DataWedgePlugin {\n ADF = 'ADF',\n BARCODE = 'BARCODE',\n BDF = 'BDF',\n DCP = 'DCP',\n EKB = 'EKB',\n INTENT = 'INTENT',\n IP = 'IP',\n KEYSTROKE = 'KEYSTROKE',\n MSR = 'MSR',\n RFID = 'RFID',\n SERIAL = 'SERIAL',\n TOKENS = 'TOKENS',\n VOICE = 'VOICE',\n}\n\nexport enum ScannerIdentifier {\n AUTO = 'AUTO',\n BLUETOOTH_DS3678 = 'BLUETOOTH_DS3678',\n BLUETOOTH_RS6000 = 'BLUETOOTH_RS6000',\n BLUETOOTH_SSI = 'BLUETOOTH_SSI',\n INTERNAL_CAMERA = 'INTERNAL_CAMERA',\n INTERNAL_IMAGER = 'INTERNAL_IMAGER',\n INTERNAL_LASER = 'INTERNAL_LASER',\n PLUGABLE_SSI = 'PLUGABLE_SSI',\n PLUGABLE_SSI_RS5000 = 'PLUGABLE_SSI_RS5000',\n SERIAL_SSI = 'SERIAL_SSI',\n USB_SSI_DS3608 = 'USB_SSI_DS3608',\n}\n\nexport enum ScannerStatus {\n CONNECTED = 'CONNECTED',\n DISABLED = 'DISABLED',\n DISCONNECTED = 'DISCONNECTED',\n IDLE = 'IDLE',\n SCANNING = 'SCANNING',\n WAITING = 'WAITING',\n}\n\nexport enum ZebraErrorCodes {\n APP_ALREADY_ASSOCIATED = 'APP_ALREADY_ASSOCIATED',\n APP_ALREADY_IN_DISABLED_LIST = 'APP_ALREADY_IN_DISABLED_LIST',\n BUNDLE_EMPTY = 'BUNDLE_EMPTY',\n CANNOT_READ_FILE = 'CANNOT_READ_FILE',\n CONFIG_FILE_NOT_EXIST = 'CONFIG_FILE_NOT_EXIST',\n DATAWEDGE_ALREADY_DISABLED = 'DATAWEDGE_ALREADY_DISABLED',\n DATAWEDGE_ALREADY_ENABLED = 'DATAWEDGE_ALREADY_ENABLED',\n DATAWEDGE_DISABLED = 'DATAWEDGE_DISABLED',\n DEVICE_NOT_CONNECTED = 'DEVICE_NOT_CONNECTED',\n DEVICE_NOT_SUPPORTED = 'DEVICE_NOT_SUPPORTED',\n INPUT_NOT_ENABLED = 'INPUT_NOT_ENABLED',\n INVALID_CONFIG_FILE = 'INVALID_CONFIG_FILE',\n INVALID_FILE_NAME = 'INVALID_FILE_NAME',\n INVALID_FOLDER_PATH = 'INVALID_FOLDER_PATH',\n OPERATION_NOT_ALLOWED = 'OPERATION_NOT_ALLOWED',\n PARAMETER_INVALID = 'PARAMETER_INVALID',\n PLUGIN_BUNDLE_INVALID = 'PLUGIN_BUNDLE_INVALID',\n PLUGIN_DISABLED = 'PLUGIN_DISABLED',\n PLUGIN_DISABLED_IN_CONFIG = 'PLUGIN_DISABLED_IN_CONFIG',\n PLUGIN_NOT_SUPPORTED = 'PLUGIN_NOT_SUPPORTED',\n PROFILE_ALREADY_EXISTS = 'PROFILE_ALREADY_EXISTS',\n PROFILE_ALREADY_SET = 'PROFILE_ALREADY_SET',\n PROFILE_DISABLED = 'PROFILE_DISABLED',\n PROFILE_HAS_APP_ASSOCIATION = 'PROFILE_HAS_APP_ASSOCIATION',\n PROFILE_NAME_EMPTY = 'PROFILE_NAME_EMPTY',\n PROFILE_NOT_FOUND = 'PROFILE_NOT_FOUND',\n SCANNER_ALREADY_DISABLED = 'SCANNER_ALREADY_DISABLED',\n SCANNER_ALREADY_ENABLED = 'SCANNER_ALREADY_ENABLED',\n SCANNER_DISABLE_FAILED = 'SCANNER_DISABLE_FAILED',\n SCANNER_ENABLE_FAILED = 'SCANNER_ENABLE_FAILED',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport type DataWedgeScalar = string | number | boolean | null;\nexport type DataWedgeParameterValue =\n | DataWedgeScalar\n | DataWedgeScalar[]\n | DataWedgePluginParameters\n | DataWedgePluginParameters[];\n\nexport interface DataWedgePluginParameters {\n [key: string]: DataWedgeParameterValue;\n}\n\nexport interface CloneProfileOptions {\n destProfileName: string;\n sourceProfileName: string;\n}\n\nexport interface CreateProfileOptions {\n profileName: string;\n}\n\nexport interface DataWedgeAppConfig {\n activityList: string[];\n packageName: string;\n}\n\nexport interface DataWedgeNotifyOptions {\n deviceIdentifier: string;\n notificationSettings: number[];\n}\n\nexport interface DataWedgePluginConfig {\n outputPluginName?: DataWedgePlugin;\n paramList: DataWedgePluginParameters;\n pluginName: DataWedgePlugin;\n resetConfig?: boolean;\n}\n\nexport interface DeleteProfileOptions {\n profileNames: string[];\n}\n\nexport interface PluginConfigOptions {\n outputPluginName?: DataWedgePlugin;\n pluginName: DataWedgePlugin;\n}\n\nexport interface GetConfigOptions {\n pluginConfigs?: PluginConfigOptions[];\n profileName: string;\n}\n\nexport interface ImportConfigOptions {\n fileList?: string[];\n folderPath: string;\n}\n\nexport interface RegisterForNotificationOptions {\n appName?: string;\n callback?: (notification: ZebraNotificationEvent) => void;\n intentAction?: string;\n notificationType: DataWedgeNotificationType;\n}\n\nexport interface RegisterScanIntentActionOptions {\n /** DataWedge intent action used for barcode scan broadcasts (physical trigger or soft scan). */\n intentAction: string;\n}\n\nexport interface RenameProfileOptions {\n currentProfileName: string;\n newProfileName: string;\n}\n\nexport interface ReportingOptions {\n reportingEnabled: boolean;\n reportingGenerateOption?: 'manual' | 'auto' | 'both';\n reportingShowForManualImport?: boolean;\n}\n\nexport interface SetConfigOptions {\n appList?: DataWedgeAppConfig[];\n configMode?: DataWedgeConfigMode;\n pluginConfigs?: DataWedgePluginConfig[];\n profileEnabled?: boolean;\n profileName: string;\n /**\n * Registers this intent action in the plugin receiver after a successful `setConfig` (runtime only;\n * call again on every app start). `INTENT` entries in `pluginConfigs` also register their\n * `intent_action` values automatically after a successful `setConfig`, whether or not\n * `scanIntentAction` is supplied.\n */\n scanIntentAction?: string;\n}\n\nexport interface SetDisabledAppListOptions {\n appList?: DataWedgeAppConfig[];\n configMode: DataWedgeConfigMode;\n}\n\nexport interface SwitchScannerParamsOptions {\n scannerIdentifier: ScannerIdentifier;\n scannerParams: DataWedgePluginParameters;\n}\n\nexport interface ZebraDeviceScanner {\n connectionState: boolean;\n id?: string;\n index: number;\n name: string;\n}\n\nexport interface ZebraDeviceVersionInfo {\n barcodeVersion?: string;\n dataWedgeVersion?: string;\n decoderVersion?: string;\n scannerFirmwareVersions?: string[];\n simulScanVersion?: string;\n}\n\nexport interface ZebraError {\n code: ZebraErrorCodes | string;\n message: string;\n}\n\nexport interface ZebraProfileConfiguration {\n appList?: DataWedgeAppConfig[];\n pluginConfigList: DataWedgePluginConfig[];\n profileEnabled: boolean;\n profileName: string;\n}\n\nexport interface ZebraScanResult {\n data: string;\n decodedMode?: string;\n intentAction?: string;\n labelType?: string;\n source?: string;\n}\n\nexport interface ZebraNotificationEvent {\n notificationType: string;\n profileName?: string;\n scannerStatus?: ScannerStatus | string;\n status?: string;\n raw: Record<string, unknown>;\n}\n\nexport interface DataWedgeStatusResult {\n isEnabled: boolean;\n}\n\nexport interface IgnoreDisabledProfilesResult {\n enabled: boolean;\n}\n\nexport interface ZebraDataWedgePlugin extends Plugin {\n cloneProfile(options: CloneProfileOptions): Promise<void>;\n createProfile(options: CreateProfileOptions): Promise<void>;\n deleteProfile(options: DeleteProfileOptions): Promise<void>;\n importConfig(options: ImportConfigOptions): Promise<void>;\n renameProfile(options: RenameProfileOptions): Promise<void>;\n restoreConfig(): Promise<void>;\n setConfig(options: SetConfigOptions): Promise<void>;\n setDisabledAppList(options: SetDisabledAppListOptions): Promise<void>;\n setIgnoreDisabledProfiles(options: IgnoreDisabledProfilesResult): Promise<void>;\n /**\n * Completes when the notification command is dispatched to DataWedge.\n * This does not confirm registration, policy approval, or scanner readiness;\n * observe notification events to determine the scanner's state.\n */\n registerForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void>;\n /**\n * Registers a DataWedge scan broadcast intent action in the Android plugin receiver (runtime only;\n * call again on every app start). Use when your profile uses a custom `intent_action` and scans\n * come from the physical trigger.\n */\n registerScanIntentAction(options: RegisterScanIntentActionOptions): Promise<void>;\n /**\n * Completes when the unregistration command is dispatched to DataWedge.\n * This does not confirm unregistration or policy approval; notifications may already be queued.\n * Dispose of local listeners separately when using the low-level API.\n */\n unRegisterForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void>;\n enumerateScanners(): Promise<{ scanners: ZebraDeviceScanner[] }>;\n getActiveProfile(): Promise<{ profileName: string }>;\n getAssociatedApps(options: { profileName: string }): Promise<{ appList: DataWedgeAppConfig[] }>;\n getConfig(options: GetConfigOptions): Promise<ZebraProfileConfiguration>;\n getDatawedgeStatus(): Promise<DataWedgeStatusResult>;\n getDisabledAppList(): Promise<{ appList: DataWedgeAppConfig[] }>;\n getIgnoreDisabledProfiles(): Promise<IgnoreDisabledProfilesResult>;\n getProfilesList(): Promise<{ profiles: string[] }>;\n getScannerStatus(): Promise<{ status: ScannerStatus | string }>;\n getVersionInfo(): Promise<ZebraDeviceVersionInfo>;\n disableDatawedge(): Promise<void>;\n disableScannerInput(): Promise<void>;\n enableDatawedge(): Promise<void>;\n enableScannerInput(): Promise<void>;\n enumerateTriggers(): Promise<{ triggers: string[] }>;\n notify(options: DataWedgeNotifyOptions): Promise<void>;\n resetDefaultProfile(): Promise<void>;\n setDefaultProfile(options: { profileName: string }): Promise<void>;\n setReportingOptions(options: ReportingOptions): Promise<void>;\n softRfidTrigger(): Promise<ZebraScanResult>;\n softScanTrigger(options: { intentAction: string }): Promise<ZebraScanResult>;\n switchScanner(options: { scannerIndex?: string; scannerIdentifier?: ScannerIdentifier }): Promise<void>;\n switchScannerParams(options: SwitchScannerParamsOptions): Promise<void>;\n switchToProfile(options: { profileName: string }): Promise<void>;\n getPluginVersion(): Promise<PluginVersionResult>;\n addListener(eventName: 'scan', listenerFunc: (event: ZebraScanResult) => void): Promise<PluginListenerHandle>;\n addListener(\n eventName: 'notification',\n listenerFunc: (event: ZebraNotificationEvent) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { CloneProfileOptions, DataWedgeAppConfig, CreateProfileOptions, DataWedgeNotifyOptions, DataWedgeStatusResult, GetConfigOptions, ImportConfigOptions, RegisterForNotificationOptions, RenameProfileOptions, ReportingOptions, ScannerStatus, SetConfigOptions, SetDisabledAppListOptions, SwitchScannerParamsOptions, ZebraDeviceScanner, ZebraDataWedgePlugin, ZebraDeviceVersionInfo, ZebraProfileConfiguration, ZebraScanResult } from './definitions';
1
+ import type { CloneProfileOptions, DataWedgeAppConfig, CreateProfileOptions, DataWedgeNotifyOptions, DataWedgeStatusResult, GetConfigOptions, ImportConfigOptions, RenameProfileOptions, ReportingOptions, ScannerStatus, SetConfigOptions, SetDisabledAppListOptions, SwitchScannerParamsOptions, ZebraDeviceScanner, ZebraDataWedgePlugin, ZebraDeviceVersionInfo, ZebraProfileConfiguration, ZebraScanResult } from './definitions';
2
2
  declare const ZebraDataWedge: ZebraDataWedgePlugin;
3
3
  export declare const ZebraConfiguration: {
4
4
  cloneProfile: (options: CloneProfileOptions) => Promise<void>;
@@ -14,8 +14,12 @@ export declare const ZebraConfiguration: {
14
14
  setIgnoreDisabledProfiles: (doIgnoreDisabledProfiles: boolean) => Promise<void>;
15
15
  };
16
16
  export declare const ZebraNotification: {
17
- registerForNotification(options: RegisterForNotificationOptions): Promise<void>;
18
- unRegisterForNotification(options: Omit<RegisterForNotificationOptions, "callback">): Promise<void>;
17
+ registerForNotification(options: import("./definitions").RegisterForNotificationOptions): Promise<void>;
18
+ unRegisterForNotification(options: {
19
+ appName?: string | undefined;
20
+ intentAction?: string | undefined;
21
+ notificationType: import("./definitions").DataWedgeNotificationType;
22
+ }): Promise<void>;
19
23
  };
20
24
  export declare const ZebraQuery: {
21
25
  enumerateScanners: () => Promise<ZebraDeviceScanner[]>;
package/dist/esm/index.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import { registerPlugin } from '@capacitor/core';
2
+ import { createZebraNotification } from './notification-registration';
2
3
  const ZebraDataWedge = registerPlugin('ZebraDataWedge', {
3
4
  web: () => import('./web').then((m) => new m.ZebraDataWedgeWeb()),
4
5
  });
5
- const notificationHandles = new Map();
6
- const notificationKey = (options) => { var _a, _b; return `${(_a = options.appName) !== null && _a !== void 0 ? _a : ''}:${(_b = options.intentAction) !== null && _b !== void 0 ? _b : ''}:${options.notificationType}`; };
7
6
  export const ZebraConfiguration = {
8
7
  cloneProfile: (options) => ZebraDataWedge.cloneProfile(options),
9
8
  createProfile: (options) => ZebraDataWedge.createProfile(options),
@@ -15,35 +14,7 @@ export const ZebraConfiguration = {
15
14
  setDisabledAppList: (options) => ZebraDataWedge.setDisabledAppList(options),
16
15
  setIgnoreDisabledProfiles: (doIgnoreDisabledProfiles) => ZebraDataWedge.setIgnoreDisabledProfiles({ enabled: doIgnoreDisabledProfiles }),
17
16
  };
18
- export const ZebraNotification = {
19
- async registerForNotification(options) {
20
- var _a;
21
- const nativeOptions = {
22
- appName: options.appName,
23
- intentAction: options.intentAction,
24
- notificationType: options.notificationType,
25
- };
26
- await ZebraDataWedge.registerForNotification(nativeOptions);
27
- if (options.callback) {
28
- const key = notificationKey(nativeOptions);
29
- await ((_a = notificationHandles.get(key)) === null || _a === void 0 ? void 0 : _a.remove());
30
- const handle = await ZebraDataWedge.addListener('notification', (event) => {
31
- var _a;
32
- if (event.notificationType === options.notificationType) {
33
- (_a = options.callback) === null || _a === void 0 ? void 0 : _a.call(options, event);
34
- }
35
- });
36
- notificationHandles.set(key, handle);
37
- }
38
- },
39
- async unRegisterForNotification(options) {
40
- var _a;
41
- await ZebraDataWedge.unRegisterForNotification(options);
42
- const key = notificationKey(options);
43
- await ((_a = notificationHandles.get(key)) === null || _a === void 0 ? void 0 : _a.remove());
44
- notificationHandles.delete(key);
45
- },
46
- };
17
+ export const ZebraNotification = createZebraNotification(ZebraDataWedge);
47
18
  export const ZebraQuery = {
48
19
  enumerateScanners: async () => (await ZebraDataWedge.enumerateScanners()).scanners,
49
20
  getActiveProfile: async () => (await ZebraDataWedge.getActiveProfile()).profileName,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAwBjD,MAAM,cAAc,GAAG,cAAc,CAAuB,gBAAgB,EAAE;IAC5E,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;CAClE,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAkE,CAAC;AAEtG,MAAM,eAAe,GAAG,CAAC,OAAyD,EAAE,EAAE,eACpF,OAAA,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,EAAE,IAAI,MAAA,OAAO,CAAC,YAAY,mCAAI,EAAE,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAA,EAAA,CAAC;AAEvF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,YAAY,EAAE,CAAC,OAA4B,EAAiB,EAAE,CAAC,cAAc,CAAC,YAAY,CAAC,OAAO,CAAC;IACnG,aAAa,EAAE,CAAC,OAA6B,EAAiB,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,CAAC;IACtG,aAAa,EAAE,CAAC,OAAmC,EAAiB,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,CAAC;IAC5G,YAAY,EAAE,CAAC,OAA4B,EAAiB,EAAE,C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AE,CAAC,WAAmB,EAAiB,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;IAClH,mBAAmB,EAAE,CAAC,OAAmC,EAAiB,EAAE,CAC1E,cAAc,CAAC,mBAAmB,CAAC,OAAO,CAAC;IAC7C,eAAe,EAAE,CAAC,WAAmB,EAAiB,EAAE,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC;CACzG,CAAC;AAEF,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type {\n CloneProfileOptions,\n DataWedgeAppConfig,\n CreateProfileOptions,\n DataWedgeNotifyOptions,\n DataWedgeStatusResult,\n GetConfigOptions,\n ImportConfigOptions,\n RegisterForNotificationOptions,\n RenameProfileOptions,\n ReportingOptions,\n ScannerStatus,\n SetConfigOptions,\n SetDisabledAppListOptions,\n SwitchScannerParamsOptions,\n ZebraDeviceScanner,\n ZebraDataWedgePlugin,\n ZebraDeviceVersionInfo,\n ZebraProfileConfiguration,\n ZebraScanResult,\n} from './definitions';\n\nconst ZebraDataWedge = registerPlugin<ZebraDataWedgePlugin>('ZebraDataWedge', {\n web: () => import('./web').then((m) => new m.ZebraDataWedgeWeb()),\n});\n\nconst notificationHandles = new Map<string, Awaited<ReturnType<typeof ZebraDataWedge.addListener>>>();\n\nconst notificationKey = (options: Omit<RegisterForNotificationOptions, 'callback'>) =>\n `${options.appName ?? ''}:${options.intentAction ?? ''}:${options.notificationType}`;\n\nexport const ZebraConfiguration = {\n cloneProfile: (options: CloneProfileOptions): Promise<void> => ZebraDataWedge.cloneProfile(options),\n createProfile: (options: CreateProfileOptions): Promise<void> => ZebraDataWedge.createProfile(options),\n deleteProfile: (options: { profileNames: string[] }): Promise<void> => ZebraDataWedge.deleteProfile(options),\n importConfig: (options: ImportConfigOptions): Promise<void> => ZebraDataWedge.importConfig(options),\n renameProfile: (options: RenameProfileOptions): Promise<void> => ZebraDataWedge.renameProfile(options),\n restoreConfig: (): Promise<void> => ZebraDataWedge.restoreConfig(),\n setConfig: (options: SetConfigOptions): Promise<void> => ZebraDataWedge.setConfig(options),\n setDisabledAppList: (options: SetDisabledAppListOptions): Promise<void> => ZebraDataWedge.setDisabledAppList(options),\n setIgnoreDisabledProfiles: (doIgnoreDisabledProfiles: boolean): Promise<void> =>\n ZebraDataWedge.setIgnoreDisabledProfiles({ enabled: doIgnoreDisabledProfiles }),\n};\n\nexport const ZebraNotification = {\n async registerForNotification(options: RegisterForNotificationOptions): Promise<void> {\n const nativeOptions = {\n appName: options.appName,\n intentAction: options.intentAction,\n notificationType: options.notificationType,\n };\n await ZebraDataWedge.registerForNotification(nativeOptions);\n if (options.callback) {\n const key = notificationKey(nativeOptions);\n await notificationHandles.get(key)?.remove();\n const handle = await ZebraDataWedge.addListener('notification', (event) => {\n if (event.notificationType === options.notificationType) {\n options.callback?.(event);\n }\n });\n notificationHandles.set(key, handle);\n }\n },\n async unRegisterForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void> {\n await ZebraDataWedge.unRegisterForNotification(options);\n const key = notificationKey(options);\n await notificationHandles.get(key)?.remove();\n notificationHandles.delete(key);\n },\n};\n\nexport const ZebraQuery = {\n enumerateScanners: async (): Promise<ZebraDeviceScanner[]> => (await ZebraDataWedge.enumerateScanners()).scanners,\n getActiveProfile: async (): Promise<string> => (await ZebraDataWedge.getActiveProfile()).profileName,\n getAssociatedApps: async (profileName: string): Promise<DataWedgeAppConfig[]> =>\n (await ZebraDataWedge.getAssociatedApps({ profileName })).appList,\n getConfig: (options: GetConfigOptions): Promise<ZebraProfileConfiguration> => ZebraDataWedge.getConfig(options),\n getDatawedgeStatus: (): Promise<DataWedgeStatusResult> => ZebraDataWedge.getDatawedgeStatus(),\n getDisabledAppList: async (): Promise<DataWedgeAppConfig[]> => (await ZebraDataWedge.getDisabledAppList()).appList,\n getIgnoreDisabledProfiles: async (): Promise<boolean> => (await ZebraDataWedge.getIgnoreDisabledProfiles()).enabled,\n getProfilesList: async (): Promise<string[]> => (await ZebraDataWedge.getProfilesList()).profiles,\n getScannerStatus: async (): Promise<ScannerStatus | string> => (await ZebraDataWedge.getScannerStatus()).status,\n getVersionInfo: (): Promise<ZebraDeviceVersionInfo> => ZebraDataWedge.getVersionInfo(),\n};\n\nexport const ZebraRuntime = {\n registerScanIntentAction: (intentAction: string): Promise<void> =>\n ZebraDataWedge.registerScanIntentAction({ intentAction }),\n disableDatawedge: (): Promise<void> => ZebraDataWedge.disableDatawedge(),\n disableScannerInput: (): Promise<void> => ZebraDataWedge.disableScannerInput(),\n enableDatawedge: (): Promise<void> => ZebraDataWedge.enableDatawedge(),\n enableScannerInput: (): Promise<void> => ZebraDataWedge.enableScannerInput(),\n enumerateTriggers: async (): Promise<string[]> => (await ZebraDataWedge.enumerateTriggers()).triggers,\n notify: (options: DataWedgeNotifyOptions): Promise<void> => ZebraDataWedge.notify(options),\n resetDefaultProfile: (): Promise<void> => ZebraDataWedge.resetDefaultProfile(),\n setDefaultProfile: (profileName: string): Promise<void> => ZebraDataWedge.setDefaultProfile({ profileName }),\n setReportingOptions: (options: ReportingOptions): Promise<void> => ZebraDataWedge.setReportingOptions(options),\n softRfidTrigger: (): Promise<ZebraScanResult> => ZebraDataWedge.softRfidTrigger(),\n softScanTrigger: (intentAction: string): Promise<ZebraScanResult> => ZebraDataWedge.softScanTrigger({ intentAction }),\n switchScanner: (scanerIndex: string): Promise<void> => ZebraDataWedge.switchScanner({ scannerIndex: scanerIndex }),\n switchScannerParams: (options: SwitchScannerParamsOptions): Promise<void> =>\n ZebraDataWedge.switchScannerParams(options),\n switchToProfile: (profileName: string): Promise<void> => ZebraDataWedge.switchToProfile({ profileName }),\n};\n\nexport * from './definitions';\nexport { ZebraDataWedge };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cA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DataWedgeAppConfig,\n CreateProfileOptions,\n DataWedgeNotifyOptions,\n DataWedgeStatusResult,\n GetConfigOptions,\n ImportConfigOptions,\n RenameProfileOptions,\n ReportingOptions,\n ScannerStatus,\n SetConfigOptions,\n SetDisabledAppListOptions,\n SwitchScannerParamsOptions,\n ZebraDeviceScanner,\n ZebraDataWedgePlugin,\n ZebraDeviceVersionInfo,\n ZebraProfileConfiguration,\n ZebraScanResult,\n} from './definitions';\nimport { createZebraNotification } from './notification-registration';\n\nconst ZebraDataWedge = registerPlugin<ZebraDataWedgePlugin>('ZebraDataWedge', {\n web: () => import('./web').then((m) => new m.ZebraDataWedgeWeb()),\n});\n\nexport const ZebraConfiguration = {\n cloneProfile: (options: CloneProfileOptions): Promise<void> => ZebraDataWedge.cloneProfile(options),\n createProfile: (options: CreateProfileOptions): Promise<void> => ZebraDataWedge.createProfile(options),\n deleteProfile: (options: { profileNames: string[] }): Promise<void> => ZebraDataWedge.deleteProfile(options),\n importConfig: (options: ImportConfigOptions): Promise<void> => ZebraDataWedge.importConfig(options),\n renameProfile: (options: RenameProfileOptions): Promise<void> => ZebraDataWedge.renameProfile(options),\n restoreConfig: (): Promise<void> => ZebraDataWedge.restoreConfig(),\n setConfig: (options: SetConfigOptions): Promise<void> => ZebraDataWedge.setConfig(options),\n setDisabledAppList: (options: SetDisabledAppListOptions): Promise<void> => ZebraDataWedge.setDisabledAppList(options),\n setIgnoreDisabledProfiles: (doIgnoreDisabledProfiles: boolean): Promise<void> =>\n ZebraDataWedge.setIgnoreDisabledProfiles({ enabled: doIgnoreDisabledProfiles }),\n};\n\nexport const ZebraNotification = createZebraNotification(ZebraDataWedge);\n\nexport const ZebraQuery = {\n enumerateScanners: async (): Promise<ZebraDeviceScanner[]> => (await ZebraDataWedge.enumerateScanners()).scanners,\n getActiveProfile: async (): Promise<string> => (await ZebraDataWedge.getActiveProfile()).profileName,\n getAssociatedApps: async (profileName: string): Promise<DataWedgeAppConfig[]> =>\n (await ZebraDataWedge.getAssociatedApps({ profileName })).appList,\n getConfig: (options: GetConfigOptions): Promise<ZebraProfileConfiguration> => ZebraDataWedge.getConfig(options),\n getDatawedgeStatus: (): Promise<DataWedgeStatusResult> => ZebraDataWedge.getDatawedgeStatus(),\n getDisabledAppList: async (): Promise<DataWedgeAppConfig[]> => (await ZebraDataWedge.getDisabledAppList()).appList,\n getIgnoreDisabledProfiles: async (): Promise<boolean> => (await ZebraDataWedge.getIgnoreDisabledProfiles()).enabled,\n getProfilesList: async (): Promise<string[]> => (await ZebraDataWedge.getProfilesList()).profiles,\n getScannerStatus: async (): Promise<ScannerStatus | string> => (await ZebraDataWedge.getScannerStatus()).status,\n getVersionInfo: (): Promise<ZebraDeviceVersionInfo> => ZebraDataWedge.getVersionInfo(),\n};\n\nexport const ZebraRuntime = {\n registerScanIntentAction: (intentAction: string): Promise<void> =>\n ZebraDataWedge.registerScanIntentAction({ intentAction }),\n disableDatawedge: (): Promise<void> => ZebraDataWedge.disableDatawedge(),\n disableScannerInput: (): Promise<void> => ZebraDataWedge.disableScannerInput(),\n enableDatawedge: (): Promise<void> => ZebraDataWedge.enableDatawedge(),\n enableScannerInput: (): Promise<void> => ZebraDataWedge.enableScannerInput(),\n enumerateTriggers: async (): Promise<string[]> => (await ZebraDataWedge.enumerateTriggers()).triggers,\n notify: (options: DataWedgeNotifyOptions): Promise<void> => ZebraDataWedge.notify(options),\n resetDefaultProfile: (): Promise<void> => ZebraDataWedge.resetDefaultProfile(),\n setDefaultProfile: (profileName: string): Promise<void> => ZebraDataWedge.setDefaultProfile({ profileName }),\n setReportingOptions: (options: ReportingOptions): Promise<void> => ZebraDataWedge.setReportingOptions(options),\n softRfidTrigger: (): Promise<ZebraScanResult> => ZebraDataWedge.softRfidTrigger(),\n softScanTrigger: (intentAction: string): Promise<ZebraScanResult> => ZebraDataWedge.softScanTrigger({ intentAction }),\n switchScanner: (scanerIndex: string): Promise<void> => ZebraDataWedge.switchScanner({ scannerIndex: scanerIndex }),\n switchScannerParams: (options: SwitchScannerParamsOptions): Promise<void> =>\n ZebraDataWedge.switchScannerParams(options),\n switchToProfile: (profileName: string): Promise<void> => ZebraDataWedge.switchToProfile({ profileName }),\n};\n\nexport * from './definitions';\nexport { ZebraDataWedge };\n"]}
@@ -0,0 +1,15 @@
1
+ import type { PluginListenerHandle } from '@capacitor/core';
2
+ import type { RegisterForNotificationOptions, ZebraNotificationEvent } from './definitions';
3
+ type NativeOptions = Omit<RegisterForNotificationOptions, 'callback'>;
4
+ interface NotificationBridge {
5
+ registerForNotification(options: NativeOptions): Promise<void>;
6
+ unRegisterForNotification(options: NativeOptions): Promise<void>;
7
+ addListener(event: 'notification', listener: (event: ZebraNotificationEvent) => void): Promise<PluginListenerHandle>;
8
+ }
9
+ /** Keep listener installation and native dispatch in one ordered operation per registration key. */
10
+ export declare function createZebraNotification(native: NotificationBridge): {
11
+ registerForNotification(options: RegisterForNotificationOptions): Promise<void>;
12
+ /** Unregister and remove the local listener; failed cleanup retains an inactive handle for retry. */
13
+ unRegisterForNotification(options: NativeOptions): Promise<void>;
14
+ };
15
+ export {};
@@ -0,0 +1,92 @@
1
+ /** Keep listener installation and native dispatch in one ordered operation per registration key. */
2
+ export function createZebraNotification(native) {
3
+ const registrations = new Map();
4
+ const pendingOperations = new Map();
5
+ const keyFor = (options) => { var _a, _b; return `${(_a = options.appName) !== null && _a !== void 0 ? _a : ''}:${(_b = options.intentAction) !== null && _b !== void 0 ? _b : ''}:${options.notificationType}`; };
6
+ function serialize(key, operation) {
7
+ var _a;
8
+ const previous = (_a = pendingOperations.get(key)) !== null && _a !== void 0 ? _a : Promise.resolve();
9
+ const pending = previous.catch(() => undefined).then(operation);
10
+ pendingOperations.set(key, pending);
11
+ function clear() {
12
+ if (pendingOperations.get(key) === pending)
13
+ pendingOperations.delete(key);
14
+ }
15
+ // Both handlers resolve: cleaning the queue must not create an unhandled rejection.
16
+ void pending.then(clear, clear);
17
+ return pending;
18
+ }
19
+ return {
20
+ registerForNotification(options) {
21
+ const nativeOptions = {
22
+ appName: options.appName,
23
+ intentAction: options.intentAction,
24
+ notificationType: options.notificationType,
25
+ };
26
+ const callback = options.callback;
27
+ const key = keyFor(nativeOptions);
28
+ return serialize(key, async () => {
29
+ var _a;
30
+ if (!callback) {
31
+ await native.registerForNotification(nativeOptions);
32
+ return;
33
+ }
34
+ const previous = registrations.get(key);
35
+ const previousActive = (_a = previous === null || previous === void 0 ? void 0 : previous.active) !== null && _a !== void 0 ? _a : false;
36
+ let active = true;
37
+ // Subscribe first: DataWedge may emit status before native dispatch resolves.
38
+ const handle = await native.addListener('notification', (event) => {
39
+ if (active && event.notificationType === nativeOptions.notificationType)
40
+ callback(event);
41
+ });
42
+ const registration = {
43
+ handle,
44
+ get active() {
45
+ return active;
46
+ },
47
+ set active(value) {
48
+ active = value;
49
+ },
50
+ };
51
+ if (previous)
52
+ previous.active = false;
53
+ registrations.set(key, registration);
54
+ try {
55
+ await native.registerForNotification(nativeOptions);
56
+ }
57
+ catch (error) {
58
+ registration.active = false;
59
+ if (previous) {
60
+ previous.active = previousActive;
61
+ registrations.set(key, previous);
62
+ }
63
+ else {
64
+ registrations.delete(key);
65
+ }
66
+ // Preserve the dispatch error even if listener cleanup itself fails.
67
+ await handle.remove().catch(() => undefined);
68
+ throw error;
69
+ }
70
+ if (previous) {
71
+ // An inactive old callback cannot fire even if removing its native handle fails.
72
+ await previous.handle.remove().catch(() => undefined);
73
+ }
74
+ });
75
+ },
76
+ unRegisterForNotification(options) {
77
+ const key = keyFor(options);
78
+ return serialize(key, async () => {
79
+ await native.unRegisterForNotification(options);
80
+ const registration = registrations.get(key);
81
+ if (registration) {
82
+ registration.active = false;
83
+ // Preserve the wrapper's cleanup contract: retain an inactive handle if removal fails,
84
+ // so a later unregister can retry instead of forgetting the still-installed listener.
85
+ await registration.handle.remove();
86
+ registrations.delete(key);
87
+ }
88
+ });
89
+ },
90
+ };
91
+ }
92
+ //# sourceMappingURL=notification-registration.js.map
@@ -0,0 +1 @@
1
+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GAAG,cAAc,CAAC;wBACjC,aAAa,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;oBACnC,CAAC;yBAAM,CAAC;wBACN,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;oBAC5B,CAAC;oBACD,qEAAqE;oBACrE,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;oBAC7C,MAAM,KAAK,CAAC;gBACd,CAAC;gBACD,IAAI,QAAQ,EAAE,CAAC;oBACb,iFAAiF;oBACjF,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;gBACxD,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QACD,yBAAyB,CAAC,OAAsB;YAC9C,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;YAC5B,OAAO,SAAS,CAAC,GAAG,EAAE,KAAK,IAAI,EAAE;gBAC/B,MAAM,MAAM,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;gBAChD,MAAM,YAAY,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBAC5C,IAAI,YAAY,EAAE,CAAC;oBACjB,YAAY,CAAC,MAAM,GAAG,KAAK,CAAC;oBAC5B,uFAAuF;oBACvF,sFAAsF;oBACtF,MAAM,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;oBACnC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC5B,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nimport type { RegisterForNotificationOptions, ZebraNotificationEvent } from './definitions';\n\ntype NativeOptions = Omit<RegisterForNotificationOptions, 'callback'>;\n\ninterface NotificationBridge {\n registerForNotification(options: NativeOptions): Promise<void>;\n unRegisterForNotification(options: NativeOptions): Promise<void>;\n addListener(event: 'notification', listener: (event: ZebraNotificationEvent) => void): Promise<PluginListenerHandle>;\n}\n\ninterface Registration {\n handle: PluginListenerHandle;\n active: boolean;\n}\n\n/** Keep listener installation and native dispatch in one ordered operation per registration key. */\nexport function createZebraNotification(native: NotificationBridge): {\n registerForNotification(options: RegisterForNotificationOptions): Promise<void>;\n /** Unregister and remove the local listener; failed cleanup retains an inactive handle for retry. */\n unRegisterForNotification(options: NativeOptions): Promise<void>;\n} {\n const registrations = new Map<string, Registration>();\n const pendingOperations = new Map<string, Promise<void>>();\n const keyFor = (options: NativeOptions) =>\n `${options.appName ?? ''}:${options.intentAction ?? ''}:${options.notificationType}`;\n\n function serialize(key: string, operation: () => Promise<void>): Promise<void> {\n const previous = pendingOperations.get(key) ?? Promise.resolve();\n const pending = previous.catch(() => undefined).then(operation);\n pendingOperations.set(key, pending);\n function clear() {\n if (pendingOperations.get(key) === pending) pendingOperations.delete(key);\n }\n // Both handlers resolve: cleaning the queue must not create an unhandled rejection.\n void pending.then(clear, clear);\n return pending;\n }\n\n return {\n registerForNotification(options: RegisterForNotificationOptions): Promise<void> {\n const nativeOptions = {\n appName: options.appName,\n intentAction: options.intentAction,\n notificationType: options.notificationType,\n };\n const callback = options.callback;\n const key = keyFor(nativeOptions);\n return serialize(key, async () => {\n if (!callback) {\n await native.registerForNotification(nativeOptions);\n return;\n }\n const previous = registrations.get(key);\n const previousActive = previous?.active ?? false;\n let active = true;\n // Subscribe first: DataWedge may emit status before native dispatch resolves.\n const handle = await native.addListener('notification', (event) => {\n if (active && event.notificationType === nativeOptions.notificationType) callback(event);\n });\n const registration = {\n handle,\n get active() {\n return active;\n },\n set active(value: boolean) {\n active = value;\n },\n };\n if (previous) previous.active = false;\n registrations.set(key, registration);\n try {\n await native.registerForNotification(nativeOptions);\n } catch (error) {\n registration.active = false;\n if (previous) {\n previous.active = previousActive;\n registrations.set(key, previous);\n } else {\n registrations.delete(key);\n }\n // Preserve the dispatch error even if listener cleanup itself fails.\n await handle.remove().catch(() => undefined);\n throw error;\n }\n if (previous) {\n // An inactive old callback cannot fire even if removing its native handle fails.\n await previous.handle.remove().catch(() => undefined);\n }\n });\n },\n unRegisterForNotification(options: NativeOptions): Promise<void> {\n const key = keyFor(options);\n return serialize(key, async () => {\n await native.unRegisterForNotification(options);\n const registration = registrations.get(key);\n if (registration) {\n registration.active = false;\n // Preserve the wrapper's cleanup contract: retain an inactive handle if removal fails,\n // so a later unregister can retry instead of forgetting the still-installed listener.\n await registration.handle.remove();\n registrations.delete(key);\n }\n });\n },\n };\n}\n"]}
@@ -2,6 +2,98 @@
2
2
 
3
3
  var core = require('@capacitor/core');
4
4
 
5
+ /** Keep listener installation and native dispatch in one ordered operation per registration key. */
6
+ function createZebraNotification(native) {
7
+ const registrations = new Map();
8
+ const pendingOperations = new Map();
9
+ const keyFor = (options) => { var _a, _b; return `${(_a = options.appName) !== null && _a !== void 0 ? _a : ''}:${(_b = options.intentAction) !== null && _b !== void 0 ? _b : ''}:${options.notificationType}`; };
10
+ function serialize(key, operation) {
11
+ var _a;
12
+ const previous = (_a = pendingOperations.get(key)) !== null && _a !== void 0 ? _a : Promise.resolve();
13
+ const pending = previous.catch(() => undefined).then(operation);
14
+ pendingOperations.set(key, pending);
15
+ function clear() {
16
+ if (pendingOperations.get(key) === pending)
17
+ pendingOperations.delete(key);
18
+ }
19
+ // Both handlers resolve: cleaning the queue must not create an unhandled rejection.
20
+ void pending.then(clear, clear);
21
+ return pending;
22
+ }
23
+ return {
24
+ registerForNotification(options) {
25
+ const nativeOptions = {
26
+ appName: options.appName,
27
+ intentAction: options.intentAction,
28
+ notificationType: options.notificationType,
29
+ };
30
+ const callback = options.callback;
31
+ const key = keyFor(nativeOptions);
32
+ return serialize(key, async () => {
33
+ var _a;
34
+ if (!callback) {
35
+ await native.registerForNotification(nativeOptions);
36
+ return;
37
+ }
38
+ const previous = registrations.get(key);
39
+ const previousActive = (_a = previous === null || previous === void 0 ? void 0 : previous.active) !== null && _a !== void 0 ? _a : false;
40
+ let active = true;
41
+ // Subscribe first: DataWedge may emit status before native dispatch resolves.
42
+ const handle = await native.addListener('notification', (event) => {
43
+ if (active && event.notificationType === nativeOptions.notificationType)
44
+ callback(event);
45
+ });
46
+ const registration = {
47
+ handle,
48
+ get active() {
49
+ return active;
50
+ },
51
+ set active(value) {
52
+ active = value;
53
+ },
54
+ };
55
+ if (previous)
56
+ previous.active = false;
57
+ registrations.set(key, registration);
58
+ try {
59
+ await native.registerForNotification(nativeOptions);
60
+ }
61
+ catch (error) {
62
+ registration.active = false;
63
+ if (previous) {
64
+ previous.active = previousActive;
65
+ registrations.set(key, previous);
66
+ }
67
+ else {
68
+ registrations.delete(key);
69
+ }
70
+ // Preserve the dispatch error even if listener cleanup itself fails.
71
+ await handle.remove().catch(() => undefined);
72
+ throw error;
73
+ }
74
+ if (previous) {
75
+ // An inactive old callback cannot fire even if removing its native handle fails.
76
+ await previous.handle.remove().catch(() => undefined);
77
+ }
78
+ });
79
+ },
80
+ unRegisterForNotification(options) {
81
+ const key = keyFor(options);
82
+ return serialize(key, async () => {
83
+ await native.unRegisterForNotification(options);
84
+ const registration = registrations.get(key);
85
+ if (registration) {
86
+ registration.active = false;
87
+ // Preserve the wrapper's cleanup contract: retain an inactive handle if removal fails,
88
+ // so a later unregister can retry instead of forgetting the still-installed listener.
89
+ await registration.handle.remove();
90
+ registrations.delete(key);
91
+ }
92
+ });
93
+ },
94
+ };
95
+ }
96
+
5
97
  exports.DataWedgeConfigMode = void 0;
6
98
  (function (DataWedgeConfigMode) {
7
99
  DataWedgeConfigMode["CREATE_IF_NOT_EXIST"] = "CREATE_IF_NOT_EXIST";
@@ -92,8 +184,6 @@ exports.ZebraErrorCodes = void 0;
92
184
  const ZebraDataWedge = core.registerPlugin('ZebraDataWedge', {
93
185
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.ZebraDataWedgeWeb()),
94
186
  });
95
- const notificationHandles = new Map();
96
- const notificationKey = (options) => { var _a, _b; return `${(_a = options.appName) !== null && _a !== void 0 ? _a : ''}:${(_b = options.intentAction) !== null && _b !== void 0 ? _b : ''}:${options.notificationType}`; };
97
187
  const ZebraConfiguration = {
98
188
  cloneProfile: (options) => ZebraDataWedge.cloneProfile(options),
99
189
  createProfile: (options) => ZebraDataWedge.createProfile(options),
@@ -105,35 +195,7 @@ const ZebraConfiguration = {
105
195
  setDisabledAppList: (options) => ZebraDataWedge.setDisabledAppList(options),
106
196
  setIgnoreDisabledProfiles: (doIgnoreDisabledProfiles) => ZebraDataWedge.setIgnoreDisabledProfiles({ enabled: doIgnoreDisabledProfiles }),
107
197
  };
108
- const ZebraNotification = {
109
- async registerForNotification(options) {
110
- var _a;
111
- const nativeOptions = {
112
- appName: options.appName,
113
- intentAction: options.intentAction,
114
- notificationType: options.notificationType,
115
- };
116
- await ZebraDataWedge.registerForNotification(nativeOptions);
117
- if (options.callback) {
118
- const key = notificationKey(nativeOptions);
119
- await ((_a = notificationHandles.get(key)) === null || _a === void 0 ? void 0 : _a.remove());
120
- const handle = await ZebraDataWedge.addListener('notification', (event) => {
121
- var _a;
122
- if (event.notificationType === options.notificationType) {
123
- (_a = options.callback) === null || _a === void 0 ? void 0 : _a.call(options, event);
124
- }
125
- });
126
- notificationHandles.set(key, handle);
127
- }
128
- },
129
- async unRegisterForNotification(options) {
130
- var _a;
131
- await ZebraDataWedge.unRegisterForNotification(options);
132
- const key = notificationKey(options);
133
- await ((_a = notificationHandles.get(key)) === null || _a === void 0 ? void 0 : _a.remove());
134
- notificationHandles.delete(key);
135
- },
136
- };
198
+ const ZebraNotification = createZebraNotification(ZebraDataWedge);
137
199
  const ZebraQuery = {
138
200
  enumerateScanners: async () => (await ZebraDataWedge.enumerateScanners()).scanners,
139
201
  getActiveProfile: async () => (await ZebraDataWedge.getActiveProfile()).profileName,
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var DataWedgeConfigMode;\n(function (DataWedgeConfigMode) {\n DataWedgeConfigMode[\"CREATE_IF_NOT_EXIST\"] = \"CREATE_IF_NOT_EXIST\";\n DataWedgeConfigMode[\"OVERWRITE\"] = \"OVERWRITE\";\n DataWedgeConfigMode[\"REMOVE\"] = \"REMOVE\";\n DataWedgeConfigMode[\"UPDATE\"] = \"UPDATE\";\n})(DataWedgeConfigMode || (DataWedgeConfigMode = {}));\nexport var DataWedgeNotificationType;\n(function (DataWedgeNotificationType) {\n DataWedgeNotificationType[\"CONFIGURATION_UPDATE\"] = \"CONFIGURATION_UPDATE\";\n DataWedgeNotificationType[\"PROFILE_SWITCH\"] = \"PROFILE_SWITCH\";\n DataWedgeNotificationType[\"SCANNER_STATUS\"] = \"SCANNER_STATUS\";\n})(DataWedgeNotificationType || (DataWedgeNotificationType = {}));\nexport var DataWedgePlugin;\n(function (DataWedgePlugin) {\n DataWedgePlugin[\"ADF\"] = \"ADF\";\n DataWedgePlugin[\"BARCODE\"] = \"BARCODE\";\n DataWedgePlugin[\"BDF\"] = \"BDF\";\n DataWedgePlugin[\"DCP\"] = \"DCP\";\n DataWedgePlugin[\"EKB\"] = \"EKB\";\n DataWedgePlugin[\"INTENT\"] = \"INTENT\";\n DataWedgePlugin[\"IP\"] = \"IP\";\n DataWedgePlugin[\"KEYSTROKE\"] = \"KEYSTROKE\";\n DataWedgePlugin[\"MSR\"] = \"MSR\";\n DataWedgePlugin[\"RFID\"] = \"RFID\";\n DataWedgePlugin[\"SERIAL\"] = \"SERIAL\";\n DataWedgePlugin[\"TOKENS\"] = \"TOKENS\";\n DataWedgePlugin[\"VOICE\"] = \"VOICE\";\n})(DataWedgePlugin || (DataWedgePlugin = {}));\nexport var ScannerIdentifier;\n(function (ScannerIdentifier) {\n ScannerIdentifier[\"AUTO\"] = \"AUTO\";\n ScannerIdentifier[\"BLUETOOTH_DS3678\"] = \"BLUETOOTH_DS3678\";\n ScannerIdentifier[\"BLUETOOTH_RS6000\"] = \"BLUETOOTH_RS6000\";\n ScannerIdentifier[\"BLUETOOTH_SSI\"] = \"BLUETOOTH_SSI\";\n ScannerIdentifier[\"INTERNAL_CAMERA\"] = \"INTERNAL_CAMERA\";\n ScannerIdentifier[\"INTERNAL_IMAGER\"] = \"INTERNAL_IMAGER\";\n ScannerIdentifier[\"INTERNAL_LASER\"] = \"INTERNAL_LASER\";\n ScannerIdentifier[\"PLUGABLE_SSI\"] = \"PLUGABLE_SSI\";\n ScannerIdentifier[\"PLUGABLE_SSI_RS5000\"] = \"PLUGABLE_SSI_RS5000\";\n ScannerIdentifier[\"SERIAL_SSI\"] = \"SERIAL_SSI\";\n ScannerIdentifier[\"USB_SSI_DS3608\"] = \"USB_SSI_DS3608\";\n})(ScannerIdentifier || (ScannerIdentifier = {}));\nexport var ScannerStatus;\n(function (ScannerStatus) {\n ScannerStatus[\"CONNECTED\"] = \"CONNECTED\";\n ScannerStatus[\"DISABLED\"] = \"DISABLED\";\n ScannerStatus[\"DISCONNECTED\"] = \"DISCONNECTED\";\n ScannerStatus[\"IDLE\"] = \"IDLE\";\n ScannerStatus[\"SCANNING\"] = \"SCANNING\";\n ScannerStatus[\"WAITING\"] = \"WAITING\";\n})(ScannerStatus || (ScannerStatus = {}));\nexport var ZebraErrorCodes;\n(function (ZebraErrorCodes) {\n ZebraErrorCodes[\"APP_ALREADY_ASSOCIATED\"] = \"APP_ALREADY_ASSOCIATED\";\n ZebraErrorCodes[\"APP_ALREADY_IN_DISABLED_LIST\"] = \"APP_ALREADY_IN_DISABLED_LIST\";\n ZebraErrorCodes[\"BUNDLE_EMPTY\"] = \"BUNDLE_EMPTY\";\n ZebraErrorCodes[\"CANNOT_READ_FILE\"] = \"CANNOT_READ_FILE\";\n ZebraErrorCodes[\"CONFIG_FILE_NOT_EXIST\"] = \"CONFIG_FILE_NOT_EXIST\";\n ZebraErrorCodes[\"DATAWEDGE_ALREADY_DISABLED\"] = \"DATAWEDGE_ALREADY_DISABLED\";\n ZebraErrorCodes[\"DATAWEDGE_ALREADY_ENABLED\"] = \"DATAWEDGE_ALREADY_ENABLED\";\n ZebraErrorCodes[\"DATAWEDGE_DISABLED\"] = \"DATAWEDGE_DISABLED\";\n ZebraErrorCodes[\"DEVICE_NOT_CONNECTED\"] = \"DEVICE_NOT_CONNECTED\";\n ZebraErrorCodes[\"DEVICE_NOT_SUPPORTED\"] = \"DEVICE_NOT_SUPPORTED\";\n ZebraErrorCodes[\"INPUT_NOT_ENABLED\"] = \"INPUT_NOT_ENABLED\";\n ZebraErrorCodes[\"INVALID_CONFIG_FILE\"] = \"INVALID_CONFIG_FILE\";\n ZebraErrorCodes[\"INVALID_FILE_NAME\"] = \"INVALID_FILE_NAME\";\n ZebraErrorCodes[\"INVALID_FOLDER_PATH\"] = \"INVALID_FOLDER_PATH\";\n ZebraErrorCodes[\"OPERATION_NOT_ALLOWED\"] = \"OPERATION_NOT_ALLOWED\";\n ZebraErrorCodes[\"PARAMETER_INVALID\"] = \"PARAMETER_INVALID\";\n ZebraErrorCodes[\"PLUGIN_BUNDLE_INVALID\"] = \"PLUGIN_BUNDLE_INVALID\";\n ZebraErrorCodes[\"PLUGIN_DISABLED\"] = \"PLUGIN_DISABLED\";\n ZebraErrorCodes[\"PLUGIN_DISABLED_IN_CONFIG\"] = \"PLUGIN_DISABLED_IN_CONFIG\";\n ZebraErrorCodes[\"PLUGIN_NOT_SUPPORTED\"] = \"PLUGIN_NOT_SUPPORTED\";\n ZebraErrorCodes[\"PROFILE_ALREADY_EXISTS\"] = \"PROFILE_ALREADY_EXISTS\";\n ZebraErrorCodes[\"PROFILE_ALREADY_SET\"] = \"PROFILE_ALREADY_SET\";\n ZebraErrorCodes[\"PROFILE_DISABLED\"] = \"PROFILE_DISABLED\";\n ZebraErrorCodes[\"PROFILE_HAS_APP_ASSOCIATION\"] = \"PROFILE_HAS_APP_ASSOCIATION\";\n ZebraErrorCodes[\"PROFILE_NAME_EMPTY\"] = \"PROFILE_NAME_EMPTY\";\n ZebraErrorCodes[\"PROFILE_NOT_FOUND\"] = \"PROFILE_NOT_FOUND\";\n ZebraErrorCodes[\"SCANNER_ALREADY_DISABLED\"] = \"SCANNER_ALREADY_DISABLED\";\n ZebraErrorCodes[\"SCANNER_ALREADY_ENABLED\"] = \"SCANNER_ALREADY_ENABLED\";\n ZebraErrorCodes[\"SCANNER_DISABLE_FAILED\"] = \"SCANNER_DISABLE_FAILED\";\n ZebraErrorCodes[\"SCANNER_ENABLE_FAILED\"] = \"SCANNER_ENABLE_FAILED\";\n ZebraErrorCodes[\"UNKNOWN\"] = \"UNKNOWN\";\n})(ZebraErrorCodes || (ZebraErrorCodes = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst ZebraDataWedge = registerPlugin('ZebraDataWedge', {\n web: () => import('./web').then((m) => new m.ZebraDataWedgeWeb()),\n});\nconst notificationHandles = new Map();\nconst notificationKey = (options) => { var _a, _b; return `${(_a = options.appName) !== null && _a !== void 0 ? _a : ''}:${(_b = options.intentAction) !== null && _b !== void 0 ? _b : ''}:${options.notificationType}`; };\nexport const ZebraConfiguration = {\n cloneProfile: (options) => ZebraDataWedge.cloneProfile(options),\n createProfile: (options) => ZebraDataWedge.createProfile(options),\n deleteProfile: (options) => ZebraDataWedge.deleteProfile(options),\n importConfig: (options) => ZebraDataWedge.importConfig(options),\n renameProfile: (options) => ZebraDataWedge.renameProfile(options),\n restoreConfig: () => ZebraDataWedge.restoreConfig(),\n setConfig: (options) => ZebraDataWedge.setConfig(options),\n setDisabledAppList: (options) => ZebraDataWedge.setDisabledAppList(options),\n setIgnoreDisabledProfiles: (doIgnoreDisabledProfiles) => ZebraDataWedge.setIgnoreDisabledProfiles({ enabled: doIgnoreDisabledProfiles }),\n};\nexport const ZebraNotification = {\n async registerForNotification(options) {\n var _a;\n const nativeOptions = {\n appName: options.appName,\n intentAction: options.intentAction,\n notificationType: options.notificationType,\n };\n await ZebraDataWedge.registerForNotification(nativeOptions);\n if (options.callback) {\n const key = notificationKey(nativeOptions);\n await ((_a = notificationHandles.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const handle = await ZebraDataWedge.addListener('notification', (event) => {\n var _a;\n if (event.notificationType === options.notificationType) {\n (_a = options.callback) === null || _a === void 0 ? void 0 : _a.call(options, event);\n }\n });\n notificationHandles.set(key, handle);\n }\n },\n async unRegisterForNotification(options) {\n var _a;\n await ZebraDataWedge.unRegisterForNotification(options);\n const key = notificationKey(options);\n await ((_a = notificationHandles.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n notificationHandles.delete(key);\n },\n};\nexport const ZebraQuery = {\n enumerateScanners: async () => (await ZebraDataWedge.enumerateScanners()).scanners,\n getActiveProfile: async () => (await ZebraDataWedge.getActiveProfile()).profileName,\n getAssociatedApps: async (profileName) => (await ZebraDataWedge.getAssociatedApps({ profileName })).appList,\n getConfig: (options) => ZebraDataWedge.getConfig(options),\n getDatawedgeStatus: () => ZebraDataWedge.getDatawedgeStatus(),\n getDisabledAppList: async () => (await ZebraDataWedge.getDisabledAppList()).appList,\n getIgnoreDisabledProfiles: async () => (await ZebraDataWedge.getIgnoreDisabledProfiles()).enabled,\n getProfilesList: async () => (await ZebraDataWedge.getProfilesList()).profiles,\n getScannerStatus: async () => (await ZebraDataWedge.getScannerStatus()).status,\n getVersionInfo: () => ZebraDataWedge.getVersionInfo(),\n};\nexport const ZebraRuntime = {\n registerScanIntentAction: (intentAction) => ZebraDataWedge.registerScanIntentAction({ intentAction }),\n disableDatawedge: () => ZebraDataWedge.disableDatawedge(),\n disableScannerInput: () => ZebraDataWedge.disableScannerInput(),\n enableDatawedge: () => ZebraDataWedge.enableDatawedge(),\n enableScannerInput: () => ZebraDataWedge.enableScannerInput(),\n enumerateTriggers: async () => (await ZebraDataWedge.enumerateTriggers()).triggers,\n notify: (options) => ZebraDataWedge.notify(options),\n resetDefaultProfile: () => ZebraDataWedge.resetDefaultProfile(),\n setDefaultProfile: (profileName) => ZebraDataWedge.setDefaultProfile({ profileName }),\n setReportingOptions: (options) => ZebraDataWedge.setReportingOptions(options),\n softRfidTrigger: () => ZebraDataWedge.softRfidTrigger(),\n softScanTrigger: (intentAction) => ZebraDataWedge.softScanTrigger({ intentAction }),\n switchScanner: (scanerIndex) => ZebraDataWedge.switchScanner({ scannerIndex: scanerIndex }),\n switchScannerParams: (options) => ZebraDataWedge.switchScannerParams(options),\n switchToProfile: (profileName) => ZebraDataWedge.switchToProfile({ profileName }),\n};\nexport * from './definitions';\nexport { ZebraDataWedge };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nconst unavailable = (...args) => {\n void args;\n throw new Error('Zebra DataWedge is only available on Android devices with Zebra DataWedge installed.');\n};\nexport class ZebraDataWedgeWeb extends WebPlugin {\n cloneProfile(options) {\n return unavailable(options);\n }\n createProfile(options) {\n return unavailable(options);\n }\n deleteProfile(options) {\n return unavailable(options);\n }\n importConfig(options) {\n return unavailable(options);\n }\n renameProfile(options) {\n return unavailable(options);\n }\n restoreConfig() {\n return unavailable();\n }\n setConfig(options) {\n return unavailable(options);\n }\n setDisabledAppList(options) {\n return unavailable(options);\n }\n setIgnoreDisabledProfiles(options) {\n return unavailable(options);\n }\n registerForNotification(options) {\n return unavailable(options);\n }\n registerScanIntentAction(options) {\n return unavailable(options);\n }\n unRegisterForNotification(options) {\n return unavailable(options);\n }\n enumerateScanners() {\n return unavailable();\n }\n getActiveProfile() {\n return unavailable();\n }\n getAssociatedApps(options) {\n return unavailable(options);\n }\n getConfig(options) {\n return unavailable(options);\n }\n getDatawedgeStatus() {\n return unavailable();\n }\n getDisabledAppList() {\n return unavailable();\n }\n getIgnoreDisabledProfiles() {\n return unavailable();\n }\n getProfilesList() {\n return unavailable();\n }\n getScannerStatus() {\n return unavailable();\n }\n getVersionInfo() {\n return unavailable();\n }\n disableDatawedge() {\n return unavailable();\n }\n disableScannerInput() {\n return unavailable();\n }\n enableDatawedge() {\n return unavailable();\n }\n enableScannerInput() {\n return unavailable();\n }\n enumerateTriggers() {\n return unavailable();\n }\n notify(options) {\n return unavailable(options);\n }\n resetDefaultProfile() {\n return unavailable();\n }\n setDefaultProfile(options) {\n return unavailable(options);\n }\n setReportingOptions(options) {\n return unavailable(options);\n }\n softRfidTrigger() {\n return unavailable();\n }\n softScanTrigger(options) {\n return unavailable(options);\n }\n switchScanner(options) {\n return unavailable(options);\n }\n switchScannerParams(options) {\n return unavailable(options);\n }\n switchToProfile(options) {\n return unavailable(options);\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["DataWedgeConfigMode","DataWedgeNotificationType","DataWedgePlugin","ScannerIdentifier","ScannerStatus","ZebraErrorCodes","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,mBAAmB,EAAE;AAChC,IAAI,mBAAmB,CAAC,qBAAqB,CAAC,GAAG,qBAAqB;AACtE,IAAI,mBAAmB,CAAC,WAAW,CAAC,GAAG,WAAW;AAClD,IAAI,mBAAmB,CAAC,QAAQ,CAAC,GAAG,QAAQ;AAC5C,IAAI,mBAAmB,CAAC,QAAQ,CAAC,GAAG,QAAQ;AAC5C,CAAC,EAAEA,2BAAmB,KAAKA,2BAAmB,GAAG,EAAE,CAAC,CAAC;AAC1CC;AACX,CAAC,UAAU,yBAAyB,EAAE;AACtC,IAAI,yBAAyB,CAAC,sBAAsB,CAAC,GAAG,sBAAsB;AAC9E,IAAI,yBAAyB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;AAClE,IAAI,yBAAyB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;AAClE,CAAC,EAAEA,iCAAyB,KAAKA,iCAAyB,GAAG,EAAE,CAAC,CAAC;AACtDC;AACX,CAAC,UAAU,eAAe,EAAE;AAC5B,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,KAAK;AAClC,IAAI,eAAe,CAAC,SAAS,CAAC,GAAG,SAAS;AAC1C,IAAI,eAAe,CAAC,KAAK,CAAC,G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AQ,OAAO,WAAW,CAAC,OAAO,CAAC;AACnC,IAAI;AACJ,IAAI,aAAa,CAAC,OAAO,EAAE;AAC3B,QAAQ,OAAO,WAAW,CAAC,OAAO,CAAC;AACnC,IAAI;AACJ,IAAI,mBAAmB,CAAC,OAAO,EAAE;AACjC,QAAQ,OAAO,WAAW,CAAC,OAAO,CAAC;AACnC,IAAI;AACJ,IAAI,eAAe,CAAC,OAAO,EAAE;AAC7B,QAAQ,OAAO,WAAW,CAAC,OAAO,CAAC;AACnC,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/notification-registration.js","esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/** Keep listener installation and native dispatch in one ordered operation per registration key. */\nexport function createZebraNotification(native) {\n const registrations = new Map();\n const pendingOperations = new Map();\n const keyFor = (options) => { var _a, _b; return `${(_a = options.appName) !== null && _a !== void 0 ? _a : ''}:${(_b = options.intentAction) !== null && _b !== void 0 ? _b : ''}:${options.notificationType}`; };\n function serialize(key, operation) {\n var _a;\n const previous = (_a = pendingOperations.get(key)) !== null && _a !== void 0 ? _a : Promise.resolve();\n const pending = previous.catch(() => undefined).then(operation);\n pendingOperations.set(key, pending);\n function clear() {\n if (pendingOperations.get(key) === pending)\n pendingOperations.delete(key);\n }\n // Both handlers resolve: cleaning the queue must not create an unhandled rejection.\n void pending.then(clear, clear);\n return pending;\n }\n return {\n registerForNotification(options) {\n const nativeOptions = {\n appName: options.appName,\n intentAction: options.intentAction,\n notificationType: options.notificationType,\n };\n const callback = options.callback;\n const key = keyFor(nativeOptions);\n return serialize(key, async () => {\n var _a;\n if (!callback) {\n await native.registerForNotification(nativeOptions);\n return;\n }\n const previous = registrations.get(key);\n const previousActive = (_a = previous === null || previous === void 0 ? void 0 : previous.active) !== null && _a !== void 0 ? _a : false;\n let active = true;\n // Subscribe first: DataWedge may emit status before native dispatch resolves.\n const handle = await native.addListener('notification', (event) => {\n if (active && event.notificationType === nativeOptions.notificationType)\n callback(event);\n });\n const registration = {\n handle,\n get active() {\n return active;\n },\n set active(value) {\n active = value;\n },\n };\n if (previous)\n previous.active = false;\n registrations.set(key, registration);\n try {\n await native.registerForNotification(nativeOptions);\n }\n catch (error) {\n registration.active = false;\n if (previous) {\n previous.active = previousActive;\n registrations.set(key, previous);\n }\n else {\n registrations.delete(key);\n }\n // Preserve the dispatch error even if listener cleanup itself fails.\n await handle.remove().catch(() => undefined);\n throw error;\n }\n if (previous) {\n // An inactive old callback cannot fire even if removing its native handle fails.\n await previous.handle.remove().catch(() => undefined);\n }\n });\n },\n unRegisterForNotification(options) {\n const key = keyFor(options);\n return serialize(key, async () => {\n await native.unRegisterForNotification(options);\n const registration = registrations.get(key);\n if (registration) {\n registration.active = false;\n // Preserve the wrapper's cleanup contract: retain an inactive handle if removal fails,\n // so a later unregister can retry instead of forgetting the still-installed listener.\n await registration.handle.remove();\n registrations.delete(key);\n }\n });\n },\n };\n}\n//# sourceMappingURL=notification-registration.js.map","export var DataWedgeConfigMode;\n(function (DataWedgeConfigMode) {\n DataWedgeConfigMode[\"CREATE_IF_NOT_EXIST\"] = \"CREATE_IF_NOT_EXIST\";\n DataWedgeConfigMode[\"OVERWRITE\"] = \"OVERWRITE\";\n DataWedgeConfigMode[\"REMOVE\"] = \"REMOVE\";\n DataWedgeConfigMode[\"UPDATE\"] = \"UPDATE\";\n})(DataWedgeConfigMode || (DataWedgeConfigMode = {}));\nexport var DataWedgeNotificationType;\n(function (DataWedgeNotificationType) {\n DataWedgeNotificationType[\"CONFIGURATION_UPDATE\"] = \"CONFIGURATION_UPDATE\";\n DataWedgeNotificationType[\"PROFILE_SWITCH\"] = \"PROFILE_SWITCH\";\n DataWedgeNotificationType[\"SCANNER_STATUS\"] = \"SCANNER_STATUS\";\n})(DataWedgeNotificationType || (DataWedgeNotificationType = {}));\nexport var DataWedgePlugin;\n(function (DataWedgePlugin) {\n DataWedgePlugin[\"ADF\"] = \"ADF\";\n DataWedgePlugin[\"BARCODE\"] = \"BARCODE\";\n DataWedgePlugin[\"BDF\"] = \"BDF\";\n DataWedgePlugin[\"DCP\"] = \"DCP\";\n DataWedgePlugin[\"EKB\"] = \"EKB\";\n DataWedgePlugin[\"INTENT\"] = \"INTENT\";\n DataWedgePlugin[\"IP\"] = \"IP\";\n DataWedgePlugin[\"KEYSTROKE\"] = \"KEYSTROKE\";\n DataWedgePlugin[\"MSR\"] = \"MSR\";\n DataWedgePlugin[\"RFID\"] = \"RFID\";\n DataWedgePlugin[\"SERIAL\"] = \"SERIAL\";\n DataWedgePlugin[\"TOKENS\"] = \"TOKENS\";\n DataWedgePlugin[\"VOICE\"] = \"VOICE\";\n})(DataWedgePlugin || (DataWedgePlugin = {}));\nexport var ScannerIdentifier;\n(function (ScannerIdentifier) {\n ScannerIdentifier[\"AUTO\"] = \"AUTO\";\n ScannerIdentifier[\"BLUETOOTH_DS3678\"] = \"BLUETOOTH_DS3678\";\n ScannerIdentifier[\"BLUETOOTH_RS6000\"] = \"BLUETOOTH_RS6000\";\n ScannerIdentifier[\"BLUETOOTH_SSI\"] = \"BLUETOOTH_SSI\";\n ScannerIdentifier[\"INTERNAL_CAMERA\"] = \"INTERNAL_CAMERA\";\n ScannerIdentifier[\"INTERNAL_IMAGER\"] = \"INTERNAL_IMAGER\";\n ScannerIdentifier[\"INTERNAL_LASER\"] = \"INTERNAL_LASER\";\n ScannerIdentifier[\"PLUGABLE_SSI\"] = \"PLUGABLE_SSI\";\n ScannerIdentifier[\"PLUGABLE_SSI_RS5000\"] = \"PLUGABLE_SSI_RS5000\";\n ScannerIdentifier[\"SERIAL_SSI\"] = \"SERIAL_SSI\";\n ScannerIdentifier[\"USB_SSI_DS3608\"] = \"USB_SSI_DS3608\";\n})(ScannerIdentifier || (ScannerIdentifier = {}));\nexport var ScannerStatus;\n(function (ScannerStatus) {\n ScannerStatus[\"CONNECTED\"] = \"CONNECTED\";\n ScannerStatus[\"DISABLED\"] = \"DISABLED\";\n ScannerStatus[\"DISCONNECTED\"] = \"DISCONNECTED\";\n ScannerStatus[\"IDLE\"] = \"IDLE\";\n ScannerStatus[\"SCANNING\"] = \"SCANNING\";\n ScannerStatus[\"WAITING\"] = \"WAITING\";\n})(ScannerStatus || (ScannerStatus = {}));\nexport var ZebraErrorCodes;\n(function (ZebraErrorCodes) {\n ZebraErrorCodes[\"APP_ALREADY_ASSOCIATED\"] = \"APP_ALREADY_ASSOCIATED\";\n ZebraErrorCodes[\"APP_ALREADY_IN_DISABLED_LIST\"] = \"APP_ALREADY_IN_DISABLED_LIST\";\n ZebraErrorCodes[\"BUNDLE_EMPTY\"] = \"BUNDLE_EMPTY\";\n ZebraErrorCodes[\"CANNOT_READ_FILE\"] = \"CANNOT_READ_FILE\";\n ZebraErrorCodes[\"CONFIG_FILE_NOT_EXIST\"] = \"CONFIG_FILE_NOT_EXIST\";\n ZebraErrorCodes[\"DATAWEDGE_ALREADY_DISABLED\"] = \"DATAWEDGE_ALREADY_DISABLED\";\n ZebraErrorCodes[\"DATAWEDGE_ALREADY_ENABLED\"] = \"DATAWEDGE_ALREADY_ENABLED\";\n ZebraErrorCodes[\"DATAWEDGE_DISABLED\"] = \"DATAWEDGE_DISABLED\";\n ZebraErrorCodes[\"DEVICE_NOT_CONNECTED\"] = \"DEVICE_NOT_CONNECTED\";\n ZebraErrorCodes[\"DEVICE_NOT_SUPPORTED\"] = \"DEVICE_NOT_SUPPORTED\";\n ZebraErrorCodes[\"INPUT_NOT_ENABLED\"] = \"INPUT_NOT_ENABLED\";\n ZebraErrorCodes[\"INVALID_CONFIG_FILE\"] = \"INVALID_CONFIG_FILE\";\n ZebraErrorCodes[\"INVALID_FILE_NAME\"] = \"INVALID_FILE_NAME\";\n ZebraErrorCodes[\"INVALID_FOLDER_PATH\"] = \"INVALID_FOLDER_PATH\";\n ZebraErrorCodes[\"OPERATION_NOT_ALLOWED\"] = \"OPERATION_NOT_ALLOWED\";\n ZebraErrorCodes[\"PARAMETER_INVALID\"] = \"PARAMETER_INVALID\";\n ZebraErrorCodes[\"PLUGIN_BUNDLE_INVALID\"] = \"PLUGIN_BUNDLE_INVALID\";\n ZebraErrorCodes[\"PLUGIN_DISABLED\"] = \"PLUGIN_DISABLED\";\n ZebraErrorCodes[\"PLUGIN_DISABLED_IN_CONFIG\"] = \"PLUGIN_DISABLED_IN_CONFIG\";\n ZebraErrorCodes[\"PLUGIN_NOT_SUPPORTED\"] = \"PLUGIN_NOT_SUPPORTED\";\n ZebraErrorCodes[\"PROFILE_ALREADY_EXISTS\"] = \"PROFILE_ALREADY_EXISTS\";\n ZebraErrorCodes[\"PROFILE_ALREADY_SET\"] = \"PROFILE_ALREADY_SET\";\n ZebraErrorCodes[\"PROFILE_DISABLED\"] = \"PROFILE_DISABLED\";\n ZebraErrorCodes[\"PROFILE_HAS_APP_ASSOCIATION\"] = \"PROFILE_HAS_APP_ASSOCIATION\";\n ZebraErrorCodes[\"PROFILE_NAME_EMPTY\"] = \"PROFILE_NAME_EMPTY\";\n ZebraErrorCodes[\"PROFILE_NOT_FOUND\"] = \"PROFILE_NOT_FOUND\";\n ZebraErrorCodes[\"SCANNER_ALREADY_DISABLED\"] = \"SCANNER_ALREADY_DISABLED\";\n ZebraErrorCodes[\"SCANNER_ALREADY_ENABLED\"] = \"SCANNER_ALREADY_ENABLED\";\n ZebraErrorCodes[\"SCANNER_DISABLE_FAILED\"] = \"SCANNER_DISABLE_FAILED\";\n ZebraErrorCodes[\"SCANNER_ENABLE_FAILED\"] = \"SCANNER_ENABLE_FAILED\";\n ZebraErrorCodes[\"UNKNOWN\"] = \"UNKNOWN\";\n})(ZebraErrorCodes || (ZebraErrorCodes = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nimport { createZebraNotification } from './notification-registration';\nconst ZebraDataWedge = registerPlugin('ZebraDataWedge', {\n web: () => import('./web').then((m) => new m.ZebraDataWedgeWeb()),\n});\nexport const ZebraConfiguration = {\n cloneProfile: (options) => ZebraDataWedge.cloneProfile(options),\n createProfile: (options) => ZebraDataWedge.createProfile(options),\n deleteProfile: (options) => ZebraDataWedge.deleteProfile(options),\n importConfig: (options) => ZebraDataWedge.importConfig(options),\n renameProfile: (options) => ZebraDataWedge.renameProfile(options),\n restoreConfig: () => ZebraDataWedge.restoreConfig(),\n setConfig: (options) => ZebraDataWedge.setConfig(options),\n setDisabledAppList: (options) => ZebraDataWedge.setDisabledAppList(options),\n setIgnoreDisabledProfiles: (doIgnoreDisabledProfiles) => ZebraDataWedge.setIgnoreDisabledProfiles({ enabled: doIgnoreDisabledProfiles }),\n};\nexport const ZebraNotification = createZebraNotification(ZebraDataWedge);\nexport const ZebraQuery = {\n enumerateScanners: async () => (await ZebraDataWedge.enumerateScanners()).scanners,\n getActiveProfile: async () => (await ZebraDataWedge.getActiveProfile()).profileName,\n getAssociatedApps: async (profileName) => (await ZebraDataWedge.getAssociatedApps({ profileName })).appList,\n getConfig: (options) => ZebraDataWedge.getConfig(options),\n getDatawedgeStatus: () => ZebraDataWedge.getDatawedgeStatus(),\n getDisabledAppList: async () => (await ZebraDataWedge.getDisabledAppList()).appList,\n getIgnoreDisabledProfiles: async () => (await ZebraDataWedge.getIgnoreDisabledProfiles()).enabled,\n getProfilesList: async () => (await ZebraDataWedge.getProfilesList()).profiles,\n getScannerStatus: async () => (await ZebraDataWedge.getScannerStatus()).status,\n getVersionInfo: () => ZebraDataWedge.getVersionInfo(),\n};\nexport const ZebraRuntime = {\n registerScanIntentAction: (intentAction) => ZebraDataWedge.registerScanIntentAction({ intentAction }),\n disableDatawedge: () => ZebraDataWedge.disableDatawedge(),\n disableScannerInput: () => ZebraDataWedge.disableScannerInput(),\n enableDatawedge: () => ZebraDataWedge.enableDatawedge(),\n enableScannerInput: () => ZebraDataWedge.enableScannerInput(),\n enumerateTriggers: async () => (await ZebraDataWedge.enumerateTriggers()).triggers,\n notify: (options) => ZebraDataWedge.notify(options),\n resetDefaultProfile: () => ZebraDataWedge.resetDefaultProfile(),\n setDefaultProfile: (profileName) => ZebraDataWedge.setDefaultProfile({ profileName }),\n setReportingOptions: (options) => ZebraDataWedge.setReportingOptions(options),\n softRfidTrigger: () => ZebraDataWedge.softRfidTrigger(),\n softScanTrigger: (intentAction) => ZebraDataWedge.softScanTrigger({ intentAction }),\n switchScanner: (scanerIndex) => ZebraDataWedge.switchScanner({ scannerIndex: scanerIndex }),\n switchScannerParams: (options) => ZebraDataWedge.switchScannerParams(options),\n switchToProfile: (profileName) => ZebraDataWedge.switchToProfile({ profileName }),\n};\nexport * from './definitions';\nexport { ZebraDataWedge };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nconst unavailable = (...args) => {\n void args;\n throw new Error('Zebra DataWedge is only available on Android devices with Zebra DataWedge installed.');\n};\nexport class ZebraDataWedgeWeb extends WebPlugin {\n cloneProfile(options) {\n return unavailable(options);\n }\n createProfile(options) {\n return unavailable(options);\n }\n deleteProfile(options) {\n return unavailable(options);\n }\n importConfig(options) {\n return unavailable(options);\n }\n renameProfile(options) {\n return unavailable(options);\n }\n restoreConfig() {\n return unavailable();\n }\n setConfig(options) {\n return unavailable(options);\n }\n setDisabledAppList(options) {\n return unavailable(options);\n }\n setIgnoreDisabledProfiles(options) {\n return unavailable(options);\n }\n registerForNotification(options) {\n return unavailable(options);\n }\n registerScanIntentAction(options) {\n return unavailable(options);\n }\n unRegisterForNotification(options) {\n return unavailable(options);\n }\n enumerateScanners() {\n return unavailable();\n }\n getActiveProfile() {\n return unavailable();\n }\n getAssociatedApps(options) {\n return unavailable(options);\n }\n getConfig(options) {\n return unavailable(options);\n }\n getDatawedgeStatus() {\n return unavailable();\n }\n getDisabledAppList() {\n return unavailable();\n }\n getIgnoreDisabledProfiles() {\n return unavailable();\n }\n getProfilesList() {\n return unavailable();\n }\n getScannerStatus() {\n return unavailable();\n }\n getVersionInfo() {\n return unavailable();\n }\n disableDatawedge() {\n return unavailable();\n }\n disableScannerInput() {\n return unavailable();\n }\n enableDatawedge() {\n return unavailable();\n }\n enableScannerInput() {\n return unavailable();\n }\n enumerateTriggers() {\n return unavailable();\n }\n notify(options) {\n return unavailable(options);\n }\n resetDefaultProfile() {\n return unavailable();\n }\n setDefaultProfile(options) {\n return unavailable(options);\n }\n setReportingOptions(options) {\n return unavailable(options);\n }\n softRfidTrigger() {\n return unavailable();\n }\n softScanTrigger(options) {\n return unavailable(options);\n }\n switchScanner(options) {\n return unavailable(options);\n }\n switchScannerParams(options) {\n return unavailable(options);\n }\n switchToProfile(options) {\n return unavailable(options);\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["DataWedgeConfigMode","DataWedgeNotificationType","DataWedgePlugin","ScannerIdentifier","ScannerStatus","ZebraErrorCodes","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACO,SAAS,uBAAuB,CAAC,MAAM,EAAE;AAChD,IAAI,MAAM,aAAa,GAAG,IAAI,GAAG,EAAE;AACnC,IAAI,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAE;AACvC,IAAI,MAAM,MAAM,GAAG,CAAC,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,YAAY,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AACtN,IAAI,SAAS,SAAS,CAAC,GAAG,EAAE,SAAS,EAAE;AACvC,QAAQ,IAAI,EAAE;AACd,QAAQ,MAAM,QAAQ,GAAG,CAAC,EA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AACJ,IAAI,eAAe,CAAC,OAAO,EAAE;AAC7B,QAAQ,OAAO,WAAW,CAAC,OAAO,CAAC;AACnC,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;;;;;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -1,6 +1,98 @@
1
1
  var capacitorZebraDataWedge = (function (exports, core) {
2
2
  'use strict';
3
3
 
4
+ /** Keep listener installation and native dispatch in one ordered operation per registration key. */
5
+ function createZebraNotification(native) {
6
+ const registrations = new Map();
7
+ const pendingOperations = new Map();
8
+ const keyFor = (options) => { var _a, _b; return `${(_a = options.appName) !== null && _a !== void 0 ? _a : ''}:${(_b = options.intentAction) !== null && _b !== void 0 ? _b : ''}:${options.notificationType}`; };
9
+ function serialize(key, operation) {
10
+ var _a;
11
+ const previous = (_a = pendingOperations.get(key)) !== null && _a !== void 0 ? _a : Promise.resolve();
12
+ const pending = previous.catch(() => undefined).then(operation);
13
+ pendingOperations.set(key, pending);
14
+ function clear() {
15
+ if (pendingOperations.get(key) === pending)
16
+ pendingOperations.delete(key);
17
+ }
18
+ // Both handlers resolve: cleaning the queue must not create an unhandled rejection.
19
+ void pending.then(clear, clear);
20
+ return pending;
21
+ }
22
+ return {
23
+ registerForNotification(options) {
24
+ const nativeOptions = {
25
+ appName: options.appName,
26
+ intentAction: options.intentAction,
27
+ notificationType: options.notificationType,
28
+ };
29
+ const callback = options.callback;
30
+ const key = keyFor(nativeOptions);
31
+ return serialize(key, async () => {
32
+ var _a;
33
+ if (!callback) {
34
+ await native.registerForNotification(nativeOptions);
35
+ return;
36
+ }
37
+ const previous = registrations.get(key);
38
+ const previousActive = (_a = previous === null || previous === void 0 ? void 0 : previous.active) !== null && _a !== void 0 ? _a : false;
39
+ let active = true;
40
+ // Subscribe first: DataWedge may emit status before native dispatch resolves.
41
+ const handle = await native.addListener('notification', (event) => {
42
+ if (active && event.notificationType === nativeOptions.notificationType)
43
+ callback(event);
44
+ });
45
+ const registration = {
46
+ handle,
47
+ get active() {
48
+ return active;
49
+ },
50
+ set active(value) {
51
+ active = value;
52
+ },
53
+ };
54
+ if (previous)
55
+ previous.active = false;
56
+ registrations.set(key, registration);
57
+ try {
58
+ await native.registerForNotification(nativeOptions);
59
+ }
60
+ catch (error) {
61
+ registration.active = false;
62
+ if (previous) {
63
+ previous.active = previousActive;
64
+ registrations.set(key, previous);
65
+ }
66
+ else {
67
+ registrations.delete(key);
68
+ }
69
+ // Preserve the dispatch error even if listener cleanup itself fails.
70
+ await handle.remove().catch(() => undefined);
71
+ throw error;
72
+ }
73
+ if (previous) {
74
+ // An inactive old callback cannot fire even if removing its native handle fails.
75
+ await previous.handle.remove().catch(() => undefined);
76
+ }
77
+ });
78
+ },
79
+ unRegisterForNotification(options) {
80
+ const key = keyFor(options);
81
+ return serialize(key, async () => {
82
+ await native.unRegisterForNotification(options);
83
+ const registration = registrations.get(key);
84
+ if (registration) {
85
+ registration.active = false;
86
+ // Preserve the wrapper's cleanup contract: retain an inactive handle if removal fails,
87
+ // so a later unregister can retry instead of forgetting the still-installed listener.
88
+ await registration.handle.remove();
89
+ registrations.delete(key);
90
+ }
91
+ });
92
+ },
93
+ };
94
+ }
95
+
4
96
  exports.DataWedgeConfigMode = void 0;
5
97
  (function (DataWedgeConfigMode) {
6
98
  DataWedgeConfigMode["CREATE_IF_NOT_EXIST"] = "CREATE_IF_NOT_EXIST";
@@ -91,8 +183,6 @@ var capacitorZebraDataWedge = (function (exports, core) {
91
183
  const ZebraDataWedge = core.registerPlugin('ZebraDataWedge', {
92
184
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.ZebraDataWedgeWeb()),
93
185
  });
94
- const notificationHandles = new Map();
95
- const notificationKey = (options) => { var _a, _b; return `${(_a = options.appName) !== null && _a !== void 0 ? _a : ''}:${(_b = options.intentAction) !== null && _b !== void 0 ? _b : ''}:${options.notificationType}`; };
96
186
  const ZebraConfiguration = {
97
187
  cloneProfile: (options) => ZebraDataWedge.cloneProfile(options),
98
188
  createProfile: (options) => ZebraDataWedge.createProfile(options),
@@ -104,35 +194,7 @@ var capacitorZebraDataWedge = (function (exports, core) {
104
194
  setDisabledAppList: (options) => ZebraDataWedge.setDisabledAppList(options),
105
195
  setIgnoreDisabledProfiles: (doIgnoreDisabledProfiles) => ZebraDataWedge.setIgnoreDisabledProfiles({ enabled: doIgnoreDisabledProfiles }),
106
196
  };
107
- const ZebraNotification = {
108
- async registerForNotification(options) {
109
- var _a;
110
- const nativeOptions = {
111
- appName: options.appName,
112
- intentAction: options.intentAction,
113
- notificationType: options.notificationType,
114
- };
115
- await ZebraDataWedge.registerForNotification(nativeOptions);
116
- if (options.callback) {
117
- const key = notificationKey(nativeOptions);
118
- await ((_a = notificationHandles.get(key)) === null || _a === void 0 ? void 0 : _a.remove());
119
- const handle = await ZebraDataWedge.addListener('notification', (event) => {
120
- var _a;
121
- if (event.notificationType === options.notificationType) {
122
- (_a = options.callback) === null || _a === void 0 ? void 0 : _a.call(options, event);
123
- }
124
- });
125
- notificationHandles.set(key, handle);
126
- }
127
- },
128
- async unRegisterForNotification(options) {
129
- var _a;
130
- await ZebraDataWedge.unRegisterForNotification(options);
131
- const key = notificationKey(options);
132
- await ((_a = notificationHandles.get(key)) === null || _a === void 0 ? void 0 : _a.remove());
133
- notificationHandles.delete(key);
134
- },
135
- };
197
+ const ZebraNotification = createZebraNotification(ZebraDataWedge);
136
198
  const ZebraQuery = {
137
199
  enumerateScanners: async () => (await ZebraDataWedge.enumerateScanners()).scanners,
138
200
  getActiveProfile: async () => (await ZebraDataWedge.getActiveProfile()).profileName,
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var DataWedgeConfigMode;\n(function (DataWedgeConfigMode) {\n DataWedgeConfigMode[\"CREATE_IF_NOT_EXIST\"] = \"CREATE_IF_NOT_EXIST\";\n DataWedgeConfigMode[\"OVERWRITE\"] = \"OVERWRITE\";\n DataWedgeConfigMode[\"REMOVE\"] = \"REMOVE\";\n DataWedgeConfigMode[\"UPDATE\"] = \"UPDATE\";\n})(DataWedgeConfigMode || (DataWedgeConfigMode = {}));\nexport var DataWedgeNotificationType;\n(function (DataWedgeNotificationType) {\n DataWedgeNotificationType[\"CONFIGURATION_UPDATE\"] = \"CONFIGURATION_UPDATE\";\n DataWedgeNotificationType[\"PROFILE_SWITCH\"] = \"PROFILE_SWITCH\";\n DataWedgeNotificationType[\"SCANNER_STATUS\"] = \"SCANNER_STATUS\";\n})(DataWedgeNotificationType || (DataWedgeNotificationType = {}));\nexport var DataWedgePlugin;\n(function (DataWedgePlugin) {\n DataWedgePlugin[\"ADF\"] = \"ADF\";\n DataWedgePlugin[\"BARCODE\"] = \"BARCODE\";\n DataWedgePlugin[\"BDF\"] = \"BDF\";\n DataWedgePlugin[\"DCP\"] = \"DCP\";\n DataWedgePlugin[\"EKB\"] = \"EKB\";\n DataWedgePlugin[\"INTENT\"] = \"INTENT\";\n DataWedgePlugin[\"IP\"] = \"IP\";\n DataWedgePlugin[\"KEYSTROKE\"] = \"KEYSTROKE\";\n DataWedgePlugin[\"MSR\"] = \"MSR\";\n DataWedgePlugin[\"RFID\"] = \"RFID\";\n DataWedgePlugin[\"SERIAL\"] = \"SERIAL\";\n DataWedgePlugin[\"TOKENS\"] = \"TOKENS\";\n DataWedgePlugin[\"VOICE\"] = \"VOICE\";\n})(DataWedgePlugin || (DataWedgePlugin = {}));\nexport var ScannerIdentifier;\n(function (ScannerIdentifier) {\n ScannerIdentifier[\"AUTO\"] = \"AUTO\";\n ScannerIdentifier[\"BLUETOOTH_DS3678\"] = \"BLUETOOTH_DS3678\";\n ScannerIdentifier[\"BLUETOOTH_RS6000\"] = \"BLUETOOTH_RS6000\";\n ScannerIdentifier[\"BLUETOOTH_SSI\"] = \"BLUETOOTH_SSI\";\n ScannerIdentifier[\"INTERNAL_CAMERA\"] = \"INTERNAL_CAMERA\";\n ScannerIdentifier[\"INTERNAL_IMAGER\"] = \"INTERNAL_IMAGER\";\n ScannerIdentifier[\"INTERNAL_LASER\"] = \"INTERNAL_LASER\";\n ScannerIdentifier[\"PLUGABLE_SSI\"] = \"PLUGABLE_SSI\";\n ScannerIdentifier[\"PLUGABLE_SSI_RS5000\"] = \"PLUGABLE_SSI_RS5000\";\n ScannerIdentifier[\"SERIAL_SSI\"] = \"SERIAL_SSI\";\n ScannerIdentifier[\"USB_SSI_DS3608\"] = \"USB_SSI_DS3608\";\n})(ScannerIdentifier || (ScannerIdentifier = {}));\nexport var ScannerStatus;\n(function (ScannerStatus) {\n ScannerStatus[\"CONNECTED\"] = \"CONNECTED\";\n ScannerStatus[\"DISABLED\"] = \"DISABLED\";\n ScannerStatus[\"DISCONNECTED\"] = \"DISCONNECTED\";\n ScannerStatus[\"IDLE\"] = \"IDLE\";\n ScannerStatus[\"SCANNING\"] = \"SCANNING\";\n ScannerStatus[\"WAITING\"] = \"WAITING\";\n})(ScannerStatus || (ScannerStatus = {}));\nexport var ZebraErrorCodes;\n(function (ZebraErrorCodes) {\n ZebraErrorCodes[\"APP_ALREADY_ASSOCIATED\"] = \"APP_ALREADY_ASSOCIATED\";\n ZebraErrorCodes[\"APP_ALREADY_IN_DISABLED_LIST\"] = \"APP_ALREADY_IN_DISABLED_LIST\";\n ZebraErrorCodes[\"BUNDLE_EMPTY\"] = \"BUNDLE_EMPTY\";\n ZebraErrorCodes[\"CANNOT_READ_FILE\"] = \"CANNOT_READ_FILE\";\n ZebraErrorCodes[\"CONFIG_FILE_NOT_EXIST\"] = \"CONFIG_FILE_NOT_EXIST\";\n ZebraErrorCodes[\"DATAWEDGE_ALREADY_DISABLED\"] = \"DATAWEDGE_ALREADY_DISABLED\";\n ZebraErrorCodes[\"DATAWEDGE_ALREADY_ENABLED\"] = \"DATAWEDGE_ALREADY_ENABLED\";\n ZebraErrorCodes[\"DATAWEDGE_DISABLED\"] = \"DATAWEDGE_DISABLED\";\n ZebraErrorCodes[\"DEVICE_NOT_CONNECTED\"] = \"DEVICE_NOT_CONNECTED\";\n ZebraErrorCodes[\"DEVICE_NOT_SUPPORTED\"] = \"DEVICE_NOT_SUPPORTED\";\n ZebraErrorCodes[\"INPUT_NOT_ENABLED\"] = \"INPUT_NOT_ENABLED\";\n ZebraErrorCodes[\"INVALID_CONFIG_FILE\"] = \"INVALID_CONFIG_FILE\";\n ZebraErrorCodes[\"INVALID_FILE_NAME\"] = \"INVALID_FILE_NAME\";\n ZebraErrorCodes[\"INVALID_FOLDER_PATH\"] = \"INVALID_FOLDER_PATH\";\n ZebraErrorCodes[\"OPERATION_NOT_ALLOWED\"] = \"OPERATION_NOT_ALLOWED\";\n ZebraErrorCodes[\"PARAMETER_INVALID\"] = \"PARAMETER_INVALID\";\n ZebraErrorCodes[\"PLUGIN_BUNDLE_INVALID\"] = \"PLUGIN_BUNDLE_INVALID\";\n ZebraErrorCodes[\"PLUGIN_DISABLED\"] = \"PLUGIN_DISABLED\";\n ZebraErrorCodes[\"PLUGIN_DISABLED_IN_CONFIG\"] = \"PLUGIN_DISABLED_IN_CONFIG\";\n ZebraErrorCodes[\"PLUGIN_NOT_SUPPORTED\"] = \"PLUGIN_NOT_SUPPORTED\";\n ZebraErrorCodes[\"PROFILE_ALREADY_EXISTS\"] = \"PROFILE_ALREADY_EXISTS\";\n ZebraErrorCodes[\"PROFILE_ALREADY_SET\"] = \"PROFILE_ALREADY_SET\";\n ZebraErrorCodes[\"PROFILE_DISABLED\"] = \"PROFILE_DISABLED\";\n ZebraErrorCodes[\"PROFILE_HAS_APP_ASSOCIATION\"] = \"PROFILE_HAS_APP_ASSOCIATION\";\n ZebraErrorCodes[\"PROFILE_NAME_EMPTY\"] = \"PROFILE_NAME_EMPTY\";\n ZebraErrorCodes[\"PROFILE_NOT_FOUND\"] = \"PROFILE_NOT_FOUND\";\n ZebraErrorCodes[\"SCANNER_ALREADY_DISABLED\"] = \"SCANNER_ALREADY_DISABLED\";\n ZebraErrorCodes[\"SCANNER_ALREADY_ENABLED\"] = \"SCANNER_ALREADY_ENABLED\";\n ZebraErrorCodes[\"SCANNER_DISABLE_FAILED\"] = \"SCANNER_DISABLE_FAILED\";\n ZebraErrorCodes[\"SCANNER_ENABLE_FAILED\"] = \"SCANNER_ENABLE_FAILED\";\n ZebraErrorCodes[\"UNKNOWN\"] = \"UNKNOWN\";\n})(ZebraErrorCodes || (ZebraErrorCodes = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst ZebraDataWedge = registerPlugin('ZebraDataWedge', {\n web: () => import('./web').then((m) => new m.ZebraDataWedgeWeb()),\n});\nconst notificationHandles = new Map();\nconst notificationKey = (options) => { var _a, _b; return `${(_a = options.appName) !== null && _a !== void 0 ? _a : ''}:${(_b = options.intentAction) !== null && _b !== void 0 ? _b : ''}:${options.notificationType}`; };\nexport const ZebraConfiguration = {\n cloneProfile: (options) => ZebraDataWedge.cloneProfile(options),\n createProfile: (options) => ZebraDataWedge.createProfile(options),\n deleteProfile: (options) => ZebraDataWedge.deleteProfile(options),\n importConfig: (options) => ZebraDataWedge.importConfig(options),\n renameProfile: (options) => ZebraDataWedge.renameProfile(options),\n restoreConfig: () => ZebraDataWedge.restoreConfig(),\n setConfig: (options) => ZebraDataWedge.setConfig(options),\n setDisabledAppList: (options) => ZebraDataWedge.setDisabledAppList(options),\n setIgnoreDisabledProfiles: (doIgnoreDisabledProfiles) => ZebraDataWedge.setIgnoreDisabledProfiles({ enabled: doIgnoreDisabledProfiles }),\n};\nexport const ZebraNotification = {\n async registerForNotification(options) {\n var _a;\n const nativeOptions = {\n appName: options.appName,\n intentAction: options.intentAction,\n notificationType: options.notificationType,\n };\n await ZebraDataWedge.registerForNotification(nativeOptions);\n if (options.callback) {\n const key = notificationKey(nativeOptions);\n await ((_a = notificationHandles.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const handle = await ZebraDataWedge.addListener('notification', (event) => {\n var _a;\n if (event.notificationType === options.notificationType) {\n (_a = options.callback) === null || _a === void 0 ? void 0 : _a.call(options, event);\n }\n });\n notificationHandles.set(key, handle);\n }\n },\n async unRegisterForNotification(options) {\n var _a;\n await ZebraDataWedge.unRegisterForNotification(options);\n const key = notificationKey(options);\n await ((_a = notificationHandles.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n notificationHandles.delete(key);\n },\n};\nexport const ZebraQuery = {\n enumerateScanners: async () => (await ZebraDataWedge.enumerateScanners()).scanners,\n getActiveProfile: async () => (await ZebraDataWedge.getActiveProfile()).profileName,\n getAssociatedApps: async (profileName) => (await ZebraDataWedge.getAssociatedApps({ profileName })).appList,\n getConfig: (options) => ZebraDataWedge.getConfig(options),\n getDatawedgeStatus: () => ZebraDataWedge.getDatawedgeStatus(),\n getDisabledAppList: async () => (await ZebraDataWedge.getDisabledAppList()).appList,\n getIgnoreDisabledProfiles: async () => (await ZebraDataWedge.getIgnoreDisabledProfiles()).enabled,\n getProfilesList: async () => (await ZebraDataWedge.getProfilesList()).profiles,\n getScannerStatus: async () => (await ZebraDataWedge.getScannerStatus()).status,\n getVersionInfo: () => ZebraDataWedge.getVersionInfo(),\n};\nexport const ZebraRuntime = {\n registerScanIntentAction: (intentAction) => ZebraDataWedge.registerScanIntentAction({ intentAction }),\n disableDatawedge: () => ZebraDataWedge.disableDatawedge(),\n disableScannerInput: () => ZebraDataWedge.disableScannerInput(),\n enableDatawedge: () => ZebraDataWedge.enableDatawedge(),\n enableScannerInput: () => ZebraDataWedge.enableScannerInput(),\n enumerateTriggers: async () => (await ZebraDataWedge.enumerateTriggers()).triggers,\n notify: (options) => ZebraDataWedge.notify(options),\n resetDefaultProfile: () => ZebraDataWedge.resetDefaultProfile(),\n setDefaultProfile: (profileName) => ZebraDataWedge.setDefaultProfile({ profileName }),\n setReportingOptions: (options) => ZebraDataWedge.setReportingOptions(options),\n softRfidTrigger: () => ZebraDataWedge.softRfidTrigger(),\n softScanTrigger: (intentAction) => ZebraDataWedge.softScanTrigger({ intentAction }),\n switchScanner: (scanerIndex) => ZebraDataWedge.switchScanner({ scannerIndex: scanerIndex }),\n switchScannerParams: (options) => ZebraDataWedge.switchScannerParams(options),\n switchToProfile: (profileName) => ZebraDataWedge.switchToProfile({ profileName }),\n};\nexport * from './definitions';\nexport { ZebraDataWedge };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nconst unavailable = (...args) => {\n void args;\n throw new Error('Zebra DataWedge is only available on Android devices with Zebra DataWedge installed.');\n};\nexport class ZebraDataWedgeWeb extends WebPlugin {\n cloneProfile(options) {\n return unavailable(options);\n }\n createProfile(options) {\n return unavailable(options);\n }\n deleteProfile(options) {\n return unavailable(options);\n }\n importConfig(options) {\n return unavailable(options);\n }\n renameProfile(options) {\n return unavailable(options);\n }\n restoreConfig() {\n return unavailable();\n }\n setConfig(options) {\n return unavailable(options);\n }\n setDisabledAppList(options) {\n return unavailable(options);\n }\n setIgnoreDisabledProfiles(options) {\n return unavailable(options);\n }\n registerForNotification(options) {\n return unavailable(options);\n }\n registerScanIntentAction(options) {\n return unavailable(options);\n }\n unRegisterForNotification(options) {\n return unavailable(options);\n }\n enumerateScanners() {\n return unavailable();\n }\n getActiveProfile() {\n return unavailable();\n }\n getAssociatedApps(options) {\n return unavailable(options);\n }\n getConfig(options) {\n return unavailable(options);\n }\n getDatawedgeStatus() {\n return unavailable();\n }\n getDisabledAppList() {\n return unavailable();\n }\n getIgnoreDisabledProfiles() {\n return unavailable();\n }\n getProfilesList() {\n return unavailable();\n }\n getScannerStatus() {\n return unavailable();\n }\n getVersionInfo() {\n return unavailable();\n }\n disableDatawedge() {\n return unavailable();\n }\n disableScannerInput() {\n return unavailable();\n }\n enableDatawedge() {\n return unavailable();\n }\n enableScannerInput() {\n return unavailable();\n }\n enumerateTriggers() {\n return unavailable();\n }\n notify(options) {\n return unavailable(options);\n }\n resetDefaultProfile() {\n return unavailable();\n }\n setDefaultProfile(options) {\n return unavailable(options);\n }\n setReportingOptions(options) {\n return unavailable(options);\n }\n softRfidTrigger() {\n return unavailable();\n }\n softScanTrigger(options) {\n return unavailable(options);\n }\n switchScanner(options) {\n return unavailable(options);\n }\n switchScannerParams(options) {\n return unavailable(options);\n }\n switchToProfile(options) {\n return unavailable(options);\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["DataWedgeConfigMode","DataWedgeNotificationType","DataWedgePlugin","ScannerIdentifier","ScannerStatus","ZebraErrorCodes","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,mBAAmB,EAAE;IAChC,IAAI,mBAAmB,CAAC,qBAAqB,CAAC,GAAG,qBAAqB;IACtE,IAAI,mBAAmB,CAAC,WAAW,CAAC,GAAG,WAAW;IAClD,IAAI,mBAAmB,CAAC,QAAQ,CAAC,GAAG,QAAQ;IAC5C,IAAI,mBAAmB,CAAC,QAAQ,CAAC,GAAG,QAAQ;IAC5C,CAAC,EAAEA,2BAAmB,KAAKA,2BAAmB,GAAG,EAAE,CAAC,CAAC;AAC1CC;IACX,CAAC,UAAU,yBAAyB,EAAE;IACtC,IAAI,yBAAyB,CAAC,sBAAsB,CAAC,GAAG,sBAAsB;IAC9E,IAAI,yBAAyB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;IAClE,IAAI,yBAAyB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;IAClE,CAAC,EAAEA,iCAAyB,KAAKA,iCAAyB,GAAG,EAAE,CAAC,CAAC;AACtDC;IACX,CAAC,UAAU,eAAe,EAAE;IAC5B,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,KAAK;IAClC,IAAI,eAAe,CAAC,SAAS,CAAC,GAAG,SAAS;IAC1C,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,KAAK;IAClC,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,KAAK;IAClC,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,KAAK;IAClC,IAAI,eAAe,CAA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ACnC,IAAI;IACJ,IAAI,mBAAmB,CAAC,OAAO,EAAE;IACjC,QAAQ,OAAO,WAAW,CAAC,OAAO,CAAC;IACnC,IAAI;IACJ,IAAI,eAAe,CAAC,OAAO,EAAE;IAC7B,QAAQ,OAAO,WAAW,CAAC,OAAO,CAAC;IACnC,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACjC,IAAI;IACJ;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/notification-registration.js","esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/** Keep listener installation and native dispatch in one ordered operation per registration key. */\nexport function createZebraNotification(native) {\n const registrations = new Map();\n const pendingOperations = new Map();\n const keyFor = (options) => { var _a, _b; return `${(_a = options.appName) !== null && _a !== void 0 ? _a : ''}:${(_b = options.intentAction) !== null && _b !== void 0 ? _b : ''}:${options.notificationType}`; };\n function serialize(key, operation) {\n var _a;\n const previous = (_a = pendingOperations.get(key)) !== null && _a !== void 0 ? _a : Promise.resolve();\n const pending = previous.catch(() => undefined).then(operation);\n pendingOperations.set(key, pending);\n function clear() {\n if (pendingOperations.get(key) === pending)\n pendingOperations.delete(key);\n }\n // Both handlers resolve: cleaning the queue must not create an unhandled rejection.\n void pending.then(clear, clear);\n return pending;\n }\n return {\n registerForNotification(options) {\n const nativeOptions = {\n appName: options.appName,\n intentAction: options.intentAction,\n notificationType: options.notificationType,\n };\n const callback = options.callback;\n const key = keyFor(nativeOptions);\n return serialize(key, async () => {\n var _a;\n if (!callback) {\n await native.registerForNotification(nativeOptions);\n return;\n }\n const previous = registrations.get(key);\n const previousActive = (_a = previous === null || previous === void 0 ? void 0 : previous.active) !== null && _a !== void 0 ? _a : false;\n let active = true;\n // Subscribe first: DataWedge may emit status before native dispatch resolves.\n const handle = await native.addListener('notification', (event) => {\n if (active && event.notificationType === nativeOptions.notificationType)\n callback(event);\n });\n const registration = {\n handle,\n get active() {\n return active;\n },\n set active(value) {\n active = value;\n },\n };\n if (previous)\n previous.active = false;\n registrations.set(key, registration);\n try {\n await native.registerForNotification(nativeOptions);\n }\n catch (error) {\n registration.active = false;\n if (previous) {\n previous.active = previousActive;\n registrations.set(key, previous);\n }\n else {\n registrations.delete(key);\n }\n // Preserve the dispatch error even if listener cleanup itself fails.\n await handle.remove().catch(() => undefined);\n throw error;\n }\n if (previous) {\n // An inactive old callback cannot fire even if removing its native handle fails.\n await previous.handle.remove().catch(() => undefined);\n }\n });\n },\n unRegisterForNotification(options) {\n const key = keyFor(options);\n return serialize(key, async () => {\n await native.unRegisterForNotification(options);\n const registration = registrations.get(key);\n if (registration) {\n registration.active = false;\n // Preserve the wrapper's cleanup contract: retain an inactive handle if removal fails,\n // so a later unregister can retry instead of forgetting the still-installed listener.\n await registration.handle.remove();\n registrations.delete(key);\n }\n });\n },\n };\n}\n//# sourceMappingURL=notification-registration.js.map","export var DataWedgeConfigMode;\n(function (DataWedgeConfigMode) {\n DataWedgeConfigMode[\"CREATE_IF_NOT_EXIST\"] = \"CREATE_IF_NOT_EXIST\";\n DataWedgeConfigMode[\"OVERWRITE\"] = \"OVERWRITE\";\n DataWedgeConfigMode[\"REMOVE\"] = \"REMOVE\";\n DataWedgeConfigMode[\"UPDATE\"] = \"UPDATE\";\n})(DataWedgeConfigMode || (DataWedgeConfigMode = {}));\nexport var DataWedgeNotificationType;\n(function (DataWedgeNotificationType) {\n DataWedgeNotificationType[\"CONFIGURATION_UPDATE\"] = \"CONFIGURATION_UPDATE\";\n DataWedgeNotificationType[\"PROFILE_SWITCH\"] = \"PROFILE_SWITCH\";\n DataWedgeNotificationType[\"SCANNER_STATUS\"] = \"SCANNER_STATUS\";\n})(DataWedgeNotificationType || (DataWedgeNotificationType = {}));\nexport var DataWedgePlugin;\n(function (DataWedgePlugin) {\n DataWedgePlugin[\"ADF\"] = \"ADF\";\n DataWedgePlugin[\"BARCODE\"] = \"BARCODE\";\n DataWedgePlugin[\"BDF\"] = \"BDF\";\n DataWedgePlugin[\"DCP\"] = \"DCP\";\n DataWedgePlugin[\"EKB\"] = \"EKB\";\n DataWedgePlugin[\"INTENT\"] = \"INTENT\";\n DataWedgePlugin[\"IP\"] = \"IP\";\n DataWedgePlugin[\"KEYSTROKE\"] = \"KEYSTROKE\";\n DataWedgePlugin[\"MSR\"] = \"MSR\";\n DataWedgePlugin[\"RFID\"] = \"RFID\";\n DataWedgePlugin[\"SERIAL\"] = \"SERIAL\";\n DataWedgePlugin[\"TOKENS\"] = \"TOKENS\";\n DataWedgePlugin[\"VOICE\"] = \"VOICE\";\n})(DataWedgePlugin || (DataWedgePlugin = {}));\nexport var ScannerIdentifier;\n(function (ScannerIdentifier) {\n ScannerIdentifier[\"AUTO\"] = \"AUTO\";\n ScannerIdentifier[\"BLUETOOTH_DS3678\"] = \"BLUETOOTH_DS3678\";\n ScannerIdentifier[\"BLUETOOTH_RS6000\"] = \"BLUETOOTH_RS6000\";\n ScannerIdentifier[\"BLUETOOTH_SSI\"] = \"BLUETOOTH_SSI\";\n ScannerIdentifier[\"INTERNAL_CAMERA\"] = \"INTERNAL_CAMERA\";\n ScannerIdentifier[\"INTERNAL_IMAGER\"] = \"INTERNAL_IMAGER\";\n ScannerIdentifier[\"INTERNAL_LASER\"] = \"INTERNAL_LASER\";\n ScannerIdentifier[\"PLUGABLE_SSI\"] = \"PLUGABLE_SSI\";\n ScannerIdentifier[\"PLUGABLE_SSI_RS5000\"] = \"PLUGABLE_SSI_RS5000\";\n ScannerIdentifier[\"SERIAL_SSI\"] = \"SERIAL_SSI\";\n ScannerIdentifier[\"USB_SSI_DS3608\"] = \"USB_SSI_DS3608\";\n})(ScannerIdentifier || (ScannerIdentifier = {}));\nexport var ScannerStatus;\n(function (ScannerStatus) {\n ScannerStatus[\"CONNECTED\"] = \"CONNECTED\";\n ScannerStatus[\"DISABLED\"] = \"DISABLED\";\n ScannerStatus[\"DISCONNECTED\"] = \"DISCONNECTED\";\n ScannerStatus[\"IDLE\"] = \"IDLE\";\n ScannerStatus[\"SCANNING\"] = \"SCANNING\";\n ScannerStatus[\"WAITING\"] = \"WAITING\";\n})(ScannerStatus || (ScannerStatus = {}));\nexport var ZebraErrorCodes;\n(function (ZebraErrorCodes) {\n ZebraErrorCodes[\"APP_ALREADY_ASSOCIATED\"] = \"APP_ALREADY_ASSOCIATED\";\n ZebraErrorCodes[\"APP_ALREADY_IN_DISABLED_LIST\"] = \"APP_ALREADY_IN_DISABLED_LIST\";\n ZebraErrorCodes[\"BUNDLE_EMPTY\"] = \"BUNDLE_EMPTY\";\n ZebraErrorCodes[\"CANNOT_READ_FILE\"] = \"CANNOT_READ_FILE\";\n ZebraErrorCodes[\"CONFIG_FILE_NOT_EXIST\"] = \"CONFIG_FILE_NOT_EXIST\";\n ZebraErrorCodes[\"DATAWEDGE_ALREADY_DISABLED\"] = \"DATAWEDGE_ALREADY_DISABLED\";\n ZebraErrorCodes[\"DATAWEDGE_ALREADY_ENABLED\"] = \"DATAWEDGE_ALREADY_ENABLED\";\n ZebraErrorCodes[\"DATAWEDGE_DISABLED\"] = \"DATAWEDGE_DISABLED\";\n ZebraErrorCodes[\"DEVICE_NOT_CONNECTED\"] = \"DEVICE_NOT_CONNECTED\";\n ZebraErrorCodes[\"DEVICE_NOT_SUPPORTED\"] = \"DEVICE_NOT_SUPPORTED\";\n ZebraErrorCodes[\"INPUT_NOT_ENABLED\"] = \"INPUT_NOT_ENABLED\";\n ZebraErrorCodes[\"INVALID_CONFIG_FILE\"] = \"INVALID_CONFIG_FILE\";\n ZebraErrorCodes[\"INVALID_FILE_NAME\"] = \"INVALID_FILE_NAME\";\n ZebraErrorCodes[\"INVALID_FOLDER_PATH\"] = \"INVALID_FOLDER_PATH\";\n ZebraErrorCodes[\"OPERATION_NOT_ALLOWED\"] = \"OPERATION_NOT_ALLOWED\";\n ZebraErrorCodes[\"PARAMETER_INVALID\"] = \"PARAMETER_INVALID\";\n ZebraErrorCodes[\"PLUGIN_BUNDLE_INVALID\"] = \"PLUGIN_BUNDLE_INVALID\";\n ZebraErrorCodes[\"PLUGIN_DISABLED\"] = \"PLUGIN_DISABLED\";\n ZebraErrorCodes[\"PLUGIN_DISABLED_IN_CONFIG\"] = \"PLUGIN_DISABLED_IN_CONFIG\";\n ZebraErrorCodes[\"PLUGIN_NOT_SUPPORTED\"] = \"PLUGIN_NOT_SUPPORTED\";\n ZebraErrorCodes[\"PROFILE_ALREADY_EXISTS\"] = \"PROFILE_ALREADY_EXISTS\";\n ZebraErrorCodes[\"PROFILE_ALREADY_SET\"] = \"PROFILE_ALREADY_SET\";\n ZebraErrorCodes[\"PROFILE_DISABLED\"] = \"PROFILE_DISABLED\";\n ZebraErrorCodes[\"PROFILE_HAS_APP_ASSOCIATION\"] = \"PROFILE_HAS_APP_ASSOCIATION\";\n ZebraErrorCodes[\"PROFILE_NAME_EMPTY\"] = \"PROFILE_NAME_EMPTY\";\n ZebraErrorCodes[\"PROFILE_NOT_FOUND\"] = \"PROFILE_NOT_FOUND\";\n ZebraErrorCodes[\"SCANNER_ALREADY_DISABLED\"] = \"SCANNER_ALREADY_DISABLED\";\n ZebraErrorCodes[\"SCANNER_ALREADY_ENABLED\"] = \"SCANNER_ALREADY_ENABLED\";\n ZebraErrorCodes[\"SCANNER_DISABLE_FAILED\"] = \"SCANNER_DISABLE_FAILED\";\n ZebraErrorCodes[\"SCANNER_ENABLE_FAILED\"] = \"SCANNER_ENABLE_FAILED\";\n ZebraErrorCodes[\"UNKNOWN\"] = \"UNKNOWN\";\n})(ZebraErrorCodes || (ZebraErrorCodes = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nimport { createZebraNotification } from './notification-registration';\nconst ZebraDataWedge = registerPlugin('ZebraDataWedge', {\n web: () => import('./web').then((m) => new m.ZebraDataWedgeWeb()),\n});\nexport const ZebraConfiguration = {\n cloneProfile: (options) => ZebraDataWedge.cloneProfile(options),\n createProfile: (options) => ZebraDataWedge.createProfile(options),\n deleteProfile: (options) => ZebraDataWedge.deleteProfile(options),\n importConfig: (options) => ZebraDataWedge.importConfig(options),\n renameProfile: (options) => ZebraDataWedge.renameProfile(options),\n restoreConfig: () => ZebraDataWedge.restoreConfig(),\n setConfig: (options) => ZebraDataWedge.setConfig(options),\n setDisabledAppList: (options) => ZebraDataWedge.setDisabledAppList(options),\n setIgnoreDisabledProfiles: (doIgnoreDisabledProfiles) => ZebraDataWedge.setIgnoreDisabledProfiles({ enabled: doIgnoreDisabledProfiles }),\n};\nexport const ZebraNotification = createZebraNotification(ZebraDataWedge);\nexport const ZebraQuery = {\n enumerateScanners: async () => (await ZebraDataWedge.enumerateScanners()).scanners,\n getActiveProfile: async () => (await ZebraDataWedge.getActiveProfile()).profileName,\n getAssociatedApps: async (profileName) => (await ZebraDataWedge.getAssociatedApps({ profileName })).appList,\n getConfig: (options) => ZebraDataWedge.getConfig(options),\n getDatawedgeStatus: () => ZebraDataWedge.getDatawedgeStatus(),\n getDisabledAppList: async () => (await ZebraDataWedge.getDisabledAppList()).appList,\n getIgnoreDisabledProfiles: async () => (await ZebraDataWedge.getIgnoreDisabledProfiles()).enabled,\n getProfilesList: async () => (await ZebraDataWedge.getProfilesList()).profiles,\n getScannerStatus: async () => (await ZebraDataWedge.getScannerStatus()).status,\n getVersionInfo: () => ZebraDataWedge.getVersionInfo(),\n};\nexport const ZebraRuntime = {\n registerScanIntentAction: (intentAction) => ZebraDataWedge.registerScanIntentAction({ intentAction }),\n disableDatawedge: () => ZebraDataWedge.disableDatawedge(),\n disableScannerInput: () => ZebraDataWedge.disableScannerInput(),\n enableDatawedge: () => ZebraDataWedge.enableDatawedge(),\n enableScannerInput: () => ZebraDataWedge.enableScannerInput(),\n enumerateTriggers: async () => (await ZebraDataWedge.enumerateTriggers()).triggers,\n notify: (options) => ZebraDataWedge.notify(options),\n resetDefaultProfile: () => ZebraDataWedge.resetDefaultProfile(),\n setDefaultProfile: (profileName) => ZebraDataWedge.setDefaultProfile({ profileName }),\n setReportingOptions: (options) => ZebraDataWedge.setReportingOptions(options),\n softRfidTrigger: () => ZebraDataWedge.softRfidTrigger(),\n softScanTrigger: (intentAction) => ZebraDataWedge.softScanTrigger({ intentAction }),\n switchScanner: (scanerIndex) => ZebraDataWedge.switchScanner({ scannerIndex: scanerIndex }),\n switchScannerParams: (options) => ZebraDataWedge.switchScannerParams(options),\n switchToProfile: (profileName) => ZebraDataWedge.switchToProfile({ profileName }),\n};\nexport * from './definitions';\nexport { ZebraDataWedge };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nconst unavailable = (...args) => {\n void args;\n throw new Error('Zebra DataWedge is only available on Android devices with Zebra DataWedge installed.');\n};\nexport class ZebraDataWedgeWeb extends WebPlugin {\n cloneProfile(options) {\n return unavailable(options);\n }\n createProfile(options) {\n return unavailable(options);\n }\n deleteProfile(options) {\n return unavailable(options);\n }\n importConfig(options) {\n return unavailable(options);\n }\n renameProfile(options) {\n return unavailable(options);\n }\n restoreConfig() {\n return unavailable();\n }\n setConfig(options) {\n return unavailable(options);\n }\n setDisabledAppList(options) {\n return unavailable(options);\n }\n setIgnoreDisabledProfiles(options) {\n return unavailable(options);\n }\n registerForNotification(options) {\n return unavailable(options);\n }\n registerScanIntentAction(options) {\n return unavailable(options);\n }\n unRegisterForNotification(options) {\n return unavailable(options);\n }\n enumerateScanners() {\n return unavailable();\n }\n getActiveProfile() {\n return unavailable();\n }\n getAssociatedApps(options) {\n return unavailable(options);\n }\n getConfig(options) {\n return unavailable(options);\n }\n getDatawedgeStatus() {\n return unavailable();\n }\n getDisabledAppList() {\n return unavailable();\n }\n getIgnoreDisabledProfiles() {\n return unavailable();\n }\n getProfilesList() {\n return unavailable();\n }\n getScannerStatus() {\n return unavailable();\n }\n getVersionInfo() {\n return unavailable();\n }\n disableDatawedge() {\n return unavailable();\n }\n disableScannerInput() {\n return unavailable();\n }\n enableDatawedge() {\n return unavailable();\n }\n enableScannerInput() {\n return unavailable();\n }\n enumerateTriggers() {\n return unavailable();\n }\n notify(options) {\n return unavailable(options);\n }\n resetDefaultProfile() {\n return unavailable();\n }\n setDefaultProfile(options) {\n return unavailable(options);\n }\n setReportingOptions(options) {\n return unavailable(options);\n }\n softRfidTrigger() {\n return unavailable();\n }\n softScanTrigger(options) {\n return unavailable(options);\n }\n switchScanner(options) {\n return unavailable(options);\n }\n switchScannerParams(options) {\n return unavailable(options);\n }\n switchToProfile(options) {\n return unavailable(options);\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["DataWedgeConfigMode","DataWedgeNotificationType","DataWedgePlugin","ScannerIdentifier","ScannerStatus","ZebraErrorCodes","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACO,SAAS,uBAAuB,CAAC,MAAM,EAAE;IAChD,IAAI,MAAM,aAAa,GAAG,IAAI,GAAG,EAAE;IACnC,IAAI,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAE;IACvC,IAAI,MAAM,MAAM,GAAG,CAAC,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,YAAY,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtN,IAAI,SAAS,SAAS,CAAC,GAAG,EAAE,SAAS,EAAE;IACvC,QAAQ,IAAI,EAAE;IACd,QAAQ,MAAM,QAAQ,GAAG,CAAC,EAAE,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE;I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C7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACjC,IAAI;IACJ;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-zebra-datawedge",
3
- "version": "8.2.1",
3
+ "version": "8.2.2",
4
4
  "description": "Capacitor plugin for Zebra DataWedge profile management, notifications, queries, and soft scanning on Zebra Android devices.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -38,7 +38,8 @@
38
38
  "verify": "bun run verify:ios && bun run verify:android && bun run verify:web",
39
39
  "verify:ios": "xcodebuild -scheme CapgoCapacitorZebraDatawedge -destination generic/platform=iOS",
40
40
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
41
- "verify:web": "bun run build",
41
+ "verify:web": "bun run build && bun run test:web",
42
+ "test:web": "bun test tests",
42
43
  "lint": "bun run eslint && bun run prettier -- --check && bun run swiftlint -- lint",
43
44
  "fmt": "bun run eslint -- --fix && bun run prettier -- --write && bun run swiftlint -- --fix --format",
44
45
  "eslint": "eslint",