@splunk/visualizations 28.5.3 → 28.6.0

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.
Files changed (356) hide show
  1. package/Area/Area.d.ts.map +1 -1
  2. package/Area/areaUtils.d.ts +1 -1
  3. package/Area/areaUtils.d.ts.map +1 -1
  4. package/Area/config.d.ts.map +1 -1
  5. package/Area.config.js +93 -25
  6. package/Area.config.js.map +3 -3
  7. package/Area.js +708 -319
  8. package/Area.js.map +4 -4
  9. package/Bar/Bar.d.ts.map +1 -1
  10. package/Bar.config.js +81 -24
  11. package/Bar.config.js.map +3 -3
  12. package/Bar.js +528 -297
  13. package/Bar.js.map +4 -4
  14. package/Bubble.config.js +80 -23
  15. package/Bubble.config.js.map +2 -2
  16. package/Bubble.js +375 -208
  17. package/Bubble.js.map +4 -4
  18. package/CHANGELOG.external.md +56 -10
  19. package/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts +1 -0
  20. package/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts.map +1 -1
  21. package/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts +12 -25
  22. package/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts.map +1 -1
  23. package/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts +11 -4
  24. package/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts.map +1 -1
  25. package/ChoroplethSvg.js +1133 -253
  26. package/ChoroplethSvg.js.map +4 -4
  27. package/Column/Column.d.ts.map +1 -1
  28. package/Column.config.js +81 -24
  29. package/Column.config.js.map +3 -3
  30. package/Column.js +531 -300
  31. package/Column.js.map +4 -4
  32. package/Ellipse.config.js +1 -1
  33. package/Ellipse.config.js.map +2 -2
  34. package/Ellipse.js +277 -161
  35. package/Ellipse.js.map +4 -4
  36. package/Events/config.d.ts.map +1 -1
  37. package/Events.config.js +13 -3
  38. package/Events.config.js.map +2 -2
  39. package/Events.js +330 -194
  40. package/Events.js.map +4 -4
  41. package/FillerGauge/FillerGauge.d.ts.map +1 -1
  42. package/FillerGauge/config.d.ts.map +1 -1
  43. package/FillerGauge.config.js +76 -24
  44. package/FillerGauge.config.js.map +2 -2
  45. package/FillerGauge.js +512 -271
  46. package/FillerGauge.js.map +4 -4
  47. package/Image/config.d.ts.map +1 -1
  48. package/Image.config.js +7 -0
  49. package/Image.config.js.map +2 -2
  50. package/Image.js +282 -149
  51. package/Image.js.map +4 -4
  52. package/LICENSE +13 -0
  53. package/Line/Line.d.ts.map +1 -1
  54. package/Line/config.d.ts.map +1 -1
  55. package/Line/lineUtils.d.ts.map +1 -1
  56. package/Line/mockdata/LineData.d.ts +21 -0
  57. package/Line/mockdata/LineData.d.ts.map +1 -1
  58. package/Line.config.js +86 -25
  59. package/Line.config.js.map +3 -3
  60. package/Line.js +638 -382
  61. package/Line.js.map +4 -4
  62. package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts +47 -73
  63. package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts.map +1 -1
  64. package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts +11 -2
  65. package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -1
  66. package/LinkGraph/PureLinkGraph/components/Graph.d.ts +5 -5
  67. package/LinkGraph/PureLinkGraph/components/Node.d.ts +2 -2
  68. package/LinkGraph/PureLinkGraph/components/Nodes.d.ts +2 -2
  69. package/LinkGraph.js +886 -759
  70. package/LinkGraph.js.map +4 -4
  71. package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
  72. package/Map/PureMap/Tooltip.d.ts.map +1 -1
  73. package/Map/config.d.ts.map +1 -1
  74. package/Map.config.js +4 -1
  75. package/Map.config.js.map +2 -2
  76. package/Map.js +296 -169
  77. package/Map.js.map +4 -4
  78. package/Markdown/Markdown.d.ts.map +1 -1
  79. package/Markdown.config.js.map +1 -1
  80. package/Markdown.js +283 -157
  81. package/Markdown.js.map +4 -4
  82. package/MarkerGauge/MarkerGauge.d.ts +1 -47
  83. package/MarkerGauge/MarkerGauge.d.ts.map +1 -1
  84. package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts +22 -68
  85. package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts.map +1 -1
  86. package/MarkerGauge/config.d.ts.map +1 -1
  87. package/MarkerGauge.config.js +75 -23
  88. package/MarkerGauge.config.js.map +2 -2
  89. package/MarkerGauge.js +560 -375
  90. package/MarkerGauge.js.map +4 -4
  91. package/NetworkGraph.config.js.map +1 -1
  92. package/NetworkGraph.js +544 -417
  93. package/NetworkGraph.js.map +4 -4
  94. package/ParallelCoordinates.config.js.map +1 -1
  95. package/ParallelCoordinates.js +288 -172
  96. package/ParallelCoordinates.js.map +4 -4
  97. package/Pie/Pie.d.ts.map +1 -1
  98. package/Pie/pieUtils.d.ts +2 -2
  99. package/Pie.config.js +74 -22
  100. package/Pie.config.js.map +2 -2
  101. package/Pie.js +522 -296
  102. package/Pie.js.map +4 -4
  103. package/ProcessTree/ProcessTree.d.ts +21 -0
  104. package/ProcessTree/ProcessTree.d.ts.map +1 -0
  105. package/ProcessTree/PureProcessTree/PureProcessTree.d.ts +32 -0
  106. package/ProcessTree/PureProcessTree/PureProcessTree.d.ts.map +1 -0
  107. package/ProcessTree/PureProcessTree/components/DirectionalBytes.d.ts +8 -0
  108. package/ProcessTree/PureProcessTree/components/DirectionalBytes.d.ts.map +1 -0
  109. package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts +44 -0
  110. package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts.map +1 -0
  111. package/ProcessTree/PureProcessTree/components/ProcessTreeRightPanel.d.ts +20 -0
  112. package/ProcessTree/PureProcessTree/components/ProcessTreeRightPanel.d.ts.map +1 -0
  113. package/ProcessTree/PureProcessTree/hooks/useProcessTreeExpansionState.d.ts +20 -0
  114. package/ProcessTree/PureProcessTree/hooks/useProcessTreeExpansionState.d.ts.map +1 -0
  115. package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts +44 -0
  116. package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts.map +1 -0
  117. package/ProcessTree/PureProcessTree/hooks/useProcessTreeLinkOverlay.d.ts +23 -0
  118. package/ProcessTree/PureProcessTree/hooks/useProcessTreeLinkOverlay.d.ts.map +1 -0
  119. package/ProcessTree/PureProcessTree/mockdata/data.d.ts +235 -0
  120. package/ProcessTree/PureProcessTree/mockdata/data.d.ts.map +1 -0
  121. package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts +9 -0
  122. package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts.map +1 -0
  123. package/ProcessTree/PureProcessTree/utils/processTreeLinkOverlayUtils.d.ts +36 -0
  124. package/ProcessTree/PureProcessTree/utils/processTreeLinkOverlayUtils.d.ts.map +1 -0
  125. package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts +80 -0
  126. package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts.map +1 -0
  127. package/ProcessTree/config.d.ts +4 -0
  128. package/ProcessTree/config.d.ts.map +1 -0
  129. package/ProcessTree/index.d.ts +3 -0
  130. package/ProcessTree/index.d.ts.map +1 -0
  131. package/ProcessTree.config.js +192 -0
  132. package/ProcessTree.config.js.map +7 -0
  133. package/ProcessTree.js +5058 -0
  134. package/ProcessTree.js.map +7 -0
  135. package/Punchcard/Punchcard.d.ts +1 -5
  136. package/Punchcard/Punchcard.d.ts.map +1 -1
  137. package/Punchcard/PurePunchcard/Punchcard.d.ts +28 -32
  138. package/Punchcard/PurePunchcard/Punchcard.d.ts.map +1 -1
  139. package/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts +7 -12
  140. package/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts.map +1 -1
  141. package/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts +14 -19
  142. package/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts.map +1 -1
  143. package/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts +22 -27
  144. package/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts.map +1 -1
  145. package/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts +3 -8
  146. package/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts.map +1 -1
  147. package/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts +9 -14
  148. package/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts.map +1 -1
  149. package/Punchcard/PurePunchcard/src/PunchcardRow.d.ts.map +1 -1
  150. package/Punchcard.config.js.map +1 -1
  151. package/Punchcard.js +444 -631
  152. package/Punchcard.js.map +4 -4
  153. package/Rectangle.config.js +1 -1
  154. package/Rectangle.config.js.map +2 -2
  155. package/Rectangle.js +289 -173
  156. package/Rectangle.js.map +4 -4
  157. package/RichText/PureRichText/Editor/EditorPanel.d.ts +20 -0
  158. package/RichText/PureRichText/Editor/EditorPanel.d.ts.map +1 -0
  159. package/RichText/PureRichText/Editor/EditorPanelStyles.d.ts +17 -0
  160. package/RichText/PureRichText/Editor/EditorPanelStyles.d.ts.map +1 -0
  161. package/RichText/PureRichText/Editor/FontSelector.d.ts +15 -0
  162. package/RichText/PureRichText/Editor/FontSelector.d.ts.map +1 -0
  163. package/RichText/PureRichText/Editor/FormatButton.d.ts +23 -0
  164. package/RichText/PureRichText/Editor/FormatButton.d.ts.map +1 -0
  165. package/RichText/PureRichText/Editor/editorPanelUtils.d.ts +19 -0
  166. package/RichText/PureRichText/Editor/editorPanelUtils.d.ts.map +1 -0
  167. package/RichText/PureRichText/Editor/hooks/useLineSpacing.d.ts +11 -0
  168. package/RichText/PureRichText/Editor/hooks/useLineSpacing.d.ts.map +1 -0
  169. package/RichText/PureRichText/Editor/hooks/useLinkHandlers.d.ts +26 -0
  170. package/RichText/PureRichText/Editor/hooks/useLinkHandlers.d.ts.map +1 -0
  171. package/RichText/PureRichText/Editor/index.d.ts +9 -0
  172. package/RichText/PureRichText/Editor/index.d.ts.map +1 -0
  173. package/RichText/PureRichText/InnerEditor.d.ts +41 -0
  174. package/RichText/PureRichText/InnerEditor.d.ts.map +1 -0
  175. package/RichText/PureRichText/PureRichText.d.ts +19 -0
  176. package/RichText/PureRichText/PureRichText.d.ts.map +1 -0
  177. package/RichText/PureRichText/PureRichTextContext.d.ts +64 -0
  178. package/RichText/PureRichText/PureRichTextContext.d.ts.map +1 -0
  179. package/RichText/PureRichText/RichTextStyles.d.ts +25 -0
  180. package/RichText/PureRichText/RichTextStyles.d.ts.map +1 -0
  181. package/RichText/PureRichText/activeInstance.d.ts +23 -0
  182. package/RichText/PureRichText/activeInstance.d.ts.map +1 -0
  183. package/RichText/PureRichText/config.d.ts +17 -0
  184. package/RichText/PureRichText/config.d.ts.map +1 -0
  185. package/RichText/PureRichText/hooks/index.d.ts +12 -0
  186. package/RichText/PureRichText/hooks/index.d.ts.map +1 -0
  187. package/RichText/PureRichText/hooks/useContentSave.d.ts +25 -0
  188. package/RichText/PureRichText/hooks/useContentSave.d.ts.map +1 -0
  189. package/RichText/PureRichText/hooks/useContentSync.d.ts +28 -0
  190. package/RichText/PureRichText/hooks/useContentSync.d.ts.map +1 -0
  191. package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts +33 -0
  192. package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts.map +1 -0
  193. package/RichText/PureRichText/hooks/useEditModeEffect.d.ts +10 -0
  194. package/RichText/PureRichText/hooks/useEditModeEffect.d.ts.map +1 -0
  195. package/RichText/PureRichText/hooks/useEditorSetup.d.ts +36 -0
  196. package/RichText/PureRichText/hooks/useEditorSetup.d.ts.map +1 -0
  197. package/RichText/PureRichText/hooks/useFakeHighlight.d.ts +33 -0
  198. package/RichText/PureRichText/hooks/useFakeHighlight.d.ts.map +1 -0
  199. package/RichText/PureRichText/hooks/useFocusHandlers.d.ts +35 -0
  200. package/RichText/PureRichText/hooks/useFocusHandlers.d.ts.map +1 -0
  201. package/RichText/PureRichText/hooks/useKeyboardShortcuts.d.ts +18 -0
  202. package/RichText/PureRichText/hooks/useKeyboardShortcuts.d.ts.map +1 -0
  203. package/RichText/PureRichText/hooks/useMouseHandlers.d.ts +24 -0
  204. package/RichText/PureRichText/hooks/useMouseHandlers.d.ts.map +1 -0
  205. package/RichText/PureRichText/hooks/useRichTextState.d.ts +38 -0
  206. package/RichText/PureRichText/hooks/useRichTextState.d.ts.map +1 -0
  207. package/RichText/PureRichText/hooks/useStepFontSize.d.ts +17 -0
  208. package/RichText/PureRichText/hooks/useStepFontSize.d.ts.map +1 -0
  209. package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts +18 -0
  210. package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts.map +1 -0
  211. package/RichText/PureRichText/hooks/useTokenMap.d.ts +45 -0
  212. package/RichText/PureRichText/hooks/useTokenMap.d.ts.map +1 -0
  213. package/RichText/PureRichText/index.d.ts +16 -0
  214. package/RichText/PureRichText/index.d.ts.map +1 -0
  215. package/RichText/PureRichText/renderers/ElementRenderer.d.ts +8 -0
  216. package/RichText/PureRichText/renderers/ElementRenderer.d.ts.map +1 -0
  217. package/RichText/PureRichText/renderers/LeafRenderer.d.ts +8 -0
  218. package/RichText/PureRichText/renderers/LeafRenderer.d.ts.map +1 -0
  219. package/RichText/PureRichText/types.d.ts +111 -0
  220. package/RichText/PureRichText/types.d.ts.map +1 -0
  221. package/RichText/PureRichText/utils/a11yUtils.d.ts +9 -0
  222. package/RichText/PureRichText/utils/a11yUtils.d.ts.map +1 -0
  223. package/RichText/PureRichText/utils/fontSize.d.ts +6 -0
  224. package/RichText/PureRichText/utils/fontSize.d.ts.map +1 -0
  225. package/RichText/PureRichText/utils/slateUtils.d.ts +99 -0
  226. package/RichText/PureRichText/utils/slateUtils.d.ts.map +1 -0
  227. package/RichText/RichText.d.ts +17 -0
  228. package/RichText/RichText.d.ts.map +1 -0
  229. package/RichText/config.d.ts +4 -0
  230. package/RichText/config.d.ts.map +1 -0
  231. package/RichText/index.d.ts +7 -0
  232. package/RichText/index.d.ts.map +1 -0
  233. package/RichText.config.js +268 -0
  234. package/RichText.config.js.map +7 -0
  235. package/RichText.js +7674 -0
  236. package/RichText.js.map +7 -0
  237. package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
  238. package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
  239. package/Sankey/PureSankey/SankeyNode.d.ts +10 -3
  240. package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
  241. package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
  242. package/Sankey/PureSankey/SankeyUtils.d.ts +10 -0
  243. package/Sankey/PureSankey/SankeyUtils.d.ts.map +1 -1
  244. package/Sankey.config.js.map +1 -1
  245. package/Sankey.js +562 -290
  246. package/Sankey.js.map +4 -4
  247. package/Scatter/Scatter.d.ts.map +1 -1
  248. package/Scatter.config.js +81 -24
  249. package/Scatter.config.js.map +3 -3
  250. package/Scatter.js +528 -297
  251. package/Scatter.js.map +4 -4
  252. package/SingleValue/SingleValue.d.ts.map +1 -1
  253. package/SingleValue/config.d.ts.map +1 -1
  254. package/SingleValue.config.js +76 -24
  255. package/SingleValue.config.js.map +2 -2
  256. package/SingleValue.js +534 -314
  257. package/SingleValue.js.map +4 -4
  258. package/SingleValueBasic.js.map +1 -1
  259. package/SingleValueIcon/SingleValueIcon.d.ts.map +1 -1
  260. package/SingleValueIcon/config.d.ts.map +1 -1
  261. package/SingleValueIcon.config.js +76 -24
  262. package/SingleValueIcon.config.js.map +2 -2
  263. package/SingleValueIcon.js +512 -287
  264. package/SingleValueIcon.js.map +4 -4
  265. package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts +0 -8
  266. package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts.map +1 -1
  267. package/SingleValueRadial/SingleValueRadial.d.ts.map +1 -1
  268. package/SingleValueRadial/config.d.ts.map +1 -1
  269. package/SingleValueRadial.config.js +76 -24
  270. package/SingleValueRadial.config.js.map +2 -2
  271. package/SingleValueRadial.js +543 -326
  272. package/SingleValueRadial.js.map +4 -4
  273. package/TRELLIS.md +48 -0
  274. package/Table/PureTable.d.ts +1 -0
  275. package/Table/PureTable.d.ts.map +1 -1
  276. package/Table/Table.d.ts.map +1 -1
  277. package/Table/cells/ArrayCell.d.ts.map +1 -1
  278. package/Table/config.d.ts.map +1 -1
  279. package/Table/hooks.d.ts.map +1 -1
  280. package/Table/tableUtils.d.ts +14 -0
  281. package/Table/tableUtils.d.ts.map +1 -0
  282. package/Table.config.js +4 -10
  283. package/Table.config.js.map +2 -2
  284. package/Table.js +769 -355
  285. package/Table.js.map +4 -4
  286. package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
  287. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +5 -0
  288. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
  289. package/Timeline/Timeline.d.ts +2 -0
  290. package/Timeline/Timeline.d.ts.map +1 -1
  291. package/Timeline/config.d.ts.map +1 -1
  292. package/Timeline/mockdata/timelineDataSource.d.ts +34 -0
  293. package/Timeline/mockdata/timelineDataSource.d.ts.map +1 -1
  294. package/Timeline.config.js +15 -0
  295. package/Timeline.config.js.map +2 -2
  296. package/Timeline.js +348 -186
  297. package/Timeline.js.map +4 -4
  298. package/common/Charting.d.ts.map +1 -1
  299. package/common/Charting.js +50 -28
  300. package/common/Charting.js.map +2 -2
  301. package/common/ChartingApi.d.ts +1 -1
  302. package/common/ChartingApi.d.ts.map +1 -1
  303. package/common/ChartingApi.js.map +2 -2
  304. package/common/DocExampleWithVizSandbox.js.map +1 -1
  305. package/common/OptionsDoc.js.map +1 -1
  306. package/common/OverviewDoc.js.map +1 -1
  307. package/common/SplunkVisualization.d.ts +1 -1
  308. package/common/SplunkVisualization.d.ts.map +1 -1
  309. package/common/SplunkVisualization.js +6 -4
  310. package/common/SplunkVisualization.js.map +2 -2
  311. package/common/StyledSkipLink.d.ts +2 -0
  312. package/common/StyledSkipLink.d.ts.map +1 -0
  313. package/common/StyledSkipLink.js +81 -0
  314. package/common/StyledSkipLink.js.map +7 -0
  315. package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
  316. package/common/TimeSeriesChartWrapper.js +228 -107
  317. package/common/TimeSeriesChartWrapper.js.map +4 -4
  318. package/common/chartingUtils.d.ts +32 -6
  319. package/common/chartingUtils.d.ts.map +1 -1
  320. package/common/chartingUtils.js +166 -39
  321. package/common/chartingUtils.js.map +4 -4
  322. package/common/components/TrellisTitle.d.ts.map +1 -1
  323. package/common/docUtils.js +1 -1
  324. package/common/docUtils.js.map +2 -2
  325. package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
  326. package/common/editorConfig/AxesChartYGridAndLabels.d.ts.map +1 -1
  327. package/common/editorConfig/BackgroundColor.d.ts +2 -2
  328. package/common/editorConfig/TrellisEditors.d.ts +33 -5
  329. package/common/editorConfig/TrellisEditors.d.ts.map +1 -1
  330. package/common/hocs/mockdata/trellisData.d.ts +54 -0
  331. package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
  332. package/common/hocs/withTrellis.d.ts +9 -0
  333. package/common/hocs/withTrellis.d.ts.map +1 -1
  334. package/common/hooks/useSorting.d.ts +2 -2
  335. package/common/hooks/useSorting.d.ts.map +1 -1
  336. package/common/shapeUtils.d.ts +1 -1
  337. package/common/shapeUtils.d.ts.map +1 -1
  338. package/common/shapeUtils.js.map +2 -2
  339. package/common/utils/dataUtils.js +2 -1
  340. package/common/utils/dataUtils.js.map +2 -2
  341. package/common/utils/focusUtils.d.ts +4 -0
  342. package/common/utils/focusUtils.d.ts.map +1 -0
  343. package/common/utils/focusUtils.js +101 -0
  344. package/common/utils/focusUtils.js.map +7 -0
  345. package/common/utils/mapUtils.js +2 -6
  346. package/common/utils/mapUtils.js.map +2 -2
  347. package/common/utils/singleValueUtils.js +14 -26
  348. package/common/utils/singleValueUtils.js.map +2 -2
  349. package/common/utils/trellisUtils.d.ts.map +1 -1
  350. package/common/utils/trellisUtils.js +76 -70
  351. package/common/utils/trellisUtils.js.map +2 -2
  352. package/common/withDashboardViz.d.ts.map +1 -1
  353. package/common/withDashboardViz.js +276 -151
  354. package/common/withDashboardViz.js.map +4 -4
  355. package/package.json +32 -27
  356. package/LICENSE.md +0 -449
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/Events/config.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;;AAyH3D,wBAAqC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/Events/config.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;;AAoI3D,wBAAqC"}
package/Events.config.js CHANGED
@@ -180,14 +180,14 @@ var dataContract = {
180
180
  ],
181
181
  initialRequestParams: {
182
182
  primary: (options = {}) => {
183
- var _a;
183
+ var _a, _b, _c;
184
184
  return {
185
185
  offset: 0,
186
- count: options.count ? options.count : 10,
186
+ count: Math.max(1, Math.floor((_b = (_a = options.pageCount) != null ? _a : options.count) != null ? _b : 10)),
187
187
  requestTotalCount: true,
188
188
  // this is needed for search-based event highlighting
189
189
  output_mode: "json",
190
- segmentation: (_a = options.highlightFromSource) != null ? _a : "none"
190
+ segmentation: (_c = options.highlightFromSource) != null ? _c : "none"
191
191
  };
192
192
  }
193
193
  }
@@ -203,6 +203,16 @@ var editorConfig = [
203
203
  {
204
204
  label: (0, i18n_exports._)("Data display"),
205
205
  layout: [
206
+ [
207
+ {
208
+ label: (0, i18n_exports._)("Rows per page"),
209
+ option: "pageCount",
210
+ editor: "editor.number",
211
+ editorProps: {
212
+ min: 1
213
+ }
214
+ }
215
+ ],
206
216
  [
207
217
  {
208
218
  label: (0, i18n_exports._)("Show field summary"),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["src/Events/config.ts", "esm-externals:@splunk/visualization-icons", "esm-externals:@splunk/visualization-icons/placeholders", "esm-externals:@splunk/visualization-schemas", "esm-externals:@splunk/ui-utils/i18n", "esm-externals:lodash", "esm-externals:@splunk/visualizations-shared/configUtils", "src/common/utils/configUtils.ts", "src/common/editorConfig/BackgroundColor.ts", "esm-externals:@splunk/themes/pick", "esm-externals:@splunk/themes/variables", "src/common/ThemedDefaults.tsx"],
4
- "sourcesContent": ["import { Events as EventsIcon } from '@splunk/visualization-icons';\nimport { Events as EventsPlaceholderIcon } from '@splunk/visualization-icons/placeholders';\nimport { eventsOptionsSchema as optionsSchema } from '@splunk/visualization-schemas';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { DataContract } from '../common/interfaces/DataContract';\nimport { DefaultContext } from '../common/interfaces/DefaultContext';\nimport { SegmentationType } from '../common/interfaces/DataSource';\nimport { EditorConfig } from '../common/interfaces/Editor';\nimport { ThemedDefaults } from '../common/interfaces/ThemedDefaults';\nimport { VizBehavior } from '../common/interfaces/VizBehavior';\nimport { VizCategory } from '../common/interfaces/VizCategory';\nimport { VizConfig } from '../common/interfaces/VizConfig';\nimport { VizSize } from '../common/interfaces/VizSize';\nimport { enhanceConfig } from '../common/utils/configUtils';\nimport getBackgroundColorEditor from '../common/editorConfig/BackgroundColor';\nimport { defaultBackgroundColor } from '../common/ThemedDefaults';\n\nconst defaultContext: DefaultContext = {};\n\nconst dataContract: DataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [\n {\n name: 'fieldsummary',\n description: 'DataSource that powers the field summary popover on field click',\n },\n ],\n initialRequestParams: {\n primary: (\n options: {\n count?: number;\n highlightFromSource?: SegmentationType;\n } = {}\n ): Record<string, unknown> => ({\n offset: 0,\n count: options.count ? options.count : 10,\n requestTotalCount: true,\n // this is needed for search-based event highlighting\n output_mode: 'json',\n segmentation: options.highlightFromSource ?? 'none',\n }),\n },\n};\n\nconst size: VizSize = {\n initialWidth: 800,\n initialHeight: 500,\n};\n\nconst themes: ThemedDefaults = {\n defaultBackgroundColor,\n};\n\nconst editorConfig: EditorConfig[] = [\n {\n label: _('Data display'),\n layout: [\n [\n {\n label: _('Show field summary'),\n option: 'showFieldSummary',\n editor: 'editor.checkbox',\n editorProps: {\n labelPosition: 'right',\n },\n },\n ],\n ],\n },\n {\n label: _('Color and style'),\n layout: [getBackgroundColorEditor({ themes })],\n },\n];\n\n/**\n * visualization configuration\n */\nconst config: VizConfig = {\n /**\n * unique viz key\n */\n key: 'splunk.events',\n /**\n * viz name\n */\n name: _('Events'),\n category: VizCategory.TABLE,\n status: 'preview',\n /**\n * viz icon\n */\n icon: EventsIcon,\n placeholderIcon: EventsPlaceholderIcon,\n dataContract,\n size,\n defaultContext,\n optionsSchema,\n editorConfig,\n events: {\n 'eventAction.<actionName>.click': {\n description:\n 'Triggered when a user selects the Event Actions button within an event. An application developer can configure workflow action retrieval and event handling, as described in the Concepts tab.',\n },\n 'fieldAction.<actionName>.click': {\n description:\n 'Triggered when a user selects an arrow under the Actions column heading. Application developers can configure workflow action retrieval and event handling. For more information, see the Concepts tab.',\n },\n 'events.search.<fieldSummaryReportActionName>': {\n description:\n 'Triggered when a user selects a report action in the field summary of an event. Application developers must pass context and handle events in their applications. For more information, see the Concepts tab.',\n },\n 'value.click': {\n description: 'Triggered when a user clicks a value in an event.',\n },\n 'time.click': {\n description: 'Triggered when a user clicks to drilldown in the time controls popover.',\n },\n 'tag.click': {\n description: 'Triggered when a user clicks a tag in an event.',\n },\n },\n supports: [VizBehavior.DYNAMIC_OPTIONS, VizBehavior.EVENTS, VizBehavior.PLACEHOLDER],\n themes,\n requiredProps: [],\n};\n\nexport default enhanceConfig(config);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons\";\nexport * from \"@splunk/visualization-icons\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons/placeholders\";\nexport * from \"@splunk/visualization-icons/placeholders\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-schemas\";\nexport * from \"@splunk/visualization-schemas\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/ui-utils/i18n\";\nexport * from \"@splunk/ui-utils/i18n\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"lodash\";\nexport * from \"lodash\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualizations-shared/configUtils\";\nexport * from \"@splunk/visualizations-shared/configUtils\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import { get, range } from 'lodash';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\n// included for backwards compatibility\nexport { enhanceOptionsSchemaWithDynamicOptions } from '@splunk/visualization-schemas';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\n/**\n * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block\n * this function also collapse all editor panels\n * @param vizConfig a Visualization Config\n * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports\n * and containing `open: false` for all editor panels in editorConfig\n */\nfunction enhanceConfig(vizConfig: VizConfig): VizConfig {\n const enhancedConfig: VizConfig = { ...vizConfig };\n\n enhancedConfig.editorConfig = vizConfig.editorConfig.map((config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n });\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport { enhanceConfig, getInitialPreset, generatePrecisionValues, uncollapseEditorConfig, isDynamicOption };\n\n/**\n * insert layout in layout array, return a new layout array instead of updating the original\n *\n * @param {EditorLayoutConfig[][]} layout - editor layout\n * @param {Number} index - the index to insert layout item(s)\n * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert\n * @returns {EditorLayoutConfig[][]} new editor layout with insertion\n */\nexport const insertLayout = (\n layout: EditorLayoutConfig[][],\n index: number,\n ...layoutItems: EditorLayoutConfig[][]\n): EditorLayoutConfig[][] => [\n // copy part of the array before the specified index\n ...layout.slice(0, index),\n // inserted layout item\n ...layoutItems,\n // copy part of the array after the specified index\n ...layout.slice(index),\n];\n", "import { _ } from '@splunk/ui-utils/i18n';\nimport { EditorLayoutConfig } from '../interfaces/Editor';\nimport { ThemedDefaults } from '../interfaces/ThemedDefaults';\n\ninterface backgroundEditorProps {\n label?: string;\n themes: ThemedDefaults;\n labelPosition?: string;\n}\n\nconst background: ({ label, themes, labelPosition }: backgroundEditorProps) => EditorLayoutConfig[] = ({\n label,\n themes,\n labelPosition,\n}) => [\n {\n label: _(label || 'Background color'),\n option: 'backgroundColor',\n editor: 'editor.color',\n editorProps: {\n labelPosition: labelPosition || 'top',\n themes,\n },\n },\n];\n\nexport default background;\n", "\nimport * as defaultImport from \"@splunk/themes/pick\";\nexport * from \"@splunk/themes/pick\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/themes/variables\";\nexport * from \"@splunk/themes/variables\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import pick from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\n\nexport const defaultBackgroundColor = props =>\n pick({\n enterprise: {\n dark: variables.black(props),\n light: variables.white(props),\n },\n prisma: variables.backgroundColorSection(props),\n })(props);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAC/B,wCAAc;AACd,IAAO,8BAAS,aAAa,gBAA8B,wBAAU;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAA,iBAA+B;AAC/B,iCAAc;AACd,IAAO,uBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,0CAAc;AACd,IAAO,gCAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,yBAAc;AACd,IAAO,eAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,2BAAc;AACd,IAAO,iBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,gCAAc;AACd,IAAO,sBAAS,aAAaA,iBAA8B,yBAAUA;;;ACkBrE,S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,gGAAyE;AAAA,EACnF;AAAA,EACA,eAAe,CAAC;AACpB;AAEA,IAAO,iBAAQ,cAAc,MAAM;",
4
+ "sourcesContent": ["import { Events as EventsIcon } from '@splunk/visualization-icons';\nimport { Events as EventsPlaceholderIcon } from '@splunk/visualization-icons/placeholders';\nimport { eventsOptionsSchema as optionsSchema } from '@splunk/visualization-schemas';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { DataContract } from '../common/interfaces/DataContract';\nimport { DefaultContext } from '../common/interfaces/DefaultContext';\nimport { SegmentationType } from '../common/interfaces/DataSource';\nimport { EditorConfig } from '../common/interfaces/Editor';\nimport { ThemedDefaults } from '../common/interfaces/ThemedDefaults';\nimport { VizBehavior } from '../common/interfaces/VizBehavior';\nimport { VizCategory } from '../common/interfaces/VizCategory';\nimport { VizConfig } from '../common/interfaces/VizConfig';\nimport { VizSize } from '../common/interfaces/VizSize';\nimport { enhanceConfig } from '../common/utils/configUtils';\nimport getBackgroundColorEditor from '../common/editorConfig/BackgroundColor';\nimport { defaultBackgroundColor } from '../common/ThemedDefaults';\n\nconst defaultContext: DefaultContext = {};\n\nconst dataContract: DataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [\n {\n name: 'fieldsummary',\n description: 'DataSource that powers the field summary popover on field click',\n },\n ],\n initialRequestParams: {\n primary: (\n options: {\n count?: number;\n pageCount?: number;\n highlightFromSource?: SegmentationType;\n } = {}\n ): Record<string, unknown> => ({\n offset: 0,\n count: Math.max(1, Math.floor(options.pageCount ?? options.count ?? 10)),\n requestTotalCount: true,\n // this is needed for search-based event highlighting\n output_mode: 'json',\n segmentation: options.highlightFromSource ?? 'none',\n }),\n },\n};\n\nconst size: VizSize = {\n initialWidth: 800,\n initialHeight: 500,\n};\n\nconst themes: ThemedDefaults = {\n defaultBackgroundColor,\n};\n\nconst editorConfig: EditorConfig[] = [\n {\n label: _('Data display'),\n layout: [\n [\n {\n label: _('Rows per page'),\n option: 'pageCount',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n },\n ],\n [\n {\n label: _('Show field summary'),\n option: 'showFieldSummary',\n editor: 'editor.checkbox',\n editorProps: {\n labelPosition: 'right',\n },\n },\n ],\n ],\n },\n {\n label: _('Color and style'),\n layout: [getBackgroundColorEditor({ themes })],\n },\n];\n\n/**\n * visualization configuration\n */\nconst config: VizConfig = {\n /**\n * unique viz key\n */\n key: 'splunk.events',\n /**\n * viz name\n */\n name: _('Events'),\n category: VizCategory.TABLE,\n status: 'preview',\n /**\n * viz icon\n */\n icon: EventsIcon,\n placeholderIcon: EventsPlaceholderIcon,\n dataContract,\n size,\n defaultContext,\n optionsSchema,\n editorConfig,\n events: {\n 'eventAction.<actionName>.click': {\n description:\n 'Triggered when a user selects the Event Actions button within an event. An application developer can configure workflow action retrieval and event handling, as described in the Concepts tab.',\n },\n 'fieldAction.<actionName>.click': {\n description:\n 'Triggered when a user selects an arrow under the Actions column heading. Application developers can configure workflow action retrieval and event handling. For more information, see the Concepts tab.',\n },\n 'events.search.<fieldSummaryReportActionName>': {\n description:\n 'Triggered when a user selects a report action in the field summary of an event. Application developers must pass context and handle events in their applications. For more information, see the Concepts tab.',\n },\n 'value.click': {\n description: 'Triggered when a user clicks a value in an event.',\n },\n 'time.click': {\n description: 'Triggered when a user clicks to drilldown in the time controls popover.',\n },\n 'tag.click': {\n description: 'Triggered when a user clicks a tag in an event.',\n },\n },\n supports: [VizBehavior.DYNAMIC_OPTIONS, VizBehavior.EVENTS, VizBehavior.PLACEHOLDER],\n themes,\n requiredProps: [],\n};\n\nexport default enhanceConfig(config);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons\";\nexport * from \"@splunk/visualization-icons\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons/placeholders\";\nexport * from \"@splunk/visualization-icons/placeholders\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-schemas\";\nexport * from \"@splunk/visualization-schemas\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/ui-utils/i18n\";\nexport * from \"@splunk/ui-utils/i18n\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"lodash\";\nexport * from \"lodash\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualizations-shared/configUtils\";\nexport * from \"@splunk/visualizations-shared/configUtils\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import { get, range } from 'lodash';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\n// included for backwards compatibility\nexport { enhanceOptionsSchemaWithDynamicOptions } from '@splunk/visualization-schemas';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\n/**\n * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block\n * this function also collapse all editor panels\n * @param vizConfig a Visualization Config\n * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports\n * and containing `open: false` for all editor panels in editorConfig\n */\nfunction enhanceConfig(vizConfig: VizConfig): VizConfig {\n const enhancedConfig: VizConfig = { ...vizConfig };\n\n enhancedConfig.editorConfig = vizConfig.editorConfig.map((config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n });\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport { enhanceConfig, getInitialPreset, generatePrecisionValues, uncollapseEditorConfig, isDynamicOption };\n\n/**\n * insert layout in layout array, return a new layout array instead of updating the original\n *\n * @param {EditorLayoutConfig[][]} layout - editor layout\n * @param {Number} index - the index to insert layout item(s)\n * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert\n * @returns {EditorLayoutConfig[][]} new editor layout with insertion\n */\nexport const insertLayout = (\n layout: EditorLayoutConfig[][],\n index: number,\n ...layoutItems: EditorLayoutConfig[][]\n): EditorLayoutConfig[][] => [\n // copy part of the array before the specified index\n ...layout.slice(0, index),\n // inserted layout item\n ...layoutItems,\n // copy part of the array after the specified index\n ...layout.slice(index),\n];\n", "import { _ } from '@splunk/ui-utils/i18n';\nimport { EditorLayoutConfig } from '../interfaces/Editor';\nimport { ThemedDefaults } from '../interfaces/ThemedDefaults';\n\ninterface BackgroundEditorProps {\n label?: string;\n themes: ThemedDefaults;\n labelPosition?: string;\n}\n\nconst background: ({ label, themes, labelPosition }: BackgroundEditorProps) => EditorLayoutConfig[] = ({\n label,\n themes,\n labelPosition,\n}) => [\n {\n label: _(label || 'Background color'),\n option: 'backgroundColor',\n editor: 'editor.color',\n editorProps: {\n labelPosition: labelPosition || 'top',\n themes,\n },\n },\n];\n\nexport default background;\n", "\nimport * as defaultImport from \"@splunk/themes/pick\";\nexport * from \"@splunk/themes/pick\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/themes/variables\";\nexport * from \"@splunk/themes/variables\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import pick from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\n\nexport const defaultBackgroundColor = props =>\n pick({\n enterprise: {\n dark: variables.black(props),\n light: variables.white(props),\n },\n prisma: variables.backgroundColorSection(props),\n })(props);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAC/B,wCAAc;AACd,IAAO,8BAAS,aAAa,gBAA8B,wBAAU;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAA,iBAA+B;AAC/B,iCAAc;AACd,IAAO,uBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,0CAAc;AACd,IAAO,gCAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,yBAAc;AACd,IAAO,eAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,2BAAc;AACd,IAAO,iBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,gCAAc;AACd,IAAO,sBAAS,aAAaA,iBAA8B,yBAAUA;;;ACkBrE,SAAS,cAA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A,gDAAgD;AAAA,MAC5C,aACI;AAAA,IACR;AAAA,IACA,eAAe;AAAA,MACX,aAAa;AAAA,IACjB;AAAA,IACA,cAAc;AAAA,MACV,aAAa;AAAA,IACjB;AAAA,IACA,aAAa;AAAA,MACT,aAAa;AAAA,IACjB;AAAA,EACJ;AAAA,EACA,UAAU,gGAAyE;AAAA,EACnF;AAAA,EACA,eAAe,CAAC;AACpB;AAEA,IAAO,iBAAQ,cAAc,MAAM;",
6
6
  "names": ["defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "config", "themes", "defaultImport", "defaultImport", "EventsIcon", "EventsPlaceholderIcon", "optionsSchema"]
7
7
  }