Merge pull request #704 from MauriceNino/feature/dashdot-consistency-changes

Add options to sort and resize graphs in dash. widget
This commit is contained in:
Thomas Camlong
2023-02-18 20:09:42 +09:00
committed by GitHub
35 changed files with 704 additions and 591 deletions

View File

@@ -49,7 +49,7 @@
"dayjs": "^1.11.7",
"dockerode": "^3.3.2",
"fily-publish-gridstack": "^0.0.13",
"framer-motion": "^6.5.1",
"framer-motion": "^9.0.2",
"html-entities": "^2.3.3",
"i18next": "^21.9.1",
"js-file-download": "^0.4.12",

View File

@@ -4,18 +4,6 @@
"description": "Viser graferne for en ekstern Dash. instans i Homarr.",
"settings": {
"title": "Indstillinger for Dash. widget",
"cpuMultiView": {
"label": "CPU Multikerne Visning"
},
"storageMultiView": {
"label": "Multidrevet Lagervisning"
},
"useCompactView": {
"label": "Brug kompakt tilstand"
},
"graphs": {
"label": "Grafer"
},
"url": {
"label": "Dash. URL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,23 +4,77 @@
"description": "Zeigt die Graphen einer externen Dash.-Instanz innerhalb von Homarr an.",
"settings": {
"title": "Einstellungen für Dash. Widget",
"cpuMultiView": {
"label": "CPU Multi-Core View"
},
"storageMultiView": {
"label": "Speicher Multi-Drive View"
},
"useCompactView": {
"label": "Kompaktmodus verwenden"
},
"graphs": {
"label": "Graphen"
},
"url": {
"label": "Dash. URL"
},
"usePercentages": {
"label": "Prozentangaben anzeigen"
},
"columns": {
"label": "Anzahl Spalten"
},
"graphHeight": {
"label": "Höhe der Graphen"
},
"graphsOrder": {
"label": "Graphen (Reihenfolge)",
"storage": {
"label": "Speicher",
"enabled": {
"label": "Im Widget anzeigen"
},
"span": {
"label": "Spaltenbreite"
},
"compactView": {
"label": "Als Text anzeigen (Kompakt)"
},
"multiView": {
"label": "Als Multi-Laufwerk anzeigen"
}
},
"network": {
"label": "Netzwerk",
"enabled": {
"label": "Im Widget anzeigen"
},
"span": {
"label": "Spaltenbreite"
},
"compactView": {
"label": "Als Text anzeigen (Kompakt)"
}
},
"cpu": {
"label": "CPU",
"enabled": {
"label": "Im Widget anzeigen"
},
"span": {
"label": "Spaltenbreite"
},
"multiView": {
"label": "Als Multi-Core anzeigen"
}
},
"ram": {
"label": "RAM",
"enabled": {
"label": "Im Widget anzeigen"
},
"span": {
"label": "Spaltenbreite"
}
},
"gpu": {
"label": "GPU",
"enabled": {
"label": "Im Widget anzeigen"
},
"span": {
"label": "Spaltenbreite"
}
}
}
}
},
@@ -50,7 +104,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Εμφανίζει τα γραφήματα μιας εξωτερικής Dash. μέσα στο Homarr.",
"settings": {
"title": "Ρυθμίσεις για το widget Dash",
"cpuMultiView": {
"label": "Προβολή πολλαπλών πυρήνων CPU"
},
"storageMultiView": {
"label": "Προβολή πολλαπλών μονάδων αποθήκευσης"
},
"useCompactView": {
"label": "Χρήση Συμπαγούς Προβολής"
},
"graphs": {
"label": "Γραφήματα"
},
"url": {
"label": "Dash. URL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "Μνήμη RAM"
},
"gpu": {

View File

@@ -4,23 +4,77 @@
"description": "Displays the graphs of an external Dash. instance inside of Homarr.",
"settings": {
"title": "Settings for Dash. widget",
"cpuMultiView": {
"label": "CPU Multi-Core View"
},
"storageMultiView": {
"label": "Storage Multi-Drive View"
},
"useCompactView": {
"label": "Use Compact View"
},
"graphs": {
"label": "Graphs"
},
"url": {
"label": "Dash. URL"
},
"usePercentages": {
"label": "Display percentages"
},
"columns": {
"label": "Display columns"
},
"graphHeight": {
"label": "Height of graphs"
},
"graphsOrder": {
"label": "Graphs (Order)",
"storage": {
"label": "Storage",
"enabled": {
"label": "Show in widget"
},
"span": {
"label": "Column span"
},
"compactView": {
"label": "Show as text (compact)"
},
"multiView": {
"label": "Show as multi-drive-view"
}
},
"network": {
"label": "Network",
"enabled": {
"label": "Show in widget"
},
"span": {
"label": "Column span"
},
"compactView": {
"label": "Show as text (compact)"
}
},
"cpu": {
"label": "CPU",
"enabled": {
"label": "Show in widget"
},
"span": {
"label": "Column span"
},
"multiView": {
"label": "Show as multi-core-view"
}
},
"ram": {
"label": "RAM",
"enabled": {
"label": "Show in widget"
},
"span": {
"label": "Column span"
}
},
"gpu": {
"label": "GPU",
"enabled": {
"label": "Show in widget"
},
"span": {
"label": "Column span"
}
}
}
}
},
@@ -50,7 +104,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Muestra los gráficos de una instancia de Dash. externa, dentro de Homarr.",
"settings": {
"title": "Ajustes para el widget Dash.",
"cpuMultiView": {
"label": "Vista CPU Multinúcleo"
},
"storageMultiView": {
"label": "Vista Almacenamiento Multidisco"
},
"useCompactView": {
"label": "Usar vista Compacta"
},
"graphs": {
"label": "Gráficos"
},
"url": {
"label": "Dash. URL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Affiche les graphiques d'une instance externe de Dash. dans Homarr.",
"settings": {
"title": "Paramètres du widget Dash",
"cpuMultiView": {
"label": "Vue du CPU multi-cœur"
},
"storageMultiView": {
"label": "Vue du stockage multidisque"
},
"useCompactView": {
"label": "Utiliser la vue compacte"
},
"graphs": {
"label": "Graphiques"
},
"url": {
"label": "URL Dash."
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "מציג נתוני גרפים.",
"settings": {
"title": "הגדרות עבור וידג׳ט Dash.",
"cpuMultiView": {
"label": "תצוגת מעבד מרובת ליבות"
},
"storageMultiView": {
"label": "תצוגת אחסון מרובת כוננים"
},
"useCompactView": {
"label": "השתמש בתצוגה קומפקטית"
},
"graphs": {
"label": "גרפים"
},
"url": {
"label": "כתובת אתר Dash."
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "מעבד"
},
"memory": {
"ram": {
"title": "זיכרון פנימי"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Visualizza i grafici di un'istanza Dash. esterna all'interno di Homarr.",
"settings": {
"title": "Impostazioni del widget Dash.",
"cpuMultiView": {
"label": "Vista CPU Multi-Core"
},
"storageMultiView": {
"label": "Visualizzazione archiviazione Multi-Drive"
},
"useCompactView": {
"label": "Visualizzazione compatta"
},
"graphs": {
"label": "Grafici"
},
"url": {
"label": "Dash. URL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Homarr内部の外部Dash.インスタンスのグラフを表示します。",
"settings": {
"title": "Dash.ウィジェットの設定",
"cpuMultiView": {
"label": "CPUマルチコアビュー"
},
"storageMultiView": {
"label": "ストレージマルチドライブビュー"
},
"useCompactView": {
"label": "コンパクトビューを使用する"
},
"graphs": {
"label": "グラフ"
},
"url": {
"label": "ダッシュURL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "ラム"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "",
"settings": {
"title": "",
"cpuMultiView": {
"label": "CPU 멀티 코어 보기"
},
"storageMultiView": {
"label": "저장소 모든 드라이브 보기"
},
"useCompactView": {
"label": "작은 모듈 사용"
},
"graphs": {
"label": "그래프"
},
"url": {
"label": "Dash. 주소"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Displays Teh Grafs Ov An External Dash. Instance Inside Ov Homarr.",
"settings": {
"title": "Settings 4 Dash. Widget",
"cpuMultiView": {
"label": "CPU Multi-Coer View"
},
"storageMultiView": {
"label": "Storagzzz Multi-Driveh View"
},
"useCompactView": {
"label": "Ues Compact View"
},
"graphs": {
"label": "Graphz"
},
"url": {
"label": "Dash. URL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Toont de grafieken van een externe Dash. instantie binnen Homarr.",
"settings": {
"title": "Instellingen voor Dash. widget",
"cpuMultiView": {
"label": "CPU Multi-Core Weergave"
},
"storageMultiView": {
"label": "Opslag Multi-Drive weergave"
},
"useCompactView": {
"label": "Compacte weergave gebruiken"
},
"graphs": {
"label": "Grafieken"
},
"url": {
"label": "Dash. URL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Viser grafene til en ekstern Dash. Eksempel inni av Homarr.",
"settings": {
"title": "Innstillinger for Dash. widget",
"cpuMultiView": {
"label": "CPU flerkjernevisning"
},
"storageMultiView": {
"label": "Lagring flerdiskvisning"
},
"useCompactView": {
"label": "Bruk kompakt visning"
},
"graphs": {
"label": "Grafer"
},
"url": {
"label": "Dash. URL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Wyświetla wykresy zewnętrznej instancji Dash. wewnątrz Homarr.",
"settings": {
"title": "Ustawienia dla widgetu Dash.",
"cpuMultiView": {
"label": "Widok wielordzeniowy procesora"
},
"storageMultiView": {
"label": "Widok wielu dysków"
},
"useCompactView": {
"label": "Użyj trybu kompaktowego"
},
"graphs": {
"label": "Wykresy"
},
"url": {
"label": "Adres URL usługi Dash."
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Apresenta os gráficos de um Dash. exemplo externo dentro de Homarr.",
"settings": {
"title": "Definições para o Dash. widget",
"cpuMultiView": {
"label": "Visualização múltipla de CPU"
},
"storageMultiView": {
"label": "Exibição Multi-Drive de armazenamento"
},
"useCompactView": {
"label": "Usar visualização compacta"
},
"graphs": {
"label": "Gráficos"
},
"url": {
"label": "URL do Dash."
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Показывает графики внешнего экземпляра Dash. в Homarr.",
"settings": {
"title": "Настройки для виджета Dash.",
"cpuMultiView": {
"label": "Показать все ядра ЦП"
},
"storageMultiView": {
"label": "Хранилище с несколькими дисками"
},
"useCompactView": {
"label": "Использовать компактный вид"
},
"graphs": {
"label": "Графики"
},
"url": {
"label": "URL-адрес Dash."
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "ЦП"
},
"memory": {
"ram": {
"title": "ОЗУ"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Zobrazovať grafy externej Dash. vo vnútri Homarru.",
"settings": {
"title": "Nastavenia pre Dash. mini aplikácie",
"cpuMultiView": {
"label": "CPU Multi-Core Zobrazenie"
},
"storageMultiView": {
"label": "Zobrazenie Multi-Drive úložiska"
},
"useCompactView": {
"label": "Použi kompaktné zobrazenie"
},
"graphs": {
"label": "Grafy"
},
"url": {
"label": "Dash. URL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Prikaže grafe zunanjega primerka Dash. znotraj Homarra.",
"settings": {
"title": "Nastavitve za pripomoček Dash",
"cpuMultiView": {
"label": "Pogled večjedrnih procesorjev"
},
"storageMultiView": {
"label": "Pogled naprav za shranjevanje"
},
"useCompactView": {
"label": "Uporaba kompaktnega pogleda"
},
"graphs": {
"label": "Grafi"
},
"url": {
"label": "Dash. URL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Visar graferna för en extern Dash.-instans i Homarr.",
"settings": {
"title": "Inställningar för Dash. widget",
"cpuMultiView": {
"label": "Flerkärnig CPU vy"
},
"storageMultiView": {
"label": "Visning av flera lagringsenheter"
},
"useCompactView": {
"label": "Använd kompakt vy"
},
"graphs": {
"label": "Grafer"
},
"url": {
"label": "Dash. URL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Показує графіки зовнішньої Dash. всередині Homarr.",
"settings": {
"title": "Налаштування віджета Dash.",
"cpuMultiView": {
"label": "Процесор по ядрах"
},
"storageMultiView": {
"label": "Сховище по дисках"
},
"useCompactView": {
"label": "Компактний вигляд"
},
"graphs": {
"label": "Графіки"
},
"url": {
"label": "Dash. URL"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "Процесор"
},
"memory": {
"ram": {
"title": "Оперативна пам'ять"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "Hiển thị biểu đồ của Dash. bên trong Homarr.",
"settings": {
"title": "Cài đặt cho tiện ích Dash.",
"cpuMultiView": {
"label": "Chế độ hiện đa nhân CPU"
},
"storageMultiView": {
"label": "Chế độ hiện đa ổ đĩa"
},
"useCompactView": {
"label": "Dùng chế độ thu gọn"
},
"graphs": {
"label": "Biểu đồ"
},
"url": {
"label": "URL của Dash."
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "RAM"
},
"gpu": {

View File

@@ -4,18 +4,6 @@
"description": "在Homarr中显示一个外部Dash的图表。",
"settings": {
"title": "设置Dash小部件",
"cpuMultiView": {
"label": "CPU多核视图"
},
"storageMultiView": {
"label": "存储多驱动器视图"
},
"useCompactView": {
"label": "使用紧凑型视图"
},
"graphs": {
"label": "图表"
},
"url": {
"label": "Dash. 网址"
},
@@ -50,7 +38,7 @@
"cpu": {
"title": "CPU"
},
"memory": {
"ram": {
"title": "内存"
},
"gpu": {

View File

@@ -0,0 +1,135 @@
import { Collapse, createStyles, Flex, Stack, Text } from '@mantine/core';
import { useDisclosure } from '@mantine/hooks';
import { IconChevronDown, IconGripVertical } from '@tabler/icons';
import { Reorder, useDragControls } from 'framer-motion';
import { FC, ReactNode, useEffect, useRef } from 'react';
import { IDraggableListInputValue } from '../../../../widgets/widgets';
const useStyles = createStyles((theme) => ({
container: {
display: 'flex',
flexDirection: 'column',
borderRadius: theme.radius.md,
border: `1px solid ${
theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[2]
}`,
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.white,
marginBottom: theme.spacing.xs,
},
row: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '12px 16px',
gap: theme.spacing.sm,
},
middle: {
flexGrow: 1,
},
symbol: {
fontSize: 16,
},
clickableIcons: {
color: theme.colorScheme === 'dark' ? theme.colors.dark[1] : theme.colors.gray[6],
cursor: 'pointer',
userSelect: 'none',
transition: 'transform .3s ease-in-out',
},
rotate: {
transform: 'rotate(180deg)',
},
collapseContent: {
padding: '12px 16px',
},
}));
type DraggableListParams = {
value: IDraggableListInputValue['defaultValue'];
onChange: (value: IDraggableListInputValue['defaultValue']) => void;
labels: Record<string, string>;
children?: Record<string, ReactNode>;
};
export const DraggableList: FC<DraggableListParams> = (props) => {
const keys = props.value.map((v) => v.key);
return (
<div>
<Reorder.Group
axis="y"
values={keys}
onReorder={(order) =>
props.onChange(order.map((key) => props.value.find((v) => v.key === key)!))
}
as="div"
>
{props.value.map((item) => (
<ListItem key={item.key} item={item} label={props.labels[item.key]}>
{props.children?.[item.key]}
</ListItem>
))}
</Reorder.Group>
</div>
);
};
const ListItem: FC<{
item: IDraggableListInputValue['defaultValue'][number];
label: string;
}> = (props) => {
const { classes, cx } = useStyles();
const controls = useDragControls();
const [opened, handlers] = useDisclosure(false);
const hasContent = props.children != null && Object.keys(props.children).length !== 0;
// Workaround for mobile drag controls not working
// https://github.com/framer/motion/issues/1597#issuecomment-1235026724
const dragRef = useRef<HTMLDivElement>(null);
useEffect(() => {
const touchHandler: EventListener = (e) => e.preventDefault();
const dragItem = dragRef.current;
if (dragItem) {
dragItem.addEventListener('touchstart', touchHandler, { passive: false });
return () => {
dragItem.removeEventListener('touchstart', touchHandler);
};
}
return undefined;
}, [dragRef]);
return (
<Reorder.Item value={props.item.key} dragListener={false} dragControls={controls} as="div">
<div className={classes.container}>
<div className={classes.row}>
<Flex ref={dragRef} onPointerDown={(e) => controls.start(e)}>
<IconGripVertical className={classes.clickableIcons} size={18} stroke={1.5} />
</Flex>
<div className={classes.middle}>
<Text className={classes.symbol}>{props.label}</Text>
</div>
{hasContent && (
<IconChevronDown
className={cx(classes.clickableIcons, { [classes.rotate]: opened })}
onClick={() => handlers.toggle()}
size={18}
stroke={1.5}
/>
)}
</div>
{hasContent && (
<Collapse in={opened}>
<Stack className={classes.collapseContent}>{props.children}</Stack>
</Collapse>
)}
</div>
</Reorder.Item>
);
};

View File

@@ -3,24 +3,26 @@ import {
Button,
Group,
MultiSelect,
NumberInput,
Select,
Slider,
Stack,
Switch,
TextInput,
Text,
NumberInput,
Slider,
Select,
TextInput,
} from '@mantine/core';
import { ContextModalProps } from '@mantine/modals';
import { IconAlertTriangle } from '@tabler/icons';
import { Trans, useTranslation } from 'next-i18next';
import { useState } from 'react';
import Widgets from '../../../../widgets';
import type { IWidgetOptionValue } from '../../../../widgets/widgets';
import { FC, useState } from 'react';
import { useConfigContext } from '../../../../config/provider';
import { useConfigStore } from '../../../../config/store';
import { IWidget } from '../../../../widgets/widgets';
import { mapObject } from '../../../../tools/client/objects';
import { useColorTheme } from '../../../../tools/color';
import Widgets from '../../../../widgets';
import type { IDraggableListInputValue, IWidgetOptionValue } from '../../../../widgets/widgets';
import { IWidget } from '../../../../widgets/widgets';
import { DraggableList } from './DraggableList';
export type WidgetEditModalInnerProps = {
widgetId: string;
@@ -93,7 +95,17 @@ export const WidgetsEditModal = ({
</Alert>
);
}
return WidgetOptionTypeSwitch(option, index, t, key, value, handleChange);
return (
<WidgetOptionTypeSwitch
key={`${key}.${index}`}
option={option}
widgetId={innerProps.widgetId}
propName={key}
value={value}
handleChange={handleChange}
/>
);
})}
<Group position="right">
<Button onClick={() => context.closeModal(id)} variant="light">
@@ -108,20 +120,20 @@ export const WidgetsEditModal = ({
// Widget switch
// Widget options are computed based on their type.
// here you can define new types for options (along with editing the widgets.d.ts file)
function WidgetOptionTypeSwitch(
option: IWidgetOptionValue,
index: number,
t: any,
key: string,
value: string | number | boolean | string[],
handleChange: (key: string, value: IntegrationOptionsValueType) => void
) {
const { primaryColor, secondaryColor } = useColorTheme();
const WidgetOptionTypeSwitch: FC<{
option: IWidgetOptionValue;
widgetId: string;
propName: string;
value: any;
handleChange: (key: string, value: IntegrationOptionsValueType) => void;
}> = ({ option, widgetId, propName: key, value, handleChange }) => {
const { t } = useTranslation([`modules/${widgetId}`, 'common']);
const { primaryColor } = useColorTheme();
switch (option.type) {
case 'switch':
return (
<Switch
key={`${option.type}-${index}`}
label={t(`descriptor.settings.${key}.label`)}
checked={value as boolean}
onChange={(ev) => handleChange(key, ev.currentTarget.checked)}
@@ -131,7 +143,6 @@ function WidgetOptionTypeSwitch(
return (
<TextInput
color={primaryColor}
key={`${option.type}-${index}`}
label={t(`descriptor.settings.${key}.label`)}
value={value as string}
onChange={(ev) => handleChange(key, ev.currentTarget.value)}
@@ -141,7 +152,6 @@ function WidgetOptionTypeSwitch(
return (
<MultiSelect
color={primaryColor}
key={`${option.type}-${index}`}
data={option.data}
label={t(`descriptor.settings.${key}.label`)}
value={value as string[]}
@@ -153,7 +163,6 @@ function WidgetOptionTypeSwitch(
return (
<Select
color={primaryColor}
key={`${option.type}-${index}`}
defaultValue={option.defaultValue}
data={option.data}
label={t(`descriptor.settings.${key}.label`)}
@@ -165,10 +174,10 @@ function WidgetOptionTypeSwitch(
return (
<NumberInput
color={primaryColor}
key={`${option.type}-${index}`}
label={t(`descriptor.settings.${key}.label`)}
value={value as number}
onChange={(v) => handleChange(key, v!)}
{...option.inputProps}
/>
);
case 'slider':
@@ -176,7 +185,6 @@ function WidgetOptionTypeSwitch(
<Stack spacing="xs">
<Slider
color={primaryColor}
key={`${option.type}-${index}`}
label={value}
value={value as number}
min={option.min}
@@ -186,7 +194,56 @@ function WidgetOptionTypeSwitch(
/>
</Stack>
);
case 'draggable-list':
/* eslint-disable no-case-declarations */
const typedVal = value as IDraggableListInputValue['defaultValue'];
const extractSubValue = (liName: string, settingName: string) =>
typedVal.find((v) => v.key === liName)?.subValues?.[settingName];
const handleSubChange = (liName: string, settingName: string) => (_: any, newVal: any) =>
handleChange(
key,
typedVal.map((oldVal) =>
oldVal.key === liName
? {
...oldVal,
subValues: {
...oldVal.subValues,
[settingName]: newVal,
},
}
: oldVal
)
);
return (
<Stack spacing="xs">
<Text>{t(`descriptor.settings.${key}.label`)}</Text>
<DraggableList
value={typedVal}
onChange={(v) => handleChange(key, v)}
labels={mapObject(option.items, (liName) =>
t(`descriptor.settings.${key}.${liName}.label`)
)}
>
{mapObject(option.items, (liName, liSettings) =>
Object.entries(liSettings).map(([settingName, setting], i) => (
<WidgetOptionTypeSwitch
key={`${liName}.${settingName}.${i}`}
option={setting as IWidgetOptionValue}
widgetId={widgetId}
propName={`${key}.${liName}.${settingName}`}
value={extractSubValue(liName, settingName)}
handleChange={handleSubChange(liName, settingName)}
/>
))
)}
</DraggableList>
</Stack>
);
/* eslint-enable no-case-declarations */
default:
return null;
}
}
};

View File

@@ -83,6 +83,7 @@ export const WidgetsMenu = ({ integration, widget }: WidgetsMenuProps) => {
inner: {
position: 'sticky',
top: 30,
maxHeight: '100%',
},
},
});

View File

@@ -228,33 +228,37 @@ export const useCategoryActions = (configName: string | undefined, category: Cat
...previous.apps.filter((x) => !isAppAffectedFilter(x)),
...previous.apps
.filter((x) => isAppAffectedFilter(x))
.map((app): AppType => ({
...app,
area: {
...app.area,
type: 'wrapper',
properties: {
...app.area.properties,
id: mainWrapperId,
.map(
(app): AppType => ({
...app,
area: {
...app.area,
type: 'wrapper',
properties: {
...app.area.properties,
id: mainWrapperId,
},
},
},
})),
})
),
],
widgets: [
...previous.widgets.filter((widget) => !isWidgetAffectedFilter(widget)),
...previous.widgets
.filter((widget) => isWidgetAffectedFilter(widget))
.map((widget): IWidget<string, any> => ({
...widget,
area: {
...widget.area,
type: 'wrapper',
properties: {
...widget.area.properties,
id: mainWrapperId,
.map(
(widget): IWidget<string, any> => ({
...widget,
area: {
...widget.area,
type: 'wrapper',
properties: {
...widget.area.properties,
id: mainWrapperId,
},
},
},
})),
})
),
],
categories: previous.categories.filter((x) => x.id !== category.id),
wrappers: previous.wrappers.filter((x) => x.position !== currentItem.position),

View File

@@ -0,0 +1,5 @@
export const mapObject = <T, R>(
items: Record<string, T>,
mapper: (prop: string, item: T) => R
): Record<string, R> =>
Object.fromEntries(Object.entries(items).map(([name, item]) => [name, mapper(name, item)]));

View File

@@ -22,7 +22,7 @@ export function migrateConfig(config: Config): BackendConfigType {
name: config.name ?? 'default',
},
categories: [],
widgets: migrateModules(config).filter(widget => widget !== null),
widgets: migrateModules(config).filter((widget) => widget !== null),
apps: [],
settings: {
common: {
@@ -231,7 +231,7 @@ const migrateModules = (config: Config): IWidget<string, any>[] => {
},
},
shape: {},
} as IDashDotTile;
} as unknown as IDashDotTile;
}
case 'date':
return {

View File

@@ -24,7 +24,7 @@ export const DashDotCompactNetwork = ({ info }: DashDotCompactNetworkProps) => {
const downSpeed = bytes.toPerSecondString(info?.network?.speedDown);
return (
<Group noWrap align="start" position="apart" w="100%" maw="251px">
<Group noWrap align="start" position="apart" w="100%">
<Text weight={500}>{t('card.graphs.network.label')}</Text>
<Stack align="end" spacing={0}>
<Group spacing={0}>

View File

@@ -25,7 +25,7 @@ export const DashDotCompactStorage = ({ info }: DashDotCompactStorageProps) => {
});
return (
<Group noWrap align="start" position="apart" w="100%" maw="251px">
<Group noWrap align="start" position="apart" w="100%">
<Text weight={500}>{t('card.graphs.storage.label')}</Text>
<Stack align="end" spacing={0}>
<Text color="dimmed" size="xs">

View File

@@ -1,63 +1,79 @@
import { createStyles, Stack, Title, useMantineTheme } from '@mantine/core';
import { DashDotGraph as GraphType } from './types';
import { createStyles, Title, useMantineTheme } from '@mantine/core';
import { useTranslation } from 'next-i18next';
import { DashDotCompactNetwork, DashDotInfo } from './DashDotCompactNetwork';
import { DashDotCompactStorage } from './DashDotCompactStorage';
interface DashDotGraphProps {
graph: GraphType;
graph: string;
graphHeight: number;
isCompact: boolean;
multiView: boolean;
dashDotUrl: string;
usePercentages: boolean;
info: DashDotInfo;
}
export const DashDotGraph = ({
graph,
graphHeight,
isCompact,
multiView,
dashDotUrl,
usePercentages,
info,
}: DashDotGraphProps) => {
const { t } = useTranslation('modules/dashdot');
const { classes } = useStyles();
if (graph === 'storage' && isCompact) {
return <DashDotCompactStorage info={info} />;
}
if (graph === 'network' && isCompact) {
return <DashDotCompactNetwork info={info} />;
}
const title = t(`card.graphs.${graph}.title`);
return (
<Stack
className={classes.graphStack}
w="100%"
maw="251px"
style={{
width: isCompact ? (graph.twoSpan ? '100%' : 'calc(50% - 10px)') : undefined,
}}
>
<div className={classes.graphContainer}>
<Title className={classes.graphTitle} order={4}>
{graph.name}
{title}
</Title>
<iframe
className={classes.iframe}
key={graph.name}
title={graph.name}
src={useIframeSrc(dashDotUrl, graph, isCompact, usePercentages)}
key={graph}
title={title}
src={useIframeSrc(dashDotUrl, graph, multiView, usePercentages)}
style={{
height: `${graphHeight}px`,
}}
/>
</Stack>
</div>
);
};
const useIframeSrc = (
dashDotUrl: string,
graph: GraphType,
isCompact: boolean,
graph: string,
multiView: boolean,
usePercentages: boolean
) => {
const { colorScheme, colors, radius } = useMantineTheme();
const surface = (colorScheme === 'dark' ? colors.dark[7] : colors.gray[0]).substring(1); // removes # from hex value
const graphId = graph.id === 'memory' ? 'ram' : graph.id;
return (
`${dashDotUrl}` +
'?singleGraphMode=true' +
`&graph=${graphId}` +
'?singleGraphMode=true' + // obsolete in newer versions
`&graph=${graph}` +
`&theme=${colorScheme}` +
`&surface=${surface}` +
`&gap=${isCompact ? 10 : 5}` +
'&gap=5' +
`&innerRadius=${radius.lg}` +
`&multiView=${graph.isMultiView}` +
`&showPercentage=${usePercentages ? 'true' : 'false'}`
`&multiView=${multiView}` +
`&showPercentage=${usePercentages.toString()}` +
'&textOffset=16' +
'&textSize=12'
);
};
@@ -65,7 +81,7 @@ export const useStyles = createStyles((theme, _params, getRef) => ({
iframe: {
flex: '1 0 auto',
maxWidth: '100%',
height: '140px',
width: '100%',
borderRadius: theme.radius.lg,
border: 'none',
colorScheme: 'light', // fixes white borders around iframe
@@ -74,13 +90,14 @@ export const useStyles = createStyles((theme, _params, getRef) => ({
ref: getRef('graphTitle'),
position: 'absolute',
right: 0,
bottom: 0,
opacity: 0,
transition: 'opacity .1s ease-in-out',
pointerEvents: 'none',
marginTop: 10,
marginRight: 25,
marginBottom: 12,
marginRight: 12,
},
graphStack: {
graphContainer: {
position: 'relative',
[`&:hover .${getRef('graphTitle')}`]: {
opacity: 0.5,

View File

@@ -1,4 +1,4 @@
import { Center, createStyles, Group, Stack, Text, Title } from '@mantine/core';
import { Center, createStyles, Grid, Stack, Text, Title } from '@mantine/core';
import { IconUnlink } from '@tabler/icons';
import { useQuery } from '@tanstack/react-query';
import axios from 'axios';
@@ -6,45 +6,131 @@ import { useTranslation } from 'next-i18next';
import { useConfigContext } from '../../config/provider';
import { defineWidget } from '../helper';
import { IWidget } from '../widgets';
import { DashDotCompactNetwork, DashDotInfo } from './DashDotCompactNetwork';
import { DashDotCompactStorage } from './DashDotCompactStorage';
import { DashDotInfo } from './DashDotCompactNetwork';
import { DashDotGraph } from './DashDotGraph';
const definition = defineWidget({
id: 'dashdot',
icon: 'https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/dashdot.png',
options: {
cpuMultiView: {
type: 'switch',
defaultValue: false,
},
storageMultiView: {
type: 'switch',
defaultValue: false,
},
useCompactView: {
type: 'switch',
defaultValue: true,
url: {
type: 'text',
defaultValue: '',
},
usePercentages: {
type: 'switch',
defaultValue: false,
},
graphs: {
type: 'multi-select',
defaultValue: ['cpu', 'memory'],
data: [
// ['cpu', 'memory', 'storage', 'network', 'gpu'], into { label, value }
{ label: 'CPU', value: 'cpu' },
{ label: 'Memory', value: 'memory' },
{ label: 'Storage', value: 'storage' },
{ label: 'Network', value: 'network' },
{ label: 'GPU', value: 'gpu' },
],
columns: {
type: 'number',
defaultValue: 2,
},
url: {
type: 'text',
defaultValue: '',
graphHeight: {
type: 'number',
defaultValue: 115,
inputProps: {
step: 5,
stepHoldDelay: 500,
stepHoldInterval: 100,
},
},
graphsOrder: {
type: 'draggable-list',
defaultValue: [
{
key: 'storage',
subValues: {
enabled: true,
compactView: true,
span: 2,
multiView: false,
},
},
{
key: 'network',
subValues: {
enabled: true,
compactView: true,
span: 2,
},
},
{
key: 'cpu',
subValues: {
enabled: true,
multiView: false,
span: 1,
},
},
{
key: 'ram',
subValues: {
enabled: true,
span: 1,
},
},
{
key: 'gpu',
subValues: {
enabled: false,
span: 1,
},
},
],
items: {
cpu: {
enabled: {
type: 'switch',
},
span: {
type: 'number',
},
multiView: {
type: 'switch',
},
},
storage: {
enabled: {
type: 'switch',
},
span: {
type: 'number',
},
compactView: {
type: 'switch',
},
multiView: {
type: 'switch',
},
},
ram: {
enabled: {
type: 'switch',
},
span: {
type: 'number',
},
},
network: {
enabled: {
type: 'switch',
},
span: {
type: 'number',
},
compactView: {
type: 'switch',
},
},
gpu: {
enabled: {
type: 'switch',
},
span: {
type: 'number',
},
},
},
},
},
gridstack: {
@@ -83,60 +169,41 @@ function DashDotTile({ widget }: DashDotTileProps) {
<IconUnlink size={40} strokeWidth={1.2} />
<Title order={5}>{t('card.errors.protocolDowngrade.title')}</Title>
<Text align="center" size="sm">
{t('card.errors.protocolDowngrade.text')}
{t('card.errors.protocolDowngrade.text')}
</Text>
</Stack>
</Center>
);
}
const graphs = widget?.properties.graphs.map((graph) => ({
id: graph,
name: t(`card.graphs.${graph}.title`),
twoSpan: ['network', 'gpu'].includes(graph),
isMultiView:
(graph === 'cpu' && widget.properties.cpuMultiView) ||
(graph === 'storage' && widget.properties.storageMultiView),
}));
const isCompact = widget?.properties.useCompactView ?? false;
const isCompactStorageVisible = graphs?.some((g) => g.id === 'storage' && isCompact);
const isCompactNetworkVisible = graphs?.some((g) => g.id === 'network' && isCompact);
const usePercentages = widget?.properties.usePercentages ?? false;
const displayedGraphs = graphs?.filter(
(g) => !isCompact || !['network', 'storage'].includes(g.id)
);
const { graphsOrder, usePercentages, columns, graphHeight } = widget.properties;
return (
<>
<Title order={3} mb="xs">
{t('card.title')}
</Title>
<Stack spacing="xs">
<Title order={3}>{t('card.title')}</Title>
{!info && <p>{t('card.errors.noInformation')}</p>}
{info && (
<div className={classes.graphsContainer}>
<Group position="apart" w="100%">
{isCompactStorageVisible && <DashDotCompactStorage info={info} />}
{isCompactNetworkVisible && <DashDotCompactNetwork info={info} />}
</Group>
<Group position="center" w="100%" className={classes.graphsWrapper}>
{displayedGraphs?.map((graph) => (
<DashDotGraph
key={graph.id}
graph={graph}
dashDotUrl={dashDotUrl}
isCompact={isCompact}
usePercentages={usePercentages}
/>
))}
</Group>
<Grid grow gutter="sm" w="100%" columns={columns}>
{graphsOrder
.filter((g) => g.subValues.enabled)
.map((g) => (
<Grid.Col span={Math.min(columns, g.subValues.span)}>
<DashDotGraph
dashDotUrl={dashDotUrl}
info={info}
graph={g.key as any}
graphHeight={graphHeight}
isCompact={g.subValues.compactView ?? false}
multiView={g.subValues.multiView ?? false}
usePercentages={usePercentages}
/>
</Grid.Col>
))}
</Grid>
</div>
)}
</>
</Stack>
);
}
@@ -163,19 +230,9 @@ const fetchDashDotInfo = async (configName: string | undefined) => {
).data) as DashDotInfo;
};
export const useDashDotTileStyles = createStyles(() => ({
export const useDashDotTileStyles = createStyles((theme) => ({
graphsContainer: {
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
rowGap: 10,
columnGap: 10,
},
graphsWrapper: {
'& > *:nth-child(odd):last-child': {
width: '100% !important',
maxWidth: '100% !important',
},
marginRight: theme.spacing.sm * -1, // fix because margin collapses weirdly
},
}));

View File

@@ -1,9 +1,17 @@
import {
MultiSelectProps,
NumberInputProps,
SelectProps,
SliderProps,
SwitchProps,
TextInputProps,
} from '@mantine/core';
import { TablerIcon } from '@tabler/icons';
import React from 'react';
import { AreaType } from '../types/area';
import { ShapeType } from '../types/shape';
// Type of widgets which are safed to config
// Type of widgets which are saved to config
export type IWidget<TKey extends string, TDefinition extends IWidgetDefinition> = {
id: TKey;
properties: {
@@ -18,15 +26,7 @@ export type IWidget<TKey extends string, TDefinition extends IWidgetDefinition>
// Makes the type less specific
// For example when the type true is used as input the result is boolean
// By not using this type the definition would always be { property: true }
type MakeLessSpecific<TInput extends IWidgetOptionValue['defaultValue']> = TInput extends boolean
? boolean
: TInput extends number
? number
: TInput extends string[]
? string[]
: TInput extends string
? string
: never;
type MakeLessSpecific<T> = T extends boolean ? boolean : T;
// Types of options that can be specified for the widget edit modal
export type IWidgetOptionValue =
@@ -35,7 +35,8 @@ export type IWidgetOptionValue =
| ITextInputOptionValue
| ISliderInputOptionValue
| ISelectOptionValue
| INumberInputOptionValue;
| INumberInputOptionValue
| IDraggableListInputValue;
// Interface for data type
interface DataType {
@@ -48,31 +49,36 @@ export type IMultiSelectOptionValue = {
type: 'multi-select';
defaultValue: string[];
data: DataType[];
inputProps?: Partial<MultiSelectProps>;
};
// will show a multi-select with specified data
// will show a select with specified data
export type ISelectOptionValue = {
type: 'select';
defaultValue: string;
data: DataType[];
inputProps?: Partial<SelectProps>;
};
// will show a switch
export type ISwitchOptionValue = {
type: 'switch';
defaultValue: boolean;
inputProps?: Partial<SwitchProps>;
};
// will show a text-input
export type ITextInputOptionValue = {
type: 'text';
defaultValue: string;
inputProps?: Partial<TextInputProps>;
};
// will show a number-input
export type INumberInputOptionValue = {
type: 'number';
defaultValue: number;
inputProps?: Partial<NumberInputProps>;
};
// will show a slider-input
@@ -82,6 +88,20 @@ export type ISliderInputOptionValue = {
min: number;
max: number;
step: number;
inputProps?: Partial<SliderProps>;
};
// will show a sortable list that can have sub settings
export type IDraggableListInputValue = {
type: 'draggable-list';
defaultValue: {
key: string;
subValues?: Record<string, any>;
}[];
items: Record<
string,
Record<string, Omit<Exclude<IWidgetOptionValue, IDraggableListInputValue>, 'defaultValue'>>
>;
};
// is used to type the widget definitions which will be used to display all widgets

215
yarn.lock
View File

@@ -131,7 +131,7 @@ __metadata:
languageName: node
linkType: hard
"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.19.0, @babel/helper-plugin-utils@npm:^7.8.0":
"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.19.0, @babel/helper-plugin-utils@npm:^7.8.0":
version: 7.20.2
resolution: "@babel/helper-plugin-utils@npm:7.20.2"
checksum: f6cae53b7fdb1bf3abd50fa61b10b4470985b400cc794d92635da1e7077bb19729f626adc0741b69403d9b6e411cddddb9c0157a709cc7c4eeb41e663be5d74b
@@ -263,17 +263,6 @@ __metadata:
languageName: node
linkType: hard
"@babel/plugin-syntax-jsx@npm:^7.17.12":
version: 7.18.6
resolution: "@babel/plugin-syntax-jsx@npm:7.18.6"
dependencies:
"@babel/helper-plugin-utils": ^7.18.6
peerDependencies:
"@babel/core": ^7.0.0-0
checksum: 6d37ea972970195f1ffe1a54745ce2ae456e0ac6145fae9aa1480f297248b262ea6ebb93010eddb86ebfacb94f57c05a1fc5d232b9a67325b09060299d515c67
languageName: node
linkType: hard
"@babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3":
version: 7.10.4
resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4"
@@ -507,12 +496,11 @@ __metadata:
languageName: node
linkType: hard
"@emotion/babel-plugin@npm:^11.10.5":
version: 11.10.5
resolution: "@emotion/babel-plugin@npm:11.10.5"
"@emotion/babel-plugin@npm:^11.10.6":
version: 11.10.6
resolution: "@emotion/babel-plugin@npm:11.10.6"
dependencies:
"@babel/helper-module-imports": ^7.16.7
"@babel/plugin-syntax-jsx": ^7.17.12
"@babel/runtime": ^7.18.3
"@emotion/hash": ^0.9.0
"@emotion/memoize": ^0.8.0
@@ -523,9 +511,7 @@ __metadata:
find-root: ^1.1.0
source-map: ^0.5.7
stylis: 4.1.3
peerDependencies:
"@babel/core": ^7.0.0
checksum: e3353499c76c4422d6e900c0dfab73607056d9da86161a3f27c3459c193c4908050c5d252c68fcde231e13f02a9d8e0dc07d260317ae0e5206841e331cc4caae
checksum: 3eed138932e8edf2598352e69ad949b9db3051a4d6fcff190dacbac9aa838d7ef708b9f3e6c48660625d9311dae82d73477ae4e7a31139feef5eb001a5528421
languageName: node
linkType: hard
@@ -573,11 +559,11 @@ __metadata:
linkType: hard
"@emotion/react@npm:^11.10.5":
version: 11.10.5
resolution: "@emotion/react@npm:11.10.5"
version: 11.10.6
resolution: "@emotion/react@npm:11.10.6"
dependencies:
"@babel/runtime": ^7.18.3
"@emotion/babel-plugin": ^11.10.5
"@emotion/babel-plugin": ^11.10.6
"@emotion/cache": ^11.10.5
"@emotion/serialize": ^1.1.1
"@emotion/use-insertion-effect-with-fallbacks": ^1.0.0
@@ -585,14 +571,11 @@ __metadata:
"@emotion/weak-memoize": ^0.3.0
hoist-non-react-statics: ^3.3.1
peerDependencies:
"@babel/core": ^7.0.0
react: ">=16.8.0"
peerDependenciesMeta:
"@babel/core":
optional: true
"@types/react":
optional: true
checksum: 32b67b28e9b6d6c53b970072680697f04c2521441050bdeb19a1a7f0164af549b4dad39ff375eda1b6a3cf1cc86ba2c6fa55460ec040e6ebbca3e9ec58353cf7
checksum: 4762042e39126ffaffe76052dc65c9bb0ba6b8893013687ba3cc13ed4dd834c31597f1230684c3c078e90aecc13ab6cd0e3cde0dec8b7761affd2571f4d80019
languageName: node
linkType: hard
@@ -1215,7 +1198,7 @@ __metadata:
languageName: node
linkType: hard
"@motionone/animation@npm:^10.12.0":
"@motionone/animation@npm:^10.15.1":
version: 10.15.1
resolution: "@motionone/animation@npm:10.15.1"
dependencies:
@@ -1227,17 +1210,17 @@ __metadata:
languageName: node
linkType: hard
"@motionone/dom@npm:10.12.0":
version: 10.12.0
resolution: "@motionone/dom@npm:10.12.0"
"@motionone/dom@npm:^10.15.3":
version: 10.15.5
resolution: "@motionone/dom@npm:10.15.5"
dependencies:
"@motionone/animation": ^10.12.0
"@motionone/generators": ^10.12.0
"@motionone/types": ^10.12.0
"@motionone/utils": ^10.12.0
"@motionone/animation": ^10.15.1
"@motionone/generators": ^10.15.1
"@motionone/types": ^10.15.1
"@motionone/utils": ^10.15.1
hey-listen: ^1.0.8
tslib: ^2.3.1
checksum: 123356f28e44362c4f081aae3df22e576f46bfcb07e01257b2ac64a115668448f29b8de67e4b6e692c5407cffb78ffe7cf9fa1bc064007482bab5dd23a69d380
checksum: 2453fe3df6a2b4b339d075bcd598bda1eee1926ba0ad881edfd154362b0992c91f31c08d83c469c7e8cb8bf8ebc0ed5530972673cf5c74d99e46e3772cf5f1cb
languageName: node
linkType: hard
@@ -1251,7 +1234,7 @@ __metadata:
languageName: node
linkType: hard
"@motionone/generators@npm:^10.12.0":
"@motionone/generators@npm:^10.15.1":
version: 10.15.1
resolution: "@motionone/generators@npm:10.15.1"
dependencies:
@@ -1262,14 +1245,14 @@ __metadata:
languageName: node
linkType: hard
"@motionone/types@npm:^10.12.0, @motionone/types@npm:^10.15.1":
"@motionone/types@npm:^10.15.1":
version: 10.15.1
resolution: "@motionone/types@npm:10.15.1"
checksum: 98091f7dca257508d94d1080678c433da39a814e8e58aaa742212bf6c2a5b5e2120a6251a06e3ea522219ce6d1b6eb6aa2cab224b803fe52789033d8398ef0aa
languageName: node
linkType: hard
"@motionone/utils@npm:^10.12.0, @motionone/utils@npm:^10.15.1":
"@motionone/utils@npm:^10.15.1":
version: 10.15.1
resolution: "@motionone/utils@npm:10.15.1"
dependencies:
@@ -2090,9 +2073,9 @@ __metadata:
linkType: hard
"@types/node@npm:*, @types/node@npm:^18.11.18":
version: 18.13.0
resolution: "@types/node@npm:18.13.0"
checksum: 4ea10f8802848b01672bce938f678b6774ca2cee0c9774f12275ab064ae07818419c3e2e41d6257ce7ba846d1ea26c63214aa1dfa4166fa3746291752b8c6416
version: 18.14.0
resolution: "@types/node@npm:18.14.0"
checksum: d83fcf5e4ed544755dd9028f5cbb6b9d46235043159111bb2ad62223729aee581c0144a9f6df8ba73d74011db9ed4ebd7af2fd5e0996714e3beb508a5da8ac5c
languageName: node
linkType: hard
@@ -3015,9 +2998,9 @@ __metadata:
linkType: hard
"caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001449":
version: 1.0.30001452
resolution: "caniuse-lite@npm:1.0.30001452"
checksum: de02aad7b71112409f30de53e8080bef0fe612ed95bba8b14fb830f59683e8caabc27bdd520563686965be77f2cb56e239e44b920144630b91d7fe9911ba8ad5
version: 1.0.30001456
resolution: "caniuse-lite@npm:1.0.30001456"
checksum: c2cc479962149abd09a25b64699ee7484d9c433db2bad0a489f7b51b09a463c991f6efd7b8e201bc1a1ccf3294263f88503a3adf0a57db9046939ee7e58b76a6
languageName: node
linkType: hard
@@ -3730,9 +3713,9 @@ __metadata:
linkType: hard
"electron-to-chromium@npm:^1.4.284":
version: 1.4.297
resolution: "electron-to-chromium@npm:1.4.297"
checksum: d5b83384c378cb22e023abd9ad566abfd573ea7a24109b992f034752bcf77602b67b5a20064a8810ee6bd4db17547d80fa7e30c3602f57a503950e8063491eb2
version: 1.4.302
resolution: "electron-to-chromium@npm:1.4.302"
checksum: aa764494f9a5b6916ba9f311c0204b2c73449addba18cc55d43e84e8c4465732af9cd6560a8efeb32f3c5a928299030e41352e5b3a081e9e56b086d5be618f45
languageName: node
linkType: hard
@@ -4266,11 +4249,11 @@ __metadata:
linkType: hard
"esquery@npm:^1.4.0":
version: 1.4.0
resolution: "esquery@npm:1.4.0"
version: 1.4.2
resolution: "esquery@npm:1.4.2"
dependencies:
estraverse: ^5.1.0
checksum: a0807e17abd7fbe5fbd4fab673038d6d8a50675cdae6b04fbaa520c34581be0c5fa24582990e8acd8854f671dd291c78bb2efb9e0ed5b62f33bac4f9cf820210
checksum: 2f4ad89c5aafaca61cc2c15e256190f0d6deb4791cae6552d3cb4b1eb8867958cdf27a56aaa3272ff17435e3eaa19ee0d4129fac336ca6373d7354d7b5da7966
languageName: node
linkType: hard
@@ -4528,33 +4511,21 @@ __metadata:
languageName: node
linkType: hard
"framer-motion@npm:^6.5.1":
version: 6.5.1
resolution: "framer-motion@npm:6.5.1"
"framer-motion@npm:^9.0.2":
version: 9.0.4
resolution: "framer-motion@npm:9.0.4"
dependencies:
"@emotion/is-prop-valid": ^0.8.2
"@motionone/dom": 10.12.0
framesync: 6.0.1
"@motionone/dom": ^10.15.3
hey-listen: ^1.0.8
popmotion: 11.0.3
style-value-types: 5.0.0
tslib: ^2.1.0
tslib: ^2.4.0
peerDependencies:
react: ">=16.8 || ^17.0.0 || ^18.0.0"
react-dom: ">=16.8 || ^17.0.0 || ^18.0.0"
react: ^18.0.0
react-dom: ^18.0.0
dependenciesMeta:
"@emotion/is-prop-valid":
optional: true
checksum: 737959063137b4ccafe01e0ac0c9e5a9531bf3f729f62c34ca7a5d7955e6664f70affd22b044f7db51df41acb21d120a4f71a860e17a80c4db766ad66f2153a1
languageName: node
linkType: hard
"framesync@npm:6.0.1":
version: 6.0.1
resolution: "framesync@npm:6.0.1"
dependencies:
tslib: ^2.1.0
checksum: a23ebe8f7e20a32c0b99c2f8175b6f07af3ec6316aad52a2316316a6d011d717af8d2175dcc2827031c59fabb30232ed3e19a720a373caba7f070e1eae436325
checksum: 9ef23d81c78785dd2f7f278bad133d96c22fd3a9dcc310521ea220873b0a923ca927dc2d3e8000e221edfcc5bfd6272f752435472e3a8f9b1ef476202ede1ce2
languageName: node
linkType: hard
@@ -5014,7 +4985,7 @@ __metadata:
eslint-plugin-testing-library: ^5.5.1
eslint-plugin-unused-imports: ^2.0.0
fily-publish-gridstack: ^0.0.13
framer-motion: ^6.5.1
framer-motion: ^9.0.2
html-entities: ^2.3.3
i18next: ^21.9.1
jest: ^28.1.3
@@ -6358,9 +6329,9 @@ __metadata:
linkType: hard
"lru-cache@npm:^7.7.1":
version: 7.14.1
resolution: "lru-cache@npm:7.14.1"
checksum: d72c6713c6a6d86836a7a6523b3f1ac6764768cca47ec99341c3e76db06aacd4764620e5e2cda719a36848785a52a70e531822dc2b33fb071fa709683746c104
version: 7.16.1
resolution: "lru-cache@npm:7.16.1"
checksum: 64618e3ed4fd1203afedd9bbf5247921b1419f8e3100f20e58e5f04e741f8287bd7d04fefaad332411bb53b3a73445714b235de750cf5d310cba1fa23bd82795
languageName: node
linkType: hard
@@ -7203,18 +7174,6 @@ __metadata:
languageName: node
linkType: hard
"popmotion@npm:11.0.3":
version: 11.0.3
resolution: "popmotion@npm:11.0.3"
dependencies:
framesync: 6.0.1
hey-listen: ^1.0.8
style-value-types: 5.0.0
tslib: ^2.1.0
checksum: 9fe7d03b4ec0e85bfb9dadc23b745147bfe42e16f466ba06e6327197d0e38b72015afc2f918a8051dedc3680310417f346ffdc463be6518e2e92e98f48e30268
languageName: node
linkType: hard
"postcss@npm:8.4.14":
version: 8.4.14
resolution: "postcss@npm:8.4.14"
@@ -7788,15 +7747,15 @@ __metadata:
linkType: hard
"sass@npm:^1.56.1":
version: 1.58.1
resolution: "sass@npm:1.58.1"
version: 1.58.2
resolution: "sass@npm:1.58.2"
dependencies:
chokidar: ">=3.0.0 <4.0.0"
immutable: ^4.0.0
source-map-js: ">=0.6.2 <2.0.0"
bin:
sass: sass.js
checksum: ff079887d906b5c0dde99084d14ac36336d238c0c07935ff6381bad68f05de212c1ff12657ac1e8a0533523cd7a393126facdc2508d758e7d5700344a0e6ea51
checksum: e0febe4d274af7b9490b9207ff7f05762d60df6b2ad307f7a823432cb4e1604eced6784ae635a6b80e4a6177c047f5a9623c53a15aaec3b9bf981ea86e8937a9
languageName: node
linkType: hard
@@ -8158,16 +8117,6 @@ __metadata:
languageName: node
linkType: hard
"style-value-types@npm:5.0.0":
version: 5.0.0
resolution: "style-value-types@npm:5.0.0"
dependencies:
hey-listen: ^1.0.8
tslib: ^2.1.0
checksum: 16d198302cd102edf9dba94e7752a2364c93b1eaa5cc7c32b42b28eef4af4ccb5149a3f16bc2a256adc02616a2404f4612bd15f3081c1e8ca06132cae78be6c0
languageName: node
linkType: hard
"styled-jsx@npm:5.1.1":
version: 5.1.1
resolution: "styled-jsx@npm:5.1.1"
@@ -8245,9 +8194,9 @@ __metadata:
linkType: hard
"tabbable@npm:^6.0.1":
version: 6.1.0
resolution: "tabbable@npm:6.1.0"
checksum: 4ca476f10b031f213187078fcbe4b04884b6cf6f3a5f31175ce79ac03fc47ad11b74a8137922e78ac6bb007b50386140e2f9911182885ebc79d0cb7996697985
version: 6.1.1
resolution: "tabbable@npm:6.1.1"
checksum: 348639497262241ce8e0ccb0664ea582a386183107299ee8f27cf7b56bc84f36e09eaf667d3cb4201e789634012a91f7129bcbd49760abe874fbace35b4cf429
languageName: node
linkType: hard
@@ -8396,7 +8345,7 @@ __metadata:
languageName: node
linkType: hard
"tslib@npm:^2.0.0, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0":
"tslib@npm:^2.0.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0":
version: 2.5.0
resolution: "tslib@npm:2.5.0"
checksum: ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1
@@ -8414,58 +8363,58 @@ __metadata:
languageName: node
linkType: hard
"turbo-darwin-64@npm:1.7.4":
version: 1.7.4
resolution: "turbo-darwin-64@npm:1.7.4"
"turbo-darwin-64@npm:1.8.0":
version: 1.8.0
resolution: "turbo-darwin-64@npm:1.8.0"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"turbo-darwin-arm64@npm:1.7.4":
version: 1.7.4
resolution: "turbo-darwin-arm64@npm:1.7.4"
"turbo-darwin-arm64@npm:1.8.0":
version: 1.8.0
resolution: "turbo-darwin-arm64@npm:1.8.0"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"turbo-linux-64@npm:1.7.4":
version: 1.7.4
resolution: "turbo-linux-64@npm:1.7.4"
"turbo-linux-64@npm:1.8.0":
version: 1.8.0
resolution: "turbo-linux-64@npm:1.8.0"
conditions: os=linux & cpu=x64
languageName: node
linkType: hard
"turbo-linux-arm64@npm:1.7.4":
version: 1.7.4
resolution: "turbo-linux-arm64@npm:1.7.4"
"turbo-linux-arm64@npm:1.8.0":
version: 1.8.0
resolution: "turbo-linux-arm64@npm:1.8.0"
conditions: os=linux & cpu=arm64
languageName: node
linkType: hard
"turbo-windows-64@npm:1.7.4":
version: 1.7.4
resolution: "turbo-windows-64@npm:1.7.4"
"turbo-windows-64@npm:1.8.0":
version: 1.8.0
resolution: "turbo-windows-64@npm:1.8.0"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"turbo-windows-arm64@npm:1.7.4":
version: 1.7.4
resolution: "turbo-windows-arm64@npm:1.7.4"
"turbo-windows-arm64@npm:1.8.0":
version: 1.8.0
resolution: "turbo-windows-arm64@npm:1.8.0"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"turbo@npm:^1.7.4":
version: 1.7.4
resolution: "turbo@npm:1.7.4"
version: 1.8.0
resolution: "turbo@npm:1.8.0"
dependencies:
turbo-darwin-64: 1.7.4
turbo-darwin-arm64: 1.7.4
turbo-linux-64: 1.7.4
turbo-linux-arm64: 1.7.4
turbo-windows-64: 1.7.4
turbo-windows-arm64: 1.7.4
turbo-darwin-64: 1.8.0
turbo-darwin-arm64: 1.8.0
turbo-linux-64: 1.8.0
turbo-linux-arm64: 1.8.0
turbo-windows-64: 1.8.0
turbo-windows-arm64: 1.8.0
dependenciesMeta:
turbo-darwin-64:
optional: true
@@ -8481,7 +8430,7 @@ __metadata:
optional: true
bin:
turbo: bin/turbo
checksum: c4387cfee36c57dd1490e9b2452888d8450faa390aec5bc148389b426bc079d03044891d61ad84a6a3a7454e66dfbe9e9cfba05f636b36fef7ece7af275ef9ce
checksum: 7f97068d7f9a155e088d3575b1f9922e68fa3015aae0c92625238d44b4e6c275bec2a281907702dedb402fca29a6cd4690499e916cb334d7c24c98099bc3d8b0
languageName: node
linkType: hard
@@ -8981,8 +8930,8 @@ __metadata:
linkType: hard
"yargs@npm:^17.3.1":
version: 17.6.2
resolution: "yargs@npm:17.6.2"
version: 17.7.0
resolution: "yargs@npm:17.7.0"
dependencies:
cliui: ^8.0.1
escalade: ^3.1.1
@@ -8991,7 +8940,7 @@ __metadata:
string-width: ^4.2.3
y18n: ^5.0.5
yargs-parser: ^21.1.1
checksum: 47da1b0d854fa16d45a3ded57b716b013b2179022352a5f7467409da5a04a1eef5b3b3d97a2dfc13e8bbe5f2ffc0afe3bc6a4a72f8254e60f5a4bd7947138643
checksum: e7d5f5b60e63b04ded7c27c3d4b194565565cac3ea19fffcdbb183bed973a83106822a04dda28ebba4811ce92949a9d9858d3935186ff8f343548bf98aab2120
languageName: node
linkType: hard