@boldreports/javascript-reporting-extensions 3.1.101

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 ADDED
@@ -0,0 +1 @@
1
+ ## BoldReports Javascript Extension
@@ -0,0 +1,47 @@
1
+ .customitem-barcode {
2
+ background-image: url('images/barcode.png');
3
+ }
4
+
5
+ .customitem-qrbarcode {
6
+ background-image: url('images/qrbarcode.png');
7
+ }
8
+
9
+ .customitem-barcode,
10
+ .customitem-qrbarcode {
11
+ background-position: 50% 50%;
12
+ background-repeat: no-repeat;
13
+ height: 25px;
14
+ }
15
+
16
+ .e-rptdesigner-itempanel-dragelements .customitem-barcode,
17
+ .e-rptdesigner-itempanel-dragelements .customitem-qrbarcode {
18
+ margin-top: 0px !important;
19
+ height: 100%;
20
+ }
21
+
22
+ .e-rptdesigner-loaderDiv .e-rptdesigner-spinnerDiv {
23
+ box-sizing: content-box !important;
24
+ -moz-box-sizing: content-box !important;
25
+ -webkit-box-sizing: content-box !important;
26
+ }
27
+
28
+ /* Safari */
29
+ @-webkit-keyframes spin {
30
+ 0% {
31
+ -webkit-transform: rotate(0deg);
32
+ }
33
+
34
+ 100% {
35
+ -webkit-transform: rotate(360deg);
36
+ }
37
+ }
38
+
39
+ @keyframes spin {
40
+ 0% {
41
+ transform: rotate(0deg);
42
+ }
43
+
44
+ 100% {
45
+ transform: rotate(360deg);
46
+ }
47
+ }
@@ -0,0 +1,274 @@
1
+ var EJBarcode = (function () {
2
+ function EJBarcode(rptDesigner) {
3
+ this.customJSON = null;
4
+ this.rootElement = null;
5
+ this.customItemDiv = null;
6
+ this.reportDesigner = null;
7
+ this.loaderDiv = null;
8
+ this.errMsgDiv = null;
9
+ this.reportDesigner = rptDesigner;
10
+ }
11
+ EJBarcode.prototype.initializeItem = function (args) {
12
+ args.isBuildInService = true;
13
+ args.defaultHeight = 120;
14
+ args.defaultWidth = 180;
15
+ args.minimumHeight = 15;
16
+ args.minimumWidth = 90;
17
+ args.renderCallback = $.proxy(this.renderData, this);
18
+ args.loadingCallback = $.proxy(this.showIndicator, this);
19
+ };
20
+ EJBarcode.prototype.renderItem = function (customJson, target) {
21
+ this.customJSON = customJson;
22
+ this.rootElement = target;
23
+ this.renderBarcode();
24
+ };
25
+ EJBarcode.prototype.renderBarcode = function () {
26
+ this.customItemDiv = ej.buildTag('div.customitem', '', {
27
+ 'width': '100%',
28
+ 'height': '100%',
29
+ 'border': '1pt dotted gray',
30
+ 'box-sizing': 'border-box',
31
+ '-moz-box-sizing': 'border-box',
32
+ '-webkit-box-sizing': 'border-box',
33
+ 'overflow': 'hidden', 'position': 'absolute'
34
+ }, {
35
+ 'id': this.customJSON.Name + '_customItem'
36
+ });
37
+ var loaderDiv = this.loaderDiv = ej.buildTag('div.e-rptdesigner-loaderDiv', '', {
38
+ 'width': '100%', 'height': '100%', 'display': 'none', 'opacity': '0.9',
39
+ 'position': 'absolute', 'border': '0.5px dotted black',
40
+ 'background-color': 'white',
41
+ 'z-index': '4000', 'overflow': 'hidden'
42
+ });
43
+ var spinnerDiv = ej.buildTag('div.e-rptdesigner-spinnerDiv', '', {
44
+ 'border': '5px solid #f3f3f3',
45
+ 'border-radius': '50%', 'margin': '-17.5px 0 0 -17.5px',
46
+ 'border-top': '5px solid #3498db',
47
+ '-webkit-animation': 'spin 2s linear infinite',
48
+ 'animation': 'spin 2s linear infinite',
49
+ 'background': 'transparent',
50
+ 'position': 'absolute',
51
+ 'left': '50%',
52
+ 'top': '50%',
53
+ 'cursor': 'default',
54
+ 'height': '25px',
55
+ 'width': '25px'
56
+ });
57
+ var errorRootDiv = this.errMsgDiv = ej.buildTag('div', '', {
58
+ 'display': 'none', 'position': 'relative', 'z-index': '3000',
59
+ 'font-family': 'Segoe UI', 'font-size': '13px', 'height': '100%', 'width': '100%'
60
+ });
61
+ var errorDiv = ej.buildTag('div', 'Failed to load barcode', {
62
+ 'display': 'table-cell', 'overflow': 'hidden', 'font-family': 'Segoe UI',
63
+ 'font-size': '13px', 'vertical-align': 'middle', 'text-align': 'center'
64
+ });
65
+ this.rootElement.append(loaderDiv);
66
+ loaderDiv.append(spinnerDiv);
67
+ errorRootDiv.append(errorDiv);
68
+ this.customItemDiv.append(errorRootDiv);
69
+ this.rootElement.append(this.customItemDiv);
70
+ };
71
+ EJBarcode.prototype.onPropertyChange = function (name, oldValue, newValue) {
72
+ var args = [];
73
+ for (var _i = 3; _i < arguments.length; _i++) {
74
+ args[_i - 3] = arguments[_i];
75
+ }
76
+ switch (name) {
77
+ case 'BarcodeValue':
78
+ this.updatePropertyVal(name, newValue);
79
+ break;
80
+ case 'BarcodeType':
81
+ this.updatePropertyVal(name, newValue);
82
+ break;
83
+ case 'DisplayBarcodeText':
84
+ this.updatePropertyVal(name, (newValue === true) ? 'true' : 'false');
85
+ }
86
+ };
87
+ EJBarcode.prototype.onPositionChanged = function (top, left) {
88
+ };
89
+ EJBarcode.prototype.onSizeChanged = function (height, width) {
90
+ if (!ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) {
91
+ this.customItemDiv.css({
92
+ width: width,
93
+ height: height
94
+ });
95
+ }
96
+ else if (!ej.isNullOrUndefined(height) && ej.isNullOrUndefined(width)) {
97
+ this.customItemDiv.css({
98
+ height: height
99
+ });
100
+ }
101
+ else if (ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) {
102
+ this.customItemDiv.css({
103
+ width: width
104
+ });
105
+ }
106
+ };
107
+ EJBarcode.prototype.getPropertyGridItems = function () {
108
+ var propertyItems = {
109
+ 'HeaderText': this.customJSON.Name,
110
+ 'PropertyType': 'barcode',
111
+ 'SubType': 'barcode',
112
+ 'IsEditHeader': true,
113
+ 'Items': [{
114
+ 'CategoryId': 'basicsettings',
115
+ 'DisplayName': this.getLocale('categoryBasicSettings'),
116
+ 'IsExpand': true,
117
+ 'Items': [
118
+ {
119
+ 'ItemId': 'barcodetype',
120
+ 'Name': 'BarcodeType',
121
+ 'DisplayName': this.getLocale('BarcodeType'),
122
+ 'Value': this.getPropertyVal('BarcodeType'),
123
+ 'ItemType': 'DropDown',
124
+ 'EnableExpression': false,
125
+ 'ValueList': ['Code39', 'Code39Extended', 'Code11', 'Codabar', 'Code93', 'Code128A', 'Code128B',
126
+ 'Code128C', 'UpcBarcode', 'EAN-13', 'EAN-8', 'Code39 Mod 43', 'Interleaved 2 of 5',
127
+ 'Standard 2 of 5', 'Pharmacode']
128
+ },
129
+ {
130
+ 'ItemId': 'barcodevalue',
131
+ 'Name': 'BarcodeValue',
132
+ 'DisplayName': this.getLocale('barcodeValue'),
133
+ 'EnableExpression': true,
134
+ 'Value': this.getPropertyVal('BarcodeValue'),
135
+ 'ItemType': 'TextBox'
136
+ },
137
+ {
138
+ 'ItemId': 'displaybarcodetext',
139
+ 'Name': 'DisplayBarcodeText',
140
+ 'DisplayName': this.getLocale('displayText'),
141
+ 'Value': this.isDisplayText() ? true : false,
142
+ 'ItemType': 'Bool',
143
+ 'EnableExpression': false
144
+ }
145
+ ]
146
+ }
147
+ ]
148
+ };
149
+ return propertyItems;
150
+ };
151
+ EJBarcode.prototype.getPropertyVal = function (name) {
152
+ if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
153
+ for (var index = 0; index < this.customJSON.CustomProperties.length; index++) {
154
+ if (this.customJSON.CustomProperties[index].Name === name) {
155
+ return this.customJSON.CustomProperties[index].Value;
156
+ }
157
+ }
158
+ }
159
+ return null;
160
+ };
161
+ EJBarcode.prototype.setPropertyVal = function (name, val) {
162
+ if (this.customJSON.CustomProperties === null) {
163
+ this.customJSON.CustomProperties = [];
164
+ }
165
+ this.customJSON.CustomProperties.push(new ej.ReportModel.CustomProperty(name, val));
166
+ };
167
+ EJBarcode.prototype.updatePropertyVal = function (propertyName, value) {
168
+ if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
169
+ for (var index = 0; index < this.customJSON.CustomProperties.length; index++) {
170
+ if (this.customJSON.CustomProperties[index].Name === propertyName) {
171
+ this.customJSON.CustomProperties[index].Value = value;
172
+ }
173
+ }
174
+ }
175
+ };
176
+ EJBarcode.prototype.getReportItemJson = function () {
177
+ if (this.customJSON === null) {
178
+ this.customJSON = new ej.ReportModel.CustomReportItem().getModel();
179
+ this.setPropertyVal('BarcodeValue', '00000');
180
+ this.setPropertyVal('BarcodeType', 'Code39');
181
+ this.setPropertyVal('DisplayBarcodeText', 'true');
182
+ }
183
+ return this.customJSON;
184
+ };
185
+ EJBarcode.prototype.setReportItemJson = function (reportItem) {
186
+ this.customJSON = reportItem;
187
+ };
188
+ EJBarcode.prototype.dispose = function () {
189
+ };
190
+ EJBarcode.prototype.isDisplayText = function () {
191
+ return (this.getPropertyVal('DisplayBarcodeText').toLowerCase()) === 'true';
192
+ };
193
+ EJBarcode.prototype.getLocale = function (text) {
194
+ var barcodeLocale;
195
+ var defaultLocale = EJBarcode.Locale['en-US'];
196
+ if (this.reportDesigner && !ej.isNullOrUndefined(this.reportDesigner.model) &&
197
+ !ej.isNullOrUndefined(EJBarcode.Locale[this.reportDesigner.model.locale])) {
198
+ barcodeLocale = EJBarcode.Locale[this.reportDesigner.model.locale];
199
+ }
200
+ else {
201
+ barcodeLocale = defaultLocale;
202
+ }
203
+ switch (text.toLowerCase()) {
204
+ case 'barcodevalue':
205
+ if (barcodeLocale && barcodeLocale.barcodeValue) {
206
+ return barcodeLocale.barcodeValue;
207
+ }
208
+ return defaultLocale.barcodeValue;
209
+ case 'barcodetype':
210
+ if (barcodeLocale && barcodeLocale.barcodeType) {
211
+ return barcodeLocale.barcodeType;
212
+ }
213
+ return defaultLocale.barcodeType;
214
+ case 'displaytext':
215
+ if (barcodeLocale && barcodeLocale.textVisibility) {
216
+ return barcodeLocale.textVisibility;
217
+ }
218
+ return defaultLocale.textVisibility;
219
+ case 'categorybasicsettings':
220
+ if (barcodeLocale && barcodeLocale.categoryBasicSettings) {
221
+ return barcodeLocale.categoryBasicSettings;
222
+ }
223
+ return defaultLocale.categoryBasicSettings;
224
+ }
225
+ return text;
226
+ };
227
+ EJBarcode.prototype.renderData = function (args) {
228
+ this.customItemDiv.css('background-image', 'none');
229
+ if (args && args.data && typeof args.data === 'string' && args.data.indexOf('Sf_Exception') !== -1) {
230
+ this.errMsgDiv.css('display', 'table');
231
+ this.errMsgDiv.find('div').text('Failed to load barcode - ' + args.data.replace('Sf_Exception - ', ''));
232
+ }
233
+ else if (args.isLoaded && args.data) {
234
+ this.errMsgDiv.css('display', 'none');
235
+ this.customItemDiv.css({
236
+ 'background-image': 'url(data:image/BMP;base64,' + args.data + ')',
237
+ 'background-size': '100% 100%',
238
+ 'background-repeat': 'no-repeat',
239
+ 'background-position': 'left top'
240
+ });
241
+ }
242
+ else {
243
+ this.errMsgDiv.css('display', 'table');
244
+ this.errMsgDiv.find('div').text('Failed to load barcode');
245
+ }
246
+ };
247
+ EJBarcode.prototype.showIndicator = function (isShow) {
248
+ this.loaderDiv.css('display', isShow ? 'block' : 'none');
249
+ };
250
+ return EJBarcode;
251
+ }());
252
+ EJBarcode.Locale = {};
253
+ EJBarcode.Locale['en-US'] = {
254
+ barcodeValue: 'Text',
255
+ barcodeType: 'Symbology Type',
256
+ textVisibility: 'Text Visibility',
257
+ categoryBasicSettings: 'Basic Settings',
258
+ toolTip: {
259
+ requirements: 'Display any barcode type.',
260
+ description: 'Displays the barcodes.',
261
+ title: 'Barcode'
262
+ }
263
+ };
264
+ EJBarcode.Locale['fr-FR'] = {
265
+ barcodeValue: 'Texte',
266
+ barcodeType: 'Type de symbologie',
267
+ textVisibility: 'Visibilite du texte',
268
+ categoryBasicSettings: 'Paramètres de base',
269
+ toolTip: {
270
+ requirements: 'Afficher n\'importe quel type de code à barres.',
271
+ description: 'Affiche les codes barres.',
272
+ title: 'code à barre'
273
+ }
274
+ };
@@ -0,0 +1,9 @@
1
+ var customLinks = [
2
+ { name: 'ESLicenseMessage', url: '/licensing/license-token/' },
3
+ { name: 'Unlicensed', url: '/licensing/licensing-errors/#license-key-not-registered' },
4
+ { name: 'LicenseExpired', url: '/licensing/licensing-errors/#license-expired' },
5
+ { name: 'PlatformMismatch', url: '/licensing/licensing-errors/#platform-mismatch' },
6
+ { name: 'WrongKey', url: '/licensing/licensing-errors/#invalid-key' },
7
+ { name: 'NoLicense', url: '/licensing/licensing-errors/#license-key-not-registered' },
8
+ { name: 'NetworkError', url: '/licensing/licensing-errors/#network-error' }
9
+ ];
@@ -0,0 +1,25 @@
1
+ var dataExtensions = [];
2
+ var cloudDataExtensions = [];
3
+ var itemExtensions = [{
4
+ name: 'barcode',
5
+ className: 'EJBarcode',
6
+ imageClass: 'customitem-barcode',
7
+ displayName: '1D Barcode',
8
+ category: 'Barcodes',
9
+ toolTip: {
10
+ requirements: 'Add a report item to the designer area.',
11
+ description: 'Display the barcode lines as report item.',
12
+ title: 'Barcode'
13
+ }
14
+ }, {
15
+ name: 'matrixbarcode',
16
+ className: 'EJQRBarcode',
17
+ imageClass: 'customitem-qrbarcode',
18
+ displayName: '2D Barcode',
19
+ category: 'Barcodes',
20
+ toolTip: {
21
+ requirements: 'Add a report item to the designer area.',
22
+ description: 'Display the barcode lines as report item.',
23
+ title: '2D Barcode'
24
+ }
25
+ }];
Binary file
Binary file
@@ -0,0 +1,290 @@
1
+ var EJQRBarcode = (function () {
2
+ function EJQRBarcode(rptDesigner) {
3
+ this.customJSON = null;
4
+ this.rootElement = null;
5
+ this.customItemDiv = null;
6
+ this.reportDesigner = null;
7
+ this.loaderDiv = null;
8
+ this.errMsgDiv = null;
9
+ this.reportDesigner = rptDesigner;
10
+ }
11
+ EJQRBarcode.prototype.initializeItem = function (args) {
12
+ args.isBuildInService = true;
13
+ args.defaultHeight = 160;
14
+ args.defaultWidth = 160;
15
+ args.minimumHeight = 15;
16
+ args.minimumWidth = 90;
17
+ args.renderCallback = $.proxy(this.renderData, this);
18
+ args.loadingCallback = $.proxy(this.showIndicator, this);
19
+ };
20
+ EJQRBarcode.prototype.renderItem = function (customJson, target) {
21
+ this.customJSON = customJson;
22
+ this.rootElement = target;
23
+ this.renderBarcode();
24
+ };
25
+ EJQRBarcode.prototype.renderBarcode = function () {
26
+ this.customItemDiv = ej.buildTag('div.customitem', '', {
27
+ 'width': '100%',
28
+ 'height': '100%',
29
+ 'border': '1pt dotted gray',
30
+ 'box-sizing': 'border-box',
31
+ '-moz-box-sizing': 'border-box',
32
+ '-webkit-box-sizing': 'border-box',
33
+ 'overflow': 'hidden', 'position': 'absolute'
34
+ }, {
35
+ 'id': this.customJSON.Name + '_customItem'
36
+ });
37
+ var loaderDiv = this.loaderDiv = ej.buildTag('div.e-rptdesigner-loaderDiv', '', {
38
+ 'width': '100%', 'height': '100%', 'display': 'none', 'opacity': '0.9',
39
+ 'position': 'absolute', 'border': '0.5px dotted black',
40
+ 'background-color': 'white',
41
+ 'z-index': '4000', 'overflow': 'hidden'
42
+ });
43
+ var spinnerDiv = ej.buildTag('div.e-rptdesigner-spinnerDiv', '', {
44
+ 'border': '5px solid #f3f3f3',
45
+ 'border-radius': '50%', 'margin': '-17.5px 0 0 -17.5px',
46
+ 'border-top': '5px solid #3498db',
47
+ '-webkit-animation': 'spin 2s linear infinite',
48
+ 'animation': 'spin 2s linear infinite',
49
+ 'background': 'transparent',
50
+ 'position': 'absolute',
51
+ 'left': '50%',
52
+ 'top': '50%',
53
+ 'cursor': 'default',
54
+ 'height': '25px',
55
+ 'width': '25px'
56
+ });
57
+ var errorRootDiv = this.errMsgDiv = ej.buildTag('div', '', {
58
+ 'display': 'none', 'position': 'relative', 'z-index': '3000',
59
+ 'font-family': 'Segoe UI', 'font-size': '13px', 'height': '100%', 'width': '100%'
60
+ });
61
+ var errorDiv = ej.buildTag('div', 'Failed to load barcode', {
62
+ 'display': 'table-cell', 'overflow': 'hidden', 'font-family': 'Segoe UI',
63
+ 'font-size': '13px', 'vertical-align': 'middle', 'text-align': 'center'
64
+ });
65
+ this.rootElement.append(loaderDiv);
66
+ loaderDiv.append(spinnerDiv);
67
+ errorRootDiv.append(errorDiv);
68
+ this.customItemDiv.append(errorRootDiv);
69
+ this.rootElement.append(this.customItemDiv);
70
+ };
71
+ EJQRBarcode.prototype.onPropertyChange = function (name, oldValue, newValue) {
72
+ var args = [];
73
+ for (var _i = 3; _i < arguments.length; _i++) {
74
+ args[_i - 3] = arguments[_i];
75
+ }
76
+ switch (name) {
77
+ case 'BarcodeType':
78
+ newValue = this.setBarcodeType(newValue);
79
+ this.updatePropertyVal(name, newValue);
80
+ break;
81
+ case 'BarcodeValue':
82
+ this.updatePropertyVal(name, newValue);
83
+ break;
84
+ case 'DisplayBarcodeText':
85
+ this.updatePropertyVal(name, (newValue === true) ? 'true' : 'false');
86
+ }
87
+ };
88
+ EJQRBarcode.prototype.onPositionChanged = function (top, left) {
89
+ };
90
+ EJQRBarcode.prototype.onSizeChanged = function (height, width) {
91
+ if (!ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) {
92
+ this.customItemDiv.css({
93
+ width: width,
94
+ height: height
95
+ });
96
+ }
97
+ else if (!ej.isNullOrUndefined(height) && ej.isNullOrUndefined(width)) {
98
+ this.customItemDiv.css({
99
+ height: height
100
+ });
101
+ }
102
+ else if (ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) {
103
+ this.customItemDiv.css({
104
+ width: width
105
+ });
106
+ }
107
+ };
108
+ EJQRBarcode.prototype.getPropertyGridItems = function () {
109
+ var propertyItems = {
110
+ 'HeaderText': this.customJSON.Name,
111
+ 'PropertyType': 'qrbarcode',
112
+ 'SubType': 'qrbarcode',
113
+ 'IsEditHeader': true,
114
+ 'Items': [{
115
+ 'CategoryId': 'basicsettings',
116
+ 'DisplayName': this.getLocale('categoryBasicSettings'),
117
+ 'IsExpand': true,
118
+ 'Items': [
119
+ {
120
+ 'ItemId': 'barcodetype',
121
+ 'Name': 'BarcodeType',
122
+ 'DisplayName': this.getLocale('BarcodeType'),
123
+ 'Value': this.getBarcodeType(this.getPropertyVal('BarcodeType')),
124
+ 'ItemType': 'DropDown',
125
+ 'EnableExpression': false,
126
+ 'ValueList': ['QR Barcode', 'Data Matrix', 'PDF417']
127
+ },
128
+ {
129
+ 'ItemId': 'barcodevalue',
130
+ 'Name': 'BarcodeValue',
131
+ 'DisplayName': this.getLocale('barcodeValue'),
132
+ 'EnableExpression': true,
133
+ 'Value': this.getPropertyVal('BarcodeValue'),
134
+ 'ItemType': 'TextBox'
135
+ },
136
+ {
137
+ 'ItemId': 'displaybarcodetext',
138
+ 'Name': 'DisplayBarcodeText',
139
+ 'DisplayName': this.getLocale('displayText'),
140
+ 'Value': this.isDisplayText() ? true : false,
141
+ 'ItemType': 'Bool',
142
+ 'EnableExpression': false,
143
+ 'IsVisible': false
144
+ }
145
+ ]
146
+ }
147
+ ]
148
+ };
149
+ return propertyItems;
150
+ };
151
+ EJQRBarcode.prototype.getPropertyVal = function (name) {
152
+ if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
153
+ for (var index = 0; index < this.customJSON.CustomProperties.length; index++) {
154
+ if (this.customJSON.CustomProperties[index].Name === name) {
155
+ return this.customJSON.CustomProperties[index].Value;
156
+ }
157
+ }
158
+ }
159
+ return null;
160
+ };
161
+ EJQRBarcode.prototype.getBarcodeType = function (type) {
162
+ switch (type.toLowerCase()) {
163
+ case 'qrbarcode': return 'QR Barcode';
164
+ case 'datamatrix': return 'Data Matrix';
165
+ case 'pdf417': return 'PDF417';
166
+ }
167
+ return type;
168
+ };
169
+ EJQRBarcode.prototype.setBarcodeType = function (type) {
170
+ switch (type.toLowerCase()) {
171
+ case 'qr barcode': return 'QRBarcode';
172
+ case 'data matrix': return 'DataMatrix';
173
+ case 'pdf417': return 'PDF417';
174
+ }
175
+ return type;
176
+ };
177
+ EJQRBarcode.prototype.setPropertyVal = function (name, val) {
178
+ if (this.customJSON.CustomProperties === null) {
179
+ this.customJSON.CustomProperties = [];
180
+ }
181
+ this.customJSON.CustomProperties.push(new ej.ReportModel.CustomProperty(name, val));
182
+ };
183
+ EJQRBarcode.prototype.updatePropertyVal = function (propertyName, value) {
184
+ if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
185
+ for (var index = 0; index < this.customJSON.CustomProperties.length; index++) {
186
+ if (this.customJSON.CustomProperties[index].Name === propertyName) {
187
+ this.customJSON.CustomProperties[index].Value = value;
188
+ }
189
+ }
190
+ }
191
+ };
192
+ EJQRBarcode.prototype.getReportItemJson = function () {
193
+ if (this.customJSON === null) {
194
+ this.customJSON = new ej.ReportModel.CustomReportItem().getModel();
195
+ this.setPropertyVal('BarcodeValue', '00000');
196
+ this.setPropertyVal('BarcodeType', 'QRBarcode');
197
+ this.setPropertyVal('DisplayBarcodeText', 'true');
198
+ }
199
+ return this.customJSON;
200
+ };
201
+ EJQRBarcode.prototype.setReportItemJson = function (reportItem) {
202
+ this.customJSON = reportItem;
203
+ };
204
+ EJQRBarcode.prototype.dispose = function () {
205
+ };
206
+ EJQRBarcode.prototype.isDisplayText = function () {
207
+ return (this.getPropertyVal('DisplayBarcodeText').toLowerCase()) === 'true';
208
+ };
209
+ EJQRBarcode.prototype.getLocale = function (text) {
210
+ var barcodeLocale;
211
+ var defaultLocale = EJQRBarcode.Locale['en-US'];
212
+ if (this.reportDesigner && !ej.isNullOrUndefined(this.reportDesigner.model) &&
213
+ !ej.isNullOrUndefined(EJQRBarcode.Locale[this.reportDesigner.model.locale])) {
214
+ barcodeLocale = EJQRBarcode.Locale[this.reportDesigner.model.locale];
215
+ }
216
+ else {
217
+ barcodeLocale = defaultLocale;
218
+ }
219
+ switch (text.toLowerCase()) {
220
+ case 'barcodetype':
221
+ if (barcodeLocale && barcodeLocale.barcodeType) {
222
+ return barcodeLocale.barcodeType;
223
+ }
224
+ return defaultLocale.barcodeType;
225
+ case 'barcodevalue':
226
+ if (barcodeLocale && barcodeLocale.barcodeValue) {
227
+ return barcodeLocale.barcodeValue;
228
+ }
229
+ return defaultLocale.barcodeValue;
230
+ case 'displaytext':
231
+ if (barcodeLocale && barcodeLocale.textVisibility) {
232
+ return barcodeLocale.textVisibility;
233
+ }
234
+ return defaultLocale.textVisibility;
235
+ case 'categorybasicsettings':
236
+ if (barcodeLocale && barcodeLocale.categoryBasicSettings) {
237
+ return barcodeLocale.categoryBasicSettings;
238
+ }
239
+ return defaultLocale.categoryBasicSettings;
240
+ }
241
+ return text;
242
+ };
243
+ EJQRBarcode.prototype.renderData = function (args) {
244
+ this.customItemDiv.css('background-image', 'none');
245
+ if (args && args.data && typeof args.data === 'string' && args.data.indexOf('Sf_Exception') !== -1) {
246
+ this.errMsgDiv.css('display', 'table');
247
+ this.errMsgDiv.find('div').text('Failed to load barcode - ' + args.data.replace('Sf_Exception - ', ''));
248
+ }
249
+ else if (args.isLoaded && args.data) {
250
+ this.errMsgDiv.css('display', 'none');
251
+ this.customItemDiv.css({
252
+ 'background-image': 'url(data:image/BMP;base64,' + args.data + ')',
253
+ 'background-size': '100% 100%',
254
+ 'background-repeat': 'no-repeat',
255
+ 'background-position': 'left top'
256
+ });
257
+ }
258
+ else {
259
+ this.errMsgDiv.css('display', 'table');
260
+ this.errMsgDiv.find('div').text('Failed to load barcode');
261
+ }
262
+ };
263
+ EJQRBarcode.prototype.showIndicator = function (isShow) {
264
+ this.loaderDiv.css('display', isShow ? 'block' : 'none');
265
+ };
266
+ return EJQRBarcode;
267
+ }());
268
+ EJQRBarcode.Locale = {};
269
+ EJQRBarcode.Locale['en-US'] = {
270
+ barcodeType: 'Symbology Type',
271
+ barcodeValue: 'Text',
272
+ textVisibility: 'Text Visibility',
273
+ categoryBasicSettings: 'Basic Settings',
274
+ toolTip: {
275
+ requirements: 'Display any barcode type.',
276
+ description: 'Displays the barcodes.',
277
+ title: 'QRBarcode'
278
+ }
279
+ };
280
+ EJQRBarcode.Locale['fr-FR'] = {
281
+ barcodeType: 'Type de symbologie',
282
+ barcodeValue: 'Texte',
283
+ textVisibility: 'Visibilite du texte',
284
+ categoryBasicSettings: 'Paramètres de base',
285
+ toolTip: {
286
+ requirements: 'Afficher n\'importe quel type de code à barres.',
287
+ description: 'Affiche les codes barres.',
288
+ title: 'QRBarcode'
289
+ }
290
+ };
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@boldreports/javascript-reporting-extensions",
3
+ "version": "3.1.101",
4
+ "description": "javascript-reporting-extensions",
5
+ "keywords": [
6
+ "syncfusion",
7
+ "bold reports",
8
+ "javascript",
9
+ "extension",
10
+ "barcode reportitem",
11
+ "businessobject data",
12
+ "psql",
13
+ "qrbarcode",
14
+ "boldReportViewer",
15
+ "JavaScript ReportViewer",
16
+ "Angular ReportViewer",
17
+ "reporting tools",
18
+ "ssrs report viewer",
19
+ "ssrs report designer",
20
+ "export report",
21
+ "report editor",
22
+ "report builder",
23
+ "rdl",
24
+ "rdlc"
25
+ ],
26
+ "author": "Syncfusion Inc",
27
+ "license": "SEE LICENSE IN README.md",
28
+ "dependencies": {},
29
+ "bugs": {
30
+ "url": "https://github.com/bold-reports/react-reporting-components/issues"
31
+ },
32
+ "homepage": "https://boldreports.com/"
33
+ }