@sapui5/sap.ui.export 1.108.6 → 1.108.7
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/package.json +1 -1
- package/src/sap/ui/export/.library +1 -1
- package/src/sap/ui/export/ExportBase.js +1 -1
- package/src/sap/ui/export/ExportHandler.js +1 -1
- package/src/sap/ui/export/ExportUtils.js +2 -2
- package/src/sap/ui/export/PortableDocument.js +20 -9
- package/src/sap/ui/export/Spreadsheet.js +3 -3
- package/src/sap/ui/export/SpreadsheetExport.js +1 -1
- package/src/sap/ui/export/library.js +2 -2
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @constructor The <code>sap.ui.export.ExportBase</code> class allows you to export table data from a UI5 application to certain formats. This class is an abstract class that requires specific implementations for each file format.
|
|
28
28
|
*
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.108.
|
|
30
|
+
* @version 1.108.7
|
|
31
31
|
*
|
|
32
32
|
* @since 1.96
|
|
33
33
|
* @name sap.ui.export.ExportBase
|
|
@@ -15,7 +15,7 @@ sap.ui.define(['./library', './ExportUtils', './ExportDialog', 'sap/m/MessageToa
|
|
|
15
15
|
* @constructor The <code>sap.ui.export.ExportHandler</code> class allows you to export table data from a UI5 application.
|
|
16
16
|
*
|
|
17
17
|
* @author SAP SE
|
|
18
|
-
* @version 1.108.
|
|
18
|
+
* @version 1.108.7
|
|
19
19
|
*
|
|
20
20
|
* @since 1.102
|
|
21
21
|
* @name sap.ui.export.ExportHandler
|
|
@@ -132,7 +132,7 @@ sap.ui.define([
|
|
|
132
132
|
* Utilities related to export to enable reuse in integration scenarios (e.g. tables).
|
|
133
133
|
*
|
|
134
134
|
* @author SAP SE
|
|
135
|
-
* @version 1.108.
|
|
135
|
+
* @version 1.108.7
|
|
136
136
|
*
|
|
137
137
|
* @since 1.59
|
|
138
138
|
* @name sap.ui.export.ExportUtils
|
|
@@ -1121,7 +1121,7 @@ sap.ui.define([
|
|
|
1121
1121
|
*
|
|
1122
1122
|
* @param {object} oContext Context object
|
|
1123
1123
|
* @param {string} [oContext.application] Name of the application (default: "SAP UI5")
|
|
1124
|
-
* @param {string} [oContext.version] Application version (default: "1.108.
|
|
1124
|
+
* @param {string} [oContext.version] Application version (default: "1.108.7")
|
|
1125
1125
|
* @param {string} [oContext.title] Title that will be written to the file (NOT the filename)
|
|
1126
1126
|
* @param {string} [oContext.modifiedBy] Optional user context that will be written to the file
|
|
1127
1127
|
* @param {string} [oContext.sheetName] Name of the data sheet - Maximum length of 31 characters
|
|
@@ -14,10 +14,10 @@ sap.ui.define([
|
|
|
14
14
|
'use strict';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* @
|
|
17
|
+
* @class The <code>sap.ui.export.PortableDocument</code> class allows you to export table data from a UI5 application to a Portable Document Format (*.PDF) file.
|
|
18
18
|
*
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.108.
|
|
20
|
+
* @version 1.108.7
|
|
21
21
|
*
|
|
22
22
|
* @since 1.96
|
|
23
23
|
* @alias sap.ui.export.PortableDocument
|
|
@@ -342,23 +342,34 @@ sap.ui.define([
|
|
|
342
342
|
close: function(oEvent) {
|
|
343
343
|
if (oEvent.getParameter('cancelPressed')) {
|
|
344
344
|
that.cancel();
|
|
345
|
-
oBusyDialog.destroy();
|
|
346
|
-
oBusyDialog = null;
|
|
347
345
|
}
|
|
346
|
+
|
|
347
|
+
oBusyDialog.destroy();
|
|
348
|
+
oBusyDialog = null;
|
|
348
349
|
}
|
|
349
350
|
});
|
|
350
351
|
|
|
351
352
|
oDocumentDescription = that._createDocumentDescription(mSettings);
|
|
353
|
+
oBusyDialog.open();
|
|
352
354
|
|
|
353
355
|
return that.postDocumentDescription(oDocumentDescription, mSettings.dataSource).then(function(sDocumentDescriptionId) {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
+
/*
|
|
357
|
+
* Keep reference to oBusyDialog to prevent further processing if the user has canceled the export
|
|
358
|
+
* while the DocumentDescription was sent to the backend via POST. There is no dedicated option to
|
|
359
|
+
* cancel a request via the binding API.
|
|
360
|
+
*/
|
|
356
361
|
return oBusyDialog && that.sendRequest(mSettings.dataSource.dataUrl, sDocumentDescriptionId).then(function(response) {
|
|
357
362
|
ExportUtils.saveAsFile(response, mSettings.fileName);
|
|
358
|
-
oBusyDialog.destroy();
|
|
359
363
|
}).catch(function(oError) {
|
|
360
|
-
|
|
364
|
+
|
|
365
|
+
/* Handle ignore Promise rejection due to cancelation by the user */
|
|
366
|
+
if (oError === null) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
|
|
361
370
|
sap.m.MessageToast.show('Error during PDF export!');
|
|
371
|
+
}).finally(function() {
|
|
372
|
+
oBusyDialog && oBusyDialog.close();
|
|
362
373
|
});
|
|
363
374
|
});
|
|
364
375
|
};
|
|
@@ -381,7 +392,7 @@ sap.ui.define([
|
|
|
381
392
|
oXHR.setRequestHeader('SAP-Document-Description-Id', sDocumentDescriptionId);
|
|
382
393
|
|
|
383
394
|
oXHR.addEventListener('abort', function() {
|
|
384
|
-
fnReject(
|
|
395
|
+
fnReject(null);
|
|
385
396
|
});
|
|
386
397
|
|
|
387
398
|
oXHR.addEventListener('error', function() {
|
|
@@ -83,7 +83,7 @@ sap.ui.define([
|
|
|
83
83
|
* <li><code>workbook.context</code> - Context object that will be applied to the generated file. It may contain the following fields:</li>
|
|
84
84
|
* <ul>
|
|
85
85
|
* <li><code>application</code> (string) - The application that creates the XLSX document (default: "SAP UI5")</li>
|
|
86
|
-
* <li><code>version</code> (string) - Application version that creates the XLSX document (default: "1.108.
|
|
86
|
+
* <li><code>version</code> (string) - Application version that creates the XLSX document (default: "1.108.7")</li>
|
|
87
87
|
* <li><code>title</code> (string) - Title of the XLSX document (NOT the filename)</li>
|
|
88
88
|
* <li><code>modifiedBy</code> (string) - User context for the XLSX document</li>
|
|
89
89
|
* <li><code>sheetName</code> (string) - The label of the data sheet</li>
|
|
@@ -166,7 +166,7 @@ sap.ui.define([
|
|
|
166
166
|
* columns: aColumns,
|
|
167
167
|
* context: {
|
|
168
168
|
* application: 'Debug Test Application',
|
|
169
|
-
* version: '1.108.
|
|
169
|
+
* version: '1.108.7',
|
|
170
170
|
* title: 'Some random title',
|
|
171
171
|
* modifiedBy: 'John Doe',
|
|
172
172
|
* metaSheetName: 'Custom metadata',
|
|
@@ -278,7 +278,7 @@ sap.ui.define([
|
|
|
278
278
|
* @constructor The <code>sap.ui.export.Spreadsheet</code> class allows you to export table data from a UI5 application to a spreadsheet file.
|
|
279
279
|
*
|
|
280
280
|
* @author SAP SE
|
|
281
|
-
* @version 1.108.
|
|
281
|
+
* @version 1.108.7
|
|
282
282
|
*
|
|
283
283
|
* @since 1.50
|
|
284
284
|
* @name sap.ui.export.Spreadsheet
|
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* @namespace
|
|
18
18
|
* @alias sap.ui.export
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.108.
|
|
20
|
+
* @version 1.108.7
|
|
21
21
|
* @public
|
|
22
22
|
*/
|
|
23
23
|
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
interfaces: [],
|
|
34
34
|
controls: [],
|
|
35
35
|
elements: [],
|
|
36
|
-
version: "1.108.
|
|
36
|
+
version: "1.108.7"
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
|