@magmamath/students-features 0.9.2 → 0.9.4-rc.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.
Files changed (187) hide show
  1. package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +9 -2
  2. package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
  3. package/dist/commonjs/features/keyboard/components/AlgebraLayout/helpers.js +13 -3
  4. package/dist/commonjs/features/keyboard/components/AlgebraLayout/helpers.js.map +1 -1
  5. package/dist/commonjs/features/keyboard/components/BasicPlusLayout/BasicPlusLayout.js +7 -1
  6. package/dist/commonjs/features/keyboard/components/BasicPlusLayout/BasicPlusLayout.js.map +1 -1
  7. package/dist/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.js +2 -4
  8. package/dist/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.js.map +1 -1
  9. package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js +2 -2
  10. package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js.map +1 -1
  11. package/dist/commonjs/features/keyboard/components/Keyboard.js +2 -4
  12. package/dist/commonjs/features/keyboard/components/Keyboard.js.map +1 -1
  13. package/dist/commonjs/features/keyboard/components/KeysList/KeysList.js +3 -2
  14. package/dist/commonjs/features/keyboard/components/KeysList/KeysList.js.map +1 -1
  15. package/dist/commonjs/features/keyboard/components/KeysList/helpers.js +3 -2
  16. package/dist/commonjs/features/keyboard/components/KeysList/helpers.js.map +1 -1
  17. package/dist/commonjs/features/keyboard/components/MainLayout.js +75 -0
  18. package/dist/commonjs/features/keyboard/components/MainLayout.js.map +1 -0
  19. package/dist/commonjs/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.js +24 -0
  20. package/dist/commonjs/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.js.map +1 -0
  21. package/dist/commonjs/features/keyboard/components/UnderlinedLayout/keyboardGroups.js +13 -0
  22. package/dist/commonjs/features/keyboard/components/UnderlinedLayout/keyboardGroups.js.map +1 -0
  23. package/dist/commonjs/features/keyboard/components/UnitsLayout/UnitsLayout.js +6 -2
  24. package/dist/commonjs/features/keyboard/components/UnitsLayout/UnitsLayout.js.map +1 -1
  25. package/dist/commonjs/features/keyboard/components/UnitsLayout/helpers.js +10 -3
  26. package/dist/commonjs/features/keyboard/components/UnitsLayout/helpers.js.map +1 -1
  27. package/dist/commonjs/features/keyboard/components/constants.js +1 -8
  28. package/dist/commonjs/features/keyboard/components/constants.js.map +1 -1
  29. package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js +3 -1
  30. package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
  31. package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js +2 -2
  32. package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js.map +1 -1
  33. package/dist/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.js +27 -0
  34. package/dist/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.js.map +1 -1
  35. package/dist/commonjs/features/keyboard/types/keyboardGroupIds.js +1 -0
  36. package/dist/commonjs/features/keyboard/types/keyboardGroupIds.js.map +1 -1
  37. package/dist/commonjs/features/keyboard/types/types.js +1 -0
  38. package/dist/commonjs/features/keyboard/types/types.js.map +1 -1
  39. package/dist/commonjs/shared/icons/keyboard/UnderlinedOneIcon/UnderlinedOneIcon.js +34 -0
  40. package/dist/commonjs/shared/icons/keyboard/UnderlinedOneIcon/UnderlinedOneIcon.js.map +1 -0
  41. package/dist/commonjs/shared/icons/keyboard/UnderlinedTenIcon/UnderlinedTenIcon.js +34 -0
  42. package/dist/commonjs/shared/icons/keyboard/UnderlinedTenIcon/UnderlinedTenIcon.js.map +1 -0
  43. package/dist/commonjs/shared/icons/keyboard/UnderlinedUIcon/UnderlinedUIcon.js +34 -0
  44. package/dist/commonjs/shared/icons/keyboard/UnderlinedUIcon/UnderlinedUIcon.js.map +1 -0
  45. package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +9 -2
  46. package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
  47. package/dist/module/features/keyboard/components/AlgebraLayout/helpers.js +13 -3
  48. package/dist/module/features/keyboard/components/AlgebraLayout/helpers.js.map +1 -1
  49. package/dist/module/features/keyboard/components/BasicPlusLayout/BasicPlusLayout.js +8 -2
  50. package/dist/module/features/keyboard/components/BasicPlusLayout/BasicPlusLayout.js.map +1 -1
  51. package/dist/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.js +2 -4
  52. package/dist/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.js.map +1 -1
  53. package/dist/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js +2 -2
  54. package/dist/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js.map +1 -1
  55. package/dist/module/features/keyboard/components/Keyboard.js +2 -4
  56. package/dist/module/features/keyboard/components/Keyboard.js.map +1 -1
  57. package/dist/module/features/keyboard/components/KeysList/KeysList.js +3 -2
  58. package/dist/module/features/keyboard/components/KeysList/KeysList.js.map +1 -1
  59. package/dist/module/features/keyboard/components/KeysList/helpers.js +3 -2
  60. package/dist/module/features/keyboard/components/KeysList/helpers.js.map +1 -1
  61. package/dist/module/features/keyboard/components/MainLayout.js +68 -0
  62. package/dist/module/features/keyboard/components/MainLayout.js.map +1 -0
  63. package/dist/module/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.js +18 -0
  64. package/dist/module/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.js.map +1 -0
  65. package/dist/module/features/keyboard/components/UnderlinedLayout/keyboardGroups.js +9 -0
  66. package/dist/module/features/keyboard/components/UnderlinedLayout/keyboardGroups.js.map +1 -0
  67. package/dist/module/features/keyboard/components/UnitsLayout/UnitsLayout.js +6 -2
  68. package/dist/module/features/keyboard/components/UnitsLayout/UnitsLayout.js.map +1 -1
  69. package/dist/module/features/keyboard/components/UnitsLayout/helpers.js +10 -3
  70. package/dist/module/features/keyboard/components/UnitsLayout/helpers.js.map +1 -1
  71. package/dist/module/features/keyboard/components/constants.js +1 -8
  72. package/dist/module/features/keyboard/components/constants.js.map +1 -1
  73. package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js +3 -1
  74. package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
  75. package/dist/module/features/keyboard/constants/keyboardLayouts.js +2 -2
  76. package/dist/module/features/keyboard/constants/keyboardLayouts.js.map +1 -1
  77. package/dist/module/features/keyboard/types/MathKeysGroups/basicOperators.js +27 -0
  78. package/dist/module/features/keyboard/types/MathKeysGroups/basicOperators.js.map +1 -1
  79. package/dist/module/features/keyboard/types/keyboardGroupIds.js +1 -0
  80. package/dist/module/features/keyboard/types/keyboardGroupIds.js.map +1 -1
  81. package/dist/module/features/keyboard/types/types.js +1 -0
  82. package/dist/module/features/keyboard/types/types.js.map +1 -1
  83. package/dist/module/shared/icons/keyboard/UnderlinedOneIcon/UnderlinedOneIcon.js +26 -0
  84. package/dist/module/shared/icons/keyboard/UnderlinedOneIcon/UnderlinedOneIcon.js.map +1 -0
  85. package/dist/module/shared/icons/keyboard/UnderlinedTenIcon/UnderlinedTenIcon.js +26 -0
  86. package/dist/module/shared/icons/keyboard/UnderlinedTenIcon/UnderlinedTenIcon.js.map +1 -0
  87. package/dist/module/shared/icons/keyboard/UnderlinedUIcon/UnderlinedUIcon.js +26 -0
  88. package/dist/module/shared/icons/keyboard/UnderlinedUIcon/UnderlinedUIcon.js.map +1 -0
  89. package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts +1 -1
  90. package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
  91. package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/helpers.d.ts +6 -1
  92. package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/helpers.d.ts.map +1 -1
  93. package/dist/typescript/commonjs/features/keyboard/components/BasicPlusLayout/BasicPlusLayout.d.ts.map +1 -1
  94. package/dist/typescript/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.d.ts.map +1 -1
  95. package/dist/typescript/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.d.ts.map +1 -1
  96. package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts +1 -0
  97. package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts.map +1 -1
  98. package/dist/typescript/commonjs/features/keyboard/components/KeysList/KeysList.d.ts.map +1 -1
  99. package/dist/typescript/commonjs/features/keyboard/components/KeysList/helpers.d.ts +2 -1
  100. package/dist/typescript/commonjs/features/keyboard/components/KeysList/helpers.d.ts.map +1 -1
  101. package/dist/typescript/commonjs/features/keyboard/components/MainLayout.d.ts +17 -0
  102. package/dist/typescript/commonjs/features/keyboard/components/MainLayout.d.ts.map +1 -0
  103. package/dist/typescript/commonjs/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.d.ts +4 -0
  104. package/dist/typescript/commonjs/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.d.ts.map +1 -0
  105. package/dist/typescript/commonjs/features/keyboard/components/UnderlinedLayout/keyboardGroups.d.ts +3 -0
  106. package/dist/typescript/commonjs/features/keyboard/components/UnderlinedLayout/keyboardGroups.d.ts.map +1 -0
  107. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/UnitsLayout.d.ts +1 -1
  108. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/UnitsLayout.d.ts.map +1 -1
  109. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/helpers.d.ts +2 -1
  110. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/helpers.d.ts.map +1 -1
  111. package/dist/typescript/commonjs/features/keyboard/components/constants.d.ts +0 -7
  112. package/dist/typescript/commonjs/features/keyboard/components/constants.d.ts.map +1 -1
  113. package/dist/typescript/commonjs/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
  114. package/dist/typescript/commonjs/features/keyboard/constants/keyboardLayouts.d.ts +2 -2
  115. package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.d.ts +18 -0
  116. package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.d.ts.map +1 -1
  117. package/dist/typescript/commonjs/features/keyboard/types/keyboardGroupIds.d.ts +2 -1
  118. package/dist/typescript/commonjs/features/keyboard/types/keyboardGroupIds.d.ts.map +1 -1
  119. package/dist/typescript/commonjs/features/keyboard/types/types.d.ts +3 -1
  120. package/dist/typescript/commonjs/features/keyboard/types/types.d.ts.map +1 -1
  121. package/dist/typescript/commonjs/shared/icons/keyboard/UnderlinedOneIcon/UnderlinedOneIcon.d.ts +4 -0
  122. package/dist/typescript/commonjs/shared/icons/keyboard/UnderlinedOneIcon/UnderlinedOneIcon.d.ts.map +1 -0
  123. package/dist/typescript/commonjs/shared/icons/keyboard/UnderlinedTenIcon/UnderlinedTenIcon.d.ts +4 -0
  124. package/dist/typescript/commonjs/shared/icons/keyboard/UnderlinedTenIcon/UnderlinedTenIcon.d.ts.map +1 -0
  125. package/dist/typescript/commonjs/shared/icons/keyboard/UnderlinedUIcon/UnderlinedUIcon.d.ts +4 -0
  126. package/dist/typescript/commonjs/shared/icons/keyboard/UnderlinedUIcon/UnderlinedUIcon.d.ts.map +1 -0
  127. package/dist/typescript/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts +1 -1
  128. package/dist/typescript/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
  129. package/dist/typescript/module/features/keyboard/components/AlgebraLayout/helpers.d.ts +6 -1
  130. package/dist/typescript/module/features/keyboard/components/AlgebraLayout/helpers.d.ts.map +1 -1
  131. package/dist/typescript/module/features/keyboard/components/BasicPlusLayout/BasicPlusLayout.d.ts.map +1 -1
  132. package/dist/typescript/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.d.ts.map +1 -1
  133. package/dist/typescript/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.d.ts.map +1 -1
  134. package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts +1 -0
  135. package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts.map +1 -1
  136. package/dist/typescript/module/features/keyboard/components/KeysList/KeysList.d.ts.map +1 -1
  137. package/dist/typescript/module/features/keyboard/components/KeysList/helpers.d.ts +2 -1
  138. package/dist/typescript/module/features/keyboard/components/KeysList/helpers.d.ts.map +1 -1
  139. package/dist/typescript/module/features/keyboard/components/MainLayout.d.ts +17 -0
  140. package/dist/typescript/module/features/keyboard/components/MainLayout.d.ts.map +1 -0
  141. package/dist/typescript/module/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.d.ts +4 -0
  142. package/dist/typescript/module/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.d.ts.map +1 -0
  143. package/dist/typescript/module/features/keyboard/components/UnderlinedLayout/keyboardGroups.d.ts +3 -0
  144. package/dist/typescript/module/features/keyboard/components/UnderlinedLayout/keyboardGroups.d.ts.map +1 -0
  145. package/dist/typescript/module/features/keyboard/components/UnitsLayout/UnitsLayout.d.ts +1 -1
  146. package/dist/typescript/module/features/keyboard/components/UnitsLayout/UnitsLayout.d.ts.map +1 -1
  147. package/dist/typescript/module/features/keyboard/components/UnitsLayout/helpers.d.ts +2 -1
  148. package/dist/typescript/module/features/keyboard/components/UnitsLayout/helpers.d.ts.map +1 -1
  149. package/dist/typescript/module/features/keyboard/components/constants.d.ts +0 -7
  150. package/dist/typescript/module/features/keyboard/components/constants.d.ts.map +1 -1
  151. package/dist/typescript/module/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
  152. package/dist/typescript/module/features/keyboard/constants/keyboardLayouts.d.ts +2 -2
  153. package/dist/typescript/module/features/keyboard/types/MathKeysGroups/basicOperators.d.ts +18 -0
  154. package/dist/typescript/module/features/keyboard/types/MathKeysGroups/basicOperators.d.ts.map +1 -1
  155. package/dist/typescript/module/features/keyboard/types/keyboardGroupIds.d.ts +2 -1
  156. package/dist/typescript/module/features/keyboard/types/keyboardGroupIds.d.ts.map +1 -1
  157. package/dist/typescript/module/features/keyboard/types/types.d.ts +3 -1
  158. package/dist/typescript/module/features/keyboard/types/types.d.ts.map +1 -1
  159. package/dist/typescript/module/shared/icons/keyboard/UnderlinedOneIcon/UnderlinedOneIcon.d.ts +4 -0
  160. package/dist/typescript/module/shared/icons/keyboard/UnderlinedOneIcon/UnderlinedOneIcon.d.ts.map +1 -0
  161. package/dist/typescript/module/shared/icons/keyboard/UnderlinedTenIcon/UnderlinedTenIcon.d.ts +4 -0
  162. package/dist/typescript/module/shared/icons/keyboard/UnderlinedTenIcon/UnderlinedTenIcon.d.ts.map +1 -0
  163. package/dist/typescript/module/shared/icons/keyboard/UnderlinedUIcon/UnderlinedUIcon.d.ts +4 -0
  164. package/dist/typescript/module/shared/icons/keyboard/UnderlinedUIcon/UnderlinedUIcon.d.ts.map +1 -0
  165. package/package.json +1 -1
  166. package/src/features/keyboard/components/AlgebraLayout/AlgebraLayout.tsx +2 -2
  167. package/src/features/keyboard/components/AlgebraLayout/helpers.tsx +19 -6
  168. package/src/features/keyboard/components/BasicPlusLayout/BasicPlusLayout.tsx +9 -2
  169. package/src/features/keyboard/components/BasicPlusLayout/keyboardGroups.ts +7 -21
  170. package/src/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.ts +0 -4
  171. package/src/features/keyboard/components/Keyboard.tsx +4 -5
  172. package/src/features/keyboard/components/KeysList/KeysList.tsx +2 -1
  173. package/src/features/keyboard/components/KeysList/helpers.ts +3 -1
  174. package/src/features/keyboard/components/MainLayout.tsx +72 -0
  175. package/src/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.tsx +12 -0
  176. package/src/features/keyboard/components/UnderlinedLayout/keyboardGroups.ts +12 -0
  177. package/src/features/keyboard/components/UnitsLayout/UnitsLayout.tsx +2 -1
  178. package/src/features/keyboard/components/UnitsLayout/helpers.tsx +10 -2
  179. package/src/features/keyboard/components/constants.ts +1 -5
  180. package/src/features/keyboard/constants/keyboardGroupsByLocale.ts +2 -0
  181. package/src/features/keyboard/constants/keyboardLayouts.ts +1 -1
  182. package/src/features/keyboard/types/MathKeysGroups/basicOperators.tsx +21 -0
  183. package/src/features/keyboard/types/keyboardGroupIds.ts +1 -0
  184. package/src/features/keyboard/types/types.ts +2 -0
  185. package/src/shared/icons/keyboard/UnderlinedOneIcon/UnderlinedOneIcon.tsx +17 -0
  186. package/src/shared/icons/keyboard/UnderlinedTenIcon/UnderlinedTenIcon.tsx +20 -0
  187. package/src/shared/icons/keyboard/UnderlinedUIcon/UnderlinedUIcon.tsx +20 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboardGroups.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/components/UnderlinedLayout/keyboardGroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAIjD,eAAO,MAAM,oCAAoC,EAAE,aAOlD,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { KeyboardLayoutProps } from '../../types/types';
3
- export declare const UnitsLayout: (props: KeyboardLayoutProps) => React.JSX.Element;
3
+ export declare const UnitsLayout: ({ onLayoutChange, ...props }: KeyboardLayoutProps) => React.JSX.Element;
4
4
  //# sourceMappingURL=UnitsLayout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnitsLayout.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/components/UnitsLayout/UnitsLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAMvC,OAAO,EAAE,mBAAmB,EAAgB,MAAM,mBAAmB,CAAA;AAQrE,eAAO,MAAM,WAAW,UAAW,mBAAmB,sBAwCrD,CAAA"}
1
+ {"version":3,"file":"UnitsLayout.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/components/UnitsLayout/UnitsLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAMvC,OAAO,EAAE,mBAAmB,EAAgB,MAAM,mBAAmB,CAAA;AAQrE,eAAO,MAAM,WAAW,iCAAkC,mBAAmB,sBAyC5E,CAAA"}
@@ -4,8 +4,9 @@ type UseLayoutSelectOptionsProps = {
4
4
  activeTabKey: KeyboardUnitsGroupType;
5
5
  selectedLayout: SelectedLayout;
6
6
  setSelectedLayout: (layout: SelectedLayout) => void;
7
+ onLayoutChange?: (isSecondaryLayout: boolean) => void;
7
8
  };
8
- export declare const getSelectOptions: ({ activeTabKey, selectedLayout, setSelectedLayout, }: UseLayoutSelectOptionsProps) => {
9
+ export declare const getSelectOptions: ({ activeTabKey, selectedLayout, setSelectedLayout, onLayoutChange, }: UseLayoutSelectOptionsProps) => {
9
10
  key: SelectedLayout;
10
11
  title: React.JSX.Element;
11
12
  onPressIn: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/components/UnitsLayout/helpers.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAGhE,KAAK,2BAA2B,GAAG;IACjC,YAAY,EAAE,sBAAsB,CAAA;IACpC,cAAc,EAAE,cAAc,CAAA;IAC9B,iBAAiB,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAA;CACpD,CAAA;AAED,eAAO,MAAM,gBAAgB,yDAI1B,2BAA2B;;;;GA2B7B,CAAA"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/components/UnitsLayout/helpers.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAGhE,KAAK,2BAA2B,GAAG;IACjC,YAAY,EAAE,sBAAsB,CAAA;IACpC,cAAc,EAAE,cAAc,CAAA;IAC9B,iBAAiB,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAA;IACnD,cAAc,CAAC,EAAE,CAAC,iBAAiB,EAAE,OAAO,KAAK,IAAI,CAAA;CACtD,CAAA;AAED,eAAO,MAAM,gBAAgB,yEAK1B,2BAA2B;;;;GAiC7B,CAAA"}
@@ -8,10 +8,6 @@ export declare const LAYOUT_STYLES_CONFIG: {
8
8
  readonly borderColor: "transparent";
9
9
  readonly paddingLeft: 32;
10
10
  };
11
- readonly ALGEBRA: {
12
- readonly borderColor: "#f2f2f4";
13
- readonly paddingLeft: 8;
14
- };
15
11
  };
16
12
  export declare const getLayoutConfigStyles: (characterType?: number, isMobile?: boolean) => {
17
13
  readonly borderColor: "#f2f2f4";
@@ -19,9 +15,6 @@ export declare const getLayoutConfigStyles: (characterType?: number, isMobile?:
19
15
  } | {
20
16
  readonly borderColor: "transparent";
21
17
  readonly paddingLeft: 32;
22
- } | {
23
- readonly borderColor: "#f2f2f4";
24
- readonly paddingLeft: 8;
25
18
  };
26
19
  export declare const slideInAnimationSettings: {
27
20
  toValue: number;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/components/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,MAAM,CAAA;AAE1C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;CAOvB,CAAA;AAEV,eAAO,MAAM,qBAAqB,mBAAoB,MAAM,aAAa,OAAO;;;;;;;;;CAW/E,CAAA;AAED,eAAO,MAAM,wBAAwB;;;;CAIpC,CAAA;AAED,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/components/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,MAAM,CAAA;AAE1C,eAAO,MAAM,oBAAoB;;;;;;;;;CAMvB,CAAA;AAEV,eAAO,MAAM,qBAAqB,mBAAoB,MAAM,aAAa,OAAO;;;;;;CAQ/E,CAAA;AAED,eAAO,MAAM,wBAAwB;;;;CAIpC,CAAA;AAED,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"keyboardGroupsByLocale.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/constants/keyboardGroupsByLocale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAsC5D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAEpD,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAiC5F,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,CAyBzF,CAAA;AACD,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAClD,MAAM,EACN,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAkBnD,CAAA"}
1
+ {"version":3,"file":"keyboardGroupsByLocale.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/constants/keyboardGroupsByLocale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAsC5D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAEpD,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAmC5F,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,CAyBzF,CAAA;AACD,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAClD,MAAM,EACN,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAkBnD,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { MyScriptMathCharacterTypes } from '../../../types/characterTypes';
2
2
  export declare const KEYBOARD_LAYOUTS: {
3
3
  AlgebraAdvanced: {
4
- Component: (props: import("../types/types").KeyboardLayoutProps) => import("react").JSX.Element;
4
+ Component: ({ onLayoutChange, ...props }: import("../types/types").KeyboardLayoutProps) => import("react").JSX.Element;
5
5
  characterTypes: MyScriptMathCharacterTypes[];
6
6
  };
7
7
  Basic: {
@@ -21,7 +21,7 @@ export declare const KEYBOARD_LAYOUTS: {
21
21
  characterTypes: MyScriptMathCharacterTypes[];
22
22
  };
23
23
  BasicUnits: {
24
- Component: (props: import("../types/types").KeyboardLayoutProps) => import("react").JSX.Element;
24
+ Component: ({ onLayoutChange, ...props }: import("../types/types").KeyboardLayoutProps) => import("react").JSX.Element;
25
25
  characterTypes: MyScriptMathCharacterTypes[];
26
26
  };
27
27
  BasicPlusPlus: {
@@ -222,5 +222,23 @@ export declare const MATH_BASIC_OPERATORS: {
222
222
  mathliveValue: string;
223
223
  katexValue: string;
224
224
  };
225
+ UNDERLINED_TEN: {
226
+ icon: React.JSX.Element;
227
+ mathliveValue: string;
228
+ katexValue: string;
229
+ spreadsheetValue: string;
230
+ };
231
+ UNDERLINED_ONE: {
232
+ icon: React.JSX.Element;
233
+ mathliveValue: string;
234
+ katexValue: string;
235
+ spreadsheetValue: string;
236
+ };
237
+ UNDERLINED_U: {
238
+ icon: React.JSX.Element;
239
+ mathliveValue: string;
240
+ katexValue: string;
241
+ spreadsheetValue: string;
242
+ };
225
243
  };
226
244
  //# sourceMappingURL=basicOperators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"basicOperators.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/types/MathKeysGroups/basicOperators.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA6CzB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+N/B,CAAA"}
1
+ {"version":3,"file":"basicOperators.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/types/MathKeysGroups/basicOperators.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAgDzB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiP/B,CAAA"}
@@ -26,6 +26,7 @@ export declare enum MathEntryKeyboardGroupId {
26
26
  TIME_US = "math-entry-time-us",
27
27
  CURRENCY_SW = "math-entry-currency-sw",
28
28
  CURRENCY_UK = "math-entry-currency-uk",
29
- CURRENCY_US = "math-entry-currency-us"
29
+ CURRENCY_US = "math-entry-currency-us",
30
+ UNDERLINED = "math-entry-underlined"
30
31
  }
31
32
  //# sourceMappingURL=keyboardGroupIds.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyboardGroupIds.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/types/keyboardGroupIds.ts"],"names":[],"mappings":"AAAA,oBAAY,wBAAwB;IAClC,eAAe,+BAA+B;IAC9C,sBAAsB,sCAAsC;IAC5D,kBAAkB,kCAAkC;IACpD,yBAAyB,yCAAyC;IACl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ACtC,WAAW,2BAA2B;IACtC,UAAU,0BAA0B;CACrC"}
@@ -11,7 +11,8 @@ export declare const enum KeyboardType {
11
11
  BasicUnits = "BasicUnits",
12
12
  BasicPlusPlus = "BasicPlusPlus",
13
13
  BasicPlusPlusMobile = "BasicPlusPlusMobile",
14
- Numpad = "Numpad"
14
+ Numpad = "Numpad",
15
+ Underlined = "Underlined"
15
16
  }
16
17
  export type KeyboardKey = {
17
18
  katexValue: string;
@@ -39,6 +40,7 @@ export type KeyboardGroup = {
39
40
  };
40
41
  export type KeyboardLayoutProps = {
41
42
  onKeyPress: (key: KeyboardKeyValue) => void;
43
+ onLayoutChange?: (isSecondaryLayout: boolean) => void;
42
44
  color?: SelectOptionColor;
43
45
  isDisabled?: boolean;
44
46
  disabledKeys?: KeyboardKey[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,0BAAkB,YAAY;IAC5B,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,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,IAA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M,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI;KAC3D,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW;CACpC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../../icon.types';
3
+ export declare const UnderlinedOneIcon: ({ size, color }: IconProps) => React.JSX.Element;
4
+ //# sourceMappingURL=UnderlinedOneIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnderlinedOneIcon.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/icons/keyboard/UnderlinedOneIcon/UnderlinedOneIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAG5C,eAAO,MAAM,iBAAiB,oBAA0B,SAAS,sBAYhE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../../icon.types';
3
+ export declare const UnderlinedTenIcon: ({ size, color }: IconProps) => React.JSX.Element;
4
+ //# sourceMappingURL=UnderlinedTenIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnderlinedTenIcon.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/icons/keyboard/UnderlinedTenIcon/UnderlinedTenIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAG5C,eAAO,MAAM,iBAAiB,oBAA0B,SAAS,sBAehE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../../icon.types';
3
+ export declare const UnderlinedUIcon: ({ size, color }: IconProps) => React.JSX.Element;
4
+ //# sourceMappingURL=UnderlinedUIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnderlinedUIcon.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/icons/keyboard/UnderlinedUIcon/UnderlinedUIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAG5C,eAAO,MAAM,eAAe,oBAA0B,SAAS,sBAe9D,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmamath/students-features",
3
- "version": "0.9.2",
3
+ "version": "0.9.4-rc.0",
4
4
  "description": "Magmamath features library",
5
5
  "source": "src/index.ts",
6
6
  "main": "src/index.ts",
@@ -9,11 +9,11 @@ import { SelectedLayout } from './types'
9
9
  import { getKeyboardGroup } from '../../helpers'
10
10
  import { getSelectOptions } from './helpers'
11
11
 
12
- export const AlgebraLayout = (props: KeyboardLayoutProps) => {
12
+ export const AlgebraLayout = ({ onLayoutChange, ...props }: KeyboardLayoutProps) => {
13
13
  const [selectedLayout, setSelectedLayout] = useState<SelectedLayout>(SelectedLayout.BASIC)
14
14
  const t = useText()
15
15
  const { width } = useWindowDimensions()
16
- const selectOptions = getSelectOptions(selectedLayout, setSelectedLayout)
16
+ const selectOptions = getSelectOptions({ selectedLayout, setSelectedLayout, onLayoutChange })
17
17
  const isDesktop = width > MOBILE_LAYOUT_WIDTH && !IS_MOBILE
18
18
  const locale = t('locale') as Locale
19
19
 
@@ -10,10 +10,17 @@ type LayoutOption = {
10
10
  onPressIn: () => void
11
11
  }
12
12
 
13
- export function getSelectOptions(
14
- selectedLayout: SelectedLayout,
15
- setSelectedLayout: (layout: SelectedLayout) => void,
16
- ): LayoutOption[] {
13
+ type GetSelectOptionsProps = {
14
+ selectedLayout: SelectedLayout
15
+ setSelectedLayout: (layout: SelectedLayout) => void
16
+ onLayoutChange?: (isSecondaryLayout: boolean) => void
17
+ }
18
+
19
+ export function getSelectOptions({
20
+ selectedLayout,
21
+ setSelectedLayout,
22
+ onLayoutChange,
23
+ }: GetSelectOptionsProps): LayoutOption[] {
17
24
  return [
18
25
  {
19
26
  key: SelectedLayout.BASIC,
@@ -23,7 +30,10 @@ export function getSelectOptions(
23
30
  size={22}
24
31
  />
25
32
  ),
26
- onPressIn: () => setSelectedLayout(SelectedLayout.BASIC),
33
+ onPressIn: () => {
34
+ setSelectedLayout(SelectedLayout.BASIC)
35
+ onLayoutChange?.(false)
36
+ },
27
37
  },
28
38
  {
29
39
  key: SelectedLayout.ALGEBRA,
@@ -33,7 +43,10 @@ export function getSelectOptions(
33
43
  size={25}
34
44
  />
35
45
  ),
36
- onPressIn: () => setSelectedLayout(SelectedLayout.ALGEBRA),
46
+ onPressIn: () => {
47
+ setSelectedLayout(SelectedLayout.ALGEBRA)
48
+ onLayoutChange?.(true)
49
+ },
37
50
  },
38
51
  ]
39
52
  }
@@ -1,14 +1,21 @@
1
1
  import React from 'react'
2
2
  import { KeysList } from '../KeysList/KeysList'
3
- import { StyleSheet, View } from 'react-native'
3
+ import { StyleSheet, useWindowDimensions, View } from 'react-native'
4
4
  import { KeyboardLayoutProps, KeyboardType } from '../../types/types'
5
5
  import { Locale, useText } from '../../../../shared/translation'
6
6
  import { getKeyboardGroup } from '../../helpers'
7
+ import { MOBILE_LAYOUT_WIDTH } from '../../constants/constants'
8
+ import { IS_MOBILE } from '@magmamath/react-native-ui'
7
9
 
8
10
  export const BasicPlusLayout = (props: KeyboardLayoutProps) => {
9
11
  const t = useText()
10
12
  const locale = t('locale') as Locale
11
- const keysGroup = getKeyboardGroup(locale, KeyboardType.BasicPlus)
13
+ const { width } = useWindowDimensions()
14
+ const isMobile = width <= MOBILE_LAYOUT_WIDTH || IS_MOBILE
15
+ const keysGroup = getKeyboardGroup(
16
+ locale,
17
+ isMobile ? KeyboardType.BasicPlusMobile : KeyboardType.BasicPlus,
18
+ )
12
19
 
13
20
  return (
14
21
  <View style={styles.container}>
@@ -1,8 +1,6 @@
1
1
  import { MATH_BASIC_OPERATORS } from '../../types/MathKeysGroups/basicOperators'
2
2
  import { MATH_TEXT_SYMBOLS } from '../../types/MathKeysGroups/textSymbols'
3
3
  import { KeyboardGroup } from '../../types/types'
4
- import { MATH_SYMBOLS } from '../../types/MathKeysGroups/symbols'
5
- import { MATH_GEOMETRY_SYMBOLS } from '../../types/MathKeysGroups/geometry'
6
4
  import { MathEntryKeyboardGroupId } from '../../types/keyboardGroupIds'
7
5
 
8
6
  export const MATH_ENTRY_BASIC_SW_PLUS: KeyboardGroup = {
@@ -33,23 +31,17 @@ export const MATH_ENTRY_BASIC_PLUS_MOBILE_SW: KeyboardGroup = {
33
31
  MATH_BASIC_OPERATORS.ADDITION,
34
32
  MATH_BASIC_OPERATORS.SUBTRACTION,
35
33
  MATH_BASIC_OPERATORS.EQUALS,
36
- MATH_BASIC_OPERATORS.PARENTHESES,
37
34
  MATH_BASIC_OPERATORS.SQUARE_POWER,
38
35
  MATH_BASIC_OPERATORS.SQUARE_ROOT,
39
- MATH_BASIC_OPERATORS.GREATER_THAN,
40
- MATH_BASIC_OPERATORS.C_DOT,
41
- MATH_BASIC_OPERATORS.FRACTION,
36
+ MATH_BASIC_OPERATORS.MULTIPLICATION,
37
+ MATH_BASIC_OPERATORS.DIVISION,
42
38
  MATH_BASIC_OPERATORS.DOT,
39
+ MATH_BASIC_OPERATORS.PERCENT,
43
40
  MATH_BASIC_OPERATORS.NTH_POWER,
44
- MATH_BASIC_OPERATORS.NTH_ROOT,
45
- MATH_SYMBOLS.PI,
46
- MATH_BASIC_OPERATORS.LESS_THAN,
47
41
  MATH_TEXT_SYMBOLS.X,
48
42
  MATH_TEXT_SYMBOLS.Y,
49
43
  MATH_TEXT_SYMBOLS.Z,
50
- MATH_SYMBOLS.THETA,
51
- MATH_GEOMETRY_SYMBOLS.DEGREE,
52
- MATH_GEOMETRY_SYMBOLS.RADIAN,
44
+ MATH_BASIC_OPERATORS.PERMILLE,
53
45
  ],
54
46
  }
55
47
 
@@ -81,22 +73,16 @@ export const MATH_ENTRY_BASIC_PLUS_MOBILE: KeyboardGroup = {
81
73
  MATH_BASIC_OPERATORS.ADDITION,
82
74
  MATH_BASIC_OPERATORS.SUBTRACTION,
83
75
  MATH_BASIC_OPERATORS.EQUALS,
84
- MATH_BASIC_OPERATORS.PARENTHESES,
85
76
  MATH_BASIC_OPERATORS.SQUARE_POWER,
86
77
  MATH_BASIC_OPERATORS.SQUARE_ROOT,
87
- MATH_BASIC_OPERATORS.GREATER_THAN,
88
78
  MATH_BASIC_OPERATORS.MULTIPLICATION,
89
- MATH_BASIC_OPERATORS.FRACTION,
79
+ MATH_BASIC_OPERATORS.DIVISION,
90
80
  MATH_BASIC_OPERATORS.COMMA,
81
+ MATH_BASIC_OPERATORS.PERCENT,
91
82
  MATH_BASIC_OPERATORS.NTH_POWER,
92
- MATH_BASIC_OPERATORS.NTH_ROOT,
93
- MATH_SYMBOLS.PI,
94
- MATH_BASIC_OPERATORS.LESS_THAN,
95
83
  MATH_TEXT_SYMBOLS.X,
96
84
  MATH_TEXT_SYMBOLS.Y,
97
85
  MATH_TEXT_SYMBOLS.Z,
98
- MATH_SYMBOLS.THETA,
99
- MATH_GEOMETRY_SYMBOLS.DEGREE,
100
- MATH_GEOMETRY_SYMBOLS.RADIAN,
86
+ MATH_BASIC_OPERATORS.PERMILLE,
101
87
  ],
102
88
  }
@@ -43,7 +43,6 @@ export const MATH_ENTRY_BASIC_PLUS_PLUS_MOBILE: KeyboardGroup = {
43
43
  MATH_BASIC_OPERATORS.ADDITION,
44
44
  MATH_BASIC_OPERATORS.SUBTRACTION,
45
45
  MATH_BASIC_OPERATORS.EQUALS,
46
- MATH_BASIC_OPERATORS.PARENTHESES,
47
46
  MATH_BASIC_OPERATORS.SQUARE_POWER,
48
47
  MATH_BASIC_OPERATORS.SQUARE_ROOT,
49
48
  MATH_BASIC_OPERATORS.GREATER_THAN,
@@ -51,7 +50,6 @@ export const MATH_ENTRY_BASIC_PLUS_PLUS_MOBILE: KeyboardGroup = {
51
50
  MATH_BASIC_OPERATORS.FRACTION,
52
51
  MATH_BASIC_OPERATORS.COMMA,
53
52
  MATH_BASIC_OPERATORS.NTH_POWER,
54
- MATH_BASIC_OPERATORS.NTH_ROOT,
55
53
  MATH_SYMBOLS.PI,
56
54
  MATH_BASIC_OPERATORS.LESS_THAN,
57
55
  MATH_TEXT_SYMBOLS.X,
@@ -101,7 +99,6 @@ export const MATH_ENTRY_BASIC_PLUS_PLUS_MOBILE_SW: KeyboardGroup = {
101
99
  MATH_BASIC_OPERATORS.ADDITION,
102
100
  MATH_BASIC_OPERATORS.SUBTRACTION,
103
101
  MATH_BASIC_OPERATORS.EQUALS,
104
- MATH_BASIC_OPERATORS.PARENTHESES,
105
102
  MATH_BASIC_OPERATORS.SQUARE_POWER,
106
103
  MATH_BASIC_OPERATORS.SQUARE_ROOT,
107
104
  MATH_BASIC_OPERATORS.GREATER_THAN,
@@ -109,7 +106,6 @@ export const MATH_ENTRY_BASIC_PLUS_PLUS_MOBILE_SW: KeyboardGroup = {
109
106
  MATH_BASIC_OPERATORS.FRACTION,
110
107
  MATH_BASIC_OPERATORS.DOT,
111
108
  MATH_BASIC_OPERATORS.NTH_POWER,
112
- MATH_BASIC_OPERATORS.NTH_ROOT,
113
109
  MATH_SYMBOLS.PI,
114
110
  MATH_BASIC_OPERATORS.LESS_THAN,
115
111
  MATH_TEXT_SYMBOLS.X,
@@ -1,7 +1,6 @@
1
1
  import React, { useEffect, useMemo, useRef } from 'react'
2
2
  import { Animated, StyleProp, StyleSheet, useWindowDimensions, ViewStyle } from 'react-native'
3
3
  import { COLORS, IS_MOBILE, SelectOptionColor, SHADOWS } from '@magmamath/react-native-ui'
4
- import { getLayoutByCharType } from '../constants/keyboardLayouts'
5
4
  import { KeyboardKey, KeyboardKeyValue } from '../types/types'
6
5
  import { Numpad } from './Numpad/Numpad'
7
6
  import { MOBILE_LAYOUT_WIDTH } from '../constants/constants'
@@ -11,6 +10,7 @@ import {
11
10
  slideInAnimationSettings,
12
11
  slideOutAnimationSettings,
13
12
  } from './constants'
13
+ import { MainLayout } from './MainLayout'
14
14
 
15
15
  type KeyboardProps = {
16
16
  onKeyPress: (key: KeyboardKeyValue) => void
@@ -19,15 +19,15 @@ type KeyboardProps = {
19
19
  color?: SelectOptionColor
20
20
  isVisible?: boolean
21
21
  isDisabled?: boolean
22
+ showUnderlinedKeys?: boolean
22
23
  disabledKeys?: KeyboardKey[]
23
24
  }
24
25
 
25
26
  export const Keyboard = ({ style, characterType, isVisible = true, ...props }: KeyboardProps) => {
26
27
  const slideAnim = useRef(new Animated.Value(isVisible ? 0 : KEYBOARD_SLIDE_DISTANCE)).current
28
+
27
29
  const { width } = useWindowDimensions()
28
30
  const isMobile = width <= MOBILE_LAYOUT_WIDTH || IS_MOBILE
29
-
30
- const Layout = useMemo(() => getLayoutByCharType(characterType), [characterType])
31
31
  const mobileStyles = useMemo(
32
32
  () => getLayoutConfigStyles(characterType, isMobile),
33
33
  [characterType, isMobile],
@@ -57,7 +57,7 @@ export const Keyboard = ({ style, characterType, isVisible = true, ...props }: K
57
57
  },
58
58
  ]}
59
59
  >
60
- <Layout {...props} />
60
+ <MainLayout {...props} />
61
61
  <Numpad {...props} style={mobileStyles} />
62
62
  </Animated.View>
63
63
  )
@@ -76,7 +76,6 @@ const styles = StyleSheet.create({
76
76
  borderColor: COLORS.NEUTRAL_5,
77
77
  borderWidth: 1,
78
78
  width: 'auto',
79
- overflow: 'hidden',
80
79
  height: 155,
81
80
  ...SHADOWS[2],
82
81
  },
@@ -37,9 +37,10 @@ export const KeysList = ({
37
37
  onKeyPress,
38
38
  disabledKeys,
39
39
  optionStyle: style?.option,
40
+ isDisabled,
40
41
  }),
41
42
  ),
42
- [keys, onKeyPress, disabledKeys, style?.option],
43
+ [keys, onKeyPress, disabledKeys, style?.option, isDisabled],
43
44
  )
44
45
 
45
46
  return (
@@ -9,6 +9,7 @@ type MapKeyToOptionProps = {
9
9
  onKeyPress?: (key: KeyboardKeyValue) => void
10
10
  disabledKeys?: KeyboardKey[]
11
11
  optionStyle?: ButtonStyle
12
+ isDisabled?: boolean
12
13
  }
13
14
 
14
15
  export const IS_IOS_WEB = getIsIpadOrIphoneDevice()
@@ -27,6 +28,7 @@ export const mapKeyToOption = ({
27
28
  onKeyPress,
28
29
  disabledKeys,
29
30
  optionStyle,
31
+ isDisabled,
30
32
  }: MapKeyToOptionProps) => {
31
33
  const pressHandler = (e: GestureResponderEvent) => {
32
34
  onKeyPress?.({
@@ -45,6 +47,6 @@ export const mapKeyToOption = ({
45
47
  delayPressIn: 0,
46
48
  style: mergeOptionStyles(optionStyle, key.style),
47
49
  ...(IS_IOS_WEB ? { onPress: pressHandler } : { onPressIn: pressHandler }),
48
- disabled: isKeyDisabled(key, disabledKeys),
50
+ disabled: isDisabled || isKeyDisabled(key, disabledKeys),
49
51
  }
50
52
  }
@@ -0,0 +1,72 @@
1
+ import React, { useEffect, useMemo, useRef, useState } from 'react'
2
+ import { Animated, StyleProp, StyleSheet, useWindowDimensions, View, ViewStyle } from 'react-native'
3
+ import { SelectOptionColor, IS_MOBILE } from '@magmamath/react-native-ui'
4
+ import { getLayoutByCharType } from '../constants/keyboardLayouts'
5
+ import { KeyboardKey, KeyboardKeyValue } from '../types/types'
6
+ import { UnderlinedLayout } from './UnderlinedLayout/UnderlinedLayout'
7
+ import { MOBILE_LAYOUT_WIDTH } from '../constants/constants'
8
+
9
+ type LayoutProps = {
10
+ onKeyPress: (key: KeyboardKeyValue) => void
11
+ characterType?: number
12
+ style?: StyleProp<ViewStyle>
13
+ color?: SelectOptionColor
14
+ isVisible?: boolean
15
+ isDisabled?: boolean
16
+ showUnderlinedKeys?: boolean
17
+ disabledKeys?: KeyboardKey[]
18
+ }
19
+
20
+ export const MainLayout = ({ style, characterType, showUnderlinedKeys, ...props }: LayoutProps) => {
21
+ const [isUnderlinedVisible, setIsUnderlinedVisible] = useState(showUnderlinedKeys)
22
+ const [isSecondaryLayoutSelected, setIsSecondaryLayoutSelected] = useState(false)
23
+
24
+ const fadeAnim = useRef(new Animated.Value(showUnderlinedKeys ? 1 : 0)).current
25
+ const fadeRef = useRef<Animated.CompositeAnimation | null>(null)
26
+ const { width } = useWindowDimensions()
27
+ const isMobile = width <= MOBILE_LAYOUT_WIDTH || IS_MOBILE
28
+
29
+ const Layout = useMemo(() => getLayoutByCharType(characterType), [characterType])
30
+
31
+ useEffect(() => {
32
+ if (showUnderlinedKeys) {
33
+ setIsUnderlinedVisible(true)
34
+ fadeRef.current = Animated.timing(fadeAnim, {
35
+ toValue: 1,
36
+ duration: 250,
37
+ useNativeDriver: true,
38
+ })
39
+ fadeRef.current.start()
40
+ return
41
+ }
42
+ fadeRef.current = Animated.timing(fadeAnim, {
43
+ toValue: 0,
44
+ duration: 250,
45
+ useNativeDriver: true,
46
+ })
47
+ fadeRef.current.start(() => setIsUnderlinedVisible(false))
48
+
49
+ return () => {
50
+ fadeRef.current?.stop()
51
+ }
52
+ }, [showUnderlinedKeys])
53
+
54
+ return (
55
+ <View style={styles.container}>
56
+ <Layout {...props} onLayoutChange={setIsSecondaryLayoutSelected} />
57
+ {isUnderlinedVisible && !isSecondaryLayoutSelected && !isMobile && (
58
+ <Animated.View style={{ opacity: fadeAnim }}>
59
+ <UnderlinedLayout {...props} />
60
+ </Animated.View>
61
+ )}
62
+ </View>
63
+ )
64
+ }
65
+
66
+ const styles = StyleSheet.create({
67
+ container: {
68
+ flexDirection: 'row',
69
+ alignItems: 'flex-start',
70
+ justifyContent: 'space-between',
71
+ },
72
+ })
@@ -0,0 +1,12 @@
1
+ import React from 'react'
2
+ import { KeysList } from '../KeysList/KeysList'
3
+ import { KeyboardLayoutProps, KeyboardType } from '../../types/types'
4
+ import { Locale, useText } from '../../../../shared/translation'
5
+ import { getKeyboardGroup } from '../../helpers'
6
+
7
+ export const UnderlinedLayout = (props: KeyboardLayoutProps) => {
8
+ const t = useText()
9
+ const keysGroup = getKeyboardGroup(t('locale') as Locale, KeyboardType.Underlined)
10
+
11
+ return <KeysList keys={keysGroup.keys} numOfRows={keysGroup.keys.length} {...props} />
12
+ }
@@ -0,0 +1,12 @@
1
+ import { KeyboardGroup } from '../../types/types'
2
+ import { MathEntryKeyboardGroupId } from '../../types/keyboardGroupIds'
3
+ import { MATH_BASIC_OPERATORS } from '../../types/MathKeysGroups/basicOperators'
4
+
5
+ export const MATH_ENTRY_UNDERLINED_KEYBOARD_GROUP: KeyboardGroup = {
6
+ id: MathEntryKeyboardGroupId.UNDERLINED,
7
+ keys: [
8
+ MATH_BASIC_OPERATORS.UNDERLINED_TEN,
9
+ MATH_BASIC_OPERATORS.UNDERLINED_ONE,
10
+ MATH_BASIC_OPERATORS.UNDERLINED_U,
11
+ ],
12
+ }
@@ -12,7 +12,7 @@ import { KeyboardUnitsGroupType, SelectedLayout } from './types'
12
12
  import { getSelectOptions } from './helpers'
13
13
  import { IS_MOBILE } from '@magmamath/react-native-ui'
14
14
 
15
- export const UnitsLayout = (props: KeyboardLayoutProps) => {
15
+ export const UnitsLayout = ({ onLayoutChange, ...props }: KeyboardLayoutProps) => {
16
16
  const { width } = useWindowDimensions()
17
17
  const t = useText()
18
18
  const locale = t('locale') as Locale
@@ -26,6 +26,7 @@ export const UnitsLayout = (props: KeyboardLayoutProps) => {
26
26
  activeTabKey: activeTab.key as KeyboardUnitsGroupType,
27
27
  selectedLayout,
28
28
  setSelectedLayout,
29
+ onLayoutChange,
29
30
  })
30
31
 
31
32
  return (
@@ -8,12 +8,14 @@ type UseLayoutSelectOptionsProps = {
8
8
  activeTabKey: KeyboardUnitsGroupType
9
9
  selectedLayout: SelectedLayout
10
10
  setSelectedLayout: (layout: SelectedLayout) => void
11
+ onLayoutChange?: (isSecondaryLayout: boolean) => void
11
12
  }
12
13
 
13
14
  export const getSelectOptions = ({
14
15
  activeTabKey,
15
16
  selectedLayout,
16
17
  setSelectedLayout,
18
+ onLayoutChange,
17
19
  }: UseLayoutSelectOptionsProps) => {
18
20
  {
19
21
  const SelectedIcon = UNITS_KEYBOARD_GROUPS.get(activeTabKey)?.icon || RulerIcon
@@ -27,7 +29,10 @@ export const getSelectOptions = ({
27
29
  size={22}
28
30
  />
29
31
  ),
30
- onPressIn: () => setSelectedLayout(SelectedLayout.ALGEBRA),
32
+ onPressIn: () => {
33
+ setSelectedLayout(SelectedLayout.ALGEBRA)
34
+ onLayoutChange?.(false)
35
+ },
31
36
  },
32
37
  {
33
38
  key: SelectedLayout.UNITS,
@@ -37,7 +42,10 @@ export const getSelectOptions = ({
37
42
  size={16}
38
43
  />
39
44
  ),
40
- onPressIn: () => setSelectedLayout(SelectedLayout.UNITS),
45
+ onPressIn: () => {
46
+ setSelectedLayout(SelectedLayout.UNITS)
47
+ onLayoutChange?.(true)
48
+ },
41
49
  },
42
50
  ]
43
51
  }