@holoviz/panel 1.3.6 → 1.3.7-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/datatabulator/tabulator-tables@5.5.0/dist/css/tabulator_fast.min.css +6 -0
- package/dist/bundled/notificationarea/panel/1.3.7-rc.2/dist/bundled/font-awesome/css/all.min.css +2 -0
- package/dist/bundled/panel/1.3.7-rc.2/dist/bundled/bootstrap5/css/bootstrap.min.css +2 -0
- package/dist/bundled/panel/1.3.7-rc.2/dist/bundled/bootstrap5/js/bootstrap.bundle.min.js +2 -0
- package/dist/bundled/panel/1.3.7-rc.2/dist/bundled/font-awesome/css/all.min.css +2 -0
- package/dist/bundled/panel/1.3.7-rc.2/dist/bundled/jquery/jquery.slim.min.js +2 -0
- package/dist/bundled/plotlyplot/panel/1.3.7-rc.2/dist/bundled/jquery/jquery.slim.min.js +2 -0
- package/dist/bundled/plotlyplot/plotly-2.25.2.min.js +8 -0
- package/dist/css/button.css +1 -1
- package/dist/css/chat_message.css +30 -2
- package/dist/css/loading.css +2 -0
- package/dist/css/widgetbox.css +0 -2
- package/dist/lib/models/card.js +1 -2
- package/dist/lib/models/card.js.map +1 -1
- package/dist/lib/models/file_download.js +1 -2
- package/dist/lib/models/file_download.js.map +1 -1
- package/dist/lib/models/icon.d.ts +6 -2
- package/dist/lib/models/icon.js +38 -6
- package/dist/lib/models/icon.js.map +1 -1
- package/dist/lib/models/perspective.js +7 -2
- package/dist/lib/models/perspective.js.map +1 -1
- package/dist/lib/models/plotly.js +2 -7
- package/dist/lib/models/plotly.js.map +1 -1
- package/dist/lib/models/quill.js +79 -42
- package/dist/lib/models/quill.js.map +1 -1
- package/dist/lib/models/tabulator.js +2 -0
- package/dist/lib/models/tabulator.js.map +1 -1
- package/dist/lib/models/util.d.ts +1 -0
- package/dist/lib/models/util.js +20 -0
- package/dist/lib/models/util.js.map +1 -1
- package/dist/lib/styles/button.css.js +1 -1
- package/dist/lib/styles/chat_message.css.js +2 -2
- package/dist/lib/styles/loading.css.js +1 -1
- package/dist/lib/styles/widgetbox.css.js +1 -1
- package/dist/panel.js +168 -79
- package/dist/panel.js.map +1 -1
- package/dist/panel.json +1 -1
- package/dist/panel.min.js +11 -11
- package/package.json +2 -2
- package/dist/bundled/notificationarea/panel/1.3.6/dist/bundled/font-awesome/css/all.min.css +0 -2
- package/dist/bundled/panel/1.3.6/dist/bundled/bootstrap5/css/bootstrap.min.css +0 -2
- package/dist/bundled/panel/1.3.6/dist/bundled/bootstrap5/js/bootstrap.bundle.min.js +0 -2
- package/dist/bundled/panel/1.3.6/dist/bundled/font-awesome/css/all.min.css +0 -2
- package/dist/bundled/panel/1.3.6/dist/bundled/jquery/jquery.slim.min.js +0 -2
- package/dist/bundled/plotlyplot/panel/1.3.6/dist/bundled/jquery/jquery.slim.min.js +0 -2
- package/dist/bundled/plotlyplot/plotly-2.18.0.min.js +0 -8
package/dist/panel.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright (c) 2012 -
|
|
2
|
+
* Copyright (c) 2012 - 2024, Anaconda, Inc., and Bokeh Contributors
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Redistribution and use in source and binary forms, with or without modification,
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
__esExport("BrowserInfo", browser_1.BrowserInfo);
|
|
61
61
|
var button_1 = require("0e384ee9c4") /* ./button */;
|
|
62
62
|
__esExport("Button", button_1.Button);
|
|
63
|
-
var card_1 = require("
|
|
63
|
+
var card_1 = require("5356bf07b1") /* ./card */;
|
|
64
64
|
__esExport("Card", card_1.Card);
|
|
65
65
|
var checkbox_button_group_1 = require("820473477c") /* ./checkbox_button_group */;
|
|
66
66
|
__esExport("CheckboxButtonGroup", checkbox_button_group_1.CheckboxButtonGroup);
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
__esExport("CommManager", comm_manager_1.CommManager);
|
|
71
71
|
var customselect_1 = require("e258e515be") /* ./customselect */;
|
|
72
72
|
__esExport("CustomSelect", customselect_1.CustomSelect);
|
|
73
|
-
var tabulator_1 = require("
|
|
73
|
+
var tabulator_1 = require("f7b17ce11c") /* ./tabulator */;
|
|
74
74
|
__esExport("DataTabulator", tabulator_1.DataTabulator);
|
|
75
75
|
var datetime_picker_1 = require("5fd6501095") /* ./datetime_picker */;
|
|
76
76
|
__esExport("DatetimePicker", datetime_picker_1.DatetimePicker);
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
__esExport("DeckGLPlot", deckgl_1.DeckGLPlot);
|
|
79
79
|
var echarts_1 = require("7bc4e47bd5") /* ./echarts */;
|
|
80
80
|
__esExport("ECharts", echarts_1.ECharts);
|
|
81
|
-
var file_download_1 = require("
|
|
81
|
+
var file_download_1 = require("ab30c7afd7") /* ./file_download */;
|
|
82
82
|
__esExport("FileDownload", file_download_1.FileDownload);
|
|
83
83
|
var html_1 = require("3db2e41978") /* ./html */;
|
|
84
84
|
__esExport("HTML", html_1.HTML);
|
|
@@ -96,15 +96,15 @@
|
|
|
96
96
|
__esExport("MathJax", mathjax_1.MathJax);
|
|
97
97
|
var pdf_1 = require("46cccf2270") /* ./pdf */;
|
|
98
98
|
__esExport("PDF", pdf_1.PDF);
|
|
99
|
-
var perspective_1 = require("
|
|
99
|
+
var perspective_1 = require("8349fbd43e") /* ./perspective */;
|
|
100
100
|
__esExport("Perspective", perspective_1.Perspective);
|
|
101
101
|
var player_1 = require("9148c6a6f9") /* ./player */;
|
|
102
102
|
__esExport("Player", player_1.Player);
|
|
103
|
-
var plotly_1 = require("
|
|
103
|
+
var plotly_1 = require("dd1700da9e") /* ./plotly */;
|
|
104
104
|
__esExport("PlotlyPlot", plotly_1.PlotlyPlot);
|
|
105
105
|
var progress_1 = require("e6caa5bc95") /* ./progress */;
|
|
106
106
|
__esExport("Progress", progress_1.Progress);
|
|
107
|
-
var quill_1 = require("
|
|
107
|
+
var quill_1 = require("361033d351") /* ./quill */;
|
|
108
108
|
__esExport("QuillInput", quill_1.QuillInput);
|
|
109
109
|
var radio_button_group_1 = require("81e6ca704a") /* ./radio_button_group */;
|
|
110
110
|
__esExport("RadioButtonGroup", radio_button_group_1.RadioButtonGroup);
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
__esExport("TextAreaInput", textarea_input_1.TextAreaInput);
|
|
125
125
|
var text_to_speech_1 = require("a44f0bd49f") /* ./text_to_speech */;
|
|
126
126
|
__esExport("TextToSpeech", text_to_speech_1.TextToSpeech);
|
|
127
|
-
var icon_1 = require("
|
|
127
|
+
var icon_1 = require("81d14820f0") /* ./icon */;
|
|
128
128
|
__esExport("ToggleIcon", icon_1.ToggleIcon);
|
|
129
129
|
var tooltip_icon_1 = require("74000df4a0") /* ./tooltip_icon */;
|
|
130
130
|
__esExport("TooltipIcon", tooltip_icon_1.TooltipIcon);
|
|
@@ -657,7 +657,7 @@
|
|
|
657
657
|
}));
|
|
658
658
|
})();
|
|
659
659
|
},
|
|
660
|
-
"
|
|
660
|
+
"5356bf07b1": /* models/card.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
661
661
|
__esModule();
|
|
662
662
|
const tslib_1 = require("tslib");
|
|
663
663
|
var _a;
|
|
@@ -670,8 +670,7 @@
|
|
|
670
670
|
}
|
|
671
671
|
connect_signals() {
|
|
672
672
|
super.connect_signals();
|
|
673
|
-
const { active_header_background,
|
|
674
|
-
this.on_change(children, () => this.render());
|
|
673
|
+
const { active_header_background, collapsed, header_background, header_color, hide_header } = this.model.properties;
|
|
675
674
|
this.on_change(collapsed, () => this._collapse());
|
|
676
675
|
this.on_change([header_color, hide_header], () => this.render());
|
|
677
676
|
this.on_change([active_header_background, collapsed, header_background], () => {
|
|
@@ -1178,7 +1177,7 @@
|
|
|
1178
1177
|
});
|
|
1179
1178
|
})();
|
|
1180
1179
|
},
|
|
1181
|
-
"
|
|
1180
|
+
"f7b17ce11c": /* models/tabulator.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
1182
1181
|
__esModule();
|
|
1183
1182
|
var _a, _b, _c, _d;
|
|
1184
1183
|
const dom_1 = require("@bokehjs/core/dom");
|
|
@@ -1508,6 +1507,8 @@
|
|
|
1508
1507
|
this.connect(p.sorters.change, () => this.setSorters());
|
|
1509
1508
|
this.connect(p.theme_classes.change, () => this.setCSSClasses(this.tabulator.element));
|
|
1510
1509
|
this.connect(this.model.source.properties.data.change, () => {
|
|
1510
|
+
if (this.tabulator === undefined)
|
|
1511
|
+
return;
|
|
1511
1512
|
this._selection_updating = true;
|
|
1512
1513
|
this.setData();
|
|
1513
1514
|
this._selection_updating = false;
|
|
@@ -6820,7 +6821,7 @@
|
|
|
6820
6821
|
});
|
|
6821
6822
|
});
|
|
6822
6823
|
},
|
|
6823
|
-
"
|
|
6824
|
+
"ab30c7afd7": /* models/file_download.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
6824
6825
|
__esModule();
|
|
6825
6826
|
const tslib_1 = require("tslib");
|
|
6826
6827
|
var _a;
|
|
@@ -6894,8 +6895,7 @@
|
|
|
6894
6895
|
// 3. auto=True: The widget is a button, i.e right click to "Save as..." won't work
|
|
6895
6896
|
this.anchor_el = document.createElement('a');
|
|
6896
6897
|
this.button_el = (0, dom_1.button)({
|
|
6897
|
-
disabled: this.model.disabled
|
|
6898
|
-
type: "bk_btn, bk_btn_type",
|
|
6898
|
+
disabled: this.model.disabled
|
|
6899
6899
|
});
|
|
6900
6900
|
if (this.icon_view != null) {
|
|
6901
6901
|
const separator = this.model.label != "" ? (0, dom_1.nbsp)() : (0, dom_1.text)("");
|
|
@@ -7715,7 +7715,7 @@
|
|
|
7715
7715
|
}));
|
|
7716
7716
|
})();
|
|
7717
7717
|
},
|
|
7718
|
-
"
|
|
7718
|
+
"8349fbd43e": /* models/perspective.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
7719
7719
|
__esModule();
|
|
7720
7720
|
var _a, _b;
|
|
7721
7721
|
const bokeh_events_1 = require("@bokehjs/core/bokeh_events");
|
|
@@ -7930,8 +7930,13 @@
|
|
|
7930
7930
|
}
|
|
7931
7931
|
get data() {
|
|
7932
7932
|
const data = {};
|
|
7933
|
-
for (const column of this.model.source.columns())
|
|
7934
|
-
|
|
7933
|
+
for (const column of this.model.source.columns()) {
|
|
7934
|
+
let array = this.model.source.get_array(column);
|
|
7935
|
+
if (this.model.schema[column] == 'datetime' && array.includes(-9223372036854776)) {
|
|
7936
|
+
array = array.map((v) => v === -9223372036854776 ? null : v);
|
|
7937
|
+
}
|
|
7938
|
+
data[column] = array;
|
|
7939
|
+
}
|
|
7935
7940
|
return data;
|
|
7936
7941
|
}
|
|
7937
7942
|
setData() {
|
|
@@ -8373,7 +8378,7 @@
|
|
|
8373
8378
|
_a.override({ width: 400 });
|
|
8374
8379
|
})();
|
|
8375
8380
|
},
|
|
8376
|
-
"
|
|
8381
|
+
"dd1700da9e": /* models/plotly.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8377
8382
|
__esModule();
|
|
8378
8383
|
var _a;
|
|
8379
8384
|
const dom_1 = require("@bokehjs/core/dom");
|
|
@@ -8381,7 +8386,7 @@
|
|
|
8381
8386
|
const eq_1 = require("@bokehjs/core/util/eq");
|
|
8382
8387
|
const column_data_source_1 = require("@bokehjs/models/sources/column_data_source");
|
|
8383
8388
|
const debounce_1 = require("99a25e6992") /* debounce */;
|
|
8384
|
-
const util_1 = require("
|
|
8389
|
+
const util_1 = require("9f4006d93a") /* ./util */;
|
|
8385
8390
|
const layout_1 = require("cac5f3ed28") /* ./layout */;
|
|
8386
8391
|
function convertUndefined(obj) {
|
|
8387
8392
|
Object
|
|
@@ -8638,12 +8643,7 @@
|
|
|
8638
8643
|
for (const column of cds.columns()) {
|
|
8639
8644
|
let array = cds.get_array(column)[0];
|
|
8640
8645
|
if (array.shape != null && array.shape.length > 1) {
|
|
8641
|
-
|
|
8642
|
-
const shape = array.shape;
|
|
8643
|
-
for (let s = 0; s < shape[0]; s++) {
|
|
8644
|
-
arrays.push(array.slice(s * shape[1], (s + 1) * shape[1]));
|
|
8645
|
-
}
|
|
8646
|
-
array = arrays;
|
|
8646
|
+
array = (0, util_1.reshape)(array, array.shape);
|
|
8647
8647
|
}
|
|
8648
8648
|
let prop_path = column.split(".");
|
|
8649
8649
|
let prop = prop_path[prop_path.length - 1];
|
|
@@ -8751,8 +8751,9 @@
|
|
|
8751
8751
|
}));
|
|
8752
8752
|
})();
|
|
8753
8753
|
},
|
|
8754
|
-
"
|
|
8754
|
+
"9f4006d93a": /* models/util.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8755
8755
|
__esModule();
|
|
8756
|
+
const array_1 = require("@bokehjs/core/util/array");
|
|
8756
8757
|
const get = (obj, path, defaultValue = undefined) => {
|
|
8757
8758
|
const travel = (regexp) => String.prototype.split
|
|
8758
8759
|
.call(path, regexp)
|
|
@@ -8803,6 +8804,26 @@
|
|
|
8803
8804
|
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
8804
8805
|
}
|
|
8805
8806
|
exports.isPlainObject = isPlainObject;
|
|
8807
|
+
function reshape(arr, dim) {
|
|
8808
|
+
let elemIndex = 0;
|
|
8809
|
+
if (!dim || !arr)
|
|
8810
|
+
return [];
|
|
8811
|
+
function _nest(dimIndex) {
|
|
8812
|
+
let result = [];
|
|
8813
|
+
if (dimIndex === dim.length - 1) {
|
|
8814
|
+
result = (0, array_1.concat)(arr.slice(elemIndex, elemIndex + dim[dimIndex]));
|
|
8815
|
+
elemIndex += dim[dimIndex];
|
|
8816
|
+
}
|
|
8817
|
+
else {
|
|
8818
|
+
for (let i = 0; i < dim[dimIndex]; i++) {
|
|
8819
|
+
result.push(_nest(dimIndex + 1));
|
|
8820
|
+
}
|
|
8821
|
+
}
|
|
8822
|
+
return result;
|
|
8823
|
+
}
|
|
8824
|
+
return _nest(0);
|
|
8825
|
+
}
|
|
8826
|
+
exports.reshape = reshape;
|
|
8806
8827
|
},
|
|
8807
8828
|
"e6caa5bc95": /* models/progress.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8808
8829
|
__esModule();
|
|
@@ -8883,44 +8904,11 @@
|
|
|
8883
8904
|
}));
|
|
8884
8905
|
})();
|
|
8885
8906
|
},
|
|
8886
|
-
"
|
|
8907
|
+
"361033d351": /* models/quill.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
8887
8908
|
__esModule();
|
|
8888
8909
|
var _a;
|
|
8889
8910
|
const dom_1 = require("@bokehjs/core/dom");
|
|
8890
8911
|
const layout_1 = require("cac5f3ed28") /* ./layout */;
|
|
8891
|
-
const normalizeNative = (nativeRange) => {
|
|
8892
|
-
var _b, _c;
|
|
8893
|
-
// document.getSelection model has properties startContainer and endContainer
|
|
8894
|
-
// shadow.getSelection model has baseNode and focusNode
|
|
8895
|
-
// Unify formats to always look like document.getSelection
|
|
8896
|
-
if (nativeRange) {
|
|
8897
|
-
const range = nativeRange;
|
|
8898
|
-
// // HACK: To allow pasting
|
|
8899
|
-
if (((_c = (_b = range.baseNode) === null || _b === void 0 ? void 0 : _b.classList) === null || _c === void 0 ? void 0 : _c.value) === 'ql-clipboard') {
|
|
8900
|
-
return null;
|
|
8901
|
-
}
|
|
8902
|
-
if (range.baseNode) {
|
|
8903
|
-
range.startContainer = nativeRange.baseNode;
|
|
8904
|
-
range.endContainer = nativeRange.focusNode;
|
|
8905
|
-
range.startOffset = nativeRange.baseOffset;
|
|
8906
|
-
range.endOffset = nativeRange.focusOffset;
|
|
8907
|
-
if (range.endOffset < range.startOffset) {
|
|
8908
|
-
range.startContainer = nativeRange.focusNode;
|
|
8909
|
-
range.endContainer = nativeRange.baseNode;
|
|
8910
|
-
range.startOffset = nativeRange.focusOffset;
|
|
8911
|
-
range.endOffset = nativeRange.baseOffset;
|
|
8912
|
-
}
|
|
8913
|
-
}
|
|
8914
|
-
if (range.startContainer) {
|
|
8915
|
-
return {
|
|
8916
|
-
start: { node: range.startContainer, offset: range.startOffset },
|
|
8917
|
-
end: { node: range.endContainer, offset: range.endOffset },
|
|
8918
|
-
native: range
|
|
8919
|
-
};
|
|
8920
|
-
}
|
|
8921
|
-
}
|
|
8922
|
-
return null;
|
|
8923
|
-
};
|
|
8924
8912
|
class QuillInputView extends layout_1.HTMLBoxView {
|
|
8925
8913
|
connect_signals() {
|
|
8926
8914
|
super.connect_signals();
|
|
@@ -8972,16 +8960,85 @@
|
|
|
8972
8960
|
placeholder: this.model.placeholder,
|
|
8973
8961
|
theme: theme
|
|
8974
8962
|
});
|
|
8975
|
-
// Apply
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8963
|
+
// Apply ShadowDOM patch found at:
|
|
8964
|
+
// https://github.com/quilljs/quill/issues/2961#issuecomment-1775999845
|
|
8965
|
+
const hasShadowRootSelection = !!(document.createElement('div').attachShadow({ mode: 'open' }).getSelection);
|
|
8966
|
+
// Each browser engine has a different implementation for retrieving the Range
|
|
8967
|
+
const getNativeRange = (rootNode) => {
|
|
8968
|
+
try {
|
|
8969
|
+
if (hasShadowRootSelection) {
|
|
8970
|
+
// In Chromium, the shadow root has a getSelection function which returns the range
|
|
8971
|
+
return rootNode.getSelection().getRangeAt(0);
|
|
8972
|
+
}
|
|
8973
|
+
else {
|
|
8974
|
+
const selection = window.getSelection();
|
|
8975
|
+
if (selection.getComposedRanges) {
|
|
8976
|
+
// Webkit range retrieval is done with getComposedRanges (see: https://bugs.webkit.org/show_bug.cgi?id=163921)
|
|
8977
|
+
return selection.getComposedRanges(rootNode)[0];
|
|
8978
|
+
}
|
|
8979
|
+
else {
|
|
8980
|
+
// Gecko implements the range API properly in Native Shadow: https://developer.mozilla.org/en-US/docs/Web/API/Selection/getRangeAt
|
|
8981
|
+
return selection.getRangeAt(0);
|
|
8982
|
+
}
|
|
8983
|
+
}
|
|
8984
|
+
}
|
|
8985
|
+
catch (_b) {
|
|
8986
|
+
return null;
|
|
8987
|
+
}
|
|
8988
|
+
};
|
|
8989
|
+
/**
|
|
8990
|
+
* Original implementation uses document.active element which does not work in Native Shadow.
|
|
8991
|
+
* Replace document.activeElement with shadowRoot.activeElement
|
|
8992
|
+
**/
|
|
8993
|
+
this.quill.selection.hasFocus = () => {
|
|
8994
|
+
const rootNode = this.quill.root.getRootNode();
|
|
8995
|
+
return rootNode.activeElement === this.quill.root;
|
|
8996
|
+
};
|
|
8997
|
+
/**
|
|
8998
|
+
* Original implementation uses document.getSelection which does not work in Native Shadow.
|
|
8999
|
+
* Replace document.getSelection with shadow dom equivalent (different for each browser)
|
|
9000
|
+
**/
|
|
9001
|
+
this.quill.selection.getNativeRange = () => {
|
|
9002
|
+
const rootNode = this.quill.root.getRootNode();
|
|
9003
|
+
const nativeRange = getNativeRange(rootNode);
|
|
9004
|
+
return !!nativeRange ? this.quill.selection.normalizeNative(nativeRange) : null;
|
|
9005
|
+
};
|
|
9006
|
+
/**
|
|
9007
|
+
* Original implementation relies on Selection.addRange to programmatically set the range, which does not work
|
|
9008
|
+
* in Webkit with Native Shadow. Selection.addRange works fine in Chromium and Gecko.
|
|
9009
|
+
**/
|
|
9010
|
+
this.quill.selection.setNativeRange = (startNode, startOffset) => {
|
|
9011
|
+
var endNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : startNode;
|
|
9012
|
+
var endOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : startOffset;
|
|
9013
|
+
var force = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
9014
|
+
if (startNode != null && (this.quill.selection.root.parentNode == null || startNode.parentNode == null || endNode.parentNode == null)) {
|
|
9015
|
+
return;
|
|
9016
|
+
}
|
|
9017
|
+
var selection = document.getSelection();
|
|
9018
|
+
if (selection == null)
|
|
9019
|
+
return;
|
|
9020
|
+
if (startNode != null) {
|
|
9021
|
+
if (!this.quill.selection.hasFocus())
|
|
9022
|
+
this.quill.selection.root.focus();
|
|
9023
|
+
var native = (this.quill.selection.getNativeRange() || {}).native;
|
|
9024
|
+
if (native == null || force || startNode !== native.startContainer || startOffset !== native.startOffset || endNode !== native.endContainer || endOffset !== native.endOffset) {
|
|
9025
|
+
if (startNode.tagName == "BR") {
|
|
9026
|
+
startOffset = [].indexOf.call(startNode.parentNode.childNodes, startNode);
|
|
9027
|
+
startNode = startNode.parentNode;
|
|
9028
|
+
}
|
|
9029
|
+
if (endNode.tagName == "BR") {
|
|
9030
|
+
endOffset = [].indexOf.call(endNode.parentNode.childNodes, endNode);
|
|
9031
|
+
endNode = endNode.parentNode;
|
|
9032
|
+
}
|
|
9033
|
+
selection.setBaseAndExtent(startNode, startOffset, endNode, endOffset);
|
|
9034
|
+
}
|
|
9035
|
+
}
|
|
9036
|
+
else {
|
|
9037
|
+
selection.removeAllRanges();
|
|
9038
|
+
this.quill.selection.root.blur();
|
|
9039
|
+
document.body.focus();
|
|
9040
|
+
}
|
|
9041
|
+
};
|
|
8985
9042
|
this._editor = this.shadow_el.querySelector('.ql-editor');
|
|
8986
9043
|
this._toolbar = this.shadow_el.querySelector('.ql-toolbar');
|
|
8987
9044
|
const delta = this.quill.clipboard.convert(this.model.text);
|
|
@@ -10761,10 +10818,11 @@
|
|
|
10761
10818
|
}));
|
|
10762
10819
|
})();
|
|
10763
10820
|
},
|
|
10764
|
-
"
|
|
10821
|
+
"81d14820f0": /* models/icon.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
10765
10822
|
__esModule();
|
|
10766
10823
|
var _a;
|
|
10767
10824
|
const tabler_icon_1 = require("@bokehjs/models/ui/icons/tabler_icon");
|
|
10825
|
+
const svg_icon_1 = require("@bokehjs/models/ui/icons/svg_icon");
|
|
10768
10826
|
const control_1 = require("@bokehjs/models/widgets/control");
|
|
10769
10827
|
const build_views_1 = require("@bokehjs/core/build_views");
|
|
10770
10828
|
class ToggleIconView extends control_1.ControlView {
|
|
@@ -10776,15 +10834,16 @@
|
|
|
10776
10834
|
}
|
|
10777
10835
|
async lazy_initialize() {
|
|
10778
10836
|
await super.lazy_initialize();
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
this.icon_view = await (0, build_views_1.build_view)(icon_model, { parent: this });
|
|
10782
|
-
this.icon_view.el.addEventListener('click', () => this.toggle_value());
|
|
10837
|
+
this.was_svg_icon = this.is_svg_icon(this.model.icon);
|
|
10838
|
+
this.icon_view = await this.build_icon_model(this.model.icon, this.was_svg_icon);
|
|
10783
10839
|
}
|
|
10784
10840
|
*children() {
|
|
10785
10841
|
yield* super.children();
|
|
10786
10842
|
yield this.icon_view;
|
|
10787
10843
|
}
|
|
10844
|
+
is_svg_icon(icon) {
|
|
10845
|
+
return icon.trim().startsWith('<svg');
|
|
10846
|
+
}
|
|
10788
10847
|
toggle_value() {
|
|
10789
10848
|
if (this.model.disabled) {
|
|
10790
10849
|
return;
|
|
@@ -10808,9 +10867,39 @@
|
|
|
10808
10867
|
update_cursor() {
|
|
10809
10868
|
this.icon_view.el.style.cursor = this.model.disabled ? 'not-allowed' : 'pointer';
|
|
10810
10869
|
}
|
|
10811
|
-
|
|
10870
|
+
async build_icon_model(icon, is_svg_icon) {
|
|
10871
|
+
const size = this.calculate_size();
|
|
10872
|
+
let icon_model;
|
|
10873
|
+
if (is_svg_icon) {
|
|
10874
|
+
icon_model = new svg_icon_1.SVGIcon({ svg: icon, size: size });
|
|
10875
|
+
}
|
|
10876
|
+
else {
|
|
10877
|
+
icon_model = new tabler_icon_1.TablerIcon({ icon_name: icon, size: size });
|
|
10878
|
+
}
|
|
10879
|
+
const icon_view = await (0, build_views_1.build_view)(icon_model, { parent: this });
|
|
10880
|
+
icon_view.el.addEventListener('click', () => this.toggle_value());
|
|
10881
|
+
return icon_view;
|
|
10882
|
+
}
|
|
10883
|
+
async update_icon() {
|
|
10812
10884
|
const icon = this.model.value ? this.get_active_icon() : this.model.icon;
|
|
10813
|
-
|
|
10885
|
+
const is_svg_icon = this.is_svg_icon(icon);
|
|
10886
|
+
if (this.was_svg_icon !== is_svg_icon) {
|
|
10887
|
+
// If the icon type has changed, we need to rebuild the icon view
|
|
10888
|
+
// and invalidate the old one.
|
|
10889
|
+
const icon_view = await this.build_icon_model(icon, is_svg_icon);
|
|
10890
|
+
icon_view.render();
|
|
10891
|
+
this.icon_view.remove();
|
|
10892
|
+
this.icon_view = icon_view;
|
|
10893
|
+
this.was_svg_icon = is_svg_icon;
|
|
10894
|
+
this.update_cursor();
|
|
10895
|
+
this.shadow_el.appendChild(this.icon_view.el);
|
|
10896
|
+
}
|
|
10897
|
+
else if (is_svg_icon) {
|
|
10898
|
+
this.icon_view.model.svg = icon;
|
|
10899
|
+
}
|
|
10900
|
+
else {
|
|
10901
|
+
this.icon_view.model.icon_name = icon;
|
|
10902
|
+
}
|
|
10814
10903
|
this.icon_view.el.style.lineHeight = '0';
|
|
10815
10904
|
}
|
|
10816
10905
|
get_active_icon() {
|
|
@@ -19932,5 +20021,5 @@
|
|
|
19932
20021
|
}
|
|
19933
20022
|
exports.initialize_fullscreen_render = initialize_fullscreen_render;
|
|
19934
20023
|
},
|
|
19935
|
-
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"e678554eae","models/ace":"464e3dc85c","models/layout":"cac5f3ed28","models/audio":"cfb5b1a85b","models/browser":"af84f1061d","models/button":"0e384ee9c4","models/card":"
|
|
20024
|
+
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"e678554eae","models/ace":"464e3dc85c","models/layout":"cac5f3ed28","models/audio":"cfb5b1a85b","models/browser":"af84f1061d","models/button":"0e384ee9c4","models/card":"5356bf07b1","models/column":"991bd33955","models/checkbox_button_group":"820473477c","models/comm_manager":"eca6f2cacb","models/customselect":"e258e515be","models/tabulator":"f7b17ce11c","models/data":"4e27eda472","models/datetime_picker":"5fd6501095","models/deckgl":"19b5a68a40","models/tooltips":"9588ab7c9e","models/echarts":"7bc4e47bd5","models/event-to-object":"490942d778","models/file_download":"ab30c7afd7","models/html":"3db2e41978","models/ipywidget":"4dfd782539","models/json":"e954d48822","models/jsoneditor":"3c56a75fcf","models/katex":"001dfd2dde","models/location":"a85ed38ee9","models/mathjax":"ca760ebc92","models/pdf":"46cccf2270","models/perspective":"8349fbd43e","models/player":"9148c6a6f9","models/plotly":"dd1700da9e","models/util":"9f4006d93a","models/progress":"e6caa5bc95","models/quill":"361033d351","models/radio_button_group":"81e6ca704a","models/reactive_html":"0590cf2a27","models/singleselect":"665213fba5","models/speech_to_text":"7651136c44","models/state":"1bb5a1aca6","models/tabs":"8013e805da","models/terminal":"4a0674b147","models/textarea_input":"59f46adc8c","models/text_to_speech":"a44f0bd49f","models/icon":"81d14820f0","models/tooltip_icon":"74000df4a0","models/trend":"c2c4524e04","models/vega":"b396729d22","models/video":"e6e8c94f32","models/videostream":"2dfabe6882","models/vizzu":"dfe3c4a2a9","models/vtk/index":"c51f25e2a7","models/vtk/vtkjs":"173e6cb054","models/vtk/vtklayout":"1de1ccb7ff","models/vtk/util":"a76a9b7c23","models/vtk/vtkcolorbar":"c010237f8b","models/vtk/vtkaxes":"5a606f3f35","models/vtk/vtkvolume":"9cb70c6ab6","models/vtk/vtksynchronized":"66775d6392","models/vtk/panel_fullscreen_renwin_sync":"877619fe71"}, {});});
|
|
19936
20025
|
//# sourceMappingURL=panel.js.map
|