@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.
- package/LICENSE +201 -0
- package/README.md +7 -0
- package/dist/actions/download-content.d.ts +8 -0
- package/dist/actions/download-content.d.ts.map +1 -0
- package/dist/actions/download-content.js +46 -0
- package/dist/actions/download-content.js.map +1 -0
- package/dist/actions/download-variable.d.ts +8 -0
- package/dist/actions/download-variable.d.ts.map +1 -0
- package/dist/actions/download-variable.js +153 -0
- package/dist/actions/download-variable.js.map +1 -0
- package/dist/actions/index.d.ts +11 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +11 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/logout.d.ts +8 -0
- package/dist/actions/logout.d.ts.map +1 -0
- package/dist/actions/logout.js +24 -0
- package/dist/actions/logout.js.map +1 -0
- package/dist/actions/navigate-to.d.ts +8 -0
- package/dist/actions/navigate-to.d.ts.map +1 -0
- package/dist/actions/navigate-to.js +77 -0
- package/dist/actions/navigate-to.js.map +1 -0
- package/dist/actions/notify.d.ts +8 -0
- package/dist/actions/notify.d.ts.map +1 -0
- package/dist/actions/notify.js +16 -0
- package/dist/actions/notify.js.map +1 -0
- package/dist/actions/reset-variables.d.ts +8 -0
- package/dist/actions/reset-variables.d.ts.map +1 -0
- package/dist/actions/reset-variables.js +24 -0
- package/dist/actions/reset-variables.js.map +1 -0
- package/dist/actions/side-effect.d.ts +8 -0
- package/dist/actions/side-effect.d.ts.map +1 -0
- package/dist/actions/side-effect.js +44 -0
- package/dist/actions/side-effect.js.map +1 -0
- package/dist/actions/trigger-variable.d.ts +8 -0
- package/dist/actions/trigger-variable.d.ts.map +1 -0
- package/dist/actions/trigger-variable.js +25 -0
- package/dist/actions/trigger-variable.js.map +1 -0
- package/dist/actions/update-variable.d.ts +9 -0
- package/dist/actions/update-variable.d.ts.map +1 -0
- package/dist/actions/update-variable.js +89 -0
- package/dist/actions/update-variable.js.map +1 -0
- package/dist/actions/utils.d.ts +9 -0
- package/dist/actions/utils.d.ts.map +1 -0
- package/dist/actions/utils.js +37 -0
- package/dist/actions/utils.js.map +1 -0
- package/dist/api/core.d.ts +34 -0
- package/dist/api/core.d.ts.map +1 -0
- package/dist/api/core.js +110 -0
- package/dist/api/core.js.map +1 -0
- package/dist/api/http.d.ts +9 -0
- package/dist/api/http.d.ts.map +1 -0
- package/dist/api/http.js +38 -0
- package/dist/api/http.js.map +1 -0
- package/dist/api/index.d.ts +5 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +5 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/websocket.d.ts +140 -0
- package/dist/api/websocket.d.ts.map +1 -0
- package/dist/api/websocket.js +241 -0
- package/dist/api/websocket.js.map +1 -0
- package/dist/assets/fonts/Manrope-VariableFont_wght.ttf +0 -0
- package/dist/assets/login-background.svg +11 -0
- package/dist/assets/logo.svg +12 -0
- package/dist/auth/auth-context.d.ts +22 -0
- package/dist/auth/auth-context.d.ts.map +1 -0
- package/dist/auth/auth-context.js +18 -0
- package/dist/auth/auth-context.js.map +1 -0
- package/dist/auth/auth-wrapper.d.ts +14 -0
- package/dist/auth/auth-wrapper.d.ts.map +1 -0
- package/dist/auth/auth-wrapper.js +90 -0
- package/dist/auth/auth-wrapper.js.map +1 -0
- package/dist/auth/auth.d.ts +61 -0
- package/dist/auth/auth.d.ts.map +1 -0
- package/dist/auth/auth.js +161 -0
- package/dist/auth/auth.js.map +1 -0
- package/dist/auth/basic/basic-auth-login.d.ts +6 -0
- package/dist/auth/basic/basic-auth-login.d.ts.map +1 -0
- package/dist/auth/basic/basic-auth-login.js +174 -0
- package/dist/auth/basic/basic-auth-login.js.map +1 -0
- package/dist/auth/basic/basic-auth-logout.d.ts +6 -0
- package/dist/auth/basic/basic-auth-logout.d.ts.map +1 -0
- package/dist/auth/basic/basic-auth-logout.js +18 -0
- package/dist/auth/basic/basic-auth-logout.js.map +1 -0
- package/dist/auth/default/default-auth-login.d.ts +6 -0
- package/dist/auth/default/default-auth-login.d.ts.map +1 -0
- package/dist/auth/default/default-auth-login.js +66 -0
- package/dist/auth/default/default-auth-login.js.map +1 -0
- package/dist/auth/index.d.ts +7 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +7 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/components/fallback/default.d.ts +5 -0
- package/dist/components/fallback/default.d.ts.map +1 -0
- package/dist/components/fallback/default.js +10 -0
- package/dist/components/fallback/default.js.map +1 -0
- package/dist/components/fallback/dots.d.ts +8 -0
- package/dist/components/fallback/dots.d.ts.map +1 -0
- package/dist/components/fallback/dots.js +77 -0
- package/dist/components/fallback/dots.js.map +1 -0
- package/dist/components/fallback/row.d.ts +5 -0
- package/dist/components/fallback/row.d.ts.map +1 -0
- package/dist/components/fallback/row.js +14 -0
- package/dist/components/fallback/row.js.map +1 -0
- package/dist/components/for/for.d.ts +35 -0
- package/dist/components/for/for.d.ts.map +1 -0
- package/dist/components/for/for.js +43 -0
- package/dist/components/for/for.js.map +1 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +9 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/menu/menu.d.ts +14 -0
- package/dist/components/menu/menu.d.ts.map +1 -0
- package/dist/components/menu/menu.js +58 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/progress-tracker/progress-tracker.d.ts +18 -0
- package/dist/components/progress-tracker/progress-tracker.d.ts.map +1 -0
- package/dist/components/progress-tracker/progress-tracker.js +202 -0
- package/dist/components/progress-tracker/progress-tracker.js.map +1 -0
- package/dist/components/router-content/router-content.d.ts +14 -0
- package/dist/components/router-content/router-content.d.ts.map +1 -0
- package/dist/components/router-content/router-content.js +17 -0
- package/dist/components/router-content/router-content.js.map +1 -0
- package/dist/components/side-bar-frame/side-bar-frame.d.ts +21 -0
- package/dist/components/side-bar-frame/side-bar-frame.d.ts.map +1 -0
- package/dist/components/side-bar-frame/side-bar-frame.js +63 -0
- package/dist/components/side-bar-frame/side-bar-frame.js.map +1 -0
- package/dist/components/top-bar-frame/top-bar-frame.d.ts +16 -0
- package/dist/components/top-bar-frame/top-bar-frame.d.ts.map +1 -0
- package/dist/components/top-bar-frame/top-bar-frame.js +70 -0
- package/dist/components/top-bar-frame/top-bar-frame.js.map +1 -0
- package/dist/dara_core-1.0.0a1-py3-none-any.whl +0 -0
- package/dist/devtools/backend-errors/backend-errors-ctx.d.ts +17 -0
- package/dist/devtools/backend-errors/backend-errors-ctx.d.ts.map +1 -0
- package/dist/devtools/backend-errors/backend-errors-ctx.js +37 -0
- package/dist/devtools/backend-errors/backend-errors-ctx.js.map +1 -0
- package/dist/devtools/backend-errors/backend-errors.d.ts +6 -0
- package/dist/devtools/backend-errors/backend-errors.d.ts.map +1 -0
- package/dist/devtools/backend-errors/backend-errors.js +57 -0
- package/dist/devtools/backend-errors/backend-errors.js.map +1 -0
- package/dist/devtools/backend-errors/error-display.d.ts +22 -0
- package/dist/devtools/backend-errors/error-display.d.ts.map +1 -0
- package/dist/devtools/backend-errors/error-display.js +99 -0
- package/dist/devtools/backend-errors/error-display.js.map +1 -0
- package/dist/devtools/backend-errors/index.d.ts +3 -0
- package/dist/devtools/backend-errors/index.d.ts.map +1 -0
- package/dist/devtools/backend-errors/index.js +3 -0
- package/dist/devtools/backend-errors/index.js.map +1 -0
- package/dist/devtools/devtools-content.d.ts +12 -0
- package/dist/devtools/devtools-content.d.ts.map +1 -0
- package/dist/devtools/devtools-content.js +73 -0
- package/dist/devtools/devtools-content.js.map +1 -0
- package/dist/devtools/devtools-context.d.ts +7 -0
- package/dist/devtools/devtools-context.d.ts.map +1 -0
- package/dist/devtools/devtools-context.js +9 -0
- package/dist/devtools/devtools-context.js.map +1 -0
- package/dist/devtools/devtools-wrapper.d.ts +8 -0
- package/dist/devtools/devtools-wrapper.d.ts.map +1 -0
- package/dist/devtools/devtools-wrapper.js +64 -0
- package/dist/devtools/devtools-wrapper.js.map +1 -0
- package/dist/devtools/devtools.d.ts +5 -0
- package/dist/devtools/devtools.d.ts.map +1 -0
- package/dist/devtools/devtools.js +10 -0
- package/dist/devtools/devtools.js.map +1 -0
- package/dist/devtools/floating-button.d.ts +24 -0
- package/dist/devtools/floating-button.d.ts.map +1 -0
- package/dist/devtools/floating-button.js +96 -0
- package/dist/devtools/floating-button.js.map +1 -0
- package/dist/devtools/index.d.ts +2 -0
- package/dist/devtools/index.d.ts.map +1 -0
- package/dist/devtools/index.js +2 -0
- package/dist/devtools/index.js.map +1 -0
- package/dist/devtools/resizer.d.ts +18 -0
- package/dist/devtools/resizer.d.ts.map +1 -0
- package/dist/devtools/resizer.js +48 -0
- package/dist/devtools/resizer.js.map +1 -0
- package/dist/devtools/use-move.d.ts +21 -0
- package/dist/devtools/use-move.d.ts.map +1 -0
- package/dist/devtools/use-move.js +55 -0
- package/dist/devtools/use-move.js.map +1 -0
- package/dist/index.css +95 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/jest-setup.d.ts +2 -0
- package/dist/jest-setup.d.ts.map +1 -0
- package/dist/jest-setup.js +7 -0
- package/dist/jest-setup.js.map +1 -0
- package/dist/pages/error-page.d.ts +3 -0
- package/dist/pages/error-page.d.ts.map +1 -0
- package/dist/pages/error-page.js +32 -0
- package/dist/pages/error-page.js.map +1 -0
- package/dist/pages/sso-callback-page.d.ts +6 -0
- package/dist/pages/sso-callback-page.d.ts.map +1 -0
- package/dist/pages/sso-callback-page.js +8 -0
- package/dist/pages/sso-callback-page.js.map +1 -0
- package/dist/run.d.ts +22 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +40 -0
- package/dist/run.js.map +1 -0
- package/dist/shared/center/center.d.ts +5 -0
- package/dist/shared/center/center.d.ts.map +1 -0
- package/dist/shared/center/center.js +15 -0
- package/dist/shared/center/center.js.map +1 -0
- package/dist/shared/context/direction-context.d.ts +7 -0
- package/dist/shared/context/direction-context.d.ts.map +1 -0
- package/dist/shared/context/direction-context.js +4 -0
- package/dist/shared/context/direction-context.js.map +1 -0
- package/dist/shared/context/display-context.d.ts +14 -0
- package/dist/shared/context/display-context.d.ts.map +1 -0
- package/dist/shared/context/display-context.js +4 -0
- package/dist/shared/context/display-context.js.map +1 -0
- package/dist/shared/context/fallback-context.d.ts +11 -0
- package/dist/shared/context/fallback-context.d.ts.map +1 -0
- package/dist/shared/context/fallback-context.js +4 -0
- package/dist/shared/context/fallback-context.js.map +1 -0
- package/dist/shared/context/global-task-context.d.ts +40 -0
- package/dist/shared/context/global-task-context.d.ts.map +1 -0
- package/dist/shared/context/global-task-context.js +78 -0
- package/dist/shared/context/global-task-context.js.map +1 -0
- package/dist/shared/context/importers-context.d.ts +7 -0
- package/dist/shared/context/importers-context.d.ts.map +1 -0
- package/dist/shared/context/importers-context.js +4 -0
- package/dist/shared/context/importers-context.js.map +1 -0
- package/dist/shared/context/index.d.ts +10 -0
- package/dist/shared/context/index.d.ts.map +1 -0
- package/dist/shared/context/index.js +10 -0
- package/dist/shared/context/index.js.map +1 -0
- package/dist/shared/context/registries-context.d.ts +21 -0
- package/dist/shared/context/registries-context.d.ts.map +1 -0
- package/dist/shared/context/registries-context.js +8 -0
- package/dist/shared/context/registries-context.js.map +1 -0
- package/dist/shared/context/variable-context.d.ts +10 -0
- package/dist/shared/context/variable-context.d.ts.map +1 -0
- package/dist/shared/context/variable-context.js +4 -0
- package/dist/shared/context/variable-context.js.map +1 -0
- package/dist/shared/context/websocket-context.d.ts +8 -0
- package/dist/shared/context/websocket-context.d.ts.map +1 -0
- package/dist/shared/context/websocket-context.js +4 -0
- package/dist/shared/context/websocket-context.js.map +1 -0
- package/dist/shared/dynamic-component/dynamic-component.d.ts +16 -0
- package/dist/shared/dynamic-component/dynamic-component.d.ts.map +1 -0
- package/dist/shared/dynamic-component/dynamic-component.js +243 -0
- package/dist/shared/dynamic-component/dynamic-component.js.map +1 -0
- package/dist/shared/error-handling/error-display.d.ts +8 -0
- package/dist/shared/error-handling/error-display.d.ts.map +1 -0
- package/dist/shared/error-handling/error-display.js +92 -0
- package/dist/shared/error-handling/error-display.js.map +1 -0
- package/dist/shared/error-handling/index.d.ts +3 -0
- package/dist/shared/error-handling/index.d.ts.map +1 -0
- package/dist/shared/error-handling/index.js +3 -0
- package/dist/shared/error-handling/index.js.map +1 -0
- package/dist/shared/error-handling/types.d.ts +10 -0
- package/dist/shared/error-handling/types.d.ts.map +1 -0
- package/dist/shared/error-handling/types.js +9 -0
- package/dist/shared/error-handling/types.js.map +1 -0
- package/dist/shared/index.d.ts +11 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +9 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/interactivity/data-variable.d.ts +66 -0
- package/dist/shared/interactivity/data-variable.d.ts.map +1 -0
- package/dist/shared/interactivity/data-variable.js +186 -0
- package/dist/shared/interactivity/data-variable.js.map +1 -0
- package/dist/shared/interactivity/derived-variable.d.ts +153 -0
- package/dist/shared/interactivity/derived-variable.d.ts.map +1 -0
- package/dist/shared/interactivity/derived-variable.js +403 -0
- package/dist/shared/interactivity/derived-variable.js.map +1 -0
- package/dist/shared/interactivity/filtering.d.ts +9 -0
- package/dist/shared/interactivity/filtering.d.ts.map +1 -0
- package/dist/shared/interactivity/filtering.js +20 -0
- package/dist/shared/interactivity/filtering.js.map +1 -0
- package/dist/shared/interactivity/index.d.ts +12 -0
- package/dist/shared/interactivity/index.d.ts.map +1 -0
- package/dist/shared/interactivity/index.js +11 -0
- package/dist/shared/interactivity/index.js.map +1 -0
- package/dist/shared/interactivity/internal.d.ts +8 -0
- package/dist/shared/interactivity/internal.d.ts.map +1 -0
- package/dist/shared/interactivity/internal.js +10 -0
- package/dist/shared/interactivity/internal.js.map +1 -0
- package/dist/shared/interactivity/nested.d.ts +16 -0
- package/dist/shared/interactivity/nested.d.ts.map +1 -0
- package/dist/shared/interactivity/nested.js +50 -0
- package/dist/shared/interactivity/nested.js.map +1 -0
- package/dist/shared/interactivity/plain-variable.d.ts +23 -0
- package/dist/shared/interactivity/plain-variable.d.ts.map +1 -0
- package/dist/shared/interactivity/plain-variable.js +89 -0
- package/dist/shared/interactivity/plain-variable.js.map +1 -0
- package/dist/shared/interactivity/resolve-value.d.ts +13 -0
- package/dist/shared/interactivity/resolve-value.d.ts.map +1 -0
- package/dist/shared/interactivity/resolve-value.js +36 -0
- package/dist/shared/interactivity/resolve-value.js.map +1 -0
- package/dist/shared/interactivity/resolve-variable.d.ts +18 -0
- package/dist/shared/interactivity/resolve-variable.d.ts.map +1 -0
- package/dist/shared/interactivity/resolve-variable.js +47 -0
- package/dist/shared/interactivity/resolve-variable.js.map +1 -0
- package/dist/shared/interactivity/store.d.ts +35 -0
- package/dist/shared/interactivity/store.d.ts.map +1 -0
- package/dist/shared/interactivity/store.js +47 -0
- package/dist/shared/interactivity/store.js.map +1 -0
- package/dist/shared/interactivity/triggers.d.ts +31 -0
- package/dist/shared/interactivity/triggers.d.ts.map +1 -0
- package/dist/shared/interactivity/triggers.js +105 -0
- package/dist/shared/interactivity/triggers.js.map +1 -0
- package/dist/shared/interactivity/url-variable.d.ts +12 -0
- package/dist/shared/interactivity/url-variable.d.ts.map +1 -0
- package/dist/shared/interactivity/url-variable.js +28 -0
- package/dist/shared/interactivity/url-variable.js.map +1 -0
- package/dist/shared/interactivity/use-any-variable.d.ts +8 -0
- package/dist/shared/interactivity/use-any-variable.d.ts.map +1 -0
- package/dist/shared/interactivity/use-any-variable.js +38 -0
- package/dist/shared/interactivity/use-any-variable.js.map +1 -0
- package/dist/shared/interactivity/use-data-variable.d.ts +12 -0
- package/dist/shared/interactivity/use-data-variable.d.ts.map +1 -0
- package/dist/shared/interactivity/use-data-variable.js +56 -0
- package/dist/shared/interactivity/use-data-variable.js.map +1 -0
- package/dist/shared/interactivity/use-refresh-selector.d.ts +5 -0
- package/dist/shared/interactivity/use-refresh-selector.d.ts.map +1 -0
- package/dist/shared/interactivity/use-refresh-selector.js +16 -0
- package/dist/shared/interactivity/use-refresh-selector.js.map +1 -0
- package/dist/shared/interactivity/use-reset-variables.d.ts +8 -0
- package/dist/shared/interactivity/use-reset-variables.d.ts.map +1 -0
- package/dist/shared/interactivity/use-reset-variables.js +46 -0
- package/dist/shared/interactivity/use-reset-variables.js.map +1 -0
- package/dist/shared/interactivity/use-server-component.d.ts +24 -0
- package/dist/shared/interactivity/use-server-component.d.ts.map +1 -0
- package/dist/shared/interactivity/use-server-component.js +227 -0
- package/dist/shared/interactivity/use-server-component.js.map +1 -0
- package/dist/shared/interactivity/use-trigger-variable.d.ts +9 -0
- package/dist/shared/interactivity/use-trigger-variable.d.ts.map +1 -0
- package/dist/shared/interactivity/use-trigger-variable.js +18 -0
- package/dist/shared/interactivity/use-trigger-variable.js.map +1 -0
- package/dist/shared/interactivity/use-variable-state.d.ts +9 -0
- package/dist/shared/interactivity/use-variable-state.d.ts.map +1 -0
- package/dist/shared/interactivity/use-variable-state.js +35 -0
- package/dist/shared/interactivity/use-variable-state.js.map +1 -0
- package/dist/shared/interactivity/use-variable-value.d.ts +20 -0
- package/dist/shared/interactivity/use-variable-value.d.ts.map +1 -0
- package/dist/shared/interactivity/use-variable-value.js +77 -0
- package/dist/shared/interactivity/use-variable-value.js.map +1 -0
- package/dist/shared/interactivity/use-variable.d.ts +11 -0
- package/dist/shared/interactivity/use-variable.d.ts.map +1 -0
- package/dist/shared/interactivity/use-variable.js +62 -0
- package/dist/shared/interactivity/use-variable.js.map +1 -0
- package/dist/shared/private-route/private-route.d.ts +23 -0
- package/dist/shared/private-route/private-route.d.ts.map +1 -0
- package/dist/shared/private-route/private-route.js +39 -0
- package/dist/shared/private-route/private-route.js.map +1 -0
- package/dist/shared/template-root/dynamic-context.d.ts +9 -0
- package/dist/shared/template-root/dynamic-context.d.ts.map +1 -0
- package/dist/shared/template-root/dynamic-context.js +28 -0
- package/dist/shared/template-root/dynamic-context.js.map +1 -0
- package/dist/shared/template-root/template-root.d.ts +8 -0
- package/dist/shared/template-root/template-root.d.ts.map +1 -0
- package/dist/shared/template-root/template-root.js +76 -0
- package/dist/shared/template-root/template-root.js.map +1 -0
- package/dist/shared/utils/clean-session-cache.d.ts +9 -0
- package/dist/shared/utils/clean-session-cache.d.ts.map +1 -0
- package/dist/shared/utils/clean-session-cache.js +17 -0
- package/dist/shared/utils/clean-session-cache.js.map +1 -0
- package/dist/shared/utils/embed.d.ts +13 -0
- package/dist/shared/utils/embed.d.ts.map +1 -0
- package/dist/shared/utils/embed.js +23 -0
- package/dist/shared/utils/embed.js.map +1 -0
- package/dist/shared/utils/get-icon.d.ts +9 -0
- package/dist/shared/utils/get-icon.d.ts.map +1 -0
- package/dist/shared/utils/get-icon.js +30 -0
- package/dist/shared/utils/get-icon.js.map +1 -0
- package/dist/shared/utils/hashing.d.ts +14 -0
- package/dist/shared/utils/hashing.d.ts.map +1 -0
- package/dist/shared/utils/hashing.js +26 -0
- package/dist/shared/utils/hashing.js.map +1 -0
- package/dist/shared/utils/index.d.ts +18 -0
- package/dist/shared/utils/index.d.ts.map +1 -0
- package/dist/shared/utils/index.js +16 -0
- package/dist/shared/utils/index.js.map +1 -0
- package/dist/shared/utils/inject-css.d.ts +13 -0
- package/dist/shared/utils/inject-css.d.ts.map +1 -0
- package/dist/shared/utils/inject-css.js +25 -0
- package/dist/shared/utils/inject-css.js.map +1 -0
- package/dist/shared/utils/is-js-component.d.ts +9 -0
- package/dist/shared/utils/is-js-component.d.ts.map +1 -0
- package/dist/shared/utils/is-js-component.js +11 -0
- package/dist/shared/utils/is-js-component.js.map +1 -0
- package/dist/shared/utils/normalization.d.ts +19 -0
- package/dist/shared/utils/normalization.d.ts.map +1 -0
- package/dist/shared/utils/normalization.js +118 -0
- package/dist/shared/utils/normalization.js.map +1 -0
- package/dist/shared/utils/resolve-theme.d.ts +9 -0
- package/dist/shared/utils/resolve-theme.d.ts.map +1 -0
- package/dist/shared/utils/resolve-theme.js +28 -0
- package/dist/shared/utils/resolve-theme.js.map +1 -0
- package/dist/shared/utils/templating.d.ts +24 -0
- package/dist/shared/utils/templating.d.ts.map +1 -0
- package/dist/shared/utils/templating.js +67 -0
- package/dist/shared/utils/templating.js.map +1 -0
- package/dist/shared/utils/use-action-registry.d.ts +11 -0
- package/dist/shared/utils/use-action-registry.d.ts.map +1 -0
- package/dist/shared/utils/use-action-registry.js +18 -0
- package/dist/shared/utils/use-action-registry.js.map +1 -0
- package/dist/shared/utils/use-action.d.ts +9 -0
- package/dist/shared/utils/use-action.d.ts.map +1 -0
- package/dist/shared/utils/use-action.js +84 -0
- package/dist/shared/utils/use-action.js.map +1 -0
- package/dist/shared/utils/use-component-registry.d.ts +11 -0
- package/dist/shared/utils/use-component-registry.d.ts.map +1 -0
- package/dist/shared/utils/use-component-registry.js +46 -0
- package/dist/shared/utils/use-component-registry.js.map +1 -0
- package/dist/shared/utils/use-component-styles.d.ts +24 -0
- package/dist/shared/utils/use-component-styles.d.ts.map +1 -0
- package/dist/shared/utils/use-component-styles.js +68 -0
- package/dist/shared/utils/use-component-styles.js.map +1 -0
- package/dist/shared/utils/use-defer-loadable.d.ts +8 -0
- package/dist/shared/utils/use-defer-loadable.d.ts.map +1 -0
- package/dist/shared/utils/use-defer-loadable.js +44 -0
- package/dist/shared/utils/use-defer-loadable.js.map +1 -0
- package/dist/shared/utils/use-interval.d.ts +9 -0
- package/dist/shared/utils/use-interval.d.ts.map +1 -0
- package/dist/shared/utils/use-interval.js +18 -0
- package/dist/shared/utils/use-interval.js.map +1 -0
- package/dist/shared/utils/use-previous.d.ts +10 -0
- package/dist/shared/utils/use-previous.d.ts.map +1 -0
- package/dist/shared/utils/use-previous.js +17 -0
- package/dist/shared/utils/use-previous.js.map +1 -0
- package/dist/shared/utils/use-url-sync.d.ts +20 -0
- package/dist/shared/utils/use-url-sync.d.ts.map +1 -0
- package/dist/shared/utils/use-url-sync.js +68 -0
- package/dist/shared/utils/use-url-sync.js.map +1 -0
- package/dist/shared/utils/use-window-title.d.ts +3 -0
- package/dist/shared/utils/use-window-title.d.ts.map +1 -0
- package/dist/shared/utils/use-window-title.js +14 -0
- package/dist/shared/utils/use-window-title.js.map +1 -0
- package/dist/shared/variable-state-provider/variable-state-provider.d.ts +10 -0
- package/dist/shared/variable-state-provider/variable-state-provider.d.ts.map +1 -0
- package/dist/shared/variable-state-provider/variable-state-provider.js +21 -0
- package/dist/shared/variable-state-provider/variable-state-provider.js.map +1 -0
- package/dist/shared/wrapper/wrapper.d.ts +7 -0
- package/dist/shared/wrapper/wrapper.d.ts.map +1 -0
- package/dist/shared/wrapper/wrapper.js +14 -0
- package/dist/shared/wrapper/wrapper.js.map +1 -0
- package/dist/types/auth.d.ts +15 -0
- package/dist/types/auth.d.ts.map +1 -0
- package/dist/types/auth.js +6 -0
- package/dist/types/auth.js.map +1 -0
- package/dist/types/core.d.ts +325 -0
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/core.js +22 -0
- package/dist/types/core.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/utils.d.ts +50 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/utils.js +84 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/umd/dara.core.umd.js +93592 -0
- package/dist/umd/style.css +848 -0
- package/package.json +117 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from '@darajs/styled-components';
|
|
3
|
+
const Wrapper = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
`;
|
|
11
|
+
const FlashingDots = styled.div `
|
|
12
|
+
position: relative;
|
|
13
|
+
|
|
14
|
+
width: 10px;
|
|
15
|
+
height: 10px;
|
|
16
|
+
|
|
17
|
+
color: ${(props) => props.theme.colors.grey4};
|
|
18
|
+
|
|
19
|
+
background-color: ${(props) => props.theme.colors.grey4};
|
|
20
|
+
border-radius: 5px;
|
|
21
|
+
|
|
22
|
+
animation: dot-flashing 1s infinite linear alternate;
|
|
23
|
+
animation-delay: 0.5s;
|
|
24
|
+
|
|
25
|
+
&::before,
|
|
26
|
+
&::after {
|
|
27
|
+
content: '';
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
display: inline-block;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&::before {
|
|
34
|
+
left: -15px;
|
|
35
|
+
|
|
36
|
+
width: 10px;
|
|
37
|
+
height: 10px;
|
|
38
|
+
|
|
39
|
+
color: ${(props) => props.theme.colors.grey4};
|
|
40
|
+
|
|
41
|
+
background-color: ${(props) => props.theme.colors.grey4};
|
|
42
|
+
border-radius: 5px;
|
|
43
|
+
|
|
44
|
+
animation: dot-flashing 1s infinite alternate;
|
|
45
|
+
animation-delay: 0s;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&::after {
|
|
49
|
+
left: 15px;
|
|
50
|
+
|
|
51
|
+
width: 10px;
|
|
52
|
+
height: 10px;
|
|
53
|
+
|
|
54
|
+
color: ${(props) => props.theme.colors.grey4};
|
|
55
|
+
|
|
56
|
+
background-color: ${(props) => props.theme.colors.grey4};
|
|
57
|
+
border-radius: 5px;
|
|
58
|
+
|
|
59
|
+
animation: dot-flashing 1s infinite alternate;
|
|
60
|
+
animation-delay: 1s;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@keyframes dot-flashing {
|
|
64
|
+
0% {
|
|
65
|
+
background-color: ${(props) => props.theme.colors.grey4};
|
|
66
|
+
}
|
|
67
|
+
50%,
|
|
68
|
+
100% {
|
|
69
|
+
background-color: ${(props) => props.theme.colors.grey3};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
function Dots(props) {
|
|
74
|
+
return (_jsx(Wrapper, { className: props.className, style: props.style, children: _jsx(FlashingDots, { "data-testid": "LOADING" }) }));
|
|
75
|
+
}
|
|
76
|
+
export default Dots;
|
|
77
|
+
//# sourceMappingURL=dots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dots.js","sourceRoot":"","sources":["../../../js/components/fallback/dots.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;CAOzB,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;aAMlB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;wBAExB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;;;;;;iBAoB1C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;4BAExB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;;;;;;;;;;;iBAa9C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;4BAExB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;;;;;;;gCAS/B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;;gCAInC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;CAGlE,CAAC;AAOF,SAAS,IAAI,CAAC,KAAgB;IAC1B,OAAO,CACH,KAAC,OAAO,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,YACnD,KAAC,YAAY,mBAAa,SAAS,GAAG,GAChC,CACb,CAAC;AACN,CAAC;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../js/components/fallback/row.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAS/C,KAAK,gBAAgB,GAAG,oBAAoB,CAAC;AAE7C,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAIzD;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from '@darajs/styled-components';
|
|
3
|
+
import { injectCss, useComponentStyles } from '../../shared/utils';
|
|
4
|
+
import Dots from './dots';
|
|
5
|
+
const RowDots = styled(Dots) `
|
|
6
|
+
height: 2.5rem;
|
|
7
|
+
`;
|
|
8
|
+
const StyledDots = injectCss(RowDots);
|
|
9
|
+
function RowFallback(props) {
|
|
10
|
+
const [style, css] = useComponentStyles(props);
|
|
11
|
+
return _jsx(StyledDots, { "$rawCss": css, style: style });
|
|
12
|
+
}
|
|
13
|
+
export default RowFallback;
|
|
14
|
+
//# sourceMappingURL=row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row.js","sourceRoot":"","sources":["../../../js/components/fallback/row.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAG/D,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;CAE3B,CAAC;AACF,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;AAItC,SAAS,WAAW,CAAC,KAAuB;IACxC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAE/C,OAAO,KAAC,UAAU,eAAU,GAAG,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC;AACtD,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AnyVariable, ComponentInstance, StyledComponentProps, TemplatedComponentInstance } from '../../types';
|
|
2
|
+
interface ForProps extends StyledComponentProps {
|
|
3
|
+
/**
|
|
4
|
+
* The data to render the component for.
|
|
5
|
+
*/
|
|
6
|
+
data: AnyVariable<Array<Record<string, any>>>;
|
|
7
|
+
/**
|
|
8
|
+
* The direction of the list.
|
|
9
|
+
*/
|
|
10
|
+
direction: 'horizontal' | 'vertical';
|
|
11
|
+
/**
|
|
12
|
+
* The key accessor to use for a unique key for each item in the list.
|
|
13
|
+
*/
|
|
14
|
+
key_accessor: string;
|
|
15
|
+
/**
|
|
16
|
+
* The size accessor to use for the size of each item in the list.
|
|
17
|
+
*/
|
|
18
|
+
size_accessor: string;
|
|
19
|
+
/**
|
|
20
|
+
* The template to render for each item in the list.
|
|
21
|
+
*/
|
|
22
|
+
template: ComponentInstance & TemplatedComponentInstance;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to virtualise the list.
|
|
25
|
+
*/
|
|
26
|
+
virtualize: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The For component is used to render a list of components based on variable data.
|
|
30
|
+
* It utilises a templated component to render each item in the list, precomputing the paths to the markers in the template
|
|
31
|
+
* and passing them to the ForChild component for replacement.
|
|
32
|
+
*/
|
|
33
|
+
declare function For(props: ForProps): JSX.Element;
|
|
34
|
+
export default For;
|
|
35
|
+
//# sourceMappingURL=for.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"for.d.ts","sourceRoot":"","sources":["../../../js/components/for/for.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAE3G,UAAU,QAAS,SAAQ,oBAAoB;IAC3C;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAC9C;;OAEG;IACH,SAAS,EAAE,YAAY,GAAG,UAAU,CAAC;IACrC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,iBAAiB,GAAG,0BAA0B,CAAC;IACzD;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;CACvB;AAmCD;;;;GAIG;AACH,iBAAS,GAAG,CAAC,KAAK,EAAE,QAAQ,GAAG,GAAG,CAAC,OAAO,CA+DzC;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import AutoSizer from 'react-virtualized-auto-sizer';
|
|
4
|
+
import { VariableSizeList } from 'react-window';
|
|
5
|
+
import { DynamicComponent, getMarkerPaths, replaceMarkers, useAnyVariable } from '../../shared';
|
|
6
|
+
/**
|
|
7
|
+
* The ForChild component is used to render a single component based on variable data.
|
|
8
|
+
* It utilises a templated component to render the component, replacing markers with the data for that item.
|
|
9
|
+
*/
|
|
10
|
+
function ForChild(props) {
|
|
11
|
+
const component = useMemo(() => {
|
|
12
|
+
const withoutMarkers = replaceMarkers(props.template, props.data, props.markerPaths);
|
|
13
|
+
withoutMarkers.props.style = props.style;
|
|
14
|
+
return withoutMarkers;
|
|
15
|
+
}, [props.template, props.data]);
|
|
16
|
+
return _jsx(DynamicComponent, { component: component });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The For component is used to render a list of components based on variable data.
|
|
20
|
+
* It utilises a templated component to render each item in the list, precomputing the paths to the markers in the template
|
|
21
|
+
* and passing them to the ForChild component for replacement.
|
|
22
|
+
*/
|
|
23
|
+
function For(props) {
|
|
24
|
+
const data = useAnyVariable(props.data);
|
|
25
|
+
// Precomputed paths to markers in the template, so we don't have to recompute them on every render for each item
|
|
26
|
+
const markerPaths = useMemo(() => getMarkerPaths(props.template), [props.template]);
|
|
27
|
+
const ListChild = useCallback((listProps) => {
|
|
28
|
+
return (_jsx(ForChild, { data: listProps.data[listProps.index], markerPaths: markerPaths, style: listProps.style, template: props.template }, listProps.data[listProps.index][props.key_accessor]));
|
|
29
|
+
}, [markerPaths, props.key_accessor]);
|
|
30
|
+
const getItemSize = useCallback((index) => {
|
|
31
|
+
return data[index][props.size_accessor];
|
|
32
|
+
}, [data, props.size_accessor]);
|
|
33
|
+
const getItemKey = useCallback((index, listData) => {
|
|
34
|
+
return listData[index][props.key_accessor];
|
|
35
|
+
}, [props.key_accessor]);
|
|
36
|
+
// If we're not virtualising, just render the list normally
|
|
37
|
+
if (!props.virtualize) {
|
|
38
|
+
return (_jsx(_Fragment, { children: data.map((item, index) => (_jsx(ListChild, { data: data, index: index, style: {} }, item[props.key_accessor]))) }));
|
|
39
|
+
}
|
|
40
|
+
return (_jsx(AutoSizer, { children: ({ height, width }) => (_jsx(VariableSizeList, { height: height, itemCount: data.length, itemData: data, itemKey: getItemKey, itemSize: getItemSize, layout: props.direction, width: width, children: ListChild })) }));
|
|
41
|
+
}
|
|
42
|
+
export default For;
|
|
43
|
+
//# sourceMappingURL=for.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"for.js","sourceRoot":"","sources":["../../../js/components/for/for.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,SAAS,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+
export { default as Menu } from './menu/menu';
|
|
2
|
+
export { default as ProgressTracker } from './progress-tracker/progress-tracker';
|
|
3
|
+
export { default as RouterContent } from './router-content/router-content';
|
|
4
|
+
export { default as SideBarFrame } from './side-bar-frame/side-bar-frame';
|
|
5
|
+
export { default as TopBarFrame } from './top-bar-frame/top-bar-frame';
|
|
6
|
+
export { default as DefaultFallback } from './fallback/default';
|
|
7
|
+
export { default as RowFallback } from './fallback/row';
|
|
8
|
+
export { default as For } from './for/for';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../js/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Menu } from './menu/menu';
|
|
2
|
+
export { default as ProgressTracker } from './progress-tracker/progress-tracker';
|
|
3
|
+
export { default as RouterContent } from './router-content/router-content';
|
|
4
|
+
export { default as SideBarFrame } from './side-bar-frame/side-bar-frame';
|
|
5
|
+
export { default as TopBarFrame } from './top-bar-frame/top-bar-frame';
|
|
6
|
+
export { default as DefaultFallback } from './fallback/default';
|
|
7
|
+
export { default as RowFallback } from './fallback/row';
|
|
8
|
+
export { default as For } from './for/for';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../js/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RouteLink } from '../../types';
|
|
2
|
+
interface MenuProps {
|
|
3
|
+
/** A list of routes to display in the menu */
|
|
4
|
+
routes: Array<RouteLink>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The menu component is a context aware component that will render a list of menu options into it's surrounding
|
|
8
|
+
* container based on a list of routes passed in.
|
|
9
|
+
*
|
|
10
|
+
* @param props - the component props
|
|
11
|
+
*/
|
|
12
|
+
declare function Menu(props: MenuProps): JSX.Element;
|
|
13
|
+
export default Menu;
|
|
14
|
+
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../js/components/menu/menu.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AA2CpC,UAAU,SAAS;IACf,8CAA8C;IAC9C,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CAC5B;AAED;;;;;GAKG;AACH,iBAAS,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAgB3C;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { transparentize } from 'polished';
|
|
3
|
+
import { useContext } from 'react';
|
|
4
|
+
import { NavLink } from 'react-router-dom';
|
|
5
|
+
import styled from '@darajs/styled-components';
|
|
6
|
+
import { DirectionCtx } from '../../shared/context';
|
|
7
|
+
import { getIcon } from '../../shared/utils';
|
|
8
|
+
const MenuItem = styled(NavLink) `
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: ${(props) => (props.direction === 'row' ? 'center' : 'flex-start')};
|
|
14
|
+
|
|
15
|
+
width: ${(props) => (props.direction === 'row' ? '10rem' : '100%')};
|
|
16
|
+
height: 3rem;
|
|
17
|
+
padding: 0 1rem;
|
|
18
|
+
|
|
19
|
+
font-size: 0.875rem;
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
color: ${(props) => props.theme.colors.secondary};
|
|
22
|
+
text-decoration: none;
|
|
23
|
+
|
|
24
|
+
border-radius: 1rem;
|
|
25
|
+
|
|
26
|
+
:hover {
|
|
27
|
+
background: ${(props) => transparentize(0.9, props.theme.colors.secondary)};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:active {
|
|
31
|
+
background: ${(props) => transparentize(0.8, props.theme.colors.secondary)};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
svg {
|
|
35
|
+
margin-right: 0.6rem;
|
|
36
|
+
color: ${(props) => props.theme.colors.blue1};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.selected {
|
|
40
|
+
color: ${(props) => props.theme.colors.blue1};
|
|
41
|
+
background-color: ${(props) => props.theme.colors.secondary};
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
/**
|
|
45
|
+
* The menu component is a context aware component that will render a list of menu options into it's surrounding
|
|
46
|
+
* container based on a list of routes passed in.
|
|
47
|
+
*
|
|
48
|
+
* @param props - the component props
|
|
49
|
+
*/
|
|
50
|
+
function Menu(props) {
|
|
51
|
+
const directionCtx = useContext(DirectionCtx);
|
|
52
|
+
return (_jsx(_Fragment, { children: props.routes.map(({ icon, name, route }) => {
|
|
53
|
+
const Icon = getIcon(icon);
|
|
54
|
+
return (_jsxs(MenuItem, { activeClassName: "selected", direction: directionCtx.direction, to: route, children: [_jsx(Icon, { style: { marginRight: '0.5rem' } }), name] }, name));
|
|
55
|
+
}) }));
|
|
56
|
+
}
|
|
57
|
+
export default Menu;
|
|
58
|
+
//# sourceMappingURL=menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../js/components/menu/menu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAOzC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAe;;;;;uBAKxB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC;;aAE1E,CAAC,KAAK,EAAE,EAAE,CAAC,C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AI,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ProgressTrackerProps {
|
|
3
|
+
/**
|
|
4
|
+
* Fallback element to render when there is no task tracked
|
|
5
|
+
*/
|
|
6
|
+
fallback?: JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Ref holding a list of variables the component is subscribed to
|
|
9
|
+
*/
|
|
10
|
+
variablesRef?: React.MutableRefObject<Set<string>>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* ProgressTracker component can be used as a placeholder to replace the standard loading spinner.
|
|
14
|
+
* If a task is running, data is captured from the task function and a ProgressBar with live updates in shown.
|
|
15
|
+
*/
|
|
16
|
+
declare function ProgressTracker(props: ProgressTrackerProps): JSX.Element;
|
|
17
|
+
export default ProgressTracker;
|
|
18
|
+
//# sourceMappingURL=progress-tracker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-tracker.d.ts","sourceRoot":"","sources":["../../../js/components/progress-tracker/progress-tracker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4HvE,UAAU,oBAAoB;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;CACtD;AAUD;;;GAGG;AACH,iBAAS,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CAsIjE;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useContext, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import styled from '@darajs/styled-components';
|
|
4
|
+
import { ProgressBar } from '@darajs/ui-components';
|
|
5
|
+
import { useTaskContext } from '../../shared/context/global-task-context';
|
|
6
|
+
import websocketCtx from '../../shared/context/websocket-context';
|
|
7
|
+
const POLLING_INTERVAL = 100;
|
|
8
|
+
const FAKE_PROGRESS_INTERVAL = 100;
|
|
9
|
+
const ESTIMATE_RATIO = 0.85;
|
|
10
|
+
/**
|
|
11
|
+
* Progress estimator function - roughly `y = 1 - exp(x)`.
|
|
12
|
+
*
|
|
13
|
+
* @param time time in milliseconds
|
|
14
|
+
* @param timeConstant seconds to reach 63%, then 86%, then 95%, then 98%
|
|
15
|
+
*/
|
|
16
|
+
function estimateProgress(time, timeConstant = 10) {
|
|
17
|
+
// This reaches in 63% in 10s, 86% in 20s
|
|
18
|
+
return 1 - Math.exp((-1 * time) / (FAKE_PROGRESS_INTERVAL * 10 * timeConstant));
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Build a generator which will return fake progress
|
|
22
|
+
*
|
|
23
|
+
* @param progressStart starting point
|
|
24
|
+
* @param progressEnd ending point
|
|
25
|
+
* @param estimatedTime estimated time the faking should take; if specified, the fake progress
|
|
26
|
+
* will use 'real'/estimated values for 60% of the estimated time before changing to a fake algo
|
|
27
|
+
*/
|
|
28
|
+
function fakeProgressGenerator(progressStart, progressEnd, estimatedTime) {
|
|
29
|
+
const difference = progressEnd - progressStart;
|
|
30
|
+
const estimatedProgressUpdates = [];
|
|
31
|
+
let timeConstant = 10;
|
|
32
|
+
// If estimated time is set, fake progress will start with estimated updates
|
|
33
|
+
if (estimatedTime && estimatedTime !== 0) {
|
|
34
|
+
const estimatedDifference = ESTIMATE_RATIO * difference;
|
|
35
|
+
const estimatedProgressTime = ESTIMATE_RATIO * estimatedTime;
|
|
36
|
+
const numberOfUpdates = estimatedProgressTime / FAKE_PROGRESS_INTERVAL;
|
|
37
|
+
const estimatedProgressChunk = estimatedDifference / numberOfUpdates;
|
|
38
|
+
let t = 0;
|
|
39
|
+
let p = progressStart;
|
|
40
|
+
// Compute list of 'estimated' (estimated) progress updates
|
|
41
|
+
while (t < estimatedProgressTime) {
|
|
42
|
+
p += estimatedProgressChunk;
|
|
43
|
+
t += FAKE_PROGRESS_INTERVAL;
|
|
44
|
+
estimatedProgressUpdates.push(p);
|
|
45
|
+
}
|
|
46
|
+
// Set time constant (time to reach 63% of the target) to the remaining chunk of estimated time
|
|
47
|
+
timeConstant = (1 - ESTIMATE_RATIO) * (estimatedTime / 1000);
|
|
48
|
+
}
|
|
49
|
+
// Build internal generator which returns estimated updates, then fake updates
|
|
50
|
+
function* getNextUpdate() {
|
|
51
|
+
let startFrom = progressStart;
|
|
52
|
+
// First we return estimated updates
|
|
53
|
+
while (estimatedProgressUpdates.length > 0) {
|
|
54
|
+
const update = estimatedProgressUpdates.shift();
|
|
55
|
+
startFrom = update;
|
|
56
|
+
yield update;
|
|
57
|
+
}
|
|
58
|
+
let i = 0;
|
|
59
|
+
// Then keep returning fake updates based on the estimate function
|
|
60
|
+
while (true) {
|
|
61
|
+
// Estimated is in range 0-1
|
|
62
|
+
const estimated = estimateProgress(FAKE_PROGRESS_INTERVAL * i, timeConstant);
|
|
63
|
+
// Rescale estimated to range of startFrom->progressEnd
|
|
64
|
+
yield estimated * (progressEnd - startFrom) + startFrom;
|
|
65
|
+
i++;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return getNextUpdate();
|
|
69
|
+
}
|
|
70
|
+
const ProgressWrapper = styled.div `
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
gap: 0.5rem;
|
|
74
|
+
padding: 1rem;
|
|
75
|
+
`;
|
|
76
|
+
const ProgressHeader = styled.h4 `
|
|
77
|
+
font-size: 1.2rem;
|
|
78
|
+
`;
|
|
79
|
+
const ProgressMessage = styled.span `
|
|
80
|
+
font-size: ${(props) => props.theme.font.size};
|
|
81
|
+
`;
|
|
82
|
+
/**
|
|
83
|
+
* Retrieve a list of running tasks if there are any
|
|
84
|
+
*
|
|
85
|
+
* @param tasksContext
|
|
86
|
+
* @param variablesRef
|
|
87
|
+
*/
|
|
88
|
+
function findRunningTasks(tasksContext, variablesRef) {
|
|
89
|
+
var _a;
|
|
90
|
+
// check if there are variables the component is subscribed to, and there are tasks running
|
|
91
|
+
if (!(((_a = variablesRef === null || variablesRef === void 0 ? void 0 : variablesRef.current) === null || _a === void 0 ? void 0 : _a.size) > 0 && tasksContext.hasRunningTasks())) {
|
|
92
|
+
return [];
|
|
93
|
+
}
|
|
94
|
+
return tasksContext.getVariableTasks(...variablesRef.current.values());
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* ProgressTracker component can be used as a placeholder to replace the standard loading spinner.
|
|
98
|
+
* If a task is running, data is captured from the task function and a ProgressBar with live updates in shown.
|
|
99
|
+
*/
|
|
100
|
+
function ProgressTracker(props) {
|
|
101
|
+
const taskContext = useTaskContext();
|
|
102
|
+
const { client: wsClient } = useContext(websocketCtx);
|
|
103
|
+
const [latestProgressUpdate, setLatestProgressUpdate] = useState(null); // latest progress message
|
|
104
|
+
const [progress, setProgress] = useState(null);
|
|
105
|
+
const fakeInterval = useRef(null);
|
|
106
|
+
const [subscribedTaskIds, setSubscribedTaskIds] = useState([]);
|
|
107
|
+
const [restartTrigger, setRestartTrigger] = useState(0); // used to trigger a restart of polling for a running task
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
let progressSubscription = null;
|
|
110
|
+
// Start polling and looking for running tasks
|
|
111
|
+
const timer = setInterval(() => {
|
|
112
|
+
const taskIds = findRunningTasks(taskContext, props.variablesRef);
|
|
113
|
+
// Once tasks are found, subscribe to their progress updates and stop polling
|
|
114
|
+
// This handles a component having multiple tasks running - it's a limitation that only one of them
|
|
115
|
+
// can be tracked; this is only an issue if a component calls useVariable for multiple inputs
|
|
116
|
+
if (taskIds.length > 0) {
|
|
117
|
+
setSubscribedTaskIds(taskIds);
|
|
118
|
+
progressSubscription = wsClient
|
|
119
|
+
.progressUpdates$(...taskIds)
|
|
120
|
+
.subscribe((notif) => setLatestProgressUpdate(notif.message));
|
|
121
|
+
clearInterval(timer);
|
|
122
|
+
}
|
|
123
|
+
}, POLLING_INTERVAL);
|
|
124
|
+
return () => {
|
|
125
|
+
// Clean up intervals and subscriptions
|
|
126
|
+
clearInterval(timer);
|
|
127
|
+
if (fakeInterval.current) {
|
|
128
|
+
clearInterval(fakeInterval.current);
|
|
129
|
+
}
|
|
130
|
+
progressSubscription === null || progressSubscription === void 0 ? void 0 : progressSubscription.unsubscribe();
|
|
131
|
+
};
|
|
132
|
+
}, [restartTrigger]);
|
|
133
|
+
/**
|
|
134
|
+
* Handle cancellations of subscribed task ids.
|
|
135
|
+
*/
|
|
136
|
+
useEffect(() => {
|
|
137
|
+
let subscription = null;
|
|
138
|
+
if (subscribedTaskIds.length > 0) {
|
|
139
|
+
subscription = wsClient.taskStatusUpdates$(...subscribedTaskIds).subscribe((newStatus) => {
|
|
140
|
+
if (newStatus === 'CANCELED') {
|
|
141
|
+
// Reset component
|
|
142
|
+
if (fakeInterval.current) {
|
|
143
|
+
clearInterval(fakeInterval.current);
|
|
144
|
+
}
|
|
145
|
+
setLatestProgressUpdate(null);
|
|
146
|
+
setSubscribedTaskIds([]);
|
|
147
|
+
setProgress(null);
|
|
148
|
+
// Restart polling
|
|
149
|
+
setRestartTrigger((v) => v + 1);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
return () => {
|
|
154
|
+
subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe();
|
|
155
|
+
};
|
|
156
|
+
}, [subscribedTaskIds]);
|
|
157
|
+
/**
|
|
158
|
+
* Handle progress updates.
|
|
159
|
+
* This is in a chained effect rather than in the subscription handler since it needs
|
|
160
|
+
* access to the latest state.
|
|
161
|
+
*/
|
|
162
|
+
useEffect(() => {
|
|
163
|
+
var _a, _b;
|
|
164
|
+
if (!latestProgressUpdate)
|
|
165
|
+
return;
|
|
166
|
+
// Clear faking process interval if its set
|
|
167
|
+
if (fakeInterval.current) {
|
|
168
|
+
clearInterval(fakeInterval.current);
|
|
169
|
+
}
|
|
170
|
+
// whether we received a message to start fake mode
|
|
171
|
+
const shouldStartFakeProgress = latestProgressUpdate.message.startsWith('FAKE_PROGRESS__');
|
|
172
|
+
if (!shouldStartFakeProgress) {
|
|
173
|
+
// If not, just update progress
|
|
174
|
+
setProgress({
|
|
175
|
+
message: latestProgressUpdate.message,
|
|
176
|
+
progress: latestProgressUpdate.progress,
|
|
177
|
+
});
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
// Start fake mode and update message to the sent message
|
|
181
|
+
const [, estimatedTime, message] = latestProgressUpdate.message.split('__');
|
|
182
|
+
setProgress({
|
|
183
|
+
message,
|
|
184
|
+
progress: (_a = progress === null || progress === void 0 ? void 0 : progress.progress) !== null && _a !== void 0 ? _a : 0,
|
|
185
|
+
});
|
|
186
|
+
const progressGenerator = fakeProgressGenerator((_b = progress === null || progress === void 0 ? void 0 : progress.progress) !== null && _b !== void 0 ? _b : 0, latestProgressUpdate.progress, parseFloat(estimatedTime));
|
|
187
|
+
fakeInterval.current = setInterval(() => {
|
|
188
|
+
const nextValue = progressGenerator.next().value;
|
|
189
|
+
setProgress({
|
|
190
|
+
message,
|
|
191
|
+
progress: nextValue,
|
|
192
|
+
});
|
|
193
|
+
}, FAKE_PROGRESS_INTERVAL);
|
|
194
|
+
}, [latestProgressUpdate]);
|
|
195
|
+
// If no task is running, just show a standard loading bar
|
|
196
|
+
if (subscribedTaskIds.length === 0) {
|
|
197
|
+
return props.fallback;
|
|
198
|
+
}
|
|
199
|
+
return (_jsxs(ProgressWrapper, { children: [_jsx(ProgressHeader, { children: "Task in progress" }), progress && (_jsxs(_Fragment, { children: [_jsx(ProgressMessage, { children: progress.message }), _jsx(ProgressBar, { progress: parseFloat(progress.progress.toFixed(2)) })] }))] }));
|
|
200
|
+
}
|
|
201
|
+
export default ProgressTracker;
|
|
202
|
+
//# sourceMappingURL=progress-tracker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-tracker.js","sourceRoot":"","sources":["../../../js/components/progress-tracker/progress-tracker.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGvE,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EAAqB,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAE9D,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,sBAAsB,GAAG,GAAG,CAAC;AACnC,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,IAAY,EAAE,YAAY,GAAG,EAAE;IACrD,yCAAyC;IACzC,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,sBAAsB,GAAG,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC;AACpF,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,qBAAqB,CAC1B,aAAqB,EACrB,WAAmB,EACnB,aAAqB;IAErB,MAAM,UAAU,GAAG,WAAW,GAAG,aAAa,CAAC;IAC/C,MAAM,wBAAwB,GAAa,EAAE,CAAC;IAC9C,IAAI,YAAY,GAAG,EAAE,CAAC;IAEtB,4EAA4E;IAC5E,IAAI,aAAa,IAAI,aAAa,KAAK,CAAC,EAAE;QACtC,MAAM,mBAAmB,GAAG,cAAc,GAAG,UAAU,CAAC;QACxD,MAAM,qBAAqB,GAAG,cAAc,GAAG,aAAa,CAAC;QAC7D,MAAM,eAAe,GAAG,qBAAqB,GAAG,sBAAsB,CAAC;QACvE,MAAM,sBAAsB,GAAG,mBAAmB,GAAG,eAAe,CAAC;QAErE,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,I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C,CAAC;QACP,CAAC,EAAE,sBAAsB,CAAC,CAAC;IAC/B,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAE3B,0DAA0D;IAC1D,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE;QAChC,OAAO,KAAK,CAAC,QAAQ,CAAC;KACzB;IAED,OAAO,CACH,MAAC,eAAe,eACZ,KAAC,cAAc,mCAAkC,EAChD,QAAQ,IAAI,CACT,8BACI,KAAC,eAAe,cAAE,QAAQ,CAAC,OAAO,GAAmB,EACrD,KAAC,WAAW,IAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAI,IACpE,CACN,IACa,CACrB,CAAC;AACN,CAAC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RouteContent } from '../../types';
|
|
2
|
+
interface RouterContentProps {
|
|
3
|
+
/** The list of routes to render content conditionally from */
|
|
4
|
+
routes: Array<RouteContent>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The RouterContent component takes a list of RouterContent objects from the api and create a react-router based on
|
|
8
|
+
* them.
|
|
9
|
+
*
|
|
10
|
+
* @param props - the component props
|
|
11
|
+
*/
|
|
12
|
+
declare function RouterContent(props: RouterContentProps): JSX.Element;
|
|
13
|
+
export default RouterContent;
|
|
14
|
+
//# sourceMappingURL=router-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router-content.d.ts","sourceRoot":"","sources":["../../../js/components/router-content/router-content.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAUvC,UAAU,kBAAkB;IACxB,8DAA8D;IAC9D,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CAC/B;AAED;;;;;GAKG;AACH,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAY7D;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Redirect, Route, Switch } from 'react-router-dom';
|
|
3
|
+
import { DynamicComponent, PrivateRoute } from '../../shared';
|
|
4
|
+
const PageNotFound = () => {
|
|
5
|
+
return (_jsx("div", { style: { alignItems: 'center', display: 'flex', justifyContent: 'center', width: '100%' }, children: _jsx("h2", { children: "404 - page not found" }) }));
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The RouterContent component takes a list of RouterContent objects from the api and create a react-router based on
|
|
9
|
+
* them.
|
|
10
|
+
*
|
|
11
|
+
* @param props - the component props
|
|
12
|
+
*/
|
|
13
|
+
function RouterContent(props) {
|
|
14
|
+
return (_jsxs(Switch, { children: [props.routes.map(({ content, route, reset_vars_on_load, name }) => (_jsx(PrivateRoute, { name: name, path: route, reset_vars_on_load: reset_vars_on_load, children: _jsx(DynamicComponent, { component: content }) }, route))), _jsx(Route, { exact: true, path: "/", render: () => _jsx(Redirect, { to: props.routes[0].route }) }), _jsx(Route, { component: PageNotFound })] }));
|
|
15
|
+
}
|
|
16
|
+
export default RouterContent;
|
|
17
|
+
//# sourceMappingURL=router-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router-content.js","sourceRoot":"","sources":["../../../js/components/router-content/router-content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG1D,MAAM,YAAY,GAAG,GAAgB,EAAE;IACnC,OAAO,CACH,cAAK,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,YAC1F,gDAA6B,GAC3B,CACT,CAAC;AACN,CAAC,CAAC;AAOF;;;;;GAKG;AACH,SAAS,aAAa,CAAC,KAAyB;IAC5C,OAAO,CACH,MAAC,MAAM,eACF,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAChE,KAAC,YAAY,IAAa,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,YACrF,KAAC,gBAAgB,IAAC,SAAS,EAAE,OAAO,GAAI,IADzB,KAAK,CAET,CAClB,CAAC,EACF,KAAC,KAAK,IAAC,KAAK,QAAC,IAAI,EAAC,GAAG,EAAC,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,QAAQ,IAAC,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,GAAI,GAAI,EAC/E,KAAC,KAAK,IAAC,SAAS,EAAE,YAAY,GAAI,IAC7B,CACZ,CAAC;AACN,CAAC;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentInstance } from '../../types';
|
|
2
|
+
interface SideBarFrameProps {
|
|
3
|
+
content: ComponentInstance;
|
|
4
|
+
hide_logo?: boolean;
|
|
5
|
+
logo_path?: string;
|
|
6
|
+
logo_position: 'top' | 'bottom';
|
|
7
|
+
logo_width?: string;
|
|
8
|
+
side_bar: ComponentInstance;
|
|
9
|
+
side_bar_padding?: string;
|
|
10
|
+
side_bar_position?: 'left' | 'right';
|
|
11
|
+
side_bar_width?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The SideBarFrame component is designed as a root component for an app built using the Dara core framework. It adds
|
|
15
|
+
* a dark blue side bar to the left of the screen and displays a main content on a light grey background in the center
|
|
16
|
+
*
|
|
17
|
+
* It exposes two slots for registering content: side-bar & content
|
|
18
|
+
*/
|
|
19
|
+
declare function SideBarFrame(props: SideBarFrameProps): JSX.Element;
|
|
20
|
+
export default SideBarFrame;
|
|
21
|
+
//# sourceMappingURL=side-bar-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-bar-frame.d.ts","sourceRoot":"","sources":["../../../js/components/side-bar-frame/side-bar-frame.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAsE5C,UAAU,iBAAiB;IACvB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,KAAK,GAAG,QAAQ,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAID;;;;;GAKG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAgC3D;AAED,eAAe,YAAY,CAAC"}
|