@darajs/core 1.0.0-a.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (462) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +7 -0
  3. package/dist/actions/download-content.d.ts +8 -0
  4. package/dist/actions/download-content.d.ts.map +1 -0
  5. package/dist/actions/download-content.js +46 -0
  6. package/dist/actions/download-content.js.map +1 -0
  7. package/dist/actions/download-variable.d.ts +8 -0
  8. package/dist/actions/download-variable.d.ts.map +1 -0
  9. package/dist/actions/download-variable.js +153 -0
  10. package/dist/actions/download-variable.js.map +1 -0
  11. package/dist/actions/index.d.ts +11 -0
  12. package/dist/actions/index.d.ts.map +1 -0
  13. package/dist/actions/index.js +11 -0
  14. package/dist/actions/index.js.map +1 -0
  15. package/dist/actions/logout.d.ts +8 -0
  16. package/dist/actions/logout.d.ts.map +1 -0
  17. package/dist/actions/logout.js +24 -0
  18. package/dist/actions/logout.js.map +1 -0
  19. package/dist/actions/navigate-to.d.ts +8 -0
  20. package/dist/actions/navigate-to.d.ts.map +1 -0
  21. package/dist/actions/navigate-to.js +77 -0
  22. package/dist/actions/navigate-to.js.map +1 -0
  23. package/dist/actions/notify.d.ts +8 -0
  24. package/dist/actions/notify.d.ts.map +1 -0
  25. package/dist/actions/notify.js +16 -0
  26. package/dist/actions/notify.js.map +1 -0
  27. package/dist/actions/reset-variables.d.ts +8 -0
  28. package/dist/actions/reset-variables.d.ts.map +1 -0
  29. package/dist/actions/reset-variables.js +24 -0
  30. package/dist/actions/reset-variables.js.map +1 -0
  31. package/dist/actions/side-effect.d.ts +8 -0
  32. package/dist/actions/side-effect.d.ts.map +1 -0
  33. package/dist/actions/side-effect.js +44 -0
  34. package/dist/actions/side-effect.js.map +1 -0
  35. package/dist/actions/trigger-variable.d.ts +8 -0
  36. package/dist/actions/trigger-variable.d.ts.map +1 -0
  37. package/dist/actions/trigger-variable.js +25 -0
  38. package/dist/actions/trigger-variable.js.map +1 -0
  39. package/dist/actions/update-variable.d.ts +9 -0
  40. package/dist/actions/update-variable.d.ts.map +1 -0
  41. package/dist/actions/update-variable.js +89 -0
  42. package/dist/actions/update-variable.js.map +1 -0
  43. package/dist/actions/utils.d.ts +9 -0
  44. package/dist/actions/utils.d.ts.map +1 -0
  45. package/dist/actions/utils.js +37 -0
  46. package/dist/actions/utils.js.map +1 -0
  47. package/dist/api/core.d.ts +34 -0
  48. package/dist/api/core.d.ts.map +1 -0
  49. package/dist/api/core.js +110 -0
  50. package/dist/api/core.js.map +1 -0
  51. package/dist/api/http.d.ts +9 -0
  52. package/dist/api/http.d.ts.map +1 -0
  53. package/dist/api/http.js +38 -0
  54. package/dist/api/http.js.map +1 -0
  55. package/dist/api/index.d.ts +5 -0
  56. package/dist/api/index.d.ts.map +1 -0
  57. package/dist/api/index.js +5 -0
  58. package/dist/api/index.js.map +1 -0
  59. package/dist/api/websocket.d.ts +140 -0
  60. package/dist/api/websocket.d.ts.map +1 -0
  61. package/dist/api/websocket.js +241 -0
  62. package/dist/api/websocket.js.map +1 -0
  63. package/dist/assets/fonts/Manrope-VariableFont_wght.ttf +0 -0
  64. package/dist/assets/login-background.svg +11 -0
  65. package/dist/assets/logo.svg +12 -0
  66. package/dist/auth/auth-context.d.ts +22 -0
  67. package/dist/auth/auth-context.d.ts.map +1 -0
  68. package/dist/auth/auth-context.js +18 -0
  69. package/dist/auth/auth-context.js.map +1 -0
  70. package/dist/auth/auth-wrapper.d.ts +14 -0
  71. package/dist/auth/auth-wrapper.d.ts.map +1 -0
  72. package/dist/auth/auth-wrapper.js +90 -0
  73. package/dist/auth/auth-wrapper.js.map +1 -0
  74. package/dist/auth/auth.d.ts +61 -0
  75. package/dist/auth/auth.d.ts.map +1 -0
  76. package/dist/auth/auth.js +161 -0
  77. package/dist/auth/auth.js.map +1 -0
  78. package/dist/auth/basic/basic-auth-login.d.ts +6 -0
  79. package/dist/auth/basic/basic-auth-login.d.ts.map +1 -0
  80. package/dist/auth/basic/basic-auth-login.js +174 -0
  81. package/dist/auth/basic/basic-auth-login.js.map +1 -0
  82. package/dist/auth/basic/basic-auth-logout.d.ts +6 -0
  83. package/dist/auth/basic/basic-auth-logout.d.ts.map +1 -0
  84. package/dist/auth/basic/basic-auth-logout.js +18 -0
  85. package/dist/auth/basic/basic-auth-logout.js.map +1 -0
  86. package/dist/auth/default/default-auth-login.d.ts +6 -0
  87. package/dist/auth/default/default-auth-login.d.ts.map +1 -0
  88. package/dist/auth/default/default-auth-login.js +66 -0
  89. package/dist/auth/default/default-auth-login.js.map +1 -0
  90. package/dist/auth/index.d.ts +7 -0
  91. package/dist/auth/index.d.ts.map +1 -0
  92. package/dist/auth/index.js +7 -0
  93. package/dist/auth/index.js.map +1 -0
  94. package/dist/components/fallback/default.d.ts +5 -0
  95. package/dist/components/fallback/default.d.ts.map +1 -0
  96. package/dist/components/fallback/default.js +10 -0
  97. package/dist/components/fallback/default.js.map +1 -0
  98. package/dist/components/fallback/dots.d.ts +8 -0
  99. package/dist/components/fallback/dots.d.ts.map +1 -0
  100. package/dist/components/fallback/dots.js +77 -0
  101. package/dist/components/fallback/dots.js.map +1 -0
  102. package/dist/components/fallback/row.d.ts +5 -0
  103. package/dist/components/fallback/row.d.ts.map +1 -0
  104. package/dist/components/fallback/row.js +14 -0
  105. package/dist/components/fallback/row.js.map +1 -0
  106. package/dist/components/for/for.d.ts +35 -0
  107. package/dist/components/for/for.d.ts.map +1 -0
  108. package/dist/components/for/for.js +43 -0
  109. package/dist/components/for/for.js.map +1 -0
  110. package/dist/components/index.d.ts +9 -0
  111. package/dist/components/index.d.ts.map +1 -0
  112. package/dist/components/index.js +9 -0
  113. package/dist/components/index.js.map +1 -0
  114. package/dist/components/menu/menu.d.ts +14 -0
  115. package/dist/components/menu/menu.d.ts.map +1 -0
  116. package/dist/components/menu/menu.js +58 -0
  117. package/dist/components/menu/menu.js.map +1 -0
  118. package/dist/components/progress-tracker/progress-tracker.d.ts +18 -0
  119. package/dist/components/progress-tracker/progress-tracker.d.ts.map +1 -0
  120. package/dist/components/progress-tracker/progress-tracker.js +202 -0
  121. package/dist/components/progress-tracker/progress-tracker.js.map +1 -0
  122. package/dist/components/router-content/router-content.d.ts +14 -0
  123. package/dist/components/router-content/router-content.d.ts.map +1 -0
  124. package/dist/components/router-content/router-content.js +17 -0
  125. package/dist/components/router-content/router-content.js.map +1 -0
  126. package/dist/components/side-bar-frame/side-bar-frame.d.ts +21 -0
  127. package/dist/components/side-bar-frame/side-bar-frame.d.ts.map +1 -0
  128. package/dist/components/side-bar-frame/side-bar-frame.js +63 -0
  129. package/dist/components/side-bar-frame/side-bar-frame.js.map +1 -0
  130. package/dist/components/top-bar-frame/top-bar-frame.d.ts +16 -0
  131. package/dist/components/top-bar-frame/top-bar-frame.d.ts.map +1 -0
  132. package/dist/components/top-bar-frame/top-bar-frame.js +70 -0
  133. package/dist/components/top-bar-frame/top-bar-frame.js.map +1 -0
  134. package/dist/dara_core-1.0.0a1-py3-none-any.whl +0 -0
  135. package/dist/devtools/backend-errors/backend-errors-ctx.d.ts +17 -0
  136. package/dist/devtools/backend-errors/backend-errors-ctx.d.ts.map +1 -0
  137. package/dist/devtools/backend-errors/backend-errors-ctx.js +37 -0
  138. package/dist/devtools/backend-errors/backend-errors-ctx.js.map +1 -0
  139. package/dist/devtools/backend-errors/backend-errors.d.ts +6 -0
  140. package/dist/devtools/backend-errors/backend-errors.d.ts.map +1 -0
  141. package/dist/devtools/backend-errors/backend-errors.js +57 -0
  142. package/dist/devtools/backend-errors/backend-errors.js.map +1 -0
  143. package/dist/devtools/backend-errors/error-display.d.ts +22 -0
  144. package/dist/devtools/backend-errors/error-display.d.ts.map +1 -0
  145. package/dist/devtools/backend-errors/error-display.js +99 -0
  146. package/dist/devtools/backend-errors/error-display.js.map +1 -0
  147. package/dist/devtools/backend-errors/index.d.ts +3 -0
  148. package/dist/devtools/backend-errors/index.d.ts.map +1 -0
  149. package/dist/devtools/backend-errors/index.js +3 -0
  150. package/dist/devtools/backend-errors/index.js.map +1 -0
  151. package/dist/devtools/devtools-content.d.ts +12 -0
  152. package/dist/devtools/devtools-content.d.ts.map +1 -0
  153. package/dist/devtools/devtools-content.js +73 -0
  154. package/dist/devtools/devtools-content.js.map +1 -0
  155. package/dist/devtools/devtools-context.d.ts +7 -0
  156. package/dist/devtools/devtools-context.d.ts.map +1 -0
  157. package/dist/devtools/devtools-context.js +9 -0
  158. package/dist/devtools/devtools-context.js.map +1 -0
  159. package/dist/devtools/devtools-wrapper.d.ts +8 -0
  160. package/dist/devtools/devtools-wrapper.d.ts.map +1 -0
  161. package/dist/devtools/devtools-wrapper.js +64 -0
  162. package/dist/devtools/devtools-wrapper.js.map +1 -0
  163. package/dist/devtools/devtools.d.ts +5 -0
  164. package/dist/devtools/devtools.d.ts.map +1 -0
  165. package/dist/devtools/devtools.js +10 -0
  166. package/dist/devtools/devtools.js.map +1 -0
  167. package/dist/devtools/floating-button.d.ts +24 -0
  168. package/dist/devtools/floating-button.d.ts.map +1 -0
  169. package/dist/devtools/floating-button.js +96 -0
  170. package/dist/devtools/floating-button.js.map +1 -0
  171. package/dist/devtools/index.d.ts +2 -0
  172. package/dist/devtools/index.d.ts.map +1 -0
  173. package/dist/devtools/index.js +2 -0
  174. package/dist/devtools/index.js.map +1 -0
  175. package/dist/devtools/resizer.d.ts +18 -0
  176. package/dist/devtools/resizer.d.ts.map +1 -0
  177. package/dist/devtools/resizer.js +48 -0
  178. package/dist/devtools/resizer.js.map +1 -0
  179. package/dist/devtools/use-move.d.ts +21 -0
  180. package/dist/devtools/use-move.d.ts.map +1 -0
  181. package/dist/devtools/use-move.js +55 -0
  182. package/dist/devtools/use-move.js.map +1 -0
  183. package/dist/index.css +95 -0
  184. package/dist/index.d.ts +15 -0
  185. package/dist/index.d.ts.map +1 -0
  186. package/dist/index.js +13 -0
  187. package/dist/index.js.map +1 -0
  188. package/dist/jest-setup.d.ts +2 -0
  189. package/dist/jest-setup.d.ts.map +1 -0
  190. package/dist/jest-setup.js +7 -0
  191. package/dist/jest-setup.js.map +1 -0
  192. package/dist/pages/error-page.d.ts +3 -0
  193. package/dist/pages/error-page.d.ts.map +1 -0
  194. package/dist/pages/error-page.js +32 -0
  195. package/dist/pages/error-page.js.map +1 -0
  196. package/dist/pages/sso-callback-page.d.ts +6 -0
  197. package/dist/pages/sso-callback-page.d.ts.map +1 -0
  198. package/dist/pages/sso-callback-page.js +8 -0
  199. package/dist/pages/sso-callback-page.js.map +1 -0
  200. package/dist/run.d.ts +22 -0
  201. package/dist/run.d.ts.map +1 -0
  202. package/dist/run.js +40 -0
  203. package/dist/run.js.map +1 -0
  204. package/dist/shared/center/center.d.ts +5 -0
  205. package/dist/shared/center/center.d.ts.map +1 -0
  206. package/dist/shared/center/center.js +15 -0
  207. package/dist/shared/center/center.js.map +1 -0
  208. package/dist/shared/context/direction-context.d.ts +7 -0
  209. package/dist/shared/context/direction-context.d.ts.map +1 -0
  210. package/dist/shared/context/direction-context.js +4 -0
  211. package/dist/shared/context/direction-context.js.map +1 -0
  212. package/dist/shared/context/display-context.d.ts +14 -0
  213. package/dist/shared/context/display-context.d.ts.map +1 -0
  214. package/dist/shared/context/display-context.js +4 -0
  215. package/dist/shared/context/display-context.js.map +1 -0
  216. package/dist/shared/context/fallback-context.d.ts +11 -0
  217. package/dist/shared/context/fallback-context.d.ts.map +1 -0
  218. package/dist/shared/context/fallback-context.js +4 -0
  219. package/dist/shared/context/fallback-context.js.map +1 -0
  220. package/dist/shared/context/global-task-context.d.ts +40 -0
  221. package/dist/shared/context/global-task-context.d.ts.map +1 -0
  222. package/dist/shared/context/global-task-context.js +78 -0
  223. package/dist/shared/context/global-task-context.js.map +1 -0
  224. package/dist/shared/context/importers-context.d.ts +7 -0
  225. package/dist/shared/context/importers-context.d.ts.map +1 -0
  226. package/dist/shared/context/importers-context.js +4 -0
  227. package/dist/shared/context/importers-context.js.map +1 -0
  228. package/dist/shared/context/index.d.ts +10 -0
  229. package/dist/shared/context/index.d.ts.map +1 -0
  230. package/dist/shared/context/index.js +10 -0
  231. package/dist/shared/context/index.js.map +1 -0
  232. package/dist/shared/context/registries-context.d.ts +21 -0
  233. package/dist/shared/context/registries-context.d.ts.map +1 -0
  234. package/dist/shared/context/registries-context.js +8 -0
  235. package/dist/shared/context/registries-context.js.map +1 -0
  236. package/dist/shared/context/variable-context.d.ts +10 -0
  237. package/dist/shared/context/variable-context.d.ts.map +1 -0
  238. package/dist/shared/context/variable-context.js +4 -0
  239. package/dist/shared/context/variable-context.js.map +1 -0
  240. package/dist/shared/context/websocket-context.d.ts +8 -0
  241. package/dist/shared/context/websocket-context.d.ts.map +1 -0
  242. package/dist/shared/context/websocket-context.js +4 -0
  243. package/dist/shared/context/websocket-context.js.map +1 -0
  244. package/dist/shared/dynamic-component/dynamic-component.d.ts +16 -0
  245. package/dist/shared/dynamic-component/dynamic-component.d.ts.map +1 -0
  246. package/dist/shared/dynamic-component/dynamic-component.js +243 -0
  247. package/dist/shared/dynamic-component/dynamic-component.js.map +1 -0
  248. package/dist/shared/error-handling/error-display.d.ts +8 -0
  249. package/dist/shared/error-handling/error-display.d.ts.map +1 -0
  250. package/dist/shared/error-handling/error-display.js +92 -0
  251. package/dist/shared/error-handling/error-display.js.map +1 -0
  252. package/dist/shared/error-handling/index.d.ts +3 -0
  253. package/dist/shared/error-handling/index.d.ts.map +1 -0
  254. package/dist/shared/error-handling/index.js +3 -0
  255. package/dist/shared/error-handling/index.js.map +1 -0
  256. package/dist/shared/error-handling/types.d.ts +10 -0
  257. package/dist/shared/error-handling/types.d.ts.map +1 -0
  258. package/dist/shared/error-handling/types.js +9 -0
  259. package/dist/shared/error-handling/types.js.map +1 -0
  260. package/dist/shared/index.d.ts +11 -0
  261. package/dist/shared/index.d.ts.map +1 -0
  262. package/dist/shared/index.js +9 -0
  263. package/dist/shared/index.js.map +1 -0
  264. package/dist/shared/interactivity/data-variable.d.ts +66 -0
  265. package/dist/shared/interactivity/data-variable.d.ts.map +1 -0
  266. package/dist/shared/interactivity/data-variable.js +186 -0
  267. package/dist/shared/interactivity/data-variable.js.map +1 -0
  268. package/dist/shared/interactivity/derived-variable.d.ts +153 -0
  269. package/dist/shared/interactivity/derived-variable.d.ts.map +1 -0
  270. package/dist/shared/interactivity/derived-variable.js +403 -0
  271. package/dist/shared/interactivity/derived-variable.js.map +1 -0
  272. package/dist/shared/interactivity/filtering.d.ts +9 -0
  273. package/dist/shared/interactivity/filtering.d.ts.map +1 -0
  274. package/dist/shared/interactivity/filtering.js +20 -0
  275. package/dist/shared/interactivity/filtering.js.map +1 -0
  276. package/dist/shared/interactivity/index.d.ts +12 -0
  277. package/dist/shared/interactivity/index.d.ts.map +1 -0
  278. package/dist/shared/interactivity/index.js +11 -0
  279. package/dist/shared/interactivity/index.js.map +1 -0
  280. package/dist/shared/interactivity/internal.d.ts +8 -0
  281. package/dist/shared/interactivity/internal.d.ts.map +1 -0
  282. package/dist/shared/interactivity/internal.js +10 -0
  283. package/dist/shared/interactivity/internal.js.map +1 -0
  284. package/dist/shared/interactivity/nested.d.ts +16 -0
  285. package/dist/shared/interactivity/nested.d.ts.map +1 -0
  286. package/dist/shared/interactivity/nested.js +50 -0
  287. package/dist/shared/interactivity/nested.js.map +1 -0
  288. package/dist/shared/interactivity/plain-variable.d.ts +23 -0
  289. package/dist/shared/interactivity/plain-variable.d.ts.map +1 -0
  290. package/dist/shared/interactivity/plain-variable.js +89 -0
  291. package/dist/shared/interactivity/plain-variable.js.map +1 -0
  292. package/dist/shared/interactivity/resolve-value.d.ts +13 -0
  293. package/dist/shared/interactivity/resolve-value.d.ts.map +1 -0
  294. package/dist/shared/interactivity/resolve-value.js +36 -0
  295. package/dist/shared/interactivity/resolve-value.js.map +1 -0
  296. package/dist/shared/interactivity/resolve-variable.d.ts +18 -0
  297. package/dist/shared/interactivity/resolve-variable.d.ts.map +1 -0
  298. package/dist/shared/interactivity/resolve-variable.js +47 -0
  299. package/dist/shared/interactivity/resolve-variable.js.map +1 -0
  300. package/dist/shared/interactivity/store.d.ts +35 -0
  301. package/dist/shared/interactivity/store.d.ts.map +1 -0
  302. package/dist/shared/interactivity/store.js +47 -0
  303. package/dist/shared/interactivity/store.js.map +1 -0
  304. package/dist/shared/interactivity/triggers.d.ts +31 -0
  305. package/dist/shared/interactivity/triggers.d.ts.map +1 -0
  306. package/dist/shared/interactivity/triggers.js +105 -0
  307. package/dist/shared/interactivity/triggers.js.map +1 -0
  308. package/dist/shared/interactivity/url-variable.d.ts +12 -0
  309. package/dist/shared/interactivity/url-variable.d.ts.map +1 -0
  310. package/dist/shared/interactivity/url-variable.js +28 -0
  311. package/dist/shared/interactivity/url-variable.js.map +1 -0
  312. package/dist/shared/interactivity/use-any-variable.d.ts +8 -0
  313. package/dist/shared/interactivity/use-any-variable.d.ts.map +1 -0
  314. package/dist/shared/interactivity/use-any-variable.js +38 -0
  315. package/dist/shared/interactivity/use-any-variable.js.map +1 -0
  316. package/dist/shared/interactivity/use-data-variable.d.ts +12 -0
  317. package/dist/shared/interactivity/use-data-variable.d.ts.map +1 -0
  318. package/dist/shared/interactivity/use-data-variable.js +56 -0
  319. package/dist/shared/interactivity/use-data-variable.js.map +1 -0
  320. package/dist/shared/interactivity/use-refresh-selector.d.ts +5 -0
  321. package/dist/shared/interactivity/use-refresh-selector.d.ts.map +1 -0
  322. package/dist/shared/interactivity/use-refresh-selector.js +16 -0
  323. package/dist/shared/interactivity/use-refresh-selector.js.map +1 -0
  324. package/dist/shared/interactivity/use-reset-variables.d.ts +8 -0
  325. package/dist/shared/interactivity/use-reset-variables.d.ts.map +1 -0
  326. package/dist/shared/interactivity/use-reset-variables.js +46 -0
  327. package/dist/shared/interactivity/use-reset-variables.js.map +1 -0
  328. package/dist/shared/interactivity/use-server-component.d.ts +24 -0
  329. package/dist/shared/interactivity/use-server-component.d.ts.map +1 -0
  330. package/dist/shared/interactivity/use-server-component.js +227 -0
  331. package/dist/shared/interactivity/use-server-component.js.map +1 -0
  332. package/dist/shared/interactivity/use-trigger-variable.d.ts +9 -0
  333. package/dist/shared/interactivity/use-trigger-variable.d.ts.map +1 -0
  334. package/dist/shared/interactivity/use-trigger-variable.js +18 -0
  335. package/dist/shared/interactivity/use-trigger-variable.js.map +1 -0
  336. package/dist/shared/interactivity/use-variable-state.d.ts +9 -0
  337. package/dist/shared/interactivity/use-variable-state.d.ts.map +1 -0
  338. package/dist/shared/interactivity/use-variable-state.js +35 -0
  339. package/dist/shared/interactivity/use-variable-state.js.map +1 -0
  340. package/dist/shared/interactivity/use-variable-value.d.ts +20 -0
  341. package/dist/shared/interactivity/use-variable-value.d.ts.map +1 -0
  342. package/dist/shared/interactivity/use-variable-value.js +77 -0
  343. package/dist/shared/interactivity/use-variable-value.js.map +1 -0
  344. package/dist/shared/interactivity/use-variable.d.ts +11 -0
  345. package/dist/shared/interactivity/use-variable.d.ts.map +1 -0
  346. package/dist/shared/interactivity/use-variable.js +62 -0
  347. package/dist/shared/interactivity/use-variable.js.map +1 -0
  348. package/dist/shared/private-route/private-route.d.ts +23 -0
  349. package/dist/shared/private-route/private-route.d.ts.map +1 -0
  350. package/dist/shared/private-route/private-route.js +39 -0
  351. package/dist/shared/private-route/private-route.js.map +1 -0
  352. package/dist/shared/template-root/dynamic-context.d.ts +9 -0
  353. package/dist/shared/template-root/dynamic-context.d.ts.map +1 -0
  354. package/dist/shared/template-root/dynamic-context.js +28 -0
  355. package/dist/shared/template-root/dynamic-context.js.map +1 -0
  356. package/dist/shared/template-root/template-root.d.ts +8 -0
  357. package/dist/shared/template-root/template-root.d.ts.map +1 -0
  358. package/dist/shared/template-root/template-root.js +76 -0
  359. package/dist/shared/template-root/template-root.js.map +1 -0
  360. package/dist/shared/utils/clean-session-cache.d.ts +9 -0
  361. package/dist/shared/utils/clean-session-cache.d.ts.map +1 -0
  362. package/dist/shared/utils/clean-session-cache.js +17 -0
  363. package/dist/shared/utils/clean-session-cache.js.map +1 -0
  364. package/dist/shared/utils/embed.d.ts +13 -0
  365. package/dist/shared/utils/embed.d.ts.map +1 -0
  366. package/dist/shared/utils/embed.js +23 -0
  367. package/dist/shared/utils/embed.js.map +1 -0
  368. package/dist/shared/utils/get-icon.d.ts +9 -0
  369. package/dist/shared/utils/get-icon.d.ts.map +1 -0
  370. package/dist/shared/utils/get-icon.js +30 -0
  371. package/dist/shared/utils/get-icon.js.map +1 -0
  372. package/dist/shared/utils/hashing.d.ts +14 -0
  373. package/dist/shared/utils/hashing.d.ts.map +1 -0
  374. package/dist/shared/utils/hashing.js +26 -0
  375. package/dist/shared/utils/hashing.js.map +1 -0
  376. package/dist/shared/utils/index.d.ts +18 -0
  377. package/dist/shared/utils/index.d.ts.map +1 -0
  378. package/dist/shared/utils/index.js +16 -0
  379. package/dist/shared/utils/index.js.map +1 -0
  380. package/dist/shared/utils/inject-css.d.ts +13 -0
  381. package/dist/shared/utils/inject-css.d.ts.map +1 -0
  382. package/dist/shared/utils/inject-css.js +25 -0
  383. package/dist/shared/utils/inject-css.js.map +1 -0
  384. package/dist/shared/utils/is-js-component.d.ts +9 -0
  385. package/dist/shared/utils/is-js-component.d.ts.map +1 -0
  386. package/dist/shared/utils/is-js-component.js +11 -0
  387. package/dist/shared/utils/is-js-component.js.map +1 -0
  388. package/dist/shared/utils/normalization.d.ts +19 -0
  389. package/dist/shared/utils/normalization.d.ts.map +1 -0
  390. package/dist/shared/utils/normalization.js +118 -0
  391. package/dist/shared/utils/normalization.js.map +1 -0
  392. package/dist/shared/utils/resolve-theme.d.ts +9 -0
  393. package/dist/shared/utils/resolve-theme.d.ts.map +1 -0
  394. package/dist/shared/utils/resolve-theme.js +28 -0
  395. package/dist/shared/utils/resolve-theme.js.map +1 -0
  396. package/dist/shared/utils/templating.d.ts +24 -0
  397. package/dist/shared/utils/templating.d.ts.map +1 -0
  398. package/dist/shared/utils/templating.js +67 -0
  399. package/dist/shared/utils/templating.js.map +1 -0
  400. package/dist/shared/utils/use-action-registry.d.ts +11 -0
  401. package/dist/shared/utils/use-action-registry.d.ts.map +1 -0
  402. package/dist/shared/utils/use-action-registry.js +18 -0
  403. package/dist/shared/utils/use-action-registry.js.map +1 -0
  404. package/dist/shared/utils/use-action.d.ts +9 -0
  405. package/dist/shared/utils/use-action.d.ts.map +1 -0
  406. package/dist/shared/utils/use-action.js +84 -0
  407. package/dist/shared/utils/use-action.js.map +1 -0
  408. package/dist/shared/utils/use-component-registry.d.ts +11 -0
  409. package/dist/shared/utils/use-component-registry.d.ts.map +1 -0
  410. package/dist/shared/utils/use-component-registry.js +46 -0
  411. package/dist/shared/utils/use-component-registry.js.map +1 -0
  412. package/dist/shared/utils/use-component-styles.d.ts +24 -0
  413. package/dist/shared/utils/use-component-styles.d.ts.map +1 -0
  414. package/dist/shared/utils/use-component-styles.js +68 -0
  415. package/dist/shared/utils/use-component-styles.js.map +1 -0
  416. package/dist/shared/utils/use-defer-loadable.d.ts +8 -0
  417. package/dist/shared/utils/use-defer-loadable.d.ts.map +1 -0
  418. package/dist/shared/utils/use-defer-loadable.js +44 -0
  419. package/dist/shared/utils/use-defer-loadable.js.map +1 -0
  420. package/dist/shared/utils/use-interval.d.ts +9 -0
  421. package/dist/shared/utils/use-interval.d.ts.map +1 -0
  422. package/dist/shared/utils/use-interval.js +18 -0
  423. package/dist/shared/utils/use-interval.js.map +1 -0
  424. package/dist/shared/utils/use-previous.d.ts +10 -0
  425. package/dist/shared/utils/use-previous.d.ts.map +1 -0
  426. package/dist/shared/utils/use-previous.js +17 -0
  427. package/dist/shared/utils/use-previous.js.map +1 -0
  428. package/dist/shared/utils/use-url-sync.d.ts +20 -0
  429. package/dist/shared/utils/use-url-sync.d.ts.map +1 -0
  430. package/dist/shared/utils/use-url-sync.js +68 -0
  431. package/dist/shared/utils/use-url-sync.js.map +1 -0
  432. package/dist/shared/utils/use-window-title.d.ts +3 -0
  433. package/dist/shared/utils/use-window-title.d.ts.map +1 -0
  434. package/dist/shared/utils/use-window-title.js +14 -0
  435. package/dist/shared/utils/use-window-title.js.map +1 -0
  436. package/dist/shared/variable-state-provider/variable-state-provider.d.ts +10 -0
  437. package/dist/shared/variable-state-provider/variable-state-provider.d.ts.map +1 -0
  438. package/dist/shared/variable-state-provider/variable-state-provider.js +21 -0
  439. package/dist/shared/variable-state-provider/variable-state-provider.js.map +1 -0
  440. package/dist/shared/wrapper/wrapper.d.ts +7 -0
  441. package/dist/shared/wrapper/wrapper.d.ts.map +1 -0
  442. package/dist/shared/wrapper/wrapper.js +14 -0
  443. package/dist/shared/wrapper/wrapper.js.map +1 -0
  444. package/dist/types/auth.d.ts +15 -0
  445. package/dist/types/auth.d.ts.map +1 -0
  446. package/dist/types/auth.js +6 -0
  447. package/dist/types/auth.js.map +1 -0
  448. package/dist/types/core.d.ts +325 -0
  449. package/dist/types/core.d.ts.map +1 -0
  450. package/dist/types/core.js +22 -0
  451. package/dist/types/core.js.map +1 -0
  452. package/dist/types/index.d.ts +7 -0
  453. package/dist/types/index.d.ts.map +1 -0
  454. package/dist/types/index.js +4 -0
  455. package/dist/types/index.js.map +1 -0
  456. package/dist/types/utils.d.ts +50 -0
  457. package/dist/types/utils.d.ts.map +1 -0
  458. package/dist/types/utils.js +84 -0
  459. package/dist/types/utils.js.map +1 -0
  460. package/dist/umd/dara.core.umd.js +93592 -0
  461. package/dist/umd/style.css +848 -0
  462. package/package.json +117 -0
@@ -0,0 +1,243 @@
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
+ import { Suspense, useContext, useEffect, useMemo, useRef, useState } from 'react';
12
+ import { ErrorBoundary } from 'react-error-boundary';
13
+ import DefaultFallback from '../../components/fallback/default';
14
+ import ProgressTracker from '../../components/progress-tracker/progress-tracker';
15
+ import { FallbackCtx, ImportersCtx, VariableCtx, useTaskContext } from '../../shared/context';
16
+ import { ErrorDisplay, isSelectorError } from '../../shared/error-handling';
17
+ import { useRefreshSelector } from '../../shared/interactivity';
18
+ import useServerComponent, { useRefreshServerComponent } from '../../shared/interactivity/use-server-component';
19
+ import { hasTemplateMarkers, isJsComponent, useComponentRegistry, useInterval } from '../../shared/utils';
20
+ import { isDerivedDataVariable, isDerivedVariable, } from '../../types';
21
+ import { isInvalidComponent, isRawString } from '../../types/core';
22
+ /**
23
+ * Helper function to take a derived variable and get the lowest polling_interval of it and its chained derived
24
+ * variables. It will recursively call itself to get the polling_interval of the chained derived variables.
25
+ *
26
+ * @param variable the derived variable to get the polling interval
27
+ */
28
+ function getDerivedVariablePollingInterval(variable) {
29
+ let pollingInterval;
30
+ if (variable.polling_interval) {
31
+ pollingInterval = variable.polling_interval;
32
+ }
33
+ variable.variables.forEach((value) => {
34
+ if (isDerivedVariable(value) || isDerivedDataVariable(value)) {
35
+ const innerPollingInterval = getDerivedVariablePollingInterval(value);
36
+ if (innerPollingInterval && (!pollingInterval || pollingInterval > innerPollingInterval)) {
37
+ pollingInterval = innerPollingInterval;
38
+ }
39
+ }
40
+ });
41
+ return pollingInterval;
42
+ }
43
+ /**
44
+ * Compute the polling interval for a component. This will take the polling_interval of the component and the
45
+ * polling_interval of any derived variables in the component kwargs and return the lowest value.
46
+ *
47
+ * @param kwargs component kwargs
48
+ * @param componentInterval component polling interval
49
+ */
50
+ function computePollingInterval(kwargs, componentInterval) {
51
+ let pollingInterval;
52
+ Object.values(kwargs).forEach((value) => {
53
+ if (isDerivedVariable(value) || isDerivedDataVariable(value)) {
54
+ const innerPollingInterval = getDerivedVariablePollingInterval(value);
55
+ if (innerPollingInterval && (!pollingInterval || pollingInterval > innerPollingInterval)) {
56
+ pollingInterval = innerPollingInterval;
57
+ }
58
+ }
59
+ });
60
+ if (componentInterval && (!pollingInterval || pollingInterval > componentInterval)) {
61
+ pollingInterval = componentInterval;
62
+ }
63
+ return pollingInterval;
64
+ }
65
+ /**
66
+ * Resolve a component instance definition to an actual component to render
67
+ *
68
+ * @param component component instance definition
69
+ * @param getComponentEntry callback to get component registry entry
70
+ * @param importers importers registry
71
+ */
72
+ function resolveComponent(component, getComponentEntry, importers) {
73
+ var _a;
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ const componentEntry = yield getComponentEntry(component);
76
+ // It's a JS component - dynamically import the right component
77
+ if (isJsComponent(componentEntry)) {
78
+ const importer = importers[componentEntry.py_module];
79
+ // Importer entry not present
80
+ if (!importer) {
81
+ // This error should only be seen by the app developer, so include details on how to solve it
82
+ const errorDescription = componentEntry.py_module === 'LOCAL'
83
+ ? `This is a local component so make sure you are in production mode and dara.config.json is present.
84
+ You can try re-building JavaScript by running Dara with the --rebuild flag.`
85
+ : `This means that the JavaScript module for the component was not included by the discovery system.
86
+ You can try re-building JavaScript by running Dara with the --rebuild flag
87
+ and/or explicitly registering the component with "config.add_component(MyComponentClass)".`;
88
+ return (_jsx(ErrorDisplay, { config: {
89
+ description: `Importer for module "${componentEntry.py_module}" was not found. ${errorDescription}`,
90
+ title: `Component "${componentEntry.name}" could not be resolved`,
91
+ } }));
92
+ }
93
+ let moduleContent = null;
94
+ try {
95
+ moduleContent = yield importer();
96
+ }
97
+ catch (e) {
98
+ // eslint-disable-next-line no-console
99
+ console.error(e);
100
+ }
101
+ // Could not import module
102
+ if (!moduleContent) {
103
+ return (_jsx(ErrorDisplay, { config: {
104
+ description: `Failed to import the JavaScript module for the component.
105
+ This likely means that the module was not installed properly.
106
+ You can try re-building JavaScript by running Dara with the --rebuild flag
107
+ and/or explicitly registering the component with "config.add_component(MyComponentClass)".`,
108
+ title: `Component "${componentEntry.name}" could not be resolved`,
109
+ } }));
110
+ }
111
+ const ResolvedComponent = moduleContent[(_a = componentEntry.js_component) !== null && _a !== void 0 ? _a : componentEntry.name];
112
+ // Component does not exist in the module
113
+ if (!ResolvedComponent) {
114
+ return (_jsx(ErrorDisplay, { config: {
115
+ description: `The JavaScript module was imported successfully but the component was not found within the module.`,
116
+ title: `Component "${componentEntry.name}" could not be resolved`,
117
+ } }));
118
+ }
119
+ return _jsx(ResolvedComponent, Object.assign({ uid: component.uid }, component.props));
120
+ }
121
+ // Otherwise it's a @py_component
122
+ return (
123
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
124
+ _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 }));
125
+ });
126
+ }
127
+ /**
128
+ * Get the fallback component for a given component instance
129
+ *
130
+ * @param fallback the fallback component instance
131
+ * @param track_progress whether to track progress
132
+ * @param variablesRef ref to set of variables to track
133
+ * @param taskRef ref to task id of the running task
134
+ */
135
+ function getFallbackComponent(fallback, track_progress, variablesRef) {
136
+ let fallbackComponent = _jsx(DefaultFallback, {});
137
+ // user overrode the default fallback
138
+ if (fallback) {
139
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
140
+ fallbackComponent = _jsx(DynamicComponent, { component: fallback });
141
+ }
142
+ if (track_progress) {
143
+ return _jsx(ProgressTracker, { fallback: fallbackComponent, variablesRef: variablesRef });
144
+ }
145
+ return fallbackComponent;
146
+ }
147
+ /**
148
+ * This component dynamically loads a component from the component registry. This component can either be another JS
149
+ * component or it can be a python component defined in the backend. For JS components we use the importers context to
150
+ * load the appropriate module and then extract the right component from that by its name. For python components we hand
151
+ * off to the PythonWrapper component which makes the call to the backend to get the html string to inject into the DOM.
152
+ *
153
+ * @param props - the components props
154
+ */
155
+ function DynamicComponent(props) {
156
+ var _a, _b, _c, _d, _e;
157
+ const [isLoading, setIsLoading] = useState(true);
158
+ const [component, setComponent] = useState();
159
+ const { get: getComponent } = useComponentRegistry();
160
+ const importers = useContext(ImportersCtx);
161
+ const firstRender = useRef(true);
162
+ if (firstRender.current) {
163
+ if (hasTemplateMarkers(props.component)) {
164
+ throw new Error(`Component "${props.component.name}" has unhandled template markers. Make sure it's used in a component which handles templated components`);
165
+ }
166
+ firstRender.current = false;
167
+ }
168
+ useEffect(() => {
169
+ var _a;
170
+ if (((_a = props.component) === null || _a === void 0 ? void 0 : _a.name) === 'RawString') {
171
+ setComponent(props.component.props.content);
172
+ setIsLoading(false);
173
+ return;
174
+ }
175
+ if (props.component) {
176
+ resolveComponent(props.component, getComponent, importers).then((ResolvedComponent) => {
177
+ setComponent(ResolvedComponent);
178
+ setIsLoading(false);
179
+ });
180
+ }
181
+ }, [props.component, getComponent]);
182
+ const refreshSelector = useRefreshSelector();
183
+ function onResetErrorBoundary(error) {
184
+ if (isSelectorError(error)) {
185
+ refreshSelector(error.selectorId);
186
+ }
187
+ }
188
+ const taskCtx = useTaskContext();
189
+ const variables = useRef(new Set());
190
+ /*
191
+ When this component unmounts, then cancel any pending tasks for this component. This is required because recoil uses
192
+ React.Suspense which at the time of writing does not support cancellation
193
+ This does not necessarily cancel the task, on the backend we keep track of number of subscribers,
194
+ 'cancelling' the task actually decrements the number of subs; the task is only cancelled once there are 0 subscribers left
195
+ */
196
+ useEffect(() => {
197
+ return () => {
198
+ // If there are running tasks and this component is subscribed to variables
199
+ if (variables.current.size > 0 && taskCtx.hasRunningTasks()) {
200
+ taskCtx.cleanupRunningTasks(...variables.current.values());
201
+ }
202
+ };
203
+ }, []);
204
+ 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); });
205
+ if (isLoading) {
206
+ return null;
207
+ }
208
+ return (_jsx(ErrorBoundary, { fallbackRender: (fallbackProps) => {
209
+ var _a, _b;
210
+ 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)));
211
+ }, onReset: onResetErrorBoundary, children: _jsx(FallbackCtx.Provider, { value: { suspend: (_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 : 200 }, children: _jsx(VariableCtx.Provider, { value: { variables }, children: _jsx(Suspense, { fallback: fallback, children: component }) }) }) }));
212
+ }
213
+ /**
214
+ * This component handles rendering a server component. Utilises the
215
+ * useServerComponent hook to make the call to the backend and then renders the returned component definition.
216
+ *
217
+ * Handles polling for the component if polling_interval is set in the component definition or in any of the
218
+ * dynamic_kwargs (checked recursively).
219
+ */
220
+ function PythonWrapper(props) {
221
+ const component = useServerComponent(props.name, props.uid, props.dynamic_kwargs);
222
+ const refresh = useRefreshServerComponent(props.uid);
223
+ // Poll to update the component if polling_interval is set
224
+ const pollingInterval = useMemo(() => computePollingInterval(props.dynamic_kwargs, props.polling_interval), [props.polling_interval]);
225
+ useInterval(refresh, pollingInterval);
226
+ if (component === null) {
227
+ return null;
228
+ }
229
+ if (isRawString(component)) {
230
+ return _jsx(_Fragment, { children: component.props.content });
231
+ }
232
+ if (isInvalidComponent(component)) {
233
+ return (_jsx(ErrorDisplay, { config: {
234
+ description: component.props.error,
235
+ title: `Component "${props.func_name}" returned an invalid component`,
236
+ }, resetErrorBoundary: () => {
237
+ refresh();
238
+ } }));
239
+ }
240
+ return _jsx(DynamicComponent, { component: component }, component.uid);
241
+ }
242
+ export default DynamicComponent;
243
+ //# 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":";;;;;;;;;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AAC,OAAO,GAAI,CAAC;KACzC;IAED,IAAI,kBAAkB,CAAC,SAAS,CAAC,EAAE;QAC/B,OAAO,CACH,KAAC,YAAY,IACT,MAAM,EAAE;gBACJ,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK;gBAClC,KAAK,EAAE,cAAc,KAAK,CAAC,SAAS,iCAAiC;aACxE,EACD,kBAAkB,EAAE,GAAG,EAAE;gBACrB,OAAO,EAAE,CAAC;YACd,CAAC,GACH,CACL,CAAC;KACL;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;AA2FnD,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"}
@@ -0,0 +1,92 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { transparentize } from 'polished';
3
+ import styled from '@darajs/styled-components';
4
+ import { injectCss, parseRawCss } from '../../shared/utils';
5
+ const StyledErrorDisplay = styled.div `
6
+ display: flex;
7
+ gap: 1rem;
8
+ align-items: center;
9
+ justify-content: space-between;
10
+
11
+ height: min-content;
12
+ padding: 1rem;
13
+
14
+ background-color: ${(props) => transparentize(0.9, props.theme.colors.error)};
15
+ border-radius: 0.25rem;
16
+ `;
17
+ const ErrorDisplayWrapper = injectCss(StyledErrorDisplay);
18
+ const IconWrapper = styled.div `
19
+ display: flex;
20
+ height: 100%;
21
+ `;
22
+ const ErrorIcon = styled.i `
23
+ line-height: 21px;
24
+ color: ${(props) => props.theme.colors.error};
25
+ `;
26
+ const ContentWrapper = styled.div `
27
+ display: flex;
28
+ flex-direction: column;
29
+ gap: 1rem;
30
+ align-items: flex-start;
31
+ `;
32
+ const ErrorContent = styled.div `
33
+ display: flex;
34
+ flex-direction: column;
35
+ gap: 0.5rem;
36
+ color: ${(props) => props.theme.colors.error};
37
+ `;
38
+ const ErrorTitle = styled.h3 `
39
+ display: flex;
40
+ gap: 0.375rem;
41
+
42
+ font-size: 1rem;
43
+ font-weight: bold;
44
+ line-height: 1.375rem;
45
+ color: ${(props) => props.theme.colors.error};
46
+ `;
47
+ const ErrorText = styled.span `
48
+ font-size: 1rem;
49
+ line-height: 1.375rem;
50
+ `;
51
+ const RetryButton = styled.button `
52
+ cursor: pointer;
53
+
54
+ display: flex;
55
+ gap: 0.5rem;
56
+ align-items: center;
57
+ justify-content: center;
58
+
59
+ width: 40px;
60
+ height: 40px;
61
+
62
+ color: ${(props) => props.theme.colors.error};
63
+
64
+ background-color: inherit;
65
+ border: none;
66
+ border: 1px solid;
67
+ border-color: ${(props) => props.theme.colors.error};
68
+ border-radius: 5px;
69
+
70
+ transition: color border-color 100ms ease;
71
+
72
+ i {
73
+ line-height: 21px;
74
+ transition: transform 400ms ease-in-out;
75
+ }
76
+
77
+ &:hover {
78
+ color: ${(props) => props.theme.colors.errorHover};
79
+ border-color: ${(props) => props.theme.colors.errorHover};
80
+
81
+ i {
82
+ transform: rotate(180deg);
83
+ }
84
+ }
85
+ `;
86
+ function ErrorDisplay(props) {
87
+ var _a, _b, _c, _d, _e;
88
+ const [styles, css] = parseRawCss((_a = props.config) === null || _a === void 0 ? void 0 : _a.raw_css);
89
+ return (_jsxs(ErrorDisplayWrapper, { "$rawCss": css, style: styles, children: [_jsx(ContentWrapper, { children: _jsxs(ErrorContent, { children: [_jsxs(ErrorTitle, { children: [_jsx(IconWrapper, { children: _jsx(ErrorIcon, { "aria-hidden": true, className: "fa-solid fa-circle-xmark fa-lg" }) }), (_c = (_b = props === null || props === void 0 ? void 0 : props.config) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : 'Error'] }), _jsx(ErrorText, { children: (_e = (_d = props === null || props === void 0 ? void 0 : props.config) === null || _d === void 0 ? void 0 : _d.description) !== null && _e !== void 0 ? _e : 'Try again or contact the application owner.' })] }) }), props.resetErrorBoundary && (_jsx(RetryButton, { onClick: () => props.resetErrorBoundary(props.error), type: "button", children: _jsx("i", { "aria-hidden": true, className: "fa-solid fa-rotate fa-xl" }) }))] }));
90
+ }
91
+ export default ErrorDisplay;
92
+ //# sourceMappingURL=error-display.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-display.js","sourceRoot":"","sources":["../../../js/shared/error-handling/error-display.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;wBASb,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;;CAE/E,CAAC;AACF,MAAM,mBAAmB,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC;AAE1D,MAAM,WAAW,GAAG,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C5C,KAAC,cAAc,cACX,MAAC,YAAY,eACT,MAAC,UAAU,eACP,KAAC,WAAW,cACR,KAAC,SAAS,yBAAa,SAAS,EAAC,gCAAgC,GAAG,GAC1D,EACb,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,0CAAE,KAAK,mCAAI,OAAO,IACvB,EACb,KAAC,SAAS,cAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,0CAAE,WAAW,mCAAI,6CAA6C,GAAa,IACzF,GACF,EAChB,KAAK,CAAC,kBAAkB,IAAI,CACzB,KAAC,WAAW,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,EAAC,QAAQ,YAC5E,iCAAe,SAAS,EAAC,0BAA0B,GAAG,GAC5C,CACjB,IACiB,CACzB,CAAC;AACN,CAAC;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { isSelectorError, SelectorError } from './types';
2
+ export { default as ErrorDisplay } from './error-display';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../js/shared/error-handling/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { isSelectorError } from './types';
2
+ export { default as ErrorDisplay } from './error-display';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../js/shared/error-handling/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ export interface SelectorError {
2
+ selectorId: string;
3
+ }
4
+ /**
5
+ * Check whether an error originated from a Recoil selector, i.e. it has a selectorId attached
6
+ *
7
+ * @param e error to check
8
+ */
9
+ export declare function isSelectorError(e: unknown): e is SelectorError;
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../js/shared/error-handling/types.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,aAAa,CAE9D"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Check whether an error originated from a Recoil selector, i.e. it has a selectorId attached
3
+ *
4
+ * @param e error to check
5
+ */
6
+ export function isSelectorError(e) {
7
+ return e !== undefined && e !== null && typeof e === 'object' && 'selectorId' in e;
8
+ }
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../js/shared/error-handling/types.tsx"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,CAAU;IACtC,OAAO,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,YAAY,IAAI,CAAC,CAAC;AACvF,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { RawCssProp } from './utils';
2
+ export { default as Center } from './center/center';
3
+ export { AuthCtx, DirectionCtx, ImportersCtx, WebSocketCtx, DisplayCtx } from './context';
4
+ export { default as DynamicComponent } from './dynamic-component/dynamic-component';
5
+ export { default as TemplateRoot } from './template-root/template-root';
6
+ export { default as PrivateRoute } from './private-route/private-route';
7
+ export { isJsComponent, resolveTheme, useAction, useComponentRegistry, useWindowTitle, getIcon, injectCss, useComponentStyles, getMarkerPaths, replaceMarkers, hasTemplateMarkers, normalizeRequest, } from './utils';
8
+ export { useVariable, useDataVariable, combineFilters, useAnyVariable, useVariableValue, resolveValue, } from './interactivity';
9
+ export { default as Wrapper } from './wrapper/wrapper';
10
+ export type { RawCssProp };
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../js/shared/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,cAAc,EACd,OAAO,EACP,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EACH,WAAW,EACX,eAAe,EACf,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,YAAY,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACvD,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { default as Center } from './center/center';
2
+ export { AuthCtx, DirectionCtx, ImportersCtx, WebSocketCtx, DisplayCtx } from './context';
3
+ export { default as DynamicComponent } from './dynamic-component/dynamic-component';
4
+ export { default as TemplateRoot } from './template-root/template-root';
5
+ export { default as PrivateRoute } from './private-route/private-route';
6
+ export { isJsComponent, resolveTheme, useAction, useComponentRegistry, useWindowTitle, getIcon, injectCss, useComponentStyles, getMarkerPaths, replaceMarkers, hasTemplateMarkers, normalizeRequest, } from './utils';
7
+ export { useVariable, useDataVariable, combineFilters, useAnyVariable, useVariableValue, resolveValue, } from './interactivity';
8
+ export { default as Wrapper } from './wrapper/wrapper';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../js/shared/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,cAAc,EACd,OAAO,EACP,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EACH,WAAW,EACX,eAAe,EACf,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,YAAY,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { WebSocketClientInterface } from '../../api';
2
+ import { GlobalTaskContext } from '../../shared/context/global-task-context';
3
+ import { DataFrame, DataVariable, DerivedDataVariable, FilterQuery, Pagination, ResolvedDataVariable } from '../../types';
4
+ import { DerivedVariableValueResponse } from './internal';
5
+ /**
6
+ * Format a DataVariable into a ResolvedDataVariable structure for the backend
7
+ *
8
+ * @param variable the variable to resolve for the backend
9
+ */
10
+ export declare function resolveDataVariable(variable: DataVariable): ResolvedDataVariable;
11
+ /**
12
+ * Retrieve the value of a data variable from the backend
13
+ *
14
+ * @param uid
15
+ * @param token
16
+ * @param filters
17
+ * @param pagination
18
+ */
19
+ export declare function fetchDataVariable(uid: string, token: string, filters?: FilterQuery, pagination?: Pagination): Promise<DataFrame>;
20
+ interface TaskResponse {
21
+ task_id: string;
22
+ }
23
+ export interface DataResponse {
24
+ data: DataFrame | null;
25
+ totalCount: number;
26
+ }
27
+ export declare function isDataResponse(response: any): response is DataResponse;
28
+ /**
29
+ * Retrieve the value of a derived data variable from the backend
30
+ *
31
+ * @param uid
32
+ * @param token
33
+ * @param filters
34
+ * @param pagination
35
+ * @param cacheKey - cache key of the underlying DV, required for DerivedDataVariables
36
+ * @param wsChannel - websocket channel, required for DerivedDataVariables
37
+ */
38
+ export declare function fetchDerivedDataVariable(uid: string, token: string, cacheKey: string, wsChannel: string, filters?: FilterQuery, pagination?: Pagination): Promise<DataFrame | TaskResponse | null>;
39
+ /**
40
+ * Get a callback to fetch data variable from the backend
41
+ *
42
+ * @param variable variable instance
43
+ * @param token session token
44
+ * @param serverTriggerCounter a counter to force recreation of the callback
45
+ */
46
+ export declare function useFetchDataVariable(variable: DataVariable, serverTriggerCounter: number): (filters?: FilterQuery, pagination?: Pagination) => Promise<DataResponse>;
47
+ /**
48
+ * Get a callback to fetch derived data variable from the backend.
49
+ * Throws a TaskCancelledError when the backend task is cancelled.
50
+ *
51
+ * @param variable variable instance
52
+ * @param taskContext global task context
53
+ * @param wsClient websocket client instance
54
+ * @param dvValuePromise promise representing underlying derived variable state
55
+ * @param token session token
56
+ */
57
+ export declare function useFetchDerivedDataVariable(variable: DerivedDataVariable, taskContext: GlobalTaskContext, wsClient: WebSocketClientInterface, dvValuePromise: Promise<DerivedVariableValueResponse<any>>): (filters?: FilterQuery, pagination?: Pagination) => Promise<DataResponse>;
58
+ /**
59
+ * Register an empty atom for DataVariable.
60
+ * Used to check whether a variable is registered within the app.
61
+ *
62
+ * @param variable variable to register
63
+ */
64
+ export declare function registerDataVariable(variable: DataVariable): void;
65
+ export {};
66
+ //# sourceMappingURL=data-variable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-variable.d.ts","sourceRoot":"","sources":["../../../js/shared/interactivity/data-variable.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAmB,MAAM,OAAO,CAAC;AAGlE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAItH,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAG1D;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,oBAAoB,CAMhF;AA0BD;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACnC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,WAAW,EACrB,UAAU,CAAC,EAAE,UAAU,GACxB,OAAO,CAAC,SAAS,CAAC,CAMpB;AAED,UAAU,YAAY;IAClB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,GAAG,GAAG,QAAQ,IAAI,YAAY,CAEtE;AAED;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,CAC1C,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,SAAS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