@everysk/apps-sdk 0.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (450) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +128 -0
  3. package/dist/EveryskApp.d.ts +73 -0
  4. package/dist/EveryskApp.d.ts.map +1 -0
  5. package/dist/EveryskApp.js +66 -0
  6. package/dist/EveryskApp.js.map +1 -0
  7. package/dist/agGrid/agGridTheme.d.ts +77 -0
  8. package/dist/agGrid/agGridTheme.d.ts.map +1 -0
  9. package/dist/agGrid/agGridTheme.js +88 -0
  10. package/dist/agGrid/agGridTheme.js.map +1 -0
  11. package/dist/agGrid/index.d.ts +4 -0
  12. package/dist/agGrid/index.d.ts.map +1 -0
  13. package/dist/agGrid/index.js +3 -0
  14. package/dist/api/datastore.d.ts +68 -0
  15. package/dist/api/datastore.d.ts.map +1 -0
  16. package/dist/api/datastore.js +125 -0
  17. package/dist/api/datastore.js.map +1 -0
  18. package/dist/api/entityQuery.d.ts +78 -0
  19. package/dist/api/entityQuery.d.ts.map +1 -0
  20. package/dist/api/entityQuery.js +100 -0
  21. package/dist/api/entityQuery.js.map +1 -0
  22. package/dist/api/file.d.ts +70 -0
  23. package/dist/api/file.d.ts.map +1 -0
  24. package/dist/api/file.js +126 -0
  25. package/dist/api/file.js.map +1 -0
  26. package/dist/api/portfolio.d.ts +67 -0
  27. package/dist/api/portfolio.d.ts.map +1 -0
  28. package/dist/api/portfolio.js +125 -0
  29. package/dist/api/portfolio.js.map +1 -0
  30. package/dist/api/profile.d.ts +40 -0
  31. package/dist/api/profile.d.ts.map +1 -0
  32. package/dist/api/profile.js +71 -0
  33. package/dist/api/profile.js.map +1 -0
  34. package/dist/api/websocketsConfig.d.ts +13 -0
  35. package/dist/api/websocketsConfig.d.ts.map +1 -0
  36. package/dist/api/websocketsConfig.js +25 -0
  37. package/dist/api/websocketsConfig.js.map +1 -0
  38. package/dist/api/workflow.d.ts +154 -0
  39. package/dist/api/workflow.d.ts.map +1 -0
  40. package/dist/api/workflow.js +289 -0
  41. package/dist/api/workflow.js.map +1 -0
  42. package/dist/api/workspace.d.ts +29 -0
  43. package/dist/api/workspace.d.ts.map +1 -0
  44. package/dist/api/workspace.js +54 -0
  45. package/dist/api/workspace.js.map +1 -0
  46. package/dist/components/ui/EveryskIcon/index.d.ts +5 -0
  47. package/dist/components/ui/EveryskIcon/index.d.ts.map +1 -0
  48. package/dist/components/ui/EveryskIcon/index.js +25 -0
  49. package/dist/components/ui/EveryskIcon/index.js.map +1 -0
  50. package/dist/components/ui/Footer/index.d.ts +5 -0
  51. package/dist/components/ui/Footer/index.d.ts.map +1 -0
  52. package/dist/components/ui/Footer/index.js +23 -0
  53. package/dist/components/ui/Footer/index.js.map +1 -0
  54. package/dist/components/ui/GlobalLoading/index.d.ts +8 -0
  55. package/dist/components/ui/GlobalLoading/index.d.ts.map +1 -0
  56. package/dist/components/ui/GlobalLoading/index.js +42 -0
  57. package/dist/components/ui/GlobalLoading/index.js.map +1 -0
  58. package/dist/components/ui/PageContainer/index.d.ts +7 -0
  59. package/dist/components/ui/PageContainer/index.d.ts.map +1 -0
  60. package/dist/components/ui/PageContainer/index.js +20 -0
  61. package/dist/components/ui/PageContainer/index.js.map +1 -0
  62. package/dist/components/ui/Toolbar/index.d.ts +5 -0
  63. package/dist/components/ui/Toolbar/index.d.ts.map +1 -0
  64. package/dist/components/ui/Toolbar/index.js +32 -0
  65. package/dist/components/ui/Toolbar/index.js.map +1 -0
  66. package/dist/contexts/agGridLicenseContext/provider.d.ts +51 -0
  67. package/dist/contexts/agGridLicenseContext/provider.d.ts.map +1 -0
  68. package/dist/contexts/agGridLicenseContext/provider.js +58 -0
  69. package/dist/contexts/agGridLicenseContext/provider.js.map +1 -0
  70. package/dist/contexts/appAlertContext/index.d.ts +3 -0
  71. package/dist/contexts/appAlertContext/index.d.ts.map +1 -0
  72. package/dist/contexts/appAlertContext/index.js +7 -0
  73. package/dist/contexts/appAlertContext/index.js.map +1 -0
  74. package/dist/contexts/appAlertContext/provider.d.ts +40 -0
  75. package/dist/contexts/appAlertContext/provider.d.ts.map +1 -0
  76. package/dist/contexts/appAlertContext/provider.js +96 -0
  77. package/dist/contexts/appAlertContext/provider.js.map +1 -0
  78. package/dist/contexts/appAlertContext/types.d.ts +15 -0
  79. package/dist/contexts/appAlertContext/types.d.ts.map +1 -0
  80. package/dist/contexts/appAlertContext/useAppAlert.d.ts +30 -0
  81. package/dist/contexts/appAlertContext/useAppAlert.d.ts.map +1 -0
  82. package/dist/contexts/appAlertContext/useAppAlert.js +40 -0
  83. package/dist/contexts/appAlertContext/useAppAlert.js.map +1 -0
  84. package/dist/contexts/appConfigContext/index.d.ts +3 -0
  85. package/dist/contexts/appConfigContext/index.d.ts.map +1 -0
  86. package/dist/contexts/appConfigContext/index.js +7 -0
  87. package/dist/contexts/appConfigContext/index.js.map +1 -0
  88. package/dist/contexts/appConfigContext/provider.d.ts +45 -0
  89. package/dist/contexts/appConfigContext/provider.d.ts.map +1 -0
  90. package/dist/contexts/appConfigContext/provider.js +63 -0
  91. package/dist/contexts/appConfigContext/provider.js.map +1 -0
  92. package/dist/contexts/appConfigContext/types.d.ts +28 -0
  93. package/dist/contexts/appConfigContext/types.d.ts.map +1 -0
  94. package/dist/contexts/appConfigContext/useAppConfig.d.ts +20 -0
  95. package/dist/contexts/appConfigContext/useAppConfig.d.ts.map +1 -0
  96. package/dist/contexts/appConfigContext/useAppConfig.js +30 -0
  97. package/dist/contexts/appConfigContext/useAppConfig.js.map +1 -0
  98. package/dist/contexts/webSocketContext/constants.d.ts +4 -0
  99. package/dist/contexts/webSocketContext/constants.d.ts.map +1 -0
  100. package/dist/contexts/webSocketContext/constants.js +8 -0
  101. package/dist/contexts/webSocketContext/constants.js.map +1 -0
  102. package/dist/contexts/webSocketContext/handler.d.ts +43 -0
  103. package/dist/contexts/webSocketContext/handler.d.ts.map +1 -0
  104. package/dist/contexts/webSocketContext/handler.js +87 -0
  105. package/dist/contexts/webSocketContext/handler.js.map +1 -0
  106. package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.d.ts +19 -0
  107. package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.d.ts.map +1 -0
  108. package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.js +31 -0
  109. package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.js.map +1 -0
  110. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.d.ts +11 -0
  111. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.d.ts.map +1 -0
  112. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js +21 -0
  113. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js.map +1 -0
  114. package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.d.ts +30 -0
  115. package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.d.ts.map +1 -0
  116. package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.js +44 -0
  117. package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.js.map +1 -0
  118. package/dist/contexts/webSocketContext/index.d.ts +3 -0
  119. package/dist/contexts/webSocketContext/index.d.ts.map +1 -0
  120. package/dist/contexts/webSocketContext/index.js +7 -0
  121. package/dist/contexts/webSocketContext/index.js.map +1 -0
  122. package/dist/contexts/webSocketContext/provider.d.ts +39 -0
  123. package/dist/contexts/webSocketContext/provider.d.ts.map +1 -0
  124. package/dist/contexts/webSocketContext/provider.js +121 -0
  125. package/dist/contexts/webSocketContext/provider.js.map +1 -0
  126. package/dist/contexts/webSocketContext/types.d.ts +41 -0
  127. package/dist/contexts/webSocketContext/types.d.ts.map +1 -0
  128. package/dist/datastore/index.d.ts +7 -0
  129. package/dist/datastore/index.d.ts.map +1 -0
  130. package/dist/file/index.d.ts +6 -0
  131. package/dist/file/index.d.ts.map +1 -0
  132. package/dist/hooks/datastore/useDatastoreMutations.d.ts +151 -0
  133. package/dist/hooks/datastore/useDatastoreMutations.d.ts.map +1 -0
  134. package/dist/hooks/datastore/useDatastoreMutations.js +198 -0
  135. package/dist/hooks/datastore/useDatastoreMutations.js.map +1 -0
  136. package/dist/hooks/datastore/useFetchDatastore.d.ts +205 -0
  137. package/dist/hooks/datastore/useFetchDatastore.d.ts.map +1 -0
  138. package/dist/hooks/datastore/useFetchDatastore.js +85 -0
  139. package/dist/hooks/datastore/useFetchDatastore.js.map +1 -0
  140. package/dist/hooks/datastore/useFetchDatastores.d.ts +70 -0
  141. package/dist/hooks/datastore/useFetchDatastores.d.ts.map +1 -0
  142. package/dist/hooks/datastore/useFetchDatastores.js +105 -0
  143. package/dist/hooks/datastore/useFetchDatastores.js.map +1 -0
  144. package/dist/hooks/file/useFetchFile.d.ts +212 -0
  145. package/dist/hooks/file/useFetchFile.d.ts.map +1 -0
  146. package/dist/hooks/file/useFetchFile.js +87 -0
  147. package/dist/hooks/file/useFetchFile.js.map +1 -0
  148. package/dist/hooks/file/useFetchFiles.d.ts +60 -0
  149. package/dist/hooks/file/useFetchFiles.d.ts.map +1 -0
  150. package/dist/hooks/file/useFetchFiles.js +89 -0
  151. package/dist/hooks/file/useFetchFiles.js.map +1 -0
  152. package/dist/hooks/file/useFileMutations.d.ts +161 -0
  153. package/dist/hooks/file/useFileMutations.d.ts.map +1 -0
  154. package/dist/hooks/file/useFileMutations.js +208 -0
  155. package/dist/hooks/file/useFileMutations.js.map +1 -0
  156. package/dist/hooks/portfolio/useFetchPortfolio.d.ts +210 -0
  157. package/dist/hooks/portfolio/useFetchPortfolio.d.ts.map +1 -0
  158. package/dist/hooks/portfolio/useFetchPortfolio.js +85 -0
  159. package/dist/hooks/portfolio/useFetchPortfolio.js.map +1 -0
  160. package/dist/hooks/portfolio/useFetchPortfolios.d.ts +60 -0
  161. package/dist/hooks/portfolio/useFetchPortfolios.d.ts.map +1 -0
  162. package/dist/hooks/portfolio/useFetchPortfolios.js +89 -0
  163. package/dist/hooks/portfolio/useFetchPortfolios.js.map +1 -0
  164. package/dist/hooks/portfolio/usePortfolioMutations.d.ts +171 -0
  165. package/dist/hooks/portfolio/usePortfolioMutations.d.ts.map +1 -0
  166. package/dist/hooks/portfolio/usePortfolioMutations.js +218 -0
  167. package/dist/hooks/portfolio/usePortfolioMutations.js.map +1 -0
  168. package/dist/hooks/profile/useFetchProfile.d.ts +206 -0
  169. package/dist/hooks/profile/useFetchProfile.d.ts.map +1 -0
  170. package/dist/hooks/profile/useFetchProfile.js +70 -0
  171. package/dist/hooks/profile/useFetchProfile.js.map +1 -0
  172. package/dist/hooks/useAxios.d.ts +40 -0
  173. package/dist/hooks/useAxios.d.ts.map +1 -0
  174. package/dist/hooks/useAxios.js +76 -0
  175. package/dist/hooks/useAxios.js.map +1 -0
  176. package/dist/hooks/workflow/useFetchWorkerExecution.d.ts +198 -0
  177. package/dist/hooks/workflow/useFetchWorkerExecution.d.ts.map +1 -0
  178. package/dist/hooks/workflow/useFetchWorkerExecution.js +69 -0
  179. package/dist/hooks/workflow/useFetchWorkerExecution.js.map +1 -0
  180. package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts +52 -0
  181. package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts.map +1 -0
  182. package/dist/hooks/workflow/useFetchWorkerExecutions.js +83 -0
  183. package/dist/hooks/workflow/useFetchWorkerExecutions.js.map +1 -0
  184. package/dist/hooks/workflow/useFetchWorkflow.d.ts +195 -0
  185. package/dist/hooks/workflow/useFetchWorkflow.d.ts.map +1 -0
  186. package/dist/hooks/workflow/useFetchWorkflow.js +70 -0
  187. package/dist/hooks/workflow/useFetchWorkflow.js.map +1 -0
  188. package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts +198 -0
  189. package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts.map +1 -0
  190. package/dist/hooks/workflow/useFetchWorkflowExecution.js +69 -0
  191. package/dist/hooks/workflow/useFetchWorkflowExecution.js.map +1 -0
  192. package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts +49 -0
  193. package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts.map +1 -0
  194. package/dist/hooks/workflow/useFetchWorkflowExecutions.js +77 -0
  195. package/dist/hooks/workflow/useFetchWorkflowExecutions.js.map +1 -0
  196. package/dist/hooks/workflow/useFetchWorkflows.d.ts +47 -0
  197. package/dist/hooks/workflow/useFetchWorkflows.d.ts.map +1 -0
  198. package/dist/hooks/workflow/useFetchWorkflows.js +67 -0
  199. package/dist/hooks/workflow/useFetchWorkflows.js.map +1 -0
  200. package/dist/hooks/workflow/useRunWorkflow.d.ts +30 -0
  201. package/dist/hooks/workflow/useRunWorkflow.d.ts.map +1 -0
  202. package/dist/hooks/workflow/useRunWorkflow.js +50 -0
  203. package/dist/hooks/workflow/useRunWorkflow.js.map +1 -0
  204. package/dist/hooks/workspace/useFetchWorkspace.d.ts +197 -0
  205. package/dist/hooks/workspace/useFetchWorkspace.d.ts.map +1 -0
  206. package/dist/hooks/workspace/useFetchWorkspace.js +65 -0
  207. package/dist/hooks/workspace/useFetchWorkspace.js.map +1 -0
  208. package/dist/hooks/workspace/useFetchWorkspaces.d.ts +46 -0
  209. package/dist/hooks/workspace/useFetchWorkspaces.d.ts.map +1 -0
  210. package/dist/hooks/workspace/useFetchWorkspaces.js +66 -0
  211. package/dist/hooks/workspace/useFetchWorkspaces.js.map +1 -0
  212. package/dist/index.d.ts +24 -0
  213. package/dist/index.d.ts.map +1 -0
  214. package/dist/index.js +50 -0
  215. package/dist/lib/datastoreTable.d.ts +126 -0
  216. package/dist/lib/datastoreTable.d.ts.map +1 -0
  217. package/dist/lib/datastoreTable.js +146 -0
  218. package/dist/lib/datastoreTable.js.map +1 -0
  219. package/dist/lib/queryClient.d.ts +24 -0
  220. package/dist/lib/queryClient.d.ts.map +1 -0
  221. package/dist/lib/queryClient.js +48 -0
  222. package/dist/lib/queryClient.js.map +1 -0
  223. package/dist/portfolio/index.d.ts +6 -0
  224. package/dist/portfolio/index.d.ts.map +1 -0
  225. package/dist/profile/index.d.ts +4 -0
  226. package/dist/profile/index.d.ts.map +1 -0
  227. package/dist/socket/index.d.ts +10 -0
  228. package/dist/socket/index.d.ts.map +1 -0
  229. package/dist/socket/index.js +9 -0
  230. package/dist/test/index.d.ts +2 -0
  231. package/dist/test/index.d.ts.map +1 -0
  232. package/dist/test/index.js +2 -0
  233. package/dist/test/mocks/agGridEnterprise.d.ts +38 -0
  234. package/dist/test/mocks/agGridEnterprise.d.ts.map +1 -0
  235. package/dist/test/mocks/agGridEnterprise.js +43 -0
  236. package/dist/test/mocks/agGridEnterprise.js.map +1 -0
  237. package/dist/test/mocks/agGridReact.d.ts +42 -0
  238. package/dist/test/mocks/agGridReact.d.ts.map +1 -0
  239. package/dist/test/mocks/agGridReact.js +47 -0
  240. package/dist/test/mocks/agGridReact.js.map +1 -0
  241. package/dist/test/mocks/index.d.ts +5 -0
  242. package/dist/test/mocks/index.d.ts.map +1 -0
  243. package/dist/test/mocks/index.js +4 -0
  244. package/dist/test/mocks/socketIoClient.d.ts +45 -0
  245. package/dist/test/mocks/socketIoClient.d.ts.map +1 -0
  246. package/dist/test/mocks/socketIoClient.js +54 -0
  247. package/dist/test/mocks/socketIoClient.js.map +1 -0
  248. package/dist/test/renderWithProviders.d.ts +107 -0
  249. package/dist/test/renderWithProviders.d.ts.map +1 -0
  250. package/dist/test/renderWithProviders.js +85 -0
  251. package/dist/test/renderWithProviders.js.map +1 -0
  252. package/dist/test/setup.d.ts +2 -0
  253. package/dist/test/setup.d.ts.map +1 -0
  254. package/dist/test/setup.js +25 -0
  255. package/dist/test/setup.js.map +1 -0
  256. package/dist/theme/ThemeProvider.d.ts +12 -0
  257. package/dist/theme/ThemeProvider.d.ts.map +1 -0
  258. package/dist/theme/ThemeProvider.js +22 -0
  259. package/dist/theme/ThemeProvider.js.map +1 -0
  260. package/dist/theme/index.d.ts +9 -0
  261. package/dist/theme/index.d.ts.map +1 -0
  262. package/dist/theme/overrides/index.d.ts +7 -0
  263. package/dist/theme/overrides/index.d.ts.map +1 -0
  264. package/dist/theme/overrides/index.js +31 -0
  265. package/dist/theme/overrides/index.js.map +1 -0
  266. package/dist/theme/overrides/muiButton.d.ts +3 -0
  267. package/dist/theme/overrides/muiButton.d.ts.map +1 -0
  268. package/dist/theme/overrides/muiButton.js +6 -0
  269. package/dist/theme/overrides/muiButton.js.map +1 -0
  270. package/dist/theme/overrides/muiCssBaseline.d.ts +31 -0
  271. package/dist/theme/overrides/muiCssBaseline.d.ts.map +1 -0
  272. package/dist/theme/overrides/muiCssBaseline.js +27 -0
  273. package/dist/theme/overrides/muiCssBaseline.js.map +1 -0
  274. package/dist/theme/overrides/muiDatePicker.d.ts +10 -0
  275. package/dist/theme/overrides/muiDatePicker.d.ts.map +1 -0
  276. package/dist/theme/overrides/muiDatePicker.js +6 -0
  277. package/dist/theme/overrides/muiDatePicker.js.map +1 -0
  278. package/dist/theme/overrides/muiFormControl.d.ts +3 -0
  279. package/dist/theme/overrides/muiFormControl.d.ts.map +1 -0
  280. package/dist/theme/overrides/muiFormControl.js +6 -0
  281. package/dist/theme/overrides/muiFormControl.js.map +1 -0
  282. package/dist/theme/overrides/muiIconButton.d.ts +3 -0
  283. package/dist/theme/overrides/muiIconButton.d.ts.map +1 -0
  284. package/dist/theme/overrides/muiIconButton.js +6 -0
  285. package/dist/theme/overrides/muiIconButton.js.map +1 -0
  286. package/dist/theme/overrides/muiSelect.d.ts +3 -0
  287. package/dist/theme/overrides/muiSelect.d.ts.map +1 -0
  288. package/dist/theme/overrides/muiSelect.js +6 -0
  289. package/dist/theme/overrides/muiSelect.js.map +1 -0
  290. package/dist/theme/overrides/muiSvgIcon.d.ts +3 -0
  291. package/dist/theme/overrides/muiSvgIcon.d.ts.map +1 -0
  292. package/dist/theme/overrides/muiSvgIcon.js +6 -0
  293. package/dist/theme/overrides/muiSvgIcon.js.map +1 -0
  294. package/dist/theme/overrides/muiTextField.d.ts +3 -0
  295. package/dist/theme/overrides/muiTextField.d.ts.map +1 -0
  296. package/dist/theme/overrides/muiTextField.js +6 -0
  297. package/dist/theme/overrides/muiTextField.js.map +1 -0
  298. package/dist/theme/overrides/muiToggleButton.d.ts +3 -0
  299. package/dist/theme/overrides/muiToggleButton.d.ts.map +1 -0
  300. package/dist/theme/overrides/muiToggleButton.js +6 -0
  301. package/dist/theme/overrides/muiToggleButton.js.map +1 -0
  302. package/dist/theme/overrides/muiToggleButtonGroup.d.ts +3 -0
  303. package/dist/theme/overrides/muiToggleButtonGroup.d.ts.map +1 -0
  304. package/dist/theme/overrides/muiToggleButtonGroup.js +6 -0
  305. package/dist/theme/overrides/muiToggleButtonGroup.js.map +1 -0
  306. package/dist/theme/themes/DefaultDark.d.ts +7 -0
  307. package/dist/theme/themes/DefaultDark.d.ts.map +1 -0
  308. package/dist/theme/themes/DefaultDark.js +15 -0
  309. package/dist/theme/themes/DefaultDark.js.map +1 -0
  310. package/dist/theme/themes/DefaultLight.d.ts +7 -0
  311. package/dist/theme/themes/DefaultLight.d.ts.map +1 -0
  312. package/dist/theme/themes/DefaultLight.js +15 -0
  313. package/dist/theme/themes/DefaultLight.js.map +1 -0
  314. package/dist/theme/themes/EveryskDark.d.ts +15 -0
  315. package/dist/theme/themes/EveryskDark.d.ts.map +1 -0
  316. package/dist/theme/themes/EveryskDark.js +63 -0
  317. package/dist/theme/themes/EveryskDark.js.map +1 -0
  318. package/dist/theme/themes/EveryskLight.d.ts +21 -0
  319. package/dist/theme/themes/EveryskLight.d.ts.map +1 -0
  320. package/dist/theme/themes/EveryskLight.js +69 -0
  321. package/dist/theme/themes/EveryskLight.js.map +1 -0
  322. package/dist/theme/themes/MidnightEmber.d.ts +3 -0
  323. package/dist/theme/themes/MidnightEmber.d.ts.map +1 -0
  324. package/dist/theme/themes/MidnightEmber.js +31 -0
  325. package/dist/theme/themes/MidnightEmber.js.map +1 -0
  326. package/dist/theme/themes/index.d.ts +17 -0
  327. package/dist/theme/themes/index.d.ts.map +1 -0
  328. package/dist/theme/themes/index.js +32 -0
  329. package/dist/theme/themes/index.js.map +1 -0
  330. package/dist/types/anyRecord.d.ts +4 -0
  331. package/dist/types/anyRecord.d.ts.map +1 -0
  332. package/dist/types/datastore.d.ts +26 -0
  333. package/dist/types/datastore.d.ts.map +1 -0
  334. package/dist/types/entityQuery.d.ts +47 -0
  335. package/dist/types/entityQuery.d.ts.map +1 -0
  336. package/dist/types/file.d.ts +29 -0
  337. package/dist/types/file.d.ts.map +1 -0
  338. package/dist/types/portfolio.d.ts +77 -0
  339. package/dist/types/portfolio.d.ts.map +1 -0
  340. package/dist/types/profile.d.ts +37 -0
  341. package/dist/types/profile.d.ts.map +1 -0
  342. package/dist/types/workflow.d.ts +68 -0
  343. package/dist/types/workflow.d.ts.map +1 -0
  344. package/dist/types/workspace.d.ts +13 -0
  345. package/dist/types/workspace.d.ts.map +1 -0
  346. package/dist/ui/index.d.ts +6 -0
  347. package/dist/ui/index.d.ts.map +1 -0
  348. package/dist/workflow/index.d.ts +10 -0
  349. package/dist/workflow/index.d.ts.map +1 -0
  350. package/dist/workspace/index.d.ts +5 -0
  351. package/dist/workspace/index.d.ts.map +1 -0
  352. package/package.json +148 -0
  353. package/src/EveryskApp.tsx +108 -0
  354. package/src/agGrid/agGridTheme.ts +113 -0
  355. package/src/agGrid/index.ts +15 -0
  356. package/src/api/datastore.ts +175 -0
  357. package/src/api/entityQuery.ts +101 -0
  358. package/src/api/file.ts +174 -0
  359. package/src/api/portfolio.ts +190 -0
  360. package/src/api/profile.ts +80 -0
  361. package/src/api/websocketsConfig.ts +32 -0
  362. package/src/api/workflow.ts +427 -0
  363. package/src/api/workspace.ts +72 -0
  364. package/src/components/ui/EveryskIcon/index.tsx +24 -0
  365. package/src/components/ui/Footer/index.tsx +30 -0
  366. package/src/components/ui/GlobalLoading/index.tsx +38 -0
  367. package/src/components/ui/PageContainer/index.tsx +14 -0
  368. package/src/components/ui/Toolbar/index.tsx +44 -0
  369. package/src/contexts/agGridLicenseContext/provider.tsx +63 -0
  370. package/src/contexts/appAlertContext/index.tsx +4 -0
  371. package/src/contexts/appAlertContext/provider.tsx +92 -0
  372. package/src/contexts/appAlertContext/types.ts +17 -0
  373. package/src/contexts/appAlertContext/useAppAlert.ts +39 -0
  374. package/src/contexts/appConfigContext/index.tsx +4 -0
  375. package/src/contexts/appConfigContext/provider.tsx +67 -0
  376. package/src/contexts/appConfigContext/types.ts +28 -0
  377. package/src/contexts/appConfigContext/useAppConfig.ts +30 -0
  378. package/src/contexts/webSocketContext/constants.ts +3 -0
  379. package/src/contexts/webSocketContext/handler.ts +108 -0
  380. package/src/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.ts +36 -0
  381. package/src/contexts/webSocketContext/hooks/useWebSocket/index.ts +18 -0
  382. package/src/contexts/webSocketContext/hooks/useWebSocketSubscription/index.ts +45 -0
  383. package/src/contexts/webSocketContext/index.tsx +5 -0
  384. package/src/contexts/webSocketContext/provider.tsx +125 -0
  385. package/src/contexts/webSocketContext/types.ts +50 -0
  386. package/src/datastore/index.ts +14 -0
  387. package/src/file/index.ts +13 -0
  388. package/src/hooks/datastore/useDatastoreMutations.ts +221 -0
  389. package/src/hooks/datastore/useFetchDatastore.ts +95 -0
  390. package/src/hooks/datastore/useFetchDatastores.ts +162 -0
  391. package/src/hooks/file/useFetchFile.ts +93 -0
  392. package/src/hooks/file/useFetchFiles.ts +109 -0
  393. package/src/hooks/file/useFileMutations.ts +240 -0
  394. package/src/hooks/portfolio/useFetchPortfolio.ts +94 -0
  395. package/src/hooks/portfolio/useFetchPortfolios.ts +109 -0
  396. package/src/hooks/portfolio/usePortfolioMutations.ts +250 -0
  397. package/src/hooks/profile/useFetchProfile.ts +93 -0
  398. package/src/hooks/useAxios.ts +98 -0
  399. package/src/hooks/workflow/useFetchWorkerExecution.ts +78 -0
  400. package/src/hooks/workflow/useFetchWorkerExecutions.ts +98 -0
  401. package/src/hooks/workflow/useFetchWorkflow.ts +76 -0
  402. package/src/hooks/workflow/useFetchWorkflowExecution.ts +79 -0
  403. package/src/hooks/workflow/useFetchWorkflowExecutions.ts +95 -0
  404. package/src/hooks/workflow/useFetchWorkflows.ts +84 -0
  405. package/src/hooks/workflow/useRunWorkflow.ts +62 -0
  406. package/src/hooks/workspace/useFetchWorkspace.ts +78 -0
  407. package/src/hooks/workspace/useFetchWorkspaces.ts +86 -0
  408. package/src/index.ts +72 -0
  409. package/src/lib/datastoreTable.ts +159 -0
  410. package/src/lib/queryClient.ts +60 -0
  411. package/src/portfolio/index.ts +13 -0
  412. package/src/profile/index.ts +11 -0
  413. package/src/socket/index.ts +19 -0
  414. package/src/test/index.ts +10 -0
  415. package/src/test/mocks/agGridEnterprise.ts +45 -0
  416. package/src/test/mocks/agGridReact.tsx +61 -0
  417. package/src/test/mocks/index.ts +22 -0
  418. package/src/test/mocks/socketIoClient.ts +78 -0
  419. package/src/test/renderWithProviders.tsx +114 -0
  420. package/src/test/setup.ts +46 -0
  421. package/src/theme/ThemeProvider.tsx +33 -0
  422. package/src/theme/index.ts +15 -0
  423. package/src/theme/overrides/index.ts +31 -0
  424. package/src/theme/overrides/muiButton.ts +7 -0
  425. package/src/theme/overrides/muiCssBaseline.ts +35 -0
  426. package/src/theme/overrides/muiDatePicker.ts +5 -0
  427. package/src/theme/overrides/muiFormControl.ts +7 -0
  428. package/src/theme/overrides/muiIconButton.ts +7 -0
  429. package/src/theme/overrides/muiSelect.ts +7 -0
  430. package/src/theme/overrides/muiSvgIcon.ts +7 -0
  431. package/src/theme/overrides/muiTextField.ts +7 -0
  432. package/src/theme/overrides/muiToggleButton.ts +7 -0
  433. package/src/theme/overrides/muiToggleButtonGroup.ts +7 -0
  434. package/src/theme/themes/DefaultDark.ts +14 -0
  435. package/src/theme/themes/DefaultLight.ts +14 -0
  436. package/src/theme/themes/EveryskDark.ts +62 -0
  437. package/src/theme/themes/EveryskLight.ts +68 -0
  438. package/src/theme/themes/MidnightEmber.ts +30 -0
  439. package/src/theme/themes/index.ts +35 -0
  440. package/src/types/anyRecord.ts +4 -0
  441. package/src/types/datastore.ts +33 -0
  442. package/src/types/entityQuery.ts +64 -0
  443. package/src/types/file.ts +32 -0
  444. package/src/types/portfolio.ts +81 -0
  445. package/src/types/profile.ts +39 -0
  446. package/src/types/workflow.ts +76 -0
  447. package/src/types/workspace.ts +15 -0
  448. package/src/ui/index.ts +14 -0
  449. package/src/workflow/index.ts +17 -0
  450. package/src/workspace/index.ts +12 -0
@@ -0,0 +1,29 @@
1
+ import type { EntitySingleResponse, EntityListResponse, DeleteEntityResponse } from "./entityQuery";
2
+ /**
3
+ * A file stored in a workspace.
4
+ *
5
+ * Named EveryskFile, not File: everything the SDK exports now shares one entry point, and a
6
+ * type called `File` there would shadow the DOM's `File` for anyone who imported it —
7
+ * silently, and only where it matters.
8
+ */
9
+ export type EveryskFile = {
10
+ id: string;
11
+ workspace: string;
12
+ name: string;
13
+ description?: string;
14
+ content_type: string;
15
+ url?: string;
16
+ hash?: string;
17
+ date?: string;
18
+ date_time?: string;
19
+ created?: number;
20
+ updated?: number;
21
+ version: string;
22
+ link_uid: string | null;
23
+ data: string | null;
24
+ tags?: string[];
25
+ };
26
+ export type FileSingleResponse = EntitySingleResponse<"file", EveryskFile>;
27
+ export type FileListResponse = EntityListResponse<"files", EveryskFile>;
28
+ export type DeleteFileResponse = DeleteEntityResponse<"files">;
29
+ //# sourceMappingURL=file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/types/file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEpG;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAE3E,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAExE,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC"}
@@ -0,0 +1,77 @@
1
+ import type { DeleteEntityResponse, EntityListResponse, EntitySingleResponse } from "./entityQuery";
2
+ export type Security = {
3
+ instrument_type: string | null;
4
+ coupon: unknown | null;
5
+ issue_price: unknown | null;
6
+ display: string | null;
7
+ asset_subclass: string | null;
8
+ market_value: number | null;
9
+ rate: unknown | null;
10
+ book: unknown | null;
11
+ symbol: string | null;
12
+ percent_index: unknown | null;
13
+ settlement: unknown | null;
14
+ issuer_type: unknown | null;
15
+ label: string | null;
16
+ accounting: unknown | null;
17
+ market_price: number | null;
18
+ hash: string | null;
19
+ extra_data: unknown | null;
20
+ multiplier: number | null;
21
+ option_type: unknown | null;
22
+ error_type: string | null;
23
+ exchange: string | null;
24
+ premium: unknown | null;
25
+ fx_rate: number | null;
26
+ ticker: string | null;
27
+ status: string | null;
28
+ currency: string | null;
29
+ operation: unknown | null;
30
+ comparable: string | null;
31
+ market_value_in_base: number | null;
32
+ issuer: unknown | null;
33
+ unrealized_pl_in_base: number | null;
34
+ unrealized_pl: number | null;
35
+ instrument_class: string | null;
36
+ issue_date: unknown | null;
37
+ series: unknown | null;
38
+ quantity: number | null;
39
+ id: string | null;
40
+ cost_price: number | null;
41
+ isin: string | null;
42
+ strike: unknown | null;
43
+ asset_class: string | null;
44
+ look_through_reference: unknown | null;
45
+ return_date: unknown | null;
46
+ underlying: unknown | null;
47
+ maturity_date: unknown | null;
48
+ previous_quantity: number | null;
49
+ warranty: unknown | null;
50
+ name: string | null;
51
+ error_message: string | null;
52
+ indexer: unknown | null;
53
+ trader: unknown | null;
54
+ trade_id: unknown | null;
55
+ };
56
+ export type Portfolio = {
57
+ id: string;
58
+ name?: string;
59
+ description?: string;
60
+ base_currency: string;
61
+ securities: Security[];
62
+ nlv?: number;
63
+ date: string;
64
+ date_time?: string;
65
+ tags?: string[];
66
+ workspace: string;
67
+ created?: number;
68
+ updated?: number;
69
+ version?: string;
70
+ link_uid?: string | null;
71
+ level?: string | null;
72
+ check_securities?: boolean;
73
+ };
74
+ export type PortfolioSingleResponse = EntitySingleResponse<"portfolio", Portfolio>;
75
+ export type PortfolioListResponse = EntityListResponse<"portfolios", Portfolio>;
76
+ export type DeletePortfolioResponse = DeleteEntityResponse<"portfolios">;
77
+ //# sourceMappingURL=portfolio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portfolio.d.ts","sourceRoot":"","sources":["../../src/types/portfolio.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Profile — the logged user, as returned by `GET /api/profile`.
3
+ *
4
+ * The endpoint resolves the user from the session, so there is no id to ask for: an app always
5
+ * gets the profile of whoever is using it.
6
+ */
7
+ export interface Profile {
8
+ email: string;
9
+ user_type: string;
10
+ region: string;
11
+ company_name: string;
12
+ first_name: string;
13
+ last_name: string;
14
+ phone: string;
15
+ address: string;
16
+ billing_email: string;
17
+ time_zone: string;
18
+ company_logo: string;
19
+ user_role: string;
20
+ skin_theme: string;
21
+ account_deletion_requested: boolean;
22
+ asset: unknown;
23
+ owner: unknown;
24
+ auto_refresh: unknown;
25
+ [key: string]: unknown;
26
+ }
27
+ /**
28
+ * ProfileResponse — the endpoint's envelope.
29
+ *
30
+ * It does not follow `EntitySingleResponse`: `/api/profile` is not a queryable entity, so the
31
+ * payload carries a `status` and no `next_page_token`.
32
+ */
33
+ export type ProfileResponse = {
34
+ status: string;
35
+ profile: Profile;
36
+ };
37
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/types/profile.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B,EAAE,OAAO,CAAC;IAGpC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC"}
@@ -0,0 +1,68 @@
1
+ import type { DeleteEntityResponse, EntityListResponse, EntitySingleResponse } from "./entityQuery";
2
+ export interface Workflow {
3
+ id: string;
4
+ name: string;
5
+ workspace: string;
6
+ description: string;
7
+ tags: string[];
8
+ status: string;
9
+ created: number;
10
+ updated: number;
11
+ version: string;
12
+ trigger_enabled: boolean;
13
+ trigger_type: string;
14
+ trigger_config: Record<string, unknown>;
15
+ starter_worker_id: string;
16
+ ender_worker_id: string;
17
+ [key: string]: unknown;
18
+ }
19
+ export interface WorkflowExecution {
20
+ id: string;
21
+ workflow_id: string;
22
+ workflow_name: string;
23
+ workspace: string;
24
+ status: string;
25
+ run_status: string;
26
+ duration: number;
27
+ real_execution_time: number;
28
+ total_execution_time: number;
29
+ started: number;
30
+ created: number;
31
+ updated: number;
32
+ trigger: string;
33
+ started_worker_id: string;
34
+ ender_worker_id: string;
35
+ ender_worker_execution_id: string;
36
+ resume: unknown;
37
+ version: string;
38
+ [key: string]: unknown;
39
+ }
40
+ export type WorkerExecution = {
41
+ id: string;
42
+ status: string;
43
+ worker_id: string;
44
+ worker_name: string;
45
+ worker_type: string;
46
+ workflow_execution_id: string;
47
+ workflow_id: string;
48
+ workflow_name: string;
49
+ trigger: string;
50
+ created: number;
51
+ updated: number;
52
+ started: number;
53
+ duration: number;
54
+ cpu_time: number;
55
+ result: Record<string, unknown>;
56
+ input_params: Record<string, unknown>;
57
+ version: string;
58
+ };
59
+ export type WorkflowSingleResponse = EntitySingleResponse<"workflow", Workflow>;
60
+ export type WorkflowListResponse = EntityListResponse<"workflows", Workflow>;
61
+ export type DeleteWorkflowResponse = DeleteEntityResponse<"workflows">;
62
+ export type WorkflowExecutionSingleResponse = EntitySingleResponse<"workflow_execution", WorkflowExecution>;
63
+ export type WorkflowExecutionListResponse = EntityListResponse<"workflow_executions", WorkflowExecution>;
64
+ export type WorkerExecutionSingleResponse = EntitySingleResponse<"worker_execution", WorkerExecution>;
65
+ export type WorkerExecutionListResponse = {
66
+ parallel_index_max: number;
67
+ } & EntityListResponse<"worker_executions", WorkerExecution>;
68
+ //# sourceMappingURL=workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/types/workflow.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,13 @@
1
+ import type { EntityListResponse, EntitySingleResponse } from "./entityQuery";
2
+ export interface Workspace {
3
+ name: string;
4
+ group: string | null;
5
+ description: string;
6
+ version: string;
7
+ created: number;
8
+ updated: number;
9
+ [key: string]: unknown;
10
+ }
11
+ export type WorkspaceSingleResponse = EntitySingleResponse<"workspace", Workspace>;
12
+ export type WorkspaceListResponse = EntityListResponse<"workspaces", Workspace>;
13
+ //# sourceMappingURL=workspace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/types/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE9E,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAEnF,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { EveryskIcon } from "../components/ui/EveryskIcon/index.js";
2
+ export { Footer } from "../components/ui/Footer/index.js";
3
+ export { GlobalLoading } from "../components/ui/GlobalLoading/index.js";
4
+ export { PageContainer } from "../components/ui/PageContainer/index.js";
5
+ export { Toolbar } from "../components/ui/Toolbar/index.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,10 @@
1
+ export * from "../api/workflow.js";
2
+ export * from "../types/workflow.d.ts";
3
+ export * from "../hooks/workflow/useFetchWorkerExecution.js";
4
+ export * from "../hooks/workflow/useFetchWorkerExecutions.js";
5
+ export * from "../hooks/workflow/useFetchWorkflow.js";
6
+ export * from "../hooks/workflow/useFetchWorkflowExecution.js";
7
+ export * from "../hooks/workflow/useFetchWorkflowExecutions.js";
8
+ export * from "../hooks/workflow/useFetchWorkflows.js";
9
+ export * from "../hooks/workflow/useRunWorkflow.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":"AAQA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "../api/workspace.js";
2
+ export * from "../types/workspace.d.ts";
3
+ export * from "../hooks/workspace/useFetchWorkspace.js";
4
+ export * from "../hooks/workspace/useFetchWorkspaces.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":"AAQA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,148 @@
1
+ {
2
+ "name": "@everysk/apps-sdk",
3
+ "version": "0.1.0-beta.0",
4
+ "description": "Shared runtime for Everysk client applications: EveryskApp, the contexts, entity slices, UI components and the MUI theme.",
5
+ "keywords": [
6
+ "everysk",
7
+ "react",
8
+ "mui",
9
+ "tanstack-query",
10
+ "sdk"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/everysk/apps-sdk.git",
15
+ "directory": "packages/apps-sdk"
16
+ },
17
+ "homepage": "https://github.com/everysk/apps-sdk/tree/main/packages/apps-sdk#readme",
18
+ "bugs": {
19
+ "url": "https://github.com/everysk/apps-sdk/issues"
20
+ },
21
+ "license": "MIT",
22
+ "type": "module",
23
+ "sideEffects": [
24
+ "./dist/test/setup.js"
25
+ ],
26
+ "files": [
27
+ "dist",
28
+ "src",
29
+ "!src/**/*.test.ts",
30
+ "!src/**/*.test.tsx"
31
+ ],
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.js"
36
+ },
37
+ "./ag-grid": {
38
+ "types": "./dist/agGrid/index.d.ts",
39
+ "import": "./dist/agGrid/index.js"
40
+ },
41
+ "./socket": {
42
+ "types": "./dist/socket/index.d.ts",
43
+ "import": "./dist/socket/index.js"
44
+ },
45
+ "./test": {
46
+ "types": "./dist/test/index.d.ts",
47
+ "import": "./dist/test/index.js"
48
+ },
49
+ "./test/mocks": {
50
+ "types": "./dist/test/mocks/index.d.ts",
51
+ "import": "./dist/test/mocks/index.js"
52
+ },
53
+ "./test/setup": {
54
+ "types": "./dist/test/setup.d.ts",
55
+ "import": "./dist/test/setup.js"
56
+ },
57
+ "./package.json": "./package.json"
58
+ },
59
+ "scripts": {
60
+ "build": "vite build && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
61
+ "lint": "eslint .",
62
+ "test": "vitest run",
63
+ "test:watch": "vitest",
64
+ "test:coverage": "vitest run --coverage"
65
+ },
66
+ "peerDependencies": {
67
+ "@emotion/react": "^11.14.0",
68
+ "@emotion/styled": "^11.14.1",
69
+ "@mui/material": "^9.0.1",
70
+ "@mui/x-date-pickers": "^9.3.0",
71
+ "@tanstack/react-query": "^5.101.0",
72
+ "@testing-library/jest-dom": "^6.9.1",
73
+ "@testing-library/react": "^16.3.2",
74
+ "@testing-library/user-event": "^14.6.1",
75
+ "ag-grid-community": "^35.3.1",
76
+ "ag-grid-enterprise": "^35.3.1",
77
+ "axios": "^1.17.0",
78
+ "react": "^19.2.7",
79
+ "react-dom": "^19.2.7",
80
+ "socket.io-client": "^4.8.3",
81
+ "vitest": "^4.1.8"
82
+ },
83
+ "peerDependenciesMeta": {
84
+ "@testing-library/jest-dom": {
85
+ "optional": true
86
+ },
87
+ "@testing-library/react": {
88
+ "optional": true
89
+ },
90
+ "@testing-library/user-event": {
91
+ "optional": true
92
+ },
93
+ "ag-grid-community": {
94
+ "optional": true
95
+ },
96
+ "ag-grid-enterprise": {
97
+ "optional": true
98
+ },
99
+ "socket.io-client": {
100
+ "optional": true
101
+ },
102
+ "vitest": {
103
+ "optional": true
104
+ }
105
+ },
106
+ "devDependencies": {
107
+ "@emotion/react": "^11.14.0",
108
+ "@emotion/styled": "^11.14.1",
109
+ "@eslint/js": "^9.39.4",
110
+ "@mui/material": "^9.0.1",
111
+ "@mui/x-date-pickers": "^9.3.0",
112
+ "@tanstack/react-query": "^5.101.0",
113
+ "@testing-library/dom": "^10.4.1",
114
+ "@testing-library/jest-dom": "^6.9.1",
115
+ "@testing-library/react": "^16.3.2",
116
+ "@testing-library/user-event": "^14.6.1",
117
+ "@types/node": "^25.9.1",
118
+ "@types/react": "^19.2.16",
119
+ "@types/react-dom": "^19.2.3",
120
+ "@vitejs/plugin-react": "^6.0.2",
121
+ "@vitest/coverage-v8": "^4.1.8",
122
+ "ag-grid-community": "^35.3.1",
123
+ "ag-grid-enterprise": "^35.3.1",
124
+ "axios": "^1.17.0",
125
+ "eslint": "^9.39.4",
126
+ "eslint-plugin-react-hooks": "^7.1.1",
127
+ "globals": "^17.6.0",
128
+ "jsdom": "^29.1.1",
129
+ "react": "^19.2.7",
130
+ "react-dom": "^19.2.7",
131
+ "socket.io-client": "^4.8.3",
132
+ "tsc-alias": "^1.8.16",
133
+ "typescript": "^6.0.3",
134
+ "typescript-eslint": "^8.60.1",
135
+ "vite": "^8.0.16",
136
+ "vitest": "^4.1.8"
137
+ },
138
+ "publishConfig": {
139
+ "access": "public"
140
+ },
141
+ "dependencies": {
142
+ "clsx": "^2.1.1"
143
+ },
144
+ "engines": {
145
+ "node": ">=22",
146
+ "npm": ">=12"
147
+ }
148
+ }
@@ -0,0 +1,108 @@
1
+ import { useMemo, type ComponentType, type PropsWithChildren, type ReactNode } from "react";
2
+
3
+ import { QueryClientProvider, type QueryClient } from "@tanstack/react-query";
4
+
5
+ import { ThemeProvider } from "@/theme/ThemeProvider";
6
+ import { AppConfigProvider } from "@/contexts/appConfigContext/provider";
7
+ import { AppAlertProvider } from "@/contexts/appAlertContext/provider";
8
+ import { createQueryClient } from "@/lib/queryClient";
9
+ import type { AnyRecord } from "@/types/anyRecord";
10
+ import type { Theme } from "@mui/material/styles";
11
+
12
+ /** A provider is any component that renders its children. */
13
+ export type ProviderComponent = ComponentType<PropsWithChildren>;
14
+
15
+ export type EveryskAppProps = PropsWithChildren<{
16
+ /**
17
+ * The client every `useQuery` in the tree talks to. Defaults to a fresh
18
+ * `createQueryClient()` created once per mount. Pass one to seed the cache, to share it
19
+ * with code outside the tree, or to assert on it from a test.
20
+ */
21
+ queryClient?: QueryClient;
22
+ /** Overrides `window.APP_ID`. */
23
+ appId?: string | null;
24
+ /**
25
+ * The MUI theme. Omitted, the app gets the Everysk dark theme — see `ThemeProvider`.
26
+ */
27
+ theme?: Theme;
28
+ /** Overrides `window.APP_CONFIG` wholesale. */
29
+ appEnvironmentVar?: AnyRecord;
30
+ /**
31
+ * Optional providers, applied innermost — inside every core provider and directly around
32
+ * `children`, in array order, so the first entry is outermost of the group.
33
+ *
34
+ * They go innermost rather than into named slots because that is the only position from
35
+ * which a provider can read every core context (theme, app config, query client, alerts).
36
+ * `modules.json` kept an explicit `providerOrder` only because the app owned the tree and
37
+ * each module had to be hand-wired into the right slot; owning the tree here is what
38
+ * retires that contract.
39
+ */
40
+ providers?: ProviderComponent[];
41
+ }>;
42
+
43
+ /**
44
+ * EveryskApp
45
+ *
46
+ * The provider tree every Everysk app mounts, composed in one fixed order:
47
+ *
48
+ * ```
49
+ * ThemeProvider
50
+ * AppConfigProvider
51
+ * QueryClientProvider
52
+ * AppAlertProvider
53
+ * …providers
54
+ * children
55
+ * ```
56
+ *
57
+ * The order is not arbitrary. `AppAlertProvider` renders MUI's `Snackbar`, so it must sit
58
+ * inside `ThemeProvider`; and `QueryClientProvider` sits inside `AppConfigProvider` because
59
+ * entity hooks build their Axios instance from `useAppConfig()`.
60
+ *
61
+ * `BroadcastChannelProvider` used to sit between theme and app configuration. It is gone: the
62
+ * optional socket layer supersedes it for cross-tab and server-push messaging (as
63
+ * `modules.json` already stated), and the one production path that still used it — app
64
+ * configuration arriving over the channel — was replaced by `window.APP_CONFIG`.
65
+ *
66
+ * `src/test/renderWithProviders` renders through this same component, so a test and the real
67
+ * app can never see different trees.
68
+ *
69
+ * @example
70
+ * ```tsx
71
+ * // src/App.tsx — the entire file
72
+ * export function App() {
73
+ * return (
74
+ * <EveryskApp>
75
+ * <Routes />
76
+ * </EveryskApp>
77
+ * );
78
+ * }
79
+ * ```
80
+ */
81
+ export const EveryskApp = ({
82
+ children,
83
+ queryClient,
84
+ theme,
85
+ appId,
86
+ appEnvironmentVar,
87
+ providers,
88
+ }: EveryskAppProps) => {
89
+ // Only used when the caller passes no client. Created once per mount so a re-render
90
+ // never swaps the cache out from under the tree.
91
+ const fallbackQueryClient = useMemo(() => createQueryClient(), []);
92
+ const client = queryClient ?? fallbackQueryClient;
93
+
94
+ const wrapped = (providers ?? []).reduceRight<ReactNode>(
95
+ (inner, Provider) => <Provider>{inner}</Provider>,
96
+ children,
97
+ );
98
+
99
+ return (
100
+ <ThemeProvider theme={theme}>
101
+ <AppConfigProvider appId={appId} appEnvironmentVar={appEnvironmentVar}>
102
+ <QueryClientProvider client={client}>
103
+ <AppAlertProvider>{wrapped}</AppAlertProvider>
104
+ </QueryClientProvider>
105
+ </AppConfigProvider>
106
+ </ThemeProvider>
107
+ );
108
+ };
@@ -0,0 +1,113 @@
1
+ import {
2
+ colorSchemeDark,
3
+ colorSchemeLight,
4
+ themeAlpine,
5
+ type Theme as AgGridTheme,
6
+ } from "ag-grid-community";
7
+ import { useTheme, type Theme as MuiTheme } from "@mui/material/styles";
8
+
9
+ /**
10
+ * The grid parameters derived from the MUI palette.
11
+ *
12
+ * Exported on its own so the mapping is testable and so an app can spread it into a theme of
13
+ * its own (`themeQuartz.withParams({ ...agGridThemeParams(theme), rowHeight: 48 })`).
14
+ *
15
+ * Every value comes from the theme — there is no colour here. That is the whole point: the
16
+ * grid and the surrounding MUI components read the same palette, so a change to the brand
17
+ * theme moves both.
18
+ */
19
+ export const agGridThemeParams = (theme: MuiTheme) => ({
20
+ // Surfaces. `chromeBackgroundColor` covers the grid's own chrome (tool panels, status bar).
21
+ backgroundColor: theme.palette.background.default,
22
+ chromeBackgroundColor: theme.palette.background.default,
23
+ oddRowBackgroundColor: theme.palette.background.paper,
24
+ headerBackgroundColor: theme.palette.background.paper,
25
+ menuBackgroundColor: theme.palette.background.paper,
26
+ panelBackgroundColor: theme.palette.background.paper,
27
+
28
+ // Text and icons.
29
+ foregroundColor: theme.palette.text.primary,
30
+ headerTextColor: theme.palette.text.primary,
31
+ menuTextColor: theme.palette.text.primary,
32
+ subtleTextColor: theme.palette.text.secondary,
33
+ iconColor: theme.palette.text.secondary,
34
+
35
+ // Accent and lines. `accentColor` is what AG Grid paints selection, focus rings, sort
36
+ // indicators and range borders with — the same role `primary.main` has in MUI.
37
+ accentColor: theme.palette.primary.main,
38
+ borderColor: theme.palette.divider,
39
+ rowHoverColor: theme.palette.action.hover,
40
+ selectedRowBackgroundColor: theme.palette.action.selected,
41
+
42
+ // Typography. `body2` is the size every table in the design standard uses, and 600 is the
43
+ // header weight the MUI tables carry.
44
+ fontFamily: theme.typography.fontFamily,
45
+ fontSize: theme.typography.body2.fontSize,
46
+ headerFontFamily: theme.typography.fontFamily,
47
+ headerFontSize: theme.typography.body2.fontSize,
48
+ headerFontWeight: 600,
49
+
50
+ // Shape, from the single `shape.borderRadius` every surface in the theme uses.
51
+ borderRadius: theme.shape.borderRadius,
52
+ wrapperBorderRadius: theme.shape.borderRadius,
53
+
54
+ // Tells the browser which scrollbars and form controls to render inside the grid.
55
+ browserColorScheme: theme.palette.mode,
56
+ });
57
+
58
+ // One grid theme per MUI theme. AG Grid re-applies the theme whenever the object identity
59
+ // changes, so returning a fresh one on every render would restyle the grid on every render.
60
+ // Keyed on the MUI theme, which is itself a stable module-level object.
61
+ const cache = new WeakMap<MuiTheme, AgGridTheme>();
62
+
63
+ /**
64
+ * getAgGridTheme
65
+ *
66
+ * The AG Grid theme that matches a MUI theme, built with AG Grid's Theming API:
67
+ *
68
+ * ```tsx
69
+ * <AgGridReact theme={getAgGridTheme(muiTheme)} rowData={rows} columnDefs={columns} />
70
+ * ```
71
+ *
72
+ * This replaces the CSS-variable block the template carried as `agGridStyles`, removed rather
73
+ * than deprecated because it never worked on the version the apps run. That block targeted `.ag-theme-alpine-dark.ag-custom-app-theme`, a legacy CSS theme which AG Grid v33+
74
+ * only honours when the grid opts in with `theme="legacy"` and the app imports the grid's CSS
75
+ * files — so on the version the apps actually run (v35) it styled nothing, and the grid fell
76
+ * back to the stock Quartz look. The Theming API needs no CSS import, no class on the wrapper
77
+ * and no `legacy` opt-in.
78
+ *
79
+ * Alpine is the base part because it is the look the apps already had; everything the brand
80
+ * cares about is overridden by {@link agGridThemeParams} anyway. The colour scheme follows
81
+ * `palette.mode`, so the light theme is covered by the same call — which the CSS block never
82
+ * was.
83
+ *
84
+ * @param theme - The MUI theme to derive from, typically from `useTheme()`.
85
+ */
86
+ export const getAgGridTheme = (theme: MuiTheme): AgGridTheme => {
87
+ const cached = cache.get(theme);
88
+ if (cached) return cached;
89
+
90
+ const agGridTheme = themeAlpine
91
+ .withPart(theme.palette.mode === "dark" ? colorSchemeDark : colorSchemeLight)
92
+ .withParams(agGridThemeParams(theme));
93
+
94
+ cache.set(theme, agGridTheme);
95
+
96
+ return agGridTheme;
97
+ };
98
+
99
+ /**
100
+ * useAgGridTheme
101
+ *
102
+ * `getAgGridTheme` for the theme currently mounted — the form a component wants:
103
+ *
104
+ * ```tsx
105
+ * const gridTheme = useAgGridTheme();
106
+ *
107
+ * return <AgGridReact theme={gridTheme} rowData={rows} columnDefs={columns} />;
108
+ * ```
109
+ *
110
+ * Safe to call on every render: the result is cached per MUI theme, so the grid sees the same
111
+ * object each time.
112
+ */
113
+ export const useAgGridTheme = (): AgGridTheme => getAgGridTheme(useTheme());