2023-06-22 05:28:10 +00:00
|
|
|
// This file must be executed as early as possible to ensure the preloads are triggered ASAP
|
|
|
|
|
import "./preload-route-chunks";
|
2024-12-13 04:14:19 +00:00
|
|
|
// Initialise eval worker instance
|
|
|
|
|
import "utils/workerInstances";
|
2023-06-22 05:28:10 +00:00
|
|
|
|
2020-08-03 14:18:48 +00:00
|
|
|
import React from "react";
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
import "./wdyr";
|
2019-03-16 11:33:15 +00:00
|
|
|
import ReactDOM from "react-dom";
|
|
|
|
|
import { Provider } from "react-redux";
|
|
|
|
|
import "./index.css";
|
2024-08-08 12:55:00 +00:00
|
|
|
import "@appsmith/ads-old/src/themes/default/index.css";
|
2024-08-09 14:20:29 +00:00
|
|
|
import "@appsmith/ads/src/__theme__/default/index.css";
|
2023-01-13 11:05:59 +00:00
|
|
|
import { ThemeProvider } from "styled-components";
|
2022-08-04 05:40:44 +00:00
|
|
|
import { appInitializer } from "utils/AppUtils";
|
2022-11-30 10:38:15 +00:00
|
|
|
import store, { runSagaMiddleware } from "./store";
|
2020-05-28 18:10:26 +00:00
|
|
|
import { LayersContext, Layers } from "constants/Layers";
|
2024-08-06 14:52:22 +00:00
|
|
|
import AppRouter from "ee/AppRouter";
|
2022-12-15 04:06:13 +00:00
|
|
|
import { getCurrentThemeDetails } from "selectors/themeSelectors";
|
2020-09-16 11:50:47 +00:00
|
|
|
import { connect } from "react-redux";
|
2025-05-01 10:23:37 +00:00
|
|
|
import type { DefaultRootState } from "react-redux";
|
2024-08-09 14:20:29 +00:00
|
|
|
import { Toast } from "@appsmith/ads";
|
2021-11-23 08:01:46 +00:00
|
|
|
import "./assets/styles/index.css";
|
2023-02-08 11:23:39 +00:00
|
|
|
import "./polyfills";
|
2022-09-30 06:27:29 +00:00
|
|
|
import GlobalStyles from "globalStyles";
|
2021-01-22 05:20:55 +00:00
|
|
|
// enable autofreeze only in development
|
2025-02-06 05:50:08 +00:00
|
|
|
|
2023-03-03 06:47:35 +00:00
|
|
|
import AppErrorBoundary from "./AppErrorBoundry";
|
2023-11-06 09:35:17 +00:00
|
|
|
import log from "loglevel";
|
2024-12-26 05:07:41 +00:00
|
|
|
import { FaroErrorBoundary } from "@grafana/faro-react";
|
2024-04-09 08:55:46 +00:00
|
|
|
|
2022-11-30 10:38:15 +00:00
|
|
|
runSagaMiddleware();
|
|
|
|
|
|
2019-09-02 15:36:24 +00:00
|
|
|
appInitializer();
|
2024-04-09 08:55:46 +00:00
|
|
|
|
2025-04-29 05:02:36 +00:00
|
|
|
(async () => {
|
|
|
|
|
try {
|
|
|
|
|
await import(/* webpackChunkName: "instrumentation" */ "./instrumentation");
|
|
|
|
|
} catch (e) {
|
|
|
|
|
log.error("Error loading telemetry script", e);
|
|
|
|
|
}
|
|
|
|
|
})();
|
2019-11-21 10:52:49 +00:00
|
|
|
|
2021-04-28 10:28:39 +00:00
|
|
|
function App() {
|
2020-08-03 14:18:48 +00:00
|
|
|
return (
|
2024-12-26 05:07:41 +00:00
|
|
|
<FaroErrorBoundary fallback={<div>An error has occured</div>}>
|
2020-09-03 08:08:04 +00:00
|
|
|
<Provider store={store}>
|
|
|
|
|
<LayersContext.Provider value={Layers}>
|
2020-09-16 11:50:47 +00:00
|
|
|
<ThemedAppWithProps />
|
2020-09-03 08:08:04 +00:00
|
|
|
</LayersContext.Provider>
|
|
|
|
|
</Provider>
|
2024-12-26 05:07:41 +00:00
|
|
|
</FaroErrorBoundary>
|
2020-08-03 14:18:48 +00:00
|
|
|
);
|
2021-04-28 10:28:39 +00:00
|
|
|
}
|
2020-08-03 14:18:48 +00:00
|
|
|
|
2020-09-16 11:50:47 +00:00
|
|
|
class ThemedApp extends React.Component<{
|
2024-07-31 15:41:28 +00:00
|
|
|
// TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2020-09-16 11:50:47 +00:00
|
|
|
currentTheme: any;
|
|
|
|
|
}> {
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
|
|
|
|
<ThemeProvider theme={this.props.currentTheme}>
|
2023-05-19 18:37:06 +00:00
|
|
|
<Toast />
|
2021-03-15 12:17:56 +00:00
|
|
|
<GlobalStyles />
|
2020-11-09 09:23:20 +00:00
|
|
|
<AppErrorBoundary>
|
|
|
|
|
<AppRouter />
|
|
|
|
|
</AppErrorBoundary>
|
2020-09-16 11:50:47 +00:00
|
|
|
</ThemeProvider>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-05-01 10:23:37 +00:00
|
|
|
const mapStateToProps = (state: DefaultRootState) => ({
|
2021-02-11 12:54:00 +00:00
|
|
|
currentTheme: getCurrentThemeDetails(state),
|
2020-09-16 11:50:47 +00:00
|
|
|
});
|
|
|
|
|
|
2022-12-15 04:06:13 +00:00
|
|
|
const ThemedAppWithProps = connect(mapStateToProps)(ThemedApp);
|
2020-09-16 11:50:47 +00:00
|
|
|
|
2020-08-03 14:18:48 +00:00
|
|
|
ReactDOM.render(<App />, document.getElementById("root"));
|
2021-01-23 08:16:50 +00:00
|
|
|
|
|
|
|
|
// expose store when run in Cypress
|
2024-07-31 15:41:28 +00:00
|
|
|
// TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2021-01-23 08:16:50 +00:00
|
|
|
if ((window as any).Cypress) {
|
2024-07-31 15:41:28 +00:00
|
|
|
// TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2021-01-23 08:16:50 +00:00
|
|
|
(window as any).store = store;
|
|
|
|
|
}
|