@levi-gemcommerce/analytics 3.0.1-dev.3 → 3.0.1-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +38 -15
- package/src/api/graphql/fragments/pathAnalytic.generated.ts +0 -26
- package/src/assets/img/all-sessions.png +0 -0
- package/src/assets/img/analytic-empty.png +0 -0
- package/src/assets/img/first-session.png +0 -0
- package/src/assets/img/page-only.png +0 -0
- package/src/assets/svg/gemx-skeleton.svg +0 -12
- package/src/assets/svg/product.svg +0 -18
- package/src/components/AnalyticMode/AnalyticModeSelector.tsx +0 -50
- package/src/components/AnalyticMode/index.ts +0 -2
- package/src/components/CardPathAnalysis/CardJourneyAnalysis.tsx +0 -33
- package/src/components/CardPathAnalysis/assets/img/analytic-gemx.png +0 -0
- package/src/components/CardPathAnalysis/assets/styles/PathAnalysis.scss +0 -60
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardAnalyticEmpty.tsx +0 -45
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysis.tsx +0 -53
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisContent.tsx +0 -65
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisEmpty.tsx +0 -29
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisSkeleton.tsx +0 -12
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisWrapper.tsx +0 -43
- package/src/components/CardPathAnalysis/components/CardPathAnalysis/index.ts +0 -1
- package/src/components/CardPathAnalysis/components/PathAnalysisChart.tsx +0 -55
- package/src/components/CardPathAnalysis/components/index.ts +0 -1
- package/src/components/CardPathAnalysis/configs/index.ts +0 -2
- package/src/components/CardPathAnalysis/constants/index.ts +0 -1
- package/src/components/CardPathAnalysis/constants/path-analysis.ts +0 -162
- package/src/components/CardPathAnalysis/contexts/PathAnalysisConfigProvider.tsx +0 -66
- package/src/components/CardPathAnalysis/contexts/PathAnalysisProvider.tsx +0 -130
- package/src/components/CardPathAnalysis/contexts/index.ts +0 -2
- package/src/components/CardPathAnalysis/helpers/index.ts +0 -2
- package/src/components/CardPathAnalysis/helpers/metricHelpers.ts +0 -13
- package/src/components/CardPathAnalysis/helpers/pathAnalysis.ts +0 -96
- package/src/components/CardPathAnalysis/helpers/pathAnalysisChart.ts +0 -128
- package/src/components/CardPathAnalysis/helpers/treeUtils.ts +0 -38
- package/src/components/CardPathAnalysis/hooks/usePathAnalysisChart.tsx +0 -292
- package/src/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.ts +0 -206
- package/src/components/CardPathAnalysis/hooks/usePathAnalyticsMerger.ts +0 -43
- package/src/components/CardPathAnalysis/index.ts +0 -5
- package/src/components/CardPathAnalysis/stores/funnel-chart.ts +0 -30
- package/src/components/CardPathAnalysis/stores/index.ts +0 -3
- package/src/components/CardPathAnalysis/stores/path-analysis-campaign.ts +0 -16
- package/src/components/CardPathAnalysis/stores/path-analysis.ts +0 -11
- package/src/components/CardPathAnalysis/types/index.ts +0 -1
- package/src/components/CardPathAnalysis/types/path-analysis.ts +0 -10
- package/src/components/CurrencySelector/CurrencySelector.tsx +0 -127
- package/src/components/CurrencySelector/index.ts +0 -2
- package/src/components/GModalOrderJourney/GModalOrderJourney.tsx +0 -131
- package/src/components/GModalOrderJourney/components/OrderJourneySkeleton.tsx +0 -93
- package/src/components/GModalOrderJourney/components/index.ts +0 -1
- package/src/components/GModalOrderJourney/context/OrderJourneyContext.tsx +0 -17
- package/src/components/GModalOrderJourney/context/index.ts +0 -1
- package/src/components/GModalOrderJourney/hooks/index.ts +0 -1
- package/src/components/GModalOrderJourney/hooks/useGModalOrderJourney.ts +0 -25
- package/src/components/GModalOrderJourney/index.ts +0 -5
- package/src/components/GModalOrderJourney/types/index.ts +0 -4
- package/src/components/GModalOrderJourney/utils/index.ts +0 -75
- package/src/components/GSelectableMetricChartCard/GSelectableMetricChartCard.tsx +0 -83
- package/src/components/GSelectableMetricChartCard/MetricChartTab.tsx +0 -56
- package/src/components/GSelectableMetricChartCard/index.ts +0 -2
- package/src/components/GTimePicker/GTimePicker.tsx +0 -31
- package/src/components/GTimePicker/components/BaseTimePicker.tsx +0 -249
- package/src/components/GTimePicker/components/CompareTimePicker.tsx +0 -41
- package/src/components/GTimePicker/components/DateTimeFilterAddition.tsx +0 -84
- package/src/components/GTimePicker/components/DateTimeFilterInputs.tsx +0 -124
- package/src/components/GTimePicker/components/DateTimeFilters.tsx +0 -86
- package/src/components/GTimePicker/components/MainTimePicker.tsx +0 -47
- package/src/components/GTimePicker/components/index.ts +0 -2
- package/src/components/GTimePicker/constants/compareDateTimePicker.ts +0 -68
- package/src/components/GTimePicker/constants/datePicker.ts +0 -14
- package/src/components/GTimePicker/constants/index.ts +0 -2
- package/src/components/GTimePicker/constants/mainDataTimePicker.ts +0 -88
- package/src/components/GTimePicker/contexts/DateTimePickerProvider.tsx +0 -125
- package/src/components/GTimePicker/contexts/index.ts +0 -1
- package/src/components/GTimePicker/helpers/date-range-info.ts +0 -84
- package/src/components/GTimePicker/helpers/index.ts +0 -4
- package/src/components/GTimePicker/helpers/parse-date.ts +0 -127
- package/src/components/GTimePicker/helpers/time-picker.ts +0 -123
- package/src/components/GTimePicker/helpers/version.ts +0 -36
- package/src/components/GTimePicker/hooks/index.ts +0 -3
- package/src/components/GTimePicker/hooks/useCompareDateTimePicker.tsx +0 -79
- package/src/components/GTimePicker/hooks/useDateTimeFilter.ts +0 -83
- package/src/components/GTimePicker/hooks/useDateTimePicker.tsx +0 -99
- package/src/components/GTimePicker/hooks/useVersionDateTimeFilters.ts +0 -30
- package/src/components/GTimePicker/index.ts +0 -7
- package/src/components/GTimePicker/types/index.ts +0 -43
- package/src/components/MetricDonutChartCard/MetricDonutChartCard.tsx +0 -121
- package/src/components/MetricDonutChartCard/index.ts +0 -2
- package/src/components/MetricDonutChartCard/utils/donut-chart.ts +0 -75
- package/src/components/MetricDonutChartCard/utils/index.ts +0 -1
- package/src/components/OrderAnalytic/OrderListingLatestTable.tsx +0 -111
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/OrderListingTableSkeleton.tsx +0 -40
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonCellContent.tsx +0 -77
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonHeader.tsx +0 -35
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonRow.tsx +0 -35
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonSummaryRow.tsx +0 -36
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/constants.ts +0 -11
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/index.ts +0 -1
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingTable.tsx +0 -159
- package/src/components/OrderAnalytic/components/OrderListing/OrderListingTableEmpty.tsx +0 -29
- package/src/components/OrderAnalytic/components/OrderListing/index.ts +0 -2
- package/src/components/OrderAnalytic/components/index.ts +0 -1
- package/src/components/OrderAnalytic/constants/index.ts +0 -2
- package/src/components/OrderAnalytic/constants/order-columns.ts +0 -51
- package/src/components/OrderAnalytic/constants/order-listing.ts +0 -199
- package/src/components/OrderAnalytic/helpers/index.ts +0 -1
- package/src/components/OrderAnalytic/helpers/order-listing.ts +0 -48
- package/src/components/OrderAnalytic/hooks/index.ts +0 -1
- package/src/components/OrderAnalytic/hooks/useOrderListingData.ts +0 -55
- package/src/components/OrderAnalytic/index.ts +0 -5
- package/src/components/OrderAnalytic/stores/index.ts +0 -2
- package/src/components/OrderAnalytic/stores/order-columns-selector.ts +0 -24
- package/src/components/OrderAnalytic/stores/order-control.ts +0 -15
- package/src/components/OrderAnalytic/types/index.ts +0 -3
- package/src/components/OrderAnalytic/types/order.ts +0 -89
- package/src/components/OrderAnalytic/types/orderListing.ts +0 -4
- package/src/components/OrderAnalytic/types/report.ts +0 -14
- package/src/components/SingleMetricChartCard/SingleMetricChartCard.tsx +0 -56
- package/src/components/SingleMetricChartCard/index.tsx +0 -2
- package/src/components/common/chart/GChartSkeleton.tsx +0 -5
- package/src/components/common/chart/MetricChart.tsx +0 -62
- package/src/components/common/chart/MetricChartEmpty.tsx +0 -35
- package/src/components/common/chart/MetricChartTooltip.tsx +0 -74
- package/src/components/common/chart/MetricDonutChartSkeleton.tsx +0 -14
- package/src/components/common/chart/MetricInfoBlock.tsx +0 -66
- package/src/components/common/chart/MetricInfoSkeleton.tsx +0 -25
- package/src/components/common/chart/MetricValueSummary.tsx +0 -23
- package/src/components/common/chart/index.ts +0 -8
- package/src/components/common/icons/DownIcon8px.tsx +0 -14
- package/src/components/common/icons/UpIcon8px.tsx +0 -14
- package/src/components/common/icons/index.ts +0 -2
- package/src/components/common/percent/MetricPercentage.tsx +0 -42
- package/src/components/common/percent/index.ts +0 -1
- package/src/components/index.ts +0 -9
- package/src/constants/analytic-metric-tooltip.tsx +0 -164
- package/src/constants/breakdown-targets.ts +0 -25
- package/src/constants/campaign.ts +0 -4
- package/src/constants/chart.ts +0 -17
- package/src/constants/currency.ts +0 -3
- package/src/constants/index.ts +0 -6
- package/src/constants/thumbnail.ts +0 -3
- package/src/core/gemxql/api/index.ts +0 -2
- package/src/core/gemxql/api/useCustomGemXQlQuery.ts +0 -35
- package/src/core/gemxql/api/useGemxQlNamedQuery.ts +0 -34
- package/src/core/gemxql/builder/build-gemxql-query.ts +0 -81
- package/src/core/gemxql/builder/clauses/condition-query.ts +0 -74
- package/src/core/gemxql/builder/clauses/from-query.ts +0 -18
- package/src/core/gemxql/builder/clauses/group-query.ts +0 -43
- package/src/core/gemxql/builder/clauses/index.ts +0 -11
- package/src/core/gemxql/builder/clauses/limit-query.ts +0 -15
- package/src/core/gemxql/builder/clauses/mode-query.ts +0 -14
- package/src/core/gemxql/builder/clauses/offset-query.ts +0 -15
- package/src/core/gemxql/builder/clauses/order-by-query.ts +0 -37
- package/src/core/gemxql/builder/clauses/show-query.ts +0 -18
- package/src/core/gemxql/builder/clauses/time-query.ts +0 -67
- package/src/core/gemxql/builder/clauses/time-series-query.ts +0 -15
- package/src/core/gemxql/builder/clauses/timezone-query.ts +0 -17
- package/src/core/gemxql/builder/configs/date-formats.ts +0 -1
- package/src/core/gemxql/builder/configs/index.ts +0 -3
- package/src/core/gemxql/builder/configs/keywords.ts +0 -16
- package/src/core/gemxql/builder/configs/query-defaults.ts +0 -1
- package/src/core/gemxql/builder/filters/build-extra-conditions.ts +0 -69
- package/src/core/gemxql/builder/filters/build-filter-conditions.ts +0 -161
- package/src/core/gemxql/builder/filters/index.ts +0 -2
- package/src/core/gemxql/builder/helpers/date-query-helpers.ts +0 -41
- package/src/core/gemxql/builder/helpers/index.ts +0 -1
- package/src/core/gemxql/builder/helpers/is-valid-query-input.ts +0 -8
- package/src/core/gemxql/builder/index.ts +0 -6
- package/src/core/gemxql/builder/parse-gemxql-query.ts +0 -43
- package/src/core/gemxql/constants/analytic-data.ts +0 -2
- package/src/core/gemxql/constants/column-keys.ts +0 -4
- package/src/core/gemxql/constants/index.ts +0 -4
- package/src/core/gemxql/constants/operators.ts +0 -2
- package/src/core/gemxql/constants/row-reader-mode.ts +0 -9
- package/src/core/gemxql/graphql/fragments/gemxql.generated.ts +0 -80
- package/src/core/gemxql/graphql/fragments/gemxql.gql +0 -18
- package/src/core/gemxql/graphql/index.ts +0 -2
- package/src/core/gemxql/graphql/queries/gemxql.generated.ts +0 -26
- package/src/core/gemxql/graphql/queries/gemxql.gql +0 -5
- package/src/core/gemxql/helpers/columnKeys.ts +0 -8
- package/src/core/gemxql/helpers/extractQueryData.ts +0 -18
- package/src/core/gemxql/helpers/formatAnalyticData.ts +0 -92
- package/src/core/gemxql/helpers/formatAnalyticDate.ts +0 -29
- package/src/core/gemxql/helpers/getTimeDimension.ts +0 -11
- package/src/core/gemxql/helpers/hasMetricData.ts +0 -6
- package/src/core/gemxql/helpers/index.ts +0 -8
- package/src/core/gemxql/helpers/parseJsonFields.ts +0 -36
- package/src/core/gemxql/helpers/readNumeric.ts +0 -25
- package/src/core/gemxql/hooks/index.ts +0 -2
- package/src/core/gemxql/hooks/useAnalyticData.ts +0 -67
- package/src/core/gemxql/hooks/useGemXQlPagination.ts +0 -79
- package/src/core/gemxql/index.ts +0 -8
- package/src/core/gemxql/types/analytic-data.ts +0 -26
- package/src/core/gemxql/types/analytic-source.ts +0 -4
- package/src/core/gemxql/types/extra-condition.ts +0 -40
- package/src/core/gemxql/types/field-filters.ts +0 -18
- package/src/core/gemxql/types/field-operators.ts +0 -8
- package/src/core/gemxql/types/filter-types.ts +0 -33
- package/src/core/gemxql/types/group-with-clause.ts +0 -12
- package/src/core/gemxql/types/index.ts +0 -11
- package/src/core/gemxql/types/order-by.ts +0 -13
- package/src/core/gemxql/types/page-fields.ts +0 -25
- package/src/core/gemxql/types/row-reader-mode.ts +0 -6
- package/src/core/gemxql/types/time-dimension.ts +0 -8
- package/src/global.d.ts +0 -38
- package/src/hooks/index.ts +0 -7
- package/src/hooks/publish/index.ts +0 -2
- package/src/hooks/publish/useStickyDetectById.ts +0 -39
- package/src/hooks/publish/useStickyFilterBoxProps.ts +0 -26
- package/src/hooks/publish/useWindowSize.ts +0 -54
- package/src/hooks/useEnhancedEffect.ts +0 -3
- package/src/hooks/useFetchCurrencyRates.ts +0 -48
- package/src/hooks/useFormatLineChartData.ts +0 -28
- package/src/hooks/usePopoverResizeObserver.ts +0 -43
- package/src/hooks/usePreventBodyScroll.ts +0 -15
- package/src/hooks/useSearchParams.ts +0 -7
- package/src/hooks/useToggle.ts +0 -23
- package/src/index.ts +0 -10
- package/src/modules/analytics/constants/index.ts +0 -124
- package/src/modules/analytics/index.ts +0 -3
- package/src/modules/analytics/types/index.ts +0 -43
- package/src/modules/analytics/utils/formatMetric.ts +0 -42
- package/src/modules/analytics/utils/getPAMetricValue.ts +0 -11
- package/src/modules/analytics/utils/index.ts +0 -3
- package/src/modules/analytics/utils/metric.ts +0 -172
- package/src/providers/ConvertMoneyProvider.tsx +0 -68
- package/src/providers/MetricChartProvider.tsx +0 -50
- package/src/providers/TimezoneProvider.tsx +0 -31
- package/src/providers/index.ts +0 -5
- package/src/shared/charts/components/ComboChart.tsx +0 -108
- package/src/shared/charts/components/GBarChart.tsx +0 -96
- package/src/shared/charts/components/GComboChart.tsx +0 -15
- package/src/shared/charts/components/GDonutChart.tsx +0 -25
- package/src/shared/charts/components/GFunnelChart/GFunnelChart.tsx +0 -34
- package/src/shared/charts/components/GFunnelChart/components/FunnelChartAction.tsx +0 -67
- package/src/shared/charts/components/GFunnelChart/components/FunnelChartActionIcon.tsx +0 -60
- package/src/shared/charts/components/GFunnelChart/components/FunnelChartActionWrapper.tsx +0 -100
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionContent.tsx +0 -92
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionHeader.tsx +0 -54
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionItem.tsx +0 -51
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/FunnelSelectionPopover.tsx +0 -95
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/index.ts +0 -1
- package/src/shared/charts/components/GFunnelChart/components/FunnelSelection/type.ts +0 -7
- package/src/shared/charts/components/GFunnelChart/components/types.ts +0 -24
- package/src/shared/charts/components/GFunnelChart/index.ts +0 -4
- package/src/shared/charts/components/GFunnelChart/types.ts +0 -11
- package/src/shared/charts/components/GPolarisViz/components/Arc/Arc.module.scss +0 -7
- package/src/shared/charts/components/GPolarisViz/components/Arc/Arc.tsx +0 -135
- package/src/shared/charts/components/GPolarisViz/components/Arc/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/ChartContainer.module.scss +0 -39
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/ChartContainer.tsx +0 -150
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/hooks/useContainerBounds.ts +0 -113
- package/src/shared/charts/components/GPolarisViz/components/ChartContainer/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/ChartDiv.tsx +0 -18
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/ChartElements.module.scss +0 -21
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/ChartSVG.tsx +0 -40
- package/src/shared/charts/components/GPolarisViz/components/ChartElements/index.ts +0 -7
- package/src/shared/charts/components/GPolarisViz/components/ChartErrorBoundary/ChartErrorBoundary.tsx +0 -56
- package/src/shared/charts/components/GPolarisViz/components/ChartErrorBoundary/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartErrorBoundary/utilities/checkForMismatchedData.ts +0 -34
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/ChartSkeleton.module.scss +0 -6
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/ChartSkeleton.tsx +0 -96
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/DonutSkeleton/DonutSkeleton.module.scss +0 -41
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/DonutSkeleton/DonutSkeleton.tsx +0 -193
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/DonutSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/ErrorText/ErrorText.tsx +0 -40
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/ErrorText/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/FunnelSkeleton/FunnelSkeleton.tsx +0 -69
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/FunnelSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/GridSkeleton/GridSkeleton.tsx +0 -155
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/GridSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/Shimmer/Shimmer.module.scss +0 -33
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/Shimmer/Shimmer.tsx +0 -34
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/Shimmer/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleBarSkeleton/SimpleBarSkeleton.module.scss +0 -15
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleBarSkeleton/SimpleBarSkeleton.tsx +0 -53
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleBarSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleNormalizedSkeleton/SimpleNormalizedSkeleton.module.scss +0 -35
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleNormalizedSkeleton/SimpleNormalizedSkeleton.tsx +0 -75
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SimpleNormalizedSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SparkSkeleton/SparkSkeleton.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/SparkSkeleton/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/components/index.ts +0 -8
- package/src/shared/charts/components/GPolarisViz/components/ChartSkeleton/index.ts +0 -9
- package/src/shared/charts/components/GPolarisViz/components/ConicGradientWithStops/ConicGradientWithStops.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/ConicGradientWithStops/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/DefaultPreview/DefaultPreview.module.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/components/DefaultPreview/DefaultPreview.tsx +0 -25
- package/src/shared/charts/components/GPolarisViz/components/DefaultPreview/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/Chart.tsx +0 -209
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/FunnelChart.tsx +0 -72
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/FunnelChartXAxisArrows.tsx +0 -52
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/FunnelChartXAxisLabels.tsx +0 -66
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/FunnelSegment.tsx +0 -121
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/Label.module.scss +0 -23
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/Label.tsx +0 -67
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/components/index.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/components/FunnelChart/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/Chart.tsx +0 -259
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/FunnelChartNext.tsx +0 -104
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelChartLabels/FunnelChartLabels.tsx +0 -387
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelChartLabels/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelTooltip/FunnelTooltip.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelTooltip/FunnelTooltip.tsx +0 -37
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/FunnelTooltip/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/ScaleIcon.tsx +0 -20
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/ScaleIconTooltip.tsx +0 -31
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/CustomTooltip.tsx +0 -68
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/Tooltip.scss +0 -52
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/Tooltip.tsx +0 -149
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/Tooltip/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/TooltipOverlay.tsx +0 -117
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/TooltipWithPortal.tsx +0 -12
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/index.ts +0 -8
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/constants.ts +0 -28
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/hooks/useTooltipInteraction.ts +0 -59
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/hooks/useTooltipPlacement.ts +0 -113
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/index.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/types.ts +0 -13
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/utilities/calculate-dropoff.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/components/FunnelChartNext/utilities/useBuildFunnelTrends.ts +0 -108
- package/src/shared/charts/components/GPolarisViz/components/HorizontalGridLines/HorizontalGridLines.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/HorizontalGridLines/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/Labels/SingleTextLine.tsx +0 -64
- package/src/shared/charts/components/GPolarisViz/components/Labels/hooks/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/Labels/hooks/useLabels.tsx +0 -131
- package/src/shared/charts/components/GPolarisViz/components/Labels/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/endLineTruncate.ts +0 -23
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/endWordTruncate.ts +0 -34
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/estimateTextHeight.ts +0 -31
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/formatAndAddEllipsis.ts +0 -12
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getDiagonalLabels.ts +0 -70
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getHorizontalLabels.ts +0 -90
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getVerticalLabels.ts +0 -58
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/getWidestLabel.ts +0 -15
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/shouldSkipLabel.ts +0 -11
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/endWordTruncate.test.ts +0 -16
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/estimateTextHeight.test.ts +0 -19
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/formatAndAddEllipsis.test.ts +0 -9
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/truncateLastLine.test.ts +0 -22
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/tests/truncateSingleLine.test.ts +0 -15
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/truncateLabels.ts +0 -75
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/truncateLastLine.ts +0 -61
- package/src/shared/charts/components/GPolarisViz/components/Labels/utilities/truncateSingleLine.ts +0 -39
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/LinePreview.module.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/LinePreview.tsx +0 -105
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/constants.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/components/LinePreview/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/SwallowErrors/SwallowErrors.tsx +0 -32
- package/src/shared/charts/components/GPolarisViz/components/SwallowErrors/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TextLine/TextLine.tsx +0 -88
- package/src/shared/charts/components/GPolarisViz/components/TextLine/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/TooltipContent.tsx +0 -109
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipContentContainer/TooltipContentContainer.module.scss +0 -10
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipContentContainer/TooltipContentContainer.tsx +0 -67
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipContentContainer/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipRow/TooltipRow.module.scss +0 -26
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipRow/TooltipRow.tsx +0 -57
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipRow/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeries/TooltipSeries.module.scss +0 -4
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeries/TooltipSeries.tsx +0 -26
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeries/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeriesName/TooltipSeriesName.module.scss +0 -4
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeriesName/TooltipSeriesName.tsx +0 -20
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipSeriesName/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipTitle/TooltipTitle.module.scss +0 -7
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipTitle/TooltipTitle.tsx +0 -15
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/TooltipTitle/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/components/index.ts +0 -5
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/constants.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/hooks/useGetLongestLabelFromData.ts +0 -56
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/index.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/utilities/get-tooltip-template-content-column-count.ts +0 -10
- package/src/shared/charts/components/GPolarisViz/components/TooltipContent/utilities/tests/get-tooltip-template-content-column-count.test.ts +0 -48
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/TooltipWrapper.tsx +0 -338
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/components/TooltipAnimatedContainer.module.scss +0 -6
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/components/TooltipAnimatedContainer.tsx +0 -139
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/constants.ts +0 -18
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/index.ts +0 -5
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/types.ts +0 -62
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/eventPoint.ts +0 -84
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getAlteredHorizontalBarPosition.ts +0 -110
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getAlteredLineChartPosition.ts +0 -115
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getAlteredVerticalBarPosition.ts +0 -105
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getDonutChartTooltipPosition.ts +0 -64
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getHorizontalBarChartTooltipPosition.ts +0 -79
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getLineChartTooltipPosition.ts +0 -68
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/getVerticalBarChartTooltipPosition.ts +0 -123
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities/shouldBlockTooltipEvents.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/components/TooltipWrapper/utilities.ts +0 -162
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/TrendIndicator.tsx +0 -72
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Arrows/ArrowDown.tsx +0 -12
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Arrows/ArrowUp.tsx +0 -12
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Arrows/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Svg/Svg.scss +0 -7
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Svg/Svg.tsx +0 -27
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/Svg/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/components/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/constants.ts +0 -12
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/index.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/components/TrendIndicator/utilities/estimateTrendIndicatorWidth.ts +0 -9
- package/src/shared/charts/components/GPolarisViz/components/VerticalBarChart/utilities/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/VerticalBarChart/utilities/sortBarChartData.ts +0 -20
- package/src/shared/charts/components/GPolarisViz/components/VerticalGridLines/VerticalGridLines.tsx +0 -32
- package/src/shared/charts/components/GPolarisViz/components/VerticalGridLines/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/components/index.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/constants.ts +0 -72
- package/src/shared/charts/components/GPolarisViz/data/character-width-offsets.json +0 -65
- package/src/shared/charts/components/GPolarisViz/data/character-widths.json +0 -1
- package/src/shared/charts/components/GPolarisViz/hooks/index.ts +0 -5
- package/src/shared/charts/components/GPolarisViz/hooks/useBarSpringConfig.ts +0 -21
- package/src/shared/charts/components/GPolarisViz/hooks/useBrowserCheck.ts +0 -13
- package/src/shared/charts/components/GPolarisViz/hooks/useCallbackRef.tsx +0 -39
- package/src/shared/charts/components/GPolarisViz/hooks/useDataForHorizontalChart.ts +0 -69
- package/src/shared/charts/components/GPolarisViz/hooks/useDebouncedCallback.ts +0 -197
- package/src/shared/charts/components/GPolarisViz/hooks/useFormattedLabels.ts +0 -31
- package/src/shared/charts/components/GPolarisViz/hooks/useFunnelBarScaling.ts +0 -53
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalBarSizes.ts +0 -70
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalStackedValues.ts +0 -34
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalTicksAndScale.ts +0 -67
- package/src/shared/charts/components/GPolarisViz/hooks/useHorizontalXScale.ts +0 -48
- package/src/shared/charts/components/GPolarisViz/hooks/useIndexForLabels.ts +0 -16
- package/src/shared/charts/components/GPolarisViz/hooks/usePrefersReducedMotion.ts +0 -6
- package/src/shared/charts/components/GPolarisViz/hooks/usePrintResizing.ts +0 -94
- package/src/shared/charts/components/GPolarisViz/hooks/useReducedLabelIndexes.ts +0 -21
- package/src/shared/charts/components/GPolarisViz/hooks/useResizeObserver.ts +0 -39
- package/src/shared/charts/components/GPolarisViz/hooks/useRootContainer.ts +0 -20
- package/src/shared/charts/components/GPolarisViz/hooks/useWatchColorVisionEvents.tsx +0 -35
- package/src/shared/charts/components/GPolarisViz/index.ts +0 -10
- package/src/shared/charts/components/GPolarisViz/shared/Bar/Bar.tsx +0 -89
- package/src/shared/charts/components/GPolarisViz/shared/Bar/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/FunnelChartConnector.tsx +0 -46
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/FunnelChartConnectorGradient.tsx +0 -21
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/constants.ts +0 -11
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartConnector/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/FunnelChartSegment.tsx +0 -100
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/components/AnimatedSegment.tsx +0 -50
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/components/InteractiveOverlay.tsx +0 -34
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/components/ScaledSegment.tsx +0 -218
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/constants.ts +0 -4
- package/src/shared/charts/components/GPolarisViz/shared/FunnelChartSegment/index.ts +0 -2
- package/src/shared/charts/components/GPolarisViz/shared/SeriesIcon/SeriesIcon.tsx +0 -22
- package/src/shared/charts/components/GPolarisViz/shared/SeriesIcon/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/shared/ZeroValueLine/ZeroValueLine.tsx +0 -45
- package/src/shared/charts/components/GPolarisViz/shared/ZeroValueLine/index.ts +0 -1
- package/src/shared/charts/components/GPolarisViz/shared/index.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/styles/_common.scss +0 -15
- package/src/shared/charts/components/GPolarisViz/styles/shared/_accessibility.scss +0 -41
- package/src/shared/charts/components/GPolarisViz/styles/shared/_chart-container.scss +0 -8
- package/src/shared/charts/components/GPolarisViz/styles/shared/_variables.scss +0 -322
- package/src/shared/charts/components/GPolarisViz/types.ts +0 -261
- package/src/shared/charts/components/GPolarisViz/utilities/base.ts +0 -13
- package/src/shared/charts/components/GPolarisViz/utilities/classnames.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/utilities/createCssConicGradient.ts +0 -12
- package/src/shared/charts/components/GPolarisViz/utilities/createCssGradient.ts +0 -7
- package/src/shared/charts/components/GPolarisViz/utilities/estimateStringWidthWithOffset.ts +0 -15
- package/src/shared/charts/components/GPolarisViz/utilities/getAxisOptions.ts +0 -26
- package/src/shared/charts/components/GPolarisViz/utilities/getCSSBackgroundFromColor.ts +0 -8
- package/src/shared/charts/components/GPolarisViz/utilities/getChartId.ts +0 -3
- package/src/shared/charts/components/GPolarisViz/utilities/getFontSize.ts +0 -7
- package/src/shared/charts/components/GPolarisViz/utilities/getStackedMinMax.ts +0 -43
- package/src/shared/charts/components/GPolarisViz/utilities/getStackedValues.ts +0 -35
- package/src/shared/charts/components/GPolarisViz/utilities/getStackedValuesFromDataSeries.tsx +0 -30
- package/src/shared/charts/components/GPolarisViz/utilities/getTrendIndicatorData.ts +0 -22
- package/src/shared/charts/components/GPolarisViz/utilities/hasHiddenComparisonSeries.ts +0 -26
- package/src/shared/charts/components/GPolarisViz/utilities/index.ts +0 -6
- package/src/shared/charts/components/GSimpleBarChart.tsx +0 -32
- package/src/shared/charts/components/index.ts +0 -7
- package/src/shared/charts/constants/chart.ts +0 -14
- package/src/shared/charts/constants/index.ts +0 -1
- package/src/shared/charts/contexts/GChartProvider.tsx +0 -48
- package/src/shared/charts/contexts/index.ts +0 -1
- package/src/shared/charts/index.ts +0 -4
- package/src/shared/charts/types/chart.ts +0 -36
- package/src/shared/charts/types/index.ts +0 -1
- package/src/shared/components/GActivatorPopover/GActivatorPopover.tsx +0 -107
- package/src/shared/components/GActivatorPopover/index.ts +0 -1
- package/src/shared/components/GBlockCenter/GBlockCenter.scss +0 -19
- package/src/shared/components/GBlockCenter/GBlockCenter.tsx +0 -72
- package/src/shared/components/GBlockCenter/index.ts +0 -1
- package/src/shared/components/GBox/GBox.scss +0 -25
- package/src/shared/components/GBox/GBox.tsx +0 -15
- package/src/shared/components/GBox/index.ts +0 -1
- package/src/shared/components/GBoxCard/GBoxCard.tsx +0 -27
- package/src/shared/components/GBoxCard/index.ts +0 -1
- package/src/shared/components/GButton/GButton.scss +0 -41
- package/src/shared/components/GButton/GButton.tsx +0 -73
- package/src/shared/components/GButton/index.ts +0 -1
- package/src/shared/components/GCheckbox/GCheckbox.tsx +0 -176
- package/src/shared/components/GCheckbox/index.ts +0 -1
- package/src/shared/components/GChoice/ChoiceHelpText.tsx +0 -25
- package/src/shared/components/GChoice/GChoice.scss +0 -14
- package/src/shared/components/GChoice/GChoice.tsx +0 -165
- package/src/shared/components/GChoice/index.ts +0 -2
- package/src/shared/components/GClickable/GClickable.tsx +0 -43
- package/src/shared/components/GClickable/index.ts +0 -1
- package/src/shared/components/GDiv/GDiv.tsx +0 -27
- package/src/shared/components/GDiv/index.ts +0 -1
- package/src/shared/components/GDotInline/GDotInline.tsx +0 -20
- package/src/shared/components/GDotInline/index.ts +0 -1
- package/src/shared/components/GFeatureLocked/GFeatureLocked.tsx +0 -85
- package/src/shared/components/GFeatureLocked/assets/images/empty-analytics.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-campaign-group-template-illustration.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-campaign-group-template.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-page-listing-illustration.png +0 -0
- package/src/shared/components/GFeatureLocked/assets/images/empty-page-listing.png +0 -0
- package/src/shared/components/GFeatureLocked/constants.ts +0 -33
- package/src/shared/components/GFeatureLocked/index.ts +0 -2
- package/src/shared/components/GFeatureLocked/types.ts +0 -16
- package/src/shared/components/GI18NText/GI18NText.tsx +0 -37
- package/src/shared/components/GI18NText/index.ts +0 -2
- package/src/shared/components/GI18NText/types.ts +0 -7
- package/src/shared/components/GInlineCenter/GInlineCenter.scss +0 -17
- package/src/shared/components/GInlineCenter/GInlineCenter.tsx +0 -39
- package/src/shared/components/GInlineCenter/index.ts +0 -1
- package/src/shared/components/GMockDataTooltip/GMockDataTooltip.tsx +0 -30
- package/src/shared/components/GMockDataTooltip/index.ts +0 -1
- package/src/shared/components/GModal/GModal.tsx +0 -49
- package/src/shared/components/GModal/index.ts +0 -1
- package/src/shared/components/GOptionList/GOptionList.tsx +0 -63
- package/src/shared/components/GOptionList/index.ts +0 -1
- package/src/shared/components/GPagination/GPagination.tsx +0 -44
- package/src/shared/components/GPagination/hooks/useGPagination.ts +0 -42
- package/src/shared/components/GPagination/index.ts +0 -2
- package/src/shared/components/GSelector/GSelector.tsx +0 -198
- package/src/shared/components/GSelector/index.ts +0 -1
- package/src/shared/components/GSkeletonDisplayText/GSkeletonDisplayText.tsx +0 -14
- package/src/shared/components/GSkeletonDisplayText/index.ts +0 -1
- package/src/shared/components/GSpinner/GSpinner.tsx +0 -16
- package/src/shared/components/GSpinner/index.ts +0 -1
- package/src/shared/components/GTextLink/GTextLink.tsx +0 -26
- package/src/shared/components/GTextLink/index.ts +0 -1
- package/src/shared/components/GTextTooltip/GTextTooltip.tsx +0 -18
- package/src/shared/components/GTextTooltip/index.ts +0 -1
- package/src/shared/components/GTextTruncated/GTextTruncated.tsx +0 -80
- package/src/shared/components/GTextTruncated/index.ts +0 -1
- package/src/shared/components/GThumbnail/GThumbnail.scss +0 -5
- package/src/shared/components/GThumbnail/GThumbnail.tsx +0 -69
- package/src/shared/components/GThumbnail/index.ts +0 -1
- package/src/shared/components/GTooltip/GTooltip.tsx +0 -34
- package/src/shared/components/GTooltip/components/GTooltipCard.tsx +0 -164
- package/src/shared/components/GTooltip/index.ts +0 -3
- package/src/shared/components/GTooltipCard/GTooltipCard.tsx +0 -161
- package/src/shared/components/GTooltipCard/index.ts +0 -7
- package/src/shared/components/GVariantBadge/GVariant.tsx +0 -55
- package/src/shared/components/GVariantBadge/GVariantBadge.scss +0 -10
- package/src/shared/components/GVariantBadge/GVariantBadge.tsx +0 -82
- package/src/shared/components/GVariantBadge/index.ts +0 -4
- package/src/shared/components/GVariantBadge/types.ts +0 -20
- package/src/shared/components/GViewBySelector/GViewBySelector.tsx +0 -114
- package/src/shared/components/GViewBySelector/index.ts +0 -1
- package/src/shared/components/index.ts +0 -26
- package/src/shared/index.ts +0 -1
- package/src/shared/journey/common/JourneyContainer/components/JourneyContainer.tsx +0 -140
- package/src/shared/journey/common/JourneyContainer/components/JourneyTimeline.tsx +0 -18
- package/src/shared/journey/common/JourneyContainer/components/index.ts +0 -2
- package/src/shared/journey/common/JourneyContainer/index.ts +0 -1
- package/src/shared/journey/common/index.ts +0 -1
- package/src/shared/journey/index.ts +0 -2
- package/src/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/AcceptedPostPurchaseOffer.tsx +0 -24
- package/src/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/CheckoutCompleted.tsx +0 -64
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutItems.tsx +0 -27
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.tsx +0 -25
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStartedDetail.tsx +0 -79
- package/src/shared/journey/ui/JourneyEvents/components/CheckoutStarted/index.ts +0 -2
- package/src/shared/journey/ui/JourneyEvents/components/PageViewed/PageViewed.tsx +0 -116
- package/src/shared/journey/ui/JourneyEvents/components/PageViewed/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/ProductAddedToCart.tsx +0 -24
- package/src/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/ProductQuantity/ProductQuantity.tsx +0 -33
- package/src/shared/journey/ui/JourneyEvents/components/ProductQuantity/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/ProductRemovedFromCart.tsx +0 -24
- package/src/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/components/index.ts +0 -6
- package/src/shared/journey/ui/JourneyEvents/constants/event.ts +0 -38
- package/src/shared/journey/ui/JourneyEvents/constants/index.ts +0 -1
- package/src/shared/journey/ui/JourneyEvents/index.ts +0 -2
- package/src/shared/journey/ui/JourneyEvents/types.ts +0 -2
- package/src/shared/journey/ui/JourneyGroup/JourneyGroup.tsx +0 -41
- package/src/shared/journey/ui/JourneyGroup/index.ts +0 -1
- package/src/shared/journey/ui/JourneyItem/components/EventMarkerIcon.tsx +0 -28
- package/src/shared/journey/ui/JourneyItem/components/JourneyDetail.tsx +0 -24
- package/src/shared/journey/ui/JourneyItem/components/JourneyItem.tsx +0 -27
- package/src/shared/journey/ui/JourneyItem/components/JourneyTime.tsx +0 -33
- package/src/shared/journey/ui/JourneyItem/components/QuantityWrapper.tsx +0 -17
- package/src/shared/journey/ui/JourneyItem/components/index.ts +0 -3
- package/src/shared/journey/ui/JourneyItem/index.ts +0 -2
- package/src/shared/journey/ui/JourneyItem/types/events.ts +0 -33
- package/src/shared/journey/ui/JourneyItem/types/index.ts +0 -1
- package/src/shared/journey/ui/JourneyTitle/components/GemxIdBadge.tsx +0 -38
- package/src/shared/journey/ui/JourneyTitle/components/JourneyDateBadge.tsx +0 -18
- package/src/shared/journey/ui/JourneyTitle/components/JourneyIdBadge.tsx +0 -65
- package/src/shared/journey/ui/JourneyTitle/components/JourneyLoadMore.tsx +0 -43
- package/src/shared/journey/ui/JourneyTitle/components/JourneyTitle.tsx +0 -42
- package/src/shared/journey/ui/JourneyTitle/components/index.ts +0 -2
- package/src/shared/journey/ui/JourneyTitle/constants/idBadge.ts +0 -1
- package/src/shared/journey/ui/JourneyTitle/constants/index.ts +0 -1
- package/src/shared/journey/ui/JourneyTitle/index.ts +0 -1
- package/src/shared/journey/ui/index.ts +0 -3
- package/src/shared/journey/ui/type.ts +0 -2
- package/src/shared/reports/common/Visualization/constants/columns.ts +0 -6
- package/src/shared/reports/common/Visualization/constants/index.ts +0 -2
- package/src/shared/reports/common/Visualization/constants/version.ts +0 -8
- package/src/shared/reports/common/Visualization/index.ts +0 -2
- package/src/shared/reports/common/Visualization/types/chart.ts +0 -5
- package/src/shared/reports/common/Visualization/types/index.ts +0 -3
- package/src/shared/reports/common/Visualization/types/report-metric.ts +0 -21
- package/src/shared/reports/common/Visualization/types/report.ts +0 -42
- package/src/shared/reports/common/Visualization/utils/index.ts +0 -2
- package/src/shared/reports/common/Visualization/utils/version.ts +0 -9
- package/src/shared/reports/common/Visualization/utils/visualization.ts +0 -58
- package/src/shared/reports/common/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/ReportTable.tsx +0 -194
- package/src/shared/reports/ui/ReportTable/ReportTableSkeleton.tsx +0 -73
- package/src/shared/reports/ui/ReportTable/assets/styles/ReportTable.scss +0 -288
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/CampaignsCell.tsx +0 -102
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/CampaignsCellVersion.tsx +0 -11
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/Cell.tsx +0 -93
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/CellRenderers.tsx +0 -72
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/DateCell.tsx +0 -9
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/DefaultCell.tsx +0 -32
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/GemxIdCell.tsx +0 -18
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/CheckoutStartedDetail.tsx +0 -79
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/ItemsCell.tsx +0 -56
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/NoneCell.tsx +0 -11
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/LoadingData.tsx +0 -10
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/NoData.tsx +0 -13
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCell.tsx +0 -78
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellBase.tsx +0 -55
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellContainer.tsx +0 -43
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderItem.tsx +0 -79
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/OrderIdCell.tsx +0 -70
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/PreviousCell.tsx +0 -17
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/TotalCell.tsx +0 -14
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/VersionCell.tsx +0 -31
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/WrapperCell.tsx +0 -31
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Body/Cell/type.ts +0 -18
- package/src/shared/reports/ui/ReportTable/components/Body/Row.tsx +0 -85
- package/src/shared/reports/ui/ReportTable/components/Body/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/components/Footer/Pagination.tsx +0 -76
- package/src/shared/reports/ui/ReportTable/components/Footer/ScrollBar.tsx +0 -19
- package/src/shared/reports/ui/ReportTable/components/Footer/WrapperFooter.tsx +0 -39
- package/src/shared/reports/ui/ReportTable/components/Footer/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/Header/Header.tsx +0 -68
- package/src/shared/reports/ui/ReportTable/components/Header/SortableHeader.tsx +0 -49
- package/src/shared/reports/ui/ReportTable/components/Header/SortableHeaderWithTooltip.tsx +0 -60
- package/src/shared/reports/ui/ReportTable/components/Header/SummaryCell.tsx +0 -26
- package/src/shared/reports/ui/ReportTable/components/Header/SummaryRow.tsx +0 -69
- package/src/shared/reports/ui/ReportTable/components/Header/WrapperHeader.tsx +0 -54
- package/src/shared/reports/ui/ReportTable/components/Header/index.ts +0 -1
- package/src/shared/reports/ui/ReportTable/components/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/constants/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/constants/order.ts +0 -30
- package/src/shared/reports/ui/ReportTable/constants/table.ts +0 -17
- package/src/shared/reports/ui/ReportTable/context/ReportTableActionsContext.tsx +0 -28
- package/src/shared/reports/ui/ReportTable/helpers/format.ts +0 -29
- package/src/shared/reports/ui/ReportTable/helpers/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/helpers/report.ts +0 -7
- package/src/shared/reports/ui/ReportTable/hooks/index.ts +0 -3
- package/src/shared/reports/ui/ReportTable/hooks/useReportTable.ts +0 -172
- package/src/shared/reports/ui/ReportTable/hooks/useReportTableCell.tsx +0 -28
- package/src/shared/reports/ui/ReportTable/hooks/useSyncedScroll.ts +0 -81
- package/src/shared/reports/ui/ReportTable/index.ts +0 -4
- package/src/shared/reports/ui/ReportTable/types/dimension.ts +0 -8
- package/src/shared/reports/ui/ReportTable/types/index.ts +0 -43
- package/src/shared/reports/ui/ReportTable/types/order.ts +0 -15
- package/src/shared/reports/ui/ReportTable/types/report-columns.ts +0 -11
- package/src/shared/reports/ui/ReportTable/utils/format.ts +0 -100
- package/src/shared/reports/ui/ReportTable/utils/index.ts +0 -2
- package/src/shared/reports/ui/ReportTable/utils/order.ts +0 -8
- package/src/shared/reports/ui/ReportTable/utils/table.ts +0 -19
- package/src/shared/reports/ui/ReportTable/utils/visualization.ts +0 -56
- package/src/shared/reports/ui/index.ts +0 -0
- package/src/stores/currencyRatesStore.ts +0 -13
- package/src/stores/index.ts +0 -2
- package/src/styles/index.scss +0 -9
- package/src/types/analytic-mode.ts +0 -5
- package/src/types/breakdown-items.ts +0 -21
- package/src/types/campaign.ts +0 -13
- package/src/types/chart.ts +0 -42
- package/src/types/currency.ts +0 -329
- package/src/types/index.ts +0 -8
- package/src/types/metric.ts +0 -81
- package/src/types/pricing.ts +0 -38
- package/src/types/report-columns.ts +0 -1
- package/src/types/template.ts +0 -19
- package/src/utils/analytics.ts +0 -75
- package/src/utils/array.ts +0 -13
- package/src/utils/cls.ts +0 -18
- package/src/utils/currency.ts +0 -42
- package/src/utils/date-time.ts +0 -7
- package/src/utils/dayjs.ts +0 -52
- package/src/utils/deep-copy.ts +0 -4
- package/src/utils/index.ts +0 -12
- package/src/utils/is-browser.ts +0 -3
- package/src/utils/number.ts +0 -19
- package/src/utils/percentage.ts +0 -40
- package/src/utils/sort.ts +0 -87
- package/src/utils/string.ts +0 -20
- package/src/utils/template-type.ts +0 -30
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import type { BoxProps } from '@shopify/polaris';
|
|
2
|
-
|
|
3
|
-
import { BlockStack, Box, InlineStack, List, Popover, Text } from '@shopify/polaris';
|
|
4
|
-
import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
5
|
-
import { cls } from '@/utils';
|
|
6
|
-
|
|
7
|
-
type CloseTarget = 'activator' | 'next-node';
|
|
8
|
-
export interface PopoverPublicAPI {
|
|
9
|
-
forceUpdatePosition(): void;
|
|
10
|
-
close(target?: CloseTarget): void;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface GTooltipCardPublicAPI {
|
|
14
|
-
onClose(): void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
type Width = 'default' | 'wide' | 'large';
|
|
18
|
-
|
|
19
|
-
export interface GTooltipCardData {
|
|
20
|
-
title: string;
|
|
21
|
-
content: string | TrustedHTML;
|
|
22
|
-
formula?: React.ReactNode;
|
|
23
|
-
contentList?: string[];
|
|
24
|
-
width?: Width;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface GTooltipCardProps {
|
|
28
|
-
children: React.ReactNode;
|
|
29
|
-
/**
|
|
30
|
-
* Delay in `ms` before the tooltip is shown
|
|
31
|
-
* @default 0 (no delay)
|
|
32
|
-
*/
|
|
33
|
-
delay?: number;
|
|
34
|
-
tooltip?: GTooltipCardData;
|
|
35
|
-
activatorProps?: BoxProps;
|
|
36
|
-
wrapper?: 'span' | 'div';
|
|
37
|
-
isHideBorder?: boolean;
|
|
38
|
-
alignment?: 'start' | 'center' | 'end';
|
|
39
|
-
textDecoration?: 'underline' | 'none';
|
|
40
|
-
preferredAlignment?: 'left' | 'center' | 'right';
|
|
41
|
-
popoverRef?: React.RefObject<PopoverPublicAPI>;
|
|
42
|
-
/** Show arrow pointing to activator. @default false */
|
|
43
|
-
showArrow?: boolean;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const SIZE_CLASS: Record<Width, string> = {
|
|
47
|
-
default: 'w-[210px]',
|
|
48
|
-
wide: 'w-[320px]',
|
|
49
|
-
large: 'w-[328px]',
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const ALIGNMENT_MAP = {
|
|
53
|
-
start: 'flex justify-start',
|
|
54
|
-
center: 'flex justify-center',
|
|
55
|
-
end: 'flex justify-end',
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const GTooltipCard = forwardRef<GTooltipCardPublicAPI, GTooltipCardProps>((props, ref) => {
|
|
59
|
-
const {
|
|
60
|
-
tooltip,
|
|
61
|
-
wrapper = 'div',
|
|
62
|
-
activatorProps,
|
|
63
|
-
isHideBorder,
|
|
64
|
-
alignment,
|
|
65
|
-
delay = 500,
|
|
66
|
-
textDecoration = 'none',
|
|
67
|
-
popoverRef,
|
|
68
|
-
preferredAlignment = 'left',
|
|
69
|
-
showArrow = false,
|
|
70
|
-
} = props;
|
|
71
|
-
const { width = 'default' } = tooltip ?? {};
|
|
72
|
-
|
|
73
|
-
const [isMouseEnter, setIsMouseEnter] = useState(false);
|
|
74
|
-
|
|
75
|
-
const TooltipCardWrapper = wrapper;
|
|
76
|
-
|
|
77
|
-
const sizeClass = SIZE_CLASS[width];
|
|
78
|
-
|
|
79
|
-
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
80
|
-
|
|
81
|
-
const handleMouseEnter = () => {
|
|
82
|
-
timeoutRef.current = setTimeout(() => {
|
|
83
|
-
setIsMouseEnter(true);
|
|
84
|
-
}, delay);
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const handleMouseLeave = () => {
|
|
88
|
-
if (timeoutRef.current) {
|
|
89
|
-
clearTimeout(timeoutRef.current);
|
|
90
|
-
timeoutRef.current = null;
|
|
91
|
-
}
|
|
92
|
-
setIsMouseEnter(false);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
useImperativeHandle(ref, () => ({ onClose: handleMouseLeave }));
|
|
96
|
-
|
|
97
|
-
return (
|
|
98
|
-
<TooltipCardWrapper
|
|
99
|
-
className={cls('GTooltipCard cursor-pointer ', alignment && ALIGNMENT_MAP[alignment], {
|
|
100
|
-
'GTooltipCard--text-underline': textDecoration === 'underline',
|
|
101
|
-
})}
|
|
102
|
-
onMouseEnter={handleMouseEnter}
|
|
103
|
-
onMouseLeave={handleMouseLeave}
|
|
104
|
-
>
|
|
105
|
-
<Popover
|
|
106
|
-
ref={popoverRef}
|
|
107
|
-
activator={
|
|
108
|
-
!isHideBorder ? (
|
|
109
|
-
<Box
|
|
110
|
-
borderBlockEndWidth="025"
|
|
111
|
-
borderStyle="dashed"
|
|
112
|
-
borderColor="border-tertiary"
|
|
113
|
-
as={wrapper}
|
|
114
|
-
{...activatorProps}
|
|
115
|
-
>
|
|
116
|
-
{props.children}
|
|
117
|
-
</Box>
|
|
118
|
-
) : (
|
|
119
|
-
<InlineStack>{props.children}</InlineStack>
|
|
120
|
-
)
|
|
121
|
-
}
|
|
122
|
-
activatorWrapper={wrapper}
|
|
123
|
-
onClose={() => {}}
|
|
124
|
-
active={isMouseEnter}
|
|
125
|
-
preferredPosition="below"
|
|
126
|
-
preferredAlignment={preferredAlignment}
|
|
127
|
-
>
|
|
128
|
-
{tooltip && (
|
|
129
|
-
<div className={cls(sizeClass, { 'GTooltipCard-arrow': showArrow })}>
|
|
130
|
-
<Box padding="400">
|
|
131
|
-
<BlockStack gap="200">
|
|
132
|
-
<BlockStack gap="100">
|
|
133
|
-
<Text as="span" variant="headingSm" fontWeight="semibold">
|
|
134
|
-
{tooltip.title}
|
|
135
|
-
</Text>
|
|
136
|
-
<BlockStack gap="400">
|
|
137
|
-
<Text as="span" variant="bodyMd" tone="subdued" fontWeight="medium">
|
|
138
|
-
<span dangerouslySetInnerHTML={{ __html: tooltip.content }}></span>
|
|
139
|
-
</Text>
|
|
140
|
-
{tooltip.contentList && (
|
|
141
|
-
<List type="bullet">
|
|
142
|
-
{tooltip.contentList.map((item) => (
|
|
143
|
-
<List.Item key={item}>
|
|
144
|
-
<Text as="span" variant="bodyMd" tone="subdued" fontWeight="medium">
|
|
145
|
-
{item}
|
|
146
|
-
</Text>
|
|
147
|
-
</List.Item>
|
|
148
|
-
))}
|
|
149
|
-
</List>
|
|
150
|
-
)}
|
|
151
|
-
</BlockStack>
|
|
152
|
-
</BlockStack>
|
|
153
|
-
|
|
154
|
-
{tooltip.formula && <div className="!text-bodySm rounded-md font-mono">{tooltip.formula}</div>}
|
|
155
|
-
</BlockStack>
|
|
156
|
-
</Box>
|
|
157
|
-
</div>
|
|
158
|
-
)}
|
|
159
|
-
</Popover>
|
|
160
|
-
</TooltipCardWrapper>
|
|
161
|
-
);
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
GTooltipCard.displayName = 'GTooltipCard';
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import type { BoxProps } from '@shopify/polaris';
|
|
2
|
-
|
|
3
|
-
import { BlockStack, Box, InlineStack, List, Popover, Text } from '@shopify/polaris';
|
|
4
|
-
import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
5
|
-
|
|
6
|
-
import { cls } from '@/utils/cls';
|
|
7
|
-
|
|
8
|
-
type CloseTarget = 'activator' | 'next-node';
|
|
9
|
-
export interface PopoverPublicAPI {
|
|
10
|
-
forceUpdatePosition(): void;
|
|
11
|
-
close(target?: CloseTarget): void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface GTooltipCardPublicAPI {
|
|
15
|
-
onClose(): void;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
type Width = 'default' | 'wide' | 'large';
|
|
19
|
-
|
|
20
|
-
export interface GTooltipCardData {
|
|
21
|
-
title: string;
|
|
22
|
-
content: string | TrustedHTML;
|
|
23
|
-
formula?: React.ReactNode;
|
|
24
|
-
contentList?: string[];
|
|
25
|
-
width?: Width;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface IProps {
|
|
29
|
-
children: React.ReactNode;
|
|
30
|
-
delay?: number;
|
|
31
|
-
tooltip?: GTooltipCardData;
|
|
32
|
-
activatorProps?: BoxProps;
|
|
33
|
-
wrapper?: 'span' | 'div';
|
|
34
|
-
isHideBorder?: boolean;
|
|
35
|
-
alignment?: 'start' | 'center' | 'end';
|
|
36
|
-
textDecoration?: 'underline' | 'none';
|
|
37
|
-
preferredAlignment?: 'left' | 'center' | 'right';
|
|
38
|
-
popoverRef?: React.RefObject<PopoverPublicAPI>;
|
|
39
|
-
showArrow?: boolean;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const SIZE_CLASS: Record<Width, string> = {
|
|
43
|
-
default: 'w-[210px]',
|
|
44
|
-
wide: 'w-[320px]',
|
|
45
|
-
large: 'w-[328px]',
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const ALIGNMENT_MAP = {
|
|
49
|
-
start: 'flex justify-start',
|
|
50
|
-
center: 'flex justify-center',
|
|
51
|
-
end: 'flex justify-end',
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const GTooltipCard = forwardRef<GTooltipCardPublicAPI, IProps>((props, ref) => {
|
|
55
|
-
const {
|
|
56
|
-
tooltip,
|
|
57
|
-
wrapper = 'div',
|
|
58
|
-
activatorProps,
|
|
59
|
-
isHideBorder,
|
|
60
|
-
alignment,
|
|
61
|
-
delay = 500,
|
|
62
|
-
textDecoration = 'none',
|
|
63
|
-
popoverRef,
|
|
64
|
-
preferredAlignment = 'left',
|
|
65
|
-
showArrow = false,
|
|
66
|
-
} = props;
|
|
67
|
-
const { width = 'default' } = tooltip ?? {};
|
|
68
|
-
|
|
69
|
-
const [isMouseEnter, setIsMouseEnter] = useState(false);
|
|
70
|
-
|
|
71
|
-
const TooltipCardWrapper = wrapper;
|
|
72
|
-
const sizeClass = SIZE_CLASS[width];
|
|
73
|
-
const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
74
|
-
|
|
75
|
-
const handleMouseEnter = () => {
|
|
76
|
-
timeoutRef.current = setTimeout(() => {
|
|
77
|
-
setIsMouseEnter(true);
|
|
78
|
-
}, delay);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
const handleMouseLeave = () => {
|
|
82
|
-
if (timeoutRef.current) {
|
|
83
|
-
clearTimeout(timeoutRef.current);
|
|
84
|
-
timeoutRef.current = null;
|
|
85
|
-
}
|
|
86
|
-
setIsMouseEnter(false);
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
useImperativeHandle(ref, () => ({ onClose: handleMouseLeave }));
|
|
90
|
-
|
|
91
|
-
return (
|
|
92
|
-
<TooltipCardWrapper
|
|
93
|
-
className={cls('GTooltipCard cursor-pointer', alignment && ALIGNMENT_MAP[alignment], {
|
|
94
|
-
'GTooltipCard--text-underline': textDecoration === 'underline',
|
|
95
|
-
})}
|
|
96
|
-
onMouseEnter={handleMouseEnter}
|
|
97
|
-
onMouseLeave={handleMouseLeave}
|
|
98
|
-
>
|
|
99
|
-
<Popover
|
|
100
|
-
ref={popoverRef}
|
|
101
|
-
activator={
|
|
102
|
-
!isHideBorder ? (
|
|
103
|
-
<Box
|
|
104
|
-
borderBlockEndWidth="025"
|
|
105
|
-
borderStyle="dashed"
|
|
106
|
-
borderColor="border-tertiary"
|
|
107
|
-
as={wrapper}
|
|
108
|
-
{...activatorProps}
|
|
109
|
-
>
|
|
110
|
-
{props.children}
|
|
111
|
-
</Box>
|
|
112
|
-
) : (
|
|
113
|
-
<InlineStack>{props.children}</InlineStack>
|
|
114
|
-
)
|
|
115
|
-
}
|
|
116
|
-
activatorWrapper={wrapper}
|
|
117
|
-
onClose={() => {}}
|
|
118
|
-
active={isMouseEnter}
|
|
119
|
-
preferredPosition="below"
|
|
120
|
-
preferredAlignment={preferredAlignment}
|
|
121
|
-
>
|
|
122
|
-
{tooltip && (
|
|
123
|
-
<div className={cls(sizeClass, { 'GTooltipCard-arrow': showArrow })}>
|
|
124
|
-
<Box padding="400">
|
|
125
|
-
<BlockStack gap="200">
|
|
126
|
-
<BlockStack gap="100">
|
|
127
|
-
<Text as="span" variant="headingSm" fontWeight="semibold">
|
|
128
|
-
{tooltip.title}
|
|
129
|
-
</Text>
|
|
130
|
-
<BlockStack gap="200">
|
|
131
|
-
<Text as="span" variant="bodyMd" tone="subdued" fontWeight="medium">
|
|
132
|
-
<span dangerouslySetInnerHTML={{ __html: tooltip.content }}></span>
|
|
133
|
-
</Text>
|
|
134
|
-
{tooltip.contentList && (
|
|
135
|
-
<List type="bullet">
|
|
136
|
-
{tooltip.contentList.map((item) => (
|
|
137
|
-
<List.Item key={item}>
|
|
138
|
-
<Text as="span" variant="bodyMd" tone="subdued" fontWeight="medium">
|
|
139
|
-
{item}
|
|
140
|
-
</Text>
|
|
141
|
-
</List.Item>
|
|
142
|
-
))}
|
|
143
|
-
</List>
|
|
144
|
-
)}
|
|
145
|
-
</BlockStack>
|
|
146
|
-
</BlockStack>
|
|
147
|
-
{tooltip.formula && (
|
|
148
|
-
<div className="rounded-md font-mono" style={{ fontSize: '12px' }}>
|
|
149
|
-
{tooltip.formula}
|
|
150
|
-
</div>
|
|
151
|
-
)}
|
|
152
|
-
</BlockStack>
|
|
153
|
-
</Box>
|
|
154
|
-
</div>
|
|
155
|
-
)}
|
|
156
|
-
</Popover>
|
|
157
|
-
</TooltipCardWrapper>
|
|
158
|
-
);
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
GTooltipCard.displayName = 'GTooltipCard';
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Box } from '@shopify/polaris';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { cls } from '@/utils';
|
|
4
|
-
|
|
5
|
-
interface GVariantProps {
|
|
6
|
-
variant: string;
|
|
7
|
-
size: 'xs' | 'sm' | 'md' | 'lg';
|
|
8
|
-
tone?: 'active' | 'subdued' | 'inactive';
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const GVariant = ({ variant, size, tone }: GVariantProps) => {
|
|
12
|
-
const sizeIcon = useMemo(() => {
|
|
13
|
-
switch (size) {
|
|
14
|
-
case 'xs':
|
|
15
|
-
return '20px';
|
|
16
|
-
case 'sm':
|
|
17
|
-
return '24px';
|
|
18
|
-
case 'md':
|
|
19
|
-
return '28px';
|
|
20
|
-
case 'lg':
|
|
21
|
-
return '32px';
|
|
22
|
-
default:
|
|
23
|
-
return '28px';
|
|
24
|
-
}
|
|
25
|
-
}, [size]);
|
|
26
|
-
|
|
27
|
-
const textColor: string = cls({
|
|
28
|
-
'text-variant-a': tone === 'active',
|
|
29
|
-
'text-variant-subdued': tone === 'subdued',
|
|
30
|
-
'text-variant-b': !tone || tone === 'inactive',
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
const textSize: string = useMemo(() => {
|
|
34
|
-
switch (size) {
|
|
35
|
-
case 'xs':
|
|
36
|
-
return 'Polaris-Text--bodyXs';
|
|
37
|
-
case 'sm':
|
|
38
|
-
return 'Polaris-Text--bodySm';
|
|
39
|
-
case 'md':
|
|
40
|
-
return 'Polaris-Text--headingMd';
|
|
41
|
-
case 'lg':
|
|
42
|
-
return 'Polaris-Text--headingMd';
|
|
43
|
-
default:
|
|
44
|
-
return 'Polaris-Text--headingMd';
|
|
45
|
-
}
|
|
46
|
-
}, [size]);
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<Box minHeight={sizeIcon} minWidth={sizeIcon} width={sizeIcon} borderRadius="full">
|
|
50
|
-
<div className="Polaris-GVariantBadge-Icon" style={{ height: sizeIcon }}>
|
|
51
|
-
<h2 className={`Polaris-Text--headingMd Polaris-Text--semibold ${textColor} ${textSize}`}>{variant}</h2>
|
|
52
|
-
</div>
|
|
53
|
-
</Box>
|
|
54
|
-
);
|
|
55
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import type { LinkProps, TextProps } from '@shopify/polaris';
|
|
2
|
-
import type { GTooltipProps } from '../GTooltip';
|
|
3
|
-
|
|
4
|
-
import { Badge, Box, Icon, InlineStack, Text } from '@shopify/polaris';
|
|
5
|
-
import { GVariantBadgeTone, GVariantBadgeSize } from './types';
|
|
6
|
-
import { InfoIcon } from '@shopify/polaris-icons';
|
|
7
|
-
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import { GTextLink } from '../GTextLink';
|
|
9
|
-
import { GTooltip } from '../GTooltip';
|
|
10
|
-
import { GVariant } from './GVariant';
|
|
11
|
-
|
|
12
|
-
export const CAMPAIGN_BACKGROUND = {
|
|
13
|
-
ORIGIN: '#D5E5FF', //`var(--p-color-${CAMPAIGN_BACKGROUND.ORIGIN})`,
|
|
14
|
-
VARIANT: '#FDDBE2', //`var(--p-color-${CAMPAIGN_BACKGROUND.VARIANT})`,
|
|
15
|
-
SUBDUED: '#F2F2F2', //`var(--p-color-${CAMPAIGN_BACKGROUND.VARIANT})`,
|
|
16
|
-
};
|
|
17
|
-
export interface GVariantBadgeProps {
|
|
18
|
-
variant: string;
|
|
19
|
-
label?: string;
|
|
20
|
-
tone?: 'active' | 'subdued' | 'inactive';
|
|
21
|
-
labelProps?: Partial<TextProps>;
|
|
22
|
-
/**
|
|
23
|
-
* @name: size
|
|
24
|
-
* @type: 'xs' | 'sm' | 'md' | 'lg'
|
|
25
|
-
* @default: 'md'
|
|
26
|
-
* @description: 'xs': 20px | 'sm': 24px | 'md': 28px | 'lg': 32px
|
|
27
|
-
*/
|
|
28
|
-
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
29
|
-
isShowWinner?: boolean;
|
|
30
|
-
linkAction?: LinkProps;
|
|
31
|
-
tooltip?: GTooltipProps;
|
|
32
|
-
hideVariant?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export const GVariantBadge = ({
|
|
35
|
-
label,
|
|
36
|
-
variant,
|
|
37
|
-
tone,
|
|
38
|
-
isShowWinner,
|
|
39
|
-
size = GVariantBadgeSize.MD,
|
|
40
|
-
labelProps,
|
|
41
|
-
linkAction,
|
|
42
|
-
tooltip,
|
|
43
|
-
hideVariant = false,
|
|
44
|
-
}: GVariantBadgeProps) => {
|
|
45
|
-
const { t } = useTranslation();
|
|
46
|
-
|
|
47
|
-
const background: string =
|
|
48
|
-
tone === GVariantBadgeTone.ACTIVE
|
|
49
|
-
? CAMPAIGN_BACKGROUND.ORIGIN
|
|
50
|
-
: tone === GVariantBadgeTone.SUBDUED
|
|
51
|
-
? CAMPAIGN_BACKGROUND.SUBDUED
|
|
52
|
-
: CAMPAIGN_BACKGROUND.VARIANT;
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<Box maxWidth="100%">
|
|
56
|
-
<InlineStack gap="200" blockAlign="center" wrap={false}>
|
|
57
|
-
{!hideVariant && (
|
|
58
|
-
<div className="Polaris-GVariantBadge" style={{ backgroundColor: background, borderRadius: '100%' }}>
|
|
59
|
-
<GVariant variant={variant} size={size} tone={tone} />
|
|
60
|
-
</div>
|
|
61
|
-
)}
|
|
62
|
-
{label && (
|
|
63
|
-
<GTextLink linkAction={linkAction}>
|
|
64
|
-
<Text as="h2" variant="headingMd" {...labelProps} truncate>
|
|
65
|
-
{label}
|
|
66
|
-
</Text>
|
|
67
|
-
</GTextLink>
|
|
68
|
-
)}
|
|
69
|
-
{tooltip && (
|
|
70
|
-
<GTooltip {...tooltip}>
|
|
71
|
-
<Icon source={InfoIcon}></Icon>
|
|
72
|
-
</GTooltip>
|
|
73
|
-
)}
|
|
74
|
-
{isShowWinner && (
|
|
75
|
-
<Text as="p" variant="bodySm" fontWeight="semibold">
|
|
76
|
-
<Badge tone="success">{t('Winner')}</Badge>
|
|
77
|
-
</Text>
|
|
78
|
-
)}
|
|
79
|
-
</InlineStack>
|
|
80
|
-
</Box>
|
|
81
|
-
);
|
|
82
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export enum GVariantBadgeType {
|
|
2
|
-
ORIGIN = 'ORIGIN',
|
|
3
|
-
VARIANT_B = 'VARIANT_B',
|
|
4
|
-
VARIANT_C = 'VARIANT_C',
|
|
5
|
-
VARIANT_D = 'VARIANT_D',
|
|
6
|
-
VARIANT_E = 'VARIANT_E',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export enum GVariantBadgeSize {
|
|
10
|
-
XS = 'xs',
|
|
11
|
-
SM = 'sm',
|
|
12
|
-
MD = 'md',
|
|
13
|
-
LG = 'lg',
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export enum GVariantBadgeTone {
|
|
17
|
-
ACTIVE = 'active',
|
|
18
|
-
SUBDUED = 'subdued',
|
|
19
|
-
INACTIVE = 'inactive',
|
|
20
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { Popover, Box, BlockStack, Text, Icon, InlineStack } from '@shopify/polaris';
|
|
2
|
-
import { GActivatorPopover } from '../GActivatorPopover';
|
|
3
|
-
import { CheckIcon } from '@shopify/polaris-icons';
|
|
4
|
-
import { useState, useMemo } from 'react';
|
|
5
|
-
|
|
6
|
-
export interface GViewBySelectorOption {
|
|
7
|
-
id: string;
|
|
8
|
-
title?: string;
|
|
9
|
-
content: string;
|
|
10
|
-
helpText: string;
|
|
11
|
-
icon: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface GViewBySelectorProps {
|
|
15
|
-
minWidth?: string;
|
|
16
|
-
maxWidth?: string;
|
|
17
|
-
activatorText: string;
|
|
18
|
-
options: GViewBySelectorOption[];
|
|
19
|
-
selected?: string;
|
|
20
|
-
onSelect: (value: string) => void;
|
|
21
|
-
preferredAlignment?: 'left' | 'right';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const GViewBySelector: React.FC<GViewBySelectorProps> = ({
|
|
25
|
-
activatorText,
|
|
26
|
-
selected,
|
|
27
|
-
options,
|
|
28
|
-
minWidth,
|
|
29
|
-
maxWidth,
|
|
30
|
-
preferredAlignment = 'right',
|
|
31
|
-
onSelect,
|
|
32
|
-
}) => {
|
|
33
|
-
const [popoverActive, setPopoverActive] = useState(false);
|
|
34
|
-
const [itemHover, setItemHover] = useState<string | null>(null);
|
|
35
|
-
|
|
36
|
-
const togglePopoverActive = () => setPopoverActive((prev) => !prev);
|
|
37
|
-
|
|
38
|
-
const selectedOption = useMemo(() => {
|
|
39
|
-
return options.find((item) => item.id === selected);
|
|
40
|
-
}, [options, selected]);
|
|
41
|
-
|
|
42
|
-
const activatorContent = useMemo(() => {
|
|
43
|
-
if (selectedOption) {
|
|
44
|
-
const content = selectedOption.title ?? selectedOption.content;
|
|
45
|
-
return activatorText ? `${activatorText}: ${content}` : content;
|
|
46
|
-
}
|
|
47
|
-
return activatorText;
|
|
48
|
-
}, [selectedOption, activatorText]);
|
|
49
|
-
|
|
50
|
-
const handleSelect = (value: string) => {
|
|
51
|
-
onSelect(value);
|
|
52
|
-
setPopoverActive(false);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<Popover
|
|
57
|
-
active={popoverActive}
|
|
58
|
-
activator={
|
|
59
|
-
<GActivatorPopover
|
|
60
|
-
active={popoverActive}
|
|
61
|
-
content={activatorContent}
|
|
62
|
-
textProps={{ variant: 'bodySm' }}
|
|
63
|
-
onClick={togglePopoverActive}
|
|
64
|
-
/>
|
|
65
|
-
}
|
|
66
|
-
autofocusTarget="first-node"
|
|
67
|
-
fluidContent
|
|
68
|
-
onClose={togglePopoverActive}
|
|
69
|
-
preferredAlignment={preferredAlignment}
|
|
70
|
-
>
|
|
71
|
-
<Box maxWidth={maxWidth} minWidth={minWidth} padding="200">
|
|
72
|
-
<BlockStack gap="200">
|
|
73
|
-
{options.map((option) => {
|
|
74
|
-
const isSelected = option.id === selected;
|
|
75
|
-
const isHover = itemHover === option.id;
|
|
76
|
-
const borderColor = isSelected ? 'input-border' : isHover ? 'border-hover' : 'transparent';
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<Box key={option.id} padding="150" borderWidth="025" borderColor={borderColor} borderRadius="100">
|
|
80
|
-
<div
|
|
81
|
-
onClick={() => handleSelect(option.id)}
|
|
82
|
-
className="cursor-pointer"
|
|
83
|
-
onMouseEnter={() => setItemHover(option.id)}
|
|
84
|
-
onMouseLeave={() => setItemHover(null)}
|
|
85
|
-
>
|
|
86
|
-
<InlineStack gap="300" align="space-between" blockAlign="center" wrap={false}>
|
|
87
|
-
<InlineStack gap="300" blockAlign="center" wrap={false}>
|
|
88
|
-
<div className="bg-surface-secondary flex items-center justify-center rounded-md min-w-[184px] h-[92px]">
|
|
89
|
-
<img src={option.icon} alt={option.content} className="w-full h-full object-contain" />
|
|
90
|
-
</div>
|
|
91
|
-
<BlockStack gap="100">
|
|
92
|
-
<Text as="span" variant="bodyMd" fontWeight="semibold">
|
|
93
|
-
{option.content}
|
|
94
|
-
</Text>
|
|
95
|
-
<Text as="p" variant="bodyMd" tone="subdued">
|
|
96
|
-
{option.helpText}
|
|
97
|
-
</Text>
|
|
98
|
-
</BlockStack>
|
|
99
|
-
</InlineStack>
|
|
100
|
-
{isSelected && (
|
|
101
|
-
<Box>
|
|
102
|
-
<Icon source={CheckIcon} />
|
|
103
|
-
</Box>
|
|
104
|
-
)}
|
|
105
|
-
</InlineStack>
|
|
106
|
-
</div>
|
|
107
|
-
</Box>
|
|
108
|
-
);
|
|
109
|
-
})}
|
|
110
|
-
</BlockStack>
|
|
111
|
-
</Box>
|
|
112
|
-
</Popover>
|
|
113
|
-
);
|
|
114
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './GViewBySelector';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export * from './GActivatorPopover';
|
|
2
|
-
export * from './GBlockCenter';
|
|
3
|
-
export * from './GButton';
|
|
4
|
-
export * from './GCheckbox';
|
|
5
|
-
export * from './GClickable';
|
|
6
|
-
export * from './GDiv';
|
|
7
|
-
export * from './GI18NText';
|
|
8
|
-
export * from './GOptionList';
|
|
9
|
-
export * from './GSelector';
|
|
10
|
-
export * from './GTextLink';
|
|
11
|
-
export * from './GSkeletonDisplayText';
|
|
12
|
-
export * from './GThumbnail';
|
|
13
|
-
export * from './GTooltip';
|
|
14
|
-
export * from './GViewBySelector';
|
|
15
|
-
export * from './GChoice';
|
|
16
|
-
export * from './GBox';
|
|
17
|
-
export * from './GFeatureLocked';
|
|
18
|
-
export * from './GPagination';
|
|
19
|
-
export * from './GInlineCenter';
|
|
20
|
-
export * from './GTextTruncated';
|
|
21
|
-
export * from './GTextTooltip';
|
|
22
|
-
export * from './GBoxCard';
|
|
23
|
-
export * from './GMockDataTooltip';
|
|
24
|
-
export * from './GDotInline';
|
|
25
|
-
export * from './GSpinner';
|
|
26
|
-
export * from './GModal';
|
package/src/shared/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components';
|