@boldreports/javascript-reporting-extensions 11.1.21 → 12.1.13
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.
|
@@ -43,9 +43,8 @@ var EJHtmlDocument = (function () {
|
|
|
43
43
|
if (typeof newValue === 'string') {
|
|
44
44
|
this.updatePropertyVal(name, newValue);
|
|
45
45
|
}
|
|
46
|
-
else
|
|
47
|
-
|
|
48
|
-
newValue.name ? this.updatePropertyVal('DocumentName', newValue.name) : this.updatePropertyVal('DocumentName', '');
|
|
46
|
+
else {
|
|
47
|
+
this.setFileName(newValue);
|
|
49
48
|
}
|
|
50
49
|
break;
|
|
51
50
|
case 'Sizing':
|
|
@@ -54,7 +53,6 @@ var EJHtmlDocument = (function () {
|
|
|
54
53
|
case 'Source':
|
|
55
54
|
this.updatePropertyVal(name, newValue);
|
|
56
55
|
this.updatePropertyVal('DocumentValue', '');
|
|
57
|
-
this.updatePropertyVal('DocumentName', '');
|
|
58
56
|
this.updatePropertyUIValue('DocumentValue', '');
|
|
59
57
|
break;
|
|
60
58
|
}
|
|
@@ -74,7 +72,7 @@ var EJHtmlDocument = (function () {
|
|
|
74
72
|
this.propertyPanel.updatePropertyUIValue('htmldatabase', value, customId);
|
|
75
73
|
}
|
|
76
74
|
else {
|
|
77
|
-
this.propertyPanel.updatePropertyUIValue('htmlserver', value, customId);
|
|
75
|
+
this.propertyPanel.updatePropertyUIValue('htmlserver', { FilePath: value }, customId);
|
|
78
76
|
}
|
|
79
77
|
break;
|
|
80
78
|
}
|
|
@@ -169,9 +167,11 @@ var EJHtmlDocument = (function () {
|
|
|
169
167
|
'Name': 'DocumentValue',
|
|
170
168
|
'ParentId': 'basicsettings_htmlsource',
|
|
171
169
|
'DisplayName': 'server',
|
|
172
|
-
'Value': this.
|
|
173
|
-
'ItemType': '
|
|
174
|
-
'
|
|
170
|
+
'Value': this.getFileName(),
|
|
171
|
+
'ItemType': 'LinkReport',
|
|
172
|
+
'EnableExpression': false,
|
|
173
|
+
'BrowseType': 'File',
|
|
174
|
+
'ExtType': 'html'
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
'ItemId': 'htmlsizing',
|
|
@@ -196,6 +196,14 @@ var EJHtmlDocument = (function () {
|
|
|
196
196
|
baseProperties.Items = $.merge(itemProperties, baseProperties.Items);
|
|
197
197
|
return baseProperties;
|
|
198
198
|
};
|
|
199
|
+
EJHtmlDocument.prototype.getFileName = function () {
|
|
200
|
+
return {
|
|
201
|
+
FilePath: this.getPropertyVal('DocumentValue')
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
EJHtmlDocument.prototype.setFileName = function (value) {
|
|
205
|
+
this.updatePropertyVal('DocumentValue', value && value.FilePath ? value.FilePath : '');
|
|
206
|
+
};
|
|
199
207
|
EJHtmlDocument.prototype.updateItemVisibility = function (categories, itemId, newValue) {
|
|
200
208
|
for (var index = 0; index < categories.length; index++) {
|
|
201
209
|
for (var itemIndex = 0; itemIndex < categories[index].Items.length; itemIndex++) {
|
|
@@ -236,7 +244,6 @@ var EJHtmlDocument = (function () {
|
|
|
236
244
|
this.setPropertyVal('Source', 'Content');
|
|
237
245
|
this.setPropertyVal('Sizing', 'AutoSize');
|
|
238
246
|
this.setPropertyVal('DocumentValue', '');
|
|
239
|
-
this.setPropertyVal('DocumentName', '');
|
|
240
247
|
}
|
|
241
248
|
return this.customJSON;
|
|
242
249
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boldreports/javascript-reporting-extensions",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.1.13",
|
|
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",
|
|
@@ -67,12 +67,13 @@ var EJPDFSignature = (function () {
|
|
|
67
67
|
'IsIgnoreCommon': true,
|
|
68
68
|
'Items': [
|
|
69
69
|
{
|
|
70
|
-
ItemId: 'digitalidfile',
|
|
71
|
-
Name: 'digitalidfile',
|
|
72
|
-
DisplayName: 'digitalidfile',
|
|
73
|
-
Value: this.
|
|
74
|
-
ItemType: '
|
|
75
|
-
|
|
70
|
+
'ItemId': 'digitalidfile',
|
|
71
|
+
'Name': 'digitalidfile',
|
|
72
|
+
'DisplayName': 'digitalidfile',
|
|
73
|
+
'Value': this.getFileName(),
|
|
74
|
+
'ItemType': 'LinkReport',
|
|
75
|
+
'EnableExpression': false,
|
|
76
|
+
'ExtType': 'pfx'
|
|
76
77
|
},
|
|
77
78
|
{
|
|
78
79
|
'ItemId': 'signature',
|
|
@@ -149,12 +150,31 @@ var EJPDFSignature = (function () {
|
|
|
149
150
|
baseProperties.PropertyType = 'pdfsign';
|
|
150
151
|
baseProperties.SubType = 'pdfsignature';
|
|
151
152
|
baseProperties.IsEditHeader = true;
|
|
153
|
+
this.updateCategoryVisibility(baseProperties.Items, ['reportaction'], false);
|
|
152
154
|
baseProperties.Items = $.merge(itemProperties, baseProperties.Items);
|
|
153
155
|
baseProperties.getItemProperty = {
|
|
154
156
|
event: $.proxy(this.customAction, this), eventData: {}
|
|
155
157
|
};
|
|
156
158
|
return baseProperties;
|
|
157
159
|
};
|
|
160
|
+
EJPDFSignature.prototype.updateCategoryVisibility = function (categories, categoryId, newValue) {
|
|
161
|
+
for (var index = 0; index < categories.length; index++) {
|
|
162
|
+
if (categoryId.indexOf(categories[index].CategoryId) !== -1) {
|
|
163
|
+
categories[index].IsVisible = newValue;
|
|
164
|
+
for (var itemIndex = 0; itemIndex < categories[index].Items.length; itemIndex++) {
|
|
165
|
+
categories[index].Items[itemIndex].IsVisible = newValue;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
EJPDFSignature.prototype.getFileName = function () {
|
|
171
|
+
return {
|
|
172
|
+
FilePath: this.getPropertyValue(this.customJSON.CustomProperties, 'CertificateFileName')
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
EJPDFSignature.prototype.setFileName = function (value) {
|
|
176
|
+
this.updatePropertyVal('CertificateFileName', value && value.FilePath ? value.FilePath : '');
|
|
177
|
+
};
|
|
158
178
|
EJPDFSignature.prototype.appendElement = function (target, className, text, display) {
|
|
159
179
|
var elementDiv = this.buildElement('div', 'e-pdfsign-label' + ' ' + className, text, {}, { 'display': display ? 'flex' : 'none' });
|
|
160
180
|
target.append(elementDiv);
|
|
@@ -191,8 +211,7 @@ var EJPDFSignature = (function () {
|
|
|
191
211
|
this.updateDisplay('e-pdfsign-date', newValue, 'Date');
|
|
192
212
|
break;
|
|
193
213
|
case 'digitalidfile':
|
|
194
|
-
|
|
195
|
-
newValue && newValue.id ? this.updatePropertyVal('CertificateFileID', newValue.id) : this.updatePropertyVal('CertificateFileID', '');
|
|
214
|
+
this.setFileName(newValue);
|
|
196
215
|
break;
|
|
197
216
|
case 'backgroundcolor':
|
|
198
217
|
var color = (newValue === 'Transparent' || newValue === '#ffffff00') ? 'White' : newValue;
|
|
@@ -209,9 +228,11 @@ var EJPDFSignature = (function () {
|
|
|
209
228
|
case 'date':
|
|
210
229
|
case 'signedname':
|
|
211
230
|
case 'contactinfo':
|
|
212
|
-
case 'digitalidfile':
|
|
213
231
|
this.instance.propertyPanel.updatePropertyUIValue(name, value.toString(), this.customJSON.UniqueId);
|
|
214
232
|
break;
|
|
233
|
+
case 'digitalidfile':
|
|
234
|
+
this.instance.propertyPanel.updatePropertyUIValue(name, { FilePath: value }, this.customJSON.UniqueId);
|
|
235
|
+
break;
|
|
215
236
|
}
|
|
216
237
|
};
|
|
217
238
|
EJPDFSignature.prototype.onPositionChanged = function (top, left) {
|
|
@@ -260,7 +281,7 @@ var EJPDFSignature = (function () {
|
|
|
260
281
|
isViewerDialog: false
|
|
261
282
|
};
|
|
262
283
|
if (this.hasDesignerInstance(this.instance)) {
|
|
263
|
-
this.invokeDialog(dlgData);
|
|
284
|
+
this.invokeDialog(null, dlgData);
|
|
264
285
|
}
|
|
265
286
|
};
|
|
266
287
|
EJPDFSignature.prototype.saveSign = function (isUndoRedo, imageDetails) {
|
|
@@ -309,7 +330,6 @@ var EJPDFSignature = (function () {
|
|
|
309
330
|
this.setPropertyVal('SignedName', 'true');
|
|
310
331
|
this.setPropertyVal('ContactInfo', 'true');
|
|
311
332
|
this.setPropertyVal('CertificateFileName', '');
|
|
312
|
-
this.setPropertyVal('CertificateFileID', '');
|
|
313
333
|
}
|
|
314
334
|
return this.customJSON;
|
|
315
335
|
};
|
|
@@ -340,8 +360,14 @@ var EJPDFSignature = (function () {
|
|
|
340
360
|
}
|
|
341
361
|
return null;
|
|
342
362
|
};
|
|
343
|
-
EJPDFSignature.prototype.invokeDialog = function (
|
|
363
|
+
EJPDFSignature.prototype.invokeDialog = function (imgDiv, dataInfo) {
|
|
344
364
|
var dlgInstance = window['SignatureDialog'].Instance;
|
|
365
|
+
var dlgData = {
|
|
366
|
+
callBackFn: dataInfo.callBackFn,
|
|
367
|
+
locale: dataInfo.locale,
|
|
368
|
+
imageData: this.hasDesignerInstance(this.instance) ? dataInfo.imageData : imgDiv.attr('imageString'),
|
|
369
|
+
canvas: imgDiv
|
|
370
|
+
};
|
|
345
371
|
if (dlgInstance) {
|
|
346
372
|
dlgInstance.openDialog(this.instance, dlgData);
|
|
347
373
|
}
|
|
@@ -377,9 +403,7 @@ var EJPDFSignature = (function () {
|
|
|
377
403
|
var imgDiv = this.buildElement('div', 'e-pdfsign-signImg', '', {}, { 'display': 'flex', 'width': isDataPresent ? '50%' : '100%', 'height': '100%' });
|
|
378
404
|
var editIcon = this.buildElement('span', 'e-designer-click e-rptdesigner-sign-editIcon', '', {}, { 'display': 'none' });
|
|
379
405
|
var base64Prefix = 'data:image/png;base64,';
|
|
380
|
-
var signatureData = "" + base64Prefix + imgData;
|
|
381
406
|
var proxy = this;
|
|
382
|
-
imgDiv.attr('imageString', signatureData);
|
|
383
407
|
var callBackFn = function (imageDetails) {
|
|
384
408
|
proxy.updateSignature(imageDetails, ej.isNullOrUndefined(criModel.ItemName) ? criModel.Name : criModel.ItemName);
|
|
385
409
|
proxy.saveViewerSignature(imageDetails);
|
|
@@ -387,19 +411,20 @@ var EJPDFSignature = (function () {
|
|
|
387
411
|
var dlgData = {
|
|
388
412
|
callBackFn: $.proxy(callBackFn, this),
|
|
389
413
|
locale: locale,
|
|
390
|
-
imageData: imgDiv.attr('imageString'),
|
|
391
414
|
canvas: imgDiv,
|
|
392
415
|
isViewerDialog: true
|
|
393
416
|
};
|
|
394
417
|
if (imgData) {
|
|
418
|
+
var signatureData = "" + base64Prefix + imgData;
|
|
395
419
|
this.setSign(signatureData, imgDiv);
|
|
420
|
+
imgDiv.attr('imageString', signatureData);
|
|
396
421
|
}
|
|
397
422
|
else {
|
|
398
423
|
this.clearSign(imgDiv);
|
|
399
424
|
}
|
|
400
425
|
configDiv.bind('mouseenter', $.proxy(this.showEditIcon, this, editIcon, customProperties));
|
|
401
426
|
configDiv.bind('mouseleave', $.proxy(this.hideEditIcon, this, editIcon));
|
|
402
|
-
editIcon.bind('click', $.proxy(this.invokeDialog, this, dlgData));
|
|
427
|
+
editIcon.bind('click', $.proxy(this.invokeDialog, this, imgDiv, dlgData));
|
|
403
428
|
configDiv.append(imgDiv, editIcon);
|
|
404
429
|
var dataDiv;
|
|
405
430
|
if (isDataPresent) {
|
|
@@ -426,7 +451,7 @@ var EJPDFSignature = (function () {
|
|
|
426
451
|
EJPDFSignature.prototype.saveViewerSignature = function (imageDetails) {
|
|
427
452
|
var imgData = imageDetails != null ? imageDetails.imageData : null;
|
|
428
453
|
var imgDiv = imageDetails.canvasElement;
|
|
429
|
-
if (imgData && imgDiv) {
|
|
454
|
+
if (imgData && imgDiv.length > 0) {
|
|
430
455
|
this.setSign(imgData, imgDiv);
|
|
431
456
|
imgDiv.attr('imageString', imgData);
|
|
432
457
|
}
|
|
@@ -43,9 +43,8 @@ var EJPdfDocument = (function () {
|
|
|
43
43
|
if (typeof newValue === 'string') {
|
|
44
44
|
this.updatePropertyVal(name, newValue);
|
|
45
45
|
}
|
|
46
|
-
else
|
|
47
|
-
|
|
48
|
-
newValue.name ? this.updatePropertyVal('DocumentName', newValue.name) : this.updatePropertyVal('DocumentName', '');
|
|
46
|
+
else {
|
|
47
|
+
this.setFileName(newValue);
|
|
49
48
|
}
|
|
50
49
|
break;
|
|
51
50
|
case 'Sizing':
|
|
@@ -54,7 +53,6 @@ var EJPdfDocument = (function () {
|
|
|
54
53
|
case 'Source':
|
|
55
54
|
this.updatePropertyVal(name, newValue);
|
|
56
55
|
this.updatePropertyVal('DocumentValue', '');
|
|
57
|
-
this.updatePropertyVal('DocumentName', '');
|
|
58
56
|
this.updatePropertyUIValue('DocumentValue', '');
|
|
59
57
|
break;
|
|
60
58
|
}
|
|
@@ -71,7 +69,7 @@ var EJPdfDocument = (function () {
|
|
|
71
69
|
this.propertyPanel.updatePropertyUIValue('pdfdatabase', value, customId);
|
|
72
70
|
}
|
|
73
71
|
else {
|
|
74
|
-
this.propertyPanel.updatePropertyUIValue('pdfserver', value, customId);
|
|
72
|
+
this.propertyPanel.updatePropertyUIValue('pdfserver', { FilePath: value }, customId);
|
|
75
73
|
}
|
|
76
74
|
break;
|
|
77
75
|
}
|
|
@@ -144,9 +142,10 @@ var EJPdfDocument = (function () {
|
|
|
144
142
|
'Name': 'DocumentValue',
|
|
145
143
|
'ParentId': 'basicsettings_pdfsource',
|
|
146
144
|
'DisplayName': 'server',
|
|
147
|
-
'Value': this.
|
|
148
|
-
'ItemType': '
|
|
149
|
-
'
|
|
145
|
+
'Value': this.getFileName(),
|
|
146
|
+
'ItemType': 'LinkReport',
|
|
147
|
+
'EnableExpression': false,
|
|
148
|
+
'ExtType': 'pdf'
|
|
150
149
|
},
|
|
151
150
|
{
|
|
152
151
|
'ItemId': 'pdfsizing',
|
|
@@ -166,6 +165,14 @@ var EJPdfDocument = (function () {
|
|
|
166
165
|
baseProperties.Items = $.merge(itemProperties, baseProperties.Items);
|
|
167
166
|
return baseProperties;
|
|
168
167
|
};
|
|
168
|
+
EJPdfDocument.prototype.getFileName = function () {
|
|
169
|
+
return {
|
|
170
|
+
FilePath: this.getPropertyVal('DocumentValue')
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
EJPdfDocument.prototype.setFileName = function (value) {
|
|
174
|
+
this.updatePropertyVal('DocumentValue', value && value.FilePath ? value.FilePath : '');
|
|
175
|
+
};
|
|
169
176
|
EJPdfDocument.prototype.updateItemVisibility = function (categories, itemId, newValue) {
|
|
170
177
|
for (var index = 0; index < categories.length; index++) {
|
|
171
178
|
for (var itemIndex = 0; itemIndex < categories[index].Items.length; itemIndex++) {
|
|
@@ -204,7 +211,6 @@ var EJPdfDocument = (function () {
|
|
|
204
211
|
if (this.customJSON === null) {
|
|
205
212
|
this.customJSON = new ej.ReportModel.CustomReportItem().getModel();
|
|
206
213
|
this.setPropertyVal('DocumentValue', '');
|
|
207
|
-
this.setPropertyVal('DocumentName', '');
|
|
208
214
|
this.setPropertyVal('Sizing', 'AutoSize');
|
|
209
215
|
this.setPropertyVal('Source', 'URL');
|
|
210
216
|
}
|
package/signature.reportitem.js
CHANGED
|
@@ -112,12 +112,23 @@ var EJSignature = (function () {
|
|
|
112
112
|
baseProperties.PropertyType = 'sign';
|
|
113
113
|
baseProperties.SubType = 'signature';
|
|
114
114
|
baseProperties.IsEditHeader = true;
|
|
115
|
+
this.updateCategoryVisibility(baseProperties.Items, ['reportaction'], false);
|
|
115
116
|
baseProperties.Items = $.merge(itemProperties, baseProperties.Items);
|
|
116
117
|
baseProperties.getItemProperty = {
|
|
117
118
|
event: $.proxy(this.customAction, this), eventData: {}
|
|
118
119
|
};
|
|
119
120
|
return baseProperties;
|
|
120
121
|
};
|
|
122
|
+
EJSignature.prototype.updateCategoryVisibility = function (categories, categoryId, newValue) {
|
|
123
|
+
for (var index = 0; index < categories.length; index++) {
|
|
124
|
+
if (categoryId.indexOf(categories[index].CategoryId) !== -1) {
|
|
125
|
+
categories[index].IsVisible = newValue;
|
|
126
|
+
for (var itemIndex = 0; itemIndex < categories[index].Items.length; itemIndex++) {
|
|
127
|
+
categories[index].Items[itemIndex].IsVisible = newValue;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
121
132
|
EJSignature.prototype.setSign = function (imgData, canvas, bgColor) {
|
|
122
133
|
if (canvas) {
|
|
123
134
|
canvas.style.backgroundColor = bgColor;
|