@k8slens/extensions 6.0.1-git.4771c7755c.0 → 6.0.1-git.4b1c9fb5fd.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.
@@ -2,4 +2,10 @@
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
- export declare function getActiveTheme(): import("../../renderer/themes/store").Theme;
5
+ import type { LensTheme } from "../../renderer/themes/store";
6
+ export declare const activeTheme: import("mobx").IComputedValue<LensTheme>;
7
+ /**
8
+ * @deprecated This hides the reactivity of active theme, use {@link activeTheme} instead
9
+ */
10
+ export declare function getActiveTheme(): LensTheme;
11
+ export type { LensTheme };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Copyright (c) OpenLens Authors. All rights reserved.
3
+ * Licensed under MIT License. See LICENSE in root directory for more information.
4
+ */
5
+ export {};
@@ -1,7 +1,7 @@
1
- import type { IObservableValue } from "mobx";
1
+ import type { IComputedValue, IObservableValue } from "mobx";
2
2
  import type { TargetHelmRelease } from "../target-helm-release.injectable";
3
3
  import type { CallForHelmRelease } from "./call-for-helm-release/call-for-helm-release.injectable";
4
- import type { ThemeStore } from "../../../../themes/store";
4
+ import type { LensTheme } from "../../../../themes/store";
5
5
  import type { CallForHelmReleaseConfiguration } from "./call-for-helm-release-configuration/call-for-helm-release-configuration.injectable";
6
6
  import type { GetResourceDetailsUrl } from "./get-resource-details-url.injectable";
7
7
  import type { CallForHelmReleaseUpdate } from "../../update-release/call-for-helm-release-update/call-for-helm-release-update.injectable";
@@ -25,7 +25,7 @@ export interface ConfigurationInput {
25
25
  interface Dependencies {
26
26
  callForHelmRelease: CallForHelmRelease;
27
27
  targetRelease: TargetHelmRelease;
28
- themeStore: ThemeStore;
28
+ activeTheme: IComputedValue<LensTheme>;
29
29
  callForHelmReleaseConfiguration: CallForHelmReleaseConfiguration;
30
30
  getResourceDetailsUrl: GetResourceDetailsUrl;
31
31
  updateRelease: CallForHelmReleaseUpdate;
@@ -4,7 +4,25 @@
4
4
  */
5
5
  import "./overview-workload-status.scss";
6
6
  import React from "react";
7
+ import type { PascalCase } from "type-fest";
8
+ import type { Workload } from "./workloads/workload-injection-token";
9
+ export declare type LowercaseOrPascalCase<T extends string> = Lowercase<T> | PascalCase<T>;
10
+ export declare type WorkloadStatus = Partial<Record<LowercaseOrPascalCase<keyof typeof statusBackgroundColorMapping>, number>>;
7
11
  export interface OverviewWorkloadStatusProps {
8
- status: Partial<Record<string, number>>;
12
+ workload: Workload;
9
13
  }
14
+ declare const statusBackgroundColorMapping: {
15
+ readonly running: "colorOk";
16
+ readonly scheduled: "colorOk";
17
+ readonly pending: "colorWarning";
18
+ readonly suspended: "colorWarning";
19
+ readonly evicted: "colorError";
20
+ readonly succeeded: "colorSuccess";
21
+ readonly failed: "colorError";
22
+ readonly terminated: "colorTerminated";
23
+ readonly terminating: "colorTerminated";
24
+ readonly unknown: "colorVague";
25
+ readonly complete: "colorSuccess";
26
+ };
10
27
  export declare const OverviewWorkloadStatus: React.FunctionComponent<OverviewWorkloadStatusProps>;
28
+ export {};
@@ -1,9 +1,10 @@
1
1
  import type { IComputedValue } from "mobx";
2
+ import type { WorkloadStatus } from "../overview-workload-status";
2
3
  export interface Workload {
3
4
  resourceName: string;
4
5
  open: () => void;
5
6
  amountOfItems: IComputedValue<number>;
6
- status: IComputedValue<Partial<Record<string, number>>>;
7
+ status: IComputedValue<WorkloadStatus>;
7
8
  title: string;
8
9
  orderNumber: number;
9
10
  }
@@ -27,6 +27,7 @@ export interface ChartProps {
27
27
  redraw?: boolean;
28
28
  title?: string;
29
29
  className?: string;
30
+ "data-testid"?: string;
30
31
  }
31
32
  export declare enum ChartKind {
32
33
  PIE = "pie",
@@ -3,8 +3,7 @@
3
3
  * Licensed under MIT License. See LICENSE in root directory for more information.
4
4
  */
5
5
  import React from "react";
6
- import type { DockTab } from "../dock/store";
7
6
  export interface CreateResourceProps {
8
- tab: DockTab;
7
+ tabId: string;
9
8
  }
10
9
  export declare const CreateResource: React.FunctionComponent<CreateResourceProps>;
@@ -3,8 +3,7 @@
3
3
  * Licensed under MIT License. See LICENSE in root directory for more information.
4
4
  */
5
5
  import React from "react";
6
- import type { DockTab } from "../dock/store";
7
6
  export interface EditResourceProps {
8
- tab: DockTab;
7
+ tabId: string;
9
8
  }
10
9
  export declare const EditResource: React.FunctionComponent<EditResourceProps>;
@@ -4,8 +4,7 @@
4
4
  */
5
5
  import "./install-chart.scss";
6
6
  import React from "react";
7
- import type { DockTab } from "../dock/store";
8
- export interface InstallCharProps {
9
- tab: DockTab;
7
+ export interface InstallChartProps {
8
+ tabId: string;
10
9
  }
11
- export declare const InstallChart: React.FunctionComponent<InstallCharProps>;
10
+ export declare const InstallChart: React.FunctionComponent<InstallChartProps>;
@@ -2,8 +2,15 @@
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 { FormControlLabelProps } from "@material-ui/core/FormControlLabel";
5
+ import React from "react";
6
+ interface FormControlLabelProps {
7
+ control: React.ReactElement<any, any>;
8
+ label: React.ReactNode;
9
+ }
6
10
  /**
7
11
  * @deprecated Use <Switch/> instead from "../switch.tsx".
8
12
  */
9
- export declare function FormSwitch(props: FormControlLabelProps): JSX.Element;
13
+ export declare function FormSwitch(props: FormControlLabelProps & {
14
+ children?: React.ReactNode;
15
+ }): React.FunctionComponentElement<any>;
16
+ export {};
@@ -3,15 +3,14 @@
3
3
  * Licensed under MIT License. See LICENSE in root directory for more information.
4
4
  */
5
5
  import React from "react";
6
- import type { SwitchClassKey, SwitchProps } from "@material-ui/core/Switch";
7
- interface Styles extends Partial<Record<SwitchClassKey, string>> {
8
- focusVisible?: string;
9
- }
10
- export interface SwitcherProps extends SwitchProps {
11
- classes: Styles;
6
+ export interface SwitcherProps {
7
+ disabled?: boolean;
8
+ children?: React.ReactNode;
9
+ checked?: boolean;
10
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
11
+ name?: string;
12
12
  }
13
13
  /**
14
14
  * @deprecated Use <Switch/> instead from "../switch.tsx".
15
15
  */
16
- export declare const Switcher: React.ComponentType<Pick<SwitcherProps, "key" | "value" | "id" | "name" | "className" | "form" | "slot" | "style" | "title" | "size" | "type" | "action" | "ref" | "autoFocus" | "checked" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "placeholder" | "readOnly" | "required" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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" | "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" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "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" | "icon" | "inputProps" | "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">>;
17
- export {};
16
+ export declare function Switcher({ disabled, checked, onChange, name, children }: SwitcherProps): JSX.Element;
@@ -65,6 +65,7 @@ export interface ApplicationBuilder {
65
65
  helmCharts: {
66
66
  navigate: NavigateToHelmCharts;
67
67
  };
68
+ navigateWith: (token: Injectable<() => void, any, void>) => void;
68
69
  select: {
69
70
  openMenu: (id: string) => {
70
71
  selectOption: (labelText: string) => void;
@@ -0,0 +1,2 @@
1
+ declare const activeThemeInjectable: import("@ogre-tools/injectable").Injectable<import("mobx").IComputedValue<import("./store").LensTheme>, unknown, void>;
2
+ export default activeThemeInjectable;
@@ -2,6 +2,6 @@
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 { Theme } from "./store";
6
- declare const lensDarkTheme: Theme;
5
+ import type { LensTheme } from "./store";
6
+ declare const lensDarkTheme: LensTheme;
7
7
  export default lensDarkTheme;
@@ -2,6 +2,6 @@
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 { Theme } from "./store";
6
- declare const lensLightTheme: Theme;
5
+ import type { LensTheme } from "./store";
6
+ declare const lensLightTheme: LensTheme;
7
7
  export default lensLightTheme;
@@ -5,7 +5,7 @@
5
5
  import type { MonacoTheme } from "../components/monaco-editor";
6
6
  import type { IpcRenderer } from "electron";
7
7
  export declare type ThemeId = string;
8
- export interface Theme {
8
+ export interface LensTheme {
9
9
  name: string;
10
10
  type: "dark" | "light";
11
11
  colors: Record<string, string>;
@@ -30,13 +30,13 @@ export declare class ThemeStore {
30
30
  private get activeThemeId();
31
31
  private get terminalThemeId();
32
32
  private readonly defaultTheme;
33
- get activeTheme(): Theme;
33
+ get activeTheme(): LensTheme;
34
34
  private get terminalColors();
35
35
  get xtermColors(): Record<string, string>;
36
- get themes(): import("type-fest/source/readonly-deep").ReadonlyMapDeep<string, Theme>;
36
+ get themes(): import("type-fest/source/readonly-deep").ReadonlyMapDeep<string, LensTheme>;
37
37
  constructor(dependencies: Dependencies);
38
38
  init(): Promise<void>;
39
- getThemeById(themeId: ThemeId): Theme | undefined;
39
+ getThemeById(themeId: ThemeId): LensTheme | undefined;
40
40
  protected applyActiveTheme(): void;
41
41
  }
42
42
  export {};
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": "6.0.1-git.4771c7755c.0",
5
+ "version": "6.0.1-git.4b1c9fb5fd.0",
6
6
  "copyright": "© 2022 OpenLens Authors",
7
7
  "license": "MIT",
8
8
  "main": "dist/src/extensions/extension-api.js",