Skip to content

Commit

Permalink
typescript code
Browse files Browse the repository at this point in the history
  • Loading branch information
DileSoft committed Jun 14, 2024
1 parent c759efd commit 0d33622
Show file tree
Hide file tree
Showing 12 changed files with 582 additions and 260 deletions.
5 changes: 3 additions & 2 deletions packages/iobroker.vis-2/src/src/Attributes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import Scripts from './Scripts';
import View from './View';
import Widget from './Widget';
import usePrevious from '../Utils/usePrevious';
import { EditorClass } from '@/Editor';

const style: Record<string, any> = (theme: Record<string, any>) => ({
blockHeader: theme.classes.blockHeader,
Expand All @@ -45,11 +46,11 @@ interface AttributesProps {
adapterName: string;
instance: number;
projectName: string;
saveCssFile: (fileName: string, data: string) => void;
saveCssFile: EditorClass['saveCssFile'];
editMode: boolean;
onHide: (hide: boolean) => void;
adapterId: string;
userGroups: Record<string, string[]>;
userGroups: EditorClass['state']['userGroups'];
selectedWidgets: string[];
widgetsLoaded: boolean;
selectedView: string;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ import {
MarketplaceWidgetRevision,
Widget,
SingleWidgetId,
SingleWidget,
} from '@iobroker/types-vis-2';
import { store } from '@/Store';

export interface MarketplaceDialogProps {
onClose: () => void;
addPage?: boolean;
widget?: { name: string; date: string; widget_id: string; image_id: string };
widget?: {
name?: string;
date?: string;
widget_id?: string;
image_id?: string;
widget?: SingleWidget[];
image?: string;
};
installedWidgets: MarketplaceWidgetRevision[];
updateWidgets: (widget: MarketplaceWidgetRevision) => void;
installWidget: (widgetId: string, id: string) => void;
Expand Down
11 changes: 6 additions & 5 deletions packages/iobroker.vis-2/src/src/Palette/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { store } from '@/Store';
import { getWidgetTypes, WidgetType } from '@/Vis/visWidgetsCatalog';
import { loadComponent } from '@/Vis/visLoadWidgets';
import type { MarketplaceDialogProps } from '@/Marketplace/MarketplaceDialog';
import { EditorClass } from '../Editor';
import Widget from './Widget';
import MarketplacePalette from '../Marketplace/MarketplacePalette';

Expand Down Expand Up @@ -157,11 +158,11 @@ interface WidgetSetProps {
interface PaletteProps {
classes: Record<string, string>;
onHide: (hide: boolean) => void;
changeView: (view: string) => void;
changeProject: (project: Project, ignoreHistory?: boolean) => Promise<void>;
uninstallWidget: (widgetId: string) => void;
setMarketplaceDialog: (props: Partial<MarketplaceDialogProps>) => void;
updateWidgets: () => void;
changeView: EditorClass['changeView'];
changeProject: EditorClass['changeProject'];
uninstallWidget: EditorClass['uninstallWidget'];
setMarketplaceDialog: EditorClass['setMarketplaceDialog'];
updateWidgets: EditorClass['updateWidgets'];
widgetsLoaded: boolean;
socket: LegacyConnection;
themeType: ThemeType;
Expand Down
Loading

0 comments on commit 0d33622

Please sign in to comment.