@levi-gemcommerce/analytics 3.0.1-dev.3 → 3.0.1-dev.5
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/dist/esm/components/OrderAnalytic/types/order.d.ts +1 -1
- package/package.json +38 -15
- package/src/api/graphql/fragments/pathAnalytic.generated.ts +0 -26
- package/src/assets/img/all-sessions.png +0 -0
- package/src/assets/img/analytic-empty.png +0 -0
- package/src/assets/img/first-session.png +0 -0
- package/src/assets/img/page-only.png +0 -0
- package/src/assets/svg/gemx-skeleton.svg +0 -12
- package/src/assets/svg/product.svg +0 -18
- package/src/components/AnalyticMode/AnalyticModeSelector.tsx +0 -50
- package/src/components/AnalyticMode/index.ts +0 -2
- package/src/components/CardPathAnalysis/CardJourneyAnalysis.tsx +0 -33
- package/src/components/CardPathAnalysis/assets/img/analytic-gemx.png +0 -0
- package/src/components/CardPathAnalysis/assets/styles/PathAnalysis.scss +0 -60
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardAnalyticEmpty.tsx +0 -45
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysis.tsx +0 -53
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisContent.tsx +0 -65
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisEmpty.tsx +0 -29
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisSkeleton.tsx +0 -12
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisWrapper.tsx +0 -43
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/index.ts +0 -1
- package/src/components/CardPathAnalysis/components/PathAnalysisChart.tsx +0 -55
- package/src/components/CardPathAnalysis/components/index.ts +0 -1
- package/src/components/CardPathAnalysis/configs/index.ts +0 -2
- package/src/components/CardPathAnalysis/constants/index.ts +0 -1
- package/src/components/CardPathAnalysis/constants/path-analysis.ts +0 -162
- package/src/components/CardPathAnalysis/contexts/PathAnalysisConfigProvider.tsx +0 -66
- package/src/components/CardPathAnalysis/contexts/PathAnalysisProvider.tsx +0 -130
- package/src/components/CardPathAnalysis/contexts/index.ts +0 -2
- package/src/components/CardPathAnalysis/helpers/index.ts +0 -2
- package/src/components/CardPathAnalysis/helpers/metricHelpers.ts +0 -13
- package/src/components/CardPathAnalysis/helpers/pathAnalysis.ts +0 -96
- package/src/components/CardPathAnalysis/helpers/pathAnalysisChart.ts +0 -128
- package/src/components/CardPathAnalysis/helpers/treeUtils.ts +0 -38
- package/src/components/CardPathAnalysis/hooks/usePathAnalysisChart.tsx +0 -292
- package/src/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.ts +0 -206
- package/src/components/CardPathAnalysis/hooks/usePathAnalyticsMerger.ts +0 -43
- package/src/components/CardPathAnalysis/index.ts +0 -5
- package/src/components/CardPathAnalysis/stores/funnel-chart.ts +0 -30
- package/src/components/CardPathAnalysis/stores/index.ts +0 -3
- package/src/components/CardPathAnalysis/stores/path-analysis-campaign.ts +0 -16
- package/src/components/CardPathAnalysis/stores/path-analysis.ts +0 -11
- package/src/components/CardPathAnalysis/types/index.ts +0 -1
- package/src/components/CardPathAnalysis/types/path-analysis.ts +0 -10
- package/src/components/CurrencySelector/CurrencySelector.tsx +0 -127
- package/src/components/CurrencySelector/index.ts +0 -2
- package/src/components/GModalOrderJourney/GModalOrderJourney.tsx +0 -131
- package/src/components/GModalOrderJourney/components/OrderJourneySkeleton.tsx +0 -93
- package/src/components/GModalOrderJourney/components/index.ts +0 -1
- package/src/components/GModalOrderJourney/context/OrderJourneyContext.tsx +0 -17
- package/src/components/GModalOrderJourney/context/index.ts +0 -1
- package/src/components/GModalOrderJourney/hooks/index.ts +0 -1
- package/src/components/GModalOrderJourney/hooks/useGModalOrderJourney.ts +0 -25
- package/src/components/GModalOrderJourney/index.ts +0 -5
- package/src/components/GModalOrderJourney/types/index.ts +0 -4
- package/src/components/GModalOrderJourney/utils/index.ts +0 -75
- package/src/components/GSelectableMetricChartCard/GSelectableMetricChartCard.tsx +0 -83
- package/src/components/GSelectableMetricChartCard/MetricChartTab.tsx +0 -56
- package/src/components/GSelectableMetricChartCard/index.ts +0 -2
- package/src/components/GTimePicker/GTimePicker.tsx +0 -31
- package/src/components/GTimePicker/components/BaseTimePicker.tsx +0 -249
- package/src/components/GTimePicker/components/CompareTimePicker.tsx +0 -41
- package/src/components/GTimePicker/components/DateTimeFilterAddition.tsx +0 -84
- package/src/components/GTimePicker/components/DateTimeFilterInputs.tsx +0 -124
- package/src/components/GTimePicker/components/DateTimeFilters.tsx +0 -86
- package/src/components/GTimePicker/components/MainTimePicker.tsx +0 -47
- package/src/components/GTimePicker/components/index.ts +0 -2
- package/src/components/GTimePicker/constants/compareDateTimePicker.ts +0 -68
- package/src/components/GTimePicker/constants/datePicker.ts +0 -14
- package/src/components/GTimePicker/constants/index.ts +0 -2
- package/src/components/GTimePicker/constants/mainDataTimePicker.ts +0 -88
- package/src/components/GTimePicker/contexts/DateTimePickerProvider.tsx +0 -125
- package/src/components/GTimePicker/contexts/index.ts +0 -1
- package/src/components/GTimePicker/helpers/date-range-info.ts +0 -84
- package/src/components/GTimePicker/helpers/index.ts +0 -4
- package/src/components/GTimePicker/helpers/parse-date.ts +0 -127
- package/src/components/GTimePicker/helpers/time-picker.ts +0 -123
- package/src/components/GTimePicker/helpers/version.ts +0 -36
- package/src/components/GTimePicker/hooks/index.ts +0 -3
- package/src/components/GTimePicker/hooks/useCompareDateTimePicker.tsx +0 -79
- package/src/components/GTimePicker/hooks/useDateTimeFilter.ts +0 -83
- package/src/components/GTimePicker/hooks/useDateTimePicker.tsx +0 -99
- package/src/components/GTimePicker/hooks/useVersionDateTimeFilters.ts +0 -30
- package/src/components/GTimePicker/index.ts +0 -7
- package/src/components/GTimePicker/types/index.ts +0 -43
- package/src/components/MetricDonutChartCard/MetricDonutChartCard.tsx +0 -121
- package/src/components/MetricDonutChartCard/index.ts +0 -2
- package/src/components/MetricDonutChartCard/utils/donut-chart.ts +0 -75
- package/src/components/MetricDonutChartCard/utils/index.ts +0 -1
- package/src/components/OrderAnalytic/OrderListingLatestTable.tsx +0 -111
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/OrderListingTableSkeleton.tsx +0 -40
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonCellContent.tsx +0 -77
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonHeader.tsx +0 -35
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonRow.tsx +0 -35
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonSummaryRow.tsx +0 -36
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/constants.ts +0 -11
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/index.ts +0 -1
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingTable.tsx +0 -159
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingTableEmpty.tsx +0 -29
- package/src/components/OrderAnalytic/components/OrderListing/index.ts +0 -2
- package/src/components/OrderAnalytic/components/index.ts +0 -1
- package/src/components/OrderAnalytic/constants/index.ts +0 -2
- package/src/components/OrderAnalytic/constants/order-columns.ts +0 -51
- package/src/components/OrderAnalytic/constants/order-listing.ts +0 -199
- package/src/components/OrderAnalytic/helpers/index.ts +0 -1
- package/src/components/OrderAnalytic/helpers/order-listing.ts +0 -48
- package/src/components/OrderAnalytic/hooks/index.ts +0 -1
- package/src/components/OrderAnalytic/hooks/useOrderListingData.ts +0 -55
- package/src/components/OrderAnalytic/index.ts +0 -5
- package/src/components/OrderAnalytic/stores/index.ts +0 -2
- package/src/components/OrderAnalytic/stores/order-columns-selector.ts +0 -24
- package/src/components/OrderAnalytic/stores/order-control.ts +0 -15
- package/src/components/OrderAnalytic/types/index.ts +0 -3
- package/src/components/OrderAnalytic/types/order.ts +0 -89
- package/src/components/OrderAnalytic/types/orderListing.ts +0 -4
- package/src/components/OrderAnalytic/types/report.ts +0 -14
- package/src/components/SingleMetricChartCard/SingleMetricChartCard.tsx +0 -56
- package/src/components/SingleMetricChartCard/index.tsx +0 -2
- package/src/components/common/chart/GChartSkeleton.tsx +0 -5
- package/src/components/common/chart/MetricChart.tsx +0 -62
- package/src/components/common/chart/MetricChartEmpty.tsx +0 -35
- package/src/components/common/chart/MetricChartTooltip.tsx +0 -74
- package/src/components/common/chart/MetricDonutChartSkeleton.tsx +0 -14
- package/src/components/common/chart/MetricInfoBlock.tsx +0 -66
- package/src/components/common/chart/MetricInfoSkeleton.tsx +0 -25
- package/src/components/common/chart/MetricValueSummary.tsx +0 -23
- package/src/components/common/chart/index.ts +0 -8
- package/src/components/common/icons/DownIcon8px.tsx +0 -14
- package/src/components/common/icons/UpIcon8px.tsx +0 -14
- package/src/components/common/icons/index.ts +0 -2
- package/src/components/common/percent/MetricPercentage.tsx +0 -42
- package/src/components/common/percent/index.ts +0 -1
- package/src/components/index.ts +0 -9
- package/src/constants/analytic-metric-tooltip.tsx +0 -164
- package/src/constants/breakdown-targets.ts +0 -25
- package/src/constants/campaign.ts +0 -4
- package/src/constants/chart.ts +0 -17
- package/src/constants/currency.ts +0 -3
- package/src/constants/index.ts +0 -6
- package/src/constants/thumbnail.ts +0 -3
- package/src/core/gemxql/api/index.ts +0 -2
- package/src/core/gemxql/api/useCustomGemXQlQuery.ts +0 -35
- package/src/core/gemxql/api/useGemxQlNamedQuery.ts +0 -34
- package/src/core/gemxql/builder/build-gemxql-query.ts +0 -81
- package/src/core/gemxql/builder/clauses/condition-query.ts +0 -74
- package/src/core/gemxql/builder/clauses/from-query.ts +0 -18
- package/src/core/gemxql/builder/clauses/group-query.ts +0 -43
- package/src/core/gemxql/builder/clauses/index.ts +0 -11
- package/src/core/gemxql/builder/clauses/limit-query.ts +0 -15
- package/src/core/gemxql/builder/clauses/mode-query.ts +0 -14
- package/src/core/gemxql/builder/clauses/offset-query.ts +0 -15
- package/src/core/gemxql/builder/clauses/order-by-query.ts +0 -37
- package/src/core/gemxql/builder/clauses/show-query.ts +0 -18
- package/src/core/gemxql/builder/clauses/time-query.ts +0 -67
- package/src/core/gemxql/builder/clauses/time-series-query.ts +0 -15
- package/src/core/gemxql/builder/clauses/timezone-query.ts +0 -17
- package/src/core/gemxql/builder/configs/date-formats.ts +0 -1
- package/src/core/gemxql/builder/configs/index.ts +0 -3
- package/src/core/gemxql/builder/configs/keywords.ts +0 -16
- package/src/core/gemxql/builder/configs/query-defaults.ts +0 -1
- package/src/core/gemxql/builder/filters/build-extra-conditions.ts +0 -69
- package/src/core/gemxql/builder/filters/build-filter-conditions.ts +0 -161
- package/src/core/gemxql/builder/filters/index.ts +0 -2
- package/src/core/gemxql/builder/helpers/date-query-helpers.ts +0 -41
- package/src/core/gemxql/builder/helpers/index.ts +0 -1
- package/src/core/gemxql/builder/helpers/is-valid-query-input.ts +0 -8
- package/src/core/gemxql/builder/index.ts +0 -6
- package/src/core/gemxql/builder/parse-gemxql-query.ts +0 -43
- package/src/core/gemxql/constants/analytic-data.ts +0 -2
- package/src/core/gemxql/constants/column-keys.ts +0 -4
- package/src/core/gemxql/constants/index.ts +0 -4
- package/src/core/gemxql/constants/operators.ts +0 -2
- package/src/core/gemxql/constants/row-reader-mode.ts +0 -9
- package/src/core/gemxql/graphql/fragments/gemxql.generated.ts +0 -80
- package/src/core/gemxql/graphql/fragments/gemxql.gql +0 -18
- package/src/core/gemxql/graphql/index.ts +0 -2
- package/src/core/gemxql/graphql/queries/gemxql.generated.ts +0 -26
- package/src/core/gemxql/graphql/queries/gemxql.gql +0 -5
- package/src/core/gemxql/helpers/columnKeys.ts +0 -8
- package/src/core/gemxql/helpers/extractQueryData.ts +0 -18
- package/src/core/gemxql/helpers/formatAnalyticData.ts +0 -92
- package/src/core/gemxql/helpers/formatAnalyticDate.ts +0 -29
- package/src/core/gemxql/helpers/getTimeDimension.ts +0 -11
- package/src/core/gemxql/helpers/hasMetricData.ts +0 -6
- package/src/core/gemxql/helpers/index.ts +0 -8
- package/src/core/gemxql/helpers/parseJsonFields.ts +0 -36
- package/src/core/gemxql/helpers/readNumeric.ts +0 -25
- package/src/core/gemxql/hooks/index.ts +0 -2
- package/src/core/gemxql/hooks/useAnalyticData.ts +0 -67
- package/src/core/gemxql/hooks/useGemXQlPagination.ts +0 -79
- package/src/core/gemxql/index.ts +0 -8
- package/src/core/gemxql/types/analytic-data.ts +0 -26
- package/src/core/gemxql/types/analytic-source.ts +0 -4
- package/src/core/gemxql/types/extra-condition.ts +0 -40
- package/src/core/gemxql/types/field-filters.ts +0 -18
- package/src/core/gemxql/types/field-operators.ts +0 -8
- package/src/core/gemxql/types/filter-types.ts +0 -33
- package/src/core/gemxql/types/group-with-clause.ts +0 -12
- package/src/core/gemxql/types/index.ts +0 -11
- package/src/core/gemxql/types/order-by.ts +0 -13
- package/src/core/gemxql/types/page-fields.ts +0 -25
- package/src/core/gemxql/types/row-reader-mode.ts +0 -6
- package/src/core/gemxql/types/time-dimension.ts +0 -8
- package/src/global.d.ts +0 -38
- package/src/hooks/index.ts +0 -7
- package/src/hooks/publish/index.ts +0 -2
- package/src/hooks/publish/useStickyDetectById.ts +0 -39
- package/src/hooks/publish/useStickyFilterBoxProps.ts +0 -26
- package/src/hooks/publish/useWindowSize.ts +0 -54
- package/src/hooks/useEnhancedEffect.ts +0 -3
- package/src/hooks/useFetchCurrencyRates.ts +0 -48
- package/src/hooks/useFormatLineChartData.ts +0 -28
- package/src/hooks/usePopoverResizeObserver.ts +0 -43
- package/src/hooks/usePreventBodyScroll.ts +0 -15
- package/src/hooks/useSearchParams.ts +0 -7
- package/src/hooks/useToggle.ts +0 -23
- package/src/index.ts +0 -10
- package/src/modules/analytics/constants/index.ts +0 -124
- package/src/modules/analytics/index.ts +0 -3
- package/src/modules/analytics/types/index.ts +0 -43
- package/src/modules/analytics/utils/formatMetric.ts +0 -42
- package/src/modules/analytics/utils/getPAMetricValue.ts +0 -11
- package/src/modules/analytics/utils/index.ts +0 -3
- package/src/modules/analytics/utils/metric.ts +0 -172
- package/src/providers/ConvertMoneyProvider.tsx +0 -68
- package/src/providers/MetricChartProvider.tsx +0 -50
- package/src/providers/TimezoneProvider.tsx +0 -31
- package/src/providers/index.ts +0 -5
- package/src/shared/charts/components/ComboChart.tsx +0 -108
- package/src/shared/charts/components/GBarChart.tsx +0 -96
- package/src/shared/charts/components/GComboChart.tsx +0 -15
- package/src/shared/charts/components/GDonutChart.tsx +0 -25
- package/src/shared/charts/components/GFunnelChart/GFunnelChart.tsx +0 -34
- package/src/shared/charts/components/GFunnelChart/components/FunnelChartAction.tsx +0 -67
- package/src/shared/charts/components/GFunnelChart/components/FunnelChartActionIcon.tsx +0 -60
- package/src/shared/charts/components/GFunnelChart/components/FunnelChartActionWrapper.tsx +0 -100
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionContent.tsx +0 -92
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionHeader.tsx +0 -54
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionItem.tsx +0 -51
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionPopover.tsx +0 -95
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/index.ts +0 -1
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/type.ts +0 -7
- package/src/shared/charts/components/GFunnelChart/components/types.ts +0 -24
- package/src/shared/charts/components/GFunnelChart/index.ts +0 -4
- package/src/shared/charts/components/GFunnelChart/types.ts +0 -11
- package/src/shared/charts/components/GPolarisViz/components/Arc/Arc.module.scss +0 -7
- package/src/shared/charts/components/GPolarisViz/components/Arc/Arc.tsx +0 -135
- package/src/shared/charts/components/GPolarisViz/components/Arc/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/ChartContainer.module.scss +0 -39
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/ChartContainer.tsx +0 -150
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/hooks/useContainerBounds.ts +0 -113
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/ChartDiv.tsx +0 -18
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/ChartElements.module.scss +0 -21
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/ChartSVG.tsx +0 -40
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/index.ts +0 -7
- package/src/shared/charts/components/GPolarisViz/components/ChartErrorBoundary/ChartErrorBoundary.tsx +0 -56
- package/src/shared/charts/components/GPolarisViz/components/ChartErrorBoundary/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartErrorBoundary/utilities/checkForMismatchedData.ts +0 -34
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/ChartSkeleton.module.scss +0 -6
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/ChartSkeleton.tsx +0 -96
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/DonutSkeleton/DonutSkeleton.module.scss +0 -41
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/DonutSkeleton/DonutSkeleton.tsx +0 -193
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/DonutSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/ErrorText/ErrorText.tsx +0 -40
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/ErrorText/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/FunnelSkeleton/FunnelSkeleton.tsx +0 -69
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/FunnelSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/GridSkeleton/GridSkeleton.tsx +0 -155
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/GridSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/Shimmer/Shimmer.module.scss +0 -33
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/Shimmer/Shimmer.tsx +0 -34
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/Shimmer/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleBarSkeleton/SimpleBarSkeleton.module.scss +0 -15
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleBarSkeleton/SimpleBarSkeleton.tsx +0 -53
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleBarSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleNormalizedSkeleton/SimpleNormalizedSkeleton.module.scss +0 -35
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleNormalizedSkeleton/SimpleNormalizedSkeleton.tsx +0 -75
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleNormalizedSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SparkSkeleton/SparkSkeleton.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SparkSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/index.ts +0 -8
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/index.ts +0 -9
- package/src/shared/charts/components/GPolarisViz/components/ConicGradientWithStops/ConicGradientWithStops.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/ConicGradientWithStops/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/DefaultPreview/DefaultPreview.module.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/components/DefaultPreview/DefaultPreview.tsx +0 -25
- package/src/shared/charts/components/GPolarisViz/components/DefaultPreview/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/Chart.tsx +0 -209
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/FunnelChart.tsx +0 -72
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/FunnelChartXAxisArrows.tsx +0 -52
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/FunnelChartXAxisLabels.tsx +0 -66
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/FunnelSegment.tsx +0 -121
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/Label.module.scss +0 -23
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/Label.tsx +0 -67
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/index.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/Chart.tsx +0 -259
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/FunnelChartNext.tsx +0 -104
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelChartLabels/FunnelChartLabels.tsx +0 -387
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelChartLabels/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelTooltip/FunnelTooltip.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelTooltip/FunnelTooltip.tsx +0 -37
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelTooltip/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/ScaleIcon.tsx +0 -20
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/ScaleIconTooltip.tsx +0 -31
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/CustomTooltip.tsx +0 -68
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/Tooltip.scss +0 -52
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/Tooltip.tsx +0 -149
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/TooltipOverlay.tsx +0 -117
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/TooltipWithPortal.tsx +0 -12
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/index.ts +0 -8
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/constants.ts +0 -28
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/hooks/useTooltipInteraction.ts +0 -59
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/hooks/useTooltipPlacement.ts +0 -113
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/index.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/types.ts +0 -13
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/utilities/calculate-dropoff.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/utilities/useBuildFunnelTrends.ts +0 -108
- package/src/shared/charts/components/GPolarisViz/components/HorizontalGridLines/HorizontalGridLines.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/HorizontalGridLines/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/Labels/SingleTextLine.tsx +0 -64
- package/src/shared/charts/components/GPolarisViz/components/Labels/hooks/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/Labels/hooks/useLabels.tsx +0 -131
- package/src/shared/charts/components/GPolarisViz/components/Labels/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/endLineTruncate.ts +0 -23
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/endWordTruncate.ts +0 -34
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/estimateTextHeight.ts +0 -31
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/formatAndAddEllipsis.ts +0 -12
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getDiagonalLabels.ts +0 -70
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getHorizontalLabels.ts +0 -90
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getVerticalLabels.ts +0 -58
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getWidestLabel.ts +0 -15
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/shouldSkipLabel.ts +0 -11
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/endWordTruncate.test.ts +0 -16
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/estimateTextHeight.test.ts +0 -19
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/formatAndAddEllipsis.test.ts +0 -9
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/truncateLastLine.test.ts +0 -22
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/truncateSingleLine.test.ts +0 -15
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/truncateLabels.ts +0 -75
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/truncateLastLine.ts +0 -61
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/truncateSingleLine.ts +0 -39
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/LinePreview.module.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/LinePreview.tsx +0 -105
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/constants.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/SwallowErrors/SwallowErrors.tsx +0 -32
- package/src/shared/charts/components/GPolarisViz/components/SwallowErrors/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TextLine/TextLine.tsx +0 -88
- package/src/shared/charts/components/GPolarisViz/components/TextLine/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/TooltipContent.tsx +0 -109
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipContentContainer/TooltipContentContainer.module.scss +0 -10
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipContentContainer/TooltipContentContainer.tsx +0 -67
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipContentContainer/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipRow/TooltipRow.module.scss +0 -26
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipRow/TooltipRow.tsx +0 -57
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipRow/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeries/TooltipSeries.module.scss +0 -4
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeries/TooltipSeries.tsx +0 -26
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeries/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeriesName/TooltipSeriesName.module.scss +0 -4
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeriesName/TooltipSeriesName.tsx +0 -20
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeriesName/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipTitle/TooltipTitle.module.scss +0 -7
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipTitle/TooltipTitle.tsx +0 -15
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipTitle/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/index.ts +0 -5
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/constants.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/hooks/useGetLongestLabelFromData.ts +0 -56
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/index.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/utilities/get-tooltip-template-content-column-count.ts +0 -10
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/utilities/tests/get-tooltip-template-content-column-count.test.ts +0 -48
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/TooltipWrapper.tsx +0 -338
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/components/TooltipAnimatedContainer.module.scss +0 -6
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/components/TooltipAnimatedContainer.tsx +0 -139
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/constants.ts +0 -18
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/index.ts +0 -5
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/types.ts +0 -62
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/eventPoint.ts +0 -84
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getAlteredHorizontalBarPosition.ts +0 -110
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getAlteredLineChartPosition.ts +0 -115
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getAlteredVerticalBarPosition.ts +0 -105
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getDonutChartTooltipPosition.ts +0 -64
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getHorizontalBarChartTooltipPosition.ts +0 -79
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getLineChartTooltipPosition.ts +0 -68
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getVerticalBarChartTooltipPosition.ts +0 -123
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/shouldBlockTooltipEvents.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities.ts +0 -162
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/TrendIndicator.tsx +0 -72
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Arrows/ArrowDown.tsx +0 -12
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Arrows/ArrowUp.tsx +0 -12
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Arrows/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Svg/Svg.scss +0 -7
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Svg/Svg.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Svg/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/constants.ts +0 -12
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/index.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/utilities/estimateTrendIndicatorWidth.ts +0 -9
- package/src/shared/charts/components/GPolarisViz/components/VerticalBarChart/utilities/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/VerticalBarChart/utilities/sortBarChartData.ts +0 -20
- package/src/shared/charts/components/GPolarisViz/components/VerticalGridLines/VerticalGridLines.tsx +0 -32
- package/src/shared/charts/components/GPolarisViz/components/VerticalGridLines/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/index.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/constants.ts +0 -72
- package/src/shared/charts/components/GPolarisViz/data/character-width-offsets.json +0 -65
- package/src/shared/charts/components/GPolarisViz/data/character-widths.json +0 -1
- package/src/shared/charts/components/GPolarisViz/hooks/index.ts +0 -5
- package/src/shared/charts/components/GPolarisViz/hooks/useBarSpringConfig.ts +0 -21
- package/src/shared/charts/components/GPolarisViz/hooks/useBrowserCheck.ts +0 -13
- package/src/shared/charts/components/GPolarisViz/hooks/useCallbackRef.tsx +0 -39
- package/src/shared/charts/components/GPolarisViz/hooks/useDataForHorizontalChart.ts +0 -69
- package/src/shared/charts/components/GPolarisViz/hooks/useDebouncedCallback.ts +0 -197
- package/src/shared/charts/components/GPolarisViz/hooks/useFormattedLabels.ts +0 -31
- package/src/shared/charts/components/GPolarisViz/hooks/useFunnelBarScaling.ts +0 -53
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalBarSizes.ts +0 -70
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalStackedValues.ts +0 -34
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalTicksAndScale.ts +0 -67
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalXScale.ts +0 -48
- package/src/shared/charts/components/GPolarisViz/hooks/useIndexForLabels.ts +0 -16
- package/src/shared/charts/components/GPolarisViz/hooks/usePrefersReducedMotion.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/hooks/usePrintResizing.ts +0 -94
- package/src/shared/charts/components/GPolarisViz/hooks/useReducedLabelIndexes.ts +0 -21
- package/src/shared/charts/components/GPolarisViz/hooks/useResizeObserver.ts +0 -39
- package/src/shared/charts/components/GPolarisViz/hooks/useRootContainer.ts +0 -20
- package/src/shared/charts/components/GPolarisViz/hooks/useWatchColorVisionEvents.tsx +0 -35
- package/src/shared/charts/components/GPolarisViz/index.ts +0 -10
- package/src/shared/charts/components/GPolarisViz/shared/Bar/Bar.tsx +0 -89
- package/src/shared/charts/components/GPolarisViz/shared/Bar/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/FunnelChartConnector.tsx +0 -46
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/FunnelChartConnectorGradient.tsx +0 -21
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/constants.ts +0 -11
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/FunnelChartSegment.tsx +0 -100
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/components/AnimatedSegment.tsx +0 -50
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/components/InteractiveOverlay.tsx +0 -34
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/components/ScaledSegment.tsx +0 -218
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/constants.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/shared/SeriesIcon/SeriesIcon.tsx +0 -22
- package/src/shared/charts/components/GPolarisViz/shared/SeriesIcon/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/shared/ZeroValueLine/ZeroValueLine.tsx +0 -45
- package/src/shared/charts/components/GPolarisViz/shared/ZeroValueLine/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/shared/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/styles/_common.scss +0 -15
- package/src/shared/charts/components/GPolarisViz/styles/shared/_accessibility.scss +0 -41
- package/src/shared/charts/components/GPolarisViz/styles/shared/_chart-container.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/styles/shared/_variables.scss +0 -322
- package/src/shared/charts/components/GPolarisViz/types.ts +0 -261
- package/src/shared/charts/components/GPolarisViz/utilities/base.ts +0 -13
- package/src/shared/charts/components/GPolarisViz/utilities/classnames.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/utilities/createCssConicGradient.ts +0 -12
- package/src/shared/charts/components/GPolarisViz/utilities/createCssGradient.ts +0 -7
- package/src/shared/charts/components/GPolarisViz/utilities/estimateStringWidthWithOffset.ts +0 -15
- package/src/shared/charts/components/GPolarisViz/utilities/getAxisOptions.ts +0 -26
- package/src/shared/charts/components/GPolarisViz/utilities/getCSSBackgroundFromColor.ts +0 -8
- package/src/shared/charts/components/GPolarisViz/utilities/getChartId.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/utilities/getFontSize.ts +0 -7
- package/src/shared/charts/components/GPolarisViz/utilities/getStackedMinMax.ts +0 -43
- package/src/shared/charts/components/GPolarisViz/utilities/getStackedValues.ts +0 -35
- package/src/shared/charts/components/GPolarisViz/utilities/getStackedValuesFromDataSeries.tsx +0 -30
- package/src/shared/charts/components/GPolarisViz/utilities/getTrendIndicatorData.ts +0 -22
- package/src/shared/charts/components/GPolarisViz/utilities/hasHiddenComparisonSeries.ts +0 -26
- package/src/shared/charts/components/GPolarisViz/utilities/index.ts +0 -6
- package/src/shared/charts/components/GSimpleBarChart.tsx +0 -32
- package/src/shared/charts/components/index.ts +0 -7
- package/src/shared/charts/constants/chart.ts +0 -14
- package/src/shared/charts/constants/index.ts +0 -1
- package/src/shared/charts/contexts/GChartProvider.tsx +0 -48
- package/src/shared/charts/contexts/index.ts +0 -1
- package/src/shared/charts/index.ts +0 -4
- package/src/shared/charts/types/chart.ts +0 -36
- package/src/shared/charts/types/index.ts +0 -1
- package/src/shared/components/GActivatorPopover/GActivatorPopover.tsx +0 -107
- package/src/shared/components/GActivatorPopover/index.ts +0 -1
- package/src/shared/components/GBlockCenter/GBlockCenter.scss +0 -19
- package/src/shared/components/GBlockCenter/GBlockCenter.tsx +0 -72
- package/src/shared/components/GBlockCenter/index.ts +0 -1
- package/src/shared/components/GBox/GBox.scss +0 -25
- package/src/shared/components/GBox/GBox.tsx +0 -15
- package/src/shared/components/GBox/index.ts +0 -1
- package/src/shared/components/GBoxCard/GBoxCard.tsx +0 -27
- package/src/shared/components/GBoxCard/index.ts +0 -1
- package/src/shared/components/GButton/GButton.scss +0 -41
- package/src/shared/components/GButton/GButton.tsx +0 -73
- package/src/shared/components/GButton/index.ts +0 -1
- package/src/shared/components/GCheckbox/GCheckbox.tsx +0 -176
- package/src/shared/components/GCheckbox/index.ts +0 -1
- package/src/shared/components/GChoice/ChoiceHelpText.tsx +0 -25
- package/src/shared/components/GChoice/GChoice.scss +0 -14
- package/src/shared/components/GChoice/GChoice.tsx +0 -165
- package/src/shared/components/GChoice/index.ts +0 -2
- package/src/shared/components/GClickable/GClickable.tsx +0 -43
- package/src/shared/components/GClickable/index.ts +0 -1
- package/src/shared/components/GDiv/GDiv.tsx +0 -27
- package/src/shared/components/GDiv/index.ts +0 -1
- package/src/shared/components/GDotInline/GDotInline.tsx +0 -20
- package/src/shared/components/GDotInline/index.ts +0 -1
- package/src/shared/components/GFeatureLocked/GFeatureLocked.tsx +0 -85
- package/src/shared/components/GFeatureLocked/assets/images/empty-analytics.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-campaign-group-template-illustration.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-campaign-group-template.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-page-listing-illustration.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-page-listing.png +0 -0
- package/src/shared/components/GFeatureLocked/constants.ts +0 -33
- package/src/shared/components/GFeatureLocked/index.ts +0 -2
- package/src/shared/components/GFeatureLocked/types.ts +0 -16
- package/src/shared/components/GI18NText/GI18NText.tsx +0 -37
- package/src/shared/components/GI18NText/index.ts +0 -2
- package/src/shared/components/GI18NText/types.ts +0 -7
- package/src/shared/components/GInlineCenter/GInlineCenter.scss +0 -17
- package/src/shared/components/GInlineCenter/GInlineCenter.tsx +0 -39
- package/src/shared/components/GInlineCenter/index.ts +0 -1
- package/src/shared/components/GMockDataTooltip/GMockDataTooltip.tsx +0 -30
- package/src/shared/components/GMockDataTooltip/index.ts +0 -1
- package/src/shared/components/GModal/GModal.tsx +0 -49
- package/src/shared/components/GModal/index.ts +0 -1
- package/src/shared/components/GOptionList/GOptionList.tsx +0 -63
- package/src/shared/components/GOptionList/index.ts +0 -1
- package/src/shared/components/GPagination/GPagination.tsx +0 -44
- package/src/shared/components/GPagination/hooks/useGPagination.ts +0 -42
- package/src/shared/components/GPagination/index.ts +0 -2
- package/src/shared/components/GSelector/GSelector.tsx +0 -198
- package/src/shared/components/GSelector/index.ts +0 -1
- package/src/shared/components/GSkeletonDisplayText/GSkeletonDisplayText.tsx +0 -14
- package/src/shared/components/GSkeletonDisplayText/index.ts +0 -1
- package/src/shared/components/GSpinner/GSpinner.tsx +0 -16
- package/src/shared/components/GSpinner/index.ts +0 -1
- package/src/shared/components/GTextLink/GTextLink.tsx +0 -26
- package/src/shared/components/GTextLink/index.ts +0 -1
- package/src/shared/components/GTextTooltip/GTextTooltip.tsx +0 -18
- package/src/shared/components/GTextTooltip/index.ts +0 -1
- package/src/shared/components/GTextTruncated/GTextTruncated.tsx +0 -80
- package/src/shared/components/GTextTruncated/index.ts +0 -1
- package/src/shared/components/GThumbnail/GThumbnail.scss +0 -5
- package/src/shared/components/GThumbnail/GThumbnail.tsx +0 -69
- package/src/shared/components/GThumbnail/index.ts +0 -1
- package/src/shared/components/GTooltip/GTooltip.tsx +0 -34
- package/src/shared/components/GTooltip/components/GTooltipCard.tsx +0 -164
- package/src/shared/components/GTooltip/index.ts +0 -3
- package/src/shared/components/GTooltipCard/GTooltipCard.tsx +0 -161
- package/src/shared/components/GTooltipCard/index.ts +0 -7
- package/src/shared/components/GVariantBadge/GVariant.tsx +0 -55
- package/src/shared/components/GVariantBadge/GVariantBadge.scss +0 -10
- package/src/shared/components/GVariantBadge/GVariantBadge.tsx +0 -82
- package/src/shared/components/GVariantBadge/index.ts +0 -4
- package/src/shared/components/GVariantBadge/types.ts +0 -20
- package/src/shared/components/GViewBySelector/GViewBySelector.tsx +0 -114
- package/src/shared/components/GViewBySelector/index.ts +0 -1
- package/src/shared/components/index.ts +0 -26
- package/src/shared/index.ts +0 -1
- package/src/shared/journey/common/JourneyContainer/components/JourneyContainer.tsx +0 -140
- package/src/shared/journey/common/JourneyContainer/components/JourneyTimeline.tsx +0 -18
- package/src/shared/journey/common/JourneyContainer/components/index.ts +0 -2
- package/src/shared/journey/common/JourneyContainer/index.ts +0 -1
- package/src/shared/journey/common/index.ts +0 -1
- package/src/shared/journey/index.ts +0 -2
- package/src/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/AcceptedPostPurchaseOffer.tsx +0 -24
- package/src/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/CheckoutCompleted.tsx +0 -64
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutItems.tsx +0 -27
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.tsx +0 -25
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStartedDetail.tsx +0 -79
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutStarted/index.ts +0 -2
- package/src/shared/journey/ui/JourneyEvents/components/PageViewed/PageViewed.tsx +0 -116
- package/src/shared/journey/ui/JourneyEvents/components/PageViewed/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/ProductAddedToCart.tsx +0 -24
- package/src/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/ProductQuantity/ProductQuantity.tsx +0 -33
- package/src/shared/journey/ui/JourneyEvents/components/ProductQuantity/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/ProductRemovedFromCart.tsx +0 -24
- package/src/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/index.ts +0 -6
- package/src/shared/journey/ui/JourneyEvents/constants/event.ts +0 -38
- package/src/shared/journey/ui/JourneyEvents/constants/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/index.ts +0 -2
- package/src/shared/journey/ui/JourneyEvents/types.ts +0 -2
- package/src/shared/journey/ui/JourneyGroup/JourneyGroup.tsx +0 -41
- package/src/shared/journey/ui/JourneyGroup/index.ts +0 -1
- package/src/shared/journey/ui/JourneyItem/components/EventMarkerIcon.tsx +0 -28
- package/src/shared/journey/ui/JourneyItem/components/JourneyDetail.tsx +0 -24
- package/src/shared/journey/ui/JourneyItem/components/JourneyItem.tsx +0 -27
- package/src/shared/journey/ui/JourneyItem/components/JourneyTime.tsx +0 -33
- package/src/shared/journey/ui/JourneyItem/components/QuantityWrapper.tsx +0 -17
- package/src/shared/journey/ui/JourneyItem/components/index.ts +0 -3
- package/src/shared/journey/ui/JourneyItem/index.ts +0 -2
- package/src/shared/journey/ui/JourneyItem/types/events.ts +0 -33
- package/src/shared/journey/ui/JourneyItem/types/index.ts +0 -1
- package/src/shared/journey/ui/JourneyTitle/components/GemxIdBadge.tsx +0 -38
- package/src/shared/journey/ui/JourneyTitle/components/JourneyDateBadge.tsx +0 -18
- package/src/shared/journey/ui/JourneyTitle/components/JourneyIdBadge.tsx +0 -65
- package/src/shared/journey/ui/JourneyTitle/components/JourneyLoadMore.tsx +0 -43
- package/src/shared/journey/ui/JourneyTitle/components/JourneyTitle.tsx +0 -42
- package/src/shared/journey/ui/JourneyTitle/components/index.ts +0 -2
- package/src/shared/journey/ui/JourneyTitle/constants/idBadge.ts +0 -1
- package/src/shared/journey/ui/JourneyTitle/constants/index.ts +0 -1
- package/src/shared/journey/ui/JourneyTitle/index.ts +0 -1
- package/src/shared/journey/ui/index.ts +0 -3
- package/src/shared/journey/ui/type.ts +0 -2
- package/src/shared/reports/common/Visualization/constants/columns.ts +0 -6
- package/src/shared/reports/common/Visualization/constants/index.ts +0 -2
- package/src/shared/reports/common/Visualization/constants/version.ts +0 -8
- package/src/shared/reports/common/Visualization/index.ts +0 -2
- package/src/shared/reports/common/Visualization/types/chart.ts +0 -5
- package/src/shared/reports/common/Visualization/types/index.ts +0 -3
- package/src/shared/reports/common/Visualization/types/report-metric.ts +0 -21
- package/src/shared/reports/common/Visualization/types/report.ts +0 -42
- package/src/shared/reports/common/Visualization/utils/index.ts +0 -2
- package/src/shared/reports/common/Visualization/utils/version.ts +0 -9
- package/src/shared/reports/common/Visualization/utils/visualization.ts +0 -58
- package/src/shared/reports/common/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/ReportTable.tsx +0 -194
- package/src/shared/reports/ui/ReportTable/ReportTableSkeleton.tsx +0 -73
- package/src/shared/reports/ui/ReportTable/assets/styles/ReportTable.scss +0 -288
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/CampaignsCell.tsx +0 -102
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/CampaignsCellVersion.tsx +0 -11
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/Cell.tsx +0 -93
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CellRenderers.tsx +0 -72
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/DateCell.tsx +0 -9
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/DefaultCell.tsx +0 -32
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/GemxIdCell.tsx +0 -18
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/CheckoutStartedDetail.tsx +0 -79
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/ItemsCell.tsx +0 -56
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/NoneCell.tsx +0 -11
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/LoadingData.tsx +0 -10
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/NoData.tsx +0 -13
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCell.tsx +0 -78
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellBase.tsx +0 -55
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellContainer.tsx +0 -43
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderItem.tsx +0 -79
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderIdCell.tsx +0 -70
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/PreviousCell.tsx +0 -17
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/TotalCell.tsx +0 -14
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/VersionCell.tsx +0 -31
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/WrapperCell.tsx +0 -31
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/type.ts +0 -18
- package/src/shared/reports/ui/ReportTable/components/Body/Row.tsx +0 -85
- package/src/shared/reports/ui/ReportTable/components/Body/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/components/Footer/Pagination.tsx +0 -76
- package/src/shared/reports/ui/ReportTable/components/Footer/ScrollBar.tsx +0 -19
- package/src/shared/reports/ui/ReportTable/components/Footer/WrapperFooter.tsx +0 -39
- package/src/shared/reports/ui/ReportTable/components/Footer/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Header/Header.tsx +0 -68
- package/src/shared/reports/ui/ReportTable/components/Header/SortableHeader.tsx +0 -49
- package/src/shared/reports/ui/ReportTable/components/Header/SortableHeaderWithTooltip.tsx +0 -60
- package/src/shared/reports/ui/ReportTable/components/Header/SummaryCell.tsx +0 -26
- package/src/shared/reports/ui/ReportTable/components/Header/SummaryRow.tsx +0 -69
- package/src/shared/reports/ui/ReportTable/components/Header/WrapperHeader.tsx +0 -54
- package/src/shared/reports/ui/ReportTable/components/Header/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/constants/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/constants/order.ts +0 -30
- package/src/shared/reports/ui/ReportTable/constants/table.ts +0 -17
- package/src/shared/reports/ui/ReportTable/context/ReportTableActionsContext.tsx +0 -28
- package/src/shared/reports/ui/ReportTable/helpers/format.ts +0 -29
- package/src/shared/reports/ui/ReportTable/helpers/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/helpers/report.ts +0 -7
- package/src/shared/reports/ui/ReportTable/hooks/index.ts +0 -3
- package/src/shared/reports/ui/ReportTable/hooks/useReportTable.ts +0 -172
- package/src/shared/reports/ui/ReportTable/hooks/useReportTableCell.tsx +0 -28
- package/src/shared/reports/ui/ReportTable/hooks/useSyncedScroll.ts +0 -81
- package/src/shared/reports/ui/ReportTable/index.ts +0 -4
- package/src/shared/reports/ui/ReportTable/types/dimension.ts +0 -8
- package/src/shared/reports/ui/ReportTable/types/index.ts +0 -43
- package/src/shared/reports/ui/ReportTable/types/order.ts +0 -15
- package/src/shared/reports/ui/ReportTable/types/report-columns.ts +0 -11
- package/src/shared/reports/ui/ReportTable/utils/format.ts +0 -100
- package/src/shared/reports/ui/ReportTable/utils/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/utils/order.ts +0 -8
- package/src/shared/reports/ui/ReportTable/utils/table.ts +0 -19
- package/src/shared/reports/ui/ReportTable/utils/visualization.ts +0 -56
- package/src/shared/reports/ui/index.ts +0 -0
- package/src/stores/currencyRatesStore.ts +0 -13
- package/src/stores/index.ts +0 -2
- package/src/styles/index.scss +0 -9
- package/src/types/analytic-mode.ts +0 -5
- package/src/types/breakdown-items.ts +0 -21
- package/src/types/campaign.ts +0 -13
- package/src/types/chart.ts +0 -42
- package/src/types/currency.ts +0 -329
- package/src/types/index.ts +0 -8
- package/src/types/metric.ts +0 -81
- package/src/types/pricing.ts +0 -38
- package/src/types/report-columns.ts +0 -1
- package/src/types/template.ts +0 -19
- package/src/utils/analytics.ts +0 -75
- package/src/utils/array.ts +0 -13
- package/src/utils/cls.ts +0 -18
- package/src/utils/currency.ts +0 -42
- package/src/utils/date-time.ts +0 -7
- package/src/utils/dayjs.ts +0 -52
- package/src/utils/deep-copy.ts +0 -4
- package/src/utils/index.ts +0 -12
- package/src/utils/is-browser.ts +0 -3
- package/src/utils/number.ts +0 -19
- package/src/utils/percentage.ts +0 -40
- package/src/utils/sort.ts +0 -87
- package/src/utils/string.ts +0 -20
- package/src/utils/template-type.ts +0 -30
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { Shape, Color, TrendIndicator as TrendIndicatorType } from '@shopify/polaris-viz-core';
|
|
2
|
-
|
|
3
|
-
import { SeriesIcon } from '../../../../shared/SeriesIcon';
|
|
4
|
-
import { PREVIEW_ICON_SIZE } from '../../../../constants';
|
|
5
|
-
import { TrendIndicator } from '../../../TrendIndicator';
|
|
6
|
-
import { useTheme } from '@shopify/polaris-viz-core';
|
|
7
|
-
import { TITLE_MARGIN } from '../../constants';
|
|
8
|
-
|
|
9
|
-
import styles from './TooltipRow.module.scss';
|
|
10
|
-
|
|
11
|
-
export interface Props {
|
|
12
|
-
label: string;
|
|
13
|
-
shape: Shape;
|
|
14
|
-
value: string;
|
|
15
|
-
color?: Color;
|
|
16
|
-
isComparison?: boolean;
|
|
17
|
-
renderSeriesIcon?: () => React.ReactNode;
|
|
18
|
-
trend?: TrendIndicatorType;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function TooltipRow({ color, isComparison = false, label, renderSeriesIcon, shape, trend, value }: Props) {
|
|
22
|
-
const selectedTheme = useTheme();
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div className={styles.Row}>
|
|
26
|
-
{color != null && (
|
|
27
|
-
<div style={{ width: PREVIEW_ICON_SIZE }}>
|
|
28
|
-
{renderSeriesIcon?.() ?? (
|
|
29
|
-
<SeriesIcon color={color} shape={shape} lineStyle={isComparison ? 'dotted' : 'solid'} />
|
|
30
|
-
)}
|
|
31
|
-
</div>
|
|
32
|
-
)}
|
|
33
|
-
<span
|
|
34
|
-
className={styles.Truncate}
|
|
35
|
-
style={{
|
|
36
|
-
color: selectedTheme.tooltip.textColor,
|
|
37
|
-
marginRight: TITLE_MARGIN,
|
|
38
|
-
}}
|
|
39
|
-
>
|
|
40
|
-
{label}
|
|
41
|
-
</span>
|
|
42
|
-
<span
|
|
43
|
-
className={styles.Value}
|
|
44
|
-
style={{
|
|
45
|
-
color: selectedTheme.tooltip.textColor,
|
|
46
|
-
}}
|
|
47
|
-
>
|
|
48
|
-
{value}
|
|
49
|
-
</span>
|
|
50
|
-
{trend != null && (
|
|
51
|
-
<div className={styles.Trend}>
|
|
52
|
-
<TrendIndicator {...trend} />
|
|
53
|
-
</div>
|
|
54
|
-
)}
|
|
55
|
-
</div>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TooltipRow } from './TooltipRow';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
import { useChartContext } from '@shopify/polaris-viz-core';
|
|
4
|
-
import { TooltipSeriesName } from '../TooltipSeriesName';
|
|
5
|
-
import { Fragment } from 'react';
|
|
6
|
-
|
|
7
|
-
import styles from './TooltipSeries.module.scss';
|
|
8
|
-
|
|
9
|
-
export interface Props {
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
name?: string;
|
|
12
|
-
templateColumnCount?: number;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function TooltipSeries({ children, templateColumnCount = 2, name }: Props) {
|
|
16
|
-
const { theme } = useChartContext();
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<Fragment>
|
|
20
|
-
{name != null && <TooltipSeriesName theme={theme}>{name}</TooltipSeriesName>}
|
|
21
|
-
<div className={styles.Series} style={{ gridTemplateColumns: `repeat(${templateColumnCount}, auto)` }}>
|
|
22
|
-
{children}
|
|
23
|
-
</div>
|
|
24
|
-
</Fragment>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TooltipSeries } from './TooltipSeries';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
import { FONT_SIZE, useTheme } from '@shopify/polaris-viz-core';
|
|
4
|
-
import styles from './TooltipSeriesName.module.scss';
|
|
5
|
-
|
|
6
|
-
export function TooltipSeriesName({ children, theme }: { children: ReactNode; theme: string }) {
|
|
7
|
-
const selectedTheme = useTheme(theme);
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<p
|
|
11
|
-
className={styles.AxisTitle}
|
|
12
|
-
style={{
|
|
13
|
-
color: selectedTheme.tooltip.titleColor,
|
|
14
|
-
fontSize: FONT_SIZE,
|
|
15
|
-
}}
|
|
16
|
-
>
|
|
17
|
-
{children}
|
|
18
|
-
</p>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TooltipSeriesName } from './TooltipSeriesName';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
import { useTheme } from '@shopify/polaris-viz-core';
|
|
4
|
-
|
|
5
|
-
import styles from './TooltipTitle.module.scss';
|
|
6
|
-
|
|
7
|
-
export function TooltipTitle({ children, theme, color }: { children: ReactNode; theme: string; color?: string }) {
|
|
8
|
-
const selectedTheme = useTheme(theme);
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<p className={styles.Title} style={{ color: color ?? selectedTheme.tooltip.titleColor }}>
|
|
12
|
-
{children}
|
|
13
|
-
</p>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TooltipTitle } from './TooltipTitle';
|
package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/index.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { TooltipRow } from './TooltipRow';
|
|
2
|
-
export { TooltipContentContainer } from './TooltipContentContainer';
|
|
3
|
-
export { TooltipTitle } from './TooltipTitle';
|
|
4
|
-
export { TooltipSeriesName } from './TooltipSeriesName';
|
|
5
|
-
export { TooltipSeries } from './TooltipSeries';
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { estimateStringWidth, useChartContext } from '@shopify/polaris-viz-core';
|
|
2
|
-
|
|
3
|
-
import type { TooltipData } from '../../../types';
|
|
4
|
-
|
|
5
|
-
interface Size {
|
|
6
|
-
width: number;
|
|
7
|
-
keyWidth: number;
|
|
8
|
-
valueWidth: number;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function useGetLongestLabelFromData(tooltipData: TooltipData[] = []) {
|
|
12
|
-
const { characterWidths } = useChartContext();
|
|
13
|
-
|
|
14
|
-
const sizes: Size[] = [];
|
|
15
|
-
|
|
16
|
-
if (tooltipData.length === 0) {
|
|
17
|
-
return {
|
|
18
|
-
keyWidth: 0,
|
|
19
|
-
valueWidth: 0,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
tooltipData.forEach(({ data }) => {
|
|
24
|
-
if (!data.length) {
|
|
25
|
-
sizes.push({
|
|
26
|
-
width: 0,
|
|
27
|
-
keyWidth: 0,
|
|
28
|
-
valueWidth: 0,
|
|
29
|
-
});
|
|
30
|
-
} else {
|
|
31
|
-
data.forEach(({ key, value }) => {
|
|
32
|
-
const keyWidth = estimateStringWidth(key, characterWidths);
|
|
33
|
-
const valueWidth = estimateStringWidth(value, characterWidths);
|
|
34
|
-
|
|
35
|
-
sizes.push({
|
|
36
|
-
width: keyWidth + valueWidth,
|
|
37
|
-
keyWidth,
|
|
38
|
-
valueWidth,
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
const { keyWidth, valueWidth } = sizes.reduce((prev, cur) => {
|
|
45
|
-
if (prev!.width < cur.width) {
|
|
46
|
-
return cur;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return prev;
|
|
50
|
-
}, sizes[0])!;
|
|
51
|
-
|
|
52
|
-
return {
|
|
53
|
-
keyWidth,
|
|
54
|
-
valueWidth,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { TooltipContent } from './TooltipContent';
|
|
2
|
-
export type { TooltipContentProps } from './TooltipContent';
|
|
3
|
-
export { TooltipContentContainer, TooltipTitle, TooltipSeriesName, TooltipRow, TooltipSeries } from './components';
|
|
4
|
-
export { getTooltipContentTemplateColumnCount } from './utilities/get-tooltip-template-content-column-count';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { TooltipData } from '../../../types';
|
|
2
|
-
|
|
3
|
-
const DEFAULT_COLUMN_COUNT = 2;
|
|
4
|
-
|
|
5
|
-
export function getTooltipContentTemplateColumnCount(data: TooltipData) {
|
|
6
|
-
const hasTrend = data.data.some(({ trend }) => trend != null);
|
|
7
|
-
const hasColor = data.data.some(({ color }) => color != null);
|
|
8
|
-
|
|
9
|
-
return DEFAULT_COLUMN_COUNT + (hasColor ? 1 : 0) + (hasTrend ? 1 : 0);
|
|
10
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { getTooltipContentTemplateColumnCount } from '../get-tooltip-template-content-column-count';
|
|
2
|
-
import type { TooltipData } from '../../../../types';
|
|
3
|
-
|
|
4
|
-
describe('getTooltipContentTemplateColumnCount()', () => {
|
|
5
|
-
it('returns the default column count when data does not have a trend or color', () => {
|
|
6
|
-
const data: TooltipData = {
|
|
7
|
-
shape: 'Line',
|
|
8
|
-
data: [
|
|
9
|
-
{
|
|
10
|
-
key: 'Sessions from Google ads',
|
|
11
|
-
value: '5250',
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
};
|
|
15
|
-
expect(getTooltipContentTemplateColumnCount(data)).toBe(2);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('adds a column when data has a color', () => {
|
|
19
|
-
const data: TooltipData = {
|
|
20
|
-
shape: 'Line',
|
|
21
|
-
data: [{ key: 'Sessions from Google ads', value: '5250', color: 'red' }],
|
|
22
|
-
};
|
|
23
|
-
expect(getTooltipContentTemplateColumnCount(data)).toBe(3);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('adds a column when data has a trend', () => {
|
|
27
|
-
const data: TooltipData = {
|
|
28
|
-
shape: 'Line',
|
|
29
|
-
data: [{ key: 'Sessions from Google ads', value: '5250', trend: { value: '10%' } }],
|
|
30
|
-
};
|
|
31
|
-
expect(getTooltipContentTemplateColumnCount(data)).toBe(3);
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('returns all columns when data has a color and trend', () => {
|
|
35
|
-
const data: TooltipData = {
|
|
36
|
-
shape: 'Line',
|
|
37
|
-
data: [
|
|
38
|
-
{
|
|
39
|
-
key: 'Sessions from Google ads with color and trend',
|
|
40
|
-
value: '5250',
|
|
41
|
-
color: 'red',
|
|
42
|
-
trend: { value: '10%' },
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
};
|
|
46
|
-
expect(getTooltipContentTemplateColumnCount(data)).toBe(4);
|
|
47
|
-
});
|
|
48
|
-
});
|
package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/TooltipWrapper.tsx
DELETED
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
import type { DataType, BoundingRect, DataSeries, ChartType } from '@shopify/polaris-viz-core';
|
|
2
|
-
import type { ScaleBand, ScaleLinear } from 'd3-scale';
|
|
3
|
-
import type { TooltipPosition } from './types';
|
|
4
|
-
import type { Margin } from '../../types';
|
|
5
|
-
import type { ReactNode } from 'react';
|
|
6
|
-
|
|
7
|
-
import { getHorizontalBarChartTooltipPosition } from './utilities/getHorizontalBarChartTooltipPosition';
|
|
8
|
-
import { getVerticalBarChartTooltipPosition } from './utilities/getVerticalBarChartTooltipPosition';
|
|
9
|
-
import { getDonutChartTooltipPosition } from './utilities/getDonutChartTooltipPosition';
|
|
10
|
-
import { getLineChartTooltipPosition } from './utilities/getLineChartTooltipPosition';
|
|
11
|
-
import { TooltipAnimatedContainer } from './components/TooltipAnimatedContainer';
|
|
12
|
-
import { shouldBlockTooltipEvents } from './utilities/shouldBlockTooltipEvents';
|
|
13
|
-
import { InternalChartType, useChartContext } from '@shopify/polaris-viz-core';
|
|
14
|
-
import { useEffect, useRef, useState, useMemo, useCallback } from 'react';
|
|
15
|
-
import { useRootContainer } from '../../hooks/useRootContainer';
|
|
16
|
-
import { DEFAULT_TOOLTIP_POSITION } from './constants';
|
|
17
|
-
import { SwallowErrors } from '../SwallowErrors';
|
|
18
|
-
import { TOOLTIP_ID } from '../../constants';
|
|
19
|
-
import { createPortal } from 'react-dom';
|
|
20
|
-
|
|
21
|
-
const TOUCH_START_DELAY = 300;
|
|
22
|
-
|
|
23
|
-
interface BaseProps {
|
|
24
|
-
chartBounds: BoundingRect;
|
|
25
|
-
chartType: InternalChartType;
|
|
26
|
-
focusElementDataType: DataType;
|
|
27
|
-
getMarkup: (index: number) => ReactNode;
|
|
28
|
-
margin: Margin;
|
|
29
|
-
parentElement: SVGSVGElement | null;
|
|
30
|
-
bandwidth?: number;
|
|
31
|
-
data?: DataSeries[];
|
|
32
|
-
forceActiveIndex?: number | null;
|
|
33
|
-
onIndexChange?: (index: number | null) => void;
|
|
34
|
-
id?: string;
|
|
35
|
-
longestSeriesIndex?: number;
|
|
36
|
-
type?: ChartType;
|
|
37
|
-
xScale?: ScaleLinear<number, number> | ScaleBand<string>;
|
|
38
|
-
yScale?: ScaleLinear<number, number>;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function TooltipWrapperRaw(props: BaseProps) {
|
|
42
|
-
const {
|
|
43
|
-
bandwidth = 0,
|
|
44
|
-
chartBounds,
|
|
45
|
-
chartType,
|
|
46
|
-
data,
|
|
47
|
-
forceActiveIndex,
|
|
48
|
-
focusElementDataType,
|
|
49
|
-
id,
|
|
50
|
-
longestSeriesIndex,
|
|
51
|
-
onIndexChange,
|
|
52
|
-
parentElement,
|
|
53
|
-
type,
|
|
54
|
-
xScale,
|
|
55
|
-
yScale,
|
|
56
|
-
} = props;
|
|
57
|
-
const { scrollContainer, isTouchDevice, containerBounds } = useChartContext();
|
|
58
|
-
const [position, setPosition] = useState<TooltipPosition>({
|
|
59
|
-
x: 0,
|
|
60
|
-
y: 0,
|
|
61
|
-
activeIndex: -1,
|
|
62
|
-
position: DEFAULT_TOOLTIP_POSITION,
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
const activeIndexRef = useRef<number | null>(null);
|
|
66
|
-
const touchStartTimer = useRef<number>(0);
|
|
67
|
-
const isLongTouch = useRef(false);
|
|
68
|
-
|
|
69
|
-
const focusElements = useMemo<NodeListOf<SVGPathElement> | undefined>(() => {
|
|
70
|
-
return parentElement?.querySelectorAll(`[data-type="${focusElementDataType}"][aria-hidden="false"]`);
|
|
71
|
-
}, [focusElementDataType, parentElement]);
|
|
72
|
-
|
|
73
|
-
useEffect(() => {
|
|
74
|
-
activeIndexRef.current = position.activeIndex;
|
|
75
|
-
}, [position.activeIndex]);
|
|
76
|
-
|
|
77
|
-
const alwaysUpdatePosition = [InternalChartType.Line, InternalChartType.Donut].includes(chartType) && !isTouchDevice;
|
|
78
|
-
|
|
79
|
-
const getPosition = useCallback(
|
|
80
|
-
({
|
|
81
|
-
event,
|
|
82
|
-
eventType,
|
|
83
|
-
index,
|
|
84
|
-
}: {
|
|
85
|
-
eventType: 'mouse' | 'focus';
|
|
86
|
-
event?: MouseEvent | TouchEvent | FocusEvent;
|
|
87
|
-
index?: number;
|
|
88
|
-
}) => {
|
|
89
|
-
const scrollY = scrollContainer == null ? 0 : scrollContainer.scrollTop;
|
|
90
|
-
|
|
91
|
-
switch (chartType) {
|
|
92
|
-
case InternalChartType.Line:
|
|
93
|
-
return getLineChartTooltipPosition({
|
|
94
|
-
chartBounds,
|
|
95
|
-
containerBounds,
|
|
96
|
-
scrollY,
|
|
97
|
-
data: data ?? [],
|
|
98
|
-
event,
|
|
99
|
-
eventType,
|
|
100
|
-
index,
|
|
101
|
-
isTouchDevice,
|
|
102
|
-
longestSeriesIndex: longestSeriesIndex ?? 0,
|
|
103
|
-
xScale: xScale as ScaleLinear<number, number>,
|
|
104
|
-
});
|
|
105
|
-
case InternalChartType.HorizontalBar:
|
|
106
|
-
return getHorizontalBarChartTooltipPosition({
|
|
107
|
-
chartBounds,
|
|
108
|
-
data: data ?? [],
|
|
109
|
-
event,
|
|
110
|
-
eventType,
|
|
111
|
-
index,
|
|
112
|
-
longestSeriesIndex: longestSeriesIndex ?? 0,
|
|
113
|
-
type,
|
|
114
|
-
xScale: xScale as ScaleLinear<number, number>,
|
|
115
|
-
});
|
|
116
|
-
case InternalChartType.Donut:
|
|
117
|
-
return getDonutChartTooltipPosition({
|
|
118
|
-
containerBounds,
|
|
119
|
-
event,
|
|
120
|
-
eventType,
|
|
121
|
-
index: index ?? forceActiveIndex ?? undefined,
|
|
122
|
-
parentElement,
|
|
123
|
-
});
|
|
124
|
-
case InternalChartType.Bar:
|
|
125
|
-
default:
|
|
126
|
-
return getVerticalBarChartTooltipPosition({
|
|
127
|
-
chartBounds,
|
|
128
|
-
containerBounds,
|
|
129
|
-
data: data ?? [],
|
|
130
|
-
event,
|
|
131
|
-
eventType,
|
|
132
|
-
index,
|
|
133
|
-
longestSeriesIndex: longestSeriesIndex ?? 0,
|
|
134
|
-
type,
|
|
135
|
-
xScale: xScale as ScaleBand<string>,
|
|
136
|
-
yScale: yScale as ScaleLinear<number, number>,
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
[
|
|
141
|
-
chartBounds,
|
|
142
|
-
containerBounds,
|
|
143
|
-
chartType,
|
|
144
|
-
data,
|
|
145
|
-
forceActiveIndex,
|
|
146
|
-
longestSeriesIndex,
|
|
147
|
-
isTouchDevice,
|
|
148
|
-
type,
|
|
149
|
-
xScale,
|
|
150
|
-
yScale,
|
|
151
|
-
scrollContainer,
|
|
152
|
-
parentElement,
|
|
153
|
-
],
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
const showAndPositionTooltip = useCallback(
|
|
157
|
-
(event: MouseEvent | TouchEvent) => {
|
|
158
|
-
const newPosition = getPosition({ event, eventType: 'mouse' });
|
|
159
|
-
|
|
160
|
-
const scrollContainerTop = Number(scrollContainer?.scrollTop ?? 0);
|
|
161
|
-
const y = newPosition.y + scrollContainerTop;
|
|
162
|
-
|
|
163
|
-
if (alwaysUpdatePosition && (newPosition.x < chartBounds.x || y < chartBounds.y)) {
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
if (!alwaysUpdatePosition && activeIndexRef.current === newPosition.activeIndex) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
if (shouldBlockTooltipEvents(event)) {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
setPosition(newPosition);
|
|
176
|
-
onIndexChange?.(newPosition.activeIndex);
|
|
177
|
-
},
|
|
178
|
-
[alwaysUpdatePosition, chartBounds, getPosition, onIndexChange, scrollContainer],
|
|
179
|
-
);
|
|
180
|
-
|
|
181
|
-
const onMouseMove = useCallback(
|
|
182
|
-
(event: MouseEvent | TouchEvent) => {
|
|
183
|
-
window.clearTimeout(touchStartTimer.current);
|
|
184
|
-
|
|
185
|
-
if (typeof TouchEvent !== 'undefined' && event instanceof TouchEvent) {
|
|
186
|
-
if (isLongTouch.current === true) {
|
|
187
|
-
// prevents scrolling after long touch (since it is supposed to move the tooltip/datapoint vs scroll)
|
|
188
|
-
event?.preventDefault();
|
|
189
|
-
} else {
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
showAndPositionTooltip(event);
|
|
195
|
-
},
|
|
196
|
-
[showAndPositionTooltip],
|
|
197
|
-
);
|
|
198
|
-
|
|
199
|
-
const onMouseLeave = useCallback(() => {
|
|
200
|
-
isLongTouch.current = false;
|
|
201
|
-
window.clearTimeout(touchStartTimer.current);
|
|
202
|
-
onIndexChange?.(null);
|
|
203
|
-
setPosition((prevState) => {
|
|
204
|
-
return { ...prevState, activeIndex: -1 };
|
|
205
|
-
});
|
|
206
|
-
}, [onIndexChange]);
|
|
207
|
-
|
|
208
|
-
const onTouchStart = useCallback(
|
|
209
|
-
(event: TouchEvent) => {
|
|
210
|
-
touchStartTimer.current = window.setTimeout(() => {
|
|
211
|
-
event.preventDefault();
|
|
212
|
-
|
|
213
|
-
isLongTouch.current = true;
|
|
214
|
-
|
|
215
|
-
showAndPositionTooltip(event);
|
|
216
|
-
}, TOUCH_START_DELAY);
|
|
217
|
-
},
|
|
218
|
-
[showAndPositionTooltip],
|
|
219
|
-
);
|
|
220
|
-
|
|
221
|
-
const onFocus = useCallback(
|
|
222
|
-
(event: FocusEvent) => {
|
|
223
|
-
const target = event.currentTarget as SVGSVGElement;
|
|
224
|
-
|
|
225
|
-
if (!target) {
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
const index = Number(target.dataset.index);
|
|
230
|
-
const newPosition = getPosition({ event, index, eventType: 'focus' });
|
|
231
|
-
|
|
232
|
-
setPosition(newPosition);
|
|
233
|
-
onIndexChange?.(newPosition.activeIndex);
|
|
234
|
-
},
|
|
235
|
-
[getPosition, onIndexChange],
|
|
236
|
-
);
|
|
237
|
-
|
|
238
|
-
const onFocusIn = useCallback(() => {
|
|
239
|
-
if (!parentElement?.contains(document.activeElement)) {
|
|
240
|
-
onMouseLeave();
|
|
241
|
-
}
|
|
242
|
-
}, [parentElement, onMouseLeave]);
|
|
243
|
-
|
|
244
|
-
const setFocusListeners = useCallback(
|
|
245
|
-
(attach: boolean) => {
|
|
246
|
-
if (!focusElements) {
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
focusElements.forEach((el: SVGPathElement) => {
|
|
251
|
-
if (attach) {
|
|
252
|
-
el.addEventListener('focus', onFocus);
|
|
253
|
-
} else {
|
|
254
|
-
el.removeEventListener('focus', onFocus);
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
},
|
|
258
|
-
[focusElements, onFocus],
|
|
259
|
-
);
|
|
260
|
-
|
|
261
|
-
useEffect(() => {
|
|
262
|
-
if (!parentElement) {
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
parentElement.addEventListener('mousemove', onMouseMove);
|
|
267
|
-
parentElement.addEventListener('mouseleave', onMouseLeave);
|
|
268
|
-
parentElement.addEventListener('touchstart', onTouchStart);
|
|
269
|
-
parentElement.addEventListener('touchmove', onMouseMove);
|
|
270
|
-
parentElement.addEventListener('touchend', onMouseLeave);
|
|
271
|
-
|
|
272
|
-
setFocusListeners(true);
|
|
273
|
-
|
|
274
|
-
return () => {
|
|
275
|
-
parentElement.removeEventListener('mousemove', onMouseMove);
|
|
276
|
-
parentElement.removeEventListener('mouseleave', onMouseLeave);
|
|
277
|
-
parentElement.removeEventListener('touchstart', onTouchStart);
|
|
278
|
-
parentElement.removeEventListener('touchmove', onMouseMove);
|
|
279
|
-
parentElement.removeEventListener('touchend', onMouseLeave);
|
|
280
|
-
|
|
281
|
-
setFocusListeners(false);
|
|
282
|
-
};
|
|
283
|
-
}, [parentElement, onMouseLeave, onTouchStart, setFocusListeners, onMouseMove]);
|
|
284
|
-
|
|
285
|
-
useEffect(() => {
|
|
286
|
-
document.addEventListener('focusin', onFocusIn);
|
|
287
|
-
|
|
288
|
-
return () => {
|
|
289
|
-
document.removeEventListener('focusin', onFocusIn);
|
|
290
|
-
};
|
|
291
|
-
}, [parentElement, onFocusIn]);
|
|
292
|
-
|
|
293
|
-
if (position.activeIndex == null || position.activeIndex < 0) {
|
|
294
|
-
return null;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
return (
|
|
298
|
-
<TooltipAnimatedContainer
|
|
299
|
-
bandwidth={bandwidth}
|
|
300
|
-
chartBounds={chartBounds}
|
|
301
|
-
chartType={chartType}
|
|
302
|
-
currentX={position.x}
|
|
303
|
-
currentY={position.y}
|
|
304
|
-
id={id}
|
|
305
|
-
margin={props.margin}
|
|
306
|
-
position={position.position}
|
|
307
|
-
>
|
|
308
|
-
{props.getMarkup(position.activeIndex)}
|
|
309
|
-
</TooltipAnimatedContainer>
|
|
310
|
-
);
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
interface TooltipWrapperProps extends BaseProps {
|
|
314
|
-
usePortal?: boolean;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
export function TooltipWrapper({ usePortal = false, ...props }: TooltipWrapperProps) {
|
|
318
|
-
if (usePortal) {
|
|
319
|
-
return <TooltipWithPortal {...props} />;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
return <TooltipWithErrors {...props} />;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
function TooltipWithErrors(props: BaseProps) {
|
|
326
|
-
return (
|
|
327
|
-
<SwallowErrors>
|
|
328
|
-
<TooltipWrapperRaw {...props} />
|
|
329
|
-
</SwallowErrors>
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
function TooltipWithPortal(props: BaseProps) {
|
|
334
|
-
const container = useRootContainer(TOOLTIP_ID);
|
|
335
|
-
|
|
336
|
-
if (!container) return null;
|
|
337
|
-
return createPortal(<TooltipWithErrors {...props} />, container);
|
|
338
|
-
}
|