@splunk/visualizations 24.7.0 → 25.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.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_basic.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_choropleth_layer.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_dynamic_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_static_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_static_color_with_no_seriesColors.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_off.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_unit_metric.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_Line_Line_Placeholder_if_datasource_does_not_have_any_data.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Line_Line_Placeholder_if_viz_does_not_connect_to_datasource.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Basic_Map.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_GET.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_GET_Dynamic_Coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Internal_Fields.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Static_Coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_Dynamic_Coloring.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_Map_Map_Marker_layer.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_Dynamic_coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_Result_Limit_Set_To_3.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Restricted_Zoom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Set_Map_tiles.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 +1144 -241
- package/Area.config.js.map +1 -1
- package/Area.js +1251 -386
- package/Area.js.map +1 -1
- package/Bar.config.js +1114 -153
- package/Bar.config.js.map +1 -1
- package/Bar.js +1270 -347
- package/Bar.js.map +1 -1
- package/Bubble.config.js +727 -60
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +830 -201
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +88 -40
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +197 -182
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +1084 -170
- package/Column.config.js.map +1 -1
- package/Column.js +1241 -365
- package/Column.js.map +1 -1
- package/Ellipse.config.js +80 -31
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +160 -144
- package/Ellipse.js.map +1 -1
- package/FillerGauge.config.js +93 -44
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +183 -172
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +78 -27
- package/Image.config.js.map +1 -1
- package/Image.js +161 -145
- package/Image.js.map +1 -1
- package/Line.config.js +1060 -108
- package/Line.config.js.map +1 -1
- package/Line.js +1210 -296
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +103 -58
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +208 -197
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +824 -78
- package/Map.config.js.map +1 -1
- package/Map.js +878 -344
- package/Map.js.map +1 -1
- package/Markdown.config.js +98 -50
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +294 -259
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +103 -52
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +384 -375
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +101 -49
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +189 -178
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +104 -53
- package/Pie.config.js.map +1 -1
- package/Pie.js +380 -371
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +101 -51
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +224 -215
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +108 -56
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +315 -298
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +107 -55
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +247 -237
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +816 -135
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +1096 -484
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +113 -58
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +436 -407
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +35 -23
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +107 -57
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +221 -211
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +192 -168
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +329 -300
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +82 -37
- package/Table.config.js.map +1 -1
- package/Table.js +1849 -1767
- 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 +74 -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 +55 -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 = 266);
|
|
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
|
+
/***/ 112:
|
|
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
|
+
/***/ 139:
|
|
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__(267);
|
|
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__(140);
|
|
283
193
|
|
|
284
194
|
exports.PureTable = PureTable_1.default;
|
|
285
195
|
|
|
@@ -358,1638 +268,1756 @@ exports.default = Table;
|
|
|
358
268
|
/***/ }),
|
|
359
269
|
|
|
360
270
|
/***/ 14:
|
|
361
|
-
/***/ (function(module, exports) {
|
|
362
|
-
|
|
363
|
-
module.exports = require("@splunk/visualizations-shared/style");
|
|
271
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
364
272
|
|
|
365
|
-
|
|
273
|
+
"use strict";
|
|
366
274
|
|
|
367
|
-
/***/ 15:
|
|
368
|
-
/***/ (function(module, exports) {
|
|
369
275
|
|
|
370
|
-
|
|
276
|
+
Object.defineProperty(exports, "__esModule", {
|
|
277
|
+
value: true
|
|
278
|
+
});
|
|
371
279
|
|
|
372
|
-
|
|
280
|
+
var React = __webpack_require__(1);
|
|
373
281
|
|
|
374
|
-
|
|
375
|
-
/***/ (function(module, exports) {
|
|
282
|
+
var styled_components_1 = __webpack_require__(4);
|
|
376
283
|
|
|
377
|
-
|
|
284
|
+
var SizeAwareWrapper_1 = __webpack_require__(18);
|
|
378
285
|
|
|
379
|
-
|
|
286
|
+
var style_1 = __webpack_require__(15);
|
|
380
287
|
|
|
381
|
-
|
|
382
|
-
/***/ (function(module, exports) {
|
|
288
|
+
var colorUtils_1 = __webpack_require__(13);
|
|
383
289
|
|
|
384
|
-
|
|
290
|
+
var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
291
|
+
var width = _ref.width;
|
|
292
|
+
return {
|
|
293
|
+
style: {
|
|
294
|
+
width: style_1.toPx(width)
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
}).withConfig({
|
|
298
|
+
displayName: "FixedSizeContainer__Item",
|
|
299
|
+
componentId: "sc-1yhgpod-0"
|
|
300
|
+
})(["position:relative;background-color:", "};"], function (props) {
|
|
301
|
+
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
302
|
+
}); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
385
303
|
|
|
386
|
-
|
|
304
|
+
var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
305
|
+
var width = _ref2.width,
|
|
306
|
+
height = _ref2.height;
|
|
307
|
+
return {
|
|
308
|
+
style: Object.assign(Object.assign({}, width && {
|
|
309
|
+
width: style_1.toPx(width)
|
|
310
|
+
}), height && {
|
|
311
|
+
height: style_1.toPx(height)
|
|
312
|
+
})
|
|
313
|
+
};
|
|
314
|
+
}).withConfig({
|
|
315
|
+
displayName: "FixedSizeContainer__FixSizeItem",
|
|
316
|
+
componentId: "sc-1yhgpod-1"
|
|
317
|
+
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
318
|
+
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
319
|
+
});
|
|
320
|
+
var ItemContent = styled_components_1.default.div.withConfig({
|
|
321
|
+
displayName: "FixedSizeContainer__ItemContent",
|
|
322
|
+
componentId: "sc-1yhgpod-2"
|
|
323
|
+
})(["position:relative;min-height:100px;width:100%;"]);
|
|
324
|
+
var FixSizeItemContent = styled_components_1.default.div.withConfig({
|
|
325
|
+
displayName: "FixedSizeContainer__FixSizeItemContent",
|
|
326
|
+
componentId: "sc-1yhgpod-3"
|
|
327
|
+
})(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
|
|
387
328
|
|
|
388
|
-
|
|
389
|
-
|
|
329
|
+
var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
330
|
+
var FixedSizeContainer = function FixedSizeContainer(props) {
|
|
331
|
+
var width = props.width,
|
|
332
|
+
height = props.height,
|
|
333
|
+
backgroundColor = props.backgroundColor;
|
|
390
334
|
|
|
391
|
-
|
|
335
|
+
if (!height) {
|
|
336
|
+
return React.createElement(Item, {
|
|
337
|
+
"data-test": "item",
|
|
338
|
+
width: width,
|
|
339
|
+
backgroundColor: backgroundColor
|
|
340
|
+
}, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
|
|
341
|
+
}
|
|
392
342
|
|
|
393
|
-
|
|
343
|
+
return React.createElement(FixSizeItem, {
|
|
344
|
+
"data-test": "fix-size-item",
|
|
345
|
+
"data-splunk-visualization-version": "25.0.1 - de10ad954",
|
|
346
|
+
width: width,
|
|
347
|
+
height: height,
|
|
348
|
+
backgroundColor: backgroundColor
|
|
349
|
+
}, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
|
|
350
|
+
var newWidth = _ref3.width,
|
|
351
|
+
newHeight = _ref3.height;
|
|
352
|
+
return React.createElement(Viz, Object.assign({}, props, {
|
|
353
|
+
width: newWidth,
|
|
354
|
+
height: newHeight
|
|
355
|
+
}));
|
|
356
|
+
})));
|
|
357
|
+
};
|
|
394
358
|
|
|
395
|
-
|
|
396
|
-
|
|
359
|
+
FixedSizeContainer.displayName = 'withFixedSizeContainer';
|
|
360
|
+
return FixedSizeContainer;
|
|
361
|
+
};
|
|
397
362
|
|
|
398
|
-
|
|
363
|
+
exports.default = withFixedSizeContainer;
|
|
399
364
|
|
|
400
365
|
/***/ }),
|
|
401
366
|
|
|
402
|
-
/***/
|
|
403
|
-
/***/ (function(module, exports) {
|
|
367
|
+
/***/ 140:
|
|
368
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
404
369
|
|
|
405
|
-
|
|
370
|
+
"use strict";
|
|
406
371
|
|
|
407
|
-
/***/ }),
|
|
408
372
|
|
|
409
|
-
|
|
410
|
-
/***/ (function(module, exports) {
|
|
373
|
+
var _slicedToArray = __webpack_require__(52);
|
|
411
374
|
|
|
412
|
-
|
|
375
|
+
var _defineProperty = __webpack_require__(7);
|
|
413
376
|
|
|
414
|
-
|
|
377
|
+
var _taggedTemplateLiteral = __webpack_require__(81);
|
|
415
378
|
|
|
416
|
-
|
|
417
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
379
|
+
var _templateObject, _templateObject2;
|
|
418
380
|
|
|
419
|
-
|
|
381
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
382
|
+
var t = {};
|
|
420
383
|
|
|
384
|
+
for (var p in s) {
|
|
385
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
389
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
390
|
+
}
|
|
391
|
+
return t;
|
|
392
|
+
};
|
|
421
393
|
|
|
422
394
|
Object.defineProperty(exports, "__esModule", {
|
|
423
395
|
value: true
|
|
424
396
|
});
|
|
425
|
-
exports.
|
|
397
|
+
exports.MINIMUM_COLUMN_SIZE = void 0;
|
|
398
|
+
|
|
399
|
+
var React = __webpack_require__(1);
|
|
400
|
+
|
|
401
|
+
var T = __webpack_require__(0);
|
|
426
402
|
|
|
427
403
|
var lodash_1 = __webpack_require__(2);
|
|
428
404
|
|
|
429
|
-
var
|
|
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);
|
|
405
|
+
var styled_components_1 = __webpack_require__(4);
|
|
436
406
|
|
|
437
|
-
|
|
438
|
-
accum[k] = nestedSchema;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
407
|
+
var i18n_1 = __webpack_require__(3);
|
|
441
408
|
|
|
442
|
-
|
|
443
|
-
}, {});
|
|
444
|
-
};
|
|
409
|
+
var Table_1 = __webpack_require__(90);
|
|
445
410
|
|
|
446
|
-
|
|
411
|
+
var Paginator_1 = __webpack_require__(268);
|
|
447
412
|
|
|
448
|
-
|
|
413
|
+
var Message_1 = __webpack_require__(269);
|
|
449
414
|
|
|
450
|
-
|
|
451
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
415
|
+
var colorUtils_1 = __webpack_require__(13);
|
|
452
416
|
|
|
453
|
-
|
|
417
|
+
var style_1 = __webpack_require__(15);
|
|
454
418
|
|
|
419
|
+
var pick_1 = __webpack_require__(20);
|
|
455
420
|
|
|
456
|
-
|
|
457
|
-
value: true
|
|
458
|
-
});
|
|
459
|
-
exports.shouldShowIconPlaceholder = void 0;
|
|
421
|
+
var variables_1 = __webpack_require__(10);
|
|
460
422
|
|
|
461
|
-
var
|
|
423
|
+
var hooks_1 = __webpack_require__(270);
|
|
462
424
|
|
|
463
|
-
var
|
|
425
|
+
var consts_1 = __webpack_require__(112);
|
|
464
426
|
|
|
465
|
-
var
|
|
427
|
+
var cells_1 = __webpack_require__(271);
|
|
466
428
|
|
|
467
|
-
var
|
|
429
|
+
var getPagination_1 = __webpack_require__(28);
|
|
468
430
|
|
|
469
|
-
var
|
|
431
|
+
var getSorting_1 = __webpack_require__(27);
|
|
470
432
|
|
|
471
|
-
var FixedSizeContainer_1 = __webpack_require__(
|
|
472
|
-
/**
|
|
473
|
-
* @method shouldShowIconPlaceholder
|
|
474
|
-
* @param {object} dataSources
|
|
475
|
-
* @param {boolean} loading
|
|
476
|
-
* @returns {boolean}
|
|
477
|
-
*/
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
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
|
-
};
|
|
433
|
+
var FixedSizeContainer_1 = __webpack_require__(14);
|
|
488
434
|
|
|
489
|
-
|
|
490
|
-
|
|
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
|
-
*/
|
|
435
|
+
var utils_1 = __webpack_require__(276); // debounce was imported this way due to typing
|
|
436
|
+
// eslint-disable-next-line import/order
|
|
503
437
|
|
|
504
|
-
var IconPlaceholder = function IconPlaceholder(props) {
|
|
505
|
-
var width = props.width,
|
|
506
|
-
height = props.height,
|
|
507
|
-
icon = props.icon,
|
|
508
|
-
iconColor = props.iconColor;
|
|
509
438
|
|
|
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
|
-
}
|
|
439
|
+
var debounce = __webpack_require__(277);
|
|
524
440
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
441
|
+
exports.MINIMUM_COLUMN_SIZE = 30;
|
|
442
|
+
var NonVisibleTableHead = styled_components_1.default(Table_1.default.Head).withConfig({
|
|
443
|
+
displayName: "PureTable__NonVisibleTableHead",
|
|
444
|
+
componentId: "tovzjg-0"
|
|
445
|
+
})(["display:none;"]);
|
|
446
|
+
var FixedTableHead = styled_components_1.default(Table_1.default.Head).withConfig({
|
|
447
|
+
displayName: "PureTable__FixedTableHead",
|
|
448
|
+
componentId: "tovzjg-1"
|
|
449
|
+
})(["position:sticky;top:0;"]);
|
|
450
|
+
var VizTableContainer = styled_components_1.default.div.withConfig({
|
|
451
|
+
displayName: "PureTable__VizTableContainer",
|
|
452
|
+
componentId: "tovzjg-2"
|
|
453
|
+
})(["box-sizing:border-box;padding:", ";background-color:", ";display:flex;flex-flow:column nowrap;overflow:hidden;"], pick_1.default({
|
|
454
|
+
enterprise: variables_1.default.spacingHalf,
|
|
455
|
+
prisma: variables_1.default.spacingSmall
|
|
456
|
+
}), function (props) {
|
|
457
|
+
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
458
|
+
});
|
|
459
|
+
VizTableContainer.displayName = 'VizTableContainer';
|
|
460
|
+
var PAGINATOR_CONTAINER_HEIGHT = 38;
|
|
461
|
+
var PAGINATOR_SPACING = 5;
|
|
462
|
+
var SUITableContainer = styled_components_1.default.div.withConfig({
|
|
463
|
+
displayName: "PureTable__SUITableContainer",
|
|
464
|
+
componentId: "tovzjg-3"
|
|
465
|
+
})(["& *{font-family:", ";font-size:", ";line-height:", ";}box-sizing:border-box;flex-grow:1;overflow:hidden;", ";", ";", " ", " & [data-fixed-column='true']{table-layout:", ";width:", ";}"], function (props) {
|
|
466
|
+
return props.font;
|
|
467
|
+
}, function (props) {
|
|
468
|
+
return props.fontSize;
|
|
469
|
+
}, function (props) {
|
|
470
|
+
return props.lineHeight;
|
|
471
|
+
}, function (_ref) {
|
|
472
|
+
var width = _ref.width,
|
|
473
|
+
height = _ref.height,
|
|
474
|
+
isPaging = _ref.isPaging,
|
|
475
|
+
theme = _ref.theme;
|
|
476
|
+
var padding = pick_1.default({
|
|
477
|
+
enterprise: variables_1.default.spacingHalf({
|
|
478
|
+
theme: theme
|
|
479
|
+
}),
|
|
480
|
+
prisma: variables_1.default.spacingSmall({
|
|
481
|
+
theme: theme
|
|
482
|
+
})
|
|
483
|
+
})({
|
|
484
|
+
theme: theme
|
|
530
485
|
});
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
value: true
|
|
486
|
+
var paddingOffset = parseInt(padding, 10) * 2;
|
|
487
|
+
return style_1.toDimension({
|
|
488
|
+
width: width - paddingOffset,
|
|
489
|
+
height: isPaging ? height - PAGINATOR_CONTAINER_HEIGHT - PAGINATOR_SPACING - paddingOffset : height - paddingOffset
|
|
490
|
+
});
|
|
491
|
+
}, function (_ref2) {
|
|
492
|
+
var isPaging = _ref2.isPaging;
|
|
493
|
+
return isPaging && "\n margin-bottom: ".concat(PAGINATOR_SPACING, "px;\n ");
|
|
494
|
+
}, function (_ref3) {
|
|
495
|
+
var headerStyle = _ref3.headerStyle;
|
|
496
|
+
return headerStyle && headerStyle.backgroundColor && styled_components_1.css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & [data-test='head-cell'] {\n background-color: ", ";\n }\n "])), headerStyle.backgroundColor);
|
|
497
|
+
}, function (_ref4) {
|
|
498
|
+
var headerStyle = _ref4.headerStyle;
|
|
499
|
+
return headerStyle && headerStyle.color && styled_components_1.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n & [data-test='head-cell'] > div > span {\n color: ", ";\n }\n "])), headerStyle.color);
|
|
500
|
+
}, function (_ref5) {
|
|
501
|
+
var widthSet = _ref5.widthSet;
|
|
502
|
+
return widthSet ? 'fixed' : 'auto';
|
|
503
|
+
}, function (_ref6) {
|
|
504
|
+
var widthSet = _ref6.widthSet;
|
|
505
|
+
return widthSet ? '0' : '100%';
|
|
552
506
|
});
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
507
|
+
SUITableContainer.displayName = 'SUITableContainer';
|
|
508
|
+
var PaginatorContainer = styled_components_1.default.div.withConfig({
|
|
509
|
+
displayName: "PureTable__PaginatorContainer",
|
|
510
|
+
componentId: "tovzjg-4"
|
|
511
|
+
})(["position:relative;text-align:right;height:", "px;"], PAGINATOR_CONTAINER_HEIGHT);
|
|
512
|
+
PaginatorContainer.displayName = 'PaginatorContainer'; // allow for early return in case of empty tableBody while still following hook rules
|
|
556
513
|
|
|
557
|
-
var
|
|
514
|
+
var withEmptyTableMessage = function withEmptyTableMessage(Viz) {
|
|
515
|
+
// TODO(fkurniawan): add omit type to differentiate WrapperProps from PureTableProps
|
|
516
|
+
var Wrapper = function Wrapper(props) {
|
|
517
|
+
var headers = props.headers,
|
|
518
|
+
table = props.table,
|
|
519
|
+
headerVisibility = props.headerVisibility,
|
|
520
|
+
showRowNumbers = props.showRowNumbers,
|
|
521
|
+
showInternalFields = props.showInternalFields,
|
|
522
|
+
tableFormat = props.tableFormat,
|
|
523
|
+
columnFormat = props.columnFormat;
|
|
558
524
|
|
|
559
|
-
var
|
|
525
|
+
var _hooks_1$useTable = hooks_1.useTable({
|
|
526
|
+
headers: headers,
|
|
527
|
+
table: table,
|
|
528
|
+
headerVisibility: headerVisibility,
|
|
529
|
+
showRowNumbers: showRowNumbers,
|
|
530
|
+
showInternalFields: showInternalFields,
|
|
531
|
+
tableFormat: Object.assign(Object.assign(Object.assign(Object.assign({}, tableFormat), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.align) && {
|
|
532
|
+
align: lodash_1.cloneDeep(tableFormat.align)
|
|
533
|
+
}), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.cellTypes) && {
|
|
534
|
+
cellTypes: lodash_1.cloneDeep(tableFormat.cellTypes)
|
|
535
|
+
}), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.data) && {
|
|
536
|
+
data: lodash_1.cloneDeep(tableFormat.data)
|
|
537
|
+
}),
|
|
538
|
+
columnFormat: columnFormat
|
|
539
|
+
}),
|
|
540
|
+
tableHeader = _hooks_1$useTable.tableHeader,
|
|
541
|
+
tableBody = _hooks_1$useTable.tableBody;
|
|
560
542
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
}
|
|
543
|
+
if (tableBody.rows.length === 0) {
|
|
544
|
+
return React.createElement(Message_1.default, {
|
|
545
|
+
type: "warning"
|
|
546
|
+
}, i18n_1._('No data!'));
|
|
547
|
+
}
|
|
566
548
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
var currentSortDir;
|
|
572
|
-
var nextSortDirMap = {
|
|
573
|
-
asc: 'desc',
|
|
574
|
-
desc: 'asc',
|
|
575
|
-
none: 'asc'
|
|
549
|
+
return React.createElement(Viz, Object.assign({}, props, {
|
|
550
|
+
tableHeader: tableHeader,
|
|
551
|
+
tableBody: tableBody
|
|
552
|
+
}));
|
|
576
553
|
};
|
|
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
554
|
|
|
555
|
+
Wrapper.displayName = 'PureTableWrapper';
|
|
556
|
+
return Wrapper;
|
|
557
|
+
};
|
|
585
558
|
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
559
|
+
var useTableHead = function useTableHead(visibility) {
|
|
560
|
+
if (visibility === 'none') {
|
|
561
|
+
return NonVisibleTableHead;
|
|
562
|
+
}
|
|
589
563
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
|
|
593
|
-
offset: 0,
|
|
594
|
-
sort: _defineProperty({}, sortKey, nextSortDir)
|
|
595
|
-
}));
|
|
596
|
-
} else {
|
|
597
|
-
onRequestParamsChange(requestParams);
|
|
598
|
-
}
|
|
599
|
-
};
|
|
564
|
+
if (visibility === 'fixed') {
|
|
565
|
+
return FixedTableHead;
|
|
600
566
|
}
|
|
601
567
|
|
|
602
|
-
return
|
|
603
|
-
currentSortKey: currentSortKey,
|
|
604
|
-
currentSortDir: currentSortDir,
|
|
605
|
-
onSort: onSort
|
|
606
|
-
};
|
|
568
|
+
return Table_1.default.Head;
|
|
607
569
|
};
|
|
608
570
|
|
|
609
|
-
|
|
571
|
+
var HeadCell = function HeadCell(_a) {
|
|
572
|
+
var setTempColumnWidth = _a.setTempColumnWidth,
|
|
573
|
+
setRemainingWidth = _a.setRemainingWidth,
|
|
574
|
+
value = _a.value,
|
|
575
|
+
widthSet = _a.widthSet,
|
|
576
|
+
headerVisibility = _a.headerVisibility,
|
|
577
|
+
props = __rest(_a, ["setTempColumnWidth", "setRemainingWidth", "value", "widthSet", "headerVisibility"]);
|
|
610
578
|
|
|
611
|
-
|
|
579
|
+
var cellRef = React.useRef(null);
|
|
580
|
+
React.useEffect(function () {
|
|
581
|
+
if (!widthSet && cellRef.current && cellRef.current.clientWidth >= 0 && headerVisibility !== 'none') {
|
|
582
|
+
setTempColumnWidth(function (columnWidth) {
|
|
583
|
+
return Object.assign(Object.assign({}, columnWidth), _defineProperty({}, value, {
|
|
584
|
+
width: cellRef.current.clientWidth
|
|
585
|
+
}));
|
|
586
|
+
});
|
|
587
|
+
setRemainingWidth(function (prevWidth) {
|
|
588
|
+
return prevWidth + Math.max(props.width ? cellRef.current.clientWidth - props.width : 0, 0);
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
return React.createElement(Table_1.default.HeadCell, Object.assign({
|
|
593
|
+
elementRef: cellRef
|
|
594
|
+
}, props), value);
|
|
595
|
+
};
|
|
612
596
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
if (k2 === undefined) k2 = k;
|
|
629
|
-
o[k2] = m[k];
|
|
630
|
-
});
|
|
631
|
-
|
|
632
|
-
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
633
|
-
for (var p in m) {
|
|
634
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
635
|
-
}
|
|
597
|
+
var fontMap = {
|
|
598
|
+
proportional: 'Splunk Platform Sans',
|
|
599
|
+
monospace: 'Splunk Platform Mono'
|
|
600
|
+
};
|
|
601
|
+
var fontSizeMap = {
|
|
602
|
+
extraSmall: '10px',
|
|
603
|
+
small: '12px',
|
|
604
|
+
default: '14px',
|
|
605
|
+
large: '16px'
|
|
606
|
+
};
|
|
607
|
+
var rowHeightMap = {
|
|
608
|
+
extraSmall: '12px',
|
|
609
|
+
small: '12px',
|
|
610
|
+
default: '20px',
|
|
611
|
+
large: '24px'
|
|
636
612
|
};
|
|
637
613
|
|
|
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
|
|
644
|
-
|
|
645
|
-
__exportStar(__webpack_require__(137), exports);
|
|
646
|
-
|
|
647
|
-
var Table_1 = __webpack_require__(137);
|
|
614
|
+
var PureTable = function PureTable(props) {
|
|
615
|
+
var _a;
|
|
648
616
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
617
|
+
var count = props.count,
|
|
618
|
+
width = props.width,
|
|
619
|
+
height = props.height,
|
|
620
|
+
backgroundColor = props.backgroundColor,
|
|
621
|
+
tableHeader = props.tableHeader,
|
|
622
|
+
tableBody = props.tableBody,
|
|
623
|
+
showRowNumbers = props.showRowNumbers,
|
|
624
|
+
_props$sortParams = props.sortParams,
|
|
625
|
+
currentSortKey = _props$sortParams.currentSortKey,
|
|
626
|
+
currentSortDir = _props$sortParams.currentSortDir,
|
|
627
|
+
onSort = _props$sortParams.onSort,
|
|
628
|
+
_b = props.paginatorParams,
|
|
629
|
+
isPaging = _b.isPaging,
|
|
630
|
+
paginatorOnChange = _b.onChange,
|
|
631
|
+
paginatorProps = __rest(_b, ["isPaging", "onChange"]),
|
|
632
|
+
onCellClick = props.onCellClick,
|
|
633
|
+
onColumnFormatChange = props.onColumnFormatChange,
|
|
634
|
+
columnFormat = props.columnFormat,
|
|
635
|
+
mode = props.mode,
|
|
636
|
+
headerVisibility = props.headerVisibility,
|
|
637
|
+
font = props.font,
|
|
638
|
+
fontSize = props.fontSize;
|
|
655
639
|
|
|
656
|
-
|
|
640
|
+
var _React$useState = React.useState(columnFormat),
|
|
641
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
642
|
+
columns = _React$useState2[0],
|
|
643
|
+
setColumns = _React$useState2[1];
|
|
657
644
|
|
|
658
|
-
|
|
659
|
-
|
|
645
|
+
var _React$useState3 = React.useState(columnFormat),
|
|
646
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
647
|
+
tempColumns = _React$useState4[0],
|
|
648
|
+
setTempColumns = _React$useState4[1];
|
|
660
649
|
|
|
661
|
-
|
|
650
|
+
var _React$useState5 = React.useState(0),
|
|
651
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
652
|
+
remainingWidth = _React$useState6[0],
|
|
653
|
+
setRemainingWidth = _React$useState6[1];
|
|
662
654
|
|
|
655
|
+
var numColumnsWithoutWidth = Object.keys(tempColumns).reduce(function (acc, key) {
|
|
656
|
+
var _a;
|
|
663
657
|
|
|
664
|
-
|
|
658
|
+
if ((_a = columns[key]) === null || _a === void 0 ? void 0 : _a.width) {
|
|
659
|
+
return acc;
|
|
660
|
+
}
|
|
665
661
|
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
662
|
+
return acc + 1;
|
|
663
|
+
}, 0);
|
|
664
|
+
var containerRef = React.useRef(null);
|
|
665
|
+
var containerRefInner = React.useRef(null);
|
|
666
|
+
var containerRefInnerWidth = (_a = containerRefInner === null || containerRefInner === void 0 ? void 0 : containerRefInner.current) === null || _a === void 0 ? void 0 : _a.clientWidth;
|
|
667
|
+
var widthRef = React.useRef(0);
|
|
668
|
+
var widthSet = tableHeader.cells.length === tableHeader.cells.filter(function (_ref7) {
|
|
669
|
+
var value = _ref7.value,
|
|
670
|
+
showCell = _ref7.showCell;
|
|
669
671
|
|
|
670
|
-
var
|
|
672
|
+
var _a, _b;
|
|
671
673
|
|
|
672
|
-
|
|
674
|
+
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;
|
|
675
|
+
}).length;
|
|
676
|
+
React.useEffect(function () {
|
|
677
|
+
if (containerRef.current && containerRef.current.clientWidth !== widthRef.current) {
|
|
678
|
+
widthRef.current = containerRef.current.clientWidth;
|
|
679
|
+
recalculateTempColumnWidths();
|
|
680
|
+
}
|
|
681
|
+
});
|
|
682
|
+
var firstRenderCount = React.useRef(count);
|
|
683
|
+
React.useEffect(function () {
|
|
684
|
+
if (firstRenderCount.current !== count) {
|
|
685
|
+
firstRenderCount.current = count;
|
|
686
|
+
paginatorOnChange(null, {
|
|
687
|
+
count: count
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
}, [count, paginatorProps]);
|
|
691
|
+
var stringifiedColumnFormat = JSON.stringify(columnFormat);
|
|
692
|
+
var columnFormatRef = React.useRef(stringifiedColumnFormat);
|
|
693
|
+
var modeRef = React.useRef(mode);
|
|
694
|
+
React.useEffect(function () {
|
|
695
|
+
if (modeRef.current !== mode || columnFormatRef.current !== stringifiedColumnFormat) {
|
|
696
|
+
columnFormatRef.current = stringifiedColumnFormat;
|
|
697
|
+
modeRef.current = mode;
|
|
698
|
+
setColumns(columnFormat);
|
|
699
|
+
}
|
|
700
|
+
}, [mode, stringifiedColumnFormat]);
|
|
701
|
+
var TableHead = useTableHead(headerVisibility);
|
|
702
|
+
var debouncedDrilldown = debounce(function (e, payload) {
|
|
703
|
+
if (window.getSelection().toString() === '') {
|
|
704
|
+
if (lodash_1.isFunction(onCellClick)) {
|
|
705
|
+
onCellClick({
|
|
706
|
+
e: e,
|
|
707
|
+
payload: payload
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}, 200);
|
|
712
|
+
var drilldownHandler = React.useCallback(function (e) {
|
|
713
|
+
var element = e.target;
|
|
714
|
+
var row = element.getAttribute('data-row-index');
|
|
715
|
+
var col = element.getAttribute('data-col-index');
|
|
716
|
+
var arrayIndex = element.getAttribute('data-array-index') || -1;
|
|
673
717
|
|
|
674
|
-
|
|
718
|
+
if (row && col) {
|
|
719
|
+
var cellRefIndex = +col;
|
|
720
|
+
var cellIndex = cellRefIndex;
|
|
721
|
+
var rowIndex = +row;
|
|
722
|
+
var fieldValue = tableHeader.cells[cellRefIndex].value;
|
|
723
|
+
var cellValue = tableBody.rows[rowIndex].cells[cellRefIndex].value;
|
|
724
|
+
var cellRawValue = tableBody.rows[rowIndex].cells[cellRefIndex].value;
|
|
725
|
+
var value = arrayIndex === -1 ? cellValue : cellRawValue[+arrayIndex]; // Wish we did not have these if statements for
|
|
726
|
+
// showRowNumbers
|
|
675
727
|
|
|
676
|
-
|
|
728
|
+
if (showRowNumbers === true) {
|
|
729
|
+
if (cellIndex === 0) {
|
|
730
|
+
// no click event for row numbers
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
677
733
|
|
|
678
|
-
|
|
734
|
+
cellIndex -= 1;
|
|
735
|
+
}
|
|
679
736
|
|
|
680
|
-
var
|
|
737
|
+
var payload = {
|
|
738
|
+
cellIndex: cellIndex,
|
|
739
|
+
rowIndex: rowIndex,
|
|
740
|
+
fieldValue: fieldValue,
|
|
741
|
+
cellValue: cellValue,
|
|
742
|
+
cellRawValue: cellRawValue,
|
|
743
|
+
value: value,
|
|
744
|
+
name: fieldValue
|
|
745
|
+
};
|
|
746
|
+
tableBody.rows[rowIndex].cells.forEach(function (c, index) {
|
|
747
|
+
var rowToken = "row.".concat(tableHeader.cells[index].value, ".value");
|
|
748
|
+
payload[rowToken] = c.value;
|
|
749
|
+
});
|
|
750
|
+
debouncedDrilldown(e.nativeEvent, payload);
|
|
751
|
+
}
|
|
752
|
+
}, [onCellClick, showRowNumbers, tableHeader, tableBody]);
|
|
753
|
+
var debouncedOnColumnFormatChange = React.useMemo(function () {
|
|
754
|
+
return debounce(function (newFormat) {
|
|
755
|
+
onColumnFormatChange(newFormat);
|
|
756
|
+
}, 300);
|
|
757
|
+
}, [onColumnFormatChange]);
|
|
681
758
|
|
|
682
|
-
var
|
|
759
|
+
var handleResizeColumn = function handleResizeColumn(_event, payload) {
|
|
760
|
+
var updatedCF = columns;
|
|
761
|
+
var field = payload.columnId;
|
|
762
|
+
var lastShowingTableHeaderWidth = utils_1.getLastColumnWidth(containerRefInnerWidth, lastShowingTableHeadersID, columns, tempColumns, firstShowingTableHeadersID);
|
|
763
|
+
updatedCF[lastShowingTableHeadersID] = Object.assign(Object.assign({}, updatedCF[lastShowingTableHeadersID]), {
|
|
764
|
+
width: Math.max(lastShowingTableHeaderWidth, exports.MINIMUM_COLUMN_SIZE)
|
|
765
|
+
});
|
|
766
|
+
updatedCF[field] = Object.assign(Object.assign({}, updatedCF[field]), {
|
|
767
|
+
width: Math.max(payload.width, exports.MINIMUM_COLUMN_SIZE)
|
|
768
|
+
});
|
|
769
|
+
setColumns(Object.assign({}, updatedCF)); // Updates column json in edit mode
|
|
683
770
|
|
|
684
|
-
|
|
771
|
+
if (mode === 'edit') {
|
|
772
|
+
debouncedOnColumnFormatChange(updatedCF);
|
|
773
|
+
}
|
|
774
|
+
};
|
|
685
775
|
|
|
686
|
-
var
|
|
776
|
+
var handleEventClick = function handleEventClick(e) {
|
|
777
|
+
e.stopPropagation();
|
|
778
|
+
};
|
|
687
779
|
|
|
688
|
-
var
|
|
780
|
+
var recalculateTempColumnWidths = function recalculateTempColumnWidths() {
|
|
781
|
+
setTempColumns({});
|
|
782
|
+
setRemainingWidth(0);
|
|
783
|
+
};
|
|
689
784
|
|
|
690
|
-
var
|
|
785
|
+
var withColumnResizing = function withColumnResizing(func) {
|
|
786
|
+
return function (e, additionalParams) {
|
|
787
|
+
recalculateTempColumnWidths();
|
|
788
|
+
func(e, additionalParams);
|
|
789
|
+
};
|
|
790
|
+
};
|
|
691
791
|
|
|
692
|
-
var
|
|
792
|
+
var fontMapped = fontMap[font] || fontMap.proportional;
|
|
793
|
+
var fontSizeMapped = fontSizeMap[fontSize] || fontSizeMap.default;
|
|
794
|
+
var rowHeightMapped = rowHeightMap[fontSize] || rowHeightMap.default;
|
|
795
|
+
var firstShowingTableHeadersID = tableHeader.cells.filter(function (c) {
|
|
796
|
+
return c.showCell;
|
|
797
|
+
}).map(function (c) {
|
|
798
|
+
return c.value;
|
|
799
|
+
})[0];
|
|
800
|
+
var lastShowingTableHeadersID = tableHeader.cells.filter(function (c) {
|
|
801
|
+
return c.showCell;
|
|
802
|
+
}).map(function (c) {
|
|
803
|
+
return c.value;
|
|
804
|
+
}).reverse()[0];
|
|
805
|
+
return React.createElement(VizTableContainer, {
|
|
806
|
+
backgroundColor: backgroundColor,
|
|
807
|
+
ref: containerRef
|
|
808
|
+
}, React.createElement(SUITableContainer, {
|
|
809
|
+
ref: containerRefInner,
|
|
810
|
+
width: width,
|
|
811
|
+
height: height,
|
|
812
|
+
isPaging: isPaging,
|
|
813
|
+
headerStyle: tableHeader.style,
|
|
814
|
+
widthSet: widthSet,
|
|
815
|
+
font: fontMapped,
|
|
816
|
+
fontSize: fontSizeMapped,
|
|
817
|
+
lineHeight: rowHeightMapped
|
|
818
|
+
}, React.createElement(Table_1.default, {
|
|
819
|
+
headType: headerVisibility !== 'none' ? 'inline' : undefined,
|
|
820
|
+
innerStyle: {
|
|
821
|
+
height: '100%'
|
|
822
|
+
},
|
|
823
|
+
outerStyle: {
|
|
824
|
+
height: '100%',
|
|
825
|
+
cursor: onCellClick ? 'pointer' : 'unset'
|
|
826
|
+
},
|
|
827
|
+
onClick: onCellClick ? drilldownHandler : lodash_1.noop,
|
|
828
|
+
onRequestResizeColumn: handleResizeColumn
|
|
829
|
+
}, React.createElement(TableHead, null, tableHeader.cells.filter(function (c) {
|
|
830
|
+
return c.showCell;
|
|
831
|
+
}).map(function (_a) {
|
|
832
|
+
var key = _a.key,
|
|
833
|
+
value = _a.value,
|
|
834
|
+
sortKey = _a.sortKey,
|
|
835
|
+
rest = __rest(_a, ["key", "value", "sortKey"]);
|
|
693
836
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
837
|
+
return React.createElement(HeadCell, Object.assign({
|
|
838
|
+
key: key,
|
|
839
|
+
columnId: value,
|
|
840
|
+
sortDir: sortKey === currentSortKey ? currentSortDir : 'none',
|
|
841
|
+
width: value === lastShowingTableHeadersID ? utils_1.getLastColumnWidth(containerRefInnerWidth, lastShowingTableHeadersID, columns, tempColumns, firstShowingTableHeadersID) : utils_1.getColumnWidth({
|
|
842
|
+
columns: columns,
|
|
843
|
+
tempColumns: tempColumns,
|
|
844
|
+
columnName: value,
|
|
845
|
+
remainingWidth: remainingWidth,
|
|
846
|
+
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
847
|
+
}),
|
|
848
|
+
onMouseDown: handleEventClick,
|
|
849
|
+
value: value,
|
|
850
|
+
setTempColumnWidth: setTempColumns,
|
|
851
|
+
widthSet: widthSet,
|
|
852
|
+
onSort: withColumnResizing(onSort),
|
|
853
|
+
headerVisibility: headerVisibility,
|
|
854
|
+
setRemainingWidth: setRemainingWidth
|
|
855
|
+
}, Object.assign({
|
|
856
|
+
sortKey: sortKey
|
|
857
|
+
}, rest)));
|
|
858
|
+
})), React.createElement(Table_1.default.Body, null, tableBody.rows.map(function (row) {
|
|
859
|
+
return React.createElement(Table_1.default.Row, {
|
|
860
|
+
key: row.key
|
|
861
|
+
}, row.cells.filter(function (c) {
|
|
862
|
+
return c.showCell;
|
|
863
|
+
}).map(function (cell) {
|
|
864
|
+
return React.createElement(cells_1.SwitchTableCell, {
|
|
865
|
+
key: cell.key,
|
|
866
|
+
type: cell.cellType
|
|
867
|
+
}, React.createElement(cells_1.TextCell, {
|
|
868
|
+
cell: cell,
|
|
869
|
+
useMouseOverEffect: !!onCellClick,
|
|
870
|
+
width: cell.header === lastShowingTableHeadersID ? utils_1.getLastColumnWidth(containerRefInnerWidth, lastShowingTableHeadersID, columns, tempColumns, firstShowingTableHeadersID) : utils_1.getColumnWidth({
|
|
871
|
+
columns: columns,
|
|
872
|
+
tempColumns: tempColumns,
|
|
873
|
+
columnName: cell.header,
|
|
874
|
+
remainingWidth: remainingWidth,
|
|
875
|
+
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
876
|
+
})
|
|
877
|
+
}), React.createElement(cells_1.SparklineCell, {
|
|
878
|
+
cell: cell,
|
|
879
|
+
useMouseOverEffect: !!onCellClick,
|
|
880
|
+
width: cell.header === lastShowingTableHeadersID ? utils_1.getLastColumnWidth(containerRefInnerWidth, lastShowingTableHeadersID, columns, tempColumns, firstShowingTableHeadersID) : utils_1.getColumnWidth({
|
|
881
|
+
columns: columns,
|
|
882
|
+
tempColumns: tempColumns,
|
|
883
|
+
columnName: cell.header,
|
|
884
|
+
remainingWidth: remainingWidth,
|
|
885
|
+
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
886
|
+
})
|
|
887
|
+
}), React.createElement(cells_1.ArrayCell, {
|
|
888
|
+
cell: cell,
|
|
889
|
+
useMouseOverEffect: !!onCellClick,
|
|
890
|
+
width: cell.header === lastShowingTableHeadersID ? utils_1.getLastColumnWidth(containerRefInnerWidth, lastShowingTableHeadersID, columns, tempColumns, firstShowingTableHeadersID) : utils_1.getColumnWidth({
|
|
891
|
+
columns: columns,
|
|
892
|
+
tempColumns: tempColumns,
|
|
893
|
+
columnName: cell.header,
|
|
894
|
+
remainingWidth: remainingWidth,
|
|
895
|
+
numColumnsWithoutWidth: numColumnsWithoutWidth
|
|
896
|
+
})
|
|
897
|
+
}));
|
|
898
|
+
}));
|
|
899
|
+
})))), isPaging ? React.createElement(PaginatorContainer, null, React.createElement(Paginator_1.default, Object.assign({
|
|
900
|
+
onChange: withColumnResizing(paginatorOnChange)
|
|
901
|
+
}, paginatorProps))) : null);
|
|
710
902
|
};
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
903
|
+
|
|
904
|
+
var cellDataType = T.oneOfType([T.string, T.number, T.arrayOf(T.oneOfType([T.string, T.number]))]);
|
|
905
|
+
PureTable.propTypes = {
|
|
906
|
+
backgroundColor: T.string,
|
|
907
|
+
count: T.number,
|
|
908
|
+
columnFormat: T.objectOf(T.shape({
|
|
909
|
+
align: T.arrayOf(T.oneOf(consts_1.validAlignments)),
|
|
910
|
+
cellTypes: T.arrayOf(T.oneOf(consts_1.validCellRenderers)),
|
|
911
|
+
data: T.arrayOf(cellDataType),
|
|
912
|
+
rowBackgroundColors: T.arrayOf(T.string),
|
|
913
|
+
rowColors: T.arrayOf(T.string),
|
|
914
|
+
sparklineAreaColors: T.arrayOf(T.string),
|
|
915
|
+
sparklineColors: T.arrayOf(T.string),
|
|
916
|
+
sparklineTypes: T.arrayOf(T.oneOf(consts_1.validSparklineTypes))
|
|
917
|
+
})),
|
|
918
|
+
headers: T.arrayOf(T.string),
|
|
919
|
+
headerVisibility: T.oneOf(consts_1.validHeaderVisibilities),
|
|
920
|
+
height: T.oneOfType([T.number]),
|
|
921
|
+
mode: T.string,
|
|
922
|
+
onCellClick: T.func,
|
|
923
|
+
paginatorParams: getPagination_1.PaginatorParamsPropTypes,
|
|
924
|
+
showRowNumbers: T.bool,
|
|
925
|
+
sortParams: getSorting_1.SortParamsPropTypes,
|
|
926
|
+
table: T.arrayOf(T.arrayOf(cellDataType)),
|
|
927
|
+
tableFormat: T.shape({
|
|
928
|
+
align: T.arrayOf(T.arrayOf(T.oneOf(consts_1.validAlignments))),
|
|
929
|
+
cellTypes: T.arrayOf(T.arrayOf(T.oneOf(consts_1.validCellRenderers))),
|
|
930
|
+
data: T.arrayOf(T.arrayOf(cellDataType)),
|
|
931
|
+
headerBackgroundColor: T.string,
|
|
932
|
+
headerColor: T.string,
|
|
933
|
+
rowBackgroundColors: T.oneOfType([T.arrayOf(T.string), T.arrayOf(T.arrayOf(T.string))]),
|
|
934
|
+
rowColors: T.oneOfType([T.arrayOf(T.string), T.arrayOf(T.arrayOf(T.string))]),
|
|
935
|
+
sparklineAreaColors: T.arrayOf(T.arrayOf(T.string)),
|
|
936
|
+
sparklineColors: T.arrayOf(T.arrayOf(T.string)),
|
|
937
|
+
sparklineTypes: T.arrayOf(T.arrayOf(T.oneOf(consts_1.validSparklineTypes)))
|
|
938
|
+
}),
|
|
939
|
+
theme: T.any,
|
|
940
|
+
width: T.oneOfType([T.number]),
|
|
941
|
+
onColumnFormatChange: T.func,
|
|
942
|
+
font: T.string,
|
|
943
|
+
fontSize: T.string
|
|
714
944
|
};
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
}, {
|
|
726
|
-
match: 'color',
|
|
727
|
-
value: 'left'
|
|
728
|
-
}, {
|
|
729
|
-
match: 'array',
|
|
730
|
-
value: 'left'
|
|
731
|
-
}, {
|
|
732
|
-
match: 'sparkline',
|
|
733
|
-
value: 'center'
|
|
734
|
-
}, {
|
|
735
|
-
match: 'unknown',
|
|
736
|
-
value: 'left'
|
|
737
|
-
}],
|
|
738
|
-
tableCellTypeByType: [{
|
|
739
|
-
match: 'string',
|
|
740
|
-
value: 'TextCell'
|
|
741
|
-
}, {
|
|
742
|
-
match: 'number',
|
|
743
|
-
value: 'TextCell'
|
|
744
|
-
}, {
|
|
745
|
-
match: 'time',
|
|
746
|
-
value: 'TextCell'
|
|
747
|
-
}, {
|
|
748
|
-
match: 'color',
|
|
749
|
-
value: 'TextCell'
|
|
750
|
-
}, {
|
|
751
|
-
match: 'array',
|
|
752
|
-
value: 'ArrayCell'
|
|
753
|
-
}, {
|
|
754
|
-
match: 'sparkline',
|
|
755
|
-
value: 'SparklineCell'
|
|
756
|
-
}, {
|
|
757
|
-
match: 'unknown',
|
|
758
|
-
value: 'TextCell'
|
|
759
|
-
}],
|
|
760
|
-
// NOTE: These contexts are used by the table background color editor.
|
|
761
|
-
// Please be careful removing/renaming/altering them.
|
|
762
|
-
// There are unit tests and visual test that will capture breakages.
|
|
763
|
-
tableRowColorMaxContrast: {
|
|
764
|
-
colors: ['> themes.textColor', '> themes.inverseTextColor'],
|
|
765
|
-
default: '> themes.textColor'
|
|
766
|
-
},
|
|
767
|
-
tableRowBackgroundColorEvenConfig: {
|
|
768
|
-
channel: 'hsv.v',
|
|
769
|
-
value: '*0.96'
|
|
945
|
+
PureTable.defaultProps = {
|
|
946
|
+
columnFormat: {},
|
|
947
|
+
headers: [],
|
|
948
|
+
headerVisibility: 'inline',
|
|
949
|
+
height: 300,
|
|
950
|
+
mode: 'view',
|
|
951
|
+
onCellClick: null,
|
|
952
|
+
paginatorParams: {
|
|
953
|
+
isPaging: false,
|
|
954
|
+
onChange: lodash_1.noop
|
|
770
955
|
},
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
956
|
+
showRowNumbers: false,
|
|
957
|
+
sortParams: {
|
|
958
|
+
onSort: lodash_1.noop
|
|
774
959
|
},
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
editor: 'editor.select',
|
|
783
|
-
option: 'unitPosition',
|
|
784
|
-
editorProps: {
|
|
785
|
-
values: [{
|
|
786
|
-
label: i18n_1._('Before'),
|
|
787
|
-
value: 'before'
|
|
788
|
-
}, {
|
|
789
|
-
label: i18n_1._('After'),
|
|
790
|
-
value: 'after'
|
|
791
|
-
}]
|
|
792
|
-
}
|
|
793
|
-
};
|
|
794
|
-
var unitLabelConfig = {
|
|
795
|
-
label: i18n_1._('Unit Label'),
|
|
796
|
-
option: 'unit',
|
|
797
|
-
editor: 'editor.text'
|
|
798
|
-
};
|
|
799
|
-
var timeFormattingConfig = {
|
|
800
|
-
label: i18n_1._('Date & Time Formatting'),
|
|
801
|
-
option: 'format',
|
|
802
|
-
editor: 'editor.text',
|
|
803
|
-
editorProps: {
|
|
804
|
-
tooltip: i18n_1._('For example: DD-MM-YYYY')
|
|
805
|
-
}
|
|
960
|
+
table: [],
|
|
961
|
+
tableFormat: {},
|
|
962
|
+
theme: {},
|
|
963
|
+
width: 300,
|
|
964
|
+
onColumnFormatChange: lodash_1.noop,
|
|
965
|
+
font: fontMap.proportional,
|
|
966
|
+
fontSize: fontSizeMap.default
|
|
806
967
|
};
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
value: '#D41F1F'
|
|
810
|
-
}, {
|
|
811
|
-
from: 20,
|
|
812
|
-
to: 40,
|
|
813
|
-
value: '#D94E17'
|
|
814
|
-
}, {
|
|
815
|
-
from: 40,
|
|
816
|
-
to: 60,
|
|
817
|
-
value: '#CBA700'
|
|
818
|
-
}, {
|
|
819
|
-
from: 60,
|
|
820
|
-
to: 80,
|
|
821
|
-
value: '#669922'
|
|
822
|
-
}, {
|
|
823
|
-
from: 80,
|
|
824
|
-
value: '#118832'
|
|
825
|
-
}];
|
|
826
|
-
var matchColorConfig = [{
|
|
827
|
-
match: '',
|
|
828
|
-
value: '#5C33FF'
|
|
829
|
-
}];
|
|
830
|
-
var optionsSchema = {
|
|
831
|
-
backgroundColor: {
|
|
832
|
-
default: '> themes.defaultBackgroundColor',
|
|
833
|
-
description: 'Specify the color for the background. You might use a data source to apply the color. The default for enterprise light is "#FFFFFF". The default for enterprise dark is "#000000". The default for prisma dark is "#0B0C0E".',
|
|
834
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN,
|
|
835
|
-
type: 'string'
|
|
836
|
-
},
|
|
837
|
-
columnFormat: {
|
|
838
|
-
description: 'Allows column formatting for individual columns.',
|
|
839
|
-
type: 'object',
|
|
840
|
-
patternProperties: {
|
|
841
|
-
'.*': {
|
|
842
|
-
description: 'Customization for column property',
|
|
843
|
-
type: 'object',
|
|
844
|
-
properties: {
|
|
845
|
-
align: {
|
|
846
|
-
description: 'Specify the alignment for each cell in a column. Valid alignments include "left", "center", and "right".',
|
|
847
|
-
type: 'array',
|
|
848
|
-
items: {
|
|
849
|
-
type: 'string',
|
|
850
|
-
enum: consts_1.validAlignments.concat()
|
|
851
|
-
}
|
|
852
|
-
},
|
|
853
|
-
cellTypes: {
|
|
854
|
-
description: 'Specify how to render data in cells. Valid cell renders include "TextCell", "ArrayCell", "SparklineCell".',
|
|
855
|
-
type: 'array',
|
|
856
|
-
items: {
|
|
857
|
-
type: 'string',
|
|
858
|
-
enum: consts_1.validCellRenderers.concat()
|
|
859
|
-
}
|
|
860
|
-
},
|
|
861
|
-
data: {
|
|
862
|
-
description: 'Specify data points to be displayed in the cells of a column.',
|
|
863
|
-
type: 'array',
|
|
864
|
-
items: {
|
|
865
|
-
oneOf: [{
|
|
866
|
-
type: 'string'
|
|
867
|
-
}, {
|
|
868
|
-
type: 'number'
|
|
869
|
-
}, {
|
|
870
|
-
type: 'array',
|
|
871
|
-
items: {
|
|
872
|
-
type: ['string', 'number']
|
|
873
|
-
}
|
|
874
|
-
}]
|
|
875
|
-
}
|
|
876
|
-
},
|
|
877
|
-
rowBackgroundColors: {
|
|
878
|
-
description: 'Specify a list of colors, in hexadecimal code, for the background color of each column of the table. For example, ["#2C333B", "32373D"].',
|
|
879
|
-
type: 'array',
|
|
880
|
-
items: {
|
|
881
|
-
type: 'string',
|
|
882
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
883
|
-
}
|
|
884
|
-
},
|
|
885
|
-
rowColors: {
|
|
886
|
-
description: 'Specify a list of colors, in hexadecimal code, for the text color of the cells of a column. For example, ["#2C333B", "32373D"].',
|
|
887
|
-
type: 'array',
|
|
888
|
-
items: {
|
|
889
|
-
type: 'string',
|
|
890
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
891
|
-
}
|
|
892
|
-
},
|
|
893
|
-
sparklineAreaColors: {
|
|
894
|
-
description: 'Specify a list of colors, in hexadecimal code, for the sparkline area of each column. For example, ["#2C333B", "32373D"].',
|
|
895
|
-
type: 'array',
|
|
896
|
-
items: {
|
|
897
|
-
type: 'string',
|
|
898
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
899
|
-
}
|
|
900
|
-
},
|
|
901
|
-
sparklineColors: {
|
|
902
|
-
description: 'Specify a list of colors, in hexadecimal code, for the sparkline stroke of each column. For example, ["#2C333B", "32373D"].',
|
|
903
|
-
type: 'array',
|
|
904
|
-
items: {
|
|
905
|
-
type: 'string',
|
|
906
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
907
|
-
}
|
|
908
|
-
},
|
|
909
|
-
sparklineTypes: {
|
|
910
|
-
description: 'Choose either area or line formatting for the Sparkline. Valid sparkline types include "line" and "area".',
|
|
911
|
-
type: 'array',
|
|
912
|
-
items: {
|
|
913
|
-
type: 'string',
|
|
914
|
-
enum: consts_1.validSparklineTypes.concat()
|
|
915
|
-
}
|
|
916
|
-
},
|
|
917
|
-
textOverflow: {
|
|
918
|
-
description: 'Controls how the text should be truncated within a particular column. Valid types include "anywhere", "break-word", "ellipsis". Defaults width for ellipsis is 100px.',
|
|
919
|
-
type: 'string',
|
|
920
|
-
pattern: schemaUtils_1.getPattern(consts_1.validTextOverflows),
|
|
921
|
-
enum: consts_1.validTextOverflows.concat()
|
|
922
|
-
},
|
|
923
|
-
width: {
|
|
924
|
-
description: 'Controls how wide in pixels (where 1 px = 1/96th of 1 in) the column should be displayed.',
|
|
925
|
-
type: 'number',
|
|
926
|
-
minimum: 30
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
},
|
|
932
|
-
count: {
|
|
933
|
-
description: 'Specify the maximum number of rows to display.',
|
|
934
|
-
type: 'number',
|
|
935
|
-
default: 10
|
|
936
|
-
},
|
|
937
|
-
font: {
|
|
938
|
-
default: 'proportional',
|
|
939
|
-
description: 'Specify the font style to use for table content.',
|
|
940
|
-
type: 'string',
|
|
941
|
-
pattern: schemaUtils_1.getPattern(['proportional', 'monospace'])
|
|
942
|
-
},
|
|
943
|
-
fontSize: {
|
|
944
|
-
default: 'default',
|
|
945
|
-
description: 'Specify the font size to use for table content. Font sizes range from extra small (10px) to large (16px) with the default being 14px.',
|
|
946
|
-
type: 'string',
|
|
947
|
-
pattern: schemaUtils_1.getPattern(consts_1.validFontSizes)
|
|
948
|
-
},
|
|
949
|
-
headers: {
|
|
950
|
-
default: '> table | getField()',
|
|
951
|
-
description: "Specify an array of headers to display on the table. Though these can be statically listed, it's best to use the dynamic default, as it will return the fields of your search.",
|
|
952
|
-
type: 'array',
|
|
953
|
-
items: {
|
|
954
|
-
type: 'string'
|
|
955
|
-
}
|
|
956
|
-
},
|
|
957
|
-
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: {
|
|
1084
|
-
type: 'array',
|
|
1085
|
-
items: {
|
|
1086
|
-
type: 'string',
|
|
1087
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
},
|
|
1091
|
-
sparklineColors: {
|
|
1092
|
-
description: 'Specify a list of colors, in hexadecimal code, for the sparkline stroke of each row of the table. For example, ["#2C333B", "32373D"].',
|
|
1093
|
-
type: 'array',
|
|
1094
|
-
items: {
|
|
1095
|
-
type: 'array',
|
|
1096
|
-
items: {
|
|
1097
|
-
type: 'string',
|
|
1098
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
},
|
|
1102
|
-
sparklineTypes: {
|
|
1103
|
-
description: 'Choose either area or line formatting for the Sparkline.',
|
|
1104
|
-
type: 'array',
|
|
1105
|
-
items: {
|
|
1106
|
-
type: 'array',
|
|
1107
|
-
items: {
|
|
1108
|
-
type: 'string',
|
|
1109
|
-
enum: consts_1.validSparklineTypes.concat()
|
|
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'
|
|
1305
|
-
}
|
|
1306
|
-
},
|
|
1307
|
-
flyoutConfig: {
|
|
1308
|
-
number: [[Object.assign({}, unitPositionConfig), Object.assign({}, unitLabelConfig)], [{
|
|
1309
|
-
label: i18n_1._('Precision'),
|
|
1310
|
-
option: 'precision',
|
|
1311
|
-
editor: 'editor.select',
|
|
1312
|
-
editorProps: {
|
|
1313
|
-
values: configUtils_1.generatePrecisionValues(20)
|
|
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
|
|
1323
|
-
}, {
|
|
1324
|
-
label: i18n_1._('On'),
|
|
1325
|
-
value: true
|
|
1326
|
-
}]
|
|
1327
|
-
}
|
|
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)]]
|
|
1333
|
-
},
|
|
1334
|
-
value: function value(_ref) {
|
|
1335
|
-
var context = _ref.context,
|
|
1336
|
-
options = _ref.options;
|
|
1337
|
-
return {
|
|
1338
|
-
context: context,
|
|
1339
|
-
columnFormat: options.columnFormat,
|
|
1340
|
-
tableFormat: options.tableFormat
|
|
1341
|
-
};
|
|
1342
|
-
}
|
|
1343
|
-
},
|
|
1344
|
-
key: 'TableColumnFormatterEditor'
|
|
1345
|
-
}]]
|
|
1346
|
-
}];
|
|
1347
|
-
/**
|
|
1348
|
-
* visualization configuration
|
|
1349
|
-
*/
|
|
968
|
+
PureTable.displayName = 'VizTable';
|
|
969
|
+
exports.default = withEmptyTableMessage(FixedSizeContainer_1.default(PureTable));
|
|
1350
970
|
|
|
1351
|
-
|
|
1352
|
-
/**
|
|
1353
|
-
* unique viz key
|
|
1354
|
-
*/
|
|
1355
|
-
key: 'splunk.table',
|
|
971
|
+
/***/ }),
|
|
1356
972
|
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
*/
|
|
1360
|
-
name: 'Table',
|
|
1361
|
-
category: VizCategory_1.VizCategory.TABLE,
|
|
973
|
+
/***/ 15:
|
|
974
|
+
/***/ (function(module, exports) {
|
|
1362
975
|
|
|
1363
|
-
|
|
1364
|
-
* viz icon
|
|
1365
|
-
*/
|
|
1366
|
-
icon: visualization_icons_1.Table,
|
|
1367
|
-
placeholderIcon: placeholders_1.Table,
|
|
1368
|
-
dataContract: dataContract,
|
|
1369
|
-
size: size,
|
|
1370
|
-
defaultContext: defaultContext,
|
|
1371
|
-
optionsSchema: optionsSchema,
|
|
1372
|
-
editorConfig: editorConfig,
|
|
1373
|
-
events: {
|
|
1374
|
-
'cell.click': {
|
|
1375
|
-
description: 'triggered when user clicks a table cell'
|
|
1376
|
-
}
|
|
1377
|
-
},
|
|
1378
|
-
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS, VizBehavior_1.VizBehavior.PAGE_AND_SORT, VizBehavior_1.VizBehavior.PLACEHOLDER],
|
|
1379
|
-
themes: themes
|
|
1380
|
-
};
|
|
1381
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
976
|
+
module.exports = require("@splunk/visualizations-shared/style");
|
|
1382
977
|
|
|
1383
978
|
/***/ }),
|
|
1384
979
|
|
|
1385
|
-
/***/
|
|
1386
|
-
/***/ (function(module, exports
|
|
980
|
+
/***/ 16:
|
|
981
|
+
/***/ (function(module, exports) {
|
|
1387
982
|
|
|
1388
|
-
|
|
983
|
+
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
1389
984
|
|
|
985
|
+
/***/ }),
|
|
1390
986
|
|
|
1391
|
-
|
|
987
|
+
/***/ 17:
|
|
988
|
+
/***/ (function(module, exports) {
|
|
1392
989
|
|
|
1393
|
-
|
|
990
|
+
module.exports = require("@babel/runtime/helpers/createClass");
|
|
1394
991
|
|
|
1395
|
-
|
|
992
|
+
/***/ }),
|
|
1396
993
|
|
|
1397
|
-
|
|
994
|
+
/***/ 18:
|
|
995
|
+
/***/ (function(module, exports) {
|
|
1398
996
|
|
|
1399
|
-
|
|
1400
|
-
var t = {};
|
|
997
|
+
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
1401
998
|
|
|
1402
|
-
|
|
1403
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
1404
|
-
}
|
|
999
|
+
/***/ }),
|
|
1405
1000
|
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
}
|
|
1409
|
-
return t;
|
|
1410
|
-
};
|
|
1001
|
+
/***/ 2:
|
|
1002
|
+
/***/ (function(module, exports) {
|
|
1411
1003
|
|
|
1412
|
-
|
|
1413
|
-
value: true
|
|
1414
|
-
});
|
|
1004
|
+
module.exports = require("lodash");
|
|
1415
1005
|
|
|
1416
|
-
|
|
1006
|
+
/***/ }),
|
|
1417
1007
|
|
|
1418
|
-
|
|
1008
|
+
/***/ 20:
|
|
1009
|
+
/***/ (function(module, exports) {
|
|
1419
1010
|
|
|
1420
|
-
|
|
1011
|
+
module.exports = require("@splunk/themes/pick");
|
|
1421
1012
|
|
|
1422
|
-
|
|
1013
|
+
/***/ }),
|
|
1423
1014
|
|
|
1424
|
-
|
|
1015
|
+
/***/ 21:
|
|
1016
|
+
/***/ (function(module, exports) {
|
|
1425
1017
|
|
|
1426
|
-
|
|
1018
|
+
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
1427
1019
|
|
|
1428
|
-
|
|
1020
|
+
/***/ }),
|
|
1429
1021
|
|
|
1430
|
-
|
|
1022
|
+
/***/ 24:
|
|
1023
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1431
1024
|
|
|
1432
|
-
|
|
1025
|
+
"use strict";
|
|
1433
1026
|
|
|
1434
|
-
var style_1 = __webpack_require__(14);
|
|
1435
1027
|
|
|
1436
|
-
|
|
1028
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1029
|
+
value: true
|
|
1030
|
+
});
|
|
1031
|
+
exports.pickFieldFromJSONSchema = void 0;
|
|
1437
1032
|
|
|
1438
|
-
var
|
|
1033
|
+
var lodash_1 = __webpack_require__(2);
|
|
1439
1034
|
|
|
1440
|
-
var
|
|
1035
|
+
var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
|
|
1036
|
+
var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
|
1037
|
+
return Object.keys(optionsSchema).reduce(function (accum, k) {
|
|
1038
|
+
if (lodash_1.has(optionsSchema[k], fieldName)) {
|
|
1039
|
+
accum[k] = optionsSchema[k][fieldName];
|
|
1040
|
+
} else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
|
|
1041
|
+
var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
|
|
1441
1042
|
|
|
1442
|
-
|
|
1043
|
+
if (!lodash_1.isEmpty(nestedSchema)) {
|
|
1044
|
+
accum[k] = nestedSchema;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1443
1047
|
|
|
1444
|
-
|
|
1048
|
+
return accum;
|
|
1049
|
+
}, {});
|
|
1050
|
+
};
|
|
1445
1051
|
|
|
1446
|
-
|
|
1052
|
+
exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
|
|
1447
1053
|
|
|
1448
|
-
|
|
1054
|
+
/***/ }),
|
|
1449
1055
|
|
|
1450
|
-
|
|
1056
|
+
/***/ 25:
|
|
1057
|
+
/***/ (function(module, exports) {
|
|
1451
1058
|
|
|
1452
|
-
|
|
1453
|
-
// eslint-disable-next-line import/order
|
|
1059
|
+
module.exports = require("@babel/runtime/helpers/typeof");
|
|
1454
1060
|
|
|
1061
|
+
/***/ }),
|
|
1455
1062
|
|
|
1456
|
-
|
|
1063
|
+
/***/ 26:
|
|
1064
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1457
1065
|
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
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%';
|
|
1066
|
+
"use strict";
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1070
|
+
value: true
|
|
1523
1071
|
});
|
|
1524
|
-
|
|
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
|
|
1072
|
+
exports.shouldShowIconPlaceholder = void 0;
|
|
1530
1073
|
|
|
1531
|
-
var
|
|
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;
|
|
1074
|
+
var React = __webpack_require__(1);
|
|
1541
1075
|
|
|
1542
|
-
|
|
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;
|
|
1076
|
+
var T = __webpack_require__(0);
|
|
1559
1077
|
|
|
1560
|
-
|
|
1561
|
-
return React.createElement(Message_1.default, {
|
|
1562
|
-
type: "warning"
|
|
1563
|
-
}, i18n_1._('No data!'));
|
|
1564
|
-
}
|
|
1078
|
+
var lodash_1 = __webpack_require__(2);
|
|
1565
1079
|
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
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
|
+
};
|
|
1571
1101
|
|
|
1572
|
-
|
|
1573
|
-
|
|
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
|
|
1574
1110
|
};
|
|
1111
|
+
/**
|
|
1112
|
+
* @method IconPlaceholder
|
|
1113
|
+
* @param {IconPlaceholderProps} props
|
|
1114
|
+
* @returns {React.ReactElement}
|
|
1115
|
+
*/
|
|
1575
1116
|
|
|
1576
|
-
var
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1117
|
+
var IconPlaceholder = function IconPlaceholder(props) {
|
|
1118
|
+
var width = props.width,
|
|
1119
|
+
height = props.height,
|
|
1120
|
+
icon = props.icon,
|
|
1121
|
+
iconColor = props.iconColor;
|
|
1580
1122
|
|
|
1581
|
-
if (
|
|
1582
|
-
return
|
|
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
|
+
});
|
|
1583
1136
|
}
|
|
1584
1137
|
|
|
1585
|
-
return
|
|
1138
|
+
return React.createElement(Message_1.default, {
|
|
1139
|
+
width: width,
|
|
1140
|
+
height: height,
|
|
1141
|
+
level: "warning",
|
|
1142
|
+
message: i18n_1._('No DataSource Connected')
|
|
1143
|
+
});
|
|
1586
1144
|
};
|
|
1587
1145
|
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
props = __rest(_a, ["setTempColumnWidth", "setRemainingWidth", "value", "widthSet", "headerVisibility"]);
|
|
1146
|
+
IconPlaceholder.propTypes = propTypes;
|
|
1147
|
+
IconPlaceholder.defaultProps = {
|
|
1148
|
+
width: '100%',
|
|
1149
|
+
height: 250
|
|
1150
|
+
};
|
|
1151
|
+
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
1595
1152
|
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1153
|
+
/***/ }),
|
|
1154
|
+
|
|
1155
|
+
/***/ 266:
|
|
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];
|
|
1607
1167
|
}
|
|
1608
1168
|
});
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
};
|
|
1169
|
+
} : function (o, m, k, k2) {
|
|
1170
|
+
if (k2 === undefined) k2 = k;
|
|
1171
|
+
o[k2] = m[k];
|
|
1172
|
+
});
|
|
1613
1173
|
|
|
1614
|
-
var
|
|
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'
|
|
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
|
+
}
|
|
1629
1178
|
};
|
|
1630
1179
|
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
tableBody = props.tableBody,
|
|
1638
|
-
showRowNumbers = props.showRowNumbers,
|
|
1639
|
-
_props$sortParams = props.sortParams,
|
|
1640
|
-
currentSortKey = _props$sortParams.currentSortKey,
|
|
1641
|
-
currentSortDir = _props$sortParams.currentSortDir,
|
|
1642
|
-
onSort = _props$sortParams.onSort,
|
|
1643
|
-
_a = props.paginatorParams,
|
|
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;
|
|
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
|
|
1654
1186
|
|
|
1655
|
-
|
|
1656
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1657
|
-
columns = _React$useState2[0],
|
|
1658
|
-
setColumns = _React$useState2[1];
|
|
1187
|
+
__exportStar(__webpack_require__(139), exports);
|
|
1659
1188
|
|
|
1660
|
-
|
|
1661
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
1662
|
-
tempColumns = _React$useState4[0],
|
|
1663
|
-
setTempColumns = _React$useState4[1];
|
|
1189
|
+
var Table_1 = __webpack_require__(139);
|
|
1664
1190
|
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1191
|
+
Object.defineProperty(exports, "default", {
|
|
1192
|
+
enumerable: true,
|
|
1193
|
+
get: function get() {
|
|
1194
|
+
return Table_1.default;
|
|
1195
|
+
}
|
|
1196
|
+
});
|
|
1669
1197
|
|
|
1670
|
-
|
|
1671
|
-
var _a;
|
|
1198
|
+
/***/ }),
|
|
1672
1199
|
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
}
|
|
1200
|
+
/***/ 267:
|
|
1201
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1676
1202
|
|
|
1677
|
-
|
|
1678
|
-
}, 0);
|
|
1679
|
-
var containerRef = React.useRef(null);
|
|
1680
|
-
var widthRef = React.useRef(0);
|
|
1681
|
-
var widthSet = tableHeader.cells.length === tableHeader.cells.filter(function (_ref7) {
|
|
1682
|
-
var value = _ref7.value,
|
|
1683
|
-
showCell = _ref7.showCell;
|
|
1203
|
+
"use strict";
|
|
1684
1204
|
|
|
1685
|
-
var _a, _b;
|
|
1686
1205
|
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
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__(112);
|
|
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
|
+
};
|
|
1693
1250
|
}
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1253
|
+
var size = {
|
|
1254
|
+
initialWidth: 300,
|
|
1255
|
+
initialHeight: 300
|
|
1256
|
+
};
|
|
1257
|
+
var defaultContext = {
|
|
1258
|
+
tableAlignByType: [{
|
|
1259
|
+
match: 'string',
|
|
1260
|
+
value: 'left'
|
|
1261
|
+
}, {
|
|
1262
|
+
match: 'number',
|
|
1263
|
+
value: 'right'
|
|
1264
|
+
}, {
|
|
1265
|
+
match: 'time',
|
|
1266
|
+
value: 'left'
|
|
1267
|
+
}, {
|
|
1268
|
+
match: 'color',
|
|
1269
|
+
value: 'left'
|
|
1270
|
+
}, {
|
|
1271
|
+
match: 'array',
|
|
1272
|
+
value: 'left'
|
|
1273
|
+
}, {
|
|
1274
|
+
match: 'sparkline',
|
|
1275
|
+
value: 'center'
|
|
1276
|
+
}, {
|
|
1277
|
+
match: 'unknown',
|
|
1278
|
+
value: 'left'
|
|
1279
|
+
}],
|
|
1280
|
+
tableCellTypeByType: [{
|
|
1281
|
+
match: 'string',
|
|
1282
|
+
value: 'TextCell'
|
|
1283
|
+
}, {
|
|
1284
|
+
match: 'number',
|
|
1285
|
+
value: 'TextCell'
|
|
1286
|
+
}, {
|
|
1287
|
+
match: 'time',
|
|
1288
|
+
value: 'TextCell'
|
|
1289
|
+
}, {
|
|
1290
|
+
match: 'color',
|
|
1291
|
+
value: 'TextCell'
|
|
1292
|
+
}, {
|
|
1293
|
+
match: 'array',
|
|
1294
|
+
value: 'ArrayCell'
|
|
1295
|
+
}, {
|
|
1296
|
+
match: 'sparkline',
|
|
1297
|
+
value: 'SparklineCell'
|
|
1298
|
+
}, {
|
|
1299
|
+
match: 'unknown',
|
|
1300
|
+
value: 'TextCell'
|
|
1301
|
+
}],
|
|
1302
|
+
// NOTE: These contexts are used by the table background color editor.
|
|
1303
|
+
// Please be careful removing/renaming/altering them.
|
|
1304
|
+
// There are unit tests and visual test that will capture breakages.
|
|
1305
|
+
tableRowColorMaxContrast: {
|
|
1306
|
+
colors: ['> themes.textColor', '> themes.inverseTextColor'],
|
|
1307
|
+
default: '> themes.textColor'
|
|
1308
|
+
},
|
|
1309
|
+
tableRowBackgroundColorEvenConfig: {
|
|
1310
|
+
channel: 'hsv.v',
|
|
1311
|
+
value: '*0.96'
|
|
1312
|
+
},
|
|
1313
|
+
tableHeaderBackgroundColorConfig: {
|
|
1314
|
+
channel: 'hsv.v',
|
|
1315
|
+
value: '*0.9'
|
|
1316
|
+
},
|
|
1317
|
+
tableRowBackgroundColorsByTheme: ['> themes.rowBackgroundColorOdd'],
|
|
1318
|
+
tableAltRowBackgroundColorsByTheme: ['> themes.rowBackgroundColorOdd', '> themes.rowBackgroundColorEven'],
|
|
1319
|
+
tableRowBackgroundColorsByBackgroundColor: ['> backgroundColor'],
|
|
1320
|
+
tableAltRowBackgroundColorsByBackgroundColor: ['> backgroundColor', '> backgroundColor | setColorChannel(tableRowBackgroundColorEvenConfig)']
|
|
1321
|
+
};
|
|
1322
|
+
var unitPositionConfig = {
|
|
1323
|
+
label: i18n_1._('Units Position'),
|
|
1324
|
+
editor: 'editor.select',
|
|
1325
|
+
option: 'unitPosition',
|
|
1326
|
+
editorProps: {
|
|
1327
|
+
values: [{
|
|
1328
|
+
label: i18n_1._('Before'),
|
|
1329
|
+
value: 'before'
|
|
1330
|
+
}, {
|
|
1331
|
+
label: i18n_1._('After'),
|
|
1332
|
+
value: 'after'
|
|
1333
|
+
}]
|
|
1334
|
+
}
|
|
1335
|
+
};
|
|
1336
|
+
var unitLabelConfig = {
|
|
1337
|
+
label: i18n_1._('Unit Label'),
|
|
1338
|
+
option: 'unit',
|
|
1339
|
+
editor: 'editor.text'
|
|
1340
|
+
};
|
|
1341
|
+
var timeFormattingConfig = {
|
|
1342
|
+
label: i18n_1._('Date & Time Formatting'),
|
|
1343
|
+
option: 'format',
|
|
1344
|
+
editor: 'editor.text',
|
|
1345
|
+
editorProps: {
|
|
1346
|
+
tooltip: i18n_1._('For example: DD-MM-YYYY')
|
|
1347
|
+
}
|
|
1348
|
+
};
|
|
1349
|
+
var sequentialColorConfig = [{
|
|
1350
|
+
to: 20,
|
|
1351
|
+
value: '#D41F1F'
|
|
1352
|
+
}, {
|
|
1353
|
+
from: 20,
|
|
1354
|
+
to: 40,
|
|
1355
|
+
value: '#D94E17'
|
|
1356
|
+
}, {
|
|
1357
|
+
from: 40,
|
|
1358
|
+
to: 60,
|
|
1359
|
+
value: '#CBA700'
|
|
1360
|
+
}, {
|
|
1361
|
+
from: 60,
|
|
1362
|
+
to: 80,
|
|
1363
|
+
value: '#669922'
|
|
1364
|
+
}, {
|
|
1365
|
+
from: 80,
|
|
1366
|
+
value: '#118832'
|
|
1367
|
+
}];
|
|
1368
|
+
var matchColorConfig = [{
|
|
1369
|
+
match: '',
|
|
1370
|
+
value: '#5C33FF'
|
|
1371
|
+
}];
|
|
1372
|
+
var optionsSchema = {
|
|
1373
|
+
backgroundColor: {
|
|
1374
|
+
default: '> themes.defaultBackgroundColor',
|
|
1375
|
+
description: 'Specify the color for the background. You might use a data source to apply the color. The default for enterprise light is "#FFFFFF". The default for enterprise dark is "#000000". The default for prisma dark is "#0B0C0E".',
|
|
1376
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN,
|
|
1377
|
+
type: 'string'
|
|
1378
|
+
},
|
|
1379
|
+
columnFormat: {
|
|
1380
|
+
description: 'Allows column formatting for individual columns.',
|
|
1381
|
+
type: 'object',
|
|
1382
|
+
patternProperties: {
|
|
1383
|
+
'.*': {
|
|
1384
|
+
description: 'Customization for column property',
|
|
1385
|
+
type: 'object',
|
|
1386
|
+
properties: {
|
|
1387
|
+
align: {
|
|
1388
|
+
description: 'Specify the alignment for each cell in a column. Valid alignments include "left", "center", and "right".',
|
|
1389
|
+
type: 'array',
|
|
1390
|
+
items: {
|
|
1391
|
+
type: 'string',
|
|
1392
|
+
enum: consts_1.validAlignments.concat()
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
cellTypes: {
|
|
1396
|
+
description: 'Specify how to render data in cells. Valid cell renders include "TextCell", "ArrayCell", "SparklineCell".',
|
|
1397
|
+
type: 'array',
|
|
1398
|
+
items: {
|
|
1399
|
+
type: 'string',
|
|
1400
|
+
enum: consts_1.validCellRenderers.concat()
|
|
1401
|
+
}
|
|
1402
|
+
},
|
|
1403
|
+
data: {
|
|
1404
|
+
description: 'Specify data points to be displayed in the cells of a column.',
|
|
1405
|
+
type: 'array',
|
|
1406
|
+
items: {
|
|
1407
|
+
oneOf: [{
|
|
1408
|
+
type: 'string'
|
|
1409
|
+
}, {
|
|
1410
|
+
type: 'number'
|
|
1411
|
+
}, {
|
|
1412
|
+
type: 'array',
|
|
1413
|
+
items: {
|
|
1414
|
+
type: ['string', 'number']
|
|
1415
|
+
}
|
|
1416
|
+
}]
|
|
1417
|
+
}
|
|
1418
|
+
},
|
|
1419
|
+
rowBackgroundColors: {
|
|
1420
|
+
description: 'Specify a list of colors, in hexadecimal code, for the background color of each column of the table. For example, ["#2C333B", "32373D"].',
|
|
1421
|
+
type: 'array',
|
|
1422
|
+
items: {
|
|
1423
|
+
type: 'string',
|
|
1424
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
rowColors: {
|
|
1428
|
+
description: 'Specify a list of colors, in hexadecimal code, for the text color of the cells of a column. For example, ["#2C333B", "32373D"].',
|
|
1429
|
+
type: 'array',
|
|
1430
|
+
items: {
|
|
1431
|
+
type: 'string',
|
|
1432
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
1433
|
+
}
|
|
1434
|
+
},
|
|
1435
|
+
sparklineAreaColors: {
|
|
1436
|
+
description: 'Specify a list of colors, in hexadecimal code, for the sparkline area of each column. For example, ["#2C333B", "32373D"].',
|
|
1437
|
+
type: 'array',
|
|
1438
|
+
items: {
|
|
1439
|
+
type: 'string',
|
|
1440
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
sparklineColors: {
|
|
1444
|
+
description: 'Specify a list of colors, in hexadecimal code, for the sparkline stroke of each column. For example, ["#2C333B", "32373D"].',
|
|
1445
|
+
type: 'array',
|
|
1446
|
+
items: {
|
|
1447
|
+
type: 'string',
|
|
1448
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
|
|
1449
|
+
}
|
|
1450
|
+
},
|
|
1451
|
+
sparklineTypes: {
|
|
1452
|
+
description: 'Choose either area or line formatting for the Sparkline. Valid sparkline types include "line" and "area".',
|
|
1453
|
+
type: 'array',
|
|
1454
|
+
items: {
|
|
1455
|
+
type: 'string',
|
|
1456
|
+
enum: consts_1.validSparklineTypes.concat()
|
|
1457
|
+
}
|
|
1458
|
+
},
|
|
1459
|
+
textOverflow: {
|
|
1460
|
+
description: 'Controls how the text should be truncated within a particular column. Valid types include "anywhere", "break-word", "ellipsis". Defaults width for ellipsis is 100px.',
|
|
1461
|
+
type: 'string',
|
|
1462
|
+
pattern: schemaUtils_1.getPattern(consts_1.validTextOverflows),
|
|
1463
|
+
enum: consts_1.validTextOverflows.concat()
|
|
1464
|
+
},
|
|
1465
|
+
width: {
|
|
1466
|
+
description: 'Controls how wide in pixels (where 1 px = 1/96th of 1 in) the column should be displayed.',
|
|
1467
|
+
type: 'number',
|
|
1468
|
+
minimum: 30
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1702
1472
|
}
|
|
1703
|
-
},
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1473
|
+
},
|
|
1474
|
+
count: {
|
|
1475
|
+
description: 'Specify the maximum number of rows to display.',
|
|
1476
|
+
type: 'number',
|
|
1477
|
+
default: 10
|
|
1478
|
+
},
|
|
1479
|
+
font: {
|
|
1480
|
+
default: 'proportional',
|
|
1481
|
+
description: 'Specify the font style to use for table content.',
|
|
1482
|
+
type: 'string',
|
|
1483
|
+
pattern: schemaUtils_1.getPattern(['proportional', 'monospace'])
|
|
1484
|
+
},
|
|
1485
|
+
fontSize: {
|
|
1486
|
+
default: 'default',
|
|
1487
|
+
description: 'Specify the font size to use for table content. Font sizes range from extra small (10px) to large (16px) with the default being 14px.',
|
|
1488
|
+
type: 'string',
|
|
1489
|
+
pattern: schemaUtils_1.getPattern(consts_1.validFontSizes)
|
|
1490
|
+
},
|
|
1491
|
+
headers: {
|
|
1492
|
+
default: '> table | getField()',
|
|
1493
|
+
description: "Specify an array of headers to display on the table. Though these can be statically listed, it's best to use the dynamic default, as it will return the fields of your search.",
|
|
1494
|
+
type: 'array',
|
|
1495
|
+
items: {
|
|
1496
|
+
type: 'string'
|
|
1712
1497
|
}
|
|
1713
|
-
},
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1498
|
+
},
|
|
1499
|
+
headerVisibility: {
|
|
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
|
+
}, {
|
|
1533
|
+
type: 'array',
|
|
1534
|
+
items: {
|
|
1535
|
+
type: ['string', 'number']
|
|
1536
|
+
}
|
|
1537
|
+
}]
|
|
1722
1538
|
}
|
|
1723
1539
|
}
|
|
1724
|
-
},
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
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".',
|
|
1548
|
+
type: 'array',
|
|
1549
|
+
items: {
|
|
1550
|
+
type: 'array',
|
|
1551
|
+
items: {
|
|
1552
|
+
type: 'string',
|
|
1553
|
+
enum: consts_1.validAlignments.concat()
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
cellTypes: {
|
|
1558
|
+
default: '> table | type() | matchValue(tableCellTypeByType)',
|
|
1559
|
+
description: 'Specify how to render data in cells. Valid cell renders include "TextCell", "ArrayCell", "SparklineCell".',
|
|
1560
|
+
type: 'array',
|
|
1561
|
+
items: {
|
|
1562
|
+
type: 'array',
|
|
1563
|
+
items: {
|
|
1564
|
+
type: 'string',
|
|
1565
|
+
enum: consts_1.validCellRenderers.concat()
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
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'
|
|
1577
|
+
}, {
|
|
1578
|
+
type: 'number'
|
|
1579
|
+
}, {
|
|
1580
|
+
type: 'array',
|
|
1581
|
+
items: {
|
|
1582
|
+
type: ['string', 'number']
|
|
1583
|
+
}
|
|
1584
|
+
}]
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
},
|
|
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
|
+
}
|
|
1745
1653
|
}
|
|
1746
|
-
|
|
1747
|
-
cellIndex -= 1;
|
|
1748
1654
|
}
|
|
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);
|
|
1764
|
-
}
|
|
1765
|
-
}, [onCellClick, showRowNumbers, tableHeader, tableBody]);
|
|
1766
|
-
var debouncedOnColumnFormatChange = React.useMemo(function () {
|
|
1767
|
-
return debounce(function (newFormat) {
|
|
1768
|
-
onColumnFormatChange(newFormat);
|
|
1769
|
-
}, 300);
|
|
1770
|
-
}, [onColumnFormatChange]);
|
|
1771
|
-
var handleResizeColumn = React.useCallback(function (_event, payload) {
|
|
1772
|
-
var updatedCF = lodash_1.cloneDeep(columns);
|
|
1773
|
-
var field = payload.columnId;
|
|
1774
|
-
updatedCF[field] = Object.assign(Object.assign({}, updatedCF[field]), {
|
|
1775
|
-
width: Math.max(payload.width, MINIMUM_COLUMN_SIZE)
|
|
1776
|
-
});
|
|
1777
|
-
setColumns(updatedCF); // Updates column json in edit mode
|
|
1778
|
-
|
|
1779
|
-
if (mode === 'edit') {
|
|
1780
|
-
debouncedOnColumnFormatChange(updatedCF);
|
|
1781
1655
|
}
|
|
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
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
},
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
rest = __rest(_a, ["key", "value", "sortKey"]);
|
|
1656
|
+
}
|
|
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
|
|
1833
1706
|
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
width: utils_1.getColumnWidth({
|
|
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);
|
|
1707
|
+
},
|
|
1708
|
+
prisma: variables_1.default.contentColorInverted(props)
|
|
1709
|
+
})(props);
|
|
1710
|
+
}
|
|
1899
1711
|
};
|
|
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
|
|
1726
|
+
}
|
|
1727
|
+
}], [{
|
|
1728
|
+
label: i18n_1._('Row Numbers'),
|
|
1729
|
+
option: 'showRowNumbers',
|
|
1730
|
+
editor: 'editor.toggle',
|
|
1731
|
+
editorProps: {
|
|
1732
|
+
labelPosition: 'left',
|
|
1733
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
1734
|
+
}
|
|
1735
|
+
}], [{
|
|
1736
|
+
label: i18n_1._('Internal Fields'),
|
|
1737
|
+
option: 'showInternalFields',
|
|
1738
|
+
editor: 'editor.toggle',
|
|
1739
|
+
editorProps: {
|
|
1740
|
+
labelPosition: 'left',
|
|
1741
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
1742
|
+
}
|
|
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
|
|
1760
|
+
}
|
|
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)
|
|
1769
|
+
}
|
|
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
|
|
1784
|
+
}
|
|
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
|
|
1805
|
+
}
|
|
1806
|
+
}]]
|
|
1807
|
+
}, {
|
|
1808
|
+
label: i18n_1._('Column Formatting'),
|
|
1809
|
+
layout: [[{
|
|
1810
|
+
label: i18n_1._('Column-specific formatting'),
|
|
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
|
+
}
|
|
1885
|
+
},
|
|
1886
|
+
key: 'TableColumnFormatterEditor'
|
|
1887
|
+
}]]
|
|
1888
|
+
}];
|
|
1889
|
+
/**
|
|
1890
|
+
* visualization configuration
|
|
1891
|
+
*/
|
|
1900
1892
|
|
|
1901
|
-
var
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
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
|
|
1893
|
+
var config = {
|
|
1894
|
+
/**
|
|
1895
|
+
* unique viz key
|
|
1896
|
+
*/
|
|
1897
|
+
key: 'splunk.table',
|
|
1898
|
+
|
|
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
|
+
/***/ 268:
|
|
1971
1928
|
/***/ (function(module, exports) {
|
|
1972
1929
|
|
|
1973
1930
|
module.exports = require("@splunk/react-ui/Paginator");
|
|
1974
1931
|
|
|
1975
1932
|
/***/ }),
|
|
1976
1933
|
|
|
1977
|
-
/***/
|
|
1934
|
+
/***/ 269:
|
|
1978
1935
|
/***/ (function(module, exports) {
|
|
1979
1936
|
|
|
1980
1937
|
module.exports = require("@splunk/react-ui/Message");
|
|
1981
1938
|
|
|
1982
1939
|
/***/ }),
|
|
1983
1940
|
|
|
1984
|
-
/***/
|
|
1941
|
+
/***/ 27:
|
|
1942
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1943
|
+
|
|
1944
|
+
"use strict";
|
|
1945
|
+
|
|
1946
|
+
|
|
1947
|
+
var _defineProperty = __webpack_require__(7);
|
|
1948
|
+
|
|
1949
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1950
|
+
value: true
|
|
1951
|
+
});
|
|
1952
|
+
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
1953
|
+
|
|
1954
|
+
var T = __webpack_require__(0);
|
|
1955
|
+
|
|
1956
|
+
var lodash_1 = __webpack_require__(2);
|
|
1957
|
+
|
|
1958
|
+
var DataSource_1 = __webpack_require__(37);
|
|
1959
|
+
|
|
1960
|
+
exports.SortParamsPropTypes = T.shape({
|
|
1961
|
+
currentSortKey: T.string,
|
|
1962
|
+
currentSortDir: T.oneOf(DataSource_1.validSortDirs),
|
|
1963
|
+
onSort: T.func
|
|
1964
|
+
});
|
|
1965
|
+
|
|
1966
|
+
var getSortingParams = function getSortingParams(_ref) {
|
|
1967
|
+
var requestParams = _ref.requestParams,
|
|
1968
|
+
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
1969
|
+
var currentSortKey;
|
|
1970
|
+
var currentSortDir;
|
|
1971
|
+
var nextSortDirMap = {
|
|
1972
|
+
asc: 'desc',
|
|
1973
|
+
desc: 'asc',
|
|
1974
|
+
none: 'asc'
|
|
1975
|
+
};
|
|
1976
|
+
var onSort;
|
|
1977
|
+
|
|
1978
|
+
if (lodash_1.isFunction(onRequestParamsChange)) {
|
|
1979
|
+
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
1980
|
+
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
1981
|
+
currentSortDir = requestParams.sort[currentSortKey];
|
|
1982
|
+
} // undid memoization since there is a dependency on requestParams, which is a deeply nested object
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
onSort = function onSort(e, _ref2) {
|
|
1986
|
+
var sortKey = _ref2.sortKey,
|
|
1987
|
+
sortDir = _ref2.sortDir;
|
|
1988
|
+
|
|
1989
|
+
if (typeof sortKey === 'string') {
|
|
1990
|
+
var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
1991
|
+
onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
|
|
1992
|
+
offset: 0,
|
|
1993
|
+
sort: _defineProperty({}, sortKey, nextSortDir)
|
|
1994
|
+
}));
|
|
1995
|
+
} else {
|
|
1996
|
+
onRequestParamsChange(requestParams);
|
|
1997
|
+
}
|
|
1998
|
+
};
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
return {
|
|
2002
|
+
currentSortKey: currentSortKey,
|
|
2003
|
+
currentSortDir: currentSortDir,
|
|
2004
|
+
onSort: onSort
|
|
2005
|
+
};
|
|
2006
|
+
};
|
|
2007
|
+
|
|
2008
|
+
exports.getSortingParams = getSortingParams;
|
|
2009
|
+
|
|
2010
|
+
/***/ }),
|
|
2011
|
+
|
|
2012
|
+
/***/ 270:
|
|
1985
2013
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1986
2014
|
|
|
1987
2015
|
"use strict";
|
|
1988
2016
|
|
|
1989
2017
|
|
|
1990
|
-
var _toConsumableArray = __webpack_require__(
|
|
2018
|
+
var _toConsumableArray = __webpack_require__(9);
|
|
1991
2019
|
|
|
1992
|
-
var _typeof = __webpack_require__(
|
|
2020
|
+
var _typeof = __webpack_require__(25);
|
|
1993
2021
|
|
|
1994
2022
|
Object.defineProperty(exports, "__esModule", {
|
|
1995
2023
|
value: true
|
|
@@ -1998,9 +2026,9 @@ exports.useTable = exports.getTextOverflowType = exports.getOverflowStyles = voi
|
|
|
1998
2026
|
|
|
1999
2027
|
var lodash_1 = __webpack_require__(2);
|
|
2000
2028
|
|
|
2001
|
-
var colorUtils_1 = __webpack_require__(
|
|
2029
|
+
var colorUtils_1 = __webpack_require__(13);
|
|
2002
2030
|
|
|
2003
|
-
var consts_1 = __webpack_require__(
|
|
2031
|
+
var consts_1 = __webpack_require__(112);
|
|
2004
2032
|
|
|
2005
2033
|
var isArray = function isArray(v) {
|
|
2006
2034
|
return Array.isArray(v);
|
|
@@ -2401,117 +2429,52 @@ var useTable = function useTable() {
|
|
|
2401
2429
|
tableHeader: tableHeader,
|
|
2402
2430
|
tableBody: tableBody
|
|
2403
2431
|
};
|
|
2404
|
-
};
|
|
2405
|
-
|
|
2406
|
-
exports.useTable = useTable;
|
|
2407
|
-
|
|
2408
|
-
/***/ }),
|
|
2409
|
-
|
|
2410
|
-
/***/ 269:
|
|
2411
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2412
|
-
|
|
2413
|
-
"use strict";
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
2417
|
-
if (k2 === undefined) k2 = k;
|
|
2418
|
-
Object.defineProperty(o, k2, {
|
|
2419
|
-
enumerable: true,
|
|
2420
|
-
get: function get() {
|
|
2421
|
-
return m[k];
|
|
2422
|
-
}
|
|
2423
|
-
});
|
|
2424
|
-
} : function (o, m, k, k2) {
|
|
2425
|
-
if (k2 === undefined) k2 = k;
|
|
2426
|
-
o[k2] = m[k];
|
|
2427
|
-
});
|
|
2428
|
-
|
|
2429
|
-
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
2430
|
-
for (var p in m) {
|
|
2431
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2432
|
-
}
|
|
2433
|
-
};
|
|
2434
|
-
|
|
2435
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2436
|
-
value: true
|
|
2437
|
-
});
|
|
2438
|
-
|
|
2439
|
-
__exportStar(__webpack_require__(270), exports);
|
|
2440
|
-
|
|
2441
|
-
__exportStar(__webpack_require__(271), exports);
|
|
2442
|
-
|
|
2443
|
-
__exportStar(__webpack_require__(272), exports);
|
|
2444
|
-
|
|
2445
|
-
__exportStar(__webpack_require__(273), exports);
|
|
2446
|
-
|
|
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);
|
|
2432
|
+
};
|
|
2481
2433
|
|
|
2482
|
-
|
|
2483
|
-
var page = _ref2.page,
|
|
2484
|
-
countArg = _ref2.count;
|
|
2485
|
-
var newParams = lodash_1.cloneDeep(requestParams);
|
|
2434
|
+
exports.useTable = useTable;
|
|
2486
2435
|
|
|
2487
|
-
|
|
2488
|
-
newParams.count = countArg;
|
|
2489
|
-
newParams.offset = 0;
|
|
2490
|
-
}
|
|
2436
|
+
/***/ }),
|
|
2491
2437
|
|
|
2492
|
-
|
|
2438
|
+
/***/ 271:
|
|
2439
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2493
2440
|
|
|
2494
|
-
|
|
2495
|
-
newParams.count = pageCount;
|
|
2496
|
-
newParams.offset = (page - 1) * pageCount;
|
|
2497
|
-
}
|
|
2441
|
+
"use strict";
|
|
2498
2442
|
|
|
2499
|
-
onRequestParamsChange(newParams);
|
|
2500
|
-
};
|
|
2501
2443
|
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2444
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
2445
|
+
if (k2 === undefined) k2 = k;
|
|
2446
|
+
Object.defineProperty(o, k2, {
|
|
2447
|
+
enumerable: true,
|
|
2448
|
+
get: function get() {
|
|
2449
|
+
return m[k];
|
|
2450
|
+
}
|
|
2451
|
+
});
|
|
2452
|
+
} : function (o, m, k, k2) {
|
|
2453
|
+
if (k2 === undefined) k2 = k;
|
|
2454
|
+
o[k2] = m[k];
|
|
2455
|
+
});
|
|
2456
|
+
|
|
2457
|
+
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
2458
|
+
for (var p in m) {
|
|
2459
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2460
|
+
}
|
|
2508
2461
|
};
|
|
2509
2462
|
|
|
2510
|
-
exports
|
|
2463
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2464
|
+
value: true
|
|
2465
|
+
});
|
|
2466
|
+
|
|
2467
|
+
__exportStar(__webpack_require__(272), exports);
|
|
2468
|
+
|
|
2469
|
+
__exportStar(__webpack_require__(273), exports);
|
|
2470
|
+
|
|
2471
|
+
__exportStar(__webpack_require__(274), exports);
|
|
2472
|
+
|
|
2473
|
+
__exportStar(__webpack_require__(275), exports);
|
|
2511
2474
|
|
|
2512
2475
|
/***/ }),
|
|
2513
2476
|
|
|
2514
|
-
/***/
|
|
2477
|
+
/***/ 272:
|
|
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
|
+
/***/ 273:
|
|
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__(90);
|
|
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
|
+
/***/ 274:
|
|
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__(90);
|
|
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
|
+
/***/ 275:
|
|
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__(90);
|
|
2631
2594
|
|
|
2632
|
-
var Line_1 = __webpack_require__(
|
|
2595
|
+
var Line_1 = __webpack_require__(91);
|
|
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
|
+
/***/ 276:
|
|
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__(140);
|
|
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
|
+
/***/ 277:
|
|
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
2909
|
var JSONSchemaUtils_1 = __webpack_require__(24);
|
|
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.1 - de10ad954"
|
|
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.uncollapseEditorConfig = 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
|
|
|
@@ -3693,8 +3774,10 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
|
3693
3774
|
exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
|
|
3694
3775
|
/**
|
|
3695
3776
|
* Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
|
|
3777
|
+
* this function also collapse all editor panels
|
|
3696
3778
|
* @param vizConfig a Visualization Config
|
|
3697
3779
|
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
3780
|
+
* and containing `open: false` for all editor panels in editorConfig
|
|
3698
3781
|
*/
|
|
3699
3782
|
|
|
3700
3783
|
function enhanceConfig(vizConfig) {
|
|
@@ -3704,10 +3787,33 @@ function enhanceConfig(vizConfig) {
|
|
|
3704
3787
|
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
3705
3788
|
}
|
|
3706
3789
|
|
|
3790
|
+
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
3791
|
+
return Object.assign(Object.assign({}, config), {
|
|
3792
|
+
open: false
|
|
3793
|
+
});
|
|
3794
|
+
});
|
|
3707
3795
|
return enhancedConfig;
|
|
3708
3796
|
}
|
|
3709
3797
|
|
|
3710
3798
|
exports.enhanceConfig = enhanceConfig;
|
|
3799
|
+
/**
|
|
3800
|
+
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
3801
|
+
* Created for editor unit tests
|
|
3802
|
+
* @param vizConfig a Visualization Config
|
|
3803
|
+
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
3804
|
+
*/
|
|
3805
|
+
|
|
3806
|
+
function uncollapseEditorConfig(vizConfig) {
|
|
3807
|
+
var editorPanelUncollapsedConfig = vizConfig;
|
|
3808
|
+
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
3809
|
+
return Object.assign(Object.assign({}, config), {
|
|
3810
|
+
open: true
|
|
3811
|
+
});
|
|
3812
|
+
});
|
|
3813
|
+
return editorPanelUncollapsedConfig;
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
3711
3817
|
|
|
3712
3818
|
function isDynamicOption(option) {
|
|
3713
3819
|
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
@@ -3783,20 +3889,31 @@ function generatePrecisionValues(numPrecisionValues) {
|
|
|
3783
3889
|
}
|
|
3784
3890
|
|
|
3785
3891
|
exports.generatePrecisionValues = generatePrecisionValues;
|
|
3892
|
+
/**
|
|
3893
|
+
* insert layout in layout array, return a new layout array instead of updating the original
|
|
3894
|
+
*
|
|
3895
|
+
* @param {EditorLayoutConfig[][]} layout - editor layout
|
|
3896
|
+
* @param {Number} index - the index to insert layout item(s)
|
|
3897
|
+
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
3898
|
+
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
3899
|
+
*/
|
|
3786
3900
|
|
|
3787
|
-
|
|
3901
|
+
var insertLayout = function insertLayout(layout, index) {
|
|
3902
|
+
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
3903
|
+
layoutItems[_key - 2] = arguments[_key];
|
|
3904
|
+
}
|
|
3788
3905
|
|
|
3789
|
-
|
|
3790
|
-
|
|
3906
|
+
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
3907
|
+
};
|
|
3791
3908
|
|
|
3792
|
-
|
|
3909
|
+
exports.insertLayout = insertLayout;
|
|
3793
3910
|
|
|
3794
3911
|
/***/ }),
|
|
3795
3912
|
|
|
3796
|
-
/***/
|
|
3913
|
+
/***/ 7:
|
|
3797
3914
|
/***/ (function(module, exports) {
|
|
3798
3915
|
|
|
3799
|
-
module.exports = require("@babel/runtime/helpers/
|
|
3916
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
3800
3917
|
|
|
3801
3918
|
/***/ }),
|
|
3802
3919
|
|
|
@@ -3806,14 +3923,16 @@ module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
|
3806
3923
|
"use strict";
|
|
3807
3924
|
|
|
3808
3925
|
|
|
3809
|
-
var _typeof = __webpack_require__(
|
|
3926
|
+
var _typeof = __webpack_require__(25);
|
|
3810
3927
|
|
|
3811
3928
|
Object.defineProperty(exports, "__esModule", {
|
|
3812
3929
|
value: true
|
|
3813
3930
|
});
|
|
3814
|
-
exports.
|
|
3931
|
+
exports.deepMergeWithArrayPrimitiveOverrides = exports.extendStaticWrapperProps = void 0;
|
|
3815
3932
|
|
|
3816
3933
|
var lodash_1 = __webpack_require__(2);
|
|
3934
|
+
|
|
3935
|
+
var mapUtils_1 = __webpack_require__(41);
|
|
3817
3936
|
/**
|
|
3818
3937
|
* @method extendStaticWrapperProps
|
|
3819
3938
|
* @param {Object} props
|
|
@@ -3868,7 +3987,7 @@ var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveO
|
|
|
3868
3987
|
// If option is an array of objects
|
|
3869
3988
|
for (var i = 0; i < clone[sourceKey].length; i += 1) {
|
|
3870
3989
|
if (_typeof(clone[sourceKey][i]) === 'object') {
|
|
3871
|
-
var closestMatchIdx =
|
|
3990
|
+
var closestMatchIdx = mapUtils_1.findClosestMatchFromDefaultList(sourceToApply[sourceKey], clone[sourceKey][i]);
|
|
3872
3991
|
|
|
3873
3992
|
if (closestMatchIdx > -1) {
|
|
3874
3993
|
clone[sourceKey][i] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey][i], sourceToApply[sourceKey][closestMatchIdx]);
|
|
@@ -3882,71 +4001,34 @@ var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveO
|
|
|
3882
4001
|
};
|
|
3883
4002
|
|
|
3884
4003
|
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
|
-
|
|
3904
|
-
var findClosestMatchFromDefaultList = function findClosestMatchFromDefaultList(searchList, inputObj) {
|
|
3905
|
-
if (!Array.isArray(searchList) || searchList.length === 0) {
|
|
3906
|
-
return -1;
|
|
3907
|
-
}
|
|
3908
4004
|
|
|
3909
|
-
|
|
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
|
-
});
|
|
4005
|
+
/***/ }),
|
|
3919
4006
|
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
maxMatchIdx = idx;
|
|
3923
|
-
}
|
|
3924
|
-
});
|
|
3925
|
-
return maxMatchIdx;
|
|
3926
|
-
};
|
|
4007
|
+
/***/ 81:
|
|
4008
|
+
/***/ (function(module, exports) {
|
|
3927
4009
|
|
|
3928
|
-
exports
|
|
4010
|
+
module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
3929
4011
|
|
|
3930
4012
|
/***/ }),
|
|
3931
4013
|
|
|
3932
|
-
/***/
|
|
4014
|
+
/***/ 9:
|
|
3933
4015
|
/***/ (function(module, exports) {
|
|
3934
4016
|
|
|
3935
|
-
module.exports = require("@
|
|
4017
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
3936
4018
|
|
|
3937
4019
|
/***/ }),
|
|
3938
4020
|
|
|
3939
|
-
/***/
|
|
4021
|
+
/***/ 90:
|
|
3940
4022
|
/***/ (function(module, exports) {
|
|
3941
4023
|
|
|
3942
|
-
module.exports = require("@splunk/react-
|
|
4024
|
+
module.exports = require("@splunk/react-ui/Table");
|
|
3943
4025
|
|
|
3944
4026
|
/***/ }),
|
|
3945
4027
|
|
|
3946
|
-
/***/
|
|
4028
|
+
/***/ 91:
|
|
3947
4029
|
/***/ (function(module, exports) {
|
|
3948
4030
|
|
|
3949
|
-
module.exports = require("@splunk/
|
|
4031
|
+
module.exports = require("@splunk/react-sparkline/Line");
|
|
3950
4032
|
|
|
3951
4033
|
/***/ })
|
|
3952
4034
|
|