@perspective-dev/viewer 4.5.1 → 4.5.2
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 +1 -1
- package/dist/cdn/perspective-viewer.js.map +2 -2
- package/dist/css/botanical.css +1 -1
- package/dist/css/dracula.css +1 -1
- package/dist/css/gruvbox-dark.css +1 -1
- package/dist/css/monokai.css +1 -1
- package/dist/css/phosphor.css +1 -1
- package/dist/css/pro-dark.css +1 -1
- package/dist/css/themes.css +1 -1
- package/dist/css/vaporwave.css +1 -1
- package/dist/esm/perspective-viewer.cdn.d.ts +3 -0
- package/dist/esm/perspective-viewer.inline.d.ts +3 -0
- package/dist/esm/perspective-viewer.inline.js +1 -1
- package/dist/esm/perspective-viewer.inline.js.map +2 -2
- package/dist/esm/perspective-viewer.js +1 -1
- package/dist/esm/perspective-viewer.js.map +2 -2
- package/dist/esm/ts-rs/OnUpdateData.d.ts +6 -0
- package/dist/esm/ts-rs/ViewOnUpdateResp.d.ts +4 -0
- package/dist/wasm/perspective-viewer.d.ts +15 -15
- package/dist/wasm/perspective-viewer.js +69 -69
- package/dist/wasm/perspective-viewer.wasm +0 -0
- package/dist/wasm/perspective-viewer.wasm.d.ts +15 -15
- package/package.json +1 -1
- package/src/{rust/components/style/local_style.rs → css/_column_dropdown.css} +14 -35
- package/src/css/_dropdown_menu.css +14 -0
- package/src/css/_filter_dropdown.css +14 -0
- package/src/css/_function_dropdown.css +14 -0
- package/src/css/_viewer_bundle.css +41 -0
- package/src/css/viewer.css +2 -2
- package/src/rust/components/column_dropdown.rs +3 -3
- package/src/rust/components/column_selector/aggregate_selector.rs +0 -3
- package/src/rust/components/column_selector/config_selector.rs +0 -3
- package/src/rust/components/column_selector/empty_column.rs +0 -3
- package/src/rust/components/column_selector/filter_column.rs +0 -3
- package/src/rust/components/column_selector/invalid_column.rs +0 -4
- package/src/rust/components/column_selector.rs +0 -3
- package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_pairs.rs +0 -3
- package/src/rust/components/column_settings_sidebar/style_tab/symbol.rs +0 -3
- package/src/rust/components/column_settings_sidebar.rs +0 -3
- package/src/rust/components/containers/dropdown_menu.rs +1 -3
- package/src/rust/components/containers/scroll_panel.rs +1 -3
- package/src/rust/components/containers/split_panel.rs +0 -4
- package/src/rust/components/containers/tab_list.rs +0 -3
- package/src/rust/components/datetime_column_style.rs +0 -3
- package/src/rust/components/empty_row.rs +0 -3
- package/src/rust/components/expression_editor.rs +2 -3
- package/src/rust/components/filter_dropdown.rs +3 -3
- package/src/rust/components/font_loader.rs +2 -2
- package/src/rust/components/form/code_editor.rs +0 -3
- package/src/rust/components/form/debug.rs +0 -4
- package/src/rust/components/function_dropdown.rs +3 -3
- package/src/rust/components/number_series_style.rs +0 -3
- package/src/rust/components/plugin_selector.rs +0 -3
- package/src/rust/components/plugin_tab.rs +0 -5
- package/src/rust/components/portal.rs +5 -2
- package/src/rust/components/render_warning.rs +0 -3
- package/src/rust/components/status_bar.rs +3 -2
- package/src/rust/components/string_column_style.rs +0 -3
- package/src/rust/components/style/mod.rs +60 -27
- package/src/rust/components/style/style_provider.rs +49 -16
- package/src/rust/components/style_controls/number_string_format.rs +1 -8
- package/src/rust/components/type_icon.rs +1 -4
- package/src/rust/components/viewer.rs +1 -3
- package/src/rust/custom_elements/copy_dropdown.rs +6 -2
- package/src/rust/custom_elements/export_dropdown.rs +6 -2
- package/src/rust/lib.rs +0 -1
- package/src/rust/renderer.rs +13 -3
- package/src/rust/session/metadata.rs +11 -1
- package/src/rust/session.rs +14 -1
- package/src/themes/botanical.css +2 -0
- package/src/themes/dracula.css +2 -0
- package/src/themes/gruvbox-dark.css +2 -0
- package/src/themes/monokai.css +2 -0
- package/src/themes/phosphor.css +2 -0
- package/src/themes/pro-dark.css +2 -0
- package/src/themes/vaporwave.css +2 -0
- package/tsconfig.json +1 -1
- package/src/rust/components/style/style_cache.rs +0 -136
- /package/dist/wasm/snippets/{perspective-viewer-3cd58f0374935772 → perspective-viewer-93064d0d79855d97}/inline0.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-3cd58f0374935772 → perspective-viewer-93064d0d79855d97}/inline1.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-3cd58f0374935772 → perspective-viewer-93064d0d79855d97}/inline2.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-3cd58f0374935772 → perspective-viewer-93064d0d79855d97}/inline3.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-3cd58f0374935772 → perspective-viewer-93064d0d79855d97}/inline4.js +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
2
|
+
* ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
|
|
3
|
+
* ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
|
|
4
|
+
* ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
|
|
5
|
+
* ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
|
|
6
|
+
* ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
|
|
7
|
+
* ┃ Copyright (c) 2017, the Perspective Authors. ┃
|
|
8
|
+
* ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
|
|
9
|
+
* ┃ This file is part of the Perspective library, distributed under the terms ┃
|
|
10
|
+
* ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
|
|
11
|
+
* ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
@import "dom/checkbox.css";
|
|
15
|
+
@import "dom/scrollbar.css";
|
|
16
|
+
@import "dom/select.css";
|
|
17
|
+
|
|
18
|
+
@import "containers/split-panel.css";
|
|
19
|
+
@import "containers/scroll-panel.css";
|
|
20
|
+
@import "containers/pairs-list.css";
|
|
21
|
+
@import "containers/tabs.css";
|
|
22
|
+
|
|
23
|
+
@import "type-icon.css";
|
|
24
|
+
@import "aggregate-selector.css";
|
|
25
|
+
@import "empty-column.css";
|
|
26
|
+
@import "filter-item.css";
|
|
27
|
+
@import "config-selector.css";
|
|
28
|
+
@import "column-selector.css";
|
|
29
|
+
@import "column-style.css";
|
|
30
|
+
@import "column-symbol-attributes.css";
|
|
31
|
+
@import "column-settings-panel.css";
|
|
32
|
+
@import "expression-editor.css";
|
|
33
|
+
@import "plugin-selector.css";
|
|
34
|
+
@import "plugin-settings-panel.css";
|
|
35
|
+
@import "render-warning.css";
|
|
36
|
+
@import "status-bar.css";
|
|
37
|
+
|
|
38
|
+
@import "form/code-editor.css";
|
|
39
|
+
@import "form/debug.css";
|
|
40
|
+
|
|
41
|
+
@import "viewer.css";
|
package/src/css/viewer.css
CHANGED
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
:host input[type="number"]::-webkit-inner-spin-button {
|
|
97
|
-
transform: scale(1.5); /* Makes the arrows 50% larger */
|
|
98
|
-
filter:
|
|
97
|
+
transform: scale(1.5) translateX(-5px); /* Makes the arrows 50% larger */
|
|
98
|
+
filter: var(--psp-input--filter);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
:host .sidebar_close_button {
|
|
@@ -22,12 +22,11 @@ use yew::prelude::*;
|
|
|
22
22
|
|
|
23
23
|
use super::column_selector::InPlaceColumn;
|
|
24
24
|
use super::portal::PortalModal;
|
|
25
|
+
use super::style::StyleSurface;
|
|
25
26
|
use crate::session::Session;
|
|
26
27
|
use crate::utils::*;
|
|
27
28
|
use crate::*;
|
|
28
29
|
|
|
29
|
-
static CSS: &str = include_str!(concat!(env!("OUT_DIR"), "/css/column-dropdown.css"));
|
|
30
|
-
|
|
31
30
|
/// Shared state for the column dropdown, updated imperatively.
|
|
32
31
|
#[derive(Default)]
|
|
33
32
|
pub struct ColumnDropDownState {
|
|
@@ -207,6 +206,7 @@ impl Component for ColumnDropDownPortal {
|
|
|
207
206
|
html! {
|
|
208
207
|
<PortalModal
|
|
209
208
|
tag_name="perspective-dropdown"
|
|
209
|
+
surface={StyleSurface::ColumnDropdown}
|
|
210
210
|
{target}
|
|
211
211
|
own_focus=false
|
|
212
212
|
{on_close}
|
|
@@ -270,5 +270,5 @@ fn ColumnDropDownView(props: &ColumnDropDownViewProps) -> Html {
|
|
|
270
270
|
props.width, props.width
|
|
271
271
|
);
|
|
272
272
|
|
|
273
|
-
html! { <><style>{
|
|
273
|
+
html! { <><style>{ position }</style>{ body }</> }
|
|
274
274
|
}
|
|
@@ -18,8 +18,6 @@ use perspective_js::utils::ApiFuture;
|
|
|
18
18
|
use yew::prelude::*;
|
|
19
19
|
|
|
20
20
|
use crate::components::containers::select::*;
|
|
21
|
-
use crate::components::style::LocalStyle;
|
|
22
|
-
use crate::css;
|
|
23
21
|
use crate::renderer::*;
|
|
24
22
|
use crate::session::*;
|
|
25
23
|
use crate::utils::PtrEqRc;
|
|
@@ -119,7 +117,6 @@ impl Component for AggregateSelector {
|
|
|
119
117
|
|
|
120
118
|
html! {
|
|
121
119
|
<>
|
|
122
|
-
<LocalStyle href={css!("aggregate-selector")} />
|
|
123
120
|
<div class="aggregate-selector-wrapper">
|
|
124
121
|
<Select<Aggregate>
|
|
125
122
|
wrapper_class="aggregate-selector"
|
|
@@ -25,8 +25,6 @@ use crate::components::column_dropdown::{ColumnDropDownElement, ColumnDropDownPo
|
|
|
25
25
|
use crate::components::containers::dragdrop_list::*;
|
|
26
26
|
use crate::components::containers::select::{Select, SelectItem};
|
|
27
27
|
use crate::components::filter_dropdown::{FilterDropDownElement, FilterDropDownPortal};
|
|
28
|
-
use crate::components::style::LocalStyle;
|
|
29
|
-
use crate::css;
|
|
30
28
|
use crate::presentation::Presentation;
|
|
31
29
|
use crate::renderer::*;
|
|
32
30
|
use crate::session::drag_drop_update::*;
|
|
@@ -609,7 +607,6 @@ impl Component for ConfigSelector {
|
|
|
609
607
|
html! {
|
|
610
608
|
<>
|
|
611
609
|
<div slot="top_panel" id="top_panel" {class} ondragend={dragend}>
|
|
612
|
-
<LocalStyle href={css!("config-selector")} />
|
|
613
610
|
<div class="pivot_controls">
|
|
614
611
|
if group_rollups.len() > 1 {
|
|
615
612
|
<Select<GroupRollupMode>
|
|
@@ -17,8 +17,6 @@ use web_sys::*;
|
|
|
17
17
|
use yew::prelude::*;
|
|
18
18
|
|
|
19
19
|
use crate::components::column_dropdown::ColumnDropDownElement;
|
|
20
|
-
use crate::components::style::LocalStyle;
|
|
21
|
-
use crate::css;
|
|
22
20
|
|
|
23
21
|
#[derive(Properties)]
|
|
24
22
|
pub struct EmptyColumnProps {
|
|
@@ -70,7 +68,6 @@ impl Component for EmptyColumn {
|
|
|
70
68
|
|
|
71
69
|
html! {
|
|
72
70
|
<div class="pivot-column column-empty">
|
|
73
|
-
<LocalStyle href={css!("empty-column")} />
|
|
74
71
|
<input
|
|
75
72
|
spellcheck="false"
|
|
76
73
|
ref={self.input_ref.clone()}
|
|
@@ -23,9 +23,7 @@ use yew::prelude::*;
|
|
|
23
23
|
use crate::components::containers::dragdrop_list::*;
|
|
24
24
|
use crate::components::containers::select::*;
|
|
25
25
|
use crate::components::filter_dropdown::FilterDropDownElement;
|
|
26
|
-
use crate::components::style::LocalStyle;
|
|
27
26
|
use crate::components::type_icon::TypeIcon;
|
|
28
|
-
use crate::css;
|
|
29
27
|
use crate::presentation::Presentation;
|
|
30
28
|
use crate::renderer::*;
|
|
31
29
|
use crate::session::*;
|
|
@@ -348,7 +346,6 @@ impl Component for FilterColumn {
|
|
|
348
346
|
ondragstart={dragstart}
|
|
349
347
|
ondragend={dragend}
|
|
350
348
|
>
|
|
351
|
-
<LocalStyle href={css!("filter-item")} />
|
|
352
349
|
<div class="pivot-column-border">
|
|
353
350
|
<span class="drag-handle icon" />
|
|
354
351
|
// <TypeIcon ty={ColumnType::String} />
|
|
@@ -12,14 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
use yew::prelude::*;
|
|
14
14
|
|
|
15
|
-
use crate::components::style::LocalStyle;
|
|
16
|
-
use crate::css;
|
|
17
|
-
|
|
18
15
|
#[function_component(InvalidColumn)]
|
|
19
16
|
pub fn invalid_column() -> Html {
|
|
20
17
|
html! {
|
|
21
18
|
<div class="pivot-column column-empty column-invalid">
|
|
22
|
-
<LocalStyle href={css!("empty-column")} />
|
|
23
19
|
<div class="column-invalid-input" />
|
|
24
20
|
</div>
|
|
25
21
|
}
|
|
@@ -39,10 +39,8 @@ use self::config_selector::ConfigSelector;
|
|
|
39
39
|
use self::inactive_column::*;
|
|
40
40
|
use super::containers::scroll_panel::*;
|
|
41
41
|
use super::containers::split_panel::{Orientation, SplitPanel};
|
|
42
|
-
use super::style::LocalStyle;
|
|
43
42
|
use crate::components::column_dropdown::{ColumnDropDownElement, ColumnDropDownPortal};
|
|
44
43
|
use crate::components::containers::scroll_panel_item::ScrollPanelItem;
|
|
45
|
-
use crate::css;
|
|
46
44
|
use crate::presentation::{ColumnLocator, DragDropContainer, Presentation};
|
|
47
45
|
use crate::queries::{ActiveColumnState, ActiveColumnStateData, ColumnsIteratorSet};
|
|
48
46
|
use crate::renderer::*;
|
|
@@ -519,7 +517,6 @@ impl Component for ColumnSelector {
|
|
|
519
517
|
|
|
520
518
|
html! {
|
|
521
519
|
<>
|
|
522
|
-
<LocalStyle href={css!("column-selector")} />
|
|
523
520
|
<SplitPanel
|
|
524
521
|
no_wrap=true
|
|
525
522
|
on_reset={self.on_reset.callback()}
|
|
@@ -17,9 +17,7 @@ use yew::{Callback, Html, Properties, html};
|
|
|
17
17
|
|
|
18
18
|
use crate::components::column_settings_sidebar::style_tab::symbol::symbol_pairs_item::PairsListItem;
|
|
19
19
|
use crate::components::filter_dropdown::FilterDropDownElement;
|
|
20
|
-
use crate::components::style::LocalStyle;
|
|
21
20
|
use crate::config::SymbolKVPair;
|
|
22
|
-
use crate::css;
|
|
23
21
|
use crate::utils::PtrEqRc;
|
|
24
22
|
|
|
25
23
|
#[derive(Properties, PartialEq)]
|
|
@@ -84,7 +82,6 @@ impl yew::Component for PairsList {
|
|
|
84
82
|
|
|
85
83
|
html! {
|
|
86
84
|
<>
|
|
87
|
-
<LocalStyle href={css!("containers/pairs-list")} />
|
|
88
85
|
<div class="pairs-list" id={props.id.clone()} data-label={props.title.clone()}>
|
|
89
86
|
<ul>{ for main_pairs }</ul>
|
|
90
87
|
</div>
|
|
@@ -24,9 +24,7 @@ use yew::{Callback, Html, Properties, html};
|
|
|
24
24
|
|
|
25
25
|
use crate::components::column_settings_sidebar::style_tab::symbol::symbol_pairs::PairsList;
|
|
26
26
|
use crate::components::filter_dropdown::{FilterDropDownElement, FilterDropDownPortal};
|
|
27
|
-
use crate::components::style::LocalStyle;
|
|
28
27
|
use crate::config::{ColumnConfigFieldUpdate, KeyValueOpts, SymbolKVPair};
|
|
29
|
-
use crate::css;
|
|
30
28
|
use crate::session::Session;
|
|
31
29
|
|
|
32
30
|
#[derive(Properties, PartialEq, Clone)]
|
|
@@ -126,7 +124,6 @@ impl yew::Component for SymbolStyle {
|
|
|
126
124
|
let update_pairs = ctx.link().callback(SymbolAttrMsg::UpdatePairs);
|
|
127
125
|
html! {
|
|
128
126
|
<>
|
|
129
|
-
<LocalStyle href={css!("column-symbol-attributes")} />
|
|
130
127
|
<PairsList
|
|
131
128
|
title="Symbols"
|
|
132
129
|
id="attributes-symbols"
|
|
@@ -31,14 +31,12 @@ use crate::components::containers::sidebar::Sidebar;
|
|
|
31
31
|
use crate::components::containers::tab_list::TabList;
|
|
32
32
|
use crate::components::editable_header::EditableHeaderProps;
|
|
33
33
|
use crate::components::expression_editor::ExpressionEditorProps;
|
|
34
|
-
use crate::components::style::LocalStyle;
|
|
35
34
|
use crate::components::type_icon::TypeIconType;
|
|
36
35
|
use crate::presentation::{ColumnLocator, ColumnSettingsTab, Presentation};
|
|
37
36
|
use crate::renderer::Renderer;
|
|
38
37
|
use crate::session::{Session, SessionMetadataRc};
|
|
39
38
|
use crate::tasks::{delete_expr, save_expr, update_expr};
|
|
40
39
|
use crate::utils::PtrEqRc;
|
|
41
|
-
use crate::*;
|
|
42
40
|
|
|
43
41
|
#[derive(Clone, Derivative, Properties)]
|
|
44
42
|
#[derivative(Debug)]
|
|
@@ -356,7 +354,6 @@ impl Component for ColumnSettingsPanel {
|
|
|
356
354
|
|
|
357
355
|
html! {
|
|
358
356
|
<>
|
|
359
|
-
<LocalStyle href={css!("column-settings-panel")} />
|
|
360
357
|
<Sidebar
|
|
361
358
|
on_close={ctx.props().on_close.clone()}
|
|
362
359
|
id_prefix="column_settings"
|
|
@@ -17,8 +17,6 @@ use web_sys::*;
|
|
|
17
17
|
use yew::prelude::*;
|
|
18
18
|
|
|
19
19
|
use super::select::SelectItem;
|
|
20
|
-
use crate::components::style::LocalStyle;
|
|
21
|
-
use crate::*;
|
|
22
20
|
|
|
23
21
|
#[derive(Properties, PartialEq)]
|
|
24
22
|
pub struct DropDownMenuProps<T>
|
|
@@ -95,7 +93,7 @@ where
|
|
|
95
93
|
html! { <span class="no-results">{ "No Completions" }</span> }
|
|
96
94
|
};
|
|
97
95
|
|
|
98
|
-
html! {
|
|
96
|
+
html! { <>{ body }</> }
|
|
99
97
|
}
|
|
100
98
|
}
|
|
101
99
|
|
|
@@ -22,8 +22,6 @@ use yew::prelude::*;
|
|
|
22
22
|
use yew::virtual_dom::VChild;
|
|
23
23
|
|
|
24
24
|
use super::scroll_panel_item::ScrollPanelItem;
|
|
25
|
-
use crate::components::style::LocalStyle;
|
|
26
|
-
use crate::css;
|
|
27
25
|
use crate::utils::*;
|
|
28
26
|
|
|
29
27
|
#[derive(Properties)]
|
|
@@ -253,7 +251,7 @@ impl Component for ScrollPanel {
|
|
|
253
251
|
}
|
|
254
252
|
};
|
|
255
253
|
|
|
256
|
-
html! {
|
|
254
|
+
html! { <>{ items }</> }
|
|
257
255
|
}
|
|
258
256
|
|
|
259
257
|
fn rendered(&mut self, ctx: &Context<Self>, _first_render: bool) {
|
|
@@ -19,9 +19,6 @@ use web_sys::HtmlElement;
|
|
|
19
19
|
use yew::html::Scope;
|
|
20
20
|
use yew::prelude::*;
|
|
21
21
|
|
|
22
|
-
use crate::components::style::LocalStyle;
|
|
23
|
-
use crate::css;
|
|
24
|
-
|
|
25
22
|
#[derive(Properties, Default)]
|
|
26
23
|
pub struct SplitPanelProps {
|
|
27
24
|
pub children: Children,
|
|
@@ -201,7 +198,6 @@ impl Component for SplitPanel {
|
|
|
201
198
|
let count = iter.len();
|
|
202
199
|
let contents = html! {
|
|
203
200
|
<>
|
|
204
|
-
<LocalStyle href={css!("containers/split-panel")} />
|
|
205
201
|
for (i, x) in iter {
|
|
206
202
|
if i == 0 {
|
|
207
203
|
if count == 1 {
|
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
use yew::{Callback, Children, Component, Html, Properties, classes, html};
|
|
14
14
|
|
|
15
|
-
use crate::components::style::LocalStyle;
|
|
16
|
-
use crate::css;
|
|
17
15
|
use crate::presentation::ColumnTab;
|
|
18
16
|
|
|
19
17
|
#[derive(Properties, Debug, PartialEq)]
|
|
@@ -87,7 +85,6 @@ impl<T: ColumnTab> Component for TabList<T> {
|
|
|
87
85
|
|
|
88
86
|
html! {
|
|
89
87
|
<>
|
|
90
|
-
<LocalStyle href={css!("containers/tabs")} />
|
|
91
88
|
<div id="settings_tab_bar">{ for gutter_tabs }</div>
|
|
92
89
|
<div id="format-tab" class="tab-content scrollable">
|
|
93
90
|
{ ctx.props().children.iter().nth(self.selected_idx) }
|
|
@@ -23,12 +23,10 @@ use wasm_bindgen::prelude::*;
|
|
|
23
23
|
use yew::prelude::*;
|
|
24
24
|
|
|
25
25
|
use super::modal::{ModalLink, SetModalLink};
|
|
26
|
-
use super::style::LocalStyle;
|
|
27
26
|
use crate::components::datetime_column_style::custom::DatetimeStyleCustom;
|
|
28
27
|
use crate::components::datetime_column_style::simple::DatetimeStyleSimple;
|
|
29
28
|
use crate::components::form::select_value_field::SelectValueField;
|
|
30
29
|
use crate::config::*;
|
|
31
|
-
use crate::css;
|
|
32
30
|
use crate::utils::WeakScope;
|
|
33
31
|
|
|
34
32
|
/// Format-only widget for `datetime` columns. Renders the `date_format`
|
|
@@ -126,7 +124,6 @@ impl Component for DatetimeColumnStyle {
|
|
|
126
124
|
fn view(&self, ctx: &Context<Self>) -> Html {
|
|
127
125
|
html! {
|
|
128
126
|
<>
|
|
129
|
-
<LocalStyle href={css!("column-style")} />
|
|
130
127
|
<div id="column-style-container" class="datetime-column-style-container">
|
|
131
128
|
if ctx.props().enable_time_config {
|
|
132
129
|
<SelectValueField<String>
|
|
@@ -20,8 +20,6 @@ use web_sys::*;
|
|
|
20
20
|
use yew::prelude::*;
|
|
21
21
|
|
|
22
22
|
use crate::components::filter_dropdown::FilterDropDownElement;
|
|
23
|
-
use crate::components::style::LocalStyle;
|
|
24
|
-
use crate::css;
|
|
25
23
|
|
|
26
24
|
#[derive(Properties, Derivative)]
|
|
27
25
|
#[derivative(Debug)]
|
|
@@ -87,7 +85,6 @@ impl Component for EmptyRow {
|
|
|
87
85
|
|
|
88
86
|
html! {
|
|
89
87
|
<div class="pivot-column column-empty">
|
|
90
|
-
<LocalStyle href={css!("empty-column")} />
|
|
91
88
|
<input
|
|
92
89
|
spellcheck="false"
|
|
93
90
|
ref={self.input_ref.clone()}
|
|
@@ -16,10 +16,8 @@ use perspective_client::{ExprValidationError, clone};
|
|
|
16
16
|
use yew::prelude::*;
|
|
17
17
|
|
|
18
18
|
use super::form::code_editor::*;
|
|
19
|
-
use super::style::LocalStyle;
|
|
20
19
|
use crate::session::{Session, SessionMetadata, SessionMetadataRc};
|
|
21
20
|
use crate::tasks::{ExprValidation, validate_expression};
|
|
22
|
-
use crate::*;
|
|
23
21
|
|
|
24
22
|
#[derive(Properties, PartialEq, Clone)]
|
|
25
23
|
pub struct ExpressionEditorProps {
|
|
@@ -54,10 +52,12 @@ pub struct ExpressionEditor {
|
|
|
54
52
|
expr: Rc<String>,
|
|
55
53
|
error: Option<ExprValidationError>,
|
|
56
54
|
oninput: Callback<Rc<String>>,
|
|
55
|
+
|
|
57
56
|
/// Monotonically increasing request id used to drop stale
|
|
58
57
|
/// validation results when the user types faster than the engine
|
|
59
58
|
/// can validate.
|
|
60
59
|
validation_req_id: u64,
|
|
60
|
+
|
|
61
61
|
/// The id of the most recently dispatched validation; the result
|
|
62
62
|
/// is only applied when its echoed id matches.
|
|
63
63
|
last_dispatched_req_id: u64,
|
|
@@ -131,7 +131,6 @@ impl Component for ExpressionEditor {
|
|
|
131
131
|
clone!(ctx.props().disabled);
|
|
132
132
|
html! {
|
|
133
133
|
<>
|
|
134
|
-
<LocalStyle href={css!("expression-editor")} />
|
|
135
134
|
<label class="item_title">{ "Expression" }</label>
|
|
136
135
|
<div id="editor-container" class={disabled_class}>
|
|
137
136
|
<CodeEditor
|
|
@@ -20,12 +20,11 @@ use yew::html::ImplicitClone;
|
|
|
20
20
|
use yew::prelude::*;
|
|
21
21
|
|
|
22
22
|
use super::portal::PortalModal;
|
|
23
|
+
use super::style::StyleSurface;
|
|
23
24
|
use crate::session::Session;
|
|
24
25
|
use crate::utils::*;
|
|
25
26
|
use crate::*;
|
|
26
27
|
|
|
27
|
-
static CSS: &str = include_str!(concat!(env!("OUT_DIR"), "/css/filter-dropdown.css"));
|
|
28
|
-
|
|
29
28
|
#[derive(Default)]
|
|
30
29
|
struct FilterDropDownState {
|
|
31
30
|
values: Vec<String>,
|
|
@@ -220,6 +219,7 @@ impl Component for FilterDropDownPortal {
|
|
|
220
219
|
html! {
|
|
221
220
|
<PortalModal
|
|
222
221
|
tag_name="perspective-dropdown"
|
|
222
|
+
surface={StyleSurface::FilterDropdown}
|
|
223
223
|
{target}
|
|
224
224
|
own_focus=false
|
|
225
225
|
{on_close}
|
|
@@ -267,7 +267,7 @@ fn FilterDropDownView(props: &FilterDropDownViewProps) -> Html {
|
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
-
html! {
|
|
270
|
+
html! { <>{ body }</> }
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
fn filter_values(
|
|
@@ -154,12 +154,12 @@ impl FontLoaderProps {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
let fut = async { select_all(block_fonts
|
|
157
|
+
let fut = async { select_all(block_fonts).await.0 };
|
|
158
158
|
block_promises.push(ApiFuture::new(fut))
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
if block_promises.len() != preload_fonts.len() {
|
|
162
|
-
web_sys::console::warn_1(&format!("Missing preload fonts {:?}",
|
|
162
|
+
web_sys::console::warn_1(&format!("Missing preload fonts {:?}", preload_fonts).into());
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
let res = join_all(block_promises)
|
|
@@ -19,8 +19,6 @@ use yew::prelude::*;
|
|
|
19
19
|
|
|
20
20
|
use crate::components::form::highlight::highlight;
|
|
21
21
|
use crate::components::function_dropdown::{FunctionDropDownElement, FunctionDropDownPortal};
|
|
22
|
-
use crate::components::style::LocalStyle;
|
|
23
|
-
use crate::css;
|
|
24
22
|
use crate::exprtk::{Cursor, tokenize};
|
|
25
23
|
use crate::utils::*;
|
|
26
24
|
|
|
@@ -174,7 +172,6 @@ pub fn code_editor(props: &CodeEditorProps) -> Html {
|
|
|
174
172
|
clone!(props.disabled);
|
|
175
173
|
html! {
|
|
176
174
|
<>
|
|
177
|
-
<LocalStyle href={css!("form/code-editor")} />
|
|
178
175
|
<div id="editor" {class}>
|
|
179
176
|
<div id="line_numbers" ref={lineno_ref}>{ line_numbers }</div>
|
|
180
177
|
<div id="editor-inner" {class}>
|
|
@@ -18,8 +18,6 @@ use wasm_bindgen::prelude::*;
|
|
|
18
18
|
use yew::prelude::*;
|
|
19
19
|
|
|
20
20
|
use crate::components::form::code_editor::CodeEditor;
|
|
21
|
-
use crate::components::style::LocalStyle;
|
|
22
|
-
use crate::css;
|
|
23
21
|
use crate::js::{MimeType, copy_to_clipboard, paste_from_clipboard};
|
|
24
22
|
use crate::presentation::*;
|
|
25
23
|
use crate::renderer::*;
|
|
@@ -166,8 +164,6 @@ pub fn debug_panel(props: &DebugPanelProps) -> Html {
|
|
|
166
164
|
|
|
167
165
|
html! {
|
|
168
166
|
<>
|
|
169
|
-
<LocalStyle href={css!("containers/tabs")} />
|
|
170
|
-
<LocalStyle href={css!("form/debug")} />
|
|
171
167
|
<div id="debug-panel-overflow">
|
|
172
168
|
<div id="debug-panel" class="sidebar_column" ref={sizer}>
|
|
173
169
|
<div id="debug-panel-controls">
|
|
@@ -20,10 +20,9 @@ use yew::html::ImplicitClone;
|
|
|
20
20
|
use yew::prelude::*;
|
|
21
21
|
|
|
22
22
|
use super::portal::PortalModal;
|
|
23
|
+
use super::style::StyleSurface;
|
|
23
24
|
use crate::utils::*;
|
|
24
25
|
|
|
25
|
-
static CSS: &str = include_str!(concat!(env!("OUT_DIR"), "/css/function-dropdown.css"));
|
|
26
|
-
|
|
27
26
|
#[derive(Default)]
|
|
28
27
|
struct FunctionDropDownState {
|
|
29
28
|
values: Vec<CompletionItemSuggestion>,
|
|
@@ -158,6 +157,7 @@ impl Component for FunctionDropDownPortal {
|
|
|
158
157
|
html! {
|
|
159
158
|
<PortalModal
|
|
160
159
|
tag_name="perspective-dropdown"
|
|
160
|
+
surface={StyleSurface::FunctionDropdown}
|
|
161
161
|
{target}
|
|
162
162
|
own_focus=false
|
|
163
163
|
{on_close}
|
|
@@ -211,7 +211,7 @@ fn FunctionDropDownView(props: &FunctionDropDownViewProps) -> Html {
|
|
|
211
211
|
}
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
html! {
|
|
214
|
+
html! { <>{ body }</> }
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
fn filter_values(input: &str) -> Vec<CompletionItemSuggestion> {
|
|
@@ -14,10 +14,8 @@ use web_sys::{HtmlInputElement, InputEvent};
|
|
|
14
14
|
use yew::prelude::*;
|
|
15
15
|
|
|
16
16
|
use super::modal::{ModalLink, SetModalLink};
|
|
17
|
-
use super::style::LocalStyle;
|
|
18
17
|
use crate::components::form::select_enum_field::SelectEnumField;
|
|
19
18
|
use crate::config::*;
|
|
20
|
-
use crate::css;
|
|
21
19
|
use crate::utils::WeakScope;
|
|
22
20
|
|
|
23
21
|
#[derive(Properties)]
|
|
@@ -125,7 +123,6 @@ impl Component for NumberSeriesStyle {
|
|
|
125
123
|
|
|
126
124
|
html! {
|
|
127
125
|
<>
|
|
128
|
-
<LocalStyle href={css!("column-style")} />
|
|
129
126
|
<div id="column-style-container" class="number-series-style-container">
|
|
130
127
|
<SelectEnumField<ChartType>
|
|
131
128
|
label="chart-type"
|
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
use yew::prelude::*;
|
|
14
14
|
|
|
15
|
-
use super::style::LocalStyle;
|
|
16
|
-
use crate::css;
|
|
17
15
|
use crate::utils::PtrEqRc;
|
|
18
16
|
|
|
19
17
|
/// Pure value props — no engine handles, no PubSub subscriptions.
|
|
@@ -85,7 +83,6 @@ impl Component for PluginSelector {
|
|
|
85
83
|
|
|
86
84
|
html! {
|
|
87
85
|
<>
|
|
88
|
-
<LocalStyle href={css!("plugin-selector")} />
|
|
89
86
|
<div id="plugin_selector_container" {class}>
|
|
90
87
|
<PluginSelect name={plugin_name} on_click={callback} />
|
|
91
88
|
<div id="plugin_selector_border" />
|
|
@@ -22,9 +22,7 @@ use yew::prelude::*;
|
|
|
22
22
|
use crate::components::column_settings_sidebar::style_tab::primitive_field::{
|
|
23
23
|
BoolField, ColorField, ColorRangeField, EnumField, NumberFieldPrimitive,
|
|
24
24
|
};
|
|
25
|
-
use crate::components::style::LocalStyle;
|
|
26
25
|
use crate::config::ControlSpec;
|
|
27
|
-
use crate::css;
|
|
28
26
|
use crate::queries::get_plugin_config_schema;
|
|
29
27
|
use crate::renderer::Renderer;
|
|
30
28
|
use crate::session::Session;
|
|
@@ -212,9 +210,6 @@ pub fn PluginTab(props: &PluginTabProps) -> Html {
|
|
|
212
210
|
|
|
213
211
|
html! {
|
|
214
212
|
<div id="plugin-tab" class="sidebar_column scrollable">
|
|
215
|
-
<LocalStyle href={css!("column-style")} />
|
|
216
|
-
<LocalStyle href={css!("plugin-settings-panel")} />
|
|
217
|
-
<LocalStyle href={css!("containers/tabs")} />
|
|
218
213
|
<div id="plugin-config-container" class="tab-section">{ components }</div>
|
|
219
214
|
</div>
|
|
220
215
|
}
|
|
@@ -20,7 +20,7 @@ use web_sys::*;
|
|
|
20
20
|
use yew::prelude::*;
|
|
21
21
|
|
|
22
22
|
use crate::components::modal::ModalOrientation;
|
|
23
|
-
use crate::components::style::StyleProvider;
|
|
23
|
+
use crate::components::style::{StyleProvider, StyleSurface};
|
|
24
24
|
use crate::utils::*;
|
|
25
25
|
|
|
26
26
|
#[derive(Properties, PartialEq)]
|
|
@@ -41,6 +41,9 @@ pub struct PortalModalProps {
|
|
|
41
41
|
pub tag_name: &'static str,
|
|
42
42
|
|
|
43
43
|
pub theme: String,
|
|
44
|
+
|
|
45
|
+
/// Which popup CSS surface this portal's ShadowRoot adopts.
|
|
46
|
+
pub surface: StyleSurface,
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
pub enum PortalModalMsg {
|
|
@@ -209,7 +212,7 @@ impl Component for PortalModal {
|
|
|
209
212
|
<>
|
|
210
213
|
<style>{ css }</style>
|
|
211
214
|
<ContextProvider<ModalOrientation> context={self.rev_vert.clone()}>
|
|
212
|
-
<StyleProvider root={self.host.clone()}>
|
|
215
|
+
<StyleProvider root={self.host.clone()} surface={ctx.props().surface}>
|
|
213
216
|
{ for ctx.props().children.iter() }
|
|
214
217
|
</StyleProvider>
|
|
215
218
|
</ContextProvider<ModalOrientation>>
|
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
use yew::prelude::*;
|
|
14
14
|
|
|
15
|
-
use super::style::LocalStyle;
|
|
16
|
-
use crate::css;
|
|
17
15
|
use crate::renderer::limits::RenderLimits;
|
|
18
16
|
|
|
19
17
|
#[derive(Properties, PartialEq)]
|
|
@@ -81,7 +79,6 @@ pub fn render_warning(props: &RenderWarningProps) -> Html {
|
|
|
81
79
|
let onclick = Callback::from(move |_: MouseEvent| on_dismiss.emit(()));
|
|
82
80
|
html! {
|
|
83
81
|
<>
|
|
84
|
-
<LocalStyle href={css!("render-warning")} />
|
|
85
82
|
<div
|
|
86
83
|
class="plugin_information plugin_information--warning"
|
|
87
84
|
id="plugin_information--size"
|
|
@@ -15,12 +15,12 @@ use web_sys::*;
|
|
|
15
15
|
use yew::prelude::*;
|
|
16
16
|
|
|
17
17
|
use super::status_indicator::StatusIndicator;
|
|
18
|
-
use super::style::LocalStyle;
|
|
19
18
|
use crate::components::containers::select::*;
|
|
20
19
|
use crate::components::copy_dropdown::CopyDropDownMenu;
|
|
21
20
|
use crate::components::export_dropdown::ExportDropDownMenu;
|
|
22
21
|
use crate::components::portal::PortalModal;
|
|
23
22
|
use crate::components::status_bar_counter::StatusBarRowsCounter;
|
|
23
|
+
use crate::components::style::StyleSurface;
|
|
24
24
|
use crate::config::*;
|
|
25
25
|
use crate::js::*;
|
|
26
26
|
use crate::presentation::{Presentation, PresentationProps};
|
|
@@ -332,7 +332,6 @@ impl Component for StatusBar {
|
|
|
332
332
|
if is_settings {
|
|
333
333
|
html! {
|
|
334
334
|
<>
|
|
335
|
-
<LocalStyle href={css!("status-bar")} />
|
|
336
335
|
<div
|
|
337
336
|
ref={&self.statusbar_ref}
|
|
338
337
|
id={ctx.props().id.clone()}
|
|
@@ -418,6 +417,7 @@ impl Component for StatusBar {
|
|
|
418
417
|
</div>
|
|
419
418
|
<PortalModal
|
|
420
419
|
tag_name="perspective-copy-menu"
|
|
420
|
+
surface={StyleSurface::DropdownMenu}
|
|
421
421
|
target={self.copy_target.clone()}
|
|
422
422
|
own_focus=true
|
|
423
423
|
on_close={on_close_copy}
|
|
@@ -427,6 +427,7 @@ impl Component for StatusBar {
|
|
|
427
427
|
</PortalModal>
|
|
428
428
|
<PortalModal
|
|
429
429
|
tag_name="perspective-export-menu"
|
|
430
|
+
surface={StyleSurface::DropdownMenu}
|
|
430
431
|
target={self.export_target.clone()}
|
|
431
432
|
own_focus=true
|
|
432
433
|
on_close={on_close_export}
|