@k8slens/extensions 5.6.0-git.c8cf300e9b.0 → 5.6.0-git.cdbd19ce04.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-injection-token.d.ts +0 -1
- package/dist/src/common/application-update/selected-update-channel/default-update-channel.injectable.d.ts +2 -0
- package/dist/src/common/application-update/selected-update-channel/selected-update-channel.injectable.d.ts +8 -0
- package/dist/src/common/application-update/update-channels.d.ts +11 -0
- package/dist/src/common/catalog-entities/kubernetes-cluster.d.ts +1 -1
- package/dist/src/common/cluster/cluster.d.ts +2 -2
- package/dist/src/common/cluster/create-cluster-injection-token.d.ts +2 -2
- package/dist/src/common/cluster-store/allowed-resources-injection-token.d.ts +6 -0
- package/dist/src/common/cluster-store/cluster-store.d.ts +4 -1
- package/dist/src/common/cluster-store/read-cluster-config.injectable.d.ts +4 -0
- package/dist/src/common/cluster-types.d.ts +8 -0
- package/dist/src/common/front-end-routing/{route-injection-token.d.ts → front-end-route-injection-token.d.ts} +1 -1
- package/dist/src/common/front-end-routing/navigate-to-route-injection-token.d.ts +1 -1
- package/dist/src/common/front-end-routing/routes/catalog/catalog-route.injectable.d.ts +1 -1
- package/dist/src/common/front-end-routing/routes/cluster/custom-resources/custom-resources/custom-resources-route.injectable.d.ts +1 -1
- package/dist/src/common/front-end-routing/routes/cluster-view/cluster-view-route.injectable.d.ts +1 -1
- package/dist/src/common/fs/read-file-sync.injectable.d.ts +3 -0
- package/dist/src/common/ipc/index.d.ts +0 -1
- package/dist/src/common/k8s-api/endpoints/cluster.api.d.ts +7 -0
- package/dist/src/common/k8s-api/endpoints/custom-resource-definition.api.d.ts +8 -3
- package/dist/src/common/k8s-api/endpoints/ingress.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/metrics.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/pod.api.d.ts +49 -40
- package/dist/src/common/{ipc-channel/channel.d.ts → k8s-api/endpoints/types/external-documentation.d.ts} +3 -3
- package/dist/src/common/k8s-api/endpoints/types/json-schema-props.d.ts +86 -0
- package/dist/src/common/k8s-api/kube-api.d.ts +9 -0
- package/dist/src/common/k8s-api/kube-object.store.d.ts +2 -2
- package/dist/src/common/kube-helpers.d.ts +10 -2
- package/dist/src/common/terminal/channels.d.ts +28 -0
- package/dist/src/common/user-store/preferences-helpers.d.ts +2 -6
- package/dist/src/common/user-store/user-store.d.ts +7 -3
- package/dist/src/common/utils/buildUrl.d.ts +1 -1
- package/dist/src/common/utils/reject-promise.d.ts +2 -2
- package/dist/src/common/utils/resolve-system-proxy/resolve-system-proxy-injection-token.d.ts +6 -0
- package/dist/src/common/utils/type-narrowing.d.ts +5 -0
- package/dist/src/common/vars/base-bundled-binaries-dir.injectable.d.ts +2 -0
- package/dist/src/common/vars/bundled-resources-dir.injectable.d.ts +2 -0
- package/dist/src/common/vars/lens-resources-dir.injectable.d.ts +2 -0
- package/dist/src/common/vars/normalized-platform-architecture.injectable.d.ts +2 -0
- package/dist/src/common/vars/normalized-platform.injectable.d.ts +2 -0
- package/dist/src/common/vars/package-json.injectable.d.ts +353 -0
- package/dist/src/common/vars/static-files-directory.injectable.d.ts +2 -0
- package/dist/src/common/vars.d.ts +7 -9
- package/dist/src/extensions/common-api/index.d.ts +2 -1
- package/dist/src/extensions/common-api/proxy.d.ts +10 -0
- package/dist/src/extensions/extension-loader/extension/extension.injectable.d.ts +7 -0
- package/dist/src/extensions/extension-loader/extension-loader.d.ts +2 -2
- package/dist/src/extensions/extension-loader/extension-registrator-injection-token.d.ts +7 -0
- package/dist/src/extensions/extensions-store/extensions-store.d.ts +5 -4
- package/dist/src/extensions/lens-extension-set-dependencies.d.ts +1 -1
- package/dist/src/extensions/lens-renderer-extension.d.ts +2 -0
- package/dist/src/extensions/registries/entity-setting-registry.d.ts +1 -1
- package/dist/src/extensions/renderer-api/components.d.ts +1 -0
- package/dist/src/main/app-paths/app-name/product-name.injectable.d.ts +2 -0
- package/dist/src/main/kube-auth-proxy/kube-auth-proxy.d.ts +1 -0
- package/dist/src/main/kubectl/kubectl.d.ts +18 -14
- package/dist/src/main/start-main-application/lens-window/application-window/application-window.injectable.d.ts +1 -6
- package/dist/src/main/start-main-application/lens-window/application-window/create-electron-window.injectable.d.ts +29 -0
- package/dist/src/main/start-main-application/lens-window/application-window/create-lens-window.injectable.d.ts +8 -11
- package/dist/src/main/start-main-application/lens-window/application-window/lens-window-injection-token.d.ts +6 -3
- package/dist/src/main/start-main-application/lens-window/application-window/wait-until-bundled-extensions-are-loaded.injectable.d.ts +2 -0
- package/dist/src/main/start-main-application/lens-window/navigate.injectable.d.ts +1 -1
- package/dist/src/main/start-main-application/lens-window/splash-window/splash-window.injectable.d.ts +1 -6
- package/dist/src/main/{app-paths/register-channel → utils/channel}/ipc-main/ipc-main.injectable.d.ts +0 -1
- package/dist/src/renderer/api/terminal-api.d.ts +2 -22
- package/dist/src/renderer/api/websocket-api.d.ts +4 -4
- package/dist/src/{common/cluster-store → renderer/cluster-frame-context}/hosted-cluster-id.injectable.d.ts +0 -0
- package/dist/src/{common/cluster-store → renderer/cluster-frame-context}/hosted-cluster.injectable.d.ts +1 -1
- package/dist/src/renderer/components/+namespaces/namespace-select.d.ts +1 -0
- package/dist/src/{common/ipc-channel/create-channel/create-channel.d.ts → renderer/components/+preferences/app-preference-tab/app-preference-tab-registration.d.ts} +5 -2
- package/dist/src/renderer/components/+user-management/+service-accounts/service-account-menu.d.ts +1 -0
- package/dist/src/renderer/components/animate/animate.d.ts +6 -1
- package/dist/src/renderer/components/animate/request-animation-frame.injectable.d.ts +2 -0
- package/dist/src/renderer/components/dock/dock/create-dock-tab.injectable.d.ts +1 -1
- package/dist/src/renderer/components/dock/terminal/terminal.d.ts +6 -3
- package/dist/src/renderer/components/drawer/drawer-item-labels.d.ts +1 -0
- package/dist/src/renderer/components/drawer/drawer-item.d.ts +7 -2
- package/dist/src/renderer/components/drawer/drawer-title.d.ts +5 -1
- package/dist/src/renderer/components/icon/icon.d.ts +22 -1
- package/dist/src/renderer/components/input/input.d.ts +7 -8
- package/dist/src/renderer/components/input/input_validators.d.ts +28 -15
- package/dist/src/renderer/components/item-object-list/filter-icon.d.ts +1 -0
- package/dist/src/renderer/components/layout/sidebar-items.injectable.d.ts +0 -2
- package/dist/src/renderer/components/notifications/index.d.ts +0 -1
- package/dist/src/renderer/components/notifications/notifications-store.injectable.d.ts +3 -0
- package/dist/src/renderer/components/notifications/notifications.d.ts +7 -12
- package/dist/src/renderer/components/notifications/notifications.store.d.ts +0 -1
- package/dist/src/renderer/components/resource-metrics/no-metrics.d.ts +1 -0
- package/dist/src/renderer/components/select/select.d.ts +1 -1
- package/dist/src/renderer/components/switch/form-switcher.d.ts +1 -0
- package/dist/src/renderer/components/table/table-cell.d.ts +0 -4
- package/dist/src/renderer/components/wizard/wizard.d.ts +2 -0
- package/dist/src/renderer/routes/route-path-parameters.injectable.d.ts +1 -1
- package/dist/src/renderer/{app-paths/get-value-from-registered-channel/ipc-renderer → utils/channel}/ipc-renderer.injectable.d.ts +0 -1
- package/dist/src/renderer/utils/{display-booleans.d.ts → display-mode.d.ts} +4 -2
- package/dist/src/renderer/utils/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/src/common/app-paths/directory-for-bundled-binaries/directory-for-bundled-binaries.injectable.d.ts +0 -2
- package/dist/src/common/cluster-store/allowed-resources.injectable.d.ts +0 -2
- package/dist/src/common/ipc/update-available.d.ts +0 -19
- package/dist/src/main/start-main-application/lens-window/application-window/create-electron-window-for.injectable.d.ts +0 -22
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ElectronWindow } from "./create-lens-window.injectable";
|
|
2
|
+
import type { RequireExactlyOne } from "type-fest";
|
|
3
|
+
export declare type ElectronWindowTitleBarStyle = "hiddenInset" | "hidden" | "default" | "customButtonsOnHover";
|
|
4
|
+
export interface FileSource {
|
|
5
|
+
file: string;
|
|
6
|
+
}
|
|
7
|
+
export interface UrlSource {
|
|
8
|
+
url: string;
|
|
9
|
+
}
|
|
10
|
+
export declare type ContentSource = RequireExactlyOne<FileSource & UrlSource>;
|
|
11
|
+
export interface ElectronWindowConfiguration {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
defaultHeight: number;
|
|
15
|
+
defaultWidth: number;
|
|
16
|
+
getContentSource: () => ContentSource;
|
|
17
|
+
resizable: boolean;
|
|
18
|
+
windowFrameUtilitiesAreShown: boolean;
|
|
19
|
+
centered: boolean;
|
|
20
|
+
titleBarStyle?: ElectronWindowTitleBarStyle;
|
|
21
|
+
beforeOpen?: () => Promise<void>;
|
|
22
|
+
onClose: () => void;
|
|
23
|
+
onFocus?: () => void;
|
|
24
|
+
onBlur?: () => void;
|
|
25
|
+
onDomReady?: () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare type CreateElectronWindow = (config: ElectronWindowConfiguration) => ElectronWindow;
|
|
28
|
+
declare const createElectronWindowInjectable: import("@ogre-tools/injectable").Injectable<CreateElectronWindow, unknown, void>;
|
|
29
|
+
export default createElectronWindowInjectable;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import type { SendToViewArgs } from "./lens-window-injection-token";
|
|
2
|
-
import type { ElectronWindowTitleBarStyle } from "./create-electron-window
|
|
3
|
-
export interface
|
|
1
|
+
import type { LensWindow, SendToViewArgs } from "./lens-window-injection-token";
|
|
2
|
+
import type { ContentSource, ElectronWindowTitleBarStyle } from "./create-electron-window.injectable";
|
|
3
|
+
export interface ElectronWindow {
|
|
4
4
|
show: () => void;
|
|
5
5
|
close: () => void;
|
|
6
6
|
send: (args: SendToViewArgs) => void;
|
|
7
|
+
loadFile: (filePath: string) => Promise<void>;
|
|
8
|
+
loadUrl: (url: string) => Promise<void>;
|
|
7
9
|
}
|
|
8
|
-
interface LensWindowConfiguration {
|
|
10
|
+
export interface LensWindowConfiguration {
|
|
9
11
|
id: string;
|
|
10
12
|
title: string;
|
|
11
13
|
defaultHeight: number;
|
|
12
14
|
defaultWidth: number;
|
|
13
|
-
|
|
15
|
+
getContentSource: () => ContentSource;
|
|
14
16
|
resizable: boolean;
|
|
15
17
|
windowFrameUtilitiesAreShown: boolean;
|
|
16
18
|
centered: boolean;
|
|
@@ -20,10 +22,5 @@ interface LensWindowConfiguration {
|
|
|
20
22
|
onBlur?: () => void;
|
|
21
23
|
onDomReady?: () => void;
|
|
22
24
|
}
|
|
23
|
-
declare const createLensWindowInjectable: import("@ogre-tools/injectable").Injectable<(configuration: LensWindowConfiguration) =>
|
|
24
|
-
readonly visible: boolean;
|
|
25
|
-
show: () => Promise<void>;
|
|
26
|
-
close: () => void;
|
|
27
|
-
send: (args: SendToViewArgs) => Promise<void>;
|
|
28
|
-
}, unknown, void>;
|
|
25
|
+
declare const createLensWindowInjectable: import("@ogre-tools/injectable").Injectable<(configuration: LensWindowConfiguration) => LensWindow, unknown, void>;
|
|
29
26
|
export default createLensWindowInjectable;
|
|
@@ -5,9 +5,12 @@ export interface SendToViewArgs {
|
|
|
5
5
|
data?: unknown[];
|
|
6
6
|
}
|
|
7
7
|
export interface LensWindow {
|
|
8
|
-
|
|
8
|
+
id: string;
|
|
9
|
+
start: () => Promise<void>;
|
|
9
10
|
close: () => void;
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
show: () => void;
|
|
12
|
+
send: (args: SendToViewArgs) => void;
|
|
13
|
+
isVisible: boolean;
|
|
14
|
+
isStarting: boolean;
|
|
12
15
|
}
|
|
13
16
|
export declare const lensWindowInjectionToken: import("@ogre-tools/injectable").InjectionToken<LensWindow, void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const navigateInjectable: import("@ogre-tools/injectable").Injectable<(url: string, frameId?: number
|
|
1
|
+
declare const navigateInjectable: import("@ogre-tools/injectable").Injectable<(url: string, frameId?: number) => Promise<void>, unknown, void>;
|
|
2
2
|
export default navigateInjectable;
|
package/dist/src/main/start-main-application/lens-window/splash-window/splash-window.injectable.d.ts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
declare const splashWindowInjectable: import("@ogre-tools/injectable").Injectable<
|
|
2
|
-
readonly visible: boolean;
|
|
3
|
-
show: () => Promise<void>;
|
|
4
|
-
close: () => void;
|
|
5
|
-
send: (args: import("../application-window/lens-window-injection-token").SendToViewArgs) => Promise<void>;
|
|
6
|
-
}, import("../application-window/lens-window-injection-token").LensWindow, void>;
|
|
1
|
+
declare const splashWindowInjectable: import("@ogre-tools/injectable").Injectable<import("../application-window/lens-window-injection-token").LensWindow, import("../application-window/lens-window-injection-token").LensWindow, void>;
|
|
7
2
|
export default splashWindowInjectable;
|
|
@@ -4,27 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { WebSocketEvents } from "./websocket-api";
|
|
6
6
|
import { WebSocketApi } from "./websocket-api";
|
|
7
|
-
|
|
8
|
-
STDIN = "stdin",
|
|
9
|
-
STDOUT = "stdout",
|
|
10
|
-
CONNECTED = "connected",
|
|
11
|
-
RESIZE = "resize"
|
|
12
|
-
}
|
|
13
|
-
export declare type TerminalMessage = {
|
|
14
|
-
type: TerminalChannels.STDIN;
|
|
15
|
-
data: string;
|
|
16
|
-
} | {
|
|
17
|
-
type: TerminalChannels.STDOUT;
|
|
18
|
-
data: string;
|
|
19
|
-
} | {
|
|
20
|
-
type: TerminalChannels.CONNECTED;
|
|
21
|
-
} | {
|
|
22
|
-
type: TerminalChannels.RESIZE;
|
|
23
|
-
data: {
|
|
24
|
-
width: number;
|
|
25
|
-
height: number;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
7
|
+
import { type TerminalMessage } from "../../common/terminal/channels";
|
|
28
8
|
declare enum TerminalColor {
|
|
29
9
|
RED = "\u001B[31m",
|
|
30
10
|
GREEN = "\u001B[32m",
|
|
@@ -60,7 +40,7 @@ export declare class TerminalApi extends WebSocketApi<TerminalEvents> {
|
|
|
60
40
|
connect(): Promise<void>;
|
|
61
41
|
sendMessage(message: TerminalMessage): void;
|
|
62
42
|
sendTerminalSize(cols: number, rows: number): void;
|
|
63
|
-
protected _onMessage({ data, ...evt }: MessageEvent<
|
|
43
|
+
protected _onMessage({ data, ...evt }: MessageEvent<string>): void;
|
|
64
44
|
protected _onOpen(evt: Event): void;
|
|
65
45
|
protected _onClose(evt: CloseEvent): void;
|
|
66
46
|
protected emitStatus(data: string, options?: {
|
|
@@ -22,9 +22,9 @@ interface WebsocketApiParams {
|
|
|
22
22
|
/**
|
|
23
23
|
* The message for pinging the websocket
|
|
24
24
|
*
|
|
25
|
-
* @default "
|
|
25
|
+
* @default "{type: \"ping\"}"
|
|
26
26
|
*/
|
|
27
|
-
pingMessage?: string
|
|
27
|
+
pingMessage?: string;
|
|
28
28
|
/**
|
|
29
29
|
* If set to a number > 0, then the API will ping the socket on that interval.
|
|
30
30
|
*
|
|
@@ -53,7 +53,7 @@ export interface WebSocketEvents {
|
|
|
53
53
|
declare const WebSocketApi_base: new <T>() => TypedEventEmitter<T>;
|
|
54
54
|
export declare class WebSocketApi<Events extends WebSocketEvents> extends WebSocketApi_base<Events> {
|
|
55
55
|
protected socket: WebSocket | null;
|
|
56
|
-
protected pendingCommands:
|
|
56
|
+
protected pendingCommands: string[];
|
|
57
57
|
protected reconnectTimer?: number;
|
|
58
58
|
protected pingTimer?: number;
|
|
59
59
|
protected params: Defaulted<WebsocketApiParams, keyof typeof WebSocketApi["defaultParams"]>;
|
|
@@ -70,7 +70,7 @@ export declare class WebSocketApi<Events extends WebSocketEvents> extends WebSoc
|
|
|
70
70
|
reconnect(): void;
|
|
71
71
|
destroy(): void;
|
|
72
72
|
clearAllListeners(): void;
|
|
73
|
-
send(command: string
|
|
73
|
+
send(command: string): void;
|
|
74
74
|
protected flush(): void;
|
|
75
75
|
protected _onOpen(evt: Event): void;
|
|
76
76
|
protected _onMessage({ data }: MessageEvent): void;
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const hostedClusterInjectable: import("@ogre-tools/injectable").Injectable<import("
|
|
1
|
+
declare const hostedClusterInjectable: import("@ogre-tools/injectable").Injectable<import("../../common/cluster/cluster").Cluster | undefined, unknown, void>;
|
|
2
2
|
export default hostedClusterInjectable;
|
|
@@ -2,6 +2,7 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
5
6
|
import "./namespace-select.scss";
|
|
6
7
|
import type { SelectProps } from "../select";
|
|
7
8
|
export declare type NamespaceSelectSort = (left: string, right: string) => number;
|
|
@@ -2,5 +2,8 @@
|
|
|
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
|
-
|
|
6
|
-
|
|
5
|
+
export interface AppPreferenceTabRegistration {
|
|
6
|
+
title: string;
|
|
7
|
+
id: string;
|
|
8
|
+
orderNumber?: number;
|
|
9
|
+
}
|
package/dist/src/renderer/components/+user-management/+service-accounts/service-account-menu.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { KubeObjectMenuProps } from "../../kube-object-menu";
|
|
2
3
|
import type { ServiceAccount } from "../../../../common/k8s-api/endpoints";
|
|
3
4
|
export declare function ServiceAccountMenu(props: KubeObjectMenuProps<ServiceAccount>): JSX.Element;
|
|
@@ -14,4 +14,9 @@ export interface AnimateProps {
|
|
|
14
14
|
leaveDuration?: number;
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
interface Dependencies {
|
|
18
|
+
requestAnimationFrame: (callback: () => void) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const NonInjectedAnimate: (props: AnimateProps & Dependencies) => JSX.Element;
|
|
21
|
+
export declare const Animate: React.FunctionComponent<AnimateProps>;
|
|
22
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { DockTab, DockTabCreate } from "./store";
|
|
2
|
-
declare const createDockTabInjectable: import("@ogre-tools/injectable").Injectable<(rawTabDesc: DockTabCreate, addNumber?: boolean
|
|
2
|
+
declare const createDockTabInjectable: import("@ogre-tools/injectable").Injectable<(rawTabDesc: DockTabCreate, addNumber?: boolean) => DockTab, unknown, void>;
|
|
3
3
|
export default createDockTabInjectable;
|
|
@@ -30,7 +30,10 @@ export declare class Terminal {
|
|
|
30
30
|
private get viewport();
|
|
31
31
|
attachTo(parentElem: HTMLElement): void;
|
|
32
32
|
detach(): void;
|
|
33
|
-
|
|
33
|
+
get fontFamily(): string;
|
|
34
|
+
get fontSize(): number;
|
|
35
|
+
get theme(): Record<string, string>;
|
|
36
|
+
constructor(dependencies: TerminalDependencies, { tabId, api, }: TerminalArguments);
|
|
34
37
|
destroy(): void;
|
|
35
38
|
fit: () => void;
|
|
36
39
|
fitLazy: import("lodash").DebouncedFunc<() => void>;
|
|
@@ -44,7 +47,7 @@ export declare class Terminal {
|
|
|
44
47
|
onClickLink: (evt: MouseEvent, link: string) => void;
|
|
45
48
|
onContextMenu: () => void;
|
|
46
49
|
onSelectionChange: () => void;
|
|
47
|
-
setFontSize: (
|
|
48
|
-
setFontFamily: (
|
|
50
|
+
setFontSize: (fontSize: number) => void;
|
|
51
|
+
setFontFamily: (fontFamily: string) => void;
|
|
49
52
|
keyHandler: (evt: KeyboardEvent) => boolean;
|
|
50
53
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
5
6
|
import type { DrawerItemProps } from "./drawer-item";
|
|
6
7
|
export interface DrawerItemLabelsProps extends DrawerItemProps {
|
|
7
8
|
labels: string[] | Partial<Record<string, string>>;
|
|
@@ -9,6 +9,11 @@ export interface DrawerItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
title?: string;
|
|
10
10
|
labelsOnly?: boolean;
|
|
11
11
|
hidden?: boolean;
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated This prop is no longer used, you should stringify the booleans yourself.
|
|
14
|
+
*
|
|
15
|
+
* This was only meant to be an internal prop anyway.
|
|
16
|
+
*/
|
|
17
|
+
renderBooleans?: boolean;
|
|
13
18
|
}
|
|
14
|
-
export declare function DrawerItem({ name, title, labelsOnly, children, hidden, className,
|
|
19
|
+
export declare function DrawerItem({ name, title, labelsOnly, children, hidden, className, ...elemProps }: DrawerItemProps): JSX.Element | null;
|
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
export interface DrawerTitleProps {
|
|
7
7
|
className?: string;
|
|
8
|
-
children
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Prefer passing the value as `children`
|
|
11
|
+
*/
|
|
12
|
+
title?: React.ReactNode;
|
|
9
13
|
/**
|
|
10
14
|
* Specifies how large this title is
|
|
11
15
|
*
|
|
@@ -11,7 +11,28 @@ export interface BaseIconProps {
|
|
|
11
11
|
*/
|
|
12
12
|
material?: string;
|
|
13
13
|
/**
|
|
14
|
-
* Either an SVG
|
|
14
|
+
* Either an SVG XML or one of the following names
|
|
15
|
+
* - configuration
|
|
16
|
+
* - crane
|
|
17
|
+
* - group
|
|
18
|
+
* - helm
|
|
19
|
+
* - install
|
|
20
|
+
* - kube
|
|
21
|
+
* - lens-logo
|
|
22
|
+
* - license
|
|
23
|
+
* - logo-lens
|
|
24
|
+
* - logout
|
|
25
|
+
* - nodes
|
|
26
|
+
* - push_off
|
|
27
|
+
* - push_pin
|
|
28
|
+
* - spinner
|
|
29
|
+
* - ssh
|
|
30
|
+
* - storage
|
|
31
|
+
* - terminal
|
|
32
|
+
* - user
|
|
33
|
+
* - users
|
|
34
|
+
* - wheel
|
|
35
|
+
* - workloads
|
|
15
36
|
*/
|
|
16
37
|
svg?: string;
|
|
17
38
|
/**
|
|
@@ -8,10 +8,9 @@ import type { DOMAttributes, InputHTMLAttributes, TextareaHTMLAttributes } from
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
import type { TooltipProps } from "../tooltip";
|
|
10
10
|
import * as Validators from "./input_validators";
|
|
11
|
-
import type { InputValidator } from "./input_validators";
|
|
12
|
-
declare const InputValidators: {
|
|
13
|
-
|
|
14
|
-
AsyncInputValidationError: typeof Validators.AsyncInputValidationError;
|
|
11
|
+
import type { InputValidator, InputValidation, InputValidationResult, SyncValidationMessage } from "./input_validators";
|
|
12
|
+
declare const asyncInputValidator: typeof Validators.asyncInputValidator, inputValidator: typeof Validators.inputValidator, isAsyncValidator: typeof Validators.isAsyncValidator, unionInputValidatorsAsync: typeof Validators.unionInputValidatorsAsync, InputValidators: {
|
|
13
|
+
unionInputValidators(baseValidator: Pick<Validators.InputValidator<false>, "message" | "condition">, ...validators: Validators.InputValidator<false>[]): Validators.InputValidator<false>;
|
|
15
14
|
isRequired: Validators.InputValidator<false>;
|
|
16
15
|
isEmail: Validators.InputValidator<false>;
|
|
17
16
|
isNumber: Validators.InputValidator<false>;
|
|
@@ -30,8 +29,8 @@ declare const InputValidators: {
|
|
|
30
29
|
systemName: Validators.InputValidator<false>;
|
|
31
30
|
accountId: Validators.InputValidator<false>;
|
|
32
31
|
};
|
|
33
|
-
export { InputValidators };
|
|
34
|
-
export type { InputValidator };
|
|
32
|
+
export { InputValidators, asyncInputValidator, inputValidator, isAsyncValidator, unionInputValidatorsAsync, };
|
|
33
|
+
export type { InputValidator, InputValidation, InputValidationResult, SyncValidationMessage, };
|
|
35
34
|
declare type InputElement = HTMLInputElement | HTMLTextAreaElement;
|
|
36
35
|
declare type InputElementProps = InputHTMLAttributes<HTMLInputElement> & TextareaHTMLAttributes<HTMLTextAreaElement> & DOMAttributes<InputElement>;
|
|
37
36
|
export interface IconDataFnArg {
|
|
@@ -75,7 +74,7 @@ interface State {
|
|
|
75
74
|
export declare class Input extends React.Component<InputProps, State> {
|
|
76
75
|
static defaultProps: object;
|
|
77
76
|
input: InputElement | null;
|
|
78
|
-
validators: InputValidator
|
|
77
|
+
validators: InputValidator[];
|
|
79
78
|
state: State;
|
|
80
79
|
constructor(props: InputProps);
|
|
81
80
|
componentWillUnmount(): void;
|
|
@@ -94,7 +93,7 @@ export declare class Input extends React.Component<InputProps, State> {
|
|
|
94
93
|
onFocus(evt: React.FocusEvent<InputElement>): void;
|
|
95
94
|
onBlur(evt: React.FocusEvent<InputElement>): void;
|
|
96
95
|
setDirtyOnChange: import("lodash").DebouncedFunc<() => void>;
|
|
97
|
-
onChange(evt: React.ChangeEvent<any>): void
|
|
96
|
+
onChange(evt: React.ChangeEvent<any>): Promise<void>;
|
|
98
97
|
onKeyDown(evt: React.KeyboardEvent<InputElement>): void;
|
|
99
98
|
get showMaxLenIndicator(): boolean | 0 | undefined;
|
|
100
99
|
get isUncontrolled(): boolean;
|
|
@@ -3,29 +3,42 @@
|
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
5
|
import type { InputProps } from "./input";
|
|
6
|
-
import type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare type
|
|
6
|
+
import type React from "react";
|
|
7
|
+
import type { SetRequired } from "type-fest";
|
|
8
|
+
export declare type InputValidationResult<IsAsync extends boolean> = IsAsync extends true ? Promise<void> : boolean;
|
|
9
|
+
export declare type InputValidation<IsAsync extends boolean> = (value: string, props?: InputProps) => InputValidationResult<IsAsync>;
|
|
10
|
+
export declare type SyncValidationMessage = React.ReactNode | ((value: string, props?: InputProps) => React.ReactNode);
|
|
11
|
+
export declare type InputValidator<IsAsync extends boolean = boolean> = {
|
|
10
12
|
/**
|
|
11
13
|
* Filters itself based on the input props
|
|
12
14
|
*/
|
|
13
15
|
condition?: (props: InputProps) => any;
|
|
14
|
-
} & (IsAsync extends
|
|
15
|
-
validate: (value: string, props: InputProps) => boolean;
|
|
16
|
-
message: ReactNode | ((value: string, props: InputProps) => ReactNode | string);
|
|
17
|
-
debounce?: undefined;
|
|
18
|
-
} : {
|
|
16
|
+
} & (IsAsync extends true ? {
|
|
19
17
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* This function MUST reject with an instance of {@link AsyncInputValidationError}
|
|
18
|
+
* The validation message maybe either specified from the `message` field (higher priority)
|
|
19
|
+
* or if that is not provided then the message will retrived from the rejected with value
|
|
23
20
|
*/
|
|
24
|
-
validate:
|
|
25
|
-
message?:
|
|
21
|
+
validate: InputValidation<true>;
|
|
22
|
+
message?: SyncValidationMessage;
|
|
26
23
|
debounce: number;
|
|
24
|
+
} : {
|
|
25
|
+
validate: InputValidation<false>;
|
|
26
|
+
message: SyncValidationMessage;
|
|
27
|
+
debounce?: undefined;
|
|
27
28
|
});
|
|
28
|
-
export declare function
|
|
29
|
+
export declare function isAsyncValidator(validator: InputValidator<boolean>): validator is InputValidator<true>;
|
|
30
|
+
export declare function asyncInputValidator(validator: InputValidator<true>): InputValidator<true>;
|
|
31
|
+
export declare function inputValidator(validator: InputValidator<false>): InputValidator<false>;
|
|
32
|
+
/**
|
|
33
|
+
* Create a new input validator from a list of syncronous input validators. Will match as valid if
|
|
34
|
+
* one of the input validators matches the input
|
|
35
|
+
*/
|
|
36
|
+
export declare function unionInputValidators(baseValidator: Pick<InputValidator<false>, "condition" | "message">, ...validators: InputValidator<false>[]): InputValidator<false>;
|
|
37
|
+
/**
|
|
38
|
+
* Create a new input validator from a list of syncronous or async input validators. Will match as
|
|
39
|
+
* valid if one of the input validators matches the input
|
|
40
|
+
*/
|
|
41
|
+
export declare function unionInputValidatorsAsync(baseValidator: SetRequired<Pick<InputValidator<boolean>, "condition" | "message">, "message">, ...validators: InputValidator<boolean>[]): InputValidator<true>;
|
|
29
42
|
export declare const isRequired: InputValidator<false>;
|
|
30
43
|
export declare const isEmail: InputValidator<false>;
|
|
31
44
|
export declare const isNumber: InputValidator<false>;
|
|
@@ -2,6 +2,7 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
5
6
|
import type { IconProps } from "../icon";
|
|
6
7
|
import { FilterType } from "./page-filters/store";
|
|
7
8
|
export interface FilterIconProps extends Partial<IconProps> {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { IComputedValue } from "mobx";
|
|
3
|
-
import type { LensRendererExtension } from "../../../extensions/lens-renderer-extension";
|
|
4
3
|
export interface SidebarItemRegistration {
|
|
5
4
|
id: string;
|
|
6
5
|
parentId: string | null;
|
|
@@ -10,7 +9,6 @@ export interface SidebarItemRegistration {
|
|
|
10
9
|
isActive?: IComputedValue<boolean>;
|
|
11
10
|
isVisible?: IComputedValue<boolean>;
|
|
12
11
|
orderNumber: number;
|
|
13
|
-
extension?: LensRendererExtension;
|
|
14
12
|
}
|
|
15
13
|
export declare const sidebarItemsInjectionToken: import("@ogre-tools/injectable").InjectionToken<IComputedValue<SidebarItemRegistration[]>, void>;
|
|
16
14
|
export interface HierarchicalSidebarItem {
|
|
@@ -5,15 +5,10 @@
|
|
|
5
5
|
import "./notifications.scss";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import type { Notification, NotificationMessage } from "./notifications.store";
|
|
8
|
-
export declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
componentDidMount(): void;
|
|
16
|
-
scrollToLastNotification(): void;
|
|
17
|
-
getMessage(notification: Notification): (React.ReactChild | React.ReactFragment | React.ReactPortal)[];
|
|
18
|
-
render(): JSX.Element;
|
|
19
|
-
}
|
|
8
|
+
export declare const Notifications: React.FC<{}> & {
|
|
9
|
+
ok: (message: NotificationMessage) => () => void;
|
|
10
|
+
checkedError: (message: unknown, fallback: string, customOpts?: Partial<Omit<Notification, "message">>) => () => void;
|
|
11
|
+
error: (message: NotificationMessage, customOpts?: Partial<Omit<Notification, "message">>) => () => void;
|
|
12
|
+
shortInfo: (message: NotificationMessage, customOpts?: Partial<Omit<Notification, "message">>) => () => void;
|
|
13
|
+
info: (message: NotificationMessage, customOpts?: Partial<Omit<Notification, "message">>) => () => void;
|
|
14
|
+
};
|
|
@@ -8,7 +8,7 @@ import type { ObservableSet } from "mobx";
|
|
|
8
8
|
import type { Props as ReactSelectProps, GroupBase, PropsValue } from "react-select";
|
|
9
9
|
export interface SelectOption<Value> {
|
|
10
10
|
value: Value;
|
|
11
|
-
label:
|
|
11
|
+
label: React.ReactNode;
|
|
12
12
|
isDisabled?: boolean;
|
|
13
13
|
isSelected?: boolean;
|
|
14
14
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
5
6
|
import type { FormControlLabelProps } from "@material-ui/core/FormControlLabel";
|
|
6
7
|
/**
|
|
7
8
|
* @deprecated Use <Switch/> instead from "../switch.tsx".
|
|
@@ -32,10 +32,6 @@ export interface TableCellProps extends React.DOMAttributes<HTMLDivElement> {
|
|
|
32
32
|
* mark checkbox as checked or not
|
|
33
33
|
*/
|
|
34
34
|
isChecked?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* show "true" or "false" for all of the children elements are "typeof boolean"
|
|
37
|
-
*/
|
|
38
|
-
renderBoolean?: boolean;
|
|
39
35
|
/**
|
|
40
36
|
* column name, must be same as key in sortable object <Table sortable={}/>
|
|
41
37
|
*/
|
|
@@ -64,6 +64,8 @@ export interface WizardStepProps<D> extends WizardCommonProps<D> {
|
|
|
64
64
|
skip?: boolean;
|
|
65
65
|
scrollable?: boolean;
|
|
66
66
|
children?: React.ReactNode | React.ReactNode[];
|
|
67
|
+
testIdForNext?: string;
|
|
68
|
+
testIdForPrev?: string;
|
|
67
69
|
}
|
|
68
70
|
interface WizardStepState {
|
|
69
71
|
waiting?: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Route } from "../../common/front-end-routing/route-injection-token";
|
|
1
|
+
import type { Route } from "../../common/front-end-routing/front-end-route-injection-token";
|
|
2
2
|
declare const routePathParametersInjectable: import("@ogre-tools/injectable").Injectable<import("mobx").IComputedValue<Record<string, string>>, unknown, Route<unknown>>;
|
|
3
3
|
export default routePathParametersInjectable;
|
|
@@ -2,5 +2,7 @@
|
|
|
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
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Format `mode` in octal notation
|
|
7
|
+
*/
|
|
8
|
+
export declare function displayMode(mode: number): string;
|
|
@@ -6,7 +6,7 @@ export * from "../../common/utils";
|
|
|
6
6
|
export * from "../../common/event-emitter";
|
|
7
7
|
export * from "./cssNames";
|
|
8
8
|
export * from "./cssVar";
|
|
9
|
-
export * from "./display-
|
|
9
|
+
export * from "./display-mode";
|
|
10
10
|
export * from "./interval";
|
|
11
11
|
export * from "./isMiddleClick";
|
|
12
12
|
export * from "./isReactNode";
|
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"name": "@k8slens/extensions",
|
|
3
3
|
"productName": "OpenLens extensions",
|
|
4
4
|
"description": "OpenLens - Open Source Kubernetes IDE: extensions",
|
|
5
|
-
"version": "5.6.0-git.
|
|
6
|
-
"copyright": "©
|
|
5
|
+
"version": "5.6.0-git.cdbd19ce04.0",
|
|
6
|
+
"copyright": "© 2022 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|
|
9
9
|
"types": "dist/src/extensions/extension-api.d.ts",
|
|
@@ -1,19 +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 { UpdateInfo } from "electron-updater";
|
|
6
|
-
export declare const UpdateAvailableChannel = "update-available";
|
|
7
|
-
export declare const AutoUpdateChecking = "auto-update:checking";
|
|
8
|
-
export declare const AutoUpdateNoUpdateAvailable = "auto-update:no-update";
|
|
9
|
-
export declare const AutoUpdateLogPrefix = "[UPDATE-CHECKER]";
|
|
10
|
-
export declare type UpdateAvailableFromMain = [backChannel: string, updateInfo: UpdateInfo];
|
|
11
|
-
export declare function areArgsUpdateAvailableFromMain(args: unknown[]): args is UpdateAvailableFromMain;
|
|
12
|
-
export declare type BackchannelArg = {
|
|
13
|
-
doUpdate: false;
|
|
14
|
-
} | {
|
|
15
|
-
doUpdate: true;
|
|
16
|
-
now: boolean;
|
|
17
|
-
};
|
|
18
|
-
export declare type UpdateAvailableToBackchannel = [updateDecision: BackchannelArg];
|
|
19
|
-
export declare function areArgsUpdateAvailableToBackchannel(args: unknown[]): args is UpdateAvailableToBackchannel;
|