@rdlabo/capacitor-brotherprint 6.2.0 → 6.3.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/web.js","esm/events.enum.js","esm/brother-printer.enum.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n async printImage(options) {\n console.log('printImage', options);\n }\n async search(options) {\n console.log('search', options);\n }\n async cancelSearchWiFiPrinter() {\n console.log('cancelSearchWiFiPrinter');\n }\n async cancelSearchBluetoothPrinter() {\n console.log('cancelSearchBluetoothPrinter');\n }\n}\n//# sourceMappingURL=web.js.map","export var BrotherPrintEventsEnum;\n(function (BrotherPrintEventsEnum) {\n BrotherPrintEventsEnum[\"onPrinterAvailable\"] = \"onPrinterAvailable\";\n BrotherPrintEventsEnum[\"onPrint\"] = \"onPrint\";\n BrotherPrintEventsEnum[\"onPrintFailedCommunication\"] = \"onPrintFailedCommunication\";\n BrotherPrintEventsEnum[\"onPrintError\"] = \"onPrintError\";\n})(BrotherPrintEventsEnum || (BrotherPrintEventsEnum = {}));\n//# sourceMappingURL=events.enum.js.map","/**\n * Note: If you update this file, you should update the following files:\n * - ios/Plugin/Model/PrinterModel.swift\n *\n * And name is follow android naming convention.\n */\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html\n */\nexport var BRLMPrinterModelName;\n(function (BRLMPrinterModelName) {\n BRLMPrinterModelName[\"QL_810W\"] = \"QL_810W\";\n BRLMPrinterModelName[\"QL_820NWB\"] = \"QL_820NWB\";\n BRLMPrinterModelName[\"TD_2320D_203\"] = \"TD_2320D_203\";\n BRLMPrinterModelName[\"TD_2030AD\"] = \"TD_2030AD\";\n BRLMPrinterModelName[\"TD_2350D_203\"] = \"TD_2350D_203\";\n})(BRLMPrinterModelName || (BRLMPrinterModelName = {}));\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html\n */\nexport var BRLMPrinterLabelName;\n(function (BRLMPrinterLabelName) {\n BRLMPrinterLabelName[\"W17H54\"] = \"W17H54\";\n BRLMPrinterLabelName[\"W17H87\"] = \"W17H87\";\n BRLMPrinterLabelName[\"W23H23\"] = \"W23H23\";\n BRLMPrinterLabelName[\"W29H42\"] = \"W29H42\";\n BRLMPrinterLabelName[\"W29H90\"] = \"W29H90\";\n BRLMPrinterLabelName[\"W38H90\"] = \"W38H90\";\n BRLMPrinterLabelName[\"W39H48\"] = \"W39H48\";\n BRLMPrinterLabelName[\"W52H29\"] = \"W52H29\";\n BRLMPrinterLabelName[\"W62H29\"] = \"W62H29\";\n BRLMPrinterLabelName[\"W62H100\"] = \"W62H100\";\n BRLMPrinterLabelName[\"W12\"] = \"W12\";\n BRLMPrinterLabelName[\"W29\"] = \"W29\";\n BRLMPrinterLabelName[\"W38\"] = \"W38\";\n BRLMPrinterLabelName[\"W50\"] = \"W50\";\n BRLMPrinterLabelName[\"W54\"] = \"W54\";\n BRLMPrinterLabelName[\"W62\"] = \"W62\";\n BRLMPrinterLabelName[\"W60H86\"] = \"W60H86\";\n BRLMPrinterLabelName[\"W62RB\"] = \"W62RB\";\n BRLMPrinterLabelName[\"W54H29\"] = \"W54H29\";\n BRLMPrinterLabelName[\"W12DIA\"] = \"W12DIA\";\n BRLMPrinterLabelName[\"W24DIA\"] = \"W24DIA\";\n BRLMPrinterLabelName[\"W58DIA\"] = \"W58DIA\";\n BRLMPrinterLabelName[\"W62H60\"] = \"W62H60\";\n BRLMPrinterLabelName[\"W62H75\"] = \"W62H75\";\n})(BRLMPrinterLabelName || (BRLMPrinterLabelName = {}));\n/**\n * @url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#imagerotation\n */\nexport var BRLMPrinterImageRotation;\n(function (BRLMPrinterImageRotation) {\n BRLMPrinterImageRotation[\"Rotate0\"] = \"Rotate0\";\n BRLMPrinterImageRotation[\"Rotate90\"] = \"Rotate90\";\n BRLMPrinterImageRotation[\"Rotate180\"] = \"Rotate180\";\n BRLMPrinterImageRotation[\"Rotate270\"] = \"Rotate270\";\n})(BRLMPrinterImageRotation || (BRLMPrinterImageRotation = {}));\n/**\n * url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#scalemode\n */\nexport var BRLMPrinterScaleMode;\n(function (BRLMPrinterScaleMode) {\n BRLMPrinterScaleMode[\"ActualSize\"] = \"ActualSize\";\n BRLMPrinterScaleMode[\"FitPageAspect\"] = \"FitPageAspect\";\n BRLMPrinterScaleMode[\"FitPaperAspect\"] = \"FitPaperAspect\";\n BRLMPrinterScaleMode[\"ScaleValue\"] = \"ScaleValue\";\n})(BRLMPrinterScaleMode || (BRLMPrinterScaleMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#halftone\n */\nexport var BRLMPrinterHalftone;\n(function (BRLMPrinterHalftone) {\n BRLMPrinterHalftone[\"Threshold\"] = \"Threshold\";\n BRLMPrinterHalftone[\"ErrorDiffusion\"] = \"ErrorDiffusion\";\n BRLMPrinterHalftone[\"PatternDither\"] = \"PatternDither\";\n})(BRLMPrinterHalftone || (BRLMPrinterHalftone = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#verticalalignment\n */\nexport var BRLMPrinterVerticalAlignment;\n(function (BRLMPrinterVerticalAlignment) {\n BRLMPrinterVerticalAlignment[\"Top\"] = \"Top\";\n BRLMPrinterVerticalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterVerticalAlignment[\"Bottom\"] = \"Bottom\";\n})(BRLMPrinterVerticalAlignment || (BRLMPrinterVerticalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#horizontalalignment\n */\nexport var BRLMPrinterHorizontalAlignment;\n(function (BRLMPrinterHorizontalAlignment) {\n BRLMPrinterHorizontalAlignment[\"Left\"] = \"Left\";\n BRLMPrinterHorizontalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterHorizontalAlignment[\"Right\"] = \"Right\";\n})(BRLMPrinterHorizontalAlignment || (BRLMPrinterHorizontalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#compressmode\n */\nexport var BRLMPrinterCompressMode;\n(function (BRLMPrinterCompressMode) {\n BRLMPrinterCompressMode[\"None\"] = \"None\";\n BRLMPrinterCompressMode[\"Tiff\"] = \"Tiff\";\n BRLMPrinterCompressMode[\"Mode9\"] = \"Mode9\";\n})(BRLMPrinterCompressMode || (BRLMPrinterCompressMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#printquality\n */\nexport var BRLMPrinterPrintQuality;\n(function (BRLMPrinterPrintQuality) {\n BRLMPrinterPrintQuality[\"Best\"] = \"Best\";\n BRLMPrinterPrintQuality[\"Fast\"] = \"Fast\";\n})(BRLMPrinterPrintQuality || (BRLMPrinterPrintQuality = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution\n */\n// export enum BRLMPrinterPrintResolution {\n// Low = 'Low',\n// Normal = 'Normal',\n// High = 'High',\n// }\n//# sourceMappingURL=brother-printer.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('BrotherPrint', {\n web: () => import('./web').then(m => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport * from './events.enum';\nexport * from './brother-printer.enum';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","BrotherPrintEventsEnum","BRLMPrinterModelName","BRLMPrinterLabelName","BRLMPrinterImageRotation","BRLMPrinterScaleMode","BRLMPrinterHalftone","BRLMPrinterVerticalAlignment","BRLMPrinterHorizont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AACnC,CAAC,UAAU,uBAAuB,EAAE;AACpC,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAC7C,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAC7C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC,CAAC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrHK,MAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjE,CAAC;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/web.js","esm/events.enum.js","esm/brother-printer.enum.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n async printImage(options) {\n console.log('printImage', options);\n }\n async search(options) {\n console.log('search', options);\n }\n async cancelSearchWiFiPrinter() {\n console.log('cancelSearchWiFiPrinter');\n }\n async cancelSearchBluetoothPrinter() {\n console.log('cancelSearchBluetoothPrinter');\n }\n}\n//# sourceMappingURL=web.js.map","export var BrotherPrintEventsEnum;\n(function (BrotherPrintEventsEnum) {\n BrotherPrintEventsEnum[\"onPrinterAvailable\"] = \"onPrinterAvailable\";\n BrotherPrintEventsEnum[\"onPrint\"] = \"onPrint\";\n BrotherPrintEventsEnum[\"onPrintFailedCommunication\"] = \"onPrintFailedCommunication\";\n BrotherPrintEventsEnum[\"onPrintError\"] = \"onPrintError\";\n})(BrotherPrintEventsEnum || (BrotherPrintEventsEnum = {}));\n//# sourceMappingURL=events.enum.js.map","/**\n * Note: If you update this file, you should update the following files:\n * - ios/Plugin/Model/PrinterModel.swift\n *\n * And name is follow android naming convention.\n */\nexport var BRKMPrinterCustomPaperUnit;\n(function (BRKMPrinterCustomPaperUnit) {\n BRKMPrinterCustomPaperUnit[\"mm\"] = \"mm\";\n BRKMPrinterCustomPaperUnit[\"inch\"] = \"inch\";\n})(BRKMPrinterCustomPaperUnit || (BRKMPrinterCustomPaperUnit = {}));\nexport var BRKMPrinterCustomPaperType;\n(function (BRKMPrinterCustomPaperType) {\n BRKMPrinterCustomPaperType[\"rollPaper\"] = \"rollPaper\";\n BRKMPrinterCustomPaperType[\"dieCutPaper\"] = \"dieCutPaper\";\n BRKMPrinterCustomPaperType[\"markRollPaper\"] = \"markRollPaper\";\n})(BRKMPrinterCustomPaperType || (BRKMPrinterCustomPaperType = {}));\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html\n */\nexport var BRLMPrinterModelName;\n(function (BRLMPrinterModelName) {\n BRLMPrinterModelName[\"QL_810W\"] = \"QL_810W\";\n BRLMPrinterModelName[\"QL_820NWB\"] = \"QL_820NWB\";\n BRLMPrinterModelName[\"TD_2320D_203\"] = \"TD_2320D_203\";\n BRLMPrinterModelName[\"TD_2030AD\"] = \"TD_2030AD\";\n BRLMPrinterModelName[\"TD_2350D_300\"] = \"TD_2350D_300\";\n})(BRLMPrinterModelName || (BRLMPrinterModelName = {}));\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html\n */\nexport var BRLMPrinterLabelName;\n(function (BRLMPrinterLabelName) {\n BRLMPrinterLabelName[\"W17H54\"] = \"W17H54\";\n BRLMPrinterLabelName[\"W17H87\"] = \"W17H87\";\n BRLMPrinterLabelName[\"W23H23\"] = \"W23H23\";\n BRLMPrinterLabelName[\"W29H42\"] = \"W29H42\";\n BRLMPrinterLabelName[\"W29H90\"] = \"W29H90\";\n BRLMPrinterLabelName[\"W38H90\"] = \"W38H90\";\n BRLMPrinterLabelName[\"W39H48\"] = \"W39H48\";\n BRLMPrinterLabelName[\"W52H29\"] = \"W52H29\";\n BRLMPrinterLabelName[\"W62H29\"] = \"W62H29\";\n BRLMPrinterLabelName[\"W62H100\"] = \"W62H100\";\n BRLMPrinterLabelName[\"W12\"] = \"W12\";\n BRLMPrinterLabelName[\"W29\"] = \"W29\";\n BRLMPrinterLabelName[\"W38\"] = \"W38\";\n BRLMPrinterLabelName[\"W50\"] = \"W50\";\n BRLMPrinterLabelName[\"W54\"] = \"W54\";\n BRLMPrinterLabelName[\"W62\"] = \"W62\";\n BRLMPrinterLabelName[\"W60H86\"] = \"W60H86\";\n BRLMPrinterLabelName[\"W62RB\"] = \"W62RB\";\n BRLMPrinterLabelName[\"W54H29\"] = \"W54H29\";\n BRLMPrinterLabelName[\"W12DIA\"] = \"W12DIA\";\n BRLMPrinterLabelName[\"W24DIA\"] = \"W24DIA\";\n BRLMPrinterLabelName[\"W58DIA\"] = \"W58DIA\";\n BRLMPrinterLabelName[\"W62H60\"] = \"W62H60\";\n BRLMPrinterLabelName[\"W62H75\"] = \"W62H75\";\n})(BRLMPrinterLabelName || (BRLMPrinterLabelName = {}));\n/**\n * @url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#imagerotation\n */\nexport var BRLMPrinterImageRotation;\n(function (BRLMPrinterImageRotation) {\n BRLMPrinterImageRotation[\"Rotate0\"] = \"Rotate0\";\n BRLMPrinterImageRotation[\"Rotate90\"] = \"Rotate90\";\n BRLMPrinterImageRotation[\"Rotate180\"] = \"Rotate180\";\n BRLMPrinterImageRotation[\"Rotate270\"] = \"Rotate270\";\n})(BRLMPrinterImageRotation || (BRLMPrinterImageRotation = {}));\n/**\n * url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#scalemode\n */\nexport var BRLMPrinterScaleMode;\n(function (BRLMPrinterScaleMode) {\n BRLMPrinterScaleMode[\"ActualSize\"] = \"ActualSize\";\n BRLMPrinterScaleMode[\"FitPageAspect\"] = \"FitPageAspect\";\n BRLMPrinterScaleMode[\"FitPaperAspect\"] = \"FitPaperAspect\";\n BRLMPrinterScaleMode[\"ScaleValue\"] = \"ScaleValue\";\n})(BRLMPrinterScaleMode || (BRLMPrinterScaleMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#halftone\n */\nexport var BRLMPrinterHalftone;\n(function (BRLMPrinterHalftone) {\n BRLMPrinterHalftone[\"Threshold\"] = \"Threshold\";\n BRLMPrinterHalftone[\"ErrorDiffusion\"] = \"ErrorDiffusion\";\n BRLMPrinterHalftone[\"PatternDither\"] = \"PatternDither\";\n})(BRLMPrinterHalftone || (BRLMPrinterHalftone = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#verticalalignment\n */\nexport var BRLMPrinterVerticalAlignment;\n(function (BRLMPrinterVerticalAlignment) {\n BRLMPrinterVerticalAlignment[\"Top\"] = \"Top\";\n BRLMPrinterVerticalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterVerticalAlignment[\"Bottom\"] = \"Bottom\";\n})(BRLMPrinterVerticalAlignment || (BRLMPrinterVerticalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#horizontalalignment\n */\nexport var BRLMPrinterHorizontalAlignment;\n(function (BRLMPrinterHorizontalAlignment) {\n BRLMPrinterHorizontalAlignment[\"Left\"] = \"Left\";\n BRLMPrinterHorizontalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterHorizontalAlignment[\"Right\"] = \"Right\";\n})(BRLMPrinterHorizontalAlignment || (BRLMPrinterHorizontalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#compressmode\n */\nexport var BRLMPrinterCompressMode;\n(function (BRLMPrinterCompressMode) {\n BRLMPrinterCompressMode[\"None\"] = \"None\";\n BRLMPrinterCompressMode[\"Tiff\"] = \"Tiff\";\n BRLMPrinterCompressMode[\"Mode9\"] = \"Mode9\";\n})(BRLMPrinterCompressMode || (BRLMPrinterCompressMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#printquality\n */\nexport var BRLMPrinterPrintQuality;\n(function (BRLMPrinterPrintQuality) {\n BRLMPrinterPrintQuality[\"Best\"] = \"Best\";\n BRLMPrinterPrintQuality[\"Fast\"] = \"Fast\";\n})(BRLMPrinterPrintQuality || (BRLMPrinterPrintQuality = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution\n */\n// export enum BRLMPrinterPrintResolution {\n// Low = 'Low',\n// Normal = 'Normal',\n// High = 'High',\n// }\n//# sourceMappingURL=brother-printer.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('BrotherPrint', {\n web: () => import('./web').then(m => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport * from './events.enum';\nexport * from './brother-printer.enum';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","BrotherPrintEventsEnum","BRKMPrinterCustomPaperUnit","BRKMPrinterCustomPaperType","BRLMPrinterModelName","BRLMPrinterLabelName","BRLMPrinterImageRotation","BRLMPrinterScaleMode","BRLMPrinterHalftone","BRLMPrinterVerticalAlignment","BRLMPrinterHorizontalAlignment","BRLMPrinterCompressMode","BRLMPrinterPrintQuality","registerPlugin"],"mappings":";;;;;;AACO,MAAM,eAAe,SAASA,cAAS,CAAC;AAC/C,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;AAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AAC3C,KAAK;AACL,IAAI,MAAM,MAAM,CAAC,OAAO,EAAE;AAC1B,QAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,uBAAuB,GAAG;AACpC,QAAQ,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;AAC/C,KAAK;A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,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC,CAAC;AAC9D;AACA;AACA;AACWC,yCAAwB;AACnC,CAAC,UAAU,uBAAuB,EAAE;AACpC,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAC7C,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAC7C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC,CAAC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChIK,MAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjE,CAAC;;;;;"}
package/dist/plugin.js CHANGED
@@ -35,6 +35,17 @@ var BrotherPrint = (function (exports, core) {
35
35
  *
36
36
  * And name is follow android naming convention.
37
37
  */
38
+ exports.BRKMPrinterCustomPaperUnit = void 0;
39
+ (function (BRKMPrinterCustomPaperUnit) {
40
+ BRKMPrinterCustomPaperUnit["mm"] = "mm";
41
+ BRKMPrinterCustomPaperUnit["inch"] = "inch";
42
+ })(exports.BRKMPrinterCustomPaperUnit || (exports.BRKMPrinterCustomPaperUnit = {}));
43
+ exports.BRKMPrinterCustomPaperType = void 0;
44
+ (function (BRKMPrinterCustomPaperType) {
45
+ BRKMPrinterCustomPaperType["rollPaper"] = "rollPaper";
46
+ BRKMPrinterCustomPaperType["dieCutPaper"] = "dieCutPaper";
47
+ BRKMPrinterCustomPaperType["markRollPaper"] = "markRollPaper";
48
+ })(exports.BRKMPrinterCustomPaperType || (exports.BRKMPrinterCustomPaperType = {}));
38
49
  /**
39
50
  * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html
40
51
  */
@@ -44,7 +55,7 @@ var BrotherPrint = (function (exports, core) {
44
55
  BRLMPrinterModelName["QL_820NWB"] = "QL_820NWB";
45
56
  BRLMPrinterModelName["TD_2320D_203"] = "TD_2320D_203";
46
57
  BRLMPrinterModelName["TD_2030AD"] = "TD_2030AD";
47
- BRLMPrinterModelName["TD_2350D_203"] = "TD_2350D_203";
58
+ BRLMPrinterModelName["TD_2350D_300"] = "TD_2350D_300";
48
59
  })(exports.BRLMPrinterModelName || (exports.BRLMPrinterModelName = {}));
49
60
  /**
50
61
  * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/web.js","esm/events.enum.js","esm/brother-printer.enum.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n async printImage(options) {\n console.log('printImage', options);\n }\n async search(options) {\n console.log('search', options);\n }\n async cancelSearchWiFiPrinter() {\n console.log('cancelSearchWiFiPrinter');\n }\n async cancelSearchBluetoothPrinter() {\n console.log('cancelSearchBluetoothPrinter');\n }\n}\n//# sourceMappingURL=web.js.map","export var BrotherPrintEventsEnum;\n(function (BrotherPrintEventsEnum) {\n BrotherPrintEventsEnum[\"onPrinterAvailable\"] = \"onPrinterAvailable\";\n BrotherPrintEventsEnum[\"onPrint\"] = \"onPrint\";\n BrotherPrintEventsEnum[\"onPrintFailedCommunication\"] = \"onPrintFailedCommunication\";\n BrotherPrintEventsEnum[\"onPrintError\"] = \"onPrintError\";\n})(BrotherPrintEventsEnum || (BrotherPrintEventsEnum = {}));\n//# sourceMappingURL=events.enum.js.map","/**\n * Note: If you update this file, you should update the following files:\n * - ios/Plugin/Model/PrinterModel.swift\n *\n * And name is follow android naming convention.\n */\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html\n */\nexport var BRLMPrinterModelName;\n(function (BRLMPrinterModelName) {\n BRLMPrinterModelName[\"QL_810W\"] = \"QL_810W\";\n BRLMPrinterModelName[\"QL_820NWB\"] = \"QL_820NWB\";\n BRLMPrinterModelName[\"TD_2320D_203\"] = \"TD_2320D_203\";\n BRLMPrinterModelName[\"TD_2030AD\"] = \"TD_2030AD\";\n BRLMPrinterModelName[\"TD_2350D_203\"] = \"TD_2350D_203\";\n})(BRLMPrinterModelName || (BRLMPrinterModelName = {}));\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html\n */\nexport var BRLMPrinterLabelName;\n(function (BRLMPrinterLabelName) {\n BRLMPrinterLabelName[\"W17H54\"] = \"W17H54\";\n BRLMPrinterLabelName[\"W17H87\"] = \"W17H87\";\n BRLMPrinterLabelName[\"W23H23\"] = \"W23H23\";\n BRLMPrinterLabelName[\"W29H42\"] = \"W29H42\";\n BRLMPrinterLabelName[\"W29H90\"] = \"W29H90\";\n BRLMPrinterLabelName[\"W38H90\"] = \"W38H90\";\n BRLMPrinterLabelName[\"W39H48\"] = \"W39H48\";\n BRLMPrinterLabelName[\"W52H29\"] = \"W52H29\";\n BRLMPrinterLabelName[\"W62H29\"] = \"W62H29\";\n BRLMPrinterLabelName[\"W62H100\"] = \"W62H100\";\n BRLMPrinterLabelName[\"W12\"] = \"W12\";\n BRLMPrinterLabelName[\"W29\"] = \"W29\";\n BRLMPrinterLabelName[\"W38\"] = \"W38\";\n BRLMPrinterLabelName[\"W50\"] = \"W50\";\n BRLMPrinterLabelName[\"W54\"] = \"W54\";\n BRLMPrinterLabelName[\"W62\"] = \"W62\";\n BRLMPrinterLabelName[\"W60H86\"] = \"W60H86\";\n BRLMPrinterLabelName[\"W62RB\"] = \"W62RB\";\n BRLMPrinterLabelName[\"W54H29\"] = \"W54H29\";\n BRLMPrinterLabelName[\"W12DIA\"] = \"W12DIA\";\n BRLMPrinterLabelName[\"W24DIA\"] = \"W24DIA\";\n BRLMPrinterLabelName[\"W58DIA\"] = \"W58DIA\";\n BRLMPrinterLabelName[\"W62H60\"] = \"W62H60\";\n BRLMPrinterLabelName[\"W62H75\"] = \"W62H75\";\n})(BRLMPrinterLabelName || (BRLMPrinterLabelName = {}));\n/**\n * @url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#imagerotation\n */\nexport var BRLMPrinterImageRotation;\n(function (BRLMPrinterImageRotation) {\n BRLMPrinterImageRotation[\"Rotate0\"] = \"Rotate0\";\n BRLMPrinterImageRotation[\"Rotate90\"] = \"Rotate90\";\n BRLMPrinterImageRotation[\"Rotate180\"] = \"Rotate180\";\n BRLMPrinterImageRotation[\"Rotate270\"] = \"Rotate270\";\n})(BRLMPrinterImageRotation || (BRLMPrinterImageRotation = {}));\n/**\n * url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#scalemode\n */\nexport var BRLMPrinterScaleMode;\n(function (BRLMPrinterScaleMode) {\n BRLMPrinterScaleMode[\"ActualSize\"] = \"ActualSize\";\n BRLMPrinterScaleMode[\"FitPageAspect\"] = \"FitPageAspect\";\n BRLMPrinterScaleMode[\"FitPaperAspect\"] = \"FitPaperAspect\";\n BRLMPrinterScaleMode[\"ScaleValue\"] = \"ScaleValue\";\n})(BRLMPrinterScaleMode || (BRLMPrinterScaleMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#halftone\n */\nexport var BRLMPrinterHalftone;\n(function (BRLMPrinterHalftone) {\n BRLMPrinterHalftone[\"Threshold\"] = \"Threshold\";\n BRLMPrinterHalftone[\"ErrorDiffusion\"] = \"ErrorDiffusion\";\n BRLMPrinterHalftone[\"PatternDither\"] = \"PatternDither\";\n})(BRLMPrinterHalftone || (BRLMPrinterHalftone = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#verticalalignment\n */\nexport var BRLMPrinterVerticalAlignment;\n(function (BRLMPrinterVerticalAlignment) {\n BRLMPrinterVerticalAlignment[\"Top\"] = \"Top\";\n BRLMPrinterVerticalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterVerticalAlignment[\"Bottom\"] = \"Bottom\";\n})(BRLMPrinterVerticalAlignment || (BRLMPrinterVerticalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#horizontalalignment\n */\nexport var BRLMPrinterHorizontalAlignment;\n(function (BRLMPrinterHorizontalAlignment) {\n BRLMPrinterHorizontalAlignment[\"Left\"] = \"Left\";\n BRLMPrinterHorizontalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterHorizontalAlignment[\"Right\"] = \"Right\";\n})(BRLMPrinterHorizontalAlignment || (BRLMPrinterHorizontalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#compressmode\n */\nexport var BRLMPrinterCompressMode;\n(function (BRLMPrinterCompressMode) {\n BRLMPrinterCompressMode[\"None\"] = \"None\";\n BRLMPrinterCompressMode[\"Tiff\"] = \"Tiff\";\n BRLMPrinterCompressMode[\"Mode9\"] = \"Mode9\";\n})(BRLMPrinterCompressMode || (BRLMPrinterCompressMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#printquality\n */\nexport var BRLMPrinterPrintQuality;\n(function (BRLMPrinterPrintQuality) {\n BRLMPrinterPrintQuality[\"Best\"] = \"Best\";\n BRLMPrinterPrintQuality[\"Fast\"] = \"Fast\";\n})(BRLMPrinterPrintQuality || (BRLMPrinterPrintQuality = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution\n */\n// export enum BRLMPrinterPrintResolution {\n// Low = 'Low',\n// Normal = 'Normal',\n// High = 'High',\n// }\n//# sourceMappingURL=brother-printer.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('BrotherPrint', {\n web: () => import('./web').then(m => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport * from './events.enum';\nexport * from './brother-printer.enum';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","BrotherPrintEventsEnum","BRLMPrinterModelName","BRLMPrinterLabelName","BRLMPrinterImageRotation","BRLMPrinterScaleMode","BRLMPrinterHalftone","BRLMPrinterVerticalAlignment","BRLMPrinterHorizontalAlignment","BRLMPrinterCompressMode","BRLMPrinterPrintQuality","registerPlugin"],"mappings":";;;IACO,MAAM,eAAe,SAASA,cAAS,CAAC;IAC/C,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3C,KAAK;IACL,IAAI,MAAM,MAAM,CAAC,OAAO,EAAE;IAC1B,QAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,uBAAuB,GAAG;IACpC,QAAQ,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAC/C,KAAK;IACL,IAAI,MAAM,4BAA4B,GAAG;IACzC,QAAQ,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;IACpD,KAAK;IACL;;;;;;;ACdWC,4CAAuB;IAClC,CAAC,UAAU,sBAAsB,EAAE;IACnC,IAAI,sBAAsB,CAAC,oBAAoB,CAAC,GAAG,oBAAoB,CAAC;IACxE,IAAI,sBAAsB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAClD,IAAI,sBAAsB,CAAC,4BAA4B,CAAC,GAAG,4BAA4B,CAAC;IACxF,IAAI,sBAAsB,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC;IAC5D,CAAC,EAAEA,8BAAsB,KAAKA,8BAAsB,GAAG,EAAE,CAAC,CAAC;;ICN3D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACWC,0CAAqB;IAChC,CAAC,UAAU,oBAAoB,EAAE;IACjC,IAAI,oBAAoB,CAAC,S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,MAAM,CAAC,GAAG,MAAM,CAAC;IAC7C,IAAI,uBAAuB,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAC/C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9D;IACA;IACA;AACWC,6CAAwB;IACnC,CAAC,UAAU,uBAAuB,EAAE;IACpC,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC7C,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC7C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;ACrHK,UAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjE,CAAC;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/web.js","esm/events.enum.js","esm/brother-printer.enum.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n async printImage(options) {\n console.log('printImage', options);\n }\n async search(options) {\n console.log('search', options);\n }\n async cancelSearchWiFiPrinter() {\n console.log('cancelSearchWiFiPrinter');\n }\n async cancelSearchBluetoothPrinter() {\n console.log('cancelSearchBluetoothPrinter');\n }\n}\n//# sourceMappingURL=web.js.map","export var BrotherPrintEventsEnum;\n(function (BrotherPrintEventsEnum) {\n BrotherPrintEventsEnum[\"onPrinterAvailable\"] = \"onPrinterAvailable\";\n BrotherPrintEventsEnum[\"onPrint\"] = \"onPrint\";\n BrotherPrintEventsEnum[\"onPrintFailedCommunication\"] = \"onPrintFailedCommunication\";\n BrotherPrintEventsEnum[\"onPrintError\"] = \"onPrintError\";\n})(BrotherPrintEventsEnum || (BrotherPrintEventsEnum = {}));\n//# sourceMappingURL=events.enum.js.map","/**\n * Note: If you update this file, you should update the following files:\n * - ios/Plugin/Model/PrinterModel.swift\n *\n * And name is follow android naming convention.\n */\nexport var BRKMPrinterCustomPaperUnit;\n(function (BRKMPrinterCustomPaperUnit) {\n BRKMPrinterCustomPaperUnit[\"mm\"] = \"mm\";\n BRKMPrinterCustomPaperUnit[\"inch\"] = \"inch\";\n})(BRKMPrinterCustomPaperUnit || (BRKMPrinterCustomPaperUnit = {}));\nexport var BRKMPrinterCustomPaperType;\n(function (BRKMPrinterCustomPaperType) {\n BRKMPrinterCustomPaperType[\"rollPaper\"] = \"rollPaper\";\n BRKMPrinterCustomPaperType[\"dieCutPaper\"] = \"dieCutPaper\";\n BRKMPrinterCustomPaperType[\"markRollPaper\"] = \"markRollPaper\";\n})(BRKMPrinterCustomPaperType || (BRKMPrinterCustomPaperType = {}));\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html\n */\nexport var BRLMPrinterModelName;\n(function (BRLMPrinterModelName) {\n BRLMPrinterModelName[\"QL_810W\"] = \"QL_810W\";\n BRLMPrinterModelName[\"QL_820NWB\"] = \"QL_820NWB\";\n BRLMPrinterModelName[\"TD_2320D_203\"] = \"TD_2320D_203\";\n BRLMPrinterModelName[\"TD_2030AD\"] = \"TD_2030AD\";\n BRLMPrinterModelName[\"TD_2350D_300\"] = \"TD_2350D_300\";\n})(BRLMPrinterModelName || (BRLMPrinterModelName = {}));\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html\n */\nexport var BRLMPrinterLabelName;\n(function (BRLMPrinterLabelName) {\n BRLMPrinterLabelName[\"W17H54\"] = \"W17H54\";\n BRLMPrinterLabelName[\"W17H87\"] = \"W17H87\";\n BRLMPrinterLabelName[\"W23H23\"] = \"W23H23\";\n BRLMPrinterLabelName[\"W29H42\"] = \"W29H42\";\n BRLMPrinterLabelName[\"W29H90\"] = \"W29H90\";\n BRLMPrinterLabelName[\"W38H90\"] = \"W38H90\";\n BRLMPrinterLabelName[\"W39H48\"] = \"W39H48\";\n BRLMPrinterLabelName[\"W52H29\"] = \"W52H29\";\n BRLMPrinterLabelName[\"W62H29\"] = \"W62H29\";\n BRLMPrinterLabelName[\"W62H100\"] = \"W62H100\";\n BRLMPrinterLabelName[\"W12\"] = \"W12\";\n BRLMPrinterLabelName[\"W29\"] = \"W29\";\n BRLMPrinterLabelName[\"W38\"] = \"W38\";\n BRLMPrinterLabelName[\"W50\"] = \"W50\";\n BRLMPrinterLabelName[\"W54\"] = \"W54\";\n BRLMPrinterLabelName[\"W62\"] = \"W62\";\n BRLMPrinterLabelName[\"W60H86\"] = \"W60H86\";\n BRLMPrinterLabelName[\"W62RB\"] = \"W62RB\";\n BRLMPrinterLabelName[\"W54H29\"] = \"W54H29\";\n BRLMPrinterLabelName[\"W12DIA\"] = \"W12DIA\";\n BRLMPrinterLabelName[\"W24DIA\"] = \"W24DIA\";\n BRLMPrinterLabelName[\"W58DIA\"] = \"W58DIA\";\n BRLMPrinterLabelName[\"W62H60\"] = \"W62H60\";\n BRLMPrinterLabelName[\"W62H75\"] = \"W62H75\";\n})(BRLMPrinterLabelName || (BRLMPrinterLabelName = {}));\n/**\n * @url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#imagerotation\n */\nexport var BRLMPrinterImageRotation;\n(function (BRLMPrinterImageRotation) {\n BRLMPrinterImageRotation[\"Rotate0\"] = \"Rotate0\";\n BRLMPrinterImageRotation[\"Rotate90\"] = \"Rotate90\";\n BRLMPrinterImageRotation[\"Rotate180\"] = \"Rotate180\";\n BRLMPrinterImageRotation[\"Rotate270\"] = \"Rotate270\";\n})(BRLMPrinterImageRotation || (BRLMPrinterImageRotation = {}));\n/**\n * url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#scalemode\n */\nexport var BRLMPrinterScaleMode;\n(function (BRLMPrinterScaleMode) {\n BRLMPrinterScaleMode[\"ActualSize\"] = \"ActualSize\";\n BRLMPrinterScaleMode[\"FitPageAspect\"] = \"FitPageAspect\";\n BRLMPrinterScaleMode[\"FitPaperAspect\"] = \"FitPaperAspect\";\n BRLMPrinterScaleMode[\"ScaleValue\"] = \"ScaleValue\";\n})(BRLMPrinterScaleMode || (BRLMPrinterScaleMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#halftone\n */\nexport var BRLMPrinterHalftone;\n(function (BRLMPrinterHalftone) {\n BRLMPrinterHalftone[\"Threshold\"] = \"Threshold\";\n BRLMPrinterHalftone[\"ErrorDiffusion\"] = \"ErrorDiffusion\";\n BRLMPrinterHalftone[\"PatternDither\"] = \"PatternDither\";\n})(BRLMPrinterHalftone || (BRLMPrinterHalftone = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#verticalalignment\n */\nexport var BRLMPrinterVerticalAlignment;\n(function (BRLMPrinterVerticalAlignment) {\n BRLMPrinterVerticalAlignment[\"Top\"] = \"Top\";\n BRLMPrinterVerticalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterVerticalAlignment[\"Bottom\"] = \"Bottom\";\n})(BRLMPrinterVerticalAlignment || (BRLMPrinterVerticalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#horizontalalignment\n */\nexport var BRLMPrinterHorizontalAlignment;\n(function (BRLMPrinterHorizontalAlignment) {\n BRLMPrinterHorizontalAlignment[\"Left\"] = \"Left\";\n BRLMPrinterHorizontalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterHorizontalAlignment[\"Right\"] = \"Right\";\n})(BRLMPrinterHorizontalAlignment || (BRLMPrinterHorizontalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#compressmode\n */\nexport var BRLMPrinterCompressMode;\n(function (BRLMPrinterCompressMode) {\n BRLMPrinterCompressMode[\"None\"] = \"None\";\n BRLMPrinterCompressMode[\"Tiff\"] = \"Tiff\";\n BRLMPrinterCompressMode[\"Mode9\"] = \"Mode9\";\n})(BRLMPrinterCompressMode || (BRLMPrinterCompressMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#printquality\n */\nexport var BRLMPrinterPrintQuality;\n(function (BRLMPrinterPrintQuality) {\n BRLMPrinterPrintQuality[\"Best\"] = \"Best\";\n BRLMPrinterPrintQuality[\"Fast\"] = \"Fast\";\n})(BRLMPrinterPrintQuality || (BRLMPrinterPrintQuality = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution\n */\n// export enum BRLMPrinterPrintResolution {\n// Low = 'Low',\n// Normal = 'Normal',\n// High = 'High',\n// }\n//# sourceMappingURL=brother-printer.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('BrotherPrint', {\n web: () => import('./web').then(m => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport * from './events.enum';\nexport * from './brother-printer.enum';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","BrotherPrintEventsEnum","BRKMPrinterCustomPaperUnit","BRKMPrinterCustomPaperType","BRLMPrinterModelName","BRLMPrinterLabelName","BRLMPrinterImageRotation","BRLMPrinterScaleMode","BRLMPrinterHalftone","BRLMPrinterVerticalAlignment","BRLMPrinterHorizontalAlignment","BRLMPrinterCompressMode","BRLMPrinterPrintQuality","registerPlugin"],"mappings":";;;IACO,MAAM,eAAe,SAASA,cAAS,CAAC;IAC/C,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3C,KAAK;IACL,IAAI,MAAM,MAAM,CAAC,O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C,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC7C,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC7C,IAAI,uBAAuB,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAC/C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9D;IACA;IACA;AACWC,6CAAwB;IACnC,CAAC,UAAU,uBAAuB,EAAE;IACpC,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC7C,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC7C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;AChIK,UAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjE,CAAC;;;;;;;;;;;;;"}
@@ -9,6 +9,25 @@ import BRLMPrinterKit
9
9
  import BRPtouchPrinterKit
10
10
  import Foundation
11
11
 
12
+ class PrinterSearchErrorModel {
13
+ static func fetchChannelErrorCode(error: BRLMPrinterSearchErrorCode) -> String {
14
+ switch error {
15
+ case .noError:
16
+ return "noError"
17
+ case .canceled:
18
+ return "canceled"
19
+ case .alreadySearching:
20
+ return "alreadySearching"
21
+ case .unsupported:
22
+ return "unsupported"
23
+ case .unknownError:
24
+ return "unknownError"
25
+ @unknown default:
26
+ return "unknown"
27
+ }
28
+ }
29
+ }
30
+
12
31
  class RequestPrinterInfoErrorModel {
13
32
  static func fetchGetPrinterInfoErrorCode(error: BRLMRequestPrinterInfoErrorCode) -> String {
14
33
  switch error {
@@ -3,6 +3,42 @@ import BRLMPrinterKit
3
3
  import BRPtouchPrinterKit
4
4
 
5
5
  class BrotherModel {
6
+ static func getCustomPaper(type: String, width: Float, length: Float, margins: BRLMCustomPaperSizeMargins, markPosition: Float, markLength: Float, gapLength: Float, unit: BRLMCustomPaperSizeLengthUnit) -> BRLMCustomPaperSize {
7
+ switch type {
8
+ case "rollPaper":
9
+ return BRLMCustomPaperSize(rollWithTapeWidth: CGFloat(width), margins: margins, unitOfLength: unit)
10
+ case "dieCutPaper":
11
+ return BRLMCustomPaperSize(dieCutWithTapeWidth: CGFloat(width), tapeLength: CGFloat(length), margins: margins, gapLength: CGFloat(gapLength), unitOfLength: unit)
12
+ case "markRollPaper":
13
+ return BRLMCustomPaperSize(markRollWithTapeWidth: CGFloat(width), tapeLength: CGFloat(length), margins: margins, markPosition: CGFloat(markPosition), markHeight: CGFloat(markLength), unitOfLength: unit)
14
+ default:
15
+ // File doesn't support
16
+ fatalError(type + "is not supported.")
17
+ }
18
+ }
19
+
20
+ static func getCustomPaperSizeLengthUnit(unit: String) -> BRLMCustomPaperSizeLengthUnit {
21
+ switch unit {
22
+ case "inch":
23
+ return BRLMCustomPaperSizeLengthUnit.inch
24
+ case "mm":
25
+ return BRLMCustomPaperSizeLengthUnit.mm
26
+ default:
27
+ // other unit is not support
28
+ fatalError(unit + "is not supported.")
29
+ }
30
+
31
+ }
32
+
33
+ static func getMargin(_ marginTop: Double, _ marginRight: Double, _ marginBottom: Double, _ marginLeft: Double) -> BRLMCustomPaperSizeMargins {
34
+ return BRLMCustomPaperSizeMargins(
35
+ top: CGFloat(marginTop),
36
+ left: CGFloat(marginLeft),
37
+ bottom: CGFloat(marginBottom),
38
+ right: CGFloat(marginRight)
39
+ )
40
+ }
41
+
6
42
  static func getModelName(from: String) -> BRLMPrinterModel {
7
43
  switch from {
8
44
  case "QL_810W":
@@ -13,8 +49,8 @@ class BrotherModel {
13
49
  return BRLMPrinterModel.TD_2320D_203
14
50
  case "TD_2030AD":
15
51
  return BRLMPrinterModel.TD_2030A
16
- case "TD_2350D_203":
17
- return BRLMPrinterModel.TD_2350D_203
52
+ case "TD_2350D_300":
53
+ return BRLMPrinterModel.TD_2350D_300
18
54
  default:
19
55
  return BRLMPrinterModel.unknown
20
56
  }
@@ -4,16 +4,53 @@ import Foundation
4
4
  import Capacitor
5
5
 
6
6
  class PrinterSettingsModel {
7
- static func initialize(_ call: CAPPluginCall, printSettings: BRLMQLPrintSettings) -> BRLMPrintSettingsProtocol {
7
+ static func TDModelSettings(_ call: CAPPluginCall, printSettings: BRLMTDPrintSettings) -> BRLMTDPrintSettings {
8
+ let baseSettings = self.BaseModelSettings(call, printSettings: printSettings)
8
9
 
9
- printSettings.labelSize = BrotherModel.getLabelSize(from: call.getString("labelName", "rollW62"))
10
- printSettings.numCopies = UInt(call.getInt("numberOfCopies", 1))
10
+ let margins = BrotherModel.getMargin(call.getDouble("marginTop", 0), call.getDouble("marginRight", 0), call.getDouble("marginBottom", 0), call.getDouble("marginLeft", 0))
11
+
12
+ let unit = BrotherModel.getCustomPaperSizeLengthUnit(unit: call.getString("paperUnit", "mm"))
13
+
14
+ baseSettings.customPaperSize = BrotherModel.getCustomPaper(
15
+ type: call.getString("paperType")!,
16
+ width: call.getFloat("tapeWidth", 0),
17
+ length: call.getFloat("tapeLength", 0),
18
+ margins: margins,
19
+ markPosition: call.getFloat("paperMarkPosition", 0),
20
+ markLength: call.getFloat("paperMarkLength", 0),
21
+ gapLength: call.getFloat("gapLength", 0),
22
+ unit: unit
23
+ )
24
+
25
+ if let autoCut = call.getBool("autoCut") ?? nil {
26
+ baseSettings.autoCut = autoCut
27
+ baseSettings.cutAtEnd = true
28
+ }
29
+
30
+ let report = BRLMValidatePrintSettings.validate(baseSettings)
31
+ NSLog(report.description())
32
+
33
+ return printSettings
34
+ }
35
+
36
+ static func QLModelSettings(_ call: CAPPluginCall, printSettings: BRLMQLPrintSettings) -> BRLMQLPrintSettings {
37
+ let baseSettings = self.BaseModelSettings(call, printSettings: printSettings)
38
+ baseSettings.labelSize = BrotherModel.getLabelSize(from: call.getString("labelName", "rollW62"))
11
39
 
12
40
  if let autoCut = call.getBool("autoCut") ?? nil {
13
- printSettings.autoCut = autoCut
14
- printSettings.cutAtEnd = true
41
+ baseSettings.autoCut = autoCut
42
+ baseSettings.cutAtEnd = true
15
43
  }
16
44
 
45
+ let report = BRLMValidatePrintSettings.validate(baseSettings)
46
+ NSLog(report.description())
47
+
48
+ return baseSettings
49
+ }
50
+
51
+ static func BaseModelSettings<T: BRLMPrintImageSettings>(_ call: CAPPluginCall, printSettings: T) -> T {
52
+ printSettings.numCopies = UInt(call.getInt("numberOfCopies", 1))
53
+
17
54
  if let scaleMode = call.getString("scaleMode") ?? nil {
18
55
  switch scaleMode {
19
56
  case "ActualSize":
@@ -106,20 +143,18 @@ class PrinterSettingsModel {
106
143
  }
107
144
  }
108
145
 
109
- // if let resolution = call.getString("resolution") ?? nil {
110
- // switch resolution {
111
- // case "Low":
112
- // printSettings.resolution = BRLMPrintSettingsResolution.low
113
- // case "Normal":
114
- // printSettings.resolution = BRLMPrintSettingsResolution.normal
115
- // case "High":
116
- // printSettings.resolution = BRLMPrintSettingsResolution.high
117
- // default: break
118
- // }
119
- // }
120
-
121
- let report = BRLMValidatePrintSettings.validate(printSettings)
122
- NSLog(report.description())
146
+ // if let resolution = call.getString("resolution") ?? nil {
147
+ // switch resolution {
148
+ // case "Low":
149
+ // printSettings.resolution = BRLMPrintSettingsResolution.low
150
+ // case "Normal":
151
+ // printSettings.resolution = BRLMPrintSettingsResolution.normal
152
+ // case "High":
153
+ // printSettings.resolution = BRLMPrintSettingsResolution.high
154
+ // default: break
155
+ // }
156
+ // }
157
+
123
158
  return printSettings
124
159
  }
125
160
  }
@@ -23,11 +23,13 @@ public class BrotherPrint: CAPPlugin {
23
23
 
24
24
  // 検索からデバイス情報が得られた場合
25
25
  let port: String = call.getString("port", "wifi")
26
- let localName: String = call.getString("localName", "")
27
- let ipAddress: String = call.getString("ipAddress", "")
28
- let serialNumber: String = call.getString("serialNumber", "")
26
+ let channelInfo: String = call.getString("channelInfo", "")
29
27
 
30
- let modelName = BrotherModel.getModelName(from: call.getString("modelName", "QL-820NWB"))
28
+ // let localName: String = call.getString("localName", "")
29
+ // let serialNumber: String = call.getString("serialNumber", "")
30
+
31
+ let modelName: String = call.getString("modelName", "QL-820NWB")
32
+ let printerModel = BrotherModel.getModelName(from: modelName)
31
33
 
32
34
  NSLog(call.getString("modelName", "not set"))
33
35
  NSLog(call.getString("labelName", "not set"))
@@ -38,11 +40,11 @@ public class BrotherPrint: CAPPlugin {
38
40
 
39
41
  switch port {
40
42
  case "wifi":
41
- channel = BRLMChannel(wifiIPAddress: ipAddress)
43
+ channel = BRLMChannel(wifiIPAddress: channelInfo)
42
44
  case "bluetooth":
43
- channel = BRLMChannel(bluetoothSerialNumber: serialNumber)
45
+ channel = BRLMChannel(bluetoothSerialNumber: channelInfo)
44
46
  case "bluetoothLowEnergy":
45
- channel = BRLMChannel(bleLocalName: localName)
47
+ channel = BRLMChannel(bleLocalName: channelInfo)
46
48
  default:
47
49
  call.reject("Error - connection is not found.")
48
50
  return
@@ -52,7 +54,7 @@ public class BrotherPrint: CAPPlugin {
52
54
  guard generateResult.error.code == BRLMOpenChannelErrorCode.noError,
53
55
  let printerDriver = generateResult.driver else {
54
56
  let message = OpenChannelErrorModel.fetchChannelErrorCode(error: generateResult.error.code)
55
- self.notifyListeners(BrotherPrinterEvent.onPrintError.rawValue, data: [
57
+ self.notifyListeners(BrotherPrinterEvent.onPrintFailedCommunication.rawValue, data: [
56
58
  "message": message,
57
59
  "code": generateResult.error.code
58
60
  ])
@@ -64,41 +66,62 @@ public class BrotherPrint: CAPPlugin {
64
66
  let decodedByte = UIImage(data: newImageData! as Data)
65
67
  else {
66
68
  printerDriver.closeChannel()
67
- self.notifyListeners(BrotherPrinterEvent.onPrintError.rawValue, data: [
68
- "code": 0,
69
- "message": "Error - Create decodedByte From ImageData is failed."
70
- ])
71
69
  call.reject("Error - Create decodedByte From ImageData is failed.")
72
70
  return
73
71
  }
74
72
 
75
- guard
76
- let _printSettings = BRLMQLPrintSettings(defaultPrintSettingsWith: modelName)
77
- else {
73
+ var printSettings: BRLMPrintSettingsProtocol
74
+
75
+ if modelName.hasPrefix("QL") {
76
+ guard
77
+ let _printSettings = BRLMQLPrintSettings(defaultPrintSettingsWith: printerModel)
78
+ else {
79
+ printerDriver.closeChannel()
80
+ self.notifyListeners(BrotherPrinterEvent.onPrintFailedCommunication.rawValue, data: [
81
+ "code": 0,
82
+ "message": "Error - Create BRLMQLPrintSettings with " + modelName + " is failed."
83
+ ])
84
+ call.reject("Error - Create BRLMQLPrintSettings with " + modelName + " is failed.")
85
+ return
86
+ }
87
+ printSettings = PrinterSettingsModel.QLModelSettings(call, printSettings: _printSettings)
88
+
89
+ } else if modelName.hasPrefix("TD") {
90
+ guard
91
+ let _printSettings = BRLMTDPrintSettings(defaultPrintSettingsWith: printerModel)
92
+ else {
93
+ printerDriver.closeChannel()
94
+ self.notifyListeners(BrotherPrinterEvent.onPrintFailedCommunication.rawValue, data: [
95
+ "code": 0,
96
+ "message": "Error - Create BRLMTDPrintSettings with " + modelName + " is failed."
97
+ ])
98
+ call.reject("Error - Create BRLMTDPrintSettings with " + modelName + " is failed.")
99
+ return
100
+ }
101
+ printSettings = PrinterSettingsModel.TDModelSettings(call, printSettings: _printSettings)
102
+
103
+ } else {
78
104
  printerDriver.closeChannel()
79
- self.notifyListeners(BrotherPrinterEvent.onPrintError.rawValue, data: [
80
- "code": 0,
81
- "message": "Error - Create BRLMQLPrintSettings is failed."
82
- ])
83
- call.reject("Error - Create BRLMQLPrintSettings is failed.")
105
+ call.reject("Error - " + modelName + " is not supported")
84
106
  return
85
107
  }
86
108
 
87
- let printSettings = PrinterSettingsModel.initialize(call, printSettings: _printSettings)
88
109
  let printError = printerDriver.printImage(with: decodedByte.cgImage!, settings: printSettings)
89
110
 
90
- if printError.code != .noError {
111
+ if printError.code != BRLMPrintErrorCode.noError {
91
112
  printerDriver.closeChannel()
92
113
  let message = PrintErrorModel.fetchErrorCode(errorCode: Int32(printError.code.rawValue))
93
114
  self.notifyListeners(BrotherPrinterEvent.onPrintError.rawValue, data: [
94
115
  "message": message,
95
116
  "code": printError.code.rawValue
96
117
  ])
97
- call.reject("Error - Print Image: \(printError.code)")
118
+ call.reject("Error - Print Image: " + message)
98
119
  return
99
120
  }
100
121
 
101
122
  printerDriver.closeChannel()
123
+
124
+ self.notifyListeners(BrotherPrinterEvent.onPrint.rawValue, data: [:])
102
125
  call.resolve()
103
126
  }
104
127
  }
@@ -139,14 +162,24 @@ public class BrotherPrint: CAPPlugin {
139
162
 
140
163
  private func checkBLEChannel(_ call: CAPPluginCall) {
141
164
  DispatchQueue.global().async {
142
- NSLog("BRLMPrinterSearcher.startBluetoothSearch")
143
165
  let searcher = BRLMPrinterSearcher.startBluetoothSearch()
166
+ if searcher.error.code != BRLMPrinterSearchErrorCode.noError {
167
+ call.reject("Error - startBluetoothSearch: " + PrinterSearchErrorModel.fetchChannelErrorCode(error: searcher.error.code))
168
+ return
169
+ }
144
170
  for channel in searcher.channels {
145
171
  NSLog(channel.channelInfo)
146
172
  self.notifyListeners(BrotherPrinterEvent.onPrinterAvailable.rawValue, data: self.chanelToPrinter(port: "bluetooth", channel: channel))
147
173
  }
148
174
  call.resolve()
149
175
  }
176
+
177
+ // BRLMPrinterSearcher.startBluetoothAccessorySearch() { searcher in
178
+ // for channel in searcher.channels {
179
+ // self.notifyListeners(BrotherPrinterEvent.onPrinterAvailable.rawValue, data: self.chanelToPrinter(port: "bluetooth", channel: channel))
180
+ // }
181
+ // call.resolve()
182
+ // }
150
183
  }
151
184
 
152
185
  private func searchBLEPrinter(_ call: CAPPluginCall) {
@@ -178,9 +211,9 @@ public class BrotherPrint: CAPPlugin {
178
211
  "modelName": modelName,
179
212
  "serialNumber": serialNumber,
180
213
  "macAddress": macAddress,
181
- "ipAddress": ipaddress,
182
214
  "nodeName": nodeName,
183
- "location": location
215
+ "location": location,
216
+ "channelInfo": ipaddress
184
217
  ]
185
218
  }
186
219
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rdlabo/capacitor-brotherprint",
3
- "version": "6.2.0",
3
+ "version": "6.3.0",
4
4
  "description": "Capacitor plugin for Brother Print SDK",
5
5
  "main": "dist/plugin.js",
6
6
  "module": "dist/esm/index.js",