@magmamath/students-features 0.5.4-rc.1 → 0.5.4

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 (186) hide show
  1. package/dist/commonjs/features/celebrations/components/Spark.js.map +1 -1
  2. package/dist/commonjs/features/celebrations/helpers.js.map +1 -1
  3. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +1 -1
  4. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
  5. package/dist/commonjs/features/endOfAssignment/components/EOAModal.js +6 -0
  6. package/dist/commonjs/features/endOfAssignment/components/EOAModal.js.map +1 -1
  7. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +2 -4
  8. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -1
  9. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -1
  10. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -1
  11. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +3 -5
  12. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
  13. package/dist/commonjs/features/endOfAssignment/model/model.js +3 -1
  14. package/dist/commonjs/features/endOfAssignment/model/model.js.map +1 -1
  15. package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js.map +1 -1
  16. package/dist/commonjs/index.js +0 -12
  17. package/dist/commonjs/index.js.map +1 -1
  18. package/dist/commonjs/shared/icons/Halloween.js.map +1 -1
  19. package/dist/commonjs/shared/icons/HighlighterIcon.js.map +1 -1
  20. package/dist/commonjs/shared/icons/Pi.js.map +1 -1
  21. package/dist/commonjs/shared/icons/Star.js.map +1 -1
  22. package/dist/commonjs/shared/icons/Valentine.js.map +1 -1
  23. package/dist/commonjs/shared/icons/Winter.js.map +1 -1
  24. package/dist/module/features/celebrations/components/Spark.js.map +1 -1
  25. package/dist/module/features/celebrations/helpers.js.map +1 -1
  26. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +1 -1
  27. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
  28. package/dist/module/features/endOfAssignment/components/EOAModal.js +6 -0
  29. package/dist/module/features/endOfAssignment/components/EOAModal.js.map +1 -1
  30. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +2 -4
  31. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -1
  32. package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -1
  33. package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -1
  34. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +3 -5
  35. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
  36. package/dist/module/features/endOfAssignment/model/model.js +3 -1
  37. package/dist/module/features/endOfAssignment/model/model.js.map +1 -1
  38. package/dist/module/features/endOfAssignment/ui/SparkIcon.js.map +1 -1
  39. package/dist/module/index.js +0 -1
  40. package/dist/module/index.js.map +1 -1
  41. package/dist/module/shared/icons/Halloween.js.map +1 -1
  42. package/dist/module/shared/icons/HighlighterIcon.js.map +1 -1
  43. package/dist/module/shared/icons/Pi.js.map +1 -1
  44. package/dist/module/shared/icons/Star.js.map +1 -1
  45. package/dist/module/shared/icons/Valentine.js.map +1 -1
  46. package/dist/module/shared/icons/Winter.js.map +1 -1
  47. package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts +1 -1
  48. package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts.map +1 -1
  49. package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +1 -1
  50. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
  51. package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts +6 -0
  52. package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts.map +1 -1
  53. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +1 -1
  54. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -1
  55. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +1 -1
  56. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -1
  57. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
  58. package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts.map +1 -1
  59. package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts +2 -1
  60. package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts.map +1 -1
  61. package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts +1 -1
  62. package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -1
  63. package/dist/typescript/commonjs/index.d.ts +0 -1
  64. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  65. package/dist/typescript/commonjs/shared/icons/Halloween.d.ts +1 -1
  66. package/dist/typescript/commonjs/shared/icons/Halloween.d.ts.map +1 -1
  67. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +1 -1
  68. package/dist/typescript/commonjs/shared/icons/Pi.d.ts +1 -1
  69. package/dist/typescript/commonjs/shared/icons/Pi.d.ts.map +1 -1
  70. package/dist/typescript/commonjs/shared/icons/Star.d.ts +1 -1
  71. package/dist/typescript/commonjs/shared/icons/Star.d.ts.map +1 -1
  72. package/dist/typescript/commonjs/shared/icons/Valentine.d.ts +1 -1
  73. package/dist/typescript/commonjs/shared/icons/Valentine.d.ts.map +1 -1
  74. package/dist/typescript/commonjs/shared/icons/Winter.d.ts +1 -1
  75. package/dist/typescript/commonjs/shared/icons/Winter.d.ts.map +1 -1
  76. package/dist/typescript/module/features/celebrations/components/Spark.d.ts +1 -1
  77. package/dist/typescript/module/features/celebrations/components/Spark.d.ts.map +1 -1
  78. package/dist/typescript/module/features/celebrations/helpers.d.ts.map +1 -1
  79. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
  80. package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts +6 -0
  81. package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts.map +1 -1
  82. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +1 -1
  83. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -1
  84. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +1 -1
  85. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -1
  86. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
  87. package/dist/typescript/module/features/endOfAssignment/model/model.d.ts.map +1 -1
  88. package/dist/typescript/module/features/endOfAssignment/types.d.ts +2 -1
  89. package/dist/typescript/module/features/endOfAssignment/types.d.ts.map +1 -1
  90. package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts +1 -1
  91. package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -1
  92. package/dist/typescript/module/index.d.ts +0 -1
  93. package/dist/typescript/module/index.d.ts.map +1 -1
  94. package/dist/typescript/module/shared/icons/Halloween.d.ts +1 -1
  95. package/dist/typescript/module/shared/icons/Halloween.d.ts.map +1 -1
  96. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +1 -1
  97. package/dist/typescript/module/shared/icons/Pi.d.ts +1 -1
  98. package/dist/typescript/module/shared/icons/Pi.d.ts.map +1 -1
  99. package/dist/typescript/module/shared/icons/Star.d.ts +1 -1
  100. package/dist/typescript/module/shared/icons/Star.d.ts.map +1 -1
  101. package/dist/typescript/module/shared/icons/Valentine.d.ts +1 -1
  102. package/dist/typescript/module/shared/icons/Valentine.d.ts.map +1 -1
  103. package/dist/typescript/module/shared/icons/Winter.d.ts +1 -1
  104. package/dist/typescript/module/shared/icons/Winter.d.ts.map +1 -1
  105. package/package.json +2 -2
  106. package/src/features/celebrations/components/Spark.tsx +4 -4
  107. package/src/features/celebrations/helpers.ts +35 -34
  108. package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +1 -0
  109. package/src/features/endOfAssignment/components/EOAModal.tsx +6 -0
  110. package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +5 -5
  111. package/src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx +74 -74
  112. package/src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx +24 -24
  113. package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +7 -5
  114. package/src/features/endOfAssignment/model/model.ts +21 -19
  115. package/src/features/endOfAssignment/types.ts +3 -3
  116. package/src/features/endOfAssignment/ui/SparkIcon.tsx +2 -1
  117. package/src/index.ts +0 -1
  118. package/src/shared/icons/Halloween.tsx +2 -2
  119. package/src/shared/icons/HighlighterIcon.tsx +1 -1
  120. package/src/shared/icons/Pi.tsx +1 -2
  121. package/src/shared/icons/Star.tsx +1 -2
  122. package/src/shared/icons/Valentine.tsx +1 -2
  123. package/src/shared/icons/Winter.tsx +2 -2
  124. package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js +0 -52
  125. package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js.map +0 -1
  126. package/dist/commonjs/features/formulaSheet/components/FormulaSheetModal.js +0 -64
  127. package/dist/commonjs/features/formulaSheet/components/FormulaSheetModal.js.map +0 -1
  128. package/dist/commonjs/features/formulaSheet/index.js +0 -20
  129. package/dist/commonjs/features/formulaSheet/index.js.map +0 -1
  130. package/dist/commonjs/features/formulaSheet/model/api.model.js +0 -15
  131. package/dist/commonjs/features/formulaSheet/model/api.model.js.map +0 -1
  132. package/dist/commonjs/features/formulaSheet/model/file.model.js +0 -19
  133. package/dist/commonjs/features/formulaSheet/model/file.model.js.map +0 -1
  134. package/dist/commonjs/features/formulaSheet/model/modal.model.js +0 -15
  135. package/dist/commonjs/features/formulaSheet/model/modal.model.js.map +0 -1
  136. package/dist/commonjs/features/formulaSheet/model/model.js +0 -35
  137. package/dist/commonjs/features/formulaSheet/model/model.js.map +0 -1
  138. package/dist/module/features/formulaSheet/components/FormulaSheet.js +0 -46
  139. package/dist/module/features/formulaSheet/components/FormulaSheet.js.map +0 -1
  140. package/dist/module/features/formulaSheet/components/FormulaSheetModal.js +0 -58
  141. package/dist/module/features/formulaSheet/components/FormulaSheetModal.js.map +0 -1
  142. package/dist/module/features/formulaSheet/index.js +0 -5
  143. package/dist/module/features/formulaSheet/index.js.map +0 -1
  144. package/dist/module/features/formulaSheet/model/api.model.js +0 -10
  145. package/dist/module/features/formulaSheet/model/api.model.js.map +0 -1
  146. package/dist/module/features/formulaSheet/model/file.model.js +0 -14
  147. package/dist/module/features/formulaSheet/model/file.model.js.map +0 -1
  148. package/dist/module/features/formulaSheet/model/modal.model.js +0 -10
  149. package/dist/module/features/formulaSheet/model/modal.model.js.map +0 -1
  150. package/dist/module/features/formulaSheet/model/model.js +0 -30
  151. package/dist/module/features/formulaSheet/model/model.js.map +0 -1
  152. package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheet.d.ts +0 -15
  153. package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheet.d.ts.map +0 -1
  154. package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheetModal.d.ts +0 -10
  155. package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheetModal.d.ts.map +0 -1
  156. package/dist/typescript/commonjs/features/formulaSheet/index.d.ts +0 -3
  157. package/dist/typescript/commonjs/features/formulaSheet/index.d.ts.map +0 -1
  158. package/dist/typescript/commonjs/features/formulaSheet/model/api.model.d.ts +0 -9
  159. package/dist/typescript/commonjs/features/formulaSheet/model/api.model.d.ts.map +0 -1
  160. package/dist/typescript/commonjs/features/formulaSheet/model/file.model.d.ts +0 -14
  161. package/dist/typescript/commonjs/features/formulaSheet/model/file.model.d.ts.map +0 -1
  162. package/dist/typescript/commonjs/features/formulaSheet/model/modal.model.d.ts +0 -7
  163. package/dist/typescript/commonjs/features/formulaSheet/model/modal.model.d.ts.map +0 -1
  164. package/dist/typescript/commonjs/features/formulaSheet/model/model.d.ts +0 -14
  165. package/dist/typescript/commonjs/features/formulaSheet/model/model.d.ts.map +0 -1
  166. package/dist/typescript/module/features/formulaSheet/components/FormulaSheet.d.ts +0 -15
  167. package/dist/typescript/module/features/formulaSheet/components/FormulaSheet.d.ts.map +0 -1
  168. package/dist/typescript/module/features/formulaSheet/components/FormulaSheetModal.d.ts +0 -10
  169. package/dist/typescript/module/features/formulaSheet/components/FormulaSheetModal.d.ts.map +0 -1
  170. package/dist/typescript/module/features/formulaSheet/index.d.ts +0 -3
  171. package/dist/typescript/module/features/formulaSheet/index.d.ts.map +0 -1
  172. package/dist/typescript/module/features/formulaSheet/model/api.model.d.ts +0 -9
  173. package/dist/typescript/module/features/formulaSheet/model/api.model.d.ts.map +0 -1
  174. package/dist/typescript/module/features/formulaSheet/model/file.model.d.ts +0 -14
  175. package/dist/typescript/module/features/formulaSheet/model/file.model.d.ts.map +0 -1
  176. package/dist/typescript/module/features/formulaSheet/model/modal.model.d.ts +0 -7
  177. package/dist/typescript/module/features/formulaSheet/model/modal.model.d.ts.map +0 -1
  178. package/dist/typescript/module/features/formulaSheet/model/model.d.ts +0 -14
  179. package/dist/typescript/module/features/formulaSheet/model/model.d.ts.map +0 -1
  180. package/src/features/formulaSheet/components/FormulaSheet.tsx +0 -74
  181. package/src/features/formulaSheet/components/FormulaSheetModal.tsx +0 -64
  182. package/src/features/formulaSheet/index.ts +0 -2
  183. package/src/features/formulaSheet/model/api.model.ts +0 -13
  184. package/src/features/formulaSheet/model/file.model.ts +0 -18
  185. package/src/features/formulaSheet/model/modal.model.ts +0 -10
  186. package/src/features/formulaSheet/model/model.ts +0 -31
@@ -1,58 +0,0 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { View, Modal, StyleSheet, TouchableWithoutFeedback } from 'react-native';
5
- import { BORDER_RADIUS, COLORS, Loader, LoaderSize, LoaderType, SPACING } from '@magmamath/react-native-ui';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- export const FormulaSheetModal = ({
8
- children,
9
- loaderColor,
10
- isLoading,
11
- onClose
12
- }) => {
13
- return /*#__PURE__*/_jsx(Modal, {
14
- visible: true,
15
- transparent: true,
16
- animationType: "none",
17
- onRequestClose: onClose,
18
- children: /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
19
- onPress: onClose,
20
- children: /*#__PURE__*/_jsx(View, {
21
- style: styles.container,
22
- children: /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
23
- onPress: event => event.stopPropagation(),
24
- children: /*#__PURE__*/_jsx(View, {
25
- style: styles.content,
26
- children: isLoading ? /*#__PURE__*/_jsx(Loader, {
27
- type: LoaderType.PRIMARY,
28
- color: loaderColor,
29
- size: LoaderSize.LARGE
30
- }) : children
31
- })
32
- })
33
- })
34
- })
35
- });
36
- };
37
- const styles = StyleSheet.create({
38
- container: {
39
- width: '100%',
40
- height: '100%',
41
- alignItems: 'center',
42
- justifyContent: 'center',
43
- backgroundColor: 'rgba(0, 0, 0, 0.25)'
44
- },
45
- content: {
46
- width: '100%',
47
- maxWidth: 720,
48
- height: '100%',
49
- maxHeight: '80%',
50
- alignItems: 'center',
51
- justifyContent: 'center',
52
- paddingHorizontal: SPACING['800'],
53
- paddingVertical: SPACING['400'],
54
- borderRadius: BORDER_RADIUS['400'],
55
- backgroundColor: COLORS.NEUTRAL_1
56
- }
57
- });
58
- //# sourceMappingURL=FormulaSheetModal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","View","Modal","StyleSheet","TouchableWithoutFeedback","BORDER_RADIUS","COLORS","Loader","LoaderSize","LoaderType","SPACING","jsx","_jsx","FormulaSheetModal","children","loaderColor","isLoading","onClose","visible","transparent","animationType","onRequestClose","onPress","style","styles","container","event","stopPropagation","content","type","PRIMARY","color","size","LARGE","create","width","height","alignItems","justifyContent","backgroundColor","maxWidth","maxHeight","paddingHorizontal","paddingVertical","borderRadius","NEUTRAL_1"],"sourceRoot":"../../../../../src","sources":["features/formulaSheet/components/FormulaSheetModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAA6B,OAAO;AAChD,SAASC,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAAEC,wBAAwB,QAAQ,cAAc;AAChF,SACEC,aAAa,EACbC,MAAM,EACNC,MAAM,EAENC,UAAU,EACVC,UAAU,EACVC,OAAO,QACF,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAQnC,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EAChCC,QAAQ;EACRC,WAAW;EACXC,SAAS;EACTC;AACyC,CAAC,KAAK;EAC/C,oBACEL,IAAA,CAACV,KAAK;IAACgB,OAAO;IAACC,WAAW;IAACC,aAAa,EAAC,MAAM;IAACC,cAAc,EAAEJ,OAAQ;IAAAH,QAAA,eACtEF,IAAA,CAACR,wBAAwB;MAACkB,OAAO,EAAEL,OAAQ;MAAAH,QAAA,eACzCF,IAAA,CAACX,IAAI;QAACsB,KAAK,EAAEC,MAAM,CAACC,SAAU;QAAAX,QAAA,eAC5BF,IAAA,CAACR,wBAAwB;UAACkB,OAAO,EAAGI,KAAK,IAAKA,KAAK,CAACC,eAAe,CAAC,CAAE;UAAAb,QAAA,eACpEF,IAAA,CAACX,IAAI;YAACsB,KAAK,EAAEC,MAAM,CAACI,OAAQ;YAAAd,QAAA,EACzBE,SAAS,gBACRJ,IAAA,CAACL,MAAM;cAACsB,IAAI,EAAEpB,UAAU,CAACqB,OAAQ;cAACC,KAAK,EAAEhB,WAAY;cAACiB,IAAI,EAAExB,UAAU,CAACyB;YAAM,CAAE,CAAC,GAEhFnB;UACD,CACG;QAAC,CACiB;MAAC,CACvB;IAAC,CACiB;EAAC,CACtB,CAAC;AAEZ,CAAC;AAED,MAAMU,MAAM,GAAGrB,UAAU,CAAC+B,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,eAAe,EAAE;EACnB,CAAC;EACDX,OAAO,EAAE;IACPO,KAAK,EAAE,MAAM;IACbK,QAAQ,EAAE,GAAG;IACbJ,MAAM,EAAE,MAAM;IACdK,SAAS,EAAE,KAAK;IAChBJ,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBI,iBAAiB,EAAEhC,OAAO,CAAC,KAAK,CAAC;IACjCiC,eAAe,EAAEjC,OAAO,CAAC,KAAK,CAAC;IAC/BkC,YAAY,EAAEvC,aAAa,CAAC,KAAK,CAAC;IAClCkC,eAAe,EAAEjC,MAAM,CAACuC;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- export { FormulaSheet } from "./components/FormulaSheet.js";
4
- export { FormulaSheetModel } from "./model/model.js";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["FormulaSheet","FormulaSheetModel"],"sourceRoot":"../../../../src","sources":["features/formulaSheet/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,8BAA2B;AACxD,SAASC,iBAAiB,QAAQ,kBAAe","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- import { createEffect } from 'effector';
4
- export class FormulaSheetAPI {
5
- getPDFFileBlobFx = createEffect();
6
- setupRequests(api) {
7
- this.getPDFFileBlobFx.use(api.getPDFFileBlob);
8
- }
9
- }
10
- //# sourceMappingURL=api.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createEffect","FormulaSheetAPI","getPDFFileBlobFx","setupRequests","api","use","getPDFFileBlob"],"sourceRoot":"../../../../../src","sources":["features/formulaSheet/model/api.model.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAgB,UAAU;AAM/C,OAAO,MAAMC,eAAe,CAAC;EACXC,gBAAgB,GAA2BF,YAAY,CAAC,CAAC;EAElEG,aAAaA,CAACC,GAAyB,EAAE;IAC9C,IAAI,CAACF,gBAAgB,CAACG,GAAG,CAACD,GAAG,CAACE,cAAc,CAAC;EAC/C;AACF","ignoreList":[]}
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- import { createEvent, restore } from 'effector';
4
- export class FormulaSheetFile {
5
- reset = createEvent();
6
- setId = createEvent();
7
- $id = restore(this.setId, null);
8
- constructor({
9
- api
10
- }) {
11
- this.$blob = restore(api.getPDFFileBlobFx.doneData, null).reset(this.reset);
12
- }
13
- }
14
- //# sourceMappingURL=file.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createEvent","restore","FormulaSheetFile","reset","setId","$id","constructor","api","$blob","getPDFFileBlobFx","doneData"],"sourceRoot":"../../../../../src","sources":["features/formulaSheet/model/file.model.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,QAAuB,UAAU;AAO9D,OAAO,MAAMC,gBAAgB,CAAC;EACZC,KAAK,GAAGH,WAAW,CAAC,CAAC;EAGrBI,KAAK,GAAGJ,WAAW,CAAS,CAAC;EAC7BK,GAAG,GAAGJ,OAAO,CAAC,IAAI,CAACG,KAAK,EAAE,IAAI,CAAC;EAE/CE,WAAWA,CAAC;IAAEC;EAA2B,CAAC,EAAE;IAC1C,IAAI,CAACC,KAAK,GAAGP,OAAO,CAACM,GAAG,CAACE,gBAAgB,CAACC,QAAQ,EAAE,IAAI,CAAC,CAACP,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EAC7E;AACF","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- import { createEvent, restore } from 'effector';
4
- export class FormulaSheetModal {
5
- reset = createEvent();
6
- toggle = createEvent();
7
- setIsOpen = createEvent();
8
- $isOpen = restore(this.setIsOpen, false).on(this.toggle, state => !state).reset(this.reset);
9
- }
10
- //# sourceMappingURL=modal.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createEvent","restore","FormulaSheetModal","reset","toggle","setIsOpen","$isOpen","on","state"],"sourceRoot":"../../../../../src","sources":["features/formulaSheet/model/modal.model.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,QAAQ,UAAU;AAE/C,OAAO,MAAMC,iBAAiB,CAAC;EACbC,KAAK,GAAGH,WAAW,CAAC,CAAC;EACrBI,MAAM,GAAGJ,WAAW,CAAC,CAAC;EACtBK,SAAS,GAAGL,WAAW,CAAU,CAAC;EAClCM,OAAO,GAAGL,OAAO,CAAC,IAAI,CAACI,SAAS,EAAE,KAAK,CAAC,CACrDE,EAAE,CAAC,IAAI,CAACH,MAAM,EAAGI,KAAK,IAAK,CAACA,KAAK,CAAC,CAClCL,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;AACtB","ignoreList":[]}
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- import { sample } from 'effector';
4
- import { FormulaSheetAPI } from "./api.model.js";
5
- import { FormulaSheetModal } from "./modal.model.js";
6
- import { FormulaSheetFile } from "./file.model.js";
7
- export class FormulaSheetModel {
8
- api = new FormulaSheetAPI();
9
- modal = new FormulaSheetModal();
10
- file = new FormulaSheetFile({
11
- api: this.api
12
- });
13
- constructor({
14
- api
15
- }) {
16
- this.api.setupRequests(api);
17
- sample({
18
- clock: this.modal.$isOpen,
19
- source: [this.file.$id, this.file.$blob],
20
- filter: ([fileId, blob], isOpen) => !!(isOpen && fileId && !blob),
21
- fn: ([fileId]) => fileId,
22
- target: this.api.getPDFFileBlobFx
23
- });
24
- sample({
25
- clock: this.file.$id,
26
- target: [this.file.reset, this.modal.reset]
27
- });
28
- }
29
- }
30
- //# sourceMappingURL=model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["sample","FormulaSheetAPI","FormulaSheetModal","FormulaSheetFile","FormulaSheetModel","api","modal","file","constructor","setupRequests","clock","$isOpen","source","$id","$blob","filter","fileId","blob","isOpen","fn","target","getPDFFileBlobFx","reset"],"sourceRoot":"../../../../../src","sources":["features/formulaSheet/model/model.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,UAAU;AACjC,SAASC,eAAe,QAAmC,gBAAa;AACxE,SAASC,iBAAiB,QAAQ,kBAAe;AACjD,SAASC,gBAAgB,QAAQ,iBAAc;AAM/C,OAAO,MAAMC,iBAAiB,CAAC;EACbC,GAAG,GAAG,IAAIJ,eAAe,CAAC,CAAC;EAC3BK,KAAK,GAAG,IAAIJ,iBAAiB,CAAC,CAAC;EAC/BK,IAAI,GAAG,IAAIJ,gBAAgB,CAAC;IAAEE,GAAG,EAAE,IAAI,CAACA;EAAI,CAAC,CAAC;EAE9DG,WAAWA,CAAC;IAAEH;EAA4B,CAAC,EAAE;IAC3C,IAAI,CAACA,GAAG,CAACI,aAAa,CAACJ,GAAG,CAAC;IAE3BL,MAAM,CAAC;MACLU,KAAK,EAAE,IAAI,CAACJ,KAAK,CAACK,OAAO;MACzBC,MAAM,EAAE,CAAC,IAAI,CAACL,IAAI,CAACM,GAAG,EAAE,IAAI,CAACN,IAAI,CAACO,KAAK,CAAC;MACxCC,MAAM,EAAEA,CAAC,CAACC,MAAM,EAAEC,IAAI,CAAC,EAAEC,MAAM,KAAK,CAAC,EAAEA,MAAM,IAAIF,MAAM,IAAI,CAACC,IAAI,CAAC;MACjEE,EAAE,EAAEA,CAAC,CAACH,MAAM,CAAC,KAAKA,MAAgB;MAClCI,MAAM,EAAE,IAAI,CAACf,GAAG,CAACgB;IACnB,CAAC,CAAC;IAEFrB,MAAM,CAAC;MACLU,KAAK,EAAE,IAAI,CAACH,IAAI,CAACM,GAAG;MACpBO,MAAM,EAAE,CAAC,IAAI,CAACb,IAAI,CAACe,KAAK,EAAE,IAAI,CAAChB,KAAK,CAACgB,KAAK;IAC5C,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -1,15 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { ButtonColor, ButtonSize, ButtonRef, LoaderColor } from '@magmamath/react-native-ui';
3
- import { FormulaSheetModel } from '../model/model';
4
- type FormulaSheetProps = {
5
- model: FormulaSheetModel;
6
- fileId: string;
7
- renderer: (fileBlob: string) => ReactNode;
8
- buttonSize: ButtonSize;
9
- buttonColor: ButtonColor;
10
- loaderColor: LoaderColor;
11
- onPress?: () => void;
12
- };
13
- export declare const FormulaSheet: React.ForwardRefExoticComponent<FormulaSheetProps & React.RefAttributes<ButtonRef | null>>;
14
- export {};
15
- //# sourceMappingURL=FormulaSheet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormulaSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAa,MAAM,OAAO,CAAA;AAE/D,OAAO,EAEL,WAAW,EACX,UAAU,EAIV,SAAS,EACT,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,iBAAiB,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAA;IACzC,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,YAAY,4FAgDxB,CAAA"}
@@ -1,10 +0,0 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { LoaderColor } from '@magmamath/react-native-ui';
3
- type FormulaSheetModalProps = {
4
- isLoading: boolean;
5
- loaderColor: LoaderColor;
6
- onClose: () => void;
7
- };
8
- export declare const FormulaSheetModal: ({ children, loaderColor, isLoading, onClose, }: PropsWithChildren<FormulaSheetModalProps>) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=FormulaSheetModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormulaSheetModal.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheetModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,EAIL,WAAW,EAIZ,MAAM,4BAA4B,CAAA;AAEnC,KAAK,sBAAsB,GAAG;IAC5B,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,iBAAiB,mDAK3B,iBAAiB,CAAC,sBAAsB,CAAC,sBAkB3C,CAAA"}
@@ -1,3 +0,0 @@
1
- export { FormulaSheet } from './components/FormulaSheet';
2
- export { FormulaSheetModel } from './model/model';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/formulaSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA"}
@@ -1,9 +0,0 @@
1
- import { Effect } from 'effector';
2
- export type FormulaSheetApiProps = {
3
- getPDFFileBlob: (id: string) => Promise<string>;
4
- };
5
- export declare class FormulaSheetAPI {
6
- readonly getPDFFileBlobFx: Effect<string, string>;
7
- setupRequests(api: FormulaSheetApiProps): void;
8
- }
9
- //# sourceMappingURL=api.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAA;AAE/C,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAChD,CAAA;AAED,qBAAa,eAAe;IAC1B,SAAgB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAiB;IAElE,aAAa,CAAC,GAAG,EAAE,oBAAoB;CAG/C"}
@@ -1,14 +0,0 @@
1
- import { StoreWritable } from 'effector';
2
- import { FormulaSheetAPI } from './api.model';
3
- type FormulaSheetFileProps = {
4
- api: FormulaSheetAPI;
5
- };
6
- export declare class FormulaSheetFile {
7
- readonly reset: import("effector").EventCallable<void>;
8
- readonly $blob: StoreWritable<string | null>;
9
- readonly setId: import("effector").EventCallable<string>;
10
- readonly $id: StoreWritable<string | null>;
11
- constructor({ api }: FormulaSheetFileProps);
12
- }
13
- export {};
14
- //# sourceMappingURL=file.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/file.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,aAAa,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C,KAAK,qBAAqB,GAAG;IAC3B,GAAG,EAAE,eAAe,CAAA;CACrB,CAAA;AAED,qBAAa,gBAAgB;IAC3B,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAEnD,SAAgB,KAAK,2CAAwB;IAC7C,SAAgB,GAAG,+BAA4B;gBAEnC,EAAE,GAAG,EAAE,EAAE,qBAAqB;CAG3C"}
@@ -1,7 +0,0 @@
1
- export declare class FormulaSheetModal {
2
- readonly reset: import("effector").EventCallable<void>;
3
- readonly toggle: import("effector").EventCallable<void>;
4
- readonly setIsOpen: import("effector").EventCallable<boolean>;
5
- readonly $isOpen: import("effector").StoreWritable<boolean>;
6
- }
7
- //# sourceMappingURL=modal.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modal.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/modal.model.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;IAC5B,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,MAAM,yCAAgB;IACtC,SAAgB,SAAS,4CAAyB;IAClD,SAAgB,OAAO,4CAEH;CACrB"}
@@ -1,14 +0,0 @@
1
- import { FormulaSheetAPI, type FormulaSheetApiProps } from './api.model';
2
- import { FormulaSheetModal } from './modal.model';
3
- import { FormulaSheetFile } from './file.model';
4
- type FormulaSheetModelProps = {
5
- api: FormulaSheetApiProps;
6
- };
7
- export declare class FormulaSheetModel {
8
- readonly api: FormulaSheetAPI;
9
- readonly modal: FormulaSheetModal;
10
- readonly file: FormulaSheetFile;
11
- constructor({ api }: FormulaSheetModelProps);
12
- }
13
- export {};
14
- //# sourceMappingURL=model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE/C,KAAK,sBAAsB,GAAG;IAC5B,GAAG,EAAE,oBAAoB,CAAA;CAC1B,CAAA;AAED,qBAAa,iBAAiB;IAC5B,SAAgB,GAAG,kBAAwB;IAC3C,SAAgB,KAAK,oBAA0B;IAC/C,SAAgB,IAAI,mBAA0C;gBAElD,EAAE,GAAG,EAAE,EAAE,sBAAsB;CAgB5C"}
@@ -1,15 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { ButtonColor, ButtonSize, ButtonRef, LoaderColor } from '@magmamath/react-native-ui';
3
- import { FormulaSheetModel } from '../model/model';
4
- type FormulaSheetProps = {
5
- model: FormulaSheetModel;
6
- fileId: string;
7
- renderer: (fileBlob: string) => ReactNode;
8
- buttonSize: ButtonSize;
9
- buttonColor: ButtonColor;
10
- loaderColor: LoaderColor;
11
- onPress?: () => void;
12
- };
13
- export declare const FormulaSheet: React.ForwardRefExoticComponent<FormulaSheetProps & React.RefAttributes<ButtonRef | null>>;
14
- export {};
15
- //# sourceMappingURL=FormulaSheet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormulaSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAa,MAAM,OAAO,CAAA;AAE/D,OAAO,EAEL,WAAW,EACX,UAAU,EAIV,SAAS,EACT,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,iBAAiB,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAA;IACzC,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,YAAY,4FAgDxB,CAAA"}
@@ -1,10 +0,0 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { LoaderColor } from '@magmamath/react-native-ui';
3
- type FormulaSheetModalProps = {
4
- isLoading: boolean;
5
- loaderColor: LoaderColor;
6
- onClose: () => void;
7
- };
8
- export declare const FormulaSheetModal: ({ children, loaderColor, isLoading, onClose, }: PropsWithChildren<FormulaSheetModalProps>) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=FormulaSheetModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormulaSheetModal.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheetModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,EAIL,WAAW,EAIZ,MAAM,4BAA4B,CAAA;AAEnC,KAAK,sBAAsB,GAAG;IAC5B,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,iBAAiB,mDAK3B,iBAAiB,CAAC,sBAAsB,CAAC,sBAkB3C,CAAA"}
@@ -1,3 +0,0 @@
1
- export { FormulaSheet } from './components/FormulaSheet';
2
- export { FormulaSheetModel } from './model/model';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/formulaSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA"}
@@ -1,9 +0,0 @@
1
- import { Effect } from 'effector';
2
- export type FormulaSheetApiProps = {
3
- getPDFFileBlob: (id: string) => Promise<string>;
4
- };
5
- export declare class FormulaSheetAPI {
6
- readonly getPDFFileBlobFx: Effect<string, string>;
7
- setupRequests(api: FormulaSheetApiProps): void;
8
- }
9
- //# sourceMappingURL=api.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAA;AAE/C,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAChD,CAAA;AAED,qBAAa,eAAe;IAC1B,SAAgB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAiB;IAElE,aAAa,CAAC,GAAG,EAAE,oBAAoB;CAG/C"}
@@ -1,14 +0,0 @@
1
- import { StoreWritable } from 'effector';
2
- import { FormulaSheetAPI } from './api.model';
3
- type FormulaSheetFileProps = {
4
- api: FormulaSheetAPI;
5
- };
6
- export declare class FormulaSheetFile {
7
- readonly reset: import("effector").EventCallable<void>;
8
- readonly $blob: StoreWritable<string | null>;
9
- readonly setId: import("effector").EventCallable<string>;
10
- readonly $id: StoreWritable<string | null>;
11
- constructor({ api }: FormulaSheetFileProps);
12
- }
13
- export {};
14
- //# sourceMappingURL=file.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/file.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,aAAa,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C,KAAK,qBAAqB,GAAG;IAC3B,GAAG,EAAE,eAAe,CAAA;CACrB,CAAA;AAED,qBAAa,gBAAgB;IAC3B,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAEnD,SAAgB,KAAK,2CAAwB;IAC7C,SAAgB,GAAG,+BAA4B;gBAEnC,EAAE,GAAG,EAAE,EAAE,qBAAqB;CAG3C"}
@@ -1,7 +0,0 @@
1
- export declare class FormulaSheetModal {
2
- readonly reset: import("effector").EventCallable<void>;
3
- readonly toggle: import("effector").EventCallable<void>;
4
- readonly setIsOpen: import("effector").EventCallable<boolean>;
5
- readonly $isOpen: import("effector").StoreWritable<boolean>;
6
- }
7
- //# sourceMappingURL=modal.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modal.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/modal.model.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;IAC5B,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,MAAM,yCAAgB;IACtC,SAAgB,SAAS,4CAAyB;IAClD,SAAgB,OAAO,4CAEH;CACrB"}
@@ -1,14 +0,0 @@
1
- import { FormulaSheetAPI, type FormulaSheetApiProps } from './api.model';
2
- import { FormulaSheetModal } from './modal.model';
3
- import { FormulaSheetFile } from './file.model';
4
- type FormulaSheetModelProps = {
5
- api: FormulaSheetApiProps;
6
- };
7
- export declare class FormulaSheetModel {
8
- readonly api: FormulaSheetAPI;
9
- readonly modal: FormulaSheetModal;
10
- readonly file: FormulaSheetFile;
11
- constructor({ api }: FormulaSheetModelProps);
12
- }
13
- export {};
14
- //# sourceMappingURL=model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE/C,KAAK,sBAAsB,GAAG;IAC5B,GAAG,EAAE,oBAAoB,CAAA;CAC1B,CAAA;AAED,qBAAa,iBAAiB;IAC5B,SAAgB,GAAG,kBAAwB;IAC3C,SAAgB,KAAK,oBAA0B;IAC/C,SAAgB,IAAI,mBAA0C;gBAElD,EAAE,GAAG,EAAE,EAAE,sBAAsB;CAgB5C"}
@@ -1,74 +0,0 @@
1
- import React, { forwardRef, ReactNode, useEffect } from 'react'
2
- import { useUnit } from 'effector-react'
3
- import {
4
- Button,
5
- ButtonColor,
6
- ButtonSize,
7
- ButtonVariant,
8
- COLORS,
9
- TheoryIcon,
10
- ButtonRef,
11
- LoaderColor,
12
- } from '@magmamath/react-native-ui'
13
- import { FormulaSheetModel } from '../model/model'
14
- import { FormulaSheetModal } from './FormulaSheetModal'
15
-
16
- type FormulaSheetProps = {
17
- model: FormulaSheetModel
18
- fileId: string
19
- renderer: (fileBlob: string) => ReactNode
20
- buttonSize: ButtonSize
21
- buttonColor: ButtonColor
22
- loaderColor: LoaderColor
23
- onPress?: () => void
24
- }
25
-
26
- export const FormulaSheet = forwardRef<ButtonRef | null, FormulaSheetProps>(
27
- (
28
- {
29
- model,
30
- fileId,
31
- renderer,
32
- buttonSize = ButtonSize.MEDIUM,
33
- buttonColor = ButtonColor.BLUE,
34
- loaderColor = LoaderColor.BLUE,
35
- onPress,
36
- },
37
- ref,
38
- ) => {
39
- const isOpen = useUnit(model.modal.$isOpen)
40
- const sheetFileBlob = useUnit(model.file.$blob)
41
- const isRequestPending = useUnit(model.api.getPDFFileBlobFx.pending)
42
-
43
- useEffect(() => {
44
- model.file.setId(fileId ?? null)
45
- }, [fileId])
46
-
47
- return (
48
- <>
49
- <Button
50
- ref={ref}
51
- size={buttonSize}
52
- variant={ButtonVariant.SECONDARY}
53
- colorScheme={buttonColor}
54
- isActive={isOpen}
55
- onPress={() => {
56
- model.modal.toggle()
57
- onPress?.()
58
- }}
59
- icon={<TheoryIcon color={isOpen ? COLORS.NEUTRAL_1 : undefined} size={20} />}
60
- />
61
-
62
- {isOpen && (
63
- <FormulaSheetModal
64
- isLoading={isRequestPending}
65
- loaderColor={loaderColor}
66
- onClose={() => model.modal.setIsOpen(false)}
67
- >
68
- {renderer(sheetFileBlob ?? '')}
69
- </FormulaSheetModal>
70
- )}
71
- </>
72
- )
73
- },
74
- )
@@ -1,64 +0,0 @@
1
- import React, { PropsWithChildren } from 'react'
2
- import { View, Modal, StyleSheet, TouchableWithoutFeedback } from 'react-native'
3
- import {
4
- BORDER_RADIUS,
5
- COLORS,
6
- Loader,
7
- LoaderColor,
8
- LoaderSize,
9
- LoaderType,
10
- SPACING,
11
- } from '@magmamath/react-native-ui'
12
-
13
- type FormulaSheetModalProps = {
14
- isLoading: boolean
15
- loaderColor: LoaderColor
16
- onClose: () => void
17
- }
18
-
19
- export const FormulaSheetModal = ({
20
- children,
21
- loaderColor,
22
- isLoading,
23
- onClose,
24
- }: PropsWithChildren<FormulaSheetModalProps>) => {
25
- return (
26
- <Modal visible transparent animationType="none" onRequestClose={onClose}>
27
- <TouchableWithoutFeedback onPress={onClose}>
28
- <View style={styles.container}>
29
- <TouchableWithoutFeedback onPress={(event) => event.stopPropagation()}>
30
- <View style={styles.content}>
31
- {isLoading ? (
32
- <Loader type={LoaderType.PRIMARY} color={loaderColor} size={LoaderSize.LARGE} />
33
- ) : (
34
- children
35
- )}
36
- </View>
37
- </TouchableWithoutFeedback>
38
- </View>
39
- </TouchableWithoutFeedback>
40
- </Modal>
41
- )
42
- }
43
-
44
- const styles = StyleSheet.create({
45
- container: {
46
- width: '100%',
47
- height: '100%',
48
- alignItems: 'center',
49
- justifyContent: 'center',
50
- backgroundColor: 'rgba(0, 0, 0, 0.25)',
51
- },
52
- content: {
53
- width: '100%',
54
- maxWidth: 720,
55
- height: '100%',
56
- maxHeight: '80%',
57
- alignItems: 'center',
58
- justifyContent: 'center',
59
- paddingHorizontal: SPACING['800'],
60
- paddingVertical: SPACING['400'],
61
- borderRadius: BORDER_RADIUS['400'],
62
- backgroundColor: COLORS.NEUTRAL_1,
63
- },
64
- })
@@ -1,2 +0,0 @@
1
- export { FormulaSheet } from './components/FormulaSheet'
2
- export { FormulaSheetModel } from './model/model'
@@ -1,13 +0,0 @@
1
- import { createEffect, Effect } from 'effector'
2
-
3
- export type FormulaSheetApiProps = {
4
- getPDFFileBlob: (id: string) => Promise<string>
5
- }
6
-
7
- export class FormulaSheetAPI {
8
- public readonly getPDFFileBlobFx: Effect<string, string> = createEffect()
9
-
10
- public setupRequests(api: FormulaSheetApiProps) {
11
- this.getPDFFileBlobFx.use(api.getPDFFileBlob)
12
- }
13
- }
@@ -1,18 +0,0 @@
1
- import { createEvent, restore, StoreWritable } from 'effector'
2
- import { FormulaSheetAPI } from './api.model'
3
-
4
- type FormulaSheetFileProps = {
5
- api: FormulaSheetAPI
6
- }
7
-
8
- export class FormulaSheetFile {
9
- public readonly reset = createEvent()
10
- public readonly $blob: StoreWritable<string | null>
11
-
12
- public readonly setId = createEvent<string>()
13
- public readonly $id = restore(this.setId, null)
14
-
15
- constructor({ api }: FormulaSheetFileProps) {
16
- this.$blob = restore(api.getPDFFileBlobFx.doneData, null).reset(this.reset)
17
- }
18
- }
@@ -1,10 +0,0 @@
1
- import { createEvent, restore } from 'effector'
2
-
3
- export class FormulaSheetModal {
4
- public readonly reset = createEvent()
5
- public readonly toggle = createEvent()
6
- public readonly setIsOpen = createEvent<boolean>()
7
- public readonly $isOpen = restore(this.setIsOpen, false)
8
- .on(this.toggle, (state) => !state)
9
- .reset(this.reset)
10
- }
@@ -1,31 +0,0 @@
1
- import { sample } from 'effector'
2
- import { FormulaSheetAPI, type FormulaSheetApiProps } from './api.model'
3
- import { FormulaSheetModal } from './modal.model'
4
- import { FormulaSheetFile } from './file.model'
5
-
6
- type FormulaSheetModelProps = {
7
- api: FormulaSheetApiProps
8
- }
9
-
10
- export class FormulaSheetModel {
11
- public readonly api = new FormulaSheetAPI()
12
- public readonly modal = new FormulaSheetModal()
13
- public readonly file = new FormulaSheetFile({ api: this.api })
14
-
15
- constructor({ api }: FormulaSheetModelProps) {
16
- this.api.setupRequests(api)
17
-
18
- sample({
19
- clock: this.modal.$isOpen,
20
- source: [this.file.$id, this.file.$blob],
21
- filter: ([fileId, blob], isOpen) => !!(isOpen && fileId && !blob),
22
- fn: ([fileId]) => fileId as string,
23
- target: this.api.getPDFFileBlobFx,
24
- })
25
-
26
- sample({
27
- clock: this.file.$id,
28
- target: [this.file.reset, this.modal.reset],
29
- })
30
- }
31
- }