andoncloud-workplaces-status-widget 1.1.8 → 1.2.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.
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { SettingsFormContentProps } from 'andoncloud-widget-base';
3
- import { WidgetData, WidgetSettings } from '@/types';
4
- declare const SettingsFormContent: React.FC<SettingsFormContentProps<WidgetData, WidgetSettings>>;
5
- export default SettingsFormContent;
1
+ import React from 'react';
2
+ import { SettingsFormContentProps } from 'andoncloud-widget-base';
3
+ import { WidgetData, WidgetSettings } from '@/types';
4
+ declare const SettingsFormContent: React.FC<SettingsFormContentProps<WidgetData, WidgetSettings>>;
5
+ export default SettingsFormContent;
@@ -1,13 +1,14 @@
1
- import 'moment-duration-format';
2
- import React from 'react';
3
- import { CardProps } from '@mui/material';
4
- import { MetricValue } from 'andoncloud-dashboard-toolkit';
5
- interface MetricCardProps extends CardProps {
6
- title: string;
7
- metricLabel: React.ReactNode;
8
- metricValue?: MetricValue;
9
- progressValue?: MetricValue;
10
- rounded?: boolean;
11
- }
12
- declare const MetricCard: React.FC<MetricCardProps>;
13
- export default MetricCard;
1
+ import 'moment-duration-format';
2
+ import React from 'react';
3
+ import { CardProps } from '@mui/material';
4
+ import { MetricValue } from 'andoncloud-dashboard-toolkit';
5
+ interface MetricCardProps extends CardProps {
6
+ title: string;
7
+ metricLabel: React.ReactNode;
8
+ metricValue?: MetricValue;
9
+ progressValue?: MetricValue;
10
+ extraValue?: React.ReactNode;
11
+ rounded?: boolean;
12
+ }
13
+ declare const MetricCard: React.FC<MetricCardProps>;
14
+ export default MetricCard;
@@ -1,12 +1,12 @@
1
- import { SxProps, Theme } from '@mui/system';
2
- interface StylesProps {
3
- card: {
4
- rounded?: boolean;
5
- };
6
- cardOverlay: {
7
- background: string;
8
- };
9
- showBgPattern: boolean;
10
- }
11
- declare const makeStyles: (props: StylesProps) => Record<string, SxProps<Theme>>;
12
- export default makeStyles;
1
+ import { SxProps, Theme } from '@mui/system';
2
+ interface StylesProps {
3
+ card: {
4
+ rounded?: boolean;
5
+ };
6
+ cardOverlay: {
7
+ background: string;
8
+ };
9
+ showBgPattern: boolean;
10
+ }
11
+ declare const makeStyles: (props: StylesProps) => Record<string, SxProps<Theme>>;
12
+ export default makeStyles;
@@ -1,2 +1,2 @@
1
- import { StatusChange } from 'andoncloud-dashboard-toolkit';
2
- export declare const getDuration: (statusChange: StatusChange) => number;
1
+ import { ListStatusChangesQuery } from 'andoncloud-dashboard-toolkit';
2
+ export declare const getDuration: (statusChange: ListStatusChangesQuery["statusChanges"][0]) => number;
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { WorkplaceStatusProps } from '@/types';
3
- declare const StatusCard: React.FC<WorkplaceStatusProps>;
4
- export default StatusCard;
1
+ import React from 'react';
2
+ import { WorkplaceStatusProps } from '@/types';
3
+ declare const StatusCard: React.FC<WorkplaceStatusProps>;
4
+ export default StatusCard;
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- interface TabPanelProps {
3
- children: React.ReactNode;
4
- value: number;
5
- index: number;
6
- }
7
- declare const TabPanel: React.FC<TabPanelProps>;
8
- export default TabPanel;
1
+ import React from 'react';
2
+ interface TabPanelProps {
3
+ children: React.ReactNode;
4
+ value: number;
5
+ index: number;
6
+ }
7
+ declare const TabPanel: React.FC<TabPanelProps>;
8
+ export default TabPanel;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { WidgetProps } from 'andoncloud-dashboard-toolkit';
3
- import { WidgetData, WidgetSettings } from '@/types';
4
- declare const Widget: React.FC<WidgetProps<WidgetData, WidgetSettings>>;
5
- export default Widget;
1
+ import React from 'react';
2
+ import { WidgetProps } from 'andoncloud-dashboard-toolkit';
3
+ import { WidgetData, WidgetSettings } from '@/types';
4
+ declare const Widget: React.FC<WidgetProps<WidgetData, WidgetSettings>>;
5
+ export default Widget;
@@ -0,0 +1,15 @@
1
+ import { TFunction } from 'i18next';
2
+ import * as yup from 'yup';
3
+ export declare const getSettingsFormProps: (t: TFunction) => {
4
+ initialValues: {
5
+ statusColors: never[];
6
+ workplacesIds: never[];
7
+ };
8
+ validationSchema: yup.ObjectSchema<{
9
+ statusColors: (string | undefined)[];
10
+ workplacesIds: (string | undefined)[];
11
+ }, yup.AnyObject, {
12
+ statusColors: "";
13
+ workplacesIds: "";
14
+ }, "">;
15
+ };
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { WidgetViewProps } from '@/types';
3
- declare const WidgetView: React.FC<WidgetViewProps>;
4
- export default WidgetView;
1
+ import React from 'react';
2
+ import { WidgetViewProps } from '@/types';
3
+ declare const WidgetView: React.FC<WidgetViewProps>;
4
+ export default WidgetView;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { default as Widget } from './components/Widget';
2
- export declare const getDisplayName: (lang: 'en' | 'pl') => "Workplaces statuses" | "Statusy stanowisk" | "workplaces-status-widget";
3
- export declare const permissions: never[];
4
- export { LIBRARY_VERSION as version } from './version';
1
+ export { default as Widget } from './components/Widget';
2
+ export declare const getDisplayName: (lang: "en" | "pl") => "Workplaces statuses" | "Statusy stanowisk" | "workplaces-status-widget";
3
+ export declare const permissions: never[];
4
+ export { LIBRARY_VERSION as version } from './version';