@k8slens/extensions 5.3.0-git.2d801478e1.0 → 5.3.0-git.30170163a6.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 (76) hide show
  1. package/__mocks__/electron.ts +0 -5
  2. package/dist/integration/helpers/utils.d.ts +1 -1
  3. package/dist/src/common/app-paths.d.ts +43 -0
  4. package/dist/src/common/catalog/catalog-entity.d.ts +4 -1
  5. package/dist/src/common/cluster-store.d.ts +0 -1
  6. package/dist/src/common/hotbar-store.d.ts +5 -0
  7. package/dist/src/common/hotbar-types.d.ts +1 -1
  8. package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +16 -32
  9. package/dist/src/common/k8s-api/endpoints/pods.api.d.ts +7 -6
  10. package/dist/src/common/k8s-api/endpoints/secret.api.d.ts +5 -6
  11. package/dist/src/common/k8s-api/endpoints/service.api.d.ts +1 -1
  12. package/dist/src/common/k8s-api/json-api.d.ts +2 -0
  13. package/dist/src/common/k8s-api/kube-api.d.ts +1 -1
  14. package/dist/src/common/routes/port-forwards.d.ts +1 -0
  15. package/dist/src/common/user-store/preferences-helpers.d.ts +8 -0
  16. package/dist/src/common/utils/__tests__/tuple.test.d.ts +21 -0
  17. package/dist/src/common/utils/{getPath.d.ts → array.d.ts} +4 -5
  18. package/dist/src/common/utils/index.d.ts +7 -5
  19. package/dist/src/common/utils/iter.d.ts +23 -9
  20. package/dist/src/common/utils/objects.d.ts +27 -0
  21. package/dist/src/common/utils/sort-compare.d.ts +50 -0
  22. package/dist/src/common/utils/tuple.d.ts +40 -0
  23. package/dist/src/extensions/extension-api.js +181 -1669
  24. package/dist/src/main/helm/helm-chart-manager.d.ts +5 -0
  25. package/dist/src/main/helm/helm-repo-manager.d.ts +1 -0
  26. package/dist/src/main/kube-auth-proxy.d.ts +1 -0
  27. package/dist/src/main/kubectl.d.ts +1 -1
  28. package/dist/src/renderer/bootstrap.d.ts +1 -1
  29. package/dist/src/renderer/components/+add-cluster/add-cluster.d.ts +1 -1
  30. package/dist/src/renderer/components/+apps-releases/release-menu.d.ts +3 -3
  31. package/dist/src/renderer/components/+catalog/catalog-entity-details.d.ts +0 -1
  32. package/dist/src/renderer/components/+catalog/catalog-entity-drawer-menu.d.ts +0 -1
  33. package/dist/src/renderer/components/+catalog/catalog.d.ts +2 -0
  34. package/dist/src/renderer/components/+catalog/hotbar-toggle-menu-item.d.ts +27 -0
  35. package/dist/src/renderer/components/+cluster/cluster-issues.d.ts +0 -1
  36. package/dist/src/renderer/components/+cluster/cluster-metric-switchers.d.ts +0 -1
  37. package/dist/src/renderer/components/+cluster/cluster-metrics.d.ts +0 -1
  38. package/dist/src/renderer/components/+cluster/cluster-overview.d.ts +0 -1
  39. package/dist/src/renderer/components/+cluster/cluster-pie-charts.d.ts +0 -1
  40. package/dist/src/renderer/components/+config-secrets/__tests__/secret-details.test.d.ts +21 -0
  41. package/dist/src/renderer/components/+config-secrets/secret-details.d.ts +4 -3
  42. package/dist/src/renderer/components/+namespaces/namespace-select-filter.d.ts +3 -0
  43. package/dist/src/renderer/components/+namespaces/namespace.store.d.ts +55 -2
  44. package/dist/src/renderer/components/+network-port-forwards/port-forward-details.d.ts +33 -0
  45. package/dist/src/renderer/components/+network-port-forwards/port-forward-menu.d.ts +1 -1
  46. package/dist/src/renderer/components/+network-port-forwards/port-forwards.d.ts +10 -1
  47. package/dist/src/renderer/components/+network-services/service-port-component.d.ts +0 -1
  48. package/dist/src/renderer/components/+workloads-pods/pod-container-port.d.ts +0 -1
  49. package/dist/src/renderer/components/+workloads-pods/pod-details-list.d.ts +0 -3
  50. package/dist/src/renderer/components/dock/create-resource.store.d.ts +3 -3
  51. package/dist/src/renderer/components/dock/log-list.d.ts +1 -1
  52. package/dist/src/renderer/components/dock/terminal.d.ts +1 -1
  53. package/dist/src/renderer/components/drawer/drawer.d.ts +1 -1
  54. package/dist/src/renderer/components/error-boundary/error-boundary.d.ts +13 -3
  55. package/dist/src/renderer/components/hotbar/hotbar-entity-icon.d.ts +0 -2
  56. package/dist/src/renderer/components/input/input.d.ts +1 -1
  57. package/dist/src/renderer/components/input/search-input-url.d.ts +1 -1
  58. package/dist/src/renderer/components/layout/sidebar-storage.d.ts +1 -0
  59. package/dist/src/renderer/components/layout/sidebar.d.ts +3 -1
  60. package/dist/src/renderer/components/resizing-anchor/resizing-anchor.d.ts +1 -1
  61. package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
  62. package/dist/src/renderer/components/table/__tests__/getSorted.test.d.ts +21 -0
  63. package/dist/src/renderer/components/table/sorting.d.ts +22 -0
  64. package/dist/src/renderer/components/table/table.d.ts +20 -3
  65. package/dist/src/renderer/components/virtual-list/virtual-list.d.ts +7 -1
  66. package/dist/src/renderer/port-forward/index.d.ts +1 -0
  67. package/dist/src/renderer/port-forward/port-forward-dialog.d.ts +0 -1
  68. package/dist/src/renderer/port-forward/port-forward-item.d.ts +4 -0
  69. package/dist/src/renderer/port-forward/port-forward-utils.d.ts +24 -0
  70. package/dist/src/renderer/port-forward/port-forward.store.d.ts +1 -1
  71. package/dist/src/renderer/utils/__tests__/converted-name.test.d.ts +21 -0
  72. package/dist/src/renderer/utils/createStorage.d.ts +2 -3
  73. package/dist/src/renderer/utils/index.d.ts +9 -10
  74. package/dist/src/renderer/utils/name-parts.d.ts +27 -0
  75. package/dist/src/renderer/utils/storageHelper.d.ts +1 -0
  76. package/package.json +1 -1
@@ -20,6 +20,10 @@
20
20
  */
21
21
  import type { HelmRepo } from "./helm-repo-manager";
22
22
  import type { RepoHelmChartList } from "../../common/k8s-api/endpoints/helm-charts.api";
23
+ export interface HelmCacheFile {
24
+ apiVersion: string;
25
+ entries: RepoHelmChartList;
26
+ }
23
27
  export declare class HelmChartManager {
24
28
  #private;
25
29
  protected repo: HelmRepo;
@@ -30,5 +34,6 @@ export declare class HelmChartManager {
30
34
  private executeCommand;
31
35
  getReadme(name: string, version?: string): Promise<string>;
32
36
  getValues(name: string, version?: string): Promise<string>;
37
+ protected updateYamlCache(): Promise<void>;
33
38
  protected cachedYaml(): Promise<RepoHelmChartList>;
34
39
  }
@@ -45,6 +45,7 @@ export declare class HelmRepoManager extends Singleton {
45
45
  private init;
46
46
  protected static parseHelmEnv(): Promise<HelmEnv>;
47
47
  repo(name: string): Promise<HelmRepo>;
48
+ private readConfig;
48
49
  repositories(): Promise<HelmRepo[]>;
49
50
  static update(): Promise<any>;
50
51
  static addRepo({ name, url }: HelmRepo): Promise<string>;
@@ -28,6 +28,7 @@ export interface KubeAuthProxyLog {
28
28
  }
29
29
  export declare class KubeAuthProxy {
30
30
  lastError: string;
31
+ readonly apiPrefix: string;
31
32
  get port(): number;
32
33
  protected _port: number;
33
34
  protected cluster: Cluster;
@@ -41,5 +41,5 @@ export declare class Kubectl {
41
41
  ensureKubectl(): Promise<boolean>;
42
42
  downloadKubectl(): Promise<void>;
43
43
  protected writeInitScripts(): Promise<void>;
44
- protected getDownloadMirror(): string;
44
+ protected getDownloadMirror(): import("../common/user-store/preferences-helpers").DownloadMirror;
45
45
  }
@@ -29,7 +29,7 @@ import * as LensExtensionsRendererApi from "../extensions/renderer-api";
29
29
  declare type AppComponent = React.ComponentType & {
30
30
  init?(rootElem: HTMLElement): Promise<void>;
31
31
  };
32
- export declare function bootstrap(App: AppComponent): Promise<void>;
32
+ export declare function bootstrap(comp: () => Promise<AppComponent>): Promise<void>;
33
33
  /**
34
34
  * Exports for virtual package "@k8slens/extensions" for renderer-process.
35
35
  * All exporting names available in global runtime scope:
@@ -34,7 +34,7 @@ export declare class AddCluster extends React.Component {
34
34
  constructor(props: {});
35
35
  componentDidMount(): void;
36
36
  get allErrors(): string[];
37
- refreshContexts: (() => void) & import("lodash").Cancelable;
37
+ refreshContexts: import("lodash").DebouncedFunc<() => void>;
38
38
  addClusters: () => Promise<void>;
39
39
  render(): JSX.Element;
40
40
  }
@@ -26,9 +26,9 @@ interface Props extends MenuActionsProps {
26
26
  hideDetails?(): void;
27
27
  }
28
28
  export declare class HelmReleaseMenu extends React.Component<Props> {
29
- remove(): Promise<void>;
30
- upgrade(): void;
31
- rollback(): void;
29
+ remove: () => Promise<void>;
30
+ upgrade: () => void;
31
+ rollback: () => void;
32
32
  renderContent(): JSX.Element;
33
33
  render(): JSX.Element;
34
34
  }
@@ -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 "./catalog-entity-details.scss";
22
21
  import { Component } from "react";
23
22
  import type { CatalogCategory, CatalogEntity } from "../../../common/catalog";
24
23
  import type { CatalogEntityItem } from "./catalog-entity-item";
@@ -30,7 +30,6 @@ export declare class CatalogEntityDrawerMenu<T extends CatalogEntity> extends Re
30
30
  constructor(props: CatalogEntityDrawerMenuProps<T>);
31
31
  componentDidMount(): void;
32
32
  onMenuItemClick(menuItem: CatalogEntityContextMenu): void;
33
- addToHotbar(entity: CatalogEntity): void;
34
33
  getMenuItems(entity: T): React.ReactChild[];
35
34
  render(): JSX.Element;
36
35
  }
@@ -40,12 +40,14 @@ export declare class Catalog extends React.Component<Props> {
40
40
  get routeActiveTab(): string;
41
41
  componentDidMount(): Promise<void>;
42
42
  addToHotbar(item: CatalogEntityItem<CatalogEntity>): void;
43
+ removeFromHotbar(item: CatalogEntityItem<CatalogEntity>): void;
43
44
  onDetails: (item: CatalogEntityItem<CatalogEntity>) => void;
44
45
  onMenuItemClick(menuItem: CatalogEntityContextMenu): void;
45
46
  get categories(): import("../../api/catalog-entity").CatalogCategory[];
46
47
  onTabChange: (tabId: string | null) => void;
47
48
  renderNavigation(): JSX.Element;
48
49
  renderItemMenu: (item: CatalogEntityItem<CatalogEntity>) => JSX.Element;
50
+ renderName(item: CatalogEntityItem<CatalogEntity>): JSX.Element;
49
51
  renderIcon(item: CatalogEntityItem<CatalogEntity>): JSX.Element;
50
52
  renderList(): JSX.Element;
51
53
  render(): JSX.Element;
@@ -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 { ReactNode } from "react";
22
+ import type { CatalogEntity } from "../../api/catalog-entity";
23
+ export declare function HotbarToggleMenuItem(props: {
24
+ entity: CatalogEntity;
25
+ addContent: ReactNode;
26
+ removeContent: ReactNode;
27
+ }): 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 "./cluster-issues.scss";
22
21
  import React from "react";
23
22
  import type { ItemObject } from "../../../common/item.store";
24
23
  interface Props {
@@ -18,5 +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
- import "./cluster-metric-switchers.scss";
22
21
  export declare const ClusterMetricSwitchers: () => JSX.Element;
@@ -18,5 +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
- import "./cluster-metrics.scss";
22
21
  export declare const ClusterMetrics: () => 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 "./cluster-overview.scss";
22
21
  import React from "react";
23
22
  export declare class ClusterOverview extends React.Component {
24
23
  private metricPoller;
@@ -18,5 +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
- import "./cluster-pie-charts.scss";
22
21
  export declare const ClusterPieCharts: () => JSX.Element;
@@ -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 {};
@@ -20,6 +20,7 @@
20
20
  */
21
21
  import "./secret-details.scss";
22
22
  import React from "react";
23
+ import { ObservableToggleSet } from "../../utils";
23
24
  import type { KubeObjectDetailsProps } from "../kube-object-details";
24
25
  import { Secret } from "../../../common/k8s-api/endpoints";
25
26
  interface Props extends KubeObjectDetailsProps<Secret> {
@@ -29,13 +30,13 @@ export declare class SecretDetails extends React.Component<Props> {
29
30
  data: {
30
31
  [name: string]: string;
31
32
  };
32
- revealSecret: {
33
- [name: string]: boolean;
34
- };
33
+ revealSecret: ObservableToggleSet<string>;
35
34
  constructor(props: Props);
36
35
  componentDidMount(): Promise<void>;
37
36
  saveSecret: () => Promise<void>;
38
37
  editData: (name: string, value: string, encoded: boolean) => void;
38
+ renderSecret: ([name, value]: [string, string]) => JSX.Element;
39
+ renderData(): JSX.Element;
39
40
  render(): JSX.Element;
40
41
  }
41
42
  export {};
@@ -24,6 +24,9 @@ import type { SelectOption, SelectProps } from "../select";
24
24
  export declare class NamespaceSelectFilter extends React.Component<SelectProps> {
25
25
  static isMultiSelection: import("mobx").IObservableValue<boolean>;
26
26
  static isMenuOpen: import("mobx").IObservableValue<boolean>;
27
+ /**
28
+ * Only updated on every open
29
+ */
27
30
  private selected;
28
31
  private didToggle;
29
32
  constructor(props: SelectProps);
@@ -30,18 +30,71 @@ export declare class NamespaceStore extends KubeObjectStore<Namespace> {
30
30
  onContextChange(callback: (namespaces: string[]) => void, opts?: IReactionOptions): IReactionDisposer;
31
31
  private autoLoadAllowedNamespaces;
32
32
  private get initialNamespaces();
33
- get selectedNamespaces(): string[];
33
+ /**
34
+ * @private
35
+ * The current value (list of namespaces names) in the storage layer
36
+ */
37
+ private get selectedNamespaces();
34
38
  get allowedNamespaces(): string[];
39
+ /**
40
+ * The list of selected namespace names (for filtering)
41
+ */
35
42
  get contextNamespaces(): string[];
43
+ /**
44
+ * The set of select namespace names (for filtering)
45
+ */
46
+ get selectedNames(): Set<string>;
47
+ /**
48
+ * Is true when the the set of namespace names selected is implicitly all
49
+ *
50
+ * Namely, this will be true if the user has deselected all namespaces from
51
+ * the filter or if the user has clicked the "All Namespaces" option
52
+ */
53
+ get areAllSelectedImplicitly(): boolean;
36
54
  subscribe(): typeof noop;
37
55
  protected loadItems(params: KubeObjectStoreLoadingParams<Namespace>): Promise<Namespace[]>;
38
56
  selectNamespaces(namespace: string | string[]): void;
39
57
  clearSelected(namespaces?: string | string[]): void;
58
+ /**
59
+ * Checks if namespace names are selected for filtering
60
+ * @param namespaces One or several names of namespaces to check if they are selected
61
+ * @returns `true` if all the provided names are selected
62
+ */
40
63
  hasContext(namespaces: string | string[]): boolean;
64
+ /**
65
+ * Is `true` if all available namespaces are selected, otherwise `false`
66
+ */
41
67
  get hasAllContexts(): boolean;
68
+ /**
69
+ * Acts like `toggleSingle` but can work on several at a time
70
+ * @param namespaces One or many names of namespaces to select
71
+ */
42
72
  toggleContext(namespaces: string | string[]): void;
73
+ /**
74
+ * Toggles the selection state of `namespace`. Namely, if it was previously
75
+ * specifically or implicitly selected then after this call it will be
76
+ * explicitly deselected.
77
+ * @param namespace The name of a namespace
78
+ */
43
79
  toggleSingle(namespace: string): void;
44
- toggleAll(showAll?: boolean): void;
80
+ /**
81
+ * Makes the given namespace the sole selected namespace
82
+ */
83
+ selectSingle(namespace: string): void;
84
+ /**
85
+ * Selects all available namespaces.
86
+ *
87
+ * Note: If new namespaces appear in the future those will be selected too
88
+ */
89
+ selectAll(): void;
90
+ /**
91
+ * This function selects all namespaces implicitly.
92
+ *
93
+ * NOTE: does not toggle any namespaces
94
+ * @param selectAll NOT USED
95
+ * @deprecated Use `NamespaceStore.selectAll` instead.
96
+ */
97
+ toggleAll(selectAll?: boolean): void;
45
98
  remove(item: Namespace): Promise<void>;
46
99
  }
47
100
  export declare const namespaceStore: NamespaceStore;
@@ -0,0 +1,33 @@
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 "./port-forward-details.scss";
22
+ import React from "react";
23
+ import { PortForwardItem } from "../../port-forward";
24
+ interface Props {
25
+ portForward: PortForwardItem;
26
+ hideDetails(): void;
27
+ }
28
+ export declare class PortForwardDetails extends React.Component<Props> {
29
+ renderResourceName(): JSX.Element;
30
+ renderContent(): JSX.Element;
31
+ render(): JSX.Element;
32
+ }
33
+ export {};
@@ -26,7 +26,7 @@ interface Props extends MenuActionsProps {
26
26
  hideDetails?(): void;
27
27
  }
28
28
  export declare class PortForwardMenu extends React.Component<Props> {
29
- remove(): Promise<void>;
29
+ remove(): void;
30
30
  renderContent(): JSX.Element;
31
31
  render(): JSX.Element;
32
32
  }
@@ -20,9 +20,18 @@
20
20
  */
21
21
  import "./port-forwards.scss";
22
22
  import React from "react";
23
+ import type { RouteComponentProps } from "react-router-dom";
23
24
  import { PortForwardItem } from "../../port-forward";
24
- export declare class PortForwards extends React.Component {
25
+ import { PortForwardsRouteParams } from "../../../common/routes";
26
+ interface Props extends RouteComponentProps<PortForwardsRouteParams> {
27
+ }
28
+ export declare class PortForwards extends React.Component<Props> {
25
29
  componentDidMount(): void;
30
+ get selectedPortForward(): PortForwardItem;
31
+ onDetails: (item: PortForwardItem) => void;
32
+ showDetails: (item: PortForwardItem) => void;
33
+ hideDetails: () => void;
26
34
  renderRemoveDialogMessage(selectedItems: PortForwardItem[]): JSX.Element;
27
35
  render(): JSX.Element;
28
36
  }
37
+ export {};
@@ -31,7 +31,6 @@ export declare class ServicePortComponent extends React.Component<Props> {
31
31
  isPortForwarded: boolean;
32
32
  constructor(props: Props);
33
33
  componentDidMount(): void;
34
- init(): void;
35
34
  checkExistingPortForwarding(): Promise<void>;
36
35
  portForward(): Promise<void>;
37
36
  stopPortForward(): Promise<void>;
@@ -35,7 +35,6 @@ export declare class PodContainerPort extends React.Component<Props> {
35
35
  isPortForwarded: boolean;
36
36
  constructor(props: Props);
37
37
  componentDidMount(): void;
38
- init(): void;
39
38
  checkExistingPortForwarding(): Promise<void>;
40
39
  portForward(): Promise<void>;
41
40
  stopPortForward(): Promise<void>;
@@ -29,12 +29,9 @@ interface Props extends OptionalProps {
29
29
  interface OptionalProps {
30
30
  maxCpu?: number;
31
31
  maxMemory?: number;
32
- showTitle?: boolean;
33
32
  }
34
33
  export declare class PodDetailsList extends React.Component<Props> {
35
- static defaultProps: OptionalProps;
36
34
  private metricsWatcher;
37
- private sortingCallbacks;
38
35
  componentDidMount(): void;
39
36
  componentWillUnmount(): void;
40
37
  renderCpuUsage(id: string, usage: number): string | 0 | JSX.Element;
@@ -25,10 +25,10 @@ export declare class CreateResourceStore extends DockTabStore<string> {
25
25
  constructor();
26
26
  get lensTemplatesFolder(): string;
27
27
  get userTemplatesFolder(): string;
28
- getTemplates(templatesPath: string, defaultGroup: string): Promise<import("lodash").Dictionary<string[]>>;
29
- groupTemplates(templates: string[], templatesPath: string, defaultGroup: string): import("lodash").Dictionary<string[]>;
28
+ getTemplates(templatesPath: string, defaultGroup: string): Promise<import("lodash").Dictionary<[string, ...string[]]>>;
29
+ groupTemplates(templates: string[], templatesPath: string, defaultGroup: string): import("lodash").Dictionary<[string, ...string[]]>;
30
30
  getMergedTemplates(): Promise<{
31
- [x: string]: string[];
31
+ [x: string]: [string, ...string[]];
32
32
  }>;
33
33
  watchUserTemplates(callback: () => void): Promise<void>;
34
34
  }
@@ -61,7 +61,7 @@ export declare class LogList extends React.Component<Props> {
61
61
  scrollToBottom: () => void;
62
62
  scrollToItem: (index: number, align: Align) => void;
63
63
  onScroll: (props: ListOnScrollProps) => void;
64
- onScrollDebounced: ((props: ListOnScrollProps) => void) & import("lodash").Cancelable;
64
+ onScrollDebounced: import("lodash").DebouncedFunc<(props: ListOnScrollProps) => void>;
65
65
  /**
66
66
  * A function is called by VirtualList for rendering each of the row
67
67
  * @param rowIndex index of the log element in logs array
@@ -43,7 +43,7 @@ export declare class Terminal {
43
43
  init(): Promise<void>;
44
44
  destroy(): void;
45
45
  fit: () => void;
46
- fitLazy: (() => void) & import("lodash").Cancelable;
46
+ fitLazy: import("lodash").DebouncedFunc<() => void>;
47
47
  focus: () => void;
48
48
  onApiData: (data: string) => void;
49
49
  onData: (data: string) => void;
@@ -52,7 +52,7 @@ export declare class Drawer extends React.Component<DrawerProps> {
52
52
  onClickOutside: (evt: MouseEvent) => void;
53
53
  onMouseDown: (evt: MouseEvent) => void;
54
54
  close: () => void;
55
- copyK8sObjName: () => void;
55
+ copyTitle: (title: string) => void;
56
56
  render(): JSX.Element;
57
57
  }
58
58
  export {};
@@ -19,7 +19,17 @@
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
21
  import "./error-boundary.scss";
22
- import React from "react";
23
- export declare class ErrorBoundary extends React.Component {
24
- render(): JSX.Element;
22
+ import React, { ErrorInfo } from "react";
23
+ interface Props {
25
24
  }
25
+ interface State {
26
+ error?: Error;
27
+ errorInfo?: ErrorInfo;
28
+ }
29
+ export declare class ErrorBoundary extends React.Component<Props, State> {
30
+ state: State;
31
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
32
+ back: () => void;
33
+ render(): React.ReactNode;
34
+ }
35
+ export {};
@@ -33,11 +33,9 @@ interface Props extends DOMAttributes<HTMLElement> {
33
33
  export declare class HotbarEntityIcon extends React.Component<Props> {
34
34
  private contextMenu;
35
35
  constructor(props: Props);
36
- componentDidMount(): void;
37
36
  get kindIcon(): JSX.Element;
38
37
  get ledIcon(): JSX.Element;
39
38
  isActive(item: CatalogEntity): boolean;
40
- isPersisted(entity: CatalogEntity): boolean;
41
39
  render(): JSX.Element;
42
40
  }
43
41
  export {};
@@ -97,7 +97,7 @@ export declare class Input extends React.Component<InputProps, State> {
97
97
  setDirty(dirty?: boolean): void;
98
98
  onFocus(evt: React.FocusEvent<InputElement>): void;
99
99
  onBlur(evt: React.FocusEvent<InputElement>): void;
100
- setDirtyOnChange: (() => void) & import("lodash").Cancelable;
100
+ setDirtyOnChange: import("lodash").DebouncedFunc<() => void>;
101
101
  onChange(evt: React.ChangeEvent<any>): void;
102
102
  onKeyDown(evt: React.KeyboardEvent<InputElement>): void;
103
103
  get showMaxLenIndicator(): boolean;
@@ -28,7 +28,7 @@ export interface SearchInputUrlProps extends InputProps {
28
28
  export declare class SearchInputUrl extends React.Component<SearchInputUrlProps> {
29
29
  inputVal: string;
30
30
  updateInput: import("mobx").IReactionDisposer;
31
- updateUrl: ((val: string) => void) & import("lodash").Cancelable;
31
+ updateUrl: import("lodash").DebouncedFunc<(val: string) => void>;
32
32
  setValue: (value: string) => void;
33
33
  clear: () => void;
34
34
  onChange: (val: string, evt: React.ChangeEvent<any>) => void;
@@ -24,4 +24,5 @@ export interface SidebarStorageState {
24
24
  [itemId: string]: boolean;
25
25
  };
26
26
  }
27
+ export declare const defaultSidebarWidth = 200;
27
28
  export declare const sidebarStorage: import("../../utils").StorageHelper<SidebarStorageState>;
@@ -26,13 +26,15 @@ interface Props {
26
26
  }
27
27
  export declare class Sidebar extends React.Component<Props> {
28
28
  static displayName: string;
29
+ private contextMenu;
30
+ constructor(props: Props);
29
31
  componentDidMount(): Promise<void>;
30
32
  renderCustomResources(): JSX.Element | JSX.Element[];
31
33
  renderTreeFromTabRoutes(tabRoutes?: TabLayoutRoute[]): React.ReactNode;
32
34
  getTabLayoutRoutes(menu: ClusterPageMenuRegistration): TabLayoutRoute[];
33
35
  renderRegisteredMenus(): JSX.Element[];
34
36
  renderCluster(): JSX.Element;
35
- get clusterEntity(): import("../../api/catalog-entity").CatalogEntity<import("../../../common/catalog").CatalogEntityMetadata, import("../../../common/catalog").CatalogEntityStatus, import("../../../common/catalog").CatalogEntitySpec>;
37
+ get clusterEntity(): import("../../../common/catalog").CatalogEntity<import("../../../common/catalog").CatalogEntityMetadata, import("../../../common/catalog").CatalogEntityStatus, import("../../../common/catalog").CatalogEntitySpec>;
36
38
  render(): JSX.Element;
37
39
  }
38
40
  export {};
@@ -118,7 +118,7 @@ export declare class ResizingAnchor extends React.PureComponent<Props> {
118
118
  componentWillUnmount(): void;
119
119
  onDragInit: (event: React.MouseEvent) => void;
120
120
  calculateDelta(from: Position, to: Position): number | false;
121
- onDrag: ((event: MouseEvent) => void) & _.Cancelable;
121
+ onDrag: _.DebouncedFunc<(event: MouseEvent) => void>;
122
122
  onDragEnd: () => void;
123
123
  render(): JSX.Element;
124
124
  }
@@ -26,5 +26,5 @@ interface Styles extends Partial<Record<SwitchClassKey, string>> {
26
26
  interface Props extends SwitchProps {
27
27
  classes: Styles;
28
28
  }
29
- export declare const Switcher: React.ComponentType<Pick<Props, "name" | "key" | "id" | "value" | "type" | "resource" | "style" | "dir" | "form" | "slot" | "title" | "color" | "className" | "prefix" | "defaultValue" | "hidden" | "ref" | "disabled" | "onDrag" | "onDoubleClick" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "role" | "size" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "autoFocus" | "icon" | "checked" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "readOnly" | "required" | "inputProps" | "action" | "innerRef" | "checkedIcon" | "disableFocusRipple" | "edge" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "inputRef"> & import("@material-ui/core/styles").StyledComponentProps<"track" | "checked" | "root" | "thumb" | "focusVisible" | "switchBase">>;
29
+ export declare const Switcher: React.ComponentType<Pick<Props, "name" | "key" | "id" | "value" | "type" | "size" | "resource" | "style" | "dir" | "form" | "slot" | "title" | "color" | "className" | "prefix" | "defaultValue" | "hidden" | "ref" | "disabled" | "onDrag" | "onDoubleClick" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "role" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "autoFocus" | "icon" | "checked" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "readOnly" | "required" | "inputProps" | "action" | "innerRef" | "checkedIcon" | "disableFocusRipple" | "edge" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "inputRef"> & import("@material-ui/core/styles").StyledComponentProps<"track" | "checked" | "root" | "thumb" | "focusVisible" | "switchBase">>;
30
30
  export {};
@@ -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 {};