@splunk/visualizations 24.7.0 → 25.0.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.
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_Tooltip_ChoroplethTooltip.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_Tooltip_ChoroplethTooltip_with_additional_fields.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_choropleth_layer.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Area_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bubble_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Image_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Scatter_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Background_Color_grey.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Basic_Bubble.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Bubble_Size_Max_90.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Bubble_Size_Method_area_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Bubble_Size_Method_diameter.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Bubble_Size_Min_40.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Result_Limit_0_Number_of_Results_30.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Result_Limit_10_Number_of_Results_30.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Result_Limit_3a_invalid_Number_of_Results_30.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Result_Limit_50_Number_of_Results_30.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Show_X_Axis_Extend_Range_false.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Show_X_Axis_Extend_Range_true_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Show_X_Axis_Minor_Grid_true.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Show_X_Axis_With_Zero_false_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Show_X_Axis_With_Zero_true.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Show_Y_Axis_Extend_Range_false.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Show_Y_Axis_Extend_Range_true_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Show_Y_Axis_Major_Grid_false.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Show_Y_Axis_Minor_Grid_true.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Show_Y_Axis_With_Zero_false_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Show_Y_Axis_With_Zero_true.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Label_Rotation_45.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Label_Rotation_90.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Label_Rotation_negative_45.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Label_Rotation_negative_90.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Label_Visibility_and_Y_Axis_Label_Visibility_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Line_Visibility_hide_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Line_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Major_Tick_Interval_6.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Major_Tick_Size_15_Minor_Tick_Size_10.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Major_Tick_Visibility_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Major_Tick_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Maximum_Number_14.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Minimum_Number_10.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Minor_Tick_Visibility_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Minor_Tick_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_X_Axis_Scale_log.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Abbreviation_auto_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Abbreviation_off.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Line_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Major_Tick_Interval_150.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Major_Tick_Size_15_Minor_Tick_Size_10.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Major_Tick_Visibility_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Major_Tick_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Maximum_Number_1500.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Minimum_Number_500.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Minor_Tick_Visibility_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Minor_Tick_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Scale_log.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_and_X_Axis_Title_Text_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_and_X_Axis_Title_Text_specified.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Column_Column_Chart_Overlay_on_Multiple_Overlay_Fields_with_space_specified.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Column_Column_Chart_Overlay_on_Overlay_Field_with_space_specified.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Column_Column_Y2_Axis_Mapped_Field_With_Space_specified.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Choropleth_Layer.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Choropleth_Layer_Opacities_scaled_to_be_less_than_max_of_0_8.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Choropleth_Layer_Result_Limit_Set_To_1.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Choropleth_Layer_String_GeoJson_Data.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Choropleth_Layer_With_additional_fields.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Background_Color_af575a.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Basic_Markdown.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Begin_with_Text_Instead_of_Header.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Font_Color_purple.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Font_Size_extraLarge.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Background_Color_grey.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Basic_Scatter.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Marker_Size_7.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Show_X_Axis_Extend_Range_false.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Show_X_Axis_Extend_Range_true_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Show_X_Axis_Minor_Grid_true.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Show_X_Axis_With_Zero_false_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Show_X_Axis_With_Zero_true.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Show_Y_Axis_Extend_Range_false.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Show_Y_Axis_Extend_Range_true_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Show_Y_Axis_Major_Grid_false.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Show_Y_Axis_Minor_Grid_true.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Show_Y_Axis_With_Zero_false_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Show_Y_Axis_With_Zero_true.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Label_Rotation_45.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Label_Rotation_90.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Label_Rotation_negative_45.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Label_Rotation_negative_90.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Label_Visibility_and_Y_Axis_Label_Visibility_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Line_Visibility_hide_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Line_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Major_Tick_Interval_6.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Major_Tick_Size_15_X_Axis_Minor_Tick_Size_10.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Major_Tick_Visibility_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Major_Tick_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Maximum_Number_14.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Minimum_Number_10.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Minor_Tick_Visibility_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Minor_Tick_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Scale_log.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Title_Text_and_Y_Axis_Title_Text_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_X_Axis_Title_Text_and_Y_Axis_Title_Text_specified.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Y_Axis_Line_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Y_Axis_Major_Tick_Interval_150.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Y_Axis_Major_Tick_Size_15_Y_Axis_Minor_Tick_Size_10.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Y_Axis_Major_Tick_Visibility_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Y_Axis_Major_Tick_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Y_Axis_Maximum_Number_1000.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Y_Axis_Minimum_Number_500.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Y_Axis_Minor_Tick_Visibility_hide.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Y_Axis_Minor_Tick_Visibility_show.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Scatter_Scatter_Y_Axis_Scale_log.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Change_Icon_Color_For_A_Remote_Icon.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_The_Icon_As_A_Remote_Icon.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_the_backgroundColor_based_on_the_majorValue.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_the_icon_color_based_on_the_majorValue.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_the_majorColor_based_on_the_majorValue.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Use_Mixed_Type_Series_Data.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Use_Time_Type_Series_Data.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Background_From_Major_Value.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Background_From_Trend_Value.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Major_Value_Color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Major_Value_Color_By_Trend_Value.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Max_Value_1000.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Radial_Color_By_Major_Value.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Change_The_Color_Of_Major_Value_Based_On_Its_Value.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_The_Background_Color_Based_On_The_Major_Value.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_The_Background_Color_Based_On_The_Trend_Value.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_The_Color_Of_Major_Value_Based_On_The_Trend_Value.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_The_Color_Of_The_Trend_Indicators_And_Number_Based_On_The_Trend_Value.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_The_Major_Value_Based_On_String_Type_Data.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Trend_Index_Out_Of_Range.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Use_Mixed_Type_Series_Data.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Use_Time_Type_Series_Data.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Align_Right.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Column_Width_Auto_Expand_Last_Column.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Font_Monospace.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Format_Number_Adv.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Show_Internal_Fields_false.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Show_Internal_Fields_true_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Time_Formatting.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Time_Zone_Time_Formatting.png +0 -0
- package/Area.config.js +1119 -241
- package/Area.config.js.map +1 -1
- package/Area.js +1241 -402
- package/Area.js.map +1 -1
- package/Bar.config.js +1089 -153
- package/Bar.config.js.map +1 -1
- package/Bar.js +1262 -365
- package/Bar.js.map +1 -1
- package/Bubble.config.js +702 -60
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +806 -203
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +62 -38
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +168 -178
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +1059 -170
- package/Column.config.js.map +1 -1
- package/Column.js +1234 -384
- package/Column.js.map +1 -1
- package/Ellipse.config.js +55 -31
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +135 -145
- package/Ellipse.js.map +1 -1
- package/FillerGauge.config.js +67 -43
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +157 -172
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +52 -25
- package/Image.config.js.map +1 -1
- package/Image.js +132 -140
- package/Image.js.map +1 -1
- package/Line.config.js +1035 -108
- package/Line.config.js.map +1 -1
- package/Line.js +1199 -311
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +78 -58
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +179 -194
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +787 -78
- package/Map.config.js.map +1 -1
- package/Map.js +846 -352
- package/Map.js.map +1 -1
- package/Markdown.config.js +73 -48
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +271 -259
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +77 -50
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +2079 -1987
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +75 -48
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +166 -181
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +77 -50
- package/Pie.config.js.map +1 -1
- package/Pie.js +1139 -1042
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +76 -49
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +196 -211
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +83 -56
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +256 -264
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +82 -55
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +190 -205
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +790 -135
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +1072 -485
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +85 -56
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +415 -411
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +37 -25
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +81 -57
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +195 -211
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +80 -51
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +342 -338
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +56 -36
- package/Table.config.js.map +1 -1
- package/Table.js +1610 -1553
- package/Table.js.map +1 -1
- package/common/Charting.js +10 -10
- package/common/Charting.js.map +1 -1
- package/common/ChartingApi.js +2 -2
- package/common/ChartingApi.js.map +1 -1
- package/common/EventsDoc.js +3 -3
- package/common/EventsDoc.js.map +1 -1
- package/common/OptionsDoc.js +49 -21
- package/common/OptionsDoc.js.map +1 -1
- package/common/SplunkVisualization.js +4 -4
- package/common/SplunkVisualization.js.map +1 -1
- package/common/ThemesDoc.js +2 -2
- package/common/chartingUtils.js +2 -2
- package/common/gaugeUtils.js +2 -2
- package/common/utils/configUtils.js +30 -4
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/hocUtils.js +26 -56
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +4 -2
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +8 -8
- package/common/utils/testHelper.js.map +1 -1
- package/common/withDashboardViz.js +32 -68
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +11 -11
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Maximum_Number_800.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bubble_Bubble_Y_Axis_Minimum_Number_300.png +0 -0
package/Table.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 265);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -109,18 +109,18 @@ module.exports = require("react");
|
|
|
109
109
|
/***/ 10:
|
|
110
110
|
/***/ (function(module, exports) {
|
|
111
111
|
|
|
112
|
-
module.exports = require("@
|
|
112
|
+
module.exports = require("@splunk/themes/variables");
|
|
113
113
|
|
|
114
114
|
/***/ }),
|
|
115
115
|
|
|
116
116
|
/***/ 11:
|
|
117
117
|
/***/ (function(module, exports) {
|
|
118
118
|
|
|
119
|
-
module.exports = require("@splunk/
|
|
119
|
+
module.exports = require("@splunk/visualizations-shared/Message");
|
|
120
120
|
|
|
121
121
|
/***/ }),
|
|
122
122
|
|
|
123
|
-
/***/
|
|
123
|
+
/***/ 111:
|
|
124
124
|
/***/ (function(module, exports, __webpack_require__) {
|
|
125
125
|
|
|
126
126
|
"use strict";
|
|
@@ -142,114 +142,24 @@ exports.validFontSizes = ['extraSmall', 'small', 'default', 'large'];
|
|
|
142
142
|
/***/ 12:
|
|
143
143
|
/***/ (function(module, exports) {
|
|
144
144
|
|
|
145
|
-
module.exports = require("@
|
|
145
|
+
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
146
146
|
|
|
147
147
|
/***/ }),
|
|
148
148
|
|
|
149
149
|
/***/ 13:
|
|
150
|
-
/***/ (function(module, exports
|
|
151
|
-
|
|
152
|
-
"use strict";
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
Object.defineProperty(exports, "__esModule", {
|
|
156
|
-
value: true
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
var React = __webpack_require__(1);
|
|
160
|
-
|
|
161
|
-
var styled_components_1 = __webpack_require__(4);
|
|
162
|
-
|
|
163
|
-
var SizeAwareWrapper_1 = __webpack_require__(17);
|
|
164
|
-
|
|
165
|
-
var style_1 = __webpack_require__(14);
|
|
166
|
-
|
|
167
|
-
var colorUtils_1 = __webpack_require__(12);
|
|
168
|
-
|
|
169
|
-
var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
170
|
-
var width = _ref.width;
|
|
171
|
-
return {
|
|
172
|
-
style: {
|
|
173
|
-
width: style_1.toPx(width)
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
}).withConfig({
|
|
177
|
-
displayName: "FixedSizeContainer__Item",
|
|
178
|
-
componentId: "sc-1yhgpod-0"
|
|
179
|
-
})(["position:relative;background-color:", "};"], function (props) {
|
|
180
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
181
|
-
}); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
182
|
-
|
|
183
|
-
var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
184
|
-
var width = _ref2.width,
|
|
185
|
-
height = _ref2.height;
|
|
186
|
-
return {
|
|
187
|
-
style: Object.assign(Object.assign({}, width && {
|
|
188
|
-
width: style_1.toPx(width)
|
|
189
|
-
}), height && {
|
|
190
|
-
height: style_1.toPx(height)
|
|
191
|
-
})
|
|
192
|
-
};
|
|
193
|
-
}).withConfig({
|
|
194
|
-
displayName: "FixedSizeContainer__FixSizeItem",
|
|
195
|
-
componentId: "sc-1yhgpod-1"
|
|
196
|
-
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
197
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
198
|
-
});
|
|
199
|
-
var ItemContent = styled_components_1.default.div.withConfig({
|
|
200
|
-
displayName: "FixedSizeContainer__ItemContent",
|
|
201
|
-
componentId: "sc-1yhgpod-2"
|
|
202
|
-
})(["position:relative;min-height:100px;width:100%;"]);
|
|
203
|
-
var FixSizeItemContent = styled_components_1.default.div.withConfig({
|
|
204
|
-
displayName: "FixedSizeContainer__FixSizeItemContent",
|
|
205
|
-
componentId: "sc-1yhgpod-3"
|
|
206
|
-
})(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
|
|
207
|
-
|
|
208
|
-
var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
209
|
-
var FixedSizeContainer = function FixedSizeContainer(props) {
|
|
210
|
-
var width = props.width,
|
|
211
|
-
height = props.height,
|
|
212
|
-
backgroundColor = props.backgroundColor;
|
|
213
|
-
|
|
214
|
-
if (!height) {
|
|
215
|
-
return React.createElement(Item, {
|
|
216
|
-
"data-test": "item",
|
|
217
|
-
width: width,
|
|
218
|
-
backgroundColor: backgroundColor
|
|
219
|
-
}, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
return React.createElement(FixSizeItem, {
|
|
223
|
-
"data-test": "fix-size-item",
|
|
224
|
-
"data-splunk-visualization-version": "24.7.0 - c7389a161",
|
|
225
|
-
width: width,
|
|
226
|
-
height: height,
|
|
227
|
-
backgroundColor: backgroundColor
|
|
228
|
-
}, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
|
|
229
|
-
var newWidth = _ref3.width,
|
|
230
|
-
newHeight = _ref3.height;
|
|
231
|
-
return React.createElement(Viz, Object.assign({}, props, {
|
|
232
|
-
width: newWidth,
|
|
233
|
-
height: newHeight
|
|
234
|
-
}));
|
|
235
|
-
})));
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
FixedSizeContainer.displayName = 'withFixedSizeContainer';
|
|
239
|
-
return FixedSizeContainer;
|
|
240
|
-
};
|
|
150
|
+
/***/ (function(module, exports) {
|
|
241
151
|
|
|
242
|
-
exports
|
|
152
|
+
module.exports = require("@splunk/visualizations-shared/colorUtils");
|
|
243
153
|
|
|
244
154
|
/***/ }),
|
|
245
155
|
|
|
246
|
-
/***/
|
|
156
|
+
/***/ 138:
|
|
247
157
|
/***/ (function(module, exports, __webpack_require__) {
|
|
248
158
|
|
|
249
159
|
"use strict";
|
|
250
160
|
|
|
251
161
|
|
|
252
|
-
var _slicedToArray = __webpack_require__(
|
|
162
|
+
var _slicedToArray = __webpack_require__(52);
|
|
253
163
|
|
|
254
164
|
var __rest = this && this.__rest || function (s, e) {
|
|
255
165
|
var t = {};
|
|
@@ -271,15 +181,15 @@ exports.config = exports.PureTable = exports.themes = exports.computeVizProps =
|
|
|
271
181
|
|
|
272
182
|
var lodash_1 = __webpack_require__(2);
|
|
273
183
|
|
|
274
|
-
var colorUtils_1 = __webpack_require__(
|
|
184
|
+
var colorUtils_1 = __webpack_require__(13);
|
|
275
185
|
|
|
276
|
-
var config_1 = __webpack_require__(
|
|
186
|
+
var config_1 = __webpack_require__(266);
|
|
277
187
|
|
|
278
188
|
exports.config = config_1.default;
|
|
279
189
|
|
|
280
|
-
var withDashboardViz_1 = __webpack_require__(
|
|
190
|
+
var withDashboardViz_1 = __webpack_require__(30);
|
|
281
191
|
|
|
282
|
-
var PureTable_1 = __webpack_require__(
|
|
192
|
+
var PureTable_1 = __webpack_require__(139);
|
|
283
193
|
|
|
284
194
|
exports.PureTable = PureTable_1.default;
|
|
285
195
|
|
|
@@ -357,106 +267,37 @@ exports.default = Table;
|
|
|
357
267
|
|
|
358
268
|
/***/ }),
|
|
359
269
|
|
|
360
|
-
/***/
|
|
361
|
-
/***/ (function(module, exports) {
|
|
362
|
-
|
|
363
|
-
module.exports = require("@splunk/visualizations-shared/style");
|
|
364
|
-
|
|
365
|
-
/***/ }),
|
|
366
|
-
|
|
367
|
-
/***/ 15:
|
|
368
|
-
/***/ (function(module, exports) {
|
|
369
|
-
|
|
370
|
-
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
371
|
-
|
|
372
|
-
/***/ }),
|
|
373
|
-
|
|
374
|
-
/***/ 16:
|
|
375
|
-
/***/ (function(module, exports) {
|
|
376
|
-
|
|
377
|
-
module.exports = require("@babel/runtime/helpers/createClass");
|
|
378
|
-
|
|
379
|
-
/***/ }),
|
|
380
|
-
|
|
381
|
-
/***/ 17:
|
|
382
|
-
/***/ (function(module, exports) {
|
|
383
|
-
|
|
384
|
-
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
385
|
-
|
|
386
|
-
/***/ }),
|
|
387
|
-
|
|
388
|
-
/***/ 19:
|
|
389
|
-
/***/ (function(module, exports) {
|
|
390
|
-
|
|
391
|
-
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
392
|
-
|
|
393
|
-
/***/ }),
|
|
394
|
-
|
|
395
|
-
/***/ 2:
|
|
396
|
-
/***/ (function(module, exports) {
|
|
397
|
-
|
|
398
|
-
module.exports = require("lodash");
|
|
399
|
-
|
|
400
|
-
/***/ }),
|
|
401
|
-
|
|
402
|
-
/***/ 21:
|
|
403
|
-
/***/ (function(module, exports) {
|
|
404
|
-
|
|
405
|
-
module.exports = require("@babel/runtime/helpers/typeof");
|
|
406
|
-
|
|
407
|
-
/***/ }),
|
|
408
|
-
|
|
409
|
-
/***/ 22:
|
|
410
|
-
/***/ (function(module, exports) {
|
|
411
|
-
|
|
412
|
-
module.exports = require("@splunk/themes/pick");
|
|
413
|
-
|
|
414
|
-
/***/ }),
|
|
415
|
-
|
|
416
|
-
/***/ 24:
|
|
270
|
+
/***/ 139:
|
|
417
271
|
/***/ (function(module, exports, __webpack_require__) {
|
|
418
272
|
|
|
419
273
|
"use strict";
|
|
420
274
|
|
|
421
275
|
|
|
422
|
-
|
|
423
|
-
value: true
|
|
424
|
-
});
|
|
425
|
-
exports.pickFieldFromJSONSchema = void 0;
|
|
426
|
-
|
|
427
|
-
var lodash_1 = __webpack_require__(2);
|
|
428
|
-
|
|
429
|
-
var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
|
|
430
|
-
var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
|
431
|
-
return Object.keys(optionsSchema).reduce(function (accum, k) {
|
|
432
|
-
if (lodash_1.has(optionsSchema[k], fieldName)) {
|
|
433
|
-
accum[k] = optionsSchema[k][fieldName];
|
|
434
|
-
} else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
|
|
435
|
-
var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
|
|
436
|
-
|
|
437
|
-
if (!lodash_1.isEmpty(nestedSchema)) {
|
|
438
|
-
accum[k] = nestedSchema;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
276
|
+
var _slicedToArray = __webpack_require__(52);
|
|
441
277
|
|
|
442
|
-
|
|
443
|
-
}, {});
|
|
444
|
-
};
|
|
278
|
+
var _defineProperty = __webpack_require__(7);
|
|
445
279
|
|
|
446
|
-
|
|
280
|
+
var _taggedTemplateLiteral = __webpack_require__(81);
|
|
447
281
|
|
|
448
|
-
|
|
282
|
+
var _templateObject, _templateObject2;
|
|
449
283
|
|
|
450
|
-
|
|
451
|
-
|
|
284
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
285
|
+
var t = {};
|
|
452
286
|
|
|
453
|
-
|
|
287
|
+
for (var p in s) {
|
|
288
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
289
|
+
}
|
|
454
290
|
|
|
291
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
292
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
293
|
+
}
|
|
294
|
+
return t;
|
|
295
|
+
};
|
|
455
296
|
|
|
456
297
|
Object.defineProperty(exports, "__esModule", {
|
|
457
298
|
value: true
|
|
458
299
|
});
|
|
459
|
-
exports.
|
|
300
|
+
exports.MINIMUM_COLUMN_SIZE = void 0;
|
|
460
301
|
|
|
461
302
|
var React = __webpack_require__(1);
|
|
462
303
|
|
|
@@ -464,257 +305,958 @@ var T = __webpack_require__(0);
|
|
|
464
305
|
|
|
465
306
|
var lodash_1 = __webpack_require__(2);
|
|
466
307
|
|
|
308
|
+
var styled_components_1 = __webpack_require__(4);
|
|
309
|
+
|
|
467
310
|
var i18n_1 = __webpack_require__(3);
|
|
468
311
|
|
|
469
|
-
var
|
|
312
|
+
var Table_1 = __webpack_require__(89);
|
|
470
313
|
|
|
471
|
-
var
|
|
472
|
-
/**
|
|
473
|
-
* @method shouldShowIconPlaceholder
|
|
474
|
-
* @param {object} dataSources
|
|
475
|
-
* @param {boolean} loading
|
|
476
|
-
* @returns {boolean}
|
|
477
|
-
*/
|
|
314
|
+
var Paginator_1 = __webpack_require__(267);
|
|
478
315
|
|
|
316
|
+
var Message_1 = __webpack_require__(268);
|
|
479
317
|
|
|
480
|
-
var
|
|
481
|
-
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
482
|
-
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
483
|
-
var noData = data === undefined;
|
|
484
|
-
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
485
|
-
var noFields = fields === undefined;
|
|
486
|
-
return loading || noData || noFields;
|
|
487
|
-
};
|
|
318
|
+
var colorUtils_1 = __webpack_require__(13);
|
|
488
319
|
|
|
489
|
-
|
|
490
|
-
var propTypes = {
|
|
491
|
-
icon: T.func,
|
|
492
|
-
width: T.oneOfType([T.string, T.number]),
|
|
493
|
-
height: T.oneOfType([T.string, T.number]),
|
|
494
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
495
|
-
backgroundColor: T.string,
|
|
496
|
-
iconColor: T.string
|
|
497
|
-
};
|
|
498
|
-
/**
|
|
499
|
-
* @method IconPlaceholder
|
|
500
|
-
* @param {IconPlaceholderProps} props
|
|
501
|
-
* @returns {React.ReactElement}
|
|
502
|
-
*/
|
|
320
|
+
var style_1 = __webpack_require__(15);
|
|
503
321
|
|
|
504
|
-
var
|
|
505
|
-
var width = props.width,
|
|
506
|
-
height = props.height,
|
|
507
|
-
icon = props.icon,
|
|
508
|
-
iconColor = props.iconColor;
|
|
322
|
+
var pick_1 = __webpack_require__(20);
|
|
509
323
|
|
|
510
|
-
|
|
511
|
-
return React.createElement(icon, {
|
|
512
|
-
style: {
|
|
513
|
-
left: '50%',
|
|
514
|
-
top: '50%',
|
|
515
|
-
color: iconColor,
|
|
516
|
-
opacity: 0.15,
|
|
517
|
-
position: 'absolute',
|
|
518
|
-
transform: 'translate(-50%, -50%)'
|
|
519
|
-
},
|
|
520
|
-
width: '50%',
|
|
521
|
-
height: '50%'
|
|
522
|
-
});
|
|
523
|
-
}
|
|
324
|
+
var variables_1 = __webpack_require__(10);
|
|
524
325
|
|
|
525
|
-
|
|
526
|
-
width: width,
|
|
527
|
-
height: height,
|
|
528
|
-
level: "warning",
|
|
529
|
-
message: i18n_1._('No DataSource Connected')
|
|
530
|
-
});
|
|
531
|
-
};
|
|
326
|
+
var hooks_1 = __webpack_require__(269);
|
|
532
327
|
|
|
533
|
-
|
|
534
|
-
IconPlaceholder.defaultProps = {
|
|
535
|
-
width: '100%',
|
|
536
|
-
height: 250
|
|
537
|
-
};
|
|
538
|
-
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
328
|
+
var consts_1 = __webpack_require__(111);
|
|
539
329
|
|
|
540
|
-
|
|
330
|
+
var cells_1 = __webpack_require__(270);
|
|
541
331
|
|
|
542
|
-
|
|
543
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
332
|
+
var getPagination_1 = __webpack_require__(28);
|
|
544
333
|
|
|
545
|
-
|
|
334
|
+
var getSorting_1 = __webpack_require__(27);
|
|
546
335
|
|
|
336
|
+
var FixedSizeContainer_1 = __webpack_require__(14);
|
|
547
337
|
|
|
548
|
-
var
|
|
549
|
-
|
|
550
|
-
Object.defineProperty(exports, "__esModule", {
|
|
551
|
-
value: true
|
|
552
|
-
});
|
|
553
|
-
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
554
|
-
|
|
555
|
-
var T = __webpack_require__(0);
|
|
338
|
+
var utils_1 = __webpack_require__(275); // debounce was imported this way due to typing
|
|
339
|
+
// eslint-disable-next-line import/order
|
|
556
340
|
|
|
557
|
-
var lodash_1 = __webpack_require__(2);
|
|
558
341
|
|
|
559
|
-
var
|
|
342
|
+
var debounce = __webpack_require__(276);
|
|
560
343
|
|
|
561
|
-
exports.
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
344
|
+
exports.MINIMUM_COLUMN_SIZE = 30;
|
|
345
|
+
var NonVisibleTableHead = styled_components_1.default(Table_1.default.Head).withConfig({
|
|
346
|
+
displayName: "PureTable__NonVisibleTableHead",
|
|
347
|
+
componentId: "tovzjg-0"
|
|
348
|
+
})(["display:none;"]);
|
|
349
|
+
var FixedTableHead = styled_components_1.default(Table_1.default.Head).withConfig({
|
|
350
|
+
displayName: "PureTable__FixedTableHead",
|
|
351
|
+
componentId: "tovzjg-1"
|
|
352
|
+
})(["position:sticky;top:0;"]);
|
|
353
|
+
var VizTableContainer = styled_components_1.default.div.withConfig({
|
|
354
|
+
displayName: "PureTable__VizTableContainer",
|
|
355
|
+
componentId: "tovzjg-2"
|
|
356
|
+
})(["box-sizing:border-box;padding:", ";background-color:", ";display:flex;flex-flow:column nowrap;overflow:hidden;"], pick_1.default({
|
|
357
|
+
enterprise: variables_1.default.spacingHalf,
|
|
358
|
+
prisma: variables_1.default.spacingSmall
|
|
359
|
+
}), function (props) {
|
|
360
|
+
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
565
361
|
});
|
|
362
|
+
VizTableContainer.displayName = 'VizTableContainer';
|
|
363
|
+
var PAGINATOR_CONTAINER_HEIGHT = 38;
|
|
364
|
+
var PAGINATOR_SPACING = 5;
|
|
365
|
+
var SUITableContainer = styled_components_1.default.div.withConfig({
|
|
366
|
+
displayName: "PureTable__SUITableContainer",
|
|
367
|
+
componentId: "tovzjg-3"
|
|
368
|
+
})(["& *{font-family:", ";font-size:", ";line-height:", ";}box-sizing:border-box;flex-grow:1;overflow:hidden;", ";", ";", " ", " & [data-fixed-column='true']{table-layout:", ";width:", ";}"], function (props) {
|
|
369
|
+
return props.font;
|
|
370
|
+
}, function (props) {
|
|
371
|
+
return props.fontSize;
|
|
372
|
+
}, function (props) {
|
|
373
|
+
return props.lineHeight;
|
|
374
|
+
}, function (_ref) {
|
|
375
|
+
var width = _ref.width,
|
|
376
|
+
height = _ref.height,
|
|
377
|
+
isPaging = _ref.isPaging,
|
|
378
|
+
theme = _ref.theme;
|
|
379
|
+
var padding = pick_1.default({
|
|
380
|
+
enterprise: variables_1.default.spacingHalf({
|
|
381
|
+
theme: theme
|
|
382
|
+
}),
|
|
383
|
+
prisma: variables_1.default.spacingSmall({
|
|
384
|
+
theme: theme
|
|
385
|
+
})
|
|
386
|
+
})({
|
|
387
|
+
theme: theme
|
|
388
|
+
});
|
|
389
|
+
var paddingOffset = parseInt(padding, 10) * 2;
|
|
390
|
+
return style_1.toDimension({
|
|
391
|
+
width: width - paddingOffset,
|
|
392
|
+
height: isPaging ? height - PAGINATOR_CONTAINER_HEIGHT - PAGINATOR_SPACING - paddingOffset : height - paddingOffset
|
|
393
|
+
});
|
|
394
|
+
}, function (_ref2) {
|
|
395
|
+
var isPaging = _ref2.isPaging;
|
|
396
|
+
return isPaging && "\n margin-bottom: ".concat(PAGINATOR_SPACING, "px;\n ");
|
|
397
|
+
}, function (_ref3) {
|
|
398
|
+
var headerStyle = _ref3.headerStyle;
|
|
399
|
+
return headerStyle && headerStyle.backgroundColor && styled_components_1.css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & [data-test='head-cell'] {\n background-color: ", ";\n }\n "])), headerStyle.backgroundColor);
|
|
400
|
+
}, function (_ref4) {
|
|
401
|
+
var headerStyle = _ref4.headerStyle;
|
|
402
|
+
return headerStyle && headerStyle.color && styled_components_1.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n & [data-test='head-cell'] > div > span {\n color: ", ";\n }\n "])), headerStyle.color);
|
|
403
|
+
}, function (_ref5) {
|
|
404
|
+
var widthSet = _ref5.widthSet;
|
|
405
|
+
return widthSet ? 'fixed' : 'auto';
|
|
406
|
+
}, function (_ref6) {
|
|
407
|
+
var widthSet = _ref6.widthSet;
|
|
408
|
+
return widthSet ? '0' : '100%';
|
|
409
|
+
});
|
|
410
|
+
SUITableContainer.displayName = 'SUITableContainer';
|
|
411
|
+
var PaginatorContainer = styled_components_1.default.div.withConfig({
|
|
412
|
+
displayName: "PureTable__PaginatorContainer",
|
|
413
|
+
componentId: "tovzjg-4"
|
|
414
|
+
})(["position:relative;text-align:right;height:", "px;"], PAGINATOR_CONTAINER_HEIGHT);
|
|
415
|
+
PaginatorContainer.displayName = 'PaginatorContainer'; // allow for early return in case of empty tableBody while still following hook rules
|
|
566
416
|
|
|
567
|
-
var
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
var onSort;
|
|
578
|
-
|
|
579
|
-
if (lodash_1.isFunction(onRequestParamsChange)) {
|
|
580
|
-
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
581
|
-
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
582
|
-
currentSortDir = requestParams.sort[currentSortKey];
|
|
583
|
-
} // undid memoization since there is a dependency on requestParams, which is a deeply nested object
|
|
584
|
-
|
|
417
|
+
var withEmptyTableMessage = function withEmptyTableMessage(Viz) {
|
|
418
|
+
// TODO(fkurniawan): add omit type to differentiate WrapperProps from PureTableProps
|
|
419
|
+
var Wrapper = function Wrapper(props) {
|
|
420
|
+
var headers = props.headers,
|
|
421
|
+
table = props.table,
|
|
422
|
+
headerVisibility = props.headerVisibility,
|
|
423
|
+
showRowNumbers = props.showRowNumbers,
|
|
424
|
+
showInternalFields = props.showInternalFields,
|
|
425
|
+
tableFormat = props.tableFormat,
|
|
426
|
+
columnFormat = props.columnFormat;
|
|
585
427
|
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
428
|
+
var _hooks_1$useTable = hooks_1.useTable({
|
|
429
|
+
headers: headers,
|
|
430
|
+
table: table,
|
|
431
|
+
headerVisibility: headerVisibility,
|
|
432
|
+
showRowNumbers: showRowNumbers,
|
|
433
|
+
showInternalFields: showInternalFields,
|
|
434
|
+
tableFormat: Object.assign(Object.assign(Object.assign(Object.assign({}, tableFormat), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.align) && {
|
|
435
|
+
align: lodash_1.cloneDeep(tableFormat.align)
|
|
436
|
+
}), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.cellTypes) && {
|
|
437
|
+
cellTypes: lodash_1.cloneDeep(tableFormat.cellTypes)
|
|
438
|
+
}), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.data) && {
|
|
439
|
+
data: lodash_1.cloneDeep(tableFormat.data)
|
|
440
|
+
}),
|
|
441
|
+
columnFormat: columnFormat
|
|
442
|
+
}),
|
|
443
|
+
tableHeader = _hooks_1$useTable.tableHeader,
|
|
444
|
+
tableBody = _hooks_1$useTable.tableBody;
|
|
589
445
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
}));
|
|
596
|
-
} else {
|
|
597
|
-
onRequestParamsChange(requestParams);
|
|
598
|
-
}
|
|
599
|
-
};
|
|
600
|
-
}
|
|
446
|
+
if (tableBody.rows.length === 0) {
|
|
447
|
+
return React.createElement(Message_1.default, {
|
|
448
|
+
type: "warning"
|
|
449
|
+
}, i18n_1._('No data!'));
|
|
450
|
+
}
|
|
601
451
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
452
|
+
return React.createElement(Viz, Object.assign({}, props, {
|
|
453
|
+
tableHeader: tableHeader,
|
|
454
|
+
tableBody: tableBody
|
|
455
|
+
}));
|
|
606
456
|
};
|
|
607
|
-
};
|
|
608
457
|
|
|
609
|
-
|
|
458
|
+
Wrapper.displayName = 'PureTableWrapper';
|
|
459
|
+
return Wrapper;
|
|
460
|
+
};
|
|
610
461
|
|
|
611
|
-
|
|
462
|
+
var useTableHead = function useTableHead(visibility) {
|
|
463
|
+
if (visibility === 'none') {
|
|
464
|
+
return NonVisibleTableHead;
|
|
465
|
+
}
|
|
612
466
|
|
|
613
|
-
|
|
614
|
-
|
|
467
|
+
if (visibility === 'fixed') {
|
|
468
|
+
return FixedTableHead;
|
|
469
|
+
}
|
|
615
470
|
|
|
616
|
-
|
|
471
|
+
return Table_1.default.Head;
|
|
472
|
+
};
|
|
617
473
|
|
|
474
|
+
var HeadCell = function HeadCell(_a) {
|
|
475
|
+
var setTempColumnWidth = _a.setTempColumnWidth,
|
|
476
|
+
setRemainingWidth = _a.setRemainingWidth,
|
|
477
|
+
value = _a.value,
|
|
478
|
+
widthSet = _a.widthSet,
|
|
479
|
+
headerVisibility = _a.headerVisibility,
|
|
480
|
+
props = __rest(_a, ["setTempColumnWidth", "setRemainingWidth", "value", "widthSet", "headerVisibility"]);
|
|
618
481
|
|
|
619
|
-
var
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
482
|
+
var cellRef = React.useRef(null);
|
|
483
|
+
React.useEffect(function () {
|
|
484
|
+
if (!widthSet && cellRef.current && cellRef.current.clientWidth >= 0 && headerVisibility !== 'none') {
|
|
485
|
+
setTempColumnWidth(function (columnWidth) {
|
|
486
|
+
return Object.assign(Object.assign({}, columnWidth), _defineProperty({}, value, {
|
|
487
|
+
width: cellRef.current.clientWidth
|
|
488
|
+
}));
|
|
489
|
+
});
|
|
490
|
+
setRemainingWidth(function (prevWidth) {
|
|
491
|
+
return prevWidth + Math.max(props.width ? cellRef.current.clientWidth - props.width : 0, 0);
|
|
492
|
+
});
|
|
625
493
|
}
|
|
626
494
|
});
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
}
|
|
495
|
+
return React.createElement(Table_1.default.HeadCell, Object.assign({
|
|
496
|
+
elementRef: cellRef
|
|
497
|
+
}, props), value);
|
|
498
|
+
};
|
|
631
499
|
|
|
632
|
-
var
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
500
|
+
var fontMap = {
|
|
501
|
+
proportional: 'Splunk Platform Sans',
|
|
502
|
+
monospace: 'Splunk Platform Mono'
|
|
503
|
+
};
|
|
504
|
+
var fontSizeMap = {
|
|
505
|
+
extraSmall: '10px',
|
|
506
|
+
small: '12px',
|
|
507
|
+
default: '14px',
|
|
508
|
+
large: '16px'
|
|
509
|
+
};
|
|
510
|
+
var rowHeightMap = {
|
|
511
|
+
extraSmall: '12px',
|
|
512
|
+
small: '12px',
|
|
513
|
+
default: '20px',
|
|
514
|
+
large: '24px'
|
|
636
515
|
};
|
|
637
516
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
});
|
|
641
|
-
exports.default = void 0; // NOTE: wildcard syntax only works for named exports
|
|
642
|
-
// for some reason, omitting the default export worked before TS v4
|
|
643
|
-
// see: https://stackoverflow.com/a/34445175
|
|
517
|
+
var PureTable = function PureTable(props) {
|
|
518
|
+
var _a;
|
|
644
519
|
|
|
645
|
-
|
|
520
|
+
var count = props.count,
|
|
521
|
+
width = props.width,
|
|
522
|
+
height = props.height,
|
|
523
|
+
backgroundColor = props.backgroundColor,
|
|
524
|
+
tableHeader = props.tableHeader,
|
|
525
|
+
tableBody = props.tableBody,
|
|
526
|
+
showRowNumbers = props.showRowNumbers,
|
|
527
|
+
_props$sortParams = props.sortParams,
|
|
528
|
+
currentSortKey = _props$sortParams.currentSortKey,
|
|
529
|
+
currentSortDir = _props$sortParams.currentSortDir,
|
|
530
|
+
onSort = _props$sortParams.onSort,
|
|
531
|
+
_b = props.paginatorParams,
|
|
532
|
+
isPaging = _b.isPaging,
|
|
533
|
+
paginatorOnChange = _b.onChange,
|
|
534
|
+
paginatorProps = __rest(_b, ["isPaging", "onChange"]),
|
|
535
|
+
onCellClick = props.onCellClick,
|
|
536
|
+
onColumnFormatChange = props.onColumnFormatChange,
|
|
537
|
+
columnFormat = props.columnFormat,
|
|
538
|
+
mode = props.mode,
|
|
539
|
+
headerVisibility = props.headerVisibility,
|
|
540
|
+
font = props.font,
|
|
541
|
+
fontSize = props.fontSize;
|
|
646
542
|
|
|
647
|
-
var
|
|
543
|
+
var _React$useState = React.useState(columnFormat),
|
|
544
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
545
|
+
columns = _React$useState2[0],
|
|
546
|
+
setColumns = _React$useState2[1];
|
|
648
547
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
}
|
|
654
|
-
});
|
|
655
|
-
|
|
656
|
-
/***/ }),
|
|
657
|
-
|
|
658
|
-
/***/ 264:
|
|
659
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
548
|
+
var _React$useState3 = React.useState(columnFormat),
|
|
549
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
550
|
+
tempColumns = _React$useState4[0],
|
|
551
|
+
setTempColumns = _React$useState4[1];
|
|
660
552
|
|
|
661
|
-
|
|
553
|
+
var _React$useState5 = React.useState(0),
|
|
554
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
555
|
+
remainingWidth = _React$useState6[0],
|
|
556
|
+
setRemainingWidth = _React$useState6[1];
|
|
662
557
|
|
|
558
|
+
var numColumnsWithoutWidth = Object.keys(tempColumns).reduce(function (acc, key) {
|
|
559
|
+
var _a;
|
|
663
560
|
|
|
664
|
-
|
|
561
|
+
if ((_a = columns[key]) === null || _a === void 0 ? void 0 : _a.width) {
|
|
562
|
+
return acc;
|
|
563
|
+
}
|
|
665
564
|
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
565
|
+
return acc + 1;
|
|
566
|
+
}, 0);
|
|
567
|
+
var containerRef = React.useRef(null);
|
|
568
|
+
var containerRefInner = React.useRef(null);
|
|
569
|
+
var containerRefInnerWidth = (_a = containerRefInner === null || containerRefInner === void 0 ? void 0 : containerRefInner.current) === null || _a === void 0 ? void 0 : _a.clientWidth;
|
|
570
|
+
var widthRef = React.useRef(0);
|
|
571
|
+
var widthSet = tableHeader.cells.length === tableHeader.cells.filter(function (_ref7) {
|
|
572
|
+
var value = _ref7.value,
|
|
573
|
+
showCell = _ref7.showCell;
|
|
669
574
|
|
|
670
|
-
var
|
|
575
|
+
var _a, _b;
|
|
671
576
|
|
|
672
|
-
|
|
577
|
+
return ((_a = columns[value]) === null || _a === void 0 ? void 0 : _a.width) !== undefined || ((_b = tempColumns[value]) === null || _b === void 0 ? void 0 : _b.width) !== undefined || !showCell;
|
|
578
|
+
}).length;
|
|
579
|
+
React.useEffect(function () {
|
|
580
|
+
if (containerRef.current && containerRef.current.clientWidth !== widthRef.current) {
|
|
581
|
+
widthRef.current = containerRef.current.clientWidth;
|
|
582
|
+
recalculateTempColumnWidths();
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
var firstRenderCount = React.useRef(count);
|
|
586
|
+
React.useEffect(function () {
|
|
587
|
+
if (firstRenderCount.current !== count) {
|
|
588
|
+
firstRenderCount.current = count;
|
|
589
|
+
paginatorOnChange(null, {
|
|
590
|
+
count: count
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
}, [count, paginatorProps]);
|
|
594
|
+
var stringifiedColumnFormat = JSON.stringify(columnFormat);
|
|
595
|
+
var columnFormatRef = React.useRef(stringifiedColumnFormat);
|
|
596
|
+
var modeRef = React.useRef(mode);
|
|
597
|
+
React.useEffect(function () {
|
|
598
|
+
if (modeRef.current !== mode || columnFormatRef.current !== stringifiedColumnFormat) {
|
|
599
|
+
columnFormatRef.current = stringifiedColumnFormat;
|
|
600
|
+
modeRef.current = mode;
|
|
601
|
+
setColumns(columnFormat);
|
|
602
|
+
}
|
|
603
|
+
}, [mode, stringifiedColumnFormat]);
|
|
604
|
+
var TableHead = useTableHead(headerVisibility);
|
|
605
|
+
var debouncedDrilldown = debounce(function (e, payload) {
|
|
606
|
+
if (window.getSelection().toString() === '') {
|
|
607
|
+
if (lodash_1.isFunction(onCellClick)) {
|
|
608
|
+
onCellClick({
|
|
609
|
+
e: e,
|
|
610
|
+
payload: payload
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}, 200);
|
|
615
|
+
var drilldownHandler = React.useCallback(function (e) {
|
|
616
|
+
var element = e.target;
|
|
617
|
+
var row = element.getAttribute('data-row-index');
|
|
618
|
+
var col = element.getAttribute('data-col-index');
|
|
619
|
+
var arrayIndex = element.getAttribute('data-array-index') || -1;
|
|
673
620
|
|
|
674
|
-
|
|
621
|
+
if (row && col) {
|
|
622
|
+
var cellRefIndex = +col;
|
|
623
|
+
var cellIndex = cellRefIndex;
|
|
624
|
+
var rowIndex = +row;
|
|
625
|
+
var fieldValue = tableHeader.cells[cellRefIndex].value;
|
|
626
|
+
var cellValue = tableBody.rows[rowIndex].cells[cellRefIndex].value;
|
|
627
|
+
var cellRawValue = tableBody.rows[rowIndex].cells[cellRefIndex].value;
|
|
628
|
+
var value = arrayIndex === -1 ? cellValue : cellRawValue[+arrayIndex]; // Wish we did not have these if statements for
|
|
629
|
+
// showRowNumbers
|
|
675
630
|
|
|
676
|
-
|
|
631
|
+
if (showRowNumbers === true) {
|
|
632
|
+
if (cellIndex === 0) {
|
|
633
|
+
// no click event for row numbers
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
677
636
|
|
|
678
|
-
|
|
637
|
+
cellIndex -= 1;
|
|
638
|
+
}
|
|
679
639
|
|
|
680
|
-
var
|
|
640
|
+
var payload = {
|
|
641
|
+
cellIndex: cellIndex,
|
|
642
|
+
rowIndex: rowIndex,
|
|
643
|
+
fieldValue: fieldValue,
|
|
644
|
+
cellValue: cellValue,
|
|
645
|
+
cellRawValue: cellRawValue,
|
|
646
|
+
value: value,
|
|
647
|
+
name: fieldValue
|
|
648
|
+
};
|
|
649
|
+
tableBody.rows[rowIndex].cells.forEach(function (c, index) {
|
|
650
|
+
var rowToken = "row.".concat(tableHeader.cells[index].value, ".value");
|
|
651
|
+
payload[rowToken] = c.value;
|
|
652
|
+
});
|
|
653
|
+
debouncedDrilldown(e.nativeEvent, payload);
|
|
654
|
+
}
|
|
655
|
+
}, [onCellClick, showRowNumbers, tableHeader, tableBody]);
|
|
656
|
+
var debouncedOnColumnFormatChange = React.useMemo(function () {
|
|
657
|
+
return debounce(function (newFormat) {
|
|
658
|
+
onColumnFormatChange(newFormat);
|
|
659
|
+
}, 300);
|
|
660
|
+
}, [onColumnFormatChange]);
|
|
681
661
|
|
|
682
|
-
var
|
|
662
|
+
var handleResizeColumn = function handleResizeColumn(_event, payload) {
|
|
663
|
+
var updatedCF = columns;
|
|
664
|
+
var field = payload.columnId;
|
|
665
|
+
var lastShowingTableHeaderWidth = utils_1.getLastColumnWidth(containerRefInnerWidth, lastShowingTableHeadersID, columns, tempColumns, firstShowingTableHeadersID);
|
|
666
|
+
updatedCF[lastShowingTableHeadersID] = Object.assign(Object.assign({}, updatedCF[lastShowingTableHeadersID]), {
|
|
667
|
+
width: Math.max(lastShowingTableHeaderWidth, exports.MINIMUM_COLUMN_SIZE)
|
|
668
|
+
});
|
|
669
|
+
updatedCF[field] = Object.assign(Object.assign({}, updatedCF[field]), {
|
|
670
|
+
width: Math.max(payload.width, exports.MINIMUM_COLUMN_SIZE)
|
|
671
|
+
});
|
|
672
|
+
setColumns(Object.assign({}, updatedCF)); // Updates column json in edit mode
|
|
683
673
|
|
|
684
|
-
|
|
674
|
+
if (mode === 'edit') {
|
|
675
|
+
debouncedOnColumnFormatChange(updatedCF);
|
|
676
|
+
}
|
|
677
|
+
};
|
|
685
678
|
|
|
686
|
-
var
|
|
679
|
+
var handleEventClick = function handleEventClick(e) {
|
|
680
|
+
e.stopPropagation();
|
|
681
|
+
};
|
|
687
682
|
|
|
688
|
-
var
|
|
683
|
+
var recalculateTempColumnWidths = function recalculateTempColumnWidths() {
|
|
684
|
+
setTempColumns({});
|
|
685
|
+
setRemainingWidth(0);
|
|
686
|
+
};
|
|
689
687
|
|
|
690
|
-
var
|
|
688
|
+
var withColumnResizing = function withColumnResizing(func) {
|
|
689
|
+
return function (e, additionalParams) {
|
|
690
|
+
recalculateTempColumnWidths();
|
|
691
|
+
func(e, additionalParams);
|
|
692
|
+
};
|
|
693
|
+
};
|
|
691
694
|
|
|
692
|
-
var
|
|
695
|
+
var fontMapped = fontMap[font] || fontMap.proportional;
|
|
696
|
+
var fontSizeMapped = fontSizeMap[fontSize] || fontSizeMap.default;
|
|
697
|
+
var rowHeightMapped = rowHeightMap[fontSize] || rowHeightMap.default;
|
|
698
|
+
var firstShowingTableHeadersID = tableHeader.cells.filter(function (c) {
|
|
699
|
+
return c.showCell;
|
|
700
|
+
}).map(function (c) {
|
|
701
|
+
return c.value;
|
|
702
|
+
})[0];
|
|
703
|
+
var lastShowingTableHeadersID = tableHeader.cells.filter(function (c) {
|
|
704
|
+
return c.showCell;
|
|
705
|
+
}).map(function (c) {
|
|
706
|
+
return c.value;
|
|
707
|
+
}).reverse()[0];
|
|
708
|
+
return React.createElement(VizTableContainer, {
|
|
709
|
+
backgroundColor: backgroundColor,
|
|
710
|
+
ref: containerRef
|
|
711
|
+
}, React.createElement(SUITableContainer, {
|
|
712
|
+
ref: containerRefInner,
|
|
713
|
+
width: width,
|
|
714
|
+
height: height,
|
|
715
|
+
isPaging: isPaging,
|
|
716
|
+
headerStyle: tableHeader.style,
|
|
717
|
+
widthSet: widthSet,
|
|
718
|
+
font: fontMapped,
|
|
719
|
+
fontSize: fontSizeMapped,
|
|
720
|
+
lineHeight: rowHeightMapped
|
|
721
|
+
}, React.createElement(Table_1.default, {
|
|
722
|
+
headType: headerVisibility !== 'none' ? 'inline' : undefined,
|
|
723
|
+
innerStyle: {
|
|
724
|
+
height: '100%'
|
|
725
|
+
},
|
|
726
|
+
outerStyle: {
|
|
727
|
+
height: '100%',
|
|
728
|
+
cursor: onCellClick ? 'pointer' : 'unset'
|
|
729
|
+
},
|
|
730
|
+
onClick: onCellClick ? drilldownHandler : lodash_1.noop,
|
|
731
|
+
onRequestResizeColumn: handleResizeColumn
|
|
732
|
+
}, React.createElement(TableHead, null, tableHeader.cells.filter(function (c) {
|
|
733
|
+
return c.showCell;
|
|
734
|
+
}).map(function (_a) {
|
|
735
|
+
var key = _a.key,
|
|
736
|
+
value = _a.value,
|
|
737
|
+
sortKey = _a.sortKey,
|
|
738
|
+
rest = __rest(_a, ["key", "value", "sortKey"]);
|
|
693
739
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
740
|
+
return React.createElement(HeadCell, Object.assign({
|
|
741
|
+
key: key,
|
|
742
|
+
columnId: value,
|
|
743
|
+
sortDir: sortKey === currentSortKey ? currentSortDir : 'none',
|
|
744
|
+
width: value === lastShowingTableHeadersID ? utils_1.getLastColumnWidth(containerRefInnerWidth, lastShowingTableHeadersID, columns, tempColumns, firstShowingTableHeadersID) : utils_1.getColumnWidth({
|
|
745
|
+
columns: columns,
|
|
746
|
+
tempColumns: tempColumns,
|
|
747
|
+
columnName: value,
|
|
748
|
+
remainingWidth: remainingWidth,
|
|
749
|
+
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
750
|
+
}),
|
|
751
|
+
onMouseDown: handleEventClick,
|
|
752
|
+
value: value,
|
|
753
|
+
setTempColumnWidth: setTempColumns,
|
|
754
|
+
widthSet: widthSet,
|
|
755
|
+
onSort: withColumnResizing(onSort),
|
|
756
|
+
headerVisibility: headerVisibility,
|
|
757
|
+
setRemainingWidth: setRemainingWidth
|
|
758
|
+
}, Object.assign({
|
|
759
|
+
sortKey: sortKey
|
|
760
|
+
}, rest)));
|
|
761
|
+
})), React.createElement(Table_1.default.Body, null, tableBody.rows.map(function (row) {
|
|
762
|
+
return React.createElement(Table_1.default.Row, {
|
|
763
|
+
key: row.key
|
|
764
|
+
}, row.cells.filter(function (c) {
|
|
765
|
+
return c.showCell;
|
|
766
|
+
}).map(function (cell) {
|
|
767
|
+
return React.createElement(cells_1.SwitchTableCell, {
|
|
768
|
+
key: cell.key,
|
|
769
|
+
type: cell.cellType
|
|
770
|
+
}, React.createElement(cells_1.TextCell, {
|
|
771
|
+
cell: cell,
|
|
772
|
+
useMouseOverEffect: !!onCellClick,
|
|
773
|
+
width: cell.header === lastShowingTableHeadersID ? utils_1.getLastColumnWidth(containerRefInnerWidth, lastShowingTableHeadersID, columns, tempColumns, firstShowingTableHeadersID) : utils_1.getColumnWidth({
|
|
774
|
+
columns: columns,
|
|
775
|
+
tempColumns: tempColumns,
|
|
776
|
+
columnName: cell.header,
|
|
777
|
+
remainingWidth: remainingWidth,
|
|
778
|
+
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
779
|
+
})
|
|
780
|
+
}), React.createElement(cells_1.SparklineCell, {
|
|
781
|
+
cell: cell,
|
|
782
|
+
useMouseOverEffect: !!onCellClick,
|
|
783
|
+
width: cell.header === lastShowingTableHeadersID ? utils_1.getLastColumnWidth(containerRefInnerWidth, lastShowingTableHeadersID, columns, tempColumns, firstShowingTableHeadersID) : utils_1.getColumnWidth({
|
|
784
|
+
columns: columns,
|
|
785
|
+
tempColumns: tempColumns,
|
|
786
|
+
columnName: cell.header,
|
|
787
|
+
remainingWidth: remainingWidth,
|
|
788
|
+
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
789
|
+
})
|
|
790
|
+
}), React.createElement(cells_1.ArrayCell, {
|
|
791
|
+
cell: cell,
|
|
792
|
+
useMouseOverEffect: !!onCellClick,
|
|
793
|
+
width: cell.header === lastShowingTableHeadersID ? utils_1.getLastColumnWidth(containerRefInnerWidth, lastShowingTableHeadersID, columns, tempColumns, firstShowingTableHeadersID) : utils_1.getColumnWidth({
|
|
794
|
+
columns: columns,
|
|
795
|
+
tempColumns: tempColumns,
|
|
796
|
+
columnName: cell.header,
|
|
797
|
+
remainingWidth: remainingWidth,
|
|
798
|
+
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
799
|
+
})
|
|
800
|
+
}));
|
|
801
|
+
}));
|
|
802
|
+
})))), isPaging ? React.createElement(PaginatorContainer, null, React.createElement(Paginator_1.default, Object.assign({
|
|
803
|
+
onChange: withColumnResizing(paginatorOnChange)
|
|
804
|
+
}, paginatorProps))) : null);
|
|
714
805
|
};
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
806
|
+
|
|
807
|
+
var cellDataType = T.oneOfType([T.string, T.number, T.arrayOf(T.oneOfType([T.string, T.number]))]);
|
|
808
|
+
PureTable.propTypes = {
|
|
809
|
+
backgroundColor: T.string,
|
|
810
|
+
count: T.number,
|
|
811
|
+
columnFormat: T.objectOf(T.shape({
|
|
812
|
+
align: T.arrayOf(T.oneOf(consts_1.validAlignments)),
|
|
813
|
+
cellTypes: T.arrayOf(T.oneOf(consts_1.validCellRenderers)),
|
|
814
|
+
data: T.arrayOf(cellDataType),
|
|
815
|
+
rowBackgroundColors: T.arrayOf(T.string),
|
|
816
|
+
rowColors: T.arrayOf(T.string),
|
|
817
|
+
sparklineAreaColors: T.arrayOf(T.string),
|
|
818
|
+
sparklineColors: T.arrayOf(T.string),
|
|
819
|
+
sparklineTypes: T.arrayOf(T.oneOf(consts_1.validSparklineTypes))
|
|
820
|
+
})),
|
|
821
|
+
headers: T.arrayOf(T.string),
|
|
822
|
+
headerVisibility: T.oneOf(consts_1.validHeaderVisibilities),
|
|
823
|
+
height: T.oneOfType([T.number]),
|
|
824
|
+
mode: T.string,
|
|
825
|
+
onCellClick: T.func,
|
|
826
|
+
paginatorParams: getPagination_1.PaginatorParamsPropTypes,
|
|
827
|
+
showRowNumbers: T.bool,
|
|
828
|
+
sortParams: getSorting_1.SortParamsPropTypes,
|
|
829
|
+
table: T.arrayOf(T.arrayOf(cellDataType)),
|
|
830
|
+
tableFormat: T.shape({
|
|
831
|
+
align: T.arrayOf(T.arrayOf(T.oneOf(consts_1.validAlignments))),
|
|
832
|
+
cellTypes: T.arrayOf(T.arrayOf(T.oneOf(consts_1.validCellRenderers))),
|
|
833
|
+
data: T.arrayOf(T.arrayOf(cellDataType)),
|
|
834
|
+
headerBackgroundColor: T.string,
|
|
835
|
+
headerColor: T.string,
|
|
836
|
+
rowBackgroundColors: T.oneOfType([T.arrayOf(T.string), T.arrayOf(T.arrayOf(T.string))]),
|
|
837
|
+
rowColors: T.oneOfType([T.arrayOf(T.string), T.arrayOf(T.arrayOf(T.string))]),
|
|
838
|
+
sparklineAreaColors: T.arrayOf(T.arrayOf(T.string)),
|
|
839
|
+
sparklineColors: T.arrayOf(T.arrayOf(T.string)),
|
|
840
|
+
sparklineTypes: T.arrayOf(T.arrayOf(T.oneOf(consts_1.validSparklineTypes)))
|
|
841
|
+
}),
|
|
842
|
+
theme: T.any,
|
|
843
|
+
width: T.oneOfType([T.number]),
|
|
844
|
+
onColumnFormatChange: T.func,
|
|
845
|
+
font: T.string,
|
|
846
|
+
fontSize: T.string
|
|
847
|
+
};
|
|
848
|
+
PureTable.defaultProps = {
|
|
849
|
+
columnFormat: {},
|
|
850
|
+
headers: [],
|
|
851
|
+
headerVisibility: 'inline',
|
|
852
|
+
height: 300,
|
|
853
|
+
mode: 'view',
|
|
854
|
+
onCellClick: null,
|
|
855
|
+
paginatorParams: {
|
|
856
|
+
isPaging: false,
|
|
857
|
+
onChange: lodash_1.noop
|
|
858
|
+
},
|
|
859
|
+
showRowNumbers: false,
|
|
860
|
+
sortParams: {
|
|
861
|
+
onSort: lodash_1.noop
|
|
862
|
+
},
|
|
863
|
+
table: [],
|
|
864
|
+
tableFormat: {},
|
|
865
|
+
theme: {},
|
|
866
|
+
width: 300,
|
|
867
|
+
onColumnFormatChange: lodash_1.noop,
|
|
868
|
+
font: fontMap.proportional,
|
|
869
|
+
fontSize: fontSizeMap.default
|
|
870
|
+
};
|
|
871
|
+
PureTable.displayName = 'VizTable';
|
|
872
|
+
exports.default = withEmptyTableMessage(FixedSizeContainer_1.default(PureTable));
|
|
873
|
+
|
|
874
|
+
/***/ }),
|
|
875
|
+
|
|
876
|
+
/***/ 14:
|
|
877
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
878
|
+
|
|
879
|
+
"use strict";
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
Object.defineProperty(exports, "__esModule", {
|
|
883
|
+
value: true
|
|
884
|
+
});
|
|
885
|
+
|
|
886
|
+
var React = __webpack_require__(1);
|
|
887
|
+
|
|
888
|
+
var styled_components_1 = __webpack_require__(4);
|
|
889
|
+
|
|
890
|
+
var SizeAwareWrapper_1 = __webpack_require__(18);
|
|
891
|
+
|
|
892
|
+
var style_1 = __webpack_require__(15);
|
|
893
|
+
|
|
894
|
+
var colorUtils_1 = __webpack_require__(13);
|
|
895
|
+
|
|
896
|
+
var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
897
|
+
var width = _ref.width;
|
|
898
|
+
return {
|
|
899
|
+
style: {
|
|
900
|
+
width: style_1.toPx(width)
|
|
901
|
+
}
|
|
902
|
+
};
|
|
903
|
+
}).withConfig({
|
|
904
|
+
displayName: "FixedSizeContainer__Item",
|
|
905
|
+
componentId: "sc-1yhgpod-0"
|
|
906
|
+
})(["position:relative;background-color:", "};"], function (props) {
|
|
907
|
+
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
908
|
+
}); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
909
|
+
|
|
910
|
+
var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
911
|
+
var width = _ref2.width,
|
|
912
|
+
height = _ref2.height;
|
|
913
|
+
return {
|
|
914
|
+
style: Object.assign(Object.assign({}, width && {
|
|
915
|
+
width: style_1.toPx(width)
|
|
916
|
+
}), height && {
|
|
917
|
+
height: style_1.toPx(height)
|
|
918
|
+
})
|
|
919
|
+
};
|
|
920
|
+
}).withConfig({
|
|
921
|
+
displayName: "FixedSizeContainer__FixSizeItem",
|
|
922
|
+
componentId: "sc-1yhgpod-1"
|
|
923
|
+
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
924
|
+
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
925
|
+
});
|
|
926
|
+
var ItemContent = styled_components_1.default.div.withConfig({
|
|
927
|
+
displayName: "FixedSizeContainer__ItemContent",
|
|
928
|
+
componentId: "sc-1yhgpod-2"
|
|
929
|
+
})(["position:relative;min-height:100px;width:100%;"]);
|
|
930
|
+
var FixSizeItemContent = styled_components_1.default.div.withConfig({
|
|
931
|
+
displayName: "FixedSizeContainer__FixSizeItemContent",
|
|
932
|
+
componentId: "sc-1yhgpod-3"
|
|
933
|
+
})(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
|
|
934
|
+
|
|
935
|
+
var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
936
|
+
var FixedSizeContainer = function FixedSizeContainer(props) {
|
|
937
|
+
var width = props.width,
|
|
938
|
+
height = props.height,
|
|
939
|
+
backgroundColor = props.backgroundColor;
|
|
940
|
+
|
|
941
|
+
if (!height) {
|
|
942
|
+
return React.createElement(Item, {
|
|
943
|
+
"data-test": "item",
|
|
944
|
+
width: width,
|
|
945
|
+
backgroundColor: backgroundColor
|
|
946
|
+
}, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
return React.createElement(FixSizeItem, {
|
|
950
|
+
"data-test": "fix-size-item",
|
|
951
|
+
"data-splunk-visualization-version": "25.0.0 - 5e0f30e5a",
|
|
952
|
+
width: width,
|
|
953
|
+
height: height,
|
|
954
|
+
backgroundColor: backgroundColor
|
|
955
|
+
}, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
|
|
956
|
+
var newWidth = _ref3.width,
|
|
957
|
+
newHeight = _ref3.height;
|
|
958
|
+
return React.createElement(Viz, Object.assign({}, props, {
|
|
959
|
+
width: newWidth,
|
|
960
|
+
height: newHeight
|
|
961
|
+
}));
|
|
962
|
+
})));
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
FixedSizeContainer.displayName = 'withFixedSizeContainer';
|
|
966
|
+
return FixedSizeContainer;
|
|
967
|
+
};
|
|
968
|
+
|
|
969
|
+
exports.default = withFixedSizeContainer;
|
|
970
|
+
|
|
971
|
+
/***/ }),
|
|
972
|
+
|
|
973
|
+
/***/ 15:
|
|
974
|
+
/***/ (function(module, exports) {
|
|
975
|
+
|
|
976
|
+
module.exports = require("@splunk/visualizations-shared/style");
|
|
977
|
+
|
|
978
|
+
/***/ }),
|
|
979
|
+
|
|
980
|
+
/***/ 16:
|
|
981
|
+
/***/ (function(module, exports) {
|
|
982
|
+
|
|
983
|
+
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
984
|
+
|
|
985
|
+
/***/ }),
|
|
986
|
+
|
|
987
|
+
/***/ 17:
|
|
988
|
+
/***/ (function(module, exports) {
|
|
989
|
+
|
|
990
|
+
module.exports = require("@babel/runtime/helpers/createClass");
|
|
991
|
+
|
|
992
|
+
/***/ }),
|
|
993
|
+
|
|
994
|
+
/***/ 18:
|
|
995
|
+
/***/ (function(module, exports) {
|
|
996
|
+
|
|
997
|
+
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
998
|
+
|
|
999
|
+
/***/ }),
|
|
1000
|
+
|
|
1001
|
+
/***/ 2:
|
|
1002
|
+
/***/ (function(module, exports) {
|
|
1003
|
+
|
|
1004
|
+
module.exports = require("lodash");
|
|
1005
|
+
|
|
1006
|
+
/***/ }),
|
|
1007
|
+
|
|
1008
|
+
/***/ 20:
|
|
1009
|
+
/***/ (function(module, exports) {
|
|
1010
|
+
|
|
1011
|
+
module.exports = require("@splunk/themes/pick");
|
|
1012
|
+
|
|
1013
|
+
/***/ }),
|
|
1014
|
+
|
|
1015
|
+
/***/ 21:
|
|
1016
|
+
/***/ (function(module, exports) {
|
|
1017
|
+
|
|
1018
|
+
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
1019
|
+
|
|
1020
|
+
/***/ }),
|
|
1021
|
+
|
|
1022
|
+
/***/ 23:
|
|
1023
|
+
/***/ (function(module, exports) {
|
|
1024
|
+
|
|
1025
|
+
module.exports = require("@babel/runtime/helpers/typeof");
|
|
1026
|
+
|
|
1027
|
+
/***/ }),
|
|
1028
|
+
|
|
1029
|
+
/***/ 25:
|
|
1030
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1031
|
+
|
|
1032
|
+
"use strict";
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1036
|
+
value: true
|
|
1037
|
+
});
|
|
1038
|
+
exports.pickFieldFromJSONSchema = void 0;
|
|
1039
|
+
|
|
1040
|
+
var lodash_1 = __webpack_require__(2);
|
|
1041
|
+
|
|
1042
|
+
var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
|
|
1043
|
+
var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
|
1044
|
+
return Object.keys(optionsSchema).reduce(function (accum, k) {
|
|
1045
|
+
if (lodash_1.has(optionsSchema[k], fieldName)) {
|
|
1046
|
+
accum[k] = optionsSchema[k][fieldName];
|
|
1047
|
+
} else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
|
|
1048
|
+
var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
|
|
1049
|
+
|
|
1050
|
+
if (!lodash_1.isEmpty(nestedSchema)) {
|
|
1051
|
+
accum[k] = nestedSchema;
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
return accum;
|
|
1056
|
+
}, {});
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
|
|
1060
|
+
|
|
1061
|
+
/***/ }),
|
|
1062
|
+
|
|
1063
|
+
/***/ 26:
|
|
1064
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1065
|
+
|
|
1066
|
+
"use strict";
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1070
|
+
value: true
|
|
1071
|
+
});
|
|
1072
|
+
exports.shouldShowIconPlaceholder = void 0;
|
|
1073
|
+
|
|
1074
|
+
var React = __webpack_require__(1);
|
|
1075
|
+
|
|
1076
|
+
var T = __webpack_require__(0);
|
|
1077
|
+
|
|
1078
|
+
var lodash_1 = __webpack_require__(2);
|
|
1079
|
+
|
|
1080
|
+
var i18n_1 = __webpack_require__(3);
|
|
1081
|
+
|
|
1082
|
+
var Message_1 = __webpack_require__(11);
|
|
1083
|
+
|
|
1084
|
+
var FixedSizeContainer_1 = __webpack_require__(14);
|
|
1085
|
+
/**
|
|
1086
|
+
* @method shouldShowIconPlaceholder
|
|
1087
|
+
* @param {object} dataSources
|
|
1088
|
+
* @param {boolean} loading
|
|
1089
|
+
* @returns {boolean}
|
|
1090
|
+
*/
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
1094
|
+
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1095
|
+
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
1096
|
+
var noData = data === undefined;
|
|
1097
|
+
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
1098
|
+
var noFields = fields === undefined;
|
|
1099
|
+
return loading || noData || noFields;
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
|
|
1103
|
+
var propTypes = {
|
|
1104
|
+
icon: T.func,
|
|
1105
|
+
width: T.oneOfType([T.string, T.number]),
|
|
1106
|
+
height: T.oneOfType([T.string, T.number]),
|
|
1107
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
1108
|
+
backgroundColor: T.string,
|
|
1109
|
+
iconColor: T.string
|
|
1110
|
+
};
|
|
1111
|
+
/**
|
|
1112
|
+
* @method IconPlaceholder
|
|
1113
|
+
* @param {IconPlaceholderProps} props
|
|
1114
|
+
* @returns {React.ReactElement}
|
|
1115
|
+
*/
|
|
1116
|
+
|
|
1117
|
+
var IconPlaceholder = function IconPlaceholder(props) {
|
|
1118
|
+
var width = props.width,
|
|
1119
|
+
height = props.height,
|
|
1120
|
+
icon = props.icon,
|
|
1121
|
+
iconColor = props.iconColor;
|
|
1122
|
+
|
|
1123
|
+
if (icon) {
|
|
1124
|
+
return React.createElement(icon, {
|
|
1125
|
+
style: {
|
|
1126
|
+
left: '50%',
|
|
1127
|
+
top: '50%',
|
|
1128
|
+
color: iconColor,
|
|
1129
|
+
opacity: 0.15,
|
|
1130
|
+
position: 'absolute',
|
|
1131
|
+
transform: 'translate(-50%, -50%)'
|
|
1132
|
+
},
|
|
1133
|
+
width: '50%',
|
|
1134
|
+
height: '50%'
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
return React.createElement(Message_1.default, {
|
|
1139
|
+
width: width,
|
|
1140
|
+
height: height,
|
|
1141
|
+
level: "warning",
|
|
1142
|
+
message: i18n_1._('No DataSource Connected')
|
|
1143
|
+
});
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1146
|
+
IconPlaceholder.propTypes = propTypes;
|
|
1147
|
+
IconPlaceholder.defaultProps = {
|
|
1148
|
+
width: '100%',
|
|
1149
|
+
height: 250
|
|
1150
|
+
};
|
|
1151
|
+
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
1152
|
+
|
|
1153
|
+
/***/ }),
|
|
1154
|
+
|
|
1155
|
+
/***/ 265:
|
|
1156
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1157
|
+
|
|
1158
|
+
"use strict";
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
1162
|
+
if (k2 === undefined) k2 = k;
|
|
1163
|
+
Object.defineProperty(o, k2, {
|
|
1164
|
+
enumerable: true,
|
|
1165
|
+
get: function get() {
|
|
1166
|
+
return m[k];
|
|
1167
|
+
}
|
|
1168
|
+
});
|
|
1169
|
+
} : function (o, m, k, k2) {
|
|
1170
|
+
if (k2 === undefined) k2 = k;
|
|
1171
|
+
o[k2] = m[k];
|
|
1172
|
+
});
|
|
1173
|
+
|
|
1174
|
+
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
1175
|
+
for (var p in m) {
|
|
1176
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1177
|
+
}
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1180
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1181
|
+
value: true
|
|
1182
|
+
});
|
|
1183
|
+
exports.default = void 0; // NOTE: wildcard syntax only works for named exports
|
|
1184
|
+
// for some reason, omitting the default export worked before TS v4
|
|
1185
|
+
// see: https://stackoverflow.com/a/34445175
|
|
1186
|
+
|
|
1187
|
+
__exportStar(__webpack_require__(138), exports);
|
|
1188
|
+
|
|
1189
|
+
var Table_1 = __webpack_require__(138);
|
|
1190
|
+
|
|
1191
|
+
Object.defineProperty(exports, "default", {
|
|
1192
|
+
enumerable: true,
|
|
1193
|
+
get: function get() {
|
|
1194
|
+
return Table_1.default;
|
|
1195
|
+
}
|
|
1196
|
+
});
|
|
1197
|
+
|
|
1198
|
+
/***/ }),
|
|
1199
|
+
|
|
1200
|
+
/***/ 266:
|
|
1201
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1202
|
+
|
|
1203
|
+
"use strict";
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
var _toConsumableArray = __webpack_require__(9);
|
|
1207
|
+
|
|
1208
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1209
|
+
value: true
|
|
1210
|
+
});
|
|
1211
|
+
|
|
1212
|
+
var i18n_1 = __webpack_require__(3);
|
|
1213
|
+
|
|
1214
|
+
var lodash_1 = __webpack_require__(2);
|
|
1215
|
+
|
|
1216
|
+
var schemaUtils_1 = __webpack_require__(16);
|
|
1217
|
+
|
|
1218
|
+
var colorConstants_1 = __webpack_require__(43);
|
|
1219
|
+
|
|
1220
|
+
var visualization_icons_1 = __webpack_require__(46);
|
|
1221
|
+
|
|
1222
|
+
var placeholders_1 = __webpack_require__(45);
|
|
1223
|
+
|
|
1224
|
+
var variables_1 = __webpack_require__(10);
|
|
1225
|
+
|
|
1226
|
+
var pick_1 = __webpack_require__(20);
|
|
1227
|
+
|
|
1228
|
+
var configUtils_1 = __webpack_require__(6);
|
|
1229
|
+
|
|
1230
|
+
var VizBehavior_1 = __webpack_require__(5);
|
|
1231
|
+
|
|
1232
|
+
var consts_1 = __webpack_require__(111);
|
|
1233
|
+
|
|
1234
|
+
var VizCategory_1 = __webpack_require__(29);
|
|
1235
|
+
|
|
1236
|
+
var dataContract = {
|
|
1237
|
+
requiredDataSources: [{
|
|
1238
|
+
name: 'primary',
|
|
1239
|
+
description: 'DataSource that powers the visualization'
|
|
1240
|
+
}],
|
|
1241
|
+
optionalDataSources: [],
|
|
1242
|
+
initialRequestParams: {
|
|
1243
|
+
primary: function primary() {
|
|
1244
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1245
|
+
return {
|
|
1246
|
+
offset: 0,
|
|
1247
|
+
count: options.count ? options.count : 10,
|
|
1248
|
+
requestTotalCount: true
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1253
|
+
var size = {
|
|
1254
|
+
initialWidth: 300,
|
|
1255
|
+
initialHeight: 300
|
|
1256
|
+
};
|
|
1257
|
+
var defaultContext = {
|
|
1258
|
+
tableAlignByType: [{
|
|
1259
|
+
match: 'string',
|
|
718
1260
|
value: 'left'
|
|
719
1261
|
}, {
|
|
720
1262
|
match: 'number',
|
|
@@ -955,1041 +1497,456 @@ var optionsSchema = {
|
|
|
955
1497
|
}
|
|
956
1498
|
},
|
|
957
1499
|
headerVisibility: {
|
|
958
|
-
default: 'inline',
|
|
959
|
-
description: 'Specify how to display the table header row.',
|
|
960
|
-
pattern: schemaUtils_1.getPattern(consts_1.validHeaderVisibilities),
|
|
961
|
-
enum: consts_1.validHeaderVisibilities.concat(),
|
|
962
|
-
type: 'string'
|
|
963
|
-
},
|
|
964
|
-
paginateDataSourceKey: {
|
|
965
|
-
default: 'primary',
|
|
966
|
-
description: 'Specify the data source key for pagination and sorting.',
|
|
967
|
-
type: 'string'
|
|
968
|
-
},
|
|
969
|
-
showInternalFields: {
|
|
970
|
-
default: true,
|
|
971
|
-
description: 'Specify whether to show internal fields that start with an underscore. The _time field will still be shown if false.',
|
|
972
|
-
type: 'boolean'
|
|
973
|
-
},
|
|
974
|
-
showRowNumbers: {
|
|
975
|
-
default: false,
|
|
976
|
-
description: 'Show row numbers in the first column.',
|
|
977
|
-
type: 'boolean'
|
|
978
|
-
},
|
|
979
|
-
table: {
|
|
980
|
-
default: '> primary',
|
|
981
|
-
description: 'Two dimensional array of data to be displayed in the table.',
|
|
982
|
-
type: 'array',
|
|
983
|
-
items: {
|
|
984
|
-
type: 'array',
|
|
985
|
-
items: {
|
|
986
|
-
oneOf: [{
|
|
987
|
-
type: 'string'
|
|
988
|
-
}, {
|
|
989
|
-
type: 'number'
|
|
990
|
-
}, {
|
|
991
|
-
type: 'array',
|
|
992
|
-
items: {
|
|
993
|
-
type: ['string', 'number']
|
|
994
|
-
}
|
|
995
|
-
}]
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
},
|
|
999
|
-
tableFormat: {
|
|
1000
|
-
description: 'Allows users to set table wide options.',
|
|
1001
|
-
type: 'object',
|
|
1002
|
-
properties: {
|
|
1003
|
-
align: {
|
|
1004
|
-
default: '> table | type() | matchValue(tableAlignByType)',
|
|
1005
|
-
description: 'Specify alignment for each cell in the table. Valid alignments include "left", "center", and "right".',
|
|
1006
|
-
type: 'array',
|
|
1007
|
-
items: {
|
|
1008
|
-
type: 'array',
|
|
1009
|
-
items: {
|
|
1010
|
-
type: 'string',
|
|
1011
|
-
enum: consts_1.validAlignments.concat()
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
},
|
|
1015
|
-
cellTypes: {
|
|
1016
|
-
default: '> table | type() | matchValue(tableCellTypeByType)',
|
|
1017
|
-
description: 'Specify how to render data in cells. Valid cell renders include "TextCell", "ArrayCell", "SparklineCell".',
|
|
1018
|
-
type: 'array',
|
|
1019
|
-
items: {
|
|
1020
|
-
type: 'array',
|
|
1021
|
-
items: {
|
|
1022
|
-
type: 'string',
|
|
1023
|
-
enum: consts_1.validCellRenderers.concat()
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
},
|
|
1027
|
-
data: {
|
|
1028
|
-
description: 'Two dimensional data to be displayed in the table. This is usually formatted data instead of raw data from search.',
|
|
1029
|
-
type: 'array',
|
|
1030
|
-
items: {
|
|
1031
|
-
type: 'array',
|
|
1032
|
-
items: {
|
|
1033
|
-
oneOf: [{
|
|
1034
|
-
type: 'string'
|
|
1035
|
-
}, {
|
|
1036
|
-
type: 'number'
|
|
1037
|
-
}, {
|
|
1038
|
-
type: 'array',
|
|
1039
|
-
items: {
|
|
1040
|
-
type: ['string', 'number']
|
|
1041
|
-
}
|
|
1042
|
-
}]
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
},
|
|
1046
|
-
headerBackgroundColor: {
|
|
1047
|
-
default: '> themes.defaultHeaderBackgroundColor',
|
|
1048
|
-
description: 'Specify the table header background color using a hexadecimal code. For example, "#FFFFFF".',
|
|
1049
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN,
|
|
1050
|
-
type: 'string'
|
|
1051
|
-
},
|
|
1052
|
-
headerColor: {
|
|
1053
|
-
description: 'Specify the table header text color using a hexadecimal code. For example, "#FFFFFF".',
|
|
1054
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN,
|
|
1055
|
-
type: 'string'
|
|
1056
|
-
},
|
|
1057
|
-
rowBackgroundColors: {
|
|
1058
|
-
default: '> table | seriesByIndex(0) | pick(tableAltRowBackgroundColorsByTheme)',
|
|
1059
|
-
description: 'Specify a list of colors, in hexadecimal code, for the background color of each row of the table. For example, ["#2C333B", "32373D"].',
|
|
1060
|
-
type: 'array',
|
|
1061
|
-
items: {
|
|
1062
|
-
type: 'array',
|
|
1063
|
-
items: {
|
|
1064
|
-
type: 'string',
|
|
1065
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
},
|
|
1069
|
-
rowColors: {
|
|
1070
|
-
description: 'Specify a list of colors, in hexadecimal code, for the text color of each row of the table. For example, ["#2C333B", "32373D"].',
|
|
1071
|
-
type: 'array',
|
|
1072
|
-
items: {
|
|
1073
|
-
type: 'array',
|
|
1074
|
-
items: {
|
|
1075
|
-
type: 'string',
|
|
1076
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
},
|
|
1080
|
-
sparklineAreaColors: {
|
|
1081
|
-
description: 'Specify a list of colors, in hexadecimal code, for the sparkline area of each row of the table. For example, ["#2C333B", "32373D"].',
|
|
1082
|
-
type: 'array',
|
|
1083
|
-
items: {
|
|
1500
|
+
default: 'inline',
|
|
1501
|
+
description: 'Specify how to display the table header row.',
|
|
1502
|
+
pattern: schemaUtils_1.getPattern(consts_1.validHeaderVisibilities),
|
|
1503
|
+
enum: consts_1.validHeaderVisibilities.concat(),
|
|
1504
|
+
type: 'string'
|
|
1505
|
+
},
|
|
1506
|
+
paginateDataSourceKey: {
|
|
1507
|
+
default: 'primary',
|
|
1508
|
+
description: 'Specify the data source key for pagination and sorting.',
|
|
1509
|
+
type: 'string'
|
|
1510
|
+
},
|
|
1511
|
+
showInternalFields: {
|
|
1512
|
+
default: true,
|
|
1513
|
+
description: 'Specify whether to show internal fields that start with an underscore. The _time field will still be shown if false.',
|
|
1514
|
+
type: 'boolean'
|
|
1515
|
+
},
|
|
1516
|
+
showRowNumbers: {
|
|
1517
|
+
default: false,
|
|
1518
|
+
description: 'Show row numbers in the first column.',
|
|
1519
|
+
type: 'boolean'
|
|
1520
|
+
},
|
|
1521
|
+
table: {
|
|
1522
|
+
default: '> primary',
|
|
1523
|
+
description: 'Two dimensional array of data to be displayed in the table.',
|
|
1524
|
+
type: 'array',
|
|
1525
|
+
items: {
|
|
1526
|
+
type: 'array',
|
|
1527
|
+
items: {
|
|
1528
|
+
oneOf: [{
|
|
1529
|
+
type: 'string'
|
|
1530
|
+
}, {
|
|
1531
|
+
type: 'number'
|
|
1532
|
+
}, {
|
|
1084
1533
|
type: 'array',
|
|
1085
1534
|
items: {
|
|
1086
|
-
type: 'string',
|
|
1087
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
1535
|
+
type: ['string', 'number']
|
|
1088
1536
|
}
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1537
|
+
}]
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1541
|
+
tableFormat: {
|
|
1542
|
+
description: 'Allows users to set table wide options.',
|
|
1543
|
+
type: 'object',
|
|
1544
|
+
properties: {
|
|
1545
|
+
align: {
|
|
1546
|
+
default: '> table | type() | matchValue(tableAlignByType)',
|
|
1547
|
+
description: 'Specify alignment for each cell in the table. Valid alignments include "left", "center", and "right".',
|
|
1093
1548
|
type: 'array',
|
|
1094
1549
|
items: {
|
|
1095
1550
|
type: 'array',
|
|
1096
1551
|
items: {
|
|
1097
1552
|
type: 'string',
|
|
1098
|
-
|
|
1553
|
+
enum: consts_1.validAlignments.concat()
|
|
1099
1554
|
}
|
|
1100
1555
|
}
|
|
1101
1556
|
},
|
|
1102
|
-
|
|
1103
|
-
|
|
1557
|
+
cellTypes: {
|
|
1558
|
+
default: '> table | type() | matchValue(tableCellTypeByType)',
|
|
1559
|
+
description: 'Specify how to render data in cells. Valid cell renders include "TextCell", "ArrayCell", "SparklineCell".',
|
|
1104
1560
|
type: 'array',
|
|
1105
1561
|
items: {
|
|
1106
1562
|
type: 'array',
|
|
1107
|
-
items: {
|
|
1108
|
-
type: 'string',
|
|
1109
|
-
enum: consts_1.
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
};
|
|
1116
|
-
var themes = {
|
|
1117
|
-
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
1118
|
-
return pick_1.default({
|
|
1119
|
-
enterprise: {
|
|
1120
|
-
dark: variables_1.default.black(props),
|
|
1121
|
-
light: variables_1.default.backgroundColor(props)
|
|
1122
|
-
},
|
|
1123
|
-
prisma: variables_1.default.backgroundColorSidebar(props)
|
|
1124
|
-
})(props);
|
|
1125
|
-
},
|
|
1126
|
-
defaultHeaderBackgroundColor: function defaultHeaderBackgroundColor(props) {
|
|
1127
|
-
return pick_1.default({
|
|
1128
|
-
enterprise: {
|
|
1129
|
-
dark: variables_1.default.gray20(props),
|
|
1130
|
-
light: variables_1.default.gray92(props)
|
|
1131
|
-
},
|
|
1132
|
-
prisma: variables_1.default.backgroundColor(props)
|
|
1133
|
-
})(props);
|
|
1134
|
-
},
|
|
1135
|
-
rowBackgroundColorEven: function rowBackgroundColorEven(props) {
|
|
1136
|
-
return pick_1.default({
|
|
1137
|
-
enterprise: {
|
|
1138
|
-
dark: variables_1.default.black(props),
|
|
1139
|
-
light: variables_1.default.gray96(props)
|
|
1140
|
-
},
|
|
1141
|
-
prisma: variables_1.default.backgroundColorPage(props)
|
|
1142
|
-
})(props);
|
|
1143
|
-
},
|
|
1144
|
-
rowBackgroundColorOdd: function rowBackgroundColorOdd(props) {
|
|
1145
|
-
return pick_1.default({
|
|
1146
|
-
enterprise: {
|
|
1147
|
-
dark: '#0D1012',
|
|
1148
|
-
light: variables_1.default.backgroundColor(props)
|
|
1149
|
-
},
|
|
1150
|
-
prisma: variables_1.default.backgroundColorSidebar(props)
|
|
1151
|
-
})(props);
|
|
1152
|
-
},
|
|
1153
|
-
textColor: function textColor(props) {
|
|
1154
|
-
return pick_1.default({
|
|
1155
|
-
enterprise: variables_1.default.textColor(props),
|
|
1156
|
-
prisma: variables_1.default.contentColorDefault(props)
|
|
1157
|
-
})(props);
|
|
1158
|
-
},
|
|
1159
|
-
inverseTextColor: function inverseTextColor(props) {
|
|
1160
|
-
return pick_1.default({
|
|
1161
|
-
enterprise: {
|
|
1162
|
-
dark: variables_1.default.contentColorInverted(props),
|
|
1163
|
-
light: variables_1.default.white(props) // equal to textColor in enterpriseDark
|
|
1164
|
-
|
|
1165
|
-
},
|
|
1166
|
-
prisma: variables_1.default.contentColorInverted(props)
|
|
1167
|
-
})(props);
|
|
1168
|
-
}
|
|
1169
|
-
};
|
|
1170
|
-
var backgroundColorPaletteSet = new Set([].concat(_toConsumableArray(colorConstants_1.COLOR_EDITOR_PALETTE), _toConsumableArray(lodash_1.map(themes, function (t) {
|
|
1171
|
-
return lodash_1.get(t, 'defaultBackgroundColor');
|
|
1172
|
-
}))));
|
|
1173
|
-
var EDITOR_LABEL_WIDTH = 100;
|
|
1174
|
-
var editorConfig = [{
|
|
1175
|
-
label: i18n_1._('Global Formatting'),
|
|
1176
|
-
layout: [[{
|
|
1177
|
-
label: i18n_1._('Rows Displayed'),
|
|
1178
|
-
option: 'count',
|
|
1179
|
-
editor: 'editor.number',
|
|
1180
|
-
editorProps: {
|
|
1181
|
-
labelPosition: 'left',
|
|
1182
|
-
min: 0,
|
|
1183
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
1184
|
-
}
|
|
1185
|
-
}], [{
|
|
1186
|
-
label: i18n_1._('Row Numbers'),
|
|
1187
|
-
option: 'showRowNumbers',
|
|
1188
|
-
editor: 'editor.toggle',
|
|
1189
|
-
editorProps: {
|
|
1190
|
-
labelPosition: 'left',
|
|
1191
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
1192
|
-
}
|
|
1193
|
-
}], [{
|
|
1194
|
-
label: i18n_1._('Internal Fields'),
|
|
1195
|
-
option: 'showInternalFields',
|
|
1196
|
-
editor: 'editor.toggle',
|
|
1197
|
-
editorProps: {
|
|
1198
|
-
labelPosition: 'left',
|
|
1199
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
1200
|
-
}
|
|
1201
|
-
}], [{
|
|
1202
|
-
label: i18n_1._('Header Row'),
|
|
1203
|
-
option: 'headerVisibility',
|
|
1204
|
-
editor: 'editor.radioBar',
|
|
1205
|
-
editorProps: {
|
|
1206
|
-
values: [{
|
|
1207
|
-
label: i18n_1._('Inline'),
|
|
1208
|
-
value: 'inline'
|
|
1209
|
-
}, {
|
|
1210
|
-
label: i18n_1._('Fixed'),
|
|
1211
|
-
value: 'fixed'
|
|
1212
|
-
}, {
|
|
1213
|
-
label: i18n_1._('Hidden'),
|
|
1214
|
-
value: 'none'
|
|
1215
|
-
}],
|
|
1216
|
-
labelPosition: 'left',
|
|
1217
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
1218
|
-
}
|
|
1219
|
-
}], [{
|
|
1220
|
-
key: 'backgroundColor',
|
|
1221
|
-
editor: 'editor.tableBackgroundColor',
|
|
1222
|
-
editorProps: {
|
|
1223
|
-
themes: themes,
|
|
1224
|
-
labelPosition: 'left',
|
|
1225
|
-
labelWidth: EDITOR_LABEL_WIDTH,
|
|
1226
|
-
palette: _toConsumableArray(backgroundColorPaletteSet)
|
|
1227
|
-
}
|
|
1228
|
-
}], [{
|
|
1229
|
-
option: 'font',
|
|
1230
|
-
label: i18n_1._('Font'),
|
|
1231
|
-
editor: 'editor.select',
|
|
1232
|
-
editorProps: {
|
|
1233
|
-
values: [{
|
|
1234
|
-
label: i18n_1._('Proportional (Default)'),
|
|
1235
|
-
value: 'proportional'
|
|
1236
|
-
}, {
|
|
1237
|
-
label: i18n_1._('Monospace'),
|
|
1238
|
-
value: 'monospace'
|
|
1239
|
-
}],
|
|
1240
|
-
labelPosition: 'top',
|
|
1241
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
1242
|
-
}
|
|
1243
|
-
}], [{
|
|
1244
|
-
option: 'fontSize',
|
|
1245
|
-
label: i18n_1._('Font Size'),
|
|
1246
|
-
editor: 'editor.select',
|
|
1247
|
-
editorProps: {
|
|
1248
|
-
values: [{
|
|
1249
|
-
label: i18n_1._('Extra Small (font 10px, row 24px)'),
|
|
1250
|
-
value: 'extraSmall'
|
|
1251
|
-
}, {
|
|
1252
|
-
label: i18n_1._('Small (font 12px, row 24px)'),
|
|
1253
|
-
value: 'small'
|
|
1254
|
-
}, {
|
|
1255
|
-
label: i18n_1._('Default (font 14px, row 32px)'),
|
|
1256
|
-
value: 'default'
|
|
1257
|
-
}, {
|
|
1258
|
-
label: i18n_1._('Large (font 16px, row 36px)'),
|
|
1259
|
-
value: 'large'
|
|
1260
|
-
}],
|
|
1261
|
-
labelPosition: 'top',
|
|
1262
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
1263
|
-
}
|
|
1264
|
-
}]]
|
|
1265
|
-
}, {
|
|
1266
|
-
label: i18n_1._('Column Formatting'),
|
|
1267
|
-
layout: [[{
|
|
1268
|
-
label: i18n_1._(''),
|
|
1269
|
-
editor: 'editor.tableColumnFormatter',
|
|
1270
|
-
editorProps: {
|
|
1271
|
-
// Table column coloring does not adhere to same DSL structure as other dynamically colored options
|
|
1272
|
-
// we use the FormatterEditor directly and not the DynamicColorEditor's provided DSL builders
|
|
1273
|
-
columnColoringConfig: {
|
|
1274
|
-
coloringTypes: [{
|
|
1275
|
-
label: i18n_1._('Text'),
|
|
1276
|
-
value: 'rowColors'
|
|
1277
|
-
}, {
|
|
1278
|
-
label: i18n_1._('Background'),
|
|
1279
|
-
value: 'rowBackgroundColors'
|
|
1280
|
-
}],
|
|
1281
|
-
formatters: [{
|
|
1282
|
-
label: i18n_1._('Ranges'),
|
|
1283
|
-
value: 'rangeValue',
|
|
1284
|
-
defaults: {
|
|
1285
|
-
rowBackgroundColors: sequentialColorConfig,
|
|
1286
|
-
rowColors: sequentialColorConfig
|
|
1287
|
-
}
|
|
1288
|
-
}, {
|
|
1289
|
-
label: i18n_1._('Matches'),
|
|
1290
|
-
value: 'matchValue',
|
|
1291
|
-
defaults: {
|
|
1292
|
-
rowBackgroundColors: matchColorConfig,
|
|
1293
|
-
rowColors: matchColorConfig
|
|
1294
|
-
}
|
|
1295
|
-
}],
|
|
1296
|
-
themes: themes
|
|
1297
|
-
},
|
|
1298
|
-
defaultOptionsByType: {
|
|
1299
|
-
number: {
|
|
1300
|
-
thousandSeparated: false,
|
|
1301
|
-
unitPosition: 'after'
|
|
1302
|
-
},
|
|
1303
|
-
string: {
|
|
1304
|
-
unitPosition: 'after'
|
|
1563
|
+
items: {
|
|
1564
|
+
type: 'string',
|
|
1565
|
+
enum: consts_1.validCellRenderers.concat()
|
|
1566
|
+
}
|
|
1305
1567
|
}
|
|
1306
1568
|
},
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
}, {
|
|
1316
|
-
label: i18n_1._('Thousand Separators'),
|
|
1317
|
-
option: 'thousandSeparated',
|
|
1318
|
-
editor: 'editor.radioBar',
|
|
1319
|
-
editorProps: {
|
|
1320
|
-
values: [{
|
|
1321
|
-
label: i18n_1._('Off'),
|
|
1322
|
-
value: false
|
|
1569
|
+
data: {
|
|
1570
|
+
description: 'Two dimensional data to be displayed in the table. This is usually formatted data instead of raw data from search.',
|
|
1571
|
+
type: 'array',
|
|
1572
|
+
items: {
|
|
1573
|
+
type: 'array',
|
|
1574
|
+
items: {
|
|
1575
|
+
oneOf: [{
|
|
1576
|
+
type: 'string'
|
|
1323
1577
|
}, {
|
|
1324
|
-
|
|
1325
|
-
|
|
1578
|
+
type: 'number'
|
|
1579
|
+
}, {
|
|
1580
|
+
type: 'array',
|
|
1581
|
+
items: {
|
|
1582
|
+
type: ['string', 'number']
|
|
1583
|
+
}
|
|
1326
1584
|
}]
|
|
1327
1585
|
}
|
|
1328
|
-
}
|
|
1329
|
-
// TODO(fkurniawan): fill in with proper editor components
|
|
1330
|
-
sparkline: [],
|
|
1331
|
-
string: [[Object.assign({}, unitPositionConfig), Object.assign({}, unitLabelConfig)]],
|
|
1332
|
-
time: [[Object.assign({}, timeFormattingConfig)]]
|
|
1586
|
+
}
|
|
1333
1587
|
},
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
for (var p in s) {
|
|
1403
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1407
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
1408
|
-
}
|
|
1409
|
-
return t;
|
|
1410
|
-
};
|
|
1411
|
-
|
|
1412
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1413
|
-
value: true
|
|
1414
|
-
});
|
|
1415
|
-
|
|
1416
|
-
var React = __webpack_require__(1);
|
|
1417
|
-
|
|
1418
|
-
var T = __webpack_require__(0);
|
|
1419
|
-
|
|
1420
|
-
var lodash_1 = __webpack_require__(2);
|
|
1421
|
-
|
|
1422
|
-
var styled_components_1 = __webpack_require__(4);
|
|
1423
|
-
|
|
1424
|
-
var i18n_1 = __webpack_require__(3);
|
|
1425
|
-
|
|
1426
|
-
var Table_1 = __webpack_require__(85);
|
|
1427
|
-
|
|
1428
|
-
var Paginator_1 = __webpack_require__(266);
|
|
1429
|
-
|
|
1430
|
-
var Message_1 = __webpack_require__(267);
|
|
1431
|
-
|
|
1432
|
-
var colorUtils_1 = __webpack_require__(12);
|
|
1433
|
-
|
|
1434
|
-
var style_1 = __webpack_require__(14);
|
|
1435
|
-
|
|
1436
|
-
var pick_1 = __webpack_require__(22);
|
|
1437
|
-
|
|
1438
|
-
var variables_1 = __webpack_require__(11);
|
|
1439
|
-
|
|
1440
|
-
var hooks_1 = __webpack_require__(268);
|
|
1441
|
-
|
|
1442
|
-
var consts_1 = __webpack_require__(110);
|
|
1443
|
-
|
|
1444
|
-
var cells_1 = __webpack_require__(269);
|
|
1445
|
-
|
|
1446
|
-
var getPagination_1 = __webpack_require__(27);
|
|
1447
|
-
|
|
1448
|
-
var getSorting_1 = __webpack_require__(26);
|
|
1449
|
-
|
|
1450
|
-
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
1451
|
-
|
|
1452
|
-
var utils_1 = __webpack_require__(274); // debounce was imported this way due to typing
|
|
1453
|
-
// eslint-disable-next-line import/order
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
var debounce = __webpack_require__(275);
|
|
1457
|
-
|
|
1458
|
-
var MINIMUM_COLUMN_SIZE = 30;
|
|
1459
|
-
var NonVisibleTableHead = styled_components_1.default(Table_1.default.Head).withConfig({
|
|
1460
|
-
displayName: "PureTable__NonVisibleTableHead",
|
|
1461
|
-
componentId: "tovzjg-0"
|
|
1462
|
-
})(["display:none;"]);
|
|
1463
|
-
var FixedTableHead = styled_components_1.default(Table_1.default.Head).withConfig({
|
|
1464
|
-
displayName: "PureTable__FixedTableHead",
|
|
1465
|
-
componentId: "tovzjg-1"
|
|
1466
|
-
})(["position:sticky;top:0;"]);
|
|
1467
|
-
var VizTableContainer = styled_components_1.default.div.withConfig({
|
|
1468
|
-
displayName: "PureTable__VizTableContainer",
|
|
1469
|
-
componentId: "tovzjg-2"
|
|
1470
|
-
})(["box-sizing:border-box;padding:", ";background-color:", ";display:flex;flex-flow:column nowrap;overflow:hidden;"], pick_1.default({
|
|
1471
|
-
enterprise: variables_1.default.spacingHalf,
|
|
1472
|
-
prisma: variables_1.default.spacingSmall
|
|
1473
|
-
}), function (props) {
|
|
1474
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
1475
|
-
});
|
|
1476
|
-
VizTableContainer.displayName = 'VizTableContainer';
|
|
1477
|
-
var PAGINATOR_CONTAINER_HEIGHT = 38;
|
|
1478
|
-
var PAGINATOR_SPACING = 5;
|
|
1479
|
-
var SUITableContainer = styled_components_1.default.div.withConfig({
|
|
1480
|
-
displayName: "PureTable__SUITableContainer",
|
|
1481
|
-
componentId: "tovzjg-3"
|
|
1482
|
-
})(["& *{font-family:", ";font-size:", ";line-height:", ";}box-sizing:border-box;flex-grow:1;overflow:hidden;", ";", ";", " ", " & [data-fixed-column='true']{table-layout:", ";width:", ";}"], function (props) {
|
|
1483
|
-
return props.font;
|
|
1484
|
-
}, function (props) {
|
|
1485
|
-
return props.fontSize;
|
|
1486
|
-
}, function (props) {
|
|
1487
|
-
return props.lineHeight;
|
|
1488
|
-
}, function (_ref) {
|
|
1489
|
-
var width = _ref.width,
|
|
1490
|
-
height = _ref.height,
|
|
1491
|
-
isPaging = _ref.isPaging,
|
|
1492
|
-
theme = _ref.theme;
|
|
1493
|
-
var padding = pick_1.default({
|
|
1494
|
-
enterprise: variables_1.default.spacingHalf({
|
|
1495
|
-
theme: theme
|
|
1496
|
-
}),
|
|
1497
|
-
prisma: variables_1.default.spacingSmall({
|
|
1498
|
-
theme: theme
|
|
1499
|
-
})
|
|
1500
|
-
})({
|
|
1501
|
-
theme: theme
|
|
1502
|
-
});
|
|
1503
|
-
var paddingOffset = parseInt(padding, 10) * 2;
|
|
1504
|
-
return style_1.toDimension({
|
|
1505
|
-
width: width - paddingOffset,
|
|
1506
|
-
height: isPaging ? height - PAGINATOR_CONTAINER_HEIGHT - PAGINATOR_SPACING - paddingOffset : height - paddingOffset
|
|
1507
|
-
});
|
|
1508
|
-
}, function (_ref2) {
|
|
1509
|
-
var isPaging = _ref2.isPaging;
|
|
1510
|
-
return isPaging && "\n margin-bottom: ".concat(PAGINATOR_SPACING, "px;\n ");
|
|
1511
|
-
}, function (_ref3) {
|
|
1512
|
-
var headerStyle = _ref3.headerStyle;
|
|
1513
|
-
return headerStyle && headerStyle.backgroundColor && styled_components_1.css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & [data-test='head-cell'] {\n background-color: ", ";\n }\n "])), headerStyle.backgroundColor);
|
|
1514
|
-
}, function (_ref4) {
|
|
1515
|
-
var headerStyle = _ref4.headerStyle;
|
|
1516
|
-
return headerStyle && headerStyle.color && styled_components_1.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n & [data-test='head-cell'] > div > span {\n color: ", ";\n }\n "])), headerStyle.color);
|
|
1517
|
-
}, function (_ref5) {
|
|
1518
|
-
var widthSet = _ref5.widthSet;
|
|
1519
|
-
return widthSet ? 'fixed' : 'auto';
|
|
1520
|
-
}, function (_ref6) {
|
|
1521
|
-
var widthSet = _ref6.widthSet;
|
|
1522
|
-
return widthSet ? '0' : '100%';
|
|
1523
|
-
});
|
|
1524
|
-
SUITableContainer.displayName = 'SUITableContainer';
|
|
1525
|
-
var PaginatorContainer = styled_components_1.default.div.withConfig({
|
|
1526
|
-
displayName: "PureTable__PaginatorContainer",
|
|
1527
|
-
componentId: "tovzjg-4"
|
|
1528
|
-
})(["position:relative;text-align:right;height:", "px;"], PAGINATOR_CONTAINER_HEIGHT);
|
|
1529
|
-
PaginatorContainer.displayName = 'PaginatorContainer'; // allow for early return in case of empty tableBody while still following hook rules
|
|
1530
|
-
|
|
1531
|
-
var withEmptyTableMessage = function withEmptyTableMessage(Viz) {
|
|
1532
|
-
// TODO(fkurniawan): add omit type to differentiate WrapperProps from PureTableProps
|
|
1533
|
-
var Wrapper = function Wrapper(props) {
|
|
1534
|
-
var headers = props.headers,
|
|
1535
|
-
table = props.table,
|
|
1536
|
-
headerVisibility = props.headerVisibility,
|
|
1537
|
-
showRowNumbers = props.showRowNumbers,
|
|
1538
|
-
showInternalFields = props.showInternalFields,
|
|
1539
|
-
tableFormat = props.tableFormat,
|
|
1540
|
-
columnFormat = props.columnFormat;
|
|
1541
|
-
|
|
1542
|
-
var _hooks_1$useTable = hooks_1.useTable({
|
|
1543
|
-
headers: headers,
|
|
1544
|
-
table: table,
|
|
1545
|
-
headerVisibility: headerVisibility,
|
|
1546
|
-
showRowNumbers: showRowNumbers,
|
|
1547
|
-
showInternalFields: showInternalFields,
|
|
1548
|
-
tableFormat: Object.assign(Object.assign(Object.assign(Object.assign({}, tableFormat), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.align) && {
|
|
1549
|
-
align: lodash_1.cloneDeep(tableFormat.align)
|
|
1550
|
-
}), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.cellTypes) && {
|
|
1551
|
-
cellTypes: lodash_1.cloneDeep(tableFormat.cellTypes)
|
|
1552
|
-
}), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.data) && {
|
|
1553
|
-
data: lodash_1.cloneDeep(tableFormat.data)
|
|
1554
|
-
}),
|
|
1555
|
-
columnFormat: columnFormat
|
|
1556
|
-
}),
|
|
1557
|
-
tableHeader = _hooks_1$useTable.tableHeader,
|
|
1558
|
-
tableBody = _hooks_1$useTable.tableBody;
|
|
1559
|
-
|
|
1560
|
-
if (tableBody.rows.length === 0) {
|
|
1561
|
-
return React.createElement(Message_1.default, {
|
|
1562
|
-
type: "warning"
|
|
1563
|
-
}, i18n_1._('No data!'));
|
|
1588
|
+
headerBackgroundColor: {
|
|
1589
|
+
default: '> themes.defaultHeaderBackgroundColor',
|
|
1590
|
+
description: 'Specify the table header background color using a hexadecimal code. For example, "#FFFFFF".',
|
|
1591
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN,
|
|
1592
|
+
type: 'string'
|
|
1593
|
+
},
|
|
1594
|
+
headerColor: {
|
|
1595
|
+
description: 'Specify the table header text color using a hexadecimal code. For example, "#FFFFFF".',
|
|
1596
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN,
|
|
1597
|
+
type: 'string'
|
|
1598
|
+
},
|
|
1599
|
+
rowBackgroundColors: {
|
|
1600
|
+
default: '> table | seriesByIndex(0) | pick(tableAltRowBackgroundColorsByTheme)',
|
|
1601
|
+
description: 'Specify a list of colors, in hexadecimal code, for the background color of each row of the table. For example, ["#2C333B", "32373D"].',
|
|
1602
|
+
type: 'array',
|
|
1603
|
+
items: {
|
|
1604
|
+
type: 'array',
|
|
1605
|
+
items: {
|
|
1606
|
+
type: 'string',
|
|
1607
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
},
|
|
1611
|
+
rowColors: {
|
|
1612
|
+
description: 'Specify a list of colors, in hexadecimal code, for the text color of each row of the table. For example, ["#2C333B", "32373D"].',
|
|
1613
|
+
type: 'array',
|
|
1614
|
+
items: {
|
|
1615
|
+
type: 'array',
|
|
1616
|
+
items: {
|
|
1617
|
+
type: 'string',
|
|
1618
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
sparklineAreaColors: {
|
|
1623
|
+
description: 'Specify a list of colors, in hexadecimal code, for the sparkline area of each row of the table. For example, ["#2C333B", "32373D"].',
|
|
1624
|
+
type: 'array',
|
|
1625
|
+
items: {
|
|
1626
|
+
type: 'array',
|
|
1627
|
+
items: {
|
|
1628
|
+
type: 'string',
|
|
1629
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
},
|
|
1633
|
+
sparklineColors: {
|
|
1634
|
+
description: 'Specify a list of colors, in hexadecimal code, for the sparkline stroke of each row of the table. For example, ["#2C333B", "32373D"].',
|
|
1635
|
+
type: 'array',
|
|
1636
|
+
items: {
|
|
1637
|
+
type: 'array',
|
|
1638
|
+
items: {
|
|
1639
|
+
type: 'string',
|
|
1640
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
},
|
|
1644
|
+
sparklineTypes: {
|
|
1645
|
+
description: 'Choose either area or line formatting for the Sparkline.',
|
|
1646
|
+
type: 'array',
|
|
1647
|
+
items: {
|
|
1648
|
+
type: 'array',
|
|
1649
|
+
items: {
|
|
1650
|
+
type: 'string',
|
|
1651
|
+
enum: consts_1.validSparklineTypes.concat()
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1564
1655
|
}
|
|
1565
|
-
|
|
1566
|
-
return React.createElement(Viz, Object.assign({}, props, {
|
|
1567
|
-
tableHeader: tableHeader,
|
|
1568
|
-
tableBody: tableBody
|
|
1569
|
-
}));
|
|
1570
|
-
};
|
|
1571
|
-
|
|
1572
|
-
Wrapper.displayName = 'PureTableWrapper';
|
|
1573
|
-
return Wrapper;
|
|
1574
|
-
};
|
|
1575
|
-
|
|
1576
|
-
var useTableHead = function useTableHead(visibility) {
|
|
1577
|
-
if (visibility === 'none') {
|
|
1578
|
-
return NonVisibleTableHead;
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
if (visibility === 'fixed') {
|
|
1582
|
-
return FixedTableHead;
|
|
1583
1656
|
}
|
|
1584
|
-
|
|
1585
|
-
return Table_1.default.Head;
|
|
1586
|
-
};
|
|
1587
|
-
|
|
1588
|
-
var HeadCell = function HeadCell(_a) {
|
|
1589
|
-
var setTempColumnWidth = _a.setTempColumnWidth,
|
|
1590
|
-
setRemainingWidth = _a.setRemainingWidth,
|
|
1591
|
-
value = _a.value,
|
|
1592
|
-
widthSet = _a.widthSet,
|
|
1593
|
-
headerVisibility = _a.headerVisibility,
|
|
1594
|
-
props = __rest(_a, ["setTempColumnWidth", "setRemainingWidth", "value", "widthSet", "headerVisibility"]);
|
|
1595
|
-
|
|
1596
|
-
var cellRef = React.useRef(null);
|
|
1597
|
-
React.useEffect(function () {
|
|
1598
|
-
if (!widthSet && cellRef.current && cellRef.current.clientWidth >= 0 && headerVisibility !== 'none') {
|
|
1599
|
-
setTempColumnWidth(function (columnWidth) {
|
|
1600
|
-
return Object.assign(Object.assign({}, columnWidth), _defineProperty({}, value, {
|
|
1601
|
-
width: cellRef.current.clientWidth
|
|
1602
|
-
}));
|
|
1603
|
-
});
|
|
1604
|
-
setRemainingWidth(function (prevWidth) {
|
|
1605
|
-
return prevWidth + Math.max(props.width ? cellRef.current.clientWidth - props.width : 0, 0);
|
|
1606
|
-
});
|
|
1607
|
-
}
|
|
1608
|
-
});
|
|
1609
|
-
return React.createElement(Table_1.default.HeadCell, Object.assign({
|
|
1610
|
-
elementRef: cellRef
|
|
1611
|
-
}, props), value);
|
|
1612
1657
|
};
|
|
1658
|
+
var themes = {
|
|
1659
|
+
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
1660
|
+
return pick_1.default({
|
|
1661
|
+
enterprise: {
|
|
1662
|
+
dark: variables_1.default.black(props),
|
|
1663
|
+
light: variables_1.default.backgroundColor(props)
|
|
1664
|
+
},
|
|
1665
|
+
prisma: variables_1.default.backgroundColorSidebar(props)
|
|
1666
|
+
})(props);
|
|
1667
|
+
},
|
|
1668
|
+
defaultHeaderBackgroundColor: function defaultHeaderBackgroundColor(props) {
|
|
1669
|
+
return pick_1.default({
|
|
1670
|
+
enterprise: {
|
|
1671
|
+
dark: variables_1.default.gray20(props),
|
|
1672
|
+
light: variables_1.default.gray92(props)
|
|
1673
|
+
},
|
|
1674
|
+
prisma: variables_1.default.backgroundColor(props)
|
|
1675
|
+
})(props);
|
|
1676
|
+
},
|
|
1677
|
+
rowBackgroundColorEven: function rowBackgroundColorEven(props) {
|
|
1678
|
+
return pick_1.default({
|
|
1679
|
+
enterprise: {
|
|
1680
|
+
dark: variables_1.default.black(props),
|
|
1681
|
+
light: variables_1.default.gray96(props)
|
|
1682
|
+
},
|
|
1683
|
+
prisma: variables_1.default.backgroundColorPage(props)
|
|
1684
|
+
})(props);
|
|
1685
|
+
},
|
|
1686
|
+
rowBackgroundColorOdd: function rowBackgroundColorOdd(props) {
|
|
1687
|
+
return pick_1.default({
|
|
1688
|
+
enterprise: {
|
|
1689
|
+
dark: '#0D1012',
|
|
1690
|
+
light: variables_1.default.backgroundColor(props)
|
|
1691
|
+
},
|
|
1692
|
+
prisma: variables_1.default.backgroundColorSidebar(props)
|
|
1693
|
+
})(props);
|
|
1694
|
+
},
|
|
1695
|
+
textColor: function textColor(props) {
|
|
1696
|
+
return pick_1.default({
|
|
1697
|
+
enterprise: variables_1.default.textColor(props),
|
|
1698
|
+
prisma: variables_1.default.contentColorDefault(props)
|
|
1699
|
+
})(props);
|
|
1700
|
+
},
|
|
1701
|
+
inverseTextColor: function inverseTextColor(props) {
|
|
1702
|
+
return pick_1.default({
|
|
1703
|
+
enterprise: {
|
|
1704
|
+
dark: variables_1.default.contentColorInverted(props),
|
|
1705
|
+
light: variables_1.default.white(props) // equal to textColor in enterpriseDark
|
|
1613
1706
|
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
}
|
|
1618
|
-
var fontSizeMap = {
|
|
1619
|
-
extraSmall: '10px',
|
|
1620
|
-
small: '12px',
|
|
1621
|
-
default: '14px',
|
|
1622
|
-
large: '16px'
|
|
1623
|
-
};
|
|
1624
|
-
var rowHeightMap = {
|
|
1625
|
-
extraSmall: '12px',
|
|
1626
|
-
small: '12px',
|
|
1627
|
-
default: '20px',
|
|
1628
|
-
large: '24px'
|
|
1707
|
+
},
|
|
1708
|
+
prisma: variables_1.default.contentColorInverted(props)
|
|
1709
|
+
})(props);
|
|
1710
|
+
}
|
|
1629
1711
|
};
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
isPaging = _a.isPaging,
|
|
1645
|
-
paginatorOnChange = _a.onChange,
|
|
1646
|
-
paginatorProps = __rest(_a, ["isPaging", "onChange"]),
|
|
1647
|
-
onCellClick = props.onCellClick,
|
|
1648
|
-
onColumnFormatChange = props.onColumnFormatChange,
|
|
1649
|
-
columnFormat = props.columnFormat,
|
|
1650
|
-
mode = props.mode,
|
|
1651
|
-
headerVisibility = props.headerVisibility,
|
|
1652
|
-
font = props.font,
|
|
1653
|
-
fontSize = props.fontSize;
|
|
1654
|
-
|
|
1655
|
-
var _React$useState = React.useState(columnFormat),
|
|
1656
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1657
|
-
columns = _React$useState2[0],
|
|
1658
|
-
setColumns = _React$useState2[1];
|
|
1659
|
-
|
|
1660
|
-
var _React$useState3 = React.useState(columnFormat),
|
|
1661
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
1662
|
-
tempColumns = _React$useState4[0],
|
|
1663
|
-
setTempColumns = _React$useState4[1];
|
|
1664
|
-
|
|
1665
|
-
var _React$useState5 = React.useState(0),
|
|
1666
|
-
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
1667
|
-
remainingWidth = _React$useState6[0],
|
|
1668
|
-
setRemainingWidth = _React$useState6[1];
|
|
1669
|
-
|
|
1670
|
-
var numColumnsWithoutWidth = Object.keys(tempColumns).reduce(function (acc, key) {
|
|
1671
|
-
var _a;
|
|
1672
|
-
|
|
1673
|
-
if ((_a = columns[key]) === null || _a === void 0 ? void 0 : _a.width) {
|
|
1674
|
-
return acc;
|
|
1712
|
+
var backgroundColorPaletteSet = new Set([].concat(_toConsumableArray(colorConstants_1.COLOR_EDITOR_PALETTE), _toConsumableArray(lodash_1.map(themes, function (t) {
|
|
1713
|
+
return lodash_1.get(t, 'defaultBackgroundColor');
|
|
1714
|
+
}))));
|
|
1715
|
+
var EDITOR_LABEL_WIDTH = 100;
|
|
1716
|
+
var editorConfig = [{
|
|
1717
|
+
label: i18n_1._('Global Formatting'),
|
|
1718
|
+
layout: [[{
|
|
1719
|
+
label: i18n_1._('Rows Displayed'),
|
|
1720
|
+
option: 'count',
|
|
1721
|
+
editor: 'editor.number',
|
|
1722
|
+
editorProps: {
|
|
1723
|
+
labelPosition: 'left',
|
|
1724
|
+
min: 0,
|
|
1725
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
1675
1726
|
}
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
showCell = _ref7.showCell;
|
|
1684
|
-
|
|
1685
|
-
var _a, _b;
|
|
1686
|
-
|
|
1687
|
-
return ((_a = columns[value]) === null || _a === void 0 ? void 0 : _a.width) !== undefined || ((_b = tempColumns[value]) === null || _b === void 0 ? void 0 : _b.width) !== undefined || !showCell;
|
|
1688
|
-
}).length;
|
|
1689
|
-
React.useEffect(function () {
|
|
1690
|
-
if (containerRef.current && containerRef.current.clientWidth !== widthRef.current) {
|
|
1691
|
-
widthRef.current = containerRef.current.clientWidth;
|
|
1692
|
-
recalculateTempColumnWidths();
|
|
1727
|
+
}], [{
|
|
1728
|
+
label: i18n_1._('Row Numbers'),
|
|
1729
|
+
option: 'showRowNumbers',
|
|
1730
|
+
editor: 'editor.toggle',
|
|
1731
|
+
editorProps: {
|
|
1732
|
+
labelPosition: 'left',
|
|
1733
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
1693
1734
|
}
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
});
|
|
1735
|
+
}], [{
|
|
1736
|
+
label: i18n_1._('Internal Fields'),
|
|
1737
|
+
option: 'showInternalFields',
|
|
1738
|
+
editor: 'editor.toggle',
|
|
1739
|
+
editorProps: {
|
|
1740
|
+
labelPosition: 'left',
|
|
1741
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
1702
1742
|
}
|
|
1703
|
-
}, [
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1743
|
+
}], [{
|
|
1744
|
+
label: i18n_1._('Header Row'),
|
|
1745
|
+
option: 'headerVisibility',
|
|
1746
|
+
editor: 'editor.radioBar',
|
|
1747
|
+
editorProps: {
|
|
1748
|
+
values: [{
|
|
1749
|
+
label: i18n_1._('Inline'),
|
|
1750
|
+
value: 'inline'
|
|
1751
|
+
}, {
|
|
1752
|
+
label: i18n_1._('Fixed'),
|
|
1753
|
+
value: 'fixed'
|
|
1754
|
+
}, {
|
|
1755
|
+
label: i18n_1._('Hidden'),
|
|
1756
|
+
value: 'none'
|
|
1757
|
+
}],
|
|
1758
|
+
labelPosition: 'left',
|
|
1759
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
1712
1760
|
}
|
|
1713
|
-
}, [
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
});
|
|
1722
|
-
}
|
|
1761
|
+
}], [{
|
|
1762
|
+
key: 'backgroundColor',
|
|
1763
|
+
editor: 'editor.tableBackgroundColor',
|
|
1764
|
+
editorProps: {
|
|
1765
|
+
themes: themes,
|
|
1766
|
+
labelPosition: 'left',
|
|
1767
|
+
labelWidth: EDITOR_LABEL_WIDTH,
|
|
1768
|
+
palette: _toConsumableArray(backgroundColorPaletteSet)
|
|
1723
1769
|
}
|
|
1724
|
-
},
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
var value = arrayIndex === -1 ? cellValue : cellRawValue[+arrayIndex]; // Wish we did not have these if statements for
|
|
1739
|
-
// showRowNumbers
|
|
1740
|
-
|
|
1741
|
-
if (showRowNumbers === true) {
|
|
1742
|
-
if (cellIndex === 0) {
|
|
1743
|
-
// no click event for row numbers
|
|
1744
|
-
return;
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
cellIndex -= 1;
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
var payload = {
|
|
1751
|
-
cellIndex: cellIndex,
|
|
1752
|
-
rowIndex: rowIndex,
|
|
1753
|
-
fieldValue: fieldValue,
|
|
1754
|
-
cellValue: cellValue,
|
|
1755
|
-
cellRawValue: cellRawValue,
|
|
1756
|
-
value: value,
|
|
1757
|
-
name: fieldValue
|
|
1758
|
-
};
|
|
1759
|
-
tableBody.rows[rowIndex].cells.forEach(function (c, index) {
|
|
1760
|
-
var rowToken = "row.".concat(tableHeader.cells[index].value, ".value");
|
|
1761
|
-
payload[rowToken] = c.value;
|
|
1762
|
-
});
|
|
1763
|
-
debouncedDrilldown(e.nativeEvent, payload);
|
|
1770
|
+
}], [{
|
|
1771
|
+
option: 'font',
|
|
1772
|
+
label: i18n_1._('Font'),
|
|
1773
|
+
editor: 'editor.select',
|
|
1774
|
+
editorProps: {
|
|
1775
|
+
values: [{
|
|
1776
|
+
label: i18n_1._('Proportional (Default)'),
|
|
1777
|
+
value: 'proportional'
|
|
1778
|
+
}, {
|
|
1779
|
+
label: i18n_1._('Monospace'),
|
|
1780
|
+
value: 'monospace'
|
|
1781
|
+
}],
|
|
1782
|
+
labelPosition: 'top',
|
|
1783
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
1764
1784
|
}
|
|
1765
|
-
}, [
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1785
|
+
}], [{
|
|
1786
|
+
option: 'fontSize',
|
|
1787
|
+
label: i18n_1._('Font Size'),
|
|
1788
|
+
editor: 'editor.select',
|
|
1789
|
+
editorProps: {
|
|
1790
|
+
values: [{
|
|
1791
|
+
label: i18n_1._('Extra Small (font 10px, row 24px)'),
|
|
1792
|
+
value: 'extraSmall'
|
|
1793
|
+
}, {
|
|
1794
|
+
label: i18n_1._('Small (font 12px, row 24px)'),
|
|
1795
|
+
value: 'small'
|
|
1796
|
+
}, {
|
|
1797
|
+
label: i18n_1._('Default (font 14px, row 32px)'),
|
|
1798
|
+
value: 'default'
|
|
1799
|
+
}, {
|
|
1800
|
+
label: i18n_1._('Large (font 16px, row 36px)'),
|
|
1801
|
+
value: 'large'
|
|
1802
|
+
}],
|
|
1803
|
+
labelPosition: 'top',
|
|
1804
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
1781
1805
|
}
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1806
|
+
}]]
|
|
1807
|
+
}, {
|
|
1808
|
+
label: i18n_1._('Column Formatting'),
|
|
1809
|
+
layout: [[{
|
|
1810
|
+
label: i18n_1._(''),
|
|
1811
|
+
editor: 'editor.tableColumnFormatter',
|
|
1812
|
+
editorProps: {
|
|
1813
|
+
// Table column coloring does not adhere to same DSL structure as other dynamically colored options
|
|
1814
|
+
// we use the FormatterEditor directly and not the DynamicColorEditor's provided DSL builders
|
|
1815
|
+
columnColoringConfig: {
|
|
1816
|
+
coloringTypes: [{
|
|
1817
|
+
label: i18n_1._('Text'),
|
|
1818
|
+
value: 'rowColors'
|
|
1819
|
+
}, {
|
|
1820
|
+
label: i18n_1._('Background'),
|
|
1821
|
+
value: 'rowBackgroundColors'
|
|
1822
|
+
}],
|
|
1823
|
+
formatters: [{
|
|
1824
|
+
label: i18n_1._('Ranges'),
|
|
1825
|
+
value: 'rangeValue',
|
|
1826
|
+
defaults: {
|
|
1827
|
+
rowBackgroundColors: sequentialColorConfig,
|
|
1828
|
+
rowColors: sequentialColorConfig
|
|
1829
|
+
}
|
|
1830
|
+
}, {
|
|
1831
|
+
label: i18n_1._('Matches'),
|
|
1832
|
+
value: 'matchValue',
|
|
1833
|
+
defaults: {
|
|
1834
|
+
rowBackgroundColors: matchColorConfig,
|
|
1835
|
+
rowColors: matchColorConfig
|
|
1836
|
+
}
|
|
1837
|
+
}],
|
|
1838
|
+
themes: themes
|
|
1839
|
+
},
|
|
1840
|
+
defaultOptionsByType: {
|
|
1841
|
+
number: {
|
|
1842
|
+
thousandSeparated: false,
|
|
1843
|
+
unitPosition: 'after'
|
|
1844
|
+
},
|
|
1845
|
+
string: {
|
|
1846
|
+
unitPosition: 'after'
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
flyoutConfig: {
|
|
1850
|
+
number: [[Object.assign({}, unitPositionConfig), Object.assign({}, unitLabelConfig)], [{
|
|
1851
|
+
label: i18n_1._('Precision'),
|
|
1852
|
+
option: 'precision',
|
|
1853
|
+
editor: 'editor.select',
|
|
1854
|
+
editorProps: {
|
|
1855
|
+
values: configUtils_1.generatePrecisionValues(20)
|
|
1856
|
+
}
|
|
1857
|
+
}, {
|
|
1858
|
+
label: i18n_1._('Thousand Separators'),
|
|
1859
|
+
option: 'thousandSeparated',
|
|
1860
|
+
editor: 'editor.radioBar',
|
|
1861
|
+
editorProps: {
|
|
1862
|
+
values: [{
|
|
1863
|
+
label: i18n_1._('Off'),
|
|
1864
|
+
value: false
|
|
1865
|
+
}, {
|
|
1866
|
+
label: i18n_1._('On'),
|
|
1867
|
+
value: true
|
|
1868
|
+
}]
|
|
1869
|
+
}
|
|
1870
|
+
}]],
|
|
1871
|
+
// TODO(fkurniawan): fill in with proper editor components
|
|
1872
|
+
sparkline: [],
|
|
1873
|
+
string: [[Object.assign({}, unitPositionConfig), Object.assign({}, unitLabelConfig)]],
|
|
1874
|
+
time: [[Object.assign({}, timeFormattingConfig)]]
|
|
1875
|
+
},
|
|
1876
|
+
value: function value(_ref) {
|
|
1877
|
+
var context = _ref.context,
|
|
1878
|
+
options = _ref.options;
|
|
1879
|
+
return {
|
|
1880
|
+
context: context,
|
|
1881
|
+
columnFormat: options.columnFormat,
|
|
1882
|
+
tableFormat: options.tableFormat
|
|
1883
|
+
};
|
|
1884
|
+
}
|
|
1823
1885
|
},
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
value = _a.value,
|
|
1831
|
-
sortKey = _a.sortKey,
|
|
1832
|
-
rest = __rest(_a, ["key", "value", "sortKey"]);
|
|
1886
|
+
key: 'TableColumnFormatterEditor'
|
|
1887
|
+
}]]
|
|
1888
|
+
}];
|
|
1889
|
+
/**
|
|
1890
|
+
* visualization configuration
|
|
1891
|
+
*/
|
|
1833
1892
|
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
columns: columns,
|
|
1840
|
-
tempColumns: tempColumns,
|
|
1841
|
-
columnName: value,
|
|
1842
|
-
remainingWidth: remainingWidth,
|
|
1843
|
-
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
1844
|
-
}),
|
|
1845
|
-
onMouseDown: handleEventClick,
|
|
1846
|
-
value: value,
|
|
1847
|
-
setTempColumnWidth: setTempColumns,
|
|
1848
|
-
widthSet: widthSet,
|
|
1849
|
-
onSort: withColumnResizing(onSort),
|
|
1850
|
-
headerVisibility: headerVisibility,
|
|
1851
|
-
setRemainingWidth: setRemainingWidth
|
|
1852
|
-
}, Object.assign({
|
|
1853
|
-
sortKey: sortKey
|
|
1854
|
-
}, rest)));
|
|
1855
|
-
})), React.createElement(Table_1.default.Body, null, tableBody.rows.map(function (row) {
|
|
1856
|
-
return React.createElement(Table_1.default.Row, {
|
|
1857
|
-
key: row.key
|
|
1858
|
-
}, row.cells.filter(function (c) {
|
|
1859
|
-
return c.showCell;
|
|
1860
|
-
}).map(function (cell) {
|
|
1861
|
-
return React.createElement(cells_1.SwitchTableCell, {
|
|
1862
|
-
key: cell.key,
|
|
1863
|
-
type: cell.cellType
|
|
1864
|
-
}, React.createElement(cells_1.TextCell, {
|
|
1865
|
-
cell: cell,
|
|
1866
|
-
useMouseOverEffect: !!onCellClick,
|
|
1867
|
-
width: utils_1.getColumnWidth({
|
|
1868
|
-
columns: columns,
|
|
1869
|
-
tempColumns: tempColumns,
|
|
1870
|
-
columnName: cell.header,
|
|
1871
|
-
remainingWidth: remainingWidth,
|
|
1872
|
-
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
1873
|
-
})
|
|
1874
|
-
}), React.createElement(cells_1.SparklineCell, {
|
|
1875
|
-
cell: cell,
|
|
1876
|
-
useMouseOverEffect: !!onCellClick,
|
|
1877
|
-
width: utils_1.getColumnWidth({
|
|
1878
|
-
columns: columns,
|
|
1879
|
-
tempColumns: tempColumns,
|
|
1880
|
-
columnName: cell.header,
|
|
1881
|
-
remainingWidth: remainingWidth,
|
|
1882
|
-
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
1883
|
-
})
|
|
1884
|
-
}), React.createElement(cells_1.ArrayCell, {
|
|
1885
|
-
cell: cell,
|
|
1886
|
-
useMouseOverEffect: !!onCellClick,
|
|
1887
|
-
width: utils_1.getColumnWidth({
|
|
1888
|
-
columns: columns,
|
|
1889
|
-
tempColumns: tempColumns,
|
|
1890
|
-
columnName: cell.header,
|
|
1891
|
-
remainingWidth: remainingWidth,
|
|
1892
|
-
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
1893
|
-
})
|
|
1894
|
-
}));
|
|
1895
|
-
}));
|
|
1896
|
-
})))), isPaging ? React.createElement(PaginatorContainer, null, React.createElement(Paginator_1.default, Object.assign({
|
|
1897
|
-
onChange: withColumnResizing(paginatorOnChange)
|
|
1898
|
-
}, paginatorProps))) : null);
|
|
1899
|
-
};
|
|
1893
|
+
var config = {
|
|
1894
|
+
/**
|
|
1895
|
+
* unique viz key
|
|
1896
|
+
*/
|
|
1897
|
+
key: 'splunk.table',
|
|
1900
1898
|
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
showRowNumbers: T.bool,
|
|
1922
|
-
sortParams: getSorting_1.SortParamsPropTypes,
|
|
1923
|
-
table: T.arrayOf(T.arrayOf(cellDataType)),
|
|
1924
|
-
tableFormat: T.shape({
|
|
1925
|
-
align: T.arrayOf(T.arrayOf(T.oneOf(consts_1.validAlignments))),
|
|
1926
|
-
cellTypes: T.arrayOf(T.arrayOf(T.oneOf(consts_1.validCellRenderers))),
|
|
1927
|
-
data: T.arrayOf(T.arrayOf(cellDataType)),
|
|
1928
|
-
headerBackgroundColor: T.string,
|
|
1929
|
-
headerColor: T.string,
|
|
1930
|
-
rowBackgroundColors: T.oneOfType([T.arrayOf(T.string), T.arrayOf(T.arrayOf(T.string))]),
|
|
1931
|
-
rowColors: T.oneOfType([T.arrayOf(T.string), T.arrayOf(T.arrayOf(T.string))]),
|
|
1932
|
-
sparklineAreaColors: T.arrayOf(T.arrayOf(T.string)),
|
|
1933
|
-
sparklineColors: T.arrayOf(T.arrayOf(T.string)),
|
|
1934
|
-
sparklineTypes: T.arrayOf(T.arrayOf(T.oneOf(consts_1.validSparklineTypes)))
|
|
1935
|
-
}),
|
|
1936
|
-
theme: T.any,
|
|
1937
|
-
width: T.oneOfType([T.number]),
|
|
1938
|
-
onColumnFormatChange: T.func,
|
|
1939
|
-
font: T.string,
|
|
1940
|
-
fontSize: T.string
|
|
1941
|
-
};
|
|
1942
|
-
PureTable.defaultProps = {
|
|
1943
|
-
columnFormat: {},
|
|
1944
|
-
headers: [],
|
|
1945
|
-
headerVisibility: 'inline',
|
|
1946
|
-
height: 300,
|
|
1947
|
-
mode: 'view',
|
|
1948
|
-
onCellClick: null,
|
|
1949
|
-
paginatorParams: {
|
|
1950
|
-
isPaging: false,
|
|
1951
|
-
onChange: lodash_1.noop
|
|
1952
|
-
},
|
|
1953
|
-
showRowNumbers: false,
|
|
1954
|
-
sortParams: {
|
|
1955
|
-
onSort: lodash_1.noop
|
|
1899
|
+
/**
|
|
1900
|
+
* viz name
|
|
1901
|
+
*/
|
|
1902
|
+
name: 'Table',
|
|
1903
|
+
category: VizCategory_1.VizCategory.TABLE,
|
|
1904
|
+
|
|
1905
|
+
/**
|
|
1906
|
+
* viz icon
|
|
1907
|
+
*/
|
|
1908
|
+
icon: visualization_icons_1.Table,
|
|
1909
|
+
placeholderIcon: placeholders_1.Table,
|
|
1910
|
+
dataContract: dataContract,
|
|
1911
|
+
size: size,
|
|
1912
|
+
defaultContext: defaultContext,
|
|
1913
|
+
optionsSchema: optionsSchema,
|
|
1914
|
+
editorConfig: editorConfig,
|
|
1915
|
+
events: {
|
|
1916
|
+
'cell.click': {
|
|
1917
|
+
description: 'triggered when user clicks a table cell'
|
|
1918
|
+
}
|
|
1956
1919
|
},
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
theme: {},
|
|
1960
|
-
width: 300,
|
|
1961
|
-
onColumnFormatChange: lodash_1.noop,
|
|
1962
|
-
font: fontMap.proportional,
|
|
1963
|
-
fontSize: fontSizeMap.default
|
|
1920
|
+
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS, VizBehavior_1.VizBehavior.PAGE_AND_SORT, VizBehavior_1.VizBehavior.PLACEHOLDER],
|
|
1921
|
+
themes: themes
|
|
1964
1922
|
};
|
|
1965
|
-
|
|
1966
|
-
exports.default = withEmptyTableMessage(FixedSizeContainer_1.default(PureTable));
|
|
1923
|
+
exports.default = configUtils_1.enhanceConfig(config);
|
|
1967
1924
|
|
|
1968
1925
|
/***/ }),
|
|
1969
1926
|
|
|
1970
|
-
/***/
|
|
1927
|
+
/***/ 267:
|
|
1971
1928
|
/***/ (function(module, exports) {
|
|
1972
1929
|
|
|
1973
1930
|
module.exports = require("@splunk/react-ui/Paginator");
|
|
1974
1931
|
|
|
1975
1932
|
/***/ }),
|
|
1976
1933
|
|
|
1977
|
-
/***/
|
|
1934
|
+
/***/ 268:
|
|
1978
1935
|
/***/ (function(module, exports) {
|
|
1979
1936
|
|
|
1980
1937
|
module.exports = require("@splunk/react-ui/Message");
|
|
1981
1938
|
|
|
1982
1939
|
/***/ }),
|
|
1983
1940
|
|
|
1984
|
-
/***/
|
|
1941
|
+
/***/ 269:
|
|
1985
1942
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1986
1943
|
|
|
1987
1944
|
"use strict";
|
|
1988
1945
|
|
|
1989
1946
|
|
|
1990
|
-
var _toConsumableArray = __webpack_require__(
|
|
1947
|
+
var _toConsumableArray = __webpack_require__(9);
|
|
1991
1948
|
|
|
1992
|
-
var _typeof = __webpack_require__(
|
|
1949
|
+
var _typeof = __webpack_require__(23);
|
|
1993
1950
|
|
|
1994
1951
|
Object.defineProperty(exports, "__esModule", {
|
|
1995
1952
|
value: true
|
|
@@ -1998,9 +1955,9 @@ exports.useTable = exports.getTextOverflowType = exports.getOverflowStyles = voi
|
|
|
1998
1955
|
|
|
1999
1956
|
var lodash_1 = __webpack_require__(2);
|
|
2000
1957
|
|
|
2001
|
-
var colorUtils_1 = __webpack_require__(
|
|
1958
|
+
var colorUtils_1 = __webpack_require__(13);
|
|
2002
1959
|
|
|
2003
|
-
var consts_1 = __webpack_require__(
|
|
1960
|
+
var consts_1 = __webpack_require__(111);
|
|
2004
1961
|
|
|
2005
1962
|
var isArray = function isArray(v) {
|
|
2006
1963
|
return Array.isArray(v);
|
|
@@ -2407,7 +2364,78 @@ exports.useTable = useTable;
|
|
|
2407
2364
|
|
|
2408
2365
|
/***/ }),
|
|
2409
2366
|
|
|
2410
|
-
/***/
|
|
2367
|
+
/***/ 27:
|
|
2368
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2369
|
+
|
|
2370
|
+
"use strict";
|
|
2371
|
+
|
|
2372
|
+
|
|
2373
|
+
var _defineProperty = __webpack_require__(7);
|
|
2374
|
+
|
|
2375
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2376
|
+
value: true
|
|
2377
|
+
});
|
|
2378
|
+
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
2379
|
+
|
|
2380
|
+
var T = __webpack_require__(0);
|
|
2381
|
+
|
|
2382
|
+
var lodash_1 = __webpack_require__(2);
|
|
2383
|
+
|
|
2384
|
+
var DataSource_1 = __webpack_require__(37);
|
|
2385
|
+
|
|
2386
|
+
exports.SortParamsPropTypes = T.shape({
|
|
2387
|
+
currentSortKey: T.string,
|
|
2388
|
+
currentSortDir: T.oneOf(DataSource_1.validSortDirs),
|
|
2389
|
+
onSort: T.func
|
|
2390
|
+
});
|
|
2391
|
+
|
|
2392
|
+
var getSortingParams = function getSortingParams(_ref) {
|
|
2393
|
+
var requestParams = _ref.requestParams,
|
|
2394
|
+
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
2395
|
+
var currentSortKey;
|
|
2396
|
+
var currentSortDir;
|
|
2397
|
+
var nextSortDirMap = {
|
|
2398
|
+
asc: 'desc',
|
|
2399
|
+
desc: 'asc',
|
|
2400
|
+
none: 'asc'
|
|
2401
|
+
};
|
|
2402
|
+
var onSort;
|
|
2403
|
+
|
|
2404
|
+
if (lodash_1.isFunction(onRequestParamsChange)) {
|
|
2405
|
+
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
2406
|
+
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
2407
|
+
currentSortDir = requestParams.sort[currentSortKey];
|
|
2408
|
+
} // undid memoization since there is a dependency on requestParams, which is a deeply nested object
|
|
2409
|
+
|
|
2410
|
+
|
|
2411
|
+
onSort = function onSort(e, _ref2) {
|
|
2412
|
+
var sortKey = _ref2.sortKey,
|
|
2413
|
+
sortDir = _ref2.sortDir;
|
|
2414
|
+
|
|
2415
|
+
if (typeof sortKey === 'string') {
|
|
2416
|
+
var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
2417
|
+
onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
|
|
2418
|
+
offset: 0,
|
|
2419
|
+
sort: _defineProperty({}, sortKey, nextSortDir)
|
|
2420
|
+
}));
|
|
2421
|
+
} else {
|
|
2422
|
+
onRequestParamsChange(requestParams);
|
|
2423
|
+
}
|
|
2424
|
+
};
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
return {
|
|
2428
|
+
currentSortKey: currentSortKey,
|
|
2429
|
+
currentSortDir: currentSortDir,
|
|
2430
|
+
onSort: onSort
|
|
2431
|
+
};
|
|
2432
|
+
};
|
|
2433
|
+
|
|
2434
|
+
exports.getSortingParams = getSortingParams;
|
|
2435
|
+
|
|
2436
|
+
/***/ }),
|
|
2437
|
+
|
|
2438
|
+
/***/ 270:
|
|
2411
2439
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2412
2440
|
|
|
2413
2441
|
"use strict";
|
|
@@ -2436,82 +2464,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2436
2464
|
value: true
|
|
2437
2465
|
});
|
|
2438
2466
|
|
|
2439
|
-
__exportStar(__webpack_require__(270), exports);
|
|
2440
|
-
|
|
2441
2467
|
__exportStar(__webpack_require__(271), exports);
|
|
2442
2468
|
|
|
2443
2469
|
__exportStar(__webpack_require__(272), exports);
|
|
2444
2470
|
|
|
2445
2471
|
__exportStar(__webpack_require__(273), exports);
|
|
2446
2472
|
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
/***/ 27:
|
|
2450
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2451
|
-
|
|
2452
|
-
"use strict";
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2456
|
-
value: true
|
|
2457
|
-
});
|
|
2458
|
-
exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
2459
|
-
|
|
2460
|
-
var T = __webpack_require__(0);
|
|
2461
|
-
|
|
2462
|
-
var lodash_1 = __webpack_require__(2);
|
|
2463
|
-
|
|
2464
|
-
exports.PaginatorParamsPropTypes = T.shape({
|
|
2465
|
-
isPaging: T.bool,
|
|
2466
|
-
current: T.number,
|
|
2467
|
-
totalPages: T.number,
|
|
2468
|
-
onChange: T.func
|
|
2469
|
-
});
|
|
2470
|
-
|
|
2471
|
-
var getPaginationParams = function getPaginationParams(_ref) {
|
|
2472
|
-
var requestParams = _ref.requestParams,
|
|
2473
|
-
meta = _ref.meta,
|
|
2474
|
-
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
2475
|
-
var totalCount = meta && meta.totalCount || 0;
|
|
2476
|
-
var offset = requestParams && requestParams.offset || 0;
|
|
2477
|
-
var count = requestParams && requestParams.count;
|
|
2478
|
-
var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
|
|
2479
|
-
var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
|
|
2480
|
-
var isPaging = totalPages > 1 && lodash_1.isFunction(onRequestParamsChange);
|
|
2481
|
-
|
|
2482
|
-
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
|
2483
|
-
var page = _ref2.page,
|
|
2484
|
-
countArg = _ref2.count;
|
|
2485
|
-
var newParams = lodash_1.cloneDeep(requestParams);
|
|
2486
|
-
|
|
2487
|
-
if (typeof countArg === 'number') {
|
|
2488
|
-
newParams.count = countArg;
|
|
2489
|
-
newParams.offset = 0;
|
|
2490
|
-
}
|
|
2491
|
-
|
|
2492
|
-
var pageCount = typeof newParams.count === 'number' ? newParams.count : 10;
|
|
2493
|
-
|
|
2494
|
-
if (typeof page === 'number' && page > 0) {
|
|
2495
|
-
newParams.count = pageCount;
|
|
2496
|
-
newParams.offset = (page - 1) * pageCount;
|
|
2497
|
-
}
|
|
2498
|
-
|
|
2499
|
-
onRequestParamsChange(newParams);
|
|
2500
|
-
};
|
|
2501
|
-
|
|
2502
|
-
return {
|
|
2503
|
-
isPaging: isPaging,
|
|
2504
|
-
current: current,
|
|
2505
|
-
totalPages: totalPages,
|
|
2506
|
-
onChange: lodash_1.isFunction(onRequestParamsChange) ? onChangeHandler : lodash_1.noop
|
|
2507
|
-
};
|
|
2508
|
-
};
|
|
2509
|
-
|
|
2510
|
-
exports.getPaginationParams = getPaginationParams;
|
|
2473
|
+
__exportStar(__webpack_require__(274), exports);
|
|
2511
2474
|
|
|
2512
2475
|
/***/ }),
|
|
2513
2476
|
|
|
2514
|
-
/***/
|
|
2477
|
+
/***/ 271:
|
|
2515
2478
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2516
2479
|
|
|
2517
2480
|
"use strict";
|
|
@@ -2534,7 +2497,7 @@ exports.SwitchTableCell = SwitchTableCell;
|
|
|
2534
2497
|
|
|
2535
2498
|
/***/ }),
|
|
2536
2499
|
|
|
2537
|
-
/***/
|
|
2500
|
+
/***/ 272:
|
|
2538
2501
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2539
2502
|
|
|
2540
2503
|
"use strict";
|
|
@@ -2547,7 +2510,7 @@ exports.TextCell = void 0;
|
|
|
2547
2510
|
|
|
2548
2511
|
var React = __webpack_require__(1);
|
|
2549
2512
|
|
|
2550
|
-
var Table_1 = __webpack_require__(
|
|
2513
|
+
var Table_1 = __webpack_require__(89);
|
|
2551
2514
|
|
|
2552
2515
|
var TextCell = function TextCell(_ref) {
|
|
2553
2516
|
var cell = _ref.cell,
|
|
@@ -2570,7 +2533,7 @@ exports.TextCell.displayName = 'TextCell';
|
|
|
2570
2533
|
|
|
2571
2534
|
/***/ }),
|
|
2572
2535
|
|
|
2573
|
-
/***/
|
|
2536
|
+
/***/ 273:
|
|
2574
2537
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2575
2538
|
|
|
2576
2539
|
"use strict";
|
|
@@ -2583,7 +2546,7 @@ exports.ArrayCell = void 0;
|
|
|
2583
2546
|
|
|
2584
2547
|
var React = __webpack_require__(1);
|
|
2585
2548
|
|
|
2586
|
-
var Table_1 = __webpack_require__(
|
|
2549
|
+
var Table_1 = __webpack_require__(89);
|
|
2587
2550
|
|
|
2588
2551
|
var ArrayCell = function ArrayCell(_ref) {
|
|
2589
2552
|
var cell = _ref.cell,
|
|
@@ -2612,13 +2575,13 @@ exports.ArrayCell.displayName = 'ArrayCell';
|
|
|
2612
2575
|
|
|
2613
2576
|
/***/ }),
|
|
2614
2577
|
|
|
2615
|
-
/***/
|
|
2578
|
+
/***/ 274:
|
|
2616
2579
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2617
2580
|
|
|
2618
2581
|
"use strict";
|
|
2619
2582
|
|
|
2620
2583
|
|
|
2621
|
-
var _slicedToArray = __webpack_require__(
|
|
2584
|
+
var _slicedToArray = __webpack_require__(52);
|
|
2622
2585
|
|
|
2623
2586
|
Object.defineProperty(exports, "__esModule", {
|
|
2624
2587
|
value: true
|
|
@@ -2627,9 +2590,9 @@ exports.SparklineCell = exports.validSparklineTypes = void 0;
|
|
|
2627
2590
|
|
|
2628
2591
|
var React = __webpack_require__(1);
|
|
2629
2592
|
|
|
2630
|
-
var Table_1 = __webpack_require__(
|
|
2593
|
+
var Table_1 = __webpack_require__(89);
|
|
2631
2594
|
|
|
2632
|
-
var Line_1 = __webpack_require__(
|
|
2595
|
+
var Line_1 = __webpack_require__(90);
|
|
2633
2596
|
|
|
2634
2597
|
var paddingLeftRight = 5;
|
|
2635
2598
|
var paddingTopBottom = 3;
|
|
@@ -2705,7 +2668,7 @@ exports.SparklineCell.displayName = 'SparklineCell';
|
|
|
2705
2668
|
|
|
2706
2669
|
/***/ }),
|
|
2707
2670
|
|
|
2708
|
-
/***/
|
|
2671
|
+
/***/ 275:
|
|
2709
2672
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2710
2673
|
|
|
2711
2674
|
"use strict";
|
|
@@ -2714,7 +2677,9 @@ exports.SparklineCell.displayName = 'SparklineCell';
|
|
|
2714
2677
|
Object.defineProperty(exports, "__esModule", {
|
|
2715
2678
|
value: true
|
|
2716
2679
|
});
|
|
2717
|
-
exports.getColumnWidth = void 0;
|
|
2680
|
+
exports.getLastColumnWidth = exports.getColumnWidth = void 0;
|
|
2681
|
+
|
|
2682
|
+
var PureTable_1 = __webpack_require__(139);
|
|
2718
2683
|
|
|
2719
2684
|
var getColumnWidth = function getColumnWidth(_ref) {
|
|
2720
2685
|
var columns = _ref.columns,
|
|
@@ -2745,10 +2710,59 @@ var getColumnWidth = function getColumnWidth(_ref) {
|
|
|
2745
2710
|
};
|
|
2746
2711
|
|
|
2747
2712
|
exports.getColumnWidth = getColumnWidth;
|
|
2713
|
+
/**
|
|
2714
|
+
* * Gets the width of the right most column
|
|
2715
|
+
* @param containerRefInnerWidth width of the table
|
|
2716
|
+
* @param lastShowingTableHeadersID id of the last table header
|
|
2717
|
+
* @param columns columns
|
|
2718
|
+
* @param tempColumns tempColumns runtime calculation of columns
|
|
2719
|
+
* @param firstShowingTableHeadersID id of the first table header
|
|
2720
|
+
* @returns number width of the last column
|
|
2721
|
+
*/
|
|
2722
|
+
|
|
2723
|
+
var getLastColumnWidth = function getLastColumnWidth(containerRefInnerWidth, lastShowingTableHeadersID, columns, tempColumns, firstShowingTableHeadersID) {
|
|
2724
|
+
var _a, _b, _c, _d; // save the width of the last column from either columns ( first as thats user defined ) then tempColumns ( created at runtime )
|
|
2725
|
+
|
|
2726
|
+
|
|
2727
|
+
var knownWidthOfLastColumn = ((_a = columns[lastShowingTableHeadersID]) === null || _a === void 0 ? void 0 : _a.width) || ((_b = tempColumns[lastShowingTableHeadersID]) === null || _b === void 0 ? void 0 : _b.width) || 0;
|
|
2728
|
+
var currentWidthSansLastColumn = 0; // calculate the width of all the column except the last column
|
|
2729
|
+
|
|
2730
|
+
Object.keys(tempColumns).forEach(function (key) {
|
|
2731
|
+
var _a;
|
|
2732
|
+
|
|
2733
|
+
if (key !== lastShowingTableHeadersID) {
|
|
2734
|
+
currentWidthSansLastColumn += ((_a = tempColumns[key]) === null || _a === void 0 ? void 0 : _a.width) || 0;
|
|
2735
|
+
}
|
|
2736
|
+
});
|
|
2737
|
+
Object.keys(columns).forEach(function (key) {
|
|
2738
|
+
var _a, _b, _c;
|
|
2739
|
+
|
|
2740
|
+
if (key !== lastShowingTableHeadersID) {
|
|
2741
|
+
if (((_a = tempColumns[key]) === null || _a === void 0 ? void 0 : _a.width) && ((_b = columns[key]) === null || _b === void 0 ? void 0 : _b.width)) {
|
|
2742
|
+
currentWidthSansLastColumn -= tempColumns[key].width;
|
|
2743
|
+
currentWidthSansLastColumn += ((_c = columns[key]) === null || _c === void 0 ? void 0 : _c.width) || 0;
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
}); // if the first column is not defined and the last is keep the last as the first will expand
|
|
2747
|
+
|
|
2748
|
+
if (!((_c = columns[firstShowingTableHeadersID]) === null || _c === void 0 ? void 0 : _c.width) && ((_d = columns[lastShowingTableHeadersID]) === null || _d === void 0 ? void 0 : _d.width)) {
|
|
2749
|
+
return columns[lastShowingTableHeadersID].width;
|
|
2750
|
+
} // if the width of the columns plus the last column is smaller than the table return the difference
|
|
2751
|
+
// so as to expand the last column
|
|
2752
|
+
|
|
2753
|
+
|
|
2754
|
+
if (currentWidthSansLastColumn + knownWidthOfLastColumn < containerRefInnerWidth && knownWidthOfLastColumn) {
|
|
2755
|
+
return Math.max(PureTable_1.MINIMUM_COLUMN_SIZE, containerRefInnerWidth - currentWidthSansLastColumn);
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
return knownWidthOfLastColumn;
|
|
2759
|
+
};
|
|
2760
|
+
|
|
2761
|
+
exports.getLastColumnWidth = getLastColumnWidth;
|
|
2748
2762
|
|
|
2749
2763
|
/***/ }),
|
|
2750
2764
|
|
|
2751
|
-
/***/
|
|
2765
|
+
/***/ 276:
|
|
2752
2766
|
/***/ (function(module, exports) {
|
|
2753
2767
|
|
|
2754
2768
|
module.exports = require("lodash/debounce");
|
|
@@ -2761,6 +2775,71 @@ module.exports = require("lodash/debounce");
|
|
|
2761
2775
|
"use strict";
|
|
2762
2776
|
|
|
2763
2777
|
|
|
2778
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2779
|
+
value: true
|
|
2780
|
+
});
|
|
2781
|
+
exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
2782
|
+
|
|
2783
|
+
var T = __webpack_require__(0);
|
|
2784
|
+
|
|
2785
|
+
var lodash_1 = __webpack_require__(2);
|
|
2786
|
+
|
|
2787
|
+
exports.PaginatorParamsPropTypes = T.shape({
|
|
2788
|
+
isPaging: T.bool,
|
|
2789
|
+
current: T.number,
|
|
2790
|
+
totalPages: T.number,
|
|
2791
|
+
onChange: T.func
|
|
2792
|
+
});
|
|
2793
|
+
|
|
2794
|
+
var getPaginationParams = function getPaginationParams(_ref) {
|
|
2795
|
+
var requestParams = _ref.requestParams,
|
|
2796
|
+
meta = _ref.meta,
|
|
2797
|
+
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
2798
|
+
var totalCount = meta && meta.totalCount || 0;
|
|
2799
|
+
var offset = requestParams && requestParams.offset || 0;
|
|
2800
|
+
var count = requestParams && requestParams.count;
|
|
2801
|
+
var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
|
|
2802
|
+
var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
|
|
2803
|
+
var isPaging = totalPages > 1 && lodash_1.isFunction(onRequestParamsChange);
|
|
2804
|
+
|
|
2805
|
+
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
|
2806
|
+
var page = _ref2.page,
|
|
2807
|
+
countArg = _ref2.count;
|
|
2808
|
+
var newParams = lodash_1.cloneDeep(requestParams);
|
|
2809
|
+
|
|
2810
|
+
if (typeof countArg === 'number') {
|
|
2811
|
+
newParams.count = countArg;
|
|
2812
|
+
newParams.offset = 0;
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
var pageCount = typeof newParams.count === 'number' ? newParams.count : 10;
|
|
2816
|
+
|
|
2817
|
+
if (typeof page === 'number' && page > 0) {
|
|
2818
|
+
newParams.count = pageCount;
|
|
2819
|
+
newParams.offset = (page - 1) * pageCount;
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
onRequestParamsChange(newParams);
|
|
2823
|
+
};
|
|
2824
|
+
|
|
2825
|
+
return {
|
|
2826
|
+
isPaging: isPaging,
|
|
2827
|
+
current: current,
|
|
2828
|
+
totalPages: totalPages,
|
|
2829
|
+
onChange: lodash_1.isFunction(onRequestParamsChange) ? onChangeHandler : lodash_1.noop
|
|
2830
|
+
};
|
|
2831
|
+
};
|
|
2832
|
+
|
|
2833
|
+
exports.getPaginationParams = getPaginationParams;
|
|
2834
|
+
|
|
2835
|
+
/***/ }),
|
|
2836
|
+
|
|
2837
|
+
/***/ 29:
|
|
2838
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2839
|
+
|
|
2840
|
+
"use strict";
|
|
2841
|
+
|
|
2842
|
+
|
|
2764
2843
|
Object.defineProperty(exports, "__esModule", {
|
|
2765
2844
|
value: true
|
|
2766
2845
|
});
|
|
@@ -2784,7 +2863,14 @@ var VizCategory;
|
|
|
2784
2863
|
|
|
2785
2864
|
/***/ }),
|
|
2786
2865
|
|
|
2787
|
-
/***/
|
|
2866
|
+
/***/ 3:
|
|
2867
|
+
/***/ (function(module, exports) {
|
|
2868
|
+
|
|
2869
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
2870
|
+
|
|
2871
|
+
/***/ }),
|
|
2872
|
+
|
|
2873
|
+
/***/ 30:
|
|
2788
2874
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2789
2875
|
|
|
2790
2876
|
"use strict";
|
|
@@ -2798,35 +2884,35 @@ var React = __webpack_require__(1);
|
|
|
2798
2884
|
|
|
2799
2885
|
var lodash_1 = __webpack_require__(2);
|
|
2800
2886
|
|
|
2801
|
-
var getSettingsFromThemedProps_1 = __webpack_require__(
|
|
2887
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(31);
|
|
2802
2888
|
|
|
2803
|
-
var Options_1 = __webpack_require__(
|
|
2889
|
+
var Options_1 = __webpack_require__(32);
|
|
2804
2890
|
|
|
2805
|
-
var SanitizeProps_1 = __webpack_require__(
|
|
2891
|
+
var SanitizeProps_1 = __webpack_require__(33);
|
|
2806
2892
|
|
|
2807
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
2893
|
+
var TimezoneContext_1 = __webpack_require__(21);
|
|
2808
2894
|
|
|
2809
|
-
var moment_1 = __webpack_require__(
|
|
2895
|
+
var moment_1 = __webpack_require__(34);
|
|
2810
2896
|
|
|
2811
2897
|
var styled_components_1 = __webpack_require__(4);
|
|
2812
2898
|
|
|
2813
|
-
var SplunkVisualization_1 = __webpack_require__(
|
|
2899
|
+
var SplunkVisualization_1 = __webpack_require__(35);
|
|
2814
2900
|
|
|
2815
2901
|
var VizBehavior_1 = __webpack_require__(5);
|
|
2816
2902
|
|
|
2817
|
-
var getSorting_1 = __webpack_require__(
|
|
2903
|
+
var getSorting_1 = __webpack_require__(27);
|
|
2818
2904
|
|
|
2819
|
-
var getPagination_1 = __webpack_require__(
|
|
2905
|
+
var getPagination_1 = __webpack_require__(28);
|
|
2820
2906
|
|
|
2821
|
-
var useDeepMemo_1 = __webpack_require__(
|
|
2907
|
+
var useDeepMemo_1 = __webpack_require__(38);
|
|
2822
2908
|
|
|
2823
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
2909
|
+
var JSONSchemaUtils_1 = __webpack_require__(25);
|
|
2824
2910
|
|
|
2825
|
-
var MissingPropsMessage_1 = __webpack_require__(
|
|
2911
|
+
var MissingPropsMessage_1 = __webpack_require__(39);
|
|
2826
2912
|
|
|
2827
|
-
var withEditModeCover_1 = __webpack_require__(
|
|
2913
|
+
var withEditModeCover_1 = __webpack_require__(40);
|
|
2828
2914
|
|
|
2829
|
-
var withPlaceholder_1 = __webpack_require__(
|
|
2915
|
+
var withPlaceholder_1 = __webpack_require__(42);
|
|
2830
2916
|
|
|
2831
2917
|
var hocUtils_1 = __webpack_require__(8);
|
|
2832
2918
|
/**
|
|
@@ -3030,48 +3116,41 @@ exports.default = withDashboardViz;
|
|
|
3030
3116
|
|
|
3031
3117
|
/***/ }),
|
|
3032
3118
|
|
|
3033
|
-
/***/
|
|
3034
|
-
/***/ (function(module, exports) {
|
|
3035
|
-
|
|
3036
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
3037
|
-
|
|
3038
|
-
/***/ }),
|
|
3039
|
-
|
|
3040
|
-
/***/ 30:
|
|
3119
|
+
/***/ 31:
|
|
3041
3120
|
/***/ (function(module, exports) {
|
|
3042
3121
|
|
|
3043
3122
|
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
3044
3123
|
|
|
3045
3124
|
/***/ }),
|
|
3046
3125
|
|
|
3047
|
-
/***/
|
|
3126
|
+
/***/ 32:
|
|
3048
3127
|
/***/ (function(module, exports) {
|
|
3049
3128
|
|
|
3050
3129
|
module.exports = require("@splunk/visualization-encoding/Options");
|
|
3051
3130
|
|
|
3052
3131
|
/***/ }),
|
|
3053
3132
|
|
|
3054
|
-
/***/
|
|
3133
|
+
/***/ 33:
|
|
3055
3134
|
/***/ (function(module, exports) {
|
|
3056
3135
|
|
|
3057
3136
|
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
3058
3137
|
|
|
3059
3138
|
/***/ }),
|
|
3060
3139
|
|
|
3061
|
-
/***/
|
|
3140
|
+
/***/ 34:
|
|
3062
3141
|
/***/ (function(module, exports) {
|
|
3063
3142
|
|
|
3064
3143
|
module.exports = require("@splunk/moment");
|
|
3065
3144
|
|
|
3066
3145
|
/***/ }),
|
|
3067
3146
|
|
|
3068
|
-
/***/
|
|
3147
|
+
/***/ 35:
|
|
3069
3148
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3070
3149
|
|
|
3071
3150
|
"use strict";
|
|
3072
3151
|
|
|
3073
3152
|
|
|
3074
|
-
var _classCallCheck = __webpack_require__(
|
|
3153
|
+
var _classCallCheck = __webpack_require__(12);
|
|
3075
3154
|
|
|
3076
3155
|
Object.defineProperty(exports, "__esModule", {
|
|
3077
3156
|
value: true
|
|
@@ -3083,7 +3162,7 @@ var T = __webpack_require__(0);
|
|
|
3083
3162
|
|
|
3084
3163
|
var lodash_1 = __webpack_require__(2);
|
|
3085
3164
|
|
|
3086
|
-
var VizActionHandler_1 = __webpack_require__(
|
|
3165
|
+
var VizActionHandler_1 = __webpack_require__(36); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
3087
3166
|
|
|
3088
3167
|
|
|
3089
3168
|
exports.INITIAL_WIDTH = 250;
|
|
@@ -3217,15 +3296,15 @@ exports.default = SplunkVisualization;
|
|
|
3217
3296
|
|
|
3218
3297
|
/***/ }),
|
|
3219
3298
|
|
|
3220
|
-
/***/
|
|
3299
|
+
/***/ 36:
|
|
3221
3300
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3222
3301
|
|
|
3223
3302
|
"use strict";
|
|
3224
3303
|
|
|
3225
3304
|
|
|
3226
|
-
var _classCallCheck = __webpack_require__(
|
|
3305
|
+
var _classCallCheck = __webpack_require__(12);
|
|
3227
3306
|
|
|
3228
|
-
var _createClass = __webpack_require__(
|
|
3307
|
+
var _createClass = __webpack_require__(17);
|
|
3229
3308
|
|
|
3230
3309
|
Object.defineProperty(exports, "__esModule", {
|
|
3231
3310
|
value: true
|
|
@@ -3255,7 +3334,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
|
3255
3334
|
|
|
3256
3335
|
/***/ }),
|
|
3257
3336
|
|
|
3258
|
-
/***/
|
|
3337
|
+
/***/ 37:
|
|
3259
3338
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3260
3339
|
|
|
3261
3340
|
"use strict";
|
|
@@ -3269,7 +3348,7 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
|
3269
3348
|
|
|
3270
3349
|
/***/ }),
|
|
3271
3350
|
|
|
3272
|
-
/***/
|
|
3351
|
+
/***/ 38:
|
|
3273
3352
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3274
3353
|
|
|
3275
3354
|
"use strict";
|
|
@@ -3315,7 +3394,7 @@ exports.useDeepMemo = useDeepMemo;
|
|
|
3315
3394
|
|
|
3316
3395
|
/***/ }),
|
|
3317
3396
|
|
|
3318
|
-
/***/
|
|
3397
|
+
/***/ 39:
|
|
3319
3398
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3320
3399
|
|
|
3321
3400
|
"use strict";
|
|
@@ -3332,9 +3411,9 @@ var T = __webpack_require__(0);
|
|
|
3332
3411
|
|
|
3333
3412
|
var i18n_1 = __webpack_require__(3);
|
|
3334
3413
|
|
|
3335
|
-
var Message_1 = __webpack_require__(
|
|
3414
|
+
var Message_1 = __webpack_require__(11);
|
|
3336
3415
|
|
|
3337
|
-
var FixedSizeContainer_1 = __webpack_require__(
|
|
3416
|
+
var FixedSizeContainer_1 = __webpack_require__(14);
|
|
3338
3417
|
/**
|
|
3339
3418
|
* @method isMissing
|
|
3340
3419
|
* @param {any} v
|
|
@@ -3396,7 +3475,14 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
|
3396
3475
|
|
|
3397
3476
|
/***/ }),
|
|
3398
3477
|
|
|
3399
|
-
/***/
|
|
3478
|
+
/***/ 4:
|
|
3479
|
+
/***/ (function(module, exports) {
|
|
3480
|
+
|
|
3481
|
+
module.exports = require("styled-components");
|
|
3482
|
+
|
|
3483
|
+
/***/ }),
|
|
3484
|
+
|
|
3485
|
+
/***/ 40:
|
|
3400
3486
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3401
3487
|
|
|
3402
3488
|
"use strict";
|
|
@@ -3417,7 +3503,7 @@ var Cover = styled_components_1.default.div.withConfig({
|
|
|
3417
3503
|
componentId: "sc-1gsbnxb-0"
|
|
3418
3504
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
3419
3505
|
var Blocker = styled_components_1.default.div.attrs({
|
|
3420
|
-
'data-splunk-visualization-version': "
|
|
3506
|
+
'data-splunk-visualization-version': "25.0.0 - 5e0f30e5a"
|
|
3421
3507
|
}).withConfig({
|
|
3422
3508
|
displayName: "withEditModeCover__Blocker",
|
|
3423
3509
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -3449,14 +3535,14 @@ exports.default = withEditModeCover;
|
|
|
3449
3535
|
|
|
3450
3536
|
/***/ }),
|
|
3451
3537
|
|
|
3452
|
-
/***/
|
|
3538
|
+
/***/ 41:
|
|
3453
3539
|
/***/ (function(module, exports) {
|
|
3454
3540
|
|
|
3455
|
-
module.exports = require("
|
|
3541
|
+
module.exports = require("@splunk/visualizations-shared/mapUtils");
|
|
3456
3542
|
|
|
3457
3543
|
/***/ }),
|
|
3458
3544
|
|
|
3459
|
-
/***/
|
|
3545
|
+
/***/ 42:
|
|
3460
3546
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3461
3547
|
|
|
3462
3548
|
"use strict";
|
|
@@ -3468,11 +3554,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3468
3554
|
|
|
3469
3555
|
var React = __webpack_require__(1);
|
|
3470
3556
|
|
|
3471
|
-
var colorUtils_1 = __webpack_require__(
|
|
3557
|
+
var colorUtils_1 = __webpack_require__(13);
|
|
3472
3558
|
|
|
3473
|
-
var variables_1 = __webpack_require__(
|
|
3559
|
+
var variables_1 = __webpack_require__(10);
|
|
3474
3560
|
|
|
3475
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
3561
|
+
var IconPlaceholder_1 = __webpack_require__(26);
|
|
3476
3562
|
|
|
3477
3563
|
var VizBehavior_1 = __webpack_require__(5);
|
|
3478
3564
|
|
|
@@ -3521,28 +3607,21 @@ exports.default = withPlaceholder;
|
|
|
3521
3607
|
|
|
3522
3608
|
/***/ }),
|
|
3523
3609
|
|
|
3524
|
-
/***/
|
|
3525
|
-
/***/ (function(module, exports) {
|
|
3526
|
-
|
|
3527
|
-
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
3528
|
-
|
|
3529
|
-
/***/ }),
|
|
3530
|
-
|
|
3531
|
-
/***/ 42:
|
|
3610
|
+
/***/ 43:
|
|
3532
3611
|
/***/ (function(module, exports) {
|
|
3533
3612
|
|
|
3534
3613
|
module.exports = require("@splunk/visualizations-shared/colorConstants");
|
|
3535
3614
|
|
|
3536
3615
|
/***/ }),
|
|
3537
3616
|
|
|
3538
|
-
/***/
|
|
3617
|
+
/***/ 45:
|
|
3539
3618
|
/***/ (function(module, exports) {
|
|
3540
3619
|
|
|
3541
3620
|
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
3542
3621
|
|
|
3543
3622
|
/***/ }),
|
|
3544
3623
|
|
|
3545
|
-
/***/
|
|
3624
|
+
/***/ 46:
|
|
3546
3625
|
/***/ (function(module, exports) {
|
|
3547
3626
|
|
|
3548
3627
|
module.exports = require("@splunk/visualization-icons");
|
|
@@ -3587,7 +3666,7 @@ var VizBehavior;
|
|
|
3587
3666
|
|
|
3588
3667
|
/***/ }),
|
|
3589
3668
|
|
|
3590
|
-
/***/
|
|
3669
|
+
/***/ 52:
|
|
3591
3670
|
/***/ (function(module, exports) {
|
|
3592
3671
|
|
|
3593
3672
|
module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
@@ -3600,6 +3679,8 @@ module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
|
3600
3679
|
"use strict";
|
|
3601
3680
|
|
|
3602
3681
|
|
|
3682
|
+
var _toConsumableArray = __webpack_require__(9);
|
|
3683
|
+
|
|
3603
3684
|
var _defineProperty = __webpack_require__(7);
|
|
3604
3685
|
|
|
3605
3686
|
var __rest = this && this.__rest || function (s, e) {
|
|
@@ -3618,11 +3699,11 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
3618
3699
|
Object.defineProperty(exports, "__esModule", {
|
|
3619
3700
|
value: true
|
|
3620
3701
|
});
|
|
3621
|
-
exports.generatePrecisionValues = exports.getInitialPreset = exports.isDynamicOption = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
3702
|
+
exports.insertLayout = exports.generatePrecisionValues = exports.getInitialPreset = exports.isDynamicOption = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
3622
3703
|
|
|
3623
3704
|
var lodash_1 = __webpack_require__(2);
|
|
3624
3705
|
|
|
3625
|
-
var schemaUtils_1 = __webpack_require__(
|
|
3706
|
+
var schemaUtils_1 = __webpack_require__(16);
|
|
3626
3707
|
|
|
3627
3708
|
var VizBehavior_1 = __webpack_require__(5);
|
|
3628
3709
|
|
|
@@ -3783,20 +3864,31 @@ function generatePrecisionValues(numPrecisionValues) {
|
|
|
3783
3864
|
}
|
|
3784
3865
|
|
|
3785
3866
|
exports.generatePrecisionValues = generatePrecisionValues;
|
|
3867
|
+
/**
|
|
3868
|
+
* insert layout in layout array, return a new layout array instead of updating the original
|
|
3869
|
+
*
|
|
3870
|
+
* @param {EditorLayoutConfig[][]} layout - editor layout
|
|
3871
|
+
* @param {Number} index - the index to insert layout item(s)
|
|
3872
|
+
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
3873
|
+
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
3874
|
+
*/
|
|
3786
3875
|
|
|
3787
|
-
|
|
3876
|
+
var insertLayout = function insertLayout(layout, index) {
|
|
3877
|
+
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
3878
|
+
layoutItems[_key - 2] = arguments[_key];
|
|
3879
|
+
}
|
|
3788
3880
|
|
|
3789
|
-
|
|
3790
|
-
|
|
3881
|
+
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
3882
|
+
};
|
|
3791
3883
|
|
|
3792
|
-
|
|
3884
|
+
exports.insertLayout = insertLayout;
|
|
3793
3885
|
|
|
3794
3886
|
/***/ }),
|
|
3795
3887
|
|
|
3796
|
-
/***/
|
|
3888
|
+
/***/ 7:
|
|
3797
3889
|
/***/ (function(module, exports) {
|
|
3798
3890
|
|
|
3799
|
-
module.exports = require("@babel/runtime/helpers/
|
|
3891
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
3800
3892
|
|
|
3801
3893
|
/***/ }),
|
|
3802
3894
|
|
|
@@ -3806,14 +3898,16 @@ module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
|
3806
3898
|
"use strict";
|
|
3807
3899
|
|
|
3808
3900
|
|
|
3809
|
-
var _typeof = __webpack_require__(
|
|
3901
|
+
var _typeof = __webpack_require__(23);
|
|
3810
3902
|
|
|
3811
3903
|
Object.defineProperty(exports, "__esModule", {
|
|
3812
3904
|
value: true
|
|
3813
3905
|
});
|
|
3814
|
-
exports.
|
|
3906
|
+
exports.deepMergeWithArrayPrimitiveOverrides = exports.extendStaticWrapperProps = void 0;
|
|
3815
3907
|
|
|
3816
3908
|
var lodash_1 = __webpack_require__(2);
|
|
3909
|
+
|
|
3910
|
+
var mapUtils_1 = __webpack_require__(41);
|
|
3817
3911
|
/**
|
|
3818
3912
|
* @method extendStaticWrapperProps
|
|
3819
3913
|
* @param {Object} props
|
|
@@ -3868,7 +3962,7 @@ var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveO
|
|
|
3868
3962
|
// If option is an array of objects
|
|
3869
3963
|
for (var i = 0; i < clone[sourceKey].length; i += 1) {
|
|
3870
3964
|
if (_typeof(clone[sourceKey][i]) === 'object') {
|
|
3871
|
-
var closestMatchIdx =
|
|
3965
|
+
var closestMatchIdx = mapUtils_1.findClosestMatchFromDefaultList(sourceToApply[sourceKey], clone[sourceKey][i]);
|
|
3872
3966
|
|
|
3873
3967
|
if (closestMatchIdx > -1) {
|
|
3874
3968
|
clone[sourceKey][i] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey][i], sourceToApply[sourceKey][closestMatchIdx]);
|
|
@@ -3882,71 +3976,34 @@ var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveO
|
|
|
3882
3976
|
};
|
|
3883
3977
|
|
|
3884
3978
|
exports.deepMergeWithArrayPrimitiveOverrides = deepMergeWithArrayPrimitiveOverrides;
|
|
3885
|
-
/**
|
|
3886
|
-
* Finds the closest matching object from the list, which has the max same key value pairs.
|
|
3887
|
-
* Returns the index of match if found, or -1
|
|
3888
|
-
* For eg :-
|
|
3889
|
-
const list = [{
|
|
3890
|
-
type: "marker",
|
|
3891
|
-
lat: "value1"
|
|
3892
|
-
}, {
|
|
3893
|
-
type: "bubble",
|
|
3894
|
-
size: "value2"
|
|
3895
|
-
}];
|
|
3896
|
-
|
|
3897
|
-
const obj = {
|
|
3898
|
-
type: 'bubble'
|
|
3899
|
-
};
|
|
3900
|
-
|
|
3901
|
-
findClosestMatch(list, obj) -> returns index 1.
|
|
3902
|
-
*/
|
|
3903
3979
|
|
|
3904
|
-
|
|
3905
|
-
if (!Array.isArray(searchList) || searchList.length === 0) {
|
|
3906
|
-
return -1;
|
|
3907
|
-
}
|
|
3908
|
-
|
|
3909
|
-
var keys = Object.keys(inputObj);
|
|
3910
|
-
var maxMatchCnt = 0;
|
|
3911
|
-
var maxMatchIdx = 0;
|
|
3912
|
-
searchList.forEach(function (item, idx) {
|
|
3913
|
-
var matchCnt = 0;
|
|
3914
|
-
keys.forEach(function (key) {
|
|
3915
|
-
if (item[key] === inputObj[key]) {
|
|
3916
|
-
matchCnt += 1;
|
|
3917
|
-
}
|
|
3918
|
-
});
|
|
3980
|
+
/***/ }),
|
|
3919
3981
|
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
maxMatchIdx = idx;
|
|
3923
|
-
}
|
|
3924
|
-
});
|
|
3925
|
-
return maxMatchIdx;
|
|
3926
|
-
};
|
|
3982
|
+
/***/ 81:
|
|
3983
|
+
/***/ (function(module, exports) {
|
|
3927
3984
|
|
|
3928
|
-
exports
|
|
3985
|
+
module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
3929
3986
|
|
|
3930
3987
|
/***/ }),
|
|
3931
3988
|
|
|
3932
|
-
/***/
|
|
3989
|
+
/***/ 89:
|
|
3933
3990
|
/***/ (function(module, exports) {
|
|
3934
3991
|
|
|
3935
3992
|
module.exports = require("@splunk/react-ui/Table");
|
|
3936
3993
|
|
|
3937
3994
|
/***/ }),
|
|
3938
3995
|
|
|
3939
|
-
/***/
|
|
3996
|
+
/***/ 9:
|
|
3940
3997
|
/***/ (function(module, exports) {
|
|
3941
3998
|
|
|
3942
|
-
module.exports = require("@
|
|
3999
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
3943
4000
|
|
|
3944
4001
|
/***/ }),
|
|
3945
4002
|
|
|
3946
|
-
/***/
|
|
4003
|
+
/***/ 90:
|
|
3947
4004
|
/***/ (function(module, exports) {
|
|
3948
4005
|
|
|
3949
|
-
module.exports = require("@splunk/
|
|
4006
|
+
module.exports = require("@splunk/react-sparkline/Line");
|
|
3950
4007
|
|
|
3951
4008
|
/***/ })
|
|
3952
4009
|
|