@levi-gemcommerce/analytics 3.0.1-dev.3 → 3.0.1-dev.4
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/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,162 +0,0 @@
|
|
|
1
|
-
export const FUNNEL_POPOVER_KEY = {
|
|
2
|
-
LEVEL_1: 'LEVEL_1',
|
|
3
|
-
LEVEL_2: 'LEVEL_2',
|
|
4
|
-
LEVEL_3: 'LEVEL_3',
|
|
5
|
-
LEVEL_4: 'LEVEL_4',
|
|
6
|
-
LEVEL_5: 'LEVEL_5',
|
|
7
|
-
LEVEL_6: 'LEVEL_6',
|
|
8
|
-
LEVEL_7: 'LEVEL_7',
|
|
9
|
-
ADD_LEVEL: 'ADD_LEVEL',
|
|
10
|
-
} as const;
|
|
11
|
-
|
|
12
|
-
export const MOCK_DATA_PATH_ANALYSIS = [
|
|
13
|
-
{
|
|
14
|
-
data: [
|
|
15
|
-
{
|
|
16
|
-
value: 8500,
|
|
17
|
-
key: 'Home page',
|
|
18
|
-
id: '2552a8bf748314b0',
|
|
19
|
-
chartTooltip: [
|
|
20
|
-
{
|
|
21
|
-
key: 'GemX: CRO & A/B Testing',
|
|
22
|
-
value: '/en-vn',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
key: 'Sessions',
|
|
26
|
-
value: '20',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
key: 'Continuation sessions',
|
|
30
|
-
value: '16',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
key: 'Visitors',
|
|
34
|
-
value: '20',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
key: 'Bounce rate',
|
|
38
|
-
value: '20%',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
key: 'Click-through rate',
|
|
42
|
-
value: '76.19%',
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
value: 7000,
|
|
48
|
-
key: 'Landing page',
|
|
49
|
-
id: '2552a8bf748314b02',
|
|
50
|
-
chartTooltip: [
|
|
51
|
-
{
|
|
52
|
-
key: 'GemX: CRO & A/B Testing',
|
|
53
|
-
value: '/en-vn/products/1',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
key: 'Sessions',
|
|
57
|
-
value: '10',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
key: 'Continuation sessions',
|
|
61
|
-
value: '16',
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
key: 'Visitors',
|
|
65
|
-
value: '20',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
key: 'Bounce rate',
|
|
69
|
-
value: '20%',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
key: 'Click-through rate',
|
|
73
|
-
value: '76.19%',
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
value: 4800,
|
|
79
|
-
key: 'Added to cart',
|
|
80
|
-
labelTooltip: {
|
|
81
|
-
title: 'Sessions with cart additions',
|
|
82
|
-
content: 'Sessions in your online store in which a visitor added item to the cart',
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
value: 2900,
|
|
87
|
-
key: 'Reached checkout',
|
|
88
|
-
labelTooltip: {
|
|
89
|
-
title: 'Sessions that reached checkout',
|
|
90
|
-
content: 'Sessions in your online store in which the checkout page was reached',
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
value: 1100,
|
|
95
|
-
key: 'Completed checkout',
|
|
96
|
-
labelTooltip: {
|
|
97
|
-
title: 'Sessions that completed checkout',
|
|
98
|
-
content: 'Sessions in your online store in which a purchase was completed',
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
],
|
|
102
|
-
name: 'Conversion',
|
|
103
|
-
metadata: {
|
|
104
|
-
trends: {
|
|
105
|
-
'0': {
|
|
106
|
-
value: '33.33%',
|
|
107
|
-
trend: 'negative',
|
|
108
|
-
direction: 'downward',
|
|
109
|
-
},
|
|
110
|
-
'1': {
|
|
111
|
-
value: '46.15%',
|
|
112
|
-
trend: 'positive',
|
|
113
|
-
direction: 'upward',
|
|
114
|
-
},
|
|
115
|
-
'2': {
|
|
116
|
-
value: '46.15%',
|
|
117
|
-
trend: 'positive',
|
|
118
|
-
direction: 'upward',
|
|
119
|
-
},
|
|
120
|
-
'3': {
|
|
121
|
-
value: '46.15%',
|
|
122
|
-
trend: 'positive',
|
|
123
|
-
direction: 'upward',
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: 'Conversion',
|
|
130
|
-
data: [
|
|
131
|
-
{
|
|
132
|
-
value: 1350,
|
|
133
|
-
key: 'Home page',
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
value: 1253,
|
|
137
|
-
key: 'Added to cart',
|
|
138
|
-
labelTooltip: {
|
|
139
|
-
title: 'Sessions with cart additions',
|
|
140
|
-
content: 'Sessions in your online store in which a visitor added item to the cart',
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
value: 1103,
|
|
145
|
-
key: 'Reached checkout',
|
|
146
|
-
labelTooltip: {
|
|
147
|
-
title: 'Sessions that reached checkout',
|
|
148
|
-
content: 'Sessions in your online store in which the checkout page was reached',
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
value: 400,
|
|
153
|
-
key: 'Completed checkout',
|
|
154
|
-
labelTooltip: {
|
|
155
|
-
title: 'Sessions that completed checkout',
|
|
156
|
-
content: 'Sessions in your online store in which a purchase was completed',
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
|
-
isComparison: true,
|
|
161
|
-
},
|
|
162
|
-
];
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { IBasePathAnalyticPageWithChild } from '../types';
|
|
3
|
-
|
|
4
|
-
import { createContext, useContext, useMemo } from 'react';
|
|
5
|
-
|
|
6
|
-
export interface IPathAnalysisPricingConfig {
|
|
7
|
-
isLoading: boolean;
|
|
8
|
-
isPathAnalysisEnabled: boolean;
|
|
9
|
-
onOpenModalPricing: () => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface IPathAnalysisHeatmapConfig {
|
|
13
|
-
isEnabledV1: boolean;
|
|
14
|
-
isEnabledV2: boolean;
|
|
15
|
-
onView: (level: number, pages: IBasePathAnalyticPageWithChild[]) => void;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface IPathAnalysisConfig {
|
|
19
|
-
pricing: IPathAnalysisPricingConfig;
|
|
20
|
-
heatmap: IPathAnalysisHeatmapConfig;
|
|
21
|
-
/**
|
|
22
|
-
* When enabled, the funnel auto-expands every level along the dominant path
|
|
23
|
-
* (first level → highest-traffic child → ... up to MAX_FUNNEL_ADDITIONAL_LEVEL,
|
|
24
|
-
* stopping early when a level has no further paths) and the "+" add button is hidden.
|
|
25
|
-
*/
|
|
26
|
-
autoExpandLevels?: boolean;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const DEFAULT_CONFIG: IPathAnalysisConfig = {
|
|
30
|
-
pricing: {
|
|
31
|
-
isLoading: false,
|
|
32
|
-
isPathAnalysisEnabled: false,
|
|
33
|
-
onOpenModalPricing: () => {},
|
|
34
|
-
},
|
|
35
|
-
heatmap: {
|
|
36
|
-
isEnabledV1: false,
|
|
37
|
-
isEnabledV2: false,
|
|
38
|
-
onView: () => {},
|
|
39
|
-
},
|
|
40
|
-
autoExpandLevels: false,
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const PathAnalysisConfigContext = createContext<IPathAnalysisConfig>(DEFAULT_CONFIG);
|
|
44
|
-
|
|
45
|
-
export interface IPathAnalysisConfigProviderProps {
|
|
46
|
-
children: ReactNode;
|
|
47
|
-
pricing: IPathAnalysisPricingConfig;
|
|
48
|
-
heatmap: IPathAnalysisHeatmapConfig;
|
|
49
|
-
autoExpandLevels?: boolean;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export const PathAnalysisConfigProvider = ({
|
|
53
|
-
children,
|
|
54
|
-
pricing,
|
|
55
|
-
heatmap,
|
|
56
|
-
autoExpandLevels,
|
|
57
|
-
}: IPathAnalysisConfigProviderProps) => {
|
|
58
|
-
const value = useMemo<IPathAnalysisConfig>(
|
|
59
|
-
() => ({ pricing, heatmap, autoExpandLevels }),
|
|
60
|
-
[pricing, heatmap, autoExpandLevels],
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
return <PathAnalysisConfigContext.Provider value={value}>{children}</PathAnalysisConfigContext.Provider>;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const usePathAnalysisConfig = (): IPathAnalysisConfig => useContext(PathAnalysisConfigContext);
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import type { OnChangeFunnelType } from '@/shared/charts';
|
|
2
|
-
import type { EAnalyticMode } from '@/types';
|
|
3
|
-
import type { IBasePathAnalyticPageWithChild, IBasePathAnalyticPageWithParent } from '../types';
|
|
4
|
-
|
|
5
|
-
import { createContext, useContext } from 'react';
|
|
6
|
-
import { usePathAnalysisFunnel } from '../hooks/usePathAnalysisFunnel';
|
|
7
|
-
import { usePathAnalyticsMerger } from '../hooks/usePathAnalyticsMerger';
|
|
8
|
-
import { usePathAnalysisConfig } from './PathAnalysisConfigProvider';
|
|
9
|
-
|
|
10
|
-
export interface IPathAnalysisFirstLevel {
|
|
11
|
-
id: string;
|
|
12
|
-
locationPath: string;
|
|
13
|
-
pageTitle: string;
|
|
14
|
-
pageType: string;
|
|
15
|
-
parentID: string;
|
|
16
|
-
level: number;
|
|
17
|
-
metric: {
|
|
18
|
-
totalSessions: number;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface ICampaignPathsData {
|
|
23
|
-
paths?: IPathAnalysisFirstLevel[];
|
|
24
|
-
isLoading?: boolean;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface IAnalyticsData {
|
|
28
|
-
pathAnalytics?: IBasePathAnalyticPageWithParent[];
|
|
29
|
-
previousPathAnalyticsMap?: Record<string, IBasePathAnalyticPageWithParent>;
|
|
30
|
-
isLoading?: boolean;
|
|
31
|
-
locationPath?: string;
|
|
32
|
-
shopifyPageType?: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface PathAnalysisType {
|
|
36
|
-
mode: EAnalyticMode;
|
|
37
|
-
campaignID?: string;
|
|
38
|
-
campaignGroupID?: string;
|
|
39
|
-
campaignVariantID?: string;
|
|
40
|
-
campaignVersionID?: string;
|
|
41
|
-
pathAnalytics?: IBasePathAnalyticPageWithParent[];
|
|
42
|
-
isLoadingMetric: boolean;
|
|
43
|
-
shopifyPageType?: string;
|
|
44
|
-
pageWithMetric: IBasePathAnalyticPageWithChild | undefined;
|
|
45
|
-
dynamicLevels: IBasePathAnalyticPageWithChild[];
|
|
46
|
-
nextLevelPages: IBasePathAnalyticPageWithChild[];
|
|
47
|
-
previousPathAnalyticsMap: Record<string, IBasePathAnalyticPageWithParent>;
|
|
48
|
-
handleAddNextLevel: (childId: string) => void;
|
|
49
|
-
handleChangeLevel: OnChangeFunnelType;
|
|
50
|
-
getPagesByParentID: (data: { level?: number; parentID?: string }) => IBasePathAnalyticPageWithChild[];
|
|
51
|
-
handleDeleteLevel: (id?: string) => void;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface PathAnalysisProviderProps {
|
|
55
|
-
children: React.ReactNode;
|
|
56
|
-
campaignID?: string;
|
|
57
|
-
campaignGroupID?: string;
|
|
58
|
-
campaignVariantID?: string;
|
|
59
|
-
campaignVersionID?: string;
|
|
60
|
-
mode: EAnalyticMode;
|
|
61
|
-
campaignPathsData?: ICampaignPathsData;
|
|
62
|
-
analyticsData?: IAnalyticsData;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export const PathAnalysisContext = createContext<PathAnalysisType | undefined>(undefined);
|
|
66
|
-
|
|
67
|
-
export const PathAnalysisProvider = (props: PathAnalysisProviderProps) => {
|
|
68
|
-
const {
|
|
69
|
-
children,
|
|
70
|
-
campaignID,
|
|
71
|
-
campaignGroupID,
|
|
72
|
-
campaignVariantID,
|
|
73
|
-
campaignVersionID,
|
|
74
|
-
mode,
|
|
75
|
-
campaignPathsData,
|
|
76
|
-
analyticsData,
|
|
77
|
-
} = props;
|
|
78
|
-
|
|
79
|
-
const dataFirstLevels = campaignPathsData?.paths;
|
|
80
|
-
const isFetchingFirstLevelPaths = campaignPathsData?.isLoading ?? false;
|
|
81
|
-
|
|
82
|
-
const pathAnalytics = analyticsData?.pathAnalytics ?? [];
|
|
83
|
-
const previousPathAnalyticsMap = analyticsData?.previousPathAnalyticsMap ?? {};
|
|
84
|
-
const isLoadingMetric = analyticsData?.isLoading ?? false;
|
|
85
|
-
const locationPath = analyticsData?.locationPath;
|
|
86
|
-
const shopifyPageType = analyticsData?.shopifyPageType;
|
|
87
|
-
|
|
88
|
-
const pathAnalysisCacheKey = JSON.stringify({ mode, campaignVariantID, campaignVersionID });
|
|
89
|
-
|
|
90
|
-
const { autoExpandLevels } = usePathAnalysisConfig();
|
|
91
|
-
|
|
92
|
-
const { processedPathAnalytics } = usePathAnalyticsMerger({ pathAnalytics, dataFirstLevels });
|
|
93
|
-
|
|
94
|
-
const pathAnalysisFunnelData = usePathAnalysisFunnel({
|
|
95
|
-
pathAnalytics: processedPathAnalytics,
|
|
96
|
-
pathAnalysisCacheKey,
|
|
97
|
-
dataFirstLevels,
|
|
98
|
-
locationPath,
|
|
99
|
-
autoExpandLevels,
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
const isLoading = isLoadingMetric || isFetchingFirstLevelPaths;
|
|
103
|
-
|
|
104
|
-
return (
|
|
105
|
-
<PathAnalysisContext.Provider
|
|
106
|
-
value={{
|
|
107
|
-
mode,
|
|
108
|
-
campaignID,
|
|
109
|
-
campaignGroupID,
|
|
110
|
-
campaignVariantID,
|
|
111
|
-
campaignVersionID,
|
|
112
|
-
shopifyPageType,
|
|
113
|
-
pathAnalytics: processedPathAnalytics,
|
|
114
|
-
previousPathAnalyticsMap,
|
|
115
|
-
isLoadingMetric: isLoading,
|
|
116
|
-
...pathAnalysisFunnelData,
|
|
117
|
-
}}
|
|
118
|
-
>
|
|
119
|
-
{children}
|
|
120
|
-
</PathAnalysisContext.Provider>
|
|
121
|
-
);
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
export const usePathAnalysisContext = () => {
|
|
125
|
-
const context = useContext(PathAnalysisContext);
|
|
126
|
-
if (!context) {
|
|
127
|
-
throw new Error('usePathAnalysisContext must be used within a PathAnalysisProvider');
|
|
128
|
-
}
|
|
129
|
-
return context;
|
|
130
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { IBasePageAnalyticMetric } from '@/types/metric';
|
|
2
|
-
|
|
3
|
-
export const getTotalSessionWithCartAdditionMetric = ({ metric }: { metric?: IBasePageAnalyticMetric }) => ({
|
|
4
|
-
value: metric?.totalSessionsWithCartAdditions ?? undefined,
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
export const getTotalSessionReachedCheckoutMetric = ({ metric }: { metric?: IBasePageAnalyticMetric }) => ({
|
|
8
|
-
value: metric?.totalSessionsThatReachedCheckout ?? undefined,
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export const getTotalSessionCompletedCheckoutMetric = ({ metric }: { metric?: IBasePageAnalyticMetric }) => ({
|
|
12
|
-
value: metric?.totalSessionsThatCompletedCheckout ?? undefined,
|
|
13
|
-
});
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import type { IGetTextPrice } from '@/core/gemxql';
|
|
2
|
-
import type { IBasePageAnalyticMetric } from '@/types/metric';
|
|
3
|
-
import type { TemplateType } from '@/types/template';
|
|
4
|
-
import type { IBasePathAnalyticPageWithChild, IBasePathAnalyticPageWithParent } from '../types';
|
|
5
|
-
|
|
6
|
-
import { formatMetricByFormatter, getPAMetricValueV2, PAGE_ANALYTIC_MAPPING } from '@/modules/analytics';
|
|
7
|
-
import { IPAMetricKey } from '@/modules/analytics/types';
|
|
8
|
-
import { numberWithCommas, parseTemplateType } from '@/utils';
|
|
9
|
-
|
|
10
|
-
import { buildTree, removeDuplicates } from './treeUtils';
|
|
11
|
-
|
|
12
|
-
export const processPathAnalytics = (
|
|
13
|
-
analyticsData: IBasePathAnalyticPageWithParent[] | undefined,
|
|
14
|
-
locationPath: string,
|
|
15
|
-
): IBasePathAnalyticPageWithChild | undefined => {
|
|
16
|
-
if (!analyticsData) return undefined;
|
|
17
|
-
|
|
18
|
-
const dataTree = processPathAnalyticsTree(analyticsData);
|
|
19
|
-
return dataTree?.find((item) => item.id === locationPath);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const processPathAnalyticsTree = (
|
|
23
|
-
analyticsData: IBasePathAnalyticPageWithParent[] | undefined,
|
|
24
|
-
): IBasePathAnalyticPageWithChild[] | undefined => {
|
|
25
|
-
if (!analyticsData) return undefined;
|
|
26
|
-
|
|
27
|
-
const uniqueData = removeDuplicates(analyticsData, ['id', 'parentID', 'level', 'locationPath']);
|
|
28
|
-
|
|
29
|
-
const updateData = uniqueData.map((item) => ({
|
|
30
|
-
...item,
|
|
31
|
-
metric: item?.metric,
|
|
32
|
-
})) as IBasePathAnalyticPageWithParent[];
|
|
33
|
-
|
|
34
|
-
const dataTree = buildTree<IBasePathAnalyticPageWithChild>(updateData);
|
|
35
|
-
|
|
36
|
-
return dataTree;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const getFunnelChildrenPages = (
|
|
40
|
-
page: IBasePathAnalyticPageWithChild | undefined,
|
|
41
|
-
): IBasePathAnalyticPageWithChild[] => {
|
|
42
|
-
if (!page || !page.children) {
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
return page.children
|
|
46
|
-
.filter((child) => child.id)
|
|
47
|
-
.map((child) => ({
|
|
48
|
-
...child,
|
|
49
|
-
children: getFunnelChildrenPages(child),
|
|
50
|
-
}));
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const getFunnelChartTooltip = (data: { page?: IBasePathAnalyticPageWithChild; getTextPrice: IGetTextPrice }) => {
|
|
54
|
-
const CONTINUATION_SESSIONS_KEY = 'CONTINUATION_SESSIONS_KEY';
|
|
55
|
-
const keys = [
|
|
56
|
-
IPAMetricKey.PAGE_SESSIONS,
|
|
57
|
-
CONTINUATION_SESSIONS_KEY,
|
|
58
|
-
IPAMetricKey.PAGE_VISITORS,
|
|
59
|
-
IPAMetricKey.PAGE_BR,
|
|
60
|
-
IPAMetricKey.PAGE_CTR,
|
|
61
|
-
];
|
|
62
|
-
const { page, getTextPrice } = data;
|
|
63
|
-
|
|
64
|
-
if (!page) return [];
|
|
65
|
-
const metric = page.metric as IBasePageAnalyticMetric;
|
|
66
|
-
const totalContinuationSession = numberWithCommas((page.metric?.totalContinuationSession || 0).toString());
|
|
67
|
-
|
|
68
|
-
const baseInfo = [
|
|
69
|
-
{
|
|
70
|
-
key: page.pageTitle || parseTemplateType(page.pageType as TemplateType),
|
|
71
|
-
value: page.locationPath as string,
|
|
72
|
-
},
|
|
73
|
-
];
|
|
74
|
-
|
|
75
|
-
const metricInfo = keys.map((key) => {
|
|
76
|
-
if (key === CONTINUATION_SESSIONS_KEY) {
|
|
77
|
-
return {
|
|
78
|
-
key: 'Continuation sessions',
|
|
79
|
-
value: totalContinuationSession,
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const metricKey = key as IPAMetricKey;
|
|
84
|
-
const value = getPAMetricValueV2(metric, metricKey);
|
|
85
|
-
return {
|
|
86
|
-
key: PAGE_ANALYTIC_MAPPING[metricKey].heading.title as string,
|
|
87
|
-
value: formatMetricByFormatter({
|
|
88
|
-
value: value.value,
|
|
89
|
-
formatter: value.formatter,
|
|
90
|
-
getTextPrice,
|
|
91
|
-
}),
|
|
92
|
-
};
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
return baseInfo.concat(metricInfo);
|
|
96
|
-
};
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import type { IBasePageAnalyticMetric } from '@/types/metric';
|
|
2
|
-
import type { TrendIndicatorProps } from '@shopify/polaris-viz';
|
|
3
|
-
import type { IBasePathAnalyticPageWithChild } from '../types';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
getTotalSessionCompletedCheckoutMetric,
|
|
7
|
-
getTotalSessionReachedCheckoutMetric,
|
|
8
|
-
getTotalSessionWithCartAdditionMetric,
|
|
9
|
-
} from './metricHelpers';
|
|
10
|
-
import { formatPercentage } from '@/utils';
|
|
11
|
-
export const calculateFunnelTrendChange = ({
|
|
12
|
-
currentValue,
|
|
13
|
-
previousValue,
|
|
14
|
-
}: {
|
|
15
|
-
currentValue?: number;
|
|
16
|
-
previousValue?: number;
|
|
17
|
-
}): TrendIndicatorProps => {
|
|
18
|
-
const shouldSkipComparison =
|
|
19
|
-
typeof currentValue !== 'number' || typeof previousValue !== 'number' || previousValue === 0;
|
|
20
|
-
|
|
21
|
-
if (shouldSkipComparison) return {};
|
|
22
|
-
|
|
23
|
-
const changePercentage = ((currentValue - previousValue) / previousValue) * 100;
|
|
24
|
-
const formattedChange = formatPercentage(Math.abs(changePercentage));
|
|
25
|
-
const trend = changePercentage > 0 ? 'positive' : changePercentage < 0 ? 'negative' : 'neutral';
|
|
26
|
-
const direction = changePercentage > 0 ? 'upward' : changePercentage < 0 ? 'downward' : undefined;
|
|
27
|
-
|
|
28
|
-
return { value: formattedChange, trend, direction };
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const calculateFirstLevelTrend = ({
|
|
32
|
-
pageWithMetric,
|
|
33
|
-
previousPathAnalyticsMap,
|
|
34
|
-
}: {
|
|
35
|
-
pageWithMetric?: IBasePathAnalyticPageWithChild;
|
|
36
|
-
previousPathAnalyticsMap: Record<string, IBasePathAnalyticPageWithChild>;
|
|
37
|
-
}) => {
|
|
38
|
-
if (!pageWithMetric) return null;
|
|
39
|
-
|
|
40
|
-
const currentValue = pageWithMetric?.metric?.totalSessions ?? undefined;
|
|
41
|
-
const previousValue = previousPathAnalyticsMap[`${pageWithMetric?.id}`]?.metric?.totalSessions ?? undefined;
|
|
42
|
-
|
|
43
|
-
return calculateFunnelTrendChange({ currentValue, previousValue });
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const calculateDynamicLevelsTrends = (
|
|
47
|
-
dynamicLevels: IBasePathAnalyticPageWithChild[],
|
|
48
|
-
previousPathAnalyticsMap: Record<string, IBasePathAnalyticPageWithChild>,
|
|
49
|
-
) => {
|
|
50
|
-
const trends: Record<string, TrendIndicatorProps> = {};
|
|
51
|
-
|
|
52
|
-
dynamicLevels.forEach((level, index) => {
|
|
53
|
-
const levelPreviousData = previousPathAnalyticsMap[level.id];
|
|
54
|
-
|
|
55
|
-
const levelTrend = calculateFunnelTrendChange({
|
|
56
|
-
currentValue: level.metric?.totalSessions ?? undefined,
|
|
57
|
-
previousValue: levelPreviousData?.metric?.totalSessions ?? undefined,
|
|
58
|
-
});
|
|
59
|
-
trends[`${index + 1}`] = levelTrend;
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
return trends;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const calculateConversionMetricsTrends = (
|
|
66
|
-
dynamicLevels: IBasePathAnalyticPageWithChild[],
|
|
67
|
-
previousPathAnalyticsMap: Record<string, IBasePathAnalyticPageWithChild>,
|
|
68
|
-
pageWithMetric?: IBasePathAnalyticPageWithChild,
|
|
69
|
-
) => {
|
|
70
|
-
const lastLevel = dynamicLevels[dynamicLevels.length - 1] || pageWithMetric;
|
|
71
|
-
const lastLevelPreviousData = previousPathAnalyticsMap[lastLevel!.id];
|
|
72
|
-
|
|
73
|
-
const metric = lastLevel?.metric as IBasePageAnalyticMetric;
|
|
74
|
-
const previousMetric = lastLevelPreviousData?.metric as IBasePageAnalyticMetric;
|
|
75
|
-
const totalAddedToCart = getTotalSessionWithCartAdditionMetric({ metric }).value ?? 0;
|
|
76
|
-
const totalReachedCheckout = getTotalSessionReachedCheckoutMetric({ metric }).value ?? 0;
|
|
77
|
-
const totalCompletedCheckout = getTotalSessionCompletedCheckoutMetric({ metric }).value ?? 0;
|
|
78
|
-
|
|
79
|
-
const totalAddedToCartPrevious = getTotalSessionWithCartAdditionMetric({ metric: previousMetric }).value ?? 0;
|
|
80
|
-
const totalReachedCheckoutPrevious = getTotalSessionReachedCheckoutMetric({ metric: previousMetric }).value ?? 0;
|
|
81
|
-
const totalCompletedCheckoutPrevious = getTotalSessionCompletedCheckoutMetric({ metric: previousMetric }).value ?? 0;
|
|
82
|
-
|
|
83
|
-
const trends: Record<string, TrendIndicatorProps> = {};
|
|
84
|
-
const conversionLevelIndex = dynamicLevels.length + 1;
|
|
85
|
-
|
|
86
|
-
const cartTrend = calculateFunnelTrendChange({
|
|
87
|
-
currentValue: Number(totalAddedToCart ?? 0),
|
|
88
|
-
previousValue: Number(totalAddedToCartPrevious ?? 0),
|
|
89
|
-
});
|
|
90
|
-
const checkoutTrend = calculateFunnelTrendChange({
|
|
91
|
-
currentValue: Number(totalReachedCheckout ?? 0),
|
|
92
|
-
previousValue: Number(totalReachedCheckoutPrevious ?? 0),
|
|
93
|
-
});
|
|
94
|
-
const completedTrend = calculateFunnelTrendChange({
|
|
95
|
-
currentValue: Number(totalCompletedCheckout ?? 0),
|
|
96
|
-
previousValue: Number(totalCompletedCheckoutPrevious ?? 0),
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
trends[`${conversionLevelIndex}`] = cartTrend;
|
|
100
|
-
trends[`${conversionLevelIndex + 1}`] = checkoutTrend;
|
|
101
|
-
trends[`${conversionLevelIndex + 2}`] = completedTrend;
|
|
102
|
-
|
|
103
|
-
return trends;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export const calculateConversionFunnelTrends = ({
|
|
107
|
-
pageWithMetric,
|
|
108
|
-
previousPathAnalyticsMap,
|
|
109
|
-
dynamicLevels,
|
|
110
|
-
}: {
|
|
111
|
-
pageWithMetric?: IBasePathAnalyticPageWithChild;
|
|
112
|
-
previousPathAnalyticsMap: Record<string, IBasePathAnalyticPageWithChild>;
|
|
113
|
-
dynamicLevels: IBasePathAnalyticPageWithChild[];
|
|
114
|
-
}) => {
|
|
115
|
-
const firstLevelTrend = calculateFirstLevelTrend({
|
|
116
|
-
pageWithMetric,
|
|
117
|
-
previousPathAnalyticsMap,
|
|
118
|
-
});
|
|
119
|
-
if (!firstLevelTrend) return {};
|
|
120
|
-
|
|
121
|
-
const trends: Record<string, TrendIndicatorProps> = {
|
|
122
|
-
'0': firstLevelTrend,
|
|
123
|
-
...calculateDynamicLevelsTrends(dynamicLevels, previousPathAnalyticsMap),
|
|
124
|
-
...calculateConversionMetricsTrends(dynamicLevels, previousPathAnalyticsMap, pageWithMetric),
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
return trends;
|
|
128
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export const removeDuplicates = <T extends object>(data: T[] | undefined, keys: (keyof T)[]): T[] => {
|
|
2
|
-
if (!Array.isArray(data)) return [];
|
|
3
|
-
return [
|
|
4
|
-
...new Map(
|
|
5
|
-
data.map((item) => [keys.map((key) => (item as Record<string, unknown>)[key as string]).join('|'), item]),
|
|
6
|
-
).values(),
|
|
7
|
-
];
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const buildTree = <T extends { id: string; parentID: string; children?: T[]; level?: number | null }>(
|
|
11
|
-
items: T[],
|
|
12
|
-
): T[] => {
|
|
13
|
-
const map: Record<string, T[]> = {};
|
|
14
|
-
const tree: T[] = [];
|
|
15
|
-
|
|
16
|
-
items.forEach((item) => {
|
|
17
|
-
if (!item.parentID) return;
|
|
18
|
-
map[item.parentID] = [...(map[item.parentID] || []), item];
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const buildChildren = (parentId: string, visited: Set<string>): T[] => {
|
|
22
|
-
const children = map[parentId] || [];
|
|
23
|
-
return children
|
|
24
|
-
.filter((child) => child.id !== parentId && !visited.has(child.id))
|
|
25
|
-
.map((child) => ({
|
|
26
|
-
...child,
|
|
27
|
-
children: buildChildren(child.id, new Set(visited).add(child.id)),
|
|
28
|
-
}));
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
items
|
|
32
|
-
.filter((item) => item.level === 1)
|
|
33
|
-
.forEach((rootItem) => {
|
|
34
|
-
tree.push({ ...rootItem, children: buildChildren(rootItem.id, new Set([rootItem.id])) });
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
return tree;
|
|
38
|
-
};
|