@khanacademy/math-input 0.5.4 → 0.5.5
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 +6 -0
- package/dist/es/index.js +7 -10
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +6 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/utils.js +11 -14
package/CHANGELOG.md
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Color from '@khanacademy/wonder-blocks-color';
|
|
2
2
|
import * as i18n from '@khanacademy/wonder-blocks-i18n';
|
|
3
|
+
import { getDecimalSeparator } from '@khanacademy/wonder-blocks-i18n';
|
|
3
4
|
import { StyleSheet, css } from 'aphrodite';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
6
|
import * as React from 'react';
|
|
@@ -359,17 +360,13 @@ var EchoAnimationTypes = {
|
|
|
359
360
|
LONG_FADE_ONLY: "LONG_FADE_ONLY"
|
|
360
361
|
};
|
|
361
362
|
|
|
362
|
-
//
|
|
363
|
-
//
|
|
364
|
-
//
|
|
363
|
+
// - In order to get the correct decimal separator for the current locale,
|
|
364
|
+
// the locale must bet set using `setLocale(kaLocale)` which can be
|
|
365
|
+
// imported from wonder-blocks-i18n.
|
|
366
|
+
// - Some languages/locales use different decimal separators than the ones
|
|
367
|
+
// listed here. Much of the Arab world uses U+066C.
|
|
365
368
|
|
|
366
|
-
var decimalSeparator;
|
|
367
|
-
|
|
368
|
-
if (typeof window !== "undefined" && window.icu && window.icu.getDecimalFormatSymbols().decimal_separator === ",") {
|
|
369
|
-
decimalSeparator = DecimalSeparators.COMMA;
|
|
370
|
-
} else {
|
|
371
|
-
decimalSeparator = DecimalSeparators.PERIOD;
|
|
372
|
-
}
|
|
369
|
+
var decimalSeparator = getDecimalSeparator() === "," ? DecimalSeparators.COMMA : DecimalSeparators.PERIOD;
|
|
373
370
|
|
|
374
371
|
var KeyConfigs = {
|
|
375
372
|
// Basic math keys.
|