@khanacademy/perseus 59.0.0 → 59.0.1
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/components/number-input.d.ts +0 -3
- package/dist/es/index.js +4 -5
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/util.d.ts +1 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2377,7 +2377,7 @@ const split = "x".split(/(.)/g).length ? function (str, r) {
|
|
|
2377
2377
|
* Return the first valid interpretation of 'text' as a number, in the form
|
|
2378
2378
|
* {value: 2.3, exact: true}.
|
|
2379
2379
|
*/
|
|
2380
|
-
function firstNumericalParse$1(text
|
|
2380
|
+
function firstNumericalParse$1(text) {
|
|
2381
2381
|
// TODO(alpert): This is sort of hacky...
|
|
2382
2382
|
let first;
|
|
2383
2383
|
const val = perseusScore.KhanAnswerTypes.predicate.createValidatorFunctional(function (ans) {
|
|
@@ -29256,7 +29256,6 @@ const getNumericFormat = kmath.KhanMath.getNumericFormat;
|
|
|
29256
29256
|
* Optionally takes a `size` (`"mini"`, `"small"`,` `"normal"`)
|
|
29257
29257
|
*/
|
|
29258
29258
|
class NumberInput extends React__namespace.Component {
|
|
29259
|
-
static contextType = PerseusI18nContext;
|
|
29260
29259
|
inputRef = /*#__PURE__*/React__namespace.createRef();
|
|
29261
29260
|
static propTypes = {
|
|
29262
29261
|
value: PropTypes__default.default.number,
|
|
@@ -29321,7 +29320,7 @@ class NumberInput extends React__namespace.Component {
|
|
|
29321
29320
|
const placeholder = this.props.placeholder;
|
|
29322
29321
|
return ___default.default.isFinite(placeholder) ? +placeholder : null;
|
|
29323
29322
|
}
|
|
29324
|
-
const result = firstNumericalParse(value
|
|
29323
|
+
const result = firstNumericalParse(value);
|
|
29325
29324
|
return ___default.default.isFinite(result) ? result : this.props.value;
|
|
29326
29325
|
};
|
|
29327
29326
|
|
|
@@ -29347,7 +29346,7 @@ class NumberInput extends React__namespace.Component {
|
|
|
29347
29346
|
if (value == null) {
|
|
29348
29347
|
return true;
|
|
29349
29348
|
}
|
|
29350
|
-
const val = firstNumericalParse(value
|
|
29349
|
+
const val = firstNumericalParse(value);
|
|
29351
29350
|
const checkValidity = this.props.checkValidity;
|
|
29352
29351
|
return ___default.default.isFinite(val) && checkValidity(val);
|
|
29353
29352
|
};
|
|
@@ -42292,7 +42291,7 @@ const init = function () {
|
|
|
42292
42291
|
// In dev, you'll never see the version number.
|
|
42293
42292
|
|
|
42294
42293
|
const libName = "@khanacademy/perseus";
|
|
42295
|
-
const libVersion = "59.0.
|
|
42294
|
+
const libVersion = "59.0.1";
|
|
42296
42295
|
perseusUtils.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
42297
42296
|
|
|
42298
42297
|
const apiVersion = {
|