mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: observableHistoryInjectable is not the only default
Signed-off-by: Gabriel <gaccettola@mirantis.com>
This commit is contained in:
parent
f386f44819
commit
6c5b643340
12
package-lock.json
generated
12
package-lock.json
generated
@ -13945,9 +13945,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.4.369",
|
"version": "1.4.370",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.369.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.370.tgz",
|
||||||
"integrity": "sha512-LfxbHXdA/S+qyoTEA4EbhxGjrxx7WK2h6yb5K2v0UCOufUKX+VZaHbl3svlzZfv9sGseym/g3Ne4DpsgRULmqg=="
|
"integrity": "sha512-c+wzD4sCYQeNeasbnArwsU3ig6+lR6bwQmxfMjB6bx+XoopVSPFp+7ZLxqa90MTC+Tq9QQ5l7zsMNG9GgMBorg=="
|
||||||
},
|
},
|
||||||
"node_modules/electron-updater": {
|
"node_modules/electron-updater": {
|
||||||
"version": "4.6.5",
|
"version": "4.6.5",
|
||||||
@ -48508,9 +48508,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"electron-to-chromium": {
|
"electron-to-chromium": {
|
||||||
"version": "1.4.369",
|
"version": "1.4.370",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.369.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.370.tgz",
|
||||||
"integrity": "sha512-LfxbHXdA/S+qyoTEA4EbhxGjrxx7WK2h6yb5K2v0UCOufUKX+VZaHbl3svlzZfv9sGseym/g3Ne4DpsgRULmqg=="
|
"integrity": "sha512-c+wzD4sCYQeNeasbnArwsU3ig6+lR6bwQmxfMjB6bx+XoopVSPFp+7ZLxqa90MTC+Tq9QQ5l7zsMNG9GgMBorg=="
|
||||||
},
|
},
|
||||||
"electron-updater": {
|
"electron-updater": {
|
||||||
"version": "4.6.5",
|
"version": "4.6.5",
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import { frontEndRouteInjectionToken } from "../../common/front-end-routing/fron
|
|||||||
import { computed, runInAction } from "mobx";
|
import { computed, runInAction } from "mobx";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { routeSpecificComponentInjectionToken } from "../../renderer/routes/route-specific-component-injection-token";
|
import { routeSpecificComponentInjectionToken } from "../../renderer/routes/route-specific-component-injection-token";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import { createMemoryHistory } from "history";
|
import { createMemoryHistory } from "history";
|
||||||
import { createObservableHistory } from "mobx-observable-history";
|
import { createObservableHistory } from "mobx-observable-history";
|
||||||
import navigateToFrontPageInjectable from "../../common/front-end-routing/navigate-to-front-page.injectable";
|
import navigateToFrontPageInjectable from "../../common/front-end-routing/navigate-to-front-page.injectable";
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import navigateToFrontPageInjectable from "../../../../common/front-end-routing/navigate-to-front-page.injectable";
|
import navigateToFrontPageInjectable from "../../../../common/front-end-routing/navigate-to-front-page.injectable";
|
||||||
|
|
||||||
const closePreferencesInjectable = getInjectable({
|
const closePreferencesInjectable = getInjectable({
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { reaction, when } from "mobx";
|
|||||||
import type { GeneralEntity } from "../../../common/catalog-entities";
|
import type { GeneralEntity } from "../../../common/catalog-entities";
|
||||||
import generalCategoryInjectable from "../../../common/catalog/categories/general.injectable";
|
import generalCategoryInjectable from "../../../common/catalog/categories/general.injectable";
|
||||||
import isActiveRouteInjectable from "../../navigation/is-route-active.injectable";
|
import isActiveRouteInjectable from "../../navigation/is-route-active.injectable";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import type { Disposer } from "@k8slens/utilities";
|
import type { Disposer } from "@k8slens/utilities";
|
||||||
import { disposer } from "@k8slens/utilities";
|
import { disposer } from "@k8slens/utilities";
|
||||||
import catalogEntityRegistryInjectable from "../catalog/entity/registry.injectable";
|
import catalogEntityRegistryInjectable from "../catalog/entity/registry.injectable";
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
|||||||
import { action } from "mobx";
|
import { action } from "mobx";
|
||||||
import { byOrderNumber } from "../../../common/utils/composable-responsibilities/orderable/orderable";
|
import { byOrderNumber } from "../../../common/utils/composable-responsibilities/orderable/orderable";
|
||||||
import type { CatalogEntity } from "../../api/catalog-entity";
|
import type { CatalogEntity } from "../../api/catalog-entity";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import type { RegisteredEntitySetting } from "./extension-registrator.injectable";
|
import type { RegisteredEntitySetting } from "./extension-registrator.injectable";
|
||||||
import catalogEntitySettingItemsInjectable from "./settings.injectable";
|
import catalogEntitySettingItemsInjectable from "./settings.injectable";
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import { Animate } from "../animate";
|
|||||||
import { cssNames, noop, stopPropagation } from "@k8slens/utilities";
|
import { cssNames, noop, stopPropagation } from "@k8slens/utilities";
|
||||||
import type { ObservableHistory } from "mobx-observable-history";
|
import type { ObservableHistory } from "mobx-observable-history";
|
||||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import requestAnimationFrameInjectable from "../animate/request-animation-frame.injectable";
|
import requestAnimationFrameInjectable from "../animate/request-animation-frame.injectable";
|
||||||
|
|
||||||
// todo: refactor + handle animation-end in props.onClose()?
|
// todo: refactor + handle animation-end in props.onClose()?
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import { Animate } from "../animate";
|
|||||||
import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "../resizing-anchor";
|
import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "../resizing-anchor";
|
||||||
import drawerStorageInjectable, { defaultDrawerWidth } from "./drawer-storage/drawer-storage.injectable";
|
import drawerStorageInjectable, { defaultDrawerWidth } from "./drawer-storage/drawer-storage.injectable";
|
||||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||||
import historyInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import type { History } from "history";
|
import type { History } from "history";
|
||||||
import type { StorageLayer } from "../../utils/storage-helper";
|
import type { StorageLayer } from "../../utils/storage-helper";
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ class NonInjectedDrawer extends React.Component<DrawerProps & Dependencies & typ
|
|||||||
export const Drawer = withInjectables<Dependencies, DrawerProps>(NonInjectedDrawer as React.ElementType<DrawerProps & Dependencies>, {
|
export const Drawer = withInjectables<Dependencies, DrawerProps>(NonInjectedDrawer as React.ElementType<DrawerProps & Dependencies>, {
|
||||||
getProps: (di, props) => ({
|
getProps: (di, props) => ({
|
||||||
...props,
|
...props,
|
||||||
history: di.inject(historyInjectable),
|
history: di.inject(observableHistoryInjectable),
|
||||||
drawerStorage: di.inject(drawerStorageInjectable),
|
drawerStorage: di.inject(drawerStorageInjectable),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import kubeDetailsUrlParamInjectable from "./kube-details-url.injectable";
|
import kubeDetailsUrlParamInjectable from "./kube-details-url.injectable";
|
||||||
import kubeSelectedUrlParamInjectable from "./kube-selected-url.injectable";
|
import kubeSelectedUrlParamInjectable from "./kube-selected-url.injectable";
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import getDetailsUrlInjectable from "./get-details-url.injectable";
|
import getDetailsUrlInjectable from "./get-details-url.injectable";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import { cssNames } from "@k8slens/utilities";
|
|||||||
import { CloseButton } from "./close-button";
|
import { CloseButton } from "./close-button";
|
||||||
import { getLegacyGlobalDiForExtensionApi } from "../../../extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api";
|
import { getLegacyGlobalDiForExtensionApi } from "../../../extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api";
|
||||||
import navigateToCatalogInjectable from "../../../common/front-end-routing/routes/catalog/navigate-to-catalog.injectable";
|
import navigateToCatalogInjectable from "../../../common/front-end-routing/routes/catalog/navigate-to-catalog.injectable";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
|
|
||||||
export interface SettingLayoutProps extends React.DOMAttributes<any> {
|
export interface SettingLayoutProps extends React.DOMAttributes<any> {
|
||||||
className?: IClassName;
|
className?: IClassName;
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import { Tab, Tabs } from "../tabs";
|
|||||||
import { ErrorBoundary } from "@k8slens/error-boundary";
|
import { ErrorBoundary } from "@k8slens/error-boundary";
|
||||||
import type { ObservableHistory } from "mobx-observable-history";
|
import type { ObservableHistory } from "mobx-observable-history";
|
||||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import type { Navigate } from "../../navigation/navigate.injectable";
|
import type { Navigate } from "../../navigation/navigate.injectable";
|
||||||
import navigateInjectable from "../../navigation/navigate.injectable";
|
import navigateInjectable from "../../navigation/navigate.injectable";
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import navigateToHelmChartsInjectable from "../../../common/front-end-routing/ro
|
|||||||
import hostedClusterInjectable from "../../cluster-frame-context/hosted-cluster.injectable";
|
import hostedClusterInjectable from "../../cluster-frame-context/hosted-cluster.injectable";
|
||||||
import { Cluster } from "../../../common/cluster/cluster";
|
import { Cluster } from "../../../common/cluster/cluster";
|
||||||
import type { NamespaceStore } from "../+namespaces/store";
|
import type { NamespaceStore } from "../+namespaces/store";
|
||||||
import historyInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import type { MinimalTrayMenuItem } from "../../../main/tray/electron-tray/electron-tray.injectable";
|
import type { MinimalTrayMenuItem } from "../../../main/tray/electron-tray/electron-tray.injectable";
|
||||||
import electronTrayInjectable from "../../../main/tray/electron-tray/electron-tray.injectable";
|
import electronTrayInjectable from "../../../main/tray/electron-tray/electron-tray.injectable";
|
||||||
import { getDiForUnitTesting as getRendererDi } from "../../getDiForUnitTesting";
|
import { getDiForUnitTesting as getRendererDi } from "../../getDiForUnitTesting";
|
||||||
@ -292,7 +292,7 @@ export const getApplicationBuilder = () => {
|
|||||||
await callback({ windowDi });
|
await callback({ windowDi });
|
||||||
}
|
}
|
||||||
|
|
||||||
const history = windowDi.inject(historyInjectable);
|
const history = windowDi.inject(observableHistoryInjectable);
|
||||||
|
|
||||||
const render = renderFor(windowDi);
|
const render = renderFor(windowDi);
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import { DiContextProvider } from "@ogre-tools/injectable-react";
|
|||||||
import { Router } from "react-router";
|
import { Router } from "react-router";
|
||||||
import { DefaultProps } from "../../mui-base-theme";
|
import { DefaultProps } from "../../mui-base-theme";
|
||||||
import { ClusterFrame } from "./cluster-frame";
|
import { ClusterFrame } from "./cluster-frame";
|
||||||
import historyInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import { computed } from "mobx";
|
import { computed } from "mobx";
|
||||||
import { Cluster } from "../../../common/cluster/cluster";
|
import { Cluster } from "../../../common/cluster/cluster";
|
||||||
import subscribeStoresInjectable from "../../kube-watch-api/subscribe-stores.injectable";
|
import subscribeStoresInjectable from "../../kube-watch-api/subscribe-stores.injectable";
|
||||||
@ -34,7 +34,7 @@ describe("<ClusterFrame />", () => {
|
|||||||
di = getDiForUnitTesting();
|
di = getDiForUnitTesting();
|
||||||
render = () => testingLibraryRender((
|
render = () => testingLibraryRender((
|
||||||
<DiContextProvider value={{ di }}>
|
<DiContextProvider value={{ di }}>
|
||||||
<Router history={di.inject(historyInjectable)}>
|
<Router history={di.inject(observableHistoryInjectable)}>
|
||||||
{DefaultProps(ClusterFrame)}
|
{DefaultProps(ClusterFrame)}
|
||||||
</Router>
|
</Router>
|
||||||
</DiContextProvider>
|
</DiContextProvider>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { Router } from "react-router";
|
import { Router } from "react-router";
|
||||||
import historyInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -15,7 +15,7 @@ const routingReactApplicationHocInjectable = getInjectable({
|
|||||||
id: "routing-react-application-hoc",
|
id: "routing-react-application-hoc",
|
||||||
|
|
||||||
instantiate: (di) => {
|
instantiate: (di) => {
|
||||||
const history = di.inject(historyInjectable);
|
const history = di.inject(observableHistoryInjectable);
|
||||||
|
|
||||||
return ({ children }) =>
|
return ({ children }) =>
|
||||||
(
|
(
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import type { PageParamDependencies, PageParamInit } from "./page-param";
|
import type { PageParamDependencies, PageParamInit } from "./page-param";
|
||||||
import { PageParam } from "./page-param";
|
import { PageParam } from "./page-param";
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { createMemoryHistory } from "@k8slens/routing";
|
import { createMemoryHistory } from "history";
|
||||||
import { getGlobalOverride } from "@k8slens/test-utils";
|
import { getGlobalOverride } from "@k8slens/test-utils";
|
||||||
import historyInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
|
|
||||||
export default getGlobalOverride(historyInjectable, () => createMemoryHistory());
|
export default getGlobalOverride(observableHistoryInjectable, () => createMemoryHistory());
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import type { match, RouteProps } from "react-router";
|
import type { match, RouteProps } from "react-router";
|
||||||
import { matchPath } from "react-router";
|
import { matchPath } from "react-router";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
|
|
||||||
export type MatchRoute = <Params extends { [K in keyof Params]?: string }>(route: string | string[] | RouteProps) => match<Params> | null;
|
export type MatchRoute = <Params extends { [K in keyof Params]?: string }>(route: string | string[] | RouteProps) => match<Params> | null;
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import type { LocationDescriptor } from "history";
|
import type { LocationDescriptor } from "history";
|
||||||
import { action } from "mobx";
|
import { action } from "mobx";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import { createPath } from "history";
|
import { createPath } from "history";
|
||||||
|
|
||||||
export type Navigate = (location: LocationDescriptor) => void;
|
export type Navigate = (location: LocationDescriptor) => void;
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import loggerInjectable from "../../common/logger.injectable";
|
import loggerInjectable from "../../common/logger.injectable";
|
||||||
import { beforeFrameStartsSecondInjectionToken } from "../before-frame-starts/tokens";
|
import { beforeFrameStartsSecondInjectionToken } from "../before-frame-starts/tokens";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
|
|
||||||
const setupLoggingForNavigationInjectable = getInjectable({
|
const setupLoggingForNavigationInjectable = getInjectable({
|
||||||
id: "setup-logging-for-navigation",
|
id: "setup-logging-for-navigation",
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable";
|
|||||||
|
|
||||||
import { emitWindowLocationChanged } from "../ipc";
|
import { emitWindowLocationChanged } from "../ipc";
|
||||||
import { reaction } from "mobx";
|
import { reaction } from "mobx";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
|
|
||||||
const watchHistoryStateInjectable = getInjectable({
|
const watchHistoryStateInjectable = getInjectable({
|
||||||
id: "watch-history-state",
|
id: "watch-history-state",
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { computed } from "mobx";
|
import { computed } from "mobx";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
|
|
||||||
const currentPathInjectable = getInjectable({
|
const currentPathInjectable = getInjectable({
|
||||||
id: "current-path",
|
id: "current-path",
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
import { runInAction } from "mobx";
|
import { runInAction } from "mobx";
|
||||||
import type { NavigateToUrl } from "../../common/front-end-routing/navigate-to-url-injection-token";
|
import type { NavigateToUrl } from "../../common/front-end-routing/navigate-to-url-injection-token";
|
||||||
import { navigateToUrlInjectionToken } from "../../common/front-end-routing/navigate-to-url-injection-token";
|
import { navigateToUrlInjectionToken } from "../../common/front-end-routing/navigate-to-url-injection-token";
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { computed } from "mobx";
|
import { computed } from "mobx";
|
||||||
import { parse as parseQueryString } from "query-string";
|
import { parse as parseQueryString } from "query-string";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
|
|
||||||
const queryParametersInjectable = getInjectable({
|
const queryParametersInjectable = getInjectable({
|
||||||
id: "query-parameters",
|
id: "query-parameters",
|
||||||
|
|||||||
@ -9,8 +9,8 @@ $ npm install @k8slens/routing
|
|||||||
```
|
```
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
|
import { searchParamsOptions } from "@k8slens/routing";
|
||||||
```
|
```
|
||||||
|
|
||||||
## Extendability
|
## Extendability
|
||||||
|
|||||||
@ -3,8 +3,4 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import observableHistoryInjectable from "./src/observable-history.injectable";
|
|
||||||
|
|
||||||
export * from "./src";
|
export * from "./src";
|
||||||
|
|
||||||
export default observableHistoryInjectable;
|
|
||||||
|
|||||||
@ -6,9 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable";
|
|||||||
import { createBrowserHistory } from "history";
|
import { createBrowserHistory } from "history";
|
||||||
import type { History } from "history";
|
import type { History } from "history";
|
||||||
|
|
||||||
const historyInjectable = getInjectable({
|
export const historyInjectable = getInjectable({
|
||||||
id: "history",
|
id: "history",
|
||||||
instantiate: (): History => createBrowserHistory(),
|
instantiate: (): History => createBrowserHistory(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default historyInjectable;
|
|
||||||
|
|||||||
@ -3,10 +3,6 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import observableHistoryInjectable from "./observable-history.injectable";
|
|
||||||
|
|
||||||
export * from "./history.injectable";
|
export * from "./history.injectable";
|
||||||
export * from "./observable-history.injectable";
|
export * from "./observable-history.injectable";
|
||||||
export * from "./search-params";
|
export * from "./search-params";
|
||||||
export { createMemoryHistory } from "history";
|
|
||||||
export default observableHistoryInjectable;
|
|
||||||
|
|||||||
@ -5,9 +5,9 @@
|
|||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { createObservableHistory } from "mobx-observable-history";
|
import { createObservableHistory } from "mobx-observable-history";
|
||||||
import { searchParamsOptions } from "./search-params";
|
import { searchParamsOptions } from "./search-params";
|
||||||
import historyInjectable from "./history.injectable";
|
import { historyInjectable } from "./history.injectable";
|
||||||
|
|
||||||
const observableHistoryInjectable = getInjectable({
|
export const observableHistoryInjectable = getInjectable({
|
||||||
id: "observable-history",
|
id: "observable-history",
|
||||||
|
|
||||||
instantiate: (di) => {
|
instantiate: (di) => {
|
||||||
@ -19,5 +19,3 @@ const observableHistoryInjectable = getInjectable({
|
|||||||
return navigation;
|
return navigation;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default observableHistoryInjectable;
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import { Button } from "@k8slens/button";
|
|||||||
import type { SingleOrMany } from "@k8slens/utilities";
|
import type { SingleOrMany } from "@k8slens/utilities";
|
||||||
import type { ObservableHistory } from "mobx-observable-history";
|
import type { ObservableHistory } from "mobx-observable-history";
|
||||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||||
import observableHistoryInjectable from "@k8slens/routing";
|
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||||
|
|
||||||
const issuesTrackerUrl = "https://github.com/lensapp/lens/issues";
|
const issuesTrackerUrl = "https://github.com/lensapp/lens/issues";
|
||||||
const forumsUrl = "https://forums.k8slens.dev";
|
const forumsUrl = "https://forums.k8slens.dev";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user