@churchapps/apphelper 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (641) hide show
  1. package/.eslintignore +4 -0
  2. package/.eslintrc.json +22 -0
  3. package/LICENSE +21 -0
  4. package/README.md +16 -0
  5. package/dist/components/CreatePerson.d.ts +9 -0
  6. package/dist/components/CreatePerson.d.ts.map +1 -0
  7. package/dist/components/CreatePerson.js +80 -0
  8. package/dist/components/CreatePerson.js.map +1 -0
  9. package/dist/components/DisplayBox.d.ts +16 -0
  10. package/dist/components/DisplayBox.d.ts.map +1 -0
  11. package/dist/components/DisplayBox.js +48 -0
  12. package/dist/components/DisplayBox.js.map +1 -0
  13. package/dist/components/ErrorMessages.d.ts +7 -0
  14. package/dist/components/ErrorMessages.d.ts.map +1 -0
  15. package/dist/components/ErrorMessages.js +47 -0
  16. package/dist/components/ErrorMessages.js.map +1 -0
  17. package/dist/components/ExportLink.d.ts +10 -0
  18. package/dist/components/ExportLink.d.ts.map +1 -0
  19. package/dist/components/ExportLink.js +70 -0
  20. package/dist/components/ExportLink.js.map +1 -0
  21. package/dist/components/FloatingSupport.d.ts +7 -0
  22. package/dist/components/FloatingSupport.d.ts.map +1 -0
  23. package/dist/components/FloatingSupport.js +18 -0
  24. package/dist/components/FloatingSupport.js.map +1 -0
  25. package/dist/components/FormSubmissionEdit.d.ts +18 -0
  26. package/dist/components/FormSubmissionEdit.d.ts.map +1 -0
  27. package/dist/components/FormSubmissionEdit.js +125 -0
  28. package/dist/components/FormSubmissionEdit.js.map +1 -0
  29. package/dist/components/HelpIcon.d.ts +7 -0
  30. package/dist/components/HelpIcon.d.ts.map +1 -0
  31. package/dist/components/HelpIcon.js +12 -0
  32. package/dist/components/HelpIcon.js.map +1 -0
  33. package/dist/components/ImageEditor.d.ts +15 -0
  34. package/dist/components/ImageEditor.d.ts.map +1 -0
  35. package/dist/components/ImageEditor.js +109 -0
  36. package/dist/components/ImageEditor.js.map +1 -0
  37. package/dist/components/InputBox.d.ts +24 -0
  38. package/dist/components/InputBox.d.ts.map +1 -0
  39. package/dist/components/InputBox.js +59 -0
  40. package/dist/components/InputBox.js.map +1 -0
  41. package/dist/components/Loading.d.ts +10 -0
  42. package/dist/components/Loading.d.ts.map +1 -0
  43. package/dist/components/Loading.js +34 -0
  44. package/dist/components/Loading.js.map +1 -0
  45. package/dist/components/PersonAdd.d.ts +15 -0
  46. package/dist/components/PersonAdd.d.ts.map +1 -0
  47. package/dist/components/PersonAdd.js +84 -0
  48. package/dist/components/PersonAdd.js.map +1 -0
  49. package/dist/components/QuestionEdit.d.ts +11 -0
  50. package/dist/components/QuestionEdit.d.ts.map +1 -0
  51. package/dist/components/QuestionEdit.js +76 -0
  52. package/dist/components/QuestionEdit.js.map +1 -0
  53. package/dist/components/SmallButton.d.ts +14 -0
  54. package/dist/components/SmallButton.d.ts.map +1 -0
  55. package/dist/components/SmallButton.js +31 -0
  56. package/dist/components/SmallButton.js.map +1 -0
  57. package/dist/components/SupportModal.d.ts +8 -0
  58. package/dist/components/SupportModal.d.ts.map +1 -0
  59. package/dist/components/SupportModal.js +47 -0
  60. package/dist/components/SupportModal.js.map +1 -0
  61. package/dist/components/TabPanel.d.ts +9 -0
  62. package/dist/components/TabPanel.d.ts.map +1 -0
  63. package/dist/components/TabPanel.js +24 -0
  64. package/dist/components/TabPanel.js.map +1 -0
  65. package/dist/components/gallery/GalleryModal.d.ts +9 -0
  66. package/dist/components/gallery/GalleryModal.d.ts.map +1 -0
  67. package/dist/components/gallery/GalleryModal.js +108 -0
  68. package/dist/components/gallery/GalleryModal.js.map +1 -0
  69. package/dist/components/gallery/StockPhotos.d.ts +9 -0
  70. package/dist/components/gallery/StockPhotos.d.ts.map +1 -0
  71. package/dist/components/gallery/StockPhotos.js +82 -0
  72. package/dist/components/gallery/StockPhotos.js.map +1 -0
  73. package/dist/components/index.d.ts +18 -0
  74. package/dist/components/index.d.ts.map +1 -0
  75. package/dist/components/index.js +51 -0
  76. package/dist/components/index.js.map +1 -0
  77. package/dist/components/markdownEditor/Editor.d.ts +12 -0
  78. package/dist/components/markdownEditor/Editor.d.ts.map +1 -0
  79. package/dist/components/markdownEditor/Editor.js +106 -0
  80. package/dist/components/markdownEditor/Editor.js.map +1 -0
  81. package/dist/components/markdownEditor/MarkdownEditor.d.ts +11 -0
  82. package/dist/components/markdownEditor/MarkdownEditor.d.ts.map +1 -0
  83. package/dist/components/markdownEditor/MarkdownEditor.js +39 -0
  84. package/dist/components/markdownEditor/MarkdownEditor.js.map +1 -0
  85. package/dist/components/markdownEditor/MarkdownModal.d.ts +9 -0
  86. package/dist/components/markdownEditor/MarkdownModal.d.ts.map +1 -0
  87. package/dist/components/markdownEditor/MarkdownModal.js +58 -0
  88. package/dist/components/markdownEditor/MarkdownModal.js.map +1 -0
  89. package/dist/components/markdownEditor/MarkdownPreview.d.ts +8 -0
  90. package/dist/components/markdownEditor/MarkdownPreview.d.ts.map +1 -0
  91. package/dist/components/markdownEditor/MarkdownPreview.js +35 -0
  92. package/dist/components/markdownEditor/MarkdownPreview.js.map +1 -0
  93. package/dist/components/markdownEditor/plugins/AutoLinkPlugin.d.ts +3 -0
  94. package/dist/components/markdownEditor/plugins/AutoLinkPlugin.d.ts.map +1 -0
  95. package/dist/components/markdownEditor/plugins/AutoLinkPlugin.js +35 -0
  96. package/dist/components/markdownEditor/plugins/AutoLinkPlugin.js.map +1 -0
  97. package/dist/components/markdownEditor/plugins/ControlledEditorPlugin.d.ts +8 -0
  98. package/dist/components/markdownEditor/plugins/ControlledEditorPlugin.d.ts.map +1 -0
  99. package/dist/components/markdownEditor/plugins/ControlledEditorPlugin.js +20 -0
  100. package/dist/components/markdownEditor/plugins/ControlledEditorPlugin.js.map +1 -0
  101. package/dist/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.d.ts +2 -0
  102. package/dist/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.d.ts.map +1 -0
  103. package/dist/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.js +46 -0
  104. package/dist/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.js.map +1 -0
  105. package/dist/components/markdownEditor/plugins/MarkdownTransformers.d.ts +12 -0
  106. package/dist/components/markdownEditor/plugins/MarkdownTransformers.d.ts.map +1 -0
  107. package/dist/components/markdownEditor/plugins/MarkdownTransformers.js +85 -0
  108. package/dist/components/markdownEditor/plugins/MarkdownTransformers.js.map +1 -0
  109. package/dist/components/markdownEditor/plugins/ReadOnlyPlugin.d.ts +6 -0
  110. package/dist/components/markdownEditor/plugins/ReadOnlyPlugin.d.ts.map +1 -0
  111. package/dist/components/markdownEditor/plugins/ReadOnlyPlugin.js +13 -0
  112. package/dist/components/markdownEditor/plugins/ReadOnlyPlugin.js.map +1 -0
  113. package/dist/components/markdownEditor/plugins/ToolbarPlugin.d.ts +8 -0
  114. package/dist/components/markdownEditor/plugins/ToolbarPlugin.d.ts.map +1 -0
  115. package/dist/components/markdownEditor/plugins/ToolbarPlugin.js +324 -0
  116. package/dist/components/markdownEditor/plugins/ToolbarPlugin.js.map +1 -0
  117. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.d.ts +27 -0
  118. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.d.ts.map +1 -0
  119. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.js +158 -0
  120. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.js.map +1 -0
  121. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.d.ts +4 -0
  122. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.d.ts.map +1 -0
  123. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.js +18 -0
  124. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.js.map +1 -0
  125. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.d.ts +3 -0
  126. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.d.ts.map +1 -0
  127. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.js +67 -0
  128. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.js.map +1 -0
  129. package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.d.ts +5 -0
  130. package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.d.ts.map +1 -0
  131. package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.js +212 -0
  132. package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.js.map +1 -0
  133. package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.types.d.ts +11 -0
  134. package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.types.d.ts.map +1 -0
  135. package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.types.js +3 -0
  136. package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.types.js.map +1 -0
  137. package/dist/components/markdownEditor/plugins/emoji/EmojiNode.d.ts +24 -0
  138. package/dist/components/markdownEditor/plugins/emoji/EmojiNode.d.ts.map +1 -0
  139. package/dist/components/markdownEditor/plugins/emoji/EmojiNode.js +63 -0
  140. package/dist/components/markdownEditor/plugins/emoji/EmojiNode.js.map +1 -0
  141. package/dist/components/markdownEditor/plugins/emoji/EmojiNodeTransform.d.ts +4 -0
  142. package/dist/components/markdownEditor/plugins/emoji/EmojiNodeTransform.d.ts.map +1 -0
  143. package/dist/components/markdownEditor/plugins/emoji/EmojiNodeTransform.js +35 -0
  144. package/dist/components/markdownEditor/plugins/emoji/EmojiNodeTransform.js.map +1 -0
  145. package/dist/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.d.ts +10 -0
  146. package/dist/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.d.ts.map +1 -0
  147. package/dist/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.js +99 -0
  148. package/dist/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.js.map +1 -0
  149. package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.d.ts +11 -0
  150. package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.d.ts.map +1 -0
  151. package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.js +55 -0
  152. package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.js.map +1 -0
  153. package/dist/components/markdownEditor/plugins/index.d.ts +7 -0
  154. package/dist/components/markdownEditor/plugins/index.d.ts.map +1 -0
  155. package/dist/components/markdownEditor/plugins/index.js +16 -0
  156. package/dist/components/markdownEditor/plugins/index.js.map +1 -0
  157. package/dist/components/markdownEditor/theme.d.ts +66 -0
  158. package/dist/components/markdownEditor/theme.d.ts.map +1 -0
  159. package/dist/components/markdownEditor/theme.js +69 -0
  160. package/dist/components/markdownEditor/theme.js.map +1 -0
  161. package/dist/components/material/AppList.d.ts +9 -0
  162. package/dist/components/material/AppList.d.ts.map +1 -0
  163. package/dist/components/material/AppList.js +21 -0
  164. package/dist/components/material/AppList.js.map +1 -0
  165. package/dist/components/material/ChurchList.d.ts +9 -0
  166. package/dist/components/material/ChurchList.d.ts.map +1 -0
  167. package/dist/components/material/ChurchList.js +25 -0
  168. package/dist/components/material/ChurchList.js.map +1 -0
  169. package/dist/components/material/NavItem.d.ts +14 -0
  170. package/dist/components/material/NavItem.d.ts.map +1 -0
  171. package/dist/components/material/NavItem.js +36 -0
  172. package/dist/components/material/NavItem.js.map +1 -0
  173. package/dist/components/material/NewPrivateMessage.d.ts +10 -0
  174. package/dist/components/material/NewPrivateMessage.d.ts.map +1 -0
  175. package/dist/components/material/NewPrivateMessage.js +96 -0
  176. package/dist/components/material/NewPrivateMessage.js.map +1 -0
  177. package/dist/components/material/PrivateMessageDetails.d.ts +10 -0
  178. package/dist/components/material/PrivateMessageDetails.d.ts.map +1 -0
  179. package/dist/components/material/PrivateMessageDetails.js +18 -0
  180. package/dist/components/material/PrivateMessageDetails.js.map +1 -0
  181. package/dist/components/material/PrivateMessages.d.ts +8 -0
  182. package/dist/components/material/PrivateMessages.d.ts.map +1 -0
  183. package/dist/components/material/PrivateMessages.js +105 -0
  184. package/dist/components/material/PrivateMessages.js.map +1 -0
  185. package/dist/components/material/SiteWrapper.d.ts +14 -0
  186. package/dist/components/material/SiteWrapper.d.ts.map +1 -0
  187. package/dist/components/material/SiteWrapper.js +120 -0
  188. package/dist/components/material/SiteWrapper.js.map +1 -0
  189. package/dist/components/material/UserMenu.d.ts +14 -0
  190. package/dist/components/material/UserMenu.d.ts.map +1 -0
  191. package/dist/components/material/UserMenu.js +98 -0
  192. package/dist/components/material/UserMenu.js.map +1 -0
  193. package/dist/components/material/iconPicker/IconNamesList.d.ts +3 -0
  194. package/dist/components/material/iconPicker/IconNamesList.d.ts.map +1 -0
  195. package/dist/components/material/iconPicker/IconNamesList.js +2241 -0
  196. package/dist/components/material/iconPicker/IconNamesList.js.map +1 -0
  197. package/dist/components/material/iconPicker/IconPicker.d.ts +7 -0
  198. package/dist/components/material/iconPicker/IconPicker.d.ts.map +1 -0
  199. package/dist/components/material/iconPicker/IconPicker.js +136 -0
  200. package/dist/components/material/iconPicker/IconPicker.js.map +1 -0
  201. package/dist/components/material/index.d.ts +6 -0
  202. package/dist/components/material/index.d.ts.map +1 -0
  203. package/dist/components/material/index.js +14 -0
  204. package/dist/components/material/index.js.map +1 -0
  205. package/dist/components/notes/AddNote.d.ts +12 -0
  206. package/dist/components/notes/AddNote.d.ts.map +1 -0
  207. package/dist/components/notes/AddNote.js +123 -0
  208. package/dist/components/notes/AddNote.js.map +1 -0
  209. package/dist/components/notes/Conversation.d.ts +11 -0
  210. package/dist/components/notes/Conversation.d.ts.map +1 -0
  211. package/dist/components/notes/Conversation.js +85 -0
  212. package/dist/components/notes/Conversation.js.map +1 -0
  213. package/dist/components/notes/Conversations.d.ts +11 -0
  214. package/dist/components/notes/Conversations.d.ts.map +1 -0
  215. package/dist/components/notes/Conversations.js +64 -0
  216. package/dist/components/notes/Conversations.js.map +1 -0
  217. package/dist/components/notes/NewConversation.d.ts +13 -0
  218. package/dist/components/notes/NewConversation.d.ts.map +1 -0
  219. package/dist/components/notes/NewConversation.js +86 -0
  220. package/dist/components/notes/NewConversation.js.map +1 -0
  221. package/dist/components/notes/Note.d.ts +9 -0
  222. package/dist/components/notes/Note.d.ts.map +1 -0
  223. package/dist/components/notes/Note.js +58 -0
  224. package/dist/components/notes/Note.js.map +1 -0
  225. package/dist/components/notes/Notes.d.ts +11 -0
  226. package/dist/components/notes/Notes.d.ts.map +1 -0
  227. package/dist/components/notes/Notes.js +59 -0
  228. package/dist/components/notes/Notes.js.map +1 -0
  229. package/dist/components/reporting/ChartReport.d.ts +9 -0
  230. package/dist/components/reporting/ChartReport.d.ts.map +1 -0
  231. package/dist/components/reporting/ChartReport.js +93 -0
  232. package/dist/components/reporting/ChartReport.js.map +1 -0
  233. package/dist/components/reporting/ReportFilter.d.ts +10 -0
  234. package/dist/components/reporting/ReportFilter.d.ts.map +1 -0
  235. package/dist/components/reporting/ReportFilter.js +54 -0
  236. package/dist/components/reporting/ReportFilter.js.map +1 -0
  237. package/dist/components/reporting/ReportFilterField.d.ts +10 -0
  238. package/dist/components/reporting/ReportFilterField.d.ts.map +1 -0
  239. package/dist/components/reporting/ReportFilterField.js +167 -0
  240. package/dist/components/reporting/ReportFilterField.js.map +1 -0
  241. package/dist/components/reporting/ReportOutput.d.ts +8 -0
  242. package/dist/components/reporting/ReportOutput.d.ts.map +1 -0
  243. package/dist/components/reporting/ReportOutput.js +95 -0
  244. package/dist/components/reporting/ReportOutput.js.map +1 -0
  245. package/dist/components/reporting/ReportWithFilter.d.ts +8 -0
  246. package/dist/components/reporting/ReportWithFilter.d.ts.map +1 -0
  247. package/dist/components/reporting/ReportWithFilter.js +67 -0
  248. package/dist/components/reporting/ReportWithFilter.js.map +1 -0
  249. package/dist/components/reporting/TableReport.d.ts +9 -0
  250. package/dist/components/reporting/TableReport.d.ts.map +1 -0
  251. package/dist/components/reporting/TableReport.js +50 -0
  252. package/dist/components/reporting/TableReport.js.map +1 -0
  253. package/dist/components/reporting/TreeReport.d.ts +9 -0
  254. package/dist/components/reporting/TreeReport.d.ts.map +1 -0
  255. package/dist/components/reporting/TreeReport.js +104 -0
  256. package/dist/components/reporting/TreeReport.js.map +1 -0
  257. package/dist/components/reporting/index.d.ts +5 -0
  258. package/dist/components/reporting/index.d.ts.map +1 -0
  259. package/dist/components/reporting/index.js +12 -0
  260. package/dist/components/reporting/index.js.map +1 -0
  261. package/dist/donationComponents/DonationPage.d.ts +9 -0
  262. package/dist/donationComponents/DonationPage.d.ts.map +1 -0
  263. package/dist/donationComponents/DonationPage.js +128 -0
  264. package/dist/donationComponents/DonationPage.js.map +1 -0
  265. package/dist/donationComponents/components/BankForm.d.ts +14 -0
  266. package/dist/donationComponents/components/BankForm.d.ts.map +1 -0
  267. package/dist/donationComponents/components/BankForm.js +161 -0
  268. package/dist/donationComponents/components/BankForm.js.map +1 -0
  269. package/dist/donationComponents/components/CardForm.d.ts +13 -0
  270. package/dist/donationComponents/components/CardForm.d.ts.map +1 -0
  271. package/dist/donationComponents/components/CardForm.js +128 -0
  272. package/dist/donationComponents/components/CardForm.js.map +1 -0
  273. package/dist/donationComponents/components/DonationForm.d.ts +14 -0
  274. package/dist/donationComponents/components/DonationForm.d.ts.map +1 -0
  275. package/dist/donationComponents/components/DonationForm.js +227 -0
  276. package/dist/donationComponents/components/DonationForm.js.map +1 -0
  277. package/dist/donationComponents/components/FundDonation.d.ts +11 -0
  278. package/dist/donationComponents/components/FundDonation.d.ts.map +1 -0
  279. package/dist/donationComponents/components/FundDonation.js +37 -0
  280. package/dist/donationComponents/components/FundDonation.js.map +1 -0
  281. package/dist/donationComponents/components/FundDonations.d.ts +10 -0
  282. package/dist/donationComponents/components/FundDonations.d.ts.map +1 -0
  283. package/dist/donationComponents/components/FundDonations.js +35 -0
  284. package/dist/donationComponents/components/FundDonations.js.map +1 -0
  285. package/dist/donationComponents/components/NonAuthDonation.d.ts +11 -0
  286. package/dist/donationComponents/components/NonAuthDonation.d.ts.map +1 -0
  287. package/dist/donationComponents/components/NonAuthDonation.js +40 -0
  288. package/dist/donationComponents/components/NonAuthDonation.js.map +1 -0
  289. package/dist/donationComponents/components/NonAuthDonationInner.d.ts +11 -0
  290. package/dist/donationComponents/components/NonAuthDonationInner.d.ts.map +1 -0
  291. package/dist/donationComponents/components/NonAuthDonationInner.js +246 -0
  292. package/dist/donationComponents/components/NonAuthDonationInner.js.map +1 -0
  293. package/dist/donationComponents/components/PaymentMethods.d.ts +14 -0
  294. package/dist/donationComponents/components/PaymentMethods.d.ts.map +1 -0
  295. package/dist/donationComponents/components/PaymentMethods.js +113 -0
  296. package/dist/donationComponents/components/PaymentMethods.js.map +1 -0
  297. package/dist/donationComponents/components/RecurringDonations.d.ts +10 -0
  298. package/dist/donationComponents/components/RecurringDonations.d.ts.map +1 -0
  299. package/dist/donationComponents/components/RecurringDonations.js +118 -0
  300. package/dist/donationComponents/components/RecurringDonations.js.map +1 -0
  301. package/dist/donationComponents/components/RecurringDonationsEdit.d.ts +11 -0
  302. package/dist/donationComponents/components/RecurringDonationsEdit.d.ts.map +1 -0
  303. package/dist/donationComponents/components/RecurringDonationsEdit.js +81 -0
  304. package/dist/donationComponents/components/RecurringDonationsEdit.js.map +1 -0
  305. package/dist/donationComponents/components/index.d.ts +10 -0
  306. package/dist/donationComponents/components/index.d.ts.map +1 -0
  307. package/dist/donationComponents/components/index.js +22 -0
  308. package/dist/donationComponents/components/index.js.map +1 -0
  309. package/dist/donationComponents/modals/DonationPreviewModal.d.ts +15 -0
  310. package/dist/donationComponents/modals/DonationPreviewModal.d.ts.map +1 -0
  311. package/dist/donationComponents/modals/DonationPreviewModal.js +73 -0
  312. package/dist/donationComponents/modals/DonationPreviewModal.js.map +1 -0
  313. package/dist/helpers/AnalyticsHelper.d.ts +7 -0
  314. package/dist/helpers/AnalyticsHelper.d.ts.map +1 -0
  315. package/dist/helpers/AnalyticsHelper.js +39 -0
  316. package/dist/helpers/AnalyticsHelper.js.map +1 -0
  317. package/dist/helpers/ApiHelper.d.ts +18 -0
  318. package/dist/helpers/ApiHelper.d.ts.map +1 -0
  319. package/dist/helpers/ApiHelper.js +145 -0
  320. package/dist/helpers/ApiHelper.js.map +1 -0
  321. package/dist/helpers/AppearanceHelper.d.ts +19 -0
  322. package/dist/helpers/AppearanceHelper.d.ts.map +1 -0
  323. package/dist/helpers/AppearanceHelper.js +64 -0
  324. package/dist/helpers/AppearanceHelper.js.map +1 -0
  325. package/dist/helpers/ArrayHelper.d.ts +12 -0
  326. package/dist/helpers/ArrayHelper.d.ts.map +1 -0
  327. package/dist/helpers/ArrayHelper.js +88 -0
  328. package/dist/helpers/ArrayHelper.js.map +1 -0
  329. package/dist/helpers/CommonEnvironmentHelper.d.ts +20 -0
  330. package/dist/helpers/CommonEnvironmentHelper.d.ts.map +1 -0
  331. package/dist/helpers/CommonEnvironmentHelper.js +82 -0
  332. package/dist/helpers/CommonEnvironmentHelper.js.map +1 -0
  333. package/dist/helpers/CurrencyHelper.d.ts +4 -0
  334. package/dist/helpers/CurrencyHelper.d.ts.map +1 -0
  335. package/dist/helpers/CurrencyHelper.js +15 -0
  336. package/dist/helpers/CurrencyHelper.js.map +1 -0
  337. package/dist/helpers/DateHelper.d.ts +19 -0
  338. package/dist/helpers/DateHelper.d.ts.map +1 -0
  339. package/dist/helpers/DateHelper.js +108 -0
  340. package/dist/helpers/DateHelper.js.map +1 -0
  341. package/dist/helpers/DonationHelper.d.ts +8 -0
  342. package/dist/helpers/DonationHelper.d.ts.map +1 -0
  343. package/dist/helpers/DonationHelper.js +33 -0
  344. package/dist/helpers/DonationHelper.js.map +1 -0
  345. package/dist/helpers/ErrorHelper.d.ts +13 -0
  346. package/dist/helpers/ErrorHelper.d.ts.map +1 -0
  347. package/dist/helpers/ErrorHelper.js +34 -0
  348. package/dist/helpers/ErrorHelper.js.map +1 -0
  349. package/dist/helpers/EventHelper.d.ts +11 -0
  350. package/dist/helpers/EventHelper.d.ts.map +1 -0
  351. package/dist/helpers/EventHelper.js +47 -0
  352. package/dist/helpers/EventHelper.js.map +1 -0
  353. package/dist/helpers/FileHelper.d.ts +5 -0
  354. package/dist/helpers/FileHelper.d.ts.map +1 -0
  355. package/dist/helpers/FileHelper.js +34 -0
  356. package/dist/helpers/FileHelper.js.map +1 -0
  357. package/dist/helpers/PersonHelper.d.ts +11 -0
  358. package/dist/helpers/PersonHelper.d.ts.map +1 -0
  359. package/dist/helpers/PersonHelper.js +53 -0
  360. package/dist/helpers/PersonHelper.js.map +1 -0
  361. package/dist/helpers/SocketHelper.d.ts +16 -0
  362. package/dist/helpers/SocketHelper.d.ts.map +1 -0
  363. package/dist/helpers/SocketHelper.js +87 -0
  364. package/dist/helpers/SocketHelper.js.map +1 -0
  365. package/dist/helpers/Themes.d.ts +9 -0
  366. package/dist/helpers/Themes.d.ts.map +1 -0
  367. package/dist/helpers/Themes.js +16 -0
  368. package/dist/helpers/Themes.js.map +1 -0
  369. package/dist/helpers/UniqueIdHelper.d.ts +9 -0
  370. package/dist/helpers/UniqueIdHelper.d.ts.map +1 -0
  371. package/dist/helpers/UniqueIdHelper.js +37 -0
  372. package/dist/helpers/UniqueIdHelper.js.map +1 -0
  373. package/dist/helpers/UserHelper.d.ts +14 -0
  374. package/dist/helpers/UserHelper.d.ts.map +1 -0
  375. package/dist/helpers/UserHelper.js +68 -0
  376. package/dist/helpers/UserHelper.js.map +1 -0
  377. package/dist/helpers/createEmotionCache.d.ts +2 -0
  378. package/dist/helpers/createEmotionCache.d.ts.map +1 -0
  379. package/dist/helpers/createEmotionCache.js +21 -0
  380. package/dist/helpers/createEmotionCache.js.map +1 -0
  381. package/dist/helpers/index.d.ts +16 -0
  382. package/dist/helpers/index.d.ts.map +1 -0
  383. package/dist/helpers/index.js +47 -0
  384. package/dist/helpers/index.js.map +1 -0
  385. package/dist/hooks/index.d.ts +2 -0
  386. package/dist/hooks/index.d.ts.map +1 -0
  387. package/dist/hooks/index.js +6 -0
  388. package/dist/hooks/index.js.map +1 -0
  389. package/dist/hooks/useMountedState.d.ts +2 -0
  390. package/dist/hooks/useMountedState.d.ts.map +1 -0
  391. package/dist/hooks/useMountedState.js +17 -0
  392. package/dist/hooks/useMountedState.js.map +1 -0
  393. package/dist/index.d.ts +7 -0
  394. package/dist/index.d.ts.map +1 -0
  395. package/dist/index.js +25 -0
  396. package/dist/index.js.map +1 -0
  397. package/dist/interfaces/Access.d.ts +131 -0
  398. package/dist/interfaces/Access.d.ts.map +1 -0
  399. package/dist/interfaces/Access.js +3 -0
  400. package/dist/interfaces/Access.js.map +1 -0
  401. package/dist/interfaces/Attendance.d.ts +45 -0
  402. package/dist/interfaces/Attendance.d.ts.map +1 -0
  403. package/dist/interfaces/Attendance.js +3 -0
  404. package/dist/interfaces/Attendance.js.map +1 -0
  405. package/dist/interfaces/Content.d.ts +86 -0
  406. package/dist/interfaces/Content.d.ts.map +1 -0
  407. package/dist/interfaces/Content.js +3 -0
  408. package/dist/interfaces/Content.js.map +1 -0
  409. package/dist/interfaces/Doing.d.ts +50 -0
  410. package/dist/interfaces/Doing.d.ts.map +1 -0
  411. package/dist/interfaces/Doing.js +3 -0
  412. package/dist/interfaces/Doing.js.map +1 -0
  413. package/dist/interfaces/Donation.d.ts +138 -0
  414. package/dist/interfaces/Donation.d.ts.map +1 -0
  415. package/dist/interfaces/Donation.js +24 -0
  416. package/dist/interfaces/Donation.js.map +1 -0
  417. package/dist/interfaces/Error.d.ts +17 -0
  418. package/dist/interfaces/Error.d.ts.map +1 -0
  419. package/dist/interfaces/Error.js +4 -0
  420. package/dist/interfaces/Error.js.map +1 -0
  421. package/dist/interfaces/Membership.d.ts +172 -0
  422. package/dist/interfaces/Membership.d.ts.map +1 -0
  423. package/dist/interfaces/Membership.js +3 -0
  424. package/dist/interfaces/Membership.js.map +1 -0
  425. package/dist/interfaces/Messaging.d.ts +59 -0
  426. package/dist/interfaces/Messaging.d.ts.map +1 -0
  427. package/dist/interfaces/Messaging.js +3 -0
  428. package/dist/interfaces/Messaging.js.map +1 -0
  429. package/dist/interfaces/Permissions.d.ts +159 -0
  430. package/dist/interfaces/Permissions.d.ts.map +1 -0
  431. package/dist/interfaces/Permissions.js +67 -0
  432. package/dist/interfaces/Permissions.js.map +1 -0
  433. package/dist/interfaces/Reporting.d.ts +45 -0
  434. package/dist/interfaces/Reporting.d.ts.map +1 -0
  435. package/dist/interfaces/Reporting.js +3 -0
  436. package/dist/interfaces/Reporting.js.map +1 -0
  437. package/dist/interfaces/UserContextInterface.d.ts +13 -0
  438. package/dist/interfaces/UserContextInterface.d.ts.map +1 -0
  439. package/dist/interfaces/UserContextInterface.js +3 -0
  440. package/dist/interfaces/UserContextInterface.js.map +1 -0
  441. package/dist/interfaces/index.d.ts +11 -0
  442. package/dist/interfaces/index.d.ts.map +1 -0
  443. package/dist/interfaces/index.js +28 -0
  444. package/dist/interfaces/index.js.map +1 -0
  445. package/dist/pageComponents/LoginPage.d.ts +22 -0
  446. package/dist/pageComponents/LoginPage.d.ts.map +1 -0
  447. package/dist/pageComponents/LoginPage.js +287 -0
  448. package/dist/pageComponents/LoginPage.js.map +1 -0
  449. package/dist/pageComponents/LogoutPage.d.ts +8 -0
  450. package/dist/pageComponents/LogoutPage.d.ts.map +1 -0
  451. package/dist/pageComponents/LogoutPage.js +26 -0
  452. package/dist/pageComponents/LogoutPage.js.map +1 -0
  453. package/dist/pageComponents/components/Forgot.d.ts +8 -0
  454. package/dist/pageComponents/components/Forgot.d.ts.map +1 -0
  455. package/dist/pageComponents/components/Forgot.js +70 -0
  456. package/dist/pageComponents/components/Forgot.js.map +1 -0
  457. package/dist/pageComponents/components/Login.d.ts +13 -0
  458. package/dist/pageComponents/components/Login.d.ts.map +1 -0
  459. package/dist/pageComponents/components/Login.js +57 -0
  460. package/dist/pageComponents/components/Login.js.map +1 -0
  461. package/dist/pageComponents/components/LoginSetPassword.d.ts +13 -0
  462. package/dist/pageComponents/components/LoginSetPassword.d.ts.map +1 -0
  463. package/dist/pageComponents/components/LoginSetPassword.js +68 -0
  464. package/dist/pageComponents/components/LoginSetPassword.js.map +1 -0
  465. package/dist/pageComponents/components/Register.d.ts +12 -0
  466. package/dist/pageComponents/components/Register.d.ts.map +1 -0
  467. package/dist/pageComponents/components/Register.js +105 -0
  468. package/dist/pageComponents/components/Register.js.map +1 -0
  469. package/dist/pageComponents/components/SelectChurchModal.d.ts +13 -0
  470. package/dist/pageComponents/components/SelectChurchModal.d.ts.map +1 -0
  471. package/dist/pageComponents/components/SelectChurchModal.js +33 -0
  472. package/dist/pageComponents/components/SelectChurchModal.js.map +1 -0
  473. package/dist/pageComponents/components/SelectChurchRegister.d.ts +11 -0
  474. package/dist/pageComponents/components/SelectChurchRegister.d.ts.map +1 -0
  475. package/dist/pageComponents/components/SelectChurchRegister.js +114 -0
  476. package/dist/pageComponents/components/SelectChurchRegister.js.map +1 -0
  477. package/dist/pageComponents/components/SelectChurchSearch.d.ts +10 -0
  478. package/dist/pageComponents/components/SelectChurchSearch.d.ts.map +1 -0
  479. package/dist/pageComponents/components/SelectChurchSearch.js +61 -0
  480. package/dist/pageComponents/components/SelectChurchSearch.js.map +1 -0
  481. package/dist/pageComponents/components/SelectableChurch.d.ts +9 -0
  482. package/dist/pageComponents/components/SelectableChurch.d.ts.map +1 -0
  483. package/dist/pageComponents/components/SelectableChurch.js +31 -0
  484. package/dist/pageComponents/components/SelectableChurch.js.map +1 -0
  485. package/dist/pageComponents/index.d.ts +4 -0
  486. package/dist/pageComponents/index.d.ts.map +1 -0
  487. package/dist/pageComponents/index.js +10 -0
  488. package/dist/pageComponents/index.js.map +1 -0
  489. package/package.json +77 -0
  490. package/src/components/CreatePerson.tsx +80 -0
  491. package/src/components/DisplayBox.tsx +68 -0
  492. package/src/components/ErrorMessages.tsx +26 -0
  493. package/src/components/ExportLink.tsx +61 -0
  494. package/src/components/FloatingSupport.tsx +16 -0
  495. package/src/components/FormSubmissionEdit.tsx +122 -0
  496. package/src/components/HelpIcon.tsx +10 -0
  497. package/src/components/ImageEditor.tsx +126 -0
  498. package/src/components/InputBox.tsx +73 -0
  499. package/src/components/Loading.tsx +29 -0
  500. package/src/components/PersonAdd.tsx +75 -0
  501. package/src/components/QuestionEdit.tsx +62 -0
  502. package/src/components/SmallButton.tsx +39 -0
  503. package/src/components/SupportModal.tsx +26 -0
  504. package/src/components/TabPanel.tsx +34 -0
  505. package/src/components/gallery/GalleryModal.tsx +102 -0
  506. package/src/components/gallery/StockPhotos.tsx +74 -0
  507. package/src/components/index.tsx +18 -0
  508. package/src/components/markdownEditor/Editor.tsx +132 -0
  509. package/src/components/markdownEditor/MarkdownEditor.tsx +16 -0
  510. package/src/components/markdownEditor/MarkdownModal.tsx +46 -0
  511. package/src/components/markdownEditor/MarkdownPreview.tsx +14 -0
  512. package/src/components/markdownEditor/editor.css +787 -0
  513. package/src/components/markdownEditor/images/emoji/1F600.png +0 -0
  514. package/src/components/markdownEditor/images/emoji/1F641.png +0 -0
  515. package/src/components/markdownEditor/images/emoji/1F642.png +0 -0
  516. package/src/components/markdownEditor/images/emoji/2764.png +0 -0
  517. package/src/components/markdownEditor/images/icons/arrow-clockwise.svg +4 -0
  518. package/src/components/markdownEditor/images/icons/arrow-counterclockwise.svg +4 -0
  519. package/src/components/markdownEditor/images/icons/chat-square-quote.svg +4 -0
  520. package/src/components/markdownEditor/images/icons/chevron-down.svg +3 -0
  521. package/src/components/markdownEditor/images/icons/code.svg +3 -0
  522. package/src/components/markdownEditor/images/icons/journal-code.svg +5 -0
  523. package/src/components/markdownEditor/images/icons/journal-text.svg +5 -0
  524. package/src/components/markdownEditor/images/icons/justify.svg +3 -0
  525. package/src/components/markdownEditor/images/icons/link.svg +4 -0
  526. package/src/components/markdownEditor/images/icons/list-ol.svg +4 -0
  527. package/src/components/markdownEditor/images/icons/list-ul.svg +3 -0
  528. package/src/components/markdownEditor/images/icons/pencil-fill.svg +3 -0
  529. package/src/components/markdownEditor/images/icons/text-center.svg +3 -0
  530. package/src/components/markdownEditor/images/icons/text-left.svg +3 -0
  531. package/src/components/markdownEditor/images/icons/text-paragraph.svg +3 -0
  532. package/src/components/markdownEditor/images/icons/text-right.svg +3 -0
  533. package/src/components/markdownEditor/images/icons/type-bold.svg +3 -0
  534. package/src/components/markdownEditor/images/icons/type-h1.svg +3 -0
  535. package/src/components/markdownEditor/images/icons/type-h2.svg +3 -0
  536. package/src/components/markdownEditor/images/icons/type-h3.svg +3 -0
  537. package/src/components/markdownEditor/images/icons/type-h4.svg +13 -0
  538. package/src/components/markdownEditor/images/icons/type-italic.svg +3 -0
  539. package/src/components/markdownEditor/images/icons/type-strikethrough.svg +3 -0
  540. package/src/components/markdownEditor/images/icons/type-underline.svg +3 -0
  541. package/src/components/markdownEditor/plugins/AutoLinkPlugin.tsx +35 -0
  542. package/src/components/markdownEditor/plugins/ControlledEditorPlugin.tsx +24 -0
  543. package/src/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.tsx +68 -0
  544. package/src/components/markdownEditor/plugins/MarkdownTransformers.ts +106 -0
  545. package/src/components/markdownEditor/plugins/ReadOnlyPlugin.tsx +15 -0
  546. package/src/components/markdownEditor/plugins/ToolbarPlugin.tsx +401 -0
  547. package/src/components/markdownEditor/plugins/customLink/CustomLinkNode.tsx +224 -0
  548. package/src/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.tsx +32 -0
  549. package/src/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.tsx +102 -0
  550. package/src/components/markdownEditor/plugins/customLink/FloatingLinkEditor.tsx +243 -0
  551. package/src/components/markdownEditor/plugins/customLink/FloatingLinkEditor.types.ts +11 -0
  552. package/src/components/markdownEditor/plugins/emoji/EmojiNode.tsx +95 -0
  553. package/src/components/markdownEditor/plugins/emoji/EmojiNodeTransform.ts +41 -0
  554. package/src/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.tsx +152 -0
  555. package/src/components/markdownEditor/plugins/emoji/EmojisPlugin.tsx +65 -0
  556. package/src/components/markdownEditor/plugins/index.ts +6 -0
  557. package/src/components/markdownEditor/theme.ts +65 -0
  558. package/src/components/material/AppList.tsx +20 -0
  559. package/src/components/material/ChurchList.tsx +22 -0
  560. package/src/components/material/NavItem.tsx +41 -0
  561. package/src/components/material/NewPrivateMessage.tsx +103 -0
  562. package/src/components/material/PrivateMessageDetails.tsx +23 -0
  563. package/src/components/material/PrivateMessages.tsx +87 -0
  564. package/src/components/material/SiteWrapper.tsx +140 -0
  565. package/src/components/material/UserMenu.tsx +141 -0
  566. package/src/components/material/iconPicker/IconNamesList.ts +2240 -0
  567. package/src/components/material/iconPicker/IconPicker.tsx +153 -0
  568. package/src/components/material/index.tsx +5 -0
  569. package/src/components/notes/AddNote.tsx +90 -0
  570. package/src/components/notes/Conversation.tsx +82 -0
  571. package/src/components/notes/Conversations.tsx +58 -0
  572. package/src/components/notes/NewConversation.tsx +78 -0
  573. package/src/components/notes/Note.tsx +44 -0
  574. package/src/components/notes/Notes.tsx +52 -0
  575. package/src/components/reporting/ChartReport.tsx +98 -0
  576. package/src/components/reporting/ReportFilter.tsx +54 -0
  577. package/src/components/reporting/ReportFilterField.tsx +160 -0
  578. package/src/components/reporting/ReportOutput.tsx +79 -0
  579. package/src/components/reporting/ReportWithFilter.tsx +70 -0
  580. package/src/components/reporting/TableReport.tsx +57 -0
  581. package/src/components/reporting/TreeReport.tsx +111 -0
  582. package/src/components/reporting/index.ts +4 -0
  583. package/src/donationComponents/DonationPage.tsx +136 -0
  584. package/src/donationComponents/components/BankForm.tsx +159 -0
  585. package/src/donationComponents/components/CardForm.tsx +104 -0
  586. package/src/donationComponents/components/DonationForm.tsx +228 -0
  587. package/src/donationComponents/components/FundDonation.tsx +49 -0
  588. package/src/donationComponents/components/FundDonations.tsx +39 -0
  589. package/src/donationComponents/components/NonAuthDonation.tsx +31 -0
  590. package/src/donationComponents/components/NonAuthDonationInner.tsx +208 -0
  591. package/src/donationComponents/components/PaymentMethods.tsx +135 -0
  592. package/src/donationComponents/components/RecurringDonations.tsx +121 -0
  593. package/src/donationComponents/components/RecurringDonationsEdit.tsx +93 -0
  594. package/src/donationComponents/components/index.tsx +9 -0
  595. package/src/donationComponents/modals/DonationPreviewModal.tsx +66 -0
  596. package/src/helpers/AnalyticsHelper.ts +33 -0
  597. package/src/helpers/ApiHelper.ts +125 -0
  598. package/src/helpers/AppearanceHelper.ts +69 -0
  599. package/src/helpers/ArrayHelper.ts +81 -0
  600. package/src/helpers/CommonEnvironmentHelper.ts +80 -0
  601. package/src/helpers/CurrencyHelper.ts +10 -0
  602. package/src/helpers/DateHelper.ts +108 -0
  603. package/src/helpers/DonationHelper.ts +26 -0
  604. package/src/helpers/ErrorHelper.ts +36 -0
  605. package/src/helpers/EventHelper.ts +52 -0
  606. package/src/helpers/FileHelper.ts +31 -0
  607. package/src/helpers/PersonHelper.ts +60 -0
  608. package/src/helpers/SocketHelper.ts +76 -0
  609. package/src/helpers/Themes.ts +14 -0
  610. package/src/helpers/UniqueIdHelper.ts +36 -0
  611. package/src/helpers/UserHelper.ts +59 -0
  612. package/src/helpers/createEmotionCache.ts +17 -0
  613. package/src/helpers/index.ts +15 -0
  614. package/src/hooks/index.ts +1 -0
  615. package/src/hooks/useMountedState.ts +16 -0
  616. package/src/index.ts +6 -0
  617. package/src/interfaces/Access.ts +24 -0
  618. package/src/interfaces/Attendance.ts +8 -0
  619. package/src/interfaces/Content.ts +10 -0
  620. package/src/interfaces/Doing.ts +24 -0
  621. package/src/interfaces/Donation.ts +45 -0
  622. package/src/interfaces/Error.ts +17 -0
  623. package/src/interfaces/Membership.ts +51 -0
  624. package/src/interfaces/Messaging.ts +20 -0
  625. package/src/interfaces/Permissions.ts +68 -0
  626. package/src/interfaces/Reporting.ts +7 -0
  627. package/src/interfaces/UserContextInterface.ts +13 -0
  628. package/src/interfaces/index.ts +12 -0
  629. package/src/pageComponents/LoginPage.tsx +244 -0
  630. package/src/pageComponents/LogoutPage.tsx +28 -0
  631. package/src/pageComponents/components/Forgot.tsx +79 -0
  632. package/src/pageComponents/components/Login.tsx +54 -0
  633. package/src/pageComponents/components/LoginSetPassword.tsx +63 -0
  634. package/src/pageComponents/components/Register.tsx +107 -0
  635. package/src/pageComponents/components/SelectChurchModal.tsx +41 -0
  636. package/src/pageComponents/components/SelectChurchRegister.tsx +88 -0
  637. package/src/pageComponents/components/SelectChurchSearch.tsx +69 -0
  638. package/src/pageComponents/components/SelectableChurch.tsx +38 -0
  639. package/src/pageComponents/index.ts +3 -0
  640. package/tsconfig.json +35 -0
  641. package/tslint.json +15 -0
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventHelper = void 0;
4
+ const rrule_1 = require("rrule");
5
+ class EventHelper {
6
+ }
7
+ exports.EventHelper = EventHelper;
8
+ EventHelper.getRange = (event, startDate, endDate) => {
9
+ const start = new Date(event.start);
10
+ const rrule = EventHelper.getFullRRule(event);
11
+ const dates = rrule.between(startDate, endDate);
12
+ dates.forEach(d => {
13
+ d.setHours(start.getHours());
14
+ d.setMinutes(start.getMinutes());
15
+ d.setSeconds(start.getSeconds());
16
+ });
17
+ return dates;
18
+ };
19
+ EventHelper.getFullRRule = (event) => {
20
+ let rrule = rrule_1.RRule.fromString(event.recurrenceRule);
21
+ rrule.options.dtstart = new Date(event.start);
22
+ console.log("START", rrule.options.dtstart, event.start, rrule);
23
+ return rrule;
24
+ };
25
+ EventHelper.removeExcludeDates = (events) => {
26
+ var _a;
27
+ for (let i = events.length - 1; i >= 0; i--) {
28
+ if (((_a = events[i].exceptionDates) === null || _a === void 0 ? void 0 : _a.length) > 0) {
29
+ const parsedDates = events[i].exceptionDates.map(d => new Date(d).toISOString());
30
+ //console.log("Compare", events[i].start.toISOString(), parsedDates, parsedDates.indexOf(events[i].start.toISOString()));
31
+ if (parsedDates.indexOf(events[i].start.toISOString()) > -1)
32
+ events.splice(i, 1);
33
+ }
34
+ }
35
+ };
36
+ EventHelper.getPartialRRuleString = (options) => {
37
+ const parts = new rrule_1.RRule(options).toString().split("RRULE:");
38
+ const result = parts.length === 2 ? parts[1] : "";
39
+ console.log("getPartialRRuleString", options, new rrule_1.RRule(options).toString(), result);
40
+ return result;
41
+ };
42
+ EventHelper.cleanRule = (options) => {
43
+ options.byhour = undefined;
44
+ options.byminute = undefined;
45
+ options.bysecond = undefined;
46
+ };
47
+ //# sourceMappingURL=EventHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventHelper.js","sourceRoot":"","sources":["../../src/helpers/EventHelper.ts"],"names":[],"mappings":";;;AACA,iCAAwC;AAGxC,MAAa,WAAW;;AAAxB,kCA+CC;AA7CQ,oBAAQ,GAAG,CAAC,KAAoB,EAAE,SAAc,EAAE,OAAY,EAAE,EAAE;IACvE,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAEhD,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;QAChB,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC7B,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;QACjC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;IACnC,CAAC,CAAC,CAAA;IACF,OAAO,KAAK,CAAC;AACf,CAAC,CAAA;AAEM,wBAAY,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC7C,IAAI,KAAK,GAAG,aAAK,CAAC,UAAU,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACnD,KAAK,CAAC,OAAO,CAAC,OAAO,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC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,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;AAC/B,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export declare class FileHelper {
2
+ static postPresignedFile: (presigned: any, uploadedFile: File, progressCallback: (percent: number) => void) => Promise<import("axios").AxiosResponse<any, any>>;
3
+ static dataURLtoBlob(dataurl: string): Blob;
4
+ }
5
+ //# sourceMappingURL=FileHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/FileHelper.ts"],"names":[],"mappings":"AAEA,qBAAa,UAAU;IAErB,MAAM,CAAC,iBAAiB,cAAe,GAAG,gBAAgB,IAAI,8BAA8B,MAAM,KAAK,IAAI,sDAgBzG;IAEF,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM;CAQrC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.FileHelper = void 0;
7
+ const axios_1 = __importDefault(require("axios"));
8
+ class FileHelper {
9
+ static dataURLtoBlob(dataurl) {
10
+ let arr = dataurl.split(","), mime = arr[0].match(/:(.*?);/)[1], bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
11
+ while (n--) {
12
+ u8arr[n] = bstr.charCodeAt(n);
13
+ }
14
+ return new Blob([u8arr], { type: mime });
15
+ }
16
+ }
17
+ exports.FileHelper = FileHelper;
18
+ FileHelper.postPresignedFile = (presigned, uploadedFile, progressCallback) => {
19
+ const formData = new FormData();
20
+ formData.append("key", presigned.key);
21
+ formData.append("acl", "public-read");
22
+ formData.append("Content-Type", uploadedFile.type);
23
+ for (const property in presigned.fields)
24
+ formData.append(property, presigned.fields[property]);
25
+ formData.append("file", uploadedFile);
26
+ const axiosConfig = {
27
+ headers: { "Content-Type": "multipart/form-data" },
28
+ onUploadProgress: (data) => {
29
+ progressCallback(Math.round((100 * data.loaded) / data.total));
30
+ }
31
+ };
32
+ return axios_1.default.post(presigned.url, formData, axiosConfig);
33
+ };
34
+ //# sourceMappingURL=FileHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileHelper.js","sourceRoot":"","sources":["../../src/helpers/FileHelper.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,MAAa,UAAU;IAoBrB,MAAM,CAAC,aAAa,CAAC,OAAe;QAClC,IAAI,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC7D,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,CAAC,EAAE,EAAE;YACV,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SAC/B;QACD,OAAO,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,CAAC;;AA3BH,gCA4BC;AA1BQ,4BAAiB,GAAG,CAAC,SAAc,EAAE,YAAkB,EAAE,gBAA2C,EAAE,EAAE;IAC7G,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;IAChC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACtC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACtC,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IACnD,KAAK,MAAM,QAAQ,IAAI,SAAS,CAAC,MAAM;QAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC/F,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAEtC,MAAM,WAAW,GAAG;QAClB,OAAO,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE;QAClD,gBAAgB,EAAE,CAAC,IAAS,EAAE,EAAE;YAC9B,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACjE,CAAC;KACF,CAAC;IAEF,OAAO,eAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;AAC1D,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { PersonInterface, ContactInfoInterface } from "../interfaces";
2
+ export declare class PersonHelper {
3
+ static getPhotoUrl(person: PersonInterface): string;
4
+ static getAge(birthdate: Date): string;
5
+ static getDisplayName(firstName: string, lastName: string, nickName: string): string;
6
+ static compareAddress(address1: ContactInfoInterface, address2: ContactInfoInterface): boolean;
7
+ static addressToString(address: ContactInfoInterface): string;
8
+ static changeOnlyAddress(contactInfo1: ContactInfoInterface, contactInfo2: ContactInfoInterface): ContactInfoInterface;
9
+ static checkAddressAvailabilty(person: PersonInterface): boolean;
10
+ }
11
+ //# sourceMappingURL=PersonHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PersonHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/PersonHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGtE,qBAAa,YAAY;IAEvB,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,eAAe;IAK1C,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM;IAUtC,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;WAKtE,cAAc,CAAC,QAAQ,EAAE,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB,GAAG,OAAO;WAUvF,eAAe,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM;WAItD,iBAAiB,CAAC,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,oBAAoB,GAAG,oBAAoB;WAa/G,uBAAuB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO;CAOxE"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PersonHelper = void 0;
4
+ const CommonEnvironmentHelper_1 = require("./CommonEnvironmentHelper");
5
+ class PersonHelper {
6
+ static getPhotoUrl(person) {
7
+ var _a;
8
+ if (!(person === null || person === void 0 ? void 0 : person.photo))
9
+ return "/images/sample-profile.png";
10
+ else
11
+ return ((_a = person === null || person === void 0 ? void 0 : person.photo) === null || _a === void 0 ? void 0 : _a.startsWith("data:image/png;base64,")) ? person.photo : CommonEnvironmentHelper_1.CommonEnvironmentHelper.ContentRoot + person.photo;
12
+ }
13
+ static getAge(birthdate) {
14
+ if (birthdate !== undefined && birthdate !== null) {
15
+ let ageDifMs = Date.now() - new Date(birthdate).getTime();
16
+ let ageDate = new Date(ageDifMs);
17
+ let years = Math.abs(ageDate.getUTCFullYear() - 1970);
18
+ return years + " years";
19
+ }
20
+ else
21
+ return "";
22
+ }
23
+ static getDisplayName(firstName, lastName, nickName) {
24
+ if (nickName !== undefined && nickName !== null && nickName.length > 0)
25
+ return firstName + ' "' + nickName + '" ' + lastName;
26
+ else
27
+ return firstName + " " + lastName;
28
+ }
29
+ static compareAddress(address1, address2) {
30
+ const displayAddress1 = this.addressToString(address1).trim();
31
+ const displayAddress2 = this.addressToString(address2).trim();
32
+ if (displayAddress1 !== displayAddress2) {
33
+ return true;
34
+ }
35
+ return false;
36
+ }
37
+ static addressToString(address) {
38
+ return `${address.address1 || ""} ${address.address2 || ""} ${address.city || ""}${(address.city && address.state) ? "," : ""} ${address.state || ""} ${address.zip || ""}`;
39
+ }
40
+ static changeOnlyAddress(contactInfo1, contactInfo2) {
41
+ const updatedAddress = Object.assign(Object.assign({}, contactInfo1), { address1: contactInfo2.address1, address2: contactInfo2.address2, city: contactInfo2.city, state: contactInfo2.state, zip: contactInfo2.zip });
42
+ return updatedAddress;
43
+ }
44
+ static checkAddressAvailabilty(person) {
45
+ const addressString = this.addressToString(person.contactInfo).trim();
46
+ if (addressString !== "") {
47
+ return true;
48
+ }
49
+ return false;
50
+ }
51
+ }
52
+ exports.PersonHelper = PersonHelper;
53
+ //# sourceMappingURL=PersonHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PersonHelper.js","sourceRoot":"","sources":["../../src/helpers/PersonHelper.ts"],"names":[],"mappings":";;;AACA,uEAAoE;AAEpE,MAAa,YAAY;IAEvB,MAAM,CAAC,WAAW,CAAC,MAAuB;;QACxC,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAA;YAAE,OAAO,4BAA4B,CAAA;;YAClD,OAAO,CAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,0CAAE,UAAU,CAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,iDAAuB,CAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC;IACtI,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,SAAe;QAC3B,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,EAAE;YACjD,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE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CAAC,GAAG,IAAI,EAAE,EAAE,CAAA;IAC7K,CAAC;IAEM,MAAM,CAAC,iBAAiB,CAAC,YAAkC,EAAE,YAAkC;QACpG,MAAM,cAAc,mCACf,YAAY,KACf,QAAQ,EAAE,YAAY,CAAC,QAAQ,EAC/B,QAAQ,EAAE,YAAY,CAAC,QAAQ,EAC/B,IAAI,EAAE,YAAY,CAAC,IAAI,EACvB,KAAK,EAAE,YAAY,CAAC,KAAK,EACzB,GAAG,EAAE,YAAY,CAAC,GAAG,GACtB,CAAA;QAED,OAAO,cAAc,CAAA;IACvB,CAAC;IAEM,MAAM,CAAC,uBAAuB,CAAC,MAAuB;QAC3D,MAAM,aAAa,GAAW,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;QAC9E,IAAI,aAAa,KAAK,EAAE,EAAE;YACxB,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAxDD,oCAwDC"}
@@ -0,0 +1,16 @@
1
+ import { SocketActionHandlerInterface, SocketPayloadInterface } from "../interfaces";
2
+ export declare class SocketHelper {
3
+ static socket: WebSocket;
4
+ static socketId: string;
5
+ static actionHandlers: SocketActionHandlerInterface[];
6
+ private static userIdChurchId;
7
+ static setUserChurch: (uc: {
8
+ userId: string;
9
+ churchId: string;
10
+ }) => void;
11
+ static createAlertConnection: () => void;
12
+ static init: () => Promise<void>;
13
+ static addHandler: (action: string, id: string, handleMessage: (data: any) => void) => void;
14
+ static handleMessage: (payload: SocketPayloadInterface) => void;
15
+ }
16
+ //# sourceMappingURL=SocketHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SocketHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/SocketHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,4BAA4B,EAAE,sBAAsB,EAAuB,MAAM,eAAe,CAAC;AAKzJ,qBAAa,YAAY;IACvB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;IACzB,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,cAAc,EAAE,4BAA4B,EAAE,CAAM;IAC3D,OAAO,CAAC,MAAM,CAAC,cAAc,CAA8D;IAE3F,MAAM,CAAC,aAAa,OAAQ;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,QAAQ,EAAC,MAAM,CAAA;KAAC,UAK3D;IAED,MAAM,CAAC,qBAAqB,aAK3B;IAED,MAAM,CAAC,IAAI,sBA8BV;IAED,MAAM,CAAC,UAAU,WAAY,MAAM,MAAM,MAAM,wBAAwB,GAAG,KAAK,IAAI,UAIlF;IAED,MAAM,CAAC,aAAa,YAAa,sBAAsB,UAUtD;CAEF"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var _a;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.SocketHelper = void 0;
14
+ const ApiHelper_1 = require("./ApiHelper");
15
+ const ArrayHelper_1 = require("./ArrayHelper");
16
+ const CommonEnvironmentHelper_1 = require("./CommonEnvironmentHelper");
17
+ class SocketHelper {
18
+ }
19
+ exports.SocketHelper = SocketHelper;
20
+ _a = SocketHelper;
21
+ SocketHelper.actionHandlers = [];
22
+ SocketHelper.userIdChurchId = { userId: "", churchId: "" };
23
+ SocketHelper.setUserChurch = (uc) => {
24
+ if ((uc === null || uc === void 0 ? void 0 : uc.churchId) && uc.userId && uc.churchId !== _a.userIdChurchId.churchId && uc.userId !== _a.userIdChurchId.userId) {
25
+ _a.userIdChurchId = uc;
26
+ _a.createAlertConnection();
27
+ }
28
+ };
29
+ SocketHelper.createAlertConnection = () => {
30
+ if (_a.userIdChurchId.userId) {
31
+ const connection = { conversationId: "alerts", churchId: _a.userIdChurchId.churchId, displayName: "Test", socketId: _a.socketId, userId: _a.userIdChurchId.userId };
32
+ ApiHelper_1.ApiHelper.postAnonymous("/connections", [connection], "MessagingApi");
33
+ }
34
+ };
35
+ SocketHelper.init = () => __awaiter(void 0, void 0, void 0, function* () {
36
+ if (_a.socket !== undefined && _a.socket.readyState !== _a.socket.OPEN) {
37
+ try {
38
+ _a.socket.close();
39
+ }
40
+ catch (e) {
41
+ console.log(e);
42
+ }
43
+ }
44
+ yield new Promise((resolve) => {
45
+ _a.socket = new WebSocket(CommonEnvironmentHelper_1.CommonEnvironmentHelper.MessagingApiSocket);
46
+ _a.socket.onmessage = (event) => {
47
+ const payload = JSON.parse(event.data);
48
+ _a.handleMessage(payload);
49
+ };
50
+ _a.socket.onopen = (e) => __awaiter(void 0, void 0, void 0, function* () {
51
+ _a.socket.send("getId"); //not sure this is needed. It auto-sends socketId on connect
52
+ setTimeout(() => { resolve(null); }, 500);
53
+ });
54
+ _a.socket.onclose = (e) => __awaiter(void 0, void 0, void 0, function* () {
55
+ //SocketHelper.events.disconnectHandler();
56
+ setTimeout(() => {
57
+ //Silently reconnect
58
+ if (_a.socket.readyState === _a.socket.CLOSED) {
59
+ _a.init().then(() => {
60
+ _a.createAlertConnection();
61
+ _a.handleMessage({ action: "reconnect", data: null });
62
+ });
63
+ }
64
+ }, 1000);
65
+ //SocketHelper.handleMessage({ action: "disconnect", data: null })
66
+ });
67
+ });
68
+ });
69
+ SocketHelper.addHandler = (action, id, handleMessage) => {
70
+ const existing = ArrayHelper_1.ArrayHelper.getOne(_a.actionHandlers, "id", id);
71
+ if (existing !== null)
72
+ existing.handleMessage = handleMessage;
73
+ else
74
+ _a.actionHandlers.push({ action, id, handleMessage });
75
+ };
76
+ SocketHelper.handleMessage = (payload) => {
77
+ //console.log("MESSAGE", payload)
78
+ if (payload.action === "socketId") {
79
+ _a.socketId = payload.data;
80
+ }
81
+ else {
82
+ ArrayHelper_1.ArrayHelper.getAll(_a.actionHandlers, "action", payload.action).forEach((handler) => {
83
+ handler.handleMessage(payload.data);
84
+ });
85
+ }
86
+ };
87
+ //# sourceMappingURL=SocketHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SocketHelper.js","sourceRoot":"","sources":["../../src/helpers/SocketHelper.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,2CAAwC;AACxC,+CAA4C;AAC5C,uEAAoE;AAEpE,MAAa,YAAY;;AAAzB,oCAsEC;;AAnEQ,2BAAc,GAAmC,EAAE,AAArC,CAAsC;AAC5C,2BAAc,GAAqC,EAAC,MAAM,EAAC,EAAE,EAAE,QAAQ,EAAC,EAAE,EAAC,AAA7D,CAA8D;AAEpF,0BAAa,GAAG,CAAC,EAAoC,EAAE,EAAE;IAC9D,IAAI,CAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,QAAQ,KAAI,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC,QAAQ,KAAG,EAAI,CAAC,cAAc,CAAC,QAAQ,IAAI,EAAE,CAAC,MAAM,KAAG,EAAI,CAAC,cAAc,CAAC,MAAM,EAAE;QACrH,EAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,EAAI,CAAC,qBAAqB,EAAE,CAAC;KAC9B;AACH,CAAC,AALmB,CAKnB;AAEM,kCAAqB,GAAG,GAAG,EAAE;IAClC,IAAI,EAAY,CAAC,cAAc,CAAC,MAAM,EAAE;QACtC,MAAM,UAAU,GAAwB,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAY,CAAC,cAAc,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAY,CAAC,QAAQ,EAAE,MA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+1,9 @@
1
+ export declare class Themes {
2
+ static BaseTheme: import("@mui/material").Theme;
3
+ static NavBarStyle: {
4
+ "& .selected .MuiListItemButton-root": {
5
+ backgroundColor: string;
6
+ };
7
+ };
8
+ }
9
+ //# sourceMappingURL=Themes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Themes.d.ts","sourceRoot":"","sources":["../../src/helpers/Themes.ts"],"names":[],"mappings":"AAEA,qBAAa,MAAM;IACjB,MAAM,CAAC,SAAS,gCAMb;IAEH,MAAM,CAAC,WAAW;;;;MAA4E;CAE/F"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Themes = void 0;
4
+ const material_1 = require("@mui/material");
5
+ class Themes {
6
+ }
7
+ exports.Themes = Themes;
8
+ Themes.BaseTheme = (0, material_1.createTheme)({
9
+ palette: { secondary: { main: "#444444" } },
10
+ components: {
11
+ MuiTextField: { defaultProps: { margin: "normal" } },
12
+ MuiFormControl: { defaultProps: { margin: "normal" } }
13
+ }
14
+ });
15
+ Themes.NavBarStyle = { "& .selected .MuiListItemButton-root": { backgroundColor: "#333333" } };
16
+ //# sourceMappingURL=Themes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Themes.js","sourceRoot":"","sources":["../../src/helpers/Themes.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAE5C,MAAa,MAAM;;AAAnB,wBAWC;AAVQ,gBAAS,GAAG,IAAA,sBAAW,EAAC;IAC7B,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC3C,UAAU,EAAE;QACV,YAAY,EAAE,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;QACpD,cAAc,EAAE,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;KACvD;CACF,CAAC,CAAC;AAEI,kBAAW,GAAG,EAAE,qCAAqC,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,EAAE,CAAA"}
@@ -0,0 +1,9 @@
1
+ export declare class UniqueIdHelper {
2
+ static chars: string[];
3
+ static alphanumericChars: string[];
4
+ static isMissing(obj: any): boolean;
5
+ static shortId(): string;
6
+ static generateAlphanumeric(): string;
7
+ static generate(charList: string[], length: number): string;
8
+ }
9
+ //# sourceMappingURL=UniqueIdHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UniqueIdHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/UniqueIdHelper.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAc;IAEzB,MAAM,CAAC,KAAK,WAGA;IAEZ,MAAM,CAAC,iBAAiB,WAEiC;WAE3C,SAAS,CAAC,GAAG,EAAE,GAAG;WAMlB,OAAO;WAIP,oBAAoB;WAIpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM;CAU1D"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UniqueIdHelper = void 0;
4
+ class UniqueIdHelper {
5
+ static isMissing(obj) {
6
+ if (obj === undefined || obj === null)
7
+ return true;
8
+ else if (obj.toString() === "")
9
+ return true;
10
+ else
11
+ return false;
12
+ }
13
+ static shortId() {
14
+ return this.generate(UniqueIdHelper.chars, 11);
15
+ }
16
+ static generateAlphanumeric() {
17
+ return this.generate(UniqueIdHelper.alphanumericChars, 11);
18
+ }
19
+ static generate(charList, length) {
20
+ let result = "";
21
+ for (let i = 0; i < length; i++) {
22
+ const idx = Math.floor(Math.random() * charList.length);
23
+ const c = charList[idx];
24
+ result += c;
25
+ }
26
+ return result;
27
+ }
28
+ }
29
+ exports.UniqueIdHelper = UniqueIdHelper;
30
+ UniqueIdHelper.chars = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
31
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
32
+ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0",
33
+ "-", "_"];
34
+ UniqueIdHelper.alphanumericChars = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
35
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
36
+ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"];
37
+ //# sourceMappingURL=UniqueIdHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UniqueIdHelper.js","sourceRoot":"","sources":["../../src/helpers/UniqueIdHelper.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAWlB,MAAM,CAAC,SAAS,CAAC,GAAQ;QAC9B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;aAC9C,IAAI,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE;YAAE,OAAO,IAAI,CAAC;;YACvC,OAAO,KAAK,CAAC;IACpB,CAAC;IAEM,MAAM,CAAC,OAAO;QACnB,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACjD,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;IAC7D,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,QAAkB,EAAE,MAAc;QACvD,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,MA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AAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IAC1J,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IAChI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { UserInterface, UserContextInterface, IPermission, PersonInterface, LoginUserChurchInterface } from "../interfaces";
2
+ export declare class UserHelper {
3
+ static currentUserChurch: LoginUserChurchInterface;
4
+ static userChurches: LoginUserChurchInterface[];
5
+ static user: UserInterface;
6
+ static churchChanged: boolean;
7
+ static person: PersonInterface;
8
+ static selectChurch: (context?: UserContextInterface, churchId?: string, keyName?: string) => Promise<void>;
9
+ static setupApiHelper(userChurch: LoginUserChurchInterface): void;
10
+ static setupApiHelperNoChurch(user: LoginUserChurchInterface): void;
11
+ static checkAccess({ api, contentType, action }: IPermission): boolean;
12
+ static createAppUrl(appUrl: string, returnUrl: string): string;
13
+ }
14
+ //# sourceMappingURL=UserHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/UserHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,WAAW,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAE5H,qBAAa,UAAU;IACrB,MAAM,CAAC,iBAAiB,EAAE,wBAAwB,CAAC;IACnD,MAAM,CAAC,YAAY,EAAE,wBAAwB,EAAE,CAAC;IAChD,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC;IAC3B,MAAM,CAAC,aAAa,EAAE,OAAO,CAAS;IACtC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;IAE/B,MAAM,CAAC,YAAY,aAAoB,oBAAoB,aAAa,MAAM,YAAY,MAAM,mBAoB/F;IAED,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,wBAAwB;IAK1D,MAAM,CAAC,sBAAsB,CAAC,IAAI,EAAE,wBAAwB;IAI5D,MAAM,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,WAAW,GAAG,OAAO;IAYtE,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAKtD"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var _a;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.UserHelper = void 0;
14
+ const ApiHelper_1 = require("./ApiHelper");
15
+ class UserHelper {
16
+ static setupApiHelper(userChurch) {
17
+ ApiHelper_1.ApiHelper.setDefaultPermissions(userChurch.jwt);
18
+ userChurch.apis.forEach(api => { ApiHelper_1.ApiHelper.setPermissions(api.keyName, api.jwt, api.permissions); });
19
+ }
20
+ static setupApiHelperNoChurch(user) {
21
+ ApiHelper_1.ApiHelper.setDefaultPermissions(user.jwt);
22
+ }
23
+ static checkAccess({ api, contentType, action }) {
24
+ const permissions = ApiHelper_1.ApiHelper.getConfig(api).permisssions;
25
+ let result = false;
26
+ if (permissions !== undefined) {
27
+ permissions.forEach(element => {
28
+ if (element.contentType === contentType && element.action === action)
29
+ result = true;
30
+ });
31
+ }
32
+ return result;
33
+ }
34
+ static createAppUrl(appUrl, returnUrl) {
35
+ const jwt = ApiHelper_1.ApiHelper.getConfig("MembershipApi").jwt;
36
+ return `${appUrl}/login/?jwt=${jwt}&returnUrl=${returnUrl}`;
37
+ }
38
+ }
39
+ exports.UserHelper = UserHelper;
40
+ _a = UserHelper;
41
+ UserHelper.churchChanged = false;
42
+ UserHelper.selectChurch = (context, churchId, keyName) => __awaiter(void 0, void 0, void 0, function* () {
43
+ let userChurch = null;
44
+ if (churchId) {
45
+ _a.userChurches.forEach(uc => {
46
+ if (uc.church.id === churchId)
47
+ userChurch = uc;
48
+ });
49
+ }
50
+ else if (keyName)
51
+ _a.userChurches.forEach(uc => { if (uc.church.subDomain === keyName)
52
+ userChurch = uc; });
53
+ else
54
+ userChurch = _a.userChurches[0];
55
+ if (!userChurch)
56
+ return;
57
+ else {
58
+ _a.currentUserChurch = userChurch;
59
+ _a.setupApiHelper(_a.currentUserChurch);
60
+ // TODO - remove context code from here and perform the logic in the component itself.
61
+ if (context) {
62
+ if (context.userChurch !== null)
63
+ _a.churchChanged = true;
64
+ context.setUserChurch(_a.currentUserChurch);
65
+ }
66
+ }
67
+ });
68
+ //# sourceMappingURL=UserHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserHelper.js","sourceRoot":"","sources":["../../src/helpers/UserHelper.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAuC;AAGvC,MAAa,UAAU;IA6BrB,MA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AC;IAEtB,IAAI,QAAQ,EAAE;QACZ,EAAU,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;YACnC,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,QAAQ;gBAAE,UAAU,GAAG,EAAE,CAAC;QACjD,CAAC,CAAC,CAAC;KACJ;SACI,IAAI,OAAO;QAAE,EAAU,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,SAAS,KAAK,OAAO;YAAE,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;;QAC9G,UAAU,GAAG,EAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAC7C,IAAI,CAAC,UAAU;QAAE,OAAO;SACnB;QACH,EAAU,CAAC,iBAAiB,GAAG,UAAU,CAAC;QAC1C,EAAU,CAAC,cAAc,CAAC,EAAU,CAAC,iBAAiB,CAAC,CAAC;QACxD,sFAAsF;QACtF,IAAI,OAAO,EAAE;YACX,IAAI,OAAO,CAAC,UAAU,KAAK,IAAI;gBAAE,EAAU,CAAC,aAAa,GAAG,IAAI,CAAC;YACjE,OAAO,CAAC,aAAa,CAAC,EAAU,CAAC,iBAAiB,CAAC,CAAC;SACrD;KACF;AACH,CAAC,CAAA,AApBkB,CAoBlB"}
@@ -0,0 +1,2 @@
1
+ export declare function createEmotionCache(): import("@emotion/utils").EmotionCache;
2
+ //# sourceMappingURL=createEmotionCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createEmotionCache.d.ts","sourceRoot":"","sources":["../../src/helpers/createEmotionCache.ts"],"names":[],"mappings":"AAOA,wBAAgB,kBAAkB,0CASjC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createEmotionCache = void 0;
7
+ const cache_1 = __importDefault(require("@emotion/cache"));
8
+ const isBrowser = typeof document !== "undefined";
9
+ // On the client side, Create a meta tag at the top of the <head> and set it as insertionPoint.
10
+ // This assures that MUI styles are loaded first.
11
+ // It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
12
+ function createEmotionCache() {
13
+ let insertionPoint;
14
+ if (isBrowser) {
15
+ const emotionInsertionPoint = document.querySelector('meta[name="emotion-insertion-point"]');
16
+ insertionPoint = emotionInsertionPoint !== null && emotionInsertionPoint !== void 0 ? emotionInsertionPoint : undefined;
17
+ }
18
+ return (0, cache_1.default)({ key: "mui-style", insertionPoint });
19
+ }
20
+ exports.createEmotionCache = createEmotionCache;
21
+ //# sourceMappingURL=createEmotionCache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createEmotionCache.js","sourceRoot":"","sources":["../../src/helpers/createEmotionCache.ts"],"names":[],"mappings":";;;;;;AAAA,2DAAyC;AAEzC,MAAM,SAAS,GAAG,OAAO,QAAQ,KAAK,WAAW,CAAC;AAElD,+FAA+F;AAC/F,iDAAiD;AACjD,qGAAqG;AACrG,SAAgB,kBAAkB;IAChC,IAAI,cAAc,CAAC;IAEnB,IAAI,SAAS,EAAE;QACb,MAAM,qBAAqB,GAAG,QAAQ,CAAC,aAAa,CAAkB,sCAAsC,CAAC,CAAC;QAC9G,cAAc,GAAG,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,SAAS,CAAC;KACrD;IAED,OAAO,IAAA,eAAW,EAAC,EAAE,GAAG,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;AAC3D,CAAC;AATD,gDASC"}
@@ -0,0 +1,16 @@
1
+ export * from "@churchapps/helpers";
2
+ export { AnalyticsHelper } from "./AnalyticsHelper";
3
+ export { ApiHelper } from "./ApiHelper";
4
+ export { ArrayHelper } from "./ArrayHelper";
5
+ export { CommonEnvironmentHelper } from "./CommonEnvironmentHelper";
6
+ export { CurrencyHelper } from "./CurrencyHelper";
7
+ export { DateHelper } from "./DateHelper";
8
+ export { FileHelper } from "./FileHelper";
9
+ export { PersonHelper } from "./PersonHelper";
10
+ export { Themes } from "./Themes";
11
+ export { UserHelper } from "./UserHelper";
12
+ export { UniqueIdHelper } from "./UniqueIdHelper";
13
+ export { createEmotionCache } from "./createEmotionCache";
14
+ export { DonationHelper } from "./DonationHelper";
15
+ export { AppearanceInterface, AppearanceHelper } from "./AppearanceHelper";
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.AppearanceHelper = exports.DonationHelper = exports.createEmotionCache = exports.UniqueIdHelper = exports.UserHelper = exports.Themes = exports.PersonHelper = exports.FileHelper = exports.DateHelper = exports.CurrencyHelper = exports.CommonEnvironmentHelper = exports.ArrayHelper = exports.ApiHelper = exports.AnalyticsHelper = void 0;
18
+ __exportStar(require("@churchapps/helpers"), exports);
19
+ var AnalyticsHelper_1 = require("./AnalyticsHelper");
20
+ Object.defineProperty(exports, "AnalyticsHelper", { enumerable: true, get: function () { return AnalyticsHelper_1.AnalyticsHelper; } });
21
+ var ApiHelper_1 = require("./ApiHelper");
22
+ Object.defineProperty(exports, "ApiHelper", { enumerable: true, get: function () { return ApiHelper_1.ApiHelper; } });
23
+ var ArrayHelper_1 = require("./ArrayHelper");
24
+ Object.defineProperty(exports, "ArrayHelper", { enumerable: true, get: function () { return ArrayHelper_1.ArrayHelper; } });
25
+ var CommonEnvironmentHelper_1 = require("./CommonEnvironmentHelper");
26
+ Object.defineProperty(exports, "CommonEnvironmentHelper", { enumerable: true, get: function () { return CommonEnvironmentHelper_1.CommonEnvironmentHelper; } });
27
+ var CurrencyHelper_1 = require("./CurrencyHelper");
28
+ Object.defineProperty(exports, "CurrencyHelper", { enumerable: true, get: function () { return CurrencyHelper_1.CurrencyHelper; } });
29
+ var DateHelper_1 = require("./DateHelper");
30
+ Object.defineProperty(exports, "DateHelper", { enumerable: true, get: function () { return DateHelper_1.DateHelper; } });
31
+ var FileHelper_1 = require("./FileHelper");
32
+ Object.defineProperty(exports, "FileHelper", { enumerable: true, get: function () { return FileHelper_1.FileHelper; } });
33
+ var PersonHelper_1 = require("./PersonHelper");
34
+ Object.defineProperty(exports, "PersonHelper", { enumerable: true, get: function () { return PersonHelper_1.PersonHelper; } });
35
+ var Themes_1 = require("./Themes");
36
+ Object.defineProperty(exports, "Themes", { enumerable: true, get: function () { return Themes_1.Themes; } });
37
+ var UserHelper_1 = require("./UserHelper");
38
+ Object.defineProperty(exports, "UserHelper", { enumerable: true, get: function () { return UserHelper_1.UserHelper; } });
39
+ var UniqueIdHelper_1 = require("./UniqueIdHelper");
40
+ Object.defineProperty(exports, "UniqueIdHelper", { enumerable: true, get: function () { return UniqueIdHelper_1.UniqueIdHelper; } });
41
+ var createEmotionCache_1 = require("./createEmotionCache");
42
+ Object.defineProperty(exports, "createEmotionCache", { enumerable: true, get: function () { return createEmotionCache_1.createEmotionCache; } });
43
+ var DonationHelper_1 = require("./DonationHelper");
44
+ Object.defineProperty(exports, "DonationHelper", { enumerable: true, get: function () { return DonationHelper_1.DonationHelper; } });
45
+ var AppearanceHelper_1 = require("./AppearanceHelper");
46
+ Object.defineProperty(exports, "AppearanceHelper", { enumerable: true, get: function () { return AppearanceHelper_1.AppearanceHelper; } });
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AACf,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,uDAA2E;AAA7C,oHAAA,gBAAgB,OAAA"}
@@ -0,0 +1,2 @@
1
+ export { useMountedState } from "./useMountedState";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useMountedState = void 0;
4
+ var useMountedState_1 = require("./useMountedState");
5
+ Object.defineProperty(exports, "useMountedState", { enumerable: true, get: function () { return useMountedState_1.useMountedState; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AAA3C,kHAAA,eAAe,OAAA"}