@k8slens/extensions 6.3.0-git.4cb1946110.0 → 6.3.0-git.4d58219376.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/dist/src/common/app-paths/app-path-names.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/persistent-volume.api.d.ts +1 -1
- package/dist/src/{extensions/registries/protocol-handler.d.ts → common/protocol-handler/registration.d.ts} +0 -0
- package/dist/src/common/protocol-handler/router.d.ts +1 -1
- package/dist/src/common/vars/static-files-directory.global-override-for-injectable.d.ts +5 -0
- package/dist/src/extensions/common-api/registrations.d.ts +3 -3
- package/dist/src/extensions/extension-api.js +72 -28
- package/dist/src/extensions/extension-discovery/extension-discovery.d.ts +3 -9
- package/dist/src/extensions/extension-installer/extension-installer.d.ts +0 -5
- package/dist/src/extensions/extension-loader/extension-loader.d.ts +2 -9
- package/dist/src/extensions/lens-extension-set-dependencies.d.ts +2 -0
- package/dist/src/extensions/lens-extension.d.ts +2 -3
- package/dist/src/extensions/lens-renderer-extension.d.ts +6 -5
- package/dist/src/{renderer/initializers/registries.d.ts → features/catalog/opening-entity-details.test.d.ts} +1 -1
- package/dist/src/main/app-paths/get-electron-app-path/get-electron-app-path.d.ts +1 -1
- package/dist/src/renderer/components/+catalog/entity-details/detail-items.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+catalog/entity-details/internal/kubernetes-cluster-details.injectable.d.ts +10 -0
- package/dist/src/renderer/components/+catalog/entity-details/internal/weblink-details.injectable.d.ts +10 -0
- package/dist/src/renderer/components/+catalog/entity-details/registrator.injectable.d.ts +8 -0
- package/dist/src/renderer/components/+catalog/entity-details/token.d.ts +26 -0
- package/dist/src/renderer/components/+catalog/{catalog-entity-details.d.ts → entity-details/view.d.ts} +2 -2
- package/dist/src/renderer/components/icon/icon.d.ts +1 -0
- package/dist/src/renderer/components/item-object-list/list-layout.d.ts +2 -0
- package/dist/src/{extensions/registries/page-menu-registry.d.ts → renderer/components/layout/cluster-page-menu.d.ts} +2 -2
- package/dist/src/renderer/components/layout/siblings-in-tab-layout.d.ts +1 -0
- package/dist/src/renderer/components/layout/tab-layout-2.d.ts +2 -1
- package/dist/src/renderer/components/layout/tab-layout.d.ts +2 -1
- package/dist/src/renderer/components/menu/menu.d.ts +1 -0
- package/dist/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.d.ts +1 -2
- package/dist/src/renderer/frames/load-extensions.injectable.d.ts +5 -0
- package/dist/src/renderer/initializers/index.d.ts +0 -2
- package/dist/src/renderer/routes/extension-page-parameters.injectable.d.ts +1 -1
- package/dist/src/{extensions/registries/page-registry.d.ts → renderer/routes/page-registration.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/src/extensions/extension-installer/install-extensions/install-extensions.injectable.d.ts +0 -2
- package/dist/src/extensions/registries/base-registry.d.ts +0 -15
- package/dist/src/extensions/registries/catalog-entity-detail-registry.d.ts +0 -24
- package/dist/src/extensions/registries/index.d.ts +0 -8
- package/dist/src/renderer/initializers/catalog-entity-detail-registry.d.ts +0 -5
@@ -6,7 +6,6 @@ import type { ExtensionsStore } from "../extensions-store/extensions-store";
|
|
6
6
|
import type { ExtensionLoader } from "../extension-loader";
|
7
7
|
import type { LensExtensionId, LensExtensionManifest } from "../lens-extension";
|
8
8
|
import type { ExtensionInstallationStateStore } from "../extension-installation-state-store/extension-installation-state-store";
|
9
|
-
import type { PackageJson } from "type-fest";
|
10
9
|
import type { ReadJson } from "../../common/fs/read-json-file.injectable";
|
11
10
|
import type { Logger } from "../../common/logger";
|
12
11
|
import type { PathExists } from "../../common/fs/path-exists.injectable";
|
@@ -22,19 +21,20 @@ import type { GetDirnameOfPath } from "../../common/path/get-dirname.injectable"
|
|
22
21
|
import type { GetRelativePath } from "../../common/path/get-relative-path.injectable";
|
23
22
|
import type { RemovePath } from "../../common/fs/remove-path.injectable";
|
24
23
|
import type TypedEventEmitter from "typed-emitter";
|
24
|
+
import type { ApplicationInformation } from "../../common/vars/application-information.injectable";
|
25
25
|
interface Dependencies {
|
26
26
|
readonly extensionLoader: ExtensionLoader;
|
27
27
|
readonly extensionsStore: ExtensionsStore;
|
28
28
|
readonly extensionInstallationStateStore: ExtensionInstallationStateStore;
|
29
29
|
readonly extensionPackageRootDirectory: string;
|
30
|
-
readonly
|
30
|
+
readonly resourcesDirectory: string;
|
31
31
|
readonly logger: Logger;
|
32
32
|
readonly isProduction: boolean;
|
33
33
|
readonly fileSystemSeparator: string;
|
34
34
|
readonly homeDirectoryPath: string;
|
35
|
+
readonly applicationInformation: ApplicationInformation;
|
35
36
|
isCompatibleExtension: (manifest: LensExtensionManifest) => boolean;
|
36
37
|
installExtension: (name: string) => Promise<void>;
|
37
|
-
installExtensions: (packageJsonPath: string, packagesJson: PackageJson) => Promise<void>;
|
38
38
|
readJsonFile: ReadJson;
|
39
39
|
pathExists: PathExists;
|
40
40
|
removePath: RemovePath;
|
@@ -92,8 +92,6 @@ export declare class ExtensionDiscovery {
|
|
92
92
|
constructor(dependencies: Dependencies);
|
93
93
|
get localFolderPath(): string;
|
94
94
|
get packageJsonPath(): string;
|
95
|
-
get inTreeTargetPath(): string;
|
96
|
-
get inTreeFolderPath(): string;
|
97
95
|
get nodeModulesPath(): string;
|
98
96
|
/**
|
99
97
|
* Initializes the class and setups the file watcher for added/removed local extensions.
|
@@ -145,10 +143,6 @@ export declare class ExtensionDiscovery {
|
|
145
143
|
isBundled?: boolean | undefined;
|
146
144
|
}): Promise<InstalledExtension | null>;
|
147
145
|
ensureExtensions(): Promise<Map<LensExtensionId, InstalledExtension>>;
|
148
|
-
/**
|
149
|
-
* Write package.json to file system and install dependencies.
|
150
|
-
*/
|
151
|
-
installBundledPackages(packageJsonPath: string, extensions: InstalledExtension[]): Promise<void>;
|
152
146
|
loadBundledExtensions(): Promise<InstalledExtension[]>;
|
153
147
|
loadFromFolder(folderPath: string, bundledExtensions: string[]): Promise<InstalledExtension[]>;
|
154
148
|
/**
|
@@ -2,7 +2,6 @@
|
|
2
2
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
4
|
*/
|
5
|
-
import type { PackageJson } from "type-fest";
|
6
5
|
interface Dependencies {
|
7
6
|
extensionPackageRootDirectory: string;
|
8
7
|
}
|
@@ -14,10 +13,6 @@ export declare class ExtensionInstaller {
|
|
14
13
|
private installLock;
|
15
14
|
constructor(dependencies: Dependencies);
|
16
15
|
get npmPath(): any;
|
17
|
-
/**
|
18
|
-
* Write package.json to the file system and execute npm install for it.
|
19
|
-
*/
|
20
|
-
installPackages: (packageJsonPath: string, packagesJson: PackageJson) => Promise<void>;
|
21
16
|
/**
|
22
17
|
* Install single package using npm
|
23
18
|
*/
|
@@ -3,7 +3,6 @@
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
4
|
*/
|
5
5
|
import type { ObservableMap } from "mobx";
|
6
|
-
import type { Disposer } from "../../common/utils";
|
7
6
|
import type { InstalledExtension } from "../extension-discovery/extension-discovery";
|
8
7
|
import type { LensExtension, LensExtensionConstructor, LensExtensionId } from "../lens-extension";
|
9
8
|
import type { LensExtensionState } from "../extensions-store/extensions-store";
|
@@ -74,17 +73,11 @@ export declare class ExtensionLoader {
|
|
74
73
|
protected initRenderer(): Promise<void>;
|
75
74
|
broadcastExtensions(): void;
|
76
75
|
syncExtensions(extensions: [LensExtensionId, InstalledExtension][]): void;
|
77
|
-
|
78
|
-
loadOnClusterManagerRenderer: () => Promise<{
|
76
|
+
protected loadExtensions(installedExtensions: Map<string, InstalledExtension>): Promise<{
|
79
77
|
isBundled: boolean;
|
80
78
|
loaded: Promise<void>;
|
81
79
|
}[]>;
|
82
|
-
|
83
|
-
protected loadExtensions(installedExtensions: Map<string, InstalledExtension>, register: (ext: LensExtension) => Promise<Disposer[]>): Promise<{
|
84
|
-
isBundled: boolean;
|
85
|
-
loaded: Promise<void>;
|
86
|
-
}[]>;
|
87
|
-
protected autoInitExtensions(register: (ext: LensExtension) => Promise<Disposer[]>): Promise<{
|
80
|
+
autoInitExtensions(): Promise<{
|
88
81
|
isBundled: boolean;
|
89
82
|
loaded: Promise<void>;
|
90
83
|
}[]>;
|
@@ -11,8 +11,10 @@ import type { CatalogEntityRegistry as RendererCatalogEntityRegistry } from "../
|
|
11
11
|
import type { GetExtensionPageParameters } from "../renderer/routes/get-extension-page-parameters.injectable";
|
12
12
|
import type { FileSystemProvisionerStore } from "./extension-loader/file-system-provisioner-store/file-system-provisioner-store";
|
13
13
|
import type { NavigateForExtension } from "../main/start-main-application/lens-window/navigate-for-extension.injectable";
|
14
|
+
import type { Logger } from "../common/logger";
|
14
15
|
export interface LensExtensionDependencies {
|
15
16
|
readonly fileSystemProvisionerStore: FileSystemProvisionerStore;
|
17
|
+
readonly logger: Logger;
|
16
18
|
}
|
17
19
|
export interface LensMainExtensionDependencies extends LensExtensionDependencies {
|
18
20
|
readonly entityRegistry: MainCatalogEntityRegistry;
|
@@ -3,10 +3,9 @@
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
4
|
*/
|
5
5
|
import type { InstalledExtension } from "./extension-discovery/extension-discovery";
|
6
|
-
import type { ProtocolHandlerRegistration } from "./registries";
|
7
6
|
import type { PackageJson } from "type-fest";
|
8
|
-
import type { Disposer } from "../common/utils";
|
9
7
|
import type { LensExtensionDependencies } from "./lens-extension-set-dependencies";
|
8
|
+
import type { ProtocolHandlerRegistration } from "./common-api/registrations";
|
10
9
|
export type LensExtensionId = string;
|
11
10
|
export type LensExtensionConstructor = new (...args: ConstructorParameters<typeof LensExtension>) => LensExtension;
|
12
11
|
export interface LensExtensionManifest extends PackageJson {
|
@@ -49,7 +48,7 @@ export declare class LensExtension<Dependencies extends LensExtensionDependencie
|
|
49
48
|
* folder name.
|
50
49
|
*/
|
51
50
|
getExtensionFileFolder(): Promise<string>;
|
52
|
-
enable(
|
51
|
+
enable(): Promise<void>;
|
53
52
|
disable(): Promise<void>;
|
54
53
|
activate(): Promise<void>;
|
55
54
|
protected onActivate(): Promise<void> | void;
|
@@ -2,7 +2,6 @@
|
|
2
2
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
4
|
*/
|
5
|
-
import type * as registries from "./registries";
|
6
5
|
import { LensExtension } from "./lens-extension";
|
7
6
|
import type { CatalogEntity } from "../common/catalog";
|
8
7
|
import type { Disposer } from "../common/utils";
|
@@ -26,10 +25,12 @@ import type { AppPreferenceTabRegistration } from "../features/preferences/rende
|
|
26
25
|
import type { KubeObjectDetailRegistration } from "../renderer/components/kube-object-details/kube-object-detail-registration";
|
27
26
|
import type { ClusterFrameChildComponent } from "../renderer/frames/cluster-frame/cluster-frame-child-component-injection-token";
|
28
27
|
import type { EntitySettingRegistration } from "../renderer/components/+entity-settings/extension-registrator.injectable";
|
28
|
+
import type { CatalogEntityDetailRegistration } from "../renderer/components/+catalog/entity-details/token";
|
29
|
+
import type { ClusterPageMenuRegistration, PageRegistration } from "./common-api/registrations";
|
29
30
|
export declare class LensRendererExtension extends LensExtension<LensRendererExtensionDependencies> {
|
30
|
-
globalPages:
|
31
|
-
clusterPages:
|
32
|
-
clusterPageMenus:
|
31
|
+
globalPages: PageRegistration[];
|
32
|
+
clusterPages: PageRegistration[];
|
33
|
+
clusterPageMenus: ClusterPageMenuRegistration[];
|
33
34
|
clusterFrameComponents: ClusterFrameChildComponent[];
|
34
35
|
kubeObjectStatusTexts: KubeObjectStatusRegistration[];
|
35
36
|
appPreferences: AppPreferenceRegistration[];
|
@@ -42,7 +43,7 @@ export declare class LensRendererExtension extends LensExtension<LensRendererExt
|
|
42
43
|
commands: CommandRegistration[];
|
43
44
|
welcomeMenus: WelcomeMenuRegistration[];
|
44
45
|
welcomeBanners: WelcomeBannerRegistration[];
|
45
|
-
catalogEntityDetailItems:
|
46
|
+
catalogEntityDetailItems: CatalogEntityDetailRegistration<CatalogEntity>[];
|
46
47
|
topBarItems: TopBarRegistration[];
|
47
48
|
additionalCategoryColumns: AdditionalCategoryColumnRegistration[];
|
48
49
|
customCategoryViews: CustomCategoryViewRegistration[];
|
@@ -7,6 +7,6 @@ import type { PathName } from "../../../common/app-paths/app-path-names";
|
|
7
7
|
interface Dependencies {
|
8
8
|
app: App;
|
9
9
|
}
|
10
|
-
export type GetElectronAppPath = (name: PathName) => string;
|
10
|
+
export type GetElectronAppPath = (name: PathName | "currentApp") => string;
|
11
11
|
export declare const getElectronAppPath: ({ app, }: Dependencies) => GetElectronAppPath;
|
12
12
|
export {};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { CatalogEntity } from "../../../api/catalog-entity";
|
2
|
+
declare const catalogEntityDetailItemsInjectable: import("@ogre-tools/injectable").Injectable<import("mobx").IComputedValue<import("./token").CatalogEntityDetailsComponent<CatalogEntity<import("../../../../common/catalog").CatalogEntityMetadata, import("../../../../common/catalog").CatalogEntityStatus, import("../../../../common/catalog").CatalogEntitySpec>>[]>, unknown, CatalogEntity<import("../../../../common/catalog").CatalogEntityMetadata, import("../../../../common/catalog").CatalogEntityStatus, import("../../../../common/catalog").CatalogEntitySpec>>;
|
3
|
+
export default catalogEntityDetailItemsInjectable;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from "react";
|
2
|
+
declare const kubernetesClusterDetailsItemInjectable: import("@ogre-tools/injectable").Injectable<{
|
3
|
+
apiVersions: Set<string>;
|
4
|
+
kind: string;
|
5
|
+
orderNumber: number;
|
6
|
+
components: {
|
7
|
+
Details: ({ entity }: React.PropsWithChildren<import("../token").CatalogEntityDetailsProps<import("../../../../api/catalog-entity").CatalogEntity<import("../../../../../common/catalog").CatalogEntityMetadata, import("../../../../../common/catalog").CatalogEntityStatus, import("../../../../../common/catalog").CatalogEntitySpec>>>) => JSX.Element;
|
8
|
+
};
|
9
|
+
}, import("../token").CatalogEntityDetailItem, void>;
|
10
|
+
export default kubernetesClusterDetailsItemInjectable;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from "react";
|
2
|
+
declare const weblinkDetailsItemInjectable: import("@ogre-tools/injectable").Injectable<{
|
3
|
+
apiVersions: Set<string>;
|
4
|
+
kind: string;
|
5
|
+
components: {
|
6
|
+
Details: ({ entity }: React.PropsWithChildren<import("../token").CatalogEntityDetailsProps<import("../../../../api/catalog-entity").CatalogEntity<import("../../../../../common/catalog").CatalogEntityMetadata, import("../../../../../common/catalog").CatalogEntityStatus, import("../../../../../common/catalog").CatalogEntitySpec>>>) => JSX.Element;
|
7
|
+
};
|
8
|
+
orderNumber: number;
|
9
|
+
}, import("../token").CatalogEntityDetailItem, void>;
|
10
|
+
export default weblinkDetailsItemInjectable;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { CatalogEntity } from "../../../api/catalog-entity";
|
2
|
+
declare const catalogEntityDetailItemsRegistratorInjectable: import("@ogre-tools/injectable").Injectable<(ext: import("../../../../extensions/lens-extension").LensExtension<import("../../../../extensions/lens-extension-set-dependencies").LensExtensionDependencies>) => import("@ogre-tools/injectable").Injectable<{
|
3
|
+
apiVersions: Set<string>;
|
4
|
+
components: import("./token").CatalogEntityDetailComponents<CatalogEntity<import("../../../../common/catalog").CatalogEntityMetadata, import("../../../../common/catalog").CatalogEntityStatus, import("../../../../common/catalog").CatalogEntitySpec>>;
|
5
|
+
kind: string;
|
6
|
+
orderNumber: number;
|
7
|
+
}, import("./token").CatalogEntityDetailItem, void>[], import("../../../../extensions/extension-loader/extension-registrator-injection-token").ExtensionRegistrator, void>;
|
8
|
+
export default catalogEntityDetailItemsRegistratorInjectable;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
/// <reference types="react" />
|
6
|
+
import type { CatalogEntity } from "../../../api/catalog-entity";
|
7
|
+
export interface CatalogEntityDetailsProps<T extends CatalogEntity> {
|
8
|
+
entity: T;
|
9
|
+
}
|
10
|
+
export type CatalogEntityDetailsComponent<T extends CatalogEntity> = React.ComponentType<CatalogEntityDetailsProps<T>>;
|
11
|
+
export interface CatalogEntityDetailComponents<T extends CatalogEntity> {
|
12
|
+
Details: CatalogEntityDetailsComponent<T>;
|
13
|
+
}
|
14
|
+
export interface CatalogEntityDetailRegistration<T extends CatalogEntity> {
|
15
|
+
kind: string;
|
16
|
+
apiVersions: string[];
|
17
|
+
components: CatalogEntityDetailComponents<T>;
|
18
|
+
priority?: number;
|
19
|
+
}
|
20
|
+
export interface CatalogEntityDetailItem {
|
21
|
+
kind: string;
|
22
|
+
apiVersions: Set<string>;
|
23
|
+
components: CatalogEntityDetailComponents<CatalogEntity>;
|
24
|
+
orderNumber: number;
|
25
|
+
}
|
26
|
+
export declare const catalogEntityDetailItemInjectionToken: import("@ogre-tools/injectable").InjectionToken<CatalogEntityDetailItem, void>;
|
@@ -3,10 +3,10 @@
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
4
|
*/
|
5
5
|
import React from "react";
|
6
|
-
import type { CatalogEntity } from "
|
6
|
+
import type { CatalogEntity } from "../../../../common/catalog";
|
7
7
|
export interface CatalogEntityDetailsProps<Entity extends CatalogEntity> {
|
8
8
|
entity: Entity;
|
9
9
|
hideDetails(): void;
|
10
10
|
onRun: () => void;
|
11
11
|
}
|
12
|
-
export declare const CatalogEntityDetails: <Entity extends CatalogEntity<import("
|
12
|
+
export declare const CatalogEntityDetails: <Entity extends CatalogEntity<import("../../../../common/catalog").CatalogEntityMetadata, import("../../../../common/catalog").CatalogEntityStatus, import("../../../../common/catalog").CatalogEntitySpec>>(props: CatalogEntityDetailsProps<Entity>) => React.ReactElement;
|
@@ -88,6 +88,7 @@ export type ItemListLayoutProps<Item extends ItemObject, PreLoadStores extends b
|
|
88
88
|
*/
|
89
89
|
failedToLoadMessage?: React.ReactNode;
|
90
90
|
filterCallbacks?: ItemsFilters<Item>;
|
91
|
+
"data-testid"?: string;
|
91
92
|
} & (PreLoadStores extends true ? {
|
92
93
|
preloadStores?: true;
|
93
94
|
} : {
|
@@ -149,6 +150,7 @@ declare class NonInjectedItemListLayout<I extends ItemObject, PreLoadStores exte
|
|
149
150
|
*/
|
150
151
|
failedToLoadMessage?: ReactNode;
|
151
152
|
filterCallbacks?: ItemsFilters<I> | undefined;
|
153
|
+
"data-testid"?: string | undefined;
|
152
154
|
} & (PreLoadStores extends true ? {
|
153
155
|
preloadStores?: true | undefined;
|
154
156
|
} : {
|
@@ -2,9 +2,9 @@
|
|
2
2
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
4
|
*/
|
5
|
-
import type { IconProps } from "
|
5
|
+
import type { IconProps } from "../icon";
|
6
6
|
import type React from "react";
|
7
|
-
import type { PageTarget } from "
|
7
|
+
import type { PageTarget } from "../../routes/page-registration";
|
8
8
|
import type { IComputedValue } from "mobx";
|
9
9
|
export interface ClusterPageMenuRegistration {
|
10
10
|
id?: string;
|
@@ -8,5 +8,6 @@ import type { HierarchicalSidebarItem } from "./sidebar-items.injectable";
|
|
8
8
|
export interface TabLayoutProps {
|
9
9
|
tabs?: HierarchicalSidebarItem[];
|
10
10
|
children?: React.ReactNode;
|
11
|
+
scrollable?: boolean;
|
11
12
|
}
|
12
|
-
export declare const TabLayout: ({ tabs, children, }: TabLayoutProps) => JSX.Element;
|
13
|
+
export declare const TabLayout: ({ tabs, scrollable, children, }: TabLayoutProps) => JSX.Element;
|
@@ -11,6 +11,7 @@ export interface TabLayoutProps {
|
|
11
11
|
contentClass?: IClassName;
|
12
12
|
tabs?: TabLayoutRoute[];
|
13
13
|
children?: ReactNode;
|
14
|
+
scrollable?: boolean;
|
14
15
|
}
|
15
16
|
export interface TabLayoutRoute {
|
16
17
|
routePath: string;
|
@@ -20,4 +21,4 @@ export interface TabLayoutRoute {
|
|
20
21
|
exact?: boolean;
|
21
22
|
default?: boolean;
|
22
23
|
}
|
23
|
-
export declare const TabLayout: ({ className, contentClass, tabs, children }: TabLayoutProps) => JSX.Element;
|
24
|
+
export declare const TabLayout: ({ className, contentClass, tabs, scrollable, children }: TabLayoutProps) => JSX.Element;
|
@@ -37,6 +37,7 @@ export interface MenuProps {
|
|
37
37
|
children?: ReactNode;
|
38
38
|
animated?: boolean;
|
39
39
|
toggleEvent?: "click" | "contextmenu";
|
40
|
+
"data-testid"?: string;
|
40
41
|
}
|
41
42
|
export declare const Menu: React.FunctionComponent<MenuProps>;
|
42
43
|
export declare function SubMenu(props: Partial<MenuProps>): JSX.Element;
|
@@ -4,12 +4,11 @@
|
|
4
4
|
*/
|
5
5
|
import type { Cluster } from "../../../../common/cluster/cluster";
|
6
6
|
import type { CatalogEntityRegistry } from "../../../api/catalog/entity/registry";
|
7
|
-
import type { CatalogEntity } from "../../../../common/catalog";
|
8
7
|
import type { ClusterFrameContext } from "../../../cluster-frame-context/cluster-frame-context";
|
9
8
|
import type { EmitAppEvent } from "../../../../common/app-event-bus/emit-event.injectable";
|
10
9
|
interface Dependencies {
|
11
10
|
hostedCluster: Cluster;
|
12
|
-
loadExtensions: (
|
11
|
+
loadExtensions: () => void;
|
13
12
|
catalogEntityRegistry: CatalogEntityRegistry;
|
14
13
|
frameRoutingId: number;
|
15
14
|
emitAppEvent: EmitAppEvent;
|
@@ -2,8 +2,6 @@
|
|
2
2
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
4
|
*/
|
5
|
-
export * from "./catalog-entity-detail-registry";
|
6
5
|
export * from "./catalog";
|
7
6
|
export * from "./ipc";
|
8
|
-
export * from "./registries";
|
9
7
|
export * from "./catalog-category-registry";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { LensRendererExtension } from "../../extensions/lens-renderer-extension";
|
2
|
-
import type { PageRegistration } from "
|
2
|
+
import type { PageRegistration } from "./page-registration";
|
3
3
|
export interface ExtensionPageParametersInstantiationParam {
|
4
4
|
extension: LensRendererExtension;
|
5
5
|
registration: PageRegistration;
|
package/dist/src/{extensions/registries/page-registry.d.ts → renderer/routes/page-registration.d.ts}
RENAMED
@@ -4,7 +4,7 @@
|
|
4
4
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
5
5
|
*/
|
6
6
|
import type { IComputedValue } from "mobx";
|
7
|
-
import type { PageParamInit, PageParam } from "
|
7
|
+
import type { PageParamInit, PageParam } from "../navigation";
|
8
8
|
export interface PageRegistration {
|
9
9
|
/**
|
10
10
|
* Page ID, part of extension's page url, must be unique within same extension
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@k8slens/extensions",
|
3
3
|
"productName": "OpenLens extensions",
|
4
4
|
"description": "OpenLens - Open Source Kubernetes IDE: extensions",
|
5
|
-
"version": "6.3.0-git.
|
5
|
+
"version": "6.3.0-git.4d58219376.0",
|
6
6
|
"copyright": "© 2022 OpenLens Authors",
|
7
7
|
"license": "MIT",
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
-
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
-
*/
|
5
|
-
import type { Disposer } from "../../common/utils";
|
6
|
-
import { Singleton } from "../../common/utils";
|
7
|
-
import type { LensExtension } from "../lens-extension";
|
8
|
-
export declare class BaseRegistry<T, I = T> extends Singleton {
|
9
|
-
private items;
|
10
|
-
constructor();
|
11
|
-
getItems(): I[];
|
12
|
-
add(items: T | T[], extension?: LensExtension): Disposer;
|
13
|
-
protected getRegisteredItem(item: T, extension?: LensExtension): I;
|
14
|
-
remove(...items: T[]): void;
|
15
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
-
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
-
*/
|
5
|
-
import type React from "react";
|
6
|
-
import type { Disposer } from "../../common/utils";
|
7
|
-
import type { CatalogEntity } from "../common-api/catalog";
|
8
|
-
import { BaseRegistry } from "./base-registry";
|
9
|
-
export interface CatalogEntityDetailsProps<T extends CatalogEntity> {
|
10
|
-
entity: T;
|
11
|
-
}
|
12
|
-
export interface CatalogEntityDetailComponents<T extends CatalogEntity> {
|
13
|
-
Details: React.ComponentType<CatalogEntityDetailsProps<T>>;
|
14
|
-
}
|
15
|
-
export interface CatalogEntityDetailRegistration<T extends CatalogEntity> {
|
16
|
-
kind: string;
|
17
|
-
apiVersions: string[];
|
18
|
-
components: CatalogEntityDetailComponents<T>;
|
19
|
-
priority?: number;
|
20
|
-
}
|
21
|
-
export declare class CatalogEntityDetailRegistry extends BaseRegistry<CatalogEntityDetailRegistration<CatalogEntity>> {
|
22
|
-
add<T extends CatalogEntity>(items: CatalogEntityDetailRegistration<T> | CatalogEntityDetailRegistration<T>[]): Disposer;
|
23
|
-
getItemsForKind(kind: string, apiVersion: string): CatalogEntityDetailRegistration<CatalogEntity<import("../common-api/catalog").CatalogEntityMetadata, import("../common-api/catalog").CatalogEntityStatus, import("../common-api/catalog").CatalogEntitySpec>>[];
|
24
|
-
}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
-
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
-
*/
|
5
|
-
export * from "./page-registry";
|
6
|
-
export * from "./page-menu-registry";
|
7
|
-
export * from "./catalog-entity-detail-registry";
|
8
|
-
export * from "./protocol-handler";
|