@perspective-dev/viewer 5.3.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/perspective-viewer.js +8 -8
- package/dist/cdn/perspective-viewer.js.map +3 -3
- package/dist/css/blueprint.css +1 -0
- package/dist/css/botanical.css +1 -1
- package/dist/css/dracula.css +1 -1
- package/dist/css/eggplant.css +1 -0
- package/dist/css/gruvbox-dark.css +1 -1
- package/dist/css/gruvbox.css +1 -1
- package/dist/css/icons.css +1 -1
- package/dist/css/intl/ar.css +1 -0
- package/dist/css/intl/de.css +1 -1
- package/dist/css/intl/es.css +1 -1
- package/dist/css/intl/fr.css +1 -1
- package/dist/css/intl/ja.css +1 -1
- package/dist/css/intl/pt.css +1 -1
- package/dist/css/intl/zh.css +1 -1
- package/dist/css/intl.css +1 -1
- package/dist/css/ledger.css +1 -0
- package/dist/css/monokai.css +1 -1
- package/dist/css/nord.css +1 -0
- package/dist/css/phosphor.css +1 -1
- package/dist/css/pro-dark.css +1 -1
- package/dist/css/pro.css +1 -1
- package/dist/css/solarized-dark.css +1 -1
- package/dist/css/solarized.css +1 -1
- package/dist/css/themes.css +1 -1
- package/dist/css/vaporwave.css +1 -1
- package/dist/css/velvet.css +1 -0
- package/dist/docs/perspective-docs.json +1 -1
- package/dist/esm/column-format.d.ts +16 -3
- package/dist/esm/extensions.d.ts +0 -5
- package/dist/esm/perspective-viewer.inline.js +7 -7
- package/dist/esm/perspective-viewer.inline.js.map +3 -3
- package/dist/esm/perspective-viewer.js +8 -8
- package/dist/esm/perspective-viewer.js.map +3 -3
- package/dist/esm/ts-rs/ViewOnUpdateResp.d.ts +1 -1
- package/dist/wasm/perspective-viewer.d.ts +62 -73
- package/dist/wasm/perspective-viewer.js +230 -238
- package/dist/wasm/perspective-viewer.wasm +0 -0
- package/dist/wasm/perspective-viewer.wasm.d.ts +18 -28
- package/package.json +7 -7
- package/src/css/_context_menu.css +1 -1
- package/src/css/_dropdown_menu.css +1 -1
- package/src/css/_viewer_bundle.css +7 -8
- package/src/css/column-dropdown.css +0 -3
- package/src/css/column-selector.css +8 -5
- package/src/css/column-settings-panel.css +0 -206
- package/src/css/column-style.css +95 -0
- package/src/css/config-selector.css +18 -10
- package/src/css/filter-dropdown.css +5 -5
- package/src/css/form/debug.css +28 -4
- package/src/css/function-dropdown.css +5 -5
- package/src/css/panel-tab.css +23 -0
- package/src/css/plugin-selector.css +6 -5
- package/src/css/render-warning.css +1 -1
- package/src/css/status-bar.css +52 -21
- package/src/css/type-icon.css +1 -3
- package/src/css/{containers → ui/containers}/context-menu.css +22 -16
- package/src/css/ui/containers/dropdown-menu-items.css +66 -0
- package/src/css/{containers → ui/containers}/dropdown-menu.css +8 -53
- package/src/css/{containers → ui/containers}/tabs.css +13 -3
- package/src/css/{dom → ui/dom}/select.css +19 -8
- package/src/css/viewer.css +32 -31
- package/src/rust/agent/tools.rs +5 -2
- package/src/rust/components/chat_panel.rs +1 -1
- package/src/rust/components/{form/code_editor.rs → code_editor.rs} +4 -2
- package/src/rust/components/column_dropdown.rs +2 -2
- package/src/rust/components/column_selector/active_column.rs +15 -9
- package/src/rust/components/column_selector/aggregate_selector.rs +1 -1
- package/src/rust/components/column_selector/config_selector.rs +2 -2
- package/src/rust/components/column_selector/filter_column.rs +8 -5
- package/src/rust/components/column_selector/inactive_column.rs +4 -2
- package/src/rust/components/column_selector/pivot_column.rs +4 -3
- package/src/rust/components/column_selector/sort_column.rs +7 -4
- package/src/rust/components/column_selector.rs +3 -3
- package/src/rust/components/column_settings_sidebar/style_tab/agg_depth_selector.rs +1 -1
- package/src/rust/components/column_settings_sidebar/style_tab/primitive_field.rs +15 -17
- package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_selector.rs +1 -1
- package/src/rust/components/column_settings_sidebar/style_tab.rs +296 -238
- package/src/rust/components/column_settings_sidebar.rs +3 -4
- package/src/rust/components/copy_dropdown.rs +1 -1
- package/src/rust/components/datetime_column_style/custom.rs +1 -3
- package/src/rust/components/datetime_column_style/simple.rs +16 -6
- package/src/rust/components/datetime_column_style.rs +51 -12
- package/src/rust/components/{form/debug.rs → debug_panel.rs} +5 -5
- package/src/rust/components/{containers/dragdrop_list.rs → dragdrop_list.rs} +2 -10
- package/src/rust/components/export_dropdown.rs +1 -1
- package/src/rust/components/expression_editor.rs +1 -1
- package/src/rust/components/filter_dropdown.rs +2 -2
- package/src/rust/components/function_dropdown.rs +2 -2
- package/src/rust/components/main_panel/frame_theme.rs +3 -59
- package/src/rust/components/main_panel/reconcile.rs +9 -4
- package/src/rust/components/main_panel/render.rs +62 -11
- package/src/rust/components/main_panel/update.rs +39 -10
- package/src/rust/components/main_panel.rs +26 -2
- package/src/rust/components/mod.rs +5 -7
- package/src/rust/components/new_panel_menu.rs +97 -0
- package/src/rust/components/number_series_style.rs +2 -3
- package/src/rust/components/panel_menu.rs +61 -87
- package/src/rust/components/panel_tab.rs +100 -43
- package/src/rust/components/plugin_tab.rs +125 -87
- package/src/rust/components/render_warning.rs +2 -2
- package/src/rust/components/{status_bar_counter.rs → rows_counter.rs} +10 -10
- package/src/rust/components/settings_panel.rs +3 -2
- package/src/rust/components/status_bar.rs +113 -20
- package/src/rust/components/status_indicator.rs +5 -14
- package/src/rust/components/string_column_style.rs +1 -2
- package/src/rust/components/{style/mod.rs → style.rs} +32 -15
- package/src/rust/components/style_controls/number_string_format/digits_section.rs +25 -15
- package/src/rust/components/style_controls/number_string_format/misc_section.rs +7 -3
- package/src/rust/components/style_controls/number_string_format/style_section.rs +2 -1
- package/src/rust/components/style_controls/number_string_format/types.rs +24 -0
- package/src/rust/components/style_controls/number_string_format.rs +37 -14
- package/src/rust/components/viewer/msg.rs +43 -30
- package/src/rust/components/viewer/panels.rs +50 -19
- package/src/rust/components/viewer/render.rs +15 -13
- package/src/rust/components/viewer/settings.rs +137 -68
- package/src/rust/components/viewer/snapshots.rs +5 -10
- package/src/rust/components/viewer/wiring.rs +1 -21
- package/src/rust/components/viewer.rs +15 -10
- package/src/rust/components/window_editor.rs +8 -9
- package/src/rust/config/column_config_schema.rs +358 -52
- package/src/rust/config/datetime_column_style.rs +4 -21
- package/src/rust/config/mod.rs +0 -2
- package/src/rust/config/number_string_format.rs +211 -18
- package/src/rust/config/workspace_config.rs +2 -1
- package/src/rust/custom_elements/debug_plugin.rs +1 -10
- package/src/rust/custom_elements/mod.rs +0 -3
- package/src/rust/custom_elements/viewer.rs +0 -18
- package/src/rust/js/plugin.rs +0 -86
- package/src/rust/lib.rs +12 -15
- package/src/rust/presentation/column_locator.rs +3 -7
- package/src/rust/presentation.rs +85 -38
- package/src/rust/queries/hosted_tables.rs +38 -0
- package/src/rust/queries/mod.rs +2 -0
- package/src/rust/queries/palette_set.rs +1 -1
- package/src/rust/queries/plugin_column_styles.rs +2 -2
- package/src/rust/renderer/activate.rs +1 -3
- package/src/rust/renderer/dispatch.rs +117 -30
- package/src/rust/renderer/limits.rs +24 -5
- package/src/rust/renderer/plugin_config.rs +56 -8
- package/src/rust/renderer/props.rs +2 -1
- package/src/rust/renderer.rs +14 -27
- package/src/rust/session/props.rs +4 -3
- package/src/rust/session/view_subscription.rs +19 -6
- package/src/rust/session.rs +38 -70
- package/src/rust/tasks/create_panel.rs +1 -1
- package/src/rust/tasks/dismiss_render_warning.rs +1 -1
- package/src/rust/tasks/eject.rs +1 -0
- package/src/rust/tasks/pipeline.rs +0 -60
- package/src/rust/tasks/presize_panels.rs +24 -1
- package/src/rust/tasks/restore_and_render.rs +0 -17
- package/src/rust/tasks/send_column_config.rs +1 -1
- package/src/rust/tasks/send_plugin_config.rs +1 -1
- package/src/rust/tasks/set_edit_mode.rs +1 -1
- package/src/rust/ui/containers/control_group.rs +113 -0
- package/src/rust/{components → ui}/containers/dropdown_menu.rs +5 -2
- package/src/rust/{components → ui}/containers/mod.rs +1 -4
- package/src/rust/{components → ui}/containers/scroll_panel.rs +0 -22
- package/src/rust/{components → ui}/containers/scroll_panel_item.rs +0 -13
- package/src/rust/{components → ui}/containers/select.rs +8 -8
- package/src/rust/{components → ui}/containers/sidebar.rs +5 -32
- package/src/rust/{components → ui}/containers/split_panel.rs +8 -80
- package/src/rust/{components → ui}/containers/tab_list.rs +15 -9
- package/src/rust/{components → ui}/context_menu.rs +8 -13
- package/src/rust/{presentation/drag_helpers.rs → ui/dragdrop.rs} +26 -31
- package/src/rust/{components → ui}/font_loader.rs +0 -26
- package/src/rust/{components → ui}/form/color_selector.rs +4 -2
- package/src/rust/ui/form/intl_label.rs +81 -0
- package/src/rust/{components → ui}/form/mirrored_textarea.rs +0 -53
- package/src/rust/{components → ui}/form/mod.rs +1 -10
- package/src/rust/{components → ui}/form/multi_stop_gradient_selector.rs +4 -5
- package/src/rust/{components → ui}/form/named_value_picker.rs +1 -6
- package/src/rust/{components → ui}/form/number_field.rs +1 -1
- package/src/rust/{components → ui}/form/number_range_field.rs +1 -1
- package/src/rust/{components → ui}/form/optional_field.rs +3 -1
- package/src/rust/{components → ui}/form/palette_selector.rs +4 -5
- package/src/rust/{components → ui}/form/select_enum_field.rs +2 -2
- package/src/rust/{components → ui}/form/select_value_field.rs +2 -2
- package/src/rust/ui/mod.rs +56 -0
- package/src/rust/ui/modal.rs +61 -0
- package/src/rust/{components → ui}/portal.rs +174 -79
- package/src/rust/{components/style/style_provider.rs → ui/style.rs} +4 -34
- package/src/rust/utils/completion.rs +0 -6
- package/src/rust/{config/css_scale.rs → utils/css.rs} +38 -35
- package/src/rust/utils/mod.rs +2 -0
- package/src/rust/workspace.rs +35 -0
- package/src/svg/boolean-type.svg +3 -2
- package/src/svg/checkbox-checked-icon.svg +4 -7
- package/src/svg/checkbox-hover.svg +3 -3
- package/src/svg/checkbox-off.svg +2 -3
- package/src/svg/checkbox-on.svg +3 -3
- package/src/svg/checkbox-unchecked-icon.svg +3 -3
- package/src/svg/datagrid-select-column.svg +8 -15
- package/src/svg/datagrid-select-region.svg +8 -15
- package/src/svg/datagrid-select-row-tree.svg +7 -12
- package/src/svg/datagrid-select-row.svg +8 -13
- package/src/svg/date-type.svg +4 -23
- package/src/svg/drawer-tab-hover.svg +4 -6
- package/src/svg/drawer-tab-invert-hover.svg +5 -5
- package/src/svg/drawer-tab-invert.svg +3 -5
- package/src/svg/drawer-tab.svg +5 -5
- package/src/svg/mega-menu-icons-candlestick.svg +5 -37
- package/src/svg/mega-menu-icons-ohlc.svg +4 -39
- package/src/svg/mega-menu-icons-sunburst.svg +4 -38
- package/src/svg/mega-menu-icons-treemap.svg +3 -43
- package/src/svg/mega-menu-icons-y-scatter.svg +12 -72
- package/src/svg/new-panel-icon.svg +4 -0
- package/src/svg/number-type.svg +3 -3
- package/src/svg/radio-hover.svg +3 -3
- package/src/svg/radio-off.svg +3 -3
- package/src/svg/radio-on.svg +3 -3
- package/src/svg/status_ok.svg +3 -26
- package/src/svg/string-type.svg +4 -8
- package/src/svg/theme-icon.svg +5 -5
- package/src/themes/blueprint.css +133 -0
- package/src/themes/botanical.css +3 -52
- package/src/themes/defaults.css +3 -144
- package/src/themes/dracula.css +1 -71
- package/src/themes/eggplant.css +131 -0
- package/src/themes/gruvbox-dark.css +2 -79
- package/src/themes/gruvbox.css +2 -40
- package/src/themes/icons.css +2 -10
- package/src/themes/intl/ar.css +185 -0
- package/src/themes/intl/de.css +65 -33
- package/src/themes/intl/es.css +60 -28
- package/src/themes/intl/fr.css +60 -28
- package/src/themes/intl/ja.css +62 -30
- package/src/themes/intl/pt.css +58 -26
- package/src/themes/intl/zh.css +68 -36
- package/src/themes/intl.css +42 -7
- package/src/themes/ledger.css +137 -0
- package/src/themes/monokai.css +1 -64
- package/src/themes/nord.css +131 -0
- package/src/themes/phosphor.css +1 -61
- package/src/themes/pro-dark.css +1 -52
- package/src/themes/pro.css +98 -0
- package/src/themes/solarized-dark.css +1 -46
- package/src/themes/solarized.css +1 -24
- package/src/themes/themes.css +10 -5
- package/src/themes/vaporwave.css +1 -57
- package/src/themes/velvet.css +132 -0
- package/src/ts/column-format.ts +52 -2
- package/src/ts/extensions.ts +0 -13
- package/src/ts/ts-rs/ViewOnUpdateResp.ts +1 -1
- package/src/css/plugin-settings-panel.css +0 -99
- package/src/rust/components/modal.rs +0 -177
- package/src/rust/custom_elements/copy_dropdown.rs +0 -219
- package/src/rust/custom_elements/export_dropdown.rs +0 -216
- package/src/rust/custom_elements/modal.rs +0 -299
- package/src/svg/dropdown-selector-light.svg +0 -3
- /package/dist/wasm/snippets/{perspective-viewer-39c3c3b28e3cbd48 → perspective-viewer-adc6f3f79141112b}/inline0.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-39c3c3b28e3cbd48 → perspective-viewer-adc6f3f79141112b}/inline1.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-39c3c3b28e3cbd48 → perspective-viewer-adc6f3f79141112b}/inline2.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-39c3c3b28e3cbd48 → perspective-viewer-adc6f3f79141112b}/inline3.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-39c3c3b28e3cbd48 → perspective-viewer-adc6f3f79141112b}/inline4.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-39c3c3b28e3cbd48 → perspective-viewer-adc6f3f79141112b}/inline5.js +0 -0
- /package/src/css/{containers → ui/containers}/scroll-panel.css +0 -0
- /package/src/css/{containers → ui/containers}/split-panel.css +0 -0
- /package/src/css/{dom → ui/dom}/checkbox.css +0 -0
- /package/src/css/{dom → ui/dom}/scrollbar.css +0 -0
- /package/src/css/{form → ui/form}/mirrored-textarea.css +0 -0
- /package/src/rust/components/{form → code_editor}/highlight.rs +0 -0
- /package/src/rust/{components → ui}/containers/sidebar_close_button.rs +0 -0
- /package/src/rust/{components → ui}/form/number_input.rs +0 -0
package/src/css/viewer.css
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
:host {
|
|
15
15
|
--settings-panel-z-index: 10;
|
|
16
16
|
--psp--color: #ff0000;
|
|
17
|
+
--psp-missing: "__MISSING__";
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
:host(.shift-active) .shift-alt-icon {
|
|
@@ -89,7 +90,9 @@
|
|
|
89
90
|
pointer-events: var(--override-content-pointer-events);
|
|
90
91
|
}
|
|
91
92
|
|
|
92
|
-
::slotted(
|
|
93
|
+
::slotted(
|
|
94
|
+
:not([slot^="statusbar-extra"]):not([slot^="tab-"]):not([slot="modal"])
|
|
95
|
+
) {
|
|
93
96
|
position: absolute;
|
|
94
97
|
inset: 0;
|
|
95
98
|
background-color: var(--psp--background-color) !important;
|
|
@@ -100,7 +103,10 @@
|
|
|
100
103
|
-1.75px 2.75px 0 2.75px var(--psp-inactive--color);
|
|
101
104
|
}
|
|
102
105
|
|
|
103
|
-
.overlay
|
|
106
|
+
.overlay
|
|
107
|
+
::slotted(
|
|
108
|
+
:not([slot^="statusbar-extra"]):not([slot^="tab-"]):not([slot="modal"])
|
|
109
|
+
) {
|
|
104
110
|
box-shadow:
|
|
105
111
|
2.25px 2.25px 0 2.25px var(--psp--background-color),
|
|
106
112
|
-2.25px 2.25px 0 2.25px var(--psp--background-color),
|
|
@@ -125,11 +131,6 @@
|
|
|
125
131
|
0 12.5px 0 -11.5px var(--psp-inactive--border-color);
|
|
126
132
|
}
|
|
127
133
|
|
|
128
|
-
:host input[type="number"]::-webkit-inner-spin-button {
|
|
129
|
-
transform: scale(1.5) translateX(-5px);
|
|
130
|
-
filter: var(--psp-input--filter);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
134
|
:host .sidebar_close_button {
|
|
134
135
|
position: absolute;
|
|
135
136
|
top: 0;
|
|
@@ -343,7 +344,6 @@
|
|
|
343
344
|
z-index: 0;
|
|
344
345
|
position: relative;
|
|
345
346
|
height: 100%;
|
|
346
|
-
box-shadow: var(--plugin--box-shadow, none);
|
|
347
347
|
overflow: hidden;
|
|
348
348
|
border: var(--psp-plugin--border, none);
|
|
349
349
|
background: var(
|
|
@@ -492,8 +492,9 @@
|
|
|
492
492
|
}
|
|
493
493
|
|
|
494
494
|
& > .split-panel-divider {
|
|
495
|
+
background-color: #00000020;
|
|
495
496
|
border-top: 1px solid var(--psp-inactive--color, #6e6e6e);
|
|
496
|
-
border-bottom:
|
|
497
|
+
border-bottom: 1px solid var(--psp-inactive--color, #6e6e6e);
|
|
497
498
|
margin-left: -9px;
|
|
498
499
|
margin-right: 0px;
|
|
499
500
|
flex: 0 0 4px;
|
|
@@ -589,9 +590,11 @@
|
|
|
589
590
|
}
|
|
590
591
|
|
|
591
592
|
.settings_tab {
|
|
593
|
+
overflow: hidden;
|
|
594
|
+
text-overflow: ellipsis;
|
|
592
595
|
border-right: 1px solid var(--psp-inactive--color);
|
|
593
596
|
cursor: pointer;
|
|
594
|
-
padding:
|
|
597
|
+
padding: 5px 8px 7px 8px;
|
|
595
598
|
font-size: var(--label--font-size, 0.75em);
|
|
596
599
|
text-transform: uppercase;
|
|
597
600
|
flex: 0 1 100px;
|
|
@@ -610,7 +613,7 @@
|
|
|
610
613
|
background-color: transparent;
|
|
611
614
|
border-bottom: 1px solid transparent;
|
|
612
615
|
box-shadow: 0px 9px 0px -8px var(--psp-inactive--color);
|
|
613
|
-
height:
|
|
616
|
+
height: 23px;
|
|
614
617
|
}
|
|
615
618
|
}
|
|
616
619
|
|
|
@@ -644,36 +647,28 @@
|
|
|
644
647
|
}
|
|
645
648
|
|
|
646
649
|
.sidebar_border {
|
|
647
|
-
height:
|
|
650
|
+
height: 3px;
|
|
651
|
+
border-bottom: 1px solid var(--psp-inactive--color, #6e6e6e);
|
|
648
652
|
width: 100%;
|
|
649
|
-
background-color:
|
|
650
|
-
margin-top: 1px;
|
|
653
|
+
background-color: rgba(0, 0, 0, 0.15);
|
|
651
654
|
flex-shrink: 0;
|
|
652
655
|
flex-grow: 0;
|
|
653
656
|
}
|
|
654
657
|
|
|
655
658
|
#query_tabbar_tab:before {
|
|
656
|
-
content: var(--psp-label--query-tab--content);
|
|
659
|
+
content: var(--psp-label--query-tab--content, var(--psp-missing));
|
|
657
660
|
}
|
|
658
661
|
|
|
659
662
|
#plugin_tabbar_tab:before {
|
|
660
|
-
content: var(--psp-label--plugin-tab--content);
|
|
663
|
+
content: var(--psp-label--plugin-tab--content, var(--psp-missing));
|
|
661
664
|
}
|
|
662
665
|
|
|
663
666
|
#debug_tabbar_tab:before {
|
|
664
|
-
content: var(--psp-label--debug-tab--content);
|
|
667
|
+
content: var(--psp-label--debug-tab--content, var(--psp-missing));
|
|
665
668
|
}
|
|
666
669
|
|
|
667
670
|
#chat_tabbar_tab:before {
|
|
668
|
-
content: var(--psp-label--chat-tab--content);
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
label#stack-label:before {
|
|
672
|
-
content: var(--psp-label--stack--content, "Stack");
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
label#alt_axis-label:before {
|
|
676
|
-
content: var(--psp-label--alt-axis--content, "Alt Axis");
|
|
671
|
+
content: var(--psp-label--chat-tab--content, var(--psp-missing));
|
|
677
672
|
}
|
|
678
673
|
}
|
|
679
674
|
|
|
@@ -858,7 +853,10 @@
|
|
|
858
853
|
user-select: none;
|
|
859
854
|
&:before {
|
|
860
855
|
text-transform: uppercase;
|
|
861
|
-
content: var(
|
|
856
|
+
content: var(
|
|
857
|
+
--psp-label--chat-reasoning--content,
|
|
858
|
+
var(--psp-missing)
|
|
859
|
+
);
|
|
862
860
|
font-size: var(--psp-label--font-size, 0.75em);
|
|
863
861
|
}
|
|
864
862
|
}
|
|
@@ -903,7 +901,7 @@
|
|
|
903
901
|
align-items: flex-end;
|
|
904
902
|
|
|
905
903
|
/* The prompt is a `MirroredTextarea` (see
|
|
906
|
-
* `form/mirrored-textarea.css`): it is exactly as tall as its
|
|
904
|
+
* `ui/form/mirrored-textarea.css`): it is exactly as tall as its
|
|
907
905
|
* text, so this wrapper owns the visible box and caps how far
|
|
908
906
|
* that growth goes before it scrolls instead. */
|
|
909
907
|
#chat_input_scroll {
|
|
@@ -938,7 +936,10 @@
|
|
|
938
936
|
* `placeholder` attribute is untranslatable and is
|
|
939
937
|
* kept only for assistive tech. */
|
|
940
938
|
&.is-empty:before {
|
|
941
|
-
content: var(
|
|
939
|
+
content: var(
|
|
940
|
+
--psp-label--chat-placeholder--content,
|
|
941
|
+
var(--psp-missing)
|
|
942
|
+
);
|
|
942
943
|
color: var(--psp-inactive--color, #6e6e6e);
|
|
943
944
|
}
|
|
944
945
|
}
|
|
@@ -970,11 +971,11 @@
|
|
|
970
971
|
}
|
|
971
972
|
|
|
972
973
|
#chat_send_button:before {
|
|
973
|
-
content: var(--psp-label--chat-send--content);
|
|
974
|
+
content: var(--psp-label--chat-send--content, var(--psp-missing));
|
|
974
975
|
}
|
|
975
976
|
|
|
976
977
|
#chat_stop_button:before {
|
|
977
|
-
content: var(--psp-label--chat-stop--content);
|
|
978
|
+
content: var(--psp-label--chat-stop--content, var(--psp-missing));
|
|
978
979
|
}
|
|
979
980
|
}
|
|
980
981
|
|
package/src/rust/agent/tools.rs
CHANGED
|
@@ -679,7 +679,7 @@ fn control_schema_entries(spec: &ControlSpec) -> Vec<(String, Value)> {
|
|
|
679
679
|
}),
|
|
680
680
|
)]
|
|
681
681
|
},
|
|
682
|
-
ControlSpec::DatetimeFormat => vec![(
|
|
682
|
+
ControlSpec::DatetimeFormat { .. } => vec![(
|
|
683
683
|
"date_format".to_owned(),
|
|
684
684
|
json!({ "description": "Datetime display format: a style preset or custom format fields" }),
|
|
685
685
|
)],
|
|
@@ -701,7 +701,7 @@ fn control_schema_entries(spec: &ControlSpec) -> Vec<(String, Value)> {
|
|
|
701
701
|
"symbols".to_owned(),
|
|
702
702
|
json!({ "type": "object", "description": "Map of column values to symbol names" }),
|
|
703
703
|
)],
|
|
704
|
-
ControlSpec::NumberFormat => vec![(
|
|
704
|
+
ControlSpec::NumberFormat { .. } => vec![(
|
|
705
705
|
"number_format".to_owned(),
|
|
706
706
|
json!({ "type": "object", "description": "Intl.NumberFormat-style options" }),
|
|
707
707
|
)],
|
|
@@ -709,6 +709,9 @@ fn control_schema_entries(spec: &ControlSpec) -> Vec<(String, Value)> {
|
|
|
709
709
|
"aggregate_depth".to_owned(),
|
|
710
710
|
json!({ "type": "integer", "description": "Group-by rollup depth override" }),
|
|
711
711
|
)],
|
|
712
|
+
ControlSpec::Group { fields, .. } => {
|
|
713
|
+
fields.iter().flat_map(control_schema_entries).collect()
|
|
714
|
+
},
|
|
712
715
|
}
|
|
713
716
|
}
|
|
714
717
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
use yew::prelude::*;
|
|
19
19
|
|
|
20
20
|
use crate::agent::{AgentSlot, ChatEntry, render_markdown};
|
|
21
|
-
use crate::
|
|
21
|
+
use crate::ui::MirroredTextarea;
|
|
22
22
|
|
|
23
23
|
#[derive(Properties, PartialEq)]
|
|
24
24
|
struct ChatReasoningProps {
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
|
|
11
11
|
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
12
12
|
|
|
13
|
+
mod highlight;
|
|
14
|
+
|
|
13
15
|
use std::rc::Rc;
|
|
14
16
|
|
|
15
17
|
use perspective_client::ExprValidationError;
|
|
@@ -17,10 +19,10 @@ use wasm_bindgen::JsCast;
|
|
|
17
19
|
use web_sys::*;
|
|
18
20
|
use yew::prelude::*;
|
|
19
21
|
|
|
20
|
-
use
|
|
21
|
-
use crate::components::form::mirrored_textarea::MirroredTextarea;
|
|
22
|
+
use self::highlight::highlight;
|
|
22
23
|
use crate::components::function_dropdown::{FunctionDropDownElement, FunctionDropDownPortal};
|
|
23
24
|
use crate::exprtk::{Cursor, tokenize};
|
|
25
|
+
use crate::ui::MirroredTextarea;
|
|
24
26
|
use crate::utils::*;
|
|
25
27
|
|
|
26
28
|
#[derive(Properties, PartialEq)]
|
|
@@ -21,9 +21,9 @@ use yew::html::ImplicitClone;
|
|
|
21
21
|
use yew::prelude::*;
|
|
22
22
|
|
|
23
23
|
use super::column_selector::InPlaceColumn;
|
|
24
|
-
use super::portal::PortalModal;
|
|
25
24
|
use super::style::StyleSurface;
|
|
26
25
|
use crate::session::Session;
|
|
26
|
+
use crate::ui::PortalModal;
|
|
27
27
|
use crate::utils::*;
|
|
28
28
|
use crate::*;
|
|
29
29
|
|
|
@@ -216,7 +216,7 @@ impl Component for ColumnDropDownPortal {
|
|
|
216
216
|
html! {
|
|
217
217
|
<PortalModal
|
|
218
218
|
tag_name="perspective-dropdown"
|
|
219
|
-
|
|
219
|
+
sheet={StyleSurface::ColumnDropdown.sheet()}
|
|
220
220
|
{target}
|
|
221
221
|
own_focus=false
|
|
222
222
|
{on_close}
|
|
@@ -70,6 +70,9 @@ pub struct ActiveColumnProps {
|
|
|
70
70
|
#[prop_or_default]
|
|
71
71
|
pub is_window: bool,
|
|
72
72
|
|
|
73
|
+
#[prop_or_default]
|
|
74
|
+
pub is_last_column: bool,
|
|
75
|
+
|
|
73
76
|
/// Whether the expression/config edit button should be shown. Computed
|
|
74
77
|
/// by the parent (`is_expression || can_render_column_styles`).
|
|
75
78
|
#[prop_or_default]
|
|
@@ -287,7 +290,7 @@ impl Component for ActiveColumn {
|
|
|
287
290
|
<div
|
|
288
291
|
class={outer_classes}
|
|
289
292
|
data-label={label}
|
|
290
|
-
style={format!("--default-column-title:var(--
|
|
293
|
+
style={format!("--default-column-title:var(--psp-label--column-{path}--content)")}
|
|
291
294
|
data-index={ctx.props().idx.to_string()}
|
|
292
295
|
ondragenter={ondragenter.clone()}
|
|
293
296
|
>
|
|
@@ -301,7 +304,7 @@ impl Component for ActiveColumn {
|
|
|
301
304
|
<div
|
|
302
305
|
class={outer_classes}
|
|
303
306
|
data-label={label}
|
|
304
|
-
style={format!("--default-column-title:var(--
|
|
307
|
+
style={format!("--default-column-title:var(--psp-label--column-{path}--content)")}
|
|
305
308
|
data-index={ctx.props().idx.to_string()}
|
|
306
309
|
ondragenter={ondragenter.clone()}
|
|
307
310
|
>
|
|
@@ -310,7 +313,9 @@ impl Component for ActiveColumn {
|
|
|
310
313
|
}
|
|
311
314
|
},
|
|
312
315
|
((label, ColumnState::Named(name)), Some(col_type)) => {
|
|
313
|
-
let is_required =
|
|
316
|
+
let is_required =
|
|
317
|
+
ctx.props().is_last_column || ctx.props().get_is_required(ctx.props().idx);
|
|
318
|
+
|
|
314
319
|
let remove_column = if is_required {
|
|
315
320
|
None
|
|
316
321
|
} else {
|
|
@@ -330,11 +335,12 @@ impl Component for ActiveColumn {
|
|
|
330
335
|
let event_name = name.to_owned();
|
|
331
336
|
let presentation = ctx.props().presentation.clone();
|
|
332
337
|
move |event: DragEvent| {
|
|
333
|
-
presentation.set_drag_image(&event)
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
+
if presentation.set_drag_image(&event) {
|
|
339
|
+
presentation.notify_drag_start(
|
|
340
|
+
event_name.to_string(),
|
|
341
|
+
DragEffect::Move(DragTarget::Active),
|
|
342
|
+
);
|
|
343
|
+
}
|
|
338
344
|
|
|
339
345
|
MouseLeave(false)
|
|
340
346
|
}
|
|
@@ -359,7 +365,7 @@ impl Component for ActiveColumn {
|
|
|
359
365
|
<div
|
|
360
366
|
class={outer_classes}
|
|
361
367
|
data-label={label}
|
|
362
|
-
style={format!("--default-column-title:var(--
|
|
368
|
+
style={format!("--default-column-title:var(--psp-label--column-{path}--content)")}
|
|
363
369
|
data-index={ctx.props().idx.to_string()}
|
|
364
370
|
{onmouseover}
|
|
365
371
|
{onmouseout}
|
|
@@ -16,10 +16,10 @@ use itertools::Itertools;
|
|
|
16
16
|
use perspective_client::config::*;
|
|
17
17
|
use yew::prelude::*;
|
|
18
18
|
|
|
19
|
-
use crate::components::containers::select::*;
|
|
20
19
|
use crate::renderer::*;
|
|
21
20
|
use crate::session::*;
|
|
22
21
|
use crate::tasks::apply_and_render;
|
|
22
|
+
use crate::ui::{Select, SelectItem};
|
|
23
23
|
use crate::utils::{PtrEqRc, spawn_owned};
|
|
24
24
|
|
|
25
25
|
#[derive(Properties)]
|
|
@@ -21,8 +21,7 @@ use super::filter_column::*;
|
|
|
21
21
|
use super::pivot_column::*;
|
|
22
22
|
use super::sort_column::*;
|
|
23
23
|
use crate::components::column_dropdown::{ColumnDropDownElement, ColumnDropDownPortal};
|
|
24
|
-
use crate::components::
|
|
25
|
-
use crate::components::containers::select::{Select, SelectItem};
|
|
24
|
+
use crate::components::dragdrop_list::*;
|
|
26
25
|
use crate::components::filter_dropdown::{FilterDropDownElement, FilterDropDownPortal};
|
|
27
26
|
use crate::config::PluginStaticConfig;
|
|
28
27
|
use crate::presentation::Presentation;
|
|
@@ -30,6 +29,7 @@ use crate::renderer::*;
|
|
|
30
29
|
use crate::session::drag_drop_update::*;
|
|
31
30
|
use crate::session::*;
|
|
32
31
|
use crate::tasks::apply_and_render;
|
|
32
|
+
use crate::ui::{Select, SelectItem};
|
|
33
33
|
use crate::utils::*;
|
|
34
34
|
|
|
35
35
|
#[derive(Clone, Properties)]
|
|
@@ -19,14 +19,14 @@ use wasm_bindgen::JsCast;
|
|
|
19
19
|
use web_sys::*;
|
|
20
20
|
use yew::prelude::*;
|
|
21
21
|
|
|
22
|
-
use crate::components::
|
|
23
|
-
use crate::components::containers::select::*;
|
|
22
|
+
use crate::components::dragdrop_list::*;
|
|
24
23
|
use crate::components::filter_dropdown::FilterDropDownElement;
|
|
25
24
|
use crate::components::type_icon::TypeIcon;
|
|
26
25
|
use crate::presentation::Presentation;
|
|
27
26
|
use crate::renderer::*;
|
|
28
27
|
use crate::session::*;
|
|
29
28
|
use crate::tasks::apply_and_render;
|
|
29
|
+
use crate::ui::{Select, SelectItem};
|
|
30
30
|
use crate::utils::*;
|
|
31
31
|
|
|
32
32
|
#[derive(Clone, Properties)]
|
|
@@ -240,9 +240,12 @@ impl Component for FilterColumn {
|
|
|
240
240
|
let event_name = ctx.props().filter.column().to_owned();
|
|
241
241
|
let presentation = ctx.props().presentation.clone();
|
|
242
242
|
move |event: DragEvent| {
|
|
243
|
-
presentation.set_drag_image(&event)
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
if presentation.set_drag_image(&event) {
|
|
244
|
+
presentation.notify_drag_start(
|
|
245
|
+
event_name.to_string(),
|
|
246
|
+
DragEffect::Move(DragTarget::Filter),
|
|
247
|
+
)
|
|
248
|
+
}
|
|
246
249
|
}
|
|
247
250
|
});
|
|
248
251
|
|
|
@@ -141,8 +141,10 @@ impl Component for InactiveColumn {
|
|
|
141
141
|
let event_name = ctx.props().name.to_owned();
|
|
142
142
|
let presentation = ctx.props().presentation.clone();
|
|
143
143
|
move |event: DragEvent| {
|
|
144
|
-
presentation.set_drag_image(&event)
|
|
145
|
-
|
|
144
|
+
if presentation.set_drag_image(&event) {
|
|
145
|
+
presentation.notify_drag_start(event_name.to_string(), DragEffect::Copy);
|
|
146
|
+
}
|
|
147
|
+
|
|
146
148
|
MouseLeave(true)
|
|
147
149
|
}
|
|
148
150
|
});
|
|
@@ -14,7 +14,7 @@ use perspective_client::config::ColumnType;
|
|
|
14
14
|
use web_sys::*;
|
|
15
15
|
use yew::prelude::*;
|
|
16
16
|
|
|
17
|
-
use crate::components::
|
|
17
|
+
use crate::components::dragdrop_list::*;
|
|
18
18
|
use crate::components::type_icon::TypeIcon;
|
|
19
19
|
use crate::presentation::Presentation;
|
|
20
20
|
use crate::session::*;
|
|
@@ -73,8 +73,9 @@ impl Component for PivotColumn {
|
|
|
73
73
|
let presentation = ctx.props().presentation.clone();
|
|
74
74
|
let action = ctx.props().action;
|
|
75
75
|
move |event: DragEvent| {
|
|
76
|
-
presentation.set_drag_image(&event)
|
|
77
|
-
|
|
76
|
+
if presentation.set_drag_image(&event) {
|
|
77
|
+
presentation.notify_drag_start(event_name.to_string(), DragEffect::Move(action))
|
|
78
|
+
}
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
|
|
@@ -14,7 +14,7 @@ use perspective_client::config::*;
|
|
|
14
14
|
use web_sys::*;
|
|
15
15
|
use yew::prelude::*;
|
|
16
16
|
|
|
17
|
-
use crate::components::
|
|
17
|
+
use crate::components::dragdrop_list::*;
|
|
18
18
|
use crate::components::type_icon::TypeIcon;
|
|
19
19
|
use crate::presentation::Presentation;
|
|
20
20
|
use crate::renderer::*;
|
|
@@ -104,9 +104,12 @@ impl Component for SortColumn {
|
|
|
104
104
|
let event_name = ctx.props().sort.0.to_owned();
|
|
105
105
|
let presentation = ctx.props().presentation.clone();
|
|
106
106
|
move |event: DragEvent| {
|
|
107
|
-
presentation.set_drag_image(&event)
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
if presentation.set_drag_image(&event) {
|
|
108
|
+
presentation.notify_drag_start(
|
|
109
|
+
event_name.to_string(),
|
|
110
|
+
DragEffect::Move(DragTarget::Sort),
|
|
111
|
+
)
|
|
112
|
+
}
|
|
110
113
|
}
|
|
111
114
|
});
|
|
112
115
|
|
|
@@ -38,10 +38,7 @@ use self::active_column::*;
|
|
|
38
38
|
use self::add_expression_button::AddExpressionButton;
|
|
39
39
|
use self::config_selector::ConfigSelector;
|
|
40
40
|
use self::inactive_column::*;
|
|
41
|
-
use super::containers::scroll_panel::*;
|
|
42
|
-
use super::containers::split_panel::{Orientation, SplitPanel};
|
|
43
41
|
use crate::components::column_dropdown::{ColumnDropDownElement, ColumnDropDownPortal};
|
|
44
|
-
use crate::components::containers::scroll_panel_item::ScrollPanelItem;
|
|
45
42
|
use crate::config::PluginStaticConfig;
|
|
46
43
|
use crate::presentation::{ColumnLocator, ColumnSettingsTarget, DragDropContainer, Presentation};
|
|
47
44
|
use crate::queries::{
|
|
@@ -51,6 +48,7 @@ use crate::renderer::*;
|
|
|
51
48
|
use crate::session::drag_drop_update::*;
|
|
52
49
|
use crate::session::*;
|
|
53
50
|
use crate::tasks::apply_and_render;
|
|
51
|
+
use crate::ui::{Orientation, ScrollPanel, ScrollPanelItem, SplitPanel};
|
|
54
52
|
use crate::utils::*;
|
|
55
53
|
|
|
56
54
|
#[derive(Properties)]
|
|
@@ -333,6 +331,7 @@ impl Component for ColumnSelector {
|
|
|
333
331
|
prop_config.clone()
|
|
334
332
|
};
|
|
335
333
|
|
|
334
|
+
let is_last_column = config.columns.len() == 1;
|
|
336
335
|
let is_aggregated = config.is_aggregated();
|
|
337
336
|
let columns_iter = ColumnsIteratorSet::new(&config, metadata, renderer, presentation);
|
|
338
337
|
let onselect = ctx.link().callback(|()| Redraw);
|
|
@@ -468,6 +467,7 @@ impl Component for ColumnSelector {
|
|
|
468
467
|
{is_window}
|
|
469
468
|
{show_edit_btn}
|
|
470
469
|
{col_type}
|
|
470
|
+
{is_last_column}
|
|
471
471
|
view_config={config.clone()}
|
|
472
472
|
metadata={metadata.clone()}
|
|
473
473
|
{name}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
use perspective_client::clone;
|
|
14
14
|
use yew::{Callback, Html, Properties, function_component, html};
|
|
15
15
|
|
|
16
|
-
use crate::components::form::number_field::NumberField;
|
|
17
16
|
use crate::config::ColumnConfigFieldUpdate;
|
|
17
|
+
use crate::ui::NumberField;
|
|
18
18
|
|
|
19
19
|
// ░░░█▀█░█▀▄░█▀█░█▀█░█▀▀░█▀▄░▀█▀░▀█▀░█▀▀░█▀▀░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
20
20
|
// ░░░█▀▀░█▀▄░█░█░█▀▀░█▀▀░█▀▄░░█░░░█░░█▀▀░▀▀█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
@@ -26,17 +26,14 @@ use wasm_bindgen::JsCast;
|
|
|
26
26
|
use web_sys::{HtmlInputElement, MouseEvent};
|
|
27
27
|
use yew::{Callback, Html, Properties, function_component, html, use_callback};
|
|
28
28
|
|
|
29
|
-
use crate::
|
|
30
|
-
use crate::
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
use crate::
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
ColumnConfigFieldUpdate, CssColor, CssGradient, CssKind, CssPalette, EnumVariant,
|
|
38
|
-
GradientStopSpec, NamedValue, canonicalize_css_color, discrete_pair, gradient_to_css,
|
|
39
|
-
palette_name_for,
|
|
29
|
+
use crate::config::{ColumnConfigFieldUpdate, EnumVariant, discrete_pair};
|
|
30
|
+
use crate::ui::{
|
|
31
|
+
ColorSelector, MultiStopGradientSelector, NamedValuePicker, NumberField, OptionalField,
|
|
32
|
+
PaletteSelector, Select, SelectItem,
|
|
33
|
+
};
|
|
34
|
+
use crate::utils::{
|
|
35
|
+
CssColor, CssGradient, CssKind, CssPalette, GradientStopSpec, NamedValue,
|
|
36
|
+
canonicalize_css_color, gradient_to_css, palette_name_for,
|
|
40
37
|
};
|
|
41
38
|
|
|
42
39
|
fn emit(on_change: &Callback<ColumnConfigFieldUpdate>, key: &str, value: Option<Value>) {
|
|
@@ -150,9 +147,10 @@ pub fn BoolField(props: &BoolFieldProps) -> Html {
|
|
|
150
147
|
checked={current}
|
|
151
148
|
{oninput}
|
|
152
149
|
/>
|
|
153
|
-
<label
|
|
154
|
-
{
|
|
155
|
-
|
|
150
|
+
<label
|
|
151
|
+
for={format!("{}-checkbox", props.field_key)}
|
|
152
|
+
class={if current { "bool-field-desc enabled" } else { "bool-field-desc disabled" }}
|
|
153
|
+
/>
|
|
156
154
|
</div>
|
|
157
155
|
</OptionalField>
|
|
158
156
|
</div>
|
|
@@ -346,7 +344,7 @@ pub fn PaletteField(props: &PaletteFieldProps) -> Html {
|
|
|
346
344
|
on_change={on_change_palette}
|
|
347
345
|
{on_reset}
|
|
348
346
|
{is_modified}
|
|
349
|
-
|
|
347
|
+
label={Some(props.field_key.clone())}
|
|
350
348
|
/>
|
|
351
349
|
</div>
|
|
352
350
|
}
|
|
@@ -459,7 +457,7 @@ pub fn GradientStopsField(props: &GradientStopsFieldProps) -> Html {
|
|
|
459
457
|
on_change={on_change_stops}
|
|
460
458
|
{on_reset}
|
|
461
459
|
{is_modified}
|
|
462
|
-
|
|
460
|
+
label={Some(props.field_key.clone())}
|
|
463
461
|
/>
|
|
464
462
|
</div>
|
|
465
463
|
}
|
|
@@ -555,7 +553,7 @@ pub fn ColorField(props: &ColorFieldProps) -> Html {
|
|
|
555
553
|
{on_color}
|
|
556
554
|
{on_reset}
|
|
557
555
|
{is_modified}
|
|
558
|
-
|
|
556
|
+
label={Some(props.field_key.clone())}
|
|
559
557
|
/>
|
|
560
558
|
</div>
|
|
561
559
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
use itertools::Itertools;
|
|
14
14
|
use yew::{Callback, Html, Properties, function_component, html};
|
|
15
15
|
|
|
16
|
-
use crate::
|
|
16
|
+
use crate::ui::{Select, SelectItem};
|
|
17
17
|
use crate::utils::PtrEqRc;
|
|
18
18
|
|
|
19
19
|
#[derive(Properties, PartialEq)]
|