@hipay/hipay-material-ui 2.0.0-beta.59 → 2.0.0-beta.61
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/CHANGELOG.md +118 -0
- package/HiCell/CellNumeric.js +1 -1
- package/HiDatePicker/HiDatePicker.js +48 -14
- package/HiDatePicker/HiDateRangePicker.js +119 -64
- package/HiDatePicker/HiDateRangeSelector.js +70 -47
- package/HiDatePicker/Overlays/YearPickerOverlay.js +8 -3
- package/HiDatePicker/stylesheet.js +32 -17
- package/HiForm/HiFormControl.js +26 -11
- package/HiForm/HiFormLabel.js +3 -1
- package/HiForm/HiInput.js +20 -1
- package/HiForm/HiUpload.js +290 -45
- package/HiForm/HiUploadField.js +19 -51
- package/HiForm/HiUploadInput.js +18 -7
- package/HiSelectNew/HiSelect.js +15 -16
- package/HiSelectableList/HiSelectableList.js +9 -0
- package/HiSelectableList/HiSelectableListItem.js +3 -7
- package/README.md +1 -1
- package/es/HiCell/CellNumeric.js +1 -1
- package/es/HiDatePicker/HiDatePicker.js +41 -12
- package/es/HiDatePicker/HiDateRangePicker.js +79 -28
- package/es/HiDatePicker/HiDateRangeSelector.js +59 -37
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +8 -3
- package/es/HiDatePicker/stylesheet.js +32 -17
- package/es/HiForm/HiFormControl.js +27 -11
- package/es/HiForm/HiFormLabel.js +3 -1
- package/es/HiForm/HiInput.js +19 -1
- package/es/HiForm/HiUpload.js +276 -35
- package/es/HiForm/HiUploadField.js +19 -43
- package/es/HiForm/HiUploadInput.js +16 -7
- package/es/HiSelectNew/HiSelect.js +15 -16
- package/es/HiSelectableList/HiSelectableList.js +9 -0
- package/es/HiSelectableList/HiSelectableListItem.js +3 -7
- package/es/styles/createPalette.js +1 -1
- package/es/utils/helpers.js +15 -6
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +4 -4
- package/styles/createPalette.js +1 -1
- package/umd/hipay-material-ui.development.js +6301 -383
- package/umd/hipay-material-ui.production.min.js +2 -2
- package/utils/helpers.js +15 -5
package/utils/helpers.js
CHANGED
|
@@ -169,7 +169,7 @@ function formatNumber(number) {
|
|
|
169
169
|
break;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
var effectivePrecision = precision
|
|
172
|
+
var effectivePrecision = Number.isInteger(precision) ? precision : size === 'l' ? 2 : 0; // To locale
|
|
173
173
|
|
|
174
174
|
var options = {
|
|
175
175
|
minimumFractionDigits: effectivePrecision,
|
|
@@ -200,6 +200,7 @@ function formatCurrencyAmount(amount) {
|
|
|
200
200
|
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'l';
|
|
201
201
|
var locale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'en-EN';
|
|
202
202
|
var currency = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'EUR';
|
|
203
|
+
var precision = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
203
204
|
var value = amount;
|
|
204
205
|
var unit = ''; // Round number
|
|
205
206
|
|
|
@@ -224,12 +225,13 @@ function formatCurrencyAmount(amount) {
|
|
|
224
225
|
default:
|
|
225
226
|
value = Math.round(amount * 100) / 100;
|
|
226
227
|
break;
|
|
227
|
-
}
|
|
228
|
+
}
|
|
228
229
|
|
|
230
|
+
var effectivePrecision = Number.isInteger(precision) ? precision : size === 'l' ? 2 : 0; // To locale
|
|
229
231
|
|
|
230
232
|
var options = {
|
|
231
|
-
minimumFractionDigits:
|
|
232
|
-
maximumFractionDigits:
|
|
233
|
+
minimumFractionDigits: effectivePrecision,
|
|
234
|
+
maximumFractionDigits: effectivePrecision,
|
|
233
235
|
useGrouping: true,
|
|
234
236
|
style: 'currency',
|
|
235
237
|
currency: currency,
|
|
@@ -308,7 +310,7 @@ function getNextItemSelectable(node, direction) {
|
|
|
308
310
|
|
|
309
311
|
|
|
310
312
|
function foldAccents(toFold) {
|
|
311
|
-
return toFold.replace(/([àáâãäå])|([ç])|([èéêë])|([ìíîï])|([ñ])|([òóôõöø])|([ß])|([ùúûü])|([ÿ])|([æ])|([œ])/g, function (str, a, c, e, i, n, o, s, u, y, ae, oe) {
|
|
313
|
+
return toFold.replace(/([àáâãäå])|([ç])|([èéêë])|([ìíîï])|([ñ])|([òóôõöø])|([ß])|([ùúûü])|([ÿ])|([æ])|([œ])|([+])|([\\])|([\[])|([\]])|([\(])|([\)])|([?])|([*])/g, function (str, a, c, e, i, n, o, s, u, y, ae, oe, plus, backSlash, lc, rc, lp, rp, interogation, star) {
|
|
312
314
|
if (a) return 'a';
|
|
313
315
|
if (c) return 'c';
|
|
314
316
|
if (e) return 'e';
|
|
@@ -320,6 +322,14 @@ function foldAccents(toFold) {
|
|
|
320
322
|
if (y) return 'y';
|
|
321
323
|
if (ae) return 'ae';
|
|
322
324
|
if (oe) return 'oe';
|
|
325
|
+
if (plus) return '\\+';
|
|
326
|
+
if (backSlash) return '\\\\';
|
|
327
|
+
if (lc) return '\\[';
|
|
328
|
+
if (rc) return '\\]';
|
|
329
|
+
if (lp) return '\\(';
|
|
330
|
+
if (rp) return '\\)';
|
|
331
|
+
if (interogation) return '\\?';
|
|
332
|
+
if (star) return '\\*';
|
|
323
333
|
return str;
|
|
324
334
|
});
|
|
325
335
|
}
|