@sapui5/sap.zen.crosstab 1.136.1 → 1.138.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
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</deprecation>
|
|
7
7
|
<vendor>SAP SE</vendor>
|
|
8
8
|
<copyright>(c) Copyright 2010-2019 SAP SE or an SAP affiliate company.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.138.0</version>
|
|
10
10
|
<documentation>Design Studio Crosstab library. NOT INTENDED FOR STANDALONE USAGE.</documentation>
|
|
11
11
|
<appData>
|
|
12
12
|
<jsdoc xmlns="http://www.sap.com/ui5/buildext/jsdoc" >
|
|
@@ -180,6 +180,7 @@ sap.ui.define(
|
|
|
180
180
|
this.bIsPivotCell = false;
|
|
181
181
|
this.bIsSplitPivotCell = false;
|
|
182
182
|
this.bIsRevertDrop = false;
|
|
183
|
+
this.sCustomFormat = undefined;
|
|
183
184
|
};
|
|
184
185
|
|
|
185
186
|
HeaderCell.prototype.getCellType = function() {
|
|
@@ -350,11 +351,20 @@ sap.ui.define(
|
|
|
350
351
|
}
|
|
351
352
|
var oFormatter = this.getFormatter();
|
|
352
353
|
if (oFormatter) {
|
|
353
|
-
|
|
354
|
+
var lCustomFormat = this.getCustomFormat();
|
|
355
|
+
lText = oFormatter.format(lText, lCustomFormat);
|
|
354
356
|
}
|
|
355
357
|
return lText;
|
|
356
358
|
};
|
|
357
359
|
|
|
360
|
+
HeaderCell.prototype.setCustomFormat = function (sName) {
|
|
361
|
+
this.sCustomFormat = sName;
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
HeaderCell.prototype.getCustomFormat = function () {
|
|
365
|
+
return this.sCustomFormat;
|
|
366
|
+
};
|
|
367
|
+
|
|
358
368
|
return HeaderCell;
|
|
359
369
|
}
|
|
360
370
|
);
|
|
@@ -567,7 +567,7 @@ sap.ui.define(
|
|
|
567
567
|
};
|
|
568
568
|
|
|
569
569
|
var parseCommonCellData = function (oJsonCellControl, oCommonCell) {
|
|
570
|
-
var oFormatter = getFormatter(oJsonCellControl);
|
|
570
|
+
var oFormatter = getFormatter(oJsonCellControl, oCommonCell);
|
|
571
571
|
if (oFormatter) {
|
|
572
572
|
oCommonCell.setFormatter(oFormatter);
|
|
573
573
|
}
|
|
@@ -726,7 +726,7 @@ sap.ui.define(
|
|
|
726
726
|
}
|
|
727
727
|
};
|
|
728
728
|
|
|
729
|
-
function getFormatter(oJsonCellControl) {
|
|
729
|
+
function getFormatter(oJsonCellControl, oCommonCell) {
|
|
730
730
|
var oFormatter;
|
|
731
731
|
|
|
732
732
|
if (oJsonCellControl.valueType) {
|
|
@@ -740,6 +740,14 @@ sap.ui.define(
|
|
|
740
740
|
pattern: sPattern, // CLDR pattern (example "* #,### Tests" -> "* 10.000 Tests")
|
|
741
741
|
showMeasure: true // show measure in pattern
|
|
742
742
|
};
|
|
743
|
+
if (oJsonCellControl.customFormat && oJsonCellControl.customFormat.name) {
|
|
744
|
+
oCommonCell.setCustomFormat(oJsonCellControl.customFormat.name);
|
|
745
|
+
oFormatOptions.currencyCode = false;
|
|
746
|
+
oFormatOptions.customCurrencies = oFormatOptions.customCurrencies || {};
|
|
747
|
+
oFormatOptions.customCurrencies[oJsonCellControl.customFormat.name] = {
|
|
748
|
+
symbol: oJsonCellControl.customFormat.symbol
|
|
749
|
+
};
|
|
750
|
+
}
|
|
743
751
|
oFormatter = sap.ui.core.format.NumberFormat.getCurrencyInstance(oFormatOptions);
|
|
744
752
|
} else if (oJsonCellControl.valueType === "Amount" || oJsonCellControl.valueType === "Price" || oJsonCellControl.valueType === "Quantity") {
|
|
745
753
|
oFormatOptions = {
|