@holoviz/panel 0.13.1 → 0.14.0-a.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/models/layout.d.ts +3 -0
- package/dist/lib/models/layout.js +42 -1
- package/dist/lib/models/layout.js.map +1 -1
- package/dist/lib/models/tabulator.js +12 -11
- package/dist/lib/models/tabulator.js.map +1 -1
- package/dist/panel.js +78 -36
- package/dist/panel.js.map +1 -1
- package/dist/panel.json +1 -1
- package/dist/panel.min.js +23 -23
- package/package.json +1 -1
package/dist/panel.js
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
__esExport("CommManager", comm_manager_1.CommManager);
|
|
63
63
|
var customselect_1 = require("e258e515be") /* ./customselect */;
|
|
64
64
|
__esExport("CustomSelect", customselect_1.CustomSelect);
|
|
65
|
-
var tabulator_1 = require("
|
|
65
|
+
var tabulator_1 = require("5e94fc93b9") /* ./tabulator */;
|
|
66
66
|
__esExport("DataTabulator", tabulator_1.DataTabulator);
|
|
67
67
|
var datetime_picker_1 = require("6e11b2cfe2") /* ./datetime_picker */;
|
|
68
68
|
__esExport("DatetimePicker", datetime_picker_1.DatetimePicker);
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
__esModule();
|
|
127
127
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
128
128
|
const dom_1 = require("@bokehjs/core/dom");
|
|
129
|
-
const layout_1 = require("
|
|
129
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
130
130
|
function ID() {
|
|
131
131
|
// Math.random should be unique because of its seeding algorithm.
|
|
132
132
|
// Convert it to base 36 (numbers + letters), and grab the first 9 characters
|
|
@@ -239,11 +239,12 @@
|
|
|
239
239
|
AcePlot.__module__ = "panel.models.ace";
|
|
240
240
|
AcePlot.init_AcePlot();
|
|
241
241
|
},
|
|
242
|
-
"
|
|
242
|
+
"80a6464b1f": /* models/layout.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
243
243
|
__esModule();
|
|
244
|
+
const dom_1 = require("@bokehjs/core/dom");
|
|
245
|
+
const color_1 = require("@bokehjs/core/util/color");
|
|
244
246
|
const html_1 = require("@bokehjs/core/layout/html");
|
|
245
247
|
const types_1 = require("@bokehjs/core/layout/types");
|
|
246
|
-
const dom_1 = require("@bokehjs/core/dom");
|
|
247
248
|
const markup_1 = require("@bokehjs/models/widgets/markup");
|
|
248
249
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
249
250
|
function set_size(el, model) {
|
|
@@ -348,6 +349,46 @@
|
|
|
348
349
|
exports.PanelMarkupView = PanelMarkupView;
|
|
349
350
|
PanelMarkupView.__name__ = "PanelMarkupView";
|
|
350
351
|
class PanelHTMLBoxView extends html_box_1.HTMLBoxView {
|
|
352
|
+
connect_signals() {
|
|
353
|
+
super.connect_signals();
|
|
354
|
+
// Note due to on_change hack properties must be defined in this order.
|
|
355
|
+
const { css_classes, background } = this.model.properties;
|
|
356
|
+
this._prev_css_classes = this.model.css_classes;
|
|
357
|
+
this.on_change([css_classes, background], () => {
|
|
358
|
+
// Note: This ensures that changes in the background and changes
|
|
359
|
+
// to the loading parameter in Panel do NOT trigger a full re-render
|
|
360
|
+
const css = [];
|
|
361
|
+
let skip = false;
|
|
362
|
+
for (const cls of this.model.css_classes) {
|
|
363
|
+
if (cls === 'pn-loading')
|
|
364
|
+
skip = true;
|
|
365
|
+
else if (skip)
|
|
366
|
+
skip = false;
|
|
367
|
+
else
|
|
368
|
+
css.push(cls);
|
|
369
|
+
}
|
|
370
|
+
const prev = this._prev_css_classes;
|
|
371
|
+
if (JSON.stringify(css) === JSON.stringify(prev)) {
|
|
372
|
+
const { background } = this.model;
|
|
373
|
+
this.el.style.backgroundColor = background != null ? (0, color_1.color2css)(background) : "";
|
|
374
|
+
(0, dom_1.classes)(this.el).clear().add(...this.css_classes());
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
this.invalidate_render();
|
|
378
|
+
}
|
|
379
|
+
this._prev_css_classes = css;
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
on_change(properties, fn) {
|
|
383
|
+
// HACKALERT: LayoutDOMView triggers re-renders whenever css_classes change
|
|
384
|
+
// which is very expensive so we do not connect this signal and handle it
|
|
385
|
+
// ourself
|
|
386
|
+
const p = this.model.properties;
|
|
387
|
+
if (properties.length === 2 && properties[0] === p.background && properties[1] === p.css_classes) {
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
super.on_change(properties, fn);
|
|
391
|
+
}
|
|
351
392
|
_update_layout() {
|
|
352
393
|
let changed = ((this._prev_sizing_mode !== undefined) &&
|
|
353
394
|
(this._prev_sizing_mode !== this.model.sizing_mode));
|
|
@@ -366,7 +407,7 @@
|
|
|
366
407
|
"33955cfa6f": /* models/audio.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
367
408
|
__esModule();
|
|
368
409
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
369
|
-
const layout_1 = require("
|
|
410
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
370
411
|
class AudioView extends layout_1.PanelHTMLBoxView {
|
|
371
412
|
initialize() {
|
|
372
413
|
super.initialize();
|
|
@@ -780,7 +821,7 @@
|
|
|
780
821
|
});
|
|
781
822
|
})();
|
|
782
823
|
},
|
|
783
|
-
"
|
|
824
|
+
"5e94fc93b9": /* models/tabulator.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
784
825
|
__esModule();
|
|
785
826
|
const dom_1 = require("@bokehjs/core/dom");
|
|
786
827
|
const types_1 = require("@bokehjs/core/util/types");
|
|
@@ -794,7 +835,7 @@
|
|
|
794
835
|
const debounce_1 = require("99a25e6992") /* debounce */;
|
|
795
836
|
const comm_manager_1 = require("f34032fb47") /* ./comm_manager */;
|
|
796
837
|
const data_1 = require("7f7d9e0c6b") /* ./data */;
|
|
797
|
-
const layout_1 = require("
|
|
838
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
798
839
|
class TableEditEvent extends bokeh_events_1.ModelEvent {
|
|
799
840
|
constructor(column, row) {
|
|
800
841
|
super();
|
|
@@ -993,34 +1034,35 @@
|
|
|
993
1034
|
}
|
|
994
1035
|
connect_signals() {
|
|
995
1036
|
super.connect_signals();
|
|
996
|
-
const
|
|
1037
|
+
const p = this.model.properties;
|
|
1038
|
+
const { configuration, layout, columns, theme, groupby } = p;
|
|
997
1039
|
this.on_change([configuration, layout, columns, groupby], (0, debounce_1.debounce)(() => this.invalidate_render(), 20, false));
|
|
998
1040
|
this.on_change([theme], () => this.setCSS());
|
|
999
|
-
this.connect(
|
|
1041
|
+
this.connect(p.download.change, () => {
|
|
1000
1042
|
const ftype = this.model.filename.endsWith('.json') ? "json" : "csv";
|
|
1001
1043
|
this.tabulator.download(ftype, this.model.filename);
|
|
1002
1044
|
});
|
|
1003
|
-
this.connect(
|
|
1004
|
-
this.connect(
|
|
1045
|
+
this.connect(p.children.change, () => this.renderChildren());
|
|
1046
|
+
this.connect(p.expanded.change, () => {
|
|
1005
1047
|
for (const row of this.tabulator.rowManager.getRows()) {
|
|
1006
1048
|
if (row.cells.length > 0)
|
|
1007
1049
|
row.cells[0].layoutElement();
|
|
1008
1050
|
}
|
|
1009
1051
|
});
|
|
1010
|
-
this.connect(
|
|
1052
|
+
this.connect(p.styles.change, () => {
|
|
1011
1053
|
if (this._applied_styles)
|
|
1012
1054
|
this.tabulator.redraw(true);
|
|
1013
1055
|
this.setStyles();
|
|
1014
1056
|
});
|
|
1015
|
-
this.connect(
|
|
1016
|
-
this.connect(
|
|
1017
|
-
this.connect(
|
|
1057
|
+
this.connect(p.hidden_columns.change, () => this.setHidden());
|
|
1058
|
+
this.connect(p.page_size.change, () => this.setPageSize());
|
|
1059
|
+
this.connect(p.page.change, () => {
|
|
1018
1060
|
if (!this._updating_page)
|
|
1019
1061
|
this.setPage();
|
|
1020
1062
|
});
|
|
1021
|
-
this.connect(
|
|
1022
|
-
this.connect(
|
|
1023
|
-
this.connect(
|
|
1063
|
+
this.connect(p.max_page.change, () => this.setMaxPage());
|
|
1064
|
+
this.connect(p.frozen_rows.change, () => this.setFrozen());
|
|
1065
|
+
this.connect(p.sorters.change, () => this.setSorters());
|
|
1024
1066
|
this.connect(this.model.source.properties.data.change, () => this.setData());
|
|
1025
1067
|
this.connect(this.model.source.streaming, () => this.addData());
|
|
1026
1068
|
this.connect(this.model.source.patching, () => {
|
|
@@ -4742,7 +4784,7 @@
|
|
|
4742
4784
|
const column_data_source_1 = require("@bokehjs/models/sources/column_data_source");
|
|
4743
4785
|
const debounce_1 = require("99a25e6992") /* debounce */;
|
|
4744
4786
|
const data_1 = require("7f7d9e0c6b") /* ./data */;
|
|
4745
|
-
const layout_1 = require("
|
|
4787
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
4746
4788
|
const tooltips_1 = require("6e04fbe567") /* ./tooltips */;
|
|
4747
4789
|
const constants_1 = (0, tslib_1.__importDefault)(require("093eb75864") /* @luma.gl/constants */);
|
|
4748
4790
|
function extractClasses() {
|
|
@@ -5914,7 +5956,7 @@
|
|
|
5914
5956
|
__esModule();
|
|
5915
5957
|
const markup_1 = require("@bokehjs/models/widgets/markup");
|
|
5916
5958
|
const bokeh_events_1 = require("@bokehjs/core/bokeh_events");
|
|
5917
|
-
const layout_1 = require("
|
|
5959
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
5918
5960
|
const event_to_object_1 = require("c4ee233e58") /* ./event-to-object */;
|
|
5919
5961
|
class DOMEvent extends bokeh_events_1.ModelEvent {
|
|
5920
5962
|
constructor(node, data) {
|
|
@@ -6285,7 +6327,7 @@
|
|
|
6285
6327
|
const preact_2 = require("b3f51db71c") /* htm/preact */;
|
|
6286
6328
|
const fast_json_patch_1 = require("cbecfde9cd") /* fast-json-patch */;
|
|
6287
6329
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
6288
|
-
const layout_1 = require("
|
|
6330
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
6289
6331
|
const event_to_object_1 = require("c4ee233e58") /* ./event-to-object */;
|
|
6290
6332
|
const LayoutConfigContext = (0, preact_1.createContext)({});
|
|
6291
6333
|
function mountLayout(mountElement, saveUpdateHook, sendEvent, importSourceUrl) {
|
|
@@ -7757,7 +7799,7 @@
|
|
|
7757
7799
|
"0eae77d68f": /* models/ipywidget.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
7758
7800
|
__esModule();
|
|
7759
7801
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
7760
|
-
const layout_1 = require("
|
|
7802
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
7761
7803
|
const Jupyter = window.Jupyter;
|
|
7762
7804
|
class IPyWidgetView extends layout_1.PanelHTMLBoxView {
|
|
7763
7805
|
constructor() {
|
|
@@ -7828,7 +7870,7 @@
|
|
|
7828
7870
|
const kinds_1 = require("@bokehjs/core/kinds");
|
|
7829
7871
|
const markup_1 = require("@bokehjs/models/widgets/markup");
|
|
7830
7872
|
const json_formatter_js_1 = (0, tslib_1.__importDefault)(require("18bba7b7e1") /* json-formatter-js */);
|
|
7831
|
-
const layout_1 = require("
|
|
7873
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
7832
7874
|
class JSONView extends layout_1.PanelMarkupView {
|
|
7833
7875
|
connect_signals() {
|
|
7834
7876
|
super.connect_signals();
|
|
@@ -7967,7 +8009,7 @@
|
|
|
7967
8009
|
__esModule();
|
|
7968
8010
|
const bokeh_events_1 = require("@bokehjs/core/bokeh_events");
|
|
7969
8011
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
7970
|
-
const layout_1 = require("
|
|
8012
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
7971
8013
|
class JSONEditEvent extends bokeh_events_1.ModelEvent {
|
|
7972
8014
|
constructor(data) {
|
|
7973
8015
|
super();
|
|
@@ -8247,7 +8289,7 @@
|
|
|
8247
8289
|
"7b859fb3cf": /* models/katex.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8248
8290
|
__esModule();
|
|
8249
8291
|
const markup_1 = require("@bokehjs/models/widgets/markup");
|
|
8250
|
-
const layout_1 = require("
|
|
8292
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
8251
8293
|
class KaTeXView extends layout_1.PanelMarkupView {
|
|
8252
8294
|
render() {
|
|
8253
8295
|
super.render();
|
|
@@ -8356,7 +8398,7 @@
|
|
|
8356
8398
|
"0c21036737": /* models/mathjax.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8357
8399
|
__esModule();
|
|
8358
8400
|
const markup_1 = require("@bokehjs/models/widgets/markup");
|
|
8359
|
-
const layout_1 = require("
|
|
8401
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
8360
8402
|
class MathJaxView extends layout_1.PanelMarkupView {
|
|
8361
8403
|
initialize() {
|
|
8362
8404
|
super.initialize();
|
|
@@ -8394,7 +8436,7 @@
|
|
|
8394
8436
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
8395
8437
|
const dom_1 = require("@bokehjs/core/dom");
|
|
8396
8438
|
const column_data_source_1 = require("@bokehjs/models/sources/column_data_source");
|
|
8397
|
-
const layout_1 = require("
|
|
8439
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
8398
8440
|
const THEMES = {
|
|
8399
8441
|
'material-dark': 'Material Dark',
|
|
8400
8442
|
'material': 'Material Light',
|
|
@@ -8961,7 +9003,7 @@
|
|
|
8961
9003
|
const column_data_source_1 = require("@bokehjs/models/sources/column_data_source");
|
|
8962
9004
|
const debounce_1 = require("99a25e6992") /* debounce */;
|
|
8963
9005
|
const util_1 = require("990b5dd5c7") /* ./util */;
|
|
8964
|
-
const layout_1 = require("
|
|
9006
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
8965
9007
|
const filterEventData = (gd, eventData, event) => {
|
|
8966
9008
|
// Ported from dash-core-components/src/components/Graph.react.js
|
|
8967
9009
|
let filteredEventData = Array.isArray(eventData) ? [] : {};
|
|
@@ -9365,7 +9407,7 @@
|
|
|
9365
9407
|
"979633320f": /* models/progress.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
9366
9408
|
__esModule();
|
|
9367
9409
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
9368
|
-
const layout_1 = require("
|
|
9410
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
9369
9411
|
class ProgressView extends html_box_1.HTMLBoxView {
|
|
9370
9412
|
connect_signals() {
|
|
9371
9413
|
super.connect_signals();
|
|
@@ -9450,7 +9492,7 @@
|
|
|
9450
9492
|
__esModule();
|
|
9451
9493
|
const dom_1 = require("@bokehjs/core/dom");
|
|
9452
9494
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
9453
|
-
const layout_1 = require("
|
|
9495
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
9454
9496
|
class QuillInputView extends layout_1.PanelHTMLBoxView {
|
|
9455
9497
|
initialize() {
|
|
9456
9498
|
super.initialize();
|
|
@@ -9555,7 +9597,7 @@
|
|
|
9555
9597
|
const data_1 = require("7f7d9e0c6b") /* ./data */;
|
|
9556
9598
|
const event_to_object_1 = require("c4ee233e58") /* ./event-to-object */;
|
|
9557
9599
|
const html_1 = require("c424a3bd17") /* ./html */;
|
|
9558
|
-
const layout_1 = require("
|
|
9600
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
9559
9601
|
function serialize_attrs(attrs) {
|
|
9560
9602
|
const serialized = {};
|
|
9561
9603
|
for (const attr in attrs) {
|
|
@@ -10674,7 +10716,7 @@
|
|
|
10674
10716
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
10675
10717
|
const dom_1 = require("@bokehjs/core/dom");
|
|
10676
10718
|
const bokeh_events_1 = require("@bokehjs/core/bokeh_events");
|
|
10677
|
-
const layout_1 = require("
|
|
10719
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
10678
10720
|
class KeystrokeEvent extends bokeh_events_1.ModelEvent {
|
|
10679
10721
|
constructor(key) {
|
|
10680
10722
|
super();
|
|
@@ -11292,7 +11334,7 @@
|
|
|
11292
11334
|
"1b46fd56a8": /* models/video.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
11293
11335
|
__esModule();
|
|
11294
11336
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
11295
|
-
const layout_1 = require("
|
|
11337
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
11296
11338
|
class VideoView extends layout_1.PanelHTMLBoxView {
|
|
11297
11339
|
initialize() {
|
|
11298
11340
|
super.initialize();
|
|
@@ -11423,7 +11465,7 @@
|
|
|
11423
11465
|
"e3e9b8e495": /* models/videostream.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
11424
11466
|
__esModule();
|
|
11425
11467
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
11426
|
-
const layout_1 = require("
|
|
11468
|
+
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
11427
11469
|
class VideoStreamView extends layout_1.PanelHTMLBoxView {
|
|
11428
11470
|
constructor() {
|
|
11429
11471
|
super(...arguments);
|
|
@@ -11615,7 +11657,7 @@
|
|
|
11615
11657
|
const object_1 = require("@bokehjs/core/util/object");
|
|
11616
11658
|
const color_mapper_1 = require("@bokehjs/models/mappers/color_mapper");
|
|
11617
11659
|
const kinds_1 = require("@bokehjs/core/kinds");
|
|
11618
|
-
const layout_1 = require("
|
|
11660
|
+
const layout_1 = require("80a6464b1f") /* ../layout */;
|
|
11619
11661
|
const util_1 = require("993f3118b2") /* ./util */;
|
|
11620
11662
|
const vtkcolorbar_1 = require("c010237f8b") /* ./vtkcolorbar */;
|
|
11621
11663
|
const vtkaxes_1 = require("ab478186ba") /* ./vtkaxes */;
|
|
@@ -19727,5 +19769,5 @@
|
|
|
19727
19769
|
}
|
|
19728
19770
|
exports.initialize_fullscreen_render = initialize_fullscreen_render;
|
|
19729
19771
|
},
|
|
19730
|
-
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"eed113197d","models/ace":"2e12ebdb23","models/layout":"
|
|
19772
|
+
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"eed113197d","models/ace":"2e12ebdb23","models/layout":"80a6464b1f","models/audio":"33955cfa6f","models/card":"0972f6e77b","models/comm_manager":"f34032fb47","models/customselect":"e258e515be","models/tabulator":"5e94fc93b9","models/data":"7f7d9e0c6b","models/datetime_picker":"6e11b2cfe2","models/deckgl":"0155f7af4d","models/tooltips":"6e04fbe567","models/echarts":"9d046c4720","models/html":"c424a3bd17","models/event-to-object":"c4ee233e58","models/idom":"7d45bd3bc4","models/ipywidget":"0eae77d68f","models/json":"0d30bea0c8","models/json_editor":"be9f51fc39","models/file_download":"1767172ffa","models/katex":"7b859fb3cf","models/location":"0c52a301f3","models/mathjax":"0c21036737","models/perspective":"4ae96bd77b","models/player":"27b8bb6d20","models/plotly":"42de27e56c","models/util":"990b5dd5c7","models/progress":"979633320f","models/quill":"d51a79a0a3","models/reactive_html":"5fad190ca1","models/singleselect":"ab54efe08a","models/speech_to_text":"a96be0bcc9","models/state":"bfa46a5f19","models/tabs":"f693d9aa84","models/terminal":"3ea011fa55","models/text_to_speech":"33cd2c254e","models/trend":"effe070807","models/vega":"fea356270f","models/video":"1b46fd56a8","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":"ab478186ba","models/vtk/vtkvolume":"7785475bdd","models/vtk/vtksynchronized":"0a57062475","models/vtk/panel_fullscreen_renwin_sync":"877619fe71"}, {});});
|
|
19731
19773
|
//# sourceMappingURL=panel.js.map
|