@splunk/visualizations 25.5.0 → 25.7.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 (237) hide show
  1. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_TimeControlsPopover_Dark.png +0 -0
  2. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_TimeControlsPopover_DarkPrisma.png +0 -0
  3. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_TimeControlsPopover_Light.png +0 -0
  4. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
  5. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
  6. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
  7. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
  8. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
  9. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
  10. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
  11. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
  12. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
  13. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
  14. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
  15. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
  16. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
  17. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
  18. package/.loki/reference/chrome_docker_Visualizations_Bar_Bar_Legend_Mode_Series_Compare.png +0 -0
  19. package/.loki/reference/chrome_docker_Visualizations_Column_Column_Legend_Mode_Series_Compare.png +0 -0
  20. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Background_Color_Light_Blue.png +0 -0
  21. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Basic_Events.png +0 -0
  22. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Event_Actions.png +0 -0
  23. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Actions.png +0 -0
  24. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary.png +0 -0
  25. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary_Simulated_Instance.png +0 -0
  26. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields.png +0 -0
  27. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Value_Highlighting.png +0 -0
  28. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Height.png +0 -0
  29. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Percentage_50.png +0 -0
  30. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_Pagination.png +0 -0
  31. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_background_color.png +0 -0
  32. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status.png +0 -0
  33. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status_user.png +0 -0
  34. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
  35. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
  36. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
  37. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_layout_options.png +0 -0
  38. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_makeresults_name_age.png +0 -0
  39. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_makeresults_name_age_aggregations.png +0 -0
  40. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
  41. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
  42. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_count_by_status_user.png +0 -0
  43. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
  44. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_table.png +0 -0
  45. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_table_aggregations.png +0 -0
  46. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_aggregations.png +0 -0
  47. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_by_status.png +0 -0
  48. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
  49. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
  50. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Chart.png +0 -0
  51. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Chart_Count.png +0 -0
  52. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Pagination.png +0 -0
  53. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Timechart.png +0 -0
  54. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_background_color.png +0 -0
  55. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
  56. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
  57. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
  58. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_layout_options.png +0 -0
  59. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_makeresults_name_age.png +0 -0
  60. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_makeresults_name_age_aggregations.png +0 -0
  61. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
  62. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_count_by_status_user.png +0 -0
  63. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
  64. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_table.png +0 -0
  65. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_table_aggregations.png +0 -0
  66. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_count_aggregations.png +0 -0
  67. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
  68. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
  69. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
  70. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_Pagination.png +0 -0
  71. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_assign_default_trellisSplitBy_value_status.png +0 -0
  72. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_background_color.png +0 -0
  73. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_avg_count_max_count_by_status.png +0 -0
  74. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_avg_count_max_count_by_status_value_by_max_count.png +0 -0
  75. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status.png +0 -0
  76. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user.png +0 -0
  77. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
  78. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user_user.png +0 -0
  79. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
  80. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user.png +0 -0
  81. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
  82. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user_user.png +0 -0
  83. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_layout_options.png +0 -0
  84. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_makeresults_name_age.png +0 -0
  85. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_makeresults_name_age_aggregations.png +0 -0
  86. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
  87. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status.png +0 -0
  88. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
  89. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_value_by_max_count.png +0 -0
  90. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_count_by_status_user.png +0 -0
  91. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
  92. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_table.png +0 -0
  93. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_table_aggregations.png +0 -0
  94. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_aggregations.png +0 -0
  95. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_by_status.png +0 -0
  96. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
  97. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_max_count_avg_count_by_status.png +0 -0
  98. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
  99. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Major_value_data_null_show_N_A.png +0 -0
  100. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_The_Background_Color_Based_On_The_Major_Value_Trellis.png +0 -0
  101. package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage.png +0 -0
  102. package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage_100_no_paginator.png +0 -0
  103. package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage_50_no_paginator.png +0 -0
  104. package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline.png +0 -0
  105. package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline_Custom.png +0 -0
  106. package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline_Width.png +0 -0
  107. package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparklines_Adv.png +0 -0
  108. package/Area.config.js +12 -7
  109. package/Area.config.js.map +1 -1
  110. package/Area.js +330 -226
  111. package/Area.js.map +1 -1
  112. package/Bar.config.js +36 -8
  113. package/Bar.config.js.map +1 -1
  114. package/Bar.js +354 -227
  115. package/Bar.js.map +1 -1
  116. package/Bubble.config.js +7 -2
  117. package/Bubble.config.js.map +1 -1
  118. package/Bubble.js +318 -214
  119. package/Bubble.js.map +1 -1
  120. package/ChoroplethSvg.config.js +12 -8
  121. package/ChoroplethSvg.config.js.map +1 -1
  122. package/ChoroplethSvg.js +324 -229
  123. package/ChoroplethSvg.js.map +1 -1
  124. package/Column.config.js +36 -8
  125. package/Column.config.js.map +1 -1
  126. package/Column.js +354 -227
  127. package/Column.js.map +1 -1
  128. package/Ellipse.config.js +23 -20
  129. package/Ellipse.config.js.map +1 -1
  130. package/Ellipse.js +289 -187
  131. package/Ellipse.js.map +1 -1
  132. package/Events.config.js +82 -19
  133. package/Events.config.js.map +1 -1
  134. package/Events.js +1276 -416
  135. package/Events.js.map +1 -1
  136. package/FEATUREFLAGS.md +40 -0
  137. package/FillerGauge.config.js +22 -19
  138. package/FillerGauge.config.js.map +1 -1
  139. package/FillerGauge.js +311 -204
  140. package/FillerGauge.js.map +1 -1
  141. package/Image.config.js +3 -3
  142. package/Image.config.js.map +1 -1
  143. package/Image.js +249 -151
  144. package/Image.js.map +1 -1
  145. package/LICENSE.md +444 -8
  146. package/Line.config.js +12 -7
  147. package/Line.config.js.map +1 -1
  148. package/Line.js +335 -226
  149. package/Line.js.map +1 -1
  150. package/LinkGraph.config.js +9 -15
  151. package/LinkGraph.config.js.map +1 -1
  152. package/LinkGraph.js +881 -790
  153. package/LinkGraph.js.map +1 -1
  154. package/Map.config.js +51 -48
  155. package/Map.config.js.map +1 -1
  156. package/Map.js +804 -711
  157. package/Map.js.map +1 -1
  158. package/Markdown.config.js +10 -9
  159. package/Markdown.config.js.map +1 -1
  160. package/Markdown.js +365 -266
  161. package/Markdown.js.map +1 -1
  162. package/MarkerGauge.config.js +71 -70
  163. package/MarkerGauge.config.js.map +1 -1
  164. package/MarkerGauge.js +422 -330
  165. package/MarkerGauge.js.map +1 -1
  166. package/ParallelCoordinates.config.js +3 -3
  167. package/ParallelCoordinates.config.js.map +1 -1
  168. package/ParallelCoordinates.js +532 -430
  169. package/ParallelCoordinates.js.map +1 -1
  170. package/Pie.config.js +30 -6
  171. package/Pie.config.js.map +1 -1
  172. package/Pie.js +553 -431
  173. package/Pie.js.map +1 -1
  174. package/Punchcard.config.js +3 -2
  175. package/Punchcard.config.js.map +1 -1
  176. package/Punchcard.js +556 -464
  177. package/Punchcard.js.map +1 -1
  178. package/Rectangle.config.js +22 -23
  179. package/Rectangle.config.js.map +1 -1
  180. package/Rectangle.js +383 -286
  181. package/Rectangle.js.map +1 -1
  182. package/Sankey.config.js +14 -13
  183. package/Sankey.config.js.map +1 -1
  184. package/Sankey.js +3126 -3034
  185. package/Sankey.js.map +1 -1
  186. package/Scatter.config.js +552 -580
  187. package/Scatter.config.js.map +1 -1
  188. package/Scatter.js +410 -311
  189. package/Scatter.js.map +1 -1
  190. package/SingleValue.config.js +242 -52
  191. package/SingleValue.config.js.map +1 -1
  192. package/SingleValue.js +1605 -414
  193. package/SingleValue.js.map +1 -1
  194. package/SingleValueBasic.js +41 -30
  195. package/SingleValueBasic.js.map +1 -1
  196. package/SingleValueIcon.config.js +267 -58
  197. package/SingleValueIcon.config.js.map +1 -1
  198. package/SingleValueIcon.js +1622 -410
  199. package/SingleValueIcon.js.map +1 -1
  200. package/SingleValueRadial.config.js +249 -41
  201. package/SingleValueRadial.config.js.map +1 -1
  202. package/SingleValueRadial.js +1517 -283
  203. package/SingleValueRadial.js.map +1 -1
  204. package/TRELLIS.md +296 -0
  205. package/Table.config.js +39 -41
  206. package/Table.config.js.map +1 -1
  207. package/Table.js +435 -311
  208. package/Table.js.map +1 -1
  209. package/common/EventsDoc.js +12 -6
  210. package/common/EventsDoc.js.map +1 -1
  211. package/common/GaugeMajorTicks.js +2 -2
  212. package/common/GaugeValueMarker.js +2 -2
  213. package/common/OptionsDoc.js +14 -14
  214. package/common/OptionsDoc.js.map +1 -1
  215. package/common/ThemesDoc.js +10 -10
  216. package/common/ThemesDoc.js.map +1 -1
  217. package/common/docUtils.js +1 -1
  218. package/common/docUtils.js.map +1 -1
  219. package/common/utils/configUtils.js +26 -20
  220. package/common/utils/configUtils.js.map +1 -1
  221. package/common/utils/dataUtils.js +2 -2
  222. package/common/utils/dataUtils.js.map +1 -1
  223. package/common/utils/hocUtils.js +2 -2
  224. package/common/utils/hocUtils.js.map +1 -1
  225. package/common/utils/layoutUtils.js +115 -0
  226. package/common/utils/layoutUtils.js.map +1 -0
  227. package/common/utils/mapUtils.js +1166 -23
  228. package/common/utils/mapUtils.js.map +1 -1
  229. package/common/utils/singleValueUtils.js +54 -46
  230. package/common/utils/singleValueUtils.js.map +1 -1
  231. package/common/utils/testHelper.js +14 -14
  232. package/common/utils/testHelper.js.map +1 -1
  233. package/common/utils/trellisUtils.js +612 -0
  234. package/common/utils/trellisUtils.js.map +1 -0
  235. package/common/withDashboardViz.js +148 -54
  236. package/common/withDashboardViz.js.map +1 -1
  237. package/package.json +14 -12
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"@splunk/react-ui/ColumnLayout\"","webpack:///external \"@babel/runtime/helpers/typeof\"","webpack:///external \"@splunk/visualizations-shared/colorUtils\"","webpack:///external \"@babel/runtime/helpers/slicedToArray\"","webpack:///external \"@splunk/visualization-themes/variables\"","webpack:///external \"styled-components\"","webpack:///external \"@splunk/react-ui/Select\"","webpack:///external \"lodash/omit\"","webpack:///external \"lodash/cloneDeep\"","webpack:///external \"@splunk/react-ui/Message\"","webpack:///external \"@splunk/react-ui/Tooltip\"","webpack:///external \"@splunk/themes/SplunkThemeProvider\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///./src/common/ThemesDoc.jsx"],"names":["ThemeVar","styled","ThemeVarName","props","PairContainer","PairTitle","ColorPreview","Pair","title","text","isColor","T","string","themeFamilyMapping","enterprise","colorScheme","dark","light","prisma","themeIdToVariant","enterpriseLightComfortable","density","family","label","enterpriseLightCompact","enterpriseDarkComfortable","enterpriseDarkCompact","prismaLightComfortable","prismaLightCompact","prismaDarkComfortable","prismaDarkCompact","ThemesDoc","renderVisualization","themeVars","useState","highlightedThemeVariable","setHighlightedThemeVariable","selectedTheme","setSelectedTheme","previewTheme","cloneDeep","marginTop","value","padding","themeValue","theme","splunkThemeV1","omit","isFromSharedVariables","isJSON","JSON","varKey","themes","isRequired"],"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;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AM,GAAG,qEAAOC,IAAI,CAAJA,MAAP,UAAOA,CAAP,MAATD;AADJ,MAEE,UAAU,CAdyB,EActB;;;AACf,WACI,wBACI;AACI,SAAG,EADP;AAEI,iBAAW,EAAE;AAAA,eAAMb,2BAA2B,CAAjC,MAAiC,CAAjC;AAFjB;AAGI,gBAAU,EAAE;AAAA,eAAMA,2BAA2B,CAAjC,EAAiC,CAAjC;AAAA;AAHhB,oBAKI;AACI,iBAAW,EAAEe,MAAM,KAAKhB;AAD5B,iBALJ,MAKI,EALJ,EAQKa,qBAAqB,iBAClB;AAAS,aAAO,EAAC;AAAjB,MATR,eAWI;AAAM,WAAK,EAAX;AAAoB,UAAI,EAAEJ;AAA1B,MAXJ,CAFR;AAhDpB,GAiCiB,CAFL,CAfJ,CAfJ,CADJ;AAVJ;;AAkFAb,SAAS,CAATA,YAAsB;AAClBqB,QAAM,EAAEzC,iDAAC,CAADA,OADU;AACW;AAC7BqB,qBAAmB,EAAErB,iDAAC,CAADA,KAAO0C;AAFV,CAAtBtB;AAKA,0E","file":"ThemesDoc.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 = 65);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"@splunk/react-ui/ColumnLayout\");","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"@splunk/visualizations-shared/colorUtils\");","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"@splunk/visualization-themes/variables\");","module.exports = require(\"styled-components\");","module.exports = require(\"@splunk/react-ui/Select\");","module.exports = require(\"lodash/omit\");","module.exports = require(\"lodash/cloneDeep\");","module.exports = require(\"@splunk/react-ui/Message\");","module.exports = require(\"@splunk/react-ui/Tooltip\");","module.exports = require(\"@splunk/themes/SplunkThemeProvider\");","module.exports = require(\"@splunk/react-ui/Heading\");","/* eslint-disable react/no-multi-comp */\nimport React, { useState } from 'react';\nimport T from 'prop-types';\nimport Heading from '@splunk/react-ui/Heading';\nimport styled from 'styled-components';\nimport omit from 'lodash/omit';\nimport cloneDeep from 'lodash/cloneDeep';\nimport ColumnLayout from '@splunk/react-ui/ColumnLayout';\nimport Select from '@splunk/react-ui/Select';\nimport Message from '@splunk/react-ui/Message';\nimport Tooltip from '@splunk/react-ui/Tooltip';\nimport SplunkThemeProvider from '@splunk/themes/SplunkThemeProvider';\nimport { isColor } from '@splunk/visualizations-shared/colorUtils';\nimport * as sharedThemeVariables from '@splunk/visualization-themes/variables';\n\nconst ThemeVar = styled.div`\n margin-top: 20px;\n cursor: pointer;\n`;\nconst ThemeVarName = styled.div`\n color: #5ca300;\n padding-bottom: 5px;\n display: inline-block;\n padding-right: 5px;\n font-weight: ${props => (props.highlighted ? 'bold' : 'normal')};\n`;\nconst PairContainer = styled.div`\n margin-left: 40px;\n margin-top: 10px;\n`;\nconst PairTitle = styled.span`\n display: inline-block;\n color: #8293a7;\n width: 80px;\n`;\nconst ColorPreview = styled.div`\n width: 20px;\n height: 20px;\n background: ${props => props.color};\n display: inline-block;\n vertical-align: bottom;\n margin-right: 5px;\n border: 1px solid rgba(0, 0, 0, 0.3);\n border-radius: 5px;\n`;\n\nconst Pair = ({ title, text }) => (\n <PairContainer>\n <PairTitle>{`${title}:`}</PairTitle>\n {isColor(text) && <ColorPreview color={text} />}\n <samp>{text}</samp>\n </PairContainer>\n);\nPair.propTypes = {\n title: T.string,\n text: T.string,\n};\n\nconst themeFamilyMapping = {\n enterprise: {\n colorScheme: {\n dark: 'enterpriseDark',\n light: 'enterprise',\n },\n },\n prisma: {\n colorScheme: {\n dark: 'scp',\n light: 'enterprise',\n },\n },\n};\n\nconst themeIdToVariant = {\n enterpriseLightComfortable: {\n colorScheme: 'light',\n density: 'comfortable',\n family: 'enterprise',\n label: 'Enterprise Light Comfortable',\n },\n enterpriseLightCompact: {\n colorScheme: 'light',\n density: 'compact',\n family: 'enterprise',\n label: 'Enterprise Light Compact',\n },\n enterpriseDarkComfortable: {\n colorScheme: 'dark',\n density: 'comfortable',\n family: 'enterprise',\n label: 'Enterprise Dark Comfortable',\n },\n enterpriseDarkCompact: {\n colorScheme: 'dark',\n density: 'compact',\n family: 'enterprise',\n label: 'Enterprise Dark Compact',\n },\n prismaLightComfortable: {\n colorScheme: 'light',\n density: 'comfortable',\n family: 'prisma',\n label: 'Prisma Light Comfortable',\n },\n prismaLightCompact: {\n colorScheme: 'light',\n density: 'compact',\n family: 'prisma',\n label: 'Prisma Light Compact',\n },\n prismaDarkComfortable: {\n colorScheme: 'dark',\n density: 'comfortable',\n family: 'prisma',\n label: 'Prisma Dark Comfortable',\n },\n prismaDarkCompact: {\n colorScheme: 'dark',\n density: 'compact',\n family: 'prisma',\n label: 'Prisma Dark Compact',\n },\n};\n\nconst ThemesDoc = props => {\n const { renderVisualization, themes: themeVars } = props;\n const [highlightedThemeVariable, setHighlightedThemeVariable] = useState('');\n const [selectedTheme, setSelectedTheme] = useState(themeIdToVariant.enterpriseLightComfortable);\n const previewTheme = cloneDeep(themeVars);\n // if the highlighted theme variable is a color, color it red\n // TODO(fkurniawan): fix red highlighting. this broke ~v20.7.0, and approach needs to be modified again owing to SUI upgrade\n if (isColor(themeVars[highlightedThemeVariable])) {\n previewTheme[highlightedThemeVariable] = () => 'red';\n }\n return (\n <ColumnLayout style={{ marginTop: -20 }}>\n <ColumnLayout.Row>\n <ColumnLayout.Column span={12}>\n <Heading level={4}>Theme</Heading>\n <Select value={selectedTheme} onChange={(e, { value }) => setSelectedTheme(value)}>\n {Object.keys(themeIdToVariant).map(themeId => (\n <Select.Option\n key={themeId}\n label={themeIdToVariant[themeId].label}\n value={themeIdToVariant[themeId]}\n />\n ))}\n </Select>\n </ColumnLayout.Column>\n </ColumnLayout.Row>\n <ColumnLayout.Row>\n <ColumnLayout.Column colStyle={{ padding: 10 }} span={4}>\n <Heading level={4}>Preview</Heading>\n <SplunkThemeProvider\n family={selectedTheme.family}\n colorScheme={selectedTheme.colorScheme}\n density={selectedTheme.density}\n >\n {renderVisualization()}\n </SplunkThemeProvider>\n <Message type=\"info\">\n This preview may differ from the visualization&apos;s default look and feel. <br />\n It exists to show areas affected by theme variables.\n </Message>\n </ColumnLayout.Column>\n <ColumnLayout.Column colStyle={{ padding: 10 }} span={8}>\n <Heading level={4}>Variables</Heading>\n {Object.keys(previewTheme).map(varKey => {\n const themeValue = previewTheme[varKey]({\n theme: { splunkThemeV1: omit(selectedTheme, ['label']) },\n });\n // if a theme variable is in @splunk/visualization-themes and it has the same value\n // we assume we used the shared variable.\n const isFromSharedVariables =\n sharedThemeVariables?.[\n themeFamilyMapping?.[selectedTheme.family]?.[selectedTheme.colorScheme]\n ]?.[varKey] === themeValue;\n // for now we only show simple theme values (nested theme objects shouldn't have been introduced in the first place)\n let isJSON;\n try {\n isJSON = typeof JSON.parse(themeValue) === 'object';\n } catch (e) {} // eslint-disable-line no-empty\n return (\n !isJSON && (\n <ThemeVar\n key={varKey}\n onMouseOver={() => setHighlightedThemeVariable(varKey)}\n onMouseOut={() => setHighlightedThemeVariable('')}\n >\n <ThemeVarName\n highlighted={varKey === highlightedThemeVariable}\n >{`${varKey}`}</ThemeVarName>\n {isFromSharedVariables && (\n <Tooltip content=\"This is a shared theme variable from @splunk/visualization-themes\" />\n )}\n <Pair title=\"Value\" text={themeValue} />\n </ThemeVar>\n )\n );\n })}\n </ColumnLayout.Column>\n </ColumnLayout.Row>\n </ColumnLayout>\n );\n};\n\nThemesDoc.propTypes = {\n themes: T.object.isRequired, // @TODO: replace with themes object from viz config when we add docs/descs to theme vars\n renderVisualization: T.func.isRequired,\n};\n\nexport default ThemesDoc;\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"@babel/runtime/helpers/slicedToArray\"","webpack:///external \"@splunk/react-ui/ColumnLayout\"","webpack:///external \"@babel/runtime/helpers/typeof\"","webpack:///external \"@splunk/visualizations-shared/colorUtils\"","webpack:///external \"@splunk/visualization-themes/variables\"","webpack:///external \"styled-components\"","webpack:///external \"@splunk/react-ui/Select\"","webpack:///external \"lodash/omit\"","webpack:///external \"lodash/cloneDeep\"","webpack:///external \"@splunk/react-ui/Message\"","webpack:///external \"@splunk/react-ui/Tooltip\"","webpack:///external \"@splunk/themes/SplunkThemeProvider\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///./src/common/ThemesDoc.jsx"],"names":["ThemeVar","styled","ThemeVarName","props","PairContainer","PairTitle","ColorPreview","Pair","title","text","isColor","T","string","themeFamilyMapping","enterprise","colorScheme","dark","light","prisma","themeIdToVariant","enterpriseLightComfortable","density","family","label","enterpriseLightCompact","enterpriseDarkComfortable","enterpriseDarkCompact","prismaLightComfortable","prismaLightCompact","prismaDarkComfortable","prismaDarkCompact","ThemesDoc","renderVisualization","themeVars","useState","highlightedThemeVariable","setHighlightedThemeVariable","selectedTheme","setSelectedTheme","previewTheme","cloneDeep","marginTop","value","padding","themeValue","theme","splunkThemeV1","omit","isFromSharedVariables","isJSON","JSON","varKey","themes","isRequired"],"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;;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;AACAoC,YAAM,GAAG,qEAAOC,IAAI,CAAJA,MAAP,UAAOA,CAAP,MAATD;AADJ,MAEE,UAAU,CAdyB,EActB;;;AACf,WACI,wBACI;AACI,SAAG,EADP;AAEI,iBAAW,EAAE;AAAA,eAAMb,2BAA2B,CAAjC,MAAiC,CAAjC;AAFjB;AAGI,gBAAU,EAAE;AAAA,eAAMA,2BAA2B,CAAjC,EAAiC,CAAjC;AAAA;AAHhB,oBAKI;AACI,iBAAW,EAAEe,MAAM,KAAKhB;AAD5B,iBALJ,MAKI,EALJ,EAQKa,qBAAqB,iBAClB;AAAS,aAAO,EAAC;AAAjB,MATR,eAWI;AAAM,WAAK,EAAX;AAAoB,UAAI,EAAEJ;AAA1B,MAXJ,CAFR;AAhDpB,GAiCiB,CAFL,CAfJ,CAfJ,CADJ;AAVJ;;AAkFAb,SAAS,CAATA,YAAsB;AAClBqB,QAAM,EAAEzC,iDAAC,CAADA,OADU;AACW;AAC7BqB,qBAAmB,EAAErB,iDAAC,CAADA,KAAO0C;AAFV,CAAtBtB;AAKA,0E","file":"ThemesDoc.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 = 65);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"@splunk/react-ui/ColumnLayout\");","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"@splunk/visualizations-shared/colorUtils\");","module.exports = require(\"@splunk/visualization-themes/variables\");","module.exports = require(\"styled-components\");","module.exports = require(\"@splunk/react-ui/Select\");","module.exports = require(\"lodash/omit\");","module.exports = require(\"lodash/cloneDeep\");","module.exports = require(\"@splunk/react-ui/Message\");","module.exports = require(\"@splunk/react-ui/Tooltip\");","module.exports = require(\"@splunk/themes/SplunkThemeProvider\");","module.exports = require(\"@splunk/react-ui/Heading\");","/* eslint-disable react/no-multi-comp */\nimport React, { useState } from 'react';\nimport T from 'prop-types';\nimport Heading from '@splunk/react-ui/Heading';\nimport styled from 'styled-components';\nimport omit from 'lodash/omit';\nimport cloneDeep from 'lodash/cloneDeep';\nimport ColumnLayout from '@splunk/react-ui/ColumnLayout';\nimport Select from '@splunk/react-ui/Select';\nimport Message from '@splunk/react-ui/Message';\nimport Tooltip from '@splunk/react-ui/Tooltip';\nimport SplunkThemeProvider from '@splunk/themes/SplunkThemeProvider';\nimport { isColor } from '@splunk/visualizations-shared/colorUtils';\nimport * as sharedThemeVariables from '@splunk/visualization-themes/variables';\n\nconst ThemeVar = styled.div`\n margin-top: 20px;\n cursor: pointer;\n`;\nconst ThemeVarName = styled.div`\n color: #5ca300;\n padding-bottom: 5px;\n display: inline-block;\n padding-right: 5px;\n font-weight: ${props => (props.highlighted ? 'bold' : 'normal')};\n`;\nconst PairContainer = styled.div`\n margin-left: 40px;\n margin-top: 10px;\n`;\nconst PairTitle = styled.span`\n display: inline-block;\n color: #8293a7;\n width: 80px;\n`;\nconst ColorPreview = styled.div`\n width: 20px;\n height: 20px;\n background: ${props => props.color};\n display: inline-block;\n vertical-align: bottom;\n margin-right: 5px;\n border: 1px solid rgba(0, 0, 0, 0.3);\n border-radius: 5px;\n`;\n\nconst Pair = ({ title, text }) => (\n <PairContainer>\n <PairTitle>{`${title}:`}</PairTitle>\n {isColor(text) && <ColorPreview color={text} />}\n <samp>{text}</samp>\n </PairContainer>\n);\nPair.propTypes = {\n title: T.string,\n text: T.string,\n};\n\nconst themeFamilyMapping = {\n enterprise: {\n colorScheme: {\n dark: 'enterpriseDark',\n light: 'enterprise',\n },\n },\n prisma: {\n colorScheme: {\n dark: 'scp',\n light: 'enterprise',\n },\n },\n};\n\nconst themeIdToVariant = {\n enterpriseLightComfortable: {\n colorScheme: 'light',\n density: 'comfortable',\n family: 'enterprise',\n label: 'Enterprise Light Comfortable',\n },\n enterpriseLightCompact: {\n colorScheme: 'light',\n density: 'compact',\n family: 'enterprise',\n label: 'Enterprise Light Compact',\n },\n enterpriseDarkComfortable: {\n colorScheme: 'dark',\n density: 'comfortable',\n family: 'enterprise',\n label: 'Enterprise Dark Comfortable',\n },\n enterpriseDarkCompact: {\n colorScheme: 'dark',\n density: 'compact',\n family: 'enterprise',\n label: 'Enterprise Dark Compact',\n },\n prismaLightComfortable: {\n colorScheme: 'light',\n density: 'comfortable',\n family: 'prisma',\n label: 'Prisma Light Comfortable',\n },\n prismaLightCompact: {\n colorScheme: 'light',\n density: 'compact',\n family: 'prisma',\n label: 'Prisma Light Compact',\n },\n prismaDarkComfortable: {\n colorScheme: 'dark',\n density: 'comfortable',\n family: 'prisma',\n label: 'Prisma Dark Comfortable',\n },\n prismaDarkCompact: {\n colorScheme: 'dark',\n density: 'compact',\n family: 'prisma',\n label: 'Prisma Dark Compact',\n },\n};\n\nconst ThemesDoc = props => {\n const { renderVisualization, themes: themeVars } = props;\n const [highlightedThemeVariable, setHighlightedThemeVariable] = useState('');\n const [selectedTheme, setSelectedTheme] = useState(themeIdToVariant.enterpriseLightComfortable);\n const previewTheme = cloneDeep(themeVars);\n // if the highlighted theme variable is a color, color it red\n // TODO(fkurniawan): fix red highlighting. this broke ~v20.7.0, and approach needs to be modified again owing to SUI upgrade\n if (isColor(themeVars[highlightedThemeVariable])) {\n previewTheme[highlightedThemeVariable] = () => 'red';\n }\n return (\n <ColumnLayout style={{ marginTop: -20 }}>\n <ColumnLayout.Row>\n <ColumnLayout.Column span={12}>\n <Heading level={4}>Theme</Heading>\n <Select value={selectedTheme} onChange={(e, { value }) => setSelectedTheme(value)}>\n {Object.keys(themeIdToVariant).map(themeId => (\n <Select.Option\n key={themeId}\n label={themeIdToVariant[themeId].label}\n value={themeIdToVariant[themeId]}\n />\n ))}\n </Select>\n </ColumnLayout.Column>\n </ColumnLayout.Row>\n <ColumnLayout.Row>\n <ColumnLayout.Column colStyle={{ padding: 10 }} span={4}>\n <Heading level={4}>Preview</Heading>\n <SplunkThemeProvider\n family={selectedTheme.family}\n colorScheme={selectedTheme.colorScheme}\n density={selectedTheme.density}\n >\n {renderVisualization()}\n </SplunkThemeProvider>\n <Message type=\"info\">\n This preview may differ from the visualization&apos;s default look and feel. <br />\n It exists to show areas affected by theme variables.\n </Message>\n </ColumnLayout.Column>\n <ColumnLayout.Column colStyle={{ padding: 10 }} span={8}>\n <Heading level={4}>Variables</Heading>\n {Object.keys(previewTheme).map(varKey => {\n const themeValue = previewTheme[varKey]({\n theme: { splunkThemeV1: omit(selectedTheme, ['label']) },\n });\n // if a theme variable is in @splunk/visualization-themes and it has the same value\n // we assume we used the shared variable.\n const isFromSharedVariables =\n sharedThemeVariables?.[\n themeFamilyMapping?.[selectedTheme.family]?.[selectedTheme.colorScheme]\n ]?.[varKey] === themeValue;\n // for now we only show simple theme values (nested theme objects shouldn't have been introduced in the first place)\n let isJSON;\n try {\n isJSON = typeof JSON.parse(themeValue) === 'object';\n } catch (e) {} // eslint-disable-line no-empty\n return (\n !isJSON && (\n <ThemeVar\n key={varKey}\n onMouseOver={() => setHighlightedThemeVariable(varKey)}\n onMouseOut={() => setHighlightedThemeVariable('')}\n >\n <ThemeVarName\n highlighted={varKey === highlightedThemeVariable}\n >{`${varKey}`}</ThemeVarName>\n {isFromSharedVariables && (\n <Tooltip content=\"This is a shared theme variable from @splunk/visualization-themes\" />\n )}\n <Pair title=\"Value\" text={themeValue} />\n </ThemeVar>\n )\n );\n })}\n </ColumnLayout.Column>\n </ColumnLayout.Row>\n </ColumnLayout>\n );\n};\n\nThemesDoc.propTypes = {\n themes: T.object.isRequired, // @TODO: replace with themes object from viz config when we add docs/descs to theme vars\n renderVisualization: T.func.isRequired,\n};\n\nexport default ThemesDoc;\n"],"sourceRoot":""}
@@ -114,7 +114,7 @@ var React = __webpack_require__(0);
114
114
 
115
115
  var UtilPage_1 = __webpack_require__(68);
116
116
 
117
- var sharedSelectors = ['getField', 'min', 'max'];
117
+ var sharedSelectors = ['getField', 'getType', 'min', 'max'];
118
118
 
119
119
  var formatSidebarItemName = function formatSidebarItemName(name, className) {
120
120
  return sharedSelectors.find(function (sharedSelector) {
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///./src/common/docUtils.tsx","webpack:///external \"@splunk/react-docs/UtilPage\""],"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,kC;;;;;;;;;;;;;;;ACAA;;AACA;;AAeA,IAAM,eAAe,GAAG,CAAC,UAAD,EAAa,KAAb,EAAoB,KAApB,CAAxB;;AAEA,IAAM,qBAAqB,GAAG,SAAxB,qBAAwB,CAAC,IAAD,EAAe,SAAf,EAA4C;AACtE,SAAO,eAAe,CAAC,IAAhB,CAAqB,wBAAc;AAAA,WAAI,IAA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Y,CACd,GADE,CACE,aAAG;AAAA,WAAK;AACT,UAAI,EAAE,qBAAqB,CAAC,GAAG,CAAC,IAAL,EAAW,SAAX,CADlB;AAET,eAAS,EAAE,SAAS,OAAT,GAAgB;AACvB;AACA,eACI,oBAAC,kBAAD,EAAS;AACL,eAAK,YAAK,SAAL,cAAkB,GAAG,CAAC,IAAtB,CADA;AAEL,gBAAM,EAAE,CAFH;AAGL,cAAI,EAAE,CAAC,cAAD,EAAiB,GAAjB,EAAsB,OAAtB;AAHD,SAAT,CADJ;AAOH;AAXQ,KAAL;AAAA,GADL,EAcF,IAdE,CAcG,UAAC,CAAD,EAAI,CAAJ;AAAA,WAAU,CAAC,CAAC,IAAF,CAAO,aAAP,CAAqB,CAAC,CAAC,IAAvB,CAAV;AAAA,GAdH,CAAP;AAeH,CAzBM;;AAAM,0BAAe,eAAf,C;;;;;;;ACtCb,wD","file":"docUtils.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 = 67);\n","module.exports = require(\"react\");","import * as React from 'react';\nimport UtilPage from '@splunk/react-docs/UtilPage';\n\n// https://github.com/jsdoc2md/jsdoc-api#synopsis\ninterface JsDoc {\n access?: string;\n classdesc?: string;\n comment: string;\n kind: string;\n longname: string;\n meta: Record<string, unknown>;\n member: string;\n name: string;\n scope: string;\n}\n\nconst sharedSelectors = ['getField', 'min', 'max'];\n\nconst formatSidebarItemName = (name: string, className: string): string => {\n return sharedSelectors.find(sharedSelector => name === sharedSelector) ? `${className}#${name}` : name;\n};\n\nconst removePrependedClassName = (longname = ''): string => longname.slice(longname.indexOf('#') + 1);\n\nconst formatDSLSelectorDocs = (docs: JsDoc[]): JsDoc[] =>\n docs.map(doc => ({\n ...doc,\n longname: removePrependedClassName(doc.longname),\n }));\n\nexport const getFormatterClassdesc = (\n formatterDocs: JsDoc[],\n name: string\n): { name: string; markdown: string } => ({\n name,\n markdown: `# ${name}\\n ${formatterDocs.find(doc => doc.name === name && doc.kind === 'class').classdesc}`,\n});\n\nexport const extractDocItems = (\n docs: JsDoc[],\n className: string\n): { name: string; component: (...args: any[]) => any }[] => {\n const classHeaderDoc = docs[0];\n const fileDoc = docs[docs.length - 1];\n const filteredDocs = formatDSLSelectorDocs(docs).filter(\n ({ access, comment }) => access === 'public' && comment\n );\n\n return filteredDocs\n .map(doc => ({\n name: formatSidebarItemName(doc.name, className),\n component: function UtilDoc() {\n // named function so linter doesnt raise react/display-name error\n return (\n <UtilPage\n title={`${className}#${doc.name}`}\n status={1}\n docs={[classHeaderDoc, doc, fileDoc]}\n />\n );\n },\n }))\n .sort((a, b) => a.name.localeCompare(b.name));\n};\n","module.exports = require(\"@splunk/react-docs/UtilPage\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///./src/common/docUtils.tsx","webpack:///external \"@splunk/react-docs/UtilPage\""],"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,gHAA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9B;;AAAM,gCAAqB,qBAArB;;AAQN,IAAM,eAAe,GAAG,SAAlB,eAAkB,CAC3B,IAD2B,EAE3B,SAF2B,EAG6B;AACxD,MAAM,cAAc,GAAG,IAAI,CAAC,CAAD,CAA3B;AACA,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAL,GAAc,CAAf,CAApB;AACA,MAAM,YAAY,GAAG,qBAAqB,CAAC,IAAD,CAArB,CAA4B,MAA5B,CACjB;AAAA,QAAG,MAAH,QAAG,MAAH;AAAA,QAAW,OAAX,QAAW,OAAX;AAAA,WAAyB,MAAM,KAAK,QAAX,IAAuB,OAAhD;AAAA,GADiB,CAArB;AAIA,SAAO,YAAY,CACd,GADE,CACE,aAAG;AAAA,WAAK;AACT,UAAI,EAAE,qBAAqB,CAAC,GAAG,CAAC,IAAL,EAAW,SAAX,CADlB;AAET,eAAS,EAAE,SAAS,OAAT,GAAgB;AACvB;AACA,eACI,oBAAC,kBAAD,EAAS;AACL,eAAK,YAAK,SAAL,cAAkB,GAAG,CAAC,IAAtB,CADA;AAEL,gBAAM,EAAE,CAFH;AAGL,cAAI,EAAE,CAAC,cAAD,EAAiB,GAAjB,EAAsB,OAAtB;AAHD,SAAT,CADJ;AAOH;AAXQ,KAAL;AAAA,GADL,EAcF,IAdE,CAcG,UAAC,CAAD,EAAI,CAAJ;AAAA,WAAU,CAAC,CAAC,IAAF,CAAO,aAAP,CAAqB,CAAC,CAAC,IAAvB,CAAV;AAAA,GAdH,CAAP;AAeH,CAzBM;;AAAM,0BAAe,eAAf,C;;;;;;;ACtCb,wD","file":"docUtils.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 = 67);\n","module.exports = require(\"react\");","import * as React from 'react';\nimport UtilPage from '@splunk/react-docs/UtilPage';\n\n// https://github.com/jsdoc2md/jsdoc-api#synopsis\ninterface JsDoc {\n access?: string;\n classdesc?: string;\n comment: string;\n kind: string;\n longname: string;\n meta: Record<string, unknown>;\n member: string;\n name: string;\n scope: string;\n}\n\nconst sharedSelectors = ['getField', 'getType', 'min', 'max'];\n\nconst formatSidebarItemName = (name: string, className: string): string => {\n return sharedSelectors.find(sharedSelector => name === sharedSelector) ? `${className}#${name}` : name;\n};\n\nconst removePrependedClassName = (longname = ''): string => longname.slice(longname.indexOf('#') + 1);\n\nconst formatDSLSelectorDocs = (docs: JsDoc[]): JsDoc[] =>\n docs.map(doc => ({\n ...doc,\n longname: removePrependedClassName(doc.longname),\n }));\n\nexport const getFormatterClassdesc = (\n formatterDocs: JsDoc[],\n name: string\n): { name: string; markdown: string } => ({\n name,\n markdown: `# ${name}\\n ${formatterDocs.find(doc => doc.name === name && doc.kind === 'class').classdesc}`,\n});\n\nexport const extractDocItems = (\n docs: JsDoc[],\n className: string\n): { name: string; component: (...args: any[]) => any }[] => {\n const classHeaderDoc = docs[0];\n const fileDoc = docs[docs.length - 1];\n const filteredDocs = formatDSLSelectorDocs(docs).filter(\n ({ access, comment }) => access === 'public' && comment\n );\n\n return filteredDocs\n .map(doc => ({\n name: formatSidebarItemName(doc.name, className),\n component: function UtilDoc() {\n // named function so linter doesnt raise react/display-name error\n return (\n <UtilPage\n title={`${className}#${doc.name}`}\n status={1}\n docs={[classHeaderDoc, doc, fileDoc]}\n />\n );\n },\n }))\n .sort((a, b) => a.name.localeCompare(b.name));\n};\n","module.exports = require(\"@splunk/react-docs/UtilPage\");"],"sourceRoot":""}
@@ -87,35 +87,46 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 6);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 12);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ([
94
94
  /* 0 */
95
95
  /***/ (function(module, exports) {
96
96
 
97
+ module.exports = require("lodash");
98
+
99
+ /***/ }),
100
+ /* 1 */
101
+ /***/ (function(module, exports) {
102
+
97
103
  module.exports = require("@babel/runtime/helpers/defineProperty");
98
104
 
99
105
  /***/ }),
100
- /* 1 */,
101
- /* 2 */,
102
- /* 3 */,
103
- /* 4 */
106
+ /* 2 */
104
107
  /***/ (function(module, exports) {
105
108
 
106
- module.exports = require("lodash");
109
+ module.exports = require("@babel/runtime/helpers/toConsumableArray");
107
110
 
108
111
  /***/ }),
112
+ /* 3 */,
113
+ /* 4 */,
109
114
  /* 5 */,
110
- /* 6 */
115
+ /* 6 */,
116
+ /* 7 */,
117
+ /* 8 */,
118
+ /* 9 */,
119
+ /* 10 */,
120
+ /* 11 */,
121
+ /* 12 */
111
122
  /***/ (function(module, exports, __webpack_require__) {
112
123
 
113
124
  "use strict";
114
125
 
115
126
 
116
- var _toConsumableArray = __webpack_require__(7);
127
+ var _toConsumableArray = __webpack_require__(2);
117
128
 
118
- var _defineProperty = __webpack_require__(0);
129
+ var _defineProperty = __webpack_require__(1);
119
130
 
120
131
  var __rest = this && this.__rest || function (s, e) {
121
132
  var t = {};
@@ -135,11 +146,11 @@ Object.defineProperty(exports, "__esModule", {
135
146
  });
136
147
  exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
137
148
 
138
- var lodash_1 = __webpack_require__(4);
149
+ var lodash_1 = __webpack_require__(0);
139
150
 
140
- var schemaUtils_1 = __webpack_require__(8);
151
+ var schemaUtils_1 = __webpack_require__(13);
141
152
 
142
- var VizBehavior_1 = __webpack_require__(9);
153
+ var VizBehavior_1 = __webpack_require__(14);
143
154
 
144
155
  var dynamicOptionsDSLType = {
145
156
  type: 'string',
@@ -343,19 +354,13 @@ var insertLayout = function insertLayout(layout, index) {
343
354
  exports.insertLayout = insertLayout;
344
355
 
345
356
  /***/ }),
346
- /* 7 */
347
- /***/ (function(module, exports) {
348
-
349
- module.exports = require("@babel/runtime/helpers/toConsumableArray");
350
-
351
- /***/ }),
352
- /* 8 */
357
+ /* 13 */
353
358
  /***/ (function(module, exports) {
354
359
 
355
360
  module.exports = require("@splunk/visualizations-shared/schemaUtils");
356
361
 
357
362
  /***/ }),
358
- /* 9 */
363
+ /* 14 */
359
364
  /***/ (function(module, exports, __webpack_require__) {
360
365
 
361
366
  "use strict";
@@ -389,6 +394,7 @@ var VizBehavior;
389
394
 
390
395
  VizBehavior["PLACEHOLDER"] = "placeholder";
391
396
  VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
397
+ VizBehavior["TRELLIS"] = "trellis";
392
398
  })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
393
399
 
394
400
  /***/ })
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"lodash\"","webpack:///./src/common/utils/configUtils.ts","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///external \"@splunk/visualizations-shared/schemaUtils\"","webpack:///./src/common/interfaces/VizBehavior.ts"],"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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,EAAE;AAFc,KAAzB;AAAA,GADG,CAAP;AAMH;;AAMG;AAKJ;;;;;;;AAOG;;AACI,IAAM,YAAY,GAAG,SAAf,YAAe,CACxB,MADwB,EAExB,KAFwB;AAAA,oCAGrB,WAHqB;AAGrB,eAHqB;AAAA;;AAAA,sCAMrB,MAAM,CAAC,KAAP,CAAa,CAAb,EAAgB,KAAhB,CANqB,GAQrB,WARqB,qBAUrB,MAAM,CAAC,KAAP,CAAa,KAAb,CAVqB;AAAA,CAArB;;AAAM,uBAAY,YAAZ,C;;;;;;ACxOb,qE;;;;;;ACAA,sE;;;;;;;;;;;;;ACAA,IAAY,WAAZ;;AAAA,WAAY,WAAZ,EAAuB;AACnB;;;;;;;;;;AAUG;AACH;AACA;AACA;;;;AAIG;;AACH;AACA;AACH,CArBD,EAAY,WAAW,GAAX,8CAAW,EAAX,CAAZ,E","file":"configUtils.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 = 6);\n","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"lodash\");","import { get, range } from 'lodash';\nimport { DYNAMIC_OPTIONS_DSL_PATTERN } from '@splunk/visualizations-shared/schemaUtils';\nimport type { JSONSchema7Definition } from 'json-schema';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizBehavior } from '../interfaces/VizBehavior';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { OptionsSchema } from '../interfaces/OptionsSchema';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\nconst dynamicOptionsDSLType = {\n type: 'string',\n pattern: DYNAMIC_OPTIONS_DSL_PATTERN,\n} as const;\n\n/**\n * Helper function to extend an options schema with dynamic options DSL\n * @param optionsSchema a visualization's options schema\n * @returns an updated options schema that additionally allows strings starting with > for each option\n */\nfunction enhanceOptionsSchemaWithDynamicOptions(\n optionsSchema: OptionsSchema | JSONSchema7Definition\n): OptionsSchema {\n const enhancedOptionsSchema: OptionsSchema = {};\n Object.keys(optionsSchema).forEach((key): void => {\n const {\n // The next a few are schema annotations, we should leave them as is.\n // Note: in reality we don't use `readOnly`, `writeOnly` or `examples`, but they are listed here for completeness.\n // Ref: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01\n title,\n description,\n readOnly,\n writeOnly,\n examples,\n default: defaultValue,\n // The next a few need special care\n type,\n properties,\n patternProperties,\n // The rest should be handled together\n ...remainingSchemaEntry\n } = optionsSchema[key];\n\n const annotations = {\n ...(title !== undefined && { title }),\n ...(description !== undefined && { description }),\n ...(readOnly !== undefined && { readOnly }),\n ...(writeOnly !== undefined && { writeOnly }),\n ...(examples !== undefined && { examples }),\n ...(defaultValue !== undefined && { default: defaultValue }),\n };\n\n if (type === 'object') {\n enhancedOptionsSchema[key] = {\n ...remainingSchemaEntry,\n ...annotations,\n type,\n ...(properties && { properties: enhanceOptionsSchemaWithDynamicOptions(properties) }),\n };\n if (patternProperties) {\n let enhancedPatternProperties = {};\n Object.keys(patternProperties).forEach((opt): void => {\n enhancedPatternProperties = {\n ...enhancedPatternProperties,\n ...enhanceOptionsSchemaWithDynamicOptions({ [opt]: patternProperties[opt] }),\n };\n });\n enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;\n }\n } else {\n enhancedOptionsSchema[key] = {\n ...annotations,\n anyOf: [\n // we can't assume `type` is always there because there are `enum` and `const`.\n { ...(type !== undefined && { type }), ...remainingSchemaEntry },\n dynamicOptionsDSLType,\n ],\n };\n }\n });\n return enhancedOptionsSchema;\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 if (vizConfig.supports.indexOf(VizBehavior.DYNAMIC_OPTIONS) !== -1) {\n enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);\n }\n enhancedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n }\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\nfunction isDynamicOption(option?: string): boolean {\n return (option && typeof option === 'string' && option.trim().startsWith('>')) || false;\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 {\n enhanceConfig,\n enhanceOptionsSchemaWithDynamicOptions,\n getInitialPreset,\n generatePrecisionValues,\n uncollapseEditorConfig,\n isDynamicOption,\n};\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","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"@splunk/visualizations-shared/schemaUtils\");","export enum VizBehavior {\n /**\n * Dynamic Options Behavior.\n * This allows visualization options to be powered by data\n *\n * **Example**\n *\n * sparklineValues: \">primary|seriesByIndex(0)\"\n * would configure sparklineValues with an array of data points\n * coming from the first series in the primary datasource\n *\n */\n DYNAMIC_OPTIONS = 'dynamic-options',\n EVENTS = 'events',\n /**\n * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is\n * missing.\n * @type {string}\n */\n PLACEHOLDER = 'placeholder',\n PAGE_AND_SORT = 'page-and-sort',\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///./src/common/utils/configUtils.ts","webpack:///external \"@splunk/visualizations-shared/schemaUtils\"","webpack:///./src/common/interfaces/VizBehavior.ts"],"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,mC;;;;;;ACAA,kE;;;;;;ACAA,qE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;AACA;;AAGA;;AAWA,IAAM,qBAAqB,GAAG;AAC1B,MAAI,EAAE,QADoB;AAE1B,SAAO,EAAE;AAFiB,CAA9B;AAKA;;;;AAIG;;AACH,SAAS,sCAAT,CACI,aADJ,EACwD;AAEpD,MAAM,qBAAqB,GAAkB,EAA7C;AACA,QAAM,CAAC,IAAP,CAAY,aAAZ,EAA2B,OAA3B,CAAmC,UAAC,GAAD,EAAc;AACvC,aAgBF,aAAa,CAhBX,GAgBW,CAhBX;AAAA,QAIF,KAJE,GAae,EAbf,CAIF,KAJE;AAAA,QAKF,WALE,GAae,EAbf,CAKF,WALE;AAAA,QAMF,QANE,GAae,EAbf,CAMF,QANE;AAAA,QAOF,SAPE,GAae,EAbf,CAOF,SAPE;AAAA,QAQF,QARE,GAae,EAbf,CAQF,QARE;AAAA,QASO,YATP,GA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ErE,WACI,qBAAqB,CAAC,UAAD,EAAa,aAAb,CAArB,IACA,oBAAoB,CAAC,UAAD,EAAa,aAAb,CAFxB;AAIH,GAdM,CAAP;AAeH;;AAyBG;AAlBJ;;;;;AAKG;;AACH,SAAS,uBAAT,CAAiC,kBAAjC,EAA2D;AACvD,SAAO,eAAM,CAAN,EAAS,kBAAkB,GAAG,CAA9B,EAAiC,GAAjC,CACH,UAAC,CAAD;AAAA,WAAyB;AACrB,WAAK,YAAK,CAAL,gBAAY,CAAC,GAAG,CAAJ,GAAQ,GAAR,GAAc,EAA1B,SAA+B,IAAI,MAAJ,CAAW,CAAX,CAA/B,MADgB;AAErB,WAAK,EAAE;AAFc,KAAzB;AAAA,GADG,CAAP;AAMH;;AAMG;AAKJ;;;;;;;AAOG;;AACI,IAAM,YAAY,GAAG,SAAf,YAAe,CACxB,MADwB,EAExB,KAFwB;AAAA,oCAGrB,WAHqB;AAGrB,eAHqB;AAAA;;AAAA,sCAMrB,MAAM,CAAC,KAAP,CAAa,CAAb,EAAgB,KAAhB,CANqB,GAQrB,WARqB,qBAUrB,MAAM,CAAC,KAAP,CAAa,KAAb,CAVqB;AAAA,CAArB;;AAAM,uBAAY,YAAZ,C;;;;;;ACxOb,sE;;;;;;;;;;;;;ACAA,IAAY,WAAZ;;AAAA,WAAY,WAAZ,EAAuB;AACnB;;;;;;;;;;AAUG;AACH;AACA;AACA;;;;AAIG;;AACH;AACA;AACA;AACH,CAtBD,EAAY,WAAW,GAAX,8CAAW,EAAX,CAAZ,E","file":"configUtils.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 = 12);\n","module.exports = require(\"lodash\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","import { get, range } from 'lodash';\nimport { DYNAMIC_OPTIONS_DSL_PATTERN } from '@splunk/visualizations-shared/schemaUtils';\nimport type { JSONSchema7Definition } from 'json-schema';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizBehavior } from '../interfaces/VizBehavior';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { OptionsSchema } from '../interfaces/OptionsSchema';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\nconst dynamicOptionsDSLType = {\n type: 'string',\n pattern: DYNAMIC_OPTIONS_DSL_PATTERN,\n} as const;\n\n/**\n * Helper function to extend an options schema with dynamic options DSL\n * @param optionsSchema a visualization's options schema\n * @returns an updated options schema that additionally allows strings starting with > for each option\n */\nfunction enhanceOptionsSchemaWithDynamicOptions(\n optionsSchema: OptionsSchema | JSONSchema7Definition\n): OptionsSchema {\n const enhancedOptionsSchema: OptionsSchema = {};\n Object.keys(optionsSchema).forEach((key): void => {\n const {\n // The next a few are schema annotations, we should leave them as is.\n // Note: in reality we don't use `readOnly`, `writeOnly` or `examples`, but they are listed here for completeness.\n // Ref: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01\n title,\n description,\n readOnly,\n writeOnly,\n examples,\n default: defaultValue,\n // The next a few need special care\n type,\n properties,\n patternProperties,\n // The rest should be handled together\n ...remainingSchemaEntry\n } = optionsSchema[key];\n\n const annotations = {\n ...(title !== undefined && { title }),\n ...(description !== undefined && { description }),\n ...(readOnly !== undefined && { readOnly }),\n ...(writeOnly !== undefined && { writeOnly }),\n ...(examples !== undefined && { examples }),\n ...(defaultValue !== undefined && { default: defaultValue }),\n };\n\n if (type === 'object') {\n enhancedOptionsSchema[key] = {\n ...remainingSchemaEntry,\n ...annotations,\n type,\n ...(properties && { properties: enhanceOptionsSchemaWithDynamicOptions(properties) }),\n };\n if (patternProperties) {\n let enhancedPatternProperties = {};\n Object.keys(patternProperties).forEach((opt): void => {\n enhancedPatternProperties = {\n ...enhancedPatternProperties,\n ...enhanceOptionsSchemaWithDynamicOptions({ [opt]: patternProperties[opt] }),\n };\n });\n enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;\n }\n } else {\n enhancedOptionsSchema[key] = {\n ...annotations,\n anyOf: [\n // we can't assume `type` is always there because there are `enum` and `const`.\n { ...(type !== undefined && { type }), ...remainingSchemaEntry },\n dynamicOptionsDSLType,\n ],\n };\n }\n });\n return enhancedOptionsSchema;\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 if (vizConfig.supports.indexOf(VizBehavior.DYNAMIC_OPTIONS) !== -1) {\n enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);\n }\n enhancedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n }\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\nfunction isDynamicOption(option?: string): boolean {\n return (option && typeof option === 'string' && option.trim().startsWith('>')) || false;\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 {\n enhanceConfig,\n enhanceOptionsSchemaWithDynamicOptions,\n getInitialPreset,\n generatePrecisionValues,\n uncollapseEditorConfig,\n isDynamicOption,\n};\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","module.exports = require(\"@splunk/visualizations-shared/schemaUtils\");","export enum VizBehavior {\n /**\n * Dynamic Options Behavior.\n * This allows visualization options to be powered by data\n *\n * **Example**\n *\n * sparklineValues: \">primary|seriesByIndex(0)\"\n * would configure sparklineValues with an array of data points\n * coming from the first series in the primary datasource\n *\n */\n DYNAMIC_OPTIONS = 'dynamic-options',\n EVENTS = 'events',\n /**\n * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is\n * missing.\n * @type {string}\n */\n PLACEHOLDER = 'placeholder',\n PAGE_AND_SORT = 'page-and-sort',\n TRELLIS = 'trellis',\n}\n"],"sourceRoot":""}
@@ -87,12 +87,12 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 10);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 15);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
94
94
 
95
- /***/ 10:
95
+ /***/ 15:
96
96
  /***/ (function(module, exports, __webpack_require__) {
97
97
 
98
98
  "use strict";
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/utils/dataUtils.ts"],"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;;;;;;;;;;;;;;wCClFA;;AACO,IAAM,qBAAqB,GAAG,SAAxB,qBAAwB,CAAC,OAAD,EAAU,MAAV,EAAoB;AACrD,MAAI,CAAC,OAAD,IAAY,CAAC,OAAO,CAAC,CAAD,CAAP,CAAW,MAA5B,EAAoC,OAAO,EAAP;AAEpC,MAAM,IAAI,GAAG,EAAb;;AAHqD,6BAK5C,CAL4C;AAMjD,QAAM,MAAM,GAAG,EAAf;AACA,UAAM,CAAC,OAAP,CAAe,UAAC,KAAD,EAAQ,KAAR,EAAiB;AAC5B,UAAM,SAAS,GAAG,OAAO,KAAP,KAAiB,QAAjB,GAA4B,KAA5B,GAAoC,KAAK,CAAC,IAA5D;;AACA,UAAI,OAAO,CAAC,KAAD,CAAP,CAAe,CAAf,MAAsB,EAA1B,EAA8B;AAC1B,cAAM,CAAC,SAAD,CAAN,GAAoB,IAApB;AACH,OAFD,MAEO;AACH,cAAM,CAAC,SAAD,CAAN,GAAoB,OAAO,CAAC,KAAD,CAAP,CAAe,CAAf,CAApB;AACH;AACJ,KAPD;AAQA,QAAI,CAAC,IAAL,CAAU,MAAV;AAfiD;;AAKrD,OAAK,IAAI,CAAC,GAAG,CAAb,EAAgB,CAAC,GAAG,OAAO,CAAC,CAAD,CAAP,CAAW,MAA/B,EAAuC,CAAC,IAAI,CAA5C,EAA+C;AAAA,UAAtC,CAAsC;AAW9C;;AAED,SAAO,IAAP;AACH,CAnBM;;AAAM,gCAAqB,qBAArB,C","file":"dataUtils.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","// TODO: utilize this fn in ParallelCoordinates\nexport const convertToArrOfObjects = (columns, fields) => {\n if (!columns || !columns[0].length) return [];\n\n const data = [];\n\n for (let i = 0; i < columns[0].length; i += 1) {\n const newObj = {};\n fields.forEach((field, index) => {\n const fieldName = typeof field === 'string' ? field : field.name;\n if (columns[index][i] === '') {\n newObj[fieldName] = null;\n } else {\n newObj[fieldName] = columns[index][i];\n }\n });\n data.push(newObj);\n }\n\n return data;\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/utils/dataUtils.ts"],"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;;;;;;;;;;;;;;wCClFA;;AACO,IAAM,qBAAqB,GAAG,SAAxB,qBAAwB,CAAC,OAAD,EAAU,MAAV,EAAoB;AACrD,MAAI,CAAC,OAAD,IAAY,CAAC,OAAO,CAAC,CAAD,CAAP,CAAW,MAA5B,EAAoC,OAAO,EAAP;AAEpC,MAAM,IAAI,GAAG,EAAb;;AAHqD,6BAK5C,CAL4C;AAMjD,QAAM,MAAM,GAAG,EAAf;AACA,UAAM,CAAC,OAAP,CAAe,UAAC,KAAD,EAAQ,KAAR,EAAiB;AAC5B,UAAM,SAAS,GAAG,OAAO,KAAP,KAAiB,QAAjB,GAA4B,KAA5B,GAAoC,KAAK,CAAC,IAA5D;;AACA,UAAI,OAAO,CAAC,KAAD,CAAP,CAAe,CAAf,MAAsB,EAA1B,EAA8B;AAC1B,cAAM,CAAC,SAAD,CAAN,GAAoB,IAApB;AACH,OAFD,MAEO;AACH,cAAM,CAAC,SAAD,CAAN,GAAoB,OAAO,CAAC,KAAD,CAAP,CAAe,CAAf,CAApB;AACH;AACJ,KAPD;AAQA,QAAI,CAAC,IAAL,CAAU,MAAV;AAfiD;;AAKrD,OAAK,IAAI,CAAC,GAAG,CAAb,EAAgB,CAAC,GAAG,OAAO,CAAC,CAAD,CAAP,CAAW,MAA/B,EAAuC,CAAC,IAAI,CAA5C,EAA+C;AAAA,UAAtC,CAAsC;AAW9C;;AAED,SAAO,IAAP;AACH,CAnBM;;AAAM,gCAAqB,qBAArB,C","file":"dataUtils.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 = 15);\n","// TODO: utilize this fn in ParallelCoordinates\nexport const convertToArrOfObjects = (columns, fields) => {\n if (!columns || !columns[0].length) return [];\n\n const data = [];\n\n for (let i = 0; i < columns[0].length; i += 1) {\n const newObj = {};\n fields.forEach((field, index) => {\n const fieldName = typeof field === 'string' ? field : field.name;\n if (columns[index][i] === '') {\n newObj[fieldName] = null;\n } else {\n newObj[fieldName] = columns[index][i];\n }\n });\n data.push(newObj);\n }\n\n return data;\n};\n"],"sourceRoot":""}
@@ -87,12 +87,12 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 11);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 16);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
94
94
 
95
- /***/ 11:
95
+ /***/ 16:
96
96
  /***/ (function(module, exports, __webpack_require__) {
97
97
 
98
98
  "use strict";
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/utils/hocUtils.ts"],"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;;;;;;;;;;;;;;;AC9EA;;;;;AAKG;;AACI,IAAM,wBAAwB,GAAG,SAA3B,wBAA2B,OAK7B;AAAA,MAJP,OAIO,QAJP,OAIO;AAAA,MAHP,aAGO,QAHP,aAGO;AACP,MAAM,gBAAgB,GAAG,CAAC,WAAD,EAAc,cAAd,EAA8B,QAA9B,CAAzB;AACA,kBAAgB,CAAC,OAAjB,CAAyB,UAAC,IAAD,EAAuB;AAC5C,QAAI,aAAa,CAAC,IAAD,CAAjB,EAAyB;AACrB;AACA,aAAO,CAAC,IAAD,CAAP,GAAgB,aAAa,CAAC,IAAD,CAA7B;AACH;AACJ,GALD;AAMH,CAbM;;AAAM,mCAAwB,wBAAxB,C","file":"hocUtils.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 = 11);\n","import { DashboardVizProps } from '../interfaces/DashboardVizProps';\n\nexport type DashboardVizType = React.ComponentType<DashboardVizProps>;\n\n/**\n * @method extendStaticWrapperProps\n * @param {Object} props\n * @param {DashboardVizType} props.Wrapper\n * @param {DashboardVizType} props.Visualization\n */\nexport const extendStaticWrapperProps = ({\n Wrapper,\n Visualization,\n}: {\n [key: string]: DashboardVizType;\n}): void => {\n const extendProperties = ['propTypes', 'defaultProps', 'config'];\n extendProperties.forEach((prop: string): void => {\n if (Visualization[prop]) {\n // eslint-disable-next-line no-param-reassign\n Wrapper[prop] = Visualization[prop];\n }\n });\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/utils/hocUtils.ts"],"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;;;;;;;;;;;;;;;AC9EA;;;;;AAKG;;AACI,IAAM,wBAAwB,GAAG,SAA3B,wBAA2B,OAK7B;AAAA,MAJP,OAIO,QAJP,OAIO;AAAA,MAHP,aAGO,QAHP,aAGO;AACP,MAAM,gBAAgB,GAAG,CAAC,WAAD,EAAc,cAAd,EAA8B,QAA9B,CAAzB;AACA,kBAAgB,CAAC,OAAjB,CAAyB,UAAC,IAAD,EAAuB;AAC5C,QAAI,aAAa,CAAC,IAAD,CAAjB,EAAyB;AACrB;AACA,aAAO,CAAC,IAAD,CAAP,GAAgB,aAAa,CAAC,IAAD,CAA7B;AACH;AACJ,GALD;AAMH,CAbM;;AAAM,mCAAwB,wBAAxB,C","file":"hocUtils.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 = 16);\n","import { DashboardVizProps } from '../interfaces/DashboardVizProps';\n\nexport type DashboardVizType = React.ComponentType<DashboardVizProps>;\n\n/**\n * @method extendStaticWrapperProps\n * @param {Object} props\n * @param {DashboardVizType} props.Wrapper\n * @param {DashboardVizType} props.Visualization\n */\nexport const extendStaticWrapperProps = ({\n Wrapper,\n Visualization,\n}: {\n [key: string]: DashboardVizType;\n}): void => {\n const extendProperties = ['propTypes', 'defaultProps', 'config'];\n extendProperties.forEach((prop: string): void => {\n if (Visualization[prop]) {\n // eslint-disable-next-line no-param-reassign\n Wrapper[prop] = Visualization[prop];\n }\n });\n};\n"],"sourceRoot":""}
@@ -0,0 +1,115 @@
1
+ /*!
2
+ * Copyright © 2018 Splunk Inc.
3
+ * SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
4
+ * in part without a valid written license from Splunk Inc. is PROHIBITED.
5
+ */
6
+ module.exports =
7
+ /******/ (function(modules) { // webpackBootstrap
8
+ /******/ // The module cache
9
+ /******/ var installedModules = {};
10
+ /******/
11
+ /******/ // The require function
12
+ /******/ function __webpack_require__(moduleId) {
13
+ /******/
14
+ /******/ // Check if module is in cache
15
+ /******/ if(installedModules[moduleId]) {
16
+ /******/ return installedModules[moduleId].exports;
17
+ /******/ }
18
+ /******/ // Create a new module (and put it into the cache)
19
+ /******/ var module = installedModules[moduleId] = {
20
+ /******/ i: moduleId,
21
+ /******/ l: false,
22
+ /******/ exports: {}
23
+ /******/ };
24
+ /******/
25
+ /******/ // Execute the module function
26
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
27
+ /******/
28
+ /******/ // Flag the module as loaded
29
+ /******/ module.l = true;
30
+ /******/
31
+ /******/ // Return the exports of the module
32
+ /******/ return module.exports;
33
+ /******/ }
34
+ /******/
35
+ /******/
36
+ /******/ // expose the modules object (__webpack_modules__)
37
+ /******/ __webpack_require__.m = modules;
38
+ /******/
39
+ /******/ // expose the module cache
40
+ /******/ __webpack_require__.c = installedModules;
41
+ /******/
42
+ /******/ // define getter function for harmony exports
43
+ /******/ __webpack_require__.d = function(exports, name, getter) {
44
+ /******/ if(!__webpack_require__.o(exports, name)) {
45
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
46
+ /******/ }
47
+ /******/ };
48
+ /******/
49
+ /******/ // define __esModule on exports
50
+ /******/ __webpack_require__.r = function(exports) {
51
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
52
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
53
+ /******/ }
54
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
55
+ /******/ };
56
+ /******/
57
+ /******/ // create a fake namespace object
58
+ /******/ // mode & 1: value is a module id, require it
59
+ /******/ // mode & 2: merge all properties of value into the ns
60
+ /******/ // mode & 4: return value when already ns object
61
+ /******/ // mode & 8|1: behave like require
62
+ /******/ __webpack_require__.t = function(value, mode) {
63
+ /******/ if(mode & 1) value = __webpack_require__(value);
64
+ /******/ if(mode & 8) return value;
65
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
66
+ /******/ var ns = Object.create(null);
67
+ /******/ __webpack_require__.r(ns);
68
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
69
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
70
+ /******/ return ns;
71
+ /******/ };
72
+ /******/
73
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
74
+ /******/ __webpack_require__.n = function(module) {
75
+ /******/ var getter = module && module.__esModule ?
76
+ /******/ function getDefault() { return module['default']; } :
77
+ /******/ function getModuleExports() { return module; };
78
+ /******/ __webpack_require__.d(getter, 'a', getter);
79
+ /******/ return getter;
80
+ /******/ };
81
+ /******/
82
+ /******/ // Object.prototype.hasOwnProperty.call
83
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
84
+ /******/
85
+ /******/ // __webpack_public_path__
86
+ /******/ __webpack_require__.p = "";
87
+ /******/
88
+ /******/
89
+ /******/ // Load entry module and return exports
90
+ /******/ return __webpack_require__(__webpack_require__.s = 17);
91
+ /******/ })
92
+ /************************************************************************/
93
+ /******/ ({
94
+
95
+ /***/ 17:
96
+ /***/ (function(module, exports, __webpack_require__) {
97
+
98
+ "use strict";
99
+
100
+
101
+ Object.defineProperty(exports, "__esModule", {
102
+ value: true
103
+ });
104
+ exports.LAYOUT_TYPE = void 0;
105
+ var LAYOUT_TYPE;
106
+
107
+ (function (LAYOUT_TYPE) {
108
+ LAYOUT_TYPE["Off"] = "off";
109
+ LAYOUT_TYPE["Trellis"] = "trellis";
110
+ })(LAYOUT_TYPE = exports.LAYOUT_TYPE || (exports.LAYOUT_TYPE = {}));
111
+
112
+ /***/ })
113
+
114
+ /******/ });
115
+ //# sourceMappingURL=layoutUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/utils/layoutUtils.ts"],"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,IAAY,WAAZ;;AAAA,WAAY,WAAZ,EAAuB;AACnB;AACA;AACH,CAHD,EAAY,WAAW,GAAX,8CAAW,EAAX,CAAZ,E","file":"layoutUtils.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 = 17);\n","export enum LAYOUT_TYPE {\n Off = 'off',\n Trellis = 'trellis',\n}\n"],"sourceRoot":""}