@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
package/src/types/metric.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
export enum EMetricKey {
|
|
2
|
-
SESSION = 'sessions',
|
|
3
|
-
ORDERS = 'orders',
|
|
4
|
-
PAGE_VIEWS = 'pageviews',
|
|
5
|
-
VISITORS = 'visitors',
|
|
6
|
-
BOUNCE_RATE = 'bounce_rate',
|
|
7
|
-
CTR = 'ctr',
|
|
8
|
-
CONVERSION_RATE = 'conversion_rate',
|
|
9
|
-
AVG_TIME_ON_PAGE = 'average_time_on_page',
|
|
10
|
-
ADDED_TO_CART = 'added_to_cart',
|
|
11
|
-
ADD_TO_CART_RATE = 'added_to_cart_rate',
|
|
12
|
-
REACHED_CHECKOUT = 'sessions_that_reached_checkout',
|
|
13
|
-
COMPLETE_CHECKOUT = 'sessions_that_completed_checkout',
|
|
14
|
-
CART_ADDITION = 'sessions_with_cart_additions',
|
|
15
|
-
AOV = 'aov',
|
|
16
|
-
REVENUE = 'revenue',
|
|
17
|
-
RPV = 'revenue_per_visitor',
|
|
18
|
-
VISITOR_ITEMS = 'visitor_items',
|
|
19
|
-
DEVICE_ITEMS = 'device_items',
|
|
20
|
-
TRAFFIC_SOURCE_ITEMS = 'traffic_source_items',
|
|
21
|
-
PAGE_PATH_ANALYSIS = 'PAGE_PATH_ANALYSIS',
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface IMetricControl {
|
|
25
|
-
value: string | number | null;
|
|
26
|
-
change: string | number;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface IMetricCardItem {
|
|
30
|
-
key: EMetricKey;
|
|
31
|
-
title: string;
|
|
32
|
-
totalValue: IMetricControl;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface IAnalyticStat {
|
|
36
|
-
totalCount?: number | null;
|
|
37
|
-
type?: string | null;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface IAnalyticMetric {
|
|
41
|
-
date?: string | null;
|
|
42
|
-
totalAddedToCart?: number | null;
|
|
43
|
-
totalClicked?: number | null;
|
|
44
|
-
totalClickedHasHref?: number | null;
|
|
45
|
-
totalOrders?: number | null;
|
|
46
|
-
totalPageViewed?: number | null;
|
|
47
|
-
totalPageViewedHaveTimeOnPage?: number | null;
|
|
48
|
-
totalReachedCheckout?: number | null;
|
|
49
|
-
totalRevenue?: number | null;
|
|
50
|
-
totalSessions?: number | null;
|
|
51
|
-
totalSessionsThatCompletedCheckout?: number | null;
|
|
52
|
-
totalSessionsThatReachedAndCompletedCheckout?: number | null;
|
|
53
|
-
totalSessionsThatReachedCheckout?: number | null;
|
|
54
|
-
totalSessionsWithCartAdditions?: number | null;
|
|
55
|
-
totalSessionsWithoutAction?: number | null;
|
|
56
|
-
totalTimeOnPage?: number | null;
|
|
57
|
-
totalVisitors?: number | null;
|
|
58
|
-
channels?: Array<IAnalyticStat | null> | null;
|
|
59
|
-
devices?: Array<IAnalyticStat | null> | null;
|
|
60
|
-
visitors?: Array<IAnalyticStat | null> | null;
|
|
61
|
-
variantKey?: string;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface IBasePageAnalyticMetric {
|
|
65
|
-
totalPageViewed?: number | null;
|
|
66
|
-
totalVisitors?: number | null;
|
|
67
|
-
totalClicked?: number | null;
|
|
68
|
-
totalAddedToCart?: number | null;
|
|
69
|
-
totalReachedCheckout?: number | null;
|
|
70
|
-
totalOrders?: number | null;
|
|
71
|
-
totalSessions?: number | null;
|
|
72
|
-
totalSessionsThatCompletedCheckout?: number | null;
|
|
73
|
-
totalSessionsThatReachedCheckout?: number | null;
|
|
74
|
-
totalSessionsWithCartAdditions?: number | null;
|
|
75
|
-
totalClickedHasHref?: number | null;
|
|
76
|
-
totalSessionsWithoutAction?: number | null;
|
|
77
|
-
totalContinuationSession?: number | null;
|
|
78
|
-
totalRevenue?: number | null;
|
|
79
|
-
totalTimeOnPage?: number | null;
|
|
80
|
-
totalPageViewedHaveTimeOnPage?: number | null;
|
|
81
|
-
}
|
package/src/types/pricing.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pricing enums mirrored from the host app (`~/modules/pricing/types`).
|
|
3
|
-
*
|
|
4
|
-
* They are duplicated here so the SDK no longer needs to import the host's
|
|
5
|
-
* pricing module directly. The host can import these enums back from
|
|
6
|
-
* `@gem-sdk/analytics/types` to build the value passed to `PathAnalysisConfigProvider`,
|
|
7
|
-
* which guarantees the string values stay in sync on both sides.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export enum IPlanKey {
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated This plan is available for users installed before release 1.3.0.
|
|
13
|
-
*/
|
|
14
|
-
CONTENT_TESTING = 'content-testing',
|
|
15
|
-
PAGE_OPT = 'page-optimize',
|
|
16
|
-
FUNNEL_OPT = 'funnel-optimize',
|
|
17
|
-
PROFIT_OPT = 'profit-optimize',
|
|
18
|
-
// Trial plans
|
|
19
|
-
TRIAL_PAGE_OPT = 'trial-page-optimize',
|
|
20
|
-
TRIAL_FUNNEL_OPT = 'trial-funnel-optimize',
|
|
21
|
-
TRIAL_PROFIT_OPT = 'trial-profit-optimize',
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export enum IShopPlanState {
|
|
25
|
-
TRIAL_PAGE_OPT = 'TRIAL_PAGE_OPT',
|
|
26
|
-
TRIAL_FUNNEL_OPT = 'TRIAL_FUNNEL_OPT',
|
|
27
|
-
TRIAL_PROFIT_OPT = 'TRIAL_PROFIT_OPT',
|
|
28
|
-
ACTIVE_PAGE_OPT = 'ACTIVE_PAGE_OPT',
|
|
29
|
-
ACTIVE_FUNNEL_OPT = 'ACTIVE_FUNNEL_OPT',
|
|
30
|
-
ACTIVE_PROFIT_OPT = 'ACTIVE_PROFIT_OPT',
|
|
31
|
-
|
|
32
|
-
LOADING_PLAN = 'LOADING_PLAN',
|
|
33
|
-
TRIAL_EXPIRED = 'TRIAL_EXPIRED',
|
|
34
|
-
|
|
35
|
-
ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT = 'ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT',
|
|
36
|
-
ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT = 'ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT',
|
|
37
|
-
ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT = 'ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT',
|
|
38
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { EReportColumnKey } from '../shared/reports/ui/ReportTable/types/report-columns';
|
package/src/types/template.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export enum TemplateType {
|
|
2
|
-
ALL = 'all',
|
|
3
|
-
HOME = 'index',
|
|
4
|
-
COLLECTION = 'collection',
|
|
5
|
-
COLLECTION_LIST = 'collection-list',
|
|
6
|
-
PRODUCT = 'product',
|
|
7
|
-
ARTICLE = 'article',
|
|
8
|
-
PAGE = 'page',
|
|
9
|
-
CART = 'cart',
|
|
10
|
-
SEARCH = 'search',
|
|
11
|
-
NOT_FOUND = '404',
|
|
12
|
-
BLOG = 'blog',
|
|
13
|
-
PASSWORD = 'password',
|
|
14
|
-
CONTACT = 'contact',
|
|
15
|
-
GIF_CART = 'gif-cart',
|
|
16
|
-
ACCOUNT = 'account',
|
|
17
|
-
CHECKOUT = 'checkout',
|
|
18
|
-
GIFT_CARD = 'gift-card',
|
|
19
|
-
}
|
package/src/utils/analytics.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { cleanDecimal } from '@/utils/number';
|
|
2
|
-
import { dayjsTz } from '@/utils';
|
|
3
|
-
|
|
4
|
-
export enum AnalyticInterval {
|
|
5
|
-
DAY = 'DAY',
|
|
6
|
-
HOUR = 'HOUR',
|
|
7
|
-
MONTH = 'MONTH',
|
|
8
|
-
QUARTER = 'QUARTER',
|
|
9
|
-
WEEK = 'WEEK',
|
|
10
|
-
YEAR = 'YEAR',
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const SECONDS_IN_MINUTE = 60;
|
|
14
|
-
const SECONDS_IN_HOUR = SECONDS_IN_MINUTE * SECONDS_IN_MINUTE;
|
|
15
|
-
|
|
16
|
-
export const getTimeDurationLabel = (valueInSeconds: number): string => {
|
|
17
|
-
let data = valueInSeconds;
|
|
18
|
-
if (!Number.isFinite(valueInSeconds) || valueInSeconds == null) {
|
|
19
|
-
data = 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const fixedValue = cleanDecimal(data);
|
|
23
|
-
if (data >= SECONDS_IN_HOUR) {
|
|
24
|
-
const hours = Math.floor(data / SECONDS_IN_HOUR);
|
|
25
|
-
const minutes = Math.floor((data % SECONDS_IN_HOUR) / SECONDS_IN_MINUTE);
|
|
26
|
-
const seconds = Math.floor(data % SECONDS_IN_MINUTE);
|
|
27
|
-
return `${hours}h ${minutes}m ${seconds}s`;
|
|
28
|
-
} else if (data >= SECONDS_IN_MINUTE) {
|
|
29
|
-
const minutes = Math.floor(data / SECONDS_IN_MINUTE);
|
|
30
|
-
const seconds = Math.floor(data % SECONDS_IN_MINUTE);
|
|
31
|
-
return `${minutes}m ${seconds}s`;
|
|
32
|
-
} else {
|
|
33
|
-
return `${fixedValue}s`;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const getFormattedByInterval = (
|
|
38
|
-
value: string | number | null,
|
|
39
|
-
interval?: AnalyticInterval,
|
|
40
|
-
options?: { isExpandDetail?: boolean },
|
|
41
|
-
): string => {
|
|
42
|
-
if (!value) return '';
|
|
43
|
-
|
|
44
|
-
const optionFormat = options?.isExpandDetail
|
|
45
|
-
? {
|
|
46
|
-
formatHouse: 'MMM D, h:mm A',
|
|
47
|
-
formatDay: 'MMM D, YYYY',
|
|
48
|
-
formatMonth: 'MMM YYYY',
|
|
49
|
-
formatYear: 'MMM YYYY',
|
|
50
|
-
}
|
|
51
|
-
: {
|
|
52
|
-
formatHouse: 'h A',
|
|
53
|
-
formatDay: 'MMM D',
|
|
54
|
-
formatMonth: 'MMM YYYY',
|
|
55
|
-
formatYear: 'YYYY',
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
switch (interval) {
|
|
59
|
-
case AnalyticInterval.HOUR:
|
|
60
|
-
return dayjsTz(value).format(optionFormat.formatHouse);
|
|
61
|
-
case AnalyticInterval.DAY:
|
|
62
|
-
case AnalyticInterval.WEEK:
|
|
63
|
-
return dayjsTz(value).format(optionFormat.formatDay);
|
|
64
|
-
case AnalyticInterval.MONTH:
|
|
65
|
-
return dayjsTz(value).format(optionFormat.formatMonth);
|
|
66
|
-
case AnalyticInterval.QUARTER: {
|
|
67
|
-
const d = dayjsTz(value);
|
|
68
|
-
return `Q${d.quarter()} ${d.format('YYYY')}`;
|
|
69
|
-
}
|
|
70
|
-
case AnalyticInterval.YEAR:
|
|
71
|
-
return dayjsTz(value).format(optionFormat.formatYear);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return dayjsTz(value).format(optionFormat.formatMonth);
|
|
75
|
-
};
|
package/src/utils/array.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export function findLastIndex<T>(
|
|
2
|
-
array: T[],
|
|
3
|
-
predicate: (value: T, index: number, array: T[]) => boolean,
|
|
4
|
-
thisArg?: unknown,
|
|
5
|
-
): number {
|
|
6
|
-
for (let i = array.length - 1; i >= 0; i--) {
|
|
7
|
-
if (predicate.call(thisArg, array[i] as T, i, array)) {
|
|
8
|
-
return i;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return -1;
|
|
13
|
-
}
|
package/src/utils/cls.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
type ClassDictionary = Record<string, boolean | undefined | null>;
|
|
2
|
-
type ClassValue = ClassDictionary | string | null | undefined;
|
|
3
|
-
|
|
4
|
-
function toVal(mix: ClassValue) {
|
|
5
|
-
if (typeof mix === 'string') {
|
|
6
|
-
return mix;
|
|
7
|
-
} else if (typeof mix === 'object' && mix !== null) {
|
|
8
|
-
return Object.keys(mix)
|
|
9
|
-
.filter((key) => mix[key])
|
|
10
|
-
.join(' ');
|
|
11
|
-
} else {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function cls(...classes: ClassValue[]) {
|
|
17
|
-
return classes.map(toVal).filter(Boolean).join(' ');
|
|
18
|
-
}
|
package/src/utils/currency.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_CURRENCY_ANALYTIC } from '@/constants';
|
|
2
|
-
|
|
3
|
-
export interface IGetPriceByCurrencyOptions {
|
|
4
|
-
locale?: string;
|
|
5
|
-
compact?: boolean;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const getPriceByCurrency = (
|
|
9
|
-
price?: string | number | null,
|
|
10
|
-
currency: string = DEFAULT_CURRENCY_ANALYTIC,
|
|
11
|
-
options?: string | IGetPriceByCurrencyOptions,
|
|
12
|
-
): string | undefined => {
|
|
13
|
-
if (typeof price === 'string') return price;
|
|
14
|
-
if (typeof price !== 'number') return;
|
|
15
|
-
|
|
16
|
-
// Support legacy 3rd arg as locale string
|
|
17
|
-
const opts = typeof options === 'string' ? { locale: options } : options;
|
|
18
|
-
const locale = opts?.locale ?? 'en-US';
|
|
19
|
-
|
|
20
|
-
// Currency's natural minimum (USD → 2, JPY/KRW/VND → 0); used as the floor for scaled tiers.
|
|
21
|
-
const currencyMinDigits =
|
|
22
|
-
new Intl.NumberFormat(locale, { style: 'currency', currency }).resolvedOptions().minimumFractionDigits ?? 0;
|
|
23
|
-
|
|
24
|
-
// For scaled tiers, allow extra precision but never force decimals on zero-decimal currencies.
|
|
25
|
-
const formatCurrency = (value: number, maxDigits?: number) =>
|
|
26
|
-
new Intl.NumberFormat(locale, {
|
|
27
|
-
style: 'currency',
|
|
28
|
-
currency,
|
|
29
|
-
...(maxDigits != null && {
|
|
30
|
-
minimumFractionDigits: Math.min(currencyMinDigits, maxDigits),
|
|
31
|
-
maximumFractionDigits: maxDigits,
|
|
32
|
-
}),
|
|
33
|
-
}).format(value);
|
|
34
|
-
|
|
35
|
-
const magnitude = Math.abs(price);
|
|
36
|
-
if (magnitude >= 1_000_000_000) return `${formatCurrency(price / 1_000_000_000, 2)}B`;
|
|
37
|
-
if (magnitude >= 1_000_000) return `${formatCurrency(price / 1_000_000, 2)}M`;
|
|
38
|
-
if (opts?.compact && magnitude >= 1_000) return `${formatCurrency(price / 1_000, 1)}K`;
|
|
39
|
-
|
|
40
|
-
// Let Intl pick fraction digits per currency (e.g. JPY/KRW have 0) instead of hardcoding.
|
|
41
|
-
return formatCurrency(price);
|
|
42
|
-
};
|
package/src/utils/date-time.ts
DELETED
package/src/utils/dayjs.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { ConfigType, Dayjs } from 'dayjs';
|
|
2
|
-
|
|
3
|
-
import dayjs from 'dayjs';
|
|
4
|
-
import quarterOfYear from 'dayjs/plugin/quarterOfYear.js';
|
|
5
|
-
import timezone from 'dayjs/plugin/timezone.js';
|
|
6
|
-
import utc from 'dayjs/plugin/utc.js';
|
|
7
|
-
|
|
8
|
-
dayjs.extend(utc);
|
|
9
|
-
dayjs.extend(timezone);
|
|
10
|
-
dayjs.extend(quarterOfYear);
|
|
11
|
-
|
|
12
|
-
// Stored on `globalThis` (not a module-local `let`): each entry-point bundle gets its
|
|
13
|
-
// own copy of this module, so a local var would let `setTz` and the query builder read
|
|
14
|
-
// different copies. A shared global slot keeps every bundle in sync.
|
|
15
|
-
const TZ_GLOBAL_KEY = '__GEM_SDK_ANALYTICS_TZ__';
|
|
16
|
-
|
|
17
|
-
type TzGlobal = typeof globalThis & { [TZ_GLOBAL_KEY]?: string };
|
|
18
|
-
|
|
19
|
-
const DEFAULT_DATE_FORMAT = 'YYYY-MM-DD HH:mm:ss';
|
|
20
|
-
|
|
21
|
-
export function getInitialTimezone(): string {
|
|
22
|
-
return (globalThis as TzGlobal)[TZ_GLOBAL_KEY] ?? 'UTC';
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function setTz(value: string) {
|
|
26
|
-
(globalThis as TzGlobal)[TZ_GLOBAL_KEY] = value;
|
|
27
|
-
dayjs.tz.setDefault(value);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const dayjsTz = (date?: ConfigType) => {
|
|
31
|
-
const tz = getInitialTimezone();
|
|
32
|
-
if (!date) return dayjs().tz(tz);
|
|
33
|
-
return dayjs(date as Parameters<typeof dayjs>[0]).tz(tz);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const convertDateToTz = (date?: ConfigType) => {
|
|
37
|
-
const tz = getInitialTimezone();
|
|
38
|
-
if (!date) return dayjs.tz(dayjs().format(DEFAULT_DATE_FORMAT), tz);
|
|
39
|
-
return dayjs.tz(dayjs(date as Parameters<typeof dayjs>[0]).format(DEFAULT_DATE_FORMAT), tz);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const dayjsTzToLocalTZ = (date?: ConfigType) => {
|
|
43
|
-
if (!date) return dayjs(dayjsTz().format(DEFAULT_DATE_FORMAT));
|
|
44
|
-
return dayjs(dayjsTz(date).format(DEFAULT_DATE_FORMAT));
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const dayjsTzToDate = (date?: ConfigType) => {
|
|
48
|
-
return dayjsTzToLocalTZ(date).toDate();
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export { dayjs };
|
|
52
|
-
export type { Dayjs };
|
package/src/utils/deep-copy.ts
DELETED
package/src/utils/index.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './number';
|
|
2
|
-
export * from './percentage';
|
|
3
|
-
export * from './cls';
|
|
4
|
-
export * from './sort';
|
|
5
|
-
export * from './dayjs';
|
|
6
|
-
export * from './analytics';
|
|
7
|
-
export * from './deep-copy';
|
|
8
|
-
export * from './template-type';
|
|
9
|
-
export * from './string';
|
|
10
|
-
export * from './array';
|
|
11
|
-
export * from './is-browser';
|
|
12
|
-
export * from './date-time';
|
package/src/utils/is-browser.ts
DELETED
package/src/utils/number.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export const TRIM_DECIMAL_ZEROS_REGEX = /\.0+$/;
|
|
2
|
-
export const DEFAULT_DECIMALS = 2;
|
|
3
|
-
|
|
4
|
-
export const trimDecimalZeros = (number?: string): string => {
|
|
5
|
-
return `${number}`.replace(TRIM_DECIMAL_ZEROS_REGEX, '');
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const cleanDecimal = (number: number, decimals = DEFAULT_DECIMALS): string => {
|
|
9
|
-
return trimDecimalZeros(number.toFixed(decimals));
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const semverToNum = (v: string): number => {
|
|
13
|
-
const [major, minor, patch] = v.split('.').map((n) => Number(n));
|
|
14
|
-
return (major ?? 0) * 1_000_000 + (minor ?? 0) * 1_000 + (patch ?? 0);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const numberWithCommas = (x: string | number): string => {
|
|
18
|
-
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
19
|
-
};
|
package/src/utils/percentage.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility function to calculate percentage and format it.
|
|
3
|
-
* @param part - The part value.
|
|
4
|
-
* @param total - The total value.
|
|
5
|
-
* @param decimals - The number of decimal places to format the percentage to.
|
|
6
|
-
* @returns The formatted percentage as a string.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { DEFAULT_DECIMALS, cleanDecimal } from './number';
|
|
10
|
-
|
|
11
|
-
const PERCENTAGE_THRESHOLD = 0.005;
|
|
12
|
-
const PERCENTAGE_THRESHOLD_STRING = '~0%';
|
|
13
|
-
export const calcPercentage = (part?: number, total?: number, decimals = DEFAULT_DECIMALS): number | undefined => {
|
|
14
|
-
if (typeof part !== 'number' || !total) return undefined;
|
|
15
|
-
if (part === 0) return 0;
|
|
16
|
-
|
|
17
|
-
const percentage = (part / total) * 100;
|
|
18
|
-
|
|
19
|
-
return parseFloat(cleanDecimal(percentage, decimals));
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const isLessThanThreshold = (percentage: number) => percentage > 0 && percentage < PERCENTAGE_THRESHOLD;
|
|
23
|
-
export const calcPercentageString = (part: number | undefined, total: number, decimals = 2): string | undefined => {
|
|
24
|
-
const percentage = calcPercentage(part, total, decimals);
|
|
25
|
-
if (typeof percentage !== 'number') return undefined;
|
|
26
|
-
|
|
27
|
-
if (isLessThanThreshold(percentage)) {
|
|
28
|
-
return PERCENTAGE_THRESHOLD_STRING;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return `${percentage}%`;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const formatPercentage = (percentage: number, decimals = DEFAULT_DECIMALS): string => {
|
|
35
|
-
if (isLessThanThreshold(percentage)) {
|
|
36
|
-
return PERCENTAGE_THRESHOLD_STRING;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return `${cleanDecimal(percentage, decimals)}%`;
|
|
40
|
-
};
|
package/src/utils/sort.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
export type SortOrder = 'asc' | 'desc';
|
|
2
|
-
|
|
3
|
-
export interface SortOptions<T> {
|
|
4
|
-
attr: keyof T | string;
|
|
5
|
-
order?: SortOrder;
|
|
6
|
-
backupAttr?: keyof T;
|
|
7
|
-
preferredValue?: string | number | boolean;
|
|
8
|
-
orderArrayAttr?: keyof T;
|
|
9
|
-
orderArray?: Record<SortOrder, string[]>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function compareValues(a: unknown, b: unknown, order: SortOrder = 'asc'): number {
|
|
13
|
-
if (a === b) return 0;
|
|
14
|
-
|
|
15
|
-
if (a === undefined || b === undefined) {
|
|
16
|
-
if (a === undefined && b !== undefined) return order === 'asc' ? -1 : 1;
|
|
17
|
-
if (b === undefined && a !== undefined) return order === 'asc' ? 1 : -1;
|
|
18
|
-
return 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const isDate = (val: unknown): boolean => typeof val !== 'boolean' && !isNaN(Date.parse(val as string));
|
|
22
|
-
const isString = (val: unknown): val is string => typeof val === 'string';
|
|
23
|
-
|
|
24
|
-
let comparison = 0;
|
|
25
|
-
|
|
26
|
-
if (isDate(a) && isDate(b)) {
|
|
27
|
-
const dateA = a instanceof Date ? a : new Date(a as string);
|
|
28
|
-
const dateB = b instanceof Date ? b : new Date(b as string);
|
|
29
|
-
comparison = dateA > dateB ? 1 : -1;
|
|
30
|
-
} else if (isString(a) && isString(b)) {
|
|
31
|
-
comparison = a > b ? 1 : -1;
|
|
32
|
-
} else {
|
|
33
|
-
comparison = (a as number) > (b as number) ? 1 : -1;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return order === 'asc' ? -comparison : comparison;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function getNestedValue<T>(obj: T, path: keyof T | string): unknown {
|
|
40
|
-
if (typeof path === 'string') {
|
|
41
|
-
return path
|
|
42
|
-
.replace(/\[(\d+)\]/g, '.$1')
|
|
43
|
-
.split('.')
|
|
44
|
-
.reduce<unknown>((acc, key) => (acc as Record<string, unknown>)?.[key], obj);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return obj[path];
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function sortByCondition<T>(array: T[], options: SortOptions<T>): T[] {
|
|
51
|
-
const { attr, order = 'asc', preferredValue, backupAttr, orderArrayAttr, orderArray } = options;
|
|
52
|
-
|
|
53
|
-
return array.slice().sort((a, b) => {
|
|
54
|
-
const valueA = getNestedValue(a, attr);
|
|
55
|
-
const valueB = getNestedValue(b, attr);
|
|
56
|
-
|
|
57
|
-
if (preferredValue !== undefined) {
|
|
58
|
-
if (valueA === preferredValue && valueB !== preferredValue) return -1;
|
|
59
|
-
if (valueB === preferredValue && valueA !== preferredValue) return 1;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (orderArrayAttr === attr && orderArray) {
|
|
63
|
-
const orderArrayValue = orderArray[order];
|
|
64
|
-
return orderArrayValue.indexOf(valueA as string) - orderArrayValue.indexOf(valueB as string);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const primaryComparison = compareValues(valueA, valueB, order);
|
|
68
|
-
|
|
69
|
-
if (primaryComparison !== 0) return primaryComparison;
|
|
70
|
-
if (backupAttr) return compareValues(a[backupAttr], b[backupAttr], order);
|
|
71
|
-
return 0;
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function sortByConditions<T>(array: T[], optionsArray: SortOptions<T>[]): T[] {
|
|
76
|
-
return optionsArray.reduce((sortedArray, options) => {
|
|
77
|
-
return sortByCondition(sortedArray, options);
|
|
78
|
-
}, array.slice());
|
|
79
|
-
}
|
|
80
|
-
export function sortByArrayOrder<T>(array: T[], order: T[], sortOrder: SortOrder = 'asc'): T[] {
|
|
81
|
-
return array.slice().sort((a, b) => {
|
|
82
|
-
const indexA = order.indexOf(a);
|
|
83
|
-
const indexB = order.indexOf(b);
|
|
84
|
-
const comparison = indexA - indexB;
|
|
85
|
-
return sortOrder === 'asc' ? comparison : -comparison;
|
|
86
|
-
});
|
|
87
|
-
}
|
package/src/utils/string.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export const toCapitalize = (string: string) => {
|
|
2
|
-
if (!string) return string;
|
|
3
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
export const generateInitial = (string: string, limit = 3) => {
|
|
7
|
-
const arr = string.split(' ');
|
|
8
|
-
if (arr.length === 1) return string.substring(0, 3);
|
|
9
|
-
let initial = '';
|
|
10
|
-
for (const c of arr) {
|
|
11
|
-
initial += c.charAt(0);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return initial.substring(0, limit);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const areStringArraysEqual = (arr1: string[], arr2: string[]) => {
|
|
18
|
-
if (arr1.length !== arr2.length) return false;
|
|
19
|
-
return arr1.every((element, index) => element === arr2[index]);
|
|
20
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { TemplateType } from '@/types/template';
|
|
2
|
-
|
|
3
|
-
export const parseTemplateType = (templateType?: TemplateType | string): string => {
|
|
4
|
-
switch (templateType) {
|
|
5
|
-
case TemplateType.PAGE:
|
|
6
|
-
return 'Landing page';
|
|
7
|
-
case TemplateType.COLLECTION:
|
|
8
|
-
return 'Collection page';
|
|
9
|
-
case TemplateType.PRODUCT:
|
|
10
|
-
return 'Product page';
|
|
11
|
-
case TemplateType.ARTICLE:
|
|
12
|
-
return 'Blog post page';
|
|
13
|
-
case TemplateType.HOME:
|
|
14
|
-
return 'Home page';
|
|
15
|
-
case TemplateType.BLOG:
|
|
16
|
-
return 'Blog page';
|
|
17
|
-
case TemplateType.CART:
|
|
18
|
-
return 'Cart page';
|
|
19
|
-
case TemplateType.SEARCH:
|
|
20
|
-
return 'Search page';
|
|
21
|
-
case TemplateType.NOT_FOUND:
|
|
22
|
-
return '404 page';
|
|
23
|
-
case TemplateType.PASSWORD:
|
|
24
|
-
return 'Password page';
|
|
25
|
-
case TemplateType.GIF_CART:
|
|
26
|
-
return 'GIF Cart page';
|
|
27
|
-
default:
|
|
28
|
-
return 'Unknown';
|
|
29
|
-
}
|
|
30
|
-
};
|