@sapui5/sap.ui.export 1.96.19 → 1.96.20

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ui.export",
3
- "version": "1.96.19",
3
+ "version": "1.96.20",
4
4
  "description": "SAPUI5 Library sap.ui.export",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -5,7 +5,7 @@
5
5
  <vendor>SAP SE</vendor>
6
6
  <copyright>SAPUI5
7
7
  * (c) Copyright 2009-2021 SAP SE. All rights reserved.</copyright>
8
- <version>1.96.19</version>
8
+ <version>1.96.20</version>
9
9
 
10
10
  <documentation>UI5 library: sap.ui.export</documentation>
11
11
 
@@ -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.96.19
18
+ * @version 1.96.20
19
19
  *
20
20
  * @since 1.96
21
21
  * @name sap.ui.export.ExportBase
@@ -93,7 +93,7 @@ sap.ui.define([
93
93
  * Utilities related to export to enable reuse in integration scenarios (e.g. tables).
94
94
  *
95
95
  * @author SAP SE
96
- * @version 1.96.19
96
+ * @version 1.96.20
97
97
  *
98
98
  * @since 1.59
99
99
  * @name sap.ui.export.ExportUtils
@@ -276,7 +276,7 @@ sap.ui.define([
276
276
  * Combines the filter operator with the value and
277
277
  * creates a textual representation.
278
278
  *
279
- * @param oFilter {Object} A single filter object according to ListBinding#getFilterInfo
279
+ * @param {object} oFilter A single filter object according to ListBinding#getFilterInfo
280
280
  * @returns {string} Textual representation of the filter operation and value
281
281
  * @private
282
282
  */
@@ -306,7 +306,7 @@ sap.ui.define([
306
306
  /**
307
307
  * Parse filter tree recursively.
308
308
  *
309
- * @param oFilter {Object} Filter configuration according to ListBinding#getFilterInfo
309
+ * @param {object} oFilter Filter configuration according to ListBinding#getFilterInfo
310
310
  * @returns {Array} Array of filter entries
311
311
  * @private
312
312
  */
@@ -329,48 +329,71 @@ sap.ui.define([
329
329
  * Parses a logical filter and concatenates all
330
330
  * subsequent filters.
331
331
  *
332
- * @param oLogicalFilter {Object} Filter object according to ListBinding#getFilterInfo
332
+ * @param {object} oLogicalFilter Filter object according to ListBinding#getFilterInfo
333
333
  * @returns {Array} Array containing all filter settings
334
334
  * @private
335
335
  */
336
336
  _parseLogical: function(oLogicalFilter) {
337
+ var aFilters;
338
+
339
+ try {
340
+ /*
341
+ * BCP 002075129400002076772023
342
+ * When too many filters are applied, the
343
+ * filter evaluation might fail due to an
344
+ * "Maximum call stack size exceeded" error.
345
+ * This will be prevented by try-catch and
346
+ * still allows to keep existing results.
347
+ * Once the error occurs, additional filters
348
+ * will be ignored. This only happens for
349
+ * Logical filters with OR operator because
350
+ * they can lead to an unbalanced filter tree.
351
+ * For the unlikely scenario that the failing
352
+ * filter is a between filter, this scenario
353
+ * is also contained in try-catch.
354
+ */
355
+
356
+ /* Breakout behavior for between filter */
357
+ if (oLogicalFilter.op == '&&'
358
+ && oLogicalFilter.left.type === 'Binary'
359
+ && oLogicalFilter.right.type === 'Binary'
360
+ && oLogicalFilter.left.op === '>='
361
+ && oLogicalFilter.right.op === '<='
362
+ && oLogicalFilter.left.left.path === oLogicalFilter.right.left.path) {
363
+
364
+ return Utils._parseCall({
365
+ args: [
366
+ {
367
+ path: oLogicalFilter.left.left.path,
368
+ type: 'Reference'
369
+ },
370
+ {
371
+ type: 'Literal',
372
+ value: oLogicalFilter.left.right.value
373
+ },
374
+ {
375
+ type: 'Literal',
376
+ value: oLogicalFilter.right.right.value
377
+ }
378
+ ],
379
+ name: 'between',
380
+ type: 'Call'
381
+ });
382
+ }
337
383
 
338
- /* Breakout behavior for between filter */
339
- if (oLogicalFilter.op == '&&'
340
- && oLogicalFilter.left.type === 'Binary'
341
- && oLogicalFilter.right.type === 'Binary'
342
- && oLogicalFilter.left.op === '>='
343
- && oLogicalFilter.right.op === '<='
344
- && oLogicalFilter.left.left.path === oLogicalFilter.right.left.path) {
345
-
346
- return Utils._parseCall({
347
- args: [
348
- {
349
- path: oLogicalFilter.left.left.path,
350
- type: 'Reference'
351
- },
352
- {
353
- type: 'Literal',
354
- value: oLogicalFilter.left.right.value
355
- },
356
- {
357
- type: 'Literal',
358
- value: oLogicalFilter.right.right.value
359
- }
360
- ],
361
- name: 'between',
362
- type: 'Call'
363
- });
384
+ aFilters = Utils._parseFilter(oLogicalFilter.left).concat(Utils._parseFilter(oLogicalFilter.right));
385
+ } catch (oError) {
386
+ aFilters = [];
364
387
  }
365
388
 
366
- return Utils._parseFilter(oLogicalFilter.left).concat(Utils._parseFilter(oLogicalFilter.right));
389
+ return aFilters;
367
390
  },
368
391
 
369
392
  /**
370
393
  * Parses a binary filter and returns an Array that
371
394
  * contains this explicit filter item.
372
395
  *
373
- * @param oBinaryFilter {Object} Filter object according to ListBinding#getFilterInfo
396
+ * @param {object} oBinaryFilter Filter object according to ListBinding#getFilterInfo
374
397
  * @returns {Array} Array containing this explicit filter setting
375
398
  * @private
376
399
  */
@@ -390,7 +413,7 @@ sap.ui.define([
390
413
  * Parses an unary filter and returns a modified
391
414
  * subsequent filter.
392
415
  *
393
- * @param oUnaryFilter {Object} Filter object according to ListBinding#getFilterInfo
416
+ * @param {object} oUnaryFilter Filter object according to ListBinding#getFilterInfo
394
417
  * @returns {Array} Array containing the modified subsequent filter
395
418
  * @private
396
419
  */
@@ -411,7 +434,7 @@ sap.ui.define([
411
434
  * Parses an call filter and returns an Array containing
412
435
  * this particular filter configuration.
413
436
  *
414
- * @param oCallFilter {Object} Filter object according to ListBinding#getFilterInfo
437
+ * @param {object} oCallFilter Filter object according to ListBinding#getFilterInfo
415
438
  * @returns {Array} Array containing this explicit filter setting
416
439
  * @private
417
440
  */
@@ -432,10 +455,10 @@ sap.ui.define([
432
455
  * configuration in a format that can be attached to
433
456
  * a sap.ui.export.Spreadsheet instance.
434
457
  *
435
- * @param oBinding {sap.ui.model.ListBinding | sap.ui.model.TreeBinding}
458
+ * @param {sap.ui.model.ListBinding | sap.ui.model.TreeBinding} oBinding
436
459
  * ListBinding or TreeBinding instance
437
460
  *
438
- * @param fnCallback {function}
461
+ * @param {function} fnCallback
439
462
  * Callback function that is used to resolve the columns names according to their property.
440
463
  *
441
464
  * @returns {Promise}
@@ -889,7 +912,7 @@ sap.ui.define([
889
912
  *
890
913
  * @param {Object} oContext Context object
891
914
  * @param {string} [oContext.application] Name of the application (default: "SAP UI5")
892
- * @param {string} [oContext.version] Application version (default: "1.96.19")
915
+ * @param {string} [oContext.version] Application version (default: "1.96.20")
893
916
  * @param {string} [oContext.title] Title that will be written to the file (NOT the filename)
894
917
  * @param {string} [oContext.modifiedBy] Optional user context that will be written to the file
895
918
  * @param {string} [oContext.sheetName] Name of the data sheet - Maximum length of 31 characters
@@ -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.96.19
19
+ * @version 1.96.20
20
20
  *
21
21
  * @since 1.96
22
22
  * @name sap.ui.export.PortableDocument
@@ -82,7 +82,7 @@ sap.ui.define([
82
82
  * <li><code>workbook.context</code> - Context object that will be applied to the generated file. It may contain the following fields:</li>
83
83
  * <ul>
84
84
  * <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.96.19")</li>
85
+ * <li><code>version</code> (string) - Application version that creates the XLSX document (default: "1.96.20")</li>
86
86
  * <li><code>title</code> (string) - Title of the XLSX document (NOT the filename)</li>
87
87
  * <li><code>modifiedBy</code> (string) - User context for the XLSX document</li>
88
88
  * <li><code>sheetName</code> (string) - The label of the data sheet</li>
@@ -165,7 +165,7 @@ sap.ui.define([
165
165
  * columns: aColumns,
166
166
  * context: {
167
167
  * application: 'Debug Test Application',
168
- * version: '1.96.19',
168
+ * version: '1.96.20',
169
169
  * title: 'Some random title',
170
170
  * modifiedBy: 'John Doe',
171
171
  * metaSheetName: 'Custom metadata',
@@ -277,7 +277,7 @@ sap.ui.define([
277
277
  * @constructor The <code>sap.ui.export.Spreadsheet</code> class allows you to export table data from a UI5 application to a spreadsheet file.
278
278
  *
279
279
  * @author SAP SE
280
- * @version 1.96.19
280
+ * @version 1.96.20
281
281
  *
282
282
  * @since 1.50
283
283
  * @name sap.ui.export.Spreadsheet
@@ -20,7 +20,7 @@ sap.ui.define(['jquery.sap.global', 'sap/base/Log', 'sap/ui/Device'], function(j
20
20
  *
21
21
  * @class Utility class to perform spreadsheet export
22
22
  * @author SAP SE
23
- * @version 1.96.19
23
+ * @version 1.96.20
24
24
  * @static
25
25
  *
26
26
  * @private
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @namespace
18
18
  * @name sap.ui.export
19
19
  * @author SAP SE
20
- * @version 1.96.19
20
+ * @version 1.96.20
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.96.19"
36
+ version: "1.96.20"
37
37
  });
38
38
 
39
39