@10yun/cv-mobile-ui 0.4.11 → 0.5.1

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.
Files changed (61) hide show
  1. package/package.json +1 -1
  2. package/plugins/MessageBox.js +2 -2
  3. package/plugins/MessageTip.js +4 -4
  4. package/plugins/request.js +54 -39
  5. package/plugins/storage.js +1 -4
  6. package/plugins/utils.js +13 -0
  7. package/ui-cv/cv-draw-barcode/barcode.js +225 -202
  8. package/ui-cv/cv-draw-barcode/barcodes/Barcode.js +14 -17
  9. package/ui-cv/cv-draw-barcode/barcodes/CODE128/CODE128.js +202 -164
  10. package/ui-cv/cv-draw-barcode/barcodes/CODE128/CODE128A.js +58 -35
  11. package/ui-cv/cv-draw-barcode/barcodes/CODE128/CODE128B.js +58 -36
  12. package/ui-cv/cv-draw-barcode/barcodes/CODE128/CODE128C.js +58 -34
  13. package/ui-cv/cv-draw-barcode/barcodes/CODE128/CODE128_AUTO.js +50 -41
  14. package/ui-cv/cv-draw-barcode/barcodes/CODE128/auto.js +43 -57
  15. package/ui-cv/cv-draw-barcode/barcodes/CODE128/constants.js +71 -30
  16. package/ui-cv/cv-draw-barcode/barcodes/CODE128/index.js +11 -29
  17. package/ui-cv/cv-draw-barcode/barcodes/CODE39/index.js +150 -77
  18. package/ui-cv/cv-draw-barcode/barcodes/EAN_UPC/EAN.js +122 -90
  19. package/ui-cv/cv-draw-barcode/barcodes/EAN_UPC/EAN13.js +169 -111
  20. package/ui-cv/cv-draw-barcode/barcodes/EAN_UPC/EAN2.js +77 -56
  21. package/ui-cv/cv-draw-barcode/barcodes/EAN_UPC/EAN5.js +84 -60
  22. package/ui-cv/cv-draw-barcode/barcodes/EAN_UPC/EAN8.js +133 -74
  23. package/ui-cv/cv-draw-barcode/barcodes/EAN_UPC/UPC.js +174 -156
  24. package/ui-cv/cv-draw-barcode/barcodes/EAN_UPC/UPCE.js +220 -174
  25. package/ui-cv/cv-draw-barcode/barcodes/EAN_UPC/constants.js +80 -21
  26. package/ui-cv/cv-draw-barcode/barcodes/EAN_UPC/encoder.js +18 -24
  27. package/ui-cv/cv-draw-barcode/barcodes/EAN_UPC/index.js +15 -39
  28. package/ui-cv/cv-draw-barcode/barcodes/GenericBarcode/index.js +80 -55
  29. package/ui-cv/cv-draw-barcode/barcodes/ITF/ITF.js +99 -69
  30. package/ui-cv/cv-draw-barcode/barcodes/ITF/ITF14.js +73 -45
  31. package/ui-cv/cv-draw-barcode/barcodes/ITF/constants.js +8 -8
  32. package/ui-cv/cv-draw-barcode/barcodes/ITF/index.js +6 -18
  33. package/ui-cv/cv-draw-barcode/barcodes/MSI/MSI.js +86 -66
  34. package/ui-cv/cv-draw-barcode/barcodes/MSI/MSI10.js +40 -33
  35. package/ui-cv/cv-draw-barcode/barcodes/MSI/MSI1010.js +41 -35
  36. package/ui-cv/cv-draw-barcode/barcodes/MSI/MSI11.js +42 -33
  37. package/ui-cv/cv-draw-barcode/barcodes/MSI/MSI1110.js +37 -35
  38. package/ui-cv/cv-draw-barcode/barcodes/MSI/checksums.js +22 -25
  39. package/ui-cv/cv-draw-barcode/barcodes/MSI/index.js +13 -34
  40. package/ui-cv/cv-draw-barcode/barcodes/codabar/index.js +120 -90
  41. package/ui-cv/cv-draw-barcode/barcodes/common.js +0 -0
  42. package/ui-cv/cv-draw-barcode/barcodes/index.js +32 -33
  43. package/ui-cv/cv-draw-barcode/barcodes/index.tmp.js +32 -33
  44. package/ui-cv/cv-draw-barcode/barcodes/pharmacode/index.js +93 -71
  45. package/ui-cv/cv-draw-barcode/cv-draw-barcode.vue +4 -4
  46. package/ui-cv/cv-icons/icons/default-icons.js +132 -0
  47. package/ui-cv/cv-icons/icons/icons-action.js +72 -0
  48. package/ui-cv/cv-icons/icons/icons-arrow.js +46 -0
  49. package/ui-cv/cv-icons/icons/icons-base.js +89 -0
  50. package/ui-cv/cv-icons/icons/icons-mall.js +34 -0
  51. package/ui-cv/cv-icons/icons/icons-media.js +44 -0
  52. package/ui-cv/cv-icons/icons/icons-order.js +33 -0
  53. package/ui-cv/cv-icons/icons/icons-people.js +46 -0
  54. package/ui-cv/cv-icons/icons/icons-status.js +32 -0
  55. package/ui-cv/cv-icons/icons/icons-wallet.js +15 -0
  56. package/ui-cv/cv-icons/icons.js +14 -13
  57. package/ui-cv/cv-lists-base/cv-lists-base.vue +0 -2
  58. package/ui-cv/cv-tab-lists/cv-tab-lists.vue +0 -2
  59. package/ui-uni/u-charts/u-charts.js +1093 -744
  60. package/ui-uni/uni-list/uni-refresh.wxs +1 -1
  61. package/ui-uni/uni-swipe-action-item/index.wxs +6 -6
@@ -1,105 +1,178 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.CODE39 = undefined;
7
-
8
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
9
-
10
- var _Barcode2 = require("../Barcode.js");
11
-
12
- var _Barcode3 = _interopRequireDefault(_Barcode2);
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1
+ import { BarcodeFunc } from '../Barcode.js';
2
+
3
+ var _createClass = (function () {
4
+ function defineProperties(target, props) {
5
+ for (var i = 0; i < props.length; i++) {
6
+ var descriptor = props[i];
7
+ descriptor.enumerable = descriptor.enumerable || false;
8
+ descriptor.configurable = true;
9
+ if ('value' in descriptor) descriptor.writable = true;
10
+ Object.defineProperty(target, descriptor.key, descriptor);
11
+ }
12
+ }
13
+ return function (Constructor, protoProps, staticProps) {
14
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
15
+ if (staticProps) defineProperties(Constructor, staticProps);
16
+ return Constructor;
17
+ };
18
+ })();
19
+
20
+ function _classCallCheck(instance, Constructor) {
21
+ if (!(instance instanceof Constructor)) {
22
+ throw new TypeError('Cannot call a class as a function');
23
+ }
24
+ }
17
25
 
18
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
26
+ function _possibleConstructorReturn(self, call) {
27
+ if (!self) {
28
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
29
+ }
30
+ return call && (typeof call === 'object' || typeof call === 'function') ? call : self;
31
+ }
19
32
 
20
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
33
+ function _inherits(subClass, superClass) {
34
+ if (typeof superClass !== 'function' && superClass !== null) {
35
+ throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);
36
+ }
37
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
38
+ constructor: { value: subClass, enumerable: false, writable: true, configurable: true }
39
+ });
40
+ if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : (subClass.__proto__ = superClass);
41
+ } // Encoding documentation:
21
42
  // https://en.wikipedia.org/wiki/Code_39#Encoding
22
43
 
23
- var CODE39 = function (_Barcode) {
24
- _inherits(CODE39, _Barcode);
25
-
26
- function CODE39(data, options) {
27
- _classCallCheck(this, CODE39);
28
-
29
- data = data.toUpperCase();
30
-
31
- // Calculate mod43 checksum if enabled
32
- if (options.mod43) {
33
- data += getCharacter(mod43checksum(data));
34
- }
35
-
36
- return _possibleConstructorReturn(this, (CODE39.__proto__ || Object.getPrototypeOf(CODE39)).call(this, data, options));
37
- }
38
-
39
- _createClass(CODE39, [{
40
- key: "encode",
41
- value: function encode() {
42
- // First character is always a *
43
- var result = getEncoding("*");
44
-
45
- // Take every character and add the binary representation to the result
46
- for (var i = 0; i < this.data.length; i++) {
47
- result += getEncoding(this.data[i]) + "0";
48
- }
49
-
50
- // Last character is always a *
51
- result += getEncoding("*");
52
-
53
- return {
54
- data: result,
55
- text: this.text
56
- };
57
- }
58
- }, {
59
- key: "valid",
60
- value: function valid() {
61
- return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1;
62
- }
63
- }]);
64
-
65
- return CODE39;
66
- }(_Barcode3.default);
44
+ var CODE39 = (function (_Barcode) {
45
+ _inherits(CODE39, _Barcode);
46
+
47
+ function CODE39(data, options) {
48
+ _classCallCheck(this, CODE39);
49
+
50
+ data = data.toUpperCase();
51
+
52
+ // Calculate mod43 checksum if enabled
53
+ if (options.mod43) {
54
+ data += getCharacter(mod43checksum(data));
55
+ }
56
+
57
+ return _possibleConstructorReturn(this, (CODE39.__proto__ || Object.getPrototypeOf(CODE39)).call(this, data, options));
58
+ }
59
+
60
+ _createClass(CODE39, [
61
+ {
62
+ key: 'encode',
63
+ value: function encode() {
64
+ // First character is always a *
65
+ var result = getEncoding('*');
66
+
67
+ // Take every character and add the binary representation to the result
68
+ for (var i = 0; i < this.data.length; i++) {
69
+ result += getEncoding(this.data[i]) + '0';
70
+ }
71
+
72
+ // Last character is always a *
73
+ result += getEncoding('*');
74
+
75
+ return {
76
+ data: result,
77
+ text: this.text
78
+ };
79
+ }
80
+ },
81
+ {
82
+ key: 'valid',
83
+ value: function valid() {
84
+ return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1;
85
+ }
86
+ }
87
+ ]);
88
+
89
+ return CODE39;
90
+ })(BarcodeFunc);
67
91
 
68
92
  // All characters. The position in the array is the (checksum) value
69
93
 
70
-
71
- var characters = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "-", ".", " ", "$", "/", "+", "%", "*"];
94
+ var characters = [
95
+ '0',
96
+ '1',
97
+ '2',
98
+ '3',
99
+ '4',
100
+ '5',
101
+ '6',
102
+ '7',
103
+ '8',
104
+ '9',
105
+ 'A',
106
+ 'B',
107
+ 'C',
108
+ 'D',
109
+ 'E',
110
+ 'F',
111
+ 'G',
112
+ 'H',
113
+ 'I',
114
+ 'J',
115
+ 'K',
116
+ 'L',
117
+ 'M',
118
+ 'N',
119
+ 'O',
120
+ 'P',
121
+ 'Q',
122
+ 'R',
123
+ 'S',
124
+ 'T',
125
+ 'U',
126
+ 'V',
127
+ 'W',
128
+ 'X',
129
+ 'Y',
130
+ 'Z',
131
+ '-',
132
+ '.',
133
+ ' ',
134
+ '$',
135
+ '/',
136
+ '+',
137
+ '%',
138
+ '*'
139
+ ];
72
140
 
73
141
  // The decimal representation of the characters, is converted to the
74
142
  // corresponding binary with the getEncoding function
75
- var encodings = [20957, 29783, 23639, 30485, 20951, 29813, 23669, 20855, 29789, 23645, 29975, 23831, 30533, 22295, 30149, 24005, 21623, 29981, 23837, 22301, 30023, 23879, 30545, 22343, 30161, 24017, 21959, 30065, 23921, 22385, 29015, 18263, 29141, 17879, 29045, 18293, 17783, 29021, 18269, 17477, 17489, 17681, 20753, 35770];
143
+ var encodings = [
144
+ 20957, 29783, 23639, 30485, 20951, 29813, 23669, 20855, 29789, 23645, 29975, 23831, 30533, 22295, 30149, 24005, 21623, 29981,
145
+ 23837, 22301, 30023, 23879, 30545, 22343, 30161, 24017, 21959, 30065, 23921, 22385, 29015, 18263, 29141, 17879, 29045, 18293,
146
+ 17783, 29021, 18269, 17477, 17489, 17681, 20753, 35770
147
+ ];
76
148
 
77
149
  // Get the binary representation of a character by converting the encodings
78
150
  // from decimal to binary
79
151
  function getEncoding(character) {
80
- return getBinary(characterValue(character));
152
+ return getBinary(characterValue(character));
81
153
  }
82
154
 
83
155
  function getBinary(characterValue) {
84
- return encodings[characterValue].toString(2);
156
+ return encodings[characterValue].toString(2);
85
157
  }
86
158
 
87
159
  function getCharacter(characterValue) {
88
- return characters[characterValue];
160
+ return characters[characterValue];
89
161
  }
90
162
 
91
163
  function characterValue(character) {
92
- return characters.indexOf(character);
164
+ return characters.indexOf(character);
93
165
  }
94
166
 
95
167
  function mod43checksum(data) {
96
- var checksum = 0;
97
- for (var i = 0; i < data.length; i++) {
98
- checksum += characterValue(data[i]);
99
- }
168
+ var checksum = 0;
169
+ for (var i = 0; i < data.length; i++) {
170
+ checksum += characterValue(data[i]);
171
+ }
100
172
 
101
- checksum = checksum % 43;
102
- return checksum;
173
+ checksum = checksum % 43;
174
+ return checksum;
103
175
  }
104
-
105
- exports.CODE39 = CODE39;
176
+ export default {
177
+ CODE39: CODE39
178
+ };
@@ -1,92 +1,124 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
8
-
9
- var _constants = require('./constants');
10
-
11
- var _encoder = require('./encoder');
12
-
13
- var _encoder2 = _interopRequireDefault(_encoder);
14
-
15
- var _Barcode2 = require('../Barcode');
16
-
17
- var _Barcode3 = _interopRequireDefault(_Barcode2);
18
-
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
-
21
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
22
-
23
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
24
-
25
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
1
+ import _constants from './constants.js';
2
+ import { BarcodeFunc } from '../Barcode.js';
3
+ import { encoderFunc } from './encoder.js';
4
+
5
+ var _createClass = (function () {
6
+ function defineProperties(target, props) {
7
+ for (var i = 0; i < props.length; i++) {
8
+ var descriptor = props[i];
9
+ descriptor.enumerable = descriptor.enumerable || false;
10
+ descriptor.configurable = true;
11
+ if ('value' in descriptor) descriptor.writable = true;
12
+ Object.defineProperty(target, descriptor.key, descriptor);
13
+ }
14
+ }
15
+ return function (Constructor, protoProps, staticProps) {
16
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
17
+ if (staticProps) defineProperties(Constructor, staticProps);
18
+ return Constructor;
19
+ };
20
+ })();
21
+
22
+ function _classCallCheck(instance, Constructor) {
23
+ if (!(instance instanceof Constructor)) {
24
+ throw new TypeError('Cannot call a class as a function');
25
+ }
26
+ }
27
+
28
+ function _possibleConstructorReturn(self, call) {
29
+ if (!self) {
30
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
31
+ }
32
+ return call && (typeof call === 'object' || typeof call === 'function') ? call : self;
33
+ }
34
+
35
+ function _inherits(subClass, superClass) {
36
+ if (typeof superClass !== 'function' && superClass !== null) {
37
+ throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);
38
+ }
39
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
40
+ constructor: { value: subClass, enumerable: false, writable: true, configurable: true }
41
+ });
42
+ if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : (subClass.__proto__ = superClass);
43
+ }
26
44
 
27
45
  // Base class for EAN8 & EAN13
28
- var EAN = function (_Barcode) {
29
- _inherits(EAN, _Barcode);
30
-
31
- function EAN(data, options) {
32
- _classCallCheck(this, EAN);
33
-
34
- // Make sure the font is not bigger than the space between the guard bars
35
- var _this = _possibleConstructorReturn(this, (EAN.__proto__ || Object.getPrototypeOf(EAN)).call(this, data, options));
36
-
37
- _this.fontSize = !options.flat && options.fontSize > options.width * 10 ? options.width * 10 : options.fontSize;
38
-
39
- // Make the guard bars go down half the way of the text
40
- _this.guardHeight = options.height + _this.fontSize / 2 + options.textMargin;
41
- return _this;
42
- }
43
-
44
- _createClass(EAN, [{
45
- key: 'encode',
46
- value: function encode() {
47
- return this.options.flat ? this.encodeFlat() : this.encodeGuarded();
48
- }
49
- }, {
50
- key: 'leftText',
51
- value: function leftText(from, to) {
52
- return this.text.substr(from, to);
53
- }
54
- }, {
55
- key: 'leftEncode',
56
- value: function leftEncode(data, structure) {
57
- return (0, _encoder2.default)(data, structure);
58
- }
59
- }, {
60
- key: 'rightText',
61
- value: function rightText(from, to) {
62
- return this.text.substr(from, to);
63
- }
64
- }, {
65
- key: 'rightEncode',
66
- value: function rightEncode(data, structure) {
67
- return (0, _encoder2.default)(data, structure);
68
- }
69
- }, {
70
- key: 'encodeGuarded',
71
- value: function encodeGuarded() {
72
- var textOptions = { fontSize: this.fontSize };
73
- var guardOptions = { height: this.guardHeight };
74
-
75
- return [{ data: _constants.SIDE_BIN, options: guardOptions }, { data: this.leftEncode(), text: this.leftText(), options: textOptions }, { data: _constants.MIDDLE_BIN, options: guardOptions }, { data: this.rightEncode(), text: this.rightText(), options: textOptions }, { data: _constants.SIDE_BIN, options: guardOptions }];
76
- }
77
- }, {
78
- key: 'encodeFlat',
79
- value: function encodeFlat() {
80
- var data = [_constants.SIDE_BIN, this.leftEncode(), _constants.MIDDLE_BIN, this.rightEncode(), _constants.SIDE_BIN];
81
-
82
- return {
83
- data: data.join(''),
84
- text: this.text
85
- };
86
- }
87
- }]);
88
-
89
- return EAN;
90
- }(_Barcode3.default);
91
-
92
- exports.default = EAN;
46
+ var EAN = (function (_Barcode) {
47
+ _inherits(EAN, _Barcode);
48
+
49
+ function EAN(data, options) {
50
+ _classCallCheck(this, EAN);
51
+
52
+ // Make sure the font is not bigger than the space between the guard bars
53
+ var _this = _possibleConstructorReturn(this, (EAN.__proto__ || Object.getPrototypeOf(EAN)).call(this, data, options));
54
+
55
+ _this.fontSize = !options.flat && options.fontSize > options.width * 10 ? options.width * 10 : options.fontSize;
56
+
57
+ // Make the guard bars go down half the way of the text
58
+ _this.guardHeight = options.height + _this.fontSize / 2 + options.textMargin;
59
+ return _this;
60
+ }
61
+
62
+ _createClass(EAN, [
63
+ {
64
+ key: 'encode',
65
+ value: function encode() {
66
+ return this.options.flat ? this.encodeFlat() : this.encodeGuarded();
67
+ }
68
+ },
69
+ {
70
+ key: 'leftText',
71
+ value: function leftText(from, to) {
72
+ return this.text.substr(from, to);
73
+ }
74
+ },
75
+ {
76
+ key: 'leftEncode',
77
+ value: function leftEncode(data, structure) {
78
+ return (0, encoderFunc)(data, structure);
79
+ }
80
+ },
81
+ {
82
+ key: 'rightText',
83
+ value: function rightText(from, to) {
84
+ return this.text.substr(from, to);
85
+ }
86
+ },
87
+ {
88
+ key: 'rightEncode',
89
+ value: function rightEncode(data, structure) {
90
+ return (0, encoderFunc)(data, structure);
91
+ }
92
+ },
93
+ {
94
+ key: 'encodeGuarded',
95
+ value: function encodeGuarded() {
96
+ var textOptions = { fontSize: this.fontSize };
97
+ var guardOptions = { height: this.guardHeight };
98
+
99
+ return [
100
+ { data: _constants.SIDE_BIN, options: guardOptions },
101
+ { data: this.leftEncode(), text: this.leftText(), options: textOptions },
102
+ { data: _constants.MIDDLE_BIN, options: guardOptions },
103
+ { data: this.rightEncode(), text: this.rightText(), options: textOptions },
104
+ { data: _constants.SIDE_BIN, options: guardOptions }
105
+ ];
106
+ }
107
+ },
108
+ {
109
+ key: 'encodeFlat',
110
+ value: function encodeFlat() {
111
+ var data = [_constants.SIDE_BIN, this.leftEncode(), _constants.MIDDLE_BIN, this.rightEncode(), _constants.SIDE_BIN];
112
+
113
+ return {
114
+ data: data.join(''),
115
+ text: this.text
116
+ };
117
+ }
118
+ }
119
+ ]);
120
+
121
+ return EAN;
122
+ })(BarcodeFunc);
123
+
124
+ export default EAN;