@levi-gemcommerce/analytics 0.0.1-dev.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.
- package/README.md +37 -0
- package/dist/esm/components/GMultipleMetricChartCard/GMultipleMetricChartCard.d.ts +14 -0
- package/dist/esm/components/GMultipleMetricChartCard/MetricCard.d.ts +10 -0
- package/dist/esm/components/GMultipleMetricChartCard/MetricChart.d.ts +12 -0
- package/dist/esm/components/GMultipleMetricChartCard/index.d.ts +2 -0
- package/dist/esm/components/GSelectableMetricChartCard/GSelectableMetricChartCard.d.ts +14 -0
- package/dist/esm/components/GSelectableMetricChartCard/MetricCard.d.ts +10 -0
- package/dist/esm/components/GSelectableMetricChartCard/MetricChart.d.ts +12 -0
- package/dist/esm/components/GSelectableMetricChartCard/MetricChartTab.d.ts +11 -0
- package/dist/esm/components/GSelectableMetricChartCard/MetricChartTabs.d.ts +11 -0
- package/dist/esm/components/GSelectableMetricChartCard/index.d.ts +2 -0
- package/dist/esm/components/GTooltipCard/GTooltipCard.d.ts +32 -0
- package/dist/esm/components/GTooltipCard/index.d.ts +2 -0
- package/dist/esm/components/PATrendBadge/PATrendBadge.d.ts +7 -0
- package/dist/esm/components/PATrendBadge/index.d.ts +1 -0
- package/dist/esm/components/SingleMetricChartCard/SingleMetricChartCard.d.ts +12 -0
- package/dist/esm/components/SingleMetricChartCard/index.d.ts +2 -0
- package/dist/esm/components/common/chart/ChartSkeleton.d.ts +1 -0
- package/dist/esm/components/common/chart/GChartSkeleton.d.ts +1 -0
- package/dist/esm/components/common/chart/MetricChart.d.ts +8 -0
- package/dist/esm/components/common/chart/MetricChartEmpty.d.ts +8 -0
- package/dist/esm/components/common/chart/MetricChartProvider.d.ts +6 -0
- package/dist/esm/components/common/chart/MetricChartTooltip.d.ts +6 -0
- package/dist/esm/components/common/chart/MetricInfoBlock.d.ts +13 -0
- package/dist/esm/components/common/chart/MetricInfoSkeleton.d.ts +4 -0
- package/dist/esm/components/common/chart/MetricTrend.d.ts +5 -0
- package/dist/esm/components/common/chart/MetricValueSummary.d.ts +8 -0
- package/dist/esm/components/common/chart/PAMetricInfoSkeleton.d.ts +4 -0
- package/dist/esm/components/common/chart/index.d.ts +7 -0
- package/dist/esm/components/common/icons/DownIcon8px.d.ts +1 -0
- package/dist/esm/components/common/icons/UpIcon8px.d.ts +1 -0
- package/dist/esm/components/common/icons/index.d.ts +2 -0
- package/dist/esm/components/common/percent/MetricPercentage.d.ts +4 -0
- package/dist/esm/components/common/percent/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/constants/analytic-metric-tooltip.d.ts +5 -0
- package/dist/esm/constants/chart.d.ts +13 -0
- package/dist/esm/constants/g-multiple-metric-chart-card.d.ts +13 -0
- package/dist/esm/constants/g-selectable-metric-chart-card.d.ts +13 -0
- package/dist/esm/constants/index.d.ts +3 -0
- package/dist/esm/constants/pa-trend-badge.d.ts +9 -0
- package/dist/esm/constants/thumbnail.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +391 -0
- package/dist/esm/index.mjs +391 -0
- package/dist/esm/providers/MetricChartProvider.d.ts +6 -0
- package/dist/esm/providers/index.d.ts +1 -0
- package/dist/esm/shared/components/GBlockCenter/GBlockCenter.d.ts +15 -0
- package/dist/esm/shared/components/GBlockCenter/index.d.ts +1 -0
- package/dist/esm/shared/components/GSkeletonDisplayText/GSkeletonDisplayText.d.ts +4 -0
- package/dist/esm/shared/components/GSkeletonDisplayText/index.d.ts +1 -0
- package/dist/esm/shared/components/GThumbnail/GThumbnail.d.ts +20 -0
- package/dist/esm/shared/components/GThumbnail/index.d.ts +1 -0
- package/dist/esm/shared/components/GTooltipCard/GTooltipCard.d.ts +32 -0
- package/dist/esm/shared/components/GTooltipCard/index.d.ts +2 -0
- package/dist/esm/shared/components/index.d.ts +4 -0
- package/dist/esm/shared/index.d.ts +1 -0
- package/dist/esm/types/chart.d.ts +19 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/esm/types/metric.d.ts +27 -0
- package/dist/esm/utils/cls.d.ts +4 -0
- package/dist/esm/utils/index.d.ts +3 -0
- package/dist/esm/utils/number.d.ts +5 -0
- package/dist/esm/utils/percentage.d.ts +10 -0
- package/dist/style.css +1 -0
- package/dist/umd/esm/components/GMultipleMetricChartCard/GMultipleMetricChartCard.d.ts +14 -0
- package/dist/umd/esm/components/GMultipleMetricChartCard/MetricCard.d.ts +10 -0
- package/dist/umd/esm/components/GMultipleMetricChartCard/MetricChart.d.ts +12 -0
- package/dist/umd/esm/components/GMultipleMetricChartCard/index.d.ts +2 -0
- package/dist/umd/esm/components/GSelectableMetricChartCard/GSelectableMetricChartCard.d.ts +14 -0
- package/dist/umd/esm/components/GSelectableMetricChartCard/MetricCard.d.ts +10 -0
- package/dist/umd/esm/components/GSelectableMetricChartCard/MetricChart.d.ts +12 -0
- package/dist/umd/esm/components/GSelectableMetricChartCard/MetricChartTab.d.ts +11 -0
- package/dist/umd/esm/components/GSelectableMetricChartCard/index.d.ts +2 -0
- package/dist/umd/esm/components/GTooltipCard/GTooltipCard.d.ts +32 -0
- package/dist/umd/esm/components/GTooltipCard/index.d.ts +2 -0
- package/dist/umd/esm/components/PATrendBadge/PATrendBadge.d.ts +7 -0
- package/dist/umd/esm/components/PATrendBadge/index.d.ts +1 -0
- package/dist/umd/esm/components/SingleMetricChartCard/SingleMetricChartCard.d.ts +12 -0
- package/dist/umd/esm/components/SingleMetricChartCard/index.d.ts +2 -0
- package/dist/umd/esm/components/common/chart/GChartSkeleton.d.ts +1 -0
- package/dist/umd/esm/components/common/chart/MetricChart.d.ts +8 -0
- package/dist/umd/esm/components/common/chart/MetricChartEmpty.d.ts +8 -0
- package/dist/umd/esm/components/common/chart/MetricChartProvider.d.ts +6 -0
- package/dist/umd/esm/components/common/chart/MetricChartTooltip.d.ts +6 -0
- package/dist/umd/esm/components/common/chart/MetricInfoBlock.d.ts +13 -0
- package/dist/umd/esm/components/common/chart/MetricInfoSkeleton.d.ts +4 -0
- package/dist/umd/esm/components/common/chart/MetricTrend.d.ts +5 -0
- package/dist/umd/esm/components/common/chart/MetricValueSummary.d.ts +8 -0
- package/dist/umd/esm/components/common/chart/PAMetricInfoSkeleton.d.ts +4 -0
- package/dist/umd/esm/components/common/chart/index.d.ts +7 -0
- package/dist/umd/esm/components/common/icons/DownIcon8px.d.ts +1 -0
- package/dist/umd/esm/components/common/icons/UpIcon8px.d.ts +1 -0
- package/dist/umd/esm/components/common/icons/index.d.ts +2 -0
- package/dist/umd/esm/components/common/percent/MetricPercentage.d.ts +4 -0
- package/dist/umd/esm/components/common/percent/index.d.ts +1 -0
- package/dist/umd/esm/components/index.d.ts +2 -0
- package/dist/umd/esm/constants/analytic-metric-tooltip.d.ts +5 -0
- package/dist/umd/esm/constants/chart.d.ts +13 -0
- package/dist/umd/esm/constants/g-multiple-metric-chart-card.d.ts +13 -0
- package/dist/umd/esm/constants/g-selectable-metric-chart-card.d.ts +12 -0
- package/dist/umd/esm/constants/index.d.ts +3 -0
- package/dist/umd/esm/constants/pa-trend-badge.d.ts +9 -0
- package/dist/umd/esm/constants/thumbnail.d.ts +2 -0
- package/dist/umd/esm/index.d.ts +2 -0
- package/dist/umd/esm/providers/MetricChartProvider.d.ts +6 -0
- package/dist/umd/esm/providers/index.d.ts +1 -0
- package/dist/umd/esm/shared/components/GBlockCenter/GBlockCenter.d.ts +15 -0
- package/dist/umd/esm/shared/components/GBlockCenter/index.d.ts +1 -0
- package/dist/umd/esm/shared/components/GSkeletonDisplayText/GSkeletonDisplayText.d.ts +4 -0
- package/dist/umd/esm/shared/components/GSkeletonDisplayText/index.d.ts +1 -0
- package/dist/umd/esm/shared/components/GThumbnail/GThumbnail.d.ts +20 -0
- package/dist/umd/esm/shared/components/GThumbnail/index.d.ts +1 -0
- package/dist/umd/esm/shared/components/GTooltipCard/GTooltipCard.d.ts +32 -0
- package/dist/umd/esm/shared/components/GTooltipCard/index.d.ts +2 -0
- package/dist/umd/esm/shared/components/index.d.ts +4 -0
- package/dist/umd/esm/shared/index.d.ts +1 -0
- package/dist/umd/esm/types/chart.d.ts +19 -0
- package/dist/umd/esm/types/index.d.ts +2 -0
- package/dist/umd/esm/types/metric.d.ts +27 -0
- package/dist/umd/esm/utils/cls.d.ts +4 -0
- package/dist/umd/esm/utils/index.d.ts +3 -0
- package/dist/umd/esm/utils/number.d.ts +5 -0
- package/dist/umd/esm/utils/percentage.d.ts +10 -0
- package/dist/umd/index.js +1 -0
- package/package.json +86 -0
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# @gem-sdk/analytic
|
|
2
|
+
|
|
3
|
+
GemX-specific analytic components, hooks, and types — extracted from `gemx-shopify-app`
|
|
4
|
+
so they can be shared across repos (dev / staging apps, and future consumers).
|
|
5
|
+
|
|
6
|
+
> Migration is **incremental, bottom-up**: pure types and helpers first, then leaf
|
|
7
|
+
> presentational charts, then the orchestration components. We do **not** move the whole
|
|
8
|
+
> feature at once — each slice is moved only after its dependencies already live here.
|
|
9
|
+
|
|
10
|
+
## Status
|
|
11
|
+
|
|
12
|
+
| Slice | Source in app | Status |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `types/chart` | `app/modules/page-analytic/modules/analytic/types/chart.ts` | ✅ migrated |
|
|
15
|
+
|
|
16
|
+
## Extraction order (planned)
|
|
17
|
+
|
|
18
|
+
1. **Pure types / helpers** — zero app coupling (`types/chart`, chart transform helpers).
|
|
19
|
+
2. **Leaf charts** — depend only on `@shopify/polaris-viz` + the types above
|
|
20
|
+
(`PAFunnelChart`, `PALineChartTooltip`, `PAPercent`).
|
|
21
|
+
3. **Shared foundations** — decide per dependency whether to extract, inject, or keep:
|
|
22
|
+
`~/types/metric`, `~/core/gemxql` types, design-system primitives.
|
|
23
|
+
4. **Composite charts** — `PALineChart`, `PACardLineChart`, `PADonutChart`, grids.
|
|
24
|
+
5. **Orchestration** — `PageAnalyticDetail` and providers (last; depends on everything).
|
|
25
|
+
|
|
26
|
+
## Consuming from the app
|
|
27
|
+
|
|
28
|
+
The app consumes published dev versions (e.g. `"@gem-sdk/analytic": "0.0.1-dev.x"`),
|
|
29
|
+
the same way it consumes `@gem-sdk/heatmap-react`. After migrating a slice:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
yarn build && yarn changeset # publish a dev version
|
|
33
|
+
# then bump the version in the app's package.json and rewire imports
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`@shopify/polaris-viz`, `@shopify/polaris-viz-core`, `react` and `react-dom` are
|
|
37
|
+
**peerDependencies** — provided by the consuming app, never bundled.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { AllChartsDataMap, IMetricCardItem } from '../../types';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
data: IMetricCardItem[];
|
|
5
|
+
dataChart: AllChartsDataMap;
|
|
6
|
+
defaultActiveTab?: string;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
isEmptyMetricData?: boolean;
|
|
9
|
+
hideComparison?: boolean;
|
|
10
|
+
currentPeriodLabel?: string;
|
|
11
|
+
previousPeriodLabel?: string;
|
|
12
|
+
onclickMetric?: (key: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const GMultipleMetricChartCard: ({ data, dataChart, defaultActiveTab, isLoading, isEmptyMetricData, hideComparison, currentPeriodLabel, previousPeriodLabel, }: IProps) => ReactElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IMetricCardItem } from '../../types';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
item: IMetricCardItem;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
hideComparison?: boolean;
|
|
8
|
+
onSelect: (key: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const MetricCard: ({ item, isActive, isLoading, hideComparison, onSelect }: IProps) => ReactElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { AllChartsDataMap } from '../../types';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
activeTab?: string;
|
|
5
|
+
dataChart: AllChartsDataMap;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
isEmptyMetricData?: boolean;
|
|
8
|
+
hideComparison?: boolean;
|
|
9
|
+
currentPeriodLabel: string;
|
|
10
|
+
previousPeriodLabel: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const MetricChart: ({ activeTab, dataChart, isLoading, isEmptyMetricData, hideComparison, currentPeriodLabel, previousPeriodLabel, }: IProps) => ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AllChartsDataMap, IMetricCardItem } from '../../types';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
metricInfo: IMetricCardItem[];
|
|
5
|
+
dataChart: AllChartsDataMap;
|
|
6
|
+
defaultActiveTab?: string;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
isEmptyMetricData?: boolean;
|
|
9
|
+
hideComparison?: boolean;
|
|
10
|
+
currentPeriodLabel?: string;
|
|
11
|
+
previousPeriodLabel?: string;
|
|
12
|
+
onclickMetric?: (key: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const GSelectableMetricChartCard: ({ metricInfo, dataChart, defaultActiveTab, isLoading, isEmptyMetricData, hideComparison, currentPeriodLabel, previousPeriodLabel, }: IProps) => ReactElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IMetricCardItem } from '../../types';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
item: IMetricCardItem;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
hideComparison?: boolean;
|
|
8
|
+
onSelect: (key: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const MetricCard: ({ item, isActive, isLoading, hideComparison, onSelect }: IProps) => ReactElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { AllChartsDataMap } from '../../types';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
activeTab?: string;
|
|
5
|
+
dataChart: AllChartsDataMap;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
isEmptyMetricData?: boolean;
|
|
8
|
+
hideComparison?: boolean;
|
|
9
|
+
currentPeriodLabel: string;
|
|
10
|
+
previousPeriodLabel: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const MetricChart: ({ activeTab, dataChart, isLoading, isEmptyMetricData, hideComparison, currentPeriodLabel, previousPeriodLabel, }: IProps) => ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { IMetricCardItem } from '../../types';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
item: IMetricCardItem;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
hideComparison?: boolean;
|
|
8
|
+
onSelect: (key: string) => void;
|
|
9
|
+
onClickTitle?: (key: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const MetricChartTab: ({ item, isActive, isLoading, hideComparison, onSelect, onClickTitle, }: IProps) => ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { IMetricCardItem } from '../../types';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
item: IMetricCardItem;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
hideComparison?: boolean;
|
|
8
|
+
onSelect: (key: string) => void;
|
|
9
|
+
onClickTitle?: (key: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const MetricChartTabs: ({ item, isActive, isLoading, hideComparison, onSelect, onClickTitle, }: IProps) => ReactElement;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { BoxProps } from '@shopify/polaris';
|
|
2
|
+
type CloseTarget = 'activator' | 'next-node';
|
|
3
|
+
export interface PopoverPublicAPI {
|
|
4
|
+
forceUpdatePosition(): void;
|
|
5
|
+
close(target?: CloseTarget): void;
|
|
6
|
+
}
|
|
7
|
+
export interface GTooltipCardPublicAPI {
|
|
8
|
+
onClose(): void;
|
|
9
|
+
}
|
|
10
|
+
type Width = 'default' | 'wide' | 'large';
|
|
11
|
+
export interface GTooltipCardData {
|
|
12
|
+
title: string;
|
|
13
|
+
content: string | TrustedHTML;
|
|
14
|
+
formula?: React.ReactNode;
|
|
15
|
+
contentList?: string[];
|
|
16
|
+
width?: Width;
|
|
17
|
+
}
|
|
18
|
+
export interface IProps {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
delay?: number;
|
|
21
|
+
tooltip?: GTooltipCardData;
|
|
22
|
+
activatorProps?: BoxProps;
|
|
23
|
+
wrapper?: 'span' | 'div';
|
|
24
|
+
isHideBorder?: boolean;
|
|
25
|
+
alignment?: 'start' | 'center' | 'end';
|
|
26
|
+
textDecoration?: 'underline' | 'none';
|
|
27
|
+
preferredAlignment?: 'left' | 'center' | 'right';
|
|
28
|
+
popoverRef?: React.RefObject<PopoverPublicAPI>;
|
|
29
|
+
showArrow?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare const GTooltipCard: import("react").ForwardRefExoticComponent<IProps & import("react").RefAttributes<GTooltipCardPublicAPI>>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PATrendBadge';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DataSeries } from '@shopify/polaris-viz-core';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { IMetricCardItem } from '../../types';
|
|
4
|
+
export interface IProps {
|
|
5
|
+
metricInfo: IMetricCardItem;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
hideComparison?: boolean;
|
|
8
|
+
isEmptyMetricData?: boolean;
|
|
9
|
+
lineChartData: DataSeries[];
|
|
10
|
+
onClickTitle?: (key: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const SingleMetricChartCard: ({ metricInfo, lineChartData, isLoading, hideComparison, isEmptyMetricData, onClickTitle, }: IProps) => ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ChartSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GChartSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DataSeries } from '@shopify/polaris-viz';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
lineChartData: DataSeries[];
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
isEmptyMetricData?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const MetricChart: ({ lineChartData, isLoading, isEmptyMetricData }: IProps) => ReactElement;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RenderTooltipContentData } from '@shopify/polaris-viz';
|
|
2
|
+
export interface MetricChartTooltipProps {
|
|
3
|
+
data: RenderTooltipContentData;
|
|
4
|
+
formatValue: (value: number) => string;
|
|
5
|
+
}
|
|
6
|
+
export declare const MetricChartTooltip: React.FC<MetricChartTooltipProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TextProps } from '@shopify/polaris';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { IMetricCardItem } from '../../../types';
|
|
4
|
+
export interface IProps {
|
|
5
|
+
item: IMetricCardItem;
|
|
6
|
+
isHovered: boolean;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
hideComparison?: boolean;
|
|
9
|
+
titleVariant?: TextProps['variant'];
|
|
10
|
+
titleFontWeight?: TextProps['fontWeight'];
|
|
11
|
+
onClickTitle?: (key: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const MetricInfoBlock: ({ item, isHovered, isLoading, hideComparison, titleVariant, titleFontWeight, onClickTitle, }: IProps) => ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { IMetricControl } from '../../../types';
|
|
3
|
+
interface IProps {
|
|
4
|
+
totalValue: IMetricControl;
|
|
5
|
+
hideComparison?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const MetricValueSummary: ({ totalValue, hideComparison }: IProps) => ReactElement;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { GChartSkeleton } from './GChartSkeleton';
|
|
2
|
+
export { MetricChart } from './MetricChart';
|
|
3
|
+
export { MetricChartEmpty } from './MetricChartEmpty';
|
|
4
|
+
export { MetricChartTooltip } from './MetricChartTooltip';
|
|
5
|
+
export { MetricInfoBlock } from './MetricInfoBlock';
|
|
6
|
+
export { MetricInfoSkeleton } from './MetricInfoSkeleton';
|
|
7
|
+
export { MetricValueSummary } from './MetricValueSummary';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DownIcon8px: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UpIcon8px: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MetricPercentage } from './MetricPercentage';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const DEFAULT_CURRENT_PERIOD_LABEL = "Current";
|
|
2
|
+
export declare const DEFAULT_PREVIOUS_PERIOD_LABEL = "Previous";
|
|
3
|
+
export declare const CHART_MIN_HEIGHT = 228;
|
|
4
|
+
export declare const SERIES_COLORS: {
|
|
5
|
+
readonly current: "rgba(64, 176, 230, 1)";
|
|
6
|
+
readonly comparison: "rgba(161, 202, 231, 1)";
|
|
7
|
+
readonly all: readonly ["#2C7DFF", "#F34A70"];
|
|
8
|
+
};
|
|
9
|
+
export declare const TREND_TONE: {
|
|
10
|
+
readonly POSITIVE: "#007F5F";
|
|
11
|
+
readonly NEUTRAL: "#4A4A4A";
|
|
12
|
+
};
|
|
13
|
+
export declare const PLACEHOLDER_VALUE = "-";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const DEFAULT_CURRENT_PERIOD_LABEL = "Current";
|
|
2
|
+
export declare const DEFAULT_PREVIOUS_PERIOD_LABEL = "Previous";
|
|
3
|
+
export declare const CHART_MIN_HEIGHT = 228;
|
|
4
|
+
export declare const SERIES_COLORS: {
|
|
5
|
+
readonly current: "rgba(64, 176, 230, 1)";
|
|
6
|
+
readonly comparison: "rgba(161, 202, 231, 1)";
|
|
7
|
+
readonly all: readonly ["#2C7DFF", "#F34A70"];
|
|
8
|
+
};
|
|
9
|
+
export declare const TREND_TONE: {
|
|
10
|
+
readonly POSITIVE: "#007F5F";
|
|
11
|
+
readonly NEUTRAL: "#4A4A4A";
|
|
12
|
+
};
|
|
13
|
+
export declare const GRID_GAP = "16px";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const DEFAULT_CURRENT_PERIOD_LABEL = "Current";
|
|
2
|
+
export declare const DEFAULT_PREVIOUS_PERIOD_LABEL = "Previous";
|
|
3
|
+
export declare const CHART_MIN_HEIGHT = 228;
|
|
4
|
+
export declare const SERIES_COLORS: {
|
|
5
|
+
readonly current: "rgba(64, 176, 230, 1)";
|
|
6
|
+
readonly comparison: "rgba(161, 202, 231, 1)";
|
|
7
|
+
readonly all: readonly ["#2C7DFF", "#F34A70"];
|
|
8
|
+
};
|
|
9
|
+
export declare const TREND_TONE: {
|
|
10
|
+
readonly POSITIVE: "#007F5F";
|
|
11
|
+
readonly NEUTRAL: "#4A4A4A";
|
|
12
|
+
};
|
|
13
|
+
export declare const PLACEHOLDER_VALUE = "-";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const TREND_DIRECTION: {
|
|
2
|
+
readonly UP: "up";
|
|
3
|
+
readonly DOWN: "down";
|
|
4
|
+
readonly NEUTRAL: "neutral";
|
|
5
|
+
};
|
|
6
|
+
export type ITrendDirection = (typeof TREND_DIRECTION)[keyof typeof TREND_DIRECTION];
|
|
7
|
+
export declare const TREND_COLOR: Record<ITrendDirection, string>;
|
|
8
|
+
export declare const TREND_SYMBOL: Record<ITrendDirection, string>;
|
|
9
|
+
export declare const PERCENT_DECIMALS = 2;
|