@khanacademy/math-input 4.2.0 → 4.3.0
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/components/input/mathquill-types.d.ts +2 -0
- package/dist/components/input/mathquill-types.js.flow +2 -0
- package/dist/components/keypad/index.d.ts +8 -16
- package/dist/components/keypad/index.js.flow +10 -22
- package/dist/components/keypad/keypad-button.d.ts +12 -0
- package/dist/components/keypad/keypad-button.js.flow +18 -0
- package/dist/components/keypad/keypad-pages/extras-page.d.ts +9 -0
- package/dist/components/keypad/{operators-page/basic-relations-buttons.js.flow → keypad-pages/extras-page.js.flow} +3 -3
- package/dist/components/keypad/keypad-pages/geometry-page.d.ts +7 -0
- package/dist/components/keypad/{operators-page/logarithms-buttons.js.flow → keypad-pages/geometry-page.js.flow} +1 -3
- package/dist/components/keypad/keypad-pages/numbers-page.d.ts +7 -0
- package/dist/components/keypad/{operators-page/pre-algebra-buttons.js.flow → keypad-pages/numbers-page.js.flow} +1 -3
- package/dist/components/keypad/keypad-pages/operators-page.d.ts +11 -0
- package/dist/components/keypad/{operators-page/advanced-relations-buttons.js.flow → keypad-pages/operators-page.js.flow} +5 -3
- package/dist/components/keypad/shared-keys.d.ts +9 -0
- package/dist/components/keypad/{numbers-page/types.js.flow → shared-keys.js.flow} +4 -1
- package/dist/es/index.js +321 -465
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +319 -488
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
- package/src/components/input/__tests__/test-math-wrapper.ts +2 -5
- package/src/components/input/mathquill-types.ts +6 -0
- package/src/components/keypad/__tests__/keypad-button.test.tsx +4 -2
- package/src/components/keypad/index.tsx +73 -49
- package/src/components/keypad/{button.stories.tsx → keypad-button.stories.tsx} +2 -1
- package/src/components/keypad/keypad-button.tsx +128 -0
- package/src/components/keypad/keypad-mathquill.stories.tsx +9 -3
- package/src/components/keypad/keypad-pages/extras-page.tsx +34 -0
- package/src/components/keypad/keypad-pages/geometry-page.tsx +33 -0
- package/src/components/keypad/keypad-pages/numbers-page.tsx +84 -0
- package/src/components/keypad/keypad-pages/operators-page.tsx +116 -0
- package/src/components/keypad/shared-keys.tsx +78 -0
- package/tsconfig-build.tsbuildinfo +1 -1
- package/dist/components/keypad/button.d.ts +0 -12
- package/dist/components/keypad/button.js.flow +0 -18
- package/dist/components/keypad/extras-page/index.d.ts +0 -10
- package/dist/components/keypad/extras-page/index.js.flow +0 -15
- package/dist/components/keypad/geometry-page/index.d.ts +0 -9
- package/dist/components/keypad/geometry-page/index.js.flow +0 -14
- package/dist/components/keypad/keypad-page-items.d.ts +0 -26
- package/dist/components/keypad/keypad-page-items.js.flow +0 -40
- package/dist/components/keypad/numbers-page/index.d.ts +0 -10
- package/dist/components/keypad/numbers-page/index.js.flow +0 -18
- package/dist/components/keypad/numbers-page/types.d.ts +0 -4
- package/dist/components/keypad/operators-page/advanced-relations-buttons.d.ts +0 -8
- package/dist/components/keypad/operators-page/basic-relations-buttons.d.ts +0 -8
- package/dist/components/keypad/operators-page/index.d.ts +0 -10
- package/dist/components/keypad/operators-page/index.js.flow +0 -18
- package/dist/components/keypad/operators-page/logarithms-buttons.d.ts +0 -8
- package/dist/components/keypad/operators-page/pre-algebra-buttons.d.ts +0 -8
- package/dist/components/keypad/operators-page/types.d.ts +0 -6
- package/dist/components/keypad/operators-page/types.js.flow +0 -12
- package/src/components/keypad/__tests__/Button.test.tsx +0 -51
- package/src/components/keypad/button.tsx +0 -108
- package/src/components/keypad/extras-page/index.tsx +0 -27
- package/src/components/keypad/geometry-page/index.tsx +0 -89
- package/src/components/keypad/keypad-page-items.tsx +0 -118
- package/src/components/keypad/numbers-page/index.tsx +0 -136
- package/src/components/keypad/numbers-page/types.ts +0 -4
- package/src/components/keypad/operators-page/advanced-relations-buttons.tsx +0 -33
- package/src/components/keypad/operators-page/basic-relations-buttons.tsx +0 -33
- package/src/components/keypad/operators-page/index.tsx +0 -94
- package/src/components/keypad/operators-page/logarithms-buttons.tsx +0 -33
- package/src/components/keypad/operators-page/pre-algebra-buttons.tsx +0 -37
- package/src/components/keypad/operators-page/types.ts +0 -6
- /package/src/components/keypad/{keypad-pages.stories.tsx → keypad-pages/keypad-pages.stories.tsx} +0 -0
package/dist/index.js
CHANGED
|
@@ -41,7 +41,6 @@ function _interopNamespace(e) {
|
|
|
41
41
|
var Color__default = /*#__PURE__*/_interopDefaultLegacy(Color);
|
|
42
42
|
var i18n__namespace = /*#__PURE__*/_interopNamespace(i18n);
|
|
43
43
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
44
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
45
44
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
46
45
|
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
|
47
46
|
var MathQuill__default = /*#__PURE__*/_interopDefaultLegacy(MathQuill);
|
|
@@ -7524,89 +7523,6 @@ class ProvidedKeypad extends React__namespace.Component {
|
|
|
7524
7523
|
}
|
|
7525
7524
|
}
|
|
7526
7525
|
|
|
7527
|
-
const styles$1 = aphrodite.StyleSheet.create({
|
|
7528
|
-
base: {
|
|
7529
|
-
display: "flex",
|
|
7530
|
-
justifyContent: "center",
|
|
7531
|
-
alignItems: "center",
|
|
7532
|
-
boxShadow: "0px 1px 0px rgba(33, 36, 44, 0.32)",
|
|
7533
|
-
boxSizing: "border-box",
|
|
7534
|
-
background: Color__default["default"].white,
|
|
7535
|
-
borderRadius: 4,
|
|
7536
|
-
border: "1px solid transparent",
|
|
7537
|
-
flex: 1,
|
|
7538
|
-
minHeight: 42,
|
|
7539
|
-
minWidth: 42,
|
|
7540
|
-
padding: 1
|
|
7541
|
-
},
|
|
7542
|
-
hovered: {
|
|
7543
|
-
border: "1px solid ".concat(Color__default["default"].blue),
|
|
7544
|
-
padding: 1,
|
|
7545
|
-
boxShadow: "none"
|
|
7546
|
-
},
|
|
7547
|
-
focused: {
|
|
7548
|
-
border: "2px solid ".concat(Color__default["default"].blue),
|
|
7549
|
-
padding: 0,
|
|
7550
|
-
boxShadow: "none"
|
|
7551
|
-
},
|
|
7552
|
-
pressed: {
|
|
7553
|
-
border: "2px solid #1B50B3",
|
|
7554
|
-
padding: 0,
|
|
7555
|
-
background: "linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ".concat(Color__default["default"].white),
|
|
7556
|
-
boxShadow: "none"
|
|
7557
|
-
},
|
|
7558
|
-
outerBoxBase: {
|
|
7559
|
-
padding: 1,
|
|
7560
|
-
height: "100%",
|
|
7561
|
-
width: "100%",
|
|
7562
|
-
boxSizing: "border-box",
|
|
7563
|
-
borderRadius: 7,
|
|
7564
|
-
border: "2px solid transparent"
|
|
7565
|
-
},
|
|
7566
|
-
outerBoxHover: {
|
|
7567
|
-
border: "2px solid ".concat(Color__default["default"].blue)
|
|
7568
|
-
},
|
|
7569
|
-
outerBoxPressed: {
|
|
7570
|
-
border: "2px solid #1B50B3"
|
|
7571
|
-
},
|
|
7572
|
-
clickable: {
|
|
7573
|
-
width: "100%",
|
|
7574
|
-
height: "100%",
|
|
7575
|
-
boxSizing: "border-box"
|
|
7576
|
-
}
|
|
7577
|
-
});
|
|
7578
|
-
class Button extends React__namespace.Component {
|
|
7579
|
-
render() {
|
|
7580
|
-
const {
|
|
7581
|
-
onPress,
|
|
7582
|
-
ariaLabel,
|
|
7583
|
-
children,
|
|
7584
|
-
style,
|
|
7585
|
-
tintColor
|
|
7586
|
-
} = this.props;
|
|
7587
|
-
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
7588
|
-
style: style
|
|
7589
|
-
}, /*#__PURE__*/React__namespace.createElement(Clickable__default["default"], {
|
|
7590
|
-
onClick: onPress,
|
|
7591
|
-
style: styles$1.clickable,
|
|
7592
|
-
"aria-label": ariaLabel
|
|
7593
|
-
}, _ref => {
|
|
7594
|
-
let {
|
|
7595
|
-
hovered,
|
|
7596
|
-
focused,
|
|
7597
|
-
pressed
|
|
7598
|
-
} = _ref;
|
|
7599
|
-
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
7600
|
-
style: [styles$1.outerBoxBase, hovered && styles$1.outerBoxHover, pressed && styles$1.outerBoxPressed]
|
|
7601
|
-
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
7602
|
-
style: [styles$1.base, tintColor != null ? {
|
|
7603
|
-
background: tintColor
|
|
7604
|
-
} : undefined, hovered && styles$1.hovered, focused && styles$1.focused, pressed && styles$1.pressed]
|
|
7605
|
-
}, children));
|
|
7606
|
-
}));
|
|
7607
|
-
}
|
|
7608
|
-
}
|
|
7609
|
-
|
|
7610
7526
|
/*
|
|
7611
7527
|
The SVGs in this file should be treated as binary assets. If, in the future,
|
|
7612
7528
|
we need to make changes to update the color or size or shape of the glyph
|
|
@@ -8366,413 +8282,303 @@ function ButtonAsset(_ref) {
|
|
|
8366
8282
|
}
|
|
8367
8283
|
}
|
|
8368
8284
|
|
|
8369
|
-
const
|
|
8285
|
+
const KeypadButton = _ref => {
|
|
8370
8286
|
let {
|
|
8371
|
-
|
|
8287
|
+
coord,
|
|
8288
|
+
keyConfig,
|
|
8289
|
+
onClickKey,
|
|
8290
|
+
style,
|
|
8291
|
+
secondary,
|
|
8292
|
+
action
|
|
8372
8293
|
} = _ref;
|
|
8294
|
+
const tintColor = secondary ? "#F6F6F7" : action ? "#DBDCDD" : undefined;
|
|
8373
8295
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
8374
8296
|
style: {
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
display: "grid",
|
|
8379
|
-
gridTemplateColumns: "repeat(6, 1fr)",
|
|
8380
|
-
gridTemplateRows: "repeat(4, 1fr)"
|
|
8297
|
+
gridColumn: coord[0] + 1,
|
|
8298
|
+
gridRow: coord[1] + 1,
|
|
8299
|
+
...style
|
|
8381
8300
|
}
|
|
8382
|
-
},
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8301
|
+
}, /*#__PURE__*/React__namespace.createElement(Clickable__default["default"], {
|
|
8302
|
+
onClick: () => onClickKey(keyConfig.id),
|
|
8303
|
+
style: styles$1.clickable,
|
|
8304
|
+
"aria-label": keyConfig.ariaLabel
|
|
8305
|
+
}, _ref2 => {
|
|
8306
|
+
let {
|
|
8307
|
+
hovered,
|
|
8308
|
+
focused,
|
|
8309
|
+
pressed
|
|
8310
|
+
} = _ref2;
|
|
8311
|
+
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
8312
|
+
style: [styles$1.outerBoxBase, hovered && styles$1.outerBoxHover, pressed && styles$1.outerBoxPressed]
|
|
8313
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
8314
|
+
style: [styles$1.base, tintColor != null ? {
|
|
8315
|
+
background: tintColor
|
|
8316
|
+
} : undefined, hovered && styles$1.hovered, focused && styles$1.focused, pressed && styles$1.pressed]
|
|
8317
|
+
}, /*#__PURE__*/React__namespace.createElement(ButtonAsset, {
|
|
8318
|
+
id: keyConfig.id
|
|
8319
|
+
})));
|
|
8398
8320
|
}));
|
|
8399
8321
|
};
|
|
8400
|
-
const
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
}
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
borderRadius: 4,
|
|
8452
|
-
border: "1px solid transparent"
|
|
8453
|
-
}
|
|
8454
|
-
}))));
|
|
8455
|
-
};
|
|
8322
|
+
const styles$1 = aphrodite.StyleSheet.create({
|
|
8323
|
+
base: {
|
|
8324
|
+
display: "flex",
|
|
8325
|
+
justifyContent: "center",
|
|
8326
|
+
alignItems: "center",
|
|
8327
|
+
boxShadow: "0px 1px 0px rgba(33, 36, 44, 0.32)",
|
|
8328
|
+
boxSizing: "border-box",
|
|
8329
|
+
background: Color__default["default"].white,
|
|
8330
|
+
borderRadius: 4,
|
|
8331
|
+
border: "1px solid transparent",
|
|
8332
|
+
flex: 1,
|
|
8333
|
+
minHeight: 42,
|
|
8334
|
+
minWidth: 42,
|
|
8335
|
+
padding: 1
|
|
8336
|
+
},
|
|
8337
|
+
hovered: {
|
|
8338
|
+
border: "1px solid ".concat(Color__default["default"].blue),
|
|
8339
|
+
padding: 1,
|
|
8340
|
+
boxShadow: "none"
|
|
8341
|
+
},
|
|
8342
|
+
focused: {
|
|
8343
|
+
border: "2px solid ".concat(Color__default["default"].blue),
|
|
8344
|
+
padding: 0,
|
|
8345
|
+
boxShadow: "none"
|
|
8346
|
+
},
|
|
8347
|
+
pressed: {
|
|
8348
|
+
border: "2px solid #1B50B3",
|
|
8349
|
+
padding: 0,
|
|
8350
|
+
background: "linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ".concat(Color__default["default"].white),
|
|
8351
|
+
boxShadow: "none"
|
|
8352
|
+
},
|
|
8353
|
+
outerBoxBase: {
|
|
8354
|
+
padding: 1,
|
|
8355
|
+
height: "100%",
|
|
8356
|
+
width: "100%",
|
|
8357
|
+
boxSizing: "border-box",
|
|
8358
|
+
borderRadius: 7,
|
|
8359
|
+
border: "2px solid transparent"
|
|
8360
|
+
},
|
|
8361
|
+
outerBoxHover: {
|
|
8362
|
+
border: "2px solid ".concat(Color__default["default"].blue)
|
|
8363
|
+
},
|
|
8364
|
+
outerBoxPressed: {
|
|
8365
|
+
border: "2px solid #1B50B3"
|
|
8366
|
+
},
|
|
8367
|
+
clickable: {
|
|
8368
|
+
width: "100%",
|
|
8369
|
+
height: "100%",
|
|
8370
|
+
boxSizing: "border-box"
|
|
8371
|
+
}
|
|
8372
|
+
});
|
|
8456
8373
|
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8374
|
+
const columns = 4;
|
|
8375
|
+
function ExtrasPage(props) {
|
|
8376
|
+
const {
|
|
8377
|
+
extraKeys,
|
|
8378
|
+
onClickKey
|
|
8379
|
+
} = props;
|
|
8380
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, extraKeys.map((key, i) => {
|
|
8381
|
+
// Map 1D array to Cartesian coordinates
|
|
8382
|
+
const coordX = i % columns;
|
|
8383
|
+
const coordY = i / columns;
|
|
8384
|
+
return /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8464
8385
|
key: key,
|
|
8465
8386
|
keyConfig: KeyConfigs[key],
|
|
8466
|
-
onClickKey: onClickKey
|
|
8467
|
-
})));
|
|
8468
|
-
}
|
|
8469
|
-
}
|
|
8470
|
-
|
|
8471
|
-
class GeometryPage extends React__namespace.Component {
|
|
8472
|
-
render() {
|
|
8473
|
-
const {
|
|
8474
|
-
onClickKey
|
|
8475
|
-
} = this.props;
|
|
8476
|
-
return /*#__PURE__*/React__namespace.createElement(KeypadPageContainer, null, /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8477
|
-
keyConfig: KeyConfigs.SIN,
|
|
8478
|
-
onClickKey: onClickKey
|
|
8479
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8480
|
-
keyConfig: KeyConfigs.COS,
|
|
8481
|
-
onClickKey: onClickKey
|
|
8482
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8483
|
-
keyConfig: KeyConfigs.TAN,
|
|
8484
|
-
onClickKey: onClickKey
|
|
8485
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8486
|
-
keyConfig: KeyConfigs.LEFT_PAREN,
|
|
8487
|
-
onClickKey: onClickKey,
|
|
8488
|
-
style: {
|
|
8489
|
-
gridColumn: 5
|
|
8490
|
-
}
|
|
8491
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8492
|
-
keyConfig: KeyConfigs.RIGHT_PAREN,
|
|
8493
|
-
onClickKey: onClickKey,
|
|
8494
|
-
style: {
|
|
8495
|
-
gridColumn: 6
|
|
8496
|
-
}
|
|
8497
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8498
|
-
keyConfig: KeyConfigs.x,
|
|
8499
|
-
onClickKey: onClickKey,
|
|
8500
|
-
style: {
|
|
8501
|
-
gridColumn: 5
|
|
8502
|
-
}
|
|
8503
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8504
|
-
keyConfig: KeyConfigs.FRAC_INCLUSIVE,
|
|
8505
|
-
onClickKey: onClickKey,
|
|
8506
|
-
style: {
|
|
8507
|
-
gridColumn: 6
|
|
8508
|
-
}
|
|
8509
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8510
|
-
keyConfig: KeyConfigs.PI,
|
|
8511
|
-
onClickKey: onClickKey,
|
|
8512
|
-
style: {
|
|
8513
|
-
gridColumn: 5
|
|
8514
|
-
}
|
|
8515
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadActionButton, {
|
|
8516
|
-
keyConfig: KeyConfigs.BACKSPACE,
|
|
8517
|
-
style: {
|
|
8518
|
-
gridColumn: "6"
|
|
8519
|
-
},
|
|
8520
|
-
onClickKey: onClickKey
|
|
8521
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadActionButton, {
|
|
8522
|
-
keyConfig: KeyConfigs.DISMISS,
|
|
8523
|
-
style: {
|
|
8524
|
-
gridColumn: "6"
|
|
8525
|
-
},
|
|
8526
|
-
onClickKey: onClickKey
|
|
8527
|
-
}));
|
|
8528
|
-
}
|
|
8529
|
-
}
|
|
8530
|
-
|
|
8531
|
-
class NumbersPage extends React__namespace.Component {
|
|
8532
|
-
render() {
|
|
8533
|
-
const {
|
|
8534
|
-
onClickKey
|
|
8535
|
-
} = this.props;
|
|
8536
|
-
return /*#__PURE__*/React__namespace.createElement(KeypadPageContainer, null, /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8537
|
-
keyConfig: KeyConfigs.NUM_7,
|
|
8538
|
-
onClickKey: onClickKey
|
|
8539
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8540
|
-
keyConfig: KeyConfigs.NUM_8,
|
|
8541
|
-
onClickKey: onClickKey
|
|
8542
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8543
|
-
keyConfig: KeyConfigs.NUM_9,
|
|
8544
|
-
onClickKey: onClickKey
|
|
8545
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8546
|
-
keyConfig: KeyConfigs.DIVIDE,
|
|
8547
|
-
style: this.props.divisionKey ? {
|
|
8548
|
-
gridColumn: "4",
|
|
8549
|
-
gridRow: "1"
|
|
8550
|
-
} : {
|
|
8551
|
-
display: "none"
|
|
8552
|
-
},
|
|
8553
|
-
onClickKey: onClickKey
|
|
8554
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8555
|
-
keyConfig: this.props.multiplicationDot ? KeyConfigs.CDOT : KeyConfigs.TIMES,
|
|
8556
|
-
style: this.props.divisionKey && {
|
|
8557
|
-
gridColumn: "4",
|
|
8558
|
-
gridRow: "2"
|
|
8559
|
-
},
|
|
8560
|
-
onClickKey: onClickKey
|
|
8561
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8562
|
-
keyConfig: KeyConfigs.LEFT_PAREN,
|
|
8563
|
-
onClickKey: onClickKey
|
|
8564
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8565
|
-
keyConfig: KeyConfigs.RIGHT_PAREN,
|
|
8566
|
-
onClickKey: onClickKey
|
|
8567
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8568
|
-
keyConfig: KeyConfigs.NUM_4,
|
|
8569
|
-
onClickKey: onClickKey
|
|
8570
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8571
|
-
keyConfig: KeyConfigs.NUM_5,
|
|
8572
|
-
onClickKey: onClickKey
|
|
8573
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8574
|
-
keyConfig: KeyConfigs.NUM_6,
|
|
8575
|
-
onClickKey: onClickKey
|
|
8576
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8577
|
-
keyConfig: KeyConfigs.MINUS,
|
|
8578
|
-
style: this.props.divisionKey && {
|
|
8579
|
-
gridColumn: "4",
|
|
8580
|
-
gridRow: "3"
|
|
8581
|
-
},
|
|
8582
|
-
onClickKey: onClickKey
|
|
8583
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8584
|
-
keyConfig: KeyConfigs.FRAC_INCLUSIVE,
|
|
8585
8387
|
onClickKey: onClickKey,
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8590
|
-
keyConfig: KeyConfigs.NUM_1,
|
|
8591
|
-
onClickKey: onClickKey
|
|
8592
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8593
|
-
keyConfig: KeyConfigs.NUM_2,
|
|
8594
|
-
onClickKey: onClickKey
|
|
8595
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8596
|
-
keyConfig: KeyConfigs.NUM_3,
|
|
8597
|
-
onClickKey: onClickKey
|
|
8598
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8599
|
-
keyConfig: KeyConfigs.PLUS,
|
|
8600
|
-
style: this.props.divisionKey ? {
|
|
8601
|
-
gridColumn: "4",
|
|
8602
|
-
gridRow: "4"
|
|
8603
|
-
} : {
|
|
8604
|
-
gridColumn: "4",
|
|
8605
|
-
gridRowStart: "3",
|
|
8606
|
-
gridRowEnd: "5"
|
|
8607
|
-
},
|
|
8608
|
-
onClickKey: onClickKey
|
|
8609
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadActionButton, {
|
|
8610
|
-
keyConfig: KeyConfigs.BACKSPACE,
|
|
8611
|
-
style: {
|
|
8612
|
-
gridColumn: "6"
|
|
8613
|
-
},
|
|
8614
|
-
onClickKey: onClickKey
|
|
8615
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8616
|
-
keyConfig: KeyConfigs.NUM_0,
|
|
8617
|
-
onClickKey: onClickKey
|
|
8618
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8619
|
-
keyConfig: KeyConfigs.DECIMAL,
|
|
8620
|
-
onClickKey: onClickKey
|
|
8621
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8622
|
-
keyConfig: KeyConfigs.NEGATIVE,
|
|
8623
|
-
onClickKey: onClickKey
|
|
8624
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadActionButton, {
|
|
8625
|
-
keyConfig: KeyConfigs.DISMISS,
|
|
8626
|
-
style: {
|
|
8627
|
-
gridColumn: "6"
|
|
8628
|
-
},
|
|
8629
|
-
onClickKey: onClickKey
|
|
8630
|
-
}));
|
|
8631
|
-
}
|
|
8388
|
+
coord: [coordX, coordY]
|
|
8389
|
+
});
|
|
8390
|
+
}));
|
|
8632
8391
|
}
|
|
8633
8392
|
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
onClickKey
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8393
|
+
function GeometryPage(props) {
|
|
8394
|
+
const {
|
|
8395
|
+
onClickKey
|
|
8396
|
+
} = props;
|
|
8397
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8398
|
+
keyConfig: KeyConfigs.SIN,
|
|
8399
|
+
onClickKey: onClickKey,
|
|
8400
|
+
coord: [0, 0]
|
|
8401
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8402
|
+
keyConfig: KeyConfigs.COS,
|
|
8403
|
+
onClickKey: onClickKey,
|
|
8404
|
+
coord: [1, 0]
|
|
8405
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8406
|
+
keyConfig: KeyConfigs.TAN,
|
|
8407
|
+
onClickKey: onClickKey,
|
|
8408
|
+
coord: [2, 0]
|
|
8650
8409
|
}));
|
|
8651
|
-
}
|
|
8410
|
+
}
|
|
8652
8411
|
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
onClickKey
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8412
|
+
function NumbersPage(props) {
|
|
8413
|
+
const {
|
|
8414
|
+
onClickKey
|
|
8415
|
+
} = props;
|
|
8416
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8417
|
+
keyConfig: KeyConfigs.NUM_7,
|
|
8418
|
+
onClickKey: onClickKey,
|
|
8419
|
+
coord: [0, 0]
|
|
8420
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8421
|
+
keyConfig: KeyConfigs.NUM_8,
|
|
8422
|
+
onClickKey: onClickKey,
|
|
8423
|
+
coord: [1, 0]
|
|
8424
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8425
|
+
keyConfig: KeyConfigs.NUM_9,
|
|
8426
|
+
onClickKey: onClickKey,
|
|
8427
|
+
coord: [2, 0]
|
|
8428
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8429
|
+
keyConfig: KeyConfigs.NUM_4,
|
|
8430
|
+
onClickKey: onClickKey,
|
|
8431
|
+
coord: [0, 1]
|
|
8432
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8433
|
+
keyConfig: KeyConfigs.NUM_5,
|
|
8434
|
+
onClickKey: onClickKey,
|
|
8435
|
+
coord: [1, 1]
|
|
8436
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8437
|
+
keyConfig: KeyConfigs.NUM_6,
|
|
8438
|
+
onClickKey: onClickKey,
|
|
8439
|
+
coord: [2, 1]
|
|
8440
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8441
|
+
keyConfig: KeyConfigs.NUM_1,
|
|
8442
|
+
onClickKey: onClickKey,
|
|
8443
|
+
coord: [0, 2]
|
|
8444
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8445
|
+
keyConfig: KeyConfigs.NUM_2,
|
|
8446
|
+
onClickKey: onClickKey,
|
|
8447
|
+
coord: [1, 2]
|
|
8448
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8449
|
+
keyConfig: KeyConfigs.NUM_3,
|
|
8450
|
+
onClickKey: onClickKey,
|
|
8451
|
+
coord: [2, 2]
|
|
8452
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8453
|
+
keyConfig: KeyConfigs.NUM_0,
|
|
8454
|
+
onClickKey: onClickKey,
|
|
8455
|
+
coord: [0, 3]
|
|
8456
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8457
|
+
keyConfig: KeyConfigs.DECIMAL,
|
|
8458
|
+
onClickKey: onClickKey,
|
|
8459
|
+
coord: [1, 3]
|
|
8460
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8461
|
+
keyConfig: KeyConfigs.NEGATIVE,
|
|
8462
|
+
onClickKey: onClickKey,
|
|
8463
|
+
coord: [2, 3]
|
|
8669
8464
|
}));
|
|
8670
|
-
}
|
|
8465
|
+
}
|
|
8671
8466
|
|
|
8672
|
-
|
|
8673
|
-
|
|
8467
|
+
function OperatorsPage(props) {
|
|
8468
|
+
const {
|
|
8674
8469
|
onClickKey,
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
}
|
|
8470
|
+
preAlgebra,
|
|
8471
|
+
logarithms,
|
|
8472
|
+
basicRelations,
|
|
8473
|
+
advancedRelations
|
|
8474
|
+
} = props;
|
|
8475
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, preAlgebra && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8476
|
+
keyConfig: KeyConfigs.EXP_2,
|
|
8477
|
+
onClickKey: onClickKey,
|
|
8478
|
+
coord: [0, 0]
|
|
8479
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8480
|
+
keyConfig: KeyConfigs.EXP,
|
|
8481
|
+
onClickKey: onClickKey,
|
|
8482
|
+
coord: [1, 0]
|
|
8483
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8484
|
+
keyConfig: KeyConfigs.SQRT,
|
|
8485
|
+
onClickKey: onClickKey,
|
|
8486
|
+
coord: [2, 0]
|
|
8487
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8488
|
+
keyConfig: KeyConfigs.RADICAL,
|
|
8489
|
+
onClickKey: onClickKey,
|
|
8490
|
+
coord: [3, 0]
|
|
8491
|
+
})), logarithms && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8680
8492
|
keyConfig: KeyConfigs.LOG,
|
|
8681
|
-
onClickKey: onClickKey
|
|
8682
|
-
|
|
8493
|
+
onClickKey: onClickKey,
|
|
8494
|
+
coord: [0, 1]
|
|
8495
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8683
8496
|
keyConfig: KeyConfigs.LOG_N,
|
|
8684
|
-
onClickKey: onClickKey
|
|
8685
|
-
|
|
8497
|
+
onClickKey: onClickKey,
|
|
8498
|
+
coord: [1, 1]
|
|
8499
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8686
8500
|
keyConfig: KeyConfigs.LN,
|
|
8687
|
-
onClickKey: onClickKey
|
|
8688
|
-
|
|
8689
|
-
}
|
|
8501
|
+
onClickKey: onClickKey,
|
|
8502
|
+
coord: [2, 1]
|
|
8503
|
+
})), basicRelations && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8504
|
+
keyConfig: KeyConfigs.EQUAL,
|
|
8505
|
+
onClickKey: onClickKey,
|
|
8506
|
+
coord: [0, 2]
|
|
8507
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8508
|
+
keyConfig: KeyConfigs.LT,
|
|
8509
|
+
onClickKey: onClickKey,
|
|
8510
|
+
coord: [1, 2]
|
|
8511
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8512
|
+
keyConfig: KeyConfigs.GT,
|
|
8513
|
+
onClickKey: onClickKey,
|
|
8514
|
+
coord: [2, 2]
|
|
8515
|
+
})), advancedRelations && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8516
|
+
keyConfig: KeyConfigs.NEQ,
|
|
8517
|
+
onClickKey: onClickKey,
|
|
8518
|
+
coord: [0, 3]
|
|
8519
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8520
|
+
keyConfig: KeyConfigs.LEQ,
|
|
8521
|
+
onClickKey: onClickKey,
|
|
8522
|
+
coord: [1, 3]
|
|
8523
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8524
|
+
keyConfig: KeyConfigs.GEQ,
|
|
8525
|
+
onClickKey: onClickKey,
|
|
8526
|
+
coord: [2, 3]
|
|
8527
|
+
})));
|
|
8528
|
+
}
|
|
8690
8529
|
|
|
8691
|
-
|
|
8692
|
-
|
|
8530
|
+
function SharedKeys(props) {
|
|
8531
|
+
const {
|
|
8693
8532
|
onClickKey,
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
}), /*#__PURE__*/
|
|
8708
|
-
keyConfig: KeyConfigs.
|
|
8709
|
-
onClickKey: onClickKey
|
|
8533
|
+
divisionKey,
|
|
8534
|
+
multiplicationDot
|
|
8535
|
+
} = props;
|
|
8536
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8537
|
+
keyConfig: KeyConfigs.PLUS,
|
|
8538
|
+
onClickKey: onClickKey,
|
|
8539
|
+
coord: [4, 0],
|
|
8540
|
+
secondary: true
|
|
8541
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8542
|
+
keyConfig: KeyConfigs.MINUS,
|
|
8543
|
+
onClickKey: onClickKey,
|
|
8544
|
+
coord: [5, 0],
|
|
8545
|
+
secondary: true
|
|
8546
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8547
|
+
keyConfig: multiplicationDot ? KeyConfigs.CDOT : KeyConfigs.TIMES,
|
|
8548
|
+
onClickKey: onClickKey,
|
|
8549
|
+
coord: [4, 1],
|
|
8550
|
+
secondary: true
|
|
8551
|
+
}), divisionKey && /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8552
|
+
keyConfig: KeyConfigs.DIVIDE,
|
|
8553
|
+
onClickKey: onClickKey,
|
|
8554
|
+
coord: [5, 1],
|
|
8555
|
+
secondary: true
|
|
8556
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8557
|
+
keyConfig: KeyConfigs.LEFT_PAREN,
|
|
8558
|
+
onClickKey: onClickKey,
|
|
8559
|
+
coord: [4, 2],
|
|
8560
|
+
secondary: true
|
|
8561
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8562
|
+
keyConfig: KeyConfigs.RIGHT_PAREN,
|
|
8563
|
+
onClickKey: onClickKey,
|
|
8564
|
+
coord: [5, 2],
|
|
8565
|
+
secondary: true
|
|
8566
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8567
|
+
keyConfig: KeyConfigs.FRAC_INCLUSIVE,
|
|
8568
|
+
onClickKey: onClickKey,
|
|
8569
|
+
coord: [4, 3],
|
|
8570
|
+
secondary: true
|
|
8571
|
+
}), /*#__PURE__*/React__namespace.createElement(KeypadButton, {
|
|
8572
|
+
keyConfig: KeyConfigs.BACKSPACE,
|
|
8573
|
+
onClickKey: onClickKey,
|
|
8574
|
+
coord: [5, 3],
|
|
8575
|
+
action: true
|
|
8710
8576
|
}));
|
|
8711
|
-
};
|
|
8712
|
-
|
|
8713
|
-
class OperatorsPage extends React__namespace.Component {
|
|
8714
|
-
render() {
|
|
8715
|
-
const {
|
|
8716
|
-
onClickKey
|
|
8717
|
-
} = this.props;
|
|
8718
|
-
return /*#__PURE__*/React__namespace.createElement(KeypadPageContainer, null, /*#__PURE__*/React__namespace.createElement(PreAlgebra, {
|
|
8719
|
-
onClickKey: onClickKey,
|
|
8720
|
-
placeholder: !this.props.preAlgebra
|
|
8721
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8722
|
-
keyConfig: KeyConfigs.LEFT_PAREN,
|
|
8723
|
-
onClickKey: onClickKey
|
|
8724
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8725
|
-
keyConfig: KeyConfigs.RIGHT_PAREN,
|
|
8726
|
-
onClickKey: onClickKey
|
|
8727
|
-
}), /*#__PURE__*/React__namespace.createElement(Logarithms, {
|
|
8728
|
-
onClickKey: onClickKey,
|
|
8729
|
-
placeholder: !this.props.logarithms
|
|
8730
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8731
|
-
keyConfig: KeyConfigs.x,
|
|
8732
|
-
onClickKey: onClickKey,
|
|
8733
|
-
style: {
|
|
8734
|
-
gridColumn: 5
|
|
8735
|
-
}
|
|
8736
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8737
|
-
keyConfig: KeyConfigs.FRAC_INCLUSIVE,
|
|
8738
|
-
onClickKey: onClickKey,
|
|
8739
|
-
style: {
|
|
8740
|
-
gridColumn: 6
|
|
8741
|
-
}
|
|
8742
|
-
}), /*#__PURE__*/React__namespace.createElement(BasicRelations, {
|
|
8743
|
-
onClickKey: onClickKey,
|
|
8744
|
-
placeholder: !this.props.basicRelations
|
|
8745
|
-
}), /*#__PURE__*/React__namespace.createElement(SecondaryKeypadButton, {
|
|
8746
|
-
keyConfig: KeyConfigs.PI,
|
|
8747
|
-
onClickKey: onClickKey,
|
|
8748
|
-
style: {
|
|
8749
|
-
gridColumn: 5
|
|
8750
|
-
}
|
|
8751
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadActionButton, {
|
|
8752
|
-
keyConfig: KeyConfigs.BACKSPACE,
|
|
8753
|
-
style: {
|
|
8754
|
-
gridColumn: 6
|
|
8755
|
-
},
|
|
8756
|
-
onClickKey: onClickKey
|
|
8757
|
-
}), /*#__PURE__*/React__namespace.createElement(AdvancedRelations, {
|
|
8758
|
-
onClickKey: onClickKey,
|
|
8759
|
-
placeholder: !this.props.advancedRelations
|
|
8760
|
-
}), /*#__PURE__*/React__namespace.createElement(KeypadActionButton, {
|
|
8761
|
-
keyConfig: KeyConfigs.DISMISS,
|
|
8762
|
-
style: {
|
|
8763
|
-
gridColumn: "6"
|
|
8764
|
-
},
|
|
8765
|
-
onClickKey: onClickKey
|
|
8766
|
-
}));
|
|
8767
|
-
}
|
|
8768
8577
|
}
|
|
8769
8578
|
|
|
8770
8579
|
function allPages(props) {
|
|
8771
8580
|
var _props$extraKeys;
|
|
8772
8581
|
const pages = ["Numbers"];
|
|
8773
|
-
if ((_props$extraKeys = props.extraKeys) !== null && _props$extraKeys !== void 0 && _props$extraKeys.length) {
|
|
8774
|
-
pages.push("Extras");
|
|
8775
|
-
}
|
|
8776
8582
|
if (
|
|
8777
8583
|
// OperatorsButtonSets
|
|
8778
8584
|
props.preAlgebra || props.logarithms || props.basicRelations || props.advancedRelations) {
|
|
@@ -8781,38 +8587,63 @@ function allPages(props) {
|
|
|
8781
8587
|
if (props.trigonometry) {
|
|
8782
8588
|
pages.push("Geometry");
|
|
8783
8589
|
}
|
|
8590
|
+
if ((_props$extraKeys = props.extraKeys) !== null && _props$extraKeys !== void 0 && _props$extraKeys.length) {
|
|
8591
|
+
pages.push("Extras");
|
|
8592
|
+
}
|
|
8784
8593
|
return pages;
|
|
8785
8594
|
}
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
}
|
|
8595
|
+
function Keypad(props) {
|
|
8596
|
+
const [selectedPage, setSelectedPage] = React__namespace.useState("Numbers");
|
|
8597
|
+
const availablePages = allPages(props);
|
|
8598
|
+
const {
|
|
8599
|
+
onClickKey,
|
|
8600
|
+
extraKeys = [],
|
|
8601
|
+
multiplicationDot,
|
|
8602
|
+
divisionKey,
|
|
8603
|
+
preAlgebra,
|
|
8604
|
+
logarithms,
|
|
8605
|
+
basicRelations,
|
|
8606
|
+
advancedRelations
|
|
8607
|
+
} = props;
|
|
8608
|
+
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, /*#__PURE__*/React__namespace.createElement(Tabbar, {
|
|
8609
|
+
items: availablePages,
|
|
8610
|
+
selectedItem: selectedPage,
|
|
8611
|
+
onSelectItem: tabbarItem => {
|
|
8612
|
+
setSelectedPage(tabbarItem);
|
|
8613
|
+
},
|
|
8614
|
+
style: styles.tabbar
|
|
8615
|
+
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
8616
|
+
style: styles.grid
|
|
8617
|
+
}, selectedPage === "Numbers" && /*#__PURE__*/React__namespace.createElement(NumbersPage, {
|
|
8618
|
+
onClickKey: onClickKey
|
|
8619
|
+
}), selectedPage === "Extras" && /*#__PURE__*/React__namespace.createElement(ExtrasPage, {
|
|
8620
|
+
onClickKey: onClickKey,
|
|
8621
|
+
extraKeys: extraKeys
|
|
8622
|
+
}), selectedPage === "Operators" && /*#__PURE__*/React__namespace.createElement(OperatorsPage, {
|
|
8623
|
+
onClickKey: onClickKey,
|
|
8624
|
+
preAlgebra: preAlgebra,
|
|
8625
|
+
logarithms: logarithms,
|
|
8626
|
+
basicRelations: basicRelations,
|
|
8627
|
+
advancedRelations: advancedRelations
|
|
8628
|
+
}), selectedPage === "Geometry" && /*#__PURE__*/React__namespace.createElement(GeometryPage, {
|
|
8629
|
+
onClickKey: onClickKey
|
|
8630
|
+
}), /*#__PURE__*/React__namespace.createElement(SharedKeys, {
|
|
8631
|
+
onClickKey: onClickKey,
|
|
8632
|
+
multiplicationDot: multiplicationDot,
|
|
8633
|
+
divisionKey: divisionKey
|
|
8634
|
+
})));
|
|
8809
8635
|
}
|
|
8810
|
-
_defineProperty(Keypad, "defaultProps", {
|
|
8811
|
-
extraKeys: []
|
|
8812
|
-
});
|
|
8813
8636
|
const styles = aphrodite.StyleSheet.create({
|
|
8814
8637
|
tabbar: {
|
|
8815
8638
|
background: Color__default["default"].white
|
|
8639
|
+
},
|
|
8640
|
+
grid: {
|
|
8641
|
+
display: "grid",
|
|
8642
|
+
gridTemplateColumns: "repeat(6, 1fr)",
|
|
8643
|
+
gridTemplateRows: "repeat(4, 1fr)",
|
|
8644
|
+
backgroundColor: "#DBDCDD",
|
|
8645
|
+
maxHeight: 200,
|
|
8646
|
+
maxWidth: 300
|
|
8816
8647
|
}
|
|
8817
8648
|
});
|
|
8818
8649
|
|