mirror of
https://github.com/rstudio/shiny.git
synced 2026-01-11 07:58:11 -05:00
Compare commits
13 Commits
feat/remov
...
add-client
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f9176ac3b | ||
|
|
8f6ccd6bc4 | ||
|
|
380dfe0904 | ||
|
|
774def26de | ||
|
|
b24cbcb7b8 | ||
|
|
4d3ec8e7bd | ||
|
|
1018f7cc62 | ||
|
|
d87bcc5184 | ||
|
|
ca590f3854 | ||
|
|
a56cd962f0 | ||
|
|
078aeb23a8 | ||
|
|
f0bbc1db56 | ||
|
|
930040b66c |
2
NEWS.md
2
NEWS.md
@@ -6,6 +6,8 @@
|
||||
|
||||
* When spinners and the pulse busy indicators are enabled, Shiny now shows the pulse indicator when dynamic UI elements are recalculating if no other spinners are present in the app. (#4137)
|
||||
|
||||
* Capture and send client window size and scroll dimensions to the server which can be accessed via `session$clientData`. (#4147)
|
||||
|
||||
## Bug fixes
|
||||
|
||||
* Fixed a bug in `conditionalPanel()` that would cause the panel to repeatedly show/hide itself when the provided condition was not boolean. (@kamilzyla, #4127)
|
||||
|
||||
@@ -25132,11 +25132,17 @@
|
||||
value: function() {
|
||||
var _initialize = _asyncToGenerator14(/* @__PURE__ */ _regeneratorRuntime14().mark(function _callee3() {
|
||||
var _this2 = this;
|
||||
var shinyapp, inputBatchSender, inputsNoResend, inputsEvent, inputsRate, inputsDefer, target, inputs, inputBindings, outputBindings, shinyBindCtx, initializeInputs, getIdFromEl, initialValues, getComputedBgColor, getComputedFont, maybeAddThemeObserver, doSendTheme, doSendImageSize, isHidden, lastKnownVisibleOutputs, doSendOutputHiddenState, sendOutputHiddenStateDebouncer, sendOutputHiddenState, filterEventsByNamespace, bs3classes, singletonText, dependencyText;
|
||||
var shinyapp, inputBatchSender, inputsNoResend, inputsEvent, inputsRate, inputsDefer, target, inputs, inputBindings, outputBindings, shinyBindCtx, initializeInputs, getIdFromEl, initialValues, getComputedBgColor, getComputedFont, maybeAddThemeObserver, doSendTheme, doSendImageSize, isHidden, lastKnownVisibleOutputs, doSendOutputHiddenState, sendOutputHiddenStateDebouncer, sendOutputHiddenState, filterEventsByNamespace, bs3classes, doSendWindowSize, singletonText, dependencyText;
|
||||
return _regeneratorRuntime14().wrap(function _callee3$(_context3) {
|
||||
while (1)
|
||||
switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
doSendWindowSize = function _doSendWindowSize() {
|
||||
inputs.setInput(".clientdata_window_width", window.innerWidth);
|
||||
inputs.setInput(".clientdata_window_height", window.innerHeight);
|
||||
inputs.setInput(".clientdata_scroll_width", document.documentElement.scrollWidth);
|
||||
inputs.setInput(".clientdata_scroll_height", document.documentElement.scrollHeight);
|
||||
};
|
||||
filterEventsByNamespace = function _filterEventsByNamesp(namespace, handler) {
|
||||
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
||||
args[_key - 2] = arguments[_key];
|
||||
@@ -25364,9 +25370,9 @@
|
||||
this.initializeInputs = initializeInputs;
|
||||
initializeInputs(document.documentElement);
|
||||
_context3.t0 = mapValues;
|
||||
_context3.next = 34;
|
||||
_context3.next = 35;
|
||||
return _bindAll(shinyBindCtx(), document.documentElement);
|
||||
case 34:
|
||||
case 35:
|
||||
_context3.t1 = _context3.sent;
|
||||
_context3.t2 = function(x2) {
|
||||
return x2.value;
|
||||
@@ -25438,6 +25444,11 @@
|
||||
return;
|
||||
e4;
|
||||
});
|
||||
initialValues[".clientdata_window_width"] = window.innerWidth;
|
||||
initialValues[".clientdata_window_height"] = window.innerHeight;
|
||||
initialValues[".clientdata_scroll_width"] = document.documentElement.scrollWidth;
|
||||
initialValues[".clientdata_scroll_height"] = document.documentElement.scrollHeight;
|
||||
(0, import_jquery39.default)(window).resize(debounce(500, doSendWindowSize));
|
||||
singletonText = initialValues[".clientdata_singletons"] = (0, import_jquery39.default)('script[type="application/shiny-singletons"]').text();
|
||||
registerNames(singletonText.split(/,/));
|
||||
dependencyText = (0, import_jquery39.default)('script[type="application/html-dependencies"]').text();
|
||||
@@ -25455,7 +25466,7 @@
|
||||
(0, import_jquery39.default)(document).one("shiny:sessioninitialized", function() {
|
||||
_this2.initializedPromise.resolve();
|
||||
});
|
||||
case 69:
|
||||
case 75:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
inst/www/shared/shiny.min.js
vendored
2
inst/www/shared/shiny.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -646,6 +646,27 @@ class ShinyClass {
|
||||
e;
|
||||
});
|
||||
|
||||
initialValues[".clientdata_window_width"] = window.innerWidth;
|
||||
initialValues[".clientdata_window_height"] = window.innerHeight;
|
||||
initialValues[".clientdata_scroll_width"] =
|
||||
document.documentElement.scrollWidth;
|
||||
initialValues[".clientdata_scroll_height"] =
|
||||
document.documentElement.scrollHeight;
|
||||
|
||||
function doSendWindowSize() {
|
||||
inputs.setInput(".clientdata_window_width", window.innerWidth);
|
||||
inputs.setInput(".clientdata_window_height", window.innerHeight);
|
||||
inputs.setInput(
|
||||
".clientdata_scroll_width",
|
||||
document.documentElement.scrollWidth
|
||||
);
|
||||
inputs.setInput(
|
||||
".clientdata_scroll_height",
|
||||
document.documentElement.scrollHeight
|
||||
);
|
||||
}
|
||||
|
||||
$(window).resize(debounce(500, doSendWindowSize));
|
||||
// The server needs to know what singletons were rendered as part of
|
||||
// the page loading
|
||||
const singletonText = (initialValues[".clientdata_singletons"] = $(
|
||||
|
||||
Reference in New Issue
Block a user