@k8slens/extensions 5.3.1-git.bb30bdc750.0 → 5.3.1-git.c0a0127d2d.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.
Files changed (66) hide show
  1. package/dist/src/common/cluster-types.d.ts +5 -1
  2. package/dist/src/common/ipc/update-available.ipc.d.ts +2 -0
  3. package/dist/src/common/k8s-api/endpoints/daemon-set.api.d.ts +2 -5
  4. package/dist/src/common/k8s-api/endpoints/deployment.api.d.ts +2 -5
  5. package/dist/src/common/k8s-api/endpoints/job.api.d.ts +2 -5
  6. package/dist/src/common/k8s-api/endpoints/network-policy.api.d.ts +72 -32
  7. package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +6 -6
  8. package/dist/src/common/k8s-api/endpoints/persistent-volume-claims.api.d.ts +3 -16
  9. package/dist/src/common/k8s-api/endpoints/poddisruptionbudget.api.d.ts +2 -6
  10. package/dist/src/common/k8s-api/endpoints/replica-set.api.d.ts +2 -5
  11. package/dist/src/common/k8s-api/endpoints/stateful-set.api.d.ts +2 -5
  12. package/dist/src/common/k8s-api/kube-api-parse.d.ts +2 -2
  13. package/dist/src/common/k8s-api/kube-api.d.ts +58 -30
  14. package/dist/src/common/k8s-api/kube-json-api.d.ts +1 -2
  15. package/dist/src/common/k8s-api/kube-object.d.ts +22 -0
  16. package/dist/src/common/protocol-handler/error.d.ts +3 -3
  17. package/dist/src/common/protocol-handler/router.d.ts +5 -5
  18. package/dist/src/common/utils/readableStream.d.ts +2 -2
  19. package/dist/src/extensions/extension-api.js +183 -65
  20. package/dist/src/extensions/extension-compatibility.d.ts +3 -1
  21. package/dist/src/extensions/registries/status-bar-registry.d.ts +6 -0
  22. package/dist/src/extensions/renderer-api/k8s-api.d.ts +1 -0
  23. package/dist/src/main/cluster-manager.d.ts +1 -1
  24. package/dist/src/main/cluster.d.ts +3 -7
  25. package/dist/src/main/context-handler.d.ts +8 -1
  26. package/dist/src/main/kube-auth-proxy.d.ts +5 -7
  27. package/dist/src/main/kubeconfig-manager.d.ts +16 -4
  28. package/dist/src/main/lens-proxy.d.ts +8 -1
  29. package/dist/src/main/menu.d.ts +6 -1
  30. package/dist/src/main/protocol-handler/router.d.ts +3 -3
  31. package/dist/src/main/window-manager.d.ts +3 -0
  32. package/dist/src/renderer/api/terminal-api.d.ts +0 -2
  33. package/dist/src/renderer/{utils/copyToClipboard.d.ts → components/+network-policies/__tests__/network-policy-details.test.d.ts} +1 -7
  34. package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +8 -4
  35. package/dist/src/renderer/components/+nodes/nodes.d.ts +2 -1
  36. package/dist/src/renderer/components/avatar/__tests__/avatar.test.d.ts +21 -0
  37. package/dist/src/renderer/components/avatar/avatar.d.ts +7 -8
  38. package/dist/src/renderer/components/{clipboard → avatar}/index.d.ts +1 -1
  39. package/dist/src/renderer/components/cluster-manager/active-hotbar-name.d.ts +21 -0
  40. package/dist/src/renderer/components/cluster-manager/bottom-bar.d.ts +0 -1
  41. package/dist/src/renderer/components/dialog/dialog.d.ts +1 -0
  42. package/dist/src/renderer/components/dock/install-chart.d.ts +0 -1
  43. package/dist/src/renderer/components/drawer/drawer.d.ts +14 -3
  44. package/dist/src/renderer/components/hotbar/hotbar-entity-icon.d.ts +3 -3
  45. package/dist/src/renderer/components/hotbar/hotbar-icon.d.ts +3 -10
  46. package/dist/src/renderer/components/kube-object-menu/dependencies/api-manager.injectable.d.ts +24 -0
  47. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster-name.injectable.d.ts +27 -0
  48. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster.injectable.d.ts +4 -0
  49. package/dist/src/renderer/components/kube-object-menu/dependencies/edit-resource-tab.injectable.d.ts +24 -0
  50. package/dist/src/renderer/components/kube-object-menu/dependencies/hide-details.injectable.d.ts +24 -0
  51. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/get-kube-object-menu-items.d.ts +29 -0
  52. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-items.injectable.d.ts +24 -0
  53. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-registry.injectable.d.ts +24 -0
  54. package/dist/src/renderer/components/kube-object-menu/index.d.ts +2 -1
  55. package/dist/src/renderer/components/kube-object-menu/kube-object-menu-container.d.ts +2 -0
  56. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.d.ts +14 -4
  57. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.injectable.d.ts +5 -0
  58. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.test.d.ts +21 -0
  59. package/dist/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.d.ts +0 -1
  60. package/dist/src/renderer/components/layout/__tests__/topbar-win-linux.test.d.ts +21 -0
  61. package/dist/src/renderer/components/resizing-anchor/resizing-anchor.d.ts +3 -1
  62. package/dist/src/renderer/components/{clipboard/clipboard.d.ts → test-utils/renderFor.d.ts} +6 -16
  63. package/dist/src/renderer/initializers/index.d.ts +1 -0
  64. package/dist/src/renderer/initializers/status-bar-registry.d.ts +21 -0
  65. package/dist/src/renderer/utils/index.d.ts +0 -1
  66. package/package.json +1 -1
@@ -18,6 +18,8 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
+ import { SemVer } from "semver";
21
22
  import type { LensExtensionManifest } from "./lens-extension";
22
- export declare function isCompatibleExtension(manifest: LensExtensionManifest): boolean;
23
+ export declare function rawIsCompatibleExtension(version: SemVer): (manifest: LensExtensionManifest) => boolean;
24
+ export declare const isCompatibleExtension: (manifest: LensExtensionManifest) => boolean;
23
25
  export declare function isCompatibleBundledExtension(manifest: LensExtensionManifest): boolean;
@@ -22,6 +22,12 @@ import type React from "react";
22
22
  import { BaseRegistry } from "./base-registry";
23
23
  interface StatusBarComponents {
24
24
  Item?: React.ComponentType;
25
+ /**
26
+ * The side of the bottom bar to place this component.
27
+ *
28
+ * @default "right"
29
+ */
30
+ position?: "left" | "right";
25
31
  }
26
32
  interface StatusBarRegistrationV2 {
27
33
  components?: StatusBarComponents;
@@ -54,6 +54,7 @@ export { ClusterRole, clusterRoleApi } from "../../common/k8s-api/endpoints";
54
54
  export { ClusterRoleBinding, clusterRoleBindingApi } from "../../common/k8s-api/endpoints";
55
55
  export { CustomResourceDefinition, crdApi } from "../../common/k8s-api/endpoints";
56
56
  export { KubeObjectStatusLevel } from "./kube-object-status";
57
+ export { KubeJsonApi } from "../../common/k8s-api/kube-json-api";
57
58
  export type { ILocalKubeApiConfig, IRemoteKubeApiConfig, IKubeApiCluster } from "../../common/k8s-api/kube-api";
58
59
  export type { IPodContainer, IPodContainerStatus } from "../../common/k8s-api/endpoints";
59
60
  export type { ISecretRef } from "../../common/k8s-api/endpoints";
@@ -34,7 +34,7 @@ export declare class ClusterManager extends Singleton {
34
34
  protected updateCatalog(clusters: Cluster[]): void;
35
35
  protected updateEntityFromCluster(cluster: Cluster): void;
36
36
  protected updateEntityStatus(entity: KubernetesCluster, cluster?: Cluster): void;
37
- syncClustersFromCatalog(entities: KubernetesCluster[]): void;
37
+ protected syncClustersFromCatalog(entities: KubernetesCluster[]): void;
38
38
  protected onNetworkOffline: () => void;
39
39
  protected onNetworkOnline: () => void;
40
40
  stop(): void;
@@ -40,8 +40,8 @@ export declare class Cluster implements ClusterModel, ClusterState {
40
40
  * @internal
41
41
  */
42
42
  contextHandler: ContextHandler;
43
- protected kubeconfigManager: KubeconfigManager;
44
- protected eventDisposers: Function[];
43
+ protected proxyKubeconfigManager: KubeconfigManager;
44
+ protected eventsDisposer: import("../common/utils").ExtendableDisposer;
45
45
  protected activated: boolean;
46
46
  private resourceAccessStatuses;
47
47
  get whenReady(): Promise<void> & {
@@ -198,11 +198,7 @@ export declare class Cluster implements ClusterModel, ClusterState {
198
198
  /**
199
199
  * @internal
200
200
  */
201
- recreateProxyKubeconfig(): Promise<void>;
202
- /**
203
- * internal
204
- */
205
- protected unbindEvents(): void;
201
+ protected recreateProxyKubeconfig(): Promise<void>;
206
202
  /**
207
203
  * @param force force activation
208
204
  * @internal
@@ -29,13 +29,19 @@ export interface PrometheusDetails {
29
29
  prometheusPath: string;
30
30
  provider: PrometheusProvider;
31
31
  }
32
+ interface PrometheusServicePreferences {
33
+ namespace: string;
34
+ service: string;
35
+ port: number;
36
+ prefix: string;
37
+ }
32
38
  export declare class ContextHandler {
33
39
  protected cluster: Cluster;
34
40
  clusterUrl: UrlWithStringQuery;
35
41
  protected kubeAuthProxy?: KubeAuthProxy;
36
42
  protected apiTarget?: httpProxy.ServerOptions;
37
43
  protected prometheusProvider?: string;
38
- protected prometheusPath: string | null;
44
+ protected prometheus?: PrometheusServicePreferences;
39
45
  constructor(cluster: Cluster);
40
46
  setupPrometheus(preferences?: ClusterPrometheusPreferences): void;
41
47
  getPrometheusDetails(): Promise<PrometheusDetails>;
@@ -49,3 +55,4 @@ export declare class ContextHandler {
49
55
  ensureServer(): Promise<void>;
50
56
  stopServer(): void;
51
57
  }
58
+ export {};
@@ -21,18 +21,16 @@
21
21
  /// <reference types="node" />
22
22
  import { ChildProcess } from "child_process";
23
23
  import type { Cluster } from "./cluster";
24
- import { Kubectl } from "./kubectl";
25
24
  export declare class KubeAuthProxy {
25
+ protected readonly cluster: Cluster;
26
+ protected readonly env: NodeJS.ProcessEnv;
26
27
  readonly apiPrefix: string;
27
28
  get port(): number;
28
- protected _port?: number;
29
- protected cluster: Cluster;
30
- protected env: NodeJS.ProcessEnv;
31
- protected proxyProcess: ChildProcess;
32
- protected kubectl: Kubectl;
29
+ protected _port: number;
30
+ protected proxyProcess?: ChildProcess;
31
+ protected readonly acceptHosts: string;
33
32
  protected ready: boolean;
34
33
  constructor(cluster: Cluster, env: NodeJS.ProcessEnv);
35
- get acceptHosts(): string;
36
34
  get whenReady(): Promise<void> & {
37
35
  cancel(): void;
38
36
  };
@@ -23,13 +23,25 @@ import type { ContextHandler } from "./context-handler";
23
23
  export declare class KubeconfigManager {
24
24
  protected cluster: Cluster;
25
25
  protected contextHandler: ContextHandler;
26
- protected configDir: string;
27
- protected tempFile: string;
26
+ /**
27
+ * The path to the temp config file
28
+ *
29
+ * - if `string` then path
30
+ * - if `null` then not yet created
31
+ * - if `undefined` then unlinked by calling `clear()`
32
+ */
33
+ protected tempFilePath: string | null | undefined;
28
34
  constructor(cluster: Cluster, contextHandler: ContextHandler);
35
+ /**
36
+ *
37
+ * @returns The path to the temporary kubeconfig
38
+ */
29
39
  getPath(): Promise<string>;
40
+ /**
41
+ * Deletes the temporary kubeconfig file
42
+ */
30
43
  clear(): Promise<void>;
31
- unlink(): Promise<void>;
32
- protected init(): Promise<void>;
44
+ protected ensureFile(): Promise<void>;
33
45
  get resolveProxyUrl(): string;
34
46
  /**
35
47
  * Creates new "temporary" kubeconfig that point to the kubectl-proxy.
@@ -43,9 +43,16 @@ export declare class LensProxy extends Singleton {
43
43
  protected getClusterForRequest: GetClusterForRequest;
44
44
  port: number;
45
45
  constructor(router: Router, { shellApiRequest, kubeApiRequest, getClusterForRequest }: LensProxyFunctions);
46
+ /**
47
+ * Starts to listen on an OS provided port. Will reject if the server throws
48
+ * an error.
49
+ *
50
+ * Resolves with the port number that was picked
51
+ */
52
+ private attemptToListen;
46
53
  /**
47
54
  * Starts the lens proxy.
48
- * @resolves After the server is listening
55
+ * @resolves After the server is listening on a good port
49
56
  * @rejects if there is an error before that happens
50
57
  */
51
58
  listen(): Promise<void>;
@@ -18,9 +18,14 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import { BrowserWindow } from "electron";
21
+ import { BrowserWindow, MenuItemConstructorOptions } from "electron";
22
22
  import type { WindowManager } from "./window-manager";
23
23
  export declare type MenuTopId = "mac" | "file" | "edit" | "view" | "help";
24
+ interface MenuItemsOpts extends MenuItemConstructorOptions {
25
+ submenu?: MenuItemConstructorOptions[];
26
+ }
24
27
  export declare function initMenu(windowManager: WindowManager): import("mobx").IReactionDisposer;
25
28
  export declare function showAbout(browserWindow: BrowserWindow): void;
29
+ export declare function getAppMenu(windowManager: WindowManager): MenuItemsOpts[];
26
30
  export declare function buildMenu(windowManager: WindowManager): void;
31
+ export {};
@@ -39,9 +39,9 @@ export declare class LensProtocolRouterMain extends proto.LensProtocolRouter {
39
39
  */
40
40
  route(rawUrl: string): Promise<void>;
41
41
  protected _executeMissingExtensionHandlers(extensionName: string): Promise<boolean>;
42
- protected _findMatchingExtensionByName(url: URLParse): Promise<LensExtension | string>;
43
- protected _routeToInternal(url: URLParse): RouteAttempt;
44
- protected _routeToExtension(url: URLParse): Promise<RouteAttempt>;
42
+ protected _findMatchingExtensionByName(url: URLParse<Record<string, string>>): Promise<LensExtension | string>;
43
+ protected _routeToInternal(url: URLParse<Record<string, string>>): RouteAttempt;
44
+ protected _routeToExtension(url: URLParse<Record<string, string>>): Promise<RouteAttempt>;
45
45
  /**
46
46
  * Add a function to the list which will be sequentially called if an extension
47
47
  * is not found while routing to the extensions
@@ -23,6 +23,9 @@ import { BrowserWindow } from "electron";
23
23
  import windowStateKeeper from "electron-window-state";
24
24
  import { Singleton } from "../common/utils";
25
25
  import { ClusterFrameInfo } from "../common/cluster-frames";
26
+ export declare const enum IpcMainWindowEvents {
27
+ OPEN_CONTEXT_MENU = "window:open-context-menu"
28
+ }
26
29
  export interface SendToViewArgs {
27
30
  channel: string;
28
31
  frameInfo?: ClusterFrameInfo;
@@ -69,8 +69,6 @@ export declare class TerminalApi extends WebSocketApi<TerminalEvents> {
69
69
  isReady: boolean;
70
70
  constructor(query: TerminalApiQuery);
71
71
  connect(): Promise<void>;
72
- destroy(): void;
73
- reconnect(): void;
74
72
  sendMessage(message: TerminalMessage): void;
75
73
  sendTerminalSize(cols: number, rows: number): void;
76
74
  protected _onMessage({ data, ...evt }: MessageEvent<ArrayBuffer>): void;
@@ -18,10 +18,4 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- export declare function copyToClipboard(elem: HTMLElement, { resetSelection }?: {
22
- resetSelection?: boolean;
23
- }): {
24
- copied: boolean;
25
- copiedText: string;
26
- clearSelection: () => void;
27
- };
21
+ export {};
@@ -18,15 +18,19 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import "./network-policy-details.scss";
22
21
  import React from "react";
23
- import { IPolicyEgress, IPolicyIngress, NetworkPolicy } from "../../../common/k8s-api/endpoints/network-policy.api";
22
+ import { IPolicyIpBlock, NetworkPolicy, NetworkPolicyPeer, NetworkPolicyPort } from "../../../common/k8s-api/endpoints/network-policy.api";
24
23
  import type { KubeObjectDetailsProps } from "../kube-object-details";
24
+ import type { LabelMatchExpression, LabelSelector } from "../../../common/k8s-api/kube-object";
25
25
  interface Props extends KubeObjectDetailsProps<NetworkPolicy> {
26
26
  }
27
27
  export declare class NetworkPolicyDetails extends React.Component<Props> {
28
- renderIngressFrom(ingress: IPolicyIngress): JSX.Element;
29
- renderEgressTo(egress: IPolicyEgress): JSX.Element;
28
+ renderIPolicyIpBlock(ipBlock: IPolicyIpBlock | undefined): JSX.Element;
29
+ renderMatchLabels(matchLabels: Record<string, string | undefined> | undefined): JSX.Element[];
30
+ renderMatchExpressions(matchExpressions: LabelMatchExpression[] | undefined): JSX.Element[];
31
+ renderIPolicySelector(name: string, selector: LabelSelector | undefined): JSX.Element;
32
+ renderNetworkPolicyPeers(name: string, peers: NetworkPolicyPeer[] | undefined): JSX.Element;
33
+ renderNetworkPolicyPorts(ports: NetworkPolicyPort[] | undefined): JSX.Element;
30
34
  render(): JSX.Element;
31
35
  }
32
36
  export {};
@@ -32,9 +32,10 @@ export declare class Nodes extends React.Component<Props> {
32
32
  componentDidMount(): Promise<void>;
33
33
  componentWillUnmount(): void;
34
34
  getLastMetricValues(node: Node, metricNames: string[]): number[];
35
+ private renderUsage;
35
36
  renderCpuUsage(node: Node): JSX.Element;
36
37
  renderMemoryUsage(node: Node): JSX.Element;
37
- renderDiskUsage(node: Node): any;
38
+ renderDiskUsage(node: Node): JSX.Element;
38
39
  renderConditions(node: Node): JSX.Element[];
39
40
  render(): JSX.Element;
40
41
  }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import "@testing-library/jest-dom/extend-expect";
@@ -18,16 +18,15 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import { DOMAttributes } from "react";
22
- import { AvatarTypeMap } from "@material-ui/core";
23
- interface Props extends DOMAttributes<HTMLElement>, Partial<AvatarTypeMap> {
21
+ import { HTMLAttributes, ImgHTMLAttributes } from "react";
22
+ export interface AvatarProps extends HTMLAttributes<HTMLElement> {
24
23
  title: string;
25
24
  colorHash?: string;
26
- width?: number;
27
- height?: number;
25
+ size?: number;
28
26
  src?: string;
29
- className?: string;
30
27
  background?: string;
28
+ variant?: "circle" | "rounded" | "square";
29
+ imgProps?: ImgHTMLAttributes<HTMLImageElement>;
30
+ disabled?: boolean;
31
31
  }
32
- export declare function Avatar(props: Props): JSX.Element;
33
- export {};
32
+ export declare function Avatar(props: AvatarProps): JSX.Element;
@@ -18,4 +18,4 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- export * from "./clipboard";
21
+ export * from "./avatar";
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ export declare const ActiveHotbarName: () => JSX.Element;
@@ -18,7 +18,6 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import "./bottom-bar.scss";
22
21
  import React from "react";
23
22
  import { StatusBarRegistration } from "../../../extensions/registries";
24
23
  export declare class BottomBar extends React.Component {
@@ -30,6 +30,7 @@ export interface DialogProps {
30
30
  modal?: boolean;
31
31
  pinned?: boolean;
32
32
  animated?: boolean;
33
+ "data-testid"?: string;
33
34
  }
34
35
  interface DialogState {
35
36
  isOpen: boolean;
@@ -30,7 +30,6 @@ export declare class InstallChart extends Component<Props> {
30
30
  error: string;
31
31
  showNotes: boolean;
32
32
  constructor(props: Props);
33
- get values(): string;
34
33
  get chartData(): IChartInstallData;
35
34
  get tabId(): string;
36
35
  get versions(): string[];
@@ -21,31 +21,42 @@
21
21
  import "./drawer.scss";
22
22
  import React from "react";
23
23
  import { AnimateName } from "../animate";
24
+ export declare type DrawerPosition = "top" | "left" | "right" | "bottom";
24
25
  export interface DrawerProps {
25
26
  open: boolean;
26
27
  title: React.ReactNode;
28
+ /**
29
+ * The width or heigh (depending on `position`) of the Drawer.
30
+ *
31
+ * If not set then the Drawer will be resizable.
32
+ */
27
33
  size?: string;
28
34
  usePortal?: boolean;
29
35
  className?: string | object;
30
36
  contentClass?: string | object;
31
- position?: "top" | "left" | "right" | "bottom";
37
+ position?: DrawerPosition;
32
38
  animation?: AnimateName;
33
39
  onClose?: () => void;
34
40
  toolbar?: React.ReactNode;
35
41
  }
36
42
  interface State {
37
43
  isCopied: boolean;
44
+ width: number;
38
45
  }
39
- export declare class Drawer extends React.Component<DrawerProps> {
46
+ export declare class Drawer extends React.Component<DrawerProps, State> {
40
47
  static defaultProps: object;
41
48
  private mouseDownTarget;
42
49
  private contentElem;
43
50
  private scrollElem;
44
51
  private scrollPos;
45
52
  private stopListenLocation;
46
- state: State;
53
+ state: {
54
+ isCopied: boolean;
55
+ width: number;
56
+ };
47
57
  componentDidMount(): void;
48
58
  componentWillUnmount(): void;
59
+ resizeWidth: (width: number) => void;
49
60
  fixUpTripleClick: (ev: MouseEvent) => void;
50
61
  saveScrollPos: () => void;
51
62
  restoreScrollPos: () => void;
@@ -18,13 +18,12 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import React, { DOMAttributes } from "react";
21
+ import React, { HTMLAttributes } from "react";
22
22
  import type { CatalogEntity } from "../../../common/catalog";
23
23
  import { IClassName } from "../../utils";
24
- interface Props extends DOMAttributes<HTMLElement> {
24
+ interface Props extends HTMLAttributes<HTMLElement> {
25
25
  entity: CatalogEntity;
26
26
  index: number;
27
- className?: IClassName;
28
27
  errorClass?: IClassName;
29
28
  add: (item: CatalogEntity, index: number) => void;
30
29
  remove: (uid: string) => void;
@@ -36,6 +35,7 @@ export declare class HotbarEntityIcon extends React.Component<Props> {
36
35
  get kindIcon(): JSX.Element;
37
36
  get ledIcon(): JSX.Element;
38
37
  isActive(item: CatalogEntity): boolean;
38
+ onMenuOpen(): Promise<void>;
39
39
  render(): JSX.Element;
40
40
  }
41
41
  export {};
@@ -18,23 +18,16 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import "./hotbar-icon.scss";
22
- import { DOMAttributes } from "react";
23
21
  import type { CatalogEntityContextMenu } from "../../../common/catalog";
24
- import { IClassName } from "../../utils";
25
- export interface HotbarIconProps extends DOMAttributes<HTMLElement> {
22
+ import { AvatarProps } from "../avatar";
23
+ export interface Props extends AvatarProps {
26
24
  uid: string;
27
- title: string;
28
25
  source: string;
29
- src?: string;
30
26
  material?: string;
31
27
  onMenuOpen?: () => void;
32
- className?: IClassName;
33
28
  active?: boolean;
34
29
  menuItems?: CatalogEntityContextMenu[];
35
30
  disabled?: boolean;
36
- size?: number;
37
- background?: string;
38
31
  tooltip?: string;
39
32
  }
40
- export declare const HotbarIcon: ({ menuItems, size, tooltip, ...props }: HotbarIconProps) => JSX.Element;
33
+ export declare const HotbarIcon: ({ menuItems, size, tooltip, ...props }: Props) => JSX.Element;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import type { ApiManager } from "../../../../common/k8s-api/api-manager";
22
+ import type { Injectable } from "@ogre-tools/injectable";
23
+ declare const apiManagerInjectable: Injectable<ApiManager>;
24
+ export default apiManagerInjectable;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import type { Injectable } from "@ogre-tools/injectable";
22
+ import type { Cluster } from "../../../../main/cluster";
23
+ interface Dependencies {
24
+ cluster: Cluster;
25
+ }
26
+ declare const clusterNameInjectable: Injectable<string | undefined, Dependencies>;
27
+ export default clusterNameInjectable;
@@ -0,0 +1,4 @@
1
+ import type { Injectable } from "@ogre-tools/injectable";
2
+ import type { Cluster } from "../../../../main/cluster";
3
+ declare const clusterInjectable: Injectable<Cluster | null>;
4
+ export default clusterInjectable;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import { editResourceTab } from "../../dock/edit-resource.store";
22
+ import type { Injectable } from "@ogre-tools/injectable";
23
+ declare const editResourceTabInjectable: Injectable<typeof editResourceTab>;
24
+ export default editResourceTabInjectable;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import { hideDetails } from "../../kube-detail-params";
22
+ import type { Injectable } from "@ogre-tools/injectable";
23
+ export declare const hideDetailsInjectable: Injectable<typeof hideDetails>;
24
+ export default hideDetailsInjectable;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import type { KubeObjectMenuRegistry } from "../../../../../extensions/registries";
22
+ import type { KubeObject } from "../../../../../common/k8s-api/kube-object";
23
+ export interface Dependencies {
24
+ kubeObjectMenuRegistry: KubeObjectMenuRegistry;
25
+ }
26
+ export interface InstantiationParameter {
27
+ kubeObject: KubeObject;
28
+ }
29
+ export declare const getKubeObjectMenuItems: ({ kubeObjectMenuRegistry }: Dependencies, { kubeObject }: InstantiationParameter) => import("react").ComponentType<any>[];