@splunk/visualizations 28.4.0 → 28.5.1
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/Area.config.js +28 -7
- package/Area.config.js.map +2 -2
- package/Area.js +109 -39
- package/Area.js.map +2 -2
- package/Bar.config.js +28 -7
- package/Bar.config.js.map +2 -2
- package/Bar.js +109 -39
- package/Bar.js.map +2 -2
- package/Bubble.config.js +4 -4
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +81 -30
- package/Bubble.js.map +2 -2
- package/CHANGELOG.external.md +98 -0
- package/ChoroplethSvg.js +74 -26
- package/ChoroplethSvg.js.map +2 -2
- package/Column.config.js +28 -7
- package/Column.config.js.map +2 -2
- package/Column.js +109 -39
- package/Column.js.map +2 -2
- package/Ellipse/config.d.ts.map +1 -1
- package/Ellipse.config.js +14 -5
- package/Ellipse.config.js.map +4 -4
- package/Ellipse.js +130 -73
- package/Ellipse.js.map +4 -4
- package/Events.js +74 -26
- package/Events.js.map +2 -2
- package/FillerGauge.js +234 -47
- package/FillerGauge.js.map +2 -2
- package/Image.js +74 -26
- package/Image.js.map +2 -2
- package/Line/lineUtils.d.ts.map +1 -1
- package/Line/mockdata/LineData.d.ts +95 -0
- package/Line/mockdata/LineData.d.ts.map +1 -1
- package/Line.config.js +28 -7
- package/Line.config.js.map +2 -2
- package/Line.js +125 -41
- package/Line.js.map +2 -2
- package/LinkGraph.js +74 -26
- package/LinkGraph.js.map +2 -2
- package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
- package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
- package/Map/PureMap/MapUtils.d.ts +2 -2
- package/Map/PureMap/MapUtils.d.ts.map +1 -1
- package/Map/PureMap/PureMap.d.ts.map +1 -1
- package/Map.js +111 -37
- package/Map.js.map +2 -2
- package/Markdown/config.d.ts.map +1 -1
- package/Markdown.config.js +14 -5
- package/Markdown.config.js.map +4 -4
- package/Markdown.js +91 -34
- package/Markdown.js.map +4 -4
- package/MarkerGauge.js +243 -56
- package/MarkerGauge.js.map +4 -4
- package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts +78 -0
- package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +1 -2
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
- package/NetworkGraph/config.d.ts.map +1 -1
- package/NetworkGraph.config.js +1 -0
- package/NetworkGraph.config.js.map +2 -2
- package/NetworkGraph.js +366 -105
- package/NetworkGraph.js.map +4 -4
- package/PERFORMANCE.md +23 -0
- package/ParallelCoordinates/ParallelCoordinates.d.ts +1 -46
- package/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -1
- package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts +12 -58
- package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts.map +1 -1
- package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts +1 -0
- package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts.map +1 -1
- package/ParallelCoordinates.js +150 -153
- package/ParallelCoordinates.js.map +4 -4
- package/Pie/Pie.d.ts.map +1 -1
- package/Pie/config.d.ts.map +1 -1
- package/Pie/pieUtils.d.ts +4 -0
- package/Pie/pieUtils.d.ts.map +1 -1
- package/Pie.config.js +16 -0
- package/Pie.config.js.map +2 -2
- package/Pie.js +121 -35
- package/Pie.js.map +2 -2
- package/Punchcard.js +74 -26
- package/Punchcard.js.map +2 -2
- package/Rectangle/config.d.ts.map +1 -1
- package/Rectangle.config.js +14 -5
- package/Rectangle.config.js.map +4 -4
- package/Rectangle.js +92 -35
- package/Rectangle.js.map +4 -4
- package/Sankey/PureSankey/PureSankey.d.ts +26 -72
- package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyLink.d.ts +3 -19
- package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyNode.d.ts +3 -20
- package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyTooltip.d.ts +3 -24
- package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
- package/Sankey.js +270 -336
- package/Sankey.js.map +2 -2
- package/Scatter.config.js +168 -147
- package/Scatter.config.js.map +4 -4
- package/Scatter.js +249 -179
- package/Scatter.js.map +4 -4
- package/SingleValue.js +96 -75
- package/SingleValue.js.map +2 -2
- package/SingleValueIcon/config.d.ts.map +1 -1
- package/SingleValueIcon.config.js +14 -5
- package/SingleValueIcon.config.js.map +4 -4
- package/SingleValueIcon.js +118 -76
- package/SingleValueIcon.js.map +4 -4
- package/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +1 -1
- package/SingleValueRadial.js +95 -76
- package/SingleValueRadial.js.map +2 -2
- package/Table/Table.d.ts.map +1 -1
- package/Table/hooks.d.ts +2 -0
- package/Table/hooks.d.ts.map +1 -1
- package/Table.js +95 -49
- package/Table.js.map +2 -2
- package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelinePlugin.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +2 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
- package/Timeline.js +154 -54
- package/Timeline.js.map +2 -2
- package/common/Charting.d.ts.map +1 -1
- package/common/Charting.js +3 -0
- package/common/Charting.js.map +2 -2
- package/common/GaugeMajorTicks.js +150 -13
- package/common/GaugeMajorTicks.js.map +4 -4
- package/common/GaugeValueMarker.js +84 -17
- package/common/GaugeValueMarker.js.map +4 -4
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.d.ts.map +1 -1
- package/common/OverviewDoc.js +2 -2
- package/common/OverviewDoc.js.map +2 -2
- package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
- package/common/TimeSeriesChartWrapper.js +72 -24
- package/common/TimeSeriesChartWrapper.js.map +2 -2
- package/common/chartingUtils.d.ts +9 -3
- package/common/chartingUtils.d.ts.map +1 -1
- package/common/chartingUtils.js +21 -16
- package/common/chartingUtils.js.map +2 -2
- package/common/editorConfig/AxesChartDataConfig.d.ts +3 -3
- package/common/editorConfig/AxesChartDataConfig.d.ts.map +1 -1
- package/common/editorConfig/AxesChartDataDisplay.d.ts +4 -0
- package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
- package/common/editorConfig/AxesChartLegend.d.ts.map +1 -1
- package/common/gaugeUtils.d.ts +37 -0
- package/common/gaugeUtils.d.ts.map +1 -1
- package/common/gaugeUtils.js +152 -2
- package/common/gaugeUtils.js.map +4 -4
- package/common/hocs/mockdata/trellisData.d.ts +119 -0
- package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
- package/common/interfaces/Overview.d.ts +1 -0
- package/common/interfaces/Overview.d.ts.map +1 -1
- package/common/interfaces/VizConfig.d.ts +2 -1
- package/common/interfaces/VizConfig.d.ts.map +1 -1
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/trellisUtils.d.ts.map +1 -1
- package/common/utils/trellisUtils.js +4 -6
- package/common/utils/trellisUtils.js.map +2 -2
- package/common/withDashboardViz.js +74 -26
- package/common/withDashboardViz.js.map +2 -2
- package/package.json +36 -36
package/Pie/Pie.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pie.d.ts","sourceRoot":"","sources":["../src/Pie/Pie.tsx"],"names":[],"mappings":"AAGA,OAAiB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,MAAM,MAAM,UAAU,CAAC;AAc9B,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,KAAK,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;AAClF,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"Pie.d.ts","sourceRoot":"","sources":["../src/Pie/Pie.tsx"],"names":[],"mappings":"AAGA,OAAiB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,MAAM,MAAM,UAAU,CAAC;AAc9B,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,KAAK,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;AAClF,eAAO,MAAM,eAAe,EAAE,iBA8E7B,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAAI,gBAAW,EAAE,YAAO,EAAE,YAAO,YAIX,CAAC;AAEvD,QAAA,MAAM,GAAG;sEANiD,IAAK,OAC/D;;;CAgBC,CAAC;AACF,QAAA,MAAM,MAAM,KAAO,CAAC;AAEpB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC1B,eAAe,GAAG,CAAC"}
|
package/Pie/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/Pie/config.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/Pie/config.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;;AA4N3D,wBAAqC"}
|
package/Pie/pieUtils.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ interface labelDisplayOptions extends PieOptions {
|
|
|
21
21
|
* @returns {Object}
|
|
22
22
|
*/
|
|
23
23
|
export declare const mapLabelDisplay: ({ labelDisplay, ...options }: labelDisplayOptions) => PieOptions;
|
|
24
|
+
interface LegendDisplayOptions extends PieOptions {
|
|
25
|
+
legendPlacement?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const mapLegendDisplay: (options: LegendDisplayOptions) => PieOptions;
|
|
24
28
|
/**
|
|
25
29
|
* Helper method to update the option names which can be mapped to SimpleXML options or
|
|
26
30
|
* can be used directly with SC if don't have a 1-1 mapping in SimpleXML
|
package/Pie/pieUtils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pieUtils.d.ts","sourceRoot":"","sources":["../src/Pie/pieUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,UAAU,UAAU;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"pieUtils.d.ts","sourceRoot":"","sources":["../src/Pie/pieUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,UAAU,UAAU;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAgBD;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,UAAU,KAAG,UAM3D,CAAC;AAEF,UAAU,mBAAoB,SAAQ,UAAU;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,8BAA8B,mBAAmB,KAAG,UAanF,CAAC;AAEF,UAAU,oBAAqB,SAAQ,UAAU;IAC7C,eAAe,CAAC,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var editorConfig = [
|
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
],
|
|
374
|
+
[
|
|
375
|
+
{
|
|
376
|
+
label: (0, i18n_exports._)("Legend display"),
|
|
377
|
+
option: "legendDisplay",
|
|
378
|
+
editor: "editor.select",
|
|
379
|
+
editorProps: {
|
|
380
|
+
values: [
|
|
381
|
+
{ label: (0, i18n_exports._)("Off"), value: "off" },
|
|
382
|
+
{ label: (0, i18n_exports._)("Right"), value: "right" },
|
|
383
|
+
{ label: (0, i18n_exports._)("Left"), value: "left" },
|
|
384
|
+
{ label: (0, i18n_exports._)("Top"), value: "top" },
|
|
385
|
+
{ label: (0, i18n_exports._)("Bottom"), value: "bottom" }
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
],
|
|
374
390
|
[
|
|
375
391
|
{
|
|
376
392
|
label: (0, i18n_exports._)("Percentage precision"),
|
package/Pie.config.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["src/Pie/config.ts", "esm-externals:@splunk/visualization-icons", "esm-externals:@splunk/visualization-icons/placeholders", "esm-externals:@splunk/ui-utils/i18n", "esm-externals:@splunk/visualization-schemas", "esm-externals:@splunk/themes", "esm-externals:lodash", "esm-externals:@splunk/visualizations-shared/configUtils", "src/common/utils/configUtils.ts", "src/common/editorConfig/BackgroundColor.ts", "src/common/editorConfig/TrellisEditors.ts", "esm-externals:@splunk/themes/pick", "esm-externals:@splunk/themes/variables", "src/common/ThemedDefaults.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Pie as PieIcon } from '@splunk/visualization-icons';\nimport { Pie as PiePlaceholderIcon } from '@splunk/visualization-icons/placeholders';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { pieOptionsSchema as optionsSchema } from '@splunk/visualization-schemas';\nimport { pick, variables } from '@splunk/themes';\nimport { DataContract } from '../common/interfaces/DataContract';\nimport { DefaultContext } from '../common/interfaces/DefaultContext';\nimport { EditorConfig } from '../common/interfaces/Editor';\nimport { ThemedDefaults } from '../common/interfaces/ThemedDefaults';\nimport { VizBehavior } from '../common/interfaces/VizBehavior';\nimport { VizCategory } from '../common/interfaces/VizCategory';\nimport { VizConfig } from '../common/interfaces/VizConfig';\nimport { VizSize } from '../common/interfaces/VizSize';\nimport { enhanceConfig } from '../common/utils/configUtils';\nimport getBackgroundColorEditor from '../common/editorConfig/BackgroundColor';\nimport { TrellisEditorConfig, TrellisBackgroundColorEditor } from '../common/editorConfig/TrellisEditors';\nimport { defaultBackgroundColor } from '../common/ThemedDefaults';\n\nconst dataContract: DataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [\n // Note: SCP-14090 disable ui for optional datasources. We may need to add it back later\n // {\n // name: 'annotation',\n // description: 'DataSource that populate event annotations',\n // },\n ],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n};\n\nconst size: VizSize = {\n initialWidth: 300,\n initialHeight: 300,\n};\n\nconst defaultContext: DefaultContext = {};\n\nconst themes: ThemedDefaults = {\n defaultBackgroundColor,\n defaultFontColor: props =>\n pick({\n enterprise: {\n dark: variables.textColor(props),\n light: variables.textColor(props),\n },\n prisma: variables.contentColorDefault(props),\n })(props),\n};\n\nconst editorConfig: EditorConfig[] = [\n {\n label: _('Data configurations'),\n layout: [\n [\n {\n label: _('Label'),\n editor: 'editor.columnSelector',\n option: 'label',\n context: 'valuesContext',\n editorProps: {\n dataSourceKey: 'primary',\n },\n },\n ],\n [\n {\n label: _('Value'),\n editor: 'editor.columnSelector',\n option: 'value',\n context: 'valuesContext',\n editorProps: {\n dataSourceKey: 'primary',\n },\n },\n ],\n ],\n },\n {\n label: _('Data display'),\n layout: [\n [\n {\n label: _('Display type'),\n option: 'showDonutHole',\n editor: 'editor.radioBar',\n editorProps: {\n values: [\n { label: _('Pie'), value: false },\n { label: _('Donut'), value: true },\n ],\n },\n },\n ],\n [\n {\n label: _('Label display'),\n option: 'labelDisplay',\n editor: 'editor.select',\n editorProps: {\n values: [\n { label: _('Values'), value: 'values' },\n {\n label: _('Values & Percent'),\n value: 'valuesAndPercentage',\n },\n { label: _('Off'), value: 'off' },\n ],\n },\n },\n ],\n [\n {\n label: _('Percentage precision'),\n option: 'percentagePrecision',\n editor: 'editor.number',\n editorProps: {\n min: 0,\n max: 16,\n step: 1,\n },\n showEditor: ({ options }) => options.labelDisplay === 'valuesAndPercentage',\n },\n ],\n [\n {\n label: _('Collapse threshold'),\n option: 'collapseThreshold',\n editor: 'editor.number',\n editorProps: {\n min: 0,\n max: 1,\n step: 0.01,\n },\n },\n ],\n [\n {\n label: _('Exclude zeros in the collapsed slice'),\n option: 'collapseExcludeZero',\n editor: 'editor.toggle',\n },\n ],\n [\n {\n label: _('Collapsed slice label'),\n option: 'collapseLabel',\n editor: 'editor.text',\n },\n ],\n ...TrellisEditorConfig,\n ],\n },\n {\n label: _('Color and style'),\n layout: [\n [\n {\n label: _('Series colors'),\n option: 'seriesColors',\n editor: 'editor.seriesColors',\n },\n ],\n getBackgroundColorEditor({ themes }),\n [\n {\n ...TrellisBackgroundColorEditor,\n editorProps: {\n themes,\n },\n },\n ],\n ],\n },\n];\n\n/**\n * visualization configuration\n */\nconst config: VizConfig = {\n /**\n * unique viz key\n */\n key: 'splunk.pie',\n /**\n * viz name\n */\n name: _('Pie'),\n category: VizCategory.COMPARISONS,\n /**\n * viz icon\n */\n icon: PieIcon,\n placeholderIcon: PiePlaceholderIcon,\n dataContract,\n size,\n defaultContext,\n optionsSchema,\n editorConfig,\n events: {\n 'point.click': {\n description: 'triggered when user clicks on a point in the pie chart',\n },\n },\n\n supports: [VizBehavior.DYNAMIC_OPTIONS, VizBehavior.PLACEHOLDER, VizBehavior.EVENTS, VizBehavior.TRELLIS],\n themes,\n};\n\nexport default enhanceConfig(config);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons\";\nexport * from \"@splunk/visualization-icons\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons/placeholders\";\nexport * from \"@splunk/visualization-icons/placeholders\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/ui-utils/i18n\";\nexport * from \"@splunk/ui-utils/i18n\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-schemas\";\nexport * from \"@splunk/visualization-schemas\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/themes\";\nexport * from \"@splunk/themes\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"lodash\";\nexport * from \"lodash\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualizations-shared/configUtils\";\nexport * from \"@splunk/visualizations-shared/configUtils\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import { get, range } from 'lodash';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\n// included for backwards compatibility\nexport { enhanceOptionsSchemaWithDynamicOptions } from '@splunk/visualization-schemas';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\n/**\n * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block\n * this function also collapse all editor panels\n * @param vizConfig a Visualization Config\n * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports\n * and containing `open: false` for all editor panels in editorConfig\n */\nfunction enhanceConfig(vizConfig: VizConfig): VizConfig {\n const enhancedConfig: VizConfig = { ...vizConfig };\n\n enhancedConfig.editorConfig = vizConfig.editorConfig.map((config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n });\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport { enhanceConfig, getInitialPreset, generatePrecisionValues, uncollapseEditorConfig, isDynamicOption };\n\n/**\n * insert layout in layout array, return a new layout array instead of updating the original\n *\n * @param {EditorLayoutConfig[][]} layout - editor layout\n * @param {Number} index - the index to insert layout item(s)\n * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert\n * @returns {EditorLayoutConfig[][]} new editor layout with insertion\n */\nexport const insertLayout = (\n layout: EditorLayoutConfig[][],\n index: number,\n ...layoutItems: EditorLayoutConfig[][]\n): EditorLayoutConfig[][] => [\n // copy part of the array before the specified index\n ...layout.slice(0, index),\n // inserted layout item\n ...layoutItems,\n // copy part of the array after the specified index\n ...layout.slice(index),\n];\n", "import { _ } from '@splunk/ui-utils/i18n';\nimport { EditorLayoutConfig } from '../interfaces/Editor';\nimport { ThemedDefaults } from '../interfaces/ThemedDefaults';\n\ninterface backgroundEditorProps {\n label?: string;\n themes: ThemedDefaults;\n labelPosition?: string;\n}\n\nconst background: ({ label, themes, labelPosition }: backgroundEditorProps) => EditorLayoutConfig[] = ({\n label,\n themes,\n labelPosition,\n}) => [\n {\n label: _(label || 'Background color'),\n option: 'backgroundColor',\n editor: 'editor.color',\n editorProps: {\n labelPosition: labelPosition || 'top',\n themes,\n },\n },\n];\n\nexport default background;\n", "import { _ } from '@splunk/ui-utils/i18n';\nimport { LAYOUT_TYPE } from '@splunk/visualization-schemas';\n\nexport const isTrellisFeatureFlagOn = ({ featureFlags }): boolean => {\n return Boolean(featureFlags?.visualizations_enableTrellis);\n};\n\nexport const isTrellisEnabled = ({ options, featureFlags }): boolean => {\n const { splitByLayout = LAYOUT_TYPE.Off } = options;\n return isTrellisFeatureFlagOn({ featureFlags }) && splitByLayout === LAYOUT_TYPE.Trellis;\n};\n\nexport const TrellisEditorConfig = [\n [\n {\n label: _('Trellis layout'),\n option: 'splitByLayout',\n editor: 'editor.toggle',\n showEditor: isTrellisFeatureFlagOn,\n },\n ],\n [\n {\n label: _('Split by'),\n option: 'trellisSplitBy',\n editor: 'editor.trellisSplitBy',\n editorProps: {\n dataSourceKey: 'primary',\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Number of columns'),\n option: 'trellisColumns',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Min column width'),\n option: 'trellisMinColumnWidth',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n {\n label: _('Row height'),\n option: 'trellisRowHeight',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Max number of components per page'),\n option: 'trellisPageCount',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n];\n\nexport const TimechartTrellisEditorConfig = [\n [\n {\n label: _('Trellis layout'),\n option: 'splitByLayout',\n editor: 'editor.toggle',\n showEditor: isTrellisFeatureFlagOn,\n // add help text for timecharts\n editorProps: {\n help: _(\n 'Y2-axis and overlay field configurations are not supported when trellis is enabled.'\n ),\n helpFormat: 'under',\n },\n },\n ],\n ...TrellisEditorConfig.slice(1),\n [\n {\n label: _('Shared y-axis scale'),\n option: 'trellisSharedScale',\n editor: 'editor.checkbox',\n showEditor: isTrellisEnabled,\n },\n ],\n];\n\nexport const TrellisBackgroundColorEditor = {\n label: _('Trellis background'),\n option: 'trellisBackgroundColor',\n editor: 'editor.color',\n showEditor: isTrellisEnabled,\n};\n", "\nimport * as defaultImport from \"@splunk/themes/pick\";\nexport * from \"@splunk/themes/pick\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/themes/variables\";\nexport * from \"@splunk/themes/variables\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import pick from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\n\nexport const defaultBackgroundColor = props =>\n pick({\n enterprise: {\n dark: variables.black(props),\n light: variables.white(props),\n },\n prisma: variables.backgroundColorSection(props),\n })(props);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAC/B,wCAAc;AACd,IAAO,8BAAS,aAAa,gBAA8B,wBAAU;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAA,iBAA+B;AAC/B,iCAAc;AACd,IAAO,uBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,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;AAAA,EAIA,MAAM,4BAAAC;AAAA,EACN,iBAAiB,qBAAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA,6CAAAC;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,IACJ,eAAe;AAAA,MACX,aAAa;AAAA,IACjB;AAAA,EACJ;AAAA,EAEA,UAAU,yHAA8F;AAAA,EACxG;AACJ;AAEA,IAAO,iBAAQ,cAAc,MAAM;",
|
|
4
|
+
"sourcesContent": ["import { Pie as PieIcon } from '@splunk/visualization-icons';\nimport { Pie as PiePlaceholderIcon } from '@splunk/visualization-icons/placeholders';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { pieOptionsSchema as optionsSchema } from '@splunk/visualization-schemas';\nimport { pick, variables } from '@splunk/themes';\nimport { DataContract } from '../common/interfaces/DataContract';\nimport { DefaultContext } from '../common/interfaces/DefaultContext';\nimport { EditorConfig } from '../common/interfaces/Editor';\nimport { ThemedDefaults } from '../common/interfaces/ThemedDefaults';\nimport { VizBehavior } from '../common/interfaces/VizBehavior';\nimport { VizCategory } from '../common/interfaces/VizCategory';\nimport { VizConfig } from '../common/interfaces/VizConfig';\nimport { VizSize } from '../common/interfaces/VizSize';\nimport { enhanceConfig } from '../common/utils/configUtils';\nimport getBackgroundColorEditor from '../common/editorConfig/BackgroundColor';\nimport { TrellisEditorConfig, TrellisBackgroundColorEditor } from '../common/editorConfig/TrellisEditors';\nimport { defaultBackgroundColor } from '../common/ThemedDefaults';\n\nconst dataContract: DataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [\n // Note: SCP-14090 disable ui for optional datasources. We may need to add it back later\n // {\n // name: 'annotation',\n // description: 'DataSource that populate event annotations',\n // },\n ],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n};\n\nconst size: VizSize = {\n initialWidth: 300,\n initialHeight: 300,\n};\n\nconst defaultContext: DefaultContext = {};\n\nconst themes: ThemedDefaults = {\n defaultBackgroundColor,\n defaultFontColor: props =>\n pick({\n enterprise: {\n dark: variables.textColor(props),\n light: variables.textColor(props),\n },\n prisma: variables.contentColorDefault(props),\n })(props),\n};\n\nconst editorConfig: EditorConfig[] = [\n {\n label: _('Data configurations'),\n layout: [\n [\n {\n label: _('Label'),\n editor: 'editor.columnSelector',\n option: 'label',\n context: 'valuesContext',\n editorProps: {\n dataSourceKey: 'primary',\n },\n },\n ],\n [\n {\n label: _('Value'),\n editor: 'editor.columnSelector',\n option: 'value',\n context: 'valuesContext',\n editorProps: {\n dataSourceKey: 'primary',\n },\n },\n ],\n ],\n },\n {\n label: _('Data display'),\n layout: [\n [\n {\n label: _('Display type'),\n option: 'showDonutHole',\n editor: 'editor.radioBar',\n editorProps: {\n values: [\n { label: _('Pie'), value: false },\n { label: _('Donut'), value: true },\n ],\n },\n },\n ],\n [\n {\n label: _('Label display'),\n option: 'labelDisplay',\n editor: 'editor.select',\n editorProps: {\n values: [\n { label: _('Values'), value: 'values' },\n {\n label: _('Values & Percent'),\n value: 'valuesAndPercentage',\n },\n { label: _('Off'), value: 'off' },\n ],\n },\n },\n ],\n [\n {\n label: _('Legend display'),\n option: 'legendDisplay',\n editor: 'editor.select',\n editorProps: {\n values: [\n { label: _('Off'), value: 'off' },\n { label: _('Right'), value: 'right' },\n { label: _('Left'), value: 'left' },\n { label: _('Top'), value: 'top' },\n { label: _('Bottom'), value: 'bottom' },\n ],\n },\n },\n ],\n [\n {\n label: _('Percentage precision'),\n option: 'percentagePrecision',\n editor: 'editor.number',\n editorProps: {\n min: 0,\n max: 16,\n step: 1,\n },\n showEditor: ({ options }) => options.labelDisplay === 'valuesAndPercentage',\n },\n ],\n [\n {\n label: _('Collapse threshold'),\n option: 'collapseThreshold',\n editor: 'editor.number',\n editorProps: {\n min: 0,\n max: 1,\n step: 0.01,\n },\n },\n ],\n [\n {\n label: _('Exclude zeros in the collapsed slice'),\n option: 'collapseExcludeZero',\n editor: 'editor.toggle',\n },\n ],\n [\n {\n label: _('Collapsed slice label'),\n option: 'collapseLabel',\n editor: 'editor.text',\n },\n ],\n ...TrellisEditorConfig,\n ],\n },\n {\n label: _('Color and style'),\n layout: [\n [\n {\n label: _('Series colors'),\n option: 'seriesColors',\n editor: 'editor.seriesColors',\n },\n ],\n getBackgroundColorEditor({ themes }),\n [\n {\n ...TrellisBackgroundColorEditor,\n editorProps: {\n themes,\n },\n },\n ],\n ],\n },\n];\n\n/**\n * visualization configuration\n */\nconst config: VizConfig = {\n /**\n * unique viz key\n */\n key: 'splunk.pie',\n /**\n * viz name\n */\n name: _('Pie'),\n category: VizCategory.COMPARISONS,\n /**\n * viz icon\n */\n icon: PieIcon,\n placeholderIcon: PiePlaceholderIcon,\n dataContract,\n size,\n defaultContext,\n optionsSchema,\n editorConfig,\n events: {\n 'point.click': {\n description: 'triggered when user clicks on a point in the pie chart',\n },\n },\n\n supports: [VizBehavior.DYNAMIC_OPTIONS, VizBehavior.PLACEHOLDER, VizBehavior.EVENTS, VizBehavior.TRELLIS],\n themes,\n};\n\nexport default enhanceConfig(config);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons\";\nexport * from \"@splunk/visualization-icons\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons/placeholders\";\nexport * from \"@splunk/visualization-icons/placeholders\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/ui-utils/i18n\";\nexport * from \"@splunk/ui-utils/i18n\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-schemas\";\nexport * from \"@splunk/visualization-schemas\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/themes\";\nexport * from \"@splunk/themes\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"lodash\";\nexport * from \"lodash\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualizations-shared/configUtils\";\nexport * from \"@splunk/visualizations-shared/configUtils\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import { get, range } from 'lodash';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\n// included for backwards compatibility\nexport { enhanceOptionsSchemaWithDynamicOptions } from '@splunk/visualization-schemas';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\n/**\n * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block\n * this function also collapse all editor panels\n * @param vizConfig a Visualization Config\n * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports\n * and containing `open: false` for all editor panels in editorConfig\n */\nfunction enhanceConfig(vizConfig: VizConfig): VizConfig {\n const enhancedConfig: VizConfig = { ...vizConfig };\n\n enhancedConfig.editorConfig = vizConfig.editorConfig.map((config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n });\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport { enhanceConfig, getInitialPreset, generatePrecisionValues, uncollapseEditorConfig, isDynamicOption };\n\n/**\n * insert layout in layout array, return a new layout array instead of updating the original\n *\n * @param {EditorLayoutConfig[][]} layout - editor layout\n * @param {Number} index - the index to insert layout item(s)\n * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert\n * @returns {EditorLayoutConfig[][]} new editor layout with insertion\n */\nexport const insertLayout = (\n layout: EditorLayoutConfig[][],\n index: number,\n ...layoutItems: EditorLayoutConfig[][]\n): EditorLayoutConfig[][] => [\n // copy part of the array before the specified index\n ...layout.slice(0, index),\n // inserted layout item\n ...layoutItems,\n // copy part of the array after the specified index\n ...layout.slice(index),\n];\n", "import { _ } from '@splunk/ui-utils/i18n';\nimport { EditorLayoutConfig } from '../interfaces/Editor';\nimport { ThemedDefaults } from '../interfaces/ThemedDefaults';\n\ninterface backgroundEditorProps {\n label?: string;\n themes: ThemedDefaults;\n labelPosition?: string;\n}\n\nconst background: ({ label, themes, labelPosition }: backgroundEditorProps) => EditorLayoutConfig[] = ({\n label,\n themes,\n labelPosition,\n}) => [\n {\n label: _(label || 'Background color'),\n option: 'backgroundColor',\n editor: 'editor.color',\n editorProps: {\n labelPosition: labelPosition || 'top',\n themes,\n },\n },\n];\n\nexport default background;\n", "import { _ } from '@splunk/ui-utils/i18n';\nimport { LAYOUT_TYPE } from '@splunk/visualization-schemas';\n\nexport const isTrellisFeatureFlagOn = ({ featureFlags }): boolean => {\n return Boolean(featureFlags?.visualizations_enableTrellis);\n};\n\nexport const isTrellisEnabled = ({ options, featureFlags }): boolean => {\n const { splitByLayout = LAYOUT_TYPE.Off } = options;\n return isTrellisFeatureFlagOn({ featureFlags }) && splitByLayout === LAYOUT_TYPE.Trellis;\n};\n\nexport const TrellisEditorConfig = [\n [\n {\n label: _('Trellis layout'),\n option: 'splitByLayout',\n editor: 'editor.toggle',\n showEditor: isTrellisFeatureFlagOn,\n },\n ],\n [\n {\n label: _('Split by'),\n option: 'trellisSplitBy',\n editor: 'editor.trellisSplitBy',\n editorProps: {\n dataSourceKey: 'primary',\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Number of columns'),\n option: 'trellisColumns',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Min column width'),\n option: 'trellisMinColumnWidth',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n {\n label: _('Row height'),\n option: 'trellisRowHeight',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Max number of components per page'),\n option: 'trellisPageCount',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n];\n\nexport const TimechartTrellisEditorConfig = [\n [\n {\n label: _('Trellis layout'),\n option: 'splitByLayout',\n editor: 'editor.toggle',\n showEditor: isTrellisFeatureFlagOn,\n // add help text for timecharts\n editorProps: {\n help: _(\n 'Y2-axis and overlay field configurations are not supported when trellis is enabled.'\n ),\n helpFormat: 'under',\n },\n },\n ],\n ...TrellisEditorConfig.slice(1),\n [\n {\n label: _('Shared y-axis scale'),\n option: 'trellisSharedScale',\n editor: 'editor.checkbox',\n showEditor: isTrellisEnabled,\n },\n ],\n];\n\nexport const TrellisBackgroundColorEditor = {\n label: _('Trellis background'),\n option: 'trellisBackgroundColor',\n editor: 'editor.color',\n showEditor: isTrellisEnabled,\n};\n", "\nimport * as defaultImport from \"@splunk/themes/pick\";\nexport * from \"@splunk/themes/pick\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/themes/variables\";\nexport * from \"@splunk/themes/variables\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import pick from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\n\nexport const defaultBackgroundColor = props =>\n pick({\n enterprise: {\n dark: variables.black(props),\n light: variables.white(props),\n },\n prisma: variables.backgroundColorSection(props),\n })(props);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAC/B,wCAAc;AACd,IAAO,8BAAS,aAAa,gBAA8B,wBAAU;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAA,iBAA+B;AAC/B,iCAAc;AACd,IAAO,uBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,yBAAc;AACd,IAAO,eAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,0CAAc;AACd,IAAO,gCAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,2BAAc;AACd,IAAO,iBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,2BAAc;AACd,IAAO,iBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,gCAAc;AACd,IAAO,sBAAS,aAAaA,iBAA8B,yBAAUA;;;ACkBrE,SAAS,cA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;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA,6CAAAC;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,IACJ,eAAe;AAAA,MACX,aAAa;AAAA,IACjB;AAAA,EACJ;AAAA,EAEA,UAAU,yHAA8F;AAAA,EACxG;AACJ;AAEA,IAAO,iBAAQ,cAAc,MAAM;",
|
|
6
6
|
"names": ["defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "config", "themes", "defaultImport", "defaultImport", "PieIcon", "PiePlaceholderIcon", "optionsSchema"]
|
|
7
7
|
}
|
package/Pie.js
CHANGED
|
@@ -616,6 +616,9 @@ var ChartingContainer = styled_components_default.div.attrs((props) => ({
|
|
|
616
616
|
& .highcharts-a11y-proxy-container {
|
|
617
617
|
pointer-events: none;
|
|
618
618
|
}
|
|
619
|
+
& .highcharts-a11y-proxy-container-after {
|
|
620
|
+
overflow: hidden;
|
|
621
|
+
}
|
|
619
622
|
overflow: hidden;
|
|
620
623
|
position: relative;
|
|
621
624
|
${(props) => (0, style_exports.toDimension)((0, lodash_exports.pick)(props, ["width", "height"]))};
|
|
@@ -1254,6 +1257,22 @@ var editorConfig = [
|
|
|
1254
1257
|
}
|
|
1255
1258
|
}
|
|
1256
1259
|
],
|
|
1260
|
+
[
|
|
1261
|
+
{
|
|
1262
|
+
label: (0, i18n_exports._)("Legend display"),
|
|
1263
|
+
option: "legendDisplay",
|
|
1264
|
+
editor: "editor.select",
|
|
1265
|
+
editorProps: {
|
|
1266
|
+
values: [
|
|
1267
|
+
{ label: (0, i18n_exports._)("Off"), value: "off" },
|
|
1268
|
+
{ label: (0, i18n_exports._)("Right"), value: "right" },
|
|
1269
|
+
{ label: (0, i18n_exports._)("Left"), value: "left" },
|
|
1270
|
+
{ label: (0, i18n_exports._)("Top"), value: "top" },
|
|
1271
|
+
{ label: (0, i18n_exports._)("Bottom"), value: "bottom" }
|
|
1272
|
+
]
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
],
|
|
1257
1276
|
[
|
|
1258
1277
|
{
|
|
1259
1278
|
label: (0, i18n_exports._)("Percentage precision"),
|
|
@@ -1679,7 +1698,7 @@ var Cover = styled_components_default.div`
|
|
|
1679
1698
|
bottom: 0;
|
|
1680
1699
|
`;
|
|
1681
1700
|
var Blocker = styled_components_default.div.attrs({
|
|
1682
|
-
"data-splunk-visualization-version": "28.
|
|
1701
|
+
"data-splunk-visualization-version": "28.5.1 - 617766eb3"
|
|
1683
1702
|
})`
|
|
1684
1703
|
position: relative;
|
|
1685
1704
|
width: 100%;
|
|
@@ -1760,7 +1779,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
1760
1779
|
FixSizeItem,
|
|
1761
1780
|
{
|
|
1762
1781
|
"data-test": "fix-size-item",
|
|
1763
|
-
"data-splunk-visualization-version": "28.
|
|
1782
|
+
"data-splunk-visualization-version": "28.5.1 - 617766eb3",
|
|
1764
1783
|
width,
|
|
1765
1784
|
height,
|
|
1766
1785
|
backgroundColor
|
|
@@ -2160,16 +2179,14 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
|
|
|
2160
2179
|
splitDataSources[val] = (0, lodash_exports.cloneDeep)(
|
|
2161
2180
|
(0, lodash_exports.omit)(dataSource, ["primary.data.fields", "primary.data.columns"])
|
|
2162
2181
|
);
|
|
2163
|
-
splitDataSources[val].primary.data.fields = [
|
|
2164
|
-
{ name: fields[0].name },
|
|
2165
|
-
...dataSourceKeys.map((k) => ({
|
|
2166
|
-
name: k
|
|
2167
|
-
}))
|
|
2168
|
-
];
|
|
2182
|
+
splitDataSources[val].primary.data.fields = [{ name: fields[0].name }];
|
|
2169
2183
|
splitDataSources[val].primary.data.columns = [[...columns[0]]];
|
|
2170
2184
|
dataSourceKeys.forEach((dsKey) => {
|
|
2171
2185
|
fields.forEach((field, idx) => {
|
|
2172
2186
|
if (field.data_source === dsKey && (field.splitby_value === val || field.name === val)) {
|
|
2187
|
+
splitDataSources[val].primary.data.fields.push({
|
|
2188
|
+
name: dsKey
|
|
2189
|
+
});
|
|
2173
2190
|
splitDataSources[val].primary.data.columns.push([...columns[idx]]);
|
|
2174
2191
|
}
|
|
2175
2192
|
});
|
|
@@ -2484,25 +2501,27 @@ var parseAxisValue = (val) => {
|
|
|
2484
2501
|
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
2485
2502
|
return Number.isNaN(num) ? void 0 : num;
|
|
2486
2503
|
};
|
|
2487
|
-
var
|
|
2488
|
-
|
|
2504
|
+
var parseXAxisLineVisibility = (visibility) => {
|
|
2505
|
+
if (visibility === "hide") return false;
|
|
2506
|
+
if (visibility === "show") return true;
|
|
2507
|
+
return void 0;
|
|
2508
|
+
};
|
|
2489
2509
|
var getLegend = (props) => {
|
|
2490
2510
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
2491
|
-
const { isSeriesCompare } = props;
|
|
2511
|
+
const { isSeriesCompare, legendTruncation } = props;
|
|
2492
2512
|
const commonLegendProps = {
|
|
2493
2513
|
center: true,
|
|
2494
2514
|
fontSize: 12,
|
|
2495
2515
|
largerTiles: true,
|
|
2496
|
-
hideSeriesValue: !isSeriesCompare
|
|
2516
|
+
hideSeriesValue: !isSeriesCompare,
|
|
2497
2517
|
// Show values if in seriesCompare mode
|
|
2518
|
+
legendTruncation
|
|
2498
2519
|
};
|
|
2499
2520
|
switch (legendPlacement) {
|
|
2500
2521
|
case "off":
|
|
2501
2522
|
return false;
|
|
2502
2523
|
case "left":
|
|
2503
|
-
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
2504
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
2505
|
-
}, commonLegendProps));
|
|
2524
|
+
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
2506
2525
|
case "bottom":
|
|
2507
2526
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
2508
2527
|
wrap: true
|
|
@@ -2512,9 +2531,7 @@ var getLegend = (props) => {
|
|
|
2512
2531
|
wrap: true
|
|
2513
2532
|
}, commonLegendProps));
|
|
2514
2533
|
default:
|
|
2515
|
-
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
2516
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
2517
|
-
}, commonLegendProps));
|
|
2534
|
+
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
2518
2535
|
}
|
|
2519
2536
|
};
|
|
2520
2537
|
var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
|
|
@@ -2575,9 +2592,7 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
|
|
|
2575
2592
|
if (yAxisAbbreviation !== "none") {
|
|
2576
2593
|
yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
|
|
2577
2594
|
}
|
|
2578
|
-
if (yAxisAbbreviation
|
|
2579
|
-
yConfig.y.width = 55;
|
|
2580
|
-
} else {
|
|
2595
|
+
if (yAxisAbbreviation !== "none") {
|
|
2581
2596
|
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
2582
2597
|
}
|
|
2583
2598
|
if (yAxisLabelVisibility === "hide") {
|
|
@@ -2600,6 +2615,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
2600
2615
|
y2Config.y2.type = scaleType;
|
|
2601
2616
|
if (axisAbbreviation !== "none") {
|
|
2602
2617
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
2618
|
+
y2Config.y2.width = label && label.length > 0 ? 50 : 10;
|
|
2603
2619
|
} else if (roundAxisLabelsToInteger) {
|
|
2604
2620
|
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
2605
2621
|
}
|
|
@@ -2615,7 +2631,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
2615
2631
|
}
|
|
2616
2632
|
return y2Config;
|
|
2617
2633
|
};
|
|
2618
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
|
|
2634
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
|
|
2619
2635
|
const seriesConfig = {};
|
|
2620
2636
|
let spanGaps;
|
|
2621
2637
|
let replaceNullsWithZero;
|
|
@@ -2642,6 +2658,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
2642
2658
|
);
|
|
2643
2659
|
if (shouldAssignToY2) {
|
|
2644
2660
|
seriesConfig[field].overrides.scale = "y2";
|
|
2661
|
+
} else {
|
|
2662
|
+
seriesConfig[field].overrides.scale = "y";
|
|
2645
2663
|
}
|
|
2646
2664
|
}
|
|
2647
2665
|
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
@@ -2654,6 +2672,11 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
2654
2672
|
if (fieldDashStyle) {
|
|
2655
2673
|
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
2656
2674
|
}
|
|
2675
|
+
const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
|
|
2676
|
+
const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
|
|
2677
|
+
if (fieldStepPosition && fieldStepPosition !== "off") {
|
|
2678
|
+
seriesConfig[field].stepPosition = fieldStepPosition;
|
|
2679
|
+
}
|
|
2657
2680
|
if (replaceNullsWithZero !== void 0) {
|
|
2658
2681
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
2659
2682
|
}
|
|
@@ -2836,6 +2859,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2836
2859
|
backgroundColor,
|
|
2837
2860
|
defaultFontColor,
|
|
2838
2861
|
additionalTooltipValues,
|
|
2862
|
+
xAxisLineVisibility: xAxisLineVisibility,
|
|
2863
|
+
yAxisLineVisibility,
|
|
2864
|
+
y2AxisLineVisibility,
|
|
2839
2865
|
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
2840
2866
|
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
2841
2867
|
} = _a, otherOptions = __objRest(_a, [
|
|
@@ -2859,6 +2885,10 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2859
2885
|
"backgroundColor",
|
|
2860
2886
|
"defaultFontColor",
|
|
2861
2887
|
"additionalTooltipValues",
|
|
2888
|
+
// Extract axis line visibility options from props
|
|
2889
|
+
"xAxisLineVisibility",
|
|
2890
|
+
"yAxisLineVisibility",
|
|
2891
|
+
"y2AxisLineVisibility",
|
|
2862
2892
|
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
2863
2893
|
"showYAxisWithZero",
|
|
2864
2894
|
"showY2AxisWithZero"
|
|
@@ -2871,6 +2901,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2871
2901
|
fieldColors,
|
|
2872
2902
|
legendLabels: legendLabelsStr,
|
|
2873
2903
|
legendMode,
|
|
2904
|
+
legendTruncation,
|
|
2874
2905
|
"axisTitleX.text": xAxisTitleText,
|
|
2875
2906
|
"axisTitleY.text": yAxisTitleText,
|
|
2876
2907
|
"axisTitleY2.text": y2AxisTitleText,
|
|
@@ -2879,6 +2910,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2879
2910
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
2880
2911
|
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
2881
2912
|
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
2913
|
+
"axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
|
|
2882
2914
|
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
2883
2915
|
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
2884
2916
|
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
@@ -2896,6 +2928,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2896
2928
|
lineWidth,
|
|
2897
2929
|
lineDashStyle,
|
|
2898
2930
|
fieldDashStyles: lineDashStylesByFieldStr,
|
|
2931
|
+
stepPosition,
|
|
2932
|
+
fieldStepPositions: stepPositionsByFieldStr,
|
|
2899
2933
|
yAxisMin: yAxisMinRaw,
|
|
2900
2934
|
yAxisMax: yAxisMaxRaw,
|
|
2901
2935
|
y2AxisMin: y2AxisMinRaw,
|
|
@@ -2906,6 +2940,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2906
2940
|
showYMinorGridLines,
|
|
2907
2941
|
showY2MinorGridLines,
|
|
2908
2942
|
showLineSmoothing,
|
|
2943
|
+
xAxisMajorTickVisibility,
|
|
2944
|
+
xAxisMajorTickSize,
|
|
2909
2945
|
yAxisMajorTickVisibility,
|
|
2910
2946
|
y2AxisMajorTickVisibility,
|
|
2911
2947
|
yAxisMajorTickSize,
|
|
@@ -2922,10 +2958,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2922
2958
|
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
2923
2959
|
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
2924
2960
|
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
2961
|
+
const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
|
|
2925
2962
|
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
2926
2963
|
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
2927
2964
|
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
2928
2965
|
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
2966
|
+
const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
|
|
2967
|
+
const showYAxisLine = yAxisLineVisibility === "show";
|
|
2968
|
+
const showY2AxisLine = y2AxisLineVisibility === "show";
|
|
2929
2969
|
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
2930
2970
|
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
2931
2971
|
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
@@ -2940,13 +2980,15 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2940
2980
|
y2AxisMajorUnitFromSimpleXML,
|
|
2941
2981
|
y2AxisMajorTickInterval
|
|
2942
2982
|
);
|
|
2943
|
-
const
|
|
2944
|
-
const
|
|
2945
|
-
const
|
|
2946
|
-
const
|
|
2983
|
+
const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
|
|
2984
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
|
|
2985
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
|
|
2986
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
|
|
2987
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
|
|
2947
2988
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
2948
2989
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
2949
2990
|
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
2991
|
+
const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
|
|
2950
2992
|
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
2951
2993
|
const bgColor = backgroundColor || bgColorFromOptions;
|
|
2952
2994
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
@@ -3034,7 +3076,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3034
3076
|
nullValueMode,
|
|
3035
3077
|
markerDisplay,
|
|
3036
3078
|
lineDashStyle,
|
|
3037
|
-
lineDashStylesByField
|
|
3079
|
+
lineDashStylesByField,
|
|
3080
|
+
stepPosition,
|
|
3081
|
+
stepPositionsByField
|
|
3038
3082
|
),
|
|
3039
3083
|
[
|
|
3040
3084
|
yFields,
|
|
@@ -3045,7 +3089,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3045
3089
|
nullValueMode,
|
|
3046
3090
|
markerDisplay,
|
|
3047
3091
|
lineDashStyle,
|
|
3048
|
-
lineDashStylesByField
|
|
3092
|
+
lineDashStylesByField,
|
|
3093
|
+
stepPosition,
|
|
3094
|
+
stepPositionsByField
|
|
3049
3095
|
]
|
|
3050
3096
|
);
|
|
3051
3097
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
@@ -3060,9 +3106,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3060
3106
|
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
3061
3107
|
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
3062
3108
|
);
|
|
3109
|
+
const isSeriesCompare = legendMode === "seriesCompare";
|
|
3063
3110
|
const legend = (0, react_exports.useMemo)(
|
|
3064
|
-
() => getLegend({
|
|
3065
|
-
|
|
3111
|
+
() => getLegend({
|
|
3112
|
+
legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
|
|
3113
|
+
isSeriesCompare,
|
|
3114
|
+
legendTruncation
|
|
3115
|
+
}),
|
|
3116
|
+
[legendDisplay, isSeriesCompare, legendTruncation]
|
|
3066
3117
|
);
|
|
3067
3118
|
const handleChartClick = react_exports.useCallback(
|
|
3068
3119
|
(event) => {
|
|
@@ -3167,6 +3218,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3167
3218
|
seriesConfig: seriesOverrides,
|
|
3168
3219
|
legend,
|
|
3169
3220
|
legendLabels,
|
|
3221
|
+
legendTruncation,
|
|
3170
3222
|
isSeriesCompare: legendMode === "seriesCompare",
|
|
3171
3223
|
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
3172
3224
|
scaleConfig,
|
|
@@ -3188,6 +3240,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3188
3240
|
showY2MinorGridLines,
|
|
3189
3241
|
showLineSmoothing,
|
|
3190
3242
|
dataValuesDisplay,
|
|
3243
|
+
showXMajorTicks,
|
|
3244
|
+
xAxisMajorTickSize: xAxisMajorTickSizeNum,
|
|
3191
3245
|
showYMajorTicks,
|
|
3192
3246
|
showY2MajorTicks,
|
|
3193
3247
|
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
@@ -3199,7 +3253,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3199
3253
|
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
3200
3254
|
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
3201
3255
|
showYAxisWithZero,
|
|
3202
|
-
showY2AxisWithZero
|
|
3256
|
+
showY2AxisWithZero,
|
|
3257
|
+
showXAxisLine,
|
|
3258
|
+
showYAxisLine,
|
|
3259
|
+
showY2AxisLine,
|
|
3260
|
+
xAxisMaxLabelParts
|
|
3203
3261
|
}
|
|
3204
3262
|
));
|
|
3205
3263
|
}, [
|
|
@@ -3214,6 +3272,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3214
3272
|
seriesOverrides,
|
|
3215
3273
|
legend,
|
|
3216
3274
|
legendLabels,
|
|
3275
|
+
legendTruncation,
|
|
3217
3276
|
scaleConfig,
|
|
3218
3277
|
onClick,
|
|
3219
3278
|
handleChartClick,
|
|
@@ -3232,6 +3291,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3232
3291
|
showY2MinorGridLines,
|
|
3233
3292
|
showLineSmoothing,
|
|
3234
3293
|
dataValuesDisplay,
|
|
3294
|
+
showXMajorTicks,
|
|
3295
|
+
xAxisMajorTickSizeNum,
|
|
3235
3296
|
showYMajorTicks,
|
|
3236
3297
|
showY2MajorTicks,
|
|
3237
3298
|
yAxisMajorTickSizeNum,
|
|
@@ -3244,7 +3305,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3244
3305
|
y2AxisMinorTickSizeNum,
|
|
3245
3306
|
showYAxisWithZero,
|
|
3246
3307
|
showY2AxisWithZero,
|
|
3247
|
-
|
|
3308
|
+
showXAxisLine,
|
|
3309
|
+
showYAxisLine,
|
|
3310
|
+
showY2AxisLine,
|
|
3311
|
+
legendMode,
|
|
3312
|
+
xAxisMaxLabelParts
|
|
3248
3313
|
]);
|
|
3249
3314
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
3250
3315
|
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|
|
@@ -3579,7 +3644,8 @@ var pieOptionsSCMapping = {
|
|
|
3579
3644
|
resultLimit: "resultTruncationLimit",
|
|
3580
3645
|
seriesColorsByField: "fieldColors",
|
|
3581
3646
|
collapseThreshold: "chart.sliceCollapsingThreshold",
|
|
3582
|
-
collapseLabel: "chart.sliceCollapsingLabel"
|
|
3647
|
+
collapseLabel: "chart.sliceCollapsingLabel",
|
|
3648
|
+
legendDisplay: "legendPlacement"
|
|
3583
3649
|
};
|
|
3584
3650
|
var getFieldName3 = (field) => {
|
|
3585
3651
|
var _a, _b;
|
|
@@ -3606,8 +3672,27 @@ var mapLabelDisplay = (_a) => {
|
|
|
3606
3672
|
}
|
|
3607
3673
|
return convertedOptions;
|
|
3608
3674
|
};
|
|
3675
|
+
var ALLOWED_LEGEND_PLACEMENTS = /* @__PURE__ */ new Set(["right", "left", "top", "bottom"]);
|
|
3676
|
+
var mapLegendDisplay = (options) => {
|
|
3677
|
+
if (!Object.hasOwn(options, "legendPlacement")) {
|
|
3678
|
+
return __spreadProps(__spreadValues({}, options), {
|
|
3679
|
+
showLegend: false
|
|
3680
|
+
});
|
|
3681
|
+
}
|
|
3682
|
+
const placement = options.legendPlacement;
|
|
3683
|
+
if (typeof placement === "string" && ALLOWED_LEGEND_PLACEMENTS.has(placement)) {
|
|
3684
|
+
return __spreadProps(__spreadValues({}, options), {
|
|
3685
|
+
legendPlacement: placement,
|
|
3686
|
+
showLegend: true
|
|
3687
|
+
});
|
|
3688
|
+
}
|
|
3689
|
+
const next = __spreadValues({}, options);
|
|
3690
|
+
delete next.legendPlacement;
|
|
3691
|
+
next.showLegend = false;
|
|
3692
|
+
return next;
|
|
3693
|
+
};
|
|
3609
3694
|
var mapToOldKey = (options) => (0, lodash_exports.mapKeys)(options, (val, key) => pieOptionsSCMapping[key] ? pieOptionsSCMapping[key] : key);
|
|
3610
|
-
var convertToPieSCProperties = (originalOptions) => (0, lodash_exports.chain)(mapToOldKey(originalOptions)).thru(convertToStringValues).thru(mapLabelDisplay).value();
|
|
3695
|
+
var convertToPieSCProperties = (originalOptions) => (0, lodash_exports.chain)(mapToOldKey(originalOptions)).thru(convertToStringValues).thru(mapLabelDisplay).thru(mapLegendDisplay).value();
|
|
3611
3696
|
var getPieMergedOptions = (options, vizConfig) => (0, hocUtils_exports.deepMergeWithArrayPrimitiveOverrides)(
|
|
3612
3697
|
{},
|
|
3613
3698
|
options,
|
|
@@ -3931,7 +4016,8 @@ var computeVizProps = (_a) => {
|
|
|
3931
4016
|
};
|
|
3932
4017
|
const { labelField, valueField, hasEventHandlers } = otherOptions;
|
|
3933
4018
|
computedProps.options = (0, lodash_exports.chain)(otherOptions).pick(validOptions).thru(convertToPieSCProperties).thru((options) => __spreadProps(__spreadValues({}, (0, simpleXMLOptions_exports.getSimpleXMLOptionsForProps)(options)), {
|
|
3934
|
-
chart: "pie"
|
|
4019
|
+
chart: "pie",
|
|
4020
|
+
"legend.clickEnabled": false
|
|
3935
4021
|
})).value();
|
|
3936
4022
|
const truncationLimit = computedProps.options["chart.resultTruncationLimit"];
|
|
3937
4023
|
let primaryData = __spreadProps(__spreadValues({}, dataSources.primary.data), {
|