@ssa-ui-kit/core 2.27.1 → 2.27.2
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,3 +1,3 @@
|
|
|
1
1
|
import { FullscreenModeContextType } from '../../FullscreenModeContext';
|
|
2
2
|
import { PieChartProps } from './types';
|
|
3
|
-
export declare const PieChartInternal: ({ as, className, title, children, width, features, cardProps, activeHighlight, isFullscreenMode, activeId, data, legendOutputType: legendOutputTypeInitial, tooltipProps, setActiveId, onFullscreenModeChange, ...chartProps }: PieChartProps & Pick<FullscreenModeContextType, "activeId" | "isFullscreenMode" | "setActiveId">) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const PieChartInternal: ({ as, className, title, children, width, features, cardProps, activeHighlight, isFullscreenMode, activeId, data, legendOutputType: legendOutputTypeInitial, tooltipProps, noData, setActiveId, onFullscreenModeChange, ...chartProps }: PieChartProps & Pick<FullscreenModeContextType, "activeId" | "isFullscreenMode" | "setActiveId">) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NoDataYet: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -15,6 +15,7 @@ export interface PieChartProps extends CommonProps, React.ComponentProps<typeof
|
|
|
15
15
|
title?: React.ReactNode;
|
|
16
16
|
children?: React.ReactNode;
|
|
17
17
|
width?: string;
|
|
18
|
+
noData?: React.ReactNode;
|
|
18
19
|
features?: Array<PieChartFeatures>;
|
|
19
20
|
cardProps?: Omit<WidgetCardProps, 'children'>;
|
|
20
21
|
activeHighlight?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -6874,6 +6874,7 @@ const PieChartInternal = ({
|
|
|
6874
6874
|
data,
|
|
6875
6875
|
legendOutputType: legendOutputTypeInitial = 'value',
|
|
6876
6876
|
tooltipProps,
|
|
6877
|
+
noData,
|
|
6877
6878
|
setActiveId,
|
|
6878
6879
|
onFullscreenModeChange,
|
|
6879
6880
|
...chartProps
|
|
@@ -6883,6 +6884,7 @@ const PieChartInternal = ({
|
|
|
6883
6884
|
activeOuterRadiusOffset = 0,
|
|
6884
6885
|
isInteractive = false
|
|
6885
6886
|
} = chartProps;
|
|
6887
|
+
const localFeatures = data.length ? features : features.includes('header') ? ['header'] : [];
|
|
6886
6888
|
const {
|
|
6887
6889
|
valueRoundingDigits = false,
|
|
6888
6890
|
percentageRoundingDigits = 0,
|
|
@@ -6964,15 +6966,15 @@ const PieChartInternal = ({
|
|
|
6964
6966
|
data: dataForChart,
|
|
6965
6967
|
legendOutputType: legendOutputType,
|
|
6966
6968
|
children: (0,jsx_runtime_namespaceObject.jsx)(WithWidgetCard, {
|
|
6967
|
-
features:
|
|
6969
|
+
features: localFeatures,
|
|
6968
6970
|
cardProps: {
|
|
6969
6971
|
headerContent: (0,jsx_runtime_namespaceObject.jsx)(PieChartHeader, {
|
|
6970
|
-
features:
|
|
6972
|
+
features: localFeatures
|
|
6971
6973
|
}),
|
|
6972
6974
|
css: isHeaderIncluded && isFullscreenMode ? PieChartInternal_ref : undefined,
|
|
6973
6975
|
...cardProps
|
|
6974
6976
|
},
|
|
6975
|
-
children: (0,jsx_runtime_namespaceObject.jsxs)(PieChartBase, {
|
|
6977
|
+
children: data.length ? (0,jsx_runtime_namespaceObject.jsxs)(PieChartBase, {
|
|
6976
6978
|
as: as,
|
|
6977
6979
|
className: className,
|
|
6978
6980
|
width: width,
|
|
@@ -7045,7 +7047,7 @@ const PieChartInternal = ({
|
|
|
7045
7047
|
})
|
|
7046
7048
|
})]
|
|
7047
7049
|
}), children]
|
|
7048
|
-
})
|
|
7050
|
+
}) : noData
|
|
7049
7051
|
})
|
|
7050
7052
|
});
|
|
7051
7053
|
};
|