@holoviz/panel 0.14.0-a.2 → 0.14.0-a.21
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/css/{npm/bootstrap@4.6.1 → bootstrap@4.6.1}/dist/css/bootstrap.min.css +0 -0
- package/dist/bundled/css/{npm/golden-layout@1.5.9 → golden-layout@1.5.9}/src/css/goldenlayout-base.css +0 -0
- package/dist/bundled/datatabulator/@holoviz/panel/dist/bundled/tabulator-tables@5.3.2/dist/css/fast/tabulator_fast.min.css +1 -0
- package/dist/bundled/datatabulator/luxon/build/global/luxon.min.js +1 -0
- package/dist/bundled/datatabulator/luxon/build/global/luxon.min.js.map +1 -0
- package/dist/bundled/datatabulator/{tabulator-tables@4.9.3 → tabulator-tables@5.3.2}/dist/css/fast/tabulator_fast.min.css +0 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_bootstrap3.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_bootstrap4.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_bulma.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_materialize.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_midnight.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_modern.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_semanticui.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_simple.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_site.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/js/tabulator.js +27481 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/js/tabulator.js.map +1 -0
- package/dist/bundled/deckglplot/{npm/@deck.gl → @deck.gl}/json@8.6.7/dist.min.js +0 -0
- package/dist/bundled/deckglplot/{npm/@loaders.gl → @loaders.gl}/3d-tiles@3.1.7/dist/dist.min.js +0 -0
- package/dist/bundled/deckglplot/{npm/@loaders.gl → @loaders.gl}/csv@3.1.7/dist/dist.min.js +0 -0
- package/dist/bundled/deckglplot/{npm/@loaders.gl → @loaders.gl}/json@3.1.7/dist/dist.min.js +0 -0
- package/dist/bundled/deckglplot/{npm/deck.gl@8.6.7 → deck.gl@8.6.7}/dist.min.js +0 -0
- package/dist/bundled/echarts/{npm/echarts-gl@2.0.2 → echarts-gl@2.0.2}/dist/echarts-gl.min.js +0 -0
- package/dist/bundled/echarts/{npm/echarts@5.0.2 → echarts@5.0.2}/dist/echarts.min.js +0 -0
- package/dist/bundled/fastbasetemplate/fast_panel.css +1 -0
- package/dist/bundled/gridstack/{npm/gridstack@4.2.5 → gridstack@4.2.5}/dist/gridstack-extra.min.css +0 -0
- package/dist/bundled/gridstack/{npm/gridstack@4.2.5 → gridstack@4.2.5}/dist/gridstack-h5.js +0 -0
- package/dist/bundled/gridstack/{npm/gridstack@4.2.5 → gridstack@4.2.5}/dist/gridstack-h5.js.map +0 -0
- package/dist/bundled/gridstack/{npm/gridstack@4.2.5 → gridstack@4.2.5}/dist/gridstack.min.css +0 -0
- package/dist/bundled/js/{npm/bootstrap@4.6.1 → bootstrap@4.6.1}/dist/js/bootstrap.bundle.min.js +0 -0
- package/dist/bundled/js/{npm/bootstrap@4.6.1 → bootstrap@4.6.1}/dist/js/bootstrap.bundle.min.js.map +0 -0
- package/dist/bundled/js/{npm/golden-layout@1.5.9 → golden-layout@1.5.9}/dist/goldenlayout.min.js +0 -0
- package/dist/bundled/js/{npm/jquery@3.5.1 → jquery@3.5.1}/dist/jquery.slim.min.js +0 -0
- package/dist/bundled/jsoneditor/jsoneditor@9.5.6/dist/jsoneditor.min.css +6 -0
- package/dist/bundled/jsoneditor/jsoneditor@9.5.6/dist/jsoneditor.min.js +45 -0
- package/dist/bundled/notificationarea/{npm/notyf@3 → notyf@3}/notyf.min.css +0 -0
- package/dist/bundled/notificationarea/{npm/notyf@3 → notyf@3}/notyf.min.js +0 -0
- package/dist/bundled/plotlyplot/{npm/jquery@3.5.1 → jquery@3.5.1}/dist/jquery.slim.min.js +0 -0
- package/dist/css/markdown.css +7 -0
- package/dist/lib/models/comm_manager.d.ts +1 -0
- package/dist/lib/models/comm_manager.js +21 -1
- package/dist/lib/models/comm_manager.js.map +1 -1
- package/dist/lib/models/datetime_picker.js +4 -2
- package/dist/lib/models/datetime_picker.js.map +1 -1
- package/dist/lib/models/event-to-object.js +4 -0
- package/dist/lib/models/event-to-object.js.map +1 -1
- package/dist/lib/models/player.d.ts +2 -1
- package/dist/lib/models/player.js +11 -4
- package/dist/lib/models/player.js.map +1 -1
- package/dist/lib/models/reactive_html.js +11 -1
- package/dist/lib/models/reactive_html.js.map +1 -1
- package/dist/lib/models/tabulator.d.ts +5 -2
- package/dist/lib/models/tabulator.js +181 -162
- package/dist/lib/models/tabulator.js.map +1 -1
- package/dist/lib/styles/markdown.css.js +7 -0
- package/dist/panel.js +246 -175
- package/dist/panel.js.map +1 -1
- package/dist/panel.json +1 -1
- package/dist/panel.min.js +11 -11
- package/dist/wheels/bokeh-2.4.3-py3-none-any.whl +0 -0
- package/dist/wheels/panel-0.14.0a21-py3-none-any.whl +0 -0
- package/package.json +2 -2
- package/dist/bundled/datatabulator/npm/@holoviz/panel/dist/bundled/tabulator-tables@4.9.3/dist/css/fast/tabulator_fast.min.css +0 -1
- package/dist/bundled/datatabulator/npm/luxon/build/global/luxon.min.js +0 -1
- package/dist/bundled/datatabulator/npm/luxon/build/global/luxon.min.js.map +0 -1
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/bootstrap/tabulator_bootstrap.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/bootstrap/tabulator_bootstrap4.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/bulma/tabulator_bulma.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/materialize/tabulator_materialize.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/semantic-ui/tabulator_semantic-ui.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/tabulator.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/tabulator_midnight.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/tabulator_modern.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/tabulator_simple.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/tabulator_site.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/js/tabulator.js +0 -26546
- package/dist/bundled/jsoneditor/npm/jsoneditor@9.1.9/dist/jsoneditor.min.css +0 -6
- package/dist/bundled/jsoneditor/npm/jsoneditor@9.1.9/dist/jsoneditor.min.js +0 -46
package/dist/panel.js
CHANGED
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
__esExport("Audio", audio_1.Audio);
|
|
59
59
|
var card_1 = require("0972f6e77b") /* ./card */;
|
|
60
60
|
__esExport("Card", card_1.Card);
|
|
61
|
-
var comm_manager_1 = require("
|
|
61
|
+
var comm_manager_1 = require("754fbb1f55") /* ./comm_manager */;
|
|
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("6ab332f75c") /* ./tabulator */;
|
|
66
66
|
__esExport("DataTabulator", tabulator_1.DataTabulator);
|
|
67
|
-
var datetime_picker_1 = require("
|
|
67
|
+
var datetime_picker_1 = require("297274885a") /* ./datetime_picker */;
|
|
68
68
|
__esExport("DatetimePicker", datetime_picker_1.DatetimePicker);
|
|
69
69
|
var deckgl_1 = require("0155f7af4d") /* ./deckgl */;
|
|
70
70
|
__esExport("DeckGLPlot", deckgl_1.DeckGLPlot);
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
__esExport("MathJax", mathjax_1.MathJax);
|
|
91
91
|
var perspective_1 = require("4ae96bd77b") /* ./perspective */;
|
|
92
92
|
__esExport("Perspective", perspective_1.Perspective);
|
|
93
|
-
var player_1 = require("
|
|
93
|
+
var player_1 = require("588a5ae70d") /* ./player */;
|
|
94
94
|
__esExport("Player", player_1.Player);
|
|
95
95
|
var plotly_1 = require("42de27e56c") /* ./plotly */;
|
|
96
96
|
__esExport("PlotlyPlot", plotly_1.PlotlyPlot);
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
__esExport("Progress", progress_1.Progress);
|
|
99
99
|
var quill_1 = require("d51a79a0a3") /* ./quill */;
|
|
100
100
|
__esExport("QuillInput", quill_1.QuillInput);
|
|
101
|
-
var reactive_html_1 = require("
|
|
101
|
+
var reactive_html_1 = require("ad426de39c") /* ./reactive_html */;
|
|
102
102
|
__esExport("ReactiveHTML", reactive_html_1.ReactiveHTML);
|
|
103
103
|
var singleselect_1 = require("ab54efe08a") /* ./singleselect */;
|
|
104
104
|
__esExport("SingleSelect", singleselect_1.SingleSelect);
|
|
@@ -650,7 +650,7 @@
|
|
|
650
650
|
Card.__module__ = "panel.models.layout";
|
|
651
651
|
Card.init_Card();
|
|
652
652
|
},
|
|
653
|
-
"
|
|
653
|
+
"754fbb1f55": /* models/comm_manager.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
654
654
|
__esModule();
|
|
655
655
|
const document_1 = require("@bokehjs/document");
|
|
656
656
|
const view_1 = require("@bokehjs/core/view");
|
|
@@ -678,8 +678,20 @@
|
|
|
678
678
|
console.log("Could not find comm manager on window.PyViz, ensure the extension is loaded.");
|
|
679
679
|
else {
|
|
680
680
|
this.ns = window.PyViz;
|
|
681
|
-
this.ns.comm_manager.register_target(this.plot_id, this.comm_id, (msg) =>
|
|
681
|
+
this.ns.comm_manager.register_target(this.plot_id, this.comm_id, (msg) => {
|
|
682
|
+
for (const view of this.ns.shared_views.get(this.plot_id)) {
|
|
683
|
+
if (view !== this)
|
|
684
|
+
view.msg_handler(msg);
|
|
685
|
+
}
|
|
686
|
+
this.msg_handler(msg);
|
|
687
|
+
});
|
|
682
688
|
this._client_comm = this.ns.comm_manager.get_client_comm(this.plot_id, this.client_comm_id, (msg) => this.on_ack(msg));
|
|
689
|
+
if (this.ns.shared_views == null)
|
|
690
|
+
this.ns.shared_views = new Map();
|
|
691
|
+
if (this.ns.shared_views.has(this.plot_id))
|
|
692
|
+
this.ns.shared_views.get(this.plot_id).push(this);
|
|
693
|
+
else
|
|
694
|
+
this.ns.shared_views.set(this.plot_id, [this]);
|
|
683
695
|
}
|
|
684
696
|
}
|
|
685
697
|
_doc_attached() {
|
|
@@ -711,6 +723,14 @@
|
|
|
711
723
|
this._event_buffer = [];
|
|
712
724
|
const message = message_1.Message.create('PATCH-DOC', {}, patch);
|
|
713
725
|
this._client_comm.send(message);
|
|
726
|
+
for (const view of this.ns.shared_views.get(this.plot_id)) {
|
|
727
|
+
if (view !== this && view.document != null)
|
|
728
|
+
view.document.apply_json_patch(patch, [], this.id);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
disconnect_signals() {
|
|
732
|
+
super.disconnect_signals();
|
|
733
|
+
this.ns.shared_views.shared_views.delete(this.plot_id);
|
|
714
734
|
}
|
|
715
735
|
on_ack(msg) {
|
|
716
736
|
// Receives acknowledgement from Python, processing event
|
|
@@ -821,7 +841,7 @@
|
|
|
821
841
|
});
|
|
822
842
|
})();
|
|
823
843
|
},
|
|
824
|
-
"
|
|
844
|
+
"6ab332f75c": /* models/tabulator.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
825
845
|
__esModule();
|
|
826
846
|
const dom_1 = require("@bokehjs/core/dom");
|
|
827
847
|
const types_1 = require("@bokehjs/core/util/types");
|
|
@@ -833,7 +853,7 @@
|
|
|
833
853
|
const column_data_source_1 = require("@bokehjs/models/sources/column_data_source");
|
|
834
854
|
const tables_1 = require("@bokehjs/models/widgets/tables");
|
|
835
855
|
const debounce_1 = require("99a25e6992") /* debounce */;
|
|
836
|
-
const comm_manager_1 = require("
|
|
856
|
+
const comm_manager_1 = require("754fbb1f55") /* ./comm_manager */;
|
|
837
857
|
const data_1 = require("7f7d9e0c6b") /* ./data */;
|
|
838
858
|
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
839
859
|
class TableEditEvent extends bokeh_events_1.ModelEvent {
|
|
@@ -939,6 +959,45 @@
|
|
|
939
959
|
summarize(grouped, columns, aggs);
|
|
940
960
|
return grouped;
|
|
941
961
|
}
|
|
962
|
+
const timestampSorter = function (a, b, _aRow, _bRow, _column, _dir, _params) {
|
|
963
|
+
// Bokeh serializes datetime objects as UNIX timestamps.
|
|
964
|
+
//a, b - the two values being compared
|
|
965
|
+
//aRow, bRow - the row components for the values being compared (useful if you need to access additional fields in the row data for the sort)
|
|
966
|
+
//column - the column component for the column being sorted
|
|
967
|
+
//dir - the direction of the sort ("asc" or "desc")
|
|
968
|
+
//sorterParams - sorterParams object from column definition array
|
|
969
|
+
// Added an _ in front of some parameters as they're unused and the Typescript compiler was complaining about it.
|
|
970
|
+
// const alignEmptyValues = params.alignEmptyValues
|
|
971
|
+
let emptyAlign;
|
|
972
|
+
emptyAlign = 0;
|
|
973
|
+
const opts = { zone: new window.luxon.IANAZone('UTC') };
|
|
974
|
+
// NaN values are serialized to -9223372036854776 by Bokeh
|
|
975
|
+
if (String(a) == '-9223372036854776') {
|
|
976
|
+
a = window.luxon.DateTime.fromISO('invalid');
|
|
977
|
+
}
|
|
978
|
+
else {
|
|
979
|
+
a = window.luxon.DateTime.fromMillis(a, opts);
|
|
980
|
+
}
|
|
981
|
+
if (String(b) == '-9223372036854776') {
|
|
982
|
+
b = window.luxon.DateTime.fromISO('invalid');
|
|
983
|
+
}
|
|
984
|
+
else {
|
|
985
|
+
b = window.luxon.DateTime.fromMillis(b, opts);
|
|
986
|
+
}
|
|
987
|
+
if (!a.isValid) {
|
|
988
|
+
emptyAlign = !b.isValid ? 0 : -1;
|
|
989
|
+
}
|
|
990
|
+
else if (!b.isValid) {
|
|
991
|
+
emptyAlign = 1;
|
|
992
|
+
}
|
|
993
|
+
else {
|
|
994
|
+
//compare valid values
|
|
995
|
+
return a - b;
|
|
996
|
+
}
|
|
997
|
+
// Invalid (e.g. NaN) always at the bottom
|
|
998
|
+
emptyAlign *= -1;
|
|
999
|
+
return emptyAlign;
|
|
1000
|
+
};
|
|
942
1001
|
const dateEditor = function (cell, onRendered, success, cancel) {
|
|
943
1002
|
//cell - the cell component for the editable cell
|
|
944
1003
|
//onRendered - function to call when the editor has been rendered
|
|
@@ -1031,6 +1090,7 @@
|
|
|
1031
1090
|
this._selection_updating = false;
|
|
1032
1091
|
this._lastVerticalScrollbarTopPosition = 0;
|
|
1033
1092
|
this._applied_styles = false;
|
|
1093
|
+
this._building = false;
|
|
1034
1094
|
}
|
|
1035
1095
|
connect_signals() {
|
|
1036
1096
|
super.connect_signals();
|
|
@@ -1044,10 +1104,20 @@
|
|
|
1044
1104
|
});
|
|
1045
1105
|
this.connect(p.children.change, () => this.renderChildren());
|
|
1046
1106
|
this.connect(p.expanded.change, () => {
|
|
1107
|
+
// The first cell is the cell of the frozen _index column.
|
|
1047
1108
|
for (const row of this.tabulator.rowManager.getRows()) {
|
|
1048
1109
|
if (row.cells.length > 0)
|
|
1049
1110
|
row.cells[0].layoutElement();
|
|
1050
1111
|
}
|
|
1112
|
+
// Make sure the expand icon is changed when expanded is
|
|
1113
|
+
// changed from Python.
|
|
1114
|
+
for (const row of this.tabulator.rowManager.getRows()) {
|
|
1115
|
+
if (row.cells.length > 0) {
|
|
1116
|
+
const index = row.data._index;
|
|
1117
|
+
const icon = this.model.expanded.indexOf(index) < 0 ? "►" : "▼";
|
|
1118
|
+
row.cells[1].element.innerText = icon;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1051
1121
|
});
|
|
1052
1122
|
this.connect(p.styles.change, () => {
|
|
1053
1123
|
if (this._applied_styles)
|
|
@@ -1092,20 +1162,16 @@
|
|
|
1092
1162
|
this.render();
|
|
1093
1163
|
this.relayout();
|
|
1094
1164
|
}
|
|
1095
|
-
renderComplete() {
|
|
1096
|
-
// Only have to set up styles after initial render subsequent
|
|
1097
|
-
// styling is handled by change event on styles property
|
|
1098
|
-
if (this._initializing) {
|
|
1099
|
-
this.setSelection();
|
|
1100
|
-
this.relayout();
|
|
1101
|
-
this._initializing = false;
|
|
1102
|
-
if (this._lastVerticalScrollbarTopPosition)
|
|
1103
|
-
this.tabulator.rowManager.element.scrollTop = this._lastVerticalScrollbarTopPosition;
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
1165
|
redraw() {
|
|
1107
|
-
this.
|
|
1108
|
-
|
|
1166
|
+
if (!this._building) {
|
|
1167
|
+
if (this.tabulator.columnManager.element != null) {
|
|
1168
|
+
this.tabulator.columnManager.redraw(true);
|
|
1169
|
+
}
|
|
1170
|
+
if (this.tabulator.rowManager.renderer != null) {
|
|
1171
|
+
this.tabulator.rowManager.redraw(true);
|
|
1172
|
+
this.setStyles();
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1109
1175
|
}
|
|
1110
1176
|
after_layout() {
|
|
1111
1177
|
super.after_layout();
|
|
@@ -1122,113 +1188,96 @@
|
|
|
1122
1188
|
(0, layout_1.set_size)(container, this.model);
|
|
1123
1189
|
let configuration = this.getConfiguration();
|
|
1124
1190
|
this.tabulator = new Tabulator(container, configuration);
|
|
1191
|
+
this.init_callbacks();
|
|
1125
1192
|
this.renderChildren(true);
|
|
1126
|
-
// Swap pagination mode
|
|
1127
|
-
if (this.model.pagination === 'remote') {
|
|
1128
|
-
this.tabulator.options.pagination = this.model.pagination;
|
|
1129
|
-
this.tabulator.modules.page.mode = 'remote';
|
|
1130
|
-
}
|
|
1131
|
-
this.setGroupBy();
|
|
1132
1193
|
this.setHidden();
|
|
1133
|
-
// Set up page
|
|
1134
|
-
if (this.model.pagination) {
|
|
1135
|
-
this.setMaxPage();
|
|
1136
|
-
this.tabulator.setPage(this.model.page);
|
|
1137
|
-
this.setData();
|
|
1138
|
-
}
|
|
1139
|
-
else
|
|
1140
|
-
this.setFrozen();
|
|
1141
1194
|
this.el.appendChild(container);
|
|
1142
1195
|
}
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
// Initialization
|
|
1146
|
-
this.tabulator.on("tableBuilding", () => this.tableInit())
|
|
1147
|
-
this.tabulator.on("tableBuilt", () => this.tableBuilt())
|
|
1148
|
-
|
|
1149
|
-
// For disabled pagination initialize on renderComplete
|
|
1150
|
-
if (this.model.pagination !== 'remote') {
|
|
1151
|
-
this.tabulator.on("renderComplete", () => {
|
|
1152
|
-
this.tabulator.off("renderComplete")
|
|
1153
|
-
// Apply styles after first render then unsubscribe
|
|
1154
|
-
this.setFrozen()
|
|
1155
|
-
this.setStyles()
|
|
1156
|
-
this.renderChildren()
|
|
1157
|
-
this.tabulator.modules.frozenColumns.active = true
|
|
1158
|
-
this.tabulator.modules.frozenColumns.layout()
|
|
1159
|
-
this.relayout()
|
|
1160
|
-
this._initializing = false
|
|
1161
|
-
})
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
// Disable frozenColumns during rendering (see https://github.com/olifolkerd/tabulator/issues/3530)
|
|
1165
|
-
this.tabulator.on("dataLoading", () => {
|
|
1166
|
-
this.tabulator.modules.frozenColumns.active = false
|
|
1167
|
-
})
|
|
1168
|
-
|
|
1169
|
-
// Rendering callbacks
|
|
1170
|
-
this.tabulator.on("selectableCheck", (row: any) => {
|
|
1171
|
-
const selectable = this.model.selectable_rows
|
|
1172
|
-
return (selectable == null) || (selectable.indexOf(row._row.data._index) >= 0)
|
|
1173
|
-
})
|
|
1174
|
-
this.tabulator.on("tooltips", (cell: any) => {
|
|
1175
|
-
return cell.getColumn().getField() + ": " + cell.getValue();
|
|
1176
|
-
})
|
|
1177
|
-
this.tabulator.on("scrollVertical", debounce(() => {
|
|
1178
|
-
this.setStyles()
|
|
1179
|
-
}, 50, false))
|
|
1180
|
-
this.tabulator.on("rowFormatter", (row: any) => this._render_row(row))
|
|
1181
|
-
|
|
1182
|
-
// Sync state with model
|
|
1183
|
-
this.tabulator.on("rowSelectionChanged", (data: any, rows: any) => this.rowSelectionChanged(data, rows))
|
|
1184
|
-
this.tabulator.on("rowClick", (e: any, row: any) => this.rowClicked(e, row))
|
|
1185
|
-
this.tabulator.on("cellEdited", (cell: any) => this.cellEdited(cell))
|
|
1186
|
-
this.tabulator.on("dataFiltering", () => {
|
|
1187
|
-
this.model.filters = this.tabulator.getHeaderFilters()
|
|
1188
|
-
})
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
tableInit(): void {
|
|
1192
|
-
// Patch the ajax request and page data parsing methods
|
|
1193
|
-
const ajax = this.tabulator.modules.ajax
|
|
1194
|
-
ajax.sendRequest = () => {
|
|
1195
|
-
return this.requestPage(ajax.params.page, ajax.params.sort)
|
|
1196
|
-
}
|
|
1197
|
-
this.tabulator.modules.page._parseRemoteData = (): boolean => {
|
|
1198
|
-
return false
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
tableBuilt(): void {
|
|
1204
|
-
this.setHidden()
|
|
1205
|
-
this.setSelection()
|
|
1206
|
-
|
|
1207
|
-
// For remote pagination initialize on tableBuilt
|
|
1208
|
-
if (this.model.pagination) {
|
|
1209
|
-
this.setMaxPage()
|
|
1210
|
-
this.tabulator.setPage(this.model.page)
|
|
1211
|
-
this.setStyles()
|
|
1212
|
-
this.renderChildren()
|
|
1213
|
-
this.tabulator.modules.frozenColumns.active = true
|
|
1214
|
-
this.tabulator.modules.frozenColumns.layout()
|
|
1215
|
-
setTimeout(() => this.relayout(), 10)
|
|
1216
|
-
this._initializing = false
|
|
1217
|
-
}
|
|
1218
|
-
}*/
|
|
1219
|
-
tableInit(view, tabulator) {
|
|
1196
|
+
tableInit() {
|
|
1197
|
+
this._building = true;
|
|
1220
1198
|
// Patch the ajax request and page data parsing methods
|
|
1221
|
-
const ajax = tabulator.modules.ajax;
|
|
1222
|
-
ajax.sendRequest = () => {
|
|
1223
|
-
return
|
|
1199
|
+
const ajax = this.tabulator.modules.ajax;
|
|
1200
|
+
ajax.sendRequest = (_url, params, _config) => {
|
|
1201
|
+
return this.requestPage(params.page, params.sort);
|
|
1224
1202
|
};
|
|
1225
|
-
tabulator.modules.page._parseRemoteData = () => {
|
|
1203
|
+
this.tabulator.modules.page._parseRemoteData = () => {
|
|
1204
|
+
return false;
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
init_callbacks() {
|
|
1208
|
+
// Initialization
|
|
1209
|
+
this.tabulator.on("tableBuilding", () => this.tableInit());
|
|
1210
|
+
this.tabulator.on("tableBuilt", () => this.tableBuilt());
|
|
1211
|
+
// Disable frozenColumns during rendering (see https://github.com/olifolkerd/tabulator/issues/3530)
|
|
1212
|
+
this.tabulator.on("dataLoading", () => {
|
|
1213
|
+
this.tabulator.modules.frozenColumns.active = false;
|
|
1214
|
+
});
|
|
1215
|
+
// Rendering callbacks
|
|
1216
|
+
this.tabulator.on("selectableCheck", (row) => {
|
|
1217
|
+
const selectable = this.model.selectable_rows;
|
|
1218
|
+
return (selectable == null) || (selectable.indexOf(row._row.data._index) >= 0);
|
|
1219
|
+
});
|
|
1220
|
+
this.tabulator.on("tooltips", (cell) => {
|
|
1221
|
+
return cell.getColumn().getField() + ": " + cell.getValue();
|
|
1222
|
+
});
|
|
1223
|
+
this.tabulator.on("scrollVertical", (0, debounce_1.debounce)(() => {
|
|
1224
|
+
this.setStyles();
|
|
1225
|
+
}, 50, false));
|
|
1226
|
+
this.tabulator.on("rowFormatter", (row) => this._render_row(row));
|
|
1227
|
+
// Sync state with model
|
|
1228
|
+
this.tabulator.on("rowSelectionChanged", (data, rows) => this.rowSelectionChanged(data, rows));
|
|
1229
|
+
this.tabulator.on("rowClick", (e, row) => this.rowClicked(e, row));
|
|
1230
|
+
this.tabulator.on("cellEdited", (cell) => this.cellEdited(cell));
|
|
1231
|
+
this.tabulator.on("dataFiltering", (filters) => {
|
|
1232
|
+
this.model.filters = filters;
|
|
1233
|
+
});
|
|
1234
|
+
this.tabulator.on("dataFiltered", (_, rows) => {
|
|
1235
|
+
if (this._initializing)
|
|
1236
|
+
return;
|
|
1237
|
+
// Ensure that after filtering empty scroll renders
|
|
1238
|
+
if (rows.length === 0)
|
|
1239
|
+
this.tabulator.rowManager.renderEmptyScroll();
|
|
1240
|
+
// Ensure that after filtering the page is updated
|
|
1241
|
+
this.updatePage(this.tabulator.getPage());
|
|
1242
|
+
});
|
|
1243
|
+
this.tabulator.on("pageLoaded", (pageno) => {
|
|
1244
|
+
this.updatePage(pageno);
|
|
1245
|
+
});
|
|
1246
|
+
this.tabulator.on("dataSorting", (sorters) => {
|
|
1247
|
+
const sorts = [];
|
|
1248
|
+
for (const s of sorters) {
|
|
1249
|
+
if (s.field !== '_index')
|
|
1250
|
+
sorts.push({ field: s.field, dir: s.dir });
|
|
1251
|
+
}
|
|
1252
|
+
if (this.model.pagination !== 'remote') {
|
|
1253
|
+
this._updating_sort = true;
|
|
1254
|
+
this.model.sorters = sorts;
|
|
1255
|
+
this._updating_sort = false;
|
|
1256
|
+
}
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
tableBuilt() {
|
|
1260
|
+
this._building = false;
|
|
1261
|
+
this.setHidden();
|
|
1262
|
+
this.setSelection();
|
|
1263
|
+
// For remote pagination initialize on tableBuilt
|
|
1264
|
+
this.setMaxPage();
|
|
1265
|
+
this.tabulator.setPage(this.model.page);
|
|
1266
|
+
this.setStyles();
|
|
1267
|
+
this.renderChildren();
|
|
1268
|
+
this.setGroupBy();
|
|
1269
|
+
this.setFrozen();
|
|
1270
|
+
this.tabulator.modules.frozenColumns.active = true;
|
|
1271
|
+
this.tabulator.modules.frozenColumns.layout();
|
|
1272
|
+
this._initializing = false;
|
|
1226
1273
|
}
|
|
1227
1274
|
relayout() {
|
|
1228
1275
|
if (this._relayouting)
|
|
1229
1276
|
return;
|
|
1230
1277
|
this._relayouting = true;
|
|
1231
|
-
this.tabulator.rowManager.
|
|
1278
|
+
if (this.tabulator.rowManager.renderer) {
|
|
1279
|
+
this.tabulator.rowManager.adjustTableSize();
|
|
1280
|
+
}
|
|
1232
1281
|
this.update_layout();
|
|
1233
1282
|
this.compute_layout();
|
|
1234
1283
|
if (this.root !== this) {
|
|
@@ -1290,33 +1339,10 @@
|
|
|
1290
1339
|
getConfiguration() {
|
|
1291
1340
|
// Only use selectable mode if explicitly requested otherwise manually handle selections
|
|
1292
1341
|
let selectable = this.model.select_mode === 'toggle' ? true : NaN;
|
|
1293
|
-
|
|
1294
|
-
let configuration = Object.assign(Object.assign({}, this.model.configuration), { index: "_index", nestedFieldSeparator: false, movableColumns: false, selectable: selectable, columns: this.getColumns(), dataSorting: (sorters) => {
|
|
1295
|
-
const sorts = [];
|
|
1296
|
-
for (const s of sorters) {
|
|
1297
|
-
if (s.field !== '_index')
|
|
1298
|
-
sorts.push({ field: s.field, dir: s.dir });
|
|
1299
|
-
}
|
|
1300
|
-
if (this.model.pagination !== 'remote') {
|
|
1301
|
-
this._updating_sort = true;
|
|
1302
|
-
this.model.sorters = sorts;
|
|
1303
|
-
this._updating_sort = false;
|
|
1304
|
-
}
|
|
1305
|
-
}, initialSort: this.sorters, layout: this.getLayout(), pagination: this.model.pagination, paginationSize: this.model.page_size, paginationInitialPage: 1, 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), selectableCheck: (row) => {
|
|
1306
|
-
const selectable = this.model.selectable_rows;
|
|
1307
|
-
return (selectable == null) || (selectable.indexOf(row._row.data._index) >= 0);
|
|
1308
|
-
}, tooltips: (cell) => {
|
|
1309
|
-
return cell.getColumn().getField() + ": " + cell.getValue();
|
|
1310
|
-
}, scrollVertical: (0, debounce_1.debounce)(() => {
|
|
1311
|
-
this._lastVerticalScrollbarTopPosition = this.tabulator.rowManager.element.scrollTop;
|
|
1312
|
-
this.setStyles();
|
|
1313
|
-
}, 50, false), rowFormatter: (row) => this._render_row(row), dataFiltering: () => {
|
|
1314
|
-
if (this.tabulator != null)
|
|
1315
|
-
this.model.filters = this.tabulator.getHeaderFilters();
|
|
1316
|
-
} });
|
|
1342
|
+
let configuration = Object.assign(Object.assign({}, this.model.configuration), { index: "_index", nestedFieldSeparator: false, movableColumns: false, selectable: selectable, columns: this.getColumns(), initialSort: this.sorters, layout: this.getLayout(), pagination: this.model.pagination != null, paginationMode: this.model.pagination, paginationSize: this.model.page_size, paginationInitialPage: 1 });
|
|
1317
1343
|
if (this.model.pagination === "remote") {
|
|
1318
1344
|
configuration['ajaxURL'] = "http://panel.pyviz.org";
|
|
1319
|
-
configuration['
|
|
1345
|
+
configuration['sortMode'] = "remote";
|
|
1320
1346
|
}
|
|
1321
1347
|
const cds = this.model.source;
|
|
1322
1348
|
let data;
|
|
@@ -1375,7 +1401,7 @@
|
|
|
1375
1401
|
}
|
|
1376
1402
|
_expand_render(cell) {
|
|
1377
1403
|
const index = cell._cell.row.data._index;
|
|
1378
|
-
const icon = this.model.expanded.indexOf(index) < 0 ? "
|
|
1404
|
+
const icon = this.model.expanded.indexOf(index) < 0 ? "►" : "▼";
|
|
1379
1405
|
return "<i>" + icon + "</i>";
|
|
1380
1406
|
}
|
|
1381
1407
|
_update_expand(cell) {
|
|
@@ -1394,8 +1420,6 @@
|
|
|
1394
1420
|
}
|
|
1395
1421
|
}
|
|
1396
1422
|
this.model.expanded = expanded;
|
|
1397
|
-
const icon = expanded.indexOf(index) < 0 ? "\u25ba" : "\u25bc";
|
|
1398
|
-
cell._cell.element.innerText = icon;
|
|
1399
1423
|
if (expanded.indexOf(index) < 0)
|
|
1400
1424
|
return;
|
|
1401
1425
|
let ready = true;
|
|
@@ -1492,6 +1516,9 @@
|
|
|
1492
1516
|
};
|
|
1493
1517
|
}
|
|
1494
1518
|
}
|
|
1519
|
+
if (tab_column.sorter == 'timestamp') {
|
|
1520
|
+
tab_column.sorter = timestampSorter;
|
|
1521
|
+
}
|
|
1495
1522
|
const editor = column.editor;
|
|
1496
1523
|
const ctype = editor.type;
|
|
1497
1524
|
if (tab_column.editor != null) {
|
|
@@ -1504,8 +1531,8 @@
|
|
|
1504
1531
|
}
|
|
1505
1532
|
else if (ctype === "StringEditor") {
|
|
1506
1533
|
if (editor.completions.length > 0) {
|
|
1507
|
-
tab_column.editor = "
|
|
1508
|
-
tab_column.editorParams = { values: editor.completions };
|
|
1534
|
+
tab_column.editor = "list";
|
|
1535
|
+
tab_column.editorParams = { values: editor.completions, autocomplete: true, listOnEmpty: true };
|
|
1509
1536
|
}
|
|
1510
1537
|
else
|
|
1511
1538
|
tab_column.editor = "input";
|
|
@@ -1523,7 +1550,7 @@
|
|
|
1523
1550
|
tab_column.editor = dateEditor;
|
|
1524
1551
|
}
|
|
1525
1552
|
else if (ctype === "SelectEditor") {
|
|
1526
|
-
tab_column.editor = "
|
|
1553
|
+
tab_column.editor = "list";
|
|
1527
1554
|
tab_column.editorParams = { values: editor.options };
|
|
1528
1555
|
}
|
|
1529
1556
|
else if (editor != null && editor.default_view != null) {
|
|
@@ -1544,7 +1571,7 @@
|
|
|
1544
1571
|
tab_column.headerSortStartingDir = sort.dir;
|
|
1545
1572
|
}
|
|
1546
1573
|
tab_column.cellClick = (_, cell) => {
|
|
1547
|
-
const index = cell.
|
|
1574
|
+
const index = cell.getData()._index;
|
|
1548
1575
|
this.model.trigger_event(new CellClickEvent(column.field, index));
|
|
1549
1576
|
};
|
|
1550
1577
|
if (config_columns == null)
|
|
@@ -1558,7 +1585,7 @@
|
|
|
1558
1585
|
formatter: button_formatter,
|
|
1559
1586
|
hozAlign: "center",
|
|
1560
1587
|
cellClick: (_, cell) => {
|
|
1561
|
-
const index = cell.
|
|
1588
|
+
const index = cell.getData()._index;
|
|
1562
1589
|
this.model.trigger_event(new CellClickEvent(col, index));
|
|
1563
1590
|
}
|
|
1564
1591
|
};
|
|
@@ -1625,6 +1652,13 @@
|
|
|
1625
1652
|
for (const row of this.model.frozen_rows)
|
|
1626
1653
|
this.tabulator.getRow(row).freeze();
|
|
1627
1654
|
}
|
|
1655
|
+
updatePage(pageno) {
|
|
1656
|
+
if (this.model.pagination === 'local' && this.model.page !== pageno) {
|
|
1657
|
+
this._updating_page = true;
|
|
1658
|
+
this.model.page = pageno;
|
|
1659
|
+
this._updating_page = false;
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1628
1662
|
setGroupBy() {
|
|
1629
1663
|
if (this.model.groupby.length == 0) {
|
|
1630
1664
|
this.tabulator.setGroupBy(false);
|
|
@@ -1638,6 +1672,8 @@
|
|
|
1638
1672
|
}
|
|
1639
1673
|
return groups.join(', ');
|
|
1640
1674
|
};
|
|
1675
|
+
// Need to call it twice, see https://github.com/olifolkerd/tabulator/issues/3666
|
|
1676
|
+
this.tabulator.setGroupBy(groupby);
|
|
1641
1677
|
this.tabulator.setGroupBy(groupby);
|
|
1642
1678
|
}
|
|
1643
1679
|
setSorters() {
|
|
@@ -1647,10 +1683,22 @@
|
|
|
1647
1683
|
}
|
|
1648
1684
|
setCSS() {
|
|
1649
1685
|
let theme;
|
|
1650
|
-
|
|
1686
|
+
let theme_;
|
|
1687
|
+
if (this.model.theme == "default") {
|
|
1651
1688
|
theme = "tabulator";
|
|
1652
|
-
|
|
1653
|
-
|
|
1689
|
+
}
|
|
1690
|
+
else {
|
|
1691
|
+
if (this.model.theme == "bootstrap") {
|
|
1692
|
+
theme_ = "bootstrap3";
|
|
1693
|
+
}
|
|
1694
|
+
else if (this.model.theme == "semantic-ui") {
|
|
1695
|
+
theme_ = "semanticui";
|
|
1696
|
+
}
|
|
1697
|
+
else {
|
|
1698
|
+
theme_ = this.model.theme;
|
|
1699
|
+
}
|
|
1700
|
+
theme = "tabulator_" + theme_;
|
|
1701
|
+
}
|
|
1654
1702
|
const css = this.model.theme_url + theme + ".min.css";
|
|
1655
1703
|
let old_node = null;
|
|
1656
1704
|
const links = document.getElementsByTagName("link");
|
|
@@ -1678,8 +1726,10 @@
|
|
|
1678
1726
|
css_node.media = 'screen';
|
|
1679
1727
|
css_node.href = css;
|
|
1680
1728
|
css_node.onload = () => {
|
|
1681
|
-
this.
|
|
1682
|
-
|
|
1729
|
+
if (!this._building) {
|
|
1730
|
+
this.render();
|
|
1731
|
+
this.relayout();
|
|
1732
|
+
}
|
|
1683
1733
|
};
|
|
1684
1734
|
parent_node.appendChild(css_node);
|
|
1685
1735
|
return true;
|
|
@@ -1820,7 +1870,7 @@
|
|
|
1820
1870
|
}
|
|
1821
1871
|
cellEdited(cell) {
|
|
1822
1872
|
const field = cell._cell.column.field;
|
|
1823
|
-
const index = cell.
|
|
1873
|
+
const index = cell.getData()._index;
|
|
1824
1874
|
const value = cell._cell.value;
|
|
1825
1875
|
this._tabulator_cell_updating = true;
|
|
1826
1876
|
comm_manager_1.comm_settings.debounce = false;
|
|
@@ -1832,7 +1882,6 @@
|
|
|
1832
1882
|
this._tabulator_cell_updating = false;
|
|
1833
1883
|
}
|
|
1834
1884
|
this.model.trigger_event(new TableEditEvent(field, index));
|
|
1835
|
-
this.setSorters();
|
|
1836
1885
|
this.tabulator.scrollToRow(index, "top", false);
|
|
1837
1886
|
}
|
|
1838
1887
|
}
|
|
@@ -1873,7 +1922,7 @@
|
|
|
1873
1922
|
sorters: [Array(Any), []],
|
|
1874
1923
|
styles: [Any, {}],
|
|
1875
1924
|
theme: [String, "simple"],
|
|
1876
|
-
theme_url: [String, "https://unpkg.com/tabulator-tables@
|
|
1925
|
+
theme_url: [String, "https://unpkg.com/tabulator-tables@5.3.2/dist/css/"]
|
|
1877
1926
|
}));
|
|
1878
1927
|
}
|
|
1879
1928
|
}
|
|
@@ -1987,7 +2036,7 @@
|
|
|
1987
2036
|
}
|
|
1988
2037
|
exports.dict_to_records = dict_to_records;
|
|
1989
2038
|
},
|
|
1990
|
-
"
|
|
2039
|
+
"297274885a": /* models/datetime_picker.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
1991
2040
|
__esModule();
|
|
1992
2041
|
const tslib_1 = require("tslib");
|
|
1993
2042
|
const flatpickr_1 = (0, tslib_1.__importDefault)(require("50d3473f3f") /* flatpickr */);
|
|
@@ -2035,7 +2084,6 @@
|
|
|
2035
2084
|
return [...super.styles(), flatpickr_css_1.default];
|
|
2036
2085
|
}
|
|
2037
2086
|
render() {
|
|
2038
|
-
var _a, _b;
|
|
2039
2087
|
if (this._picker != null)
|
|
2040
2088
|
return;
|
|
2041
2089
|
super.render();
|
|
@@ -2043,8 +2091,8 @@
|
|
|
2043
2091
|
this.group_el.appendChild(this.input_el);
|
|
2044
2092
|
this._picker = (0, flatpickr_1.default)(this.input_el, {
|
|
2045
2093
|
defaultDate: this.model.value,
|
|
2046
|
-
minDate:
|
|
2047
|
-
maxDate:
|
|
2094
|
+
minDate: this.model.min_date ? new Date(this.model.min_date) : undefined,
|
|
2095
|
+
maxDate: this.model.max_date ? new Date(this.model.max_date) : undefined,
|
|
2048
2096
|
inline: this.model.inline,
|
|
2049
2097
|
position: this.model.position,
|
|
2050
2098
|
disable: _convert_date_list(this.model.disabled_dates),
|
|
@@ -2056,6 +2104,8 @@
|
|
|
2056
2104
|
mode: this.model.mode,
|
|
2057
2105
|
onClose: (selected_dates, date_string, instance) => this._on_close(selected_dates, date_string, instance),
|
|
2058
2106
|
});
|
|
2107
|
+
this._picker.maxDateHasTime = true;
|
|
2108
|
+
this._picker.minDateHasTime = true;
|
|
2059
2109
|
}
|
|
2060
2110
|
_on_close(_selected_dates, date_string, _instance) {
|
|
2061
2111
|
if (this.model.mode == "range" && !date_string.includes("to"))
|
|
@@ -5957,7 +6007,7 @@
|
|
|
5957
6007
|
const markup_1 = require("@bokehjs/models/widgets/markup");
|
|
5958
6008
|
const bokeh_events_1 = require("@bokehjs/core/bokeh_events");
|
|
5959
6009
|
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
5960
|
-
const event_to_object_1 = require("
|
|
6010
|
+
const event_to_object_1 = require("d92f7d4d2b") /* ./event-to-object */;
|
|
5961
6011
|
class DOMEvent extends bokeh_events_1.ModelEvent {
|
|
5962
6012
|
constructor(node, data) {
|
|
5963
6013
|
super();
|
|
@@ -6088,7 +6138,7 @@
|
|
|
6088
6138
|
HTML.__module__ = "panel.models.markup";
|
|
6089
6139
|
HTML.init_HTML();
|
|
6090
6140
|
},
|
|
6091
|
-
"
|
|
6141
|
+
"d92f7d4d2b": /* models/event-to-object.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
6092
6142
|
__esModule();
|
|
6093
6143
|
/*
|
|
6094
6144
|
The MIT License (MIT)
|
|
@@ -6115,6 +6165,10 @@
|
|
|
6115
6165
|
*/
|
|
6116
6166
|
function serializeEvent(event) {
|
|
6117
6167
|
const data = {};
|
|
6168
|
+
// support for CustomEvents: the whole `detail` object is serialized
|
|
6169
|
+
if (event.detail !== undefined) {
|
|
6170
|
+
Object.assign(data, { detail: JSON.parse(JSON.stringify(event.detail)) });
|
|
6171
|
+
}
|
|
6118
6172
|
if (event.type in eventTransforms) {
|
|
6119
6173
|
Object.assign(data, eventTransforms[event.type](event));
|
|
6120
6174
|
}
|
|
@@ -6332,7 +6386,7 @@
|
|
|
6332
6386
|
const fast_json_patch_1 = require("cbecfde9cd") /* fast-json-patch */;
|
|
6333
6387
|
const html_box_1 = require("@bokehjs/models/layouts/html_box");
|
|
6334
6388
|
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
6335
|
-
const event_to_object_1 = require("
|
|
6389
|
+
const event_to_object_1 = require("d92f7d4d2b") /* ./event-to-object */;
|
|
6336
6390
|
const LayoutConfigContext = (0, preact_1.createContext)({});
|
|
6337
6391
|
function mountLayout(mountElement, saveUpdateHook, sendEvent, importSourceUrl) {
|
|
6338
6392
|
(0, preact_1.render)((0, preact_2.html) `
|
|
@@ -8669,7 +8723,7 @@
|
|
|
8669
8723
|
Perspective.__module__ = "panel.models.perspective";
|
|
8670
8724
|
Perspective.init_Perspective();
|
|
8671
8725
|
},
|
|
8672
|
-
"
|
|
8726
|
+
"588a5ae70d": /* models/player.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8673
8727
|
__esModule();
|
|
8674
8728
|
const kinds_1 = require("@bokehjs/core/kinds");
|
|
8675
8729
|
const dom_1 = require("@bokehjs/core/dom");
|
|
@@ -8736,7 +8790,12 @@
|
|
|
8736
8790
|
this.sliderEl.value = String(this.model.value);
|
|
8737
8791
|
this.sliderEl.min = String(this.model.start);
|
|
8738
8792
|
this.sliderEl.max = String(this.model.end);
|
|
8739
|
-
this.sliderEl.
|
|
8793
|
+
this.sliderEl.addEventListener('input', (ev) => {
|
|
8794
|
+
this.set_frame(parseInt(ev.target.value), false);
|
|
8795
|
+
});
|
|
8796
|
+
this.sliderEl.addEventListener('change', (ev) => {
|
|
8797
|
+
this.set_frame(parseInt(ev.target.value));
|
|
8798
|
+
});
|
|
8740
8799
|
// Buttons
|
|
8741
8800
|
const button_div = (0, dom_1.div)();
|
|
8742
8801
|
this.buttonEl = button_div;
|
|
@@ -8845,9 +8904,10 @@
|
|
|
8845
8904
|
this.toggle_disable();
|
|
8846
8905
|
this.el.appendChild(this.groupEl);
|
|
8847
8906
|
}
|
|
8848
|
-
set_frame(frame) {
|
|
8849
|
-
|
|
8850
|
-
|
|
8907
|
+
set_frame(frame, throttled = true) {
|
|
8908
|
+
this.model.value = frame;
|
|
8909
|
+
if (throttled)
|
|
8910
|
+
this.model.value_throttled = frame;
|
|
8851
8911
|
if (this.sliderEl.value != String(frame))
|
|
8852
8912
|
this.sliderEl.value = String(frame);
|
|
8853
8913
|
}
|
|
@@ -8988,6 +9048,7 @@
|
|
|
8988
9048
|
step: [Int, 1],
|
|
8989
9049
|
loop_policy: [exports.LoopPolicy, "once"],
|
|
8990
9050
|
value: [Int, 0],
|
|
9051
|
+
value_throttled: [Int, 0],
|
|
8991
9052
|
show_loop_controls: [Boolean, true],
|
|
8992
9053
|
}));
|
|
8993
9054
|
this.override({ width: 400 });
|
|
@@ -9588,7 +9649,7 @@
|
|
|
9588
9649
|
QuillInput.__module__ = "panel.models.quill";
|
|
9589
9650
|
QuillInput.init_QuillInput();
|
|
9590
9651
|
},
|
|
9591
|
-
"
|
|
9652
|
+
"ad426de39c": /* models/reactive_html.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
9592
9653
|
__esModule();
|
|
9593
9654
|
const preact_1 = require("6f11f2ef27") /* preact */;
|
|
9594
9655
|
const hooks_1 = require("4c02a9b43f") /* preact/hooks */;
|
|
@@ -9599,7 +9660,7 @@
|
|
|
9599
9660
|
const dom_1 = require("@bokehjs/core/dom");
|
|
9600
9661
|
const color_1 = require("@bokehjs/core/util/color");
|
|
9601
9662
|
const data_1 = require("7f7d9e0c6b") /* ./data */;
|
|
9602
|
-
const event_to_object_1 = require("
|
|
9663
|
+
const event_to_object_1 = require("d92f7d4d2b") /* ./event-to-object */;
|
|
9603
9664
|
const html_1 = require("3d7593ca5a") /* ./html */;
|
|
9604
9665
|
const layout_1 = require("80a6464b1f") /* ./layout */;
|
|
9605
9666
|
function serialize_attrs(attrs) {
|
|
@@ -9954,7 +10015,17 @@
|
|
|
9954
10015
|
else {
|
|
9955
10016
|
definition = `
|
|
9956
10017
|
const ${method} = (event) => {
|
|
9957
|
-
|
|
10018
|
+
let elname = "${elname}"
|
|
10019
|
+
if (RegExp("\{\{.*loop\.index.*\}\}").test(elname)) {
|
|
10020
|
+
const pattern = RegExp(elname.replace(/\{\{(.+?)\}\}/g, String.fromCharCode(92) + "d+"))
|
|
10021
|
+
for (const p of event.path) {
|
|
10022
|
+
if (pattern.exec(p.id) != null) {
|
|
10023
|
+
elname = p.id.split("-").slice(null, -1).join("-")
|
|
10024
|
+
break
|
|
10025
|
+
}
|
|
10026
|
+
}
|
|
10027
|
+
}
|
|
10028
|
+
view._send_event(elname, "${cb}", event)
|
|
9958
10029
|
}
|
|
9959
10030
|
`;
|
|
9960
10031
|
}
|
|
@@ -19773,5 +19844,5 @@
|
|
|
19773
19844
|
}
|
|
19774
19845
|
exports.initialize_fullscreen_render = initialize_fullscreen_render;
|
|
19775
19846
|
},
|
|
19776
|
-
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"eed113197d","models/ace":"2e12ebdb23","models/layout":"80a6464b1f","models/audio":"33955cfa6f","models/card":"0972f6e77b","models/comm_manager":"
|
|
19847
|
+
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"eed113197d","models/ace":"2e12ebdb23","models/layout":"80a6464b1f","models/audio":"33955cfa6f","models/card":"0972f6e77b","models/comm_manager":"754fbb1f55","models/customselect":"e258e515be","models/tabulator":"6ab332f75c","models/data":"7f7d9e0c6b","models/datetime_picker":"297274885a","models/deckgl":"0155f7af4d","models/tooltips":"6e04fbe567","models/echarts":"9d046c4720","models/html":"3d7593ca5a","models/event-to-object":"d92f7d4d2b","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":"588a5ae70d","models/plotly":"42de27e56c","models/util":"990b5dd5c7","models/progress":"979633320f","models/quill":"d51a79a0a3","models/reactive_html":"ad426de39c","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"}, {});});
|
|
19777
19848
|
//# sourceMappingURL=panel.js.map
|