@hipay/hipay-material-ui 2.0.0-beta.41 → 2.0.0-beta.43
Sign up to get free protection for your applications and to get access to all the features.
- package/HiAppBar/HiAppBar.js +3 -20
- package/HiButton/HiButton.js +39 -15
- package/HiColoredLabel/HiColoredLabel.js +7 -2
- package/HiDatePicker/HiDatePicker.js +0 -2
- package/HiForm/HiInput.js +19 -0
- package/HiIcon/HiIcon.js +37 -31
- package/HiSelectNew/HiNestedSelect.js +44 -4
- package/HiSelectNew/HiSelect.js +12 -4
- package/HiSelectNew/HiSelectInput.js +50 -15
- package/HiSelectableList/HiSelectableListItem.js +8 -2
- package/es/HiAppBar/HiAppBar.js +3 -18
- package/es/HiButton/HiButton.js +43 -18
- package/es/HiColoredLabel/HiColoredLabel.js +8 -3
- package/es/HiDatePicker/HiDatePicker.js +0 -2
- package/es/HiForm/HiInput.js +18 -0
- package/es/HiIcon/HiIcon.js +37 -31
- package/es/HiSelectNew/HiNestedSelect.js +44 -6
- package/es/HiSelectNew/HiSelect.js +11 -4
- package/es/HiSelectNew/HiSelectInput.js +49 -15
- package/es/HiSelectableList/HiSelectableListItem.js +8 -2
- package/es/utils/helpers.js +22 -0
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/umd/hipay-material-ui.development.js +108 -50
- package/umd/hipay-material-ui.production.min.js +2 -2
- package/utils/helpers.js +24 -0
package/utils/helpers.js
CHANGED
@@ -17,6 +17,7 @@ exports.formatNumber = formatNumber;
|
|
17
17
|
exports.formatCurrencyAmount = formatCurrencyAmount;
|
18
18
|
exports.formatRate = formatRate;
|
19
19
|
exports.getNextItemSelectable = getNextItemSelectable;
|
20
|
+
exports.foldAccents = foldAccents;
|
20
21
|
|
21
22
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
22
23
|
|
@@ -298,4 +299,27 @@ function getNextItemSelectable(node, direction) {
|
|
298
299
|
}
|
299
300
|
|
300
301
|
return node.previousSibling;
|
302
|
+
}
|
303
|
+
/**
|
304
|
+
* Retourne la chaîne de caractères passée en entrée sans les accents
|
305
|
+
* @param toFold
|
306
|
+
* @returns {*}
|
307
|
+
*/
|
308
|
+
|
309
|
+
|
310
|
+
function foldAccents(toFold) {
|
311
|
+
return toFold.replace(/([àáâãäå])|([ç])|([èéêë])|([ìíîï])|([ñ])|([òóôõöø])|([ß])|([ùúûü])|([ÿ])|([æ])|([œ])/g, function (str, a, c, e, i, n, o, s, u, y, ae, oe) {
|
312
|
+
if (a) return 'a';
|
313
|
+
if (c) return 'c';
|
314
|
+
if (e) return 'e';
|
315
|
+
if (i) return 'i';
|
316
|
+
if (n) return 'n';
|
317
|
+
if (o) return 'o';
|
318
|
+
if (s) return 's';
|
319
|
+
if (u) return 'u';
|
320
|
+
if (y) return 'y';
|
321
|
+
if (ae) return 'ae';
|
322
|
+
if (oe) return 'oe';
|
323
|
+
return str;
|
324
|
+
});
|
301
325
|
}
|