@boldreports/javascript-reporting-extensions 5.4.25 → 5.4.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,7 +14,7 @@ For complete `Bold Reports JavaScript` documentation, please visit [https://help
14
14
 
15
15
  ### Offline Demos
16
16
 
17
- Download our JavaScript Reporting Platform installer from [here](https://www.boldreports.com/pricing/).
17
+ Download our JavaScript Reporting Platform installer from [here](https://www.boldreports.com/pricing/?utm_source=npm&utm_medium=listing&utm_campaign=boldreports-extensions-npm).
18
18
 
19
19
  ## Support
20
20
 
@@ -1,13 +1,28 @@
1
- .customitem-barcode {
1
+ .e-rptdesigner-designarea.e-waitingpopup .customitem-barcode {
2
+ background-image: url('images/barcode.png');
3
+ }
4
+
5
+ .e-rptdesigner-designarea.e-waitingpopup .customitem-qrbarcode {
6
+ background-image: url('images/qrbarcode.png');
7
+ }
8
+
9
+ .e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-barcode {
2
10
  background-image: url('images/barcode.svg');
3
11
  }
4
12
 
5
- .customitem-qrbarcode {
13
+ .e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-qrbarcode {
6
14
  background-image: url('images/qrbarcode.svg');
7
15
  }
8
16
 
9
- .customitem-barcode,
10
- .customitem-qrbarcode {
17
+ .e-rptdesigner-designarea.e-waitingpopup .customitem-barcode,
18
+ .e-rptdesigner-designarea.e-waitingpopup .customitem-qrbarcode {
19
+ background-position: 50% 50%;
20
+ background-repeat: no-repeat;
21
+ height: 25px;
22
+ }
23
+
24
+ .e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-barcode,
25
+ .e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-qrbarcode {
11
26
  background-repeat: no-repeat;
12
27
  height: 42px;
13
28
  background-position: center;
@@ -16,7 +31,7 @@
16
31
  .e-rptdesigner-itempanel-dragelements .customitem-barcode,
17
32
  .e-rptdesigner-itempanel-dragelements .customitem-qrbarcode {
18
33
  margin-top: 0px !important;
19
- height: 100%;
34
+ height: 100% !important;
20
35
  }
21
36
 
22
37
  .e-rptdesigner-loaderDiv .e-rptdesigner-spinnerDiv {
@@ -84,6 +84,8 @@ var EJBarcode = (function () {
84
84
  this.updatePropertyVal(name, (newValue === true) ? 'true' : 'false');
85
85
  }
86
86
  };
87
+ EJBarcode.prototype.updatePropertyUIValue = function (name, value) {
88
+ };
87
89
  EJBarcode.prototype.onPositionChanged = function (top, left) {
88
90
  };
89
91
  EJBarcode.prototype.onSizeChanged = function (height, width) {
@@ -113,13 +115,13 @@ var EJBarcode = (function () {
113
115
  'IsEditHeader': true,
114
116
  'Items': [{
115
117
  'CategoryId': 'basicsettings',
116
- 'DisplayName': this.getLocale('categoryBasicSettings'),
118
+ 'DisplayName': 'categoryBasicSettings',
117
119
  'IsExpand': true,
118
120
  'Items': [
119
121
  {
120
122
  'ItemId': 'barcodetype',
121
123
  'Name': 'BarcodeType',
122
- 'DisplayName': this.getLocale('BarcodeType'),
124
+ 'DisplayName': 'BarcodeType',
123
125
  'Value': barCodeType,
124
126
  'ItemType': 'DropDown',
125
127
  'EnableExpression': false,
@@ -130,7 +132,7 @@ var EJBarcode = (function () {
130
132
  {
131
133
  'ItemId': 'barcodevalue',
132
134
  'Name': 'BarcodeValue',
133
- 'DisplayName': this.getLocale('barcodeValue'),
135
+ 'DisplayName': 'barcodeValue',
134
136
  'EnableExpression': true,
135
137
  'Value': this.getPropertyVal('BarcodeValue'),
136
138
  'ItemType': 'TextBox'
@@ -138,7 +140,7 @@ var EJBarcode = (function () {
138
140
  {
139
141
  'ItemId': 'displaybarcodetext',
140
142
  'Name': 'DisplayBarcodeText',
141
- 'DisplayName': this.getLocale('displayText'),
143
+ 'DisplayName': 'displayText',
142
144
  'Value': this.isDisplayText() ? true : false,
143
145
  'ItemType': 'Bool',
144
146
  'EnableExpression': false
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boldreports/javascript-reporting-extensions",
3
- "version": "5.4.25",
3
+ "version": "5.4.30",
4
4
  "description": "The Bold Reports Extensions by Syncfusion contains scripts and themes for barcode report item to be integrated in JavaScript Report Viewer and JavaScript Report Designer for enterprise web development(HTML5)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,12 +1,14 @@
1
1
  var EJQRBarcode = (function () {
2
2
  function EJQRBarcode(rptDesigner) {
3
3
  this.customJSON = null;
4
+ this.propertyPanel = null;
4
5
  this.rootElement = null;
5
6
  this.customItemDiv = null;
6
7
  this.reportDesigner = null;
7
8
  this.loaderDiv = null;
8
9
  this.errMsgDiv = null;
9
10
  this.reportDesigner = rptDesigner;
11
+ this.propertyPanel = this.reportDesigner.getInstance('PropertyPanel');
10
12
  }
11
13
  EJQRBarcode.prototype.initializeItem = function (args) {
12
14
  args.isBuildInService = true;
@@ -77,12 +79,51 @@ var EJQRBarcode = (function () {
77
79
  case 'BarcodeType':
78
80
  newValue = this.setBarcodeType(newValue);
79
81
  this.updatePropertyVal(name, newValue);
82
+ if (!this.reportDesigner.undoManager.isPerformAction) {
83
+ var baseInstance = this.rootElement.data('CustomItem');
84
+ var correctionOldVal = this.getPropertyVal('CorrectionLevel');
85
+ baseInstance.updatePropertyChange(this.getCorrectionId(oldValue), correctionOldVal, null);
86
+ var correctionId = this.getCorrectionId(newValue);
87
+ if (correctionId) {
88
+ var correctionNewVal = this.getCorrectionVal(newValue);
89
+ baseInstance.updatePropertyChange(this.getCorrectionId(newValue), null, correctionNewVal);
90
+ this.updatePropertyUIValue(correctionId, correctionNewVal);
91
+ }
92
+ }
80
93
  break;
81
94
  case 'BarcodeValue':
82
95
  this.updatePropertyVal(name, newValue);
83
96
  break;
84
97
  case 'DisplayBarcodeText':
85
98
  this.updatePropertyVal(name, (newValue === true) ? 'true' : 'false');
99
+ break;
100
+ case 'QrcodeCorrectionLevel':
101
+ newValue = this.getQrErrCorrLevel(newValue);
102
+ this.updatePropertyVal('CorrectionLevel', newValue);
103
+ break;
104
+ case 'Pdf417CorrectionLevel':
105
+ newValue = this.getPdfErrCorrLevel(newValue);
106
+ this.updatePropertyVal('CorrectionLevel', newValue);
107
+ break;
108
+ }
109
+ };
110
+ EJQRBarcode.prototype.updatePropertyUIValue = function (name, value) {
111
+ var customId = this.customJSON.UniqueId;
112
+ switch (name) {
113
+ case 'BarcodeType':
114
+ this.propertyPanel.updatePropertyUIValue('barcodetype', value, customId);
115
+ break;
116
+ case 'BarcodeValue':
117
+ this.propertyPanel.updatePropertyUIValue('barcodevalue', value, customId);
118
+ break;
119
+ case 'DisplayBarcodeText':
120
+ this.propertyPanel.updatePropertyUIValue('displaybarcodetext', value, customId);
121
+ break;
122
+ case 'QrcodeCorrectionLevel':
123
+ this.propertyPanel.updatePropertyUIValue('qrerrcorrlevel', value, customId);
124
+ break;
125
+ case 'Pdf417CorrectionLevel':
126
+ this.propertyPanel.updatePropertyUIValue('pdferrcorrlevel', value, customId);
86
127
  }
87
128
  };
88
129
  EJQRBarcode.prototype.onPositionChanged = function (top, left) {
@@ -113,22 +154,39 @@ var EJQRBarcode = (function () {
113
154
  'IsEditHeader': true,
114
155
  'Items': [{
115
156
  'CategoryId': 'basicsettings',
116
- 'DisplayName': this.getLocale('categoryBasicSettings'),
157
+ 'DisplayName': 'categoryBasicSettings',
117
158
  'IsExpand': true,
118
159
  'Items': [
119
160
  {
120
161
  'ItemId': 'barcodetype',
121
162
  'Name': 'BarcodeType',
122
- 'DisplayName': this.getLocale('BarcodeType'),
163
+ 'DisplayName': 'BarcodeType',
123
164
  'Value': this.getBarcodeType(this.getPropertyVal('BarcodeType')),
124
165
  'ItemType': 'DropDown',
125
166
  'EnableExpression': false,
167
+ 'DependentItems': [
168
+ {
169
+ 'EnableItems': ['basicsettings_qrerrcorrlevel'],
170
+ 'DisableItems': ['basicsettings_pdferrcorrlevel'],
171
+ 'Value': ['QR Barcode']
172
+ },
173
+ {
174
+ 'EnableItems': ['basicsettings_pdferrcorrlevel'],
175
+ 'DisableItems': ['basicsettings_qrerrcorrlevel'],
176
+ 'Value': ['PDF417']
177
+ },
178
+ {
179
+ 'EnableItems': [],
180
+ 'DisableItems': ['basicsettings_qrerrcorrlevel', 'basicsettings_pdferrcorrlevel'],
181
+ 'Value': ['Data Matrix']
182
+ }
183
+ ],
126
184
  'ValueList': ['QR Barcode', 'Data Matrix', 'PDF417']
127
185
  },
128
186
  {
129
187
  'ItemId': 'barcodevalue',
130
188
  'Name': 'BarcodeValue',
131
- 'DisplayName': this.getLocale('barcodeValue'),
189
+ 'DisplayName': 'barcodeValue',
132
190
  'EnableExpression': true,
133
191
  'Value': this.getPropertyVal('BarcodeValue'),
134
192
  'ItemType': 'TextBox'
@@ -136,11 +194,31 @@ var EJQRBarcode = (function () {
136
194
  {
137
195
  'ItemId': 'displaybarcodetext',
138
196
  'Name': 'DisplayBarcodeText',
139
- 'DisplayName': this.getLocale('displayText'),
197
+ 'DisplayName': 'displayText',
140
198
  'Value': this.isDisplayText() ? true : false,
141
199
  'ItemType': 'Bool',
142
200
  'EnableExpression': false,
143
201
  'IsVisible': false
202
+ },
203
+ {
204
+ 'ItemId': 'qrerrcorrlevel',
205
+ 'Name': 'QrcodeCorrectionLevel',
206
+ 'DisplayName': 'correctionLabel',
207
+ 'Value': this.getQrErrCorrLevel(this.getPropertyVal('CorrectionLevel')),
208
+ 'ParentId': 'basicsettings_barcodetype',
209
+ 'ItemType': 'DropDown',
210
+ 'EnableExpression': false,
211
+ 'ValueList': this.getQrcodeCorrectionLevel()
212
+ },
213
+ {
214
+ 'ItemId': 'pdferrcorrlevel',
215
+ 'Name': 'Pdf417CorrectionLevel',
216
+ 'DisplayName': 'correctionLabel',
217
+ 'Value': this.getPdfErrCorrLevel(this.getPropertyVal('CorrectionLevel')),
218
+ 'ParentId': 'basicsettings_barcodetype',
219
+ 'ItemType': 'DropDown',
220
+ 'EnableExpression': false,
221
+ 'ValueList': this.getPDF417CorrectionLevel()
144
222
  }
145
223
  ]
146
224
  }
@@ -158,6 +236,56 @@ var EJQRBarcode = (function () {
158
236
  }
159
237
  return null;
160
238
  };
239
+ EJQRBarcode.prototype.getPDF417CorrectionLevel = function () {
240
+ return [
241
+ {
242
+ text: 'auto', value: 'Auto'
243
+ },
244
+ {
245
+ text: 'level0', value: 'Level0'
246
+ },
247
+ {
248
+ text: 'level1', value: 'Level1'
249
+ },
250
+ {
251
+ text: 'level2', value: 'Level2'
252
+ },
253
+ {
254
+ text: 'level3', value: 'Level3'
255
+ },
256
+ {
257
+ text: 'level4', value: 'Level4'
258
+ },
259
+ {
260
+ text: 'level5', value: 'Level5'
261
+ },
262
+ {
263
+ text: 'level6', value: 'Level6'
264
+ },
265
+ {
266
+ text: 'level7', value: 'Level7'
267
+ },
268
+ {
269
+ text: 'level8', value: 'Level8'
270
+ }
271
+ ];
272
+ };
273
+ EJQRBarcode.prototype.getQrcodeCorrectionLevel = function () {
274
+ return [
275
+ {
276
+ text: 'low', value: 'Low'
277
+ },
278
+ {
279
+ text: 'medium', value: 'Medium'
280
+ },
281
+ {
282
+ text: 'quartile', value: 'Quartile'
283
+ },
284
+ {
285
+ text: 'high', value: 'High'
286
+ }
287
+ ];
288
+ };
161
289
  EJQRBarcode.prototype.getBarcodeType = function (type) {
162
290
  switch (type.toLowerCase()) {
163
291
  case 'qrbarcode': return 'QR Barcode';
@@ -166,14 +294,57 @@ var EJQRBarcode = (function () {
166
294
  }
167
295
  return type;
168
296
  };
297
+ EJQRBarcode.prototype.getQrErrCorrLevel = function (level) {
298
+ var errLvl = level ? level.toLowerCase() : '';
299
+ switch (errLvl) {
300
+ case 'low': return 'Low';
301
+ case 'medium': return 'Medium';
302
+ case 'quartile': return 'Quartile';
303
+ case 'high': return 'High';
304
+ }
305
+ return 'Low';
306
+ };
307
+ EJQRBarcode.prototype.getPdfErrCorrLevel = function (level) {
308
+ var errLvl = level ? level.toLowerCase() : '';
309
+ switch (errLvl) {
310
+ case 'auto': return 'Auto';
311
+ case 'level0': return 'Level0';
312
+ case 'level1': return 'Level1';
313
+ case 'level2': return 'Level2';
314
+ case 'level3': return 'Level3';
315
+ case 'level4': return 'Level4';
316
+ case 'level5': return 'Level5';
317
+ case 'level6': return 'Level6';
318
+ case 'level7': return 'Level7';
319
+ case 'level8': return 'Level8';
320
+ }
321
+ return 'Auto';
322
+ };
169
323
  EJQRBarcode.prototype.setBarcodeType = function (type) {
170
- switch (type.toLowerCase()) {
171
- case 'qr barcode': return 'QRBarcode';
172
- case 'data matrix': return 'DataMatrix';
324
+ var barcodeType = type.replace(/\s+/g, '');
325
+ switch (barcodeType.toLowerCase()) {
326
+ case 'qrbarcode': return 'QRBarcode';
327
+ case 'datamatrix': return 'DataMatrix';
173
328
  case 'pdf417': return 'PDF417';
174
329
  }
175
330
  return type;
176
331
  };
332
+ EJQRBarcode.prototype.getCorrectionVal = function (type) {
333
+ var barcodeType = type.replace(/\s+/g, '');
334
+ switch (barcodeType.toLowerCase()) {
335
+ case 'qrbarcode': return this.getQrcodeCorrectionLevel()[0].value;
336
+ case 'pdf417': return this.getPDF417CorrectionLevel()[0].value;
337
+ }
338
+ return null;
339
+ };
340
+ EJQRBarcode.prototype.getCorrectionId = function (type) {
341
+ var barcodeType = type.replace(/\s+/g, '');
342
+ switch (barcodeType.toLowerCase()) {
343
+ case 'qrbarcode': return 'QrcodeCorrectionLevel';
344
+ case 'pdf417': return 'Pdf417CorrectionLevel';
345
+ }
346
+ return null;
347
+ };
177
348
  EJQRBarcode.prototype.setPropertyVal = function (name, val) {
178
349
  if (this.customJSON.CustomProperties === null) {
179
350
  this.customJSON.CustomProperties = [];
@@ -185,6 +356,7 @@ var EJQRBarcode = (function () {
185
356
  for (var index = 0; index < this.customJSON.CustomProperties.length; index++) {
186
357
  if (this.customJSON.CustomProperties[index].Name === propertyName) {
187
358
  this.customJSON.CustomProperties[index].Value = value;
359
+ break;
188
360
  }
189
361
  }
190
362
  }
@@ -195,6 +367,7 @@ var EJQRBarcode = (function () {
195
367
  this.setPropertyVal('BarcodeValue', '00000');
196
368
  this.setPropertyVal('BarcodeType', 'QRBarcode');
197
369
  this.setPropertyVal('DisplayBarcodeText', 'true');
370
+ this.setPropertyVal('CorrectionLevel', 'Low');
198
371
  }
199
372
  return this.customJSON;
200
373
  };
@@ -237,6 +410,81 @@ var EJQRBarcode = (function () {
237
410
  return barcodeLocale.categoryBasicSettings;
238
411
  }
239
412
  return defaultLocale.categoryBasicSettings;
413
+ case 'correctionlabel':
414
+ if (barcodeLocale && barcodeLocale.correctionLabel) {
415
+ return barcodeLocale.correctionLabel;
416
+ }
417
+ return defaultLocale.correctionLabel;
418
+ case 'low':
419
+ if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.low) {
420
+ return barcodeLocale.qrcodeCorrectionLevel.low;
421
+ }
422
+ return defaultLocale.qrcodeCorrectionLevel.low;
423
+ case 'medium':
424
+ if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.medium) {
425
+ return barcodeLocale.qrcodeCorrectionLevel.medium;
426
+ }
427
+ return defaultLocale.qrcodeCorrectionLevel.medium;
428
+ case 'quartile':
429
+ if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.quartile) {
430
+ return barcodeLocale.qrcodeCorrectionLevel.quartile;
431
+ }
432
+ return defaultLocale.qrcodeCorrectionLevel.quartile;
433
+ case 'high':
434
+ if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.high) {
435
+ return barcodeLocale.qrcodeCorrectionLevel.high;
436
+ }
437
+ return defaultLocale.qrcodeCorrectionLevel.high;
438
+ case 'level0':
439
+ if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level0) {
440
+ return barcodeLocale.pdf417CorrectionLevel.level0;
441
+ }
442
+ return defaultLocale.pdf417CorrectionLevel.level0;
443
+ case 'level1':
444
+ if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level1) {
445
+ return barcodeLocale.pdf417CorrectionLevel.level1;
446
+ }
447
+ return defaultLocale.pdf417CorrectionLevel.level1;
448
+ case 'level2':
449
+ if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level2) {
450
+ return barcodeLocale.pdf417CorrectionLevel.level2;
451
+ }
452
+ return defaultLocale.pdf417CorrectionLevel.level2;
453
+ case 'level3':
454
+ if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level3) {
455
+ return barcodeLocale.pdf417CorrectionLevel.level3;
456
+ }
457
+ return defaultLocale.pdf417CorrectionLevel.level3;
458
+ case 'level4':
459
+ if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level4) {
460
+ return barcodeLocale.pdf417CorrectionLevel.level4;
461
+ }
462
+ return defaultLocale.pdf417CorrectionLevel.level4;
463
+ case 'level5':
464
+ if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level5) {
465
+ return barcodeLocale.pdf417CorrectionLevel.level5;
466
+ }
467
+ return defaultLocale.pdf417CorrectionLevel.level5;
468
+ case 'level6':
469
+ if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level6) {
470
+ return barcodeLocale.pdf417CorrectionLevel.level6;
471
+ }
472
+ return defaultLocale.pdf417CorrectionLevel.level6;
473
+ case 'level7':
474
+ if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level7) {
475
+ return barcodeLocale.pdf417CorrectionLevel.level7;
476
+ }
477
+ return defaultLocale.pdf417CorrectionLevel.level7;
478
+ case 'level8':
479
+ if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level8) {
480
+ return barcodeLocale.pdf417CorrectionLevel.level8;
481
+ }
482
+ return defaultLocale.pdf417CorrectionLevel.level8;
483
+ case 'auto':
484
+ if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.auto) {
485
+ return barcodeLocale.pdf417CorrectionLevel.auto;
486
+ }
487
+ return defaultLocale.pdf417CorrectionLevel.auto;
240
488
  }
241
489
  return text;
242
490
  };
@@ -275,6 +523,25 @@ EJQRBarcode.Locale['en-US'] = {
275
523
  requirements: 'Display any barcode type.',
276
524
  description: 'Displays the barcodes.',
277
525
  title: 'QRBarcode'
526
+ },
527
+ correctionLabel: 'Correction Level',
528
+ qrcodeCorrectionLevel: {
529
+ low: 'Low',
530
+ medium: 'Medium',
531
+ quartile: 'Quartile',
532
+ high: 'High'
533
+ },
534
+ pdf417CorrectionLevel: {
535
+ auto: 'Auto',
536
+ level0: 'Level0',
537
+ level1: 'Level1',
538
+ level2: 'Level2',
539
+ level3: 'Level3',
540
+ level4: 'Level4',
541
+ level5: 'Level5',
542
+ level6: 'Level6',
543
+ level7: 'Level7',
544
+ level8: 'Level8',
278
545
  }
279
546
  };
280
547
  EJQRBarcode.Locale['fr-FR'] = {
@@ -286,5 +553,24 @@ EJQRBarcode.Locale['fr-FR'] = {
286
553
  requirements: 'Afficher n\'importe quel type de code à barres.',
287
554
  description: 'Affiche les codes barres.',
288
555
  title: 'QRBarcode'
556
+ },
557
+ correctionLabel: 'Niveau de correction',
558
+ qrcodeCorrectionLevel: {
559
+ low: 'Faible',
560
+ medium: 'Moyen',
561
+ quartile: 'Quartile',
562
+ high: 'Haut'
563
+ },
564
+ pdf417CorrectionLevel: {
565
+ auto: 'Auto',
566
+ level0: 'Niveau0',
567
+ level1: 'Niveau1',
568
+ level2: 'Niveau2',
569
+ level3: 'Niveau3',
570
+ level4: 'Niveau4',
571
+ level5: 'Niveau5',
572
+ level6: 'Niveau6',
573
+ level7: 'Niveau7',
574
+ level8: 'Niveau8',
289
575
  }
290
576
  };