@holoviz/panel 1.4.1 → 1.4.2-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/notificationarea/panel/1.4.2-rc.2/dist/bundled/font-awesome/css/all.min.css +2 -0
- package/dist/bundled/panel/1.4.2-rc.2/dist/bundled/bootstrap5/css/bootstrap.min.css +2 -0
- package/dist/bundled/panel/1.4.2-rc.2/dist/bundled/bootstrap5/js/bootstrap.bundle.min.js +2 -0
- package/dist/bundled/panel/1.4.2-rc.2/dist/bundled/font-awesome/css/all.min.css +2 -0
- package/dist/bundled/panel/1.4.2-rc.2/dist/bundled/jquery/jquery.slim.min.js +2 -0
- package/dist/bundled/plotlyplot/panel/1.4.2-rc.2/dist/bundled/jquery/jquery.slim.min.js +2 -0
- package/dist/bundled/plotlyplot/plotly-2.31.1.min.js +8 -0
- package/dist/bundled/theme/fast.css +0 -21
- package/dist/lib/models/chatarea_input.d.ts +1 -0
- package/dist/lib/models/chatarea_input.js +12 -5
- package/dist/lib/models/chatarea_input.js.map +1 -1
- package/dist/lib/models/perspective.d.ts +2 -1
- package/dist/lib/models/perspective.js +22 -10
- package/dist/lib/models/perspective.js.map +1 -1
- package/dist/lib/models/plotly.d.ts +9 -4
- package/dist/lib/models/plotly.js +50 -21
- package/dist/lib/models/plotly.js.map +1 -1
- package/dist/panel.js +95 -46
- package/dist/panel.js.map +1 -1
- package/dist/panel.json +1 -1
- package/dist/panel.min.js +5 -5
- package/package.json +2 -2
- package/dist/bundled/notificationarea/panel/1.4.1/dist/bundled/font-awesome/css/all.min.css +0 -2
- package/dist/bundled/panel/1.4.1/dist/bundled/bootstrap5/css/bootstrap.min.css +0 -2
- package/dist/bundled/panel/1.4.1/dist/bundled/bootstrap5/js/bootstrap.bundle.min.js +0 -2
- package/dist/bundled/panel/1.4.1/dist/bundled/font-awesome/css/all.min.css +0 -2
- package/dist/bundled/panel/1.4.1/dist/bundled/jquery/jquery.slim.min.js +0 -2
- package/dist/bundled/plotlyplot/panel/1.4.1/dist/bundled/jquery/jquery.slim.min.js +0 -2
- package/dist/bundled/plotlyplot/plotly-2.25.2.min.js +0 -8
package/dist/panel.js
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
__esExport("Card", card_1.Card);
|
|
70
70
|
var checkbox_button_group_1 = require("51fbe9e2d0") /* ./checkbox_button_group */;
|
|
71
71
|
__esExport("CheckboxButtonGroup", checkbox_button_group_1.CheckboxButtonGroup);
|
|
72
|
-
var chatarea_input_1 = require("
|
|
72
|
+
var chatarea_input_1 = require("27a077673d") /* ./chatarea_input */;
|
|
73
73
|
__esExport("ChatAreaInput", chatarea_input_1.ChatAreaInput);
|
|
74
74
|
var column_1 = require("aab20b9d6a") /* ./column */;
|
|
75
75
|
__esExport("Column", column_1.Column);
|
|
@@ -105,11 +105,11 @@
|
|
|
105
105
|
__esExport("MathJax", mathjax_1.MathJax);
|
|
106
106
|
var pdf_1 = require("cf33f23f5c") /* ./pdf */;
|
|
107
107
|
__esExport("PDF", pdf_1.PDF);
|
|
108
|
-
var perspective_1 = require("
|
|
108
|
+
var perspective_1 = require("8b1673a40b") /* ./perspective */;
|
|
109
109
|
__esExport("Perspective", perspective_1.Perspective);
|
|
110
110
|
var player_1 = require("f06104d237") /* ./player */;
|
|
111
111
|
__esExport("Player", player_1.Player);
|
|
112
|
-
var plotly_1 = require("
|
|
112
|
+
var plotly_1 = require("6f2064dc74") /* ./plotly */;
|
|
113
113
|
__esExport("PlotlyPlot", plotly_1.PlotlyPlot);
|
|
114
114
|
var progress_1 = require("aded75e266") /* ./progress */;
|
|
115
115
|
__esExport("Progress", progress_1.Progress);
|
|
@@ -1257,7 +1257,7 @@
|
|
|
1257
1257
|
}));
|
|
1258
1258
|
})();
|
|
1259
1259
|
},
|
|
1260
|
-
"
|
|
1260
|
+
"27a077673d": /* models/chatarea_input.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
1261
1261
|
var _a, _b;
|
|
1262
1262
|
__esModule();
|
|
1263
1263
|
const textarea_input_1 = require("b7d595d74a") /* ./textarea_input */;
|
|
@@ -1286,12 +1286,18 @@
|
|
|
1286
1286
|
render() {
|
|
1287
1287
|
super.render();
|
|
1288
1288
|
this.el.addEventListener("keydown", (event) => {
|
|
1289
|
-
if (event.key === "Enter"
|
|
1290
|
-
if (!this.model.
|
|
1291
|
-
|
|
1292
|
-
|
|
1289
|
+
if (event.key === "Enter") {
|
|
1290
|
+
if (!event.shiftKey && (event.ctrlKey != this.model.enter_sends)) {
|
|
1291
|
+
if (!this.model.disabled_enter) {
|
|
1292
|
+
this.model.trigger_event(new ChatMessageEvent(this.model.value_input));
|
|
1293
|
+
this.model.value_input = "";
|
|
1294
|
+
}
|
|
1295
|
+
event.preventDefault();
|
|
1296
|
+
}
|
|
1297
|
+
else if (event.ctrlKey && this.model.enter_sends) {
|
|
1298
|
+
this.model.value_input += "\n";
|
|
1299
|
+
event.preventDefault();
|
|
1293
1300
|
}
|
|
1294
|
-
event.preventDefault();
|
|
1295
1301
|
}
|
|
1296
1302
|
});
|
|
1297
1303
|
}
|
|
@@ -1312,6 +1318,7 @@
|
|
|
1312
1318
|
_b.define(({ Bool }) => {
|
|
1313
1319
|
return {
|
|
1314
1320
|
disabled_enter: [Bool, false],
|
|
1321
|
+
enter_sends: [Bool, true],
|
|
1315
1322
|
};
|
|
1316
1323
|
});
|
|
1317
1324
|
})();
|
|
@@ -8391,7 +8398,7 @@
|
|
|
8391
8398
|
}));
|
|
8392
8399
|
})();
|
|
8393
8400
|
},
|
|
8394
|
-
"
|
|
8401
|
+
"8b1673a40b": /* models/perspective.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8395
8402
|
var _a, _b;
|
|
8396
8403
|
__esModule();
|
|
8397
8404
|
const tslib_1 = require("tslib");
|
|
@@ -8455,14 +8462,16 @@
|
|
|
8455
8462
|
this._updating = false;
|
|
8456
8463
|
this._config_listener = null;
|
|
8457
8464
|
this._current_config = null;
|
|
8465
|
+
this._current_plugin = null;
|
|
8458
8466
|
this._loaded = false;
|
|
8467
|
+
this._plugin_configs = new Map();
|
|
8459
8468
|
}
|
|
8460
8469
|
connect_signals() {
|
|
8461
8470
|
super.connect_signals();
|
|
8462
8471
|
this.connect(this.model.source.properties.data.change, () => this.setData());
|
|
8463
8472
|
this.connect(this.model.source.streaming, () => this.stream());
|
|
8464
8473
|
this.connect(this.model.source.patching, () => this.patch());
|
|
8465
|
-
const { schema,
|
|
8474
|
+
const { schema, columns, expressions, split_by, group_by, aggregates, filters, sort, plugin, selectable, editable, theme, title, settings, } = this.model.properties;
|
|
8466
8475
|
const not_updating = (fn) => {
|
|
8467
8476
|
return () => {
|
|
8468
8477
|
if (this._updating) {
|
|
@@ -8478,9 +8487,6 @@
|
|
|
8478
8487
|
this.perspective_element.load(this.table);
|
|
8479
8488
|
});
|
|
8480
8489
|
});
|
|
8481
|
-
this.on_change(toggle_config, () => {
|
|
8482
|
-
this.perspective_element.toggleConfig();
|
|
8483
|
-
});
|
|
8484
8490
|
this.on_change(columns, not_updating(() => {
|
|
8485
8491
|
this.perspective_element.restore({ columns: this.model.columns });
|
|
8486
8492
|
}));
|
|
@@ -8509,7 +8515,7 @@
|
|
|
8509
8515
|
this.perspective_element.restore({ sort: this.model.sort });
|
|
8510
8516
|
}));
|
|
8511
8517
|
this.on_change(plugin, not_updating(() => {
|
|
8512
|
-
this.perspective_element.restore({ plugin: PLUGINS[this.model.plugin] });
|
|
8518
|
+
this.perspective_element.restore({ plugin: PLUGINS[this.model.plugin], ...settings });
|
|
8513
8519
|
}));
|
|
8514
8520
|
this.on_change(selectable, not_updating(() => {
|
|
8515
8521
|
this.perspective_element.restore({ plugin_config: { ...this._current_config, selectable: this.model.selectable } });
|
|
@@ -8544,12 +8550,13 @@
|
|
|
8544
8550
|
zIndex: 0,
|
|
8545
8551
|
},
|
|
8546
8552
|
});
|
|
8553
|
+
this._current_plugin = this.model.plugin;
|
|
8547
8554
|
container.innerHTML = "<perspective-viewer style='height:100%; width:100%;'></perspective-viewer>";
|
|
8548
8555
|
this.perspective_element = container.children[0];
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
}
|
|
8556
|
+
const themesArray = Object.values(THEMES);
|
|
8557
|
+
const filteredThemes = themesArray.filter(t => t !== this.model.theme);
|
|
8558
|
+
const orderedThemes = [this.model.theme, ...filteredThemes];
|
|
8559
|
+
this.perspective_element.resetThemes(orderedThemes).catch(() => { });
|
|
8553
8560
|
(0, layout_1.set_size)(container, this.model);
|
|
8554
8561
|
this.shadow_el.appendChild(container);
|
|
8555
8562
|
this.worker.table(this.model.schema).then((table) => {
|
|
@@ -8592,7 +8599,20 @@
|
|
|
8592
8599
|
return true;
|
|
8593
8600
|
}
|
|
8594
8601
|
this.perspective_element.save().then((config) => {
|
|
8602
|
+
if (config.plugin !== this._current_plugin) {
|
|
8603
|
+
this._plugin_configs.set(this._current_plugin, {
|
|
8604
|
+
columns: this._current_config.columns,
|
|
8605
|
+
columns_config: this._current_config.columns_config,
|
|
8606
|
+
plugin_config: this._current_config.plugin_config,
|
|
8607
|
+
});
|
|
8608
|
+
if (this._plugin_configs.has(config.plugin)) {
|
|
8609
|
+
const overrides = this._plugin_configs.get(config.plugin);
|
|
8610
|
+
this.perspective_element.restore(overrides);
|
|
8611
|
+
config = { ...config, ...overrides };
|
|
8612
|
+
}
|
|
8613
|
+
}
|
|
8595
8614
|
this._current_config = config;
|
|
8615
|
+
this._current_plugin = config.plugin;
|
|
8596
8616
|
const props = {};
|
|
8597
8617
|
for (let option in config) {
|
|
8598
8618
|
let value = config[option];
|
|
@@ -8676,7 +8696,6 @@
|
|
|
8676
8696
|
selectable: [Bool, true],
|
|
8677
8697
|
settings: [Bool, true],
|
|
8678
8698
|
schema: [Any, {}],
|
|
8679
|
-
toggle_config: [Bool, true],
|
|
8680
8699
|
sort: [Nullable(List(List(Str))), null],
|
|
8681
8700
|
source: [Ref(column_data_source_1.ColumnDataSource)],
|
|
8682
8701
|
theme: [Str, "pro"],
|
|
@@ -9100,10 +9119,11 @@
|
|
|
9100
9119
|
_a.override({ width: 400 });
|
|
9101
9120
|
})();
|
|
9102
9121
|
},
|
|
9103
|
-
"
|
|
9104
|
-
var _a;
|
|
9122
|
+
"6f2064dc74": /* models/plotly.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
9123
|
+
var _a, _b;
|
|
9105
9124
|
__esModule();
|
|
9106
9125
|
const tslib_1 = require("tslib");
|
|
9126
|
+
const bokeh_events_1 = require("@bokehjs/core/bokeh_events");
|
|
9107
9127
|
const dom_1 = require("@bokehjs/core/dom");
|
|
9108
9128
|
const types_1 = require("@bokehjs/core/util/types");
|
|
9109
9129
|
const object_1 = require("@bokehjs/core/util/object");
|
|
@@ -9113,17 +9133,37 @@
|
|
|
9113
9133
|
const util_1 = require("27e2a99e99") /* ./util */;
|
|
9114
9134
|
const layout_1 = require("73d6aee8f5") /* ./layout */;
|
|
9115
9135
|
const plotly_css_1 = tslib_1.__importDefault(require("ce7c8e2a4f") /* ../styles/models/plotly.css */);
|
|
9136
|
+
class PlotlyEvent extends bokeh_events_1.ModelEvent {
|
|
9137
|
+
constructor(data) {
|
|
9138
|
+
super();
|
|
9139
|
+
this.data = data;
|
|
9140
|
+
}
|
|
9141
|
+
get event_values() {
|
|
9142
|
+
return { model: this.origin, data: this.data };
|
|
9143
|
+
}
|
|
9144
|
+
}
|
|
9145
|
+
exports.PlotlyEvent = PlotlyEvent;
|
|
9146
|
+
_a = PlotlyEvent;
|
|
9147
|
+
PlotlyEvent.__name__ = "PlotlyEvent";
|
|
9148
|
+
(() => {
|
|
9149
|
+
_a.prototype.event_name = "plotly_event";
|
|
9150
|
+
})();
|
|
9116
9151
|
function convertUndefined(obj) {
|
|
9117
|
-
|
|
9118
|
-
.
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9152
|
+
if ((0, types_1.isArray)(obj)) {
|
|
9153
|
+
return obj.map(convertUndefined);
|
|
9154
|
+
}
|
|
9155
|
+
else if ((0, types_1.isPlainObject)(obj)) {
|
|
9156
|
+
Object
|
|
9157
|
+
.entries(obj)
|
|
9158
|
+
.forEach(([key, value]) => {
|
|
9159
|
+
if ((0, types_1.isPlainObject)(value) || (0, types_1.isArray)(value)) {
|
|
9160
|
+
convertUndefined(value);
|
|
9161
|
+
}
|
|
9162
|
+
else if (value === undefined) {
|
|
9163
|
+
obj[key] = null;
|
|
9164
|
+
}
|
|
9165
|
+
});
|
|
9166
|
+
}
|
|
9127
9167
|
return obj;
|
|
9128
9168
|
}
|
|
9129
9169
|
const filterEventData = (gd, eventData, event) => {
|
|
@@ -9203,6 +9243,7 @@
|
|
|
9203
9243
|
this._rendered = false;
|
|
9204
9244
|
this._reacting = false;
|
|
9205
9245
|
this._relayouting = false;
|
|
9246
|
+
this._hoverdata = null;
|
|
9206
9247
|
this._end_relayouting = (0, debounce_1.debounce)(() => {
|
|
9207
9248
|
this._relayouting = false;
|
|
9208
9249
|
}, 2000, false);
|
|
@@ -9327,29 +9368,41 @@
|
|
|
9327
9368
|
});
|
|
9328
9369
|
// - plotly_click
|
|
9329
9370
|
this.container.on("plotly_click", (eventData) => {
|
|
9330
|
-
|
|
9371
|
+
const data = filterEventData(this.container, eventData, "click");
|
|
9372
|
+
this.model.trigger_event(new PlotlyEvent({ type: "click", data }));
|
|
9331
9373
|
});
|
|
9332
9374
|
// - plotly_hover
|
|
9333
9375
|
this.container.on("plotly_hover", (eventData) => {
|
|
9334
|
-
|
|
9376
|
+
const data = filterEventData(this.container, eventData, "hover");
|
|
9377
|
+
this.model.trigger_event(new PlotlyEvent({ type: "hover", data }));
|
|
9378
|
+
// Override hoverdata to ensure click event has context
|
|
9379
|
+
// see https://github.com/holoviz/panel/pull/6753
|
|
9380
|
+
this._hoverdata = this.container._hoverdata = eventData.points;
|
|
9335
9381
|
});
|
|
9336
9382
|
// - plotly_selected
|
|
9337
9383
|
this.container.on("plotly_selected", (eventData) => {
|
|
9338
|
-
|
|
9384
|
+
const data = filterEventData(this.container, eventData, "selected");
|
|
9385
|
+
this.model.trigger_event(new PlotlyEvent({ type: "selected", data }));
|
|
9339
9386
|
});
|
|
9340
9387
|
// - plotly_clickannotation
|
|
9341
9388
|
this.container.on("plotly_clickannotation", (eventData) => {
|
|
9342
9389
|
delete eventData.event;
|
|
9343
9390
|
delete eventData.fullAnnotation;
|
|
9344
|
-
this.model.
|
|
9391
|
+
this.model.trigger_event(new PlotlyEvent({ type: "clickannotation", data: eventData }));
|
|
9345
9392
|
});
|
|
9346
9393
|
// - plotly_deselect
|
|
9347
9394
|
this.container.on("plotly_deselect", () => {
|
|
9348
|
-
this.model.
|
|
9395
|
+
this.model.trigger_event(new PlotlyEvent({ type: "selected", data: null }));
|
|
9349
9396
|
});
|
|
9350
9397
|
// - plotly_unhover
|
|
9351
9398
|
this.container.on("plotly_unhover", () => {
|
|
9352
|
-
|
|
9399
|
+
// Override hoverdata to ensure click event has context
|
|
9400
|
+
this.container._hoverdata = this._hoverdata;
|
|
9401
|
+
this.model.trigger_event(new PlotlyEvent({ type: "hover", data: null }));
|
|
9402
|
+
setTimeout(() => {
|
|
9403
|
+
// Remove hoverdata once events have been processed
|
|
9404
|
+
delete this.container._hoverdata;
|
|
9405
|
+
}, 0);
|
|
9353
9406
|
});
|
|
9354
9407
|
}
|
|
9355
9408
|
async plot(new_plot = false) {
|
|
@@ -9471,12 +9524,12 @@
|
|
|
9471
9524
|
}
|
|
9472
9525
|
}
|
|
9473
9526
|
exports.PlotlyPlot = PlotlyPlot;
|
|
9474
|
-
|
|
9527
|
+
_b = PlotlyPlot;
|
|
9475
9528
|
PlotlyPlot.__name__ = "PlotlyPlot";
|
|
9476
9529
|
PlotlyPlot.__module__ = "panel.models.plotly";
|
|
9477
9530
|
(() => {
|
|
9478
|
-
|
|
9479
|
-
|
|
9531
|
+
_b.prototype.default_view = PlotlyPlotView;
|
|
9532
|
+
_b.define(({ List, Any, Nullable, Float, Ref, Str }) => ({
|
|
9480
9533
|
data: [List(Any), []],
|
|
9481
9534
|
layout: [Any, {}],
|
|
9482
9535
|
config: [Any, {}],
|
|
@@ -9486,10 +9539,6 @@
|
|
|
9486
9539
|
restyle: [Nullable(Any), {}],
|
|
9487
9540
|
relayout_data: [Any, {}],
|
|
9488
9541
|
restyle_data: [List(Any), []],
|
|
9489
|
-
click_data: [Any, {}],
|
|
9490
|
-
hover_data: [Any, {}],
|
|
9491
|
-
clickannotation_data: [Any, {}],
|
|
9492
|
-
selected_data: [Any, {}],
|
|
9493
9542
|
viewport: [Any, {}],
|
|
9494
9543
|
viewport_update_policy: [Str, "mouseup"],
|
|
9495
9544
|
viewport_update_throttle: [Float, 200],
|
|
@@ -20959,5 +21008,5 @@
|
|
|
20959
21008
|
}
|
|
20960
21009
|
exports.initialize_fullscreen_render = initialize_fullscreen_render;
|
|
20961
21010
|
},
|
|
20962
|
-
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"38670592ce","models/ace":"c780fc99fd","models/layout":"73d6aee8f5","models/audio":"fd59c985b3","models/browser":"85211a0a5b","models/button":"1db93211cd","models/button_icon":"1738ddeb3a","models/icon":"17193475a8","models/card":"aaa0c51c8d","models/column":"aab20b9d6a","styles/models/card.css":"dfbedd1d49","models/checkbox_button_group":"51fbe9e2d0","models/chatarea_input":"
|
|
21011
|
+
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"38670592ce","models/ace":"c780fc99fd","models/layout":"73d6aee8f5","models/audio":"fd59c985b3","models/browser":"85211a0a5b","models/button":"1db93211cd","models/button_icon":"1738ddeb3a","models/icon":"17193475a8","models/card":"aaa0c51c8d","models/column":"aab20b9d6a","styles/models/card.css":"dfbedd1d49","models/checkbox_button_group":"51fbe9e2d0","models/chatarea_input":"27a077673d","models/textarea_input":"b7d595d74a","models/comm_manager":"352943c042","models/customselect":"92bbd30bd1","models/tabulator":"887daef873","models/data":"be689f0377","models/datetime_picker":"ddf98634bb","models/deckgl":"dc03aab885","models/tooltips":"f8f8ea4284","models/echarts":"04cbffdfe0","models/event-to-object":"2cc1a33000","models/feed":"976c02c0a8","models/file_download":"3ead851ca6","models/html":"89d2d3667a","models/ipywidget":"8a8089cbf3","models/json":"7eff964d3e","models/jsoneditor":"d57683bd1f","models/katex":"f672d71a9f","models/location":"bd8e0fe48b","models/mathjax":"ec353a3d9a","models/pdf":"cf33f23f5c","models/perspective":"8b1673a40b","styles/models/perspective.css":"2e2913ea54","models/player":"f06104d237","models/plotly":"6f2064dc74","models/util":"27e2a99e99","styles/models/plotly.css":"ce7c8e2a4f","models/progress":"aded75e266","models/quill":"c72e00086f","models/radio_button_group":"25e2d7c208","models/reactive_html":"6cfc3f348e","models/singleselect":"168c4d0ebd","models/speech_to_text":"739cca6576","models/state":"92822cb73a","models/tabs":"2231cdc549","models/terminal":"121f00bd6f","models/text_to_speech":"a04eb51988","models/toggle_icon":"ad985f285e","models/tooltip_icon":"ae3a172647","models/trend":"3584638c04","models/vega":"119dc23765","models/video":"79dc37b888","styles/models/video.css":"dfe21e6f1b","models/videostream":"f8afc4e661","models/vizzu":"470ce1dcbc","models/vtk/index":"c51f25e2a7","models/vtk/vtkjs":"ac55912dc1","models/vtk/vtklayout":"b06d05fa3e","models/vtk/util":"df9946ff52","models/vtk/vtkcolorbar":"b1d68776a9","models/vtk/vtkaxes":"0379dcf1cd","models/vtk/vtkvolume":"4797a2858f","models/vtk/vtksynchronized":"a4e5946204","models/vtk/panel_fullscreen_renwin_sync":"5e89c7b3eb"}, {});});
|
|
20963
21012
|
//# sourceMappingURL=panel.js.map
|