@k8slens/extensions 5.6.0-git.f12851ff3b.0 → 5.6.0-git.fa23b5cd3f.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. package/dist/src/common/app-paths/app-path-injection-token.d.ts +0 -1
  2. package/dist/src/common/application-update/selected-update-channel/default-update-channel.injectable.d.ts +2 -0
  3. package/dist/src/common/application-update/selected-update-channel/selected-update-channel.injectable.d.ts +8 -0
  4. package/dist/src/common/application-update/update-channels.d.ts +11 -0
  5. package/dist/src/common/cluster/cluster.d.ts +2 -2
  6. package/dist/src/common/cluster/create-cluster-injection-token.d.ts +2 -2
  7. package/dist/src/common/cluster-store/allowed-resources-injection-token.d.ts +6 -0
  8. package/dist/src/common/cluster-store/cluster-store.d.ts +4 -1
  9. package/dist/src/common/cluster-store/read-cluster-config.injectable.d.ts +4 -0
  10. package/dist/src/common/cluster-types.d.ts +8 -0
  11. package/dist/src/common/front-end-routing/{route-injection-token.d.ts → front-end-route-injection-token.d.ts} +1 -1
  12. package/dist/src/common/front-end-routing/navigate-to-route-injection-token.d.ts +1 -1
  13. package/dist/src/common/front-end-routing/routes/catalog/catalog-route.injectable.d.ts +1 -1
  14. package/dist/src/common/front-end-routing/routes/cluster/custom-resources/custom-resources/custom-resources-route.injectable.d.ts +1 -1
  15. package/dist/src/common/front-end-routing/routes/cluster-view/cluster-view-route.injectable.d.ts +1 -1
  16. package/dist/src/common/fs/read-file-sync.injectable.d.ts +3 -0
  17. package/dist/src/common/ipc/index.d.ts +0 -1
  18. package/dist/src/common/k8s-api/endpoints/cluster.api.d.ts +7 -0
  19. package/dist/src/common/k8s-api/endpoints/custom-resource-definition.api.d.ts +8 -3
  20. package/dist/src/common/k8s-api/endpoints/ingress.api.d.ts +1 -1
  21. package/dist/src/common/k8s-api/endpoints/metrics.api.d.ts +1 -1
  22. package/dist/src/common/{ipc-channel/channel.d.ts → k8s-api/endpoints/types/external-documentation.d.ts} +3 -3
  23. package/dist/src/common/k8s-api/endpoints/types/json-schema-props.d.ts +86 -0
  24. package/dist/src/common/k8s-api/kube-api.d.ts +9 -0
  25. package/dist/src/common/k8s-api/kube-object.store.d.ts +2 -2
  26. package/dist/src/common/kube-helpers.d.ts +10 -2
  27. package/dist/src/common/terminal/channels.d.ts +28 -0
  28. package/dist/src/common/user-store/preferences-helpers.d.ts +2 -6
  29. package/dist/src/common/user-store/user-store.d.ts +7 -3
  30. package/dist/src/common/utils/buildUrl.d.ts +1 -1
  31. package/dist/src/common/utils/reject-promise.d.ts +2 -2
  32. package/dist/src/common/utils/type-narrowing.d.ts +5 -0
  33. package/dist/src/common/vars/base-bundled-binaries-dir.injectable.d.ts +2 -0
  34. package/dist/src/common/vars/bundled-resources-dir.injectable.d.ts +2 -0
  35. package/dist/src/common/vars/lens-resources-dir.injectable.d.ts +2 -0
  36. package/dist/src/common/vars/normalized-platform-architecture.injectable.d.ts +2 -0
  37. package/dist/src/common/vars/normalized-platform.injectable.d.ts +2 -0
  38. package/dist/src/common/vars/package-json.injectable.d.ts +353 -0
  39. package/dist/src/common/vars/static-files-directory.injectable.d.ts +2 -0
  40. package/dist/src/common/vars.d.ts +7 -9
  41. package/dist/src/extensions/extension-loader/extension/extension.injectable.d.ts +7 -0
  42. package/dist/src/extensions/extension-loader/extension-loader.d.ts +2 -2
  43. package/dist/src/extensions/extension-loader/extension-registrator-injection-token.d.ts +7 -0
  44. package/dist/src/extensions/extensions-store/extensions-store.d.ts +5 -4
  45. package/dist/src/extensions/lens-extension-set-dependencies.d.ts +1 -1
  46. package/dist/src/extensions/lens-renderer-extension.d.ts +2 -0
  47. package/dist/src/extensions/registries/entity-setting-registry.d.ts +1 -1
  48. package/dist/src/main/app-paths/app-name/product-name.injectable.d.ts +2 -0
  49. package/dist/src/main/kube-auth-proxy/kube-auth-proxy.d.ts +1 -0
  50. package/dist/src/main/kubectl/kubectl.d.ts +18 -14
  51. package/dist/src/main/start-main-application/lens-window/application-window/application-window.injectable.d.ts +1 -6
  52. package/dist/src/main/start-main-application/lens-window/application-window/create-electron-window.injectable.d.ts +29 -0
  53. package/dist/src/main/start-main-application/lens-window/application-window/create-lens-window.injectable.d.ts +8 -11
  54. package/dist/src/main/start-main-application/lens-window/application-window/lens-window-injection-token.d.ts +6 -3
  55. package/dist/src/main/start-main-application/lens-window/application-window/wait-until-bundled-extensions-are-loaded.injectable.d.ts +2 -0
  56. package/dist/src/main/start-main-application/lens-window/navigate.injectable.d.ts +1 -1
  57. package/dist/src/main/start-main-application/lens-window/splash-window/splash-window.injectable.d.ts +1 -6
  58. package/dist/src/main/{app-paths/register-channel → utils/channel}/ipc-main/ipc-main.injectable.d.ts +0 -1
  59. package/dist/src/renderer/api/terminal-api.d.ts +2 -22
  60. package/dist/src/renderer/api/websocket-api.d.ts +4 -4
  61. package/dist/src/{common/cluster-store → renderer/cluster-frame-context}/hosted-cluster-id.injectable.d.ts +0 -0
  62. package/dist/src/{common/cluster-store → renderer/cluster-frame-context}/hosted-cluster.injectable.d.ts +1 -1
  63. package/dist/src/renderer/components/+namespaces/namespace-select.d.ts +1 -0
  64. 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
  65. package/dist/src/renderer/components/+user-management/+service-accounts/service-account-menu.d.ts +1 -0
  66. package/dist/src/renderer/components/animate/animate.d.ts +6 -1
  67. package/dist/src/renderer/components/animate/request-animation-frame.injectable.d.ts +2 -0
  68. package/dist/src/renderer/components/dock/dock/create-dock-tab.injectable.d.ts +1 -1
  69. package/dist/src/renderer/components/dock/terminal/terminal.d.ts +6 -3
  70. package/dist/src/renderer/components/drawer/drawer-item-labels.d.ts +1 -0
  71. package/dist/src/renderer/components/drawer/drawer-item.d.ts +7 -2
  72. package/dist/src/renderer/components/drawer/drawer-title.d.ts +5 -1
  73. package/dist/src/renderer/components/input/input.d.ts +7 -8
  74. package/dist/src/renderer/components/input/input_validators.d.ts +28 -15
  75. package/dist/src/renderer/components/item-object-list/filter-icon.d.ts +1 -0
  76. package/dist/src/renderer/components/layout/sidebar-items.injectable.d.ts +0 -2
  77. package/dist/src/renderer/components/notifications/notifications-store.injectable.d.ts +3 -0
  78. package/dist/src/renderer/components/notifications/notifications.d.ts +7 -12
  79. package/dist/src/renderer/components/notifications/notifications.store.d.ts +0 -1
  80. package/dist/src/renderer/components/resource-metrics/no-metrics.d.ts +1 -0
  81. package/dist/src/renderer/components/select/select.d.ts +1 -1
  82. package/dist/src/renderer/components/switch/form-switcher.d.ts +1 -0
  83. package/dist/src/renderer/components/table/table-cell.d.ts +0 -4
  84. package/dist/src/renderer/components/wizard/wizard.d.ts +2 -0
  85. package/dist/src/renderer/routes/route-path-parameters.injectable.d.ts +1 -1
  86. package/dist/src/renderer/{app-paths/get-value-from-registered-channel/ipc-renderer → utils/channel}/ipc-renderer.injectable.d.ts +0 -1
  87. package/dist/src/renderer/utils/index.d.ts +0 -1
  88. package/package.json +2 -2
  89. package/dist/src/common/app-paths/directory-for-bundled-binaries/directory-for-bundled-binaries.injectable.d.ts +0 -2
  90. package/dist/src/common/cluster-store/allowed-resources.injectable.d.ts +0 -2
  91. package/dist/src/common/ipc/update-available.d.ts +0 -19
  92. package/dist/src/main/start-main-application/lens-window/application-window/create-electron-window-for.injectable.d.ts +0 -22
  93. package/dist/src/renderer/utils/display-booleans.d.ts +0 -6
@@ -1,3 +1,2 @@
1
- /// <reference types="electron" />
2
1
  declare const ipcMainInjectable: import("@ogre-tools/injectable").Injectable<Electron.IpcMain, unknown, void>;
3
2
  export default ipcMainInjectable;
@@ -4,27 +4,7 @@
4
4
  */
5
5
  import type { WebSocketEvents } from "./websocket-api";
6
6
  import { WebSocketApi } from "./websocket-api";
7
- export declare enum TerminalChannels {
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<ArrayBuffer>): void;
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 "PING"
25
+ * @default "{type: \"ping\"}"
26
26
  */
27
- pingMessage?: string | ArrayBufferLike | Blob | ArrayBufferView;
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: (string | ArrayBufferLike | Blob | ArrayBufferView)[];
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 | ArrayBufferLike | Blob | ArrayBufferView): void;
73
+ send(command: string): void;
74
74
  protected flush(): void;
75
75
  protected _onOpen(evt: Event): void;
76
76
  protected _onMessage({ data }: MessageEvent): void;
@@ -1,2 +1,2 @@
1
- declare const hostedClusterInjectable: import("@ogre-tools/injectable").Injectable<import("../cluster/cluster").Cluster | undefined, unknown, void>;
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
- import type { Channel } from "../channel";
6
- export declare const createChannel: <Message>(name: string) => Channel<Message>;
5
+ export interface AppPreferenceTabRegistration {
6
+ title: string;
7
+ id: string;
8
+ orderNumber?: number;
9
+ }
@@ -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
- export declare const Animate: (props: AnimateProps) => JSX.Element;
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 {};
@@ -0,0 +1,2 @@
1
+ declare const requestAnimationFrameInjectable: import("@ogre-tools/injectable").Injectable<(callback: () => void) => number, unknown, void>;
2
+ export default requestAnimationFrameInjectable;
@@ -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 | undefined) => DockTab, unknown, void>;
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
- constructor(dependencies: TerminalDependencies, { tabId, api }: TerminalArguments);
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: (size: number) => void;
48
- setFontFamily: (family: string) => void;
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
- renderBoolean?: boolean;
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, renderBoolean, ...elemProps }: DrawerItemProps): JSX.Element | null;
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: React.ReactNode;
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
  *
@@ -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
- inputValidator<IsAsync extends boolean = false>(validator: Validators.InputValidator<IsAsync>): Validators.InputValidator<IsAsync>;
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<boolean>[];
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 { ReactNode } from "react";
7
- export declare class AsyncInputValidationError extends Error {
8
- }
9
- export declare type InputValidator<IsAsync extends boolean> = {
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 false ? {
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
- * If asyncronous then the rejection message is the error message
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: (value: string, props: InputProps) => Promise<void>;
25
- message?: undefined;
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 inputValidator<IsAsync extends boolean = false>(validator: InputValidator<IsAsync>): InputValidator<IsAsync>;
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 {
@@ -0,0 +1,3 @@
1
+ import { NotificationsStore } from "./notifications.store";
2
+ declare const notificationsStoreInjectable: import("@ogre-tools/injectable").Injectable<NotificationsStore, unknown, void>;
3
+ export default notificationsStoreInjectable;
@@ -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 class Notifications extends React.Component {
9
- elem: HTMLDivElement | null;
10
- static ok(message: NotificationMessage): () => void;
11
- static checkedError(message: unknown, fallback: string, customOpts?: Partial<Omit<Notification, "message">>): () => void;
12
- static error(message: NotificationMessage, customOpts?: Partial<Omit<Notification, "message">>): () => void;
13
- static shortInfo(message: NotificationMessage, customOpts?: Partial<Omit<Notification, "message">>): () => void;
14
- static info(message: NotificationMessage, customOpts?: Partial<Omit<Notification, "message">>): () => void;
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
+ };
@@ -28,4 +28,3 @@ export declare class NotificationsStore {
28
28
  add(rawNotification: Notification): () => void;
29
29
  remove(id: NotificationId): void;
30
30
  }
31
- export declare const notificationsStore: NotificationsStore;
@@ -2,4 +2,5 @@
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
  export declare function NoMetrics(): JSX.Element;
@@ -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: string;
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;
@@ -1,3 +1,2 @@
1
- /// <reference types="electron" />
2
1
  declare const ipcRendererInjectable: import("@ogre-tools/injectable").Injectable<Electron.IpcRenderer, unknown, void>;
3
2
  export default ipcRendererInjectable;
@@ -6,7 +6,6 @@ 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-booleans";
10
9
  export * from "./display-mode";
11
10
  export * from "./interval";
12
11
  export * from "./isMiddleClick";
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.f12851ff3b.0",
6
- "copyright": "© 2021 OpenLens Authors",
5
+ "version": "5.6.0-git.fa23b5cd3f.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,2 +0,0 @@
1
- declare const directoryForBundledBinariesInjectable: import("@ogre-tools/injectable").Injectable<string, unknown, void>;
2
- export default directoryForBundledBinariesInjectable;
@@ -1,2 +0,0 @@
1
- declare const allowedResourcesInjectable: import("@ogre-tools/injectable").Injectable<import("mobx").IComputedValue<Set<string>>, unknown, void>;
2
- export default allowedResourcesInjectable;
@@ -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;
@@ -1,22 +0,0 @@
1
- import type { LensWindow } from "./create-lens-window.injectable";
2
- export declare type ElectronWindowTitleBarStyle = "hiddenInset" | "hidden" | "default" | "customButtonsOnHover";
3
- export interface ElectronWindowConfiguration {
4
- id: string;
5
- title: string;
6
- defaultHeight: number;
7
- defaultWidth: number;
8
- getContentUrl: () => string;
9
- resizable: boolean;
10
- windowFrameUtilitiesAreShown: boolean;
11
- centered: boolean;
12
- titleBarStyle?: ElectronWindowTitleBarStyle;
13
- beforeOpen?: () => Promise<void>;
14
- onClose: () => void;
15
- onFocus?: () => void;
16
- onBlur?: () => void;
17
- onDomReady?: () => void;
18
- }
19
- export declare type CreateElectronWindow = () => Promise<LensWindow>;
20
- export declare type CreateElectronWindowFor = (config: ElectronWindowConfiguration) => CreateElectronWindow;
21
- declare const createElectronWindowFor: import("@ogre-tools/injectable").Injectable<CreateElectronWindowFor, unknown, void>;
22
- export default createElectronWindowFor;
@@ -1,6 +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
- export declare function displayBooleans(shouldShow: boolean | undefined, from: React.ReactNode): React.ReactNode;