@darajs/core 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (464) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +101 -0
  3. package/dist/actions/download-variable.d.ts +8 -0
  4. package/dist/actions/download-variable.d.ts.map +1 -0
  5. package/dist/actions/download-variable.js +140 -0
  6. package/dist/actions/download-variable.js.map +1 -0
  7. package/dist/actions/index.d.ts +7 -0
  8. package/dist/actions/index.d.ts.map +1 -0
  9. package/dist/actions/index.js +7 -0
  10. package/dist/actions/index.js.map +1 -0
  11. package/dist/actions/navigate-to.d.ts +8 -0
  12. package/dist/actions/navigate-to.d.ts.map +1 -0
  13. package/dist/actions/navigate-to.js +37 -0
  14. package/dist/actions/navigate-to.js.map +1 -0
  15. package/dist/actions/notify.d.ts +4 -0
  16. package/dist/actions/notify.d.ts.map +1 -0
  17. package/dist/actions/notify.js +11 -0
  18. package/dist/actions/notify.js.map +1 -0
  19. package/dist/actions/reset-variables.d.ts +8 -0
  20. package/dist/actions/reset-variables.d.ts.map +1 -0
  21. package/dist/actions/reset-variables.js +37 -0
  22. package/dist/actions/reset-variables.js.map +1 -0
  23. package/dist/actions/trigger-variable.d.ts +8 -0
  24. package/dist/actions/trigger-variable.d.ts.map +1 -0
  25. package/dist/actions/trigger-variable.js +14 -0
  26. package/dist/actions/trigger-variable.js.map +1 -0
  27. package/dist/actions/update-variable.d.ts +15 -0
  28. package/dist/actions/update-variable.d.ts.map +1 -0
  29. package/dist/actions/update-variable.js +56 -0
  30. package/dist/actions/update-variable.js.map +1 -0
  31. package/dist/api/core.d.ts +35 -0
  32. package/dist/api/core.d.ts.map +1 -0
  33. package/dist/api/core.js +112 -0
  34. package/dist/api/core.js.map +1 -0
  35. package/dist/api/http.d.ts +29 -0
  36. package/dist/api/http.d.ts.map +1 -0
  37. package/dist/api/http.js +126 -0
  38. package/dist/api/http.js.map +1 -0
  39. package/dist/api/index.d.ts +5 -0
  40. package/dist/api/index.d.ts.map +1 -0
  41. package/dist/api/index.js +5 -0
  42. package/dist/api/index.js.map +1 -0
  43. package/dist/api/websocket.d.ts +222 -0
  44. package/dist/api/websocket.d.ts.map +1 -0
  45. package/dist/api/websocket.js +353 -0
  46. package/dist/api/websocket.js.map +1 -0
  47. package/dist/assets/causalens-dark.svg +29 -0
  48. package/dist/assets/causalens-light.svg +29 -0
  49. package/dist/assets/dara-dark.svg +20 -0
  50. package/dist/assets/dara-light.svg +15 -0
  51. package/dist/assets/fonts/Manrope-VariableFont_wght.ttf +0 -0
  52. package/dist/auth/auth-wrapper.d.ts +15 -0
  53. package/dist/auth/auth-wrapper.d.ts.map +1 -0
  54. package/dist/auth/auth-wrapper.js +72 -0
  55. package/dist/auth/auth-wrapper.js.map +1 -0
  56. package/dist/auth/auth.d.ts +61 -0
  57. package/dist/auth/auth.d.ts.map +1 -0
  58. package/dist/auth/auth.js +163 -0
  59. package/dist/auth/auth.js.map +1 -0
  60. package/dist/auth/basic/basic-auth-login.d.ts +6 -0
  61. package/dist/auth/basic/basic-auth-login.d.ts.map +1 -0
  62. package/dist/auth/basic/basic-auth-login.js +171 -0
  63. package/dist/auth/basic/basic-auth-login.js.map +1 -0
  64. package/dist/auth/basic/basic-auth-logout.d.ts +6 -0
  65. package/dist/auth/basic/basic-auth-logout.d.ts.map +1 -0
  66. package/dist/auth/basic/basic-auth-logout.js +18 -0
  67. package/dist/auth/basic/basic-auth-logout.js.map +1 -0
  68. package/dist/auth/default/default-auth-login.d.ts +6 -0
  69. package/dist/auth/default/default-auth-login.d.ts.map +1 -0
  70. package/dist/auth/default/default-auth-login.js +59 -0
  71. package/dist/auth/default/default-auth-login.js.map +1 -0
  72. package/dist/auth/index.d.ts +7 -0
  73. package/dist/auth/index.d.ts.map +1 -0
  74. package/dist/auth/index.js +7 -0
  75. package/dist/auth/index.js.map +1 -0
  76. package/dist/auth/use-session-token.d.ts +19 -0
  77. package/dist/auth/use-session-token.d.ts.map +1 -0
  78. package/dist/auth/use-session-token.js +30 -0
  79. package/dist/auth/use-session-token.js.map +1 -0
  80. package/dist/components/fallback/default.d.ts +5 -0
  81. package/dist/components/fallback/default.d.ts.map +1 -0
  82. package/dist/components/fallback/default.js +10 -0
  83. package/dist/components/fallback/default.js.map +1 -0
  84. package/dist/components/fallback/dots.d.ts +7 -0
  85. package/dist/components/fallback/dots.d.ts.map +1 -0
  86. package/dist/components/fallback/dots.js +78 -0
  87. package/dist/components/fallback/dots.js.map +1 -0
  88. package/dist/components/fallback/row.d.ts +5 -0
  89. package/dist/components/fallback/row.d.ts.map +1 -0
  90. package/dist/components/fallback/row.js +14 -0
  91. package/dist/components/fallback/row.js.map +1 -0
  92. package/dist/components/for/for.d.ts +35 -0
  93. package/dist/components/for/for.d.ts.map +1 -0
  94. package/dist/components/for/for.js +44 -0
  95. package/dist/components/for/for.js.map +1 -0
  96. package/dist/components/index.d.ts +9 -0
  97. package/dist/components/index.d.ts.map +1 -0
  98. package/dist/components/index.js +9 -0
  99. package/dist/components/index.js.map +1 -0
  100. package/dist/components/menu/menu.d.ts +14 -0
  101. package/dist/components/menu/menu.d.ts.map +1 -0
  102. package/dist/components/menu/menu.js +58 -0
  103. package/dist/components/menu/menu.js.map +1 -0
  104. package/dist/components/progress-tracker/progress-tracker.d.ts +18 -0
  105. package/dist/components/progress-tracker/progress-tracker.d.ts.map +1 -0
  106. package/dist/components/progress-tracker/progress-tracker.js +204 -0
  107. package/dist/components/progress-tracker/progress-tracker.js.map +1 -0
  108. package/dist/components/router-content/router-content.d.ts +14 -0
  109. package/dist/components/router-content/router-content.d.ts.map +1 -0
  110. package/dist/components/router-content/router-content.js +17 -0
  111. package/dist/components/router-content/router-content.js.map +1 -0
  112. package/dist/components/side-bar-frame/side-bar-frame.d.ts +21 -0
  113. package/dist/components/side-bar-frame/side-bar-frame.d.ts.map +1 -0
  114. package/dist/components/side-bar-frame/side-bar-frame.js +87 -0
  115. package/dist/components/side-bar-frame/side-bar-frame.js.map +1 -0
  116. package/dist/components/top-bar-frame/top-bar-frame.d.ts +16 -0
  117. package/dist/components/top-bar-frame/top-bar-frame.d.ts.map +1 -0
  118. package/dist/components/top-bar-frame/top-bar-frame.js +89 -0
  119. package/dist/components/top-bar-frame/top-bar-frame.js.map +1 -0
  120. package/dist/dara_core-0.4.8-py3-none-any.whl +0 -0
  121. package/dist/devtools/backend-errors/backend-errors-ctx.d.ts +17 -0
  122. package/dist/devtools/backend-errors/backend-errors-ctx.d.ts.map +1 -0
  123. package/dist/devtools/backend-errors/backend-errors-ctx.js +37 -0
  124. package/dist/devtools/backend-errors/backend-errors-ctx.js.map +1 -0
  125. package/dist/devtools/backend-errors/backend-errors.d.ts +6 -0
  126. package/dist/devtools/backend-errors/backend-errors.d.ts.map +1 -0
  127. package/dist/devtools/backend-errors/backend-errors.js +57 -0
  128. package/dist/devtools/backend-errors/backend-errors.js.map +1 -0
  129. package/dist/devtools/backend-errors/error-display.d.ts +22 -0
  130. package/dist/devtools/backend-errors/error-display.d.ts.map +1 -0
  131. package/dist/devtools/backend-errors/error-display.js +101 -0
  132. package/dist/devtools/backend-errors/error-display.js.map +1 -0
  133. package/dist/devtools/backend-errors/index.d.ts +3 -0
  134. package/dist/devtools/backend-errors/index.d.ts.map +1 -0
  135. package/dist/devtools/backend-errors/index.js +3 -0
  136. package/dist/devtools/backend-errors/index.js.map +1 -0
  137. package/dist/devtools/devtools-content.d.ts +12 -0
  138. package/dist/devtools/devtools-content.d.ts.map +1 -0
  139. package/dist/devtools/devtools-content.js +73 -0
  140. package/dist/devtools/devtools-content.js.map +1 -0
  141. package/dist/devtools/devtools-context.d.ts +7 -0
  142. package/dist/devtools/devtools-context.d.ts.map +1 -0
  143. package/dist/devtools/devtools-context.js +9 -0
  144. package/dist/devtools/devtools-context.js.map +1 -0
  145. package/dist/devtools/devtools-wrapper.d.ts +8 -0
  146. package/dist/devtools/devtools-wrapper.d.ts.map +1 -0
  147. package/dist/devtools/devtools-wrapper.js +64 -0
  148. package/dist/devtools/devtools-wrapper.js.map +1 -0
  149. package/dist/devtools/devtools.d.ts +5 -0
  150. package/dist/devtools/devtools.d.ts.map +1 -0
  151. package/dist/devtools/devtools.js +10 -0
  152. package/dist/devtools/devtools.js.map +1 -0
  153. package/dist/devtools/floating-button.d.ts +23 -0
  154. package/dist/devtools/floating-button.d.ts.map +1 -0
  155. package/dist/devtools/floating-button.js +94 -0
  156. package/dist/devtools/floating-button.js.map +1 -0
  157. package/dist/devtools/index.d.ts +2 -0
  158. package/dist/devtools/index.d.ts.map +1 -0
  159. package/dist/devtools/index.js +2 -0
  160. package/dist/devtools/index.js.map +1 -0
  161. package/dist/devtools/resizer.d.ts +18 -0
  162. package/dist/devtools/resizer.d.ts.map +1 -0
  163. package/dist/devtools/resizer.js +49 -0
  164. package/dist/devtools/resizer.js.map +1 -0
  165. package/dist/devtools/use-move.d.ts +21 -0
  166. package/dist/devtools/use-move.d.ts.map +1 -0
  167. package/dist/devtools/use-move.js +56 -0
  168. package/dist/devtools/use-move.js.map +1 -0
  169. package/dist/index.css +95 -0
  170. package/dist/index.d.ts +17 -0
  171. package/dist/index.d.ts.map +1 -0
  172. package/dist/index.js +14 -0
  173. package/dist/index.js.map +1 -0
  174. package/dist/jest-setup.d.ts +2 -0
  175. package/dist/jest-setup.d.ts.map +1 -0
  176. package/dist/jest-setup.js +18 -0
  177. package/dist/jest-setup.js.map +1 -0
  178. package/dist/pages/error-page.d.ts +3 -0
  179. package/dist/pages/error-page.d.ts.map +1 -0
  180. package/dist/pages/error-page.js +32 -0
  181. package/dist/pages/error-page.js.map +1 -0
  182. package/dist/pages/sso-callback-page.d.ts +6 -0
  183. package/dist/pages/sso-callback-page.d.ts.map +1 -0
  184. package/dist/pages/sso-callback-page.js +8 -0
  185. package/dist/pages/sso-callback-page.js.map +1 -0
  186. package/dist/run.d.ts +22 -0
  187. package/dist/run.d.ts.map +1 -0
  188. package/dist/run.js +40 -0
  189. package/dist/run.js.map +1 -0
  190. package/dist/shared/center/center.d.ts +5 -0
  191. package/dist/shared/center/center.d.ts.map +1 -0
  192. package/dist/shared/center/center.js +15 -0
  193. package/dist/shared/center/center.js.map +1 -0
  194. package/dist/shared/context/direction-context.d.ts +6 -0
  195. package/dist/shared/context/direction-context.d.ts.map +1 -0
  196. package/dist/shared/context/direction-context.js +4 -0
  197. package/dist/shared/context/direction-context.js.map +1 -0
  198. package/dist/shared/context/display-context.d.ts +13 -0
  199. package/dist/shared/context/display-context.d.ts.map +1 -0
  200. package/dist/shared/context/display-context.js +4 -0
  201. package/dist/shared/context/display-context.js.map +1 -0
  202. package/dist/shared/context/fallback-context.d.ts +11 -0
  203. package/dist/shared/context/fallback-context.d.ts.map +1 -0
  204. package/dist/shared/context/fallback-context.js +4 -0
  205. package/dist/shared/context/fallback-context.js.map +1 -0
  206. package/dist/shared/context/global-task-context.d.ts +40 -0
  207. package/dist/shared/context/global-task-context.d.ts.map +1 -0
  208. package/dist/shared/context/global-task-context.js +81 -0
  209. package/dist/shared/context/global-task-context.js.map +1 -0
  210. package/dist/shared/context/importers-context.d.ts +6 -0
  211. package/dist/shared/context/importers-context.d.ts.map +1 -0
  212. package/dist/shared/context/importers-context.js +4 -0
  213. package/dist/shared/context/importers-context.js.map +1 -0
  214. package/dist/shared/context/index.d.ts +10 -0
  215. package/dist/shared/context/index.d.ts.map +1 -0
  216. package/dist/shared/context/index.js +10 -0
  217. package/dist/shared/context/index.js.map +1 -0
  218. package/dist/shared/context/registries-context.d.ts +20 -0
  219. package/dist/shared/context/registries-context.d.ts.map +1 -0
  220. package/dist/shared/context/registries-context.js +8 -0
  221. package/dist/shared/context/registries-context.js.map +1 -0
  222. package/dist/shared/context/request-extras-context.d.ts +33 -0
  223. package/dist/shared/context/request-extras-context.d.ts.map +1 -0
  224. package/dist/shared/context/request-extras-context.js +55 -0
  225. package/dist/shared/context/request-extras-context.js.map +1 -0
  226. package/dist/shared/context/variable-context.d.ts +10 -0
  227. package/dist/shared/context/variable-context.d.ts.map +1 -0
  228. package/dist/shared/context/variable-context.js +4 -0
  229. package/dist/shared/context/variable-context.js.map +1 -0
  230. package/dist/shared/context/websocket-context.d.ts +7 -0
  231. package/dist/shared/context/websocket-context.d.ts.map +1 -0
  232. package/dist/shared/context/websocket-context.js +4 -0
  233. package/dist/shared/context/websocket-context.js.map +1 -0
  234. package/dist/shared/dynamic-component/clean-props.d.ts +6 -0
  235. package/dist/shared/dynamic-component/clean-props.d.ts.map +1 -0
  236. package/dist/shared/dynamic-component/clean-props.js +13 -0
  237. package/dist/shared/dynamic-component/clean-props.js.map +1 -0
  238. package/dist/shared/dynamic-component/dynamic-component.d.ts +16 -0
  239. package/dist/shared/dynamic-component/dynamic-component.d.ts.map +1 -0
  240. package/dist/shared/dynamic-component/dynamic-component.js +252 -0
  241. package/dist/shared/dynamic-component/dynamic-component.js.map +1 -0
  242. package/dist/shared/error-handling/error-display.d.ts +8 -0
  243. package/dist/shared/error-handling/error-display.d.ts.map +1 -0
  244. package/dist/shared/error-handling/error-display.js +94 -0
  245. package/dist/shared/error-handling/error-display.js.map +1 -0
  246. package/dist/shared/error-handling/index.d.ts +3 -0
  247. package/dist/shared/error-handling/index.d.ts.map +1 -0
  248. package/dist/shared/error-handling/index.js +3 -0
  249. package/dist/shared/error-handling/index.js.map +1 -0
  250. package/dist/shared/error-handling/types.d.ts +11 -0
  251. package/dist/shared/error-handling/types.d.ts.map +1 -0
  252. package/dist/shared/error-handling/types.js +9 -0
  253. package/dist/shared/error-handling/types.js.map +1 -0
  254. package/dist/shared/event-bus/event-bus.d.ts +27 -0
  255. package/dist/shared/event-bus/event-bus.d.ts.map +1 -0
  256. package/dist/shared/event-bus/event-bus.js +58 -0
  257. package/dist/shared/event-bus/event-bus.js.map +1 -0
  258. package/dist/shared/global-state-store.d.ts +54 -0
  259. package/dist/shared/global-state-store.d.ts.map +1 -0
  260. package/dist/shared/global-state-store.js +168 -0
  261. package/dist/shared/global-state-store.js.map +1 -0
  262. package/dist/shared/index.d.ts +12 -0
  263. package/dist/shared/index.d.ts.map +1 -0
  264. package/dist/shared/index.js +10 -0
  265. package/dist/shared/index.js.map +1 -0
  266. package/dist/shared/interactivity/data-variable.d.ts +78 -0
  267. package/dist/shared/interactivity/data-variable.d.ts.map +1 -0
  268. package/dist/shared/interactivity/data-variable.js +218 -0
  269. package/dist/shared/interactivity/data-variable.js.map +1 -0
  270. package/dist/shared/interactivity/derived-variable.d.ts +160 -0
  271. package/dist/shared/interactivity/derived-variable.d.ts.map +1 -0
  272. package/dist/shared/interactivity/derived-variable.js +446 -0
  273. package/dist/shared/interactivity/derived-variable.js.map +1 -0
  274. package/dist/shared/interactivity/filtering.d.ts +9 -0
  275. package/dist/shared/interactivity/filtering.d.ts.map +1 -0
  276. package/dist/shared/interactivity/filtering.js +20 -0
  277. package/dist/shared/interactivity/filtering.js.map +1 -0
  278. package/dist/shared/interactivity/index.d.ts +10 -0
  279. package/dist/shared/interactivity/index.d.ts.map +1 -0
  280. package/dist/shared/interactivity/index.js +9 -0
  281. package/dist/shared/interactivity/index.js.map +1 -0
  282. package/dist/shared/interactivity/internal.d.ts +9 -0
  283. package/dist/shared/interactivity/internal.d.ts.map +1 -0
  284. package/dist/shared/interactivity/internal.js +11 -0
  285. package/dist/shared/interactivity/internal.js.map +1 -0
  286. package/dist/shared/interactivity/nested.d.ts +16 -0
  287. package/dist/shared/interactivity/nested.d.ts.map +1 -0
  288. package/dist/shared/interactivity/nested.js +54 -0
  289. package/dist/shared/interactivity/nested.js.map +1 -0
  290. package/dist/shared/interactivity/persistence.d.ts +43 -0
  291. package/dist/shared/interactivity/persistence.d.ts.map +1 -0
  292. package/dist/shared/interactivity/persistence.js +215 -0
  293. package/dist/shared/interactivity/persistence.js.map +1 -0
  294. package/dist/shared/interactivity/plain-variable.d.ts +17 -0
  295. package/dist/shared/interactivity/plain-variable.d.ts.map +1 -0
  296. package/dist/shared/interactivity/plain-variable.js +222 -0
  297. package/dist/shared/interactivity/plain-variable.js.map +1 -0
  298. package/dist/shared/interactivity/resolve-value.d.ts +13 -0
  299. package/dist/shared/interactivity/resolve-value.d.ts.map +1 -0
  300. package/dist/shared/interactivity/resolve-value.js +36 -0
  301. package/dist/shared/interactivity/resolve-value.js.map +1 -0
  302. package/dist/shared/interactivity/resolve-variable.d.ts +18 -0
  303. package/dist/shared/interactivity/resolve-variable.d.ts.map +1 -0
  304. package/dist/shared/interactivity/resolve-variable.js +46 -0
  305. package/dist/shared/interactivity/resolve-variable.js.map +1 -0
  306. package/dist/shared/interactivity/store.d.ts +76 -0
  307. package/dist/shared/interactivity/store.d.ts.map +1 -0
  308. package/dist/shared/interactivity/store.js +99 -0
  309. package/dist/shared/interactivity/store.js.map +1 -0
  310. package/dist/shared/interactivity/triggers.d.ts +31 -0
  311. package/dist/shared/interactivity/triggers.d.ts.map +1 -0
  312. package/dist/shared/interactivity/triggers.js +105 -0
  313. package/dist/shared/interactivity/triggers.js.map +1 -0
  314. package/dist/shared/interactivity/url-variable.d.ts +12 -0
  315. package/dist/shared/interactivity/url-variable.d.ts.map +1 -0
  316. package/dist/shared/interactivity/url-variable.js +27 -0
  317. package/dist/shared/interactivity/url-variable.js.map +1 -0
  318. package/dist/shared/interactivity/use-any-variable.d.ts +8 -0
  319. package/dist/shared/interactivity/use-any-variable.d.ts.map +1 -0
  320. package/dist/shared/interactivity/use-any-variable.js +39 -0
  321. package/dist/shared/interactivity/use-any-variable.js.map +1 -0
  322. package/dist/shared/interactivity/use-data-variable.d.ts +18 -0
  323. package/dist/shared/interactivity/use-data-variable.d.ts.map +1 -0
  324. package/dist/shared/interactivity/use-data-variable.js +58 -0
  325. package/dist/shared/interactivity/use-data-variable.js.map +1 -0
  326. package/dist/shared/interactivity/use-refresh-selector.d.ts +5 -0
  327. package/dist/shared/interactivity/use-refresh-selector.d.ts.map +1 -0
  328. package/dist/shared/interactivity/use-refresh-selector.js +20 -0
  329. package/dist/shared/interactivity/use-refresh-selector.js.map +1 -0
  330. package/dist/shared/interactivity/use-server-component.d.ts +24 -0
  331. package/dist/shared/interactivity/use-server-component.d.ts.map +1 -0
  332. package/dist/shared/interactivity/use-server-component.js +256 -0
  333. package/dist/shared/interactivity/use-server-component.js.map +1 -0
  334. package/dist/shared/interactivity/use-variable-state.d.ts +9 -0
  335. package/dist/shared/interactivity/use-variable-state.d.ts.map +1 -0
  336. package/dist/shared/interactivity/use-variable-state.js +26 -0
  337. package/dist/shared/interactivity/use-variable-state.js.map +1 -0
  338. package/dist/shared/interactivity/use-variable-value.d.ts +33 -0
  339. package/dist/shared/interactivity/use-variable-value.d.ts.map +1 -0
  340. package/dist/shared/interactivity/use-variable-value.js +94 -0
  341. package/dist/shared/interactivity/use-variable-value.js.map +1 -0
  342. package/dist/shared/interactivity/use-variable.d.ts +12 -0
  343. package/dist/shared/interactivity/use-variable.d.ts.map +1 -0
  344. package/dist/shared/interactivity/use-variable.js +84 -0
  345. package/dist/shared/interactivity/use-variable.js.map +1 -0
  346. package/dist/shared/private-route/private-route.d.ts +19 -0
  347. package/dist/shared/private-route/private-route.d.ts.map +1 -0
  348. package/dist/shared/private-route/private-route.js +35 -0
  349. package/dist/shared/private-route/private-route.js.map +1 -0
  350. package/dist/shared/template-root/dynamic-context.d.ts +9 -0
  351. package/dist/shared/template-root/dynamic-context.d.ts.map +1 -0
  352. package/dist/shared/template-root/dynamic-context.js +29 -0
  353. package/dist/shared/template-root/dynamic-context.js.map +1 -0
  354. package/dist/shared/template-root/template-root.d.ts +12 -0
  355. package/dist/shared/template-root/template-root.d.ts.map +1 -0
  356. package/dist/shared/template-root/template-root.js +94 -0
  357. package/dist/shared/template-root/template-root.js.map +1 -0
  358. package/dist/shared/utils/clean-session-cache.d.ts +9 -0
  359. package/dist/shared/utils/clean-session-cache.d.ts.map +1 -0
  360. package/dist/shared/utils/clean-session-cache.js +19 -0
  361. package/dist/shared/utils/clean-session-cache.js.map +1 -0
  362. package/dist/shared/utils/embed.d.ts +22 -0
  363. package/dist/shared/utils/embed.d.ts.map +1 -0
  364. package/dist/shared/utils/embed.js +43 -0
  365. package/dist/shared/utils/embed.js.map +1 -0
  366. package/dist/shared/utils/get-icon.d.ts +9 -0
  367. package/dist/shared/utils/get-icon.d.ts.map +1 -0
  368. package/dist/shared/utils/get-icon.js +30 -0
  369. package/dist/shared/utils/get-icon.js.map +1 -0
  370. package/dist/shared/utils/hashing.d.ts +14 -0
  371. package/dist/shared/utils/hashing.d.ts.map +1 -0
  372. package/dist/shared/utils/hashing.js +26 -0
  373. package/dist/shared/utils/hashing.js.map +1 -0
  374. package/dist/shared/utils/index.d.ts +19 -0
  375. package/dist/shared/utils/index.d.ts.map +1 -0
  376. package/dist/shared/utils/index.js +17 -0
  377. package/dist/shared/utils/index.js.map +1 -0
  378. package/dist/shared/utils/inject-css.d.ts +12 -0
  379. package/dist/shared/utils/inject-css.d.ts.map +1 -0
  380. package/dist/shared/utils/inject-css.js +25 -0
  381. package/dist/shared/utils/inject-css.js.map +1 -0
  382. package/dist/shared/utils/is-js-component.d.ts +9 -0
  383. package/dist/shared/utils/is-js-component.d.ts.map +1 -0
  384. package/dist/shared/utils/is-js-component.js +11 -0
  385. package/dist/shared/utils/is-js-component.js.map +1 -0
  386. package/dist/shared/utils/normalization.d.ts +19 -0
  387. package/dist/shared/utils/normalization.d.ts.map +1 -0
  388. package/dist/shared/utils/normalization.js +121 -0
  389. package/dist/shared/utils/normalization.js.map +1 -0
  390. package/dist/shared/utils/resolve-theme.d.ts +9 -0
  391. package/dist/shared/utils/resolve-theme.d.ts.map +1 -0
  392. package/dist/shared/utils/resolve-theme.js +28 -0
  393. package/dist/shared/utils/resolve-theme.js.map +1 -0
  394. package/dist/shared/utils/templating.d.ts +24 -0
  395. package/dist/shared/utils/templating.d.ts.map +1 -0
  396. package/dist/shared/utils/templating.js +67 -0
  397. package/dist/shared/utils/templating.js.map +1 -0
  398. package/dist/shared/utils/use-action-registry.d.ts +11 -0
  399. package/dist/shared/utils/use-action-registry.d.ts.map +1 -0
  400. package/dist/shared/utils/use-action-registry.js +18 -0
  401. package/dist/shared/utils/use-action-registry.js.map +1 -0
  402. package/dist/shared/utils/use-action.d.ts +34 -0
  403. package/dist/shared/utils/use-action.d.ts.map +1 -0
  404. package/dist/shared/utils/use-action.js +314 -0
  405. package/dist/shared/utils/use-action.js.map +1 -0
  406. package/dist/shared/utils/use-component-registry.d.ts +11 -0
  407. package/dist/shared/utils/use-component-registry.d.ts.map +1 -0
  408. package/dist/shared/utils/use-component-registry.js +57 -0
  409. package/dist/shared/utils/use-component-registry.js.map +1 -0
  410. package/dist/shared/utils/use-component-styles.d.ts +24 -0
  411. package/dist/shared/utils/use-component-styles.d.ts.map +1 -0
  412. package/dist/shared/utils/use-component-styles.js +69 -0
  413. package/dist/shared/utils/use-component-styles.js.map +1 -0
  414. package/dist/shared/utils/use-defer-loadable.d.ts +8 -0
  415. package/dist/shared/utils/use-defer-loadable.d.ts.map +1 -0
  416. package/dist/shared/utils/use-defer-loadable.js +44 -0
  417. package/dist/shared/utils/use-defer-loadable.js.map +1 -0
  418. package/dist/shared/utils/use-interval.d.ts +9 -0
  419. package/dist/shared/utils/use-interval.d.ts.map +1 -0
  420. package/dist/shared/utils/use-interval.js +19 -0
  421. package/dist/shared/utils/use-interval.js.map +1 -0
  422. package/dist/shared/utils/use-previous.d.ts +10 -0
  423. package/dist/shared/utils/use-previous.d.ts.map +1 -0
  424. package/dist/shared/utils/use-previous.js +17 -0
  425. package/dist/shared/utils/use-previous.js.map +1 -0
  426. package/dist/shared/utils/use-url-sync.d.ts +20 -0
  427. package/dist/shared/utils/use-url-sync.d.ts.map +1 -0
  428. package/dist/shared/utils/use-url-sync.js +68 -0
  429. package/dist/shared/utils/use-url-sync.js.map +1 -0
  430. package/dist/shared/utils/use-window-title.d.ts +3 -0
  431. package/dist/shared/utils/use-window-title.d.ts.map +1 -0
  432. package/dist/shared/utils/use-window-title.js +14 -0
  433. package/dist/shared/utils/use-window-title.js.map +1 -0
  434. package/dist/shared/variable-state-provider/variable-state-provider.d.ts +10 -0
  435. package/dist/shared/variable-state-provider/variable-state-provider.d.ts.map +1 -0
  436. package/dist/shared/variable-state-provider/variable-state-provider.js +29 -0
  437. package/dist/shared/variable-state-provider/variable-state-provider.js.map +1 -0
  438. package/dist/shared/wrapper/wrapper.d.ts +7 -0
  439. package/dist/shared/wrapper/wrapper.d.ts.map +1 -0
  440. package/dist/shared/wrapper/wrapper.js +14 -0
  441. package/dist/shared/wrapper/wrapper.js.map +1 -0
  442. package/dist/types/auth.d.ts +15 -0
  443. package/dist/types/auth.d.ts.map +1 -0
  444. package/dist/types/auth.js +6 -0
  445. package/dist/types/auth.js.map +1 -0
  446. package/dist/types/core.d.ts +440 -0
  447. package/dist/types/core.d.ts.map +1 -0
  448. package/dist/types/core.js +22 -0
  449. package/dist/types/core.js.map +1 -0
  450. package/dist/types/index.d.ts +7 -0
  451. package/dist/types/index.d.ts.map +1 -0
  452. package/dist/types/index.js +4 -0
  453. package/dist/types/index.js.map +1 -0
  454. package/dist/types/utils.d.ts +56 -0
  455. package/dist/types/utils.d.ts.map +1 -0
  456. package/dist/types/utils.js +93 -0
  457. package/dist/types/utils.js.map +1 -0
  458. package/dist/umd/dara.core.umd.js +86508 -0
  459. package/dist/umd/style.css +848 -0
  460. package/dist/utils.d.ts +11 -0
  461. package/dist/utils.d.ts.map +1 -0
  462. package/dist/utils.js +20 -0
  463. package/dist/utils.js.map +1 -0
  464. package/package.json +121 -0
@@ -0,0 +1,6 @@
1
+ type ImportersCtx = {
2
+ [k: string]: () => Promise<any>;
3
+ };
4
+ declare const importersCtx: import("react").Context<ImportersCtx>;
5
+ export default importersCtx;
6
+ //# sourceMappingURL=importers-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"importers-context.d.ts","sourceRoot":"","sources":["../../../js/shared/context/importers-context.tsx"],"names":[],"mappings":"AAEA,KAAK,YAAY,GAAG;IAChB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;CACnC,CAAC;AAEF,QAAA,MAAM,YAAY,uCAAkC,CAAC;AAErD,eAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { createContext } from 'react';
2
+ const importersCtx = createContext({});
3
+ export default importersCtx;
4
+ //# sourceMappingURL=importers-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"importers-context.js","sourceRoot":"","sources":["../../../js/shared/context/importers-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAMtC,MAAM,YAAY,GAAG,aAAa,CAAe,EAAE,CAAC,CAAC;AAErD,eAAe,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ export { default as DirectionCtx } from './direction-context';
2
+ export { default as ImportersCtx } from './importers-context';
3
+ export { default as GlobalTaskProvider, useTaskContext } from './global-task-context';
4
+ export { default as VariableCtx } from './variable-context';
5
+ export { default as WebSocketCtx } from './websocket-context';
6
+ export { default as RegistriesCtx } from './registries-context';
7
+ export { default as DisplayCtx } from './display-context';
8
+ export { default as FallbackCtx } from './fallback-context';
9
+ export { default as RequestExtrasCtx, useRequestExtras, RequestExtrasProvider, PartialRequestExtrasProvider, } from './request-extras-context';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../js/shared/context/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EACH,OAAO,IAAI,gBAAgB,EAC3B,gBAAgB,EAChB,qBAAqB,EACrB,4BAA4B,GAC/B,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,10 @@
1
+ export { default as DirectionCtx } from './direction-context';
2
+ export { default as ImportersCtx } from './importers-context';
3
+ export { default as GlobalTaskProvider, useTaskContext } from './global-task-context';
4
+ export { default as VariableCtx } from './variable-context';
5
+ export { default as WebSocketCtx } from './websocket-context';
6
+ export { default as RegistriesCtx } from './registries-context';
7
+ export { default as DisplayCtx } from './display-context';
8
+ export { default as FallbackCtx } from './fallback-context';
9
+ export { default as RequestExtrasCtx, useRequestExtras, RequestExtrasProvider, PartialRequestExtrasProvider, } from './request-extras-context';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../js/shared/context/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EACH,OAAO,IAAI,gBAAgB,EAC3B,gBAAgB,EAChB,qBAAqB,EACrB,4BAA4B,GAC/B,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { QueryObserverResult, RefetchOptions } from '@tanstack/react-query';
2
+ import { RequestError } from '@darajs/ui-utils';
3
+ import { ActionDef, Component } from '../../types';
4
+ type RegistriesCtx = {
5
+ /**
6
+ * Action registry
7
+ */
8
+ actionRegistry: Record<string, ActionDef>;
9
+ /**
10
+ * Component registry
11
+ */
12
+ componentRegistry: Record<string, Component>;
13
+ /**
14
+ * Callback to force a refetch of the components registry
15
+ */
16
+ refetchComponents: (options?: RefetchOptions) => Promise<QueryObserverResult<Record<string, Component>, RequestError>>;
17
+ };
18
+ declare const registriesCtx: import("react").Context<RegistriesCtx>;
19
+ export default registriesCtx;
20
+ //# sourceMappingURL=registries-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registries-context.d.ts","sourceRoot":"","sources":["../../../js/shared/context/registries-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,KAAK,aAAa,GAAG;IACjB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC1C;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC7C;;OAEG;IACH,iBAAiB,EAAE,CACf,OAAO,CAAC,EAAE,cAAc,KACvB,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;CAC9E,CAAC;AAEF,QAAA,MAAM,aAAa,wCAIjB,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { createContext } from 'react';
2
+ const registriesCtx = createContext({
3
+ actionRegistry: {},
4
+ componentRegistry: {},
5
+ refetchComponents: null,
6
+ });
7
+ export default registriesCtx;
8
+ //# sourceMappingURL=registries-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registries-context.js","sourceRoot":"","sources":["../../../js/shared/context/registries-context.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAuBtC,MAAM,aAAa,GAAG,aAAa,CAAgB;IAC/C,cAAc,EAAE,EAAE;IAClB,iBAAiB,EAAE,EAAE;IACrB,iBAAiB,EAAE,IAAI;CAC1B,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { RequestExtras } from '../../api/http';
2
+ interface RequestExtrasCtx {
3
+ options: RequestInit;
4
+ }
5
+ declare const requestExtrasCtx: import("react").Context<RequestExtrasCtx>;
6
+ export default requestExtrasCtx;
7
+ /**
8
+ * Get request extras to be passed into request function.
9
+ */
10
+ export declare function useRequestExtras(): RequestExtras;
11
+ /**
12
+ * Request extras provider that sets the default options for all requests.
13
+ *
14
+ * @param props
15
+ * @param props.children Child components
16
+ * @param props.options RequestInit object to provide
17
+ */
18
+ export declare function RequestExtrasProvider({ children, options, }: {
19
+ children: React.ReactNode;
20
+ options: RequestInit;
21
+ }): JSX.Element;
22
+ /**
23
+ * Request extras provider which merges the provided options with the parent options.
24
+ *
25
+ * @param props
26
+ * @param props.children Child components
27
+ * @param props.options RequestInit object to merge with parent options
28
+ */
29
+ export declare function PartialRequestExtrasProvider({ children, options, }: {
30
+ children: React.ReactNode;
31
+ options: RequestInit;
32
+ }): JSX.Element;
33
+ //# sourceMappingURL=request-extras-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-extras-context.d.ts","sourceRoot":"","sources":["../../../js/shared/context/request-extras-context.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,UAAU,gBAAgB;IACtB,OAAO,EAAE,WAAW,CAAC;CACxB;AAED,QAAA,MAAM,gBAAgB,2CAAmD,CAAC;AAE1E,eAAe,gBAAgB,CAAC;AAEhC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAShD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,QAAQ,EACR,OAAO,GACV,EAAE;IACC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,WAAW,CAAC;CACxB,GAAG,GAAG,CAAC,OAAO,CAEd;AAyBD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,EACzC,QAAQ,EACR,OAAO,GACV,EAAE;IACC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,WAAW,CAAC;CACxB,GAAG,GAAG,CAAC,OAAO,CAMd"}
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext, useMemo } from 'react';
3
+ import { useDeepCompare } from '@darajs/ui-utils';
4
+ const requestExtrasCtx = createContext({ options: {} });
5
+ export default requestExtrasCtx;
6
+ /**
7
+ * Get request extras to be passed into request function.
8
+ */
9
+ export function useRequestExtras() {
10
+ const { options } = useContext(requestExtrasCtx);
11
+ const extras = useMemo(() => {
12
+ return options;
13
+ // eslint-disable-next-line react-hooks/exhaustive-deps
14
+ }, [useDeepCompare(options)]);
15
+ return extras;
16
+ }
17
+ /**
18
+ * Request extras provider that sets the default options for all requests.
19
+ *
20
+ * @param props
21
+ * @param props.children Child components
22
+ * @param props.options RequestInit object to provide
23
+ */
24
+ export function RequestExtrasProvider({ children, options, }) {
25
+ return _jsx(requestExtrasCtx.Provider, { value: { options }, children: children });
26
+ }
27
+ /**
28
+ * Merge second request extras into first.
29
+ *
30
+ * Handles merging header objects rather than overwriting.
31
+ *
32
+ * @param a First request init
33
+ * @param b Second request init
34
+ */
35
+ function mergeRequestInits(a, b) {
36
+ const mergedHeaders = new Headers(a.headers);
37
+ const bHeaders = new Headers(b.headers);
38
+ bHeaders.forEach((value, key) => {
39
+ mergedHeaders.set(key, value);
40
+ });
41
+ return Object.assign(Object.assign(Object.assign({}, a), b), { headers: mergedHeaders });
42
+ }
43
+ /**
44
+ * Request extras provider which merges the provided options with the parent options.
45
+ *
46
+ * @param props
47
+ * @param props.children Child components
48
+ * @param props.options RequestInit object to merge with parent options
49
+ */
50
+ export function PartialRequestExtrasProvider({ children, options, }) {
51
+ const { options: parentOptions } = useContext(requestExtrasCtx);
52
+ const mergedInits = useMemo(() => mergeRequestInits(parentOptions, options), [parentOptions, options]);
53
+ return _jsx(requestExtrasCtx.Provider, { value: { options: mergedInits }, children: children });
54
+ }
55
+ //# sourceMappingURL=request-extras-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-extras-context.js","sourceRoot":"","sources":["../../../js/shared/context/request-extras-context.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQlD,MAAM,gBAAgB,GAAG,aAAa,CAAmB,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;AAE1E,eAAe,gBAAgB,CAAC;AAEhC;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC5B,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAEjD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QACxB,OAAO,OAAO,CAAC;QACf,uDAAuD;IAC3D,CAAC,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAE9B,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAClC,QAAQ,EACR,OAAO,GAIV;IACG,OAAO,KAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,YAAG,QAAQ,GAA6B,CAAC;AACjG,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,iBAAiB,CAAC,CAAc,EAAE,CAAc;IACrD,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAExC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QAC5B,aAAa,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,qDACO,CAAC,GACD,CAAC,KACJ,OAAO,EAAE,aAAa,IACxB;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAAC,EACzC,QAAQ,EACR,OAAO,GAIV;IACG,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAEhE,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,aAAa,EAAE,OAAO,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IAEvG,OAAO,KAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,YAAG,QAAQ,GAA6B,CAAC;AAC9G,CAAC"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export interface VariableContext {
3
+ /**
4
+ * Set of variables subscribed to (with useVariable)
5
+ */
6
+ variables: React.MutableRefObject<Set<string>>;
7
+ }
8
+ declare const variablesCtx: React.Context<VariableContext>;
9
+ export default variablesCtx;
10
+ //# sourceMappingURL=variable-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variable-context.d.ts","sourceRoot":"","sources":["../../../js/shared/context/variable-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;CAClD;AAED,QAAA,MAAM,YAAY,gCAA6C,CAAC;AAEhE,eAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ const variablesCtx = React.createContext(null);
3
+ export default variablesCtx;
4
+ //# sourceMappingURL=variable-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variable-context.js","sourceRoot":"","sources":["../../../js/shared/context/variable-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAkB,IAAI,CAAC,CAAC;AAEhE,eAAe,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { WebSocketClientInterface } from '../../api/websocket';
2
+ interface WebsocketCtx {
3
+ client?: WebSocketClientInterface;
4
+ }
5
+ declare const websocketCtx: import("react").Context<WebsocketCtx>;
6
+ export default websocketCtx;
7
+ //# sourceMappingURL=websocket-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket-context.d.ts","sourceRoot":"","sources":["../../../js/shared/context/websocket-context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,UAAU,YAAY;IAClB,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACrC;AAED,QAAA,MAAM,YAAY,uCAAkC,CAAC;AAErD,eAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { createContext } from 'react';
2
+ const websocketCtx = createContext({});
3
+ export default websocketCtx;
4
+ //# sourceMappingURL=websocket-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket-context.js","sourceRoot":"","sources":["../../../js/shared/context/websocket-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAQtC,MAAM,YAAY,GAAG,aAAa,CAAe,EAAE,CAAC,CAAC;AAErD,eAAe,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { BaseComponentProps } from '../../types';
2
+ /**
3
+ * Clean properties for a component.
4
+ */
5
+ export declare function cleanProps(props: BaseComponentProps): BaseComponentProps;
6
+ //# sourceMappingURL=clean-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clean-props.d.ts","sourceRoot":"","sources":["../../../js/shared/dynamic-component/clean-props.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAqB,MAAM,SAAS,CAAC;AAEhE;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,kBAAkB,GAAG,kBAAkB,CAUxE"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Clean properties for a component.
3
+ */
4
+ export function cleanProps(props) {
5
+ // filter out null/undefined children
6
+ if ('children' in props && Array.isArray(props.children)) {
7
+ const propsCopy = Object.assign({}, props);
8
+ propsCopy.children = props.children.filter(Boolean);
9
+ return propsCopy;
10
+ }
11
+ return props;
12
+ }
13
+ //# sourceMappingURL=clean-props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clean-props.js","sourceRoot":"","sources":["../../../js/shared/dynamic-component/clean-props.tsx"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAyB;IAChD,qCAAqC;IACrC,IAAI,UAAU,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvD,MAAM,SAAS,GAAG,kBAAK,KAAK,CAAwE,CAAC;QACrG,SAAS,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAEpD,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ComponentInstance } from '../../types';
2
+ interface DynamicComponentProps {
3
+ /** The component instance to inject */
4
+ component: ComponentInstance;
5
+ }
6
+ /**
7
+ * This component dynamically loads a component from the component registry. This component can either be another JS
8
+ * component or it can be a python component defined in the backend. For JS components we use the importers context to
9
+ * load the appropriate module and then extract the right component from that by its name. For python components we hand
10
+ * off to the PythonWrapper component which makes the call to the backend to get the html string to inject into the DOM.
11
+ *
12
+ * @param props - the components props
13
+ */
14
+ declare function DynamicComponent(props: DynamicComponentProps): JSX.Element;
15
+ export default DynamicComponent;
16
+ //# sourceMappingURL=dynamic-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-component.d.ts","sourceRoot":"","sources":["../../../js/shared/dynamic-component/dynamic-component.tsx"],"names":[],"mappings":"AAWA,OAAO,EAEH,iBAAiB,EAKpB,MAAM,SAAS,CAAC;AAoJjB,UAAU,qBAAqB;IAC3B,uCAAuC;IACvC,SAAS,EAAE,iBAAiB,CAAC;CAChC;AA8BD;;;;;;;GAOG;AACH,iBAAS,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAwFnE;AA4DD,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,252 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
11
+ /* eslint-disable react-hooks/exhaustive-deps */
12
+ import { Suspense, useContext, useEffect, useMemo, useRef, useState } from 'react';
13
+ import { ErrorBoundary } from 'react-error-boundary';
14
+ import DefaultFallback from '../../components/fallback/default';
15
+ import ProgressTracker from '../../components/progress-tracker/progress-tracker';
16
+ import { FallbackCtx, ImportersCtx, VariableCtx, useTaskContext } from '../../shared/context';
17
+ import { ErrorDisplay, isSelectorError } from '../../shared/error-handling';
18
+ import { useRefreshSelector } from '../../shared/interactivity';
19
+ import useServerComponent, { useRefreshServerComponent } from '../../shared/interactivity/use-server-component';
20
+ import { hasTemplateMarkers, isJsComponent, useComponentRegistry, useInterval } from '../../shared/utils';
21
+ import { isDerivedDataVariable, isDerivedVariable, } from '../../types';
22
+ import { isInvalidComponent, isRawString } from '../../types/core';
23
+ import { cleanProps } from './clean-props';
24
+ /**
25
+ * Helper function to take a derived variable and get the lowest polling_interval of it and its chained derived
26
+ * variables. It will recursively call itself to get the polling_interval of the chained derived variables.
27
+ *
28
+ * @param variable the derived variable to get the polling interval
29
+ */
30
+ function getDerivedVariablePollingInterval(variable) {
31
+ let pollingInterval;
32
+ if (variable.polling_interval) {
33
+ pollingInterval = variable.polling_interval;
34
+ }
35
+ variable.variables.forEach((value) => {
36
+ if (isDerivedVariable(value) || isDerivedDataVariable(value)) {
37
+ const innerPollingInterval = getDerivedVariablePollingInterval(value);
38
+ if (innerPollingInterval && (!pollingInterval || pollingInterval > innerPollingInterval)) {
39
+ pollingInterval = innerPollingInterval;
40
+ }
41
+ }
42
+ });
43
+ return pollingInterval;
44
+ }
45
+ /**
46
+ * Compute the polling interval for a component. This will take the polling_interval of the component and the
47
+ * polling_interval of any derived variables in the component kwargs and return the lowest value.
48
+ *
49
+ * @param kwargs component kwargs
50
+ * @param componentInterval component polling interval
51
+ */
52
+ function computePollingInterval(kwargs, componentInterval) {
53
+ let pollingInterval;
54
+ Object.values(kwargs).forEach((value) => {
55
+ if (isDerivedVariable(value) || isDerivedDataVariable(value)) {
56
+ const innerPollingInterval = getDerivedVariablePollingInterval(value);
57
+ if (innerPollingInterval && (!pollingInterval || pollingInterval > innerPollingInterval)) {
58
+ pollingInterval = innerPollingInterval;
59
+ }
60
+ }
61
+ });
62
+ if (componentInterval && (!pollingInterval || pollingInterval > componentInterval)) {
63
+ pollingInterval = componentInterval;
64
+ }
65
+ return pollingInterval;
66
+ }
67
+ /**
68
+ * Resolve a component instance definition to an actual component to render
69
+ *
70
+ * @param component component instance definition
71
+ * @param getComponentEntry callback to get component registry entry
72
+ * @param importers importers registry
73
+ */
74
+ function resolveComponent(component, getComponentEntry, importers) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ var _a;
77
+ const componentEntry = yield getComponentEntry(component);
78
+ // It's a JS component - dynamically import the right component
79
+ if (isJsComponent(componentEntry)) {
80
+ const importer = importers[componentEntry.py_module];
81
+ // Importer entry not present
82
+ if (!importer) {
83
+ // This error should only be seen by the app developer, so include details on how to solve it
84
+ const errorDescription = componentEntry.py_module === 'LOCAL' ?
85
+ `This is a local component so make sure you are in production mode and dara.config.json is present.
86
+ You can try re-building JavaScript by running Dara with the --rebuild flag.`
87
+ : `This means that the JavaScript module for the component was not included by the discovery system.
88
+ You can try re-building JavaScript by running Dara with the --rebuild flag
89
+ and/or explicitly registering the component with "config.add_component(MyComponentClass)".`;
90
+ return (_jsx(ErrorDisplay, { config: {
91
+ description: `Importer for module "${componentEntry.py_module}" was not found. ${errorDescription}`,
92
+ title: `Component "${componentEntry.name}" could not be resolved`,
93
+ } }));
94
+ }
95
+ let moduleContent = null;
96
+ try {
97
+ moduleContent = yield importer();
98
+ }
99
+ catch (e) {
100
+ // eslint-disable-next-line no-console
101
+ console.error(e);
102
+ }
103
+ // Could not import module
104
+ if (!moduleContent) {
105
+ return (_jsx(ErrorDisplay, { config: {
106
+ description: `Failed to import the JavaScript module for the component.
107
+ This likely means that the module was not installed properly.
108
+ You can try re-building JavaScript by running Dara with the --rebuild flag
109
+ and/or explicitly registering the component with "config.add_component(MyComponentClass)".`,
110
+ title: `Component "${componentEntry.name}" could not be resolved`,
111
+ } }));
112
+ }
113
+ const ResolvedComponent = moduleContent[(_a = componentEntry.js_component) !== null && _a !== void 0 ? _a : componentEntry.name];
114
+ // Component does not exist in the module
115
+ if (!ResolvedComponent) {
116
+ return (_jsx(ErrorDisplay, { config: {
117
+ description: `The JavaScript module was imported successfully but the component was not found within the module.`,
118
+ title: `Component "${componentEntry.name}" could not be resolved`,
119
+ } }));
120
+ }
121
+ const props = cleanProps(component.props);
122
+ return _jsx(ResolvedComponent, Object.assign({ uid: component.uid }, props));
123
+ }
124
+ // Otherwise it's a @py_component
125
+ return (
126
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
127
+ _jsx(PythonWrapper, { dynamic_kwargs: component.props.dynamic_kwargs, func_name: component.props.func_name, name: component.name, polling_interval: component.props.polling_interval, uid: component.uid }));
128
+ });
129
+ }
130
+ /**
131
+ * Get the fallback component for a given component instance
132
+ *
133
+ * @param fallback the fallback component instance
134
+ * @param track_progress whether to track progress
135
+ * @param variablesRef ref to set of variables to track
136
+ * @param taskRef ref to task id of the running task
137
+ */
138
+ function getFallbackComponent(fallback, track_progress, variablesRef) {
139
+ let fallbackComponent = _jsx(DefaultFallback, {});
140
+ // user overrode the default fallback
141
+ if (fallback) {
142
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
143
+ fallbackComponent = _jsx(DynamicComponent, { component: fallback });
144
+ }
145
+ if (track_progress) {
146
+ return _jsx(ProgressTracker, { fallback: fallbackComponent, variablesRef: variablesRef });
147
+ }
148
+ return fallbackComponent;
149
+ }
150
+ /**
151
+ * This component dynamically loads a component from the component registry. This component can either be another JS
152
+ * component or it can be a python component defined in the backend. For JS components we use the importers context to
153
+ * load the appropriate module and then extract the right component from that by its name. For python components we hand
154
+ * off to the PythonWrapper component which makes the call to the backend to get the html string to inject into the DOM.
155
+ *
156
+ * @param props - the components props
157
+ */
158
+ function DynamicComponent(props) {
159
+ var _a, _b, _c, _d, _e, _f;
160
+ const [isLoading, setIsLoading] = useState(true);
161
+ const [component, setComponent] = useState();
162
+ const { get: getComponent } = useComponentRegistry();
163
+ const importers = useContext(ImportersCtx);
164
+ const fallbackCtx = useContext(FallbackCtx);
165
+ const firstRender = useRef(true);
166
+ if (firstRender.current) {
167
+ if (hasTemplateMarkers(props.component)) {
168
+ throw new Error(`Component "${props.component.name}" has unhandled template markers. Make sure it's used in a component which handles templated components`);
169
+ }
170
+ firstRender.current = false;
171
+ }
172
+ useEffect(() => {
173
+ var _a;
174
+ if (((_a = props.component) === null || _a === void 0 ? void 0 : _a.name) === 'RawString') {
175
+ setComponent(props.component.props.content);
176
+ setIsLoading(false);
177
+ return;
178
+ }
179
+ if (props.component) {
180
+ resolveComponent(props.component, getComponent, importers).then((ResolvedComponent) => {
181
+ setComponent(ResolvedComponent);
182
+ setIsLoading(false);
183
+ });
184
+ }
185
+ }, [props.component, getComponent]);
186
+ const refreshSelector = useRefreshSelector();
187
+ function onResetErrorBoundary(error) {
188
+ if (isSelectorError(error)) {
189
+ refreshSelector(error.selectorId, error.selectorExtras);
190
+ }
191
+ }
192
+ const taskCtx = useTaskContext();
193
+ const variables = useRef(new Set());
194
+ /*
195
+ When this component unmounts, then cancel any pending tasks for this component. This is required because recoil uses
196
+ React.Suspense which at the time of writing does not support cancellation
197
+ This does not necessarily cancel the task, on the backend we keep track of number of subscribers,
198
+ 'cancelling' the task actually decrements the number of subs; the task is only cancelled once there are 0 subscribers left
199
+ */
200
+ useEffect(() => {
201
+ return () => {
202
+ // If there are running tasks and this component is subscribed to variables
203
+ if (variables.current.size > 0 && taskCtx.hasRunningTasks()) {
204
+ taskCtx.cleanupRunningTasks(...variables.current.values());
205
+ }
206
+ };
207
+ }, []);
208
+ const [fallback] = useState(() => { var _a, _b, _c, _d; return getFallbackComponent((_b = (_a = props.component) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.fallback, (_d = (_c = props.component) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.track_progress, variables); });
209
+ if (isLoading) {
210
+ return null;
211
+ }
212
+ // Compute the suspend setting for the component in order of precedence:
213
+ // 1) explicit suspend_render setting on the component
214
+ // 2) setting inherited from a parent component
215
+ // 3) default value of 200ms
216
+ const suspend = (_f = (_e = (_d = (_c = (_b = (_a = props.component) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.fallback) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.suspend_render) !== null && _e !== void 0 ? _e : fallbackCtx === null || fallbackCtx === void 0 ? void 0 : fallbackCtx.suspend) !== null && _f !== void 0 ? _f : 200;
217
+ return (_jsx(ErrorBoundary, { fallbackRender: (fallbackProps) => {
218
+ var _a, _b;
219
+ return (_jsx(ErrorDisplay, Object.assign({ config: (_b = (_a = props.component) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.error_handler }, fallbackProps)));
220
+ }, onReset: onResetErrorBoundary, children: _jsx(FallbackCtx.Provider, { value: { suspend }, children: _jsx(VariableCtx.Provider, { value: { variables }, children: _jsx(Suspense, { fallback: fallback, children: component }) }) }) }));
221
+ }
222
+ /**
223
+ * This component handles rendering a server component. Utilises the
224
+ * useServerComponent hook to make the call to the backend and then renders the returned component definition.
225
+ *
226
+ * Handles polling for the component if polling_interval is set in the component definition or in any of the
227
+ * dynamic_kwargs (checked recursively).
228
+ */
229
+ function PythonWrapper(props) {
230
+ const component = useServerComponent(props.name, props.uid, props.dynamic_kwargs);
231
+ const refresh = useRefreshServerComponent(props.uid);
232
+ // Poll to update the component if polling_interval is set
233
+ const pollingInterval = useMemo(() => computePollingInterval(props.dynamic_kwargs, props.polling_interval), [props.polling_interval]);
234
+ useInterval(refresh, pollingInterval);
235
+ if (component === null) {
236
+ return null;
237
+ }
238
+ if (isRawString(component)) {
239
+ return _jsx(_Fragment, { children: component.props.content });
240
+ }
241
+ if (isInvalidComponent(component)) {
242
+ return (_jsx(ErrorDisplay, { config: {
243
+ description: component.props.error,
244
+ title: `Component "${props.func_name}" returned an invalid component`,
245
+ }, resetErrorBoundary: () => {
246
+ refresh();
247
+ } }));
248
+ }
249
+ return _jsx(DynamicComponent, { component: component }, component.uid);
250
+ }
251
+ export default DynamicComponent;
252
+ //# sourceMappingURL=dynamic-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-component.js","sourceRoot":"","sources":["../../../js/shared/dynamic-component/dynamic-component.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,gDAAgD;AAChD,OAAO,EAAoB,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,eAAe,MAAM,gDAAgD,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,kBAAkB,EAAE,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAKH,qBAAqB,EACrB,iBAAiB,GACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAe,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;GAKG;AACH,SAA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c,KAAK,CAAC,SAAS,iCAAiC;aACxE,EACD,kBAAkB,EAAE,GAAG,EAAE;gBACrB,OAAO,EAAE,CAAC;YACd,CAAC,GACH,CACL,CAAC;IACN,CAAC;IAED,OAAO,KAAC,gBAAgB,IAAC,SAAS,EAAE,SAAS,IAAO,SAAS,CAAC,GAAG,CAAI,CAAC;AAC1E,CAAC;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { FallbackProps } from 'react-error-boundary';
2
+ import { ErrorHandlingConfig } from '../../types/core';
3
+ interface ErrorDisplayProps extends Partial<FallbackProps> {
4
+ config?: ErrorHandlingConfig;
5
+ }
6
+ declare function ErrorDisplay(props: ErrorDisplayProps): JSX.Element;
7
+ export default ErrorDisplay;
8
+ //# sourceMappingURL=error-display.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-display.d.ts","sourceRoot":"","sources":["../../../js/shared/error-handling/error-display.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAKrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA6FnD,UAAU,iBAAkB,SAAQ,OAAO,CAAC,aAAa,CAAC;IACtD,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAChC;AAED,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAuB3D;AAED,eAAe,YAAY,CAAC"}