pict 1.0.120 → 1.0.121
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/dist/pict.compatible.js
CHANGED
|
@@ -937,7 +937,7 @@ return pNumber.toString().replace(this._Regex_formatterAddCommasToNumber,this.pr
|
|
|
937
937
|
*
|
|
938
938
|
* @param {*} pValue
|
|
939
939
|
* @returns {string}
|
|
940
|
-
*/},{key:"formatterDollars",value:function formatterDollars(pValue){if(isNaN(pValue)){return this._Value_NaN_Currency;}var tmpDollarAmountArbitrary=this.fable.Utility.bigNumber(pValue);var tmpDollarAmount=tmpDollarAmountArbitrary.toFixed(2);if(isNaN(tmpDollarAmount)){// Try again and see if what was passed in was a dollars string.
|
|
940
|
+
*/},{key:"formatterDollars",value:function formatterDollars(pValue){if(isNaN(pValue)){return this._Value_NaN_Currency;}if(pValue===null||pValue===undefined){return this._Value_NaN_Currency;}var tmpDollarAmountArbitrary=this.fable.Utility.bigNumber(pValue);var tmpDollarAmount=tmpDollarAmountArbitrary.toFixed(2);if(isNaN(tmpDollarAmount)){// Try again and see if what was passed in was a dollars string.
|
|
941
941
|
if(typeof pValue=='string'){// TODO: Better rounding function? This is a hack to get rid of the currency symbol and commas.
|
|
942
942
|
tmpDollarAmount=parseFloat(pValue.replace(this._Value_MoneySign_Currency,'').replace(this._Regex_formatterDollarsRemoveCommas,'')).toFixed(2);}// If we didn't get a number, return the "not a number" string.
|
|
943
943
|
if(isNaN(tmpDollarAmount)){return this._Value_NaN_Currency;}}// TODO: Get locale data and use that for this stuff.
|
|
@@ -947,7 +947,7 @@ return"$".concat(this.formatterAddCommasToNumber(tmpDollarAmount));}/**
|
|
|
947
947
|
* @param {*} pValue
|
|
948
948
|
* @param {number} pDigits
|
|
949
949
|
* @returns {string}
|
|
950
|
-
*/},{key:"formatterRoundNumber",value:function formatterRoundNumber(pValue,pDigits){var tmpDigits=typeof pDigits=='undefined'?2:pDigits;if(isNaN(pValue)){var tmpZed=0;return tmpZed.toFixed(tmpDigits);}var tmpAmountArbitrary=this.fable.Utility.bigNumber(pValue);var tmpValue=tmpAmountArbitrary.toFixed(tmpDigits);if(isNaN(tmpValue)){var _tmpZed=0;return _tmpZed.toFixed(tmpDigits);}else{return tmpValue;}}/**
|
|
950
|
+
*/},{key:"formatterRoundNumber",value:function formatterRoundNumber(pValue,pDigits){var tmpDigits=typeof pDigits=='undefined'?2:pDigits;if(isNaN(pValue)){var tmpZed=0;return tmpZed.toFixed(tmpDigits);}if(pValue===null||pValue===undefined){return'';}var tmpAmountArbitrary=this.fable.Utility.bigNumber(pValue);var tmpValue=tmpAmountArbitrary.toFixed(tmpDigits);if(isNaN(tmpValue)){var _tmpZed=0;return _tmpZed.toFixed(tmpDigits);}else{return tmpValue;}}/**
|
|
951
951
|
* Generate a reapeating padding string to be appended before or after depending on
|
|
952
952
|
* which padding function it uses.
|
|
953
953
|
*
|