@splunk/visualization-migrations 25.3.2 → 25.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -7
- package/index.js.map +1 -1
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -2769,15 +2769,9 @@ var convertTextContentToMarkDown = function convertTextContentToMarkDown(fontWei
|
|
|
2769
2769
|
var markdownContent = textContent.replace(/\n*$/, ''); // Handle text conversion to marker tags based on fontSize and fontWeight
|
|
2770
2770
|
|
|
2771
2771
|
var regex = /\n/g; // regex to match /n with global scope across the string
|
|
2772
|
-
// Convert to
|
|
2773
|
-
|
|
2774
|
-
if (fontSize >= 20) {
|
|
2775
|
-
markdownContent = markdownContent.replace(regex, '\n# ');
|
|
2776
|
-
return "# ".concat(markdownContent);
|
|
2777
|
-
} // Convert to paragraph in markdown, if fontSize < 20,
|
|
2772
|
+
// Convert to paragraph in markdown, if fontSize < 20,
|
|
2778
2773
|
// If text has fontWeight set to 'bold', add bold tag (**{markdown}**)
|
|
2779
2774
|
|
|
2780
|
-
|
|
2781
2775
|
if (fontWeight === 'bold') {
|
|
2782
2776
|
// Here direct regex replace doesnt work, as we need to remove the
|
|
2783
2777
|
// extra trailing space if any exist before appending **{markdown}** to the text
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utils/migrationUtils.ts","webpack:///./src/encoding/index.ts","webpack:///./src/visualizations/splunk-charting.ts","webpack:///./src/utils/singlevalue.ts","webpack:///external \"@babel/runtime/helpers/typeof\"","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///external \"@babel/runtime/helpers/slicedToArray\"","webpack:///./src/utils/gauges.ts","webpack:///external \"@splunk/visualizations/Markdown.config\"","webpack:///external \"lodash\"","webpack:///./src/index.ts","webpack:///./src/migrate.ts","webpack:///./src/visualizations/index.ts","webpack:///./src/visualizations/area.ts","webpack:///external \"@splunk/visualizations/Area.config\"","webpack:///./src/encoding/encoding.ts","webpack:///external \"@splunk/visualization-encoding-parsers/Base\"","webpack:///./src/visualizations/bar.ts","webpack:///external \"@splunk/visualizations/Bar.config\"","webpack:///./src/visualizations/bubble.ts","webpack:///external \"@splunk/visualizations/Bubble.config\"","webpack:///./src/visualizations/choroplethSvg.ts","webpack:///external \"@splunk/visualizations/ChoroplethSvg.config\"","webpack:///external \"@splunk/visualization-encoding/utils/dsl\"","webpack:///./src/visualizations/column.ts","webpack:///external \"@splunk/visualizations/Column.config\"","webpack:///./src/visualizations/ellipse.ts","webpack:///external \"@splunk/visualizations/Ellipse.config\"","webpack:///./src/visualizations/fillergauge.ts","webpack:///external \"@splunk/visualizations/FillerGauge.config\"","webpack:///./src/visualizations/line.ts","webpack:///external \"@splunk/visualizations/Line.config\"","webpack:///./src/visualizations/image.ts","webpack:///external \"@splunk/visualizations/Image.config\"","webpack:///./src/visualizations/markdown.ts","webpack:///./src/visualizations/markergauge.ts","webpack:///external \"@splunk/visualizations/MarkerGauge.config\"","webpack:///./src/visualizations/pie.ts","webpack:///external \"@splunk/visualizations/Pie.config\"","webpack:///./src/visualizations/scatter.ts","webpack:///external \"@splunk/visualizations/Scatter.config\"","webpack:///./src/visualizations/rectangle.ts","webpack:///external \"@splunk/visualizations/Rectangle.config\"","webpack:///./src/visualizations/singlevalue.ts","webpack:///external \"@splunk/visualizations/SingleValue.config\"","webpack:///./src/visualizations/singlevalueicon.ts","webpack:///external \"@splunk/visualizations/SingleValueIcon.config\"","webpack:///./src/visualizations/singlevalueradial.ts","webpack:///external \"@splunk/visualizations/SingleValueRadial.config\"","webpack:///./src/visualizations/table.ts","webpack:///external \"@splunk/visualizations/Table.config\"","webpack:///external \"@splunk/visualizations-shared/hocUtils\"","webpack:///./src/visualizations/text.ts","webpack:///./src/visualizations/punchcard.ts","webpack:///external \"@splunk/visualizations/Punchcard.config\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;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AAD,CAAtB,CAlByB,CAmBzB;;AACA,wCAAqB,qBAAqB,CAAC,OAA3C,EAAoD,YAApD;AACA,SAAO,qBAAP;AACH,CAxBM;;AAAM,sCAA2B,2BAA3B,C;;;;;;AC1Gb,oE","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","import { getDataSelectorsFromDSL } from '@splunk/visualization-encoding/utils/dsl';\n\n/**\n * Removes invalid keys in the options\n * @param currentOptions - Current visualization options\n * @param validOptions - Valid visualization option keys\n * @returns void\n */\nexport const removeInvalidOptions = (\n currentOptions: Record<string, unknown>,\n validOptions: Record<string, unknown>\n): void => {\n if (!currentOptions || !validOptions) {\n return;\n }\n const copiedCurrOptions = currentOptions;\n Object.keys(copiedCurrOptions).forEach(key => {\n if (!(key in validOptions)) {\n delete copiedCurrOptions[key];\n }\n });\n};\n\n/**\n * Renames viz options by looking up their migration mapping\n * @param oldOptions - Current visualization options\n * @param optionRenames - Mapping of old options in viz.X to their migrated counterparts in splunk.X\n * @returns updatedOptions\n */\nexport const renameVizOptions = (\n oldOptions: Record<string, unknown>,\n optionRenames: Record<string, string>\n): Record<string, unknown> => {\n const updatedOptions = {};\n\n if (!oldOptions) return {};\n if (!optionRenames) return oldOptions;\n\n Object.entries(oldOptions).forEach(([oldOptName, val]) => {\n const optionName = optionRenames[oldOptName] ?? oldOptName;\n updatedOptions[optionName] = val;\n });\n\n return updatedOptions;\n};\n\n/**\n * Appends appropriate series selector to DSL string to add viz-specific implicit logic\n * @param valueOption - the value of an option\n * @param selector - the selector to append\n * @returns string | void\n */\nexport const preserveDataSelectionForValueOption = (\n valueOption: string | unknown,\n selector: string\n): string | void => {\n if (valueOption) {\n // if the last data selector starts with seriesBy, append appropriate selector to it\n const dataSelectors = getDataSelectorsFromDSL(valueOption);\n const lastDataSelector = dataSelectors[dataSelectors.length - 1];\n if (lastDataSelector.includes('seriesByIndex') || lastDataSelector.includes('seriesByName')) {\n return `${valueOption} | ${selector}`;\n }\n }\n\n return null;\n};\n\n/**\n * For all data options, calls preserveDataSelectionForValueOption with relevant selector and\n * updates dataOptions object\n * @param dataOptions - an object reflecting all data options\n * @param selector - the selector to append\n * @returns void\n */\nexport const addsDataSelectorToOptions = (\n dataOptions: Record<string, unknown>,\n selector: string\n): Record<string, unknown> => {\n const updatedDataOptions = {};\n\n Object.keys(dataOptions).forEach(key => {\n const statement = dataOptions[key] as string;\n const updatedDSL = preserveDataSelectionForValueOption(statement, selector);\n if (updatedDSL) {\n updatedDataOptions[key] = updatedDSL;\n } else {\n updatedDataOptions[key] = statement;\n }\n });\n\n return updatedDataOptions;\n};\n","export * from './encoding';\n","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\n\n/**\n * map of splunk charting based @splunk/dashboard-visualization option names\n * to updated @splunk/visualization option names\n */\nconst optionRenames = {\n 'axisTitleX.text': 'xAxisTitleText',\n 'axisTitleY.text': 'yAxisTitleText',\n 'axisTitleY2.text': 'y2AxisTitleText',\n 'axisTitleX.visibility': 'xAxisTitleVisibility',\n 'axisTitleY.visibility': 'yAxisTitleVisibility',\n 'axisTitleY2.visibility': 'y2AxisTitleVisibility',\n 'axisLabelsX.majorLabelStyle.rotation': 'xAxisLabelRotation',\n 'axisLabelsX.majorLabelVisibility': 'xAxisLabelVisibility',\n 'axisLabelsY.majorLabelVisibility': 'yAxisLabelVisibility',\n 'axisLabelsY2.majorLabelVisibility': 'y2AxisLabelVisibility',\n 'axisLabelsX.majorTickVisibility': 'xAxisMajorTickVisibility',\n 'axisLabelsY.majorTickVisibility': 'yAxisMajorTickVisibility',\n 'axisLabelsY2.majorTickVisibility': 'y2AxisMajorTickVisibility',\n 'axisLabelsX.minorTickVisibility': 'xAxisMinorTickVisibility',\n 'axisLabelsY.minorTickVisibility': 'yAxisMinorTickVisibility',\n 'axisLabelsY2.minorTickVisibility': 'y2AxisMinorTickVisibility',\n 'axisLabelsX.majorTickSize': 'xAxisMajorTickSize',\n 'axisLabelsY.majorTickSize': 'yAxisMajorTickSize',\n 'axisLabelsY2.majorTickSize': 'y2AxisMajorTickSize',\n 'axisLabelsX.minorTickSize': 'xAxisMinorTickSize',\n 'axisLabelsY.minorTickSize': 'yAxisMinorTickSize',\n 'axisLabelsY2.minorTickSize': 'y2AxisMinorTickSize',\n 'axisLabelsX.majorUnit': 'xAxisMajorTickInterval',\n 'axisLabelsY.majorUnit': 'yAxisMajorTickInterval',\n 'axisLabelsY2.majorUnit': 'y2AxisMajorTickInterval',\n 'axisX.abbreviation': 'xAxisAbbreviation',\n 'axisY.abbreviation': 'yAxisAbbreviation',\n 'axisY2.abbreviation': 'y2AxisAbbreviation',\n 'axisLabelsX.integerUnits': 'showRoundedXAxisLabels',\n 'axisLabelsY2.integerUnits': 'showRoundedY2AxisLabels',\n 'axisLabelsX.maxLabelParts': 'xAxisMaxLabelParts',\n 'axisLabelsX.axisVisibility': 'xAxisLineVisibility',\n 'axisLabelsY.axisVisibility': 'yAxisLineVisibility',\n 'axisLabelsY2.axisVisibility': 'y2AxisLineVisibility',\n 'gridLinesX.showMajorLines': 'showXMajorGridLines',\n 'gridLinesY.showMajorLines': 'showYMajorGridLines',\n 'gridLinesX.showMinorLines': 'showXMinorGridLines',\n 'gridLinesY.showMinorLines': 'showYMinorGridLines',\n 'gridLinesY2.showMajorLines': 'showY2MajorGridLines',\n 'gridLinesY2.showMinorLines': 'showY2MinorGridLines',\n 'axisX.scale': 'xAxisScale',\n 'axisY.scale': 'yAxisScale',\n 'axisY2.scale': 'y2AxisScale',\n 'axisX.maximumNumber': 'xAxisMax',\n 'axisY.maximumNumber': 'yAxisMax',\n 'axisY2.maximumNumber': 'y2AxisMax',\n 'axisX.minimumNumber': 'xAxisMin',\n 'axisY.minimumNumber': 'yAxisMin',\n 'axisY2.minimumNumber': 'y2AxisMin',\n 'axisX.includeZero': 'showXAxisWithZero',\n 'axisY.includeZero': 'showYAxisWithZero',\n 'axisY2.includeZero': 'showY2AxisWithZero',\n 'axisLabelsX.extendsAxisRange': 'showXAxisExtendedRange',\n 'axisLabelsY.extendsAxisRange': 'showYAxisExtendedRange',\n 'layout.splitSeries': 'showSplitSeries',\n 'layout.splitSeries.allowIndependentYRanges': 'showIndependentYRanges',\n 'axisY2.enabled': 'showOverlayY2Axis',\n 'axisY2.fields': 'y2Fields',\n 'chart.overlayFields': 'overlayFields',\n 'legend.labels': 'legendLabels',\n 'legend.labelStyle.overflowMode': 'legendTruncation',\n 'legend.mode': 'legendMode',\n 'legend.placement': 'legendDisplay',\n 'chart.nullValueMode': 'nullValueDisplay',\n 'chart.showDataLabels': 'dataValuesDisplay',\n fieldColors: 'seriesColorsByField',\n 'chart.resultTruncationLimit': 'resultLimit',\n 'chart.stackMode': 'stackMode',\n 'chart.barSpacing': 'barSpacing',\n 'chart.columnSpacing': 'columnSpacing',\n 'chart.seriesSpacing': 'seriesSpacing',\n 'chart.sliceCollapsingLabel': 'collapseLabel',\n 'chart.sliceCollapsingThreshold': 'collapseThreshold',\n hasDonutHole: 'showDonutHole',\n // area specific mapped options\n areaFillOpacity: 'areaOpacity',\n 'chart.showLines': 'showLines',\n // bubble specific mapped options\n 'chart.bubbleMinimumSize': 'bubbleSizeMin',\n 'chart.bubbleMaximumSize': 'bubbleSizeMax',\n 'chart.bubbleSizeBy': 'bubbleSizeMethod',\n // line specific mapped options\n fieldDashStyles: 'lineDashStylesByField',\n 'chart.showMarkers': 'markerDisplay',\n // scatter-specific options\n 'chart.markerSize': 'markerSize',\n};\n\nconst visibilityEnumReplacements = {\n visible: 'show',\n collapsed: 'hide',\n};\nconst modeEnumReplacements = {\n none: 'off',\n};\nconst abbreviationEnumReplacements = {\n none: 'auto',\n};\n/**\n * for some options the valid values changed.\n * this maps enum values that need to be changed\n */\nconst enumReplacements = {\n xAxisTitleVisibility: visibilityEnumReplacements,\n yAxisTitleVisibility: visibilityEnumReplacements,\n y2AxisTitleVisibility: visibilityEnumReplacements,\n xAxisAbbreviation: modeEnumReplacements,\n yAxisAbbreviation: abbreviationEnumReplacements,\n y2AxisAbbreviation: abbreviationEnumReplacements,\n dataValuesDisplay: modeEnumReplacements,\n legendDisplay: modeEnumReplacements,\n legendTruncation: {\n ellipsisNone: 'ellipsisOff',\n },\n stackMode: {\n default: 'auto',\n },\n};\n\n// splits a string with multiple fields separated by comma\n// returns the same value if it's already an array\nconst splitValue = (oldValue: string | string[]) =>\n Array.isArray(oldValue) ? oldValue : oldValue.split(',');\n\n/**\n * converts stringified objects into plain objects\n *\n * @param {string | Object} oldValue stringified object to parse\n * @returns {Object}\n */\nconst parseObjects = (oldValue: string | Record<string, unknown>): Record<string, unknown> => {\n if (typeof oldValue === 'object' && !Array.isArray(oldValue)) {\n return oldValue;\n }\n let nuValue = {};\n try {\n nuValue = JSON.parse(oldValue as string);\n } catch (e) {\n /* noop */\n }\n return nuValue;\n};\n\n/**\n * some option values require special processing\n * (e.g. if the type of the updated option changed)\n * \"legendLabels\": \"test,test2\" => \"legendLabels\": [\"test\", \"test2\"]\n */\nconst otherValueReplacements = {\n y2Fields: splitValue,\n overlayFields: splitValue,\n legendLabels: splitValue,\n seriesColorsByField: parseObjects,\n lineDashStylesByField: parseObjects,\n /**\n * the original markerDisplay was only exposed as `chart.showMarkers`\n * setting chart.showMarkers to true is the equivalent of `markerDisplay: 'outlined'`\n */\n markerDisplay: (oldValue: boolean) => {\n if (oldValue === false) return 'off';\n if (oldValue === true) return 'outlined';\n return oldValue;\n },\n};\n\n/**\n * migrateChartingOptions\n * - renames option keys\n * - checks if enum values have changed for new options, replaces it\n * - checks if other replacements are necessary and applies them\n * @param {object} options dashboard-viz charting options\n * @returns {object} migratedOptions viz charting options\n */\nconst migrateChartingOptions = (options: Record<string, unknown>): Record<string, unknown> => {\n const migratedOptions = {};\n Object.keys(options).forEach(key => {\n const value = options[key];\n const updatedKey = optionRenames[key] ?? key;\n let updatedValue = enumReplacements?.[updatedKey]?.[value] ?? value;\n if (otherValueReplacements[updatedKey]) {\n updatedValue = otherValueReplacements[updatedKey](updatedValue);\n }\n migratedOptions[updatedKey] = updatedValue;\n });\n return migratedOptions;\n};\n\n/**\n * helper that encapsulates shared migration logic across most charting-based viz\n * @param {Object} defaultChanges - map consisting of default value changes from viz.* to splunk.*\n * @param {Object} validOptions - the list of options that the new splunk.* viz supports\n * @param {VisualizationDefinition} vizDefinition - the viz definition to migrate\n * @param {String} vizType - the value of splunk.*\n */\nconst migrateBaseChartingVizDefinition = ({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType,\n}: {\n defaultChanges: Record<string, unknown>;\n validOptions: Record<string, unknown>;\n vizDefinition: VisualizationDefinition;\n vizType: string;\n}) => {\n const { encoding = {}, options = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: vizType,\n options: {},\n context: {},\n };\n // translate encoding to dynamic options equivalent\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const migratedOptions = {\n ...defaultChanges,\n ...migrateChartingOptions(options),\n ...dataOptions,\n };\n // remove invalid options\n Object.keys(migratedOptions).forEach(key => {\n if (!validOptions[key]) {\n delete migratedOptions[key];\n }\n });\n migratedDefinition.options = migratedOptions;\n migratedDefinition.context = dataContext;\n\n return migratedDefinition;\n};\n\nexport { migrateBaseChartingVizDefinition, migrateChartingOptions, otherValueReplacements };\n","/**\n * Helper function to consolidate `trendDisplayMode` - percent/absolute\n * and `showTrendIndicator` - true/false into `trendDisplay` - off/percent/absolute for Single Value Variations\n * 1. if `showTrendIndicator` is explicitly false, `trendDisplay` is off\n * 2. if `showTrendIndicator` is undefined (defaults to true), return `trendDisplayMode` value if present\n * 3. if `showTrendIndicator` is explicitly true, return 'absolute'\n * 4. if both the old options are undefined, return nothing as their defaults (true and `absolute`)\n * correspond to `trendDisplay` default - absolute\n */\nexport const consolidateTrendDisplay = (\n trendDisplayMode: string,\n showTrendIndicator: boolean\n): string | void => {\n if (showTrendIndicator === false) {\n return 'off';\n }\n if (['absolute', 'percent'].includes(trendDisplayMode)) {\n return trendDisplayMode;\n }\n if (showTrendIndicator === true) {\n return 'absolute';\n }\n return null;\n};\n","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","/**\n * Helper to convert old label and value options into consolidated labelDisplay and valueDisplay\n * If the `showOption` is explicitly false, then we return 'off'\n * If the `showOption` is undefined (which corresponds to a default of `true`), we return nothing to avoid conflating the viz definition (since this corresponds to `number` in the new display)\n * @param {Boolean} showOption - either one of `showLabel` or `showValue` in the old gauges\n * @param {Boolean} percentageOption - either one of `usePercentageRange` or `usePercentageValue` in the old gauges\n * @returns {String}\n */\nexport const consolidateDisplayOption = (showOption: boolean, percentageOption: boolean): string | void => {\n if (showOption === false) {\n return 'off';\n }\n if (percentageOption === true) {\n return 'percentage';\n }\n if (showOption === true) {\n return 'number';\n }\n // if showOption is undefined and percentageOption is false, we don't need to return an explicit value (since 'number' is passed in implicitly)\n return null;\n};\n","module.exports = require(\"@splunk/visualizations/Markdown.config\");","module.exports = require(\"lodash\");","export * from './migrate';\n","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport {\n migrateVizToSplunkArea,\n migrateVizToSplunkBar,\n migrateVizToSplunkBubble,\n migrateVizToSplunkChoroplethSvg,\n migrateVizToSplunkColumn,\n migrateVizToSplunkFillerGauge,\n migrateVizToSplunkLine,\n migrateVizToSplunkImage,\n migrateVizToSplunkMarkdown,\n migrateVizToSplunkMarkerGauge,\n migrateVizToSplunkPie,\n migrateVizToSplunkRectangle,\n migrateVizToSplunkSingleValue,\n migrateVizToSplunkSingleValueIcon,\n migrateVizToSplunkSingleValueRadial,\n migrateVizToSplunkScatter,\n migrateVizToSplunkTable,\n migrateVizTextToSplunkMarkdown,\n migrateVizToSplunkEllipse,\n migrateVizToSplunkPunchcard,\n} from './visualizations';\n\nconst supportedMigrations = {\n 'viz.area': {\n 'splunk.area': migrateVizToSplunkArea,\n },\n 'viz.bar': {\n 'splunk.bar': migrateVizToSplunkBar,\n },\n 'viz.bubble': {\n 'splunk.bubble': migrateVizToSplunkBubble,\n },\n 'viz.column': {\n 'splunk.column': migrateVizToSplunkColumn,\n },\n 'viz.choropleth.svg': {\n 'splunk.choropleth.svg': migrateVizToSplunkChoroplethSvg,\n },\n 'viz.ellipse': {\n 'splunk.ellipse': migrateVizToSplunkEllipse,\n },\n 'viz.fillergauge': {\n 'splunk.fillergauge': migrateVizToSplunkFillerGauge,\n },\n 'viz.line': {\n 'splunk.line': migrateVizToSplunkLine,\n },\n 'viz.img': {\n 'splunk.image': migrateVizToSplunkImage,\n },\n 'viz.markdown': {\n 'splunk.markdown': migrateVizToSplunkMarkdown,\n },\n 'viz.markergauge': {\n 'splunk.markergauge': migrateVizToSplunkMarkerGauge,\n },\n 'viz.pie': {\n 'splunk.pie': migrateVizToSplunkPie,\n },\n 'viz.rectangle': {\n 'splunk.rectangle': migrateVizToSplunkRectangle,\n },\n 'viz.singlevalue': {\n 'splunk.singlevalue': migrateVizToSplunkSingleValue,\n },\n 'viz.singlevalueicon': {\n 'splunk.singlevalueicon': migrateVizToSplunkSingleValueIcon,\n },\n 'viz.singlevalueradial': {\n 'splunk.singlevalueradial': migrateVizToSplunkSingleValueRadial,\n },\n 'viz.scatter': {\n 'splunk.scatter': migrateVizToSplunkScatter,\n },\n 'viz.table': {\n 'splunk.table': migrateVizToSplunkTable,\n },\n 'viz.text': {\n 'splunk.markdown': migrateVizTextToSplunkMarkdown,\n },\n 'viz.punchcard': {\n 'splunk.punchcard': migrateVizToSplunkPunchcard,\n },\n};\n\nconst inferToType = (typeFromDefinition: string): string => {\n if (typeFromDefinition === 'viz.img') {\n return 'splunk.image';\n }\n if (typeFromDefinition === 'viz.text') {\n return 'splunk.markdown';\n }\n\n return typeFromDefinition.replace(/^viz\\./, 'splunk.');\n};\n\ninterface MigrationParams {\n definition: VisualizationDefinition;\n toType?: string;\n}\n\nconst migrate = ({ definition, toType: toTypeFromParams }: MigrationParams): VisualizationDefinition => {\n const toType = toTypeFromParams ?? inferToType(definition.type);\n if (!supportedMigrations?.[definition?.type]?.[toType]) {\n throw new Error('Migration currently not supported');\n }\n return supportedMigrations[definition.type][toType](definition);\n};\n\ninterface CanMigrateParams {\n fromType: string;\n toType: string;\n}\n\nconst canMigrate = ({ fromType, toType }: CanMigrateParams): boolean => {\n if (supportedMigrations?.[fromType]?.[toType]) {\n return true;\n }\n return false;\n};\n\nexport { migrate, canMigrate, inferToType };\n","export * from './area';\nexport * from './bar';\nexport * from './bubble';\nexport * from './choroplethSvg';\nexport * from './column';\nexport * from './ellipse';\nexport * from './fillergauge';\nexport * from './line';\nexport * from './image';\nexport * from './markdown';\nexport * from './markergauge';\nexport * from './pie';\nexport * from './scatter';\nexport * from './rectangle';\nexport * from './singlevalue';\nexport * from './singlevalueicon';\nexport * from './singlevalueradial';\nexport * from './table';\nexport * from './text';\nexport * from './punchcard';\n","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Area.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n y2AxisAbbreviation: 'off',\n showRoundedY2AxisLabels: false,\n legendTruncation: 'ellipsisMiddle',\n showY2MajorGridLines: true,\n};\n\nconst migrateVizToSplunkArea = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.area',\n });\n\nexport { migrateVizToSplunkArea };\n","module.exports = require(\"@splunk/visualizations/Area.config\");","import {\n parseNameBasedFieldReference,\n parseIndexBasedFieldReference,\n} from '@splunk/visualization-encoding-parsers/Base';\n// @TODO(pwied): move the parsing helpers so we can deprecate visualization-encoding-parsers package\n\n// index based references are defined by <dataSource>[<index>]\n// this regex matches <text with numbers>[<anything>]\n// the \"[\" \"]\" part makes it an index based reference\nconst indexBasedRegx = /^[A-Za-z0-9_]+\\[.*\\].*$/;\n// name based references are defined by <dataSource>.<columnName>\n// the \".\" access makes it a name based reference\nconst nameBasedRegx = /^[A-Za-z0-9_]+\\..*$/;\n\ninterface AdvancedEncodingConfig {\n field: string;\n format?: Record<string, unknown>;\n}\ntype EncodingConfig = string | string[] | AdvancedEncodingConfig;\n\nexport type { EncodingConfig };\n\ninterface DynamicOptionsChunk {\n options: Record<string, unknown>;\n context: Record<string, unknown>;\n}\nconst isIndexBasedReference = ref => indexBasedRegx.test(ref);\nconst isNameBasedReference = ref => nameBasedRegx.test(ref);\n\ntype formatterFromEncodingType = {\n contextConfig: Record<string, unknown> | unknown;\n contextKey: string;\n dsl: string;\n};\n\nconst convertFormatterToDSL = (\n fieldReference: AdvancedEncodingConfig,\n key: string,\n translatedValue: string\n): formatterFromEncodingType | void => {\n switch (fieldReference?.format?.type) {\n case 'gradient':\n return {\n contextConfig: {\n ...(Array.isArray(fieldReference.format?.ranges) && {\n stops: [...fieldReference.format.ranges],\n }),\n ...(Array.isArray(fieldReference.format?.values) && {\n colors: [...fieldReference.format.values],\n }),\n },\n contextKey: `${key}GradientContext`,\n dsl: `${translatedValue} | gradient(${key}GradientContext)`,\n };\n case 'rangevalue': {\n const contextKey = `${key}RangeValueContext`;\n return {\n contextConfig: fieldReference.format?.ranges || [],\n contextKey,\n dsl: `${translatedValue} | rangeValue(${contextKey})`,\n };\n }\n case 'matchvalue': {\n const defaultValue = fieldReference.format?.defaultValue;\n const matchValueContextKey = `${key}MatchValueContext`;\n return {\n contextConfig: fieldReference.format?.matches || [],\n contextKey: matchValueContextKey,\n dsl: `${translatedValue} | matchValue(${matchValueContextKey}${\n defaultValue !== null && defaultValue !== undefined\n ? `, ${typeof defaultValue === 'string' ? `\"${defaultValue}\"` : defaultValue}`\n : ''\n })`,\n };\n }\n default:\n break;\n }\n return null;\n};\n\n/**\n * Translates encoding data selections in array format\n *\n * Note:\n * 'frameBySeriesIndexes' only supports positive indexes\n *\n * Examples:\n * 1. all index based selection\n * ['primary[0]', 'primary[1]'] => '> primary | frameBySeriesIndexes(0,1)'\n *\n * 2. all name based selection\n * ['primary.foo', 'primary.bar'] => '> primary | frameBySeriesNames(\"foo\",\"bar\")'\n *\n * 3. index or name based selections\n * ['primary.foo', 'primary[1]'] => '> primary | frameBySeriesNamesOrIndexes(\"foo\",1)'\n */\nconst translateArrayFormatDataReference = (encodingDataReference: string[]): string => {\n if (encodingDataReference.length === 0) {\n return null;\n }\n const allIndexBased = encodingDataReference.every(isIndexBasedReference);\n const allNameBased = encodingDataReference.every(isNameBasedReference);\n\n if (allIndexBased) {\n const { dataSourceName } = parseIndexBasedFieldReference(encodingDataReference[0]);\n const indexesStr = encodingDataReference\n .map(ref => parseIndexBasedFieldReference(ref)?.fieldIndex)\n .join(',');\n return `> ${dataSourceName} | frameBySeriesIndexes(${indexesStr})`;\n }\n if (allNameBased) {\n const { dataSourceName } = parseNameBasedFieldReference(encodingDataReference[0]);\n const namesStr = encodingDataReference\n .map(ref => `\"${parseNameBasedFieldReference(ref)?.fieldName}\"`)\n .join(',');\n return `> ${dataSourceName} | frameBySeriesNames(${namesStr})`;\n }\n // it's a mix of name and index based references\n // get the first ref to extract the dataSource\n const firstEntry = encodingDataReference[0];\n const { dataSourceName } = isIndexBasedReference(firstEntry)\n ? parseIndexBasedFieldReference(firstEntry)\n : parseNameBasedFieldReference(firstEntry);\n const paramStr = encodingDataReference\n .map(ref => {\n return isIndexBasedReference(ref)\n ? parseIndexBasedFieldReference(ref)?.fieldIndex\n : `\"${parseNameBasedFieldReference(ref)?.fieldName}\"`;\n })\n .join(',');\n return `> ${dataSourceName} | frameBySeriesNamesOrIndexes(${paramStr})`;\n};\n\n/**\n * Translates an encoding data selection string to a dynamic options data selection\n *\n * Index based column selection\n * 'primary[0]' => '> primary | seriesByIndex(0)'\n *\n * Index range based column selection\n * 'primary[1:]' => '> primary | frameBySeriesIndexRange(1)'\n * 'primary[0:3]' => '> primary | frameBySeriesIndexRange(0,2)'\n *\n * Name based column selection\n * 'primary.foo' => '> primary | seriesByName(\"foo\")'\n *\n * Encoding references\n * 'encoding.x' => '> x'\n */\nconst translateDataReference = (encodingDataReference: string): string => {\n if (encodingDataReference.indexOf('encoding.') === 0) {\n return `> ${encodingDataReference.replace('encoding.', '')}`;\n }\n const isIndexBasedRef = isIndexBasedReference(encodingDataReference);\n const isNameBasedRef = isNameBasedReference(encodingDataReference);\n\n if (!isIndexBasedRef && !isNameBasedRef) {\n console.warn('Unable to parse the encoding. Please verify the encoding format is correct');\n return null;\n }\n\n if (isNameBasedRef) {\n const { dataSourceName, fieldName, columnIndex } = parseNameBasedFieldReference(\n encodingDataReference\n );\n let returnString = `> ${dataSourceName} | seriesByName(\"${fieldName}\")`;\n if (columnIndex) {\n returnString += ` | pointByIndex(${columnIndex})`;\n }\n return returnString;\n }\n if (isIndexBasedRef) {\n const {\n dataSourceName,\n fieldIndex,\n columnIndex,\n isFieldIndexRange,\n fromFieldIndex,\n toFieldIndex,\n } = parseIndexBasedFieldReference(encodingDataReference);\n if (isFieldIndexRange) {\n let dslToIndexString;\n if (toFieldIndex === -1) {\n dslToIndexString = '';\n } else {\n // adjust index, DSL is using default slice behavior whereas encoding behaved differently\n dslToIndexString = `,${toFieldIndex + 1}`;\n }\n return `> ${dataSourceName} | frameBySeriesIndexRange(${fromFieldIndex}${dslToIndexString})`;\n }\n let returnString = `> ${dataSourceName} | seriesByIndex(${fieldIndex})`;\n if (columnIndex) {\n returnString += ` | pointByIndex(${columnIndex})`;\n }\n return returnString;\n }\n return null;\n};\n/**\n * An encoding configuration can come in various different forms:\n *\n * 1. Simple data selection (either index or name based)\n * {\n * x: 'primary[0]',\n * y: 'primary.count'\n * }\n *\n * 2. Multi column selection in array format\n * {\n * x: 'primary[0]',\n * \t y: ['primary.count', 'primary.count2']\n * }\n *\n * 3. Advanced Encoding Configuration (for data selection and formatting)\n * {\n * x: {\n * \t field: 'primary[0]',\n * \t },\n * y: {\n * \t field: 'primary[1]',\n * format: {},\n * }\n * }\n */\nconst encodingToDynamicOptionsDSL = (encoding: Record<string, EncodingConfig>): DynamicOptionsChunk => {\n const dynamicOptions: DynamicOptionsChunk = {\n options: {},\n context: {},\n };\n const translatedOptions = {};\n const encodingObj = encoding ?? {};\n Object.keys(encodingObj).forEach(key => {\n const fieldReference = encoding[key];\n let fieldReferenceStr = fieldReference as string;\n if (typeof fieldReference === 'object' && !Array.isArray(fieldReference)) {\n const { field } = fieldReference;\n if (field && !Array.isArray(field)) {\n fieldReferenceStr = field;\n }\n }\n let translatedValue;\n // field reference is either in form of array or string\n if (Array.isArray(fieldReference)) {\n translatedValue = translateArrayFormatDataReference(fieldReference);\n } else {\n translatedValue = translateDataReference(fieldReferenceStr);\n }\n\n // omit if translated value is not set\n if (translatedValue) {\n translatedOptions[key] = translatedValue;\n const convertedFormatterObject = convertFormatterToDSL(\n fieldReference as AdvancedEncodingConfig,\n key,\n translatedValue\n );\n\n if (convertedFormatterObject) {\n translatedOptions[key] = convertedFormatterObject.dsl;\n dynamicOptions.context[convertedFormatterObject.contextKey] =\n convertedFormatterObject.contextConfig;\n }\n }\n });\n dynamicOptions.options = translatedOptions;\n return dynamicOptions;\n};\n\nexport { encodingToDynamicOptionsDSL };\n","module.exports = require(\"@splunk/visualization-encoding-parsers/Base\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Bar.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n y2AxisAbbreviation: 'off',\n showRoundedY2AxisLabels: false,\n legendTruncation: 'ellipsisMiddle',\n showY2MajorGridLines: true,\n};\n\nconst migrateVizToSplunkBar = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.bar',\n });\n\nexport { migrateVizToSplunkBar };\n","module.exports = require(\"@splunk/visualizations/Bar.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Bubble.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n legendTruncation: 'ellipsisMiddle',\n};\n\nconst migrateVizToSplunkBubble = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.bubble',\n });\n\nexport { migrateVizToSplunkBubble };\n","module.exports = require(\"@splunk/visualizations/Bubble.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/ChoroplethSvg.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport { removeInvalidOptions } from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst optionRenames = {\n featureId: 'areaIds',\n value: 'areaValues',\n fill: 'areaColors',\n};\n\n// old default encoding configurations should be retained in migrated configuration\nconst defaultOptionChanges = {\n areaIds: '> primary | seriesByIndex(0)',\n areaValues: '> primary | seriesByIndex(1)',\n areaColors: '> primary | seriesByIndex(1) | gradient(fillGradientContext)',\n};\n\nconst defaultContextChanges = {\n fillGradientContext: {\n colors: ['#7EEFDA', '#6484F6', '#C093F9', '#293873'],\n },\n};\n\nexport const migrateVizToSplunkChoroplethSvg = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { encoding = {}, options = {}, ...otherDefinitionParts } = vizDefinition;\n // translate encoding to dynamic options equivalent\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: 'splunk.choropleth.svg',\n options: {},\n context: {},\n };\n\n // add migrated option names and values\n const migratedOptions = { ...options };\n Object.keys(dataOptions).forEach(key => {\n const updatedKey = optionRenames[key] ?? key;\n migratedOptions[updatedKey] = dataOptions[key];\n });\n\n // update migrated options and context\n migratedDefinition.options = {\n ...defaultOptionChanges,\n ...migratedOptions,\n };\n\n migratedDefinition.context = encoding.fill ? dataContext : defaultContextChanges;\n\n // remove invalid options\n removeInvalidOptions(migratedDefinition.options, validOptions);\n\n return migratedDefinition;\n};\n","module.exports = require(\"@splunk/visualizations/ChoroplethSvg.config\");","module.exports = require(\"@splunk/visualization-encoding/utils/dsl\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Column.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n y2AxisAbbreviation: 'off',\n showRoundedY2AxisLabels: false,\n legendTruncation: 'ellipsisMiddle',\n showY2MajorGridLines: true,\n};\n\nconst migrateVizToSplunkColumn = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.column',\n });\n\nexport { migrateVizToSplunkColumn };\n","module.exports = require(\"@splunk/visualizations/Column.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Ellipse.config';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport type { EncodingConfig } from '../encoding';\nimport { renameVizOptions, removeInvalidOptions, addsDataSelectorToOptions } from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst optionsToRename = {\n fill: 'fillColor',\n stroke: 'strokeColor',\n strokeDasharray: 'strokeDashStyle',\n};\n\nexport const migrateVizToSplunkEllipse = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { encoding = {}, options = {}, ...otherDefinitionParts } = vizDefinition;\n\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: 'splunk.ellipse',\n options,\n context: {},\n };\n\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n // To simulate the implicit logic in the shape parser that Ellipse utilizes, append\n // the lastPoint() DataSeries selector.\n const updatedDataOptions = addsDataSelectorToOptions(dataOptions, 'lastPoint()');\n\n migratedDefinition.options = { ...options, ...updatedDataOptions };\n\n // perform any option renaming\n migratedDefinition.options = renameVizOptions(migratedDefinition.options, optionsToRename);\n\n // remove invalid options from new definition\n removeInvalidOptions(migratedDefinition.options, validOptions);\n\n migratedDefinition.context = dataContext;\n\n return migratedDefinition;\n};\n","module.exports = require(\"@splunk/visualizations/Ellipse.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/FillerGauge.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport { consolidateDisplayOption } from '../utils/gauges';\nimport {\n preserveDataSelectionForValueOption,\n removeInvalidOptions,\n renameVizOptions,\n} from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst optionRenames = {\n majorUnit: 'majorTickInterval',\n};\n\nconst previousRangeValueConfig = [\n { to: 10, value: '#5fbcff' },\n { from: 10, to: 30, value: '#4beba8' },\n { from: 30, to: 50, value: '#f4df7a' },\n { from: 50, to: 70, value: '#fc9850' },\n { from: 70, to: 100, value: '#ff7152' },\n];\n\nconst defaultChanges = {\n gaugeColor: '> value | rangeValue(gaugeColorRangeValueContext)',\n value: '> primary | seriesByIndex(0) | lastPoint()',\n};\n\nexport const migrateVizToSplunkFillerGauge = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = {\n options,\n ...otherDefinitionParts,\n type: 'splunk.fillergauge',\n context: {},\n };\n\n const renamedOptions = renameVizOptions(options, optionRenames);\n\n const { options: encodingOptions, context: gaugeColorContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n // if a viz.fillergauge receives an entire column for `value` (e.g. primary[0]), it will select the last value of the column\n // this contrasts with viz.markergauge (which takes the first point of the column)\n // this is due to differing behavior in the FillerGaugeParser, which explicitly retrieves the last point in a received array\n // https://cd.splunkdev.com/devplat/vision/-/blob/main/packages/visualization-encoding-parsers/src/FillerGaugeParser.js#L79\n const originalGaugeValue = encodingOptions.value;\n if (typeof originalGaugeValue === 'string') {\n encodingOptions.value =\n preserveDataSelectionForValueOption(originalGaugeValue, 'lastPoint()') ?? originalGaugeValue;\n }\n if (encodingOptions?.gaugeColor) {\n migratedVisualization.context = gaugeColorContext;\n } else {\n // preserve the default context if no gaugeColor encoding was configured\n migratedVisualization.context = {\n gaugeColorRangeValueContext: previousRangeValueConfig,\n };\n }\n\n const { showLabels, usePercentageRange, showValue, usePercentageValue } = options;\n const labelDisplay = consolidateDisplayOption(showLabels as boolean, usePercentageRange as boolean);\n const valueDisplay = consolidateDisplayOption(showValue as boolean, usePercentageValue as boolean);\n\n migratedVisualization.options = {\n ...defaultChanges,\n ...renamedOptions,\n ...encodingOptions,\n ...(typeof labelDisplay === 'string' && { labelDisplay }),\n ...(typeof valueDisplay === 'string' && { valueDisplay }),\n };\n\n // remove invalid options using the optionsSchema for splunk.fillergauge as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/FillerGauge.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Line.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\n// except for markerDisplay which migrates to the new default 'off'\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n y2AxisAbbreviation: 'off',\n showRoundedY2AxisLabels: false,\n legendTruncation: 'ellipsisMiddle',\n showY2MajorGridLines: true,\n};\n\nconst migrateVizToSplunkLine = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.line',\n });\n\nexport { migrateVizToSplunkLine };\n","module.exports = require(\"@splunk/visualizations/Line.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Image.config';\nimport { removeInvalidOptions } from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nexport const migrateVizToSplunkImage = (vizDefinition: VisualizationDefinition): VisualizationDefinition => {\n const { options = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = { options, ...otherDefinitionParts, type: 'splunk.image', context: {} };\n\n // remove invalid options using the optionsSchema for splunk.image as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/Image.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Markdown.config';\nimport { removeInvalidOptions } from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nexport const migrateVizToSplunkMarkdown = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = { options, ...otherDefinitionParts, type: 'splunk.markdown', context: {} };\n\n // remove invalid options using the optionsSchema for splunk.markdown as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n return migratedVisualization;\n};\n","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/MarkerGauge.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport {\n preserveDataSelectionForValueOption,\n removeInvalidOptions,\n renameVizOptions,\n} from '../utils/migrationUtils';\nimport { consolidateDisplayOption } from '../utils/gauges';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n gaugeRanges: [\n { from: 90, to: 100, value: '#CB3B43' },\n { from: 50, to: 90, value: '#F4DF7A' },\n { from: 0, to: 50, value: '#4BEBA8' },\n ],\n value: '> primary | seriesByIndex(0) | lastPoint()',\n};\n\nconst optionRenames = {\n majorUnit: 'majorTickInterval',\n ranges: 'gaugeRanges',\n};\n\nexport const migrateVizToSplunkMarkerGauge = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = {\n options,\n ...otherDefinitionParts,\n type: 'splunk.markergauge',\n context: {},\n };\n\n const renamedOptions = renameVizOptions(options, optionRenames);\n\n const { options: dataOptions } = encodingToDynamicOptionsDSL(encoding as Record<string, EncodingConfig>);\n // viz.markergauge has behavior where if a column without a specific point (e.g. primary[1]) is selected,\n // the markerGauge will only display the first point of the column\n // the following logic accounts for this and appends firstPoint() to the DSL statement\n const originalGaugeValue = dataOptions.value;\n if (typeof originalGaugeValue === 'string') {\n dataOptions.value =\n preserveDataSelectionForValueOption(originalGaugeValue, 'firstPoint()') ?? originalGaugeValue;\n }\n\n const { showLabels, usePercentageRange, showValue, usePercentageValue } = renamedOptions;\n const labelDisplay = consolidateDisplayOption(showLabels as boolean, usePercentageRange as boolean);\n const valueDisplay = consolidateDisplayOption(showValue as boolean, usePercentageValue as boolean);\n\n migratedVisualization.options = {\n ...defaultChanges,\n ...renamedOptions,\n ...dataOptions,\n ...(typeof labelDisplay === 'string' && { labelDisplay }),\n ...(typeof valueDisplay === 'string' && { valueDisplay }),\n };\n\n // remove invalid options using the optionsSchema for splunk.markergauge as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/MarkerGauge.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Pie.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport { migrateChartingOptions, otherValueReplacements } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst migratePieChartLabelAndPercent = (options: Record<string, unknown>): Record<string, string> => {\n // if neither chart.showLabels or chart.showPercent is specified in viz.pie,\n // splunk.pie use the default labelDisplay value\n if (!('chart.showLabels' in options) && !('chart.showPercent' in options)) {\n return {};\n }\n\n // if only chart.showPercent is specified in viz.pie\n if (!('chart.showLabels' in options) && 'chart.showPercent' in options) {\n return { labelDisplay: options['chart.showPercent'] ? 'valuesAndPercentage' : 'values' };\n }\n\n // if only chart.showLabels is specified in viz.pie\n if ('chart.showLabels' in options && !('chart.showPercent' in options)) {\n return { labelDisplay: options['chart.showLabels'] ? 'values' : 'off' };\n }\n\n // if both chart.showLabels and chart.showPercent are specified in viz.pie\n const labelOption = {\n labelDisplay: 'values',\n };\n if (options['chart.showLabels'] && options['chart.showPercent']) {\n labelOption.labelDisplay = 'valuesAndPercentage';\n }\n if (!options['chart.showLabels']) {\n labelOption.labelDisplay = 'off';\n }\n\n return labelOption;\n};\n\n// retain the pie position when converting viz.pie to splunk.pie - SCP-48658\nconst migrateDonutChart = (options: Record<string, unknown>): Record<string, string> => {\n if (options.hasDonutHole) {\n if (options['legend.placement'] === 'none') {\n return { labelDisplay: 'off' };\n }\n return { labelDisplay: 'values' };\n }\n return {};\n};\n\nconst migrateFieldColors = (options: Record<string, any>): Record<string, any> => {\n if ('fieldColors' in options) {\n return {\n seriesColorsByField: otherValueReplacements.seriesColorsByField(options.fieldColors),\n };\n }\n return {};\n};\n\nconst migrateVizToSplunkPie = (vizDefinition: VisualizationDefinition): VisualizationDefinition => {\n const { encoding = {}, options = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: 'splunk.pie',\n options: {},\n context: {},\n };\n // translate encoding to dynamic options equivalent\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const migratedOptions = {\n ...migratePieChartLabelAndPercent(options),\n ...migrateChartingOptions(options),\n ...migrateFieldColors(options),\n ...migrateDonutChart(options),\n ...dataOptions,\n };\n // remove invalid options\n Object.keys(migratedOptions).forEach(key => {\n if (!validOptions[key]) {\n delete migratedOptions[key];\n }\n });\n migratedDefinition.options = migratedOptions;\n migratedDefinition.context = dataContext;\n\n return migratedDefinition;\n};\n\nexport { migrateVizToSplunkPie };\n","module.exports = require(\"@splunk/visualizations/Pie.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Scatter.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n legendTruncation: 'ellipsisMiddle',\n};\n\nconst migrateVizToSplunkScatter = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.scatter',\n });\n\nexport { migrateVizToSplunkScatter };\n","module.exports = require(\"@splunk/visualizations/Scatter.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Rectangle.config';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport type { EncodingConfig } from '../encoding';\nimport { renameVizOptions, removeInvalidOptions, addsDataSelectorToOptions } from '../utils/migrationUtils';\n\nconst optionsToRename = {\n fill: 'fillColor',\n stroke: 'strokeColor',\n strokeDasharray: 'strokeDashStyle',\n strokeLinejoin: 'strokeJoinStyle',\n};\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst migrateVizToSplunkRectangle = (vizDefinition: VisualizationDefinition): VisualizationDefinition => {\n const { encoding = {}, options, ...otherDefinitionParts } = vizDefinition;\n\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: 'splunk.rectangle',\n options: {},\n context: {},\n };\n\n // translate encoding to dynamic options equivalent\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n // To simulate the implicit logic in the shape parser that Rectangle utilizes, append\n // the lastPoint() DataSeries selector.\n const updatedDataOptions = addsDataSelectorToOptions(dataOptions, 'lastPoint()');\n\n migratedDefinition.options = { ...options, ...updatedDataOptions };\n\n // perform option rename\n migratedDefinition.options = renameVizOptions(migratedDefinition.options, optionsToRename);\n\n // remove invalid options, validOptions is taken from the config.optionsSchema\n removeInvalidOptions(migratedDefinition.options, validOptions);\n migratedDefinition.context = dataContext;\n return migratedDefinition;\n};\n\nexport { migrateVizToSplunkRectangle };\n","module.exports = require(\"@splunk/visualizations/Rectangle.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/SingleValue.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport {\n removeInvalidOptions,\n renameVizOptions,\n preserveDataSelectionForValueOption,\n} from '../utils/migrationUtils';\nimport { consolidateTrendDisplay } from '../utils/singlevalue';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultsToRetain = {\n showSparklineAreaGraph: false,\n sparklineValues: '> primary | seriesByTypes(\"number\", \"string\")',\n};\n\nconst optionRenames = {\n useTrendUnits: 'shouldAbbreviateTrendValue',\n useThousandSeparators: 'shouldUseThousandSeparators',\n sparklineAreaGraph: 'showSparklineAreaGraph',\n sparklineFillColor: 'sparklineAreaColor',\n sparklineAcceptNullData: 'shouldSparklineAcceptNullData',\n deltaFontSize: 'trendFontSize',\n};\n\n/**\n * Helper function to consolidate `sparklinePosition` - before/after/below\n * and `showSparkline` - true/false into `sparklineDisplay` - off/before/after/below\n * 1. if `showSparkline` is explicitly false, `sparklineDisplay` is off\n * 2. if `showSparkline` is undefined (defaults to true), return `sparklinePosition` value if present\n * 3. if `showSparkline` is explicitly true, return 'below'\n * 4. if both the old options are undefined, return nothing as their defaults (true and `below`)\n * correspond to `sparklineDisplay` default - below\n */\nconst consolidateSparklineDisplay = (sparklinePosition: string, showSparkline: boolean): string | void => {\n if (showSparkline === false) {\n return 'off';\n }\n if (['before', 'after', 'below'].includes(sparklinePosition)) {\n return sparklinePosition;\n }\n if (showSparkline === true) {\n return 'below';\n }\n return null;\n};\n\nexport const migrateVizToSplunkSingleValue = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = {\n ...otherDefinitionParts,\n type: 'splunk.singlevalue',\n context: {},\n options: {},\n };\n\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const migratedDataOptions = {\n /**\n * in splunk.singlevalue, since we have the defaults\n * trendValue: '> sparklineValues|delta(-2)'\n * majorValue: '> sparklineValues|lastPoint()'\n * computing sparklineValues DSL from trend encoding should be sufficient\n */\n ...(dataOptions?.trend && { sparklineValues: dataOptions.trend }),\n ...(dataOptions?.majorColor && {\n majorColor:\n preserveDataSelectionForValueOption(dataOptions.majorColor as string, 'lastPoint()') ??\n dataOptions.majorColor,\n }),\n ...(dataOptions?.deltaColor && {\n trendColor:\n preserveDataSelectionForValueOption(dataOptions.deltaColor as string, 'lastPoint()') ??\n dataOptions.deltaColor,\n }),\n ...(dataOptions?.fill && {\n backgroundColor:\n preserveDataSelectionForValueOption(dataOptions.fill as string, 'lastPoint()') ??\n dataOptions.fill,\n }),\n };\n\n const renamedOptions = renameVizOptions(options, optionRenames);\n\n const { trendDisplayMode, showTrendIndicator, showSparkline, sparklinePosition } = renamedOptions;\n\n const trendDisplay = consolidateTrendDisplay(trendDisplayMode as string, showTrendIndicator as boolean);\n const sparklineDisplay = consolidateSparklineDisplay(\n sparklinePosition as string,\n showSparkline as boolean\n );\n\n migratedVisualization.options = {\n ...defaultsToRetain,\n ...renamedOptions,\n ...migratedDataOptions, // fill encoding takes precedence over explicit static backgroundColor\n ...(typeof trendDisplay === 'string' && { trendDisplay }),\n ...(typeof sparklineDisplay === 'string' && { sparklineDisplay }),\n };\n\n migratedVisualization.context = dataContext;\n\n // remove invalid (and deprecated) options using the optionsSchema for splunk.singlevalue as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/SingleValue.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/SingleValueIcon.config';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport type { EncodingConfig } from '../encoding';\nimport {\n removeInvalidOptions,\n renameVizOptions,\n preserveDataSelectionForValueOption,\n} from '../utils/migrationUtils';\nimport { consolidateTrendDisplay } from '../utils/singlevalue';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst defaultsToRetain = {\n majorValue: '> primary | seriesByIndex(0) | lastPoint()',\n trendValue: '> primary | seriesByIndex(0) | delta(-2)',\n};\n\nconst optionsToRename = {\n useTrendUnits: 'shouldAbbreviateTrendValue',\n useThousandSeparators: 'shouldUseThousandSeparators',\n deltaColor: 'trendColor',\n color: 'iconColor',\n};\n\nexport const migrateVizToSplunkSingleValueIcon = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = {\n ...otherDefinitionParts,\n type: 'splunk.singlevalueicon',\n context: {},\n options: {},\n };\n\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const migratedDataOptions = {\n ...(dataOptions?.trend && {\n majorValue:\n preserveDataSelectionForValueOption(dataOptions.trend as string, 'lastPoint()') ??\n dataOptions.trend,\n trendValue:\n preserveDataSelectionForValueOption(dataOptions.trend as string, 'delta(-2)') ??\n dataOptions.trend,\n }),\n ...(dataOptions?.fill && {\n backgroundColor:\n preserveDataSelectionForValueOption(dataOptions.fill as string, 'lastPoint()') ??\n dataOptions.fill,\n }),\n };\n\n const renamedOptions = renameVizOptions(options, optionsToRename);\n\n const { trendDisplayMode, showTrendIndicator } = renamedOptions;\n\n const trendDisplay = consolidateTrendDisplay(trendDisplayMode as string, showTrendIndicator as boolean);\n\n migratedVisualization.options = {\n ...defaultsToRetain,\n ...renamedOptions,\n ...migratedDataOptions, // fill encoding takes precedence over explicit static backgroundColor\n ...(typeof trendDisplay === 'string' && { trendDisplay }),\n };\n\n migratedVisualization.context = dataContext;\n\n // remove invalid (and deprecated) options using the optionsSchema for splunk.singlevalueicon as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/SingleValueIcon.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/SingleValueRadial.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport {\n removeInvalidOptions,\n renameVizOptions,\n preserveDataSelectionForValueOption,\n} from '../utils/migrationUtils';\nimport { consolidateTrendDisplay } from '../utils/singlevalue';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultsToRetain = {\n majorValue: '> primary | seriesByIndex(0) | lastPoint()',\n trendValue: '> primary | seriesByIndex(0) | delta(-2)',\n};\n\nconst optionRenames = {\n useTrendUnits: 'shouldAbbreviateTrendValue',\n useThousandSeparators: 'shouldUseThousandSeparators',\n};\n\nexport const migrateVizToSplunkSingleValueRadial = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = {\n ...otherDefinitionParts,\n type: 'splunk.singlevalueradial',\n context: {},\n options: {},\n };\n\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n const { trend: originalTrend, fill: originalFill } = dataOptions;\n\n const migratedDataOptions = {\n ...(originalTrend && {\n majorValue: preserveDataSelectionForValueOption(originalTrend, 'lastPoint()') ?? originalTrend,\n trendValue: preserveDataSelectionForValueOption(originalTrend, 'delta(-2)') ?? originalTrend,\n }),\n ...(originalFill && {\n backgroundColor: preserveDataSelectionForValueOption(originalFill, 'lastPoint()') ?? originalFill,\n }),\n };\n\n const renamedOptions = renameVizOptions(options, optionRenames);\n\n const { trendDisplayMode, showTrendIndicator } = renamedOptions;\n\n const trendDisplay = consolidateTrendDisplay(trendDisplayMode as string, showTrendIndicator as boolean);\n\n migratedVisualization.options = {\n ...defaultsToRetain,\n ...renamedOptions,\n ...migratedDataOptions, // fill encoding takes precedence over explicit static backgroundColor\n ...(typeof trendDisplay === 'string' && { trendDisplay }),\n };\n\n migratedVisualization.context = dataContext;\n\n // remove invalid (and deprecated) options using the optionsSchema for splunk.singlevalueradial as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/SingleValueRadial.config\");","import { isEmpty, set } from 'lodash';\nimport type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Table.config';\nimport { deepMergeWithArrayPrimitiveOverrides } from '@splunk/visualizations-shared/hocUtils';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport { renameVizOptions } from '../utils/migrationUtils';\n\ninterface CellFormatting {\n numberPrecision?: number;\n unit?: string;\n unitPosition?: string;\n useThousandSeparators?: boolean;\n}\n\ninterface VizTableFormattingOpts {\n headerTextColor?: string;\n headerBackgroundColor?: string;\n numberPrecision?: number;\n rowBackgroundColorEven?: string;\n rowBackgroundColorOdd?: string;\n rowTextColorOdd?: string;\n rowTextColorEven?: string;\n unit?: string;\n unitPosition?: string;\n useThousandSeparators?: boolean;\n}\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n count: 20,\n};\n\nconst optionRenames = {\n rowNumbers: 'showRowNumbers',\n};\n\nconst migrateHeaderVisibility = (oldHeaderVisibility: boolean): string => {\n if (oldHeaderVisibility === undefined) {\n // headerVisibility: 'inline' is the default in splunk.table\n // this corresponds to `showHeader: true`, which is the default in viz.table\n return undefined;\n }\n return oldHeaderVisibility ? 'inline' : 'none';\n};\n\ninterface Colors {\n oddColor?: string;\n evenColor?: string;\n}\n\n/**\n * Helper to migrate alternating color options (text and background) to their corresponding DSL and context configs\n */\nconst migrateAlternatingColors = (\n colors: Colors,\n optionToConvert: string,\n contextConfigName: string\n): {\n contextConfigName?: string;\n context?: string[];\n dsl?: string;\n} => {\n // default alternating themed color values as defined in table config\n const themedAlternatingColors = {\n rowBackgroundColors: {\n even: '> themes.rowBackgroundColorEven',\n odd: '> themes.rowBackgroundColorOdd',\n },\n rowColors: {\n even: '> themes.inverseTextColor',\n odd: '> themes.textColor',\n },\n };\n const colorsContext: string[] = [];\n const { oddColor, evenColor } = colors;\n if (oddColor && evenColor) {\n colorsContext.push(...[oddColor, evenColor]);\n } else if (oddColor) {\n colorsContext.push(...[oddColor, themedAlternatingColors[optionToConvert].even]);\n } else if (evenColor) {\n colorsContext.push(...[themedAlternatingColors[optionToConvert].odd, evenColor]);\n }\n\n if (colorsContext.length) {\n return {\n contextConfigName,\n context: colorsContext,\n dsl: `> table | pick(${contextConfigName})`,\n };\n }\n\n return {};\n};\n\n/**\n * Intermediate helper to translate column-specific formatting in viz.table to their DSL equivalents\n * viz.table defines column-specific formatting via entries specified in options.fields.<columnName>\n *\n * This requires moving numberPrecision, useThousandSeparators, unitPosition, and other formatting options to the config\n * The resultant config is used as the argument for formatByType\n */\nconst migrateToColumnFormat = (\n fieldsOption: Record<string, CellFormatting>\n): {\n columnFormat: Record<string, unknown>;\n columnFormatContext: Record<string, unknown>;\n} => {\n const columnFormat: Record<string, unknown> = {};\n const columnFormatContext: Record<string, unknown> = {};\n\n if (!fieldsOption) {\n return {\n columnFormat,\n columnFormatContext,\n };\n }\n\n Object.entries(fieldsOption).forEach(([column, formatting]) => {\n // need to prepend `formatted` in case the column has leading digits, which the nearley parser cannot account for\n const contextEntry = `formatted${column}Config`;\n columnFormatContext[contextEntry] = {};\n columnFormat[column] = {\n data: `> table | seriesByName(\"${column}\") | formatByType(${contextEntry})`,\n };\n\n // all columnFormatting options are optional; if they are not present in the original config, tableFormat should take precedence\n const { unit, unitPosition, numberPrecision, useThousandSeparators } = formatting;\n if (typeof unitPosition === 'string') {\n set(columnFormatContext, [contextEntry, 'number', 'unitPosition'], unitPosition);\n set(columnFormatContext, [contextEntry, 'string', 'unitPosition'], unitPosition);\n }\n if (typeof unit === 'string' || typeof unit === 'number') {\n set(columnFormatContext, [contextEntry, 'number', 'unit'], unit);\n set(columnFormatContext, [contextEntry, 'string', 'unit'], unit);\n }\n if (numberPrecision != null) {\n set(columnFormatContext, [contextEntry, 'number', 'precision'], numberPrecision);\n }\n if (useThousandSeparators != null) {\n set(columnFormatContext, [contextEntry, 'number', 'thousandSeparated'], useThousandSeparators);\n }\n });\n\n return {\n columnFormat,\n columnFormatContext,\n };\n};\n\n/**\n * Intermediate helper to translate table-wide formatting and coloring in viz.table to their DSL equivalents\n *\n * This requires moving numberPrecision, useThousandSeparators, unitPosition, and other formatting/coloring options to the config\n * The resultant formatting and coloring config is used as the argument for the formatByType() and pick() DSL formatters respectively\n */\nconst migrateToTableFormat = (\n oldOptions: VizTableFormattingOpts = {}\n): {\n tableFormat: Record<string, unknown>;\n tableFormatContext: Record<string, unknown>;\n} => {\n const tableFormat: Record<string, unknown> = {};\n const tableFormatContext: Record<string, unknown> = {\n formattedConfig: {},\n };\n\n const {\n unit,\n unitPosition: oldUnitPosition,\n numberPrecision: oldNumberPrecision,\n useThousandSeparators: oldUseThousandSeparators,\n } = oldOptions;\n const unitPosition = typeof oldUnitPosition === 'string' ? oldUnitPosition : 'after';\n const numberPrecision = typeof oldNumberPrecision === 'number' ? oldNumberPrecision : 0;\n const useThousandSeparators =\n typeof oldUseThousandSeparators === 'boolean' ? oldUseThousandSeparators : false;\n\n set(tableFormatContext, ['formattedConfig', 'number', 'precision'], numberPrecision);\n set(tableFormatContext, ['formattedConfig', 'number', 'thousandSeparated'], useThousandSeparators);\n set(tableFormatContext, ['formattedConfig', 'number', 'unitPosition'], unitPosition);\n set(tableFormatContext, ['formattedConfig', 'string', 'unitPosition'], unitPosition);\n if (typeof unit === 'string' || typeof unit === 'number') {\n set(tableFormatContext, ['formattedConfig', 'number', 'unit'], unit);\n set(tableFormatContext, ['formattedConfig', 'string', 'unit'], unit);\n }\n\n tableFormat.data = `> table | formatByType(formattedConfig)`;\n\n const {\n rowBackgroundColorEven,\n rowBackgroundColorOdd,\n rowTextColorOdd,\n rowTextColorEven,\n headerTextColor,\n headerBackgroundColor,\n } = oldOptions;\n\n const { context: rowColorsContext, dsl: rowColorsDSL } = migrateAlternatingColors(\n { oddColor: rowTextColorOdd, evenColor: rowTextColorEven },\n 'rowColors',\n 'rowColorsConfig'\n );\n if (rowColorsContext && rowColorsDSL) {\n tableFormatContext.rowColorsConfig = rowColorsContext;\n tableFormat.rowColors = rowColorsDSL;\n }\n\n const { context: rowBackgroundColorsContext, dsl: rowBackgroundColorsDSL } = migrateAlternatingColors(\n { oddColor: rowBackgroundColorOdd, evenColor: rowBackgroundColorEven },\n 'rowBackgroundColors',\n 'rowBackgroundColorsConfig'\n );\n if (rowBackgroundColorsContext && rowBackgroundColorsDSL) {\n tableFormat.rowBackgroundColors = rowBackgroundColorsDSL;\n tableFormatContext.rowBackgroundColorsConfig = rowBackgroundColorsContext;\n }\n if (headerTextColor) {\n tableFormat.headerColor = headerTextColor;\n }\n if (headerBackgroundColor) {\n tableFormat.headerBackgroundColor = headerBackgroundColor;\n }\n\n return {\n tableFormat,\n tableFormatContext,\n };\n};\n\nconst migrateVizToSplunkTable = (vizDefinition: VisualizationDefinition): VisualizationDefinition => {\n const { encoding = {}, options = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: 'splunk.table',\n options: {},\n context: {},\n };\n\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const renamedOptions = renameVizOptions(options, optionRenames);\n const headerVisibility = migrateHeaderVisibility(renamedOptions.showHeader as boolean);\n const { tableFormat, tableFormatContext } = migrateToTableFormat(renamedOptions);\n const { columnFormat, columnFormatContext } = migrateToColumnFormat(\n renamedOptions.fields as Record<string, CellFormatting>\n );\n const migratedDataOptions = {\n ...(dataOptions?.columns && { table: dataOptions.columns }),\n };\n const formattingOptions = {\n ...(!isEmpty(columnFormat) && { columnFormat }),\n ...(typeof headerVisibility === 'string' && { headerVisibility }),\n tableFormat,\n };\n const migratedOptions = deepMergeWithArrayPrimitiveOverrides(\n {},\n defaultChanges,\n formattingOptions,\n migratedDataOptions,\n renamedOptions\n );\n\n // remove invalid options\n Object.keys(migratedOptions).forEach(key => {\n if (!validOptions[key]) {\n delete migratedOptions[key];\n }\n });\n\n migratedDefinition.context = {\n ...dataContext,\n // columnFormat is optional, but tableFormat is required all cases to preserve some viz.table behavior\n ...(!isEmpty(columnFormatContext) && { ...columnFormatContext }),\n ...tableFormatContext,\n };\n migratedDefinition.options = migratedOptions;\n return migratedDefinition;\n};\n\nexport { migrateVizToSplunkTable };\n","module.exports = require(\"@splunk/visualizations/Table.config\");","module.exports = require(\"@splunk/visualizations-shared/hocUtils\");","import * as _ from 'lodash';\nimport type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Markdown.config';\nimport { renameVizOptions, removeInvalidOptions } from '../utils/migrationUtils';\n\ntype FontWeight = 'normal' | 'bold' | 'light';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst optionsToRename = {\n textColor: 'fontColor',\n content: 'markdown',\n};\n\nconst convertTextContentToMarkDown = (fontWeight: FontWeight, fontSize: number, textContent = ''): string => {\n if (!_.isNumber(fontSize)) {\n return textContent;\n }\n if (textContent.trim().length === 0) {\n return textContent;\n }\n // Remove any trailing newline chars from the content\n let markdownContent = textContent.replace(/\\n*$/, '');\n // Handle text conversion to marker tags based on fontSize and fontWeight\n const regex = /\\n/g; // regex to match /n with global scope across the string\n // Convert to H1 header type (#) in markdown, if fontSize >= 20\n if (fontSize >= 20) {\n markdownContent = markdownContent.replace(regex, '\\n# ');\n return `# ${markdownContent}`;\n }\n // Convert to paragraph in markdown, if fontSize < 20,\n // If text has fontWeight set to 'bold', add bold tag (**{markdown}**)\n if (fontWeight === 'bold') {\n // Here direct regex replace doesnt work, as we need to remove the\n // extra trailing space if any exist before appending **{markdown}** to the text\n const contentStrings = markdownContent.split('\\n');\n const stringsTrimmed = contentStrings.map(str =>\n str && str.trim().length ? `**${str.trim()}**` : ''\n );\n // Remove all blank entries from the end of the trimmed string array,\n // to avoid `\\` to get rendered, which happens if following line after `\\\\n` is empty)\n let idx = stringsTrimmed.length - 1;\n while (idx >= 0 && stringsTrimmed[idx].length === 0) {\n stringsTrimmed.pop();\n idx -= 1;\n }\n return stringsTrimmed.join('\\\\\\n');\n }\n // If fontWeight is not bold, replace '\\n' with '\\\\n` using regex\n markdownContent = markdownContent.replace(regex, '\\\\\\n');\n return markdownContent;\n};\n\nexport const convertFontSize = (fontSize: number): { fontSize: string; customFontSize?: number } => {\n if (!_.isNumber(fontSize)) {\n return { fontSize: 'default' };\n }\n return { fontSize: 'custom', customFontSize: fontSize };\n};\n\nexport const migrateVizTextToSplunkMarkdown = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, ...otherDefinitionParts } = vizDefinition;\n const { fontSize = 24, fontWeight = 'normal' } = options;\n const migratedVisualization = { options, ...otherDefinitionParts, type: 'splunk.markdown', context: {} };\n\n // perform any option renames\n migratedVisualization.options = renameVizOptions(migratedVisualization.options, optionsToRename);\n const migratedVizOptions = migratedVisualization.options;\n\n // convert text content to respective markdown\n migratedVizOptions.markdown = convertTextContentToMarkDown(\n fontWeight as FontWeight,\n fontSize as number,\n migratedVizOptions.markdown as string\n );\n // convert text fontSize to markdown fontSize\n const { fontSize: fontSizeValue, customFontSize } = convertFontSize(fontSize as number);\n migratedVizOptions.fontSize = fontSizeValue;\n migratedVizOptions.customFontSize = customFontSize;\n\n // remove invalid options using the optionsSchema for splunk.markdown as reference\n removeInvalidOptions(migratedVizOptions, validOptions);\n return migratedVisualization;\n};\n","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Punchcard.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport { renameVizOptions, removeInvalidOptions } from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst defaultContext = { ...config.defaultContext };\n\nconst optionsToRename = {\n showBubbleLabels: 'bubbleLabelDisplay',\n bubbleScale: 'bubbleSizeMethod',\n isBubbleSizeDynamic: 'showDynamicBubbleSize',\n maxBubbleRadius: 'bubbleRadiusMax',\n minBubbleRadius: 'bubbleRadiusMin',\n maxBubbleSize: 'bubbleSizeMax',\n minBubbleSize: 'bubbleSizeMin',\n showLegend: 'legendDisplay',\n useDefaultSort: 'showDefaultSort',\n};\n\nconst consolidateLegendDisplay = (vizOptions: Record<string, unknown>): void => {\n if (!vizOptions) {\n return;\n }\n const options = vizOptions;\n if (options.legendDisplay) {\n options.legendDisplay = 'right';\n } else if (options.legendDisplay === false) {\n options.legendDisplay = 'off'; // legenddisplay set explicitly to false\n }\n};\n\nconst consolidateBubbleLabelDisplay = (vizOptions: Record<string, unknown>): void => {\n if (!vizOptions) {\n return;\n }\n const options = vizOptions;\n if (options.bubbleLabelDisplay === 'none') {\n options.bubbleLabelDisplay = 'off';\n }\n};\n\n// Updates the first color of the bubbleColorConfig with the minBubbleColorIntensity\nconst convertGradientConfig = (\n minBubbleColorIntensity: number,\n defaultBubbleColorConfig: Record<string, unknown>\n): Record<string, unknown> => {\n if (\n !defaultBubbleColorConfig ||\n !defaultBubbleColorConfig.colors ||\n !defaultBubbleColorConfig.colors[0] ||\n typeof minBubbleColorIntensity !== 'number'\n ) {\n return null;\n }\n const firstColor = defaultBubbleColorConfig.colors[0] as string;\n const firstColorUpdated = `${firstColor.substring(\n 0,\n firstColor.lastIndexOf(',')\n )},${minBubbleColorIntensity})`;\n const colors = [...(defaultBubbleColorConfig.colors as Array<string>)];\n colors[0] = firstColorUpdated;\n const bubbleColorConfigUpdated = { ...defaultBubbleColorConfig, colors };\n return bubbleColorConfigUpdated;\n};\n\nconst convertColorModeOption = (visualizationDefinition: VisualizationDefinition): void => {\n const visualizationDef = visualizationDefinition;\n if (!visualizationDef || !visualizationDef.options) {\n return;\n }\n\n // Rename the colorMode option from 'sequential' to 'dynamic' if specified\n if (visualizationDef.options.colorMode === 'sequential') {\n visualizationDef.options.colorMode = 'dynamic';\n }\n\n // If no colorMode was specified the default in viz.punchcard used to be 'categorical'.\n // But in splunk.punchcard default is 'dynamic', we need to preserve the original default.\n // Set colorMode to 'categorical' if no colorMode was specified in viz\n if (!visualizationDef.options.colorMode) {\n visualizationDef.options.colorMode = 'categorical';\n }\n\n const { minBubbleColorIntensity } = visualizationDef.options;\n // If there is no category option set or if the colorMode is not categorical, then the colorMode will to 'dynamic'\n // In both cases we need to update the gradient config bubbleColorConfig with the minBubbleColorIntensity for first color\n if (\n (!visualizationDef.options.category || visualizationDef.options.colorMode !== 'categorical') &&\n minBubbleColorIntensity &&\n typeof minBubbleColorIntensity === 'number'\n ) {\n const bubbleColorConfig = convertGradientConfig(\n minBubbleColorIntensity,\n defaultContext.bubbleColorConfig\n );\n if (bubbleColorConfig) {\n visualizationDef.context = { ...visualizationDef.context, bubbleColorConfig };\n }\n }\n};\n\nexport const migrateVizToSplunkPunchcard = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = { options, ...otherDefinitionParts, type: 'splunk.punchcard', context: {} };\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n // perform any option renames\n const renamedOptions = renameVizOptions(migratedVisualization.options, optionsToRename);\n\n consolidateLegendDisplay(renamedOptions);\n consolidateBubbleLabelDisplay(renamedOptions);\n\n migratedVisualization.options = {\n ...renamedOptions,\n ...dataOptions,\n };\n migratedVisualization.context = dataContext;\n\n convertColorModeOption(migratedVisualization);\n // remove invalid options using the optionsSchema for splunk.punchcard as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/Punchcard.config\");"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utils/migrationUtils.ts","webpack:///./src/encoding/index.ts","webpack:///./src/visualizations/splunk-charting.ts","webpack:///./src/utils/singlevalue.ts","webpack:///external \"@babel/runtime/helpers/typeof\"","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///external \"@babel/runtime/helpers/slicedToArray\"","webpack:///./src/utils/gauges.ts","webpack:///external \"@splunk/visualizations/Markdown.config\"","webpack:///external \"lodash\"","webpack:///./src/index.ts","webpack:///./src/migrate.ts","webpack:///./src/visualizations/index.ts","webpack:///./src/visualizations/area.ts","webpack:///external \"@splunk/visualizations/Area.config\"","webpack:///./src/encoding/encoding.ts","webpack:///external \"@splunk/visualization-encoding-parsers/Base\"","webpack:///./src/visualizations/bar.ts","webpack:///external \"@splunk/visualizations/Bar.config\"","webpack:///./src/visualizations/bubble.ts","webpack:///external \"@splunk/visualizations/Bubble.config\"","webpack:///./src/visualizations/choroplethSvg.ts","webpack:///external \"@splunk/visualizations/ChoroplethSvg.config\"","webpack:///external \"@splunk/visualization-encoding/utils/dsl\"","webpack:///./src/visualizations/column.ts","webpack:///external \"@splunk/visualizations/Column.config\"","webpack:///./src/visualizations/ellipse.ts","webpack:///external \"@splunk/visualizations/Ellipse.config\"","webpack:///./src/visualizations/fillergauge.ts","webpack:///external \"@splunk/visualizations/FillerGauge.config\"","webpack:///./src/visualizations/line.ts","webpack:///external \"@splunk/visualizations/Line.config\"","webpack:///./src/visualizations/image.ts","webpack:///external \"@splunk/visualizations/Image.config\"","webpack:///./src/visualizations/markdown.ts","webpack:///./src/visualizations/markergauge.ts","webpack:///external \"@splunk/visualizations/MarkerGauge.config\"","webpack:///./src/visualizations/pie.ts","webpack:///external \"@splunk/visualizations/Pie.config\"","webpack:///./src/visualizations/scatter.ts","webpack:///external \"@splunk/visualizations/Scatter.config\"","webpack:///./src/visualizations/rectangle.ts","webpack:///external \"@splunk/visualizations/Rectangle.config\"","webpack:///./src/visualizations/singlevalue.ts","webpack:///external \"@splunk/visualizations/SingleValue.config\"","webpack:///./src/visualizations/singlevalueicon.ts","webpack:///external \"@splunk/visualizations/SingleValueIcon.config\"","webpack:///./src/visualizations/singlevalueradial.ts","webpack:///external \"@splunk/visualizations/SingleValueRadial.config\"","webpack:///./src/visualizations/table.ts","webpack:///external \"@splunk/visualizations/Table.config\"","webpack:///external \"@splunk/visualizations-shared/hocUtils\"","webpack:///./src/visualizations/text.ts","webpack:///./src/visualizations/punchcard.ts","webpack:///external \"@splunk/visualizations/Punchcard.config\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;AClFA;AAEA;;;;;AAKG;;;AACI,IAAM,oBAAoB,GAAG,SAAvB,oBAAuB,CAChC,cADgC,EAEhC,YAFgC,EAG1B;AACN,MAAI,CAAC,cAAD,IAAmB,CAAC,YAAxB,EAAsC;AAClC;AACH;;AACD,MAAM,iBAAiB,GAAG,cAA1B;AACA,QAAM,CAAC,IAAP,CAAY,iBAAZ,EAA+B,OAA/B,CAAuC,aAAG,EAAG;AACzC,QAAI,EAAE,GAAG,IAAI,YAAT,CAAJ,EAA4B;AACxB,aAAO,iBAAiB,CAAC,GAAD,CAAxB;AACH;AACJ,GAJD;AAKH,CAbM;;AAAM,+BAAoB,oBAApB;AAeb;;;;;AAKG;;AACI,IAAM,gBAAgB,GAAG,SAAnB,gBAAmB,CAC5B,UAD4B,EAE5B,aAF4B,EAGH;AACzB,MAAM,cAAc,GAAG,EAAvB;AAEA,MAAI,CAAC,UAAL,EAAiB,OAAO,EAAP;AACjB,MAAI,CAAC,aAAL,EAAoB,OAAO,UAAP;AAEpB,QAAM,CAAC,OA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ApD;AACA,SAAO,qBAAP;AACH,CAxBM;;AAAM,sCAA2B,2BAA3B,C;;;;;;AC1Gb,oE","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","import { getDataSelectorsFromDSL } from '@splunk/visualization-encoding/utils/dsl';\n\n/**\n * Removes invalid keys in the options\n * @param currentOptions - Current visualization options\n * @param validOptions - Valid visualization option keys\n * @returns void\n */\nexport const removeInvalidOptions = (\n currentOptions: Record<string, unknown>,\n validOptions: Record<string, unknown>\n): void => {\n if (!currentOptions || !validOptions) {\n return;\n }\n const copiedCurrOptions = currentOptions;\n Object.keys(copiedCurrOptions).forEach(key => {\n if (!(key in validOptions)) {\n delete copiedCurrOptions[key];\n }\n });\n};\n\n/**\n * Renames viz options by looking up their migration mapping\n * @param oldOptions - Current visualization options\n * @param optionRenames - Mapping of old options in viz.X to their migrated counterparts in splunk.X\n * @returns updatedOptions\n */\nexport const renameVizOptions = (\n oldOptions: Record<string, unknown>,\n optionRenames: Record<string, string>\n): Record<string, unknown> => {\n const updatedOptions = {};\n\n if (!oldOptions) return {};\n if (!optionRenames) return oldOptions;\n\n Object.entries(oldOptions).forEach(([oldOptName, val]) => {\n const optionName = optionRenames[oldOptName] ?? oldOptName;\n updatedOptions[optionName] = val;\n });\n\n return updatedOptions;\n};\n\n/**\n * Appends appropriate series selector to DSL string to add viz-specific implicit logic\n * @param valueOption - the value of an option\n * @param selector - the selector to append\n * @returns string | void\n */\nexport const preserveDataSelectionForValueOption = (\n valueOption: string | unknown,\n selector: string\n): string | void => {\n if (valueOption) {\n // if the last data selector starts with seriesBy, append appropriate selector to it\n const dataSelectors = getDataSelectorsFromDSL(valueOption);\n const lastDataSelector = dataSelectors[dataSelectors.length - 1];\n if (lastDataSelector.includes('seriesByIndex') || lastDataSelector.includes('seriesByName')) {\n return `${valueOption} | ${selector}`;\n }\n }\n\n return null;\n};\n\n/**\n * For all data options, calls preserveDataSelectionForValueOption with relevant selector and\n * updates dataOptions object\n * @param dataOptions - an object reflecting all data options\n * @param selector - the selector to append\n * @returns void\n */\nexport const addsDataSelectorToOptions = (\n dataOptions: Record<string, unknown>,\n selector: string\n): Record<string, unknown> => {\n const updatedDataOptions = {};\n\n Object.keys(dataOptions).forEach(key => {\n const statement = dataOptions[key] as string;\n const updatedDSL = preserveDataSelectionForValueOption(statement, selector);\n if (updatedDSL) {\n updatedDataOptions[key] = updatedDSL;\n } else {\n updatedDataOptions[key] = statement;\n }\n });\n\n return updatedDataOptions;\n};\n","export * from './encoding';\n","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\n\n/**\n * map of splunk charting based @splunk/dashboard-visualization option names\n * to updated @splunk/visualization option names\n */\nconst optionRenames = {\n 'axisTitleX.text': 'xAxisTitleText',\n 'axisTitleY.text': 'yAxisTitleText',\n 'axisTitleY2.text': 'y2AxisTitleText',\n 'axisTitleX.visibility': 'xAxisTitleVisibility',\n 'axisTitleY.visibility': 'yAxisTitleVisibility',\n 'axisTitleY2.visibility': 'y2AxisTitleVisibility',\n 'axisLabelsX.majorLabelStyle.rotation': 'xAxisLabelRotation',\n 'axisLabelsX.majorLabelVisibility': 'xAxisLabelVisibility',\n 'axisLabelsY.majorLabelVisibility': 'yAxisLabelVisibility',\n 'axisLabelsY2.majorLabelVisibility': 'y2AxisLabelVisibility',\n 'axisLabelsX.majorTickVisibility': 'xAxisMajorTickVisibility',\n 'axisLabelsY.majorTickVisibility': 'yAxisMajorTickVisibility',\n 'axisLabelsY2.majorTickVisibility': 'y2AxisMajorTickVisibility',\n 'axisLabelsX.minorTickVisibility': 'xAxisMinorTickVisibility',\n 'axisLabelsY.minorTickVisibility': 'yAxisMinorTickVisibility',\n 'axisLabelsY2.minorTickVisibility': 'y2AxisMinorTickVisibility',\n 'axisLabelsX.majorTickSize': 'xAxisMajorTickSize',\n 'axisLabelsY.majorTickSize': 'yAxisMajorTickSize',\n 'axisLabelsY2.majorTickSize': 'y2AxisMajorTickSize',\n 'axisLabelsX.minorTickSize': 'xAxisMinorTickSize',\n 'axisLabelsY.minorTickSize': 'yAxisMinorTickSize',\n 'axisLabelsY2.minorTickSize': 'y2AxisMinorTickSize',\n 'axisLabelsX.majorUnit': 'xAxisMajorTickInterval',\n 'axisLabelsY.majorUnit': 'yAxisMajorTickInterval',\n 'axisLabelsY2.majorUnit': 'y2AxisMajorTickInterval',\n 'axisX.abbreviation': 'xAxisAbbreviation',\n 'axisY.abbreviation': 'yAxisAbbreviation',\n 'axisY2.abbreviation': 'y2AxisAbbreviation',\n 'axisLabelsX.integerUnits': 'showRoundedXAxisLabels',\n 'axisLabelsY2.integerUnits': 'showRoundedY2AxisLabels',\n 'axisLabelsX.maxLabelParts': 'xAxisMaxLabelParts',\n 'axisLabelsX.axisVisibility': 'xAxisLineVisibility',\n 'axisLabelsY.axisVisibility': 'yAxisLineVisibility',\n 'axisLabelsY2.axisVisibility': 'y2AxisLineVisibility',\n 'gridLinesX.showMajorLines': 'showXMajorGridLines',\n 'gridLinesY.showMajorLines': 'showYMajorGridLines',\n 'gridLinesX.showMinorLines': 'showXMinorGridLines',\n 'gridLinesY.showMinorLines': 'showYMinorGridLines',\n 'gridLinesY2.showMajorLines': 'showY2MajorGridLines',\n 'gridLinesY2.showMinorLines': 'showY2MinorGridLines',\n 'axisX.scale': 'xAxisScale',\n 'axisY.scale': 'yAxisScale',\n 'axisY2.scale': 'y2AxisScale',\n 'axisX.maximumNumber': 'xAxisMax',\n 'axisY.maximumNumber': 'yAxisMax',\n 'axisY2.maximumNumber': 'y2AxisMax',\n 'axisX.minimumNumber': 'xAxisMin',\n 'axisY.minimumNumber': 'yAxisMin',\n 'axisY2.minimumNumber': 'y2AxisMin',\n 'axisX.includeZero': 'showXAxisWithZero',\n 'axisY.includeZero': 'showYAxisWithZero',\n 'axisY2.includeZero': 'showY2AxisWithZero',\n 'axisLabelsX.extendsAxisRange': 'showXAxisExtendedRange',\n 'axisLabelsY.extendsAxisRange': 'showYAxisExtendedRange',\n 'layout.splitSeries': 'showSplitSeries',\n 'layout.splitSeries.allowIndependentYRanges': 'showIndependentYRanges',\n 'axisY2.enabled': 'showOverlayY2Axis',\n 'axisY2.fields': 'y2Fields',\n 'chart.overlayFields': 'overlayFields',\n 'legend.labels': 'legendLabels',\n 'legend.labelStyle.overflowMode': 'legendTruncation',\n 'legend.mode': 'legendMode',\n 'legend.placement': 'legendDisplay',\n 'chart.nullValueMode': 'nullValueDisplay',\n 'chart.showDataLabels': 'dataValuesDisplay',\n fieldColors: 'seriesColorsByField',\n 'chart.resultTruncationLimit': 'resultLimit',\n 'chart.stackMode': 'stackMode',\n 'chart.barSpacing': 'barSpacing',\n 'chart.columnSpacing': 'columnSpacing',\n 'chart.seriesSpacing': 'seriesSpacing',\n 'chart.sliceCollapsingLabel': 'collapseLabel',\n 'chart.sliceCollapsingThreshold': 'collapseThreshold',\n hasDonutHole: 'showDonutHole',\n // area specific mapped options\n areaFillOpacity: 'areaOpacity',\n 'chart.showLines': 'showLines',\n // bubble specific mapped options\n 'chart.bubbleMinimumSize': 'bubbleSizeMin',\n 'chart.bubbleMaximumSize': 'bubbleSizeMax',\n 'chart.bubbleSizeBy': 'bubbleSizeMethod',\n // line specific mapped options\n fieldDashStyles: 'lineDashStylesByField',\n 'chart.showMarkers': 'markerDisplay',\n // scatter-specific options\n 'chart.markerSize': 'markerSize',\n};\n\nconst visibilityEnumReplacements = {\n visible: 'show',\n collapsed: 'hide',\n};\nconst modeEnumReplacements = {\n none: 'off',\n};\nconst abbreviationEnumReplacements = {\n none: 'auto',\n};\n/**\n * for some options the valid values changed.\n * this maps enum values that need to be changed\n */\nconst enumReplacements = {\n xAxisTitleVisibility: visibilityEnumReplacements,\n yAxisTitleVisibility: visibilityEnumReplacements,\n y2AxisTitleVisibility: visibilityEnumReplacements,\n xAxisAbbreviation: modeEnumReplacements,\n yAxisAbbreviation: abbreviationEnumReplacements,\n y2AxisAbbreviation: abbreviationEnumReplacements,\n dataValuesDisplay: modeEnumReplacements,\n legendDisplay: modeEnumReplacements,\n legendTruncation: {\n ellipsisNone: 'ellipsisOff',\n },\n stackMode: {\n default: 'auto',\n },\n};\n\n// splits a string with multiple fields separated by comma\n// returns the same value if it's already an array\nconst splitValue = (oldValue: string | string[]) =>\n Array.isArray(oldValue) ? oldValue : oldValue.split(',');\n\n/**\n * converts stringified objects into plain objects\n *\n * @param {string | Object} oldValue stringified object to parse\n * @returns {Object}\n */\nconst parseObjects = (oldValue: string | Record<string, unknown>): Record<string, unknown> => {\n if (typeof oldValue === 'object' && !Array.isArray(oldValue)) {\n return oldValue;\n }\n let nuValue = {};\n try {\n nuValue = JSON.parse(oldValue as string);\n } catch (e) {\n /* noop */\n }\n return nuValue;\n};\n\n/**\n * some option values require special processing\n * (e.g. if the type of the updated option changed)\n * \"legendLabels\": \"test,test2\" => \"legendLabels\": [\"test\", \"test2\"]\n */\nconst otherValueReplacements = {\n y2Fields: splitValue,\n overlayFields: splitValue,\n legendLabels: splitValue,\n seriesColorsByField: parseObjects,\n lineDashStylesByField: parseObjects,\n /**\n * the original markerDisplay was only exposed as `chart.showMarkers`\n * setting chart.showMarkers to true is the equivalent of `markerDisplay: 'outlined'`\n */\n markerDisplay: (oldValue: boolean) => {\n if (oldValue === false) return 'off';\n if (oldValue === true) return 'outlined';\n return oldValue;\n },\n};\n\n/**\n * migrateChartingOptions\n * - renames option keys\n * - checks if enum values have changed for new options, replaces it\n * - checks if other replacements are necessary and applies them\n * @param {object} options dashboard-viz charting options\n * @returns {object} migratedOptions viz charting options\n */\nconst migrateChartingOptions = (options: Record<string, unknown>): Record<string, unknown> => {\n const migratedOptions = {};\n Object.keys(options).forEach(key => {\n const value = options[key];\n const updatedKey = optionRenames[key] ?? key;\n let updatedValue = enumReplacements?.[updatedKey]?.[value] ?? value;\n if (otherValueReplacements[updatedKey]) {\n updatedValue = otherValueReplacements[updatedKey](updatedValue);\n }\n migratedOptions[updatedKey] = updatedValue;\n });\n return migratedOptions;\n};\n\n/**\n * helper that encapsulates shared migration logic across most charting-based viz\n * @param {Object} defaultChanges - map consisting of default value changes from viz.* to splunk.*\n * @param {Object} validOptions - the list of options that the new splunk.* viz supports\n * @param {VisualizationDefinition} vizDefinition - the viz definition to migrate\n * @param {String} vizType - the value of splunk.*\n */\nconst migrateBaseChartingVizDefinition = ({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType,\n}: {\n defaultChanges: Record<string, unknown>;\n validOptions: Record<string, unknown>;\n vizDefinition: VisualizationDefinition;\n vizType: string;\n}) => {\n const { encoding = {}, options = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: vizType,\n options: {},\n context: {},\n };\n // translate encoding to dynamic options equivalent\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const migratedOptions = {\n ...defaultChanges,\n ...migrateChartingOptions(options),\n ...dataOptions,\n };\n // remove invalid options\n Object.keys(migratedOptions).forEach(key => {\n if (!validOptions[key]) {\n delete migratedOptions[key];\n }\n });\n migratedDefinition.options = migratedOptions;\n migratedDefinition.context = dataContext;\n\n return migratedDefinition;\n};\n\nexport { migrateBaseChartingVizDefinition, migrateChartingOptions, otherValueReplacements };\n","/**\n * Helper function to consolidate `trendDisplayMode` - percent/absolute\n * and `showTrendIndicator` - true/false into `trendDisplay` - off/percent/absolute for Single Value Variations\n * 1. if `showTrendIndicator` is explicitly false, `trendDisplay` is off\n * 2. if `showTrendIndicator` is undefined (defaults to true), return `trendDisplayMode` value if present\n * 3. if `showTrendIndicator` is explicitly true, return 'absolute'\n * 4. if both the old options are undefined, return nothing as their defaults (true and `absolute`)\n * correspond to `trendDisplay` default - absolute\n */\nexport const consolidateTrendDisplay = (\n trendDisplayMode: string,\n showTrendIndicator: boolean\n): string | void => {\n if (showTrendIndicator === false) {\n return 'off';\n }\n if (['absolute', 'percent'].includes(trendDisplayMode)) {\n return trendDisplayMode;\n }\n if (showTrendIndicator === true) {\n return 'absolute';\n }\n return null;\n};\n","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","/**\n * Helper to convert old label and value options into consolidated labelDisplay and valueDisplay\n * If the `showOption` is explicitly false, then we return 'off'\n * If the `showOption` is undefined (which corresponds to a default of `true`), we return nothing to avoid conflating the viz definition (since this corresponds to `number` in the new display)\n * @param {Boolean} showOption - either one of `showLabel` or `showValue` in the old gauges\n * @param {Boolean} percentageOption - either one of `usePercentageRange` or `usePercentageValue` in the old gauges\n * @returns {String}\n */\nexport const consolidateDisplayOption = (showOption: boolean, percentageOption: boolean): string | void => {\n if (showOption === false) {\n return 'off';\n }\n if (percentageOption === true) {\n return 'percentage';\n }\n if (showOption === true) {\n return 'number';\n }\n // if showOption is undefined and percentageOption is false, we don't need to return an explicit value (since 'number' is passed in implicitly)\n return null;\n};\n","module.exports = require(\"@splunk/visualizations/Markdown.config\");","module.exports = require(\"lodash\");","export * from './migrate';\n","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport {\n migrateVizToSplunkArea,\n migrateVizToSplunkBar,\n migrateVizToSplunkBubble,\n migrateVizToSplunkChoroplethSvg,\n migrateVizToSplunkColumn,\n migrateVizToSplunkFillerGauge,\n migrateVizToSplunkLine,\n migrateVizToSplunkImage,\n migrateVizToSplunkMarkdown,\n migrateVizToSplunkMarkerGauge,\n migrateVizToSplunkPie,\n migrateVizToSplunkRectangle,\n migrateVizToSplunkSingleValue,\n migrateVizToSplunkSingleValueIcon,\n migrateVizToSplunkSingleValueRadial,\n migrateVizToSplunkScatter,\n migrateVizToSplunkTable,\n migrateVizTextToSplunkMarkdown,\n migrateVizToSplunkEllipse,\n migrateVizToSplunkPunchcard,\n} from './visualizations';\n\nconst supportedMigrations = {\n 'viz.area': {\n 'splunk.area': migrateVizToSplunkArea,\n },\n 'viz.bar': {\n 'splunk.bar': migrateVizToSplunkBar,\n },\n 'viz.bubble': {\n 'splunk.bubble': migrateVizToSplunkBubble,\n },\n 'viz.column': {\n 'splunk.column': migrateVizToSplunkColumn,\n },\n 'viz.choropleth.svg': {\n 'splunk.choropleth.svg': migrateVizToSplunkChoroplethSvg,\n },\n 'viz.ellipse': {\n 'splunk.ellipse': migrateVizToSplunkEllipse,\n },\n 'viz.fillergauge': {\n 'splunk.fillergauge': migrateVizToSplunkFillerGauge,\n },\n 'viz.line': {\n 'splunk.line': migrateVizToSplunkLine,\n },\n 'viz.img': {\n 'splunk.image': migrateVizToSplunkImage,\n },\n 'viz.markdown': {\n 'splunk.markdown': migrateVizToSplunkMarkdown,\n },\n 'viz.markergauge': {\n 'splunk.markergauge': migrateVizToSplunkMarkerGauge,\n },\n 'viz.pie': {\n 'splunk.pie': migrateVizToSplunkPie,\n },\n 'viz.rectangle': {\n 'splunk.rectangle': migrateVizToSplunkRectangle,\n },\n 'viz.singlevalue': {\n 'splunk.singlevalue': migrateVizToSplunkSingleValue,\n },\n 'viz.singlevalueicon': {\n 'splunk.singlevalueicon': migrateVizToSplunkSingleValueIcon,\n },\n 'viz.singlevalueradial': {\n 'splunk.singlevalueradial': migrateVizToSplunkSingleValueRadial,\n },\n 'viz.scatter': {\n 'splunk.scatter': migrateVizToSplunkScatter,\n },\n 'viz.table': {\n 'splunk.table': migrateVizToSplunkTable,\n },\n 'viz.text': {\n 'splunk.markdown': migrateVizTextToSplunkMarkdown,\n },\n 'viz.punchcard': {\n 'splunk.punchcard': migrateVizToSplunkPunchcard,\n },\n};\n\nconst inferToType = (typeFromDefinition: string): string => {\n if (typeFromDefinition === 'viz.img') {\n return 'splunk.image';\n }\n if (typeFromDefinition === 'viz.text') {\n return 'splunk.markdown';\n }\n\n return typeFromDefinition.replace(/^viz\\./, 'splunk.');\n};\n\ninterface MigrationParams {\n definition: VisualizationDefinition;\n toType?: string;\n}\n\nconst migrate = ({ definition, toType: toTypeFromParams }: MigrationParams): VisualizationDefinition => {\n const toType = toTypeFromParams ?? inferToType(definition.type);\n if (!supportedMigrations?.[definition?.type]?.[toType]) {\n throw new Error('Migration currently not supported');\n }\n return supportedMigrations[definition.type][toType](definition);\n};\n\ninterface CanMigrateParams {\n fromType: string;\n toType: string;\n}\n\nconst canMigrate = ({ fromType, toType }: CanMigrateParams): boolean => {\n if (supportedMigrations?.[fromType]?.[toType]) {\n return true;\n }\n return false;\n};\n\nexport { migrate, canMigrate, inferToType };\n","export * from './area';\nexport * from './bar';\nexport * from './bubble';\nexport * from './choroplethSvg';\nexport * from './column';\nexport * from './ellipse';\nexport * from './fillergauge';\nexport * from './line';\nexport * from './image';\nexport * from './markdown';\nexport * from './markergauge';\nexport * from './pie';\nexport * from './scatter';\nexport * from './rectangle';\nexport * from './singlevalue';\nexport * from './singlevalueicon';\nexport * from './singlevalueradial';\nexport * from './table';\nexport * from './text';\nexport * from './punchcard';\n","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Area.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n y2AxisAbbreviation: 'off',\n showRoundedY2AxisLabels: false,\n legendTruncation: 'ellipsisMiddle',\n showY2MajorGridLines: true,\n};\n\nconst migrateVizToSplunkArea = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.area',\n });\n\nexport { migrateVizToSplunkArea };\n","module.exports = require(\"@splunk/visualizations/Area.config\");","import {\n parseNameBasedFieldReference,\n parseIndexBasedFieldReference,\n} from '@splunk/visualization-encoding-parsers/Base';\n// @TODO(pwied): move the parsing helpers so we can deprecate visualization-encoding-parsers package\n\n// index based references are defined by <dataSource>[<index>]\n// this regex matches <text with numbers>[<anything>]\n// the \"[\" \"]\" part makes it an index based reference\nconst indexBasedRegx = /^[A-Za-z0-9_]+\\[.*\\].*$/;\n// name based references are defined by <dataSource>.<columnName>\n// the \".\" access makes it a name based reference\nconst nameBasedRegx = /^[A-Za-z0-9_]+\\..*$/;\n\ninterface AdvancedEncodingConfig {\n field: string;\n format?: Record<string, unknown>;\n}\ntype EncodingConfig = string | string[] | AdvancedEncodingConfig;\n\nexport type { EncodingConfig };\n\ninterface DynamicOptionsChunk {\n options: Record<string, unknown>;\n context: Record<string, unknown>;\n}\nconst isIndexBasedReference = ref => indexBasedRegx.test(ref);\nconst isNameBasedReference = ref => nameBasedRegx.test(ref);\n\ntype formatterFromEncodingType = {\n contextConfig: Record<string, unknown> | unknown;\n contextKey: string;\n dsl: string;\n};\n\nconst convertFormatterToDSL = (\n fieldReference: AdvancedEncodingConfig,\n key: string,\n translatedValue: string\n): formatterFromEncodingType | void => {\n switch (fieldReference?.format?.type) {\n case 'gradient':\n return {\n contextConfig: {\n ...(Array.isArray(fieldReference.format?.ranges) && {\n stops: [...fieldReference.format.ranges],\n }),\n ...(Array.isArray(fieldReference.format?.values) && {\n colors: [...fieldReference.format.values],\n }),\n },\n contextKey: `${key}GradientContext`,\n dsl: `${translatedValue} | gradient(${key}GradientContext)`,\n };\n case 'rangevalue': {\n const contextKey = `${key}RangeValueContext`;\n return {\n contextConfig: fieldReference.format?.ranges || [],\n contextKey,\n dsl: `${translatedValue} | rangeValue(${contextKey})`,\n };\n }\n case 'matchvalue': {\n const defaultValue = fieldReference.format?.defaultValue;\n const matchValueContextKey = `${key}MatchValueContext`;\n return {\n contextConfig: fieldReference.format?.matches || [],\n contextKey: matchValueContextKey,\n dsl: `${translatedValue} | matchValue(${matchValueContextKey}${\n defaultValue !== null && defaultValue !== undefined\n ? `, ${typeof defaultValue === 'string' ? `\"${defaultValue}\"` : defaultValue}`\n : ''\n })`,\n };\n }\n default:\n break;\n }\n return null;\n};\n\n/**\n * Translates encoding data selections in array format\n *\n * Note:\n * 'frameBySeriesIndexes' only supports positive indexes\n *\n * Examples:\n * 1. all index based selection\n * ['primary[0]', 'primary[1]'] => '> primary | frameBySeriesIndexes(0,1)'\n *\n * 2. all name based selection\n * ['primary.foo', 'primary.bar'] => '> primary | frameBySeriesNames(\"foo\",\"bar\")'\n *\n * 3. index or name based selections\n * ['primary.foo', 'primary[1]'] => '> primary | frameBySeriesNamesOrIndexes(\"foo\",1)'\n */\nconst translateArrayFormatDataReference = (encodingDataReference: string[]): string => {\n if (encodingDataReference.length === 0) {\n return null;\n }\n const allIndexBased = encodingDataReference.every(isIndexBasedReference);\n const allNameBased = encodingDataReference.every(isNameBasedReference);\n\n if (allIndexBased) {\n const { dataSourceName } = parseIndexBasedFieldReference(encodingDataReference[0]);\n const indexesStr = encodingDataReference\n .map(ref => parseIndexBasedFieldReference(ref)?.fieldIndex)\n .join(',');\n return `> ${dataSourceName} | frameBySeriesIndexes(${indexesStr})`;\n }\n if (allNameBased) {\n const { dataSourceName } = parseNameBasedFieldReference(encodingDataReference[0]);\n const namesStr = encodingDataReference\n .map(ref => `\"${parseNameBasedFieldReference(ref)?.fieldName}\"`)\n .join(',');\n return `> ${dataSourceName} | frameBySeriesNames(${namesStr})`;\n }\n // it's a mix of name and index based references\n // get the first ref to extract the dataSource\n const firstEntry = encodingDataReference[0];\n const { dataSourceName } = isIndexBasedReference(firstEntry)\n ? parseIndexBasedFieldReference(firstEntry)\n : parseNameBasedFieldReference(firstEntry);\n const paramStr = encodingDataReference\n .map(ref => {\n return isIndexBasedReference(ref)\n ? parseIndexBasedFieldReference(ref)?.fieldIndex\n : `\"${parseNameBasedFieldReference(ref)?.fieldName}\"`;\n })\n .join(',');\n return `> ${dataSourceName} | frameBySeriesNamesOrIndexes(${paramStr})`;\n};\n\n/**\n * Translates an encoding data selection string to a dynamic options data selection\n *\n * Index based column selection\n * 'primary[0]' => '> primary | seriesByIndex(0)'\n *\n * Index range based column selection\n * 'primary[1:]' => '> primary | frameBySeriesIndexRange(1)'\n * 'primary[0:3]' => '> primary | frameBySeriesIndexRange(0,2)'\n *\n * Name based column selection\n * 'primary.foo' => '> primary | seriesByName(\"foo\")'\n *\n * Encoding references\n * 'encoding.x' => '> x'\n */\nconst translateDataReference = (encodingDataReference: string): string => {\n if (encodingDataReference.indexOf('encoding.') === 0) {\n return `> ${encodingDataReference.replace('encoding.', '')}`;\n }\n const isIndexBasedRef = isIndexBasedReference(encodingDataReference);\n const isNameBasedRef = isNameBasedReference(encodingDataReference);\n\n if (!isIndexBasedRef && !isNameBasedRef) {\n console.warn('Unable to parse the encoding. Please verify the encoding format is correct');\n return null;\n }\n\n if (isNameBasedRef) {\n const { dataSourceName, fieldName, columnIndex } = parseNameBasedFieldReference(\n encodingDataReference\n );\n let returnString = `> ${dataSourceName} | seriesByName(\"${fieldName}\")`;\n if (columnIndex) {\n returnString += ` | pointByIndex(${columnIndex})`;\n }\n return returnString;\n }\n if (isIndexBasedRef) {\n const {\n dataSourceName,\n fieldIndex,\n columnIndex,\n isFieldIndexRange,\n fromFieldIndex,\n toFieldIndex,\n } = parseIndexBasedFieldReference(encodingDataReference);\n if (isFieldIndexRange) {\n let dslToIndexString;\n if (toFieldIndex === -1) {\n dslToIndexString = '';\n } else {\n // adjust index, DSL is using default slice behavior whereas encoding behaved differently\n dslToIndexString = `,${toFieldIndex + 1}`;\n }\n return `> ${dataSourceName} | frameBySeriesIndexRange(${fromFieldIndex}${dslToIndexString})`;\n }\n let returnString = `> ${dataSourceName} | seriesByIndex(${fieldIndex})`;\n if (columnIndex) {\n returnString += ` | pointByIndex(${columnIndex})`;\n }\n return returnString;\n }\n return null;\n};\n/**\n * An encoding configuration can come in various different forms:\n *\n * 1. Simple data selection (either index or name based)\n * {\n * x: 'primary[0]',\n * y: 'primary.count'\n * }\n *\n * 2. Multi column selection in array format\n * {\n * x: 'primary[0]',\n * \t y: ['primary.count', 'primary.count2']\n * }\n *\n * 3. Advanced Encoding Configuration (for data selection and formatting)\n * {\n * x: {\n * \t field: 'primary[0]',\n * \t },\n * y: {\n * \t field: 'primary[1]',\n * format: {},\n * }\n * }\n */\nconst encodingToDynamicOptionsDSL = (encoding: Record<string, EncodingConfig>): DynamicOptionsChunk => {\n const dynamicOptions: DynamicOptionsChunk = {\n options: {},\n context: {},\n };\n const translatedOptions = {};\n const encodingObj = encoding ?? {};\n Object.keys(encodingObj).forEach(key => {\n const fieldReference = encoding[key];\n let fieldReferenceStr = fieldReference as string;\n if (typeof fieldReference === 'object' && !Array.isArray(fieldReference)) {\n const { field } = fieldReference;\n if (field && !Array.isArray(field)) {\n fieldReferenceStr = field;\n }\n }\n let translatedValue;\n // field reference is either in form of array or string\n if (Array.isArray(fieldReference)) {\n translatedValue = translateArrayFormatDataReference(fieldReference);\n } else {\n translatedValue = translateDataReference(fieldReferenceStr);\n }\n\n // omit if translated value is not set\n if (translatedValue) {\n translatedOptions[key] = translatedValue;\n const convertedFormatterObject = convertFormatterToDSL(\n fieldReference as AdvancedEncodingConfig,\n key,\n translatedValue\n );\n\n if (convertedFormatterObject) {\n translatedOptions[key] = convertedFormatterObject.dsl;\n dynamicOptions.context[convertedFormatterObject.contextKey] =\n convertedFormatterObject.contextConfig;\n }\n }\n });\n dynamicOptions.options = translatedOptions;\n return dynamicOptions;\n};\n\nexport { encodingToDynamicOptionsDSL };\n","module.exports = require(\"@splunk/visualization-encoding-parsers/Base\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Bar.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n y2AxisAbbreviation: 'off',\n showRoundedY2AxisLabels: false,\n legendTruncation: 'ellipsisMiddle',\n showY2MajorGridLines: true,\n};\n\nconst migrateVizToSplunkBar = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.bar',\n });\n\nexport { migrateVizToSplunkBar };\n","module.exports = require(\"@splunk/visualizations/Bar.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Bubble.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n legendTruncation: 'ellipsisMiddle',\n};\n\nconst migrateVizToSplunkBubble = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.bubble',\n });\n\nexport { migrateVizToSplunkBubble };\n","module.exports = require(\"@splunk/visualizations/Bubble.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/ChoroplethSvg.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport { removeInvalidOptions } from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst optionRenames = {\n featureId: 'areaIds',\n value: 'areaValues',\n fill: 'areaColors',\n};\n\n// old default encoding configurations should be retained in migrated configuration\nconst defaultOptionChanges = {\n areaIds: '> primary | seriesByIndex(0)',\n areaValues: '> primary | seriesByIndex(1)',\n areaColors: '> primary | seriesByIndex(1) | gradient(fillGradientContext)',\n};\n\nconst defaultContextChanges = {\n fillGradientContext: {\n colors: ['#7EEFDA', '#6484F6', '#C093F9', '#293873'],\n },\n};\n\nexport const migrateVizToSplunkChoroplethSvg = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { encoding = {}, options = {}, ...otherDefinitionParts } = vizDefinition;\n // translate encoding to dynamic options equivalent\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: 'splunk.choropleth.svg',\n options: {},\n context: {},\n };\n\n // add migrated option names and values\n const migratedOptions = { ...options };\n Object.keys(dataOptions).forEach(key => {\n const updatedKey = optionRenames[key] ?? key;\n migratedOptions[updatedKey] = dataOptions[key];\n });\n\n // update migrated options and context\n migratedDefinition.options = {\n ...defaultOptionChanges,\n ...migratedOptions,\n };\n\n migratedDefinition.context = encoding.fill ? dataContext : defaultContextChanges;\n\n // remove invalid options\n removeInvalidOptions(migratedDefinition.options, validOptions);\n\n return migratedDefinition;\n};\n","module.exports = require(\"@splunk/visualizations/ChoroplethSvg.config\");","module.exports = require(\"@splunk/visualization-encoding/utils/dsl\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Column.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n y2AxisAbbreviation: 'off',\n showRoundedY2AxisLabels: false,\n legendTruncation: 'ellipsisMiddle',\n showY2MajorGridLines: true,\n};\n\nconst migrateVizToSplunkColumn = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.column',\n });\n\nexport { migrateVizToSplunkColumn };\n","module.exports = require(\"@splunk/visualizations/Column.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Ellipse.config';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport type { EncodingConfig } from '../encoding';\nimport { renameVizOptions, removeInvalidOptions, addsDataSelectorToOptions } from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst optionsToRename = {\n fill: 'fillColor',\n stroke: 'strokeColor',\n strokeDasharray: 'strokeDashStyle',\n};\n\nexport const migrateVizToSplunkEllipse = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { encoding = {}, options = {}, ...otherDefinitionParts } = vizDefinition;\n\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: 'splunk.ellipse',\n options,\n context: {},\n };\n\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n // To simulate the implicit logic in the shape parser that Ellipse utilizes, append\n // the lastPoint() DataSeries selector.\n const updatedDataOptions = addsDataSelectorToOptions(dataOptions, 'lastPoint()');\n\n migratedDefinition.options = { ...options, ...updatedDataOptions };\n\n // perform any option renaming\n migratedDefinition.options = renameVizOptions(migratedDefinition.options, optionsToRename);\n\n // remove invalid options from new definition\n removeInvalidOptions(migratedDefinition.options, validOptions);\n\n migratedDefinition.context = dataContext;\n\n return migratedDefinition;\n};\n","module.exports = require(\"@splunk/visualizations/Ellipse.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/FillerGauge.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport { consolidateDisplayOption } from '../utils/gauges';\nimport {\n preserveDataSelectionForValueOption,\n removeInvalidOptions,\n renameVizOptions,\n} from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst optionRenames = {\n majorUnit: 'majorTickInterval',\n};\n\nconst previousRangeValueConfig = [\n { to: 10, value: '#5fbcff' },\n { from: 10, to: 30, value: '#4beba8' },\n { from: 30, to: 50, value: '#f4df7a' },\n { from: 50, to: 70, value: '#fc9850' },\n { from: 70, to: 100, value: '#ff7152' },\n];\n\nconst defaultChanges = {\n gaugeColor: '> value | rangeValue(gaugeColorRangeValueContext)',\n value: '> primary | seriesByIndex(0) | lastPoint()',\n};\n\nexport const migrateVizToSplunkFillerGauge = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = {\n options,\n ...otherDefinitionParts,\n type: 'splunk.fillergauge',\n context: {},\n };\n\n const renamedOptions = renameVizOptions(options, optionRenames);\n\n const { options: encodingOptions, context: gaugeColorContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n // if a viz.fillergauge receives an entire column for `value` (e.g. primary[0]), it will select the last value of the column\n // this contrasts with viz.markergauge (which takes the first point of the column)\n // this is due to differing behavior in the FillerGaugeParser, which explicitly retrieves the last point in a received array\n // https://cd.splunkdev.com/devplat/vision/-/blob/main/packages/visualization-encoding-parsers/src/FillerGaugeParser.js#L79\n const originalGaugeValue = encodingOptions.value;\n if (typeof originalGaugeValue === 'string') {\n encodingOptions.value =\n preserveDataSelectionForValueOption(originalGaugeValue, 'lastPoint()') ?? originalGaugeValue;\n }\n if (encodingOptions?.gaugeColor) {\n migratedVisualization.context = gaugeColorContext;\n } else {\n // preserve the default context if no gaugeColor encoding was configured\n migratedVisualization.context = {\n gaugeColorRangeValueContext: previousRangeValueConfig,\n };\n }\n\n const { showLabels, usePercentageRange, showValue, usePercentageValue } = options;\n const labelDisplay = consolidateDisplayOption(showLabels as boolean, usePercentageRange as boolean);\n const valueDisplay = consolidateDisplayOption(showValue as boolean, usePercentageValue as boolean);\n\n migratedVisualization.options = {\n ...defaultChanges,\n ...renamedOptions,\n ...encodingOptions,\n ...(typeof labelDisplay === 'string' && { labelDisplay }),\n ...(typeof valueDisplay === 'string' && { valueDisplay }),\n };\n\n // remove invalid options using the optionsSchema for splunk.fillergauge as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/FillerGauge.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Line.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\n// except for markerDisplay which migrates to the new default 'off'\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n y2AxisAbbreviation: 'off',\n showRoundedY2AxisLabels: false,\n legendTruncation: 'ellipsisMiddle',\n showY2MajorGridLines: true,\n};\n\nconst migrateVizToSplunkLine = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.line',\n });\n\nexport { migrateVizToSplunkLine };\n","module.exports = require(\"@splunk/visualizations/Line.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Image.config';\nimport { removeInvalidOptions } from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nexport const migrateVizToSplunkImage = (vizDefinition: VisualizationDefinition): VisualizationDefinition => {\n const { options = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = { options, ...otherDefinitionParts, type: 'splunk.image', context: {} };\n\n // remove invalid options using the optionsSchema for splunk.image as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/Image.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Markdown.config';\nimport { removeInvalidOptions } from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nexport const migrateVizToSplunkMarkdown = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = { options, ...otherDefinitionParts, type: 'splunk.markdown', context: {} };\n\n // remove invalid options using the optionsSchema for splunk.markdown as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n return migratedVisualization;\n};\n","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/MarkerGauge.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport {\n preserveDataSelectionForValueOption,\n removeInvalidOptions,\n renameVizOptions,\n} from '../utils/migrationUtils';\nimport { consolidateDisplayOption } from '../utils/gauges';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n gaugeRanges: [\n { from: 90, to: 100, value: '#CB3B43' },\n { from: 50, to: 90, value: '#F4DF7A' },\n { from: 0, to: 50, value: '#4BEBA8' },\n ],\n value: '> primary | seriesByIndex(0) | lastPoint()',\n};\n\nconst optionRenames = {\n majorUnit: 'majorTickInterval',\n ranges: 'gaugeRanges',\n};\n\nexport const migrateVizToSplunkMarkerGauge = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = {\n options,\n ...otherDefinitionParts,\n type: 'splunk.markergauge',\n context: {},\n };\n\n const renamedOptions = renameVizOptions(options, optionRenames);\n\n const { options: dataOptions } = encodingToDynamicOptionsDSL(encoding as Record<string, EncodingConfig>);\n // viz.markergauge has behavior where if a column without a specific point (e.g. primary[1]) is selected,\n // the markerGauge will only display the first point of the column\n // the following logic accounts for this and appends firstPoint() to the DSL statement\n const originalGaugeValue = dataOptions.value;\n if (typeof originalGaugeValue === 'string') {\n dataOptions.value =\n preserveDataSelectionForValueOption(originalGaugeValue, 'firstPoint()') ?? originalGaugeValue;\n }\n\n const { showLabels, usePercentageRange, showValue, usePercentageValue } = renamedOptions;\n const labelDisplay = consolidateDisplayOption(showLabels as boolean, usePercentageRange as boolean);\n const valueDisplay = consolidateDisplayOption(showValue as boolean, usePercentageValue as boolean);\n\n migratedVisualization.options = {\n ...defaultChanges,\n ...renamedOptions,\n ...dataOptions,\n ...(typeof labelDisplay === 'string' && { labelDisplay }),\n ...(typeof valueDisplay === 'string' && { valueDisplay }),\n };\n\n // remove invalid options using the optionsSchema for splunk.markergauge as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/MarkerGauge.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Pie.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport { migrateChartingOptions, otherValueReplacements } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst migratePieChartLabelAndPercent = (options: Record<string, unknown>): Record<string, string> => {\n // if neither chart.showLabels or chart.showPercent is specified in viz.pie,\n // splunk.pie use the default labelDisplay value\n if (!('chart.showLabels' in options) && !('chart.showPercent' in options)) {\n return {};\n }\n\n // if only chart.showPercent is specified in viz.pie\n if (!('chart.showLabels' in options) && 'chart.showPercent' in options) {\n return { labelDisplay: options['chart.showPercent'] ? 'valuesAndPercentage' : 'values' };\n }\n\n // if only chart.showLabels is specified in viz.pie\n if ('chart.showLabels' in options && !('chart.showPercent' in options)) {\n return { labelDisplay: options['chart.showLabels'] ? 'values' : 'off' };\n }\n\n // if both chart.showLabels and chart.showPercent are specified in viz.pie\n const labelOption = {\n labelDisplay: 'values',\n };\n if (options['chart.showLabels'] && options['chart.showPercent']) {\n labelOption.labelDisplay = 'valuesAndPercentage';\n }\n if (!options['chart.showLabels']) {\n labelOption.labelDisplay = 'off';\n }\n\n return labelOption;\n};\n\n// retain the pie position when converting viz.pie to splunk.pie - SCP-48658\nconst migrateDonutChart = (options: Record<string, unknown>): Record<string, string> => {\n if (options.hasDonutHole) {\n if (options['legend.placement'] === 'none') {\n return { labelDisplay: 'off' };\n }\n return { labelDisplay: 'values' };\n }\n return {};\n};\n\nconst migrateFieldColors = (options: Record<string, any>): Record<string, any> => {\n if ('fieldColors' in options) {\n return {\n seriesColorsByField: otherValueReplacements.seriesColorsByField(options.fieldColors),\n };\n }\n return {};\n};\n\nconst migrateVizToSplunkPie = (vizDefinition: VisualizationDefinition): VisualizationDefinition => {\n const { encoding = {}, options = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: 'splunk.pie',\n options: {},\n context: {},\n };\n // translate encoding to dynamic options equivalent\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const migratedOptions = {\n ...migratePieChartLabelAndPercent(options),\n ...migrateChartingOptions(options),\n ...migrateFieldColors(options),\n ...migrateDonutChart(options),\n ...dataOptions,\n };\n // remove invalid options\n Object.keys(migratedOptions).forEach(key => {\n if (!validOptions[key]) {\n delete migratedOptions[key];\n }\n });\n migratedDefinition.options = migratedOptions;\n migratedDefinition.context = dataContext;\n\n return migratedDefinition;\n};\n\nexport { migrateVizToSplunkPie };\n","module.exports = require(\"@splunk/visualizations/Pie.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Scatter.config';\nimport { migrateBaseChartingVizDefinition } from './splunk-charting';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n yAxisAbbreviation: 'off',\n legendTruncation: 'ellipsisMiddle',\n};\n\nconst migrateVizToSplunkScatter = (vizDefinition: VisualizationDefinition): VisualizationDefinition =>\n migrateBaseChartingVizDefinition({\n defaultChanges,\n validOptions,\n vizDefinition,\n vizType: 'splunk.scatter',\n });\n\nexport { migrateVizToSplunkScatter };\n","module.exports = require(\"@splunk/visualizations/Scatter.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Rectangle.config';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport type { EncodingConfig } from '../encoding';\nimport { renameVizOptions, removeInvalidOptions, addsDataSelectorToOptions } from '../utils/migrationUtils';\n\nconst optionsToRename = {\n fill: 'fillColor',\n stroke: 'strokeColor',\n strokeDasharray: 'strokeDashStyle',\n strokeLinejoin: 'strokeJoinStyle',\n};\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst migrateVizToSplunkRectangle = (vizDefinition: VisualizationDefinition): VisualizationDefinition => {\n const { encoding = {}, options, ...otherDefinitionParts } = vizDefinition;\n\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: 'splunk.rectangle',\n options: {},\n context: {},\n };\n\n // translate encoding to dynamic options equivalent\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n // To simulate the implicit logic in the shape parser that Rectangle utilizes, append\n // the lastPoint() DataSeries selector.\n const updatedDataOptions = addsDataSelectorToOptions(dataOptions, 'lastPoint()');\n\n migratedDefinition.options = { ...options, ...updatedDataOptions };\n\n // perform option rename\n migratedDefinition.options = renameVizOptions(migratedDefinition.options, optionsToRename);\n\n // remove invalid options, validOptions is taken from the config.optionsSchema\n removeInvalidOptions(migratedDefinition.options, validOptions);\n migratedDefinition.context = dataContext;\n return migratedDefinition;\n};\n\nexport { migrateVizToSplunkRectangle };\n","module.exports = require(\"@splunk/visualizations/Rectangle.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/SingleValue.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport {\n removeInvalidOptions,\n renameVizOptions,\n preserveDataSelectionForValueOption,\n} from '../utils/migrationUtils';\nimport { consolidateTrendDisplay } from '../utils/singlevalue';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultsToRetain = {\n showSparklineAreaGraph: false,\n sparklineValues: '> primary | seriesByTypes(\"number\", \"string\")',\n};\n\nconst optionRenames = {\n useTrendUnits: 'shouldAbbreviateTrendValue',\n useThousandSeparators: 'shouldUseThousandSeparators',\n sparklineAreaGraph: 'showSparklineAreaGraph',\n sparklineFillColor: 'sparklineAreaColor',\n sparklineAcceptNullData: 'shouldSparklineAcceptNullData',\n deltaFontSize: 'trendFontSize',\n};\n\n/**\n * Helper function to consolidate `sparklinePosition` - before/after/below\n * and `showSparkline` - true/false into `sparklineDisplay` - off/before/after/below\n * 1. if `showSparkline` is explicitly false, `sparklineDisplay` is off\n * 2. if `showSparkline` is undefined (defaults to true), return `sparklinePosition` value if present\n * 3. if `showSparkline` is explicitly true, return 'below'\n * 4. if both the old options are undefined, return nothing as their defaults (true and `below`)\n * correspond to `sparklineDisplay` default - below\n */\nconst consolidateSparklineDisplay = (sparklinePosition: string, showSparkline: boolean): string | void => {\n if (showSparkline === false) {\n return 'off';\n }\n if (['before', 'after', 'below'].includes(sparklinePosition)) {\n return sparklinePosition;\n }\n if (showSparkline === true) {\n return 'below';\n }\n return null;\n};\n\nexport const migrateVizToSplunkSingleValue = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = {\n ...otherDefinitionParts,\n type: 'splunk.singlevalue',\n context: {},\n options: {},\n };\n\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const migratedDataOptions = {\n /**\n * in splunk.singlevalue, since we have the defaults\n * trendValue: '> sparklineValues|delta(-2)'\n * majorValue: '> sparklineValues|lastPoint()'\n * computing sparklineValues DSL from trend encoding should be sufficient\n */\n ...(dataOptions?.trend && { sparklineValues: dataOptions.trend }),\n ...(dataOptions?.majorColor && {\n majorColor:\n preserveDataSelectionForValueOption(dataOptions.majorColor as string, 'lastPoint()') ??\n dataOptions.majorColor,\n }),\n ...(dataOptions?.deltaColor && {\n trendColor:\n preserveDataSelectionForValueOption(dataOptions.deltaColor as string, 'lastPoint()') ??\n dataOptions.deltaColor,\n }),\n ...(dataOptions?.fill && {\n backgroundColor:\n preserveDataSelectionForValueOption(dataOptions.fill as string, 'lastPoint()') ??\n dataOptions.fill,\n }),\n };\n\n const renamedOptions = renameVizOptions(options, optionRenames);\n\n const { trendDisplayMode, showTrendIndicator, showSparkline, sparklinePosition } = renamedOptions;\n\n const trendDisplay = consolidateTrendDisplay(trendDisplayMode as string, showTrendIndicator as boolean);\n const sparklineDisplay = consolidateSparklineDisplay(\n sparklinePosition as string,\n showSparkline as boolean\n );\n\n migratedVisualization.options = {\n ...defaultsToRetain,\n ...renamedOptions,\n ...migratedDataOptions, // fill encoding takes precedence over explicit static backgroundColor\n ...(typeof trendDisplay === 'string' && { trendDisplay }),\n ...(typeof sparklineDisplay === 'string' && { sparklineDisplay }),\n };\n\n migratedVisualization.context = dataContext;\n\n // remove invalid (and deprecated) options using the optionsSchema for splunk.singlevalue as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/SingleValue.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/SingleValueIcon.config';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport type { EncodingConfig } from '../encoding';\nimport {\n removeInvalidOptions,\n renameVizOptions,\n preserveDataSelectionForValueOption,\n} from '../utils/migrationUtils';\nimport { consolidateTrendDisplay } from '../utils/singlevalue';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst defaultsToRetain = {\n majorValue: '> primary | seriesByIndex(0) | lastPoint()',\n trendValue: '> primary | seriesByIndex(0) | delta(-2)',\n};\n\nconst optionsToRename = {\n useTrendUnits: 'shouldAbbreviateTrendValue',\n useThousandSeparators: 'shouldUseThousandSeparators',\n deltaColor: 'trendColor',\n color: 'iconColor',\n};\n\nexport const migrateVizToSplunkSingleValueIcon = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = {\n ...otherDefinitionParts,\n type: 'splunk.singlevalueicon',\n context: {},\n options: {},\n };\n\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const migratedDataOptions = {\n ...(dataOptions?.trend && {\n majorValue:\n preserveDataSelectionForValueOption(dataOptions.trend as string, 'lastPoint()') ??\n dataOptions.trend,\n trendValue:\n preserveDataSelectionForValueOption(dataOptions.trend as string, 'delta(-2)') ??\n dataOptions.trend,\n }),\n ...(dataOptions?.fill && {\n backgroundColor:\n preserveDataSelectionForValueOption(dataOptions.fill as string, 'lastPoint()') ??\n dataOptions.fill,\n }),\n };\n\n const renamedOptions = renameVizOptions(options, optionsToRename);\n\n const { trendDisplayMode, showTrendIndicator } = renamedOptions;\n\n const trendDisplay = consolidateTrendDisplay(trendDisplayMode as string, showTrendIndicator as boolean);\n\n migratedVisualization.options = {\n ...defaultsToRetain,\n ...renamedOptions,\n ...migratedDataOptions, // fill encoding takes precedence over explicit static backgroundColor\n ...(typeof trendDisplay === 'string' && { trendDisplay }),\n };\n\n migratedVisualization.context = dataContext;\n\n // remove invalid (and deprecated) options using the optionsSchema for splunk.singlevalueicon as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/SingleValueIcon.config\");","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/SingleValueRadial.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport {\n removeInvalidOptions,\n renameVizOptions,\n preserveDataSelectionForValueOption,\n} from '../utils/migrationUtils';\nimport { consolidateTrendDisplay } from '../utils/singlevalue';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultsToRetain = {\n majorValue: '> primary | seriesByIndex(0) | lastPoint()',\n trendValue: '> primary | seriesByIndex(0) | delta(-2)',\n};\n\nconst optionRenames = {\n useTrendUnits: 'shouldAbbreviateTrendValue',\n useThousandSeparators: 'shouldUseThousandSeparators',\n};\n\nexport const migrateVizToSplunkSingleValueRadial = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = {\n ...otherDefinitionParts,\n type: 'splunk.singlevalueradial',\n context: {},\n options: {},\n };\n\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n const { trend: originalTrend, fill: originalFill } = dataOptions;\n\n const migratedDataOptions = {\n ...(originalTrend && {\n majorValue: preserveDataSelectionForValueOption(originalTrend, 'lastPoint()') ?? originalTrend,\n trendValue: preserveDataSelectionForValueOption(originalTrend, 'delta(-2)') ?? originalTrend,\n }),\n ...(originalFill && {\n backgroundColor: preserveDataSelectionForValueOption(originalFill, 'lastPoint()') ?? originalFill,\n }),\n };\n\n const renamedOptions = renameVizOptions(options, optionRenames);\n\n const { trendDisplayMode, showTrendIndicator } = renamedOptions;\n\n const trendDisplay = consolidateTrendDisplay(trendDisplayMode as string, showTrendIndicator as boolean);\n\n migratedVisualization.options = {\n ...defaultsToRetain,\n ...renamedOptions,\n ...migratedDataOptions, // fill encoding takes precedence over explicit static backgroundColor\n ...(typeof trendDisplay === 'string' && { trendDisplay }),\n };\n\n migratedVisualization.context = dataContext;\n\n // remove invalid (and deprecated) options using the optionsSchema for splunk.singlevalueradial as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/SingleValueRadial.config\");","import { isEmpty, set } from 'lodash';\nimport type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Table.config';\nimport { deepMergeWithArrayPrimitiveOverrides } from '@splunk/visualizations-shared/hocUtils';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport { renameVizOptions } from '../utils/migrationUtils';\n\ninterface CellFormatting {\n numberPrecision?: number;\n unit?: string;\n unitPosition?: string;\n useThousandSeparators?: boolean;\n}\n\ninterface VizTableFormattingOpts {\n headerTextColor?: string;\n headerBackgroundColor?: string;\n numberPrecision?: number;\n rowBackgroundColorEven?: string;\n rowBackgroundColorOdd?: string;\n rowTextColorOdd?: string;\n rowTextColorEven?: string;\n unit?: string;\n unitPosition?: string;\n useThousandSeparators?: boolean;\n}\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\n// old default configurations should be retained in migrated configuration\nconst defaultChanges = {\n count: 20,\n};\n\nconst optionRenames = {\n rowNumbers: 'showRowNumbers',\n};\n\nconst migrateHeaderVisibility = (oldHeaderVisibility: boolean): string => {\n if (oldHeaderVisibility === undefined) {\n // headerVisibility: 'inline' is the default in splunk.table\n // this corresponds to `showHeader: true`, which is the default in viz.table\n return undefined;\n }\n return oldHeaderVisibility ? 'inline' : 'none';\n};\n\ninterface Colors {\n oddColor?: string;\n evenColor?: string;\n}\n\n/**\n * Helper to migrate alternating color options (text and background) to their corresponding DSL and context configs\n */\nconst migrateAlternatingColors = (\n colors: Colors,\n optionToConvert: string,\n contextConfigName: string\n): {\n contextConfigName?: string;\n context?: string[];\n dsl?: string;\n} => {\n // default alternating themed color values as defined in table config\n const themedAlternatingColors = {\n rowBackgroundColors: {\n even: '> themes.rowBackgroundColorEven',\n odd: '> themes.rowBackgroundColorOdd',\n },\n rowColors: {\n even: '> themes.inverseTextColor',\n odd: '> themes.textColor',\n },\n };\n const colorsContext: string[] = [];\n const { oddColor, evenColor } = colors;\n if (oddColor && evenColor) {\n colorsContext.push(...[oddColor, evenColor]);\n } else if (oddColor) {\n colorsContext.push(...[oddColor, themedAlternatingColors[optionToConvert].even]);\n } else if (evenColor) {\n colorsContext.push(...[themedAlternatingColors[optionToConvert].odd, evenColor]);\n }\n\n if (colorsContext.length) {\n return {\n contextConfigName,\n context: colorsContext,\n dsl: `> table | pick(${contextConfigName})`,\n };\n }\n\n return {};\n};\n\n/**\n * Intermediate helper to translate column-specific formatting in viz.table to their DSL equivalents\n * viz.table defines column-specific formatting via entries specified in options.fields.<columnName>\n *\n * This requires moving numberPrecision, useThousandSeparators, unitPosition, and other formatting options to the config\n * The resultant config is used as the argument for formatByType\n */\nconst migrateToColumnFormat = (\n fieldsOption: Record<string, CellFormatting>\n): {\n columnFormat: Record<string, unknown>;\n columnFormatContext: Record<string, unknown>;\n} => {\n const columnFormat: Record<string, unknown> = {};\n const columnFormatContext: Record<string, unknown> = {};\n\n if (!fieldsOption) {\n return {\n columnFormat,\n columnFormatContext,\n };\n }\n\n Object.entries(fieldsOption).forEach(([column, formatting]) => {\n // need to prepend `formatted` in case the column has leading digits, which the nearley parser cannot account for\n const contextEntry = `formatted${column}Config`;\n columnFormatContext[contextEntry] = {};\n columnFormat[column] = {\n data: `> table | seriesByName(\"${column}\") | formatByType(${contextEntry})`,\n };\n\n // all columnFormatting options are optional; if they are not present in the original config, tableFormat should take precedence\n const { unit, unitPosition, numberPrecision, useThousandSeparators } = formatting;\n if (typeof unitPosition === 'string') {\n set(columnFormatContext, [contextEntry, 'number', 'unitPosition'], unitPosition);\n set(columnFormatContext, [contextEntry, 'string', 'unitPosition'], unitPosition);\n }\n if (typeof unit === 'string' || typeof unit === 'number') {\n set(columnFormatContext, [contextEntry, 'number', 'unit'], unit);\n set(columnFormatContext, [contextEntry, 'string', 'unit'], unit);\n }\n if (numberPrecision != null) {\n set(columnFormatContext, [contextEntry, 'number', 'precision'], numberPrecision);\n }\n if (useThousandSeparators != null) {\n set(columnFormatContext, [contextEntry, 'number', 'thousandSeparated'], useThousandSeparators);\n }\n });\n\n return {\n columnFormat,\n columnFormatContext,\n };\n};\n\n/**\n * Intermediate helper to translate table-wide formatting and coloring in viz.table to their DSL equivalents\n *\n * This requires moving numberPrecision, useThousandSeparators, unitPosition, and other formatting/coloring options to the config\n * The resultant formatting and coloring config is used as the argument for the formatByType() and pick() DSL formatters respectively\n */\nconst migrateToTableFormat = (\n oldOptions: VizTableFormattingOpts = {}\n): {\n tableFormat: Record<string, unknown>;\n tableFormatContext: Record<string, unknown>;\n} => {\n const tableFormat: Record<string, unknown> = {};\n const tableFormatContext: Record<string, unknown> = {\n formattedConfig: {},\n };\n\n const {\n unit,\n unitPosition: oldUnitPosition,\n numberPrecision: oldNumberPrecision,\n useThousandSeparators: oldUseThousandSeparators,\n } = oldOptions;\n const unitPosition = typeof oldUnitPosition === 'string' ? oldUnitPosition : 'after';\n const numberPrecision = typeof oldNumberPrecision === 'number' ? oldNumberPrecision : 0;\n const useThousandSeparators =\n typeof oldUseThousandSeparators === 'boolean' ? oldUseThousandSeparators : false;\n\n set(tableFormatContext, ['formattedConfig', 'number', 'precision'], numberPrecision);\n set(tableFormatContext, ['formattedConfig', 'number', 'thousandSeparated'], useThousandSeparators);\n set(tableFormatContext, ['formattedConfig', 'number', 'unitPosition'], unitPosition);\n set(tableFormatContext, ['formattedConfig', 'string', 'unitPosition'], unitPosition);\n if (typeof unit === 'string' || typeof unit === 'number') {\n set(tableFormatContext, ['formattedConfig', 'number', 'unit'], unit);\n set(tableFormatContext, ['formattedConfig', 'string', 'unit'], unit);\n }\n\n tableFormat.data = `> table | formatByType(formattedConfig)`;\n\n const {\n rowBackgroundColorEven,\n rowBackgroundColorOdd,\n rowTextColorOdd,\n rowTextColorEven,\n headerTextColor,\n headerBackgroundColor,\n } = oldOptions;\n\n const { context: rowColorsContext, dsl: rowColorsDSL } = migrateAlternatingColors(\n { oddColor: rowTextColorOdd, evenColor: rowTextColorEven },\n 'rowColors',\n 'rowColorsConfig'\n );\n if (rowColorsContext && rowColorsDSL) {\n tableFormatContext.rowColorsConfig = rowColorsContext;\n tableFormat.rowColors = rowColorsDSL;\n }\n\n const { context: rowBackgroundColorsContext, dsl: rowBackgroundColorsDSL } = migrateAlternatingColors(\n { oddColor: rowBackgroundColorOdd, evenColor: rowBackgroundColorEven },\n 'rowBackgroundColors',\n 'rowBackgroundColorsConfig'\n );\n if (rowBackgroundColorsContext && rowBackgroundColorsDSL) {\n tableFormat.rowBackgroundColors = rowBackgroundColorsDSL;\n tableFormatContext.rowBackgroundColorsConfig = rowBackgroundColorsContext;\n }\n if (headerTextColor) {\n tableFormat.headerColor = headerTextColor;\n }\n if (headerBackgroundColor) {\n tableFormat.headerBackgroundColor = headerBackgroundColor;\n }\n\n return {\n tableFormat,\n tableFormatContext,\n };\n};\n\nconst migrateVizToSplunkTable = (vizDefinition: VisualizationDefinition): VisualizationDefinition => {\n const { encoding = {}, options = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedDefinition: VisualizationDefinition = {\n ...otherDefinitionParts,\n type: 'splunk.table',\n options: {},\n context: {},\n };\n\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n\n const renamedOptions = renameVizOptions(options, optionRenames);\n const headerVisibility = migrateHeaderVisibility(renamedOptions.showHeader as boolean);\n const { tableFormat, tableFormatContext } = migrateToTableFormat(renamedOptions);\n const { columnFormat, columnFormatContext } = migrateToColumnFormat(\n renamedOptions.fields as Record<string, CellFormatting>\n );\n const migratedDataOptions = {\n ...(dataOptions?.columns && { table: dataOptions.columns }),\n };\n const formattingOptions = {\n ...(!isEmpty(columnFormat) && { columnFormat }),\n ...(typeof headerVisibility === 'string' && { headerVisibility }),\n tableFormat,\n };\n const migratedOptions = deepMergeWithArrayPrimitiveOverrides(\n {},\n defaultChanges,\n formattingOptions,\n migratedDataOptions,\n renamedOptions\n );\n\n // remove invalid options\n Object.keys(migratedOptions).forEach(key => {\n if (!validOptions[key]) {\n delete migratedOptions[key];\n }\n });\n\n migratedDefinition.context = {\n ...dataContext,\n // columnFormat is optional, but tableFormat is required all cases to preserve some viz.table behavior\n ...(!isEmpty(columnFormatContext) && { ...columnFormatContext }),\n ...tableFormatContext,\n };\n migratedDefinition.options = migratedOptions;\n return migratedDefinition;\n};\n\nexport { migrateVizToSplunkTable };\n","module.exports = require(\"@splunk/visualizations/Table.config\");","module.exports = require(\"@splunk/visualizations-shared/hocUtils\");","import * as _ from 'lodash';\nimport type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Markdown.config';\nimport { renameVizOptions, removeInvalidOptions } from '../utils/migrationUtils';\n\ntype FontWeight = 'normal' | 'bold' | 'light';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst optionsToRename = {\n textColor: 'fontColor',\n content: 'markdown',\n};\n\nconst convertTextContentToMarkDown = (fontWeight: FontWeight, fontSize: number, textContent = ''): string => {\n if (!_.isNumber(fontSize)) {\n return textContent;\n }\n if (textContent.trim().length === 0) {\n return textContent;\n }\n // Remove any trailing newline chars from the content\n let markdownContent = textContent.replace(/\\n*$/, '');\n // Handle text conversion to marker tags based on fontSize and fontWeight\n const regex = /\\n/g; // regex to match /n with global scope across the string\n\n // Convert to paragraph in markdown, if fontSize < 20,\n // If text has fontWeight set to 'bold', add bold tag (**{markdown}**)\n if (fontWeight === 'bold') {\n // Here direct regex replace doesnt work, as we need to remove the\n // extra trailing space if any exist before appending **{markdown}** to the text\n const contentStrings = markdownContent.split('\\n');\n const stringsTrimmed = contentStrings.map(str =>\n str && str.trim().length ? `**${str.trim()}**` : ''\n );\n // Remove all blank entries from the end of the trimmed string array,\n // to avoid `\\` to get rendered, which happens if following line after `\\\\n` is empty)\n let idx = stringsTrimmed.length - 1;\n while (idx >= 0 && stringsTrimmed[idx].length === 0) {\n stringsTrimmed.pop();\n idx -= 1;\n }\n return stringsTrimmed.join('\\\\\\n');\n }\n // If fontWeight is not bold, replace '\\n' with '\\\\n` using regex\n markdownContent = markdownContent.replace(regex, '\\\\\\n');\n return markdownContent;\n};\n\nexport const convertFontSize = (fontSize: number): { fontSize: string; customFontSize?: number } => {\n if (!_.isNumber(fontSize)) {\n return { fontSize: 'default' };\n }\n return { fontSize: 'custom', customFontSize: fontSize };\n};\n\nexport const migrateVizTextToSplunkMarkdown = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, ...otherDefinitionParts } = vizDefinition;\n const { fontSize = 24, fontWeight = 'normal' } = options;\n const migratedVisualization = { options, ...otherDefinitionParts, type: 'splunk.markdown', context: {} };\n\n // perform any option renames\n migratedVisualization.options = renameVizOptions(migratedVisualization.options, optionsToRename);\n const migratedVizOptions = migratedVisualization.options;\n\n // convert text content to respective markdown\n migratedVizOptions.markdown = convertTextContentToMarkDown(\n fontWeight as FontWeight,\n fontSize as number,\n migratedVizOptions.markdown as string\n );\n // convert text fontSize to markdown fontSize\n const { fontSize: fontSizeValue, customFontSize } = convertFontSize(fontSize as number);\n migratedVizOptions.fontSize = fontSizeValue;\n migratedVizOptions.customFontSize = customFontSize;\n\n // remove invalid options using the optionsSchema for splunk.markdown as reference\n removeInvalidOptions(migratedVizOptions, validOptions);\n return migratedVisualization;\n};\n","import type { VisualizationDefinition } from '@splunk/dashboard-types';\nimport config from '@splunk/visualizations/Punchcard.config';\nimport type { EncodingConfig } from '../encoding';\nimport { encodingToDynamicOptionsDSL } from '../encoding';\nimport { renameVizOptions, removeInvalidOptions } from '../utils/migrationUtils';\n\nconst validOptions = {\n ...config.optionsSchema,\n};\n\nconst defaultContext = { ...config.defaultContext };\n\nconst optionsToRename = {\n showBubbleLabels: 'bubbleLabelDisplay',\n bubbleScale: 'bubbleSizeMethod',\n isBubbleSizeDynamic: 'showDynamicBubbleSize',\n maxBubbleRadius: 'bubbleRadiusMax',\n minBubbleRadius: 'bubbleRadiusMin',\n maxBubbleSize: 'bubbleSizeMax',\n minBubbleSize: 'bubbleSizeMin',\n showLegend: 'legendDisplay',\n useDefaultSort: 'showDefaultSort',\n};\n\nconst consolidateLegendDisplay = (vizOptions: Record<string, unknown>): void => {\n if (!vizOptions) {\n return;\n }\n const options = vizOptions;\n if (options.legendDisplay) {\n options.legendDisplay = 'right';\n } else if (options.legendDisplay === false) {\n options.legendDisplay = 'off'; // legenddisplay set explicitly to false\n }\n};\n\nconst consolidateBubbleLabelDisplay = (vizOptions: Record<string, unknown>): void => {\n if (!vizOptions) {\n return;\n }\n const options = vizOptions;\n if (options.bubbleLabelDisplay === 'none') {\n options.bubbleLabelDisplay = 'off';\n }\n};\n\n// Updates the first color of the bubbleColorConfig with the minBubbleColorIntensity\nconst convertGradientConfig = (\n minBubbleColorIntensity: number,\n defaultBubbleColorConfig: Record<string, unknown>\n): Record<string, unknown> => {\n if (\n !defaultBubbleColorConfig ||\n !defaultBubbleColorConfig.colors ||\n !defaultBubbleColorConfig.colors[0] ||\n typeof minBubbleColorIntensity !== 'number'\n ) {\n return null;\n }\n const firstColor = defaultBubbleColorConfig.colors[0] as string;\n const firstColorUpdated = `${firstColor.substring(\n 0,\n firstColor.lastIndexOf(',')\n )},${minBubbleColorIntensity})`;\n const colors = [...(defaultBubbleColorConfig.colors as Array<string>)];\n colors[0] = firstColorUpdated;\n const bubbleColorConfigUpdated = { ...defaultBubbleColorConfig, colors };\n return bubbleColorConfigUpdated;\n};\n\nconst convertColorModeOption = (visualizationDefinition: VisualizationDefinition): void => {\n const visualizationDef = visualizationDefinition;\n if (!visualizationDef || !visualizationDef.options) {\n return;\n }\n\n // Rename the colorMode option from 'sequential' to 'dynamic' if specified\n if (visualizationDef.options.colorMode === 'sequential') {\n visualizationDef.options.colorMode = 'dynamic';\n }\n\n // If no colorMode was specified the default in viz.punchcard used to be 'categorical'.\n // But in splunk.punchcard default is 'dynamic', we need to preserve the original default.\n // Set colorMode to 'categorical' if no colorMode was specified in viz\n if (!visualizationDef.options.colorMode) {\n visualizationDef.options.colorMode = 'categorical';\n }\n\n const { minBubbleColorIntensity } = visualizationDef.options;\n // If there is no category option set or if the colorMode is not categorical, then the colorMode will to 'dynamic'\n // In both cases we need to update the gradient config bubbleColorConfig with the minBubbleColorIntensity for first color\n if (\n (!visualizationDef.options.category || visualizationDef.options.colorMode !== 'categorical') &&\n minBubbleColorIntensity &&\n typeof minBubbleColorIntensity === 'number'\n ) {\n const bubbleColorConfig = convertGradientConfig(\n minBubbleColorIntensity,\n defaultContext.bubbleColorConfig\n );\n if (bubbleColorConfig) {\n visualizationDef.context = { ...visualizationDef.context, bubbleColorConfig };\n }\n }\n};\n\nexport const migrateVizToSplunkPunchcard = (\n vizDefinition: VisualizationDefinition\n): VisualizationDefinition => {\n const { options = {}, encoding = {}, ...otherDefinitionParts } = vizDefinition;\n const migratedVisualization = { options, ...otherDefinitionParts, type: 'splunk.punchcard', context: {} };\n const { options: dataOptions, context: dataContext } = encodingToDynamicOptionsDSL(\n encoding as Record<string, EncodingConfig>\n );\n // perform any option renames\n const renamedOptions = renameVizOptions(migratedVisualization.options, optionsToRename);\n\n consolidateLegendDisplay(renamedOptions);\n consolidateBubbleLabelDisplay(renamedOptions);\n\n migratedVisualization.options = {\n ...renamedOptions,\n ...dataOptions,\n };\n migratedVisualization.context = dataContext;\n\n convertColorModeOption(migratedVisualization);\n // remove invalid options using the optionsSchema for splunk.punchcard as reference\n removeInvalidOptions(migratedVisualization.options, validOptions);\n return migratedVisualization;\n};\n","module.exports = require(\"@splunk/visualizations/Punchcard.config\");"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Migration scripts for visualization definitions",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"author": "Splunk",
|
|
6
|
-
"version": "25.3.
|
|
6
|
+
"version": "25.3.4",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "NODE_ENV=production webpack --config ./webpack.config.js --bail",
|
|
9
9
|
"clean": "yarn clean:webpack && yarn clean:test-reports",
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.13.0",
|
|
23
|
-
"@splunk/visualization-encoding": "^25.3.
|
|
24
|
-
"@splunk/visualization-encoding-parsers": "^25.3.
|
|
25
|
-
"@splunk/visualizations": "^25.3.
|
|
23
|
+
"@splunk/visualization-encoding": "^25.3.4",
|
|
24
|
+
"@splunk/visualization-encoding-parsers": "^25.3.4",
|
|
25
|
+
"@splunk/visualizations": "^25.3.4",
|
|
26
26
|
"lodash": "^4.17.4"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/cli": "^7.13.0",
|
|
30
30
|
"@babel/core": "^7.13.0",
|
|
31
31
|
"@splunk/dashboard-types": "^25.0.0",
|
|
32
|
-
"@splunk/visualization-build-tools": "^25.3.
|
|
32
|
+
"@splunk/visualization-build-tools": "^25.3.4",
|
|
33
33
|
"babel-jest": "^26.0.0",
|
|
34
34
|
"jest": "^26.0.0"
|
|
35
35
|
},
|