@holoviz/panel 1.2.2-a.2 → 1.2.2-a.4
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/datatabulator/luxon/build/global/luxon.min.js +1 -1
- package/dist/bundled/datatabulator/luxon/build/global/luxon.min.js.map +1 -1
- package/dist/bundled/notificationarea/panel/1.2.2-a.4/dist/bundled/font-awesome/css/all.min.css +2 -0
- package/dist/bundled/panel/1.2.2-a.4/dist/bundled/bootstrap5/css/bootstrap.min.css +2 -0
- package/dist/bundled/panel/1.2.2-a.4/dist/bundled/bootstrap5/js/bootstrap.bundle.min.js +2 -0
- package/dist/bundled/panel/1.2.2-a.4/dist/bundled/font-awesome/css/all.min.css +2 -0
- package/dist/bundled/panel/1.2.2-a.4/dist/bundled/jquery/jquery.slim.min.js +2 -0
- package/dist/bundled/plotlyplot/panel/1.2.2-a.4/dist/bundled/jquery/jquery.slim.min.js +2 -0
- package/dist/css/button.css +7 -0
- package/dist/lib/models/column.d.ts +3 -0
- package/dist/lib/models/column.js +15 -12
- package/dist/lib/models/column.js.map +1 -1
- package/dist/lib/models/data.js +4 -0
- package/dist/lib/models/data.js.map +1 -1
- package/dist/lib/models/echarts.d.ts +1 -0
- package/dist/lib/models/echarts.js +2 -1
- package/dist/lib/models/echarts.js.map +1 -1
- package/dist/lib/models/perspective.d.ts +9 -0
- package/dist/lib/models/perspective.js +48 -5
- package/dist/lib/models/perspective.js.map +1 -1
- package/dist/lib/models/reactive_html.d.ts +0 -2
- package/dist/lib/models/reactive_html.js +3 -12
- package/dist/lib/models/reactive_html.js.map +1 -1
- package/dist/lib/models/tabulator.d.ts +1 -1
- package/dist/lib/models/tabulator.js +21 -12
- package/dist/lib/models/tabulator.js.map +1 -1
- package/dist/lib/styles/button.css.js +1 -1
- package/dist/panel.js +111 -59
- package/dist/panel.js.map +1 -1
- package/dist/panel.json +1 -1
- package/dist/panel.min.js +10 -10
- package/dist/wheels/{panel-1.2.2a2-py3-none-any.whl → panel-1.2.2a4-py3-none-any.whl} +0 -0
- package/package.json +1 -1
- package/dist/bundled/notificationarea/panel/1.2.2-a.2/dist/bundled/font-awesome/css/all.min.css +0 -2
- package/dist/bundled/panel/1.2.2-a.2/dist/bundled/bootstrap5/css/bootstrap.min.css +0 -2
- package/dist/bundled/panel/1.2.2-a.2/dist/bundled/bootstrap5/js/bootstrap.bundle.min.js +0 -2
- package/dist/bundled/panel/1.2.2-a.2/dist/bundled/font-awesome/css/all.min.css +0 -2
- package/dist/bundled/panel/1.2.2-a.2/dist/bundled/jquery/jquery.slim.min.js +0 -2
- package/dist/bundled/plotlyplot/panel/1.2.2-a.2/dist/bundled/jquery/jquery.slim.min.js +0 -2
package/dist/panel.js
CHANGED
|
@@ -60,19 +60,19 @@
|
|
|
60
60
|
__esExport("BrowserInfo", browser_1.BrowserInfo);
|
|
61
61
|
var card_1 = require("c1e57c7e7d") /* ./card */;
|
|
62
62
|
__esExport("Card", card_1.Card);
|
|
63
|
-
var column_1 = require("
|
|
63
|
+
var column_1 = require("13afd4a31a") /* ./column */;
|
|
64
64
|
__esExport("Column", column_1.Column);
|
|
65
65
|
var comm_manager_1 = require("1e66dab844") /* ./comm_manager */;
|
|
66
66
|
__esExport("CommManager", comm_manager_1.CommManager);
|
|
67
67
|
var customselect_1 = require("9c8629b48f") /* ./customselect */;
|
|
68
68
|
__esExport("CustomSelect", customselect_1.CustomSelect);
|
|
69
|
-
var tabulator_1 = require("
|
|
69
|
+
var tabulator_1 = require("b2950aa706") /* ./tabulator */;
|
|
70
70
|
__esExport("DataTabulator", tabulator_1.DataTabulator);
|
|
71
71
|
var datetime_picker_1 = require("6658732ce1") /* ./datetime_picker */;
|
|
72
72
|
__esExport("DatetimePicker", datetime_picker_1.DatetimePicker);
|
|
73
73
|
var deckgl_1 = require("991e3a226c") /* ./deckgl */;
|
|
74
74
|
__esExport("DeckGLPlot", deckgl_1.DeckGLPlot);
|
|
75
|
-
var echarts_1 = require("
|
|
75
|
+
var echarts_1 = require("54ac9fb4a9") /* ./echarts */;
|
|
76
76
|
__esExport("ECharts", echarts_1.ECharts);
|
|
77
77
|
var html_1 = require("6b3b0facc2") /* ./html */;
|
|
78
78
|
__esExport("HTML", html_1.HTML);
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
__esExport("MathJax", mathjax_1.MathJax);
|
|
93
93
|
var pdf_1 = require("d49a559fbc") /* ./pdf */;
|
|
94
94
|
__esExport("PDF", pdf_1.PDF);
|
|
95
|
-
var perspective_1 = require("
|
|
95
|
+
var perspective_1 = require("d39fde6463") /* ./perspective */;
|
|
96
96
|
__esExport("Perspective", perspective_1.Perspective);
|
|
97
97
|
var player_1 = require("c172556ad3") /* ./player */;
|
|
98
98
|
__esExport("Player", player_1.Player);
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
__esExport("Progress", progress_1.Progress);
|
|
103
103
|
var quill_1 = require("e115225ba2") /* ./quill */;
|
|
104
104
|
__esExport("QuillInput", quill_1.QuillInput);
|
|
105
|
-
var reactive_html_1 = require("
|
|
105
|
+
var reactive_html_1 = require("8b89b5165f") /* ./reactive_html */;
|
|
106
106
|
__esExport("ReactiveHTML", reactive_html_1.ReactiveHTML);
|
|
107
107
|
var singleselect_1 = require("6b20024bba") /* ./singleselect */;
|
|
108
108
|
__esExport("SingleSelect", singleselect_1.SingleSelect);
|
|
@@ -571,7 +571,7 @@
|
|
|
571
571
|
__esModule();
|
|
572
572
|
const tslib_1 = require("tslib");
|
|
573
573
|
var _a;
|
|
574
|
-
const column_1 = require("
|
|
574
|
+
const column_1 = require("13afd4a31a") /* ./column */;
|
|
575
575
|
const DOM = tslib_1.__importStar(require("@bokehjs/core/dom"));
|
|
576
576
|
class CardView extends column_1.ColumnView {
|
|
577
577
|
connect_signals() {
|
|
@@ -688,7 +688,7 @@
|
|
|
688
688
|
}));
|
|
689
689
|
})();
|
|
690
690
|
},
|
|
691
|
-
"
|
|
691
|
+
"13afd4a31a": /* models/column.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
692
692
|
__esModule();
|
|
693
693
|
const tslib_1 = require("tslib");
|
|
694
694
|
var _a;
|
|
@@ -697,13 +697,19 @@
|
|
|
697
697
|
class ColumnView extends column_1.ColumnView {
|
|
698
698
|
connect_signals() {
|
|
699
699
|
super.connect_signals();
|
|
700
|
-
const { children, scroll_button_threshold } = this.model.properties;
|
|
700
|
+
const { children, scroll_position, scroll_button_threshold } = this.model.properties;
|
|
701
701
|
this.on_change(children, () => this.trigger_auto_scroll());
|
|
702
|
+
this.on_change(scroll_position, () => this.scroll_to_position());
|
|
702
703
|
this.on_change(scroll_button_threshold, () => this.toggle_scroll_button());
|
|
703
704
|
}
|
|
704
705
|
get distance_from_latest() {
|
|
705
706
|
return this.el.scrollHeight - this.el.scrollTop - this.el.clientHeight;
|
|
706
707
|
}
|
|
708
|
+
scroll_to_position() {
|
|
709
|
+
requestAnimationFrame(() => {
|
|
710
|
+
this.el.scrollTop = this.model.scroll_position;
|
|
711
|
+
});
|
|
712
|
+
}
|
|
707
713
|
scroll_to_latest() {
|
|
708
714
|
// Waits for the child to be rendered before scrolling
|
|
709
715
|
requestAnimationFrame(() => {
|
|
@@ -717,6 +723,9 @@
|
|
|
717
723
|
return;
|
|
718
724
|
this.scroll_to_latest();
|
|
719
725
|
}
|
|
726
|
+
record_scroll_position() {
|
|
727
|
+
this.model.scroll_position = this.el.scrollTop;
|
|
728
|
+
}
|
|
720
729
|
toggle_scroll_button() {
|
|
721
730
|
const threshold = this.model.scroll_button_threshold;
|
|
722
731
|
const exceeds_threshold = this.distance_from_latest >= threshold;
|
|
@@ -727,29 +736,22 @@
|
|
|
727
736
|
}
|
|
728
737
|
render() {
|
|
729
738
|
super.render();
|
|
730
|
-
this.empty();
|
|
731
|
-
this._update_stylesheets();
|
|
732
|
-
this._update_css_classes();
|
|
733
|
-
this._apply_styles();
|
|
734
|
-
this._apply_visible();
|
|
735
|
-
this.class_list.add(...this.css_classes());
|
|
736
739
|
this.scroll_down_button_el = DOM.createElement('div', { class: 'scroll-button' });
|
|
737
740
|
this.shadow_el.appendChild(this.scroll_down_button_el);
|
|
738
741
|
this.el.addEventListener("scroll", () => {
|
|
742
|
+
this.record_scroll_position();
|
|
739
743
|
this.toggle_scroll_button();
|
|
740
744
|
});
|
|
741
745
|
this.scroll_down_button_el.addEventListener("click", () => {
|
|
742
746
|
this.scroll_to_latest();
|
|
743
747
|
});
|
|
744
|
-
for (const child_view of this.child_views) {
|
|
745
|
-
this.shadow_el.appendChild(child_view.el);
|
|
746
|
-
child_view.render();
|
|
747
|
-
child_view.after_render();
|
|
748
|
-
}
|
|
749
748
|
}
|
|
750
749
|
after_render() {
|
|
751
750
|
super.after_render();
|
|
752
751
|
requestAnimationFrame(() => {
|
|
752
|
+
if (this.model.scroll_position) {
|
|
753
|
+
this.scroll_to_position();
|
|
754
|
+
}
|
|
753
755
|
if (this.model.view_latest) {
|
|
754
756
|
this.scroll_to_latest();
|
|
755
757
|
}
|
|
@@ -771,6 +773,7 @@
|
|
|
771
773
|
(() => {
|
|
772
774
|
_a.prototype.default_view = ColumnView;
|
|
773
775
|
_a.define(({ Int, Boolean }) => ({
|
|
776
|
+
scroll_position: [Int, 0],
|
|
774
777
|
auto_scroll_limit: [Int, 0],
|
|
775
778
|
scroll_button_threshold: [Int, 0],
|
|
776
779
|
view_latest: [Boolean, false],
|
|
@@ -1002,7 +1005,7 @@
|
|
|
1002
1005
|
});
|
|
1003
1006
|
})();
|
|
1004
1007
|
},
|
|
1005
|
-
"
|
|
1008
|
+
"b2950aa706": /* models/tabulator.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
1006
1009
|
__esModule();
|
|
1007
1010
|
var _a, _b, _c;
|
|
1008
1011
|
const dom_1 = require("@bokehjs/core/dom");
|
|
@@ -1014,7 +1017,7 @@
|
|
|
1014
1017
|
const tables_1 = require("@bokehjs/models/widgets/tables");
|
|
1015
1018
|
const debounce_1 = require("99a25e6992") /* debounce */;
|
|
1016
1019
|
const comm_manager_1 = require("1e66dab844") /* ./comm_manager */;
|
|
1017
|
-
const data_1 = require("
|
|
1020
|
+
const data_1 = require("4e27eda472") /* ./data */;
|
|
1018
1021
|
const layout_1 = require("ea218d1c3c") /* ./layout */;
|
|
1019
1022
|
class TableEditEvent extends bokeh_events_1.ModelEvent {
|
|
1020
1023
|
constructor(column, row, pre) {
|
|
@@ -1263,7 +1266,9 @@
|
|
|
1263
1266
|
super.connect_signals();
|
|
1264
1267
|
const p = this.model.properties;
|
|
1265
1268
|
const { configuration, layout, columns, groupby } = p;
|
|
1266
|
-
this.on_change([configuration, layout, groupby], (0, debounce_1.debounce)(() =>
|
|
1269
|
+
this.on_change([configuration, layout, groupby], (0, debounce_1.debounce)(() => {
|
|
1270
|
+
this.invalidate_render();
|
|
1271
|
+
}, 20, false));
|
|
1267
1272
|
this.on_change([columns], () => {
|
|
1268
1273
|
this.tabulator.setColumns(this.getColumns());
|
|
1269
1274
|
this.setHidden();
|
|
@@ -1371,6 +1376,8 @@
|
|
|
1371
1376
|
el.classList.add(cls);
|
|
1372
1377
|
}
|
|
1373
1378
|
render() {
|
|
1379
|
+
if (this.tabulator != null)
|
|
1380
|
+
this.tabulator.destroy();
|
|
1374
1381
|
super.render();
|
|
1375
1382
|
this._initializing = true;
|
|
1376
1383
|
const container = (0, dom_2.div)({ style: "display: contents;" });
|
|
@@ -1525,11 +1532,12 @@
|
|
|
1525
1532
|
return Object.assign(Object.assign({}, configuration), { "data": data });
|
|
1526
1533
|
}
|
|
1527
1534
|
get child_models() {
|
|
1528
|
-
var _d;
|
|
1535
|
+
var _d, _e;
|
|
1529
1536
|
const children = [];
|
|
1530
1537
|
for (const idx of this.model.expanded) {
|
|
1531
|
-
|
|
1532
|
-
|
|
1538
|
+
const child = (_e = (_d = this.model.children).get) === null || _e === void 0 ? void 0 : _e.call(_d, idx);
|
|
1539
|
+
if (child != null)
|
|
1540
|
+
children.push(child);
|
|
1533
1541
|
}
|
|
1534
1542
|
return children;
|
|
1535
1543
|
}
|
|
@@ -1551,10 +1559,10 @@
|
|
|
1551
1559
|
_render_row(row, resize = true) {
|
|
1552
1560
|
var _d;
|
|
1553
1561
|
const index = (_d = row._row) === null || _d === void 0 ? void 0 : _d.data._index;
|
|
1554
|
-
if (!this.model.expanded.includes(index) ||
|
|
1562
|
+
if (!this.model.expanded.includes(index) || this.model.children.get(index) == null)
|
|
1555
1563
|
return;
|
|
1556
1564
|
const model = this.model.children.get(index);
|
|
1557
|
-
const view = this._child_views.get(model);
|
|
1565
|
+
const view = model == null ? null : this._child_views.get(model);
|
|
1558
1566
|
if (view == null)
|
|
1559
1567
|
return;
|
|
1560
1568
|
const rowEl = row.getElement();
|
|
@@ -1564,8 +1572,10 @@
|
|
|
1564
1572
|
const viewEl = (0, dom_2.div)({ style: "background-color: " + bg + "; margin-left:" + neg_margin + "; max-width: 100%; overflow-x: hidden;" });
|
|
1565
1573
|
viewEl.appendChild(view.el);
|
|
1566
1574
|
rowEl.appendChild(viewEl);
|
|
1567
|
-
view.
|
|
1568
|
-
|
|
1575
|
+
if (!view.has_finished()) {
|
|
1576
|
+
view.render();
|
|
1577
|
+
view.after_render();
|
|
1578
|
+
}
|
|
1569
1579
|
if (resize) {
|
|
1570
1580
|
this._update_children();
|
|
1571
1581
|
this.tabulator.rowManager.adjustTableSize();
|
|
@@ -1578,6 +1588,7 @@
|
|
|
1578
1588
|
return "<i>" + icon + "</i>";
|
|
1579
1589
|
}
|
|
1580
1590
|
_update_expand(cell) {
|
|
1591
|
+
var _d, _e, _f, _g;
|
|
1581
1592
|
const index = cell._cell.row.data._index;
|
|
1582
1593
|
const expanded = [...this.model.expanded];
|
|
1583
1594
|
const exp_index = expanded.indexOf(index);
|
|
@@ -1585,8 +1596,8 @@
|
|
|
1585
1596
|
expanded.push(index);
|
|
1586
1597
|
else {
|
|
1587
1598
|
const removed = expanded.splice(exp_index, 1)[0];
|
|
1588
|
-
|
|
1589
|
-
|
|
1599
|
+
const model = (_e = (_d = this.model.children).get) === null || _e === void 0 ? void 0 : _e.call(_d, removed);
|
|
1600
|
+
if (model != null) {
|
|
1590
1601
|
const view = this._child_views.get(model);
|
|
1591
1602
|
if (view !== undefined && view.el != null)
|
|
1592
1603
|
(0, dom_1.undisplay)(view.el);
|
|
@@ -1597,7 +1608,7 @@
|
|
|
1597
1608
|
return;
|
|
1598
1609
|
let ready = true;
|
|
1599
1610
|
for (const idx of this.model.expanded) {
|
|
1600
|
-
if (
|
|
1611
|
+
if (((_g = (_f = this.model.children).get) === null || _g === void 0 ? void 0 : _g.call(_f, idx)) == null) {
|
|
1601
1612
|
ready = false;
|
|
1602
1613
|
break;
|
|
1603
1614
|
}
|
|
@@ -1801,6 +1812,8 @@
|
|
|
1801
1812
|
}
|
|
1802
1813
|
// Update table
|
|
1803
1814
|
setData() {
|
|
1815
|
+
if (this._initializing || this._building || !this.tabulator.initialized)
|
|
1816
|
+
return;
|
|
1804
1817
|
const data = this.getData();
|
|
1805
1818
|
if (this.model.pagination != null)
|
|
1806
1819
|
this.tabulator.rowManager.setData(data, true, false);
|
|
@@ -1912,7 +1925,7 @@
|
|
|
1912
1925
|
}
|
|
1913
1926
|
}
|
|
1914
1927
|
setSelection() {
|
|
1915
|
-
if (this.tabulator == null || this._initializing || this._selection_updating)
|
|
1928
|
+
if (this.tabulator == null || this._initializing || this._selection_updating || !this.tabulator.initialized)
|
|
1916
1929
|
return;
|
|
1917
1930
|
const indices = this.model.source.selected.indices;
|
|
1918
1931
|
const current_indices = this.tabulator.getSelectedData().map((row) => row._index);
|
|
@@ -2036,7 +2049,7 @@
|
|
|
2036
2049
|
_c.define(({ Any, Array, Boolean, Nullable, Number, Ref, String }) => ({
|
|
2037
2050
|
aggregators: [Any, {}],
|
|
2038
2051
|
buttons: [Any, {}],
|
|
2039
|
-
children: [Any,
|
|
2052
|
+
children: [Any, new Map()],
|
|
2040
2053
|
configuration: [Any, {}],
|
|
2041
2054
|
columns: [Array(Ref(tables_1.TableColumn)), []],
|
|
2042
2055
|
download: [Boolean, false],
|
|
@@ -2130,7 +2143,7 @@
|
|
|
2130
2143
|
debounce.debounce = debounce;
|
|
2131
2144
|
module.exports = debounce;
|
|
2132
2145
|
},
|
|
2133
|
-
"
|
|
2146
|
+
"4e27eda472": /* models/data.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
2134
2147
|
__esModule();
|
|
2135
2148
|
function transform_cds_to_records(cds, addId = false, start = 0) {
|
|
2136
2149
|
const data = [];
|
|
@@ -2145,6 +2158,10 @@
|
|
|
2145
2158
|
const shape = (array[0] == null || array[0].shape == null) ? null : array[0].shape;
|
|
2146
2159
|
if ((shape != null) && (shape.length > 1) && (typeof shape[0] == "number"))
|
|
2147
2160
|
item[column] = array.slice(i * shape[1], i * shape[1] + shape[1]);
|
|
2161
|
+
else if (array.length != cdsLength && (array.length % cdsLength === 0)) {
|
|
2162
|
+
const offset = array.length / cdsLength;
|
|
2163
|
+
item[column] = array.slice(i * offset, i * offset + offset);
|
|
2164
|
+
}
|
|
2148
2165
|
else
|
|
2149
2166
|
item[column] = array[i];
|
|
2150
2167
|
}
|
|
@@ -5040,7 +5057,7 @@
|
|
|
5040
5057
|
const dom_1 = require("@bokehjs/core/dom");
|
|
5041
5058
|
const column_data_source_1 = require("@bokehjs/models/sources/column_data_source");
|
|
5042
5059
|
const debounce_1 = require("99a25e6992") /* debounce */;
|
|
5043
|
-
const data_1 = require("
|
|
5060
|
+
const data_1 = require("4e27eda472") /* ./data */;
|
|
5044
5061
|
const layout_dom_1 = require("@bokehjs/models/layouts/layout_dom");
|
|
5045
5062
|
const tooltips_1 = require("9588ab7c9e") /* ./tooltips */;
|
|
5046
5063
|
const constants_1 = tslib_1.__importDefault(require("093eb75864") /* @luma.gl/constants */);
|
|
@@ -6167,7 +6184,7 @@
|
|
|
6167
6184
|
GPU_DISJOINT_EXT: 0x8fbb // A Boolean indicating whether or not the GPU performed any disjoint operation.
|
|
6168
6185
|
};
|
|
6169
6186
|
},
|
|
6170
|
-
"
|
|
6187
|
+
"54ac9fb4a9": /* models/echarts.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
6171
6188
|
__esModule();
|
|
6172
6189
|
var _a, _b;
|
|
6173
6190
|
const bokeh_events_1 = require("@bokehjs/core/bokeh_events");
|
|
@@ -6239,7 +6256,7 @@
|
|
|
6239
6256
|
_plot() {
|
|
6240
6257
|
if (window.echarts == null)
|
|
6241
6258
|
return;
|
|
6242
|
-
this._chart.setOption(this.model.data);
|
|
6259
|
+
this._chart.setOption(this.model.data, this.model.options);
|
|
6243
6260
|
}
|
|
6244
6261
|
_resize() {
|
|
6245
6262
|
this._chart.resize({ width: this.model.width, height: this.model.height });
|
|
@@ -6305,6 +6322,7 @@
|
|
|
6305
6322
|
_b.prototype.default_view = EChartsView;
|
|
6306
6323
|
_b.define(({ Any, String }) => ({
|
|
6307
6324
|
data: [Any, {}],
|
|
6325
|
+
options: [Any, {}],
|
|
6308
6326
|
event_config: [Any, {}],
|
|
6309
6327
|
js_events: [Any, {}],
|
|
6310
6328
|
theme: [String, "default"],
|
|
@@ -7444,9 +7462,10 @@
|
|
|
7444
7462
|
}));
|
|
7445
7463
|
})();
|
|
7446
7464
|
},
|
|
7447
|
-
"
|
|
7465
|
+
"d39fde6463": /* models/perspective.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
7448
7466
|
__esModule();
|
|
7449
|
-
var _a;
|
|
7467
|
+
var _a, _b;
|
|
7468
|
+
const bokeh_events_1 = require("@bokehjs/core/bokeh_events");
|
|
7450
7469
|
const dom_1 = require("@bokehjs/core/dom");
|
|
7451
7470
|
const column_data_source_1 = require("@bokehjs/models/sources/column_data_source");
|
|
7452
7471
|
const layout_1 = require("ea218d1c3c") /* ./layout */;
|
|
@@ -7482,6 +7501,23 @@
|
|
|
7482
7501
|
}
|
|
7483
7502
|
const PLUGINS_REVERSE = objectFlip(PLUGINS);
|
|
7484
7503
|
const THEMES_REVERSE = objectFlip(THEMES);
|
|
7504
|
+
class PerspectiveClickEvent extends bokeh_events_1.ModelEvent {
|
|
7505
|
+
constructor(config, column_names, row) {
|
|
7506
|
+
super();
|
|
7507
|
+
this.config = config;
|
|
7508
|
+
this.column_names = column_names;
|
|
7509
|
+
this.row = row;
|
|
7510
|
+
}
|
|
7511
|
+
get event_values() {
|
|
7512
|
+
return { model: this.origin, config: this.config, column_names: this.column_names, row: this.row };
|
|
7513
|
+
}
|
|
7514
|
+
}
|
|
7515
|
+
exports.PerspectiveClickEvent = PerspectiveClickEvent;
|
|
7516
|
+
_a = PerspectiveClickEvent;
|
|
7517
|
+
PerspectiveClickEvent.__name__ = "PerspectiveClickEvent";
|
|
7518
|
+
(() => {
|
|
7519
|
+
_a.prototype.event_name = "perspective-click";
|
|
7520
|
+
})();
|
|
7485
7521
|
class PerspectiveView extends layout_1.HTMLBoxView {
|
|
7486
7522
|
constructor() {
|
|
7487
7523
|
super(...arguments);
|
|
@@ -7506,36 +7542,58 @@
|
|
|
7506
7542
|
this.perspective_element.toggleConfig();
|
|
7507
7543
|
});
|
|
7508
7544
|
this.connect(this.model.properties.columns.change, () => {
|
|
7545
|
+
if (this._updating)
|
|
7546
|
+
return;
|
|
7509
7547
|
this.perspective_element.restore({ "columns": this.model.columns });
|
|
7510
7548
|
});
|
|
7511
7549
|
this.connect(this.model.properties.expressions.change, () => {
|
|
7550
|
+
if (this._updating)
|
|
7551
|
+
return;
|
|
7512
7552
|
this.perspective_element.restore({ "expressions": this.model.expressions });
|
|
7513
7553
|
});
|
|
7514
7554
|
this.connect(this.model.properties.split_by.change, () => {
|
|
7555
|
+
if (this._updating)
|
|
7556
|
+
return;
|
|
7515
7557
|
this.perspective_element.restore({ "split_by": this.model.split_by });
|
|
7516
7558
|
});
|
|
7517
7559
|
this.connect(this.model.properties.group_by.change, () => {
|
|
7560
|
+
if (this._updating)
|
|
7561
|
+
return;
|
|
7518
7562
|
this.perspective_element.restore({ "group_by": this.model.group_by });
|
|
7519
7563
|
});
|
|
7520
7564
|
this.connect(this.model.properties.aggregates.change, () => {
|
|
7565
|
+
if (this._updating)
|
|
7566
|
+
return;
|
|
7521
7567
|
this.perspective_element.restore({ "aggregates": this.model.aggregates });
|
|
7522
7568
|
});
|
|
7523
7569
|
this.connect(this.model.properties.filters.change, () => {
|
|
7570
|
+
if (this._updating)
|
|
7571
|
+
return;
|
|
7524
7572
|
this.perspective_element.restore({ "filter": this.model.filters });
|
|
7525
7573
|
});
|
|
7526
7574
|
this.connect(this.model.properties.sort.change, () => {
|
|
7575
|
+
if (this._updating)
|
|
7576
|
+
return;
|
|
7527
7577
|
this.perspective_element.restore({ "sort": this.model.sort });
|
|
7528
7578
|
});
|
|
7529
7579
|
this.connect(this.model.properties.plugin.change, () => {
|
|
7580
|
+
if (this._updating)
|
|
7581
|
+
return;
|
|
7530
7582
|
this.perspective_element.restore({ "plugin": PLUGINS[this.model.plugin] });
|
|
7531
7583
|
});
|
|
7532
7584
|
this.connect(this.model.properties.selectable.change, () => {
|
|
7585
|
+
if (this._updating)
|
|
7586
|
+
return;
|
|
7533
7587
|
this.perspective_element.restore({ "plugin_config": Object.assign(Object.assign({}, this._current_config), { selectable: this.model.selectable }) });
|
|
7534
7588
|
});
|
|
7535
7589
|
this.connect(this.model.properties.editable.change, () => {
|
|
7590
|
+
if (this._updating)
|
|
7591
|
+
return;
|
|
7536
7592
|
this.perspective_element.restore({ "plugin_config": Object.assign(Object.assign({}, this._current_config), { editable: this.model.editable }) });
|
|
7537
7593
|
});
|
|
7538
7594
|
this.connect(this.model.properties.theme.change, () => {
|
|
7595
|
+
if (this._updating)
|
|
7596
|
+
return;
|
|
7539
7597
|
this.perspective_element.restore({ "theme": THEMES[this.model.theme] }).catch(() => { });
|
|
7540
7598
|
});
|
|
7541
7599
|
}
|
|
@@ -7563,7 +7621,7 @@
|
|
|
7563
7621
|
this.perspective_element.resetThemes([...Object.values(THEMES)]).catch(() => { });
|
|
7564
7622
|
if (this.model.toggle_config)
|
|
7565
7623
|
this.perspective_element.toggleConfig();
|
|
7566
|
-
(0, layout_1.set_size)(
|
|
7624
|
+
(0, layout_1.set_size)(container, this.model);
|
|
7567
7625
|
this.shadow_el.appendChild(container);
|
|
7568
7626
|
this.worker.table(this.model.schema).then((table) => {
|
|
7569
7627
|
this.table = table;
|
|
@@ -7587,6 +7645,9 @@
|
|
|
7587
7645
|
});
|
|
7588
7646
|
this._config_listener = () => this.sync_config();
|
|
7589
7647
|
this.perspective_element.addEventListener("perspective-config-update", this._config_listener);
|
|
7648
|
+
this.perspective_element.addEventListener("perspective-click", (event) => {
|
|
7649
|
+
this.model.trigger_event(new PerspectiveClickEvent(event.detail.config, event.detail.column_names, event.detail.row));
|
|
7650
|
+
});
|
|
7590
7651
|
this._loaded = true;
|
|
7591
7652
|
});
|
|
7592
7653
|
}
|
|
@@ -7646,12 +7707,12 @@
|
|
|
7646
7707
|
}
|
|
7647
7708
|
}
|
|
7648
7709
|
exports.Perspective = Perspective;
|
|
7649
|
-
|
|
7710
|
+
_b = Perspective;
|
|
7650
7711
|
Perspective.__name__ = "Perspective";
|
|
7651
7712
|
Perspective.__module__ = "panel.models.perspective";
|
|
7652
7713
|
(() => {
|
|
7653
|
-
|
|
7654
|
-
|
|
7714
|
+
_b.prototype.default_view = PerspectiveView;
|
|
7715
|
+
_b.define(({ Any, Array, Boolean, Ref, Nullable, String }) => ({
|
|
7655
7716
|
aggregates: [Any, {}],
|
|
7656
7717
|
columns: [Array(Nullable(String)), []],
|
|
7657
7718
|
expressions: [Nullable(Array(String)), null],
|
|
@@ -8618,16 +8679,15 @@
|
|
|
8618
8679
|
});
|
|
8619
8680
|
})();
|
|
8620
8681
|
},
|
|
8621
|
-
"
|
|
8682
|
+
"8b89b5165f": /* models/reactive_html.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8622
8683
|
__esModule();
|
|
8623
8684
|
var _a;
|
|
8624
8685
|
const preact_1 = require("1b70f5b1d3") /* preact */;
|
|
8625
8686
|
const hooks_1 = require("283ce7811c") /* preact/hooks */;
|
|
8626
8687
|
const preact_2 = require("b3f51db71c") /* htm/preact */;
|
|
8627
8688
|
const dom_1 = require("@bokehjs/core/dom");
|
|
8628
|
-
const build_views_1 = require("@bokehjs/core/build_views");
|
|
8629
8689
|
const types_1 = require("@bokehjs/core/util/types");
|
|
8630
|
-
const data_1 = require("
|
|
8690
|
+
const data_1 = require("4e27eda472") /* ./data */;
|
|
8631
8691
|
const event_to_object_1 = require("490942d778") /* ./event-to-object */;
|
|
8632
8692
|
const html_1 = require("6b3b0facc2") /* ./html */;
|
|
8633
8693
|
const layout_1 = require("ea218d1c3c") /* ./layout */;
|
|
@@ -8813,16 +8873,6 @@
|
|
|
8813
8873
|
}
|
|
8814
8874
|
return models;
|
|
8815
8875
|
}
|
|
8816
|
-
async build_child_views() {
|
|
8817
|
-
const { created, removed } = await (0, build_views_1.build_views)(this._child_views, this.child_models, { parent: null });
|
|
8818
|
-
for (const view of removed) {
|
|
8819
|
-
this._resize_observer.unobserve(view.el);
|
|
8820
|
-
}
|
|
8821
|
-
for (const view of created) {
|
|
8822
|
-
this._resize_observer.observe(view.el, { box: "border-box" });
|
|
8823
|
-
}
|
|
8824
|
-
return created;
|
|
8825
|
-
}
|
|
8826
8876
|
_after_layout() {
|
|
8827
8877
|
this.run_script('after_layout', true);
|
|
8828
8878
|
}
|
|
@@ -8854,7 +8904,9 @@
|
|
|
8854
8904
|
if (view == null)
|
|
8855
8905
|
el.innerHTML = (0, html_1.htmlDecode)(model) || model;
|
|
8856
8906
|
else {
|
|
8857
|
-
view.
|
|
8907
|
+
el.appendChild(view.el);
|
|
8908
|
+
view.render();
|
|
8909
|
+
view.after_render();
|
|
8858
8910
|
}
|
|
8859
8911
|
}
|
|
8860
8912
|
_render_node(node, children) {
|
|
@@ -19334,5 +19386,5 @@
|
|
|
19334
19386
|
}
|
|
19335
19387
|
exports.initialize_fullscreen_render = initialize_fullscreen_render;
|
|
19336
19388
|
},
|
|
19337
|
-
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"6e19b31aba","models/ace":"7df2008a2e","models/layout":"ea218d1c3c","models/audio":"78153b60aa","models/browser":"6df8bf1ac7","models/card":"c1e57c7e7d","models/column":"
|
|
19389
|
+
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"6e19b31aba","models/ace":"7df2008a2e","models/layout":"ea218d1c3c","models/audio":"78153b60aa","models/browser":"6df8bf1ac7","models/card":"c1e57c7e7d","models/column":"13afd4a31a","models/comm_manager":"1e66dab844","models/customselect":"9c8629b48f","models/tabulator":"b2950aa706","models/data":"4e27eda472","models/datetime_picker":"6658732ce1","models/deckgl":"991e3a226c","models/tooltips":"9588ab7c9e","models/echarts":"54ac9fb4a9","models/event-to-object":"490942d778","models/html":"6b3b0facc2","models/ipywidget":"e3556c1e99","models/json":"66846b828c","models/jsoneditor":"4b8a56c700","models/file_download":"9c15016be8","models/katex":"197cfa57e5","models/location":"00a25cf872","models/mathjax":"46a1770629","models/pdf":"d49a559fbc","models/perspective":"d39fde6463","models/player":"c172556ad3","models/plotly":"bb3d0ded66","models/util":"990b5dd5c7","models/progress":"b82925a928","models/quill":"e115225ba2","models/reactive_html":"8b89b5165f","models/singleselect":"6b20024bba","models/speech_to_text":"cd0c80cc4c","models/state":"66717cb841","models/tabs":"67a5649f75","models/terminal":"cd4a941f8d","models/text_to_speech":"eb4ae0acfa","models/tooltip_icon":"26ffc3afe8","models/trend":"8f4ab32d74","models/vega":"3b23e1bc5c","models/video":"4ac59b8079","models/videostream":"797fd61298","models/vizzu":"e8339ee57a","models/vtk/index":"c51f25e2a7","models/vtk/vtkjs":"3bce7c9db6","models/vtk/vtklayout":"d7ded264dc","models/vtk/util":"a76a9b7c23","models/vtk/vtkcolorbar":"787f6aeecd","models/vtk/vtkaxes":"7cec459a06","models/vtk/vtkvolume":"c2892117a7","models/vtk/vtksynchronized":"40c4377615","models/vtk/panel_fullscreen_renwin_sync":"877619fe71"}, {});});
|
|
19338
19390
|
//# sourceMappingURL=panel.js.map
|