@levi-gemcommerce/analytics 1.0.0-dev.47 → 2.0.2-dev.1

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.
Files changed (46) hide show
  1. package/dist/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +0 -1
  2. package/dist/esm/components/GSelectableMetricChartCard/GSelectableMetricChartCard.d.ts +2 -1
  3. package/dist/esm/components/GSelectableMetricChartCard/MetricChartTab.d.ts +2 -1
  4. package/dist/esm/components/MetricDonutChartCard/MetricDonutChartCard.d.ts +2 -1
  5. package/dist/esm/components/OrderAnalytic/OrderListingLatestTable.d.ts +2 -1
  6. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingTable.d.ts +2 -1
  7. package/dist/esm/components/SingleMetricChartCard/SingleMetricChartCard.d.ts +2 -1
  8. package/dist/esm/components/common/chart/MetricInfoBlock.d.ts +2 -1
  9. package/dist/esm/index.js +169 -136
  10. package/dist/esm/index.mjs +169 -136
  11. package/dist/esm/providers/TimezoneProvider.d.ts +11 -0
  12. package/dist/esm/providers/index.d.ts +2 -0
  13. package/dist/esm/shared/components/GMockDataTooltip/GMockDataTooltip.d.ts +12 -0
  14. package/dist/esm/shared/components/GMockDataTooltip/index.d.ts +1 -0
  15. package/dist/esm/shared/components/index.d.ts +1 -0
  16. package/dist/esm/shared/reports/ui/ReportTable/ReportTable.d.ts +2 -1
  17. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/Cell.d.ts +2 -1
  18. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellContainer.d.ts +1 -1
  19. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderIdCell.d.ts +1 -1
  20. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/type.d.ts +1 -0
  21. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Row.d.ts +2 -1
  22. package/dist/esm/shared/reports/ui/ReportTable/components/Footer/Pagination.d.ts +2 -1
  23. package/dist/esm/shared/reports/ui/ReportTable/components/Footer/WrapperFooter.d.ts +2 -1
  24. package/dist/umd/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +0 -1
  25. package/dist/umd/esm/components/GSelectableMetricChartCard/GSelectableMetricChartCard.d.ts +2 -1
  26. package/dist/umd/esm/components/GSelectableMetricChartCard/MetricChartTab.d.ts +2 -1
  27. package/dist/umd/esm/components/MetricDonutChartCard/MetricDonutChartCard.d.ts +2 -1
  28. package/dist/umd/esm/components/OrderAnalytic/OrderListingLatestTable.d.ts +2 -1
  29. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingTable.d.ts +2 -1
  30. package/dist/umd/esm/components/SingleMetricChartCard/SingleMetricChartCard.d.ts +2 -1
  31. package/dist/umd/esm/components/common/chart/MetricInfoBlock.d.ts +2 -1
  32. package/dist/umd/esm/providers/TimezoneProvider.d.ts +11 -0
  33. package/dist/umd/esm/providers/index.d.ts +2 -0
  34. package/dist/umd/esm/shared/components/GMockDataTooltip/GMockDataTooltip.d.ts +12 -0
  35. package/dist/umd/esm/shared/components/GMockDataTooltip/index.d.ts +1 -0
  36. package/dist/umd/esm/shared/components/index.d.ts +1 -0
  37. package/dist/umd/esm/shared/reports/ui/ReportTable/ReportTable.d.ts +2 -1
  38. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/Cell.d.ts +2 -1
  39. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellContainer.d.ts +1 -1
  40. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderIdCell.d.ts +1 -1
  41. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/type.d.ts +1 -0
  42. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Row.d.ts +2 -1
  43. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Footer/Pagination.d.ts +2 -1
  44. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Footer/WrapperFooter.d.ts +2 -1
  45. package/dist/umd/index.js +1 -1
  46. package/package.json +1 -1
@@ -20,3 +20,4 @@ export * from './GInlineCenter';
20
20
  export * from './GTextTruncated';
21
21
  export * from './GTextTooltip';
22
22
  export * from './GBoxCard';
23
+ export * from './GMockDataTooltip';
@@ -24,10 +24,11 @@ export interface ReportTableProps {
24
24
  showViewAllButton: boolean;
25
25
  emptyStateComponent?: React.ReactNode;
26
26
  isLoading?: boolean;
27
+ isMockData?: boolean;
27
28
  onChangeOrderBy?: (field: string) => void;
28
29
  onViewAllStoreOrders?: () => void;
29
30
  onViewOrderJourney?: (orderId: string) => void;
30
31
  onViewOrderDetails?: (orderId: string) => void;
31
32
  skeletons?: ReportTableSkeletonProps;
32
33
  }
33
- export declare const ReportTable: ({ dimensions, metrics, data, activeColumn, orderBy, options, paginationProps, itemCount, dimensionLayout, metricLayouts, orderCellProps, isHideCampaignContent, showViewAllButton, emptyStateComponent, isLoading, onChangeOrderBy, onViewAllStoreOrders, onViewOrderJourney, onViewOrderDetails, skeletons, }: ReportTableProps) => import("react/jsx-runtime").JSX.Element | null;
34
+ export declare const ReportTable: ({ dimensions, metrics, data, activeColumn, orderBy, options, paginationProps, itemCount, dimensionLayout, metricLayouts, orderCellProps, isHideCampaignContent, showViewAllButton, emptyStateComponent, isLoading, isMockData, onChangeOrderBy, onViewAllStoreOrders, onViewOrderJourney, onViewOrderDetails, skeletons, }: ReportTableProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -12,6 +12,7 @@ interface ColumnProps {
12
12
  orderCellProps?: OrderCellProps;
13
13
  campaignsCellProps?: CampaignsCellProps;
14
14
  isTotalRow: ReportValueType;
15
+ isMockData?: boolean;
15
16
  }
16
- export declare const Cell: ({ value, isMergedWithPrev, columnLayout, name, isDimensionCol, formatter, hasTooltipCard, previousValue, orderCellProps, campaignsCellProps, isTotalRow, }: ColumnProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const Cell: ({ value, isMergedWithPrev, columnLayout, name, isDimensionCol, formatter, hasTooltipCard, previousValue, orderCellProps, campaignsCellProps, isTotalRow, isMockData, }: ColumnProps) => import("react/jsx-runtime").JSX.Element;
17
18
  export {};
@@ -1,3 +1,3 @@
1
1
  import type { RendererProps } from '../type';
2
- export type OrderCellContainerProps = Pick<RendererProps, 'value' | 'columnLayout' | 'orderCellProps' | 'previousValue' | 'isTotalRow'>;
2
+ export type OrderCellContainerProps = Pick<RendererProps, 'value' | 'columnLayout' | 'orderCellProps' | 'previousValue' | 'isTotalRow' | 'isMockData'>;
3
3
  export declare const OrderCellContainer: React.FC<OrderCellContainerProps>;
@@ -1,2 +1,2 @@
1
1
  import type { RendererProps } from './type';
2
- export declare const OrderIdCell: ({ value }: Pick<RendererProps<string>, "value">) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const OrderIdCell: ({ value, isMockData }: Pick<RendererProps<string>, "value" | "isMockData">) => import("react/jsx-runtime").JSX.Element;
@@ -12,4 +12,5 @@ export type RendererProps<T = ReportValueType> = {
12
12
  orderCellProps?: OrderCellProps;
13
13
  isTotalRow?: ReportValueType;
14
14
  isDimensionCol?: boolean;
15
+ isMockData?: boolean;
15
16
  };
@@ -10,6 +10,7 @@ interface RowProps {
10
10
  orderCellProps?: OrderCellProps;
11
11
  isHideCampaignContent: boolean;
12
12
  minWidth?: number;
13
+ isMockData?: boolean;
13
14
  }
14
- export declare const Row: ({ row, rowIndex, columns, dimensions, prevRow, columnLayoutMap, orderCellProps, isHideCampaignContent, minWidth, }: RowProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const Row: ({ row, rowIndex, columns, dimensions, prevRow, columnLayoutMap, orderCellProps, isHideCampaignContent, minWidth, isMockData, }: RowProps) => import("react/jsx-runtime").JSX.Element;
15
16
  export {};
@@ -6,6 +6,7 @@ interface PaginationProps {
6
6
  showViewAllButton: boolean;
7
7
  paginationProps?: GPaginationProps;
8
8
  isPaginationHidden: boolean;
9
+ isMockData?: boolean;
9
10
  }
10
- export declare const Pagination: ({ totalRows, itemCount, viewAllMetricContent, showViewAllButton, paginationProps, isPaginationHidden, }: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
11
+ export declare const Pagination: ({ totalRows, itemCount, viewAllMetricContent, showViewAllButton, paginationProps, isPaginationHidden, isMockData, }: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
11
12
  export {};
@@ -6,6 +6,7 @@ interface WrapperFooterProps {
6
6
  showViewAllButton: boolean;
7
7
  paginationProps?: GPaginationProps;
8
8
  isPaginationHidden: boolean;
9
+ isMockData?: boolean;
9
10
  }
10
- export declare const WrapperFooter: ({ scrollbarContainerRef, itemCount, totalPaginationRows, showViewAllButton, paginationProps, isPaginationHidden, }: WrapperFooterProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const WrapperFooter: ({ scrollbarContainerRef, itemCount, totalPaginationRows, showViewAllButton, paginationProps, isPaginationHidden, isMockData, }: WrapperFooterProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export {};
@@ -1,5 +1,4 @@
1
1
  import type { IFunnelChartColors } from '@/shared/charts';
2
- import '../assets/styles/PathAnalysis.scss';
3
2
  interface PathAnalysisChartProps {
4
3
  funnelColors?: IFunnelChartColors;
5
4
  isEnabled?: boolean;
@@ -11,6 +11,7 @@ export interface IProps {
11
11
  currentPeriodLabel?: string;
12
12
  previousPeriodLabel?: string;
13
13
  columnTypes?: ColumnTypesMap;
14
+ isMockData?: boolean;
14
15
  onclickMetric?: (key: string) => void;
15
16
  }
16
- export declare const GSelectableMetricChartCard: ({ metricInfo, dataChart, defaultActiveTab, isLoading, isEmptyMetricData, hideComparison, currentPeriodLabel, previousPeriodLabel, columnTypes, }: IProps) => ReactElement;
17
+ export declare const GSelectableMetricChartCard: ({ metricInfo, dataChart, defaultActiveTab, isLoading, isEmptyMetricData, hideComparison, currentPeriodLabel, previousPeriodLabel, columnTypes, isMockData, onclickMetric, }: IProps) => ReactElement;
@@ -5,7 +5,8 @@ export interface IProps {
5
5
  isActive: boolean;
6
6
  isLoading?: boolean;
7
7
  hideComparison?: boolean;
8
+ isMockData?: boolean;
8
9
  onSelect: (key: EMetricKey) => void;
9
10
  onClickTitle?: (key: string) => void;
10
11
  }
11
- export declare const MetricChartTab: ({ item, isActive, isLoading, hideComparison, onSelect, onClickTitle, }: IProps) => ReactElement;
12
+ export declare const MetricChartTab: ({ item, isActive, isLoading, hideComparison, isMockData, onSelect, onClickTitle, }: IProps) => ReactElement;
@@ -11,6 +11,7 @@ export interface IProps {
11
11
  isLoading?: boolean;
12
12
  isEmptyMetricData?: boolean;
13
13
  minHeight?: number;
14
+ isMockData?: boolean;
14
15
  onClick: () => void;
15
16
  }
16
- export declare const MetricDonutChartCard: ({ label, metricKey, targets, totalsRow, comparisonTotalsRow, sort, isLoading, isEmptyMetricData, minHeight, onClick, }: IProps) => ReactElement;
17
+ export declare const MetricDonutChartCard: ({ label, metricKey, targets, totalsRow, comparisonTotalsRow, sort, isLoading, isEmptyMetricData, minHeight, isMockData, onClick, }: IProps) => ReactElement;
@@ -16,6 +16,7 @@ interface OrderListingLatestTableProps {
16
16
  source: EReportSource;
17
17
  data: IOrderListingLatestData;
18
18
  callbacks?: IOrderListingLatestCallbacks;
19
+ isMockData?: boolean;
19
20
  }
20
- export declare const OrderListingLatestTable: ({ source, data, callbacks }: OrderListingLatestTableProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const OrderListingLatestTable: ({ source, data, callbacks, isMockData }: OrderListingLatestTableProps) => import("react/jsx-runtime").JSX.Element;
21
22
  export {};
@@ -18,9 +18,10 @@ interface OrderListingTableProps {
18
18
  queryValue?: string;
19
19
  paginationProps?: GPaginationProps;
20
20
  tableOptions?: OrderListingTableOptions;
21
+ isMockData?: boolean;
21
22
  onViewAllStoreOrders?: () => void;
22
23
  onViewOrderJourney?: (orderId: string) => void;
23
24
  onViewOrderDetails?: (orderId: string) => void;
24
25
  }
25
- declare const _default: import("react").MemoExoticComponent<({ orders, isLoading, totalStoreOrders, queryValue, paginationProps, tableOptions, onViewAllStoreOrders, onViewOrderJourney, onViewOrderDetails, }: OrderListingTableProps) => import("react/jsx-runtime").JSX.Element>;
26
+ declare const _default: import("react").MemoExoticComponent<({ orders, isLoading, totalStoreOrders, queryValue, paginationProps, tableOptions, isMockData, onViewAllStoreOrders, onViewOrderJourney, onViewOrderDetails, }: OrderListingTableProps) => import("react/jsx-runtime").JSX.Element>;
26
27
  export default _default;
@@ -9,6 +9,7 @@ export interface IProps {
9
9
  isEmptyMetricData?: boolean;
10
10
  lineChartData: DataSeries[];
11
11
  columnTypes?: ColumnTypesMap;
12
+ isMockData?: boolean;
12
13
  onClickTitle?: (key: string) => void;
13
14
  }
14
- export declare const SingleMetricChartCard: ({ metricInfo, lineChartData, isLoading, hideComparison, columnTypes, isEmptyMetricData, onClickTitle, }: IProps) => ReactElement;
15
+ export declare const SingleMetricChartCard: ({ metricInfo, lineChartData, isLoading, hideComparison, columnTypes, isEmptyMetricData, isMockData, onClickTitle, }: IProps) => ReactElement;
@@ -8,6 +8,7 @@ export interface IProps {
8
8
  hideComparison?: boolean;
9
9
  titleVariant?: TextProps['variant'];
10
10
  titleFontWeight?: TextProps['fontWeight'];
11
+ isMockData?: boolean;
11
12
  onClickTitle?: (key: string) => void;
12
13
  }
13
- export declare const MetricInfoBlock: ({ item, isHovered, isLoading, hideComparison, titleVariant, titleFontWeight, onClickTitle, }: IProps) => ReactElement;
14
+ export declare const MetricInfoBlock: ({ item, isHovered, isLoading, hideComparison, titleVariant, titleFontWeight, isMockData, onClickTitle, }: IProps) => ReactElement;
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ interface ITimezoneContext {
3
+ tz: string;
4
+ }
5
+ export interface ITimezoneProviderProps {
6
+ children: ReactNode;
7
+ tz: string;
8
+ }
9
+ export declare const TimezoneProvider: ({ children, tz }: ITimezoneProviderProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const useTimezoneContext: () => ITimezoneContext;
11
+ export {};
@@ -1,3 +1,5 @@
1
1
  export { ConvertMoneyProvider, useConvertMoneyContext } from './ConvertMoneyProvider';
2
2
  export type { IProps as IConvertMoneyProviderProps } from './ConvertMoneyProvider';
3
3
  export { MetricChartProvider } from './MetricChartProvider';
4
+ export { TimezoneProvider, useTimezoneContext } from './TimezoneProvider';
5
+ export type { ITimezoneProviderProps } from './TimezoneProvider';
@@ -0,0 +1,12 @@
1
+ import type { GTooltipProps } from '../GTooltip';
2
+ export interface GMockDataTooltipProps extends Omit<GTooltipProps, 'isEnabled' | 'content'> {
3
+ isMockData?: boolean;
4
+ content?: React.ReactNode | string;
5
+ }
6
+ /**
7
+ * Wraps its children with a demo-experiment tooltip when `isMockData` is true.
8
+ * When `isMockData` is false it renders the children untouched.
9
+ *
10
+ * Keeps the demo copy in a single place so it only needs to be edited here.
11
+ */
12
+ export declare const GMockDataTooltip: ({ isMockData, content, children, ...props }: GMockDataTooltipProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './GMockDataTooltip';
@@ -20,3 +20,4 @@ export * from './GInlineCenter';
20
20
  export * from './GTextTruncated';
21
21
  export * from './GTextTooltip';
22
22
  export * from './GBoxCard';
23
+ export * from './GMockDataTooltip';
@@ -24,10 +24,11 @@ export interface ReportTableProps {
24
24
  showViewAllButton: boolean;
25
25
  emptyStateComponent?: React.ReactNode;
26
26
  isLoading?: boolean;
27
+ isMockData?: boolean;
27
28
  onChangeOrderBy?: (field: string) => void;
28
29
  onViewAllStoreOrders?: () => void;
29
30
  onViewOrderJourney?: (orderId: string) => void;
30
31
  onViewOrderDetails?: (orderId: string) => void;
31
32
  skeletons?: ReportTableSkeletonProps;
32
33
  }
33
- export declare const ReportTable: ({ dimensions, metrics, data, activeColumn, orderBy, options, paginationProps, itemCount, dimensionLayout, metricLayouts, orderCellProps, isHideCampaignContent, showViewAllButton, emptyStateComponent, isLoading, onChangeOrderBy, onViewAllStoreOrders, onViewOrderJourney, onViewOrderDetails, skeletons, }: ReportTableProps) => import("react/jsx-runtime").JSX.Element | null;
34
+ export declare const ReportTable: ({ dimensions, metrics, data, activeColumn, orderBy, options, paginationProps, itemCount, dimensionLayout, metricLayouts, orderCellProps, isHideCampaignContent, showViewAllButton, emptyStateComponent, isLoading, isMockData, onChangeOrderBy, onViewAllStoreOrders, onViewOrderJourney, onViewOrderDetails, skeletons, }: ReportTableProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -12,6 +12,7 @@ interface ColumnProps {
12
12
  orderCellProps?: OrderCellProps;
13
13
  campaignsCellProps?: CampaignsCellProps;
14
14
  isTotalRow: ReportValueType;
15
+ isMockData?: boolean;
15
16
  }
16
- export declare const Cell: ({ value, isMergedWithPrev, columnLayout, name, isDimensionCol, formatter, hasTooltipCard, previousValue, orderCellProps, campaignsCellProps, isTotalRow, }: ColumnProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const Cell: ({ value, isMergedWithPrev, columnLayout, name, isDimensionCol, formatter, hasTooltipCard, previousValue, orderCellProps, campaignsCellProps, isTotalRow, isMockData, }: ColumnProps) => import("react/jsx-runtime").JSX.Element;
17
18
  export {};
@@ -1,3 +1,3 @@
1
1
  import type { RendererProps } from '../type';
2
- export type OrderCellContainerProps = Pick<RendererProps, 'value' | 'columnLayout' | 'orderCellProps' | 'previousValue' | 'isTotalRow'>;
2
+ export type OrderCellContainerProps = Pick<RendererProps, 'value' | 'columnLayout' | 'orderCellProps' | 'previousValue' | 'isTotalRow' | 'isMockData'>;
3
3
  export declare const OrderCellContainer: React.FC<OrderCellContainerProps>;
@@ -1,2 +1,2 @@
1
1
  import type { RendererProps } from './type';
2
- export declare const OrderIdCell: ({ value }: Pick<RendererProps<string>, "value">) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const OrderIdCell: ({ value, isMockData }: Pick<RendererProps<string>, "value" | "isMockData">) => import("react/jsx-runtime").JSX.Element;
@@ -12,4 +12,5 @@ export type RendererProps<T = ReportValueType> = {
12
12
  orderCellProps?: OrderCellProps;
13
13
  isTotalRow?: ReportValueType;
14
14
  isDimensionCol?: boolean;
15
+ isMockData?: boolean;
15
16
  };
@@ -10,6 +10,7 @@ interface RowProps {
10
10
  orderCellProps?: OrderCellProps;
11
11
  isHideCampaignContent: boolean;
12
12
  minWidth?: number;
13
+ isMockData?: boolean;
13
14
  }
14
- export declare const Row: ({ row, rowIndex, columns, dimensions, prevRow, columnLayoutMap, orderCellProps, isHideCampaignContent, minWidth, }: RowProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const Row: ({ row, rowIndex, columns, dimensions, prevRow, columnLayoutMap, orderCellProps, isHideCampaignContent, minWidth, isMockData, }: RowProps) => import("react/jsx-runtime").JSX.Element;
15
16
  export {};
@@ -6,6 +6,7 @@ interface PaginationProps {
6
6
  showViewAllButton: boolean;
7
7
  paginationProps?: GPaginationProps;
8
8
  isPaginationHidden: boolean;
9
+ isMockData?: boolean;
9
10
  }
10
- export declare const Pagination: ({ totalRows, itemCount, viewAllMetricContent, showViewAllButton, paginationProps, isPaginationHidden, }: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
11
+ export declare const Pagination: ({ totalRows, itemCount, viewAllMetricContent, showViewAllButton, paginationProps, isPaginationHidden, isMockData, }: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
11
12
  export {};
@@ -6,6 +6,7 @@ interface WrapperFooterProps {
6
6
  showViewAllButton: boolean;
7
7
  paginationProps?: GPaginationProps;
8
8
  isPaginationHidden: boolean;
9
+ isMockData?: boolean;
9
10
  }
10
- export declare const WrapperFooter: ({ scrollbarContainerRef, itemCount, totalPaginationRows, showViewAllButton, paginationProps, isPaginationHidden, }: WrapperFooterProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const WrapperFooter: ({ scrollbarContainerRef, itemCount, totalPaginationRows, showViewAllButton, paginationProps, isPaginationHidden, isMockData, }: WrapperFooterProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export {};