@holoviz/panel 0.13.0-a.1 → 0.13.0-a.13
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/bundled/abstractvtkplot/vtk.js@20.0.1/vtk.js +3 -0
- package/dist/bundled/abstractvtkplot/vtk.js@20.0.1/vtk.js.map +1 -0
- package/dist/bundled/js/jquery-3.5.1.min.js +2 -0
- package/dist/bundled/js/jquery-3.5.1.slim.min.js +2 -0
- package/dist/bundled/plotlyplot/jquery-3.5.1.min.js +2 -0
- package/dist/bundled/quillinput/1.3.6/quill.bubble.css +952 -0
- package/dist/bundled/quillinput/1.3.6/quill.js +11489 -0
- package/dist/bundled/quillinput/1.3.6/quill.snow.css +945 -0
- package/dist/bundled/terminal/xterm@4.14.1/lib/xterm.js +2 -0
- package/dist/bundled/terminal/xterm@4.14.1/lib/xterm.js.map +1 -0
- package/dist/css/widgets.css +4 -0
- package/dist/lib/models/ace.js +1 -1
- package/dist/lib/models/ace.js.map +1 -1
- package/dist/lib/models/html.d.ts +2 -0
- package/dist/lib/models/html.js +24 -2
- package/dist/lib/models/html.js.map +1 -1
- package/dist/lib/models/index.d.ts +1 -0
- package/dist/lib/models/index.js +1 -0
- package/dist/lib/models/index.js.map +1 -1
- package/dist/lib/models/json.d.ts +1 -1
- package/dist/lib/models/player.d.ts +1 -1
- package/dist/lib/models/plotly.d.ts +5 -3
- package/dist/lib/models/plotly.js +36 -30
- package/dist/lib/models/plotly.js.map +1 -1
- package/dist/lib/models/progress.js +6 -1
- package/dist/lib/models/progress.js.map +1 -1
- package/dist/lib/models/quill.d.ts +34 -0
- package/dist/lib/models/quill.js +85 -0
- package/dist/lib/models/quill.js.map +1 -0
- package/dist/lib/models/reactive_html.js +3 -1
- package/dist/lib/models/reactive_html.js.map +1 -1
- package/dist/lib/models/singleselect.js +1 -1
- package/dist/lib/models/singleselect.js.map +1 -1
- package/dist/lib/models/tabulator.d.ts +18 -2
- package/dist/lib/models/tabulator.js +141 -7
- package/dist/lib/models/tabulator.js.map +1 -1
- package/dist/lib/models/terminal.d.ts +9 -3
- package/dist/lib/models/terminal.js +20 -14
- package/dist/lib/models/terminal.js.map +1 -1
- package/dist/lib/models/trend.js +2 -1
- package/dist/lib/models/trend.js.map +1 -1
- package/dist/lib/models/vega.d.ts +2 -0
- package/dist/lib/models/vega.js +9 -3
- package/dist/lib/models/vega.js.map +1 -1
- package/dist/lib/models/vtk/panel_fullscreen_renwin_sync.d.ts +1 -1
- package/dist/lib/models/vtk/panel_fullscreen_renwin_sync.js +92 -92
- package/dist/lib/models/vtk/panel_fullscreen_renwin_sync.js.map +1 -1
- package/dist/lib/models/vtk/util.d.ts +2 -2
- package/dist/lib/models/vtk/util.js +6 -2
- package/dist/lib/models/vtk/util.js.map +1 -1
- package/dist/lib/models/vtk/vtkaxes.js +3 -3
- package/dist/lib/models/vtk/vtkaxes.js.map +1 -1
- package/dist/lib/models/vtk/vtkjs.js +2 -2
- package/dist/lib/models/vtk/vtkjs.js.map +1 -1
- package/dist/lib/models/vtk/vtklayout.js +5 -2
- package/dist/lib/models/vtk/vtklayout.js.map +1 -1
- package/dist/lib/models/vtk/vtksynchronized.d.ts +0 -1
- package/dist/lib/models/vtk/vtksynchronized.js +11 -20
- package/dist/lib/models/vtk/vtksynchronized.js.map +1 -1
- package/dist/lib/models/vtk/vtkvolume.d.ts +1 -0
- package/dist/lib/models/vtk/vtkvolume.js +15 -6
- package/dist/lib/models/vtk/vtkvolume.js.map +1 -1
- package/dist/lib/styles/widgets.css.js +4 -0
- package/dist/panel.js +803 -519
- package/dist/panel.js.map +1 -1
- package/dist/panel.json +1 -1
- package/dist/panel.min.js +53 -52
- package/package.json +2 -2
- package/dist/bundled/abstractvtkplot/vtk.js@14.16.4/dist/vtk.js +0 -3
- package/dist/bundled/abstractvtkplot/vtk.js@14.16.4/dist/vtk.js.map +0 -1
- package/dist/bundled/js/jquery-1.11.1.min.js +0 -4
- package/dist/bundled/js/jquery-3.4.1.slim.min.js +0 -2
- package/dist/bundled/plotlyplot/jquery-3.4.1.min.js +0 -2
- package/dist/bundled/terminal/xterm@4.11.0/lib/xterm.js +0 -2
- package/dist/bundled/terminal/xterm@4.11.0/lib/xterm.js.map +0 -1
package/dist/panel.js
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
(function(root, factory) {
|
|
32
32
|
factory(root["Bokeh"], undefined);
|
|
33
33
|
})(this, function(Bokeh, version) {
|
|
34
|
-
|
|
34
|
+
let define;
|
|
35
35
|
return (function(modules, entry, aliases, externals) {
|
|
36
36
|
const bokeh = typeof Bokeh !== "undefined" && (version != null ? Bokeh[version] : Bokeh);
|
|
37
37
|
if (bokeh != null) {
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"4e90918c0a": /* index.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
45
45
|
__esModule();
|
|
46
46
|
const tslib_1 = require("tslib");
|
|
47
|
-
const Panel = tslib_1.__importStar(require("
|
|
47
|
+
const Panel = (0, tslib_1.__importStar)(require("1abe9b6912") /* ./models */);
|
|
48
48
|
exports.Panel = Panel;
|
|
49
49
|
const base_1 = require("@bokehjs/base");
|
|
50
|
-
base_1.register_models(Panel);
|
|
50
|
+
(0, base_1.register_models)(Panel);
|
|
51
51
|
},
|
|
52
|
-
"
|
|
52
|
+
"1abe9b6912": /* models/index.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
53
53
|
__esModule();
|
|
54
54
|
const tslib_1 = require("tslib");
|
|
55
|
-
var ace_1 = require("
|
|
55
|
+
var ace_1 = require("9fecc8d0f9") /* ./ace */;
|
|
56
56
|
__esExport("AcePlot", ace_1.AcePlot);
|
|
57
57
|
var audio_1 = require("339f84d639") /* ./audio */;
|
|
58
58
|
__esExport("Audio", audio_1.Audio);
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
__esExport("Card", card_1.Card);
|
|
61
61
|
var comm_manager_1 = require("e552778259") /* ./comm_manager */;
|
|
62
62
|
__esExport("CommManager", comm_manager_1.CommManager);
|
|
63
|
-
var tabulator_1 = require("
|
|
63
|
+
var tabulator_1 = require("8e41f17634") /* ./tabulator */;
|
|
64
64
|
__esExport("DataTabulator", tabulator_1.DataTabulator);
|
|
65
65
|
var datetime_picker_1 = require("6e11b2cfe2") /* ./datetime_picker */;
|
|
66
66
|
__esExport("DatetimePicker", datetime_picker_1.DatetimePicker);
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
__esExport("DeckGLPlot", deckgl_1.DeckGLPlot);
|
|
69
69
|
var echarts_1 = require("9d046c4720") /* ./echarts */;
|
|
70
70
|
__esExport("ECharts", echarts_1.ECharts);
|
|
71
|
-
var html_1 = require("
|
|
71
|
+
var html_1 = require("c424a3bd17") /* ./html */;
|
|
72
72
|
__esExport("HTML", html_1.HTML);
|
|
73
73
|
var idom_1 = require("7d45bd3bc4") /* ./idom */;
|
|
74
74
|
__esExport("IDOM", idom_1.IDOM);
|
|
@@ -88,33 +88,35 @@
|
|
|
88
88
|
__esExport("Perspective", perspective_1.Perspective);
|
|
89
89
|
var player_1 = require("2e8044c920") /* ./player */;
|
|
90
90
|
__esExport("Player", player_1.Player);
|
|
91
|
-
var plotly_1 = require("
|
|
91
|
+
var plotly_1 = require("a2080c6bc8") /* ./plotly */;
|
|
92
92
|
__esExport("PlotlyPlot", plotly_1.PlotlyPlot);
|
|
93
|
-
var progress_1 = require("
|
|
93
|
+
var progress_1 = require("fd3806082d") /* ./progress */;
|
|
94
94
|
__esExport("Progress", progress_1.Progress);
|
|
95
|
-
var
|
|
95
|
+
var quill_1 = require("6895629dfc") /* ./quill */;
|
|
96
|
+
__esExport("QuillInput", quill_1.QuillInput);
|
|
97
|
+
var reactive_html_1 = require("eb3a49319b") /* ./reactive_html */;
|
|
96
98
|
__esExport("ReactiveHTML", reactive_html_1.ReactiveHTML);
|
|
97
|
-
var singleselect_1 = require("
|
|
99
|
+
var singleselect_1 = require("5ed2116e26") /* ./singleselect */;
|
|
98
100
|
__esExport("SingleSelect", singleselect_1.SingleSelect);
|
|
99
101
|
var speech_to_text_1 = require("aaa48703af") /* ./speech_to_text */;
|
|
100
102
|
__esExport("SpeechToText", speech_to_text_1.SpeechToText);
|
|
101
103
|
var state_1 = require("bfa46a5f19") /* ./state */;
|
|
102
104
|
__esExport("State", state_1.State);
|
|
103
|
-
var terminal_1 = require("
|
|
105
|
+
var terminal_1 = require("edf66f5228") /* ./terminal */;
|
|
104
106
|
__esExport("Terminal", terminal_1.Terminal);
|
|
105
107
|
var text_to_speech_1 = require("33cd2c254e") /* ./text_to_speech */;
|
|
106
108
|
__esExport("TextToSpeech", text_to_speech_1.TextToSpeech);
|
|
107
|
-
var trend_1 = require("
|
|
109
|
+
var trend_1 = require("effe070807") /* ./trend */;
|
|
108
110
|
__esExport("TrendIndicator", trend_1.TrendIndicator);
|
|
109
|
-
var vega_1 = require("
|
|
111
|
+
var vega_1 = require("04fd346566") /* ./vega */;
|
|
110
112
|
__esExport("VegaPlot", vega_1.VegaPlot);
|
|
111
113
|
var video_1 = require("ffe54b53c3") /* ./video */;
|
|
112
114
|
__esExport("Video", video_1.Video);
|
|
113
115
|
var videostream_1 = require("e3e9b8e495") /* ./videostream */;
|
|
114
116
|
__esExport("VideoStream", videostream_1.VideoStream);
|
|
115
|
-
tslib_1.__exportStar(require("c51f25e2a7") /* ./vtk */, exports);
|
|
117
|
+
(0, tslib_1.__exportStar)(require("c51f25e2a7") /* ./vtk */, exports);
|
|
116
118
|
},
|
|
117
|
-
"
|
|
119
|
+
"9fecc8d0f9": /* models/ace.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
118
120
|
__esModule();
|
|
119
121
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
120
122
|
const dom_1 = require("@bokehjs/core/dom");
|
|
@@ -129,7 +131,7 @@
|
|
|
129
131
|
initialize() {
|
|
130
132
|
super.initialize();
|
|
131
133
|
this._ace = window.ace;
|
|
132
|
-
this._container = dom_1.div({
|
|
134
|
+
this._container = (0, dom_1.div)({
|
|
133
135
|
id: ID(),
|
|
134
136
|
style: {
|
|
135
137
|
width: "100%",
|
|
@@ -161,7 +163,7 @@
|
|
|
161
163
|
this._editor.setOptions({
|
|
162
164
|
enableBasicAutocompletion: true,
|
|
163
165
|
enableSnippets: true,
|
|
164
|
-
fontFamily: "monospace",
|
|
166
|
+
fontFamily: "monospace", //hack for cursor position
|
|
165
167
|
});
|
|
166
168
|
this._update_theme();
|
|
167
169
|
this._update_filename();
|
|
@@ -311,9 +313,9 @@
|
|
|
311
313
|
return cached;
|
|
312
314
|
}
|
|
313
315
|
const bounded = new types_1.Sizeable(viewport).bounded_to(this.sizing.size);
|
|
314
|
-
const size = dom_1.sized(this.el, bounded, () => {
|
|
315
|
-
const content = new types_1.Sizeable(dom_1.content_size(this.el));
|
|
316
|
-
const { border, padding } = dom_1.extents(this.el);
|
|
316
|
+
const size = (0, dom_1.sized)(this.el, bounded, () => {
|
|
317
|
+
const content = new types_1.Sizeable((0, dom_1.content_size)(this.el));
|
|
318
|
+
const { border, padding } = (0, dom_1.extents)(this.el);
|
|
317
319
|
return content.grow_by(border).grow_by(padding).map(Math.ceil);
|
|
318
320
|
});
|
|
319
321
|
this._cache.set(key_str, size);
|
|
@@ -472,7 +474,7 @@
|
|
|
472
474
|
const tslib_1 = require("tslib");
|
|
473
475
|
const column_1 = require("@bokehjs/models/layouts/column");
|
|
474
476
|
const bbox_1 = require("@bokehjs/core/util/bbox");
|
|
475
|
-
const DOM = tslib_1.__importStar(require("@bokehjs/core/dom"));
|
|
477
|
+
const DOM = (0, tslib_1.__importStar)(require("@bokehjs/core/dom"));
|
|
476
478
|
const dom_1 = require("@bokehjs/core/dom");
|
|
477
479
|
const grid_1 = require("@bokehjs/core/layout/grid");
|
|
478
480
|
const color_1 = require("@bokehjs/core/util/color");
|
|
@@ -507,10 +509,10 @@
|
|
|
507
509
|
super.update_position();
|
|
508
510
|
}
|
|
509
511
|
render() {
|
|
510
|
-
dom_1.empty(this.el);
|
|
512
|
+
(0, dom_1.empty)(this.el);
|
|
511
513
|
const { background, button_css_classes, header_color, header_tag, header_css_classes } = this.model;
|
|
512
|
-
this.el.style.backgroundColor = background != null ? color_1.color2css(background) : "";
|
|
513
|
-
dom_1.classes(this.el).clear().add(...this.css_classes());
|
|
514
|
+
this.el.style.backgroundColor = background != null ? (0, color_1.color2css)(background) : "";
|
|
515
|
+
(0, dom_1.classes)(this.el).clear().add(...this.css_classes());
|
|
514
516
|
let header_background = this.model.header_background;
|
|
515
517
|
if (!this.model.collapsed && this.model.active_header_background)
|
|
516
518
|
header_background = this.model.active_header_background;
|
|
@@ -693,16 +695,32 @@
|
|
|
693
695
|
CommManager.__module__ = "panel.models.comm_manager";
|
|
694
696
|
CommManager.init_CommManager();
|
|
695
697
|
},
|
|
696
|
-
"
|
|
698
|
+
"8e41f17634": /* models/tabulator.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
697
699
|
__esModule();
|
|
698
700
|
const types_1 = require("@bokehjs/core/util/types");
|
|
699
701
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
702
|
+
const build_views_1 = require("@bokehjs/core/build_views");
|
|
703
|
+
const bokeh_events_1 = require("@bokehjs/core/bokeh_events");
|
|
700
704
|
const dom_1 = require("@bokehjs/core/dom");
|
|
701
705
|
const kinds_1 = require("@bokehjs/core/kinds");
|
|
702
706
|
const column_data_source_1 = require("@bokehjs/models/sources/column_data_source");
|
|
703
707
|
const tables_1 = require("@bokehjs/models/widgets/tables");
|
|
708
|
+
const debounce_1 = require("99a25e6992") /* debounce */;
|
|
704
709
|
const data_1 = require("f1971f81bf") /* ./data */;
|
|
705
710
|
const layout_1 = require("4c755983eb") /* ./layout */;
|
|
711
|
+
class TableEditEvent extends bokeh_events_1.ModelEvent {
|
|
712
|
+
constructor(column, row) {
|
|
713
|
+
super();
|
|
714
|
+
this.column = column;
|
|
715
|
+
this.row = row;
|
|
716
|
+
this.event_name = "table-edit";
|
|
717
|
+
}
|
|
718
|
+
_to_json() {
|
|
719
|
+
return { model: this.origin, column: this.column, row: this.row };
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
exports.TableEditEvent = TableEditEvent;
|
|
723
|
+
TableEditEvent.__name__ = "TableEditEvent";
|
|
706
724
|
function find_group(key, value, records) {
|
|
707
725
|
for (const record of records) {
|
|
708
726
|
if (record[key] == value)
|
|
@@ -718,7 +736,7 @@
|
|
|
718
736
|
for (const group of grouped) {
|
|
719
737
|
const subsummary = summarize(group._children, columns, aggregators, depth + 1);
|
|
720
738
|
for (const col in subsummary) {
|
|
721
|
-
if (types_1.isArray(subsummary[col]))
|
|
739
|
+
if ((0, types_1.isArray)(subsummary[col]))
|
|
722
740
|
group[col] = subsummary[col].reduce((a, b) => a + b, 0) / subsummary[col].length;
|
|
723
741
|
else
|
|
724
742
|
group[col] = subsummary[col];
|
|
@@ -734,7 +752,7 @@
|
|
|
734
752
|
else if (agg === 'sum')
|
|
735
753
|
summary[column.field] = val + old_val;
|
|
736
754
|
else if (agg === 'mean') {
|
|
737
|
-
if (types_1.isArray(summary[column.field]))
|
|
755
|
+
if ((0, types_1.isArray)(summary[column.field]))
|
|
738
756
|
summary[column.field].push(val);
|
|
739
757
|
else
|
|
740
758
|
summary[column.field] = [old_val, val];
|
|
@@ -799,6 +817,15 @@
|
|
|
799
817
|
const ftype = this.model.filename.endsWith('.json') ? "json" : "csv";
|
|
800
818
|
this.tabulator.download(ftype, this.model.filename);
|
|
801
819
|
});
|
|
820
|
+
this.connect(this.model.properties.children.change, () => {
|
|
821
|
+
this._render_children();
|
|
822
|
+
});
|
|
823
|
+
this.connect(this.model.properties.expanded.change, () => {
|
|
824
|
+
for (const row of this.tabulator.rowManager.getRows()) {
|
|
825
|
+
if (row.cells.length > 0)
|
|
826
|
+
row.cells[0].layoutElement();
|
|
827
|
+
}
|
|
828
|
+
});
|
|
802
829
|
this.connect(this.model.properties.hidden_columns.change, () => {
|
|
803
830
|
this.hideColumns();
|
|
804
831
|
});
|
|
@@ -815,6 +842,7 @@
|
|
|
815
842
|
this.freezeRows();
|
|
816
843
|
});
|
|
817
844
|
this.connect(this.model.properties.styles.change, () => {
|
|
845
|
+
this._styles = this.model.styles;
|
|
818
846
|
this.updateStyles();
|
|
819
847
|
});
|
|
820
848
|
this.connect(this.model.source.properties.data.change, () => {
|
|
@@ -838,10 +866,12 @@
|
|
|
838
866
|
if (wait)
|
|
839
867
|
return;
|
|
840
868
|
this._initializing = true;
|
|
841
|
-
|
|
842
|
-
|
|
869
|
+
this._styles = this.model.styles;
|
|
870
|
+
const container = (0, dom_1.div)({ class: "pnx-tabulator" });
|
|
871
|
+
(0, layout_1.set_size)(container, this.model);
|
|
843
872
|
let configuration = this.getConfiguration();
|
|
844
873
|
this.tabulator = new Tabulator(container, configuration);
|
|
874
|
+
this._render_children();
|
|
845
875
|
// Swap pagination mode
|
|
846
876
|
if (this.model.pagination === 'remote') {
|
|
847
877
|
this.tabulator.options.pagination = this.model.pagination;
|
|
@@ -915,13 +945,19 @@
|
|
|
915
945
|
}
|
|
916
946
|
getConfiguration() {
|
|
917
947
|
const pagination = this.model.pagination == 'remote' ? 'local' : (this.model.pagination || false);
|
|
918
|
-
|
|
948
|
+
// Only use selectable mode if explicitly requested otherwise manually handle selections
|
|
949
|
+
let selectable = this.model.select_mode === 'toggle' ? true : NaN;
|
|
919
950
|
const that = this;
|
|
920
951
|
let configuration = Object.assign(Object.assign({}, this.model.configuration), { index: "_index", nestedFieldSeparator: false, selectable: selectable, tableBuilding: function () { that.tableInit(that, this); }, renderComplete: () => this.renderComplete(), rowSelectionChanged: (data, rows) => this.rowSelectionChanged(data, rows), rowClick: (e, row) => this.rowClicked(e, row), cellEdited: (cell) => this.cellEdited(cell), columns: this.getColumns(), layout: this.getLayout(), pagination: pagination, paginationSize: this.model.page_size, paginationInitialPage: 1, selectableCheck: (row) => {
|
|
921
952
|
const selectable = this.model.selectable_rows;
|
|
922
953
|
return (selectable == null) || (selectable.indexOf(row._row.data._index) >= 0);
|
|
923
954
|
}, tooltips: (cell) => {
|
|
924
955
|
return cell.getColumn().getField() + ": " + cell.getValue();
|
|
956
|
+
}, scrollVertical: (0, debounce_1.debounce)(() => {
|
|
957
|
+
this.updateStyles();
|
|
958
|
+
}, 50, false), rowFormatter: (row) => this._render_row(row), dataFiltering: () => {
|
|
959
|
+
if (this.tabulator != null)
|
|
960
|
+
this.model.filters = this.tabulator.getHeaderFilters();
|
|
925
961
|
} });
|
|
926
962
|
if (pagination) {
|
|
927
963
|
configuration['ajaxURL'] = "http://panel.pyviz.org";
|
|
@@ -932,11 +968,72 @@
|
|
|
932
968
|
if (cds === null || (cds.columns().length === 0))
|
|
933
969
|
data = [];
|
|
934
970
|
else
|
|
935
|
-
data = data_1.transform_cds_to_records(cds, true);
|
|
971
|
+
data = (0, data_1.transform_cds_to_records)(cds, true);
|
|
936
972
|
if (configuration.dataTree)
|
|
937
973
|
data = group_data(data, this.model.columns, this.model.indexes, this.model.aggregators);
|
|
938
974
|
return Object.assign(Object.assign({}, configuration), { "data": data });
|
|
939
975
|
}
|
|
976
|
+
_render_children() {
|
|
977
|
+
new Promise(async (resolve) => {
|
|
978
|
+
const children = [];
|
|
979
|
+
for (const idx of this.model.expanded) {
|
|
980
|
+
if (idx in this.model.children)
|
|
981
|
+
children.push(this.model.children[idx]);
|
|
982
|
+
}
|
|
983
|
+
await (0, build_views_1.build_views)(this._child_views, children, { parent: null });
|
|
984
|
+
resolve(null);
|
|
985
|
+
}).then(() => {
|
|
986
|
+
for (const r of this.model.expanded) {
|
|
987
|
+
const row = this.tabulator.getRow(r);
|
|
988
|
+
this._render_row(row);
|
|
989
|
+
}
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
_render_row(row) {
|
|
993
|
+
const index = row._row.data._index;
|
|
994
|
+
if (this.model.expanded.indexOf(index) < 0 || !(index in this.model.children))
|
|
995
|
+
return;
|
|
996
|
+
const model = this.model.children[index];
|
|
997
|
+
const view = this._child_views.get(model);
|
|
998
|
+
if (view == null)
|
|
999
|
+
return;
|
|
1000
|
+
const rowEl = row.getElement();
|
|
1001
|
+
const viewEl = rowEl.children[rowEl.children.length - 1];
|
|
1002
|
+
if ((viewEl.className === 'bk') && viewEl.children.length)
|
|
1003
|
+
return;
|
|
1004
|
+
const style = getComputedStyle(this.tabulator.element.children[1].children[0]);
|
|
1005
|
+
const bg = style.backgroundColor;
|
|
1006
|
+
const neg_margin = "-" + rowEl.style.paddingLeft;
|
|
1007
|
+
const row_view = (0, dom_1.div)({ style: "background-color: " + bg + "; margin-left:" + neg_margin });
|
|
1008
|
+
view.renderTo(row_view);
|
|
1009
|
+
row.getElement().appendChild(row_view);
|
|
1010
|
+
}
|
|
1011
|
+
_expand_render(cell) {
|
|
1012
|
+
const index = cell._cell.row.data._index;
|
|
1013
|
+
const icon = this.model.expanded.indexOf(index) < 0 ? "\u25ba" : "\u25bc";
|
|
1014
|
+
return "<i>" + icon + "</i>";
|
|
1015
|
+
}
|
|
1016
|
+
_update_expand(cell) {
|
|
1017
|
+
const index = cell._cell.row.data._index;
|
|
1018
|
+
const expanded = [...this.model.expanded];
|
|
1019
|
+
const exp_index = expanded.indexOf(index);
|
|
1020
|
+
if (exp_index < 0)
|
|
1021
|
+
expanded.push(index);
|
|
1022
|
+
else
|
|
1023
|
+
expanded.splice(exp_index, 1);
|
|
1024
|
+
this.model.expanded = expanded;
|
|
1025
|
+
if (expanded.indexOf(index) < 0)
|
|
1026
|
+
return;
|
|
1027
|
+
let ready = true;
|
|
1028
|
+
for (const idx of this.model.expanded) {
|
|
1029
|
+
if (!(idx in this.model.children)) {
|
|
1030
|
+
ready = false;
|
|
1031
|
+
break;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
if (ready)
|
|
1035
|
+
this._render_children();
|
|
1036
|
+
}
|
|
940
1037
|
getColumns() {
|
|
941
1038
|
var _a;
|
|
942
1039
|
const config_columns = (_a = this.model.configuration) === null || _a === void 0 ? void 0 : _a.columns;
|
|
@@ -949,8 +1046,24 @@
|
|
|
949
1046
|
group_columns.push(Object.assign({}, col));
|
|
950
1047
|
columns.push(Object.assign(Object.assign({}, column), { columns: group_columns }));
|
|
951
1048
|
}
|
|
952
|
-
else
|
|
1049
|
+
else if (column.formatter === "expand") {
|
|
1050
|
+
const expand = {
|
|
1051
|
+
hozAlign: "center",
|
|
1052
|
+
cellClick: (_, cell) => { this._update_expand(cell); },
|
|
1053
|
+
formatter: (cell) => { return this._expand_render(cell); },
|
|
1054
|
+
width: 40,
|
|
1055
|
+
frozen: true
|
|
1056
|
+
};
|
|
1057
|
+
columns.push(expand);
|
|
1058
|
+
}
|
|
1059
|
+
else {
|
|
1060
|
+
if (column.formatter === "rowSelection") {
|
|
1061
|
+
column.cellClick = (_, cell) => {
|
|
1062
|
+
cell.getRow().toggleSelect();
|
|
1063
|
+
};
|
|
1064
|
+
}
|
|
953
1065
|
columns.push(Object.assign({}, column));
|
|
1066
|
+
}
|
|
954
1067
|
}
|
|
955
1068
|
for (const column of this.model.columns) {
|
|
956
1069
|
let tab_column = null;
|
|
@@ -986,7 +1099,9 @@
|
|
|
986
1099
|
else {
|
|
987
1100
|
tab_column.formatter = (cell) => {
|
|
988
1101
|
const formatted = column.formatter.doFormat(cell.getRow(), cell, cell.getValue(), null, null);
|
|
989
|
-
|
|
1102
|
+
if (column.formatter.type === 'HTMLTemplateFormatter')
|
|
1103
|
+
return formatted;
|
|
1104
|
+
const node = (0, dom_1.div)();
|
|
990
1105
|
node.innerHTML = formatted;
|
|
991
1106
|
return node.children[0].innerHTML;
|
|
992
1107
|
};
|
|
@@ -1021,6 +1136,13 @@
|
|
|
1021
1136
|
tab_column.editor = (cell, onRendered, success, cancel) => this.renderEditor(column, cell, onRendered, success, cancel);
|
|
1022
1137
|
}
|
|
1023
1138
|
tab_column.editable = () => (this.model.editable && (editor.default_view != null));
|
|
1139
|
+
if (tab_column.headerFilter) {
|
|
1140
|
+
if ((typeof tab_column.headerFilter) === 'boolean' &&
|
|
1141
|
+
(typeof tab_column.editor) === 'string') {
|
|
1142
|
+
tab_column.headerFilter = tab_column.editor;
|
|
1143
|
+
tab_column.headerFilterParams = tab_column.editorParams;
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1024
1146
|
if (config_columns == null)
|
|
1025
1147
|
columns.push(tab_column);
|
|
1026
1148
|
}
|
|
@@ -1055,7 +1177,7 @@
|
|
|
1055
1177
|
}
|
|
1056
1178
|
// Update table
|
|
1057
1179
|
setData() {
|
|
1058
|
-
let data = data_1.transform_cds_to_records(this.model.source, true);
|
|
1180
|
+
let data = (0, data_1.transform_cds_to_records)(this.model.source, true);
|
|
1059
1181
|
if (this.model.configuration.dataTree)
|
|
1060
1182
|
data = group_data(data, this.model.columns, this.model.indexes, this.model.aggregators);
|
|
1061
1183
|
this._data_updating = true;
|
|
@@ -1125,10 +1247,10 @@
|
|
|
1125
1247
|
for (const cell_el of this._styled_cells)
|
|
1126
1248
|
cell_el.cssText = "";
|
|
1127
1249
|
this._styled_cells = [];
|
|
1128
|
-
if (this.
|
|
1250
|
+
if (this._styles == null || this.tabulator == null || this.tabulator.getDataCount() == 0)
|
|
1129
1251
|
return;
|
|
1130
|
-
for (const r in this.
|
|
1131
|
-
const row_style = this.
|
|
1252
|
+
for (const r in this._styles) {
|
|
1253
|
+
const row_style = this._styles[r];
|
|
1132
1254
|
const row = this.tabulator.getRow(r);
|
|
1133
1255
|
if (!row)
|
|
1134
1256
|
continue;
|
|
@@ -1143,7 +1265,7 @@
|
|
|
1143
1265
|
element.cssText = "";
|
|
1144
1266
|
for (const s of style) {
|
|
1145
1267
|
let prop, value;
|
|
1146
|
-
if (types_1.isArray(s))
|
|
1268
|
+
if ((0, types_1.isArray)(s))
|
|
1147
1269
|
[prop, value] = s;
|
|
1148
1270
|
else if (!s.includes(':'))
|
|
1149
1271
|
continue;
|
|
@@ -1153,12 +1275,14 @@
|
|
|
1153
1275
|
}
|
|
1154
1276
|
}
|
|
1155
1277
|
}
|
|
1278
|
+
const styles = this._styles;
|
|
1156
1279
|
this.model.styles = {};
|
|
1280
|
+
this._styles = styles;
|
|
1157
1281
|
}
|
|
1158
1282
|
addData() {
|
|
1159
1283
|
const rows = this.tabulator.rowManager.getRows();
|
|
1160
1284
|
const last_row = rows[rows.length - 1];
|
|
1161
|
-
let data = data_1.transform_cds_to_records(this.model.source, true);
|
|
1285
|
+
let data = (0, data_1.transform_cds_to_records)(this.model.source, true);
|
|
1162
1286
|
this.tabulator.setData(data);
|
|
1163
1287
|
if (this.model.follow) {
|
|
1164
1288
|
this.tabulator.scrollToRow((last_row.data._index || 0), "top", false);
|
|
@@ -1170,7 +1294,7 @@
|
|
|
1170
1294
|
// To avoid double updating the tabulator data
|
|
1171
1295
|
if (this._tabulator_cell_updating)
|
|
1172
1296
|
return;
|
|
1173
|
-
let data = data_1.transform_cds_to_records(this.model.source, true);
|
|
1297
|
+
let data = (0, data_1.transform_cds_to_records)(this.model.source, true);
|
|
1174
1298
|
this.tabulator.setData(data);
|
|
1175
1299
|
this.freezeRows();
|
|
1176
1300
|
this.updateSelection();
|
|
@@ -1209,7 +1333,7 @@
|
|
|
1209
1333
|
}
|
|
1210
1334
|
// Update model
|
|
1211
1335
|
rowClicked(e, row) {
|
|
1212
|
-
if (this._selection_updating || this._initializing || this.model.select_mode
|
|
1336
|
+
if (this._selection_updating || this._initializing || (typeof this.model.select_mode) === 'string' || this.model.select_mode === false)
|
|
1213
1337
|
return;
|
|
1214
1338
|
let indices = [];
|
|
1215
1339
|
const selected = this.model.source.selected;
|
|
@@ -1232,6 +1356,12 @@
|
|
|
1232
1356
|
indices.push(index);
|
|
1233
1357
|
else
|
|
1234
1358
|
indices.splice(indices.indexOf(index), 1);
|
|
1359
|
+
// Remove the first selected indices when selectable is an int.
|
|
1360
|
+
if (typeof this.model.select_mode === 'number') {
|
|
1361
|
+
while (indices.length > this.model.select_mode) {
|
|
1362
|
+
indices.shift();
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1235
1365
|
const filtered = this._filter_selected(indices);
|
|
1236
1366
|
this.tabulator.deselectRow();
|
|
1237
1367
|
this.tabulator.selectRow(filtered);
|
|
@@ -1249,7 +1379,7 @@
|
|
|
1249
1379
|
return filtered;
|
|
1250
1380
|
}
|
|
1251
1381
|
rowSelectionChanged(data, _) {
|
|
1252
|
-
if (this._selection_updating || this._initializing || (typeof this.model.select_mode) === 'boolean')
|
|
1382
|
+
if (this._selection_updating || this._initializing || (typeof this.model.select_mode) === 'boolean' || (this.model.select_mode.startsWith('checkbox')))
|
|
1253
1383
|
return;
|
|
1254
1384
|
const indices = data.map((row) => row._index);
|
|
1255
1385
|
const filtered = this._filter_selected(indices);
|
|
@@ -1264,11 +1394,12 @@
|
|
|
1264
1394
|
this._tabulator_cell_updating = true;
|
|
1265
1395
|
this.model.source.patch({ [field]: [[index, value]] });
|
|
1266
1396
|
this._tabulator_cell_updating = false;
|
|
1397
|
+
this.model.trigger_event(new TableEditEvent(field, index));
|
|
1267
1398
|
}
|
|
1268
1399
|
}
|
|
1269
1400
|
exports.DataTabulatorView = DataTabulatorView;
|
|
1270
1401
|
DataTabulatorView.__name__ = "DataTabulatorView";
|
|
1271
|
-
exports.TableLayout = kinds_1.Enum("fit_data", "fit_data_fill", "fit_data_stretch", "fit_data_table", "fit_columns");
|
|
1402
|
+
exports.TableLayout = (0, kinds_1.Enum)("fit_data", "fit_data_fill", "fit_data_stretch", "fit_data_table", "fit_columns");
|
|
1272
1403
|
// The Bokeh .ts model corresponding to the Bokeh .py model
|
|
1273
1404
|
class DataTabulator extends html_box_1.HTMLBox {
|
|
1274
1405
|
constructor(attrs) {
|
|
@@ -1278,11 +1409,14 @@
|
|
|
1278
1409
|
this.prototype.default_view = DataTabulatorView;
|
|
1279
1410
|
this.define(({ Any, Array, Boolean, Nullable, Number, Ref, String }) => ({
|
|
1280
1411
|
aggregators: [Any, {}],
|
|
1412
|
+
children: [Any, {}],
|
|
1281
1413
|
configuration: [Any, {}],
|
|
1282
1414
|
columns: [Array(Ref(tables_1.TableColumn)), []],
|
|
1283
1415
|
download: [Boolean, true],
|
|
1284
1416
|
editable: [Boolean, true],
|
|
1417
|
+
expanded: [Array(Number), []],
|
|
1285
1418
|
filename: [String, "table.csv"],
|
|
1419
|
+
filters: [Array(Any), []],
|
|
1286
1420
|
follow: [Boolean, true],
|
|
1287
1421
|
frozen_rows: [Array(Number), []],
|
|
1288
1422
|
groupby: [Array(String), []],
|
|
@@ -1308,6 +1442,73 @@
|
|
|
1308
1442
|
DataTabulator.__module__ = "panel.models.tabulator";
|
|
1309
1443
|
DataTabulator.init_DataTabulator();
|
|
1310
1444
|
},
|
|
1445
|
+
"99a25e6992": /* debounce/index.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
1446
|
+
/**
|
|
1447
|
+
* Returns a function, that, as long as it continues to be invoked, will not
|
|
1448
|
+
* be triggered. The function will be called after it stops being called for
|
|
1449
|
+
* N milliseconds. If `immediate` is passed, trigger the function on the
|
|
1450
|
+
* leading edge, instead of the trailing. The function also has a property 'clear'
|
|
1451
|
+
* that is a function which will clear the timer to prevent previously scheduled executions.
|
|
1452
|
+
*
|
|
1453
|
+
* @source underscore.js
|
|
1454
|
+
* @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
|
|
1455
|
+
* @param {Function} function to wrap
|
|
1456
|
+
* @param {Number} timeout in ms (`100`)
|
|
1457
|
+
* @param {Boolean} whether to execute at the beginning (`false`)
|
|
1458
|
+
* @api public
|
|
1459
|
+
*/
|
|
1460
|
+
function debounce(func, wait, immediate) {
|
|
1461
|
+
var timeout, args, context, timestamp, result;
|
|
1462
|
+
if (null == wait)
|
|
1463
|
+
wait = 100;
|
|
1464
|
+
function later() {
|
|
1465
|
+
var last = Date.now() - timestamp;
|
|
1466
|
+
if (last < wait && last >= 0) {
|
|
1467
|
+
timeout = setTimeout(later, wait - last);
|
|
1468
|
+
}
|
|
1469
|
+
else {
|
|
1470
|
+
timeout = null;
|
|
1471
|
+
if (!immediate) {
|
|
1472
|
+
result = func.apply(context, args);
|
|
1473
|
+
context = args = null;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
;
|
|
1478
|
+
var debounced = function () {
|
|
1479
|
+
context = this;
|
|
1480
|
+
args = arguments;
|
|
1481
|
+
timestamp = Date.now();
|
|
1482
|
+
var callNow = immediate && !timeout;
|
|
1483
|
+
if (!timeout)
|
|
1484
|
+
timeout = setTimeout(later, wait);
|
|
1485
|
+
if (callNow) {
|
|
1486
|
+
result = func.apply(context, args);
|
|
1487
|
+
context = args = null;
|
|
1488
|
+
}
|
|
1489
|
+
return result;
|
|
1490
|
+
};
|
|
1491
|
+
debounced.clear = function () {
|
|
1492
|
+
if (timeout) {
|
|
1493
|
+
clearTimeout(timeout);
|
|
1494
|
+
timeout = null;
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1497
|
+
debounced.flush = function () {
|
|
1498
|
+
if (timeout) {
|
|
1499
|
+
result = func.apply(context, args);
|
|
1500
|
+
context = args = null;
|
|
1501
|
+
clearTimeout(timeout);
|
|
1502
|
+
timeout = null;
|
|
1503
|
+
}
|
|
1504
|
+
};
|
|
1505
|
+
return debounced;
|
|
1506
|
+
}
|
|
1507
|
+
;
|
|
1508
|
+
// Adds compatibility for ES modules
|
|
1509
|
+
debounce.debounce = debounce;
|
|
1510
|
+
module.exports = debounce;
|
|
1511
|
+
},
|
|
1311
1512
|
"f1971f81bf": /* models/data.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
1312
1513
|
__esModule();
|
|
1313
1514
|
function transform_cds_to_records(cds, addId = false) {
|
|
@@ -1350,17 +1551,17 @@
|
|
|
1350
1551
|
"6e11b2cfe2": /* models/datetime_picker.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
1351
1552
|
__esModule();
|
|
1352
1553
|
const tslib_1 = require("tslib");
|
|
1353
|
-
const flatpickr_1 = tslib_1.__importDefault(require("50d3473f3f") /* flatpickr */);
|
|
1554
|
+
const flatpickr_1 = (0, tslib_1.__importDefault)(require("50d3473f3f") /* flatpickr */);
|
|
1354
1555
|
const input_widget_1 = require("@bokehjs/models/widgets/input_widget");
|
|
1355
1556
|
const dom_1 = require("@bokehjs/core/dom");
|
|
1356
1557
|
const enums_1 = require("@bokehjs/core/enums");
|
|
1357
1558
|
const types_1 = require("@bokehjs/core/util/types");
|
|
1358
|
-
const inputs = tslib_1.__importStar(require("@bokehjs/styles/widgets/inputs.css"));
|
|
1359
|
-
const flatpickr_css_1 = tslib_1.__importDefault(require("@bokehjs/styles/widgets/flatpickr.css"));
|
|
1559
|
+
const inputs = (0, tslib_1.__importStar)(require("@bokehjs/styles/widgets/inputs.css"));
|
|
1560
|
+
const flatpickr_css_1 = (0, tslib_1.__importDefault)(require("@bokehjs/styles/widgets/flatpickr.css"));
|
|
1360
1561
|
function _convert_date_list(value) {
|
|
1361
1562
|
const result = [];
|
|
1362
1563
|
for (const item of value) {
|
|
1363
|
-
if (types_1.isString(item))
|
|
1564
|
+
if ((0, types_1.isString)(item))
|
|
1364
1565
|
result.push(item);
|
|
1365
1566
|
else {
|
|
1366
1567
|
const [from, to] = item;
|
|
@@ -1399,9 +1600,9 @@
|
|
|
1399
1600
|
if (this._picker != null)
|
|
1400
1601
|
return;
|
|
1401
1602
|
super.render();
|
|
1402
|
-
this.input_el = dom_1.input({ type: "text", class: inputs.input, disabled: this.model.disabled });
|
|
1603
|
+
this.input_el = (0, dom_1.input)({ type: "text", class: inputs.input, disabled: this.model.disabled });
|
|
1403
1604
|
this.group_el.appendChild(this.input_el);
|
|
1404
|
-
this._picker = flatpickr_1.default(this.input_el, {
|
|
1605
|
+
this._picker = (0, flatpickr_1.default)(this.input_el, {
|
|
1405
1606
|
defaultDate: this.model.value,
|
|
1406
1607
|
minDate: (_a = this.model.min_date) !== null && _a !== void 0 ? _a : undefined,
|
|
1407
1608
|
maxDate: (_b = this.model.max_date) !== null && _b !== void 0 ? _b : undefined,
|
|
@@ -4145,7 +4346,7 @@
|
|
|
4145
4346
|
const data_1 = require("f1971f81bf") /* ./data */;
|
|
4146
4347
|
const layout_1 = require("4c755983eb") /* ./layout */;
|
|
4147
4348
|
const tooltips_1 = require("6e04fbe567") /* ./tooltips */;
|
|
4148
|
-
const constants_1 = tslib_1.__importDefault(require("093eb75864") /* @luma.gl/constants */);
|
|
4349
|
+
const constants_1 = (0, tslib_1.__importDefault)(require("093eb75864") /* @luma.gl/constants */);
|
|
4149
4350
|
function extractClasses() {
|
|
4150
4351
|
// Get classes for registration from standalone deck.gl
|
|
4151
4352
|
const classesDict = {};
|
|
@@ -4217,7 +4418,7 @@
|
|
|
4217
4418
|
this._layer_map[n - 1] = layer.data;
|
|
4218
4419
|
cds = this.model.data_sources[layer.data];
|
|
4219
4420
|
}
|
|
4220
|
-
layer.data = data_1.transform_cds_to_records(cds);
|
|
4421
|
+
layer.data = (0, data_1.transform_cds_to_records)(cds);
|
|
4221
4422
|
}
|
|
4222
4423
|
if (render)
|
|
4223
4424
|
this.updateDeck();
|
|
@@ -4265,7 +4466,7 @@
|
|
|
4265
4466
|
let deckgl;
|
|
4266
4467
|
try {
|
|
4267
4468
|
const props = this.jsonConverter.convert(jsonInput);
|
|
4268
|
-
const getTooltip = tooltips_1.makeTooltip(tooltip, props.layers);
|
|
4469
|
+
const getTooltip = (0, tooltips_1.makeTooltip)(tooltip, props.layers);
|
|
4269
4470
|
deckgl = new window.deck.DeckGL(Object.assign(Object.assign({}, props), { map: window.mapboxgl, mapboxApiAccessToken: mapboxApiKey, container,
|
|
4270
4471
|
getTooltip }));
|
|
4271
4472
|
}
|
|
@@ -4276,8 +4477,8 @@
|
|
|
4276
4477
|
}
|
|
4277
4478
|
render() {
|
|
4278
4479
|
super.render();
|
|
4279
|
-
const container = dom_1.div({ class: "deckgl" });
|
|
4280
|
-
layout_1.set_size(container, this.model);
|
|
4480
|
+
const container = (0, dom_1.div)({ class: "deckgl" });
|
|
4481
|
+
(0, layout_1.set_size)(container, this.model);
|
|
4281
4482
|
const MAPBOX_API_KEY = this.model.mapbox_api_key;
|
|
4282
4483
|
const tooltip = this.model.tooltip;
|
|
4283
4484
|
const data = this.getData();
|
|
@@ -5293,7 +5494,7 @@
|
|
|
5293
5494
|
ECharts.__module__ = "panel.models.echarts";
|
|
5294
5495
|
ECharts.init_ECharts();
|
|
5295
5496
|
},
|
|
5296
|
-
"
|
|
5497
|
+
"c424a3bd17": /* models/html.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
5297
5498
|
__esModule();
|
|
5298
5499
|
const markup_1 = require("@bokehjs/models/widgets/markup");
|
|
5299
5500
|
const bokeh_events_1 = require("@bokehjs/core/bokeh_events");
|
|
@@ -5342,8 +5543,7 @@
|
|
|
5342
5543
|
}
|
|
5343
5544
|
render() {
|
|
5344
5545
|
super.render();
|
|
5345
|
-
const
|
|
5346
|
-
const html = decoded || this.model.text;
|
|
5546
|
+
const html = this.process_tex();
|
|
5347
5547
|
if (!html) {
|
|
5348
5548
|
this.markup_el.innerHTML = '';
|
|
5349
5549
|
return;
|
|
@@ -5352,6 +5552,29 @@
|
|
|
5352
5552
|
runScripts(this.markup_el);
|
|
5353
5553
|
this._setup_event_listeners();
|
|
5354
5554
|
}
|
|
5555
|
+
process_tex() {
|
|
5556
|
+
const decoded = htmlDecode(this.model.text);
|
|
5557
|
+
const text = decoded || this.model.text;
|
|
5558
|
+
if (this.model.disable_math || !this.contains_tex(text))
|
|
5559
|
+
return text;
|
|
5560
|
+
const tex_parts = this.provider.MathJax.find_tex(text);
|
|
5561
|
+
const processed_text = [];
|
|
5562
|
+
let last_index = 0;
|
|
5563
|
+
for (const part of tex_parts) {
|
|
5564
|
+
processed_text.push(text.slice(last_index, part.start.n));
|
|
5565
|
+
processed_text.push(this.provider.MathJax.tex2svg(part.math, { display: part.display }).outerHTML);
|
|
5566
|
+
last_index = part.end.n;
|
|
5567
|
+
}
|
|
5568
|
+
if (last_index < text.length)
|
|
5569
|
+
processed_text.push(text.slice(last_index));
|
|
5570
|
+
return processed_text.join("");
|
|
5571
|
+
}
|
|
5572
|
+
contains_tex(html) {
|
|
5573
|
+
if (!this.provider.MathJax)
|
|
5574
|
+
return false;
|
|
5575
|
+
return this.provider.MathJax.find_tex(html).length > 0;
|
|
5576
|
+
}
|
|
5577
|
+
;
|
|
5355
5578
|
_remove_event_listeners() {
|
|
5356
5579
|
for (const node in this._event_listeners) {
|
|
5357
5580
|
const el = document.getElementById(node);
|
|
@@ -5375,7 +5598,7 @@
|
|
|
5375
5598
|
}
|
|
5376
5599
|
for (const event_name of this.model.events[node]) {
|
|
5377
5600
|
const callback = (event) => {
|
|
5378
|
-
this.model.trigger_event(new DOMEvent(node, event_to_object_1.serializeEvent(event)));
|
|
5601
|
+
this.model.trigger_event(new DOMEvent(node, (0, event_to_object_1.serializeEvent)(event)));
|
|
5379
5602
|
};
|
|
5380
5603
|
el.addEventListener(event_name, callback);
|
|
5381
5604
|
if (!(node in this._event_listeners))
|
|
@@ -5546,9 +5769,9 @@
|
|
|
5546
5769
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
5547
5770
|
const layout_1 = require("4c755983eb") /* ./layout */;
|
|
5548
5771
|
const event_to_object_1 = require("3329d4aa5b") /* ./event-to-object */;
|
|
5549
|
-
const LayoutConfigContext = preact_1.createContext({});
|
|
5772
|
+
const LayoutConfigContext = (0, preact_1.createContext)({});
|
|
5550
5773
|
function mountLayout(mountElement, saveUpdateHook, sendEvent, importSourceUrl) {
|
|
5551
|
-
preact_1.render(preact_2.html `
|
|
5774
|
+
(0, preact_1.render)((0, preact_2.html) `
|
|
5552
5775
|
<${Layout}
|
|
5553
5776
|
saveUpdateHook=${saveUpdateHook}
|
|
5554
5777
|
sendEvent=${sendEvent}
|
|
@@ -5559,9 +5782,9 @@
|
|
|
5559
5782
|
exports.mountLayout = mountLayout;
|
|
5560
5783
|
function Layout({ saveUpdateHook, sendEvent, importSourceUrl }) {
|
|
5561
5784
|
const [model, patchModel] = useInplaceJsonPatch({});
|
|
5562
|
-
hooks_1.useEffect(() => saveUpdateHook(patchModel), [patchModel]);
|
|
5785
|
+
(0, hooks_1.useEffect)(() => saveUpdateHook(patchModel), [patchModel]);
|
|
5563
5786
|
if (model.tagName) {
|
|
5564
|
-
return preact_2.html `
|
|
5787
|
+
return (0, preact_2.html) `
|
|
5565
5788
|
<${LayoutConfigContext.Provider}
|
|
5566
5789
|
value=${{
|
|
5567
5790
|
sendEvent: sendEvent,
|
|
@@ -5573,46 +5796,46 @@
|
|
|
5573
5796
|
`;
|
|
5574
5797
|
}
|
|
5575
5798
|
else
|
|
5576
|
-
return preact_2.html `<div />`;
|
|
5799
|
+
return (0, preact_2.html) `<div />`;
|
|
5577
5800
|
}
|
|
5578
5801
|
exports.default = Layout;
|
|
5579
5802
|
function Element({ model }) {
|
|
5580
5803
|
if (model.importSource)
|
|
5581
|
-
return preact_2.html `<${ImportedElement} model=${model} />`;
|
|
5804
|
+
return (0, preact_2.html) `<${ImportedElement} model=${model} />`;
|
|
5582
5805
|
else
|
|
5583
|
-
return preact_2.html `<${StandardElement} model=${model} />`;
|
|
5806
|
+
return (0, preact_2.html) `<${StandardElement} model=${model} />`;
|
|
5584
5807
|
}
|
|
5585
5808
|
function ImportedElement({ model }) {
|
|
5586
|
-
const config = hooks_1.useContext(LayoutConfigContext);
|
|
5809
|
+
const config = (0, hooks_1.useContext)(LayoutConfigContext);
|
|
5587
5810
|
const module = useLazyModule(model.importSource.source, config.importSourceUrl);
|
|
5588
5811
|
if (module) {
|
|
5589
5812
|
const cmpt = getPathProperty(module, model.tagName);
|
|
5590
5813
|
const children = elementChildren(model);
|
|
5591
5814
|
const attributes = elementAttributes(model, config.sendEvent);
|
|
5592
|
-
return preact_2.html `<${cmpt} ...${attributes}>${children}<//>`;
|
|
5815
|
+
return (0, preact_2.html) `<${cmpt} ...${attributes}>${children}<//>`;
|
|
5593
5816
|
}
|
|
5594
5817
|
else {
|
|
5595
5818
|
const fallback = model.importSource.fallback;
|
|
5596
5819
|
if (!fallback)
|
|
5597
|
-
return preact_2.html `<div />`;
|
|
5820
|
+
return (0, preact_2.html) `<div />`;
|
|
5598
5821
|
switch (typeof fallback) {
|
|
5599
5822
|
case "object":
|
|
5600
|
-
return preact_2.html `<${Element} model=${fallback} />`;
|
|
5823
|
+
return (0, preact_2.html) `<${Element} model=${fallback} />`;
|
|
5601
5824
|
case "string":
|
|
5602
|
-
return preact_2.html `<div>${fallback}</div>`;
|
|
5825
|
+
return (0, preact_2.html) `<div>${fallback}</div>`;
|
|
5603
5826
|
default:
|
|
5604
5827
|
return null;
|
|
5605
5828
|
}
|
|
5606
5829
|
}
|
|
5607
5830
|
}
|
|
5608
5831
|
function StandardElement({ model }) {
|
|
5609
|
-
const config = hooks_1.useContext(LayoutConfigContext);
|
|
5832
|
+
const config = (0, hooks_1.useContext)(LayoutConfigContext);
|
|
5610
5833
|
const children = elementChildren(model);
|
|
5611
5834
|
const attributes = elementAttributes(model, config.sendEvent);
|
|
5612
5835
|
if (model.children && model.children.length)
|
|
5613
|
-
return preact_2.html `<${model.tagName} ...${attributes}>${children}<//>`;
|
|
5836
|
+
return (0, preact_2.html) `<${model.tagName} ...${attributes}>${children}<//>`;
|
|
5614
5837
|
else
|
|
5615
|
-
return preact_2.html `<${model.tagName} ...${attributes} />`;
|
|
5838
|
+
return (0, preact_2.html) `<${model.tagName} ...${attributes} />`;
|
|
5616
5839
|
}
|
|
5617
5840
|
function elementChildren(model) {
|
|
5618
5841
|
if (!model.children)
|
|
@@ -5621,7 +5844,7 @@
|
|
|
5621
5844
|
return model.children.map((child) => {
|
|
5622
5845
|
switch (typeof child) {
|
|
5623
5846
|
case "object":
|
|
5624
|
-
return preact_2.html `<${Element} model=${child} />`;
|
|
5847
|
+
return (0, preact_2.html) `<${Element} model=${child} />`;
|
|
5625
5848
|
case "string":
|
|
5626
5849
|
return child;
|
|
5627
5850
|
default:
|
|
@@ -5648,7 +5871,7 @@
|
|
|
5648
5871
|
value.preventDefault();
|
|
5649
5872
|
if (eventSpec["stopPropagation"])
|
|
5650
5873
|
value.stopPropagation();
|
|
5651
|
-
return event_to_object_1.serializeEvent(value);
|
|
5874
|
+
return (0, event_to_object_1.serializeEvent)(value);
|
|
5652
5875
|
}
|
|
5653
5876
|
else
|
|
5654
5877
|
return value;
|
|
@@ -5664,7 +5887,7 @@
|
|
|
5664
5887
|
};
|
|
5665
5888
|
}
|
|
5666
5889
|
function useLazyModule(source, sourceUrlBase = "") {
|
|
5667
|
-
const [module, setModule] = hooks_1.useState(null);
|
|
5890
|
+
const [module, setModule] = (0, hooks_1.useState)(null);
|
|
5668
5891
|
// use eval() to avoid weird build behavior by bundlers like Webpack
|
|
5669
5892
|
if (!module)
|
|
5670
5893
|
eval(`import('${joinUrl(sourceUrlBase, source)}')`).then(setModule);
|
|
@@ -5680,9 +5903,9 @@
|
|
|
5680
5903
|
return value;
|
|
5681
5904
|
}
|
|
5682
5905
|
function useInplaceJsonPatch(doc) {
|
|
5683
|
-
const ref = hooks_1.useRef(doc);
|
|
5906
|
+
const ref = (0, hooks_1.useRef)(doc);
|
|
5684
5907
|
const forceUpdate = useForceUpdate();
|
|
5685
|
-
const applyPatch = hooks_1.useCallback((path, patch) => {
|
|
5908
|
+
const applyPatch = (0, hooks_1.useCallback)((path, patch) => {
|
|
5686
5909
|
applyPatchInplace(ref.current, path, patch);
|
|
5687
5910
|
forceUpdate();
|
|
5688
5911
|
}, [ref, forceUpdate]);
|
|
@@ -5690,20 +5913,20 @@
|
|
|
5690
5913
|
}
|
|
5691
5914
|
function applyPatchInplace(doc, path, patch) {
|
|
5692
5915
|
if (!path)
|
|
5693
|
-
fast_json_patch_1.applyPatch(doc, patch);
|
|
5916
|
+
(0, fast_json_patch_1.applyPatch)(doc, patch);
|
|
5694
5917
|
else {
|
|
5695
|
-
fast_json_patch_1.applyPatch(doc, [
|
|
5918
|
+
(0, fast_json_patch_1.applyPatch)(doc, [
|
|
5696
5919
|
{
|
|
5697
5920
|
op: "replace",
|
|
5698
5921
|
path: path,
|
|
5699
|
-
value: fast_json_patch_1.applyPatch(fast_json_patch_1.getValueByPointer(doc, path), patch, false, false).newDocument,
|
|
5922
|
+
value: (0, fast_json_patch_1.applyPatch)((0, fast_json_patch_1.getValueByPointer)(doc, path), patch, false, false).newDocument,
|
|
5700
5923
|
},
|
|
5701
5924
|
]);
|
|
5702
5925
|
}
|
|
5703
5926
|
}
|
|
5704
5927
|
function useForceUpdate() {
|
|
5705
|
-
const [, updateState] = hooks_1.useState({});
|
|
5706
|
-
return hooks_1.useCallback(() => updateState({}), []);
|
|
5928
|
+
const [, updateState] = (0, hooks_1.useState)({});
|
|
5929
|
+
return (0, hooks_1.useCallback)(() => updateState({}), []);
|
|
5707
5930
|
}
|
|
5708
5931
|
function joinUrl(base, tail) {
|
|
5709
5932
|
return tail.startsWith("./")
|
|
@@ -5722,7 +5945,7 @@
|
|
|
5722
5945
|
this.update_layout();
|
|
5723
5946
|
this.compute_layout();
|
|
5724
5947
|
this.invalidate_layout();
|
|
5725
|
-
layout_1.set_size(this.el, this.model);
|
|
5948
|
+
(0, layout_1.set_size)(this.el, this.model);
|
|
5726
5949
|
}
|
|
5727
5950
|
initialize() {
|
|
5728
5951
|
super.initialize();
|
|
@@ -6114,7 +6337,7 @@
|
|
|
6114
6337
|
__esExport("h", preact_2.h);
|
|
6115
6338
|
__esExport("render", preact_2.render);
|
|
6116
6339
|
__esExport("Component", preact_2.Component);
|
|
6117
|
-
const htm_1 = tslib_1.__importDefault(require("ab33dd3f38") /* htm */);
|
|
6340
|
+
const htm_1 = (0, tslib_1.__importDefault)(require("ab33dd3f38") /* htm */);
|
|
6118
6341
|
var m = htm_1.default.bind(preact_1.h);
|
|
6119
6342
|
exports.html = m;
|
|
6120
6343
|
},
|
|
@@ -7086,7 +7309,7 @@
|
|
|
7086
7309
|
const tslib_1 = require("tslib");
|
|
7087
7310
|
const kinds_1 = require("@bokehjs/core/kinds");
|
|
7088
7311
|
const markup_1 = require("@bokehjs/models/widgets/markup");
|
|
7089
|
-
const json_formatter_js_1 = tslib_1.__importDefault(require("18bba7b7e1") /* json-formatter-js */);
|
|
7312
|
+
const json_formatter_js_1 = (0, tslib_1.__importDefault)(require("18bba7b7e1") /* json-formatter-js */);
|
|
7090
7313
|
const layout_1 = require("4c755983eb") /* ./layout */;
|
|
7091
7314
|
class JSONView extends layout_1.PanelMarkupView {
|
|
7092
7315
|
connect_signals() {
|
|
@@ -7119,7 +7342,7 @@
|
|
|
7119
7342
|
}
|
|
7120
7343
|
exports.JSONView = JSONView;
|
|
7121
7344
|
JSONView.__name__ = "JSONView";
|
|
7122
|
-
exports.JSONTheme = kinds_1.Enum("dark", "light");
|
|
7345
|
+
exports.JSONTheme = (0, kinds_1.Enum)("dark", "light");
|
|
7123
7346
|
class JSON extends markup_1.Markup {
|
|
7124
7347
|
constructor(attrs) {
|
|
7125
7348
|
super(attrs);
|
|
@@ -7226,7 +7449,7 @@
|
|
|
7226
7449
|
__esModule();
|
|
7227
7450
|
const tslib_1 = require("tslib");
|
|
7228
7451
|
const input_widget_1 = require("@bokehjs/models/widgets/input_widget");
|
|
7229
|
-
const buttons_css_1 = tslib_1.__importStar(require("@bokehjs/styles/buttons.css")), buttons = buttons_css_1;
|
|
7452
|
+
const buttons_css_1 = (0, tslib_1.__importStar)(require("@bokehjs/styles/buttons.css")), buttons = buttons_css_1;
|
|
7230
7453
|
const dom_1 = require("@bokehjs/core/dom");
|
|
7231
7454
|
const enums_1 = require("@bokehjs/core/enums");
|
|
7232
7455
|
function dataURItoBlob(dataURI) {
|
|
@@ -7316,7 +7539,7 @@
|
|
|
7316
7539
|
// "Uncaught TypeError: t is undefined"
|
|
7317
7540
|
// This seems to be related to button do not have a value
|
|
7318
7541
|
// property.
|
|
7319
|
-
this.input_el = dom_1.input({
|
|
7542
|
+
this.input_el = (0, dom_1.input)({
|
|
7320
7543
|
type: "bk_btn, bk_btn_type",
|
|
7321
7544
|
});
|
|
7322
7545
|
this.input_el.addEventListener("change", () => this.change_input());
|
|
@@ -7653,16 +7876,16 @@
|
|
|
7653
7876
|
this.worker = window.perspective.worker();
|
|
7654
7877
|
this.table = this.worker.table(this.model.schema);
|
|
7655
7878
|
this.table.update(this.data);
|
|
7656
|
-
const container = dom_1.div({
|
|
7879
|
+
const container = (0, dom_1.div)({
|
|
7657
7880
|
class: "pnx-perspective-viewer",
|
|
7658
7881
|
style: {
|
|
7659
7882
|
zIndex: 0,
|
|
7660
7883
|
}
|
|
7661
7884
|
});
|
|
7662
|
-
layout_1.set_size(container, this.model);
|
|
7885
|
+
(0, layout_1.set_size)(container, this.model);
|
|
7663
7886
|
container.innerHTML = this.getInnerHTML();
|
|
7664
7887
|
this.perspective_element = container.children[0];
|
|
7665
|
-
layout_1.set_size(this.perspective_element, this.model);
|
|
7888
|
+
(0, layout_1.set_size)(this.perspective_element, this.model);
|
|
7666
7889
|
this.el.appendChild(container);
|
|
7667
7890
|
this.perspective_element.load(this.table).then(() => {
|
|
7668
7891
|
this.update_config();
|
|
@@ -7865,7 +8088,7 @@
|
|
|
7865
8088
|
return;
|
|
7866
8089
|
}
|
|
7867
8090
|
// Layout to group the elements
|
|
7868
|
-
this.groupEl = dom_1.div();
|
|
8091
|
+
this.groupEl = (0, dom_1.div)();
|
|
7869
8092
|
this.groupEl.style.display = "flex";
|
|
7870
8093
|
this.groupEl.style.flexDirection = "column";
|
|
7871
8094
|
this.groupEl.style.alignItems = "center";
|
|
@@ -7878,7 +8101,7 @@
|
|
|
7878
8101
|
this.sliderEl.max = String(this.model.end);
|
|
7879
8102
|
this.sliderEl.onchange = (ev) => this.set_frame(parseInt(ev.target.value));
|
|
7880
8103
|
// Buttons
|
|
7881
|
-
const button_div = dom_1.div();
|
|
8104
|
+
const button_div = (0, dom_1.div)();
|
|
7882
8105
|
this.buttonEl = button_div;
|
|
7883
8106
|
button_div.style.cssText = "margin: 0 auto; display: flex; padding: 5px; align-items: stretch; width: 100%;";
|
|
7884
8107
|
const button_style_small = "text-align: center; min-width: 20px; flex-grow: 1; margin: 2px";
|
|
@@ -8097,7 +8320,7 @@
|
|
|
8097
8320
|
}
|
|
8098
8321
|
exports.PlayerView = PlayerView;
|
|
8099
8322
|
PlayerView.__name__ = "PlayerView";
|
|
8100
|
-
exports.LoopPolicy = kinds_1.Enum("once", "loop", "reflect");
|
|
8323
|
+
exports.LoopPolicy = (0, kinds_1.Enum)("once", "loop", "reflect");
|
|
8101
8324
|
class Player extends widget_1.Widget {
|
|
8102
8325
|
constructor(attrs) {
|
|
8103
8326
|
super(attrs);
|
|
@@ -8122,7 +8345,7 @@
|
|
|
8122
8345
|
Player.__module__ = "panel.models.widgets";
|
|
8123
8346
|
Player.init_Player();
|
|
8124
8347
|
},
|
|
8125
|
-
"
|
|
8348
|
+
"a2080c6bc8": /* models/plotly.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8126
8349
|
__esModule();
|
|
8127
8350
|
const dom_1 = require("@bokehjs/core/dom");
|
|
8128
8351
|
const object_1 = require("@bokehjs/core/util/object");
|
|
@@ -8155,7 +8378,7 @@
|
|
|
8155
8378
|
for (let property in fullPoint) {
|
|
8156
8379
|
const val = fullPoint[property];
|
|
8157
8380
|
if (fullPoint.hasOwnProperty(property) &&
|
|
8158
|
-
!Array.isArray(val) && !util_1.isPlainObject(val)) {
|
|
8381
|
+
!Array.isArray(val) && !(0, util_1.isPlainObject)(val)) {
|
|
8159
8382
|
pointData[property] = val;
|
|
8160
8383
|
}
|
|
8161
8384
|
}
|
|
@@ -8207,10 +8430,14 @@
|
|
|
8207
8430
|
this._plotInitialized = false;
|
|
8208
8431
|
this._reacting = false;
|
|
8209
8432
|
this._relayouting = false;
|
|
8210
|
-
this._end_relayouting = debounce_1.debounce(() => {
|
|
8433
|
+
this._end_relayouting = (0, debounce_1.debounce)(() => {
|
|
8211
8434
|
this._relayouting = false;
|
|
8212
8435
|
}, 2000, false);
|
|
8213
8436
|
}
|
|
8437
|
+
initialize() {
|
|
8438
|
+
super.initialize();
|
|
8439
|
+
this._layout_wrapper = (0, dom_1.div)({ style: "height: 100%; width: 100%;" });
|
|
8440
|
+
}
|
|
8214
8441
|
connect_signals() {
|
|
8215
8442
|
super.connect_signals();
|
|
8216
8443
|
const { data, data_sources, layout, relayout, restyle } = this.model.properties;
|
|
@@ -8239,27 +8466,25 @@
|
|
|
8239
8466
|
this.connect(this.model.properties.viewport_update_throttle.change, () => {
|
|
8240
8467
|
this._updateSetViewportFunction();
|
|
8241
8468
|
});
|
|
8242
|
-
this.connect(this.model.properties._render_count.change, () =>
|
|
8469
|
+
this.connect(this.model.properties._render_count.change, () => {
|
|
8470
|
+
this.plot();
|
|
8471
|
+
});
|
|
8243
8472
|
this.connect(this.model.properties.viewport.change, () => this._updateViewportFromProperty());
|
|
8244
8473
|
}
|
|
8245
|
-
render() {
|
|
8474
|
+
async render() {
|
|
8246
8475
|
super.render();
|
|
8247
|
-
this._layout_wrapper = dom_1.div({ style: "height: 100%; width: 100%" });
|
|
8248
8476
|
this.el.appendChild(this._layout_wrapper);
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
}
|
|
8252
|
-
this.plot();
|
|
8477
|
+
await this.plot();
|
|
8478
|
+
window.Plotly.relayout(this._layout_wrapper, this.model.relayout);
|
|
8253
8479
|
}
|
|
8254
8480
|
_trace_data() {
|
|
8255
8481
|
const data = [];
|
|
8256
|
-
for (let i = 0; i < this.model.data.length; i++)
|
|
8482
|
+
for (let i = 0; i < this.model.data.length; i++)
|
|
8257
8483
|
data.push(this._get_trace(i, false));
|
|
8258
|
-
}
|
|
8259
8484
|
return data;
|
|
8260
8485
|
}
|
|
8261
8486
|
_layout_data() {
|
|
8262
|
-
const newLayout = util_1.deepCopy(this.model.layout);
|
|
8487
|
+
const newLayout = (0, util_1.deepCopy)(this.model.layout);
|
|
8263
8488
|
if (this._relayouting) {
|
|
8264
8489
|
const { layout } = this._layout_wrapper;
|
|
8265
8490
|
// For each xaxis* and yaxis* property of layout, if the value has a 'range'
|
|
@@ -8320,26 +8545,30 @@
|
|
|
8320
8545
|
this.model.hover_data = null;
|
|
8321
8546
|
});
|
|
8322
8547
|
}
|
|
8323
|
-
plot() {
|
|
8324
|
-
if (!window.Plotly)
|
|
8548
|
+
async plot() {
|
|
8549
|
+
if (!window.Plotly)
|
|
8325
8550
|
return;
|
|
8326
|
-
}
|
|
8327
8551
|
const data = this._trace_data();
|
|
8328
8552
|
const newLayout = this._layout_data();
|
|
8329
8553
|
this._reacting = true;
|
|
8330
|
-
window.Plotly.react(this._layout_wrapper, data, newLayout, this.model.config)
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
this.
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8554
|
+
await window.Plotly.react(this._layout_wrapper, data, newLayout, this.model.config);
|
|
8555
|
+
this._updateSetViewportFunction();
|
|
8556
|
+
this._updateViewportProperty();
|
|
8557
|
+
if (!this._plotInitialized)
|
|
8558
|
+
this._install_callbacks();
|
|
8559
|
+
else if (!_isHidden(this._layout_wrapper))
|
|
8560
|
+
window.Plotly.Plots.resize(this._layout_wrapper);
|
|
8561
|
+
this._reacting = false;
|
|
8562
|
+
this._plotInitialized = true;
|
|
8563
|
+
}
|
|
8564
|
+
after_layout() {
|
|
8565
|
+
super.after_layout();
|
|
8566
|
+
(0, layout_1.set_size)(this.el, this.model);
|
|
8567
|
+
if (window.Plotly && this._plotInitialized)
|
|
8568
|
+
window.Plotly.Plots.resize(this._layout_wrapper);
|
|
8340
8569
|
}
|
|
8341
8570
|
_get_trace(index, update) {
|
|
8342
|
-
const trace = object_1.clone(this.model.data[index]);
|
|
8571
|
+
const trace = (0, object_1.clone)(this.model.data[index]);
|
|
8343
8572
|
const cds = this.model.data_sources[index];
|
|
8344
8573
|
for (const column of cds.columns()) {
|
|
8345
8574
|
let array = cds.get_array(column)[0];
|
|
@@ -8373,10 +8602,13 @@
|
|
|
8373
8602
|
const fullLayout = this._layout_wrapper._fullLayout;
|
|
8374
8603
|
// Call relayout if viewport differs from fullLayout
|
|
8375
8604
|
Object.keys(this.model.viewport).reduce((value, key) => {
|
|
8376
|
-
if (!eq_1.isEqual(util_1.get(fullLayout, key), value)) {
|
|
8377
|
-
let clonedViewport = util_1.deepCopy(this.model.viewport);
|
|
8605
|
+
if (!(0, eq_1.isEqual)((0, util_1.get)(fullLayout, key), value)) {
|
|
8606
|
+
let clonedViewport = (0, util_1.deepCopy)(this.model.viewport);
|
|
8378
8607
|
clonedViewport['_update_from_property'] = true;
|
|
8379
|
-
|
|
8608
|
+
this._settingViewport = true;
|
|
8609
|
+
window.Plotly.relayout(this.el, clonedViewport).then(() => {
|
|
8610
|
+
this._settingViewport = false;
|
|
8611
|
+
});
|
|
8380
8612
|
return false;
|
|
8381
8613
|
}
|
|
8382
8614
|
else {
|
|
@@ -8389,17 +8621,14 @@
|
|
|
8389
8621
|
let viewport = {};
|
|
8390
8622
|
// Get range for all xaxis and yaxis properties
|
|
8391
8623
|
for (let prop in fullLayout) {
|
|
8392
|
-
if (!fullLayout.hasOwnProperty(prop))
|
|
8624
|
+
if (!fullLayout.hasOwnProperty(prop))
|
|
8393
8625
|
continue;
|
|
8394
|
-
}
|
|
8395
8626
|
let maybe_axis = prop.slice(0, 5);
|
|
8396
|
-
if (maybe_axis === 'xaxis' || maybe_axis === 'yaxis')
|
|
8397
|
-
viewport[prop + '.range'] = util_1.deepCopy(fullLayout[prop].range);
|
|
8398
|
-
}
|
|
8627
|
+
if (maybe_axis === 'xaxis' || maybe_axis === 'yaxis')
|
|
8628
|
+
viewport[prop + '.range'] = (0, util_1.deepCopy)(fullLayout[prop].range);
|
|
8399
8629
|
}
|
|
8400
|
-
if (!eq_1.isEqual(viewport, this.model.viewport))
|
|
8630
|
+
if (!(0, eq_1.isEqual)(viewport, this.model.viewport))
|
|
8401
8631
|
this._setViewport(viewport);
|
|
8402
|
-
}
|
|
8403
8632
|
}
|
|
8404
8633
|
_updateSetViewportFunction() {
|
|
8405
8634
|
if (this.model.viewport_update_policy === "continuous" ||
|
|
@@ -8413,7 +8642,7 @@
|
|
|
8413
8642
|
};
|
|
8414
8643
|
}
|
|
8415
8644
|
else {
|
|
8416
|
-
this._setViewport = util_1.throttle((viewport) => {
|
|
8645
|
+
this._setViewport = (0, util_1.throttle)((viewport) => {
|
|
8417
8646
|
if (!this._settingViewport) {
|
|
8418
8647
|
this._settingViewport = true;
|
|
8419
8648
|
this.model.viewport = viewport;
|
|
@@ -8456,73 +8685,6 @@
|
|
|
8456
8685
|
PlotlyPlot.__module__ = "panel.models.plotly";
|
|
8457
8686
|
PlotlyPlot.init_PlotlyPlot();
|
|
8458
8687
|
},
|
|
8459
|
-
"99a25e6992": /* debounce/index.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8460
|
-
/**
|
|
8461
|
-
* Returns a function, that, as long as it continues to be invoked, will not
|
|
8462
|
-
* be triggered. The function will be called after it stops being called for
|
|
8463
|
-
* N milliseconds. If `immediate` is passed, trigger the function on the
|
|
8464
|
-
* leading edge, instead of the trailing. The function also has a property 'clear'
|
|
8465
|
-
* that is a function which will clear the timer to prevent previously scheduled executions.
|
|
8466
|
-
*
|
|
8467
|
-
* @source underscore.js
|
|
8468
|
-
* @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
|
|
8469
|
-
* @param {Function} function to wrap
|
|
8470
|
-
* @param {Number} timeout in ms (`100`)
|
|
8471
|
-
* @param {Boolean} whether to execute at the beginning (`false`)
|
|
8472
|
-
* @api public
|
|
8473
|
-
*/
|
|
8474
|
-
function debounce(func, wait, immediate) {
|
|
8475
|
-
var timeout, args, context, timestamp, result;
|
|
8476
|
-
if (null == wait)
|
|
8477
|
-
wait = 100;
|
|
8478
|
-
function later() {
|
|
8479
|
-
var last = Date.now() - timestamp;
|
|
8480
|
-
if (last < wait && last >= 0) {
|
|
8481
|
-
timeout = setTimeout(later, wait - last);
|
|
8482
|
-
}
|
|
8483
|
-
else {
|
|
8484
|
-
timeout = null;
|
|
8485
|
-
if (!immediate) {
|
|
8486
|
-
result = func.apply(context, args);
|
|
8487
|
-
context = args = null;
|
|
8488
|
-
}
|
|
8489
|
-
}
|
|
8490
|
-
}
|
|
8491
|
-
;
|
|
8492
|
-
var debounced = function () {
|
|
8493
|
-
context = this;
|
|
8494
|
-
args = arguments;
|
|
8495
|
-
timestamp = Date.now();
|
|
8496
|
-
var callNow = immediate && !timeout;
|
|
8497
|
-
if (!timeout)
|
|
8498
|
-
timeout = setTimeout(later, wait);
|
|
8499
|
-
if (callNow) {
|
|
8500
|
-
result = func.apply(context, args);
|
|
8501
|
-
context = args = null;
|
|
8502
|
-
}
|
|
8503
|
-
return result;
|
|
8504
|
-
};
|
|
8505
|
-
debounced.clear = function () {
|
|
8506
|
-
if (timeout) {
|
|
8507
|
-
clearTimeout(timeout);
|
|
8508
|
-
timeout = null;
|
|
8509
|
-
}
|
|
8510
|
-
};
|
|
8511
|
-
debounced.flush = function () {
|
|
8512
|
-
if (timeout) {
|
|
8513
|
-
result = func.apply(context, args);
|
|
8514
|
-
context = args = null;
|
|
8515
|
-
clearTimeout(timeout);
|
|
8516
|
-
timeout = null;
|
|
8517
|
-
}
|
|
8518
|
-
};
|
|
8519
|
-
return debounced;
|
|
8520
|
-
}
|
|
8521
|
-
;
|
|
8522
|
-
// Adds compatibility for ES modules
|
|
8523
|
-
debounce.debounce = debounce;
|
|
8524
|
-
module.exports = debounce;
|
|
8525
|
-
},
|
|
8526
8688
|
"990b5dd5c7": /* models/util.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8527
8689
|
__esModule();
|
|
8528
8690
|
const get = (obj, path, defaultValue = undefined) => {
|
|
@@ -8576,10 +8738,10 @@
|
|
|
8576
8738
|
}
|
|
8577
8739
|
exports.isPlainObject = isPlainObject;
|
|
8578
8740
|
},
|
|
8579
|
-
"
|
|
8741
|
+
"fd3806082d": /* models/progress.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8580
8742
|
__esModule();
|
|
8581
8743
|
const tslib_1 = require("tslib");
|
|
8582
|
-
const p = tslib_1.__importStar(require("@bokehjs/core/properties"));
|
|
8744
|
+
const p = (0, tslib_1.__importStar)(require("@bokehjs/core/properties"));
|
|
8583
8745
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
8584
8746
|
const layout_1 = require("4c755983eb") /* ./layout */;
|
|
8585
8747
|
class ProgressView extends html_box_1.HTMLBoxView {
|
|
@@ -8606,7 +8768,7 @@
|
|
|
8606
8768
|
this.progressEl = document.createElement('progress');
|
|
8607
8769
|
this.setValue();
|
|
8608
8770
|
this.setMax();
|
|
8609
|
-
layout_1.set_size(this.progressEl, this.model);
|
|
8771
|
+
(0, layout_1.set_size)(this.progressEl, this.model);
|
|
8610
8772
|
// Set styling
|
|
8611
8773
|
this.setCSS();
|
|
8612
8774
|
for (const prop in style)
|
|
@@ -8620,8 +8782,13 @@
|
|
|
8620
8782
|
this.progressEl.className = css;
|
|
8621
8783
|
}
|
|
8622
8784
|
setValue() {
|
|
8623
|
-
if (this.model.value
|
|
8785
|
+
if (this.model.value == null)
|
|
8786
|
+
this.progressEl.value = 0;
|
|
8787
|
+
else if (this.model.value >= 0)
|
|
8624
8788
|
this.progressEl.value = this.model.value;
|
|
8789
|
+
else if (this.model.value < 0)
|
|
8790
|
+
this.progressEl.removeAttribute("value");
|
|
8791
|
+
console.log(this.progressEl);
|
|
8625
8792
|
}
|
|
8626
8793
|
setMax() {
|
|
8627
8794
|
if (this.model.max != null)
|
|
@@ -8657,7 +8824,96 @@
|
|
|
8657
8824
|
Progress.__module__ = "panel.models.widgets";
|
|
8658
8825
|
Progress.init_Progress();
|
|
8659
8826
|
},
|
|
8660
|
-
"
|
|
8827
|
+
"6895629dfc": /* models/quill.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8828
|
+
__esModule();
|
|
8829
|
+
const dom_1 = require("@bokehjs/core/dom");
|
|
8830
|
+
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
8831
|
+
const layout_1 = require("4c755983eb") /* ./layout */;
|
|
8832
|
+
class QuillInputView extends layout_1.PanelHTMLBoxView {
|
|
8833
|
+
initialize() {
|
|
8834
|
+
super.initialize();
|
|
8835
|
+
this._container = (0, dom_1.div)({});
|
|
8836
|
+
}
|
|
8837
|
+
connect_signals() {
|
|
8838
|
+
super.connect_signals();
|
|
8839
|
+
this.connect(this.model.properties.disabled.change, () => this.quill.enable(!this.model.disabled));
|
|
8840
|
+
this.connect(this.model.properties.text.change, () => {
|
|
8841
|
+
if (this._editing)
|
|
8842
|
+
return;
|
|
8843
|
+
this._editing = true;
|
|
8844
|
+
this.quill.setContents([]);
|
|
8845
|
+
this.quill.clipboard.dangerouslyPasteHTML(this.model.text);
|
|
8846
|
+
this._editing = false;
|
|
8847
|
+
});
|
|
8848
|
+
const { mode, toolbar } = this.model.properties;
|
|
8849
|
+
this.on_change([mode, toolbar], () => {
|
|
8850
|
+
this.render();
|
|
8851
|
+
this._layout_toolbar();
|
|
8852
|
+
});
|
|
8853
|
+
}
|
|
8854
|
+
_layout_toolbar() {
|
|
8855
|
+
if (this._toolbar == null) {
|
|
8856
|
+
this.el.style.removeProperty('padding-top');
|
|
8857
|
+
}
|
|
8858
|
+
else {
|
|
8859
|
+
const height = this._toolbar.getBoundingClientRect().height + 1;
|
|
8860
|
+
this.el.style.paddingTop = height + "px";
|
|
8861
|
+
this._toolbar.style.marginTop = -height + "px";
|
|
8862
|
+
}
|
|
8863
|
+
}
|
|
8864
|
+
render() {
|
|
8865
|
+
super.render();
|
|
8866
|
+
this.el.appendChild(this._container);
|
|
8867
|
+
const theme = (this.model.mode === 'bubble') ? 'bubble' : 'snow';
|
|
8868
|
+
this.quill = new window.Quill(this._container, {
|
|
8869
|
+
modules: {
|
|
8870
|
+
toolbar: this.model.toolbar
|
|
8871
|
+
},
|
|
8872
|
+
placeholder: this.model.placeholder,
|
|
8873
|
+
theme: theme
|
|
8874
|
+
});
|
|
8875
|
+
this._editor = this.el.querySelector('.ql-editor');
|
|
8876
|
+
this._toolbar = this.el.querySelector('.ql-toolbar');
|
|
8877
|
+
this.quill.clipboard.dangerouslyPasteHTML(this.model.text);
|
|
8878
|
+
this.quill.on('text-change', () => {
|
|
8879
|
+
if (this._editing)
|
|
8880
|
+
return;
|
|
8881
|
+
this._editing = true;
|
|
8882
|
+
this.model.text = this._editor.innerHTML;
|
|
8883
|
+
this._editing = false;
|
|
8884
|
+
});
|
|
8885
|
+
}
|
|
8886
|
+
after_layout() {
|
|
8887
|
+
super.after_layout();
|
|
8888
|
+
this._layout_toolbar();
|
|
8889
|
+
}
|
|
8890
|
+
}
|
|
8891
|
+
exports.QuillInputView = QuillInputView;
|
|
8892
|
+
QuillInputView.__name__ = "QuillInputView";
|
|
8893
|
+
class QuillInput extends html_box_1.HTMLBox {
|
|
8894
|
+
constructor(attrs) {
|
|
8895
|
+
super(attrs);
|
|
8896
|
+
}
|
|
8897
|
+
static init_QuillInput() {
|
|
8898
|
+
this.prototype.default_view = QuillInputView;
|
|
8899
|
+
this.define(({ Any, Boolean, String }) => ({
|
|
8900
|
+
mode: [String, 'toolbar'],
|
|
8901
|
+
placeholder: [String, ''],
|
|
8902
|
+
readonly: [Boolean, false],
|
|
8903
|
+
text: [String, ''],
|
|
8904
|
+
toolbar: [Any, null],
|
|
8905
|
+
}));
|
|
8906
|
+
this.override({
|
|
8907
|
+
height: 300
|
|
8908
|
+
});
|
|
8909
|
+
}
|
|
8910
|
+
}
|
|
8911
|
+
exports.QuillInput = QuillInput;
|
|
8912
|
+
QuillInput.__name__ = "QuillInput";
|
|
8913
|
+
QuillInput.__module__ = "panel.models.quill";
|
|
8914
|
+
QuillInput.init_QuillInput();
|
|
8915
|
+
},
|
|
8916
|
+
"eb3a49319b": /* models/reactive_html.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8661
8917
|
__esModule();
|
|
8662
8918
|
const preact_1 = require("6f11f2ef27") /* preact */;
|
|
8663
8919
|
const hooks_1 = require("4c02a9b43f") /* preact/hooks */;
|
|
@@ -8669,7 +8925,7 @@
|
|
|
8669
8925
|
const color_1 = require("@bokehjs/core/util/color");
|
|
8670
8926
|
const data_1 = require("f1971f81bf") /* ./data */;
|
|
8671
8927
|
const event_to_object_1 = require("3329d4aa5b") /* ./event-to-object */;
|
|
8672
|
-
const html_1 = require("
|
|
8928
|
+
const html_1 = require("c424a3bd17") /* ./html */;
|
|
8673
8929
|
const layout_1 = require("4c755983eb") /* ./layout */;
|
|
8674
8930
|
function serialize_attrs(attrs) {
|
|
8675
8931
|
const serialized = {};
|
|
@@ -8737,7 +8993,7 @@
|
|
|
8737
8993
|
}
|
|
8738
8994
|
initialize() {
|
|
8739
8995
|
super.initialize();
|
|
8740
|
-
this.html = html_1.htmlDecode(this.model.html) || this.model.html;
|
|
8996
|
+
this.html = (0, html_1.htmlDecode)(this.model.html) || this.model.html;
|
|
8741
8997
|
}
|
|
8742
8998
|
_recursive_connect(model, update_children, path) {
|
|
8743
8999
|
for (const prop in model.properties) {
|
|
@@ -8747,6 +9003,8 @@
|
|
|
8747
9003
|
else
|
|
8748
9004
|
subpath = prop;
|
|
8749
9005
|
const obj = model[prop];
|
|
9006
|
+
if (obj == null)
|
|
9007
|
+
continue;
|
|
8750
9008
|
if (obj.properties != null)
|
|
8751
9009
|
this._recursive_connect(obj, true, subpath);
|
|
8752
9010
|
this.connect(model.properties[prop].change, () => {
|
|
@@ -8754,7 +9012,7 @@
|
|
|
8754
9012
|
for (const node in this.model.children) {
|
|
8755
9013
|
if (this.model.children[node] == prop) {
|
|
8756
9014
|
let children = model[prop];
|
|
8757
|
-
if (!types_1.isArray(children))
|
|
9015
|
+
if (!(0, types_1.isArray)(children))
|
|
8758
9016
|
children = [children];
|
|
8759
9017
|
this._render_node(node, children);
|
|
8760
9018
|
this.invalidate_layout();
|
|
@@ -8772,7 +9030,7 @@
|
|
|
8772
9030
|
connect_signals() {
|
|
8773
9031
|
super.connect_signals();
|
|
8774
9032
|
this.connect(this.model.properties.children.change, async () => {
|
|
8775
|
-
this.html = html_1.htmlDecode(this.model.html) || this.model.html;
|
|
9033
|
+
this.html = (0, html_1.htmlDecode)(this.model.html) || this.model.html;
|
|
8776
9034
|
await this.rebuild();
|
|
8777
9035
|
this.invalidate_layout();
|
|
8778
9036
|
});
|
|
@@ -8799,7 +9057,7 @@
|
|
|
8799
9057
|
attr = prop;
|
|
8800
9058
|
}
|
|
8801
9059
|
for (const script of scripts) {
|
|
8802
|
-
const decoded_script = html_1.htmlDecode(script) || script;
|
|
9060
|
+
const decoded_script = (0, html_1.htmlDecode)(script) || script;
|
|
8803
9061
|
const script_fn = this._render_script(decoded_script, id);
|
|
8804
9062
|
this._script_fns[prop] = script_fn;
|
|
8805
9063
|
const property = data_model.properties[attr];
|
|
@@ -8827,7 +9085,7 @@
|
|
|
8827
9085
|
return script_fn(this.model, this.model.data, this._state, this, (s) => this.run_script(s), this_obj);
|
|
8828
9086
|
}
|
|
8829
9087
|
get_records(property, index = true) {
|
|
8830
|
-
return data_1.dict_to_records(this.model.data[property], index);
|
|
9088
|
+
return (0, data_1.dict_to_records)(this.model.data[property], index);
|
|
8831
9089
|
}
|
|
8832
9090
|
disconnect_signals() {
|
|
8833
9091
|
super.disconnect_signals();
|
|
@@ -8845,7 +9103,7 @@
|
|
|
8845
9103
|
return models;
|
|
8846
9104
|
}
|
|
8847
9105
|
async build_child_views() {
|
|
8848
|
-
await build_views_1.build_views(this._child_views, this.child_models, { parent: null });
|
|
9106
|
+
await (0, build_views_1.build_views)(this._child_views, this.child_models, { parent: null });
|
|
8849
9107
|
}
|
|
8850
9108
|
compute_layout() {
|
|
8851
9109
|
if (this.root != this)
|
|
@@ -8875,7 +9133,7 @@
|
|
|
8875
9133
|
_align_view(view) {
|
|
8876
9134
|
const { align } = view.model;
|
|
8877
9135
|
let halign, valign;
|
|
8878
|
-
if (types_1.isArray(align))
|
|
9136
|
+
if ((0, types_1.isArray)(align))
|
|
8879
9137
|
[halign, valign] = align;
|
|
8880
9138
|
else
|
|
8881
9139
|
halign = valign = align;
|
|
@@ -8893,10 +9151,10 @@
|
|
|
8893
9151
|
view.el.style.marginTop = 'auto';
|
|
8894
9152
|
}
|
|
8895
9153
|
render() {
|
|
8896
|
-
dom_1.empty(this.el);
|
|
9154
|
+
(0, dom_1.empty)(this.el);
|
|
8897
9155
|
const { background } = this.model;
|
|
8898
|
-
this.el.style.backgroundColor = background != null ? color_1.color2css(background) : "";
|
|
8899
|
-
dom_1.classes(this.el).clear().add(...this.css_classes());
|
|
9156
|
+
this.el.style.backgroundColor = background != null ? (0, color_1.color2css)(background) : "";
|
|
9157
|
+
(0, dom_1.classes)(this.el).clear().add(...this.css_classes());
|
|
8900
9158
|
this._update();
|
|
8901
9159
|
this._render_children();
|
|
8902
9160
|
this._setup_mutation_observers();
|
|
@@ -8904,14 +9162,14 @@
|
|
|
8904
9162
|
this.run_script('render', true);
|
|
8905
9163
|
}
|
|
8906
9164
|
_send_event(elname, attr, event) {
|
|
8907
|
-
let serialized = event_to_object_1.serializeEvent(event);
|
|
9165
|
+
let serialized = (0, event_to_object_1.serializeEvent)(event);
|
|
8908
9166
|
serialized.type = attr;
|
|
8909
9167
|
this.model.trigger_event(new html_1.DOMEvent(elname, serialized));
|
|
8910
9168
|
}
|
|
8911
9169
|
_render_child(model, el) {
|
|
8912
9170
|
const view = this._child_views.get(model);
|
|
8913
9171
|
if (view == null)
|
|
8914
|
-
el.innerHTML = model;
|
|
9172
|
+
el.innerHTML = (0, html_1.htmlDecode)(model) || model;
|
|
8915
9173
|
else {
|
|
8916
9174
|
view._parent = this;
|
|
8917
9175
|
view.renderTo(el);
|
|
@@ -8935,13 +9193,13 @@
|
|
|
8935
9193
|
return;
|
|
8936
9194
|
}
|
|
8937
9195
|
this.el.style.display = this.model.visible ? "block" : "none";
|
|
8938
|
-
layout_1.set_size(this.el, this.model);
|
|
9196
|
+
(0, layout_1.set_size)(this.el, this.model);
|
|
8939
9197
|
let { margin } = this.model;
|
|
8940
9198
|
let margin_spec = null;
|
|
8941
9199
|
if (margin == null)
|
|
8942
9200
|
this.el.style.margin = "";
|
|
8943
9201
|
else {
|
|
8944
|
-
if (types_1.isNumber(margin))
|
|
9202
|
+
if ((0, types_1.isNumber)(margin))
|
|
8945
9203
|
margin_spec = { top: margin, right: margin, bottom: margin, left: margin };
|
|
8946
9204
|
else if (margin.length == 2) {
|
|
8947
9205
|
const [vertical, horizontal] = margin;
|
|
@@ -8984,7 +9242,7 @@
|
|
|
8984
9242
|
let children = this.model.children[node];
|
|
8985
9243
|
if (typeof children == "string") {
|
|
8986
9244
|
children = this.model.data[children];
|
|
8987
|
-
if (!types_1.isArray(children))
|
|
9245
|
+
if (!(0, types_1.isArray)(children))
|
|
8988
9246
|
children = [children];
|
|
8989
9247
|
}
|
|
8990
9248
|
this._render_node(node, children);
|
|
@@ -9120,7 +9378,7 @@
|
|
|
9120
9378
|
const rendered = this._render_html(this.html);
|
|
9121
9379
|
try {
|
|
9122
9380
|
this._changing = true;
|
|
9123
|
-
preact_1.render(rendered, this.el);
|
|
9381
|
+
(0, preact_1.render)(rendered, this.el);
|
|
9124
9382
|
}
|
|
9125
9383
|
finally {
|
|
9126
9384
|
this._changing = false;
|
|
@@ -9188,13 +9446,13 @@
|
|
|
9188
9446
|
ReactiveHTML.__module__ = "panel.models.reactive_html";
|
|
9189
9447
|
ReactiveHTML.init_ReactiveHTML();
|
|
9190
9448
|
},
|
|
9191
|
-
"
|
|
9449
|
+
"5ed2116e26": /* models/singleselect.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
9192
9450
|
__esModule();
|
|
9193
9451
|
const tslib_1 = require("tslib");
|
|
9194
9452
|
const dom_1 = require("@bokehjs/core/dom");
|
|
9195
9453
|
const types_1 = require("@bokehjs/core/util/types");
|
|
9196
9454
|
const input_widget_1 = require("@bokehjs/models/widgets/input_widget");
|
|
9197
|
-
const inputs = tslib_1.__importStar(require("@bokehjs/styles/widgets/inputs.css"));
|
|
9455
|
+
const inputs = (0, tslib_1.__importStar)(require("@bokehjs/styles/widgets/inputs.css"));
|
|
9198
9456
|
class SingleSelectView extends input_widget_1.InputWidgetView {
|
|
9199
9457
|
connect_signals() {
|
|
9200
9458
|
super.connect_signals();
|
|
@@ -9209,13 +9467,13 @@
|
|
|
9209
9467
|
super.render();
|
|
9210
9468
|
const options = this.model.options.map((opt) => {
|
|
9211
9469
|
let value, _label;
|
|
9212
|
-
if (types_1.isString(opt))
|
|
9470
|
+
if ((0, types_1.isString)(opt))
|
|
9213
9471
|
value = _label = opt;
|
|
9214
9472
|
else
|
|
9215
9473
|
[value, _label] = opt;
|
|
9216
|
-
return dom_1.option({ value }, _label);
|
|
9474
|
+
return (0, dom_1.option)({ value }, _label);
|
|
9217
9475
|
});
|
|
9218
|
-
this.select_el = dom_1.select({
|
|
9476
|
+
this.select_el = (0, dom_1.select)({
|
|
9219
9477
|
multiple: false,
|
|
9220
9478
|
class: inputs.input,
|
|
9221
9479
|
name: this.model.name,
|
|
@@ -9265,7 +9523,7 @@
|
|
|
9265
9523
|
this.define(({ Any, Array, Int, String }) => ({
|
|
9266
9524
|
value: [String, ""],
|
|
9267
9525
|
options: [Array(Any), []],
|
|
9268
|
-
size: [Int, 4],
|
|
9526
|
+
size: [Int, 4], // 4 is the HTML default
|
|
9269
9527
|
}));
|
|
9270
9528
|
}
|
|
9271
9529
|
}
|
|
@@ -9277,7 +9535,7 @@
|
|
|
9277
9535
|
"aaa48703af": /* models/speech_to_text.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
9278
9536
|
__esModule();
|
|
9279
9537
|
const tslib_1 = require("tslib");
|
|
9280
|
-
const p = tslib_1.__importStar(require("@bokehjs/core/properties"));
|
|
9538
|
+
const p = (0, tslib_1.__importStar)(require("@bokehjs/core/properties"));
|
|
9281
9539
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
9282
9540
|
const iconStarted = `<svg xmlns="http://www.w3.org/2000/svg" height="22px" style="vertical-align: middle;" fill="currentColor" class="bi bi-mic" viewBox="0 0 16 16">
|
|
9283
9541
|
<path fill-rule="evenodd" d="M3.5 6.5A.5.5 0 0 1 4 7v1a4 4 0 0 0 8 0V7a.5.5 0 0 1 1 0v1a5 5 0 0 1-4.5 4.975V15h3a.5.5 0 0 1 0 1h-7a.5.5 0 0 1 0-1h3v-2.025A5 5 0 0 1 3 8V7a.5.5 0 0 1 .5-.5z"/>
|
|
@@ -9510,7 +9768,7 @@
|
|
|
9510
9768
|
this.apply_state(this._cache[current]);
|
|
9511
9769
|
}
|
|
9512
9770
|
set_state(widget, value) {
|
|
9513
|
-
let values = array_1.copy(this.values);
|
|
9771
|
+
let values = (0, array_1.copy)(this.values);
|
|
9514
9772
|
const index = this.widgets[widget.id];
|
|
9515
9773
|
values[index] = value;
|
|
9516
9774
|
let state = this.state;
|
|
@@ -9545,11 +9803,24 @@
|
|
|
9545
9803
|
State.__module__ = "panel.models.state";
|
|
9546
9804
|
State.init_State();
|
|
9547
9805
|
},
|
|
9548
|
-
"
|
|
9806
|
+
"edf66f5228": /* models/terminal.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
9549
9807
|
__esModule();
|
|
9550
9808
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
9551
9809
|
const dom_1 = require("@bokehjs/core/dom");
|
|
9810
|
+
const bokeh_events_1 = require("@bokehjs/core/bokeh_events");
|
|
9552
9811
|
const layout_1 = require("4c755983eb") /* ./layout */;
|
|
9812
|
+
class KeystrokeEvent extends bokeh_events_1.ModelEvent {
|
|
9813
|
+
constructor(key) {
|
|
9814
|
+
super();
|
|
9815
|
+
this.key = key;
|
|
9816
|
+
this.event_name = "keystroke";
|
|
9817
|
+
}
|
|
9818
|
+
_to_json() {
|
|
9819
|
+
return { model: this.origin, key: this.key };
|
|
9820
|
+
}
|
|
9821
|
+
}
|
|
9822
|
+
exports.KeystrokeEvent = KeystrokeEvent;
|
|
9823
|
+
KeystrokeEvent.__name__ = "KeystrokeEvent";
|
|
9553
9824
|
class TerminalView extends layout_1.PanelHTMLBoxView {
|
|
9554
9825
|
connect_signals() {
|
|
9555
9826
|
super.connect_signals();
|
|
@@ -9558,8 +9829,8 @@
|
|
|
9558
9829
|
}
|
|
9559
9830
|
render() {
|
|
9560
9831
|
super.render();
|
|
9561
|
-
this.container = dom_1.div({ class: "terminal-container" });
|
|
9562
|
-
layout_1.set_size(this.container, this.model);
|
|
9832
|
+
this.container = (0, dom_1.div)({ class: "terminal-container" });
|
|
9833
|
+
(0, layout_1.set_size)(this.container, this.model);
|
|
9563
9834
|
this.term = this.getNewTerminal();
|
|
9564
9835
|
this.term.onData((value) => {
|
|
9565
9836
|
this.handleOnData(value);
|
|
@@ -9568,9 +9839,8 @@
|
|
|
9568
9839
|
this.term.loadAddon(this.webLinksAddon);
|
|
9569
9840
|
this.term.open(this.container);
|
|
9570
9841
|
this.term.onRender(() => {
|
|
9571
|
-
if (!this._rendered)
|
|
9842
|
+
if (!this._rendered)
|
|
9572
9843
|
this.fit();
|
|
9573
|
-
}
|
|
9574
9844
|
});
|
|
9575
9845
|
this.write();
|
|
9576
9846
|
this.el.appendChild(this.container);
|
|
@@ -9587,11 +9857,7 @@
|
|
|
9587
9857
|
return new wn.WebLinksAddon.WebLinksAddon();
|
|
9588
9858
|
}
|
|
9589
9859
|
handleOnData(value) {
|
|
9590
|
-
|
|
9591
|
-
if (this.model.input === value)
|
|
9592
|
-
this.model._value_repeats += 1;
|
|
9593
|
-
else
|
|
9594
|
-
this.model.input = value;
|
|
9860
|
+
this.model.trigger_event(new KeystrokeEvent(value));
|
|
9595
9861
|
}
|
|
9596
9862
|
write() {
|
|
9597
9863
|
const text = this.model.output;
|
|
@@ -9603,7 +9869,6 @@
|
|
|
9603
9869
|
this.term.write(cleaned);
|
|
9604
9870
|
}
|
|
9605
9871
|
clear() {
|
|
9606
|
-
// https://stackoverflow.com/questions/65367607/how-to-handle-new-line-in-xterm-js-while-writing-data-into-the-terminal
|
|
9607
9872
|
this.term.clear();
|
|
9608
9873
|
}
|
|
9609
9874
|
fit() {
|
|
@@ -9616,10 +9881,10 @@
|
|
|
9616
9881
|
return;
|
|
9617
9882
|
const cols = Math.max(2, Math.floor(width / cell_width));
|
|
9618
9883
|
const rows = Math.max(1, Math.floor(height / cell_height));
|
|
9619
|
-
if (this.term.rows !== rows || this.term.cols !== cols)
|
|
9620
|
-
renderer.clear();
|
|
9884
|
+
if (this.term.rows !== rows || this.term.cols !== cols)
|
|
9621
9885
|
this.term.resize(cols, rows);
|
|
9622
|
-
|
|
9886
|
+
this.model.ncols = cols;
|
|
9887
|
+
this.model.nrows = rows;
|
|
9623
9888
|
this._rendered = true;
|
|
9624
9889
|
}
|
|
9625
9890
|
after_layout() {
|
|
@@ -9641,11 +9906,11 @@
|
|
|
9641
9906
|
static init_Terminal() {
|
|
9642
9907
|
this.prototype.default_view = TerminalView;
|
|
9643
9908
|
this.define(({ Any, Int, String }) => ({
|
|
9909
|
+
_clears: [Int, 0],
|
|
9644
9910
|
options: [Any, {}],
|
|
9645
9911
|
output: [String,],
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
_value_repeats: [Int, 0],
|
|
9912
|
+
ncols: [Int],
|
|
9913
|
+
nrows: [Int],
|
|
9649
9914
|
}));
|
|
9650
9915
|
}
|
|
9651
9916
|
}
|
|
@@ -9784,7 +10049,7 @@
|
|
|
9784
10049
|
TextToSpeech.__module__ = "panel.models.text_to_speech";
|
|
9785
10050
|
TextToSpeech.init_TextToSpeech();
|
|
9786
10051
|
},
|
|
9787
|
-
"
|
|
10052
|
+
"effe070807": /* models/trend.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
9788
10053
|
__esModule();
|
|
9789
10054
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
9790
10055
|
const build_views_1 = require("@bokehjs/core/build_views");
|
|
@@ -9799,19 +10064,19 @@
|
|
|
9799
10064
|
class TrendIndicatorView extends html_box_1.HTMLBoxView {
|
|
9800
10065
|
initialize() {
|
|
9801
10066
|
super.initialize();
|
|
9802
|
-
this.containerDiv = dom_1.div({ style: "height:100%; width:100%;" });
|
|
9803
|
-
this.titleDiv = dom_1.div({ style: "font-size: 1em; word-wrap: break-word;" });
|
|
9804
|
-
this.valueDiv = dom_1.div({ style: "font-size: 2em" });
|
|
9805
|
-
this.value2Div = dom_1.div({ style: "font-size: 1em; opacity: 0.5; display: inline" });
|
|
9806
|
-
this.changeDiv = dom_1.div({ style: "font-size: 1em; opacity: 0.5; display: inline" });
|
|
9807
|
-
this.textDiv = dom_1.div({}, this.titleDiv, this.valueDiv, dom_1.div({}, this.changeDiv, this.value2Div));
|
|
10067
|
+
this.containerDiv = (0, dom_1.div)({ style: "height:100%; width:100%;" });
|
|
10068
|
+
this.titleDiv = (0, dom_1.div)({ style: "font-size: 1em; word-wrap: break-word;" });
|
|
10069
|
+
this.valueDiv = (0, dom_1.div)({ style: "font-size: 2em" });
|
|
10070
|
+
this.value2Div = (0, dom_1.div)({ style: "font-size: 1em; opacity: 0.5; display: inline" });
|
|
10071
|
+
this.changeDiv = (0, dom_1.div)({ style: "font-size: 1em; opacity: 0.5; display: inline" });
|
|
10072
|
+
this.textDiv = (0, dom_1.div)({}, this.titleDiv, this.valueDiv, (0, dom_1.div)({}, this.changeDiv, this.value2Div));
|
|
9808
10073
|
this.updateTitle();
|
|
9809
10074
|
this.updateValue();
|
|
9810
10075
|
this.updateValue2();
|
|
9811
10076
|
this.updateValueChange();
|
|
9812
10077
|
this.updateTextFontSize();
|
|
9813
|
-
this.plotDiv = dom_1.div({});
|
|
9814
|
-
this.containerDiv = dom_1.div({ style: "height:100%; width:100%" }, this.textDiv, this.plotDiv);
|
|
10078
|
+
this.plotDiv = (0, dom_1.div)({});
|
|
10079
|
+
this.containerDiv = (0, dom_1.div)({ style: "height:100%; width:100%" }, this.textDiv, this.plotDiv);
|
|
9815
10080
|
this.updateLayout();
|
|
9816
10081
|
}
|
|
9817
10082
|
connect_signals() {
|
|
@@ -9885,7 +10150,7 @@
|
|
|
9885
10150
|
});
|
|
9886
10151
|
this.plot.add_glyph(vbar, source);
|
|
9887
10152
|
}
|
|
9888
|
-
const view = await build_views_1.build_view(this.plot);
|
|
10153
|
+
const view = await (0, build_views_1.build_view)(this.plot);
|
|
9889
10154
|
this.plotDiv.innerHTML = "";
|
|
9890
10155
|
view.renderTo(this.plotDiv);
|
|
9891
10156
|
}
|
|
@@ -9963,7 +10228,8 @@
|
|
|
9963
10228
|
this.textDiv.style.flex = "1";
|
|
9964
10229
|
this.plotDiv.style.flex = "1";
|
|
9965
10230
|
}
|
|
9966
|
-
this.
|
|
10231
|
+
if (this._has_finished)
|
|
10232
|
+
this.invalidate_layout();
|
|
9967
10233
|
}
|
|
9968
10234
|
}
|
|
9969
10235
|
exports.TrendIndicatorView = TrendIndicatorView;
|
|
@@ -9997,14 +10263,17 @@
|
|
|
9997
10263
|
TrendIndicator.__module__ = "panel.models.trend";
|
|
9998
10264
|
TrendIndicator.init_TrendIndicator();
|
|
9999
10265
|
},
|
|
10000
|
-
"
|
|
10266
|
+
"04fd346566": /* models/vega.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
10001
10267
|
__esModule();
|
|
10002
10268
|
const types_1 = require("@bokehjs/core/util/types");
|
|
10003
10269
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
10004
10270
|
class VegaPlotView extends html_box_1.HTMLBoxView {
|
|
10005
10271
|
connect_signals() {
|
|
10006
10272
|
super.connect_signals();
|
|
10007
|
-
this.
|
|
10273
|
+
const { data, show_actions, theme } = this.model.properties;
|
|
10274
|
+
this.on_change([data, show_actions, theme], () => {
|
|
10275
|
+
this._plot();
|
|
10276
|
+
});
|
|
10008
10277
|
this.connect(this.model.properties.data_sources.change, () => this._connect_sources());
|
|
10009
10278
|
this._connected = [];
|
|
10010
10279
|
this._connect_sources();
|
|
@@ -10050,7 +10319,7 @@
|
|
|
10050
10319
|
delete datasets['data'];
|
|
10051
10320
|
}
|
|
10052
10321
|
if (data.data != null) {
|
|
10053
|
-
const data_objs = types_1.isArray(data.data) ? data.data : [data.data];
|
|
10322
|
+
const data_objs = (0, types_1.isArray)(data.data) ? data.data : [data.data];
|
|
10054
10323
|
for (const d of data_objs) {
|
|
10055
10324
|
if (d.name in datasets) {
|
|
10056
10325
|
d['values'] = datasets[d.name];
|
|
@@ -10060,7 +10329,8 @@
|
|
|
10060
10329
|
}
|
|
10061
10330
|
this.model.data['datasets'] = datasets;
|
|
10062
10331
|
}
|
|
10063
|
-
|
|
10332
|
+
const config = { actions: this.model.show_actions, theme: this.model.theme };
|
|
10333
|
+
window.vegaEmbed(this.el, this.model.data, config);
|
|
10064
10334
|
}
|
|
10065
10335
|
}
|
|
10066
10336
|
exports.VegaPlotView = VegaPlotView;
|
|
@@ -10071,9 +10341,11 @@
|
|
|
10071
10341
|
}
|
|
10072
10342
|
static init_VegaPlot() {
|
|
10073
10343
|
this.prototype.default_view = VegaPlotView;
|
|
10074
|
-
this.define(({ Any }) => ({
|
|
10344
|
+
this.define(({ Any, Boolean, String }) => ({
|
|
10075
10345
|
data: [Any, {}],
|
|
10076
10346
|
data_sources: [Any, {}],
|
|
10347
|
+
show_actions: [Boolean, false],
|
|
10348
|
+
theme: [String,]
|
|
10077
10349
|
}));
|
|
10078
10350
|
}
|
|
10079
10351
|
}
|
|
@@ -10315,19 +10587,19 @@
|
|
|
10315
10587
|
},
|
|
10316
10588
|
"c51f25e2a7": /* models/vtk/index.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
10317
10589
|
__esModule();
|
|
10318
|
-
var vtkjs_1 = require("
|
|
10590
|
+
var vtkjs_1 = require("b6d9199d03") /* ./vtkjs */;
|
|
10319
10591
|
__esExport("VTKJSPlot", vtkjs_1.VTKJSPlot);
|
|
10320
|
-
var vtkvolume_1 = require("
|
|
10592
|
+
var vtkvolume_1 = require("7785475bdd") /* ./vtkvolume */;
|
|
10321
10593
|
__esExport("VTKVolumePlot", vtkvolume_1.VTKVolumePlot);
|
|
10322
|
-
var vtkaxes_1 = require("
|
|
10594
|
+
var vtkaxes_1 = require("204e2f98bd") /* ./vtkaxes */;
|
|
10323
10595
|
__esExport("VTKAxes", vtkaxes_1.VTKAxes);
|
|
10324
|
-
var vtksynchronized_1 = require("
|
|
10596
|
+
var vtksynchronized_1 = require("0a57062475") /* ./vtksynchronized */;
|
|
10325
10597
|
__esExport("VTKSynchronizedPlot", vtksynchronized_1.VTKSynchronizedPlot);
|
|
10326
10598
|
},
|
|
10327
|
-
"
|
|
10599
|
+
"b6d9199d03": /* models/vtk/vtkjs.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
10328
10600
|
__esModule();
|
|
10329
|
-
const vtklayout_1 = require("
|
|
10330
|
-
const util_1 = require("
|
|
10601
|
+
const vtklayout_1 = require("e13c143c7d") /* ./vtklayout */;
|
|
10602
|
+
const util_1 = require("993f3118b2") /* ./util */;
|
|
10331
10603
|
class VTKJSPlotView extends vtklayout_1.AbstractVTKView {
|
|
10332
10604
|
connect_signals() {
|
|
10333
10605
|
super.connect_signals();
|
|
@@ -10362,7 +10634,7 @@
|
|
|
10362
10634
|
renderer: this._vtk_renwin.getRenderer(),
|
|
10363
10635
|
dataAccessHelper,
|
|
10364
10636
|
});
|
|
10365
|
-
const fn =
|
|
10637
|
+
const fn = window.vtk.macro.debounce(() => setTimeout(() => {
|
|
10366
10638
|
if (this._axes == null && this.model.axes)
|
|
10367
10639
|
this._set_axes();
|
|
10368
10640
|
this._set_camera_state();
|
|
@@ -10389,7 +10661,7 @@
|
|
|
10389
10661
|
VTKJSPlot.__name__ = "VTKJSPlot";
|
|
10390
10662
|
VTKJSPlot.init_VTKJSPlot();
|
|
10391
10663
|
},
|
|
10392
|
-
"
|
|
10664
|
+
"e13c143c7d": /* models/vtk/vtklayout.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
10393
10665
|
__esModule();
|
|
10394
10666
|
const dom_1 = require("@bokehjs/core/dom");
|
|
10395
10667
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
@@ -10397,9 +10669,9 @@
|
|
|
10397
10669
|
const color_mapper_1 = require("@bokehjs/models/mappers/color_mapper");
|
|
10398
10670
|
const kinds_1 = require("@bokehjs/core/kinds");
|
|
10399
10671
|
const layout_1 = require("4c755983eb") /* ../layout */;
|
|
10400
|
-
const util_1 = require("
|
|
10672
|
+
const util_1 = require("993f3118b2") /* ./util */;
|
|
10401
10673
|
const vtkcolorbar_1 = require("c010237f8b") /* ./vtkcolorbar */;
|
|
10402
|
-
const vtkaxes_1 = require("
|
|
10674
|
+
const vtkaxes_1 = require("204e2f98bd") /* ./vtkaxes */;
|
|
10403
10675
|
const INFO_DIV_STYLE = {
|
|
10404
10676
|
padding: "0px 2px 0px 2px",
|
|
10405
10677
|
maxHeight: "150px",
|
|
@@ -10414,7 +10686,7 @@
|
|
|
10414
10686
|
bottom: "0px",
|
|
10415
10687
|
position: "absolute",
|
|
10416
10688
|
};
|
|
10417
|
-
const textPositions = kinds_1.Enum("LowerLeft", "LowerRight", "UpperLeft", "UpperRight", "LowerEdge", "RightEdge", "LeftEdge", "UpperEdge");
|
|
10689
|
+
const textPositions = (0, kinds_1.Enum)("LowerLeft", "LowerRight", "UpperLeft", "UpperRight", "LowerEdge", "RightEdge", "LeftEdge", "UpperEdge");
|
|
10418
10690
|
class AbstractVTKView extends layout_1.PanelHTMLBoxView {
|
|
10419
10691
|
initialize() {
|
|
10420
10692
|
super.initialize();
|
|
@@ -10433,8 +10705,8 @@
|
|
|
10433
10705
|
const expand_width = "350px";
|
|
10434
10706
|
const collapsed_width = "30px";
|
|
10435
10707
|
info_div.classList.add('vtk_info');
|
|
10436
|
-
util_1.applyStyle(info_div, INFO_DIV_STYLE);
|
|
10437
|
-
util_1.applyStyle(info_div, { width: expand_width });
|
|
10708
|
+
(0, util_1.applyStyle)(info_div, INFO_DIV_STYLE);
|
|
10709
|
+
(0, util_1.applyStyle)(info_div, { width: expand_width });
|
|
10438
10710
|
this.el.appendChild(info_div);
|
|
10439
10711
|
//construct colorbars
|
|
10440
10712
|
const colorbars = [];
|
|
@@ -10444,17 +10716,17 @@
|
|
|
10444
10716
|
});
|
|
10445
10717
|
//content when collapsed
|
|
10446
10718
|
const dots = document.createElement('div');
|
|
10447
|
-
util_1.applyStyle(dots, { textAlign: "center", fontSize: "20px" });
|
|
10719
|
+
(0, util_1.applyStyle)(dots, { textAlign: "center", fontSize: "20px" });
|
|
10448
10720
|
dots.innerText = "...";
|
|
10449
10721
|
info_div.addEventListener('click', () => {
|
|
10450
10722
|
if (info_div.style.width === collapsed_width) {
|
|
10451
10723
|
info_div.removeChild(dots);
|
|
10452
|
-
util_1.applyStyle(info_div, { height: "auto", width: expand_width });
|
|
10724
|
+
(0, util_1.applyStyle)(info_div, { height: "auto", width: expand_width });
|
|
10453
10725
|
colorbars.forEach((cb) => info_div.appendChild(cb.canvas));
|
|
10454
10726
|
}
|
|
10455
10727
|
else {
|
|
10456
10728
|
colorbars.forEach((cb) => info_div.removeChild(cb.canvas));
|
|
10457
|
-
util_1.applyStyle(info_div, { height: collapsed_width, width: collapsed_width });
|
|
10729
|
+
(0, util_1.applyStyle)(info_div, { height: collapsed_width, width: collapsed_width });
|
|
10458
10730
|
info_div.appendChild(dots);
|
|
10459
10731
|
}
|
|
10460
10732
|
});
|
|
@@ -10537,7 +10809,6 @@
|
|
|
10537
10809
|
});
|
|
10538
10810
|
}
|
|
10539
10811
|
}
|
|
10540
|
-
console.log(this.model.annotations);
|
|
10541
10812
|
}
|
|
10542
10813
|
connect_signals() {
|
|
10543
10814
|
super.connect_signals();
|
|
@@ -10559,10 +10830,10 @@
|
|
|
10559
10830
|
if (!this._vtk_renwin || !this._vtk_container) {
|
|
10560
10831
|
this._orientationWidget = null;
|
|
10561
10832
|
this._axes = null;
|
|
10562
|
-
this._vtk_container = dom_1.div();
|
|
10833
|
+
this._vtk_container = (0, dom_1.div)();
|
|
10563
10834
|
this.init_vtk_renwin();
|
|
10564
10835
|
this._init_annotations_container();
|
|
10565
|
-
layout_1.set_size(this._vtk_container, this.model);
|
|
10836
|
+
(0, layout_1.set_size)(this._vtk_container, this.model);
|
|
10566
10837
|
this.el.appendChild(this._vtk_container);
|
|
10567
10838
|
// update camera model state only at the end of the interaction
|
|
10568
10839
|
// with the scene (avoid bouncing events and large amount of events)
|
|
@@ -10575,7 +10846,7 @@
|
|
|
10575
10846
|
this.model.renderer_el = this._vtk_renwin;
|
|
10576
10847
|
}
|
|
10577
10848
|
else {
|
|
10578
|
-
layout_1.set_size(this._vtk_container, this.model);
|
|
10849
|
+
(0, layout_1.set_size)(this._vtk_container, this.model);
|
|
10579
10850
|
// warning if _vtk_renwin contain controllers or other elements
|
|
10580
10851
|
// we must attach them to the new el
|
|
10581
10852
|
this.el.appendChild(this._vtk_container);
|
|
@@ -10601,6 +10872,9 @@
|
|
|
10601
10872
|
remove() {
|
|
10602
10873
|
this._unsubscribe_camera_cb();
|
|
10603
10874
|
window.removeEventListener("resize", this._vtk_renwin.resize);
|
|
10875
|
+
if (this._orientationWidget != null)
|
|
10876
|
+
this._orientationWidget.delete();
|
|
10877
|
+
this._vtk_renwin.getRenderWindow().getInteractor().delete();
|
|
10604
10878
|
this._vtk_renwin.delete();
|
|
10605
10879
|
super.remove();
|
|
10606
10880
|
}
|
|
@@ -10608,7 +10882,7 @@
|
|
|
10608
10882
|
const vtk_camera = this._vtk_renwin.getRenderer().getActiveCamera();
|
|
10609
10883
|
let state;
|
|
10610
10884
|
if (vtk_camera) {
|
|
10611
|
-
state = object_1.clone(vtk_camera.get());
|
|
10885
|
+
state = (0, object_1.clone)(vtk_camera.get());
|
|
10612
10886
|
delete state.classHierarchy;
|
|
10613
10887
|
delete state.vtkObject;
|
|
10614
10888
|
delete state.vtkCamera;
|
|
@@ -10622,7 +10896,7 @@
|
|
|
10622
10896
|
get _axes_canvas() {
|
|
10623
10897
|
let axes_canvas = this._vtk_container.querySelector(".axes-canvas");
|
|
10624
10898
|
if (!axes_canvas) {
|
|
10625
|
-
axes_canvas = dom_1.canvas({
|
|
10899
|
+
axes_canvas = (0, dom_1.canvas)({
|
|
10626
10900
|
style: {
|
|
10627
10901
|
position: "absolute",
|
|
10628
10902
|
top: "0",
|
|
@@ -10709,11 +10983,11 @@
|
|
|
10709
10983
|
Math.pow(position[2] - focalPoint[2], 2));
|
|
10710
10984
|
camera.setPosition(focalPoint[0] + direction[0] * distance, focalPoint[1] + direction[1] * distance, focalPoint[2] + direction[2] * distance);
|
|
10711
10985
|
if (direction[0])
|
|
10712
|
-
camera.setViewUp(util_1.majorAxis(viewUp, 1, 2));
|
|
10986
|
+
camera.setViewUp((0, util_1.majorAxis)(viewUp, 1, 2));
|
|
10713
10987
|
if (direction[1])
|
|
10714
|
-
camera.setViewUp(util_1.majorAxis(viewUp, 0, 2));
|
|
10988
|
+
camera.setViewUp((0, util_1.majorAxis)(viewUp, 0, 2));
|
|
10715
10989
|
if (direction[2])
|
|
10716
|
-
camera.setViewUp(util_1.majorAxis(viewUp, 0, 1));
|
|
10990
|
+
camera.setViewUp((0, util_1.majorAxis)(viewUp, 0, 1));
|
|
10717
10991
|
this._vtk_renwin.getRenderer().resetCameraClippingRange();
|
|
10718
10992
|
this._vtk_render();
|
|
10719
10993
|
this._get_camera_state();
|
|
@@ -10800,6 +11074,7 @@
|
|
|
10800
11074
|
AbstractVTKView.__name__ = "AbstractVTKView";
|
|
10801
11075
|
class AbstractVTKPlot extends html_box_1.HTMLBox {
|
|
10802
11076
|
constructor(attrs) {
|
|
11077
|
+
(0, util_1.setup_vtkns)();
|
|
10803
11078
|
super(attrs);
|
|
10804
11079
|
}
|
|
10805
11080
|
getActors() {
|
|
@@ -10825,7 +11100,7 @@
|
|
|
10825
11100
|
AbstractVTKPlot.__module__ = "panel.models.vtk";
|
|
10826
11101
|
AbstractVTKPlot.init_AbstractVTKPlot();
|
|
10827
11102
|
},
|
|
10828
|
-
"
|
|
11103
|
+
"993f3118b2": /* models/vtk/util.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
10829
11104
|
__esModule();
|
|
10830
11105
|
const array_1 = require("@bokehjs/core/util/array");
|
|
10831
11106
|
const kinds_1 = require("@bokehjs/core/kinds");
|
|
@@ -10839,66 +11114,71 @@
|
|
|
10839
11114
|
float32: Float32Array,
|
|
10840
11115
|
float64: Float64Array,
|
|
10841
11116
|
};
|
|
10842
|
-
exports.vtk = window.vtk;
|
|
10843
11117
|
exports.vtkns = {};
|
|
10844
|
-
|
|
10845
|
-
exports.vtkns
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
exports.vtkns["
|
|
10849
|
-
exports.vtkns["
|
|
10850
|
-
exports.vtkns["
|
|
10851
|
-
exports.vtkns["
|
|
10852
|
-
exports.vtkns["
|
|
10853
|
-
exports.vtkns["
|
|
10854
|
-
exports.vtkns["
|
|
10855
|
-
exports.vtkns["
|
|
10856
|
-
exports.vtkns["
|
|
10857
|
-
exports.vtkns["
|
|
10858
|
-
exports.vtkns["
|
|
10859
|
-
exports.vtkns["
|
|
10860
|
-
exports.vtkns["
|
|
10861
|
-
exports.vtkns["
|
|
11118
|
+
function setup_vtkns() {
|
|
11119
|
+
if (exports.vtkns.Actor != null)
|
|
11120
|
+
return;
|
|
11121
|
+
const vtk = window.vtk;
|
|
11122
|
+
exports.vtkns["Actor"] = vtk.Rendering.Core.vtkActor;
|
|
11123
|
+
exports.vtkns["AxesActor"] = vtk.Rendering.Core.vtkAxesActor;
|
|
11124
|
+
exports.vtkns["Base64"] = vtk.Common.Core.vtkBase64;
|
|
11125
|
+
exports.vtkns["BoundingBox"] = vtk.Common.DataModel.vtkBoundingBox;
|
|
11126
|
+
exports.vtkns["Camera"] = vtk.Rendering.Core.vtkCamera;
|
|
11127
|
+
exports.vtkns["ColorTransferFunction"] = vtk.Rendering.Core.vtkColorTransferFunction;
|
|
11128
|
+
exports.vtkns["CubeSource"] = vtk.Filters.Sources.vtkCubeSource;
|
|
11129
|
+
exports.vtkns["DataAccessHelper"] = vtk.IO.Core.DataAccessHelper;
|
|
11130
|
+
exports.vtkns["DataArray"] = vtk.Common.Core.vtkDataArray;
|
|
11131
|
+
exports.vtkns["Follower"] = vtk.Rendering.Core.vtkFollower;
|
|
11132
|
+
exports.vtkns["FullScreenRenderWindow"] = vtk.Rendering.Misc.vtkFullScreenRenderWindow;
|
|
11133
|
+
exports.vtkns["Glyph3DMapper"] = vtk.Rendering.Core.vtkGlyph3DMapper;
|
|
11134
|
+
exports.vtkns["HttpSceneLoader"] = vtk.IO.Core.vtkHttpSceneLoader;
|
|
11135
|
+
exports.vtkns["ImageData"] = vtk.Common.DataModel.vtkImageData;
|
|
11136
|
+
exports.vtkns["ImageMapper"] = vtk.Rendering.Core.vtkImageMapper;
|
|
11137
|
+
exports.vtkns["ImageProperty"] = vtk.Rendering.Core.vtkImageProperty;
|
|
11138
|
+
exports.vtkns["ImageSlice"] = vtk.Rendering.Core.vtkImageSlice;
|
|
10862
11139
|
exports.vtkns["InteractiveOrientationWidget"] =
|
|
10863
|
-
|
|
11140
|
+
vtk.Widgets.Widgets3D.vtkInteractiveOrientationWidget;
|
|
10864
11141
|
exports.vtkns["InteractorStyleTrackballCamera"] =
|
|
10865
|
-
|
|
10866
|
-
exports.vtkns["Light"] =
|
|
10867
|
-
exports.vtkns["LineSource"] =
|
|
10868
|
-
exports.vtkns["LookupTable"] =
|
|
10869
|
-
exports.vtkns["macro"] =
|
|
10870
|
-
exports.vtkns["Mapper"] =
|
|
10871
|
-
exports.vtkns["OpenGLRenderWindow"] =
|
|
11142
|
+
vtk.Interaction.Style.vtkInteractorStyleTrackballCamera;
|
|
11143
|
+
exports.vtkns["Light"] = vtk.Rendering.Core.vtkLight;
|
|
11144
|
+
exports.vtkns["LineSource"] = vtk.Filters.Sources.vtkLineSource;
|
|
11145
|
+
exports.vtkns["LookupTable"] = vtk.Common.Core.vtkLookupTable;
|
|
11146
|
+
exports.vtkns["macro"] = vtk.macro;
|
|
11147
|
+
exports.vtkns["Mapper"] = vtk.Rendering.Core.vtkMapper;
|
|
11148
|
+
exports.vtkns["OpenGLRenderWindow"] = vtk.Rendering.OpenGL.vtkRenderWindow;
|
|
10872
11149
|
exports.vtkns["OrientationMarkerWidget"] =
|
|
10873
|
-
|
|
10874
|
-
exports.vtkns["OutlineFilter"] =
|
|
10875
|
-
exports.vtkns["PiecewiseFunction"] =
|
|
11150
|
+
vtk.Interaction.Widgets.vtkOrientationMarkerWidget;
|
|
11151
|
+
exports.vtkns["OutlineFilter"] = vtk.Filters.General.vtkOutlineFilter;
|
|
11152
|
+
exports.vtkns["PiecewiseFunction"] = vtk.Common.DataModel.vtkPiecewiseFunction;
|
|
10876
11153
|
exports.vtkns["PixelSpaceCallbackMapper"] =
|
|
10877
|
-
|
|
10878
|
-
exports.vtkns["PlaneSource"] =
|
|
10879
|
-
exports.vtkns["PointSource"] =
|
|
10880
|
-
exports.vtkns["PolyData"] =
|
|
10881
|
-
exports.vtkns["Property"] =
|
|
10882
|
-
exports.vtkns["Renderer"] =
|
|
10883
|
-
exports.vtkns["RenderWindow"] =
|
|
10884
|
-
exports.vtkns["RenderWindowInteractor"] =
|
|
10885
|
-
exports.vtkns["SphereMapper"] =
|
|
11154
|
+
vtk.Rendering.Core.vtkPixelSpaceCallbackMapper;
|
|
11155
|
+
exports.vtkns["PlaneSource"] = vtk.Filters.Sources.vtkPlaneSource;
|
|
11156
|
+
exports.vtkns["PointSource"] = vtk.Filters.Sources.vtkPointSource;
|
|
11157
|
+
exports.vtkns["PolyData"] = vtk.Common.DataModel.vtkPolyData;
|
|
11158
|
+
exports.vtkns["Property"] = vtk.Rendering.Core.vtkProperty;
|
|
11159
|
+
exports.vtkns["Renderer"] = vtk.Rendering.Core.vtkRenderer;
|
|
11160
|
+
exports.vtkns["RenderWindow"] = vtk.Rendering.Core.vtkRenderWindow;
|
|
11161
|
+
exports.vtkns["RenderWindowInteractor"] = vtk.Rendering.Core.vtkRenderWindowInteractor;
|
|
11162
|
+
exports.vtkns["SphereMapper"] = vtk.Rendering.Core.vtkSphereMapper;
|
|
10886
11163
|
exports.vtkns["SynchronizableRenderWindow"] =
|
|
10887
|
-
|
|
10888
|
-
exports.vtkns["ThirdParty"] =
|
|
10889
|
-
exports.vtkns["Texture"] =
|
|
10890
|
-
exports.vtkns["Volume"] =
|
|
10891
|
-
exports.vtkns["VolumeController"] =
|
|
10892
|
-
exports.vtkns["VolumeMapper"] =
|
|
10893
|
-
exports.vtkns["VolumeProperty"] =
|
|
10894
|
-
exports.vtkns["WidgetManager"] =
|
|
11164
|
+
vtk.Rendering.Misc.vtkSynchronizableRenderWindow;
|
|
11165
|
+
exports.vtkns["ThirdParty"] = vtk.ThirdParty;
|
|
11166
|
+
exports.vtkns["Texture"] = vtk.Rendering.Core.vtkTexture;
|
|
11167
|
+
exports.vtkns["Volume"] = vtk.Rendering.Core.vtkVolume;
|
|
11168
|
+
exports.vtkns["VolumeController"] = vtk.Interaction.UI.vtkVolumeController;
|
|
11169
|
+
exports.vtkns["VolumeMapper"] = vtk.Rendering.Core.vtkVolumeMapper;
|
|
11170
|
+
exports.vtkns["VolumeProperty"] = vtk.Rendering.Core.vtkVolumeProperty;
|
|
11171
|
+
exports.vtkns["WidgetManager"] = vtk.Widgets.Core.vtkWidgetManager;
|
|
10895
11172
|
const { vtkObjectManager } = exports.vtkns.SynchronizableRenderWindow;
|
|
10896
11173
|
vtkObjectManager.setTypeMapping("vtkVolumeMapper", exports.vtkns.VolumeMapper.newInstance, vtkObjectManager.oneTimeGenericUpdater);
|
|
10897
11174
|
vtkObjectManager.setTypeMapping("vtkSmartVolumeMapper", exports.vtkns.VolumeMapper.newInstance, vtkObjectManager.oneTimeGenericUpdater);
|
|
10898
11175
|
vtkObjectManager.setTypeMapping("vtkFollower", exports.vtkns.Follower.newInstance, vtkObjectManager.genericUpdater);
|
|
10899
11176
|
vtkObjectManager.setTypeMapping("vtkOpenGLGlyph3DMapper", exports.vtkns.Glyph3DMapper.newInstance, vtkObjectManager.genericUpdater);
|
|
10900
11177
|
}
|
|
10901
|
-
exports.
|
|
11178
|
+
exports.setup_vtkns = setup_vtkns;
|
|
11179
|
+
if (window.vtk)
|
|
11180
|
+
setup_vtkns();
|
|
11181
|
+
exports.Interpolation = (0, kinds_1.Enum)("fast_linear", "linear", "nearest");
|
|
10902
11182
|
function applyStyle(el, style) {
|
|
10903
11183
|
Object.keys(style).forEach((key) => {
|
|
10904
11184
|
el.style[key] = style[key];
|
|
@@ -10929,7 +11209,7 @@
|
|
|
10929
11209
|
const x = nodes.map((a) => a.x);
|
|
10930
11210
|
const low = Math.min(...x);
|
|
10931
11211
|
const high = Math.max(...x);
|
|
10932
|
-
const vals = array_1.linspace(low, high, 255);
|
|
11212
|
+
const vals = (0, array_1.linspace)(low, high, 255);
|
|
10933
11213
|
const rgb = [0, 0, 0];
|
|
10934
11214
|
const palette = vals.map((val) => {
|
|
10935
11215
|
vtk_lut.getColor(val, rgb);
|
|
@@ -11004,7 +11284,7 @@
|
|
|
11004
11284
|
}
|
|
11005
11285
|
get values() {
|
|
11006
11286
|
const { min, max } = this.mapper.metrics;
|
|
11007
|
-
return array_1.linspace(min, max, this.options.ticksNum);
|
|
11287
|
+
return (0, array_1.linspace)(min, max, this.options.ticksNum);
|
|
11008
11288
|
}
|
|
11009
11289
|
get ticks() {
|
|
11010
11290
|
return this.values.map((v) => v.toExponential(3));
|
|
@@ -11038,7 +11318,7 @@
|
|
|
11038
11318
|
const image_ctx = image.getContext("2d");
|
|
11039
11319
|
const image_data = image_ctx.getImageData(0, 0, w, h);
|
|
11040
11320
|
const cmap = new mappers_1.LinearColorMapper({ palette }).rgba_mapper;
|
|
11041
|
-
const buf8 = cmap.v_compute(array_1.range(0, palette.length));
|
|
11321
|
+
const buf8 = cmap.v_compute((0, array_1.range)(0, palette.length));
|
|
11042
11322
|
image_data.data.set(buf8);
|
|
11043
11323
|
image_ctx.putImageData(image_data, 0, 0);
|
|
11044
11324
|
this.ctx.drawImage(image, 0, 2 * (this.font_height + 1) + 1, this.canvas.width, this.canvas.height);
|
|
@@ -11050,7 +11330,7 @@
|
|
|
11050
11330
|
this.ctx.restore();
|
|
11051
11331
|
this.ctx.save();
|
|
11052
11332
|
//ticks
|
|
11053
|
-
const tick_x_positions = array_1.linspace(0, this.canvas.width, 5);
|
|
11333
|
+
const tick_x_positions = (0, array_1.linspace)(0, this.canvas.width, 5);
|
|
11054
11334
|
tick_x_positions.forEach((xpos, idx) => {
|
|
11055
11335
|
let xpos_tick = xpos;
|
|
11056
11336
|
if (idx == 0) {
|
|
@@ -11075,13 +11355,13 @@
|
|
|
11075
11355
|
exports.VTKColorBar = VTKColorBar;
|
|
11076
11356
|
VTKColorBar.__name__ = "VTKColorBar";
|
|
11077
11357
|
},
|
|
11078
|
-
"
|
|
11358
|
+
"204e2f98bd": /* models/vtk/vtkaxes.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
11079
11359
|
__esModule();
|
|
11080
11360
|
const tslib_1 = require("tslib");
|
|
11081
|
-
const p = tslib_1.__importStar(require("@bokehjs/core/properties"));
|
|
11361
|
+
const p = (0, tslib_1.__importStar)(require("@bokehjs/core/properties"));
|
|
11082
11362
|
const model_1 = require("@bokehjs/model");
|
|
11083
11363
|
const gl_matrix_1 = require("2f3fd5db07") /* gl-matrix */;
|
|
11084
|
-
const util_1 = require("
|
|
11364
|
+
const util_1 = require("993f3118b2") /* ./util */;
|
|
11085
11365
|
class VTKAxes extends model_1.Model {
|
|
11086
11366
|
constructor(attrs) {
|
|
11087
11367
|
super(attrs);
|
|
@@ -11148,9 +11428,9 @@
|
|
|
11148
11428
|
}
|
|
11149
11429
|
_create_grid_axes() {
|
|
11150
11430
|
const pts = [];
|
|
11151
|
-
pts.push(util_1.cartesian_product(this.xticks, this.yticks, [this.origin[2]])); //xy
|
|
11152
|
-
pts.push(util_1.cartesian_product([this.origin[0]], this.yticks, this.zticks)); //yz
|
|
11153
|
-
pts.push(util_1.cartesian_product(this.xticks, [this.origin[1]], this.zticks)); //xz
|
|
11431
|
+
pts.push((0, util_1.cartesian_product)(this.xticks, this.yticks, [this.origin[2]])); //xy
|
|
11432
|
+
pts.push((0, util_1.cartesian_product)([this.origin[0]], this.yticks, this.zticks)); //yz
|
|
11433
|
+
pts.push((0, util_1.cartesian_product)(this.xticks, [this.origin[1]], this.zticks)); //xz
|
|
11154
11434
|
const polys = [];
|
|
11155
11435
|
let offset = 0;
|
|
11156
11436
|
polys.push(this._make_grid_lines(this.xticks.length, this.yticks.length, offset)); //xy
|
|
@@ -11158,7 +11438,7 @@
|
|
|
11158
11438
|
polys.push(this._make_grid_lines(this.yticks.length, this.zticks.length, offset)); //yz
|
|
11159
11439
|
offset += this.yticks.length * this.zticks.length;
|
|
11160
11440
|
polys.push(this._make_grid_lines(this.xticks.length, this.zticks.length, offset)); //xz
|
|
11161
|
-
const gridPolyData =
|
|
11441
|
+
const gridPolyData = window.vtk({
|
|
11162
11442
|
vtkClass: "vtkPolyData",
|
|
11163
11443
|
points: {
|
|
11164
11444
|
vtkClass: "vtkPoints",
|
|
@@ -11187,18 +11467,18 @@
|
|
|
11187
11467
|
let coords = null;
|
|
11188
11468
|
switch (axis) {
|
|
11189
11469
|
case 0:
|
|
11190
|
-
coords = util_1.cartesian_product(arr, [this.origin[1]], [this.origin[2]]);
|
|
11470
|
+
coords = (0, util_1.cartesian_product)(arr, [this.origin[1]], [this.origin[2]]);
|
|
11191
11471
|
break;
|
|
11192
11472
|
case 1:
|
|
11193
|
-
coords = util_1.cartesian_product([this.origin[0]], arr, [this.origin[2]]);
|
|
11473
|
+
coords = (0, util_1.cartesian_product)([this.origin[0]], arr, [this.origin[2]]);
|
|
11194
11474
|
break;
|
|
11195
11475
|
case 2:
|
|
11196
|
-
coords = util_1.cartesian_product([this.origin[0]], [this.origin[1]], arr);
|
|
11476
|
+
coords = (0, util_1.cartesian_product)([this.origin[0]], [this.origin[1]], arr);
|
|
11197
11477
|
break;
|
|
11198
11478
|
}
|
|
11199
11479
|
return coords;
|
|
11200
11480
|
}).flat(2);
|
|
11201
|
-
const axesPolyData =
|
|
11481
|
+
const axesPolyData = window.vtk({
|
|
11202
11482
|
vtkClass: "vtkPolyData",
|
|
11203
11483
|
points: {
|
|
11204
11484
|
vtkClass: "vtkPoints",
|
|
@@ -11284,25 +11564,25 @@
|
|
|
11284
11564
|
"2f3fd5db07": /* gl-matrix/esm/index.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
11285
11565
|
__esModule();
|
|
11286
11566
|
const tslib_1 = require("tslib");
|
|
11287
|
-
const glMatrix = tslib_1.__importStar(require("68ca94c15c") /* ./common.js */);
|
|
11567
|
+
const glMatrix = (0, tslib_1.__importStar)(require("68ca94c15c") /* ./common.js */);
|
|
11288
11568
|
exports.glMatrix = glMatrix;
|
|
11289
|
-
const mat2 = tslib_1.__importStar(require("7c0b8e6048") /* ./mat2.js */);
|
|
11569
|
+
const mat2 = (0, tslib_1.__importStar)(require("7c0b8e6048") /* ./mat2.js */);
|
|
11290
11570
|
exports.mat2 = mat2;
|
|
11291
|
-
const mat2d = tslib_1.__importStar(require("dc03f0a621") /* ./mat2d.js */);
|
|
11571
|
+
const mat2d = (0, tslib_1.__importStar)(require("dc03f0a621") /* ./mat2d.js */);
|
|
11292
11572
|
exports.mat2d = mat2d;
|
|
11293
|
-
const mat3 = tslib_1.__importStar(require("0285c50a7e") /* ./mat3.js */);
|
|
11573
|
+
const mat3 = (0, tslib_1.__importStar)(require("0285c50a7e") /* ./mat3.js */);
|
|
11294
11574
|
exports.mat3 = mat3;
|
|
11295
|
-
const mat4 = tslib_1.__importStar(require("a427635f32") /* ./mat4.js */);
|
|
11575
|
+
const mat4 = (0, tslib_1.__importStar)(require("a427635f32") /* ./mat4.js */);
|
|
11296
11576
|
exports.mat4 = mat4;
|
|
11297
|
-
const quat = tslib_1.__importStar(require("eb06fc032a") /* ./quat.js */);
|
|
11577
|
+
const quat = (0, tslib_1.__importStar)(require("eb06fc032a") /* ./quat.js */);
|
|
11298
11578
|
exports.quat = quat;
|
|
11299
|
-
const quat2 = tslib_1.__importStar(require("277615c682") /* ./quat2.js */);
|
|
11579
|
+
const quat2 = (0, tslib_1.__importStar)(require("277615c682") /* ./quat2.js */);
|
|
11300
11580
|
exports.quat2 = quat2;
|
|
11301
|
-
const vec2 = tslib_1.__importStar(require("c56d9ff837") /* ./vec2.js */);
|
|
11581
|
+
const vec2 = (0, tslib_1.__importStar)(require("c56d9ff837") /* ./vec2.js */);
|
|
11302
11582
|
exports.vec2 = vec2;
|
|
11303
|
-
const vec3 = tslib_1.__importStar(require("2c5eb22089") /* ./vec3.js */);
|
|
11583
|
+
const vec3 = (0, tslib_1.__importStar)(require("2c5eb22089") /* ./vec3.js */);
|
|
11304
11584
|
exports.vec3 = vec3;
|
|
11305
|
-
const vec4 = tslib_1.__importStar(require("c1aa33d719") /* ./vec4.js */);
|
|
11585
|
+
const vec4 = (0, tslib_1.__importStar)(require("c1aa33d719") /* ./vec4.js */);
|
|
11306
11586
|
exports.vec4 = vec4;
|
|
11307
11587
|
},
|
|
11308
11588
|
"68ca94c15c": /* gl-matrix/esm/common.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
@@ -11359,7 +11639,7 @@
|
|
|
11359
11639
|
"7c0b8e6048": /* gl-matrix/esm/mat2.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
11360
11640
|
__esModule();
|
|
11361
11641
|
const tslib_1 = require("tslib");
|
|
11362
|
-
const glMatrix = tslib_1.__importStar(require("68ca94c15c") /* ./common.js */);
|
|
11642
|
+
const glMatrix = (0, tslib_1.__importStar)(require("68ca94c15c") /* ./common.js */);
|
|
11363
11643
|
/**
|
|
11364
11644
|
* 2x2 Matrix
|
|
11365
11645
|
* @module mat2
|
|
@@ -11765,7 +12045,7 @@
|
|
|
11765
12045
|
"dc03f0a621": /* gl-matrix/esm/mat2d.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
11766
12046
|
__esModule();
|
|
11767
12047
|
const tslib_1 = require("tslib");
|
|
11768
|
-
const glMatrix = tslib_1.__importStar(require("68ca94c15c") /* ./common.js */);
|
|
12048
|
+
const glMatrix = (0, tslib_1.__importStar)(require("68ca94c15c") /* ./common.js */);
|
|
11769
12049
|
/**
|
|
11770
12050
|
* 2x3 Matrix
|
|
11771
12051
|
* @module mat2d
|
|
@@ -12206,7 +12486,7 @@
|
|
|
12206
12486
|
"0285c50a7e": /* gl-matrix/esm/mat3.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
12207
12487
|
__esModule();
|
|
12208
12488
|
const tslib_1 = require("tslib");
|
|
12209
|
-
const glMatrix = tslib_1.__importStar(require("68ca94c15c") /* ./common.js */);
|
|
12489
|
+
const glMatrix = (0, tslib_1.__importStar)(require("68ca94c15c") /* ./common.js */);
|
|
12210
12490
|
/**
|
|
12211
12491
|
* 3x3 Matrix
|
|
12212
12492
|
* @module mat3
|
|
@@ -12892,7 +13172,7 @@
|
|
|
12892
13172
|
"a427635f32": /* gl-matrix/esm/mat4.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
12893
13173
|
__esModule();
|
|
12894
13174
|
const tslib_1 = require("tslib");
|
|
12895
|
-
const glMatrix = tslib_1.__importStar(require("68ca94c15c") /* ./common.js */);
|
|
13175
|
+
const glMatrix = (0, tslib_1.__importStar)(require("68ca94c15c") /* ./common.js */);
|
|
12896
13176
|
/**
|
|
12897
13177
|
* 4x4 Matrix<br>Format: column-major, when typed out it looks like row-major<br>The matrices are being post multiplied.
|
|
12898
13178
|
* @module mat4
|
|
@@ -14554,10 +14834,10 @@
|
|
|
14554
14834
|
"eb06fc032a": /* gl-matrix/esm/quat.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
14555
14835
|
__esModule();
|
|
14556
14836
|
const tslib_1 = require("tslib");
|
|
14557
|
-
const glMatrix = tslib_1.__importStar(require("68ca94c15c") /* ./common.js */);
|
|
14558
|
-
const mat3 = tslib_1.__importStar(require("0285c50a7e") /* ./mat3.js */);
|
|
14559
|
-
const vec3 = tslib_1.__importStar(require("2c5eb22089") /* ./vec3.js */);
|
|
14560
|
-
const vec4 = tslib_1.__importStar(require("c1aa33d719") /* ./vec4.js */);
|
|
14837
|
+
const glMatrix = (0, tslib_1.__importStar)(require("68ca94c15c") /* ./common.js */);
|
|
14838
|
+
const mat3 = (0, tslib_1.__importStar)(require("0285c50a7e") /* ./mat3.js */);
|
|
14839
|
+
const vec3 = (0, tslib_1.__importStar)(require("2c5eb22089") /* ./vec3.js */);
|
|
14840
|
+
const vec4 = (0, tslib_1.__importStar)(require("c1aa33d719") /* ./vec4.js */);
|
|
14561
14841
|
/**
|
|
14562
14842
|
* Quaternion
|
|
14563
14843
|
* @module quat
|
|
@@ -14649,7 +14929,7 @@
|
|
|
14649
14929
|
* @return {Number} Angle, in radians, between the two quaternions
|
|
14650
14930
|
*/
|
|
14651
14931
|
function getAngle(a, b) {
|
|
14652
|
-
var dotproduct = exports.dot(a, b);
|
|
14932
|
+
var dotproduct = (0, exports.dot)(a, b);
|
|
14653
14933
|
return Math.acos(2 * dotproduct * dotproduct - 1);
|
|
14654
14934
|
}
|
|
14655
14935
|
exports.getAngle = getAngle;
|
|
@@ -14793,7 +15073,7 @@
|
|
|
14793
15073
|
*/
|
|
14794
15074
|
function pow(out, a, b) {
|
|
14795
15075
|
ln(out, a);
|
|
14796
|
-
exports.scale(out, out, b);
|
|
15076
|
+
(0, exports.scale)(out, out, b);
|
|
14797
15077
|
exp(out, out);
|
|
14798
15078
|
return out;
|
|
14799
15079
|
}
|
|
@@ -15151,7 +15431,7 @@
|
|
|
15151
15431
|
out[1] = tmpvec3[1];
|
|
15152
15432
|
out[2] = tmpvec3[2];
|
|
15153
15433
|
out[3] = 1 + dot;
|
|
15154
|
-
return exports.normalize(out, out);
|
|
15434
|
+
return (0, exports.normalize)(out, out);
|
|
15155
15435
|
}
|
|
15156
15436
|
};
|
|
15157
15437
|
}();
|
|
@@ -15198,14 +15478,14 @@
|
|
|
15198
15478
|
matr[2] = -view[0];
|
|
15199
15479
|
matr[5] = -view[1];
|
|
15200
15480
|
matr[8] = -view[2];
|
|
15201
|
-
return exports.normalize(out, fromMat3(out, matr));
|
|
15481
|
+
return (0, exports.normalize)(out, fromMat3(out, matr));
|
|
15202
15482
|
};
|
|
15203
15483
|
}();
|
|
15204
15484
|
},
|
|
15205
15485
|
"2c5eb22089": /* gl-matrix/esm/vec3.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
15206
15486
|
__esModule();
|
|
15207
15487
|
const tslib_1 = require("tslib");
|
|
15208
|
-
const glMatrix = tslib_1.__importStar(require("68ca94c15c") /* ./common.js */);
|
|
15488
|
+
const glMatrix = (0, tslib_1.__importStar)(require("68ca94c15c") /* ./common.js */);
|
|
15209
15489
|
/**
|
|
15210
15490
|
* 3 Dimensional Vector
|
|
15211
15491
|
* @module vec3
|
|
@@ -15932,7 +16212,7 @@
|
|
|
15932
16212
|
"c1aa33d719": /* gl-matrix/esm/vec4.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
15933
16213
|
__esModule();
|
|
15934
16214
|
const tslib_1 = require("tslib");
|
|
15935
|
-
const glMatrix = tslib_1.__importStar(require("68ca94c15c") /* ./common.js */);
|
|
16215
|
+
const glMatrix = (0, tslib_1.__importStar)(require("68ca94c15c") /* ./common.js */);
|
|
15936
16216
|
/**
|
|
15937
16217
|
* 4 Dimensional Vector
|
|
15938
16218
|
* @module vec4
|
|
@@ -16557,9 +16837,9 @@
|
|
|
16557
16837
|
"277615c682": /* gl-matrix/esm/quat2.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
16558
16838
|
__esModule();
|
|
16559
16839
|
const tslib_1 = require("tslib");
|
|
16560
|
-
const glMatrix = tslib_1.__importStar(require("68ca94c15c") /* ./common.js */);
|
|
16561
|
-
const quat = tslib_1.__importStar(require("eb06fc032a") /* ./quat.js */);
|
|
16562
|
-
const mat4 = tslib_1.__importStar(require("a427635f32") /* ./mat4.js */);
|
|
16840
|
+
const glMatrix = (0, tslib_1.__importStar)(require("68ca94c15c") /* ./common.js */);
|
|
16841
|
+
const quat = (0, tslib_1.__importStar)(require("eb06fc032a") /* ./quat.js */);
|
|
16842
|
+
const mat4 = (0, tslib_1.__importStar)(require("a427635f32") /* ./mat4.js */);
|
|
16563
16843
|
/**
|
|
16564
16844
|
* Dual Quaternion<br>
|
|
16565
16845
|
* Format: [real, dual]<br>
|
|
@@ -17126,7 +17406,7 @@
|
|
|
17126
17406
|
*/
|
|
17127
17407
|
function lerp(out, a, b, t) {
|
|
17128
17408
|
var mt = 1 - t;
|
|
17129
|
-
if (exports.dot(a, b) < 0)
|
|
17409
|
+
if ((0, exports.dot)(a, b) < 0)
|
|
17130
17410
|
t = -t;
|
|
17131
17411
|
out[0] = a[0] * mt + b[0] * t;
|
|
17132
17412
|
out[1] = a[1] * mt + b[1] * t;
|
|
@@ -17147,7 +17427,7 @@
|
|
|
17147
17427
|
* @returns {quat2} out
|
|
17148
17428
|
*/
|
|
17149
17429
|
function invert(out, a) {
|
|
17150
|
-
var sqlen = exports.squaredLength(a);
|
|
17430
|
+
var sqlen = (0, exports.squaredLength)(a);
|
|
17151
17431
|
out[0] = -a[0] / sqlen;
|
|
17152
17432
|
out[1] = -a[1] / sqlen;
|
|
17153
17433
|
out[2] = -a[2] / sqlen;
|
|
@@ -17214,7 +17494,7 @@
|
|
|
17214
17494
|
* @function
|
|
17215
17495
|
*/
|
|
17216
17496
|
function normalize(out, a) {
|
|
17217
|
-
var magnitude = exports.squaredLength(a);
|
|
17497
|
+
var magnitude = (0, exports.squaredLength)(a);
|
|
17218
17498
|
if (magnitude > 0) {
|
|
17219
17499
|
magnitude = Math.sqrt(magnitude);
|
|
17220
17500
|
var a0 = a[0] / magnitude;
|
|
@@ -17276,7 +17556,7 @@
|
|
|
17276
17556
|
"c56d9ff837": /* gl-matrix/esm/vec2.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
17277
17557
|
__esModule();
|
|
17278
17558
|
const tslib_1 = require("tslib");
|
|
17279
|
-
const glMatrix = tslib_1.__importStar(require("68ca94c15c") /* ./common.js */);
|
|
17559
|
+
const glMatrix = (0, tslib_1.__importStar)(require("68ca94c15c") /* ./common.js */);
|
|
17280
17560
|
/**
|
|
17281
17561
|
* 2 Dimensional Vector
|
|
17282
17562
|
* @module vec2
|
|
@@ -17865,15 +18145,15 @@
|
|
|
17865
18145
|
};
|
|
17866
18146
|
}();
|
|
17867
18147
|
},
|
|
17868
|
-
"
|
|
18148
|
+
"7785475bdd": /* models/vtk/vtkvolume.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
17869
18149
|
__esModule();
|
|
17870
|
-
const vtklayout_1 = require("
|
|
17871
|
-
const util_1 = require("
|
|
18150
|
+
const vtklayout_1 = require("e13c143c7d") /* ./vtklayout */;
|
|
18151
|
+
const util_1 = require("993f3118b2") /* ./util */;
|
|
17872
18152
|
class VTKVolumePlotView extends vtklayout_1.AbstractVTKView {
|
|
17873
18153
|
connect_signals() {
|
|
17874
18154
|
super.connect_signals();
|
|
17875
18155
|
this.connect(this.model.properties.data.change, () => {
|
|
17876
|
-
this._vtk_image_data = util_1.data2VTKImageData(this.model.data);
|
|
18156
|
+
this._vtk_image_data = (0, util_1.data2VTKImageData)(this.model.data);
|
|
17877
18157
|
this.invalidate_render();
|
|
17878
18158
|
});
|
|
17879
18159
|
this.connect(this.model.properties.colormap.change, () => {
|
|
@@ -17945,7 +18225,7 @@
|
|
|
17945
18225
|
this.connect(this.model.properties.render_background.change, () => {
|
|
17946
18226
|
this._vtk_renwin
|
|
17947
18227
|
.getRenderer()
|
|
17948
|
-
.setBackground(...util_1.hexToRGB(this.model.render_background));
|
|
18228
|
+
.setBackground(...(0, util_1.hexToRGB)(this.model.render_background));
|
|
17949
18229
|
this._vtk_renwin.getRenderWindow().render();
|
|
17950
18230
|
});
|
|
17951
18231
|
this.connect(this.model.properties.interpolation.change, () => {
|
|
@@ -17956,6 +18236,12 @@
|
|
|
17956
18236
|
if (this._controllerWidget != null)
|
|
17957
18237
|
this._controllerWidget.setExpanded(this.model.controller_expanded);
|
|
17958
18238
|
});
|
|
18239
|
+
this.connect(this.model.properties.nan_opacity.change, () => {
|
|
18240
|
+
const scalar_opacity = this.image_actor_i.getProperty().getScalarOpacity();
|
|
18241
|
+
scalar_opacity.get(["nodes"]).nodes[0].y = this.model.nan_opacity;
|
|
18242
|
+
scalar_opacity.modified();
|
|
18243
|
+
this._vtk_renwin.getRenderWindow().render();
|
|
18244
|
+
});
|
|
17959
18245
|
}
|
|
17960
18246
|
render() {
|
|
17961
18247
|
this._vtk_renwin = null;
|
|
@@ -17997,13 +18283,13 @@
|
|
|
17997
18283
|
this._set_slices_visibility(this.model.display_slices);
|
|
17998
18284
|
this._vtk_renwin
|
|
17999
18285
|
.getRenderer()
|
|
18000
|
-
.setBackground(...util_1.hexToRGB(this.model.render_background));
|
|
18286
|
+
.setBackground(...(0, util_1.hexToRGB)(this.model.render_background));
|
|
18001
18287
|
this._set_interpolation(this.model.interpolation);
|
|
18002
18288
|
this._set_camera_state();
|
|
18003
18289
|
}
|
|
18004
18290
|
get vtk_image_data() {
|
|
18005
18291
|
if (!this._vtk_image_data)
|
|
18006
|
-
this._vtk_image_data = util_1.data2VTKImageData(this.model.data);
|
|
18292
|
+
this._vtk_image_data = (0, util_1.data2VTKImageData)(this.model.data);
|
|
18007
18293
|
return this._vtk_image_data;
|
|
18008
18294
|
}
|
|
18009
18295
|
get volume() {
|
|
@@ -18086,9 +18372,12 @@
|
|
|
18086
18372
|
image_actor_k.setMapper(image_mapper_k);
|
|
18087
18373
|
// set_color and opacity
|
|
18088
18374
|
const piecewiseFunction = util_1.vtkns.PiecewiseFunction.newInstance();
|
|
18089
|
-
piecewiseFunction.removeAllPoints();
|
|
18090
|
-
piecewiseFunction.addPoint(0, 1);
|
|
18091
18375
|
const lookupTable = this.volume.getProperty().getRGBTransferFunction(0);
|
|
18376
|
+
const range = this.volume.getMapper().getInputData().getPointData().getScalars().getRange();
|
|
18377
|
+
piecewiseFunction.removeAllPoints();
|
|
18378
|
+
piecewiseFunction.addPoint(range[0] - 1, this.model.nan_opacity);
|
|
18379
|
+
piecewiseFunction.addPoint(range[0], 1);
|
|
18380
|
+
piecewiseFunction.addPoint(range[1], 1);
|
|
18092
18381
|
const property = image_actor_i.getProperty();
|
|
18093
18382
|
image_actor_j.setProperty(property);
|
|
18094
18383
|
image_actor_k.setProperty(property);
|
|
@@ -18109,7 +18398,7 @@
|
|
|
18109
18398
|
const dataArray = source.getPointData().getScalars() || source.getPointData().getArrays()[0];
|
|
18110
18399
|
const dataRange = dataArray.getRange();
|
|
18111
18400
|
const lookupTable = util_1.vtkns.ColorTransferFunction.newInstance();
|
|
18112
|
-
lookupTable.onModified(() => (this.model.mapper = util_1.vtkLutToMapper(lookupTable)));
|
|
18401
|
+
lookupTable.onModified(() => (this.model.mapper = (0, util_1.vtkLutToMapper)(lookupTable)));
|
|
18113
18402
|
const piecewiseFunction = util_1.vtkns.PiecewiseFunction.newInstance();
|
|
18114
18403
|
const sampleDistance = 0.7 *
|
|
18115
18404
|
Math.sqrt(source
|
|
@@ -18165,10 +18454,9 @@
|
|
|
18165
18454
|
}
|
|
18166
18455
|
}
|
|
18167
18456
|
_set_slices_visibility(visibility) {
|
|
18168
|
-
this.
|
|
18169
|
-
|
|
18170
|
-
|
|
18171
|
-
.map((actor) => actor.setVisibility(visibility));
|
|
18457
|
+
this.image_actor_i.setVisibility(visibility);
|
|
18458
|
+
this.image_actor_j.setVisibility(visibility);
|
|
18459
|
+
this.image_actor_k.setVisibility(visibility);
|
|
18172
18460
|
}
|
|
18173
18461
|
_set_volume_visibility(visibility) {
|
|
18174
18462
|
this.volume.setVisibility(visibility);
|
|
@@ -18192,6 +18480,7 @@
|
|
|
18192
18480
|
edge_gradient: [Number, 0.2],
|
|
18193
18481
|
interpolation: [util_1.Interpolation, 'fast_linear'],
|
|
18194
18482
|
mapper: [Struct({ palette: Array(String), low: Number, high: Number })],
|
|
18483
|
+
nan_opacity: [Number, 1],
|
|
18195
18484
|
render_background: [String, '#52576e'],
|
|
18196
18485
|
rescale: [Boolean, false],
|
|
18197
18486
|
sampling: [Number, 0.4],
|
|
@@ -18209,14 +18498,12 @@
|
|
|
18209
18498
|
VTKVolumePlot.__name__ = "VTKVolumePlot";
|
|
18210
18499
|
VTKVolumePlot.init_VTKVolumePlot();
|
|
18211
18500
|
},
|
|
18212
|
-
"
|
|
18501
|
+
"0a57062475": /* models/vtk/vtksynchronized.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
18213
18502
|
__esModule();
|
|
18214
|
-
const tslib_1 = require("tslib");
|
|
18215
|
-
const p = tslib_1.__importStar(require("@bokehjs/core/properties"));
|
|
18216
18503
|
const object_1 = require("@bokehjs/core/util/object");
|
|
18217
|
-
const vtklayout_1 = require("
|
|
18218
|
-
const
|
|
18219
|
-
const
|
|
18504
|
+
const vtklayout_1 = require("e13c143c7d") /* ./vtklayout */;
|
|
18505
|
+
const panel_fullscreen_renwin_sync_1 = require("877619fe71") /* ./panel_fullscreen_renwin_sync */;
|
|
18506
|
+
const util_1 = require("993f3118b2") /* ./util */;
|
|
18220
18507
|
const CONTEXT_NAME = "panel";
|
|
18221
18508
|
class VTKSynchronizedPlotView extends vtklayout_1.AbstractVTKView {
|
|
18222
18509
|
initialize() {
|
|
@@ -18226,15 +18513,6 @@
|
|
|
18226
18513
|
this._arrays = {};
|
|
18227
18514
|
this._decoded_arrays = {};
|
|
18228
18515
|
this._pending_arrays = {};
|
|
18229
|
-
// Internal closures
|
|
18230
|
-
this.getArray = (hash) => {
|
|
18231
|
-
if (this._arrays[hash]) {
|
|
18232
|
-
return Promise.resolve(this._arrays[hash]);
|
|
18233
|
-
}
|
|
18234
|
-
return new Promise((resolve, reject) => {
|
|
18235
|
-
this._pending_arrays[hash] = { resolve, reject };
|
|
18236
|
-
});
|
|
18237
|
-
};
|
|
18238
18516
|
this.registerArray = (hash, array) => {
|
|
18239
18517
|
this._arrays[hash] = array;
|
|
18240
18518
|
if (this._pending_arrays[hash]) {
|
|
@@ -18254,7 +18532,7 @@
|
|
|
18254
18532
|
this.invalidate_render();
|
|
18255
18533
|
}
|
|
18256
18534
|
else {
|
|
18257
|
-
const state = object_1.clone(this.model.scene);
|
|
18535
|
+
const state = (0, object_1.clone)(this.model.scene);
|
|
18258
18536
|
Promise.all(this._promises).then(() => {
|
|
18259
18537
|
this._sync_plot(state, () => {
|
|
18260
18538
|
this._on_scene_ready();
|
|
@@ -18267,7 +18545,7 @@
|
|
|
18267
18545
|
});
|
|
18268
18546
|
}
|
|
18269
18547
|
init_vtk_renwin() {
|
|
18270
|
-
this._vtk_renwin =
|
|
18548
|
+
this._vtk_renwin = util_1.vtkns.FullScreenRenderWindowSynchronized.newInstance({
|
|
18271
18549
|
rootContainer: this.el,
|
|
18272
18550
|
container: this._vtk_container,
|
|
18273
18551
|
synchronizerContext: this._synchronizer_context,
|
|
@@ -18276,7 +18554,7 @@
|
|
|
18276
18554
|
plot() {
|
|
18277
18555
|
this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters();
|
|
18278
18556
|
this._decode_arrays();
|
|
18279
|
-
const state = object_1.clone(this.model.scene);
|
|
18557
|
+
const state = (0, object_1.clone)(this.model.scene);
|
|
18280
18558
|
Promise.all(this._promises).then(() => {
|
|
18281
18559
|
this._sync_plot(state, () => this._on_scene_ready()).then(() => {
|
|
18282
18560
|
this._set_camera_state();
|
|
@@ -18344,6 +18622,7 @@
|
|
|
18344
18622
|
class VTKSynchronizedPlot extends vtklayout_1.AbstractVTKPlot {
|
|
18345
18623
|
constructor(attrs) {
|
|
18346
18624
|
super(attrs);
|
|
18625
|
+
(0, panel_fullscreen_renwin_sync_1.initialize_fullscreen_render)();
|
|
18347
18626
|
this.outline = util_1.vtkns.OutlineFilter.newInstance(); //use to display bouding box of a selected actor
|
|
18348
18627
|
const mapper = util_1.vtkns.Mapper.newInstance();
|
|
18349
18628
|
mapper.setInputConnection(this.outline.getOutputPort());
|
|
@@ -18363,14 +18642,14 @@
|
|
|
18363
18642
|
}
|
|
18364
18643
|
static init_VTKSynchronizedPlot() {
|
|
18365
18644
|
this.prototype.default_view = VTKSynchronizedPlotView;
|
|
18366
|
-
this.define({
|
|
18367
|
-
arrays: [
|
|
18368
|
-
arrays_processed: [
|
|
18369
|
-
enable_keybindings: [
|
|
18370
|
-
one_time_reset: [
|
|
18371
|
-
rebuild: [
|
|
18372
|
-
scene: [
|
|
18373
|
-
});
|
|
18645
|
+
this.define(({ Any, Array, Boolean, String }) => ({
|
|
18646
|
+
arrays: [Any, {}],
|
|
18647
|
+
arrays_processed: [Array(String), []],
|
|
18648
|
+
enable_keybindings: [Boolean, false],
|
|
18649
|
+
one_time_reset: [Boolean],
|
|
18650
|
+
rebuild: [Boolean, false],
|
|
18651
|
+
scene: [Any, {}],
|
|
18652
|
+
}));
|
|
18374
18653
|
this.override({
|
|
18375
18654
|
height: 300,
|
|
18376
18655
|
width: 300,
|
|
@@ -18382,108 +18661,111 @@
|
|
|
18382
18661
|
VTKSynchronizedPlot.__module__ = "panel.models.vtk";
|
|
18383
18662
|
VTKSynchronizedPlot.init_VTKSynchronizedPlot();
|
|
18384
18663
|
},
|
|
18385
|
-
"
|
|
18664
|
+
"877619fe71": /* models/vtk/panel_fullscreen_renwin_sync.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
18386
18665
|
__esModule();
|
|
18387
|
-
const util_1 = require("
|
|
18388
|
-
|
|
18389
|
-
|
|
18390
|
-
|
|
18391
|
-
|
|
18392
|
-
|
|
18393
|
-
|
|
18394
|
-
|
|
18395
|
-
|
|
18396
|
-
|
|
18397
|
-
|
|
18398
|
-
|
|
18399
|
-
|
|
18400
|
-
|
|
18401
|
-
|
|
18402
|
-
|
|
18403
|
-
|
|
18404
|
-
|
|
18405
|
-
|
|
18406
|
-
|
|
18407
|
-
|
|
18408
|
-
|
|
18409
|
-
|
|
18410
|
-
|
|
18666
|
+
const util_1 = require("993f3118b2") /* ./util */;
|
|
18667
|
+
//------------------------//
|
|
18668
|
+
//Custom Extended Classes
|
|
18669
|
+
//------------------------//
|
|
18670
|
+
const DEFAULT_VALUES = {
|
|
18671
|
+
containerStyle: null,
|
|
18672
|
+
controlPanelStyle: null,
|
|
18673
|
+
listenWindowResize: true,
|
|
18674
|
+
resizeCallback: null,
|
|
18675
|
+
controllerVisibility: true,
|
|
18676
|
+
synchronizerContextName: "default",
|
|
18677
|
+
};
|
|
18678
|
+
const STYLE_CONTROL_PANEL = {
|
|
18679
|
+
position: "absolute",
|
|
18680
|
+
left: "25px",
|
|
18681
|
+
top: "25px",
|
|
18682
|
+
backgroundColor: "white",
|
|
18683
|
+
borderRadius: "5px",
|
|
18684
|
+
listStyle: "none",
|
|
18685
|
+
padding: "5px 10px",
|
|
18686
|
+
margin: "0",
|
|
18687
|
+
display: "block",
|
|
18688
|
+
border: "solid 1px black",
|
|
18689
|
+
maxWidth: "calc(100vw - 70px)",
|
|
18690
|
+
maxHeight: "calc(100vh - 60px)",
|
|
18691
|
+
overflow: "auto",
|
|
18692
|
+
};
|
|
18693
|
+
function panelFullScreenRenderWindowSynchronized(publicAPI, model) {
|
|
18694
|
+
// Panel (modification) synchronizable renderWindow
|
|
18695
|
+
model.renderWindow = util_1.vtkns.SynchronizableRenderWindow.newInstance({
|
|
18696
|
+
synchronizerContext: model.synchronizerContext,
|
|
18697
|
+
});
|
|
18698
|
+
// OpenGlRenderWindow
|
|
18699
|
+
model.openGLRenderWindow = util_1.vtkns.OpenGLRenderWindow.newInstance();
|
|
18700
|
+
model.openGLRenderWindow.setContainer(model.container);
|
|
18701
|
+
model.renderWindow.addView(model.openGLRenderWindow);
|
|
18702
|
+
// Interactor
|
|
18703
|
+
model.interactor = util_1.vtkns.RenderWindowInteractor.newInstance();
|
|
18704
|
+
model.interactor.setInteractorStyle(util_1.vtkns.InteractorStyleTrackballCamera.newInstance());
|
|
18705
|
+
model.interactor.setView(model.openGLRenderWindow);
|
|
18706
|
+
model.interactor.initialize();
|
|
18707
|
+
model.interactor.bindEvents(model.container);
|
|
18708
|
+
publicAPI.getRenderer = () => model.renderWindow.getRenderers()[0];
|
|
18709
|
+
publicAPI.removeController = () => {
|
|
18710
|
+
const el = model.controlContainer;
|
|
18711
|
+
if (el) {
|
|
18712
|
+
el.parentNode.removeChild(el);
|
|
18713
|
+
}
|
|
18411
18714
|
};
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
model.
|
|
18415
|
-
|
|
18416
|
-
|
|
18417
|
-
// OpenGlRenderWindow
|
|
18418
|
-
model.openGLRenderWindow = util_1.vtkns.OpenGLRenderWindow.newInstance();
|
|
18419
|
-
model.openGLRenderWindow.setContainer(model.container);
|
|
18420
|
-
model.renderWindow.addView(model.openGLRenderWindow);
|
|
18421
|
-
// Interactor
|
|
18422
|
-
model.interactor = util_1.vtkns.RenderWindowInteractor.newInstance();
|
|
18423
|
-
model.interactor.setInteractorStyle(util_1.vtkns.InteractorStyleTrackballCamera.newInstance());
|
|
18424
|
-
model.interactor.setView(model.openGLRenderWindow);
|
|
18425
|
-
model.interactor.initialize();
|
|
18426
|
-
model.interactor.bindEvents(model.container);
|
|
18427
|
-
publicAPI.getRenderer = () => model.renderWindow.getRenderers()[0];
|
|
18428
|
-
publicAPI.removeController = () => {
|
|
18429
|
-
const el = model.controlContainer;
|
|
18430
|
-
if (el) {
|
|
18431
|
-
el.parentNode.removeChild(el);
|
|
18715
|
+
publicAPI.setControllerVisibility = (visible) => {
|
|
18716
|
+
model.controllerVisibility = visible;
|
|
18717
|
+
if (model.controlContainer) {
|
|
18718
|
+
if (visible) {
|
|
18719
|
+
model.controlContainer.style.display = "block";
|
|
18432
18720
|
}
|
|
18433
|
-
|
|
18434
|
-
|
|
18435
|
-
model.controllerVisibility = visible;
|
|
18436
|
-
if (model.controlContainer) {
|
|
18437
|
-
if (visible) {
|
|
18438
|
-
model.controlContainer.style.display = "block";
|
|
18439
|
-
}
|
|
18440
|
-
else {
|
|
18441
|
-
model.controlContainer.style.display = "none";
|
|
18442
|
-
}
|
|
18721
|
+
else {
|
|
18722
|
+
model.controlContainer.style.display = "none";
|
|
18443
18723
|
}
|
|
18444
|
-
};
|
|
18445
|
-
publicAPI.toggleControllerVisibility = () => {
|
|
18446
|
-
publicAPI.setControllerVisibility(!model.controllerVisibility);
|
|
18447
|
-
};
|
|
18448
|
-
publicAPI.addController = (html) => {
|
|
18449
|
-
model.controlContainer = document.createElement("div");
|
|
18450
|
-
util_1.applyStyle(model.controlContainer, model.controlPanelStyle || STYLE_CONTROL_PANEL);
|
|
18451
|
-
model.rootContainer.appendChild(model.controlContainer);
|
|
18452
|
-
model.controlContainer.innerHTML = html;
|
|
18453
|
-
publicAPI.setControllerVisibility(model.controllerVisibility);
|
|
18454
|
-
model.rootContainer.addEventListener("keypress", (e) => {
|
|
18455
|
-
if (String.fromCharCode(e.charCode) === "c") {
|
|
18456
|
-
publicAPI.toggleControllerVisibility();
|
|
18457
|
-
}
|
|
18458
|
-
});
|
|
18459
|
-
};
|
|
18460
|
-
// Properly release GL context
|
|
18461
|
-
publicAPI.delete = util_1.vtk.macro.chain(publicAPI.setContainer, model.openGLRenderWindow.delete, publicAPI.delete);
|
|
18462
|
-
// Handle window resize
|
|
18463
|
-
publicAPI.resize = () => {
|
|
18464
|
-
const dims = model.container.getBoundingClientRect();
|
|
18465
|
-
const devicePixelRatio = window.devicePixelRatio || 1;
|
|
18466
|
-
model.openGLRenderWindow.setSize(Math.floor(dims.width * devicePixelRatio), Math.floor(dims.height * devicePixelRatio));
|
|
18467
|
-
if (model.resizeCallback) {
|
|
18468
|
-
model.resizeCallback(dims);
|
|
18469
|
-
}
|
|
18470
|
-
model.renderWindow.render();
|
|
18471
|
-
};
|
|
18472
|
-
publicAPI.setResizeCallback = (cb) => {
|
|
18473
|
-
model.resizeCallback = cb;
|
|
18474
|
-
publicAPI.resize();
|
|
18475
|
-
};
|
|
18476
|
-
if (model.listenWindowResize) {
|
|
18477
|
-
window.addEventListener("resize", publicAPI.resize);
|
|
18478
18724
|
}
|
|
18725
|
+
};
|
|
18726
|
+
publicAPI.toggleControllerVisibility = () => {
|
|
18727
|
+
publicAPI.setControllerVisibility(!model.controllerVisibility);
|
|
18728
|
+
};
|
|
18729
|
+
publicAPI.addController = (html) => {
|
|
18730
|
+
model.controlContainer = document.createElement("div");
|
|
18731
|
+
(0, util_1.applyStyle)(model.controlContainer, model.controlPanelStyle || STYLE_CONTROL_PANEL);
|
|
18732
|
+
model.rootContainer.appendChild(model.controlContainer);
|
|
18733
|
+
model.controlContainer.innerHTML = html;
|
|
18734
|
+
publicAPI.setControllerVisibility(model.controllerVisibility);
|
|
18735
|
+
model.rootContainer.addEventListener("keypress", (e) => {
|
|
18736
|
+
if (String.fromCharCode(e.charCode) === "c") {
|
|
18737
|
+
publicAPI.toggleControllerVisibility();
|
|
18738
|
+
}
|
|
18739
|
+
});
|
|
18740
|
+
};
|
|
18741
|
+
// Properly release GL context
|
|
18742
|
+
publicAPI.delete = window.vtk.macro.chain(publicAPI.setContainer, model.openGLRenderWindow.delete, publicAPI.delete);
|
|
18743
|
+
// Handle window resize
|
|
18744
|
+
publicAPI.resize = () => {
|
|
18745
|
+
const dims = model.container.getBoundingClientRect();
|
|
18746
|
+
const devicePixelRatio = window.devicePixelRatio || 1;
|
|
18747
|
+
model.openGLRenderWindow.setSize(Math.floor(dims.width * devicePixelRatio), Math.floor(dims.height * devicePixelRatio));
|
|
18748
|
+
if (model.resizeCallback) {
|
|
18749
|
+
model.resizeCallback(dims);
|
|
18750
|
+
}
|
|
18751
|
+
model.renderWindow.render();
|
|
18752
|
+
};
|
|
18753
|
+
publicAPI.setResizeCallback = (cb) => {
|
|
18754
|
+
model.resizeCallback = cb;
|
|
18479
18755
|
publicAPI.resize();
|
|
18756
|
+
};
|
|
18757
|
+
if (model.listenWindowResize) {
|
|
18758
|
+
window.addEventListener("resize", publicAPI.resize);
|
|
18480
18759
|
}
|
|
18481
|
-
|
|
18482
|
-
|
|
18760
|
+
publicAPI.resize();
|
|
18761
|
+
}
|
|
18762
|
+
function initialize_fullscreen_render() {
|
|
18763
|
+
let FullScreenRenderWindowSynchronized = {
|
|
18764
|
+
newInstance: window.vtk.macro.newInstance((publicAPI, model, initialValues = {}) => {
|
|
18483
18765
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
18484
18766
|
// Object methods
|
|
18485
|
-
|
|
18486
|
-
|
|
18767
|
+
window.vtk.macro.obj(publicAPI, model);
|
|
18768
|
+
window.vtk.macro.get(publicAPI, model, [
|
|
18487
18769
|
"renderWindow",
|
|
18488
18770
|
"openGLRenderWindow",
|
|
18489
18771
|
"interactor",
|
|
@@ -18496,7 +18778,9 @@
|
|
|
18496
18778
|
panelFullScreenRenderWindowSynchronized(publicAPI, model);
|
|
18497
18779
|
}),
|
|
18498
18780
|
};
|
|
18781
|
+
util_1.vtkns.FullScreenRenderWindowSynchronized = FullScreenRenderWindowSynchronized;
|
|
18499
18782
|
}
|
|
18783
|
+
exports.initialize_fullscreen_render = initialize_fullscreen_render;
|
|
18500
18784
|
},
|
|
18501
|
-
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"
|
|
18785
|
+
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"1abe9b6912","models/ace":"9fecc8d0f9","models/layout":"4c755983eb","models/audio":"339f84d639","models/card":"c816112d20","models/comm_manager":"e552778259","models/tabulator":"8e41f17634","models/data":"f1971f81bf","models/datetime_picker":"6e11b2cfe2","models/deckgl":"df2378664f","models/tooltips":"6e04fbe567","models/echarts":"9d046c4720","models/html":"c424a3bd17","models/event-to-object":"3329d4aa5b","models/idom":"7d45bd3bc4","models/ipywidget":"0eae77d68f","models/json":"0d30bea0c8","models/file_download":"1767172ffa","models/katex":"7b859fb3cf","models/location":"642aa56b24","models/mathjax":"0c21036737","models/perspective":"84a772681d","models/player":"2e8044c920","models/plotly":"a2080c6bc8","models/util":"990b5dd5c7","models/progress":"fd3806082d","models/quill":"6895629dfc","models/reactive_html":"eb3a49319b","models/singleselect":"5ed2116e26","models/speech_to_text":"aaa48703af","models/state":"bfa46a5f19","models/terminal":"edf66f5228","models/text_to_speech":"33cd2c254e","models/trend":"effe070807","models/vega":"04fd346566","models/video":"ffe54b53c3","models/videostream":"e3e9b8e495","models/vtk/index":"c51f25e2a7","models/vtk/vtkjs":"b6d9199d03","models/vtk/vtklayout":"e13c143c7d","models/vtk/util":"993f3118b2","models/vtk/vtkcolorbar":"c010237f8b","models/vtk/vtkaxes":"204e2f98bd","models/vtk/vtkvolume":"7785475bdd","models/vtk/vtksynchronized":"0a57062475","models/vtk/panel_fullscreen_renwin_sync":"877619fe71"}, {});});
|
|
18502
18786
|
//# sourceMappingURL=panel.js.map
|