@everysk/apps-sdk 0.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +128 -0
- package/dist/EveryskApp.d.ts +73 -0
- package/dist/EveryskApp.d.ts.map +1 -0
- package/dist/EveryskApp.js +66 -0
- package/dist/EveryskApp.js.map +1 -0
- package/dist/agGrid/agGridTheme.d.ts +77 -0
- package/dist/agGrid/agGridTheme.d.ts.map +1 -0
- package/dist/agGrid/agGridTheme.js +88 -0
- package/dist/agGrid/agGridTheme.js.map +1 -0
- package/dist/agGrid/index.d.ts +4 -0
- package/dist/agGrid/index.d.ts.map +1 -0
- package/dist/agGrid/index.js +3 -0
- package/dist/api/datastore.d.ts +68 -0
- package/dist/api/datastore.d.ts.map +1 -0
- package/dist/api/datastore.js +125 -0
- package/dist/api/datastore.js.map +1 -0
- package/dist/api/entityQuery.d.ts +78 -0
- package/dist/api/entityQuery.d.ts.map +1 -0
- package/dist/api/entityQuery.js +100 -0
- package/dist/api/entityQuery.js.map +1 -0
- package/dist/api/file.d.ts +70 -0
- package/dist/api/file.d.ts.map +1 -0
- package/dist/api/file.js +126 -0
- package/dist/api/file.js.map +1 -0
- package/dist/api/portfolio.d.ts +67 -0
- package/dist/api/portfolio.d.ts.map +1 -0
- package/dist/api/portfolio.js +125 -0
- package/dist/api/portfolio.js.map +1 -0
- package/dist/api/profile.d.ts +40 -0
- package/dist/api/profile.d.ts.map +1 -0
- package/dist/api/profile.js +71 -0
- package/dist/api/profile.js.map +1 -0
- package/dist/api/websocketsConfig.d.ts +13 -0
- package/dist/api/websocketsConfig.d.ts.map +1 -0
- package/dist/api/websocketsConfig.js +25 -0
- package/dist/api/websocketsConfig.js.map +1 -0
- package/dist/api/workflow.d.ts +154 -0
- package/dist/api/workflow.d.ts.map +1 -0
- package/dist/api/workflow.js +289 -0
- package/dist/api/workflow.js.map +1 -0
- package/dist/api/workspace.d.ts +29 -0
- package/dist/api/workspace.d.ts.map +1 -0
- package/dist/api/workspace.js +54 -0
- package/dist/api/workspace.js.map +1 -0
- package/dist/components/ui/EveryskIcon/index.d.ts +5 -0
- package/dist/components/ui/EveryskIcon/index.d.ts.map +1 -0
- package/dist/components/ui/EveryskIcon/index.js +25 -0
- package/dist/components/ui/EveryskIcon/index.js.map +1 -0
- package/dist/components/ui/Footer/index.d.ts +5 -0
- package/dist/components/ui/Footer/index.d.ts.map +1 -0
- package/dist/components/ui/Footer/index.js +23 -0
- package/dist/components/ui/Footer/index.js.map +1 -0
- package/dist/components/ui/GlobalLoading/index.d.ts +8 -0
- package/dist/components/ui/GlobalLoading/index.d.ts.map +1 -0
- package/dist/components/ui/GlobalLoading/index.js +42 -0
- package/dist/components/ui/GlobalLoading/index.js.map +1 -0
- package/dist/components/ui/PageContainer/index.d.ts +7 -0
- package/dist/components/ui/PageContainer/index.d.ts.map +1 -0
- package/dist/components/ui/PageContainer/index.js +20 -0
- package/dist/components/ui/PageContainer/index.js.map +1 -0
- package/dist/components/ui/Toolbar/index.d.ts +5 -0
- package/dist/components/ui/Toolbar/index.d.ts.map +1 -0
- package/dist/components/ui/Toolbar/index.js +32 -0
- package/dist/components/ui/Toolbar/index.js.map +1 -0
- package/dist/contexts/agGridLicenseContext/provider.d.ts +51 -0
- package/dist/contexts/agGridLicenseContext/provider.d.ts.map +1 -0
- package/dist/contexts/agGridLicenseContext/provider.js +58 -0
- package/dist/contexts/agGridLicenseContext/provider.js.map +1 -0
- package/dist/contexts/appAlertContext/index.d.ts +3 -0
- package/dist/contexts/appAlertContext/index.d.ts.map +1 -0
- package/dist/contexts/appAlertContext/index.js +7 -0
- package/dist/contexts/appAlertContext/index.js.map +1 -0
- package/dist/contexts/appAlertContext/provider.d.ts +40 -0
- package/dist/contexts/appAlertContext/provider.d.ts.map +1 -0
- package/dist/contexts/appAlertContext/provider.js +96 -0
- package/dist/contexts/appAlertContext/provider.js.map +1 -0
- package/dist/contexts/appAlertContext/types.d.ts +15 -0
- package/dist/contexts/appAlertContext/types.d.ts.map +1 -0
- package/dist/contexts/appAlertContext/useAppAlert.d.ts +30 -0
- package/dist/contexts/appAlertContext/useAppAlert.d.ts.map +1 -0
- package/dist/contexts/appAlertContext/useAppAlert.js +40 -0
- package/dist/contexts/appAlertContext/useAppAlert.js.map +1 -0
- package/dist/contexts/appConfigContext/index.d.ts +3 -0
- package/dist/contexts/appConfigContext/index.d.ts.map +1 -0
- package/dist/contexts/appConfigContext/index.js +7 -0
- package/dist/contexts/appConfigContext/index.js.map +1 -0
- package/dist/contexts/appConfigContext/provider.d.ts +45 -0
- package/dist/contexts/appConfigContext/provider.d.ts.map +1 -0
- package/dist/contexts/appConfigContext/provider.js +63 -0
- package/dist/contexts/appConfigContext/provider.js.map +1 -0
- package/dist/contexts/appConfigContext/types.d.ts +28 -0
- package/dist/contexts/appConfigContext/types.d.ts.map +1 -0
- package/dist/contexts/appConfigContext/useAppConfig.d.ts +20 -0
- package/dist/contexts/appConfigContext/useAppConfig.d.ts.map +1 -0
- package/dist/contexts/appConfigContext/useAppConfig.js +30 -0
- package/dist/contexts/appConfigContext/useAppConfig.js.map +1 -0
- package/dist/contexts/webSocketContext/constants.d.ts +4 -0
- package/dist/contexts/webSocketContext/constants.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/constants.js +8 -0
- package/dist/contexts/webSocketContext/constants.js.map +1 -0
- package/dist/contexts/webSocketContext/handler.d.ts +43 -0
- package/dist/contexts/webSocketContext/handler.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/handler.js +87 -0
- package/dist/contexts/webSocketContext/handler.js.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.d.ts +19 -0
- package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.js +31 -0
- package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.js.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocket/index.d.ts +11 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocket/index.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js +21 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.d.ts +30 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.js +44 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.js.map +1 -0
- package/dist/contexts/webSocketContext/index.d.ts +3 -0
- package/dist/contexts/webSocketContext/index.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/index.js +7 -0
- package/dist/contexts/webSocketContext/index.js.map +1 -0
- package/dist/contexts/webSocketContext/provider.d.ts +39 -0
- package/dist/contexts/webSocketContext/provider.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/provider.js +121 -0
- package/dist/contexts/webSocketContext/provider.js.map +1 -0
- package/dist/contexts/webSocketContext/types.d.ts +41 -0
- package/dist/contexts/webSocketContext/types.d.ts.map +1 -0
- package/dist/datastore/index.d.ts +7 -0
- package/dist/datastore/index.d.ts.map +1 -0
- package/dist/file/index.d.ts +6 -0
- package/dist/file/index.d.ts.map +1 -0
- package/dist/hooks/datastore/useDatastoreMutations.d.ts +151 -0
- package/dist/hooks/datastore/useDatastoreMutations.d.ts.map +1 -0
- package/dist/hooks/datastore/useDatastoreMutations.js +198 -0
- package/dist/hooks/datastore/useDatastoreMutations.js.map +1 -0
- package/dist/hooks/datastore/useFetchDatastore.d.ts +205 -0
- package/dist/hooks/datastore/useFetchDatastore.d.ts.map +1 -0
- package/dist/hooks/datastore/useFetchDatastore.js +85 -0
- package/dist/hooks/datastore/useFetchDatastore.js.map +1 -0
- package/dist/hooks/datastore/useFetchDatastores.d.ts +70 -0
- package/dist/hooks/datastore/useFetchDatastores.d.ts.map +1 -0
- package/dist/hooks/datastore/useFetchDatastores.js +105 -0
- package/dist/hooks/datastore/useFetchDatastores.js.map +1 -0
- package/dist/hooks/file/useFetchFile.d.ts +212 -0
- package/dist/hooks/file/useFetchFile.d.ts.map +1 -0
- package/dist/hooks/file/useFetchFile.js +87 -0
- package/dist/hooks/file/useFetchFile.js.map +1 -0
- package/dist/hooks/file/useFetchFiles.d.ts +60 -0
- package/dist/hooks/file/useFetchFiles.d.ts.map +1 -0
- package/dist/hooks/file/useFetchFiles.js +89 -0
- package/dist/hooks/file/useFetchFiles.js.map +1 -0
- package/dist/hooks/file/useFileMutations.d.ts +161 -0
- package/dist/hooks/file/useFileMutations.d.ts.map +1 -0
- package/dist/hooks/file/useFileMutations.js +208 -0
- package/dist/hooks/file/useFileMutations.js.map +1 -0
- package/dist/hooks/portfolio/useFetchPortfolio.d.ts +210 -0
- package/dist/hooks/portfolio/useFetchPortfolio.d.ts.map +1 -0
- package/dist/hooks/portfolio/useFetchPortfolio.js +85 -0
- package/dist/hooks/portfolio/useFetchPortfolio.js.map +1 -0
- package/dist/hooks/portfolio/useFetchPortfolios.d.ts +60 -0
- package/dist/hooks/portfolio/useFetchPortfolios.d.ts.map +1 -0
- package/dist/hooks/portfolio/useFetchPortfolios.js +89 -0
- package/dist/hooks/portfolio/useFetchPortfolios.js.map +1 -0
- package/dist/hooks/portfolio/usePortfolioMutations.d.ts +171 -0
- package/dist/hooks/portfolio/usePortfolioMutations.d.ts.map +1 -0
- package/dist/hooks/portfolio/usePortfolioMutations.js +218 -0
- package/dist/hooks/portfolio/usePortfolioMutations.js.map +1 -0
- package/dist/hooks/profile/useFetchProfile.d.ts +206 -0
- package/dist/hooks/profile/useFetchProfile.d.ts.map +1 -0
- package/dist/hooks/profile/useFetchProfile.js +70 -0
- package/dist/hooks/profile/useFetchProfile.js.map +1 -0
- package/dist/hooks/useAxios.d.ts +40 -0
- package/dist/hooks/useAxios.d.ts.map +1 -0
- package/dist/hooks/useAxios.js +76 -0
- package/dist/hooks/useAxios.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkerExecution.d.ts +198 -0
- package/dist/hooks/workflow/useFetchWorkerExecution.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkerExecution.js +69 -0
- package/dist/hooks/workflow/useFetchWorkerExecution.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts +52 -0
- package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkerExecutions.js +83 -0
- package/dist/hooks/workflow/useFetchWorkerExecutions.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflow.d.ts +195 -0
- package/dist/hooks/workflow/useFetchWorkflow.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflow.js +70 -0
- package/dist/hooks/workflow/useFetchWorkflow.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts +198 -0
- package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflowExecution.js +69 -0
- package/dist/hooks/workflow/useFetchWorkflowExecution.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts +49 -0
- package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflowExecutions.js +77 -0
- package/dist/hooks/workflow/useFetchWorkflowExecutions.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflows.d.ts +47 -0
- package/dist/hooks/workflow/useFetchWorkflows.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflows.js +67 -0
- package/dist/hooks/workflow/useFetchWorkflows.js.map +1 -0
- package/dist/hooks/workflow/useRunWorkflow.d.ts +30 -0
- package/dist/hooks/workflow/useRunWorkflow.d.ts.map +1 -0
- package/dist/hooks/workflow/useRunWorkflow.js +50 -0
- package/dist/hooks/workflow/useRunWorkflow.js.map +1 -0
- package/dist/hooks/workspace/useFetchWorkspace.d.ts +197 -0
- package/dist/hooks/workspace/useFetchWorkspace.d.ts.map +1 -0
- package/dist/hooks/workspace/useFetchWorkspace.js +65 -0
- package/dist/hooks/workspace/useFetchWorkspace.js.map +1 -0
- package/dist/hooks/workspace/useFetchWorkspaces.d.ts +46 -0
- package/dist/hooks/workspace/useFetchWorkspaces.d.ts.map +1 -0
- package/dist/hooks/workspace/useFetchWorkspaces.js +66 -0
- package/dist/hooks/workspace/useFetchWorkspaces.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +50 -0
- package/dist/lib/datastoreTable.d.ts +126 -0
- package/dist/lib/datastoreTable.d.ts.map +1 -0
- package/dist/lib/datastoreTable.js +146 -0
- package/dist/lib/datastoreTable.js.map +1 -0
- package/dist/lib/queryClient.d.ts +24 -0
- package/dist/lib/queryClient.d.ts.map +1 -0
- package/dist/lib/queryClient.js +48 -0
- package/dist/lib/queryClient.js.map +1 -0
- package/dist/portfolio/index.d.ts +6 -0
- package/dist/portfolio/index.d.ts.map +1 -0
- package/dist/profile/index.d.ts +4 -0
- package/dist/profile/index.d.ts.map +1 -0
- package/dist/socket/index.d.ts +10 -0
- package/dist/socket/index.d.ts.map +1 -0
- package/dist/socket/index.js +9 -0
- package/dist/test/index.d.ts +2 -0
- package/dist/test/index.d.ts.map +1 -0
- package/dist/test/index.js +2 -0
- package/dist/test/mocks/agGridEnterprise.d.ts +38 -0
- package/dist/test/mocks/agGridEnterprise.d.ts.map +1 -0
- package/dist/test/mocks/agGridEnterprise.js +43 -0
- package/dist/test/mocks/agGridEnterprise.js.map +1 -0
- package/dist/test/mocks/agGridReact.d.ts +42 -0
- package/dist/test/mocks/agGridReact.d.ts.map +1 -0
- package/dist/test/mocks/agGridReact.js +47 -0
- package/dist/test/mocks/agGridReact.js.map +1 -0
- package/dist/test/mocks/index.d.ts +5 -0
- package/dist/test/mocks/index.d.ts.map +1 -0
- package/dist/test/mocks/index.js +4 -0
- package/dist/test/mocks/socketIoClient.d.ts +45 -0
- package/dist/test/mocks/socketIoClient.d.ts.map +1 -0
- package/dist/test/mocks/socketIoClient.js +54 -0
- package/dist/test/mocks/socketIoClient.js.map +1 -0
- package/dist/test/renderWithProviders.d.ts +107 -0
- package/dist/test/renderWithProviders.d.ts.map +1 -0
- package/dist/test/renderWithProviders.js +85 -0
- package/dist/test/renderWithProviders.js.map +1 -0
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/test/setup.js +25 -0
- package/dist/test/setup.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +12 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.js +22 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/index.d.ts +9 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/overrides/index.d.ts +7 -0
- package/dist/theme/overrides/index.d.ts.map +1 -0
- package/dist/theme/overrides/index.js +31 -0
- package/dist/theme/overrides/index.js.map +1 -0
- package/dist/theme/overrides/muiButton.d.ts +3 -0
- package/dist/theme/overrides/muiButton.d.ts.map +1 -0
- package/dist/theme/overrides/muiButton.js +6 -0
- package/dist/theme/overrides/muiButton.js.map +1 -0
- package/dist/theme/overrides/muiCssBaseline.d.ts +31 -0
- package/dist/theme/overrides/muiCssBaseline.d.ts.map +1 -0
- package/dist/theme/overrides/muiCssBaseline.js +27 -0
- package/dist/theme/overrides/muiCssBaseline.js.map +1 -0
- package/dist/theme/overrides/muiDatePicker.d.ts +10 -0
- package/dist/theme/overrides/muiDatePicker.d.ts.map +1 -0
- package/dist/theme/overrides/muiDatePicker.js +6 -0
- package/dist/theme/overrides/muiDatePicker.js.map +1 -0
- package/dist/theme/overrides/muiFormControl.d.ts +3 -0
- package/dist/theme/overrides/muiFormControl.d.ts.map +1 -0
- package/dist/theme/overrides/muiFormControl.js +6 -0
- package/dist/theme/overrides/muiFormControl.js.map +1 -0
- package/dist/theme/overrides/muiIconButton.d.ts +3 -0
- package/dist/theme/overrides/muiIconButton.d.ts.map +1 -0
- package/dist/theme/overrides/muiIconButton.js +6 -0
- package/dist/theme/overrides/muiIconButton.js.map +1 -0
- package/dist/theme/overrides/muiSelect.d.ts +3 -0
- package/dist/theme/overrides/muiSelect.d.ts.map +1 -0
- package/dist/theme/overrides/muiSelect.js +6 -0
- package/dist/theme/overrides/muiSelect.js.map +1 -0
- package/dist/theme/overrides/muiSvgIcon.d.ts +3 -0
- package/dist/theme/overrides/muiSvgIcon.d.ts.map +1 -0
- package/dist/theme/overrides/muiSvgIcon.js +6 -0
- package/dist/theme/overrides/muiSvgIcon.js.map +1 -0
- package/dist/theme/overrides/muiTextField.d.ts +3 -0
- package/dist/theme/overrides/muiTextField.d.ts.map +1 -0
- package/dist/theme/overrides/muiTextField.js +6 -0
- package/dist/theme/overrides/muiTextField.js.map +1 -0
- package/dist/theme/overrides/muiToggleButton.d.ts +3 -0
- package/dist/theme/overrides/muiToggleButton.d.ts.map +1 -0
- package/dist/theme/overrides/muiToggleButton.js +6 -0
- package/dist/theme/overrides/muiToggleButton.js.map +1 -0
- package/dist/theme/overrides/muiToggleButtonGroup.d.ts +3 -0
- package/dist/theme/overrides/muiToggleButtonGroup.d.ts.map +1 -0
- package/dist/theme/overrides/muiToggleButtonGroup.js +6 -0
- package/dist/theme/overrides/muiToggleButtonGroup.js.map +1 -0
- package/dist/theme/themes/DefaultDark.d.ts +7 -0
- package/dist/theme/themes/DefaultDark.d.ts.map +1 -0
- package/dist/theme/themes/DefaultDark.js +15 -0
- package/dist/theme/themes/DefaultDark.js.map +1 -0
- package/dist/theme/themes/DefaultLight.d.ts +7 -0
- package/dist/theme/themes/DefaultLight.d.ts.map +1 -0
- package/dist/theme/themes/DefaultLight.js +15 -0
- package/dist/theme/themes/DefaultLight.js.map +1 -0
- package/dist/theme/themes/EveryskDark.d.ts +15 -0
- package/dist/theme/themes/EveryskDark.d.ts.map +1 -0
- package/dist/theme/themes/EveryskDark.js +63 -0
- package/dist/theme/themes/EveryskDark.js.map +1 -0
- package/dist/theme/themes/EveryskLight.d.ts +21 -0
- package/dist/theme/themes/EveryskLight.d.ts.map +1 -0
- package/dist/theme/themes/EveryskLight.js +69 -0
- package/dist/theme/themes/EveryskLight.js.map +1 -0
- package/dist/theme/themes/MidnightEmber.d.ts +3 -0
- package/dist/theme/themes/MidnightEmber.d.ts.map +1 -0
- package/dist/theme/themes/MidnightEmber.js +31 -0
- package/dist/theme/themes/MidnightEmber.js.map +1 -0
- package/dist/theme/themes/index.d.ts +17 -0
- package/dist/theme/themes/index.d.ts.map +1 -0
- package/dist/theme/themes/index.js +32 -0
- package/dist/theme/themes/index.js.map +1 -0
- package/dist/types/anyRecord.d.ts +4 -0
- package/dist/types/anyRecord.d.ts.map +1 -0
- package/dist/types/datastore.d.ts +26 -0
- package/dist/types/datastore.d.ts.map +1 -0
- package/dist/types/entityQuery.d.ts +47 -0
- package/dist/types/entityQuery.d.ts.map +1 -0
- package/dist/types/file.d.ts +29 -0
- package/dist/types/file.d.ts.map +1 -0
- package/dist/types/portfolio.d.ts +77 -0
- package/dist/types/portfolio.d.ts.map +1 -0
- package/dist/types/profile.d.ts +37 -0
- package/dist/types/profile.d.ts.map +1 -0
- package/dist/types/workflow.d.ts +68 -0
- package/dist/types/workflow.d.ts.map +1 -0
- package/dist/types/workspace.d.ts +13 -0
- package/dist/types/workspace.d.ts.map +1 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/workflow/index.d.ts +10 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workspace/index.d.ts +5 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/package.json +148 -0
- package/src/EveryskApp.tsx +108 -0
- package/src/agGrid/agGridTheme.ts +113 -0
- package/src/agGrid/index.ts +15 -0
- package/src/api/datastore.ts +175 -0
- package/src/api/entityQuery.ts +101 -0
- package/src/api/file.ts +174 -0
- package/src/api/portfolio.ts +190 -0
- package/src/api/profile.ts +80 -0
- package/src/api/websocketsConfig.ts +32 -0
- package/src/api/workflow.ts +427 -0
- package/src/api/workspace.ts +72 -0
- package/src/components/ui/EveryskIcon/index.tsx +24 -0
- package/src/components/ui/Footer/index.tsx +30 -0
- package/src/components/ui/GlobalLoading/index.tsx +38 -0
- package/src/components/ui/PageContainer/index.tsx +14 -0
- package/src/components/ui/Toolbar/index.tsx +44 -0
- package/src/contexts/agGridLicenseContext/provider.tsx +63 -0
- package/src/contexts/appAlertContext/index.tsx +4 -0
- package/src/contexts/appAlertContext/provider.tsx +92 -0
- package/src/contexts/appAlertContext/types.ts +17 -0
- package/src/contexts/appAlertContext/useAppAlert.ts +39 -0
- package/src/contexts/appConfigContext/index.tsx +4 -0
- package/src/contexts/appConfigContext/provider.tsx +67 -0
- package/src/contexts/appConfigContext/types.ts +28 -0
- package/src/contexts/appConfigContext/useAppConfig.ts +30 -0
- package/src/contexts/webSocketContext/constants.ts +3 -0
- package/src/contexts/webSocketContext/handler.ts +108 -0
- package/src/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.ts +36 -0
- package/src/contexts/webSocketContext/hooks/useWebSocket/index.ts +18 -0
- package/src/contexts/webSocketContext/hooks/useWebSocketSubscription/index.ts +45 -0
- package/src/contexts/webSocketContext/index.tsx +5 -0
- package/src/contexts/webSocketContext/provider.tsx +125 -0
- package/src/contexts/webSocketContext/types.ts +50 -0
- package/src/datastore/index.ts +14 -0
- package/src/file/index.ts +13 -0
- package/src/hooks/datastore/useDatastoreMutations.ts +221 -0
- package/src/hooks/datastore/useFetchDatastore.ts +95 -0
- package/src/hooks/datastore/useFetchDatastores.ts +162 -0
- package/src/hooks/file/useFetchFile.ts +93 -0
- package/src/hooks/file/useFetchFiles.ts +109 -0
- package/src/hooks/file/useFileMutations.ts +240 -0
- package/src/hooks/portfolio/useFetchPortfolio.ts +94 -0
- package/src/hooks/portfolio/useFetchPortfolios.ts +109 -0
- package/src/hooks/portfolio/usePortfolioMutations.ts +250 -0
- package/src/hooks/profile/useFetchProfile.ts +93 -0
- package/src/hooks/useAxios.ts +98 -0
- package/src/hooks/workflow/useFetchWorkerExecution.ts +78 -0
- package/src/hooks/workflow/useFetchWorkerExecutions.ts +98 -0
- package/src/hooks/workflow/useFetchWorkflow.ts +76 -0
- package/src/hooks/workflow/useFetchWorkflowExecution.ts +79 -0
- package/src/hooks/workflow/useFetchWorkflowExecutions.ts +95 -0
- package/src/hooks/workflow/useFetchWorkflows.ts +84 -0
- package/src/hooks/workflow/useRunWorkflow.ts +62 -0
- package/src/hooks/workspace/useFetchWorkspace.ts +78 -0
- package/src/hooks/workspace/useFetchWorkspaces.ts +86 -0
- package/src/index.ts +72 -0
- package/src/lib/datastoreTable.ts +159 -0
- package/src/lib/queryClient.ts +60 -0
- package/src/portfolio/index.ts +13 -0
- package/src/profile/index.ts +11 -0
- package/src/socket/index.ts +19 -0
- package/src/test/index.ts +10 -0
- package/src/test/mocks/agGridEnterprise.ts +45 -0
- package/src/test/mocks/agGridReact.tsx +61 -0
- package/src/test/mocks/index.ts +22 -0
- package/src/test/mocks/socketIoClient.ts +78 -0
- package/src/test/renderWithProviders.tsx +114 -0
- package/src/test/setup.ts +46 -0
- package/src/theme/ThemeProvider.tsx +33 -0
- package/src/theme/index.ts +15 -0
- package/src/theme/overrides/index.ts +31 -0
- package/src/theme/overrides/muiButton.ts +7 -0
- package/src/theme/overrides/muiCssBaseline.ts +35 -0
- package/src/theme/overrides/muiDatePicker.ts +5 -0
- package/src/theme/overrides/muiFormControl.ts +7 -0
- package/src/theme/overrides/muiIconButton.ts +7 -0
- package/src/theme/overrides/muiSelect.ts +7 -0
- package/src/theme/overrides/muiSvgIcon.ts +7 -0
- package/src/theme/overrides/muiTextField.ts +7 -0
- package/src/theme/overrides/muiToggleButton.ts +7 -0
- package/src/theme/overrides/muiToggleButtonGroup.ts +7 -0
- package/src/theme/themes/DefaultDark.ts +14 -0
- package/src/theme/themes/DefaultLight.ts +14 -0
- package/src/theme/themes/EveryskDark.ts +62 -0
- package/src/theme/themes/EveryskLight.ts +68 -0
- package/src/theme/themes/MidnightEmber.ts +30 -0
- package/src/theme/themes/index.ts +35 -0
- package/src/types/anyRecord.ts +4 -0
- package/src/types/datastore.ts +33 -0
- package/src/types/entityQuery.ts +64 -0
- package/src/types/file.ts +32 -0
- package/src/types/portfolio.ts +81 -0
- package/src/types/profile.ts +39 -0
- package/src/types/workflow.ts +76 -0
- package/src/types/workspace.ts +15 -0
- package/src/ui/index.ts +14 -0
- package/src/workflow/index.ts +17 -0
- package/src/workspace/index.ts +12 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { EntitySingleResponse, EntityListResponse, DeleteEntityResponse } from "./entityQuery";
|
|
2
|
+
/**
|
|
3
|
+
* A file stored in a workspace.
|
|
4
|
+
*
|
|
5
|
+
* Named EveryskFile, not File: everything the SDK exports now shares one entry point, and a
|
|
6
|
+
* type called `File` there would shadow the DOM's `File` for anyone who imported it —
|
|
7
|
+
* silently, and only where it matters.
|
|
8
|
+
*/
|
|
9
|
+
export type EveryskFile = {
|
|
10
|
+
id: string;
|
|
11
|
+
workspace: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
content_type: string;
|
|
15
|
+
url?: string;
|
|
16
|
+
hash?: string;
|
|
17
|
+
date?: string;
|
|
18
|
+
date_time?: string;
|
|
19
|
+
created?: number;
|
|
20
|
+
updated?: number;
|
|
21
|
+
version: string;
|
|
22
|
+
link_uid: string | null;
|
|
23
|
+
data: string | null;
|
|
24
|
+
tags?: string[];
|
|
25
|
+
};
|
|
26
|
+
export type FileSingleResponse = EntitySingleResponse<"file", EveryskFile>;
|
|
27
|
+
export type FileListResponse = EntityListResponse<"files", EveryskFile>;
|
|
28
|
+
export type DeleteFileResponse = DeleteEntityResponse<"files">;
|
|
29
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/types/file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEpG;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAE3E,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAExE,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { DeleteEntityResponse, EntityListResponse, EntitySingleResponse } from "./entityQuery";
|
|
2
|
+
export type Security = {
|
|
3
|
+
instrument_type: string | null;
|
|
4
|
+
coupon: unknown | null;
|
|
5
|
+
issue_price: unknown | null;
|
|
6
|
+
display: string | null;
|
|
7
|
+
asset_subclass: string | null;
|
|
8
|
+
market_value: number | null;
|
|
9
|
+
rate: unknown | null;
|
|
10
|
+
book: unknown | null;
|
|
11
|
+
symbol: string | null;
|
|
12
|
+
percent_index: unknown | null;
|
|
13
|
+
settlement: unknown | null;
|
|
14
|
+
issuer_type: unknown | null;
|
|
15
|
+
label: string | null;
|
|
16
|
+
accounting: unknown | null;
|
|
17
|
+
market_price: number | null;
|
|
18
|
+
hash: string | null;
|
|
19
|
+
extra_data: unknown | null;
|
|
20
|
+
multiplier: number | null;
|
|
21
|
+
option_type: unknown | null;
|
|
22
|
+
error_type: string | null;
|
|
23
|
+
exchange: string | null;
|
|
24
|
+
premium: unknown | null;
|
|
25
|
+
fx_rate: number | null;
|
|
26
|
+
ticker: string | null;
|
|
27
|
+
status: string | null;
|
|
28
|
+
currency: string | null;
|
|
29
|
+
operation: unknown | null;
|
|
30
|
+
comparable: string | null;
|
|
31
|
+
market_value_in_base: number | null;
|
|
32
|
+
issuer: unknown | null;
|
|
33
|
+
unrealized_pl_in_base: number | null;
|
|
34
|
+
unrealized_pl: number | null;
|
|
35
|
+
instrument_class: string | null;
|
|
36
|
+
issue_date: unknown | null;
|
|
37
|
+
series: unknown | null;
|
|
38
|
+
quantity: number | null;
|
|
39
|
+
id: string | null;
|
|
40
|
+
cost_price: number | null;
|
|
41
|
+
isin: string | null;
|
|
42
|
+
strike: unknown | null;
|
|
43
|
+
asset_class: string | null;
|
|
44
|
+
look_through_reference: unknown | null;
|
|
45
|
+
return_date: unknown | null;
|
|
46
|
+
underlying: unknown | null;
|
|
47
|
+
maturity_date: unknown | null;
|
|
48
|
+
previous_quantity: number | null;
|
|
49
|
+
warranty: unknown | null;
|
|
50
|
+
name: string | null;
|
|
51
|
+
error_message: string | null;
|
|
52
|
+
indexer: unknown | null;
|
|
53
|
+
trader: unknown | null;
|
|
54
|
+
trade_id: unknown | null;
|
|
55
|
+
};
|
|
56
|
+
export type Portfolio = {
|
|
57
|
+
id: string;
|
|
58
|
+
name?: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
base_currency: string;
|
|
61
|
+
securities: Security[];
|
|
62
|
+
nlv?: number;
|
|
63
|
+
date: string;
|
|
64
|
+
date_time?: string;
|
|
65
|
+
tags?: string[];
|
|
66
|
+
workspace: string;
|
|
67
|
+
created?: number;
|
|
68
|
+
updated?: number;
|
|
69
|
+
version?: string;
|
|
70
|
+
link_uid?: string | null;
|
|
71
|
+
level?: string | null;
|
|
72
|
+
check_securities?: boolean;
|
|
73
|
+
};
|
|
74
|
+
export type PortfolioSingleResponse = EntitySingleResponse<"portfolio", Portfolio>;
|
|
75
|
+
export type PortfolioListResponse = EntityListResponse<"portfolios", Portfolio>;
|
|
76
|
+
export type DeletePortfolioResponse = DeleteEntityResponse<"portfolios">;
|
|
77
|
+
//# sourceMappingURL=portfolio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portfolio.d.ts","sourceRoot":"","sources":["../../src/types/portfolio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEpG,MAAM,MAAM,QAAQ,GAAG;IACrB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACr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,CAAC;AAEhF,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile — the logged user, as returned by `GET /api/profile`.
|
|
3
|
+
*
|
|
4
|
+
* The endpoint resolves the user from the session, so there is no id to ask for: an app always
|
|
5
|
+
* gets the profile of whoever is using it.
|
|
6
|
+
*/
|
|
7
|
+
export interface Profile {
|
|
8
|
+
email: string;
|
|
9
|
+
user_type: string;
|
|
10
|
+
region: string;
|
|
11
|
+
company_name: string;
|
|
12
|
+
first_name: string;
|
|
13
|
+
last_name: string;
|
|
14
|
+
phone: string;
|
|
15
|
+
address: string;
|
|
16
|
+
billing_email: string;
|
|
17
|
+
time_zone: string;
|
|
18
|
+
company_logo: string;
|
|
19
|
+
user_role: string;
|
|
20
|
+
skin_theme: string;
|
|
21
|
+
account_deletion_requested: boolean;
|
|
22
|
+
asset: unknown;
|
|
23
|
+
owner: unknown;
|
|
24
|
+
auto_refresh: unknown;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* ProfileResponse — the endpoint's envelope.
|
|
29
|
+
*
|
|
30
|
+
* It does not follow `EntitySingleResponse`: `/api/profile` is not a queryable entity, so the
|
|
31
|
+
* payload carries a `status` and no `next_page_token`.
|
|
32
|
+
*/
|
|
33
|
+
export type ProfileResponse = {
|
|
34
|
+
status: string;
|
|
35
|
+
profile: Profile;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/types/profile.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B,EAAE,OAAO,CAAC;IAGpC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { DeleteEntityResponse, EntityListResponse, EntitySingleResponse } from "./entityQuery";
|
|
2
|
+
export interface Workflow {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
workspace: string;
|
|
6
|
+
description: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
status: string;
|
|
9
|
+
created: number;
|
|
10
|
+
updated: number;
|
|
11
|
+
version: string;
|
|
12
|
+
trigger_enabled: boolean;
|
|
13
|
+
trigger_type: string;
|
|
14
|
+
trigger_config: Record<string, unknown>;
|
|
15
|
+
starter_worker_id: string;
|
|
16
|
+
ender_worker_id: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface WorkflowExecution {
|
|
20
|
+
id: string;
|
|
21
|
+
workflow_id: string;
|
|
22
|
+
workflow_name: string;
|
|
23
|
+
workspace: string;
|
|
24
|
+
status: string;
|
|
25
|
+
run_status: string;
|
|
26
|
+
duration: number;
|
|
27
|
+
real_execution_time: number;
|
|
28
|
+
total_execution_time: number;
|
|
29
|
+
started: number;
|
|
30
|
+
created: number;
|
|
31
|
+
updated: number;
|
|
32
|
+
trigger: string;
|
|
33
|
+
started_worker_id: string;
|
|
34
|
+
ender_worker_id: string;
|
|
35
|
+
ender_worker_execution_id: string;
|
|
36
|
+
resume: unknown;
|
|
37
|
+
version: string;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
export type WorkerExecution = {
|
|
41
|
+
id: string;
|
|
42
|
+
status: string;
|
|
43
|
+
worker_id: string;
|
|
44
|
+
worker_name: string;
|
|
45
|
+
worker_type: string;
|
|
46
|
+
workflow_execution_id: string;
|
|
47
|
+
workflow_id: string;
|
|
48
|
+
workflow_name: string;
|
|
49
|
+
trigger: string;
|
|
50
|
+
created: number;
|
|
51
|
+
updated: number;
|
|
52
|
+
started: number;
|
|
53
|
+
duration: number;
|
|
54
|
+
cpu_time: number;
|
|
55
|
+
result: Record<string, unknown>;
|
|
56
|
+
input_params: Record<string, unknown>;
|
|
57
|
+
version: string;
|
|
58
|
+
};
|
|
59
|
+
export type WorkflowSingleResponse = EntitySingleResponse<"workflow", Workflow>;
|
|
60
|
+
export type WorkflowListResponse = EntityListResponse<"workflows", Workflow>;
|
|
61
|
+
export type DeleteWorkflowResponse = DeleteEntityResponse<"workflows">;
|
|
62
|
+
export type WorkflowExecutionSingleResponse = EntitySingleResponse<"workflow_execution", WorkflowExecution>;
|
|
63
|
+
export type WorkflowExecutionListResponse = EntityListResponse<"workflow_executions", WorkflowExecution>;
|
|
64
|
+
export type WorkerExecutionSingleResponse = EntitySingleResponse<"worker_execution", WorkerExecution>;
|
|
65
|
+
export type WorkerExecutionListResponse = {
|
|
66
|
+
parallel_index_max: number;
|
|
67
|
+
} & EntityListResponse<"worker_executions", WorkerExecution>;
|
|
68
|
+
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/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mBAAmB,EAAE,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EntityListResponse, EntitySingleResponse } from "./entityQuery";
|
|
2
|
+
export interface Workspace {
|
|
3
|
+
name: string;
|
|
4
|
+
group: string | null;
|
|
5
|
+
description: string;
|
|
6
|
+
version: string;
|
|
7
|
+
created: number;
|
|
8
|
+
updated: number;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export type WorkspaceSingleResponse = EntitySingleResponse<"workspace", Workspace>;
|
|
12
|
+
export type WorkspaceListResponse = EntityListResponse<"workspaces", Workspace>;
|
|
13
|
+
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/types/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE9E,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAEnF,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { EveryskIcon } from "../components/ui/EveryskIcon/index.js";
|
|
2
|
+
export { Footer } from "../components/ui/Footer/index.js";
|
|
3
|
+
export { GlobalLoading } from "../components/ui/GlobalLoading/index.js";
|
|
4
|
+
export { PageContainer } from "../components/ui/PageContainer/index.js";
|
|
5
|
+
export { Toolbar } from "../components/ui/Toolbar/index.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "../api/workflow.js";
|
|
2
|
+
export * from "../types/workflow.d.ts";
|
|
3
|
+
export * from "../hooks/workflow/useFetchWorkerExecution.js";
|
|
4
|
+
export * from "../hooks/workflow/useFetchWorkerExecutions.js";
|
|
5
|
+
export * from "../hooks/workflow/useFetchWorkflow.js";
|
|
6
|
+
export * from "../hooks/workflow/useFetchWorkflowExecution.js";
|
|
7
|
+
export * from "../hooks/workflow/useFetchWorkflowExecutions.js";
|
|
8
|
+
export * from "../hooks/workflow/useFetchWorkflows.js";
|
|
9
|
+
export * from "../hooks/workflow/useRunWorkflow.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":"AAQA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":"AAQA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@everysk/apps-sdk",
|
|
3
|
+
"version": "0.1.0-beta.0",
|
|
4
|
+
"description": "Shared runtime for Everysk client applications: EveryskApp, the contexts, entity slices, UI components and the MUI theme.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"everysk",
|
|
7
|
+
"react",
|
|
8
|
+
"mui",
|
|
9
|
+
"tanstack-query",
|
|
10
|
+
"sdk"
|
|
11
|
+
],
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/everysk/apps-sdk.git",
|
|
15
|
+
"directory": "packages/apps-sdk"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/everysk/apps-sdk/tree/main/packages/apps-sdk#readme",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/everysk/apps-sdk/issues"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"./dist/test/setup.js"
|
|
25
|
+
],
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"src",
|
|
29
|
+
"!src/**/*.test.ts",
|
|
30
|
+
"!src/**/*.test.tsx"
|
|
31
|
+
],
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"import": "./dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./ag-grid": {
|
|
38
|
+
"types": "./dist/agGrid/index.d.ts",
|
|
39
|
+
"import": "./dist/agGrid/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./socket": {
|
|
42
|
+
"types": "./dist/socket/index.d.ts",
|
|
43
|
+
"import": "./dist/socket/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./test": {
|
|
46
|
+
"types": "./dist/test/index.d.ts",
|
|
47
|
+
"import": "./dist/test/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./test/mocks": {
|
|
50
|
+
"types": "./dist/test/mocks/index.d.ts",
|
|
51
|
+
"import": "./dist/test/mocks/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./test/setup": {
|
|
54
|
+
"types": "./dist/test/setup.d.ts",
|
|
55
|
+
"import": "./dist/test/setup.js"
|
|
56
|
+
},
|
|
57
|
+
"./package.json": "./package.json"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "vite build && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
61
|
+
"lint": "eslint .",
|
|
62
|
+
"test": "vitest run",
|
|
63
|
+
"test:watch": "vitest",
|
|
64
|
+
"test:coverage": "vitest run --coverage"
|
|
65
|
+
},
|
|
66
|
+
"peerDependencies": {
|
|
67
|
+
"@emotion/react": "^11.14.0",
|
|
68
|
+
"@emotion/styled": "^11.14.1",
|
|
69
|
+
"@mui/material": "^9.0.1",
|
|
70
|
+
"@mui/x-date-pickers": "^9.3.0",
|
|
71
|
+
"@tanstack/react-query": "^5.101.0",
|
|
72
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
73
|
+
"@testing-library/react": "^16.3.2",
|
|
74
|
+
"@testing-library/user-event": "^14.6.1",
|
|
75
|
+
"ag-grid-community": "^35.3.1",
|
|
76
|
+
"ag-grid-enterprise": "^35.3.1",
|
|
77
|
+
"axios": "^1.17.0",
|
|
78
|
+
"react": "^19.2.7",
|
|
79
|
+
"react-dom": "^19.2.7",
|
|
80
|
+
"socket.io-client": "^4.8.3",
|
|
81
|
+
"vitest": "^4.1.8"
|
|
82
|
+
},
|
|
83
|
+
"peerDependenciesMeta": {
|
|
84
|
+
"@testing-library/jest-dom": {
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
"@testing-library/react": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"@testing-library/user-event": {
|
|
91
|
+
"optional": true
|
|
92
|
+
},
|
|
93
|
+
"ag-grid-community": {
|
|
94
|
+
"optional": true
|
|
95
|
+
},
|
|
96
|
+
"ag-grid-enterprise": {
|
|
97
|
+
"optional": true
|
|
98
|
+
},
|
|
99
|
+
"socket.io-client": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"vitest": {
|
|
103
|
+
"optional": true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"devDependencies": {
|
|
107
|
+
"@emotion/react": "^11.14.0",
|
|
108
|
+
"@emotion/styled": "^11.14.1",
|
|
109
|
+
"@eslint/js": "^9.39.4",
|
|
110
|
+
"@mui/material": "^9.0.1",
|
|
111
|
+
"@mui/x-date-pickers": "^9.3.0",
|
|
112
|
+
"@tanstack/react-query": "^5.101.0",
|
|
113
|
+
"@testing-library/dom": "^10.4.1",
|
|
114
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
115
|
+
"@testing-library/react": "^16.3.2",
|
|
116
|
+
"@testing-library/user-event": "^14.6.1",
|
|
117
|
+
"@types/node": "^25.9.1",
|
|
118
|
+
"@types/react": "^19.2.16",
|
|
119
|
+
"@types/react-dom": "^19.2.3",
|
|
120
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
121
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
122
|
+
"ag-grid-community": "^35.3.1",
|
|
123
|
+
"ag-grid-enterprise": "^35.3.1",
|
|
124
|
+
"axios": "^1.17.0",
|
|
125
|
+
"eslint": "^9.39.4",
|
|
126
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
127
|
+
"globals": "^17.6.0",
|
|
128
|
+
"jsdom": "^29.1.1",
|
|
129
|
+
"react": "^19.2.7",
|
|
130
|
+
"react-dom": "^19.2.7",
|
|
131
|
+
"socket.io-client": "^4.8.3",
|
|
132
|
+
"tsc-alias": "^1.8.16",
|
|
133
|
+
"typescript": "^6.0.3",
|
|
134
|
+
"typescript-eslint": "^8.60.1",
|
|
135
|
+
"vite": "^8.0.16",
|
|
136
|
+
"vitest": "^4.1.8"
|
|
137
|
+
},
|
|
138
|
+
"publishConfig": {
|
|
139
|
+
"access": "public"
|
|
140
|
+
},
|
|
141
|
+
"dependencies": {
|
|
142
|
+
"clsx": "^2.1.1"
|
|
143
|
+
},
|
|
144
|
+
"engines": {
|
|
145
|
+
"node": ">=22",
|
|
146
|
+
"npm": ">=12"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { useMemo, type ComponentType, type PropsWithChildren, type ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
import { QueryClientProvider, type QueryClient } from "@tanstack/react-query";
|
|
4
|
+
|
|
5
|
+
import { ThemeProvider } from "@/theme/ThemeProvider";
|
|
6
|
+
import { AppConfigProvider } from "@/contexts/appConfigContext/provider";
|
|
7
|
+
import { AppAlertProvider } from "@/contexts/appAlertContext/provider";
|
|
8
|
+
import { createQueryClient } from "@/lib/queryClient";
|
|
9
|
+
import type { AnyRecord } from "@/types/anyRecord";
|
|
10
|
+
import type { Theme } from "@mui/material/styles";
|
|
11
|
+
|
|
12
|
+
/** A provider is any component that renders its children. */
|
|
13
|
+
export type ProviderComponent = ComponentType<PropsWithChildren>;
|
|
14
|
+
|
|
15
|
+
export type EveryskAppProps = PropsWithChildren<{
|
|
16
|
+
/**
|
|
17
|
+
* The client every `useQuery` in the tree talks to. Defaults to a fresh
|
|
18
|
+
* `createQueryClient()` created once per mount. Pass one to seed the cache, to share it
|
|
19
|
+
* with code outside the tree, or to assert on it from a test.
|
|
20
|
+
*/
|
|
21
|
+
queryClient?: QueryClient;
|
|
22
|
+
/** Overrides `window.APP_ID`. */
|
|
23
|
+
appId?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* The MUI theme. Omitted, the app gets the Everysk dark theme — see `ThemeProvider`.
|
|
26
|
+
*/
|
|
27
|
+
theme?: Theme;
|
|
28
|
+
/** Overrides `window.APP_CONFIG` wholesale. */
|
|
29
|
+
appEnvironmentVar?: AnyRecord;
|
|
30
|
+
/**
|
|
31
|
+
* Optional providers, applied innermost — inside every core provider and directly around
|
|
32
|
+
* `children`, in array order, so the first entry is outermost of the group.
|
|
33
|
+
*
|
|
34
|
+
* They go innermost rather than into named slots because that is the only position from
|
|
35
|
+
* which a provider can read every core context (theme, app config, query client, alerts).
|
|
36
|
+
* `modules.json` kept an explicit `providerOrder` only because the app owned the tree and
|
|
37
|
+
* each module had to be hand-wired into the right slot; owning the tree here is what
|
|
38
|
+
* retires that contract.
|
|
39
|
+
*/
|
|
40
|
+
providers?: ProviderComponent[];
|
|
41
|
+
}>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* EveryskApp
|
|
45
|
+
*
|
|
46
|
+
* The provider tree every Everysk app mounts, composed in one fixed order:
|
|
47
|
+
*
|
|
48
|
+
* ```
|
|
49
|
+
* ThemeProvider
|
|
50
|
+
* AppConfigProvider
|
|
51
|
+
* QueryClientProvider
|
|
52
|
+
* AppAlertProvider
|
|
53
|
+
* …providers
|
|
54
|
+
* children
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* The order is not arbitrary. `AppAlertProvider` renders MUI's `Snackbar`, so it must sit
|
|
58
|
+
* inside `ThemeProvider`; and `QueryClientProvider` sits inside `AppConfigProvider` because
|
|
59
|
+
* entity hooks build their Axios instance from `useAppConfig()`.
|
|
60
|
+
*
|
|
61
|
+
* `BroadcastChannelProvider` used to sit between theme and app configuration. It is gone: the
|
|
62
|
+
* optional socket layer supersedes it for cross-tab and server-push messaging (as
|
|
63
|
+
* `modules.json` already stated), and the one production path that still used it — app
|
|
64
|
+
* configuration arriving over the channel — was replaced by `window.APP_CONFIG`.
|
|
65
|
+
*
|
|
66
|
+
* `src/test/renderWithProviders` renders through this same component, so a test and the real
|
|
67
|
+
* app can never see different trees.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* // src/App.tsx — the entire file
|
|
72
|
+
* export function App() {
|
|
73
|
+
* return (
|
|
74
|
+
* <EveryskApp>
|
|
75
|
+
* <Routes />
|
|
76
|
+
* </EveryskApp>
|
|
77
|
+
* );
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export const EveryskApp = ({
|
|
82
|
+
children,
|
|
83
|
+
queryClient,
|
|
84
|
+
theme,
|
|
85
|
+
appId,
|
|
86
|
+
appEnvironmentVar,
|
|
87
|
+
providers,
|
|
88
|
+
}: EveryskAppProps) => {
|
|
89
|
+
// Only used when the caller passes no client. Created once per mount so a re-render
|
|
90
|
+
// never swaps the cache out from under the tree.
|
|
91
|
+
const fallbackQueryClient = useMemo(() => createQueryClient(), []);
|
|
92
|
+
const client = queryClient ?? fallbackQueryClient;
|
|
93
|
+
|
|
94
|
+
const wrapped = (providers ?? []).reduceRight<ReactNode>(
|
|
95
|
+
(inner, Provider) => <Provider>{inner}</Provider>,
|
|
96
|
+
children,
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<ThemeProvider theme={theme}>
|
|
101
|
+
<AppConfigProvider appId={appId} appEnvironmentVar={appEnvironmentVar}>
|
|
102
|
+
<QueryClientProvider client={client}>
|
|
103
|
+
<AppAlertProvider>{wrapped}</AppAlertProvider>
|
|
104
|
+
</QueryClientProvider>
|
|
105
|
+
</AppConfigProvider>
|
|
106
|
+
</ThemeProvider>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorSchemeDark,
|
|
3
|
+
colorSchemeLight,
|
|
4
|
+
themeAlpine,
|
|
5
|
+
type Theme as AgGridTheme,
|
|
6
|
+
} from "ag-grid-community";
|
|
7
|
+
import { useTheme, type Theme as MuiTheme } from "@mui/material/styles";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The grid parameters derived from the MUI palette.
|
|
11
|
+
*
|
|
12
|
+
* Exported on its own so the mapping is testable and so an app can spread it into a theme of
|
|
13
|
+
* its own (`themeQuartz.withParams({ ...agGridThemeParams(theme), rowHeight: 48 })`).
|
|
14
|
+
*
|
|
15
|
+
* Every value comes from the theme — there is no colour here. That is the whole point: the
|
|
16
|
+
* grid and the surrounding MUI components read the same palette, so a change to the brand
|
|
17
|
+
* theme moves both.
|
|
18
|
+
*/
|
|
19
|
+
export const agGridThemeParams = (theme: MuiTheme) => ({
|
|
20
|
+
// Surfaces. `chromeBackgroundColor` covers the grid's own chrome (tool panels, status bar).
|
|
21
|
+
backgroundColor: theme.palette.background.default,
|
|
22
|
+
chromeBackgroundColor: theme.palette.background.default,
|
|
23
|
+
oddRowBackgroundColor: theme.palette.background.paper,
|
|
24
|
+
headerBackgroundColor: theme.palette.background.paper,
|
|
25
|
+
menuBackgroundColor: theme.palette.background.paper,
|
|
26
|
+
panelBackgroundColor: theme.palette.background.paper,
|
|
27
|
+
|
|
28
|
+
// Text and icons.
|
|
29
|
+
foregroundColor: theme.palette.text.primary,
|
|
30
|
+
headerTextColor: theme.palette.text.primary,
|
|
31
|
+
menuTextColor: theme.palette.text.primary,
|
|
32
|
+
subtleTextColor: theme.palette.text.secondary,
|
|
33
|
+
iconColor: theme.palette.text.secondary,
|
|
34
|
+
|
|
35
|
+
// Accent and lines. `accentColor` is what AG Grid paints selection, focus rings, sort
|
|
36
|
+
// indicators and range borders with — the same role `primary.main` has in MUI.
|
|
37
|
+
accentColor: theme.palette.primary.main,
|
|
38
|
+
borderColor: theme.palette.divider,
|
|
39
|
+
rowHoverColor: theme.palette.action.hover,
|
|
40
|
+
selectedRowBackgroundColor: theme.palette.action.selected,
|
|
41
|
+
|
|
42
|
+
// Typography. `body2` is the size every table in the design standard uses, and 600 is the
|
|
43
|
+
// header weight the MUI tables carry.
|
|
44
|
+
fontFamily: theme.typography.fontFamily,
|
|
45
|
+
fontSize: theme.typography.body2.fontSize,
|
|
46
|
+
headerFontFamily: theme.typography.fontFamily,
|
|
47
|
+
headerFontSize: theme.typography.body2.fontSize,
|
|
48
|
+
headerFontWeight: 600,
|
|
49
|
+
|
|
50
|
+
// Shape, from the single `shape.borderRadius` every surface in the theme uses.
|
|
51
|
+
borderRadius: theme.shape.borderRadius,
|
|
52
|
+
wrapperBorderRadius: theme.shape.borderRadius,
|
|
53
|
+
|
|
54
|
+
// Tells the browser which scrollbars and form controls to render inside the grid.
|
|
55
|
+
browserColorScheme: theme.palette.mode,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// One grid theme per MUI theme. AG Grid re-applies the theme whenever the object identity
|
|
59
|
+
// changes, so returning a fresh one on every render would restyle the grid on every render.
|
|
60
|
+
// Keyed on the MUI theme, which is itself a stable module-level object.
|
|
61
|
+
const cache = new WeakMap<MuiTheme, AgGridTheme>();
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* getAgGridTheme
|
|
65
|
+
*
|
|
66
|
+
* The AG Grid theme that matches a MUI theme, built with AG Grid's Theming API:
|
|
67
|
+
*
|
|
68
|
+
* ```tsx
|
|
69
|
+
* <AgGridReact theme={getAgGridTheme(muiTheme)} rowData={rows} columnDefs={columns} />
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* This replaces the CSS-variable block the template carried as `agGridStyles`, removed rather
|
|
73
|
+
* than deprecated because it never worked on the version the apps run. That block targeted `.ag-theme-alpine-dark.ag-custom-app-theme`, a legacy CSS theme which AG Grid v33+
|
|
74
|
+
* only honours when the grid opts in with `theme="legacy"` and the app imports the grid's CSS
|
|
75
|
+
* files — so on the version the apps actually run (v35) it styled nothing, and the grid fell
|
|
76
|
+
* back to the stock Quartz look. The Theming API needs no CSS import, no class on the wrapper
|
|
77
|
+
* and no `legacy` opt-in.
|
|
78
|
+
*
|
|
79
|
+
* Alpine is the base part because it is the look the apps already had; everything the brand
|
|
80
|
+
* cares about is overridden by {@link agGridThemeParams} anyway. The colour scheme follows
|
|
81
|
+
* `palette.mode`, so the light theme is covered by the same call — which the CSS block never
|
|
82
|
+
* was.
|
|
83
|
+
*
|
|
84
|
+
* @param theme - The MUI theme to derive from, typically from `useTheme()`.
|
|
85
|
+
*/
|
|
86
|
+
export const getAgGridTheme = (theme: MuiTheme): AgGridTheme => {
|
|
87
|
+
const cached = cache.get(theme);
|
|
88
|
+
if (cached) return cached;
|
|
89
|
+
|
|
90
|
+
const agGridTheme = themeAlpine
|
|
91
|
+
.withPart(theme.palette.mode === "dark" ? colorSchemeDark : colorSchemeLight)
|
|
92
|
+
.withParams(agGridThemeParams(theme));
|
|
93
|
+
|
|
94
|
+
cache.set(theme, agGridTheme);
|
|
95
|
+
|
|
96
|
+
return agGridTheme;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* useAgGridTheme
|
|
101
|
+
*
|
|
102
|
+
* `getAgGridTheme` for the theme currently mounted — the form a component wants:
|
|
103
|
+
*
|
|
104
|
+
* ```tsx
|
|
105
|
+
* const gridTheme = useAgGridTheme();
|
|
106
|
+
*
|
|
107
|
+
* return <AgGridReact theme={gridTheme} rowData={rows} columnDefs={columns} />;
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* Safe to call on every render: the result is cached per MUI theme, so the grid sees the same
|
|
111
|
+
* object each time.
|
|
112
|
+
*/
|
|
113
|
+
export const useAgGridTheme = (): AgGridTheme => getAgGridTheme(useTheme());
|