@akohn/dashql-react 0.0.0-stage → 0.0.20-dev.1001.g5e5121808
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/LICENSE +373 -0
- package/NOTICE +118 -0
- package/README.md +133 -2
- package/dist/_virtual/_vite/preload-helper.js +100 -0
- package/dist/brand/brand.d.ts +13 -0
- package/dist/brand/brand.js +14 -0
- package/dist/brand/landing_backdrop.d.ts +56 -0
- package/dist/brand/landing_backdrop.js +1019 -0
- package/dist/brand/wobble_morph.d.ts +54 -0
- package/dist/brand/wobble_morph.js +439 -0
- package/dist/components/action_list.d.ts +31 -0
- package/dist/components/action_list.js +63 -0
- package/dist/components/action_list.module.js +11 -0
- package/dist/components/anchored_overlay.d.ts +28 -0
- package/dist/components/anchored_overlay.js +93 -0
- package/dist/components/button.d.ts +42 -0
- package/dist/components/button.js +97 -0
- package/dist/components/button.module.js +20 -0
- package/dist/components/button_group.d.ts +7 -0
- package/dist/components/button_group.js +18 -0
- package/dist/components/button_group.module.js +3 -0
- package/dist/components/card_placeholder.d.ts +9 -0
- package/dist/components/card_placeholder.js +39 -0
- package/dist/components/card_placeholder.module.js +6 -0
- package/dist/components/clipboard.d.ts +19 -0
- package/dist/components/clipboard.js +54 -0
- package/dist/components/data_table/computation_tables.d.ts +12 -0
- package/dist/components/data_table/computation_tables.js +42 -0
- package/dist/components/data_table/data_table.d.ts +39 -0
- package/dist/components/data_table/data_table.js +415 -0
- package/dist/components/data_table/data_table.module.js +41 -0
- package/dist/components/data_table/data_table_cell.d.ts +7 -0
- package/dist/components/data_table/data_table_cell.js +9 -0
- package/dist/components/data_table/data_table_cell_data.d.ts +22 -0
- package/dist/components/data_table/data_table_cell_data.js +103 -0
- package/dist/components/data_table/data_table_cell_header_name.d.ts +17 -0
- package/dist/components/data_table/data_table_cell_header_name.js +73 -0
- package/dist/components/data_table/data_table_cell_header_plots.d.ts +29 -0
- package/dist/components/data_table/data_table_cell_header_plots.js +120 -0
- package/dist/components/data_table/data_table_colors.d.ts +19 -0
- package/dist/components/data_table/data_table_colors.js +27 -0
- package/dist/components/data_table/data_table_column_resize.d.ts +21 -0
- package/dist/components/data_table/data_table_column_resize.js +121 -0
- package/dist/components/data_table/data_table_focus.d.ts +15 -0
- package/dist/components/data_table/data_table_focus.js +53 -0
- package/dist/components/data_table/data_table_layout.d.ts +18 -0
- package/dist/components/data_table/data_table_layout.js +103 -0
- package/dist/components/data_table/data_table_ordering.d.ts +9 -0
- package/dist/components/data_table/data_table_ordering.js +39 -0
- package/dist/components/data_table/data_table_portals.d.ts +9 -0
- package/dist/components/data_table/data_table_portals.js +29 -0
- package/dist/components/data_table/data_table_row_detail.d.ts +22 -0
- package/dist/components/data_table/data_table_row_detail.js +68 -0
- package/dist/components/data_table/data_table_row_detail.module.js +7 -0
- package/dist/components/data_table/data_table_sticky_views.d.ts +35 -0
- package/dist/components/data_table/data_table_sticky_views.js +161 -0
- package/dist/components/data_table/data_table_window.d.ts +18 -0
- package/dist/components/data_table/data_table_window.js +118 -0
- package/dist/components/data_table/format_peek.d.ts +2 -0
- package/dist/components/data_table/format_peek.js +17 -0
- package/dist/components/data_table/histogram_bars.d.ts +36 -0
- package/dist/components/data_table/histogram_bars.js +100 -0
- package/dist/components/data_table/histogram_brush.d.ts +22 -0
- package/dist/components/data_table/histogram_brush.js +105 -0
- package/dist/components/data_table/histogram_cell.d.ts +17 -0
- package/dist/components/data_table/histogram_cell.js +324 -0
- package/dist/components/data_table/histogram_cell.module.js +9 -0
- package/dist/components/data_table/histogram_label.d.ts +1 -0
- package/dist/components/data_table/histogram_label.js +7 -0
- package/dist/components/data_table/memo_props.d.ts +1 -0
- package/dist/components/data_table/memo_props.js +17 -0
- package/dist/components/data_table/mostfrequent_cell.d.ts +17 -0
- package/dist/components/data_table/mostfrequent_cell.js +316 -0
- package/dist/components/data_table/mostfrequent_cell.module.js +10 -0
- package/dist/components/data_table/use_cross_filters.d.ts +14 -0
- package/dist/components/data_table/use_cross_filters.js +47 -0
- package/dist/components/deferred.d.ts +11 -0
- package/dist/components/deferred.js +41 -0
- package/dist/components/deferred.module.js +5 -0
- package/dist/components/error_boundary.d.ts +18 -0
- package/dist/components/error_boundary.js +15 -0
- package/dist/components/graph.module.js +15 -0
- package/dist/components/graph_port.d.ts +10 -0
- package/dist/components/graph_port.js +34 -0
- package/dist/components/inspector_overlay.d.ts +32 -0
- package/dist/components/inspector_overlay.js +72 -0
- package/dist/components/inspector_overlay.module.js +18 -0
- package/dist/components/json/json_arrow_symbol.d.ts +4 -0
- package/dist/components/json/json_arrow_symbol.js +25 -0
- package/dist/components/json/json_copy_button.d.ts +11 -0
- package/dist/components/json/json_copy_button.js +61 -0
- package/dist/components/json/json_ellipsis_symbol.d.ts +7 -0
- package/dist/components/json/json_ellipsis_symbol.js +11 -0
- package/dist/components/json/json_item_count.d.ts +5 -0
- package/dist/components/json/json_item_count.js +12 -0
- package/dist/components/json/json_key_name.d.ts +6 -0
- package/dist/components/json/json_key_name.js +40 -0
- package/dist/components/json/json_key_values.d.ts +12 -0
- package/dist/components/json/json_key_values.js +99 -0
- package/dist/components/json/json_literal.d.ts +8 -0
- package/dist/components/json/json_literal.js +140 -0
- package/dist/components/json/json_nested_close.d.ts +11 -0
- package/dist/components/json/json_nested_close.js +31 -0
- package/dist/components/json/json_nested_open.d.ts +18 -0
- package/dist/components/json/json_nested_open.js +150 -0
- package/dist/components/json/json_nested_state.d.ts +14 -0
- package/dist/components/json/json_nested_state.js +28 -0
- package/dist/components/json/json_tool_state.d.ts +18 -0
- package/dist/components/json/json_tool_state.js +46 -0
- package/dist/components/json/json_value.d.ts +10 -0
- package/dist/components/json/json_value.js +46 -0
- package/dist/components/json/json_view.d.ts +14 -0
- package/dist/components/json/json_view.js +37 -0
- package/dist/components/json/json_view.module.js +41 -0
- package/dist/components/json/json_view_state.d.ts +14 -0
- package/dist/components/json/json_view_state.js +32 -0
- package/dist/components/json/unique_key.d.ts +1 -0
- package/dist/components/json/unique_key.js +8 -0
- package/dist/components/keyvalue_list.d.ts +25 -0
- package/dist/components/keyvalue_list.js +106 -0
- package/dist/components/keyvalue_list.module.js +15 -0
- package/dist/components/name_input.d.ts +12 -0
- package/dist/components/name_input.js +63 -0
- package/dist/components/overlay.d.ts +53 -0
- package/dist/components/overlay.js +183 -0
- package/dist/components/overlay.module.js +32 -0
- package/dist/components/panel_resize_handle.d.ts +12 -0
- package/dist/components/panel_resize_handle.js +39 -0
- package/dist/components/portal.d.ts +8 -0
- package/dist/components/portal.js +53 -0
- package/dist/components/progress_bar.d.ts +7 -0
- package/dist/components/progress_bar.js +21 -0
- package/dist/components/progress_bar.module.js +3 -0
- package/dist/components/query_history_viewer.d.ts +31 -0
- package/dist/components/query_history_viewer.js +271 -0
- package/dist/components/query_history_viewer.module.js +7 -0
- package/dist/components/query_profile/engine_profile_view.d.ts +19 -0
- package/dist/components/query_profile/engine_profile_view.js +94 -0
- package/dist/components/query_profile/numeric_limits.d.ts +1 -0
- package/dist/components/query_profile/numeric_limits.js +2 -0
- package/dist/components/query_profile/profile_execution_controller.d.ts +12 -0
- package/dist/components/query_profile/profile_execution_controller.js +44 -0
- package/dist/components/query_profile/profile_fit.d.ts +24 -0
- package/dist/components/query_profile/profile_fit.js +22 -0
- package/dist/components/query_profile/profile_navigation.d.ts +3 -0
- package/dist/components/query_profile/profile_navigation.js +34 -0
- package/dist/components/query_profile/profile_scene.d.ts +64 -0
- package/dist/components/query_profile/profile_scene.js +422 -0
- package/dist/components/query_profile/query_profile_view.d.ts +36 -0
- package/dist/components/query_profile/query_profile_view.js +953 -0
- package/dist/components/query_profile/query_profile_view.module.js +23 -0
- package/dist/components/query_progress/query_profile_overlay.d.ts +7 -0
- package/dist/components/query_progress/query_profile_overlay.js +67 -0
- package/dist/components/query_progress/query_profile_overlay.module.js +6 -0
- package/dist/components/query_progress/query_progress_panel.d.ts +14 -0
- package/dist/components/query_progress/query_progress_panel.js +255 -0
- package/dist/components/query_progress/query_progress_panel.module.js +10 -0
- package/dist/components/query_result/cell_detail_overlay.d.ts +34 -0
- package/dist/components/query_result/cell_detail_overlay.js +277 -0
- package/dist/components/query_result/cell_detail_overlay.module.js +21 -0
- package/dist/components/query_result/query_result_action_menu.d.ts +12 -0
- package/dist/components/query_result/query_result_action_menu.js +62 -0
- package/dist/components/query_result/query_result_action_menu.module.js +2 -0
- package/dist/components/query_result/query_result_details.d.ts +17 -0
- package/dist/components/query_result/query_result_details.js +46 -0
- package/dist/components/query_result/query_result_details.module.js +5 -0
- package/dist/components/query_result/query_result_download_button.d.ts +8 -0
- package/dist/components/query_result/query_result_download_button.js +38 -0
- package/dist/components/query_result/query_result_header.d.ts +21 -0
- package/dist/components/query_result/query_result_header.js +72 -0
- package/dist/components/query_result/query_result_header.module.js +3 -0
- package/dist/components/query_result/query_result_search_controls.d.ts +12 -0
- package/dist/components/query_result/query_result_search_controls.js +141 -0
- package/dist/components/query_result/query_result_search_controls.module.js +7 -0
- package/dist/components/query_result/query_result_toolbar.d.ts +21 -0
- package/dist/components/query_result/query_result_toolbar.js +74 -0
- package/dist/components/query_result/result_table_overlay.d.ts +9 -0
- package/dist/components/query_result/result_table_overlay.js +73 -0
- package/dist/components/query_result/result_table_overlay.module.js +6 -0
- package/dist/components/query_result/use_query_result_search.d.ts +8 -0
- package/dist/components/query_result/use_query_result_search.js +28 -0
- package/dist/components/segmented_control.d.ts +58 -0
- package/dist/components/segmented_control.js +116 -0
- package/dist/components/segmented_control.module.js +17 -0
- package/dist/components/separator.d.ts +21 -0
- package/dist/components/separator.js +79 -0
- package/dist/components/separator.module.js +7 -0
- package/dist/components/sheet.d.ts +11 -0
- package/dist/components/sheet.js +65 -0
- package/dist/components/sheet.module.js +7 -0
- package/dist/components/size_observer.d.ts +7 -0
- package/dist/components/size_observer.js +57 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +14 -0
- package/dist/components/skeleton.module.js +2 -0
- package/dist/components/spinners.d.ts +8 -0
- package/dist/components/spinners.js +33 -0
- package/dist/components/spinners.module.js +8 -0
- package/dist/components/status_indicator.d.ts +36 -0
- package/dist/components/status_indicator.js +182 -0
- package/dist/components/status_indicator.module.js +3 -0
- package/dist/components/symbol_icon.d.ts +65 -0
- package/dist/components/symbol_icon.js +213 -0
- package/dist/components/tab_header.d.ts +11 -0
- package/dist/components/tab_header.js +55 -0
- package/dist/components/tab_header.module.js +7 -0
- package/dist/components/tag.d.ts +10 -0
- package/dist/components/tag.js +17 -0
- package/dist/components/tag.module.js +4 -0
- package/dist/components/text_field.d.ts +44 -0
- package/dist/components/text_field.js +159 -0
- package/dist/components/text_field.module.js +15 -0
- package/dist/components/text_input.d.ts +25 -0
- package/dist/components/text_input.js +90 -0
- package/dist/components/text_input.module.js +13 -0
- package/dist/components/text_input_action.d.ts +19 -0
- package/dist/components/text_input_action.js +33 -0
- package/dist/components/text_input_action.module.js +2 -0
- package/dist/components/toggle_switch.d.ts +7 -0
- package/dist/components/toggle_switch.js +22 -0
- package/dist/components/toggle_switch.module.js +6 -0
- package/dist/components/tooltip.d.ts +22 -0
- package/dist/components/tooltip.js +139 -0
- package/dist/components/tooltip.module.js +2 -0
- package/dist/components/tree_entry.d.ts +17 -0
- package/dist/components/tree_entry.js +48 -0
- package/dist/components/tree_entry.module.js +9 -0
- package/dist/components/value_list.d.ts +17 -0
- package/dist/components/value_list.js +70 -0
- package/dist/components/value_list.module.js +8 -0
- package/dist/components/vegalite_chart.d.ts +16 -0
- package/dist/components/vegalite_chart.js +149 -0
- package/dist/components/vegalite_chart.module.js +3 -0
- package/dist/components/vegalite_view.d.ts +26 -0
- package/dist/components/vegalite_view.js +239 -0
- package/dist/components/vegalite_view.module.js +5 -0
- package/dist/components/vertical_scroll_shadows.d.ts +14 -0
- package/dist/components/vertical_scroll_shadows.js +55 -0
- package/dist/components/vertical_scroll_shadows.module.js +5 -0
- package/dist/components/vertical_split.d.ts +15 -0
- package/dist/components/vertical_split.js +112 -0
- package/dist/components/vertical_split.module.js +5 -0
- package/dist/components/vertical_tabs.d.ts +36 -0
- package/dist/components/vertical_tabs.js +169 -0
- package/dist/components/vertical_tabs.module.js +23 -0
- package/dist/components/visualization/capped_rows.d.ts +9 -0
- package/dist/components/visualization/capped_rows.js +23 -0
- package/dist/components/visualization/capped_rows.module.js +3 -0
- package/dist/components/visualization/chart_download_button.d.ts +12 -0
- package/dist/components/visualization/chart_download_button.js +41 -0
- package/dist/components/visualization/kpi_view.d.ts +10 -0
- package/dist/components/visualization/kpi_view.js +215 -0
- package/dist/components/visualization/kpi_view.module.js +17 -0
- package/dist/components/visualization/markdown_view.d.ts +17 -0
- package/dist/components/visualization/markdown_view.js +154 -0
- package/dist/components/visualization/markdown_view.module.js +4 -0
- package/dist/components/visualization/result_rows.d.ts +17 -0
- package/dist/components/visualization/result_rows.js +82 -0
- package/dist/components/visualization/vegalite_preview.d.ts +8 -0
- package/dist/components/visualization/vegalite_preview.js +17 -0
- package/dist/components/visualization/vegalite_preview.module.js +2 -0
- package/dist/components/visualization/visualization_dispatch.d.ts +13 -0
- package/dist/components/visualization/visualization_dispatch.js +40 -0
- package/dist/components/visualization/visualization_panel.d.ts +10 -0
- package/dist/components/visualization/visualization_panel.js +36 -0
- package/dist/components/visualization/visualization_panel.module.js +3 -0
- package/dist/dom/anchored_position.d.ts +42 -0
- package/dist/dom/anchored_position.js +255 -0
- package/dist/dom/app_host.d.ts +2 -0
- package/dist/dom/app_host.js +7 -0
- package/dist/dom/calm_frames.d.ts +29 -0
- package/dist/dom/calm_frames.js +120 -0
- package/dist/dom/classnames.d.ts +8 -0
- package/dist/dom/classnames.js +20 -0
- package/dist/dom/download_file.d.ts +1 -0
- package/dist/dom/download_file.js +12 -0
- package/dist/dom/focus.d.ts +29 -0
- package/dist/dom/focus.js +84 -0
- package/dist/dom/graph_edges.d.ts +53 -0
- package/dist/dom/graph_edges.js +450 -0
- package/dist/dom/key_events.d.ts +9 -0
- package/dist/dom/key_events.js +33 -0
- package/dist/dom/media_query.d.ts +5 -0
- package/dist/dom/media_query.js +18 -0
- package/dist/dom/outside_click.d.ts +8 -0
- package/dist/dom/outside_click.js +32 -0
- package/dist/dom/rerender_ref.d.ts +2 -0
- package/dist/dom/rerender_ref.js +11 -0
- package/dist/dom/row_context_menu.d.ts +7 -0
- package/dist/dom/row_context_menu.js +32 -0
- package/dist/dom/scrollbar.d.ts +3 -0
- package/dist/dom/scrollbar.js +23 -0
- package/dist/format/format.d.ts +11 -0
- package/dist/format/format.js +72 -0
- package/dist/format/query_progress_format.d.ts +17 -0
- package/dist/format/query_progress_format.js +69 -0
- package/dist/format/time_format.d.ts +5 -0
- package/dist/format/time_format.js +45 -0
- package/dist/hooks.d.ts +72 -0
- package/dist/hooks.js +305 -0
- package/dist/host.d.ts +10 -0
- package/dist/host.js +12 -0
- package/dist/logger.d.ts +4 -0
- package/dist/logger.js +13 -0
- package/dist/models/computation_model.d.ts +14 -0
- package/dist/models/computation_model.js +27 -0
- package/dist/models/query_model.d.ts +12 -0
- package/dist/models/query_model.js +27 -0
- package/dist/models/script_model.d.ts +17 -0
- package/dist/models/script_model.js +59 -0
- package/dist/platform/content_length.d.ts +1 -0
- package/dist/platform/content_length.js +7 -0
- package/dist/platform/core_provider.d.ts +18 -0
- package/dist/platform/core_provider.js +106 -0
- package/dist/platform/embedded_database_provider.d.ts +19 -0
- package/dist/platform/embedded_database_provider.js +53 -0
- package/dist/platform/page_runtime.d.ts +3 -0
- package/dist/platform/page_runtime.js +29 -0
- package/dist/style.css +4386 -0
- package/dist/svg_symbols.d.ts +2 -0
- package/dist/svg_symbols.js +2 -0
- package/dist/symbols.svg +1197 -0
- package/dist/theme/color_scheme.d.ts +4 -0
- package/dist/theme/color_scheme.js +28 -0
- package/dist/theme/xcode_palette.d.ts +22 -0
- package/dist/theme/xcode_palette.js +4 -0
- package/dist/theme/xcode_palettes.js +41 -0
- package/dist/utils/plan_engine.d.ts +2 -0
- package/dist/utils/plan_engine.js +13 -0
- package/dist/vegalite/vegalite_check.d.ts +1 -0
- package/dist/vegalite/vegalite_check.js +7 -0
- package/dist/vegalite/vegalite_crossfilter.d.ts +54 -0
- package/dist/vegalite/vegalite_crossfilter.js +187 -0
- package/dist/vegalite/vegalite_image.d.ts +14 -0
- package/dist/vegalite/vegalite_image.js +28 -0
- package/dist/vegalite/vegalite_loader.d.ts +7 -0
- package/dist/vegalite/vegalite_loader.js +15 -0
- package/dist/vegalite/vegalite_rows.d.ts +3 -0
- package/dist/vegalite/vegalite_rows.js +23 -0
- package/dist/vegalite/vegalite_theme.d.ts +13 -0
- package/dist/vegalite/vegalite_theme.js +141 -0
- package/fonts/InstrumentSans-Bold.ttf +0 -0
- package/fonts/InstrumentSans-Medium.ttf +0 -0
- package/fonts/InstrumentSans-OFL.txt +93 -0
- package/fonts/InstrumentSans-Regular.ttf +0 -0
- package/fonts/InstrumentSans-SemiBold.ttf +0 -0
- package/fonts/JetBrainsMono-Bold.ttf +0 -0
- package/fonts/JetBrainsMono-Medium.ttf +0 -0
- package/fonts/JetBrainsMono-OFL.txt +93 -0
- package/fonts/JetBrainsMono-Regular.ttf +0 -0
- package/fonts/JetBrainsMono-SemiBold.ttf +0 -0
- package/fonts/fonts.css +61 -0
- package/package.json +403 -4
- package/styles/colors.css +110 -0
- package/styles/flavors/dbcom.css +48 -0
- package/styles/tokens.css +192 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var viewport = "dashql_viewport_4vQhoV";
|
|
2
|
+
var svg = "dashql_svg_gCAH-m";
|
|
3
|
+
var pipeline = "dashql_pipeline_pVW5tY";
|
|
4
|
+
var operator = "dashql_operator_qTx1MA";
|
|
5
|
+
var operator_symbol = "dashql_operator_symbol_fmZGHM";
|
|
6
|
+
var status = "dashql_status_0_ceA-";
|
|
7
|
+
var status_track = "dashql_status_track_MttBAb";
|
|
8
|
+
var status_spinner = "dashql_status_spinner_5K9H0x";
|
|
9
|
+
var status_progress = "dashql_status_progress_zjidcZ";
|
|
10
|
+
var controls = "dashql_controls_cB9Zc-";
|
|
11
|
+
var metric_controls = "dashql_metric_controls_50Dcs4";
|
|
12
|
+
var edge_legend = "dashql_edge_legend_BG8X0g";
|
|
13
|
+
var view_controls = "dashql_view_controls_trMvZw";
|
|
14
|
+
var view_buttons = "dashql_view_buttons_ITLzao";
|
|
15
|
+
var edge_legend_scale = "dashql_edge_legend_scale_7tLyD-";
|
|
16
|
+
var edge_legend_note = "dashql_edge_legend_note_IVlaV2";
|
|
17
|
+
var edge_legend_matched = "dashql_edge_legend_matched_sfJTS3";
|
|
18
|
+
var inspector = "dashql_inspector_CzqnM4";
|
|
19
|
+
var inspector_json = "dashql_inspector_json_R3jZmm";
|
|
20
|
+
var inspector_header = "dashql_inspector_header_aJf1xU";
|
|
21
|
+
var fragment = "dashql_fragment_WHjeva";
|
|
22
|
+
var fragment_progress = "dashql_fragment_progress_vdNNB-";
|
|
23
|
+
export { controls, edge_legend, edge_legend_matched, edge_legend_note, edge_legend_scale, fragment, fragment_progress, inspector, inspector_header, inspector_json, metric_controls, operator, operator_symbol, pipeline, status, status_progress, status_spinner, status_track, svg, view_buttons, view_controls, viewport };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { body, dialog, header, spacer, title } from "./query_profile_overlay.module.js";
|
|
2
|
+
import { ButtonSize, ButtonVariant, IconButton } from "../button.js";
|
|
3
|
+
import { useFocusTrap } from "../../dom/focus.js";
|
|
4
|
+
import { Overlay, OverlaySize } from "../overlay.js";
|
|
5
|
+
import { ScreenFullIcon, ScreenNormalIcon, SymbolIcon } from "../symbol_icon.js";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
var CloseIcon = SymbolIcon("x_16");
|
|
9
|
+
var IGNORE_OUTSIDE_CLICK = () => {};
|
|
10
|
+
function QueryProfileOverlay(props) {
|
|
11
|
+
const dialogRef = React.useRef(null);
|
|
12
|
+
const [expanded, setExpanded] = React.useState(false);
|
|
13
|
+
useFocusTrap({
|
|
14
|
+
containerRef: dialogRef,
|
|
15
|
+
initialFocusRef: dialogRef,
|
|
16
|
+
restoreFocusOnCleanUp: true
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ jsx(Overlay, {
|
|
19
|
+
centered: true,
|
|
20
|
+
width: OverlaySize.XXL,
|
|
21
|
+
height: OverlaySize.XL,
|
|
22
|
+
preventFocusOnOpen: true,
|
|
23
|
+
onEscape: props.onClose,
|
|
24
|
+
onClickOutside: IGNORE_OUTSIDE_CLICK,
|
|
25
|
+
expanded,
|
|
26
|
+
children: /* @__PURE__ */ jsxs("section", {
|
|
27
|
+
ref: dialogRef,
|
|
28
|
+
className: dialog,
|
|
29
|
+
role: "dialog",
|
|
30
|
+
"aria-modal": "true",
|
|
31
|
+
tabIndex: -1,
|
|
32
|
+
"aria-label": "Query plan",
|
|
33
|
+
"data-testid": "query-profile-overlay",
|
|
34
|
+
children: [/* @__PURE__ */ jsxs("header", {
|
|
35
|
+
className: header,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx("h2", {
|
|
38
|
+
className: title,
|
|
39
|
+
children: "Query plan"
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx("div", { className: spacer }),
|
|
42
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
43
|
+
variant: ButtonVariant.Invisible,
|
|
44
|
+
size: ButtonSize.Small,
|
|
45
|
+
"aria-label": expanded ? "Restore size" : "Expand",
|
|
46
|
+
"aria-pressed": expanded,
|
|
47
|
+
"data-testid": "query-profile-overlay-expand",
|
|
48
|
+
onClick: () => setExpanded((e) => !e),
|
|
49
|
+
children: expanded ? /* @__PURE__ */ jsx(ScreenNormalIcon, { size: 16 }) : /* @__PURE__ */ jsx(ScreenFullIcon, { size: 16 })
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
52
|
+
variant: ButtonVariant.Invisible,
|
|
53
|
+
size: ButtonSize.Small,
|
|
54
|
+
"aria-label": "Close query plan",
|
|
55
|
+
"data-testid": "query-profile-overlay-close",
|
|
56
|
+
onClick: props.onClose,
|
|
57
|
+
children: /* @__PURE__ */ jsx(CloseIcon, { size: 16 })
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
61
|
+
className: body,
|
|
62
|
+
children: props.children
|
|
63
|
+
})]
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
export { QueryProfileOverlay };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { QueryExecutionState } from '@akohn/dashql/platform/query/query_execution_state';
|
|
3
|
+
import { type QueryProfileProgress } from '@akohn/dashql/platform/query/query_progress';
|
|
4
|
+
export interface QueryProgressPanelProps {
|
|
5
|
+
query: QueryExecutionState;
|
|
6
|
+
showProfile?: boolean;
|
|
7
|
+
profileHeight?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function ProfileProgressDetails(props: {
|
|
10
|
+
progress: QueryProfileProgress;
|
|
11
|
+
height?: number | string;
|
|
12
|
+
}): React.JSX.Element | null;
|
|
13
|
+
export declare function QueryProgressPanel(props: QueryProgressPanelProps): React.JSX.Element;
|
|
14
|
+
export declare function hasQueryProgress(query: QueryExecutionState | null): boolean;
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { bar, bar_fill, container, figure, figure_label, figure_value, figures, profile, strip } from "./query_progress_panel.module.js";
|
|
2
|
+
import { TabHeader } from "../tab_header.js";
|
|
3
|
+
import { QueryProfileView } from "../query_profile/query_profile_view.js";
|
|
4
|
+
import { ButtonSize, ButtonVariant, IconButton } from "../button.js";
|
|
5
|
+
import { DownloadIcon, ScreenFullIcon } from "../symbol_icon.js";
|
|
6
|
+
import { QueryProfileOverlay } from "./query_profile_overlay.js";
|
|
7
|
+
import { useHost } from "../../host.js";
|
|
8
|
+
import { formatCompactBytes, formatCompactCount, formatElapsed, formatPhase, monotonicFraction, stat, workOf } from "../../format/query_progress_format.js";
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { QueryExecutionStatus } from "@akohn/dashql/platform/query/query_execution_state";
|
|
12
|
+
import * as dashql from "@akohn/dashql";
|
|
13
|
+
import { createProfileLayoutConfig, rotateProfileLayoutOrientation } from "@akohn/dashql/platform/query/profile_layout_config";
|
|
14
|
+
import { QueryProgressFollower, readProgressRecording } from "@akohn/dashql/platform/query/query_progress";
|
|
15
|
+
var view = dashql.buffers.profile;
|
|
16
|
+
function isActive(status) {
|
|
17
|
+
return status !== QueryExecutionStatus.SUCCEEDED && status !== QueryExecutionStatus.FAILED && status !== QueryExecutionStatus.CANCELLED;
|
|
18
|
+
}
|
|
19
|
+
function finishedAt(query) {
|
|
20
|
+
return query.metrics.querySucceededAt ?? query.metrics.queryFailedAt ?? query.metrics.queryCancelledAt;
|
|
21
|
+
}
|
|
22
|
+
function useElapsed(query) {
|
|
23
|
+
const active = isActive(query.status);
|
|
24
|
+
const [now, setNow] = React.useState(() => Date.now());
|
|
25
|
+
React.useEffect(() => {
|
|
26
|
+
if (!active) return;
|
|
27
|
+
const timer = setInterval(() => setNow(Date.now()), 1e3);
|
|
28
|
+
return () => clearInterval(timer);
|
|
29
|
+
}, [active]);
|
|
30
|
+
const start = query.metrics.queryRequestedAt ?? now;
|
|
31
|
+
const end = finishedAt(query) ?? now;
|
|
32
|
+
return Math.max(0, end - start);
|
|
33
|
+
}
|
|
34
|
+
function useMonotonicFraction(queryId, work) {
|
|
35
|
+
const state = React.useRef({
|
|
36
|
+
queryId,
|
|
37
|
+
fraction: 0,
|
|
38
|
+
known: false
|
|
39
|
+
});
|
|
40
|
+
if (state.current.queryId !== queryId) state.current = {
|
|
41
|
+
queryId,
|
|
42
|
+
fraction: 0,
|
|
43
|
+
known: false
|
|
44
|
+
};
|
|
45
|
+
if (work != null) {
|
|
46
|
+
state.current.fraction = monotonicFraction(state.current.fraction, work);
|
|
47
|
+
state.current.known = true;
|
|
48
|
+
}
|
|
49
|
+
return state.current.known ? state.current.fraction : null;
|
|
50
|
+
}
|
|
51
|
+
function ProgressBar(props) {
|
|
52
|
+
const percent = props.fraction == null ? null : Math.round(props.fraction * 100);
|
|
53
|
+
return /* @__PURE__ */ jsx("div", {
|
|
54
|
+
className: bar,
|
|
55
|
+
role: "progressbar",
|
|
56
|
+
"aria-label": props.label,
|
|
57
|
+
"aria-valuemin": 0,
|
|
58
|
+
"aria-valuemax": 100,
|
|
59
|
+
"aria-valuenow": percent ?? void 0,
|
|
60
|
+
"data-indeterminate": props.fraction == null && props.active,
|
|
61
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
62
|
+
className: bar_fill,
|
|
63
|
+
style: { width: `${percent ?? 0}%` }
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function Figure(props) {
|
|
68
|
+
if (props.value == null) return null;
|
|
69
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
70
|
+
className: figure,
|
|
71
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
72
|
+
className: figure_label,
|
|
73
|
+
children: props.label
|
|
74
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
75
|
+
className: figure_value,
|
|
76
|
+
children: props.value
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function DownloadRecordingButton(props) {
|
|
81
|
+
const { downloadFile } = props;
|
|
82
|
+
const download = React.useCallback(() => {
|
|
83
|
+
const text = readProgressRecording(props.progress);
|
|
84
|
+
if (text == null) return;
|
|
85
|
+
downloadFile(new TextEncoder().encode(text), `query-${props.queryId}-profile.json`);
|
|
86
|
+
}, [
|
|
87
|
+
downloadFile,
|
|
88
|
+
props.progress,
|
|
89
|
+
props.queryId
|
|
90
|
+
]);
|
|
91
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
92
|
+
variant: ButtonVariant.Invisible,
|
|
93
|
+
size: ButtonSize.Small,
|
|
94
|
+
"aria-label": "Download the profile recording",
|
|
95
|
+
description: "Download the recording of the progress, the profile simulator replays it",
|
|
96
|
+
"data-testid": "download-profile-recording",
|
|
97
|
+
onClick: download,
|
|
98
|
+
children: /* @__PURE__ */ jsx(DownloadIcon, { size: 16 })
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function useRotatedProgress(progress, rotated, coreSetup) {
|
|
102
|
+
const [core, setCore] = React.useState(null);
|
|
103
|
+
React.useEffect(() => {
|
|
104
|
+
if (!rotated || core != null || coreSetup == null) return;
|
|
105
|
+
let cancelled = false;
|
|
106
|
+
coreSetup("query_progress").then((instance) => {
|
|
107
|
+
if (!cancelled) setCore(instance);
|
|
108
|
+
}, () => {});
|
|
109
|
+
return () => {
|
|
110
|
+
cancelled = true;
|
|
111
|
+
};
|
|
112
|
+
}, [
|
|
113
|
+
rotated,
|
|
114
|
+
core,
|
|
115
|
+
coreSetup
|
|
116
|
+
]);
|
|
117
|
+
const follower = React.useRef(null);
|
|
118
|
+
React.useEffect(() => () => {
|
|
119
|
+
follower.current?.destroy();
|
|
120
|
+
follower.current = null;
|
|
121
|
+
}, []);
|
|
122
|
+
return React.useMemo(() => {
|
|
123
|
+
if (!rotated || core == null) {
|
|
124
|
+
follower.current?.destroy();
|
|
125
|
+
follower.current = null;
|
|
126
|
+
return progress;
|
|
127
|
+
}
|
|
128
|
+
const orientation = progress.structure.read().layoutConfig()?.input()?.orientation() ?? dashql.buffers.profile.ProfileLayoutOrientation.LEFT_TO_RIGHT;
|
|
129
|
+
follower.current ??= new QueryProgressFollower(core, createProfileLayoutConfig(rotateProfileLayoutOrientation(orientation)));
|
|
130
|
+
return follower.current.follow(progress) ?? progress;
|
|
131
|
+
}, [
|
|
132
|
+
core,
|
|
133
|
+
progress,
|
|
134
|
+
rotated
|
|
135
|
+
]);
|
|
136
|
+
}
|
|
137
|
+
function ProfileProgressDetails(props) {
|
|
138
|
+
const [rotated, setRotated] = React.useState(false);
|
|
139
|
+
const progress = useRotatedProgress(props.progress, rotated, useHost().setupCore);
|
|
140
|
+
const rotate = React.useCallback(() => setRotated((value) => !value), []);
|
|
141
|
+
if (!React.useMemo(() => progress.structure.read().operatorsLength() > 0, [progress.structure])) return null;
|
|
142
|
+
return /* @__PURE__ */ jsx("div", {
|
|
143
|
+
className: profile,
|
|
144
|
+
style: props.height == null ? void 0 : { height: props.height },
|
|
145
|
+
"data-testid": "query-progress-profile",
|
|
146
|
+
children: /* @__PURE__ */ jsx(QueryProfileView, {
|
|
147
|
+
plan: progress.structure,
|
|
148
|
+
execution: progress.execution,
|
|
149
|
+
onRotate: rotate,
|
|
150
|
+
showProgress: true,
|
|
151
|
+
fill: true
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function QueryProgressPanel(props) {
|
|
156
|
+
const { query } = props;
|
|
157
|
+
const { downloadFile } = useHost();
|
|
158
|
+
const progress = query.progress ?? null;
|
|
159
|
+
const profileProgress = progress?.profileProgress ?? null;
|
|
160
|
+
const queryState = profileProgress?.execution.query ?? null;
|
|
161
|
+
const active = isActive(query.status);
|
|
162
|
+
const elapsedMs = useElapsed(query);
|
|
163
|
+
const work = workOf(queryState);
|
|
164
|
+
const fraction = useMonotonicFraction(query.queryId, work);
|
|
165
|
+
const structure = profileProgress?.structure ?? null;
|
|
166
|
+
const countsSplits = React.useMemo(() => structure?.read().engine() === dashql.buffers.profile.ProfileEngine.TRINO, [structure]);
|
|
167
|
+
const rows = stat(queryState, view.ProfileStatsField.TUPLES_IN, (s) => s.tuplesIn) ?? progress?.rowsProcessed ?? null;
|
|
168
|
+
const cpuUs = stat(queryState, view.ProfileStatsField.CPU_TIME, (s) => s.cpuTimeUs);
|
|
169
|
+
const memory = stat(queryState, view.ProfileStatsField.MEMORY_BYTES, (s) => s.memoryBytes);
|
|
170
|
+
const spilled = stat(queryState, view.ProfileStatsField.SPILLED_BYTES, (s) => s.spilledBytes);
|
|
171
|
+
const phase = active ? progress?.phase ?? null : null;
|
|
172
|
+
const phaseLabel = phase != null ? formatPhase(phase) : QueryExecutionStatus[query.status] != null ? formatPhase(QueryExecutionStatus[query.status]) : null;
|
|
173
|
+
const seconds = elapsedMs / 1e3;
|
|
174
|
+
const [profileOpen, setProfileOpen] = React.useState(false);
|
|
175
|
+
const showsProfile = props.showProfile === true && profileProgress != null;
|
|
176
|
+
const hasOperators = React.useMemo(() => (structure?.read().operatorsLength() ?? 0) > 0, [structure]);
|
|
177
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
178
|
+
className: container,
|
|
179
|
+
"data-testid": "query-progress-panel",
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ jsx(TabHeader, {
|
|
182
|
+
title: "Progress",
|
|
183
|
+
detail: phaseLabel,
|
|
184
|
+
actions: showsProfile ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DownloadRecordingButton, {
|
|
185
|
+
queryId: query.queryId,
|
|
186
|
+
progress: profileProgress,
|
|
187
|
+
downloadFile
|
|
188
|
+
}), hasOperators && /* @__PURE__ */ jsx(IconButton, {
|
|
189
|
+
variant: ButtonVariant.Invisible,
|
|
190
|
+
size: ButtonSize.Small,
|
|
191
|
+
"aria-label": "Open the query plan",
|
|
192
|
+
description: "Open the plan with the progress of its stages in a large card",
|
|
193
|
+
"data-testid": "open-query-profile",
|
|
194
|
+
onClick: () => setProfileOpen(true),
|
|
195
|
+
children: /* @__PURE__ */ jsx(ScreenFullIcon, { size: 16 })
|
|
196
|
+
})] }) : void 0
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ jsxs("div", {
|
|
199
|
+
className: strip,
|
|
200
|
+
children: [/* @__PURE__ */ jsx(ProgressBar, {
|
|
201
|
+
fraction: !active && query.status === QueryExecutionStatus.SUCCEEDED ? 1 : fraction,
|
|
202
|
+
label: "Query progress",
|
|
203
|
+
active
|
|
204
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
205
|
+
className: figures,
|
|
206
|
+
children: [
|
|
207
|
+
/* @__PURE__ */ jsx(Figure, {
|
|
208
|
+
label: "Elapsed",
|
|
209
|
+
value: formatElapsed(elapsedMs)
|
|
210
|
+
}),
|
|
211
|
+
/* @__PURE__ */ jsx(Figure, {
|
|
212
|
+
label: "Splits",
|
|
213
|
+
value: work == null || !countsSplits ? null : `${formatCompactCount(work.done)} / ${formatCompactCount(work.total)}`
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ jsx(Figure, {
|
|
216
|
+
label: "Rows",
|
|
217
|
+
value: rows == null ? null : formatCompactCount(rows)
|
|
218
|
+
}),
|
|
219
|
+
/* @__PURE__ */ jsx(Figure, {
|
|
220
|
+
label: "Rows/s",
|
|
221
|
+
value: rows == null || seconds < .5 ? null : formatCompactCount(rows / seconds)
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ jsx(Figure, {
|
|
224
|
+
label: "CPU",
|
|
225
|
+
value: cpuUs == null ? null : formatElapsed(cpuUs / 1e3)
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ jsx(Figure, {
|
|
228
|
+
label: "Memory",
|
|
229
|
+
value: memory == null ? null : formatCompactBytes(memory)
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ jsx(Figure, {
|
|
232
|
+
label: "Spilled",
|
|
233
|
+
value: spilled == null || spilled === 0 ? null : formatCompactBytes(spilled)
|
|
234
|
+
})
|
|
235
|
+
]
|
|
236
|
+
})]
|
|
237
|
+
}),
|
|
238
|
+
showsProfile && /* @__PURE__ */ jsx(ProfileProgressDetails, {
|
|
239
|
+
progress: profileProgress,
|
|
240
|
+
height: props.profileHeight
|
|
241
|
+
}),
|
|
242
|
+
showsProfile && profileOpen && /* @__PURE__ */ jsx(QueryProfileOverlay, {
|
|
243
|
+
onClose: () => setProfileOpen(false),
|
|
244
|
+
children: /* @__PURE__ */ jsx(ProfileProgressDetails, {
|
|
245
|
+
progress: profileProgress,
|
|
246
|
+
height: "100%"
|
|
247
|
+
})
|
|
248
|
+
})
|
|
249
|
+
]
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
function hasQueryProgress(query) {
|
|
253
|
+
return query?.latestProgressUpdate?.profile?.structure != null;
|
|
254
|
+
}
|
|
255
|
+
export { ProfileProgressDetails, QueryProgressPanel, hasQueryProgress };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var container = "dashql_container_PftaxE";
|
|
2
|
+
var strip = "dashql_strip_4nmlaU";
|
|
3
|
+
var figures = "dashql_figures_QgXn4X";
|
|
4
|
+
var figure = "dashql_figure_XP74DM";
|
|
5
|
+
var figure_label = "dashql_figure_label_8tEocJ";
|
|
6
|
+
var figure_value = "dashql_figure_value_6nRH3j";
|
|
7
|
+
var bar = "dashql_bar_WVW2tK";
|
|
8
|
+
var bar_fill = "dashql_bar_fill_LdIjQA";
|
|
9
|
+
var profile = "dashql_profile_N5STZ5";
|
|
10
|
+
export { bar, bar_fill, container, figure, figure_label, figure_value, figures, profile, strip };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as dashql from '@akohn/dashql';
|
|
3
|
+
import { type CellDetailProps } from '../data_table/data_table.js';
|
|
4
|
+
export interface SqlText {
|
|
5
|
+
hasErrors: boolean;
|
|
6
|
+
formattedText: string | null;
|
|
7
|
+
}
|
|
8
|
+
export type DetectSql = (text: string) => SqlText | null;
|
|
9
|
+
interface DetectedFormats {
|
|
10
|
+
json: object | null;
|
|
11
|
+
sql: (SqlText & {
|
|
12
|
+
originalText: string;
|
|
13
|
+
}) | null;
|
|
14
|
+
plan: string | null;
|
|
15
|
+
}
|
|
16
|
+
export declare function detectFormats(value: string | null, detectSql: DetectSql | null): DetectedFormats;
|
|
17
|
+
export declare function detectStructuredFormats(value: object): DetectedFormats;
|
|
18
|
+
export declare const STRUCTURED_ARRAY_PAGE_SIZE = 100;
|
|
19
|
+
export declare function structuredValueToText(value: object): string;
|
|
20
|
+
export interface CellDetailViews {
|
|
21
|
+
rawView: (text: string) => React.ReactNode;
|
|
22
|
+
sqlView: (text: string) => React.ReactNode;
|
|
23
|
+
planView: (props: {
|
|
24
|
+
engine: dashql.buffers.profile.ProfileEngine;
|
|
25
|
+
planText: string;
|
|
26
|
+
className: string;
|
|
27
|
+
fallback: React.ReactNode;
|
|
28
|
+
}) => React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export interface CellDetailOverlayProps extends CellDetailProps, CellDetailViews {
|
|
31
|
+
detectSql: DetectSql | null;
|
|
32
|
+
}
|
|
33
|
+
export declare function CellDetailOverlay(props: CellDetailOverlayProps): React.JSX.Element | null;
|
|
34
|
+
export {};
|