@levi-gemcommerce/analytics 3.0.1-dev.3 → 3.0.1-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/OrderAnalytic/types/order.d.ts +1 -1
- package/package.json +38 -15
- package/src/api/graphql/fragments/pathAnalytic.generated.ts +0 -26
- package/src/assets/img/all-sessions.png +0 -0
- package/src/assets/img/analytic-empty.png +0 -0
- package/src/assets/img/first-session.png +0 -0
- package/src/assets/img/page-only.png +0 -0
- package/src/assets/svg/gemx-skeleton.svg +0 -12
- package/src/assets/svg/product.svg +0 -18
- package/src/components/AnalyticMode/AnalyticModeSelector.tsx +0 -50
- package/src/components/AnalyticMode/index.ts +0 -2
- package/src/components/CardPathAnalysis/CardJourneyAnalysis.tsx +0 -33
- package/src/components/CardPathAnalysis/assets/img/analytic-gemx.png +0 -0
- package/src/components/CardPathAnalysis/assets/styles/PathAnalysis.scss +0 -60
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardAnalyticEmpty.tsx +0 -45
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysis.tsx +0 -53
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisContent.tsx +0 -65
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisEmpty.tsx +0 -29
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisSkeleton.tsx +0 -12
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisWrapper.tsx +0 -43
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/index.ts +0 -1
- package/src/components/CardPathAnalysis/components/PathAnalysisChart.tsx +0 -55
- package/src/components/CardPathAnalysis/components/index.ts +0 -1
- package/src/components/CardPathAnalysis/configs/index.ts +0 -2
- package/src/components/CardPathAnalysis/constants/index.ts +0 -1
- package/src/components/CardPathAnalysis/constants/path-analysis.ts +0 -162
- package/src/components/CardPathAnalysis/contexts/PathAnalysisConfigProvider.tsx +0 -66
- package/src/components/CardPathAnalysis/contexts/PathAnalysisProvider.tsx +0 -130
- package/src/components/CardPathAnalysis/contexts/index.ts +0 -2
- package/src/components/CardPathAnalysis/helpers/index.ts +0 -2
- package/src/components/CardPathAnalysis/helpers/metricHelpers.ts +0 -13
- package/src/components/CardPathAnalysis/helpers/pathAnalysis.ts +0 -96
- package/src/components/CardPathAnalysis/helpers/pathAnalysisChart.ts +0 -128
- package/src/components/CardPathAnalysis/helpers/treeUtils.ts +0 -38
- package/src/components/CardPathAnalysis/hooks/usePathAnalysisChart.tsx +0 -292
- package/src/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.ts +0 -206
- package/src/components/CardPathAnalysis/hooks/usePathAnalyticsMerger.ts +0 -43
- package/src/components/CardPathAnalysis/index.ts +0 -5
- package/src/components/CardPathAnalysis/stores/funnel-chart.ts +0 -30
- package/src/components/CardPathAnalysis/stores/index.ts +0 -3
- package/src/components/CardPathAnalysis/stores/path-analysis-campaign.ts +0 -16
- package/src/components/CardPathAnalysis/stores/path-analysis.ts +0 -11
- package/src/components/CardPathAnalysis/types/index.ts +0 -1
- package/src/components/CardPathAnalysis/types/path-analysis.ts +0 -10
- package/src/components/CurrencySelector/CurrencySelector.tsx +0 -127
- package/src/components/CurrencySelector/index.ts +0 -2
- package/src/components/GModalOrderJourney/GModalOrderJourney.tsx +0 -131
- package/src/components/GModalOrderJourney/components/OrderJourneySkeleton.tsx +0 -93
- package/src/components/GModalOrderJourney/components/index.ts +0 -1
- package/src/components/GModalOrderJourney/context/OrderJourneyContext.tsx +0 -17
- package/src/components/GModalOrderJourney/context/index.ts +0 -1
- package/src/components/GModalOrderJourney/hooks/index.ts +0 -1
- package/src/components/GModalOrderJourney/hooks/useGModalOrderJourney.ts +0 -25
- package/src/components/GModalOrderJourney/index.ts +0 -5
- package/src/components/GModalOrderJourney/types/index.ts +0 -4
- package/src/components/GModalOrderJourney/utils/index.ts +0 -75
- package/src/components/GSelectableMetricChartCard/GSelectableMetricChartCard.tsx +0 -83
- package/src/components/GSelectableMetricChartCard/MetricChartTab.tsx +0 -56
- package/src/components/GSelectableMetricChartCard/index.ts +0 -2
- package/src/components/GTimePicker/GTimePicker.tsx +0 -31
- package/src/components/GTimePicker/components/BaseTimePicker.tsx +0 -249
- package/src/components/GTimePicker/components/CompareTimePicker.tsx +0 -41
- package/src/components/GTimePicker/components/DateTimeFilterAddition.tsx +0 -84
- package/src/components/GTimePicker/components/DateTimeFilterInputs.tsx +0 -124
- package/src/components/GTimePicker/components/DateTimeFilters.tsx +0 -86
- package/src/components/GTimePicker/components/MainTimePicker.tsx +0 -47
- package/src/components/GTimePicker/components/index.ts +0 -2
- package/src/components/GTimePicker/constants/compareDateTimePicker.ts +0 -68
- package/src/components/GTimePicker/constants/datePicker.ts +0 -14
- package/src/components/GTimePicker/constants/index.ts +0 -2
- package/src/components/GTimePicker/constants/mainDataTimePicker.ts +0 -88
- package/src/components/GTimePicker/contexts/DateTimePickerProvider.tsx +0 -125
- package/src/components/GTimePicker/contexts/index.ts +0 -1
- package/src/components/GTimePicker/helpers/date-range-info.ts +0 -84
- package/src/components/GTimePicker/helpers/index.ts +0 -4
- package/src/components/GTimePicker/helpers/parse-date.ts +0 -127
- package/src/components/GTimePicker/helpers/time-picker.ts +0 -123
- package/src/components/GTimePicker/helpers/version.ts +0 -36
- package/src/components/GTimePicker/hooks/index.ts +0 -3
- package/src/components/GTimePicker/hooks/useCompareDateTimePicker.tsx +0 -79
- package/src/components/GTimePicker/hooks/useDateTimeFilter.ts +0 -83
- package/src/components/GTimePicker/hooks/useDateTimePicker.tsx +0 -99
- package/src/components/GTimePicker/hooks/useVersionDateTimeFilters.ts +0 -30
- package/src/components/GTimePicker/index.ts +0 -7
- package/src/components/GTimePicker/types/index.ts +0 -43
- package/src/components/MetricDonutChartCard/MetricDonutChartCard.tsx +0 -121
- package/src/components/MetricDonutChartCard/index.ts +0 -2
- package/src/components/MetricDonutChartCard/utils/donut-chart.ts +0 -75
- package/src/components/MetricDonutChartCard/utils/index.ts +0 -1
- package/src/components/OrderAnalytic/OrderListingLatestTable.tsx +0 -111
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/OrderListingTableSkeleton.tsx +0 -40
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonCellContent.tsx +0 -77
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonHeader.tsx +0 -35
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonRow.tsx +0 -35
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonSummaryRow.tsx +0 -36
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/constants.ts +0 -11
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/index.ts +0 -1
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingTable.tsx +0 -159
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingTableEmpty.tsx +0 -29
- package/src/components/OrderAnalytic/components/OrderListing/index.ts +0 -2
- package/src/components/OrderAnalytic/components/index.ts +0 -1
- package/src/components/OrderAnalytic/constants/index.ts +0 -2
- package/src/components/OrderAnalytic/constants/order-columns.ts +0 -51
- package/src/components/OrderAnalytic/constants/order-listing.ts +0 -199
- package/src/components/OrderAnalytic/helpers/index.ts +0 -1
- package/src/components/OrderAnalytic/helpers/order-listing.ts +0 -48
- package/src/components/OrderAnalytic/hooks/index.ts +0 -1
- package/src/components/OrderAnalytic/hooks/useOrderListingData.ts +0 -55
- package/src/components/OrderAnalytic/index.ts +0 -5
- package/src/components/OrderAnalytic/stores/index.ts +0 -2
- package/src/components/OrderAnalytic/stores/order-columns-selector.ts +0 -24
- package/src/components/OrderAnalytic/stores/order-control.ts +0 -15
- package/src/components/OrderAnalytic/types/index.ts +0 -3
- package/src/components/OrderAnalytic/types/order.ts +0 -89
- package/src/components/OrderAnalytic/types/orderListing.ts +0 -4
- package/src/components/OrderAnalytic/types/report.ts +0 -14
- package/src/components/SingleMetricChartCard/SingleMetricChartCard.tsx +0 -56
- package/src/components/SingleMetricChartCard/index.tsx +0 -2
- package/src/components/common/chart/GChartSkeleton.tsx +0 -5
- package/src/components/common/chart/MetricChart.tsx +0 -62
- package/src/components/common/chart/MetricChartEmpty.tsx +0 -35
- package/src/components/common/chart/MetricChartTooltip.tsx +0 -74
- package/src/components/common/chart/MetricDonutChartSkeleton.tsx +0 -14
- package/src/components/common/chart/MetricInfoBlock.tsx +0 -66
- package/src/components/common/chart/MetricInfoSkeleton.tsx +0 -25
- package/src/components/common/chart/MetricValueSummary.tsx +0 -23
- package/src/components/common/chart/index.ts +0 -8
- package/src/components/common/icons/DownIcon8px.tsx +0 -14
- package/src/components/common/icons/UpIcon8px.tsx +0 -14
- package/src/components/common/icons/index.ts +0 -2
- package/src/components/common/percent/MetricPercentage.tsx +0 -42
- package/src/components/common/percent/index.ts +0 -1
- package/src/components/index.ts +0 -9
- package/src/constants/analytic-metric-tooltip.tsx +0 -164
- package/src/constants/breakdown-targets.ts +0 -25
- package/src/constants/campaign.ts +0 -4
- package/src/constants/chart.ts +0 -17
- package/src/constants/currency.ts +0 -3
- package/src/constants/index.ts +0 -6
- package/src/constants/thumbnail.ts +0 -3
- package/src/core/gemxql/api/index.ts +0 -2
- package/src/core/gemxql/api/useCustomGemXQlQuery.ts +0 -35
- package/src/core/gemxql/api/useGemxQlNamedQuery.ts +0 -34
- package/src/core/gemxql/builder/build-gemxql-query.ts +0 -81
- package/src/core/gemxql/builder/clauses/condition-query.ts +0 -74
- package/src/core/gemxql/builder/clauses/from-query.ts +0 -18
- package/src/core/gemxql/builder/clauses/group-query.ts +0 -43
- package/src/core/gemxql/builder/clauses/index.ts +0 -11
- package/src/core/gemxql/builder/clauses/limit-query.ts +0 -15
- package/src/core/gemxql/builder/clauses/mode-query.ts +0 -14
- package/src/core/gemxql/builder/clauses/offset-query.ts +0 -15
- package/src/core/gemxql/builder/clauses/order-by-query.ts +0 -37
- package/src/core/gemxql/builder/clauses/show-query.ts +0 -18
- package/src/core/gemxql/builder/clauses/time-query.ts +0 -67
- package/src/core/gemxql/builder/clauses/time-series-query.ts +0 -15
- package/src/core/gemxql/builder/clauses/timezone-query.ts +0 -17
- package/src/core/gemxql/builder/configs/date-formats.ts +0 -1
- package/src/core/gemxql/builder/configs/index.ts +0 -3
- package/src/core/gemxql/builder/configs/keywords.ts +0 -16
- package/src/core/gemxql/builder/configs/query-defaults.ts +0 -1
- package/src/core/gemxql/builder/filters/build-extra-conditions.ts +0 -69
- package/src/core/gemxql/builder/filters/build-filter-conditions.ts +0 -161
- package/src/core/gemxql/builder/filters/index.ts +0 -2
- package/src/core/gemxql/builder/helpers/date-query-helpers.ts +0 -41
- package/src/core/gemxql/builder/helpers/index.ts +0 -1
- package/src/core/gemxql/builder/helpers/is-valid-query-input.ts +0 -8
- package/src/core/gemxql/builder/index.ts +0 -6
- package/src/core/gemxql/builder/parse-gemxql-query.ts +0 -43
- package/src/core/gemxql/constants/analytic-data.ts +0 -2
- package/src/core/gemxql/constants/column-keys.ts +0 -4
- package/src/core/gemxql/constants/index.ts +0 -4
- package/src/core/gemxql/constants/operators.ts +0 -2
- package/src/core/gemxql/constants/row-reader-mode.ts +0 -9
- package/src/core/gemxql/graphql/fragments/gemxql.generated.ts +0 -80
- package/src/core/gemxql/graphql/fragments/gemxql.gql +0 -18
- package/src/core/gemxql/graphql/index.ts +0 -2
- package/src/core/gemxql/graphql/queries/gemxql.generated.ts +0 -26
- package/src/core/gemxql/graphql/queries/gemxql.gql +0 -5
- package/src/core/gemxql/helpers/columnKeys.ts +0 -8
- package/src/core/gemxql/helpers/extractQueryData.ts +0 -18
- package/src/core/gemxql/helpers/formatAnalyticData.ts +0 -92
- package/src/core/gemxql/helpers/formatAnalyticDate.ts +0 -29
- package/src/core/gemxql/helpers/getTimeDimension.ts +0 -11
- package/src/core/gemxql/helpers/hasMetricData.ts +0 -6
- package/src/core/gemxql/helpers/index.ts +0 -8
- package/src/core/gemxql/helpers/parseJsonFields.ts +0 -36
- package/src/core/gemxql/helpers/readNumeric.ts +0 -25
- package/src/core/gemxql/hooks/index.ts +0 -2
- package/src/core/gemxql/hooks/useAnalyticData.ts +0 -67
- package/src/core/gemxql/hooks/useGemXQlPagination.ts +0 -79
- package/src/core/gemxql/index.ts +0 -8
- package/src/core/gemxql/types/analytic-data.ts +0 -26
- package/src/core/gemxql/types/analytic-source.ts +0 -4
- package/src/core/gemxql/types/extra-condition.ts +0 -40
- package/src/core/gemxql/types/field-filters.ts +0 -18
- package/src/core/gemxql/types/field-operators.ts +0 -8
- package/src/core/gemxql/types/filter-types.ts +0 -33
- package/src/core/gemxql/types/group-with-clause.ts +0 -12
- package/src/core/gemxql/types/index.ts +0 -11
- package/src/core/gemxql/types/order-by.ts +0 -13
- package/src/core/gemxql/types/page-fields.ts +0 -25
- package/src/core/gemxql/types/row-reader-mode.ts +0 -6
- package/src/core/gemxql/types/time-dimension.ts +0 -8
- package/src/global.d.ts +0 -38
- package/src/hooks/index.ts +0 -7
- package/src/hooks/publish/index.ts +0 -2
- package/src/hooks/publish/useStickyDetectById.ts +0 -39
- package/src/hooks/publish/useStickyFilterBoxProps.ts +0 -26
- package/src/hooks/publish/useWindowSize.ts +0 -54
- package/src/hooks/useEnhancedEffect.ts +0 -3
- package/src/hooks/useFetchCurrencyRates.ts +0 -48
- package/src/hooks/useFormatLineChartData.ts +0 -28
- package/src/hooks/usePopoverResizeObserver.ts +0 -43
- package/src/hooks/usePreventBodyScroll.ts +0 -15
- package/src/hooks/useSearchParams.ts +0 -7
- package/src/hooks/useToggle.ts +0 -23
- package/src/index.ts +0 -10
- package/src/modules/analytics/constants/index.ts +0 -124
- package/src/modules/analytics/index.ts +0 -3
- package/src/modules/analytics/types/index.ts +0 -43
- package/src/modules/analytics/utils/formatMetric.ts +0 -42
- package/src/modules/analytics/utils/getPAMetricValue.ts +0 -11
- package/src/modules/analytics/utils/index.ts +0 -3
- package/src/modules/analytics/utils/metric.ts +0 -172
- package/src/providers/ConvertMoneyProvider.tsx +0 -68
- package/src/providers/MetricChartProvider.tsx +0 -50
- package/src/providers/TimezoneProvider.tsx +0 -31
- package/src/providers/index.ts +0 -5
- package/src/shared/charts/components/ComboChart.tsx +0 -108
- package/src/shared/charts/components/GBarChart.tsx +0 -96
- package/src/shared/charts/components/GComboChart.tsx +0 -15
- package/src/shared/charts/components/GDonutChart.tsx +0 -25
- package/src/shared/charts/components/GFunnelChart/GFunnelChart.tsx +0 -34
- package/src/shared/charts/components/GFunnelChart/components/FunnelChartAction.tsx +0 -67
- package/src/shared/charts/components/GFunnelChart/components/FunnelChartActionIcon.tsx +0 -60
- package/src/shared/charts/components/GFunnelChart/components/FunnelChartActionWrapper.tsx +0 -100
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionContent.tsx +0 -92
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionHeader.tsx +0 -54
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionItem.tsx +0 -51
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionPopover.tsx +0 -95
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/index.ts +0 -1
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/type.ts +0 -7
- package/src/shared/charts/components/GFunnelChart/components/types.ts +0 -24
- package/src/shared/charts/components/GFunnelChart/index.ts +0 -4
- package/src/shared/charts/components/GFunnelChart/types.ts +0 -11
- package/src/shared/charts/components/GPolarisViz/components/Arc/Arc.module.scss +0 -7
- package/src/shared/charts/components/GPolarisViz/components/Arc/Arc.tsx +0 -135
- package/src/shared/charts/components/GPolarisViz/components/Arc/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/ChartContainer.module.scss +0 -39
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/ChartContainer.tsx +0 -150
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/hooks/useContainerBounds.ts +0 -113
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/ChartDiv.tsx +0 -18
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/ChartElements.module.scss +0 -21
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/ChartSVG.tsx +0 -40
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/index.ts +0 -7
- package/src/shared/charts/components/GPolarisViz/components/ChartErrorBoundary/ChartErrorBoundary.tsx +0 -56
- package/src/shared/charts/components/GPolarisViz/components/ChartErrorBoundary/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartErrorBoundary/utilities/checkForMismatchedData.ts +0 -34
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/ChartSkeleton.module.scss +0 -6
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/ChartSkeleton.tsx +0 -96
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/DonutSkeleton/DonutSkeleton.module.scss +0 -41
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/DonutSkeleton/DonutSkeleton.tsx +0 -193
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/DonutSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/ErrorText/ErrorText.tsx +0 -40
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/ErrorText/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/FunnelSkeleton/FunnelSkeleton.tsx +0 -69
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/FunnelSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/GridSkeleton/GridSkeleton.tsx +0 -155
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/GridSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/Shimmer/Shimmer.module.scss +0 -33
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/Shimmer/Shimmer.tsx +0 -34
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/Shimmer/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleBarSkeleton/SimpleBarSkeleton.module.scss +0 -15
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleBarSkeleton/SimpleBarSkeleton.tsx +0 -53
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleBarSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleNormalizedSkeleton/SimpleNormalizedSkeleton.module.scss +0 -35
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleNormalizedSkeleton/SimpleNormalizedSkeleton.tsx +0 -75
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleNormalizedSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SparkSkeleton/SparkSkeleton.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SparkSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/index.ts +0 -8
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/index.ts +0 -9
- package/src/shared/charts/components/GPolarisViz/components/ConicGradientWithStops/ConicGradientWithStops.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/ConicGradientWithStops/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/DefaultPreview/DefaultPreview.module.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/components/DefaultPreview/DefaultPreview.tsx +0 -25
- package/src/shared/charts/components/GPolarisViz/components/DefaultPreview/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/Chart.tsx +0 -209
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/FunnelChart.tsx +0 -72
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/FunnelChartXAxisArrows.tsx +0 -52
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/FunnelChartXAxisLabels.tsx +0 -66
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/FunnelSegment.tsx +0 -121
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/Label.module.scss +0 -23
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/Label.tsx +0 -67
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/index.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/Chart.tsx +0 -259
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/FunnelChartNext.tsx +0 -104
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelChartLabels/FunnelChartLabels.tsx +0 -387
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelChartLabels/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelTooltip/FunnelTooltip.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelTooltip/FunnelTooltip.tsx +0 -37
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelTooltip/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/ScaleIcon.tsx +0 -20
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/ScaleIconTooltip.tsx +0 -31
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/CustomTooltip.tsx +0 -68
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/Tooltip.scss +0 -52
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/Tooltip.tsx +0 -149
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/TooltipOverlay.tsx +0 -117
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/TooltipWithPortal.tsx +0 -12
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/index.ts +0 -8
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/constants.ts +0 -28
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/hooks/useTooltipInteraction.ts +0 -59
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/hooks/useTooltipPlacement.ts +0 -113
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/index.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/types.ts +0 -13
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/utilities/calculate-dropoff.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/utilities/useBuildFunnelTrends.ts +0 -108
- package/src/shared/charts/components/GPolarisViz/components/HorizontalGridLines/HorizontalGridLines.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/HorizontalGridLines/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/Labels/SingleTextLine.tsx +0 -64
- package/src/shared/charts/components/GPolarisViz/components/Labels/hooks/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/Labels/hooks/useLabels.tsx +0 -131
- package/src/shared/charts/components/GPolarisViz/components/Labels/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/endLineTruncate.ts +0 -23
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/endWordTruncate.ts +0 -34
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/estimateTextHeight.ts +0 -31
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/formatAndAddEllipsis.ts +0 -12
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getDiagonalLabels.ts +0 -70
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getHorizontalLabels.ts +0 -90
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getVerticalLabels.ts +0 -58
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getWidestLabel.ts +0 -15
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/shouldSkipLabel.ts +0 -11
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/endWordTruncate.test.ts +0 -16
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/estimateTextHeight.test.ts +0 -19
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/formatAndAddEllipsis.test.ts +0 -9
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/truncateLastLine.test.ts +0 -22
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/truncateSingleLine.test.ts +0 -15
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/truncateLabels.ts +0 -75
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/truncateLastLine.ts +0 -61
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/truncateSingleLine.ts +0 -39
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/LinePreview.module.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/LinePreview.tsx +0 -105
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/constants.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/SwallowErrors/SwallowErrors.tsx +0 -32
- package/src/shared/charts/components/GPolarisViz/components/SwallowErrors/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TextLine/TextLine.tsx +0 -88
- package/src/shared/charts/components/GPolarisViz/components/TextLine/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/TooltipContent.tsx +0 -109
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipContentContainer/TooltipContentContainer.module.scss +0 -10
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipContentContainer/TooltipContentContainer.tsx +0 -67
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipContentContainer/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipRow/TooltipRow.module.scss +0 -26
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipRow/TooltipRow.tsx +0 -57
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipRow/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeries/TooltipSeries.module.scss +0 -4
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeries/TooltipSeries.tsx +0 -26
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeries/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeriesName/TooltipSeriesName.module.scss +0 -4
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeriesName/TooltipSeriesName.tsx +0 -20
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeriesName/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipTitle/TooltipTitle.module.scss +0 -7
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipTitle/TooltipTitle.tsx +0 -15
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipTitle/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/index.ts +0 -5
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/constants.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/hooks/useGetLongestLabelFromData.ts +0 -56
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/index.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/utilities/get-tooltip-template-content-column-count.ts +0 -10
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/utilities/tests/get-tooltip-template-content-column-count.test.ts +0 -48
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/TooltipWrapper.tsx +0 -338
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/components/TooltipAnimatedContainer.module.scss +0 -6
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/components/TooltipAnimatedContainer.tsx +0 -139
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/constants.ts +0 -18
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/index.ts +0 -5
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/types.ts +0 -62
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/eventPoint.ts +0 -84
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getAlteredHorizontalBarPosition.ts +0 -110
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getAlteredLineChartPosition.ts +0 -115
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getAlteredVerticalBarPosition.ts +0 -105
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getDonutChartTooltipPosition.ts +0 -64
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getHorizontalBarChartTooltipPosition.ts +0 -79
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getLineChartTooltipPosition.ts +0 -68
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getVerticalBarChartTooltipPosition.ts +0 -123
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/shouldBlockTooltipEvents.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities.ts +0 -162
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/TrendIndicator.tsx +0 -72
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Arrows/ArrowDown.tsx +0 -12
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Arrows/ArrowUp.tsx +0 -12
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Arrows/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Svg/Svg.scss +0 -7
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Svg/Svg.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Svg/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/constants.ts +0 -12
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/index.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/utilities/estimateTrendIndicatorWidth.ts +0 -9
- package/src/shared/charts/components/GPolarisViz/components/VerticalBarChart/utilities/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/VerticalBarChart/utilities/sortBarChartData.ts +0 -20
- package/src/shared/charts/components/GPolarisViz/components/VerticalGridLines/VerticalGridLines.tsx +0 -32
- package/src/shared/charts/components/GPolarisViz/components/VerticalGridLines/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/index.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/constants.ts +0 -72
- package/src/shared/charts/components/GPolarisViz/data/character-width-offsets.json +0 -65
- package/src/shared/charts/components/GPolarisViz/data/character-widths.json +0 -1
- package/src/shared/charts/components/GPolarisViz/hooks/index.ts +0 -5
- package/src/shared/charts/components/GPolarisViz/hooks/useBarSpringConfig.ts +0 -21
- package/src/shared/charts/components/GPolarisViz/hooks/useBrowserCheck.ts +0 -13
- package/src/shared/charts/components/GPolarisViz/hooks/useCallbackRef.tsx +0 -39
- package/src/shared/charts/components/GPolarisViz/hooks/useDataForHorizontalChart.ts +0 -69
- package/src/shared/charts/components/GPolarisViz/hooks/useDebouncedCallback.ts +0 -197
- package/src/shared/charts/components/GPolarisViz/hooks/useFormattedLabels.ts +0 -31
- package/src/shared/charts/components/GPolarisViz/hooks/useFunnelBarScaling.ts +0 -53
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalBarSizes.ts +0 -70
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalStackedValues.ts +0 -34
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalTicksAndScale.ts +0 -67
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalXScale.ts +0 -48
- package/src/shared/charts/components/GPolarisViz/hooks/useIndexForLabels.ts +0 -16
- package/src/shared/charts/components/GPolarisViz/hooks/usePrefersReducedMotion.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/hooks/usePrintResizing.ts +0 -94
- package/src/shared/charts/components/GPolarisViz/hooks/useReducedLabelIndexes.ts +0 -21
- package/src/shared/charts/components/GPolarisViz/hooks/useResizeObserver.ts +0 -39
- package/src/shared/charts/components/GPolarisViz/hooks/useRootContainer.ts +0 -20
- package/src/shared/charts/components/GPolarisViz/hooks/useWatchColorVisionEvents.tsx +0 -35
- package/src/shared/charts/components/GPolarisViz/index.ts +0 -10
- package/src/shared/charts/components/GPolarisViz/shared/Bar/Bar.tsx +0 -89
- package/src/shared/charts/components/GPolarisViz/shared/Bar/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/FunnelChartConnector.tsx +0 -46
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/FunnelChartConnectorGradient.tsx +0 -21
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/constants.ts +0 -11
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/FunnelChartSegment.tsx +0 -100
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/components/AnimatedSegment.tsx +0 -50
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/components/InteractiveOverlay.tsx +0 -34
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/components/ScaledSegment.tsx +0 -218
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/constants.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/shared/SeriesIcon/SeriesIcon.tsx +0 -22
- package/src/shared/charts/components/GPolarisViz/shared/SeriesIcon/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/shared/ZeroValueLine/ZeroValueLine.tsx +0 -45
- package/src/shared/charts/components/GPolarisViz/shared/ZeroValueLine/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/shared/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/styles/_common.scss +0 -15
- package/src/shared/charts/components/GPolarisViz/styles/shared/_accessibility.scss +0 -41
- package/src/shared/charts/components/GPolarisViz/styles/shared/_chart-container.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/styles/shared/_variables.scss +0 -322
- package/src/shared/charts/components/GPolarisViz/types.ts +0 -261
- package/src/shared/charts/components/GPolarisViz/utilities/base.ts +0 -13
- package/src/shared/charts/components/GPolarisViz/utilities/classnames.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/utilities/createCssConicGradient.ts +0 -12
- package/src/shared/charts/components/GPolarisViz/utilities/createCssGradient.ts +0 -7
- package/src/shared/charts/components/GPolarisViz/utilities/estimateStringWidthWithOffset.ts +0 -15
- package/src/shared/charts/components/GPolarisViz/utilities/getAxisOptions.ts +0 -26
- package/src/shared/charts/components/GPolarisViz/utilities/getCSSBackgroundFromColor.ts +0 -8
- package/src/shared/charts/components/GPolarisViz/utilities/getChartId.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/utilities/getFontSize.ts +0 -7
- package/src/shared/charts/components/GPolarisViz/utilities/getStackedMinMax.ts +0 -43
- package/src/shared/charts/components/GPolarisViz/utilities/getStackedValues.ts +0 -35
- package/src/shared/charts/components/GPolarisViz/utilities/getStackedValuesFromDataSeries.tsx +0 -30
- package/src/shared/charts/components/GPolarisViz/utilities/getTrendIndicatorData.ts +0 -22
- package/src/shared/charts/components/GPolarisViz/utilities/hasHiddenComparisonSeries.ts +0 -26
- package/src/shared/charts/components/GPolarisViz/utilities/index.ts +0 -6
- package/src/shared/charts/components/GSimpleBarChart.tsx +0 -32
- package/src/shared/charts/components/index.ts +0 -7
- package/src/shared/charts/constants/chart.ts +0 -14
- package/src/shared/charts/constants/index.ts +0 -1
- package/src/shared/charts/contexts/GChartProvider.tsx +0 -48
- package/src/shared/charts/contexts/index.ts +0 -1
- package/src/shared/charts/index.ts +0 -4
- package/src/shared/charts/types/chart.ts +0 -36
- package/src/shared/charts/types/index.ts +0 -1
- package/src/shared/components/GActivatorPopover/GActivatorPopover.tsx +0 -107
- package/src/shared/components/GActivatorPopover/index.ts +0 -1
- package/src/shared/components/GBlockCenter/GBlockCenter.scss +0 -19
- package/src/shared/components/GBlockCenter/GBlockCenter.tsx +0 -72
- package/src/shared/components/GBlockCenter/index.ts +0 -1
- package/src/shared/components/GBox/GBox.scss +0 -25
- package/src/shared/components/GBox/GBox.tsx +0 -15
- package/src/shared/components/GBox/index.ts +0 -1
- package/src/shared/components/GBoxCard/GBoxCard.tsx +0 -27
- package/src/shared/components/GBoxCard/index.ts +0 -1
- package/src/shared/components/GButton/GButton.scss +0 -41
- package/src/shared/components/GButton/GButton.tsx +0 -73
- package/src/shared/components/GButton/index.ts +0 -1
- package/src/shared/components/GCheckbox/GCheckbox.tsx +0 -176
- package/src/shared/components/GCheckbox/index.ts +0 -1
- package/src/shared/components/GChoice/ChoiceHelpText.tsx +0 -25
- package/src/shared/components/GChoice/GChoice.scss +0 -14
- package/src/shared/components/GChoice/GChoice.tsx +0 -165
- package/src/shared/components/GChoice/index.ts +0 -2
- package/src/shared/components/GClickable/GClickable.tsx +0 -43
- package/src/shared/components/GClickable/index.ts +0 -1
- package/src/shared/components/GDiv/GDiv.tsx +0 -27
- package/src/shared/components/GDiv/index.ts +0 -1
- package/src/shared/components/GDotInline/GDotInline.tsx +0 -20
- package/src/shared/components/GDotInline/index.ts +0 -1
- package/src/shared/components/GFeatureLocked/GFeatureLocked.tsx +0 -85
- package/src/shared/components/GFeatureLocked/assets/images/empty-analytics.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-campaign-group-template-illustration.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-campaign-group-template.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-page-listing-illustration.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-page-listing.png +0 -0
- package/src/shared/components/GFeatureLocked/constants.ts +0 -33
- package/src/shared/components/GFeatureLocked/index.ts +0 -2
- package/src/shared/components/GFeatureLocked/types.ts +0 -16
- package/src/shared/components/GI18NText/GI18NText.tsx +0 -37
- package/src/shared/components/GI18NText/index.ts +0 -2
- package/src/shared/components/GI18NText/types.ts +0 -7
- package/src/shared/components/GInlineCenter/GInlineCenter.scss +0 -17
- package/src/shared/components/GInlineCenter/GInlineCenter.tsx +0 -39
- package/src/shared/components/GInlineCenter/index.ts +0 -1
- package/src/shared/components/GMockDataTooltip/GMockDataTooltip.tsx +0 -30
- package/src/shared/components/GMockDataTooltip/index.ts +0 -1
- package/src/shared/components/GModal/GModal.tsx +0 -49
- package/src/shared/components/GModal/index.ts +0 -1
- package/src/shared/components/GOptionList/GOptionList.tsx +0 -63
- package/src/shared/components/GOptionList/index.ts +0 -1
- package/src/shared/components/GPagination/GPagination.tsx +0 -44
- package/src/shared/components/GPagination/hooks/useGPagination.ts +0 -42
- package/src/shared/components/GPagination/index.ts +0 -2
- package/src/shared/components/GSelector/GSelector.tsx +0 -198
- package/src/shared/components/GSelector/index.ts +0 -1
- package/src/shared/components/GSkeletonDisplayText/GSkeletonDisplayText.tsx +0 -14
- package/src/shared/components/GSkeletonDisplayText/index.ts +0 -1
- package/src/shared/components/GSpinner/GSpinner.tsx +0 -16
- package/src/shared/components/GSpinner/index.ts +0 -1
- package/src/shared/components/GTextLink/GTextLink.tsx +0 -26
- package/src/shared/components/GTextLink/index.ts +0 -1
- package/src/shared/components/GTextTooltip/GTextTooltip.tsx +0 -18
- package/src/shared/components/GTextTooltip/index.ts +0 -1
- package/src/shared/components/GTextTruncated/GTextTruncated.tsx +0 -80
- package/src/shared/components/GTextTruncated/index.ts +0 -1
- package/src/shared/components/GThumbnail/GThumbnail.scss +0 -5
- package/src/shared/components/GThumbnail/GThumbnail.tsx +0 -69
- package/src/shared/components/GThumbnail/index.ts +0 -1
- package/src/shared/components/GTooltip/GTooltip.tsx +0 -34
- package/src/shared/components/GTooltip/components/GTooltipCard.tsx +0 -164
- package/src/shared/components/GTooltip/index.ts +0 -3
- package/src/shared/components/GTooltipCard/GTooltipCard.tsx +0 -161
- package/src/shared/components/GTooltipCard/index.ts +0 -7
- package/src/shared/components/GVariantBadge/GVariant.tsx +0 -55
- package/src/shared/components/GVariantBadge/GVariantBadge.scss +0 -10
- package/src/shared/components/GVariantBadge/GVariantBadge.tsx +0 -82
- package/src/shared/components/GVariantBadge/index.ts +0 -4
- package/src/shared/components/GVariantBadge/types.ts +0 -20
- package/src/shared/components/GViewBySelector/GViewBySelector.tsx +0 -114
- package/src/shared/components/GViewBySelector/index.ts +0 -1
- package/src/shared/components/index.ts +0 -26
- package/src/shared/index.ts +0 -1
- package/src/shared/journey/common/JourneyContainer/components/JourneyContainer.tsx +0 -140
- package/src/shared/journey/common/JourneyContainer/components/JourneyTimeline.tsx +0 -18
- package/src/shared/journey/common/JourneyContainer/components/index.ts +0 -2
- package/src/shared/journey/common/JourneyContainer/index.ts +0 -1
- package/src/shared/journey/common/index.ts +0 -1
- package/src/shared/journey/index.ts +0 -2
- package/src/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/AcceptedPostPurchaseOffer.tsx +0 -24
- package/src/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/CheckoutCompleted.tsx +0 -64
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutItems.tsx +0 -27
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.tsx +0 -25
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStartedDetail.tsx +0 -79
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutStarted/index.ts +0 -2
- package/src/shared/journey/ui/JourneyEvents/components/PageViewed/PageViewed.tsx +0 -116
- package/src/shared/journey/ui/JourneyEvents/components/PageViewed/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/ProductAddedToCart.tsx +0 -24
- package/src/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/ProductQuantity/ProductQuantity.tsx +0 -33
- package/src/shared/journey/ui/JourneyEvents/components/ProductQuantity/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/ProductRemovedFromCart.tsx +0 -24
- package/src/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/index.ts +0 -6
- package/src/shared/journey/ui/JourneyEvents/constants/event.ts +0 -38
- package/src/shared/journey/ui/JourneyEvents/constants/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/index.ts +0 -2
- package/src/shared/journey/ui/JourneyEvents/types.ts +0 -2
- package/src/shared/journey/ui/JourneyGroup/JourneyGroup.tsx +0 -41
- package/src/shared/journey/ui/JourneyGroup/index.ts +0 -1
- package/src/shared/journey/ui/JourneyItem/components/EventMarkerIcon.tsx +0 -28
- package/src/shared/journey/ui/JourneyItem/components/JourneyDetail.tsx +0 -24
- package/src/shared/journey/ui/JourneyItem/components/JourneyItem.tsx +0 -27
- package/src/shared/journey/ui/JourneyItem/components/JourneyTime.tsx +0 -33
- package/src/shared/journey/ui/JourneyItem/components/QuantityWrapper.tsx +0 -17
- package/src/shared/journey/ui/JourneyItem/components/index.ts +0 -3
- package/src/shared/journey/ui/JourneyItem/index.ts +0 -2
- package/src/shared/journey/ui/JourneyItem/types/events.ts +0 -33
- package/src/shared/journey/ui/JourneyItem/types/index.ts +0 -1
- package/src/shared/journey/ui/JourneyTitle/components/GemxIdBadge.tsx +0 -38
- package/src/shared/journey/ui/JourneyTitle/components/JourneyDateBadge.tsx +0 -18
- package/src/shared/journey/ui/JourneyTitle/components/JourneyIdBadge.tsx +0 -65
- package/src/shared/journey/ui/JourneyTitle/components/JourneyLoadMore.tsx +0 -43
- package/src/shared/journey/ui/JourneyTitle/components/JourneyTitle.tsx +0 -42
- package/src/shared/journey/ui/JourneyTitle/components/index.ts +0 -2
- package/src/shared/journey/ui/JourneyTitle/constants/idBadge.ts +0 -1
- package/src/shared/journey/ui/JourneyTitle/constants/index.ts +0 -1
- package/src/shared/journey/ui/JourneyTitle/index.ts +0 -1
- package/src/shared/journey/ui/index.ts +0 -3
- package/src/shared/journey/ui/type.ts +0 -2
- package/src/shared/reports/common/Visualization/constants/columns.ts +0 -6
- package/src/shared/reports/common/Visualization/constants/index.ts +0 -2
- package/src/shared/reports/common/Visualization/constants/version.ts +0 -8
- package/src/shared/reports/common/Visualization/index.ts +0 -2
- package/src/shared/reports/common/Visualization/types/chart.ts +0 -5
- package/src/shared/reports/common/Visualization/types/index.ts +0 -3
- package/src/shared/reports/common/Visualization/types/report-metric.ts +0 -21
- package/src/shared/reports/common/Visualization/types/report.ts +0 -42
- package/src/shared/reports/common/Visualization/utils/index.ts +0 -2
- package/src/shared/reports/common/Visualization/utils/version.ts +0 -9
- package/src/shared/reports/common/Visualization/utils/visualization.ts +0 -58
- package/src/shared/reports/common/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/ReportTable.tsx +0 -194
- package/src/shared/reports/ui/ReportTable/ReportTableSkeleton.tsx +0 -73
- package/src/shared/reports/ui/ReportTable/assets/styles/ReportTable.scss +0 -288
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/CampaignsCell.tsx +0 -102
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/CampaignsCellVersion.tsx +0 -11
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/Cell.tsx +0 -93
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CellRenderers.tsx +0 -72
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/DateCell.tsx +0 -9
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/DefaultCell.tsx +0 -32
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/GemxIdCell.tsx +0 -18
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/CheckoutStartedDetail.tsx +0 -79
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/ItemsCell.tsx +0 -56
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/NoneCell.tsx +0 -11
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/LoadingData.tsx +0 -10
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/NoData.tsx +0 -13
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCell.tsx +0 -78
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellBase.tsx +0 -55
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellContainer.tsx +0 -43
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderItem.tsx +0 -79
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderIdCell.tsx +0 -70
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/PreviousCell.tsx +0 -17
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/TotalCell.tsx +0 -14
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/VersionCell.tsx +0 -31
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/WrapperCell.tsx +0 -31
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/type.ts +0 -18
- package/src/shared/reports/ui/ReportTable/components/Body/Row.tsx +0 -85
- package/src/shared/reports/ui/ReportTable/components/Body/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/components/Footer/Pagination.tsx +0 -76
- package/src/shared/reports/ui/ReportTable/components/Footer/ScrollBar.tsx +0 -19
- package/src/shared/reports/ui/ReportTable/components/Footer/WrapperFooter.tsx +0 -39
- package/src/shared/reports/ui/ReportTable/components/Footer/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Header/Header.tsx +0 -68
- package/src/shared/reports/ui/ReportTable/components/Header/SortableHeader.tsx +0 -49
- package/src/shared/reports/ui/ReportTable/components/Header/SortableHeaderWithTooltip.tsx +0 -60
- package/src/shared/reports/ui/ReportTable/components/Header/SummaryCell.tsx +0 -26
- package/src/shared/reports/ui/ReportTable/components/Header/SummaryRow.tsx +0 -69
- package/src/shared/reports/ui/ReportTable/components/Header/WrapperHeader.tsx +0 -54
- package/src/shared/reports/ui/ReportTable/components/Header/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/constants/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/constants/order.ts +0 -30
- package/src/shared/reports/ui/ReportTable/constants/table.ts +0 -17
- package/src/shared/reports/ui/ReportTable/context/ReportTableActionsContext.tsx +0 -28
- package/src/shared/reports/ui/ReportTable/helpers/format.ts +0 -29
- package/src/shared/reports/ui/ReportTable/helpers/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/helpers/report.ts +0 -7
- package/src/shared/reports/ui/ReportTable/hooks/index.ts +0 -3
- package/src/shared/reports/ui/ReportTable/hooks/useReportTable.ts +0 -172
- package/src/shared/reports/ui/ReportTable/hooks/useReportTableCell.tsx +0 -28
- package/src/shared/reports/ui/ReportTable/hooks/useSyncedScroll.ts +0 -81
- package/src/shared/reports/ui/ReportTable/index.ts +0 -4
- package/src/shared/reports/ui/ReportTable/types/dimension.ts +0 -8
- package/src/shared/reports/ui/ReportTable/types/index.ts +0 -43
- package/src/shared/reports/ui/ReportTable/types/order.ts +0 -15
- package/src/shared/reports/ui/ReportTable/types/report-columns.ts +0 -11
- package/src/shared/reports/ui/ReportTable/utils/format.ts +0 -100
- package/src/shared/reports/ui/ReportTable/utils/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/utils/order.ts +0 -8
- package/src/shared/reports/ui/ReportTable/utils/table.ts +0 -19
- package/src/shared/reports/ui/ReportTable/utils/visualization.ts +0 -56
- package/src/shared/reports/ui/index.ts +0 -0
- package/src/stores/currencyRatesStore.ts +0 -13
- package/src/stores/index.ts +0 -2
- package/src/styles/index.scss +0 -9
- package/src/types/analytic-mode.ts +0 -5
- package/src/types/breakdown-items.ts +0 -21
- package/src/types/campaign.ts +0 -13
- package/src/types/chart.ts +0 -42
- package/src/types/currency.ts +0 -329
- package/src/types/index.ts +0 -8
- package/src/types/metric.ts +0 -81
- package/src/types/pricing.ts +0 -38
- package/src/types/report-columns.ts +0 -1
- package/src/types/template.ts +0 -19
- package/src/utils/analytics.ts +0 -75
- package/src/utils/array.ts +0 -13
- package/src/utils/cls.ts +0 -18
- package/src/utils/currency.ts +0 -42
- package/src/utils/date-time.ts +0 -7
- package/src/utils/dayjs.ts +0 -52
- package/src/utils/deep-copy.ts +0 -4
- package/src/utils/index.ts +0 -12
- package/src/utils/is-browser.ts +0 -3
- package/src/utils/number.ts +0 -19
- package/src/utils/percentage.ts +0 -40
- package/src/utils/sort.ts +0 -87
- package/src/utils/string.ts +0 -20
- package/src/utils/template-type.ts +0 -30
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import type { IBuildConditionQueryParams } from './clauses/condition-query';
|
|
2
|
-
import type { IBuildFromQueryParams } from './clauses/from-query';
|
|
3
|
-
import type { IBuildGroupQueryParams } from './clauses/group-query';
|
|
4
|
-
import type { IBuildLimitQueryParams } from './clauses/limit-query';
|
|
5
|
-
import type { IBuildModeQueryParams } from './clauses/mode-query';
|
|
6
|
-
import type { IBuildOffsetQueryParams } from './clauses/offset-query';
|
|
7
|
-
import type { IBuildOrderByQueryParams } from './clauses/order-by-query';
|
|
8
|
-
import type { IBuildShowQueryParams } from './clauses/show-query';
|
|
9
|
-
import type { IBuildTimeQueryParams } from './clauses/time-query';
|
|
10
|
-
import type { IBuildTimeSeriesQueryParams } from './clauses/time-series-query';
|
|
11
|
-
import type { IBuildTimezoneQueryParams } from './clauses/timezone-query';
|
|
12
|
-
|
|
13
|
-
import { buildConditionQuery } from './clauses/condition-query';
|
|
14
|
-
import { buildFromQuery } from './clauses/from-query';
|
|
15
|
-
import { buildGroupQuery } from './clauses/group-query';
|
|
16
|
-
import { buildLimitQuery } from './clauses/limit-query';
|
|
17
|
-
import { buildModeQuery } from './clauses/mode-query';
|
|
18
|
-
import { buildOffsetQuery } from './clauses/offset-query';
|
|
19
|
-
import { buildOrderByQuery } from './clauses/order-by-query';
|
|
20
|
-
import { buildShowQuery } from './clauses/show-query';
|
|
21
|
-
import { buildTimeQuery } from './clauses/time-query';
|
|
22
|
-
import { buildTimeSeriesQuery } from './clauses/time-series-query';
|
|
23
|
-
import { buildTimezoneQuery } from './clauses/timezone-query';
|
|
24
|
-
import { DEFAULT_QUERY_LIMIT } from './configs';
|
|
25
|
-
import { getFirstMetricInOrderBy } from './filters/build-filter-conditions';
|
|
26
|
-
import { isValidQueryInput } from './helpers/is-valid-query-input';
|
|
27
|
-
|
|
28
|
-
export type IBuildGemXQlQueryParams = IBuildModeQueryParams &
|
|
29
|
-
IBuildFromQueryParams &
|
|
30
|
-
IBuildShowQueryParams &
|
|
31
|
-
IBuildGroupQueryParams &
|
|
32
|
-
IBuildTimeQueryParams &
|
|
33
|
-
IBuildTimeSeriesQueryParams &
|
|
34
|
-
IBuildTimezoneQueryParams &
|
|
35
|
-
IBuildOrderByQueryParams &
|
|
36
|
-
IBuildConditionQueryParams &
|
|
37
|
-
IBuildLimitQueryParams &
|
|
38
|
-
IBuildOffsetQueryParams & {
|
|
39
|
-
extraOrderByFields?: string[];
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const buildGemXQlQuery = (params: IBuildGemXQlQueryParams) => {
|
|
43
|
-
const {
|
|
44
|
-
mode,
|
|
45
|
-
metrics,
|
|
46
|
-
dimensions,
|
|
47
|
-
dateRange,
|
|
48
|
-
compareDateRange,
|
|
49
|
-
filters,
|
|
50
|
-
overrideFilters,
|
|
51
|
-
versionIds,
|
|
52
|
-
extraConditions,
|
|
53
|
-
orderBy,
|
|
54
|
-
sources,
|
|
55
|
-
timeDimension,
|
|
56
|
-
groupWithClause,
|
|
57
|
-
timezone,
|
|
58
|
-
limit = DEFAULT_QUERY_LIMIT,
|
|
59
|
-
offset,
|
|
60
|
-
extraOrderByFields,
|
|
61
|
-
} = params;
|
|
62
|
-
const columns = [...dimensions, ...getFirstMetricInOrderBy(orderBy, metrics), ...(extraOrderByFields ?? [])];
|
|
63
|
-
|
|
64
|
-
const builtQuery = [
|
|
65
|
-
buildModeQuery(mode),
|
|
66
|
-
buildFromQuery(sources),
|
|
67
|
-
buildShowQuery(metrics),
|
|
68
|
-
buildGroupQuery(dimensions, groupWithClause),
|
|
69
|
-
buildTimeSeriesQuery(timeDimension),
|
|
70
|
-
buildTimeQuery({ dateRange, compareDateRange, timeDimension, overrideFilters }),
|
|
71
|
-
buildTimezoneQuery(timezone),
|
|
72
|
-
buildConditionQuery({ filters, overrideFilters, versionIds, extraConditions }),
|
|
73
|
-
buildOrderByQuery(orderBy, columns),
|
|
74
|
-
buildLimitQuery(limit),
|
|
75
|
-
buildOffsetQuery(offset),
|
|
76
|
-
]
|
|
77
|
-
.filter(Boolean)
|
|
78
|
-
.join(' ');
|
|
79
|
-
|
|
80
|
-
return isValidQueryInput(builtQuery) ? builtQuery : '';
|
|
81
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { GemXQlFilters, GemXQlVersionIds, IExtraCondition } from '../../types';
|
|
2
|
-
import type { IBuildFilterConditionsParams, IBuildVersionIdConditionParams } from '../filters/build-filter-conditions';
|
|
3
|
-
|
|
4
|
-
import { OPERATOR_IS, OPERATOR_IS_ONE_OF } from '../../constants';
|
|
5
|
-
import { CLAUSE_KEYWORD_BOUNDARY } from '../configs';
|
|
6
|
-
import { buildExtraConditions } from '../filters/build-extra-conditions';
|
|
7
|
-
import { buildVersionIdCondition, filterConfigs, generateFilterConditions } from '../filters/build-filter-conditions';
|
|
8
|
-
|
|
9
|
-
export interface IBuildConditionQueryParams extends IBuildFilterConditionsParams, IBuildVersionIdConditionParams {
|
|
10
|
-
extraConditions?: IExtraCondition[];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type IParseConditionQueryResult = {
|
|
14
|
-
filters: GemXQlFilters;
|
|
15
|
-
versionIds?: GemXQlVersionIds;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const build = ({ filters, overrideFilters, versionIds, extraConditions }: IBuildConditionQueryParams) => {
|
|
19
|
-
const conditions = generateFilterConditions(filters, overrideFilters);
|
|
20
|
-
const versionIdConditions = buildVersionIdCondition(versionIds);
|
|
21
|
-
const builtExtraConditions = buildExtraConditions(extraConditions);
|
|
22
|
-
|
|
23
|
-
const allConditions = [...conditions, ...versionIdConditions, ...builtExtraConditions];
|
|
24
|
-
|
|
25
|
-
return allConditions.length > 0 ? `WHERE ${allConditions.join(' AND ')}` : '';
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const parse = (query: string): IParseConditionQueryResult => {
|
|
29
|
-
const match = query.match(new RegExp(`\\bWHERE\\s+([\\s\\S]+?)(?=\\s+(?:${CLAUSE_KEYWORD_BOUNDARY})\\b|$)`, 'i'));
|
|
30
|
-
if (!match) return { filters: {} };
|
|
31
|
-
|
|
32
|
-
const conditions = (match[1] ?? '').trim().split(/\s+AND\s+/i);
|
|
33
|
-
const filters: Record<string, unknown> = {};
|
|
34
|
-
const versionIds: Record<string, string> = {};
|
|
35
|
-
|
|
36
|
-
const unquoteStr = (v: string): string => v.replace(/^'(.*)'$/s, '$1').replace(/''/g, "'");
|
|
37
|
-
|
|
38
|
-
conditions.forEach((condition) => {
|
|
39
|
-
const trimmed = condition.trim();
|
|
40
|
-
|
|
41
|
-
const inMatch = trimmed.match(/^(\S+)\s+IN\s+\((.+)\)$/i);
|
|
42
|
-
if (inMatch) {
|
|
43
|
-
const field = inMatch[1] ?? '';
|
|
44
|
-
const valuesStr = inMatch[2] ?? '';
|
|
45
|
-
const values = valuesStr.split(',').map((v) => unquoteStr(v.trim()));
|
|
46
|
-
const config = filterConfigs.find((c) => c.fieldName === field || c.multiField === field);
|
|
47
|
-
if (config?.operator) {
|
|
48
|
-
filters[config.multiField] = values;
|
|
49
|
-
filters[config.operator] = OPERATOR_IS_ONE_OF;
|
|
50
|
-
}
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const eqMatch = trimmed.match(/^(\S+)\s+=\s+(.+)$/);
|
|
55
|
-
if (eqMatch) {
|
|
56
|
-
const field = eqMatch[1] ?? '';
|
|
57
|
-
const value = unquoteStr(eqMatch[2] ?? '');
|
|
58
|
-
const config = filterConfigs.find((c) => c.fieldName === field || c.singleField === field);
|
|
59
|
-
if (config) {
|
|
60
|
-
filters[config.singleField] = value;
|
|
61
|
-
if (config.operator) filters[config.operator] = OPERATOR_IS;
|
|
62
|
-
} else if (field) {
|
|
63
|
-
versionIds[field] = value;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
return {
|
|
69
|
-
filters: filters as GemXQlFilters,
|
|
70
|
-
versionIds: Object.keys(versionIds).length > 0 ? versionIds : undefined,
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export { build as buildConditionQuery, parse as parseConditionQuery };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CLAUSE_KEYWORD_BOUNDARY } from '../configs';
|
|
2
|
-
|
|
3
|
-
export interface IBuildFromQueryParams {
|
|
4
|
-
sources: string[];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const build = (sources: string[]) => `FROM ${sources.join(', ')}`;
|
|
8
|
-
|
|
9
|
-
const parse = (query: string): string[] => {
|
|
10
|
-
const match = query.match(new RegExp(`\\bFROM\\s+([\\s\\S]+?)(?=\\s+(?:${CLAUSE_KEYWORD_BOUNDARY})\\b|$)`, 'i'));
|
|
11
|
-
if (!match) return [];
|
|
12
|
-
return (match[1] ?? '')
|
|
13
|
-
.split(',')
|
|
14
|
-
.map((s) => s.trim())
|
|
15
|
-
.filter(Boolean);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { build as buildFromQuery, parse as parseFromQuery };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { EGroupWithClause } from '../../types';
|
|
2
|
-
import { CLAUSE_KEYWORD_BOUNDARY } from '../configs';
|
|
3
|
-
|
|
4
|
-
export interface IBuildGroupQueryParams {
|
|
5
|
-
dimensions: string[];
|
|
6
|
-
groupWithClause?: EGroupWithClause;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const build = (dimensions: string[], withClause = EGroupWithClause.ALL) =>
|
|
10
|
-
dimensions.length === 0 ? '' : `GROUP BY ${dimensions.join(', ')} ${withClause}`;
|
|
11
|
-
|
|
12
|
-
const parse = (query: string): { dimensions: string[]; groupWithClause?: EGroupWithClause } => {
|
|
13
|
-
const match = query.match(new RegExp(`\\bGROUP BY\\s+([\\s\\S]+?)(?=\\s+(?:${CLAUSE_KEYWORD_BOUNDARY})\\b|$)`, 'i'));
|
|
14
|
-
if (!match) return { dimensions: [] };
|
|
15
|
-
|
|
16
|
-
let content = (match[1] ?? '').trim();
|
|
17
|
-
|
|
18
|
-
// Detect the trailing with-clause token (e.g. `WITH GROUP_TOTALS, TOTALS` or `TOTALS`).
|
|
19
|
-
// Derive tokens from the enum and check longest-first so `ALL` is not mistaken for `TOTALS`.
|
|
20
|
-
const clauseTokens = Object.values(EGroupWithClause)
|
|
21
|
-
.filter((token) => token !== EGroupWithClause.NONE)
|
|
22
|
-
.sort((a, b) => b.length - a.length);
|
|
23
|
-
|
|
24
|
-
let groupWithClause = EGroupWithClause.NONE;
|
|
25
|
-
const upperContent = content.toUpperCase();
|
|
26
|
-
for (const token of clauseTokens) {
|
|
27
|
-
if (upperContent.endsWith(token)) {
|
|
28
|
-
groupWithClause = token;
|
|
29
|
-
content = content.slice(0, content.length - token.length).trim();
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return {
|
|
35
|
-
dimensions: content
|
|
36
|
-
.split(',')
|
|
37
|
-
.map((s) => s.trim())
|
|
38
|
-
.filter(Boolean),
|
|
39
|
-
groupWithClause,
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export { build as buildGroupQuery, parse as parseGroupQuery };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './condition-query';
|
|
2
|
-
export * from './from-query';
|
|
3
|
-
export * from './group-query';
|
|
4
|
-
export * from './limit-query';
|
|
5
|
-
export * from './mode-query';
|
|
6
|
-
export * from './offset-query';
|
|
7
|
-
export * from './order-by-query';
|
|
8
|
-
export * from './show-query';
|
|
9
|
-
export * from './time-query';
|
|
10
|
-
export * from './time-series-query';
|
|
11
|
-
export * from './timezone-query';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface IBuildLimitQueryParams {
|
|
2
|
-
limit?: number;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
const build = (limit?: number) => {
|
|
6
|
-
if (!limit) return '';
|
|
7
|
-
return `LIMIT ${limit}`;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const parse = (query: string): number | undefined => {
|
|
11
|
-
const match = query.match(/\bLIMIT\s+(\d+)/i);
|
|
12
|
-
return match ? parseInt(match[1] ?? '0', 10) : undefined;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export { build as buildLimitQuery, parse as parseLimitQuery };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { EAnalyticMode } from '@/types';
|
|
2
|
-
|
|
3
|
-
export interface IBuildModeQueryParams {
|
|
4
|
-
mode: EAnalyticMode;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const build = (mode: EAnalyticMode) => `MODE ${mode}`;
|
|
8
|
-
|
|
9
|
-
const parse = (query: string): EAnalyticMode | undefined => {
|
|
10
|
-
const match = query.match(/\bMODE\s+(\S+)/i);
|
|
11
|
-
return match?.[1] as EAnalyticMode | undefined;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { build as buildModeQuery, parse as parseModeQuery };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface IBuildOffsetQueryParams {
|
|
2
|
-
offset?: number;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
const build = (offset?: number) => {
|
|
6
|
-
if (!offset || offset < 0) return '';
|
|
7
|
-
return `OFFSET ${offset}`;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const parse = (query: string): number | undefined => {
|
|
11
|
-
const match = query.match(/\bOFFSET\s+(\d+)/i);
|
|
12
|
-
return match ? parseInt(match[1] ?? '0', 10) : undefined;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export { build as buildOffsetQuery, parse as parseOffsetQuery };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { EOrderDirectionType, OrderByFields } from '../../types';
|
|
2
|
-
|
|
3
|
-
import { CLAUSE_KEYWORD_BOUNDARY } from '../configs';
|
|
4
|
-
|
|
5
|
-
export interface IBuildOrderByQueryParams {
|
|
6
|
-
orderBy?: OrderByFields;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const build = (orderBy?: OrderByFields, columns?: string[]) => {
|
|
10
|
-
if (!orderBy) return '';
|
|
11
|
-
|
|
12
|
-
const orderByQuery = Object.values(orderBy)
|
|
13
|
-
.filter((item) => columns?.includes(item.field))
|
|
14
|
-
.map((item) => `${item.field} ${item.direction}`)
|
|
15
|
-
.join(', ');
|
|
16
|
-
|
|
17
|
-
return orderByQuery ? `ORDER BY ${orderByQuery}` : '';
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const parse = (query: string): OrderByFields | undefined => {
|
|
21
|
-
const match = query.match(new RegExp(`\\bORDER BY\\s+([\\s\\S]+?)(?=\\s+(?:${CLAUSE_KEYWORD_BOUNDARY})\\b|$)`, 'i'));
|
|
22
|
-
if (!match) return undefined;
|
|
23
|
-
|
|
24
|
-
const orderBy: OrderByFields = {};
|
|
25
|
-
(match[1] ?? '').split(',').forEach((item) => {
|
|
26
|
-
const parts = item.trim().split(/\s+/);
|
|
27
|
-
if (parts.length === 2) {
|
|
28
|
-
const field = parts[0] ?? '';
|
|
29
|
-
const direction = parts[1] ?? '';
|
|
30
|
-
if (field) orderBy[field] = { field, direction: direction as EOrderDirectionType };
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
return Object.keys(orderBy).length > 0 ? orderBy : undefined;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export { build as buildOrderByQuery, parse as parseOrderByQuery };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CLAUSE_KEYWORD_BOUNDARY } from '../configs';
|
|
2
|
-
|
|
3
|
-
export interface IBuildShowQueryParams {
|
|
4
|
-
metrics: string[];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const build = (metrics: string[]) => `SHOW ${metrics.join(', ')}`;
|
|
8
|
-
|
|
9
|
-
const parse = (query: string): string[] => {
|
|
10
|
-
const match = query.match(new RegExp(`\\bSHOW\\s+([\\s\\S]+?)(?=\\s+(?:${CLAUSE_KEYWORD_BOUNDARY})\\b|$)`, 'i'));
|
|
11
|
-
if (!match) return [];
|
|
12
|
-
return (match[1] ?? '')
|
|
13
|
-
.split(',')
|
|
14
|
-
.map((s) => s.trim())
|
|
15
|
-
.filter(Boolean);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { build as buildShowQuery, parse as parseShowQuery };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { GemXQlFilters, GemXQlOverrideFilters } from '../../types';
|
|
2
|
-
import type { AnalyticDateFilter } from '@/components';
|
|
3
|
-
|
|
4
|
-
import { dayjsTz } from '@/utils';
|
|
5
|
-
import { getDateRangeForQuery } from '../helpers/date-query-helpers';
|
|
6
|
-
|
|
7
|
-
export interface IBuildTimeQueryParams {
|
|
8
|
-
dateRange?: AnalyticDateFilter;
|
|
9
|
-
compareDateRange?: AnalyticDateFilter;
|
|
10
|
-
overrideFilters?: GemXQlOverrideFilters;
|
|
11
|
-
timeDimension?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type IParseTimeQueryResult = {
|
|
15
|
-
dateRange?: Pick<AnalyticDateFilter, 'startDate' | 'endDate'>;
|
|
16
|
-
compareDateRange?: Pick<AnalyticDateFilter, 'startDate' | 'endDate'>;
|
|
17
|
-
timeDimension?: string;
|
|
18
|
-
overrideFilters?: GemXQlFilters;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const buildOverrideTimeQuery = (key: string, value: string) => `DURING (${value}, ${key})`;
|
|
22
|
-
|
|
23
|
-
const build = (data: IBuildTimeQueryParams) => {
|
|
24
|
-
const { dateRange, compareDateRange, overrideFilters, timeDimension } = data;
|
|
25
|
-
const overrideTimeValue = timeDimension
|
|
26
|
-
? (overrideFilters as Record<string, string | undefined>)?.[timeDimension]
|
|
27
|
-
: undefined;
|
|
28
|
-
|
|
29
|
-
if (timeDimension && overrideTimeValue) {
|
|
30
|
-
return buildOverrideTimeQuery(timeDimension, overrideTimeValue);
|
|
31
|
-
}
|
|
32
|
-
if (!dateRange) return '';
|
|
33
|
-
|
|
34
|
-
const { dateGTE, dateLTE } = getDateRangeForQuery(dateRange);
|
|
35
|
-
const { dateGTE: compareDateGTE, dateLTE: compareDateLTE } = compareDateRange
|
|
36
|
-
? getDateRangeForQuery(compareDateRange)
|
|
37
|
-
: {};
|
|
38
|
-
const compareToClause = compareDateRange ? `COMPARE TO ${compareDateGTE} UNTIL ${compareDateLTE}` : '';
|
|
39
|
-
|
|
40
|
-
return `SINCE ${dateGTE} UNTIL ${dateLTE} ${compareToClause}`;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const parse = (query: string): IParseTimeQueryResult => {
|
|
44
|
-
const duringMatch = query.match(/\bDURING\s+\(([^,]+),\s*([^)]+)\)/i);
|
|
45
|
-
if (duringMatch) {
|
|
46
|
-
const value = duringMatch[1] ?? '';
|
|
47
|
-
const key = duringMatch[2] ?? '';
|
|
48
|
-
return {
|
|
49
|
-
timeDimension: key.trim(),
|
|
50
|
-
overrideFilters: { [key.trim()]: value.trim() } as GemXQlFilters,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const sinceMatch = query.match(/\bSINCE\s+(\S+)\s+UNTIL\s+(\S+)/i);
|
|
55
|
-
if (!sinceMatch) return {};
|
|
56
|
-
|
|
57
|
-
const dateRange = { startDate: dayjsTz(sinceMatch[1] ?? ''), endDate: dayjsTz(sinceMatch[2] ?? '') };
|
|
58
|
-
|
|
59
|
-
const compareMatch = query.match(/\bCOMPARE TO\s+(\S+)\s+UNTIL\s+(\S+)/i);
|
|
60
|
-
const compareDateRange = compareMatch
|
|
61
|
-
? { startDate: dayjsTz(compareMatch[1] ?? ''), endDate: dayjsTz(compareMatch[2] ?? '') }
|
|
62
|
-
: undefined;
|
|
63
|
-
|
|
64
|
-
return { dateRange, compareDateRange };
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export { build as buildTimeQuery, parse as parseTimeQuery };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface IBuildTimeSeriesQueryParams {
|
|
2
|
-
timeDimension?: string;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
const build = (time?: string) => {
|
|
6
|
-
if (!time) return '';
|
|
7
|
-
return `TIMESERIES ${time}`;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const parse = (query: string): string | undefined => {
|
|
11
|
-
const match = query.match(/\bTIMESERIES\s+(\S+)/i);
|
|
12
|
-
return match?.[1];
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export { build as buildTimeSeriesQuery, parse as parseTimeSeriesQuery };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { getInitialTimezone } from '@/utils';
|
|
2
|
-
|
|
3
|
-
export interface IBuildTimezoneQueryParams {
|
|
4
|
-
timezone?: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const build = (timezone?: string) => {
|
|
8
|
-
const tz = timezone ?? getInitialTimezone();
|
|
9
|
-
return tz ? `TIMEZONE ${tz}` : '';
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const parse = (query: string): string | undefined => {
|
|
13
|
-
const match = query.match(/\bTIMEZONE\s+(\S+)/i);
|
|
14
|
-
return match?.[1];
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { build as buildTimezoneQuery, parse as parseTimezoneQuery };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const DATE_QUERY_FORMAT = 'YYYY-MM-DDTHH:mm:ss';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export const CLAUSE_KEYWORDS = [
|
|
2
|
-
'MODE',
|
|
3
|
-
'FROM',
|
|
4
|
-
'SHOW',
|
|
5
|
-
'GROUP BY',
|
|
6
|
-
'TIMESERIES',
|
|
7
|
-
'SINCE',
|
|
8
|
-
'DURING',
|
|
9
|
-
'TIMEZONE',
|
|
10
|
-
'WHERE',
|
|
11
|
-
'ORDER BY',
|
|
12
|
-
'LIMIT',
|
|
13
|
-
'OFFSET',
|
|
14
|
-
] as const;
|
|
15
|
-
|
|
16
|
-
export const CLAUSE_KEYWORD_BOUNDARY = CLAUSE_KEYWORDS.join('|');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_QUERY_LIMIT = 1000;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
IExtraCondition,
|
|
3
|
-
IExtraConditionEq,
|
|
4
|
-
IExtraConditionGroup,
|
|
5
|
-
IExtraConditionIn,
|
|
6
|
-
IExtraConditionLike,
|
|
7
|
-
} from '../../types';
|
|
8
|
-
|
|
9
|
-
import { EComparisonOperator, EGroupOperator } from '../../types';
|
|
10
|
-
|
|
11
|
-
const DEFAULT_GROUP_OPERATOR = EGroupOperator.OR;
|
|
12
|
-
|
|
13
|
-
// Serializes a value as a single-quoted DSL string literal. Numbers are passed through unquoted.
|
|
14
|
-
const quoteValue = (v: string | number): string =>
|
|
15
|
-
typeof v === 'number' ? String(v) : `'${String(v).replace(/'/g, "''")}'`;
|
|
16
|
-
|
|
17
|
-
const joinFieldClauses = (parts: string[], groupOperator: EGroupOperator = DEFAULT_GROUP_OPERATOR): string => {
|
|
18
|
-
if (!parts.length) return '';
|
|
19
|
-
if (parts.length === 1) return parts[0] ?? '';
|
|
20
|
-
return `(${parts.join(` ${groupOperator} `)})`;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const buildEq = ({ fields, value, groupOperator }: IExtraConditionEq) => {
|
|
24
|
-
if (!fields.length) return '';
|
|
25
|
-
return joinFieldClauses(
|
|
26
|
-
fields.map((field) => `${field} = ${quoteValue(value)}`),
|
|
27
|
-
groupOperator,
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const buildIn = ({ fields, values, groupOperator }: IExtraConditionIn) => {
|
|
32
|
-
if (!fields.length || !values.length) return '';
|
|
33
|
-
return joinFieldClauses(
|
|
34
|
-
fields.map((field) => `${field} IN (${values.map(quoteValue).join(', ')})`),
|
|
35
|
-
groupOperator,
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const buildLike = ({ fields, value, groupOperator }: IExtraConditionLike) => {
|
|
40
|
-
const trimmed = value.trim();
|
|
41
|
-
if (!trimmed || !fields.length) return '';
|
|
42
|
-
return joinFieldClauses(
|
|
43
|
-
fields.map((field) => `${field} LIKE '%${trimmed.replace(/'/g, "''")}%'`),
|
|
44
|
-
groupOperator,
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const buildGroup = ({ conditions, groupOperator }: IExtraConditionGroup): string => {
|
|
49
|
-
const parts = conditions.map(buildExtraCondition).filter(Boolean);
|
|
50
|
-
return joinFieldClauses(parts, groupOperator);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const buildExtraCondition = (condition: IExtraCondition): string => {
|
|
54
|
-
switch (condition.operator) {
|
|
55
|
-
case EComparisonOperator.EQ:
|
|
56
|
-
return buildEq(condition);
|
|
57
|
-
case EComparisonOperator.IN:
|
|
58
|
-
return buildIn(condition);
|
|
59
|
-
case EComparisonOperator.LIKE:
|
|
60
|
-
return buildLike(condition);
|
|
61
|
-
case EComparisonOperator.GROUP:
|
|
62
|
-
return buildGroup(condition);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const buildExtraConditions = (conditions?: IExtraCondition[]): string[] => {
|
|
67
|
-
if (!conditions?.length) return [];
|
|
68
|
-
return conditions.map(buildExtraCondition).filter(Boolean);
|
|
69
|
-
};
|