@magmamath/students-features 1.7.7 → 1.7.8
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/commonjs/features/keyboard/components/Keyboard.js +1 -1
- package/dist/commonjs/features/keyboard/components/Keyboard.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/groups/basic.constants.js +6 -6
- package/dist/commonjs/features/keyboard/constants/groups/basic.constants.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/groups/basicPlus.constants.js +13 -10
- package/dist/commonjs/features/keyboard/constants/groups/basicPlus.constants.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/groups/basicPlusPlus.constants.js +13 -10
- package/dist/commonjs/features/keyboard/constants/groups/basicPlusPlus.constants.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/groups/numpad.constants.js +44 -86
- package/dist/commonjs/features/keyboard/constants/groups/numpad.constants.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboard.helpers.js +81 -60
- package/dist/commonjs/features/keyboard/constants/keyboard.helpers.js.map +1 -1
- package/dist/commonjs/features/keyboard/types/types.js +7 -1
- package/dist/commonjs/features/keyboard/types/types.js.map +1 -1
- package/dist/module/features/keyboard/components/Keyboard.js +1 -1
- package/dist/module/features/keyboard/components/Keyboard.js.map +1 -1
- package/dist/module/features/keyboard/constants/groups/basic.constants.js +6 -6
- package/dist/module/features/keyboard/constants/groups/basic.constants.js.map +1 -1
- package/dist/module/features/keyboard/constants/groups/basicPlus.constants.js +13 -10
- package/dist/module/features/keyboard/constants/groups/basicPlus.constants.js.map +1 -1
- package/dist/module/features/keyboard/constants/groups/basicPlusPlus.constants.js +13 -10
- package/dist/module/features/keyboard/constants/groups/basicPlusPlus.constants.js.map +1 -1
- package/dist/module/features/keyboard/constants/groups/numpad.constants.js +45 -87
- package/dist/module/features/keyboard/constants/groups/numpad.constants.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboard.helpers.js +62 -41
- package/dist/module/features/keyboard/constants/keyboard.helpers.js.map +1 -1
- package/dist/module/features/keyboard/types/types.js +6 -0
- package/dist/module/features/keyboard/types/types.js.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts +2 -1
- package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/__tests__/keyboard.characterization.test.d.ts +2 -0
- package/dist/typescript/commonjs/features/keyboard/constants/__tests__/keyboard.characterization.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/keyboard/constants/groups/basic.constants.d.ts +2 -2
- package/dist/typescript/commonjs/features/keyboard/constants/groups/basic.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/groups/basicPlus.constants.d.ts +2 -2
- package/dist/typescript/commonjs/features/keyboard/constants/groups/basicPlus.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/groups/basicPlusPlus.constants.d.ts +2 -2
- package/dist/typescript/commonjs/features/keyboard/constants/groups/basicPlusPlus.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/groups/numpad.constants.d.ts +2 -2
- package/dist/typescript/commonjs/features/keyboard/constants/groups/numpad.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboard.helpers.d.ts +2 -2
- package/dist/typescript/commonjs/features/keyboard/constants/keyboard.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/types/types.d.ts +14 -0
- package/dist/typescript/commonjs/features/keyboard/types/types.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts +2 -1
- package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/__tests__/keyboard.characterization.test.d.ts +2 -0
- package/dist/typescript/module/features/keyboard/constants/__tests__/keyboard.characterization.test.d.ts.map +1 -0
- package/dist/typescript/module/features/keyboard/constants/groups/basic.constants.d.ts +2 -2
- package/dist/typescript/module/features/keyboard/constants/groups/basic.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/groups/basicPlus.constants.d.ts +2 -2
- package/dist/typescript/module/features/keyboard/constants/groups/basicPlus.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/groups/basicPlusPlus.constants.d.ts +2 -2
- package/dist/typescript/module/features/keyboard/constants/groups/basicPlusPlus.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/groups/numpad.constants.d.ts +2 -2
- package/dist/typescript/module/features/keyboard/constants/groups/numpad.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/keyboard.helpers.d.ts +2 -2
- package/dist/typescript/module/features/keyboard/constants/keyboard.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/types/types.d.ts +14 -0
- package/dist/typescript/module/features/keyboard/types/types.d.ts.map +1 -1
- package/package.json +8 -3
- package/src/features/keyboard/components/Keyboard.tsx +6 -2
- package/src/features/keyboard/constants/__tests__/__snapshots__/keyboard.characterization.test.ts.snap +17012 -0
- package/src/features/keyboard/constants/__tests__/keyboard.characterization.test.ts +50 -0
- package/src/features/keyboard/constants/groups/basic.constants.ts +10 -22
- package/src/features/keyboard/constants/groups/basicPlus.constants.ts +8 -51
- package/src/features/keyboard/constants/groups/basicPlusPlus.constants.ts +8 -63
- package/src/features/keyboard/constants/groups/numpad.constants.ts +17 -35
- package/src/features/keyboard/constants/keyboard.helpers.ts +83 -42
- package/src/features/keyboard/types/types.ts +17 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KeyboardConfig } from '@magmamath/frontend-config';
|
|
1
|
+
import { KeyboardConfig, MultiplicationSymbol } from '@magmamath/frontend-config';
|
|
2
2
|
import { ResolvedKeyboard } from '../types/types';
|
|
3
|
-
export declare const resolveKeyboard: (config: KeyboardConfig) => ResolvedKeyboard;
|
|
3
|
+
export declare const resolveKeyboard: (config: KeyboardConfig, multiplicationSymbol?: MultiplicationSymbol) => ResolvedKeyboard;
|
|
4
4
|
//# sourceMappingURL=keyboard.helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/constants/keyboard.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,
|
|
1
|
+
{"version":3,"file":"keyboard.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/constants/keyboard.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAId,oBAAoB,EAErB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAUL,gBAAgB,EACjB,MAAM,gBAAgB,CAAA;AAuHvB,eAAO,MAAM,eAAe,WAClB,cAAc,yBACC,oBAAoB,KAC1C,gBAsBF,CAAA"}
|
|
@@ -33,6 +33,20 @@ export declare enum KeyboardUnitsGroupType {
|
|
|
33
33
|
TIME = "time"
|
|
34
34
|
}
|
|
35
35
|
export type MathOperatorsGroup = Record<string, KeyboardKey>;
|
|
36
|
+
export declare enum KeySlot {
|
|
37
|
+
MULTIPLICATION = "MULTIPLICATION",
|
|
38
|
+
DECIMAL_SEPARATOR = "DECIMAL_SEPARATOR",
|
|
39
|
+
LIST_SEPARATOR = "LIST_SEPARATOR"
|
|
40
|
+
}
|
|
41
|
+
export type KeySlotRef = {
|
|
42
|
+
slot: KeySlot;
|
|
43
|
+
};
|
|
44
|
+
export type LayoutKey = KeyboardKey | KeySlotRef;
|
|
45
|
+
export type LayoutGroup = {
|
|
46
|
+
keys: LayoutKey[];
|
|
47
|
+
numOfRows?: number;
|
|
48
|
+
};
|
|
49
|
+
export type LayoutGroups = Record<string, LayoutGroup>;
|
|
36
50
|
export type KeyboardGroup = {
|
|
37
51
|
keys: KeyboardKey[];
|
|
38
52
|
numOfRows?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/features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AM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;AAE1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,WAAW,EAAE,EAAE,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;AAElE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,CAAA;IAC9C,KAAK,EAAE,MAAM,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,CAAA;CACzD,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,qBAAqB,CAAA;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,gBAAgB,CAAA;IACtB,UAAU,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAC3C,cAAc,CAAC,EAAE,CAAC,iBAAiB,EAAE,OAAO,KAAK,IAAI,CAAA;IACrD,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;CAC7B,CAAA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import { SelectOptionColor } from '@magmamath/react-native-ui';
|
|
4
|
-
import { KeyboardConfig } from '@magmamath/frontend-config';
|
|
4
|
+
import { KeyboardConfig, MultiplicationSymbol } from '@magmamath/frontend-config';
|
|
5
5
|
import { KeyboardKey, KeyboardKeyValue } from '../types/types';
|
|
6
6
|
type KeyboardProps = {
|
|
7
7
|
onKeyPress: (key: KeyboardKeyValue) => void;
|
|
8
8
|
keys: KeyboardConfig;
|
|
9
|
+
multiplicationSymbol?: MultiplicationSymbol;
|
|
9
10
|
characterType?: number;
|
|
10
11
|
style?: StyleProp<ViewStyle>;
|
|
11
12
|
color?: SelectOptionColor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keyboard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/components/Keyboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAA;AACzD,OAAO,EAAY,SAAS,EAAmC,SAAS,EAAE,MAAM,cAAc,CAAA;AAC9F,OAAO,EAA6B,iBAAiB,EAAW,MAAM,4BAA4B,CAAA;AASlG,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Keyboard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/components/Keyboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAA;AACzD,OAAO,EAAY,SAAS,EAAmC,SAAS,EAAE,MAAM,cAAc,CAAA;AAC9F,OAAO,EAA6B,iBAAiB,EAAW,MAAM,4BAA4B,CAAA;AASlG,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACjF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAI9D,KAAK,aAAa,GAAG;IACnB,UAAU,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAC3C,IAAI,EAAE,cAAc,CAAA;IACpB,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,QAAQ,6DAKlB,aAAa,sBA+Cf,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard.characterization.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/__tests__/keyboard.characterization.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const KEYBOARD_BASIC:
|
|
1
|
+
import { LayoutGroup } from '../../types/types';
|
|
2
|
+
export declare const KEYBOARD_BASIC: LayoutGroup;
|
|
3
3
|
//# sourceMappingURL=basic.constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/groups/basic.constants.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"basic.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/groups/basic.constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,cAAc,EAAE,WAS5B,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const KEYBOARD_BASIC_PLUS:
|
|
1
|
+
import { LayoutGroups } from '../../types/types';
|
|
2
|
+
export declare const KEYBOARD_BASIC_PLUS: LayoutGroups;
|
|
3
3
|
//# sourceMappingURL=basicPlus.constants.d.ts.map
|
package/dist/typescript/module/features/keyboard/constants/groups/basicPlus.constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicPlus.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/groups/basicPlus.constants.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"basicPlus.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/groups/basicPlus.constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEzD,eAAO,MAAM,mBAAmB,EAAE,YA4CjC,CAAA"}
|
package/dist/typescript/module/features/keyboard/constants/groups/basicPlusPlus.constants.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const KEYBOARD_BASIC_PLUS_PLUS:
|
|
1
|
+
import { LayoutGroups } from '../../types/types';
|
|
2
|
+
export declare const KEYBOARD_BASIC_PLUS_PLUS: LayoutGroups;
|
|
3
3
|
//# sourceMappingURL=basicPlusPlus.constants.d.ts.map
|
package/dist/typescript/module/features/keyboard/constants/groups/basicPlusPlus.constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicPlusPlus.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/groups/basicPlusPlus.constants.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"basicPlusPlus.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/groups/basicPlusPlus.constants.ts"],"names":[],"mappings":"AAMA,OAAO,EAAW,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEzD,eAAO,MAAM,wBAAwB,EAAE,YAwDtC,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const KEYBOARD_NUMPAD:
|
|
1
|
+
import { LayoutGroup } from '../../types/types';
|
|
2
|
+
export declare const KEYBOARD_NUMPAD: LayoutGroup;
|
|
3
3
|
//# sourceMappingURL=numpad.constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numpad.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/groups/numpad.constants.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"numpad.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/groups/numpad.constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,eAAe,EAAE,WAe7B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KeyboardConfig } from '@magmamath/frontend-config';
|
|
1
|
+
import { KeyboardConfig, MultiplicationSymbol } from '@magmamath/frontend-config';
|
|
2
2
|
import { ResolvedKeyboard } from '../types/types';
|
|
3
|
-
export declare const resolveKeyboard: (config: KeyboardConfig) => ResolvedKeyboard;
|
|
3
|
+
export declare const resolveKeyboard: (config: KeyboardConfig, multiplicationSymbol?: MultiplicationSymbol) => ResolvedKeyboard;
|
|
4
4
|
//# sourceMappingURL=keyboard.helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/constants/keyboard.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,
|
|
1
|
+
{"version":3,"file":"keyboard.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/constants/keyboard.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAId,oBAAoB,EAErB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAUL,gBAAgB,EACjB,MAAM,gBAAgB,CAAA;AAuHvB,eAAO,MAAM,eAAe,WAClB,cAAc,yBACC,oBAAoB,KAC1C,gBAsBF,CAAA"}
|
|
@@ -33,6 +33,20 @@ export declare enum KeyboardUnitsGroupType {
|
|
|
33
33
|
TIME = "time"
|
|
34
34
|
}
|
|
35
35
|
export type MathOperatorsGroup = Record<string, KeyboardKey>;
|
|
36
|
+
export declare enum KeySlot {
|
|
37
|
+
MULTIPLICATION = "MULTIPLICATION",
|
|
38
|
+
DECIMAL_SEPARATOR = "DECIMAL_SEPARATOR",
|
|
39
|
+
LIST_SEPARATOR = "LIST_SEPARATOR"
|
|
40
|
+
}
|
|
41
|
+
export type KeySlotRef = {
|
|
42
|
+
slot: KeySlot;
|
|
43
|
+
};
|
|
44
|
+
export type LayoutKey = KeyboardKey | KeySlotRef;
|
|
45
|
+
export type LayoutGroup = {
|
|
46
|
+
keys: LayoutKey[];
|
|
47
|
+
numOfRows?: number;
|
|
48
|
+
};
|
|
49
|
+
export type LayoutGroups = Record<string, LayoutGroup>;
|
|
36
50
|
export type KeyboardGroup = {
|
|
37
51
|
keys: KeyboardKey[];
|
|
38
52
|
numOfRows?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC5B,CAAA;AAED,oBAAY,YAAY;IACtB,eAAe,oBAAoB;IACnC,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,eAAe,oBAAoB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E,gBAAgB,KAAK,IAAI,CAAA;IAC3C,cAAc,CAAC,EAAE,CAAC,iBAAiB,EAAE,OAAO,KAAK,IAAI,CAAA;IACrD,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;CAC7B,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC5B,CAAA;AAED,oBAAY,YAAY;IACtB,eAAe,oBAAoB;IACnC,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,eAAe,oBAAoB;IACnC,SAAS,cAAc;IACvB,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,mBAAmB,wBAAwB;IAC3C,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,UAAU,eAAe;CAC1B;AAED,oBAAY,sBAAsB;IAChC,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,MAAM,MAAM,kBAAkB,G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ED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,gBAAgB,CAAA;IACtB,UAAU,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAC3C,cAAc,CAAC,EAAE,CAAC,iBAAiB,EAAE,OAAO,KAAK,IAAI,CAAA;IACrD,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;CAC7B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magmamath/students-features",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.8",
|
|
4
4
|
"description": "Magmamath features library",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -129,7 +129,11 @@
|
|
|
129
129
|
"modulePathIgnorePatterns": [
|
|
130
130
|
"<rootDir>/example/node_modules",
|
|
131
131
|
"<rootDir>/dist/"
|
|
132
|
-
]
|
|
132
|
+
],
|
|
133
|
+
"moduleNameMapper": {
|
|
134
|
+
"^react-native-svg$": "<rootDir>/jest/react-native-svg-mock.js",
|
|
135
|
+
"^@magmamath/react-native-ui$": "<rootDir>/jest/react-native-ui-mock.js"
|
|
136
|
+
}
|
|
133
137
|
},
|
|
134
138
|
"commitlint": {
|
|
135
139
|
"extends": [
|
|
@@ -140,5 +144,6 @@
|
|
|
140
144
|
"languages": "js",
|
|
141
145
|
"type": "library",
|
|
142
146
|
"version": "0.44.3"
|
|
143
|
-
}
|
|
147
|
+
},
|
|
148
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
144
149
|
}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
slideInAnimationSettings,
|
|
10
10
|
} from './MainLayout/constants'
|
|
11
11
|
import { isMobileWidth } from '../helpers'
|
|
12
|
-
import { KeyboardConfig } from '@magmamath/frontend-config'
|
|
12
|
+
import { KeyboardConfig, MultiplicationSymbol } from '@magmamath/frontend-config'
|
|
13
13
|
import { KeyboardKey, KeyboardKeyValue } from '../types/types'
|
|
14
14
|
import { resolveKeyboard } from '../constants/keyboard.helpers'
|
|
15
15
|
import { TEST_IDS } from '@magmamath/students-qa'
|
|
@@ -17,6 +17,7 @@ import { TEST_IDS } from '@magmamath/students-qa'
|
|
|
17
17
|
type KeyboardProps = {
|
|
18
18
|
onKeyPress: (key: KeyboardKeyValue) => void
|
|
19
19
|
keys: KeyboardConfig
|
|
20
|
+
multiplicationSymbol?: MultiplicationSymbol
|
|
20
21
|
characterType?: number
|
|
21
22
|
style?: StyleProp<ViewStyle>
|
|
22
23
|
color?: SelectOptionColor
|
|
@@ -32,7 +33,10 @@ export const Keyboard = ({
|
|
|
32
33
|
isMainLayoutDisabled,
|
|
33
34
|
...props
|
|
34
35
|
}: KeyboardProps) => {
|
|
35
|
-
const resolvedKeys = useMemo(
|
|
36
|
+
const resolvedKeys = useMemo(
|
|
37
|
+
() => resolveKeyboard(props.keys, props.multiplicationSymbol),
|
|
38
|
+
[props.keys, props.multiplicationSymbol],
|
|
39
|
+
)
|
|
36
40
|
const slideAnim = useRef(new Animated.Value(KEYBOARD_SLIDE_DISTANCE)).current
|
|
37
41
|
|
|
38
42
|
const { width } = useWindowDimensions()
|