@k8slens/extensions 5.3.0-git.5998b4ca84.0 → 5.3.0-git.62526c2192.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 (39) hide show
  1. package/dist/src/common/catalog/catalog-entity.d.ts +4 -1
  2. package/dist/src/common/cluster-store.d.ts +0 -1
  3. package/dist/src/common/hotbar-store.d.ts +5 -0
  4. package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +16 -32
  5. package/dist/src/common/k8s-api/endpoints/secret.api.d.ts +5 -6
  6. package/dist/src/common/k8s-api/json-api.d.ts +2 -0
  7. package/dist/src/common/k8s-api/kube-api.d.ts +1 -1
  8. package/dist/src/common/routes/port-forwards.d.ts +1 -0
  9. package/dist/src/common/user-store/preferences-helpers.d.ts +8 -0
  10. package/dist/src/common/utils/array.d.ts +30 -0
  11. package/dist/src/common/utils/index.d.ts +2 -1
  12. package/dist/src/common/utils/iter.d.ts +23 -9
  13. package/dist/src/common/utils/sort-compare.d.ts +50 -0
  14. package/dist/src/extensions/extension-api.js +84 -36
  15. package/dist/src/main/helm/helm-chart-manager.d.ts +1 -0
  16. package/dist/src/main/kubectl.d.ts +1 -1
  17. package/dist/src/renderer/components/+catalog/catalog-entity-details.d.ts +0 -1
  18. package/dist/src/renderer/components/+catalog/catalog-entity-drawer-menu.d.ts +0 -1
  19. package/dist/src/renderer/components/+catalog/catalog.d.ts +2 -0
  20. package/dist/src/renderer/components/+catalog/hotbar-toggle-menu-item.d.ts +27 -0
  21. package/dist/src/renderer/components/+config-secrets/__tests__/secret-details.test.d.ts +21 -0
  22. package/dist/src/renderer/components/+config-secrets/secret-details.d.ts +4 -3
  23. package/dist/src/renderer/components/+network-port-forwards/port-forward-details.d.ts +33 -0
  24. package/dist/src/renderer/components/+network-port-forwards/port-forwards.d.ts +10 -1
  25. package/dist/src/renderer/components/+workloads-pods/pod-details-list.d.ts +0 -3
  26. package/dist/src/renderer/components/hotbar/hotbar-entity-icon.d.ts +0 -2
  27. package/dist/src/renderer/components/layout/sidebar.d.ts +3 -1
  28. package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
  29. package/dist/src/renderer/components/table/__tests__/getSorted.test.d.ts +21 -0
  30. package/dist/src/renderer/components/table/sorting.d.ts +22 -0
  31. package/dist/src/renderer/components/table/table.d.ts +20 -3
  32. package/dist/src/renderer/components/virtual-list/virtual-list.d.ts +6 -0
  33. package/dist/src/renderer/port-forward/port-forward-dialog.d.ts +0 -1
  34. package/dist/src/renderer/port-forward/port-forward-item.d.ts +1 -0
  35. package/dist/src/renderer/port-forward/port-forward.store.d.ts +1 -0
  36. package/dist/src/renderer/utils/__tests__/converted-name.test.d.ts +21 -0
  37. package/dist/src/renderer/utils/index.d.ts +9 -10
  38. package/dist/src/renderer/utils/name-parts.d.ts +27 -0
  39. package/package.json +1 -1
@@ -34,5 +34,6 @@ export declare class HelmChartManager {
34
34
  private executeCommand;
35
35
  getReadme(name: string, version?: string): Promise<string>;
36
36
  getValues(name: string, version?: string): Promise<string>;
37
+ protected updateYamlCache(): Promise<void>;
37
38
  protected cachedYaml(): Promise<RepoHelmChartList>;
38
39
  }
@@ -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
  }
@@ -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;
@@ -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 {};
@@ -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 type { 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 {};
@@ -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 {};
@@ -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;
@@ -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 {};
@@ -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 {};
@@ -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, "key" | "name" | "id" | "style" | "dir" | "form" | "slot" | "title" | "type" | "color" | "value" | "size" | "resource" | "prefix" | "defaultValue" | "hidden" | "className" | "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" | "switchBase" | "thumb" | "focusVisible">>;
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 {};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import type { TableSortCallback } from "./table";
22
+ export declare function getSorted<T>(rawItems: T[], sortingCallback: TableSortCallback<T> | undefined, orderByRaw: string): T[];
@@ -48,9 +48,25 @@ export interface TableProps<Item> extends React.DOMAttributes<HTMLDivElement> {
48
48
  onSort?: (params: TableSortParams) => void;
49
49
  noItems?: React.ReactNode;
50
50
  selectedItemId?: string;
51
+ /**
52
+ * Use virtual list component to render only visible rows. By default uses a
53
+ * auto sizer to fill available height
54
+ */
51
55
  virtual?: boolean;
52
- rowPadding?: string;
53
- rowLineHeight?: string;
56
+ /**
57
+ * Only used when virtual is true. Sets the virtual list to be a fixed height.
58
+ * Needed when used in contexts that already have a parent component that
59
+ * is `overflow-y: scroll`,
60
+ */
61
+ virtualHeight?: number;
62
+ /**
63
+ * Row padding in pixels
64
+ */
65
+ rowPadding?: number;
66
+ /**
67
+ * Row line height in pixels
68
+ */
69
+ rowLineHeight?: number;
54
70
  customRowHeights?: (item: Item, lineHeight: number, paddings: number) => number;
55
71
  getTableRow?: (uid: string) => React.ReactElement<TableRowProps>;
56
72
  renderRow?: (item: Item) => React.ReactElement<TableRowProps>;
@@ -61,9 +77,10 @@ export declare class Table<Item> extends React.Component<TableProps<Item>> {
61
77
  static defaultProps: TableProps<any>;
62
78
  constructor(props: TableProps<Item>);
63
79
  componentDidMount(): void;
80
+ get isSortable(): boolean;
64
81
  get sortParams(): Partial<TableSortParams>;
65
82
  renderHead(): React.ReactElement<TableHeadProps, string | React.JSXElementConstructor<any>>;
66
- getSorted(items: any[]): any[];
83
+ getSorted(rawItems: Item[]): Item[];
67
84
  protected onSort({ sortBy, orderBy }: TableSortParams): void;
68
85
  sort(colName: TableSortBy): void;
69
86
  private getContent;
@@ -34,6 +34,11 @@ interface Props<T extends ItemObject = any> {
34
34
  getRow?: (uid: string | number) => React.ReactElement<any>;
35
35
  onScroll?: (props: ListOnScrollProps) => void;
36
36
  outerRef?: React.Ref<any>;
37
+ /**
38
+ * If specified then AutoSizer will not be used and instead a fixed height
39
+ * virtual list will be rendered
40
+ */
41
+ fixedHeight?: number;
37
42
  }
38
43
  interface State {
39
44
  overscanCount: number;
@@ -47,6 +52,7 @@ export declare class VirtualList extends Component<Props, State> {
47
52
  getItemSize: (index: number) => number;
48
53
  scrollToSelectedItem: (() => void) & import("lodash").Cancelable;
49
54
  scrollToItem: (index: number, align: Align) => void;
55
+ renderList(height: number | undefined): JSX.Element;
50
56
  render(): JSX.Element;
51
57
  }
52
58
  export {};
@@ -28,7 +28,6 @@ interface PortForwardDialogOpenOptions {
28
28
  openInBrowser: boolean;
29
29
  }
30
30
  export declare class PortForwardDialog extends Component<Props> {
31
- ready: boolean;
32
31
  currentPort: number;
33
32
  desiredPort: number;
34
33
  constructor(props: Props);
@@ -42,5 +42,6 @@ export declare class PortForwardItem implements ItemObject {
42
42
  getKind(): string;
43
43
  getPort(): number;
44
44
  getForwardPort(): number;
45
+ getStatus(): string;
45
46
  getSearchFields(): (string | number)[];
46
47
  }
@@ -29,6 +29,7 @@ export declare class PortForwardStore extends ItemStore<PortForwardItem> {
29
29
  loadAll(): Promise<any>;
30
30
  reset(): void;
31
31
  removeSelectedItems(): Promise<void[]>;
32
+ getById(id: string): PortForwardItem;
32
33
  }
33
34
  export declare function addPortForward(portForward: ForwardedPort): Promise<number>;
34
35
  export declare function getPortForward(portForward: ForwardedPort): Promise<number>;
@@ -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 {};
@@ -19,18 +19,17 @@
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
21
  export * from "../../common/utils";
22
- export * from "./cssVar";
23
- export * from "./cssNames";
24
22
  export * from "../../common/event-emitter";
25
- export * from "./saveFile";
26
- export * from "./prevDefault";
27
- export * from "./storageHelper";
23
+ export * from "./copyToClipboard";
28
24
  export * from "./createStorage";
25
+ export * from "./cssNames";
26
+ export * from "./cssVar";
27
+ export * from "./display-booleans";
29
28
  export * from "./interval";
30
- export * from "./copyToClipboard";
29
+ export * from "./isMiddleClick";
31
30
  export * from "./isReactNode";
32
- export * from "../../common/utils/convertMemory";
33
- export * from "../../common/utils/convertCpu";
34
31
  export * from "./metricUnitsToNumber";
35
- export * from "./display-booleans";
36
- export * from "./isMiddleClick";
32
+ export * from "./name-parts";
33
+ export * from "./prevDefault";
34
+ export * from "./saveFile";
35
+ export * from "./storageHelper";
@@ -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
+ /**
22
+ * Split `name` into the parts seperated by one or more of (-, _, or .) and
23
+ * the sections can be converted to numbers will be converted
24
+ * @param name A kube object name
25
+ * @returns The converted parts of the name
26
+ */
27
+ export declare function getConvertedParts(name: string): (string | number)[];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@k8slens/extensions",
3
3
  "productName": "OpenLens extensions",
4
4
  "description": "OpenLens - Open Source Kubernetes IDE: extensions",
5
- "version": "5.3.0-git.5998b4ca84.0",
5
+ "version": "5.3.0-git.62526c2192.0",
6
6
  "copyright": "© 2021 OpenLens Authors",
7
7
  "license": "MIT",
8
8
  "main": "dist/src/extensions/extension-api.js",