@sapui5/sap.ui.export 1.96.2 → 1.98.0
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 +2 -2
- package/src/sap/ui/export/ExportBase.js +2 -2
- package/src/sap/ui/export/ExportDialog.js +1 -1
- package/src/sap/ui/export/ExportUtils.js +41 -19
- package/src/sap/ui/export/PortableDocument.js +112 -19
- package/src/sap/ui/export/Spreadsheet.js +5 -4
- package/src/sap/ui/export/SpreadsheetExport.js +137 -149
- package/src/sap/ui/export/js/SpreadsheetWorker.js +0 -1
- package/src/sap/ui/export/js/XLSXBuilder.js.map +1 -1
- package/src/sap/ui/export/js/libs/JSZip3.js +3 -3
- package/src/sap/ui/export/library.js +3 -3
- package/src/sap/ui/export/messagebundle_en_US_saprigi.properties +2 -2
- package/src/sap/ui/export/messagebundle_en_US_saptrc.properties +2 -2
- package/src/sap/ui/export/messagebundle_ms.properties +1 -1
- package/src/sap/ui/export/provider/DataProviderBase.js +31 -32
- package/src/sap/ui/export/themes/base/ExportUtils.less +1 -1
- package/src/sap/ui/export/themes/base/library.source.less +1 -1
- package/src/sap/ui/export/themes/sap_belize/library.source.less +1 -1
- package/src/sap/ui/export/themes/sap_belize_hcb/library.source.less +1 -1
- package/src/sap/ui/export/themes/sap_belize_hcw/library.source.less +1 -1
- package/src/sap/ui/export/themes/sap_belize_plus/library.source.less +1 -1
- package/src/sap/ui/export/themes/sap_bluecrystal/library.source.less +1 -1
- package/src/sap/ui/export/themes/sap_fiori_3/library.source.less +1 -1
- package/src/sap/ui/export/themes/sap_fiori_3_dark/library.source.less +1 -1
- package/src/sap/ui/export/themes/sap_fiori_3_hcb/library.source.less +1 -1
- package/src/sap/ui/export/themes/sap_fiori_3_hcw/library.source.less +1 -1
- package/src/sap/ui/export/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/export/themes/sap_horizon/library.source.less +1 -1
- package/ui5.yaml +4 -1
- package/src/sap/ui/export/js/libs/uri.all.min.js +0 -3
- package/src/sap/ui/export/js/libs/uri.all.min.js.map +0 -1
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<name>sap.ui.export</name>
|
|
5
5
|
<vendor>SAP SE</vendor>
|
|
6
6
|
<copyright>SAPUI5
|
|
7
|
-
* (c) Copyright 2009-
|
|
8
|
-
<version>1.
|
|
7
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.</copyright>
|
|
8
|
+
<version>1.98.0</version>
|
|
9
9
|
|
|
10
10
|
<documentation>UI5 library: sap.ui.export</documentation>
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
sap.ui.define([
|
|
@@ -15,7 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
* @constructor The <code>sap.ui.export.ExportBase</code> class allows you to export table data from a UI5 application to a Portable Document Format (*.PDF) file.
|
|
16
16
|
*
|
|
17
17
|
* @author SAP SE
|
|
18
|
-
* @version 1.
|
|
18
|
+
* @version 1.98.0
|
|
19
19
|
*
|
|
20
20
|
* @since 1.96
|
|
21
21
|
* @name sap.ui.export.ExportBase
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define([
|
|
6
6
|
'sap/ui/core/library',
|
|
@@ -25,7 +25,8 @@ sap.ui.define([
|
|
|
25
25
|
], function(coreLibrary, mLibrary, library, Core, Log, uid, Item, syncStyleClass, JSONModel, Button, CheckBox, Dialog, Input, Label, Select, Text, VBox, VersionInfo, openWindow) {
|
|
26
26
|
'use strict';
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
// eslint-disable-next-line
|
|
29
|
+
/* global Blob, MouseEvent, FileReader, URL */
|
|
29
30
|
|
|
30
31
|
// Shortcuts
|
|
31
32
|
var ButtonType = mLibrary.ButtonType;
|
|
@@ -93,7 +94,7 @@ sap.ui.define([
|
|
|
93
94
|
* Utilities related to export to enable reuse in integration scenarios (e.g. tables).
|
|
94
95
|
*
|
|
95
96
|
* @author SAP SE
|
|
96
|
-
* @version 1.
|
|
97
|
+
* @version 1.98.0
|
|
97
98
|
*
|
|
98
99
|
* @since 1.59
|
|
99
100
|
* @name sap.ui.export.ExportUtils
|
|
@@ -130,6 +131,17 @@ sap.ui.define([
|
|
|
130
131
|
return sUrl;
|
|
131
132
|
},
|
|
132
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Ensures that the URL is absolute, so that it can
|
|
136
|
+
* be used within a Web Worker.
|
|
137
|
+
*
|
|
138
|
+
* @param {string} url Relative URL that needs to be processed for Web Worker usage
|
|
139
|
+
* @returns {string|any} Returns the absolute URL or the original value in case there is no URL provided
|
|
140
|
+
*/
|
|
141
|
+
normalizeUrl: function(url) {
|
|
142
|
+
return url ? new URL(url, document.baseURI).toString() : url;
|
|
143
|
+
},
|
|
144
|
+
|
|
133
145
|
/**
|
|
134
146
|
* Creates the Export settings dialog that can be used for configuring the spreadsheet before exporting.
|
|
135
147
|
*
|
|
@@ -198,6 +210,8 @@ sap.ui.define([
|
|
|
198
210
|
labelFor: sDialogId + '-fileType',
|
|
199
211
|
visible: !!bDevMode
|
|
200
212
|
}),
|
|
213
|
+
// sap.m.Select control disabled as there is only 1 option for now
|
|
214
|
+
// control must be enabled when more file types are supported
|
|
201
215
|
new Select({
|
|
202
216
|
id: sDialogId + '-fileType',
|
|
203
217
|
width: '100%',
|
|
@@ -276,7 +290,7 @@ sap.ui.define([
|
|
|
276
290
|
* Combines the filter operator with the value and
|
|
277
291
|
* creates a textual representation.
|
|
278
292
|
*
|
|
279
|
-
* @param
|
|
293
|
+
* @param {Object} oFilter A single filter object according to ListBinding#getFilterInfo
|
|
280
294
|
* @returns {string} Textual representation of the filter operation and value
|
|
281
295
|
* @private
|
|
282
296
|
*/
|
|
@@ -306,7 +320,7 @@ sap.ui.define([
|
|
|
306
320
|
/**
|
|
307
321
|
* Parse filter tree recursively.
|
|
308
322
|
*
|
|
309
|
-
* @param
|
|
323
|
+
* @param {Object} oFilter Filter configuration according to ListBinding#getFilterInfo
|
|
310
324
|
* @returns {Array} Array of filter entries
|
|
311
325
|
* @private
|
|
312
326
|
*/
|
|
@@ -329,7 +343,7 @@ sap.ui.define([
|
|
|
329
343
|
* Parses a logical filter and concatenates all
|
|
330
344
|
* subsequent filters.
|
|
331
345
|
*
|
|
332
|
-
* @param
|
|
346
|
+
* @param {Object} oLogicalFilter Filter object according to ListBinding#getFilterInfo
|
|
333
347
|
* @returns {Array} Array containing all filter settings
|
|
334
348
|
* @private
|
|
335
349
|
*/
|
|
@@ -370,7 +384,7 @@ sap.ui.define([
|
|
|
370
384
|
* Parses a binary filter and returns an Array that
|
|
371
385
|
* contains this explicit filter item.
|
|
372
386
|
*
|
|
373
|
-
* @param
|
|
387
|
+
* @param {Object} oBinaryFilter Filter object according to ListBinding#getFilterInfo
|
|
374
388
|
* @returns {Array} Array containing this explicit filter setting
|
|
375
389
|
* @private
|
|
376
390
|
*/
|
|
@@ -390,7 +404,7 @@ sap.ui.define([
|
|
|
390
404
|
* Parses an unary filter and returns a modified
|
|
391
405
|
* subsequent filter.
|
|
392
406
|
*
|
|
393
|
-
* @param
|
|
407
|
+
* @param {Object} oUnaryFilter Filter object according to ListBinding#getFilterInfo
|
|
394
408
|
* @returns {Array} Array containing the modified subsequent filter
|
|
395
409
|
* @private
|
|
396
410
|
*/
|
|
@@ -411,7 +425,7 @@ sap.ui.define([
|
|
|
411
425
|
* Parses an call filter and returns an Array containing
|
|
412
426
|
* this particular filter configuration.
|
|
413
427
|
*
|
|
414
|
-
* @param
|
|
428
|
+
* @param {Object} oCallFilter Filter object according to ListBinding#getFilterInfo
|
|
415
429
|
* @returns {Array} Array containing this explicit filter setting
|
|
416
430
|
* @private
|
|
417
431
|
*/
|
|
@@ -432,11 +446,8 @@ sap.ui.define([
|
|
|
432
446
|
* configuration in a format that can be attached to
|
|
433
447
|
* a sap.ui.export.Spreadsheet instance.
|
|
434
448
|
*
|
|
435
|
-
* @param
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
* @param fnCallback {function}
|
|
439
|
-
* Callback function that is used to resolve the columns names according to their property.
|
|
449
|
+
* @param {sap.ui.model.ListBinding | sap.ui.model.TreeBinding} oBinding ListBinding or TreeBinding instance
|
|
450
|
+
* @param {function} fnCallback Callback function that is used to resolve the columns names according to their property
|
|
440
451
|
*
|
|
441
452
|
* @returns {Promise}
|
|
442
453
|
* Promise, which resolves with an object containing a name
|
|
@@ -643,7 +654,7 @@ sap.ui.define([
|
|
|
643
654
|
throw new Error(CLASS_NAME + ': dataSource has not been specified');
|
|
644
655
|
}
|
|
645
656
|
|
|
646
|
-
mDataSource.type = mDataSource.type || 'odata';
|
|
657
|
+
mDataSource.type = typeof mDataSource.type === 'string' && mDataSource.type.toLowerCase() || 'odata';
|
|
647
658
|
|
|
648
659
|
if (mDataSource.type === 'array' && !Array.isArray(mDataSource.data)) {
|
|
649
660
|
Log.warning(CLASS_NAME + ': Defined type does not match the provided data');
|
|
@@ -653,8 +664,19 @@ sap.ui.define([
|
|
|
653
664
|
mDataSource.count = mDataSource.data.length;
|
|
654
665
|
}
|
|
655
666
|
|
|
656
|
-
if (mDataSource.type === 'odata'
|
|
657
|
-
|
|
667
|
+
if (mDataSource.type === 'odata') {
|
|
668
|
+
if (typeof mDataSource.dataUrl !== 'string' || mDataSource.dataUrl.length === 0) {
|
|
669
|
+
throw new Error(CLASS_NAME + ': Unable to export data. No dataUrl provided.');
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
// Ensure absolute URLs for dataUrl and serviceUrl
|
|
673
|
+
if (mDataSource.dataUrl) {
|
|
674
|
+
mDataSource.dataUrl = Utils.normalizeUrl(mDataSource.dataUrl);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
if (mDataSource.serviceUrl) {
|
|
678
|
+
mDataSource.serviceUrl = Utils.normalizeUrl(mDataSource.serviceUrl);
|
|
679
|
+
}
|
|
658
680
|
}
|
|
659
681
|
|
|
660
682
|
if (typeof mDataSource.count !== 'number' || mDataSource.count < 0 || isNaN(mDataSource.count) || mDataSource.count % 1 !== 0) {
|
|
@@ -889,7 +911,7 @@ sap.ui.define([
|
|
|
889
911
|
*
|
|
890
912
|
* @param {Object} oContext Context object
|
|
891
913
|
* @param {string} [oContext.application] Name of the application (default: "SAP UI5")
|
|
892
|
-
* @param {string} [oContext.version] Application version (default: "1.
|
|
914
|
+
* @param {string} [oContext.version] Application version (default: "1.98.0")
|
|
893
915
|
* @param {string} [oContext.title] Title that will be written to the file (NOT the filename)
|
|
894
916
|
* @param {string} [oContext.modifiedBy] Optional user context that will be written to the file
|
|
895
917
|
* @param {string} [oContext.sheetName] Name of the data sheet - Maximum length of 31 characters
|
|
@@ -993,7 +1015,7 @@ sap.ui.define([
|
|
|
993
1015
|
* @param {Object} oCustomizing General export customizing
|
|
994
1016
|
* @param {Object} oCustomizing.currency Currency specific customizing
|
|
995
1017
|
* @param {Object} oCustomizing.unit Unit of measure specific customizing
|
|
996
|
-
* @param {string} sProperty
|
|
1018
|
+
* @param {string} sProperty Key property of the specific customizing setting
|
|
997
1019
|
* @private
|
|
998
1020
|
*/
|
|
999
1021
|
_validateScaleCustomizing: function(oCustomizing, sProperty) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
sap.ui.define([
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @constructor 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.
|
|
17
17
|
*
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.98.0
|
|
20
20
|
*
|
|
21
21
|
* @since 1.96
|
|
22
22
|
* @name sap.ui.export.PortableDocument
|
|
@@ -96,19 +96,26 @@ sap.ui.define([
|
|
|
96
96
|
*/
|
|
97
97
|
if (typeof oBinding.getDownloadUrl === 'function') {
|
|
98
98
|
var oModel = oBinding.getModel(),
|
|
99
|
-
sDataUrl = ExportUtils.interceptUrl(oBinding.getDownloadUrl('
|
|
99
|
+
sDataUrl = ExportUtils.interceptUrl(oBinding.getDownloadUrl('pdf')),
|
|
100
100
|
sServiceUrl = ExportUtils.interceptUrl(oModel.sServiceUrl),
|
|
101
101
|
bV4ODataModel = oModel.isA('sap.ui.model.odata.v4.ODataModel');
|
|
102
102
|
|
|
103
103
|
var oDataUrl = new URL(sDataUrl, document.baseURI);
|
|
104
104
|
oDataUrl.hash = '';
|
|
105
|
-
|
|
105
|
+
|
|
106
|
+
// Reference the Model for later use
|
|
107
|
+
this._oModel = oModel;
|
|
108
|
+
|
|
109
|
+
/* Remove $format system query option because it would overwrite the "Accept" header */
|
|
110
|
+
oDataUrl.search = oDataUrl.search.split('&').filter(function(val) {
|
|
111
|
+
return val.indexOf('$format') == -1;
|
|
112
|
+
}).join('&');
|
|
106
113
|
|
|
107
114
|
oDataSource = {
|
|
108
115
|
type: 'odata',
|
|
109
116
|
version: bV4ODataModel ? 4 : 2,
|
|
110
117
|
dataUrl: oDataUrl.toString(),
|
|
111
|
-
serviceUrl: sServiceUrl.split('/').slice(0, -
|
|
118
|
+
serviceUrl: sServiceUrl.split('/').slice(0, -5).join('/') + '/default/iwbep/common/0001/', // Requires the serviceUrl to end with a /
|
|
112
119
|
headers: bV4ODataModel ? oModel.getHttpHeaders(true) : oModel.getHeaders()
|
|
113
120
|
};
|
|
114
121
|
}
|
|
@@ -134,6 +141,10 @@ sap.ui.define([
|
|
|
134
141
|
"Orientation": "LANDSCAPE",
|
|
135
142
|
"FontSize": 12
|
|
136
143
|
},
|
|
144
|
+
"Signature": {
|
|
145
|
+
"DoSign": true,
|
|
146
|
+
"Reason": ""
|
|
147
|
+
},
|
|
137
148
|
"CoverPage": [],
|
|
138
149
|
"TableColumns": []
|
|
139
150
|
};
|
|
@@ -161,7 +172,7 @@ sap.ui.define([
|
|
|
161
172
|
/* Add columns */
|
|
162
173
|
oWorkbook.columns.forEach(function(oColumn){
|
|
163
174
|
oDocumentDescription["TableColumns"].push({
|
|
164
|
-
"Name": oColumn.property,
|
|
175
|
+
"Name": Array.isArray(oColumn.property) ? oColumn.property[0] : oColumn.property,
|
|
165
176
|
"Header": oColumn.label
|
|
166
177
|
});
|
|
167
178
|
});
|
|
@@ -169,6 +180,33 @@ sap.ui.define([
|
|
|
169
180
|
return oDocumentDescription;
|
|
170
181
|
};
|
|
171
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Returns the name of the EntitySet that is being used with the given OData version.
|
|
185
|
+
*
|
|
186
|
+
* @param {Object} mDataSource DataSource object containing information about OData version
|
|
187
|
+
* @returns {string} Name of the EntitySet according to the OData version
|
|
188
|
+
*/
|
|
189
|
+
PortableDocument.prototype._getEntitySetName = function(mDataSource) {
|
|
190
|
+
var version = mDataSource && mDataSource.version || 2; // Use OData V2 by default
|
|
191
|
+
|
|
192
|
+
return version == 4 ? 'MyDocumentDescriptions' : 'SAP__MyDocumentDescriptions';
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Returns the specific ODataModel that is being used for binding to the DocumentDescription EntitySet
|
|
197
|
+
*
|
|
198
|
+
* @param {Object} oDataSource DataSource settings of the export configuration
|
|
199
|
+
* @returns {ODataModel} ODataModel, either V2 or V4.
|
|
200
|
+
*/
|
|
201
|
+
PortableDocument.prototype._getModel = function(oDataSource) {
|
|
202
|
+
var version = oDataSource.version || 2;
|
|
203
|
+
|
|
204
|
+
return version === 4 ? new ODataModel({
|
|
205
|
+
serviceUrl: oDataSource.serviceUrl,
|
|
206
|
+
synchronizationMode: 'None'
|
|
207
|
+
}) : this._oModel;
|
|
208
|
+
};
|
|
209
|
+
|
|
172
210
|
/**
|
|
173
211
|
* Applies default settings to the export configuration.
|
|
174
212
|
*
|
|
@@ -191,31 +229,72 @@ sap.ui.define([
|
|
|
191
229
|
});
|
|
192
230
|
};
|
|
193
231
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
232
|
+
/**
|
|
233
|
+
* Sends a POST request to the GW service which creates the
|
|
234
|
+
* DocumentDescription. The corresponding Id is assigned by
|
|
235
|
+
* the backend and passed to the event handler functions.
|
|
236
|
+
*
|
|
237
|
+
* @param {Object} oDocumentDescription DocumentDescription instance that is being created
|
|
238
|
+
* @param {Object} oDataSource DataSource settings of the export configuration
|
|
239
|
+
* @param {function} fnSuccess Success handler function
|
|
240
|
+
* @param {function} fnError Error handler function
|
|
241
|
+
*/
|
|
242
|
+
PortableDocument.prototype.postDocumentDescription = function(oDocumentDescription, oDataSource, fnSuccess, fnError) {
|
|
243
|
+
var oBinding, oModel, sPath;
|
|
198
244
|
|
|
199
|
-
|
|
245
|
+
oModel = this._getModel(oDataSource);
|
|
246
|
+
sPath = '/' + this._getEntitySetName(oDataSource);
|
|
200
247
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
248
|
+
if (!oModel || !oModel.isA(['sap.ui.model.odata.v4.ODataModel', 'sap.ui.model.odata.v2.ODataModel'])) {
|
|
249
|
+
fnError('Unsupported Model');
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
if (oModel.isA('sap.ui.model.odata.v4.ODataModel')) {
|
|
253
|
+
oBinding = oModel.bindList(sPath);
|
|
206
254
|
|
|
207
|
-
oBinding = oModel.bindList('/MyDocumentDescriptions');
|
|
208
255
|
oBinding.attachCreateCompleted(function(oEvent) {
|
|
209
256
|
var success = oEvent.getParameter('success');
|
|
210
257
|
|
|
211
258
|
if (success) {
|
|
212
|
-
|
|
259
|
+
fnSuccess(oEvent.getParameter('context').getObject()['Id']);
|
|
213
260
|
} else {
|
|
214
|
-
|
|
261
|
+
fnError();
|
|
215
262
|
}
|
|
216
263
|
});
|
|
217
264
|
|
|
218
265
|
oBinding.create(oDocumentDescription);
|
|
266
|
+
} else {
|
|
267
|
+
var bUseBatch = oModel.bUseBatch;
|
|
268
|
+
|
|
269
|
+
oModel.setUseBatch(false);
|
|
270
|
+
oModel.create(sPath, oDocumentDescription, {
|
|
271
|
+
success: function(oData) {
|
|
272
|
+
oModel.setUseBatch(bUseBatch);
|
|
273
|
+
fnSuccess(oData['Id']);
|
|
274
|
+
},
|
|
275
|
+
error: function(oError) {
|
|
276
|
+
oModel.setUseBatch(bUseBatch);
|
|
277
|
+
fnError(oError);
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Triggers the export process and returns a Promise the
|
|
285
|
+
* gets resolved as soon as the export is finished.
|
|
286
|
+
*
|
|
287
|
+
* @param {Object} mSettings Export settings
|
|
288
|
+
* @returns {Promise} Promise that is being resolved as soon as the PDF export is finished
|
|
289
|
+
*/
|
|
290
|
+
PortableDocument.prototype.createBuildPromise = function(mSettings) {
|
|
291
|
+
var that = this;
|
|
292
|
+
|
|
293
|
+
return new Promise(function(fnResolve, fnReject) {
|
|
294
|
+
var oDocumentDescription;
|
|
295
|
+
|
|
296
|
+
oDocumentDescription = that._createDocumentDescription(mSettings.workbook);
|
|
297
|
+
that.postDocumentDescription(oDocumentDescription, mSettings.dataSource, fnResolve, fnReject);
|
|
219
298
|
|
|
220
299
|
}).then(function(sDocumentDescriptionId) {
|
|
221
300
|
return that.sendRequest(mSettings.dataSource.dataUrl, sDocumentDescriptionId).then(function(response) {
|
|
@@ -280,5 +359,19 @@ sap.ui.define([
|
|
|
280
359
|
}
|
|
281
360
|
};
|
|
282
361
|
|
|
362
|
+
/**
|
|
363
|
+
* Cleans up the internal structures and removes all event handlers.
|
|
364
|
+
*
|
|
365
|
+
* The object must not be used anymore after destroy was called.
|
|
366
|
+
*
|
|
367
|
+
* @see sap.ui.export.ExportBase#destroy
|
|
368
|
+
* @public
|
|
369
|
+
*/
|
|
370
|
+
PortableDocument.prototype.destroy = function() {
|
|
371
|
+
ExportBase.prototype.destroy.apply(this, arguments);
|
|
372
|
+
|
|
373
|
+
this._oModel = null;
|
|
374
|
+
};
|
|
375
|
+
|
|
283
376
|
return PortableDocument;
|
|
284
377
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
sap.ui.define([
|
|
@@ -15,6 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
function(Core, ExportDialog, ExportBase, Device, SpreadsheetExport, Log, ExportUtils) {
|
|
16
16
|
'use strict';
|
|
17
17
|
|
|
18
|
+
// eslint-disable-next-line
|
|
18
19
|
/* global Blob */
|
|
19
20
|
|
|
20
21
|
var CLASS_NAME = 'sap.ui.export.Spreadsheet';
|
|
@@ -82,7 +83,7 @@ sap.ui.define([
|
|
|
82
83
|
* <li><code>workbook.context</code> - Context object that will be applied to the generated file. It may contain the following fields:</li>
|
|
83
84
|
* <ul>
|
|
84
85
|
* <li><code>application</code> (string) - The application that creates the XLSX document (default: "SAP UI5")</li>
|
|
85
|
-
* <li><code>version</code> (string) - Application version that creates the XLSX document (default: "1.
|
|
86
|
+
* <li><code>version</code> (string) - Application version that creates the XLSX document (default: "1.98.0")</li>
|
|
86
87
|
* <li><code>title</code> (string) - Title of the XLSX document (NOT the filename)</li>
|
|
87
88
|
* <li><code>modifiedBy</code> (string) - User context for the XLSX document</li>
|
|
88
89
|
* <li><code>sheetName</code> (string) - The label of the data sheet</li>
|
|
@@ -165,7 +166,7 @@ sap.ui.define([
|
|
|
165
166
|
* columns: aColumns,
|
|
166
167
|
* context: {
|
|
167
168
|
* application: 'Debug Test Application',
|
|
168
|
-
* version: '1.
|
|
169
|
+
* version: '1.98.0',
|
|
169
170
|
* title: 'Some random title',
|
|
170
171
|
* modifiedBy: 'John Doe',
|
|
171
172
|
* metaSheetName: 'Custom metadata',
|
|
@@ -277,7 +278,7 @@ sap.ui.define([
|
|
|
277
278
|
* @constructor The <code>sap.ui.export.Spreadsheet</code> class allows you to export table data from a UI5 application to a spreadsheet file.
|
|
278
279
|
*
|
|
279
280
|
* @author SAP SE
|
|
280
|
-
* @version 1.
|
|
281
|
+
* @version 1.98.0
|
|
281
282
|
*
|
|
282
283
|
* @since 1.50
|
|
283
284
|
* @name sap.ui.export.Spreadsheet
|