@kong-ui-public/analytics-chart 10.34.3-pr.3869.e876c8c8a.0 → 10.34.3
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/style.css +1 -0
- package/dist/types/components/AnalyticsChart.vue.d.ts +41 -0
- package/dist/types/components/AnalyticsChart.vue.d.ts.map +1 -0
- package/dist/types/components/CsvExportModal.vue.d.ts +16 -0
- package/dist/types/components/CsvExportModal.vue.d.ts.map +1 -0
- package/dist/types/components/DownloadCsv.vue.d.ts +20 -0
- package/dist/types/components/DownloadCsv.vue.d.ts.map +1 -0
- package/dist/types/components/SimpleChart.vue.d.ts +74 -0
- package/dist/types/components/SimpleChart.vue.d.ts.map +1 -0
- package/dist/types/components/SparklineChart.vue.d.ts +95 -0
- package/dist/types/components/SparklineChart.vue.d.ts.map +1 -0
- package/dist/types/components/TopNTable.vue.d.ts +59 -0
- package/dist/types/components/TopNTable.vue.d.ts.map +1 -0
- package/dist/types/components/ZoomActions.vue.d.ts +15 -0
- package/dist/types/components/ZoomActions.vue.d.ts.map +1 -0
- package/dist/types/components/ZoomTimerange.vue.d.ts +10 -0
- package/dist/types/components/ZoomTimerange.vue.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/ChartLegend.vue.d.ts +36 -0
- package/dist/types/components/chart-plugins/ChartLegend.vue.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/ChartTooltip.vue.d.ts +34 -0
- package/dist/types/components/chart-plugins/ChartTooltip.vue.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/DragSelectPlugin.d.ts +22 -0
- package/dist/types/components/chart-plugins/DragSelectPlugin.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/HighlightPlugin.d.ts +18 -0
- package/dist/types/components/chart-plugins/HighlightPlugin.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/OutlierBandPlugin.d.ts +14 -0
- package/dist/types/components/chart-plugins/OutlierBandPlugin.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/ReferenceLinePlugin.d.ts +12 -0
- package/dist/types/components/chart-plugins/ReferenceLinePlugin.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/ThresholdPlugin.d.ts +33 -0
- package/dist/types/components/chart-plugins/ThresholdPlugin.d.ts.map +1 -0
- package/dist/types/components/chart-plugins/VerticalLinePlugin.d.ts +29 -0
- package/dist/types/components/chart-plugins/VerticalLinePlugin.d.ts.map +1 -0
- package/dist/types/components/chart-types/DonutChart.vue.d.ts +30 -0
- package/dist/types/components/chart-types/DonutChart.vue.d.ts.map +1 -0
- package/dist/types/components/chart-types/GaugeChart.vue.d.ts +92 -0
- package/dist/types/components/chart-types/GaugeChart.vue.d.ts.map +1 -0
- package/dist/types/components/chart-types/ScatterChart.vue.d.ts +40 -0
- package/dist/types/components/chart-types/ScatterChart.vue.d.ts.map +1 -0
- package/dist/types/components/chart-types/SingleValue.vue.d.ts +69 -0
- package/dist/types/components/chart-types/SingleValue.vue.d.ts.map +1 -0
- package/dist/types/components/chart-types/StackedBarChart.vue.d.ts +33 -0
- package/dist/types/components/chart-types/StackedBarChart.vue.d.ts.map +1 -0
- package/dist/types/components/chart-types/TimeSeriesChart.vue.d.ts +52 -0
- package/dist/types/components/chart-types/TimeSeriesChart.vue.d.ts.map +1 -0
- package/dist/types/components/top-n/TopNMetricBar.vue.d.ts +9 -0
- package/dist/types/components/top-n/TopNMetricBar.vue.d.ts.map +1 -0
- package/dist/types/components/top-n/TopNMetricCell.vue.d.ts +11 -0
- package/dist/types/components/top-n/TopNMetricCell.vue.d.ts.map +1 -0
- package/dist/types/components/vue-json-csv/VueJsonCsv.vue.d.ts +166 -0
- package/dist/types/components/vue-json-csv/VueJsonCsv.vue.d.ts.map +1 -0
- package/dist/types/composables/index.d.ts +35 -0
- package/dist/types/composables/index.d.ts.map +1 -0
- package/dist/types/composables/useBarChartOptions.d.ts +118 -0
- package/dist/types/composables/useBarChartOptions.d.ts.map +1 -0
- package/dist/types/composables/useChartJSCommon.d.ts +5 -0
- package/dist/types/composables/useChartJSCommon.d.ts.map +1 -0
- package/dist/types/composables/useChartLegendValues.d.ts +6 -0
- package/dist/types/composables/useChartLegendValues.d.ts.map +1 -0
- package/dist/types/composables/useChartSelectedRange.d.ts +4 -0
- package/dist/types/composables/useChartSelectedRange.d.ts.map +1 -0
- package/dist/types/composables/useDonutChartOptions.d.ts +42 -0
- package/dist/types/composables/useDonutChartOptions.d.ts.map +1 -0
- package/dist/types/composables/useEvaluateFeatureFlag.d.ts +4 -0
- package/dist/types/composables/useEvaluateFeatureFlag.d.ts.map +1 -0
- package/dist/types/composables/useExploreResultToDatasets.d.ts +5 -0
- package/dist/types/composables/useExploreResultToDatasets.d.ts.map +1 -0
- package/dist/types/composables/useExploreResultToTimeDatasets.d.ts +6 -0
- package/dist/types/composables/useExploreResultToTimeDatasets.d.ts.map +1 -0
- package/dist/types/composables/useI18n.d.ts +9 -0
- package/dist/types/composables/useI18n.d.ts.map +1 -0
- package/dist/types/composables/useLineChartOptions.d.ts +115 -0
- package/dist/types/composables/useLineChartOptions.d.ts.map +1 -0
- package/dist/types/composables/useReportChartDataForSynthetics.d.ts +9 -0
- package/dist/types/composables/useReportChartDataForSynthetics.d.ts.map +1 -0
- package/dist/types/composables/useScatterChartOptions.d.ts +139 -0
- package/dist/types/composables/useScatterChartOptions.d.ts.map +1 -0
- package/dist/types/composables/useScatterDatasets.d.ts +18 -0
- package/dist/types/composables/useScatterDatasets.d.ts.map +1 -0
- package/dist/types/composables/useSparklineSync.d.ts +30 -0
- package/dist/types/composables/useSparklineSync.d.ts.map +1 -0
- package/dist/types/composables/useTooltipAbsolutePosition.d.ts +9 -0
- package/dist/types/composables/useTooltipAbsolutePosition.d.ts.map +1 -0
- package/dist/types/composables/useTranslatedUnits.d.ts +4 -0
- package/dist/types/composables/useTranslatedUnits.d.ts.map +1 -0
- package/dist/types/constants/index.d.ts +4 -0
- package/dist/types/constants/index.d.ts.map +1 -0
- package/dist/types/enums/chart-legend-position.enum.d.ts +5 -0
- package/dist/types/enums/chart-legend-position.enum.d.ts.map +1 -0
- package/dist/types/enums/index.d.ts +2 -0
- package/dist/types/enums/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types/chart-data.d.ts +279 -0
- package/dist/types/types/chart-data.d.ts.map +1 -0
- package/dist/types/types/chart-export.d.ts +20 -0
- package/dist/types/types/chart-export.d.ts.map +1 -0
- package/dist/types/types/chart-meta.d.ts +6 -0
- package/dist/types/types/chart-meta.d.ts.map +1 -0
- package/dist/types/types/chart-types.d.ts +6 -0
- package/dist/types/types/chart-types.d.ts.map +1 -0
- package/dist/types/types/chartjs-options.d.ts +84 -0
- package/dist/types/types/chartjs-options.d.ts.map +1 -0
- package/dist/types/types/dataset-generation-types.d.ts +15 -0
- package/dist/types/types/dataset-generation-types.d.ts.map +1 -0
- package/dist/types/types/explore-to-dataset-deps.d.ts +18 -0
- package/dist/types/types/explore-to-dataset-deps.d.ts.map +1 -0
- package/dist/types/types/external-link.d.ts +4 -0
- package/dist/types/types/external-link.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +12 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/query-error.d.ts +7 -0
- package/dist/types/types/query-error.d.ts.map +1 -0
- package/dist/types/types/scatter-data.d.ts +38 -0
- package/dist/types/types/scatter-data.d.ts.map +1 -0
- package/dist/types/types/zoom-action-item.d.ts +9 -0
- package/dist/types/types/zoom-action-item.d.ts.map +1 -0
- package/dist/types/utils/bucketTimestamps.d.ts +8 -0
- package/dist/types/utils/bucketTimestamps.d.ts.map +1 -0
- package/dist/types/utils/colors.d.ts +8 -0
- package/dist/types/utils/colors.d.ts.map +1 -0
- package/dist/types/utils/commonOptions.d.ts +22 -0
- package/dist/types/utils/commonOptions.d.ts.map +1 -0
- package/dist/types/utils/constants.d.ts +5 -0
- package/dist/types/utils/constants.d.ts.map +1 -0
- package/dist/types/utils/customColors.d.ts +8 -0
- package/dist/types/utils/customColors.d.ts.map +1 -0
- package/dist/types/utils/defaultLineOptions.d.ts +9 -0
- package/dist/types/utils/defaultLineOptions.d.ts.map +1 -0
- package/dist/types/utils/dimension-icons.d.ts +5 -0
- package/dist/types/utils/dimension-icons.d.ts.map +1 -0
- package/dist/types/utils/format-timestamps.d.ts +13 -0
- package/dist/types/utils/format-timestamps.d.ts.map +1 -0
- package/dist/types/utils/i18n.d.ts +3 -0
- package/dist/types/utils/i18n.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +14 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/metric-units.d.ts +3 -0
- package/dist/types/utils/metric-units.d.ts.map +1 -0
- package/dist/types/utils/percentiles.d.ts +3 -0
- package/dist/types/utils/percentiles.d.ts.map +1 -0
- package/dist/types/utils/queryError.d.ts +4 -0
- package/dist/types/utils/queryError.d.ts.map +1 -0
- package/dist/types/utils/scatter-adapters.d.ts +25 -0
- package/dist/types/utils/scatter-adapters.d.ts.map +1 -0
- package/dist/types/utils/stackedBarUtil.d.ts +9 -0
- package/dist/types/utils/stackedBarUtil.d.ts.map +1 -0
- package/dist/types/utils/theme-colors.d.ts +8 -0
- package/dist/types/utils/theme-colors.d.ts.map +1 -0
- package/dist/types/utils/topn-columns.d.ts +16 -0
- package/dist/types/utils/topn-columns.d.ts.map +1 -0
- package/dist/vitals-chart.es.js +26658 -0
- package/dist/vitals-chart.umd.js +36 -0
- package/package.json +2 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ExternalTooltipContext, KChartData, TooltipState, ChartLegendSortFn, LegendValues, EnhancedLegendItem, TooltipInteractionMode } from '../types';
|
|
2
|
+
import type { Chart, Point } from 'chart.js';
|
|
3
|
+
import type { GranularityValues } from '@kong-ui-public/analytics-utilities';
|
|
4
|
+
export declare const isTooltipInteractive: (state: TooltipInteractionMode) => boolean;
|
|
5
|
+
export declare const lineChartTooltipBehavior: (tooltipData: TooltipState, context: ExternalTooltipContext, granularity: GranularityValues, options?: {
|
|
6
|
+
contextFormatter?: (x: number, granularity: GranularityValues, raw: unknown) => string | number;
|
|
7
|
+
}) => void;
|
|
8
|
+
export declare const tooltipBehavior: (tooltipData: TooltipState, context: ExternalTooltipContext) => void;
|
|
9
|
+
export declare const hasDatasets: (chartData: KChartData) => number;
|
|
10
|
+
export declare const hasDataInDatasets: (chartData: KChartData) => boolean | 0;
|
|
11
|
+
export declare const hasTimeseriesData: (chartData: KChartData) => boolean;
|
|
12
|
+
export declare const hasExactlyOneDatapoint: (chartData: KChartData) => boolean;
|
|
13
|
+
export declare const hasMillisecondTimestamps: (chartData: KChartData) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Adjust the tooltip's horizontal position based on its width and cursor location relative to the chart center.
|
|
16
|
+
* This logic ensures consistent visual placement of a custom tooltip, as ChartJS offers limited direct control.
|
|
17
|
+
*/
|
|
18
|
+
export declare const horizontalTooltipPositioning: (position: Point, tooltipWidth: number, chartCenterX: number) => number;
|
|
19
|
+
export declare const verticalTooltipPositioning: (position: Point, tooltipHeight: number, chartCenterY: number) => number;
|
|
20
|
+
export declare function debounce(fn: (...args: any) => any, delay: number): (...args: any) => void;
|
|
21
|
+
export declare const generateLegendItems: (chart: Chart, legendValues?: LegendValues, chartLegendSortFn?: ChartLegendSortFn) => EnhancedLegendItem[];
|
|
22
|
+
//# sourceMappingURL=commonOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonOptions.d.ts","sourceRoot":"","sources":["../../../src/utils/commonOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,YAAY,EAAyB,iBAAiB,EAAoB,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAKtM,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAoB,MAAM,UAAU,CAAA;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAE5E,eAAO,MAAM,oBAAoB,GAAI,OAAO,sBAAsB,YAEjE,CAAA;AAED,eAAO,MAAM,wBAAwB,GACnC,aAAa,YAAY,EACzB,SAAS,sBAAsB,EAC/B,aAAa,iBAAiB,EAC9B,UAAU;IACR,gBAAgB,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,EAAE,OAAO,KAAK,MAAM,GAAG,MAAM,CAAA;CAChG,KACC,IAuDH,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,aAAa,YAAY,EAAE,SAAS,sBAAsB,KAAI,IAoD7F,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,WAAW,UAAU,WACa,CAAA;AAE9D,eAAO,MAAM,iBAAiB,GAAI,WAAW,UAAU,gBACoB,CAAA;AAE3E,eAAO,MAAM,iBAAiB,GAAI,WAAW,UAAU,YAEtD,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,WAAW,UAAU,YAEN,CAAA;AAEtD,eAAO,MAAM,wBAAwB,GAAI,WAAW,UAAU,YAI3D,CAAA;AAEH;;;IAGI;AACJ,eAAO,MAAM,4BAA4B,GAAI,UAAU,KAAK,EAAE,cAAc,MAAM,EAAE,cAAc,MAAM,WA6BvG,CAAA;AAED,eAAO,MAAM,0BAA0B,GAAI,UAAU,KAAK,EAAE,eAAe,MAAM,EAAE,cAAc,MAAM,WAUtG,CAAA;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,EAAE,KAAK,EAAE,MAAM,IAEvD,GAAG,MAAM,GAAG,UAMrB;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,EAAE,eAAe,YAAY,EAAE,oBAAoB,iBAAiB,KAAG,kBAAkB,EAYxI,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,IAAI,CAAA;AAChC,eAAO,MAAM,eAAe,KAAK,CAAA;AACjC,eAAO,MAAM,iBAAiB,KAAK,CAAA;AACnC,eAAO,MAAM,gBAAgB,KAAK,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AnalyticsChartColors } from 'src/types';
|
|
2
|
+
export declare const lookupStatusCodeColor: (label: string) => string;
|
|
3
|
+
export declare const lookupStatusCodeCategoryColor: (label: string) => {
|
|
4
|
+
solid: string;
|
|
5
|
+
light: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const defaultStatusCodeColors: AnalyticsChartColors;
|
|
8
|
+
//# sourceMappingURL=customColors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customColors.d.ts","sourceRoot":"","sources":["../../../src/utils/customColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAiKrD,eAAO,MAAM,qBAAqB,GAAI,OAAO,MAAM,WAMlD,CAAA;AAED,eAAO,MAAM,6BAA6B,GAAI,OAAO,MAAM;;;CAI1D,CAAA;AAID,eAAO,MAAM,uBAAuB,EAAE,oBASrC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const defaultLineOptions: {
|
|
2
|
+
lineTension: number;
|
|
3
|
+
pointBorderWidth: number;
|
|
4
|
+
borderJoinStyle: string;
|
|
5
|
+
fill: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const BORDER_WIDTH = 2;
|
|
8
|
+
export declare const NO_BORDER = 0;
|
|
9
|
+
//# sourceMappingURL=defaultLineOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultLineOptions.d.ts","sourceRoot":"","sources":["../../../src/utils/defaultLineOptions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAA;AAED,eAAO,MAAM,YAAY,IAAI,CAAA;AAC7B,eAAO,MAAM,SAAS,IAAI,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { ColumnIconSet } from '@kong-ui-public/analytics-utilities';
|
|
3
|
+
export declare const aiProviderIcons: Readonly<Record<string, Component>>;
|
|
4
|
+
export declare const getColumnIcon: (iconSet: ColumnIconSet | undefined, id: string) => Component | undefined;
|
|
5
|
+
//# sourceMappingURL=dimension-icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dimension-icons.d.ts","sourceRoot":"","sources":["../../../src/utils/dimension-icons.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AAsBxE,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAmB/D,CAAA;AAMD,eAAO,MAAM,aAAa,GAAI,SAAS,aAAa,GAAG,SAAS,EAAE,IAAI,MAAM,KAAG,SAAS,GAAG,SAM1F,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { GranularityValues } from '@kong-ui-public/analytics-utilities';
|
|
2
|
+
export declare const formatChartTicksByGranularity: ({ tickValue, granularity, dayBoundaryCrossed, timezone, }: {
|
|
3
|
+
tickValue: Date;
|
|
4
|
+
granularity: GranularityValues;
|
|
5
|
+
dayBoundaryCrossed: boolean;
|
|
6
|
+
timezone?: string;
|
|
7
|
+
}) => string;
|
|
8
|
+
export declare const formatTooltipTimestampByGranularity: ({ tickValue, granularity, timezone, }: {
|
|
9
|
+
tickValue: Date;
|
|
10
|
+
granularity: GranularityValues;
|
|
11
|
+
timezone?: string;
|
|
12
|
+
}) => string;
|
|
13
|
+
//# sourceMappingURL=format-timestamps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-timestamps.d.ts","sourceRoot":"","sources":["../../../src/utils/format-timestamps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAkF5E,eAAO,MAAM,6BAA6B,GAAI,2DAK3C;IACD,SAAS,EAAE,IAAI,CAAA;IACf,WAAW,EAAE,iBAAiB,CAAA;IAC9B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,KAAG,MAQA,CAAA;AAEJ,eAAO,MAAM,mCAAmC,GAAI,uCAIjD;IACD,SAAS,EAAE,IAAI,CAAA;IACf,WAAW,EAAE,iBAAiB,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,KAAG,MAOA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/utils/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAGxC,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,IAAI,IAAI,MAAM,OAAO,OAAO,CAAC,WAAuD,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './commonOptions';
|
|
2
|
+
export * from './constants';
|
|
3
|
+
export * from './colors';
|
|
4
|
+
export * from './defaultLineOptions';
|
|
5
|
+
export * from './stackedBarUtil';
|
|
6
|
+
export * from './customColors';
|
|
7
|
+
export * from './format-timestamps';
|
|
8
|
+
export * from './queryError';
|
|
9
|
+
export * from './metric-units';
|
|
10
|
+
export * from './percentiles';
|
|
11
|
+
export * from './theme-colors';
|
|
12
|
+
export * from './scatter-adapters';
|
|
13
|
+
export * from './i18n';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric-units.d.ts","sourceRoot":"","sources":["../../../src/utils/metric-units.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,OAE/C,CAAA;AAID,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,OAK/C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"percentiles.d.ts","sourceRoot":"","sources":["../../../src/utils/percentiles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,EAAE,YAAY,MAAM,KAAG,MAsBzE,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,EAAE,aAAa,MAAM,EAAE,KAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAI9F,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryError.d.ts","sourceRoot":"","sources":["../../../src/utils/queryError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAI1C,eAAO,MAAM,mBAAmB,GAAI,OAAO,GAAG,KAAG,OAEhD,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,GAAG,KAAG,UAuC7C,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Display, ExploreResultV4, FetchAllRequestsResult } from '@kong-ui-public/analytics-utilities';
|
|
2
|
+
import type { ScatterChartData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Reduces an explore result to scatter input, plotting one point per record.
|
|
5
|
+
*
|
|
6
|
+
* With two or more metrics, the first is plotted on the x axis and the second on the y axis.
|
|
7
|
+
*/
|
|
8
|
+
export declare const exploreResultToScatterData: (result: ExploreResultV4 | undefined) => ScatterChartData | undefined;
|
|
9
|
+
export interface ScatterExtraField {
|
|
10
|
+
field: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
unit?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface RequestsToScatterDataOptions {
|
|
15
|
+
metric: string;
|
|
16
|
+
dimension?: string;
|
|
17
|
+
/** A nested object to expand into one point per entry. */
|
|
18
|
+
unroll?: string;
|
|
19
|
+
timestamp?: string;
|
|
20
|
+
display?: Display;
|
|
21
|
+
extraFields?: ScatterExtraField[];
|
|
22
|
+
metricUnit?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const requestsToScatterData: (result: FetchAllRequestsResult | undefined, options: RequestsToScatterDataOptions) => ScatterChartData | undefined;
|
|
25
|
+
//# sourceMappingURL=scatter-adapters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scatter-adapters.d.ts","sourceRoot":"","sources":["../../../src/utils/scatter-adapters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,OAAO,EACP,eAAe,EACf,sBAAsB,EAEvB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAuC,MAAM,UAAU,CAAA;AAIrF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,QAAQ,eAAe,GAAG,SAAS,KAAG,gBAAgB,GAAG,SA8DnG,CAAA;AA4ED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,qBAAqB,GAChC,QAAQ,sBAAsB,GAAG,SAAS,EAC1C,SAAS,4BAA4B,KACpC,gBAAgB,GAAG,SAgDrB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Chart, ChartData, DefaultDataPoint } from 'chart.js';
|
|
2
|
+
export type BarChartData = ChartData<'bar', DefaultDataPoint<'bar'>, string>;
|
|
3
|
+
export declare const formatNumber: (value: number, unit: string) => string;
|
|
4
|
+
export declare const getTextWidth: (text: string) => number;
|
|
5
|
+
export declare const getTextHeight: () => number;
|
|
6
|
+
export declare const dataTotal: (data: BarChartData) => number;
|
|
7
|
+
export declare const conditionalDataTotal: (chart: Chart, data: BarChartData) => number;
|
|
8
|
+
export declare const drawPercentage: (value: number, total: number) => string;
|
|
9
|
+
//# sourceMappingURL=stackedBarUtil.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stackedBarUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/stackedBarUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAKlE,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;AAI5E,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,EAAE,MAAM,MAAM,WAWvD,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,WAYxC,CAAA;AAED,eAAO,MAAM,aAAa,QAAO,MAYhC,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,MAAM,YAAY,WAGzC,CAAA;AAEH,eAAO,MAAM,oBAAoB,GAAI,OAAO,KAAK,EAAE,MAAM,YAAY,WAO9D,CAAA;AAEP,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,WAQ1D,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ScatterChartColors {
|
|
2
|
+
medianLine: string;
|
|
3
|
+
outlier: string;
|
|
4
|
+
outlierBand: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const withAlpha: (value: string, alpha: number) => string;
|
|
7
|
+
export declare const scatterChartColors: (element?: Element | null) => ScatterChartColors;
|
|
8
|
+
//# sourceMappingURL=theme-colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-colors.d.ts","sourceRoot":"","sources":["../../../src/utils/theme-colors.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,KAAG,MAQxD,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,UAAU,OAAO,GAAG,IAAI,KAAG,kBAyB7D,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TopNColumnOptions } from '@kong-ui-public/analytics-utilities';
|
|
2
|
+
export type TopNColumnOptionsMap = Record<string, TopNColumnOptions>;
|
|
3
|
+
export type TopNColumnStats = {
|
|
4
|
+
sum: number;
|
|
5
|
+
max: number;
|
|
6
|
+
};
|
|
7
|
+
export type TopNThresholdType = 'warning' | 'error';
|
|
8
|
+
type TopNThreshold = NonNullable<TopNColumnOptions['thresholds']>[number];
|
|
9
|
+
export declare const getColumnOptions: (options: TopNColumnOptionsMap | undefined, key: string) => TopNColumnOptions | undefined;
|
|
10
|
+
export declare const toNumber: (value: unknown) => number | null;
|
|
11
|
+
export declare const getColumnStats: (values: Array<number | null>) => TopNColumnStats;
|
|
12
|
+
export declare const getRelativeValue: (value: number, stats: TopNColumnStats) => number | null;
|
|
13
|
+
export declare const getBarRatio: (value: number, stats: TopNColumnStats, scale: TopNColumnOptions["bar"]) => number;
|
|
14
|
+
export declare const getThresholdType: (value: number, thresholds: TopNThreshold[] | undefined) => TopNThresholdType | undefined;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=topn-columns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topn-columns.d.ts","sourceRoot":"","sources":["../../../src/utils/topn-columns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAE5E,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;AAEpE,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,OAAO,CAAA;AAEnD,KAAK,aAAa,GAAG,WAAW,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzE,eAAO,MAAM,gBAAgB,GAAI,SAAS,oBAAoB,GAAG,SAAS,EAAE,KAAK,MAAM,KAAG,iBAAiB,GAAG,SAQ7G,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,IAQlD,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,QAAQ,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,KAAG,eAW7D,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,EAAE,OAAO,eAAe,KAAG,MAAM,GAAG,IAEjF,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,OAAO,eAAe,EAAE,OAAO,iBAAiB,CAAC,KAAK,CAAC,KAAG,MAQpG,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,EAAE,YAAY,aAAa,EAAE,GAAG,SAAS,KAAG,iBAAiB,GAAG,SAW7G,CAAA"}
|