mirror of
https://github.com/rstudio/shiny.git
synced 2026-01-11 16:08:19 -05:00
Compare commits
4 Commits
ts_unit
...
bootstrapL
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
923c1b2450 | ||
|
|
914dc71d67 | ||
|
|
a13ca9fd3a | ||
|
|
b8b34370da |
@@ -21,19 +21,3 @@
|
||||
^TODO-promises.md$
|
||||
^manualtests$
|
||||
^\.github$
|
||||
|
||||
^\.yarn$
|
||||
^\.vscode$
|
||||
^\.madgerc$
|
||||
^\.prettierrc\.yml$
|
||||
^babel\.config\.json$
|
||||
^jest\.config\.js$
|
||||
^package\.json$
|
||||
^tsconfig\.json$
|
||||
^yarn\.lock$
|
||||
^node_modules$
|
||||
^coverage$
|
||||
^.ignore$
|
||||
^\.browserslistrc$
|
||||
^\.eslintrc\.yml$
|
||||
^\.yarnrc\.yml$
|
||||
|
||||
12
.github/workflows/rituals.yaml
vendored
12
.github/workflows/rituals.yaml
vendored
@@ -129,7 +129,7 @@ jobs:
|
||||
tree src
|
||||
yarn install --immutable && yarn build
|
||||
git add ./src && git commit -m 'yarn lint (GitHub Actions)' || echo "No yarn lint changes to commit"
|
||||
git add ./types && git commit -m 'yarn tsc (GitHub Actions)' || echo "No type definition changes to commit"
|
||||
git add ./src_d && git commit -m 'yarn tsc (GitHub Actions)' || echo "No type definition changes to commit"
|
||||
git add ../inst && git commit -m 'yarn build (GitHub Actions)' || echo "No yarn build changes to commit"
|
||||
if [ -n "$(git status --porcelain)" ]
|
||||
then
|
||||
@@ -145,16 +145,10 @@ jobs:
|
||||
if: github.event_name == 'pull_request'
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Verify no un-pushed commits (MASTER)
|
||||
- name: Git Push (MASTER)
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
# Can't push to a protected branch
|
||||
if [ -z "`git cherry`"]; then
|
||||
echo "Un-pushed commits:"
|
||||
git cherry -v
|
||||
echo "\nCan not push to a protected branch. Exiting"
|
||||
exit 1
|
||||
fi
|
||||
git push https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:${{ github.ref }} || echo "No changes to push"
|
||||
|
||||
# Execute after pushing, as no updated files will be produced
|
||||
- name: Test TypeScript code
|
||||
|
||||
13
.gitignore
vendored
13
.gitignore
vendored
@@ -11,18 +11,5 @@ README.html
|
||||
.*.Rnb.cached
|
||||
tools/yarn-error.log
|
||||
|
||||
# TypeScript / yarn
|
||||
node_modules/
|
||||
.cache
|
||||
.yarn/*
|
||||
!.yarn/releases
|
||||
!.yarn/plugins
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
.pnp.*
|
||||
coverage/
|
||||
madge.svg
|
||||
|
||||
|
||||
# GHA remotes installation
|
||||
.github/r-depends.rds
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Package: shiny
|
||||
Type: Package
|
||||
Title: Web Application Framework for R
|
||||
Version: 1.6.0.9021
|
||||
Version: 1.6.0.9022
|
||||
Authors@R: c(
|
||||
person("Winston", "Chang", role = c("aut", "cre"), email = "winston@rstudio.com", comment = c(ORCID = "0000-0002-1576-2126")),
|
||||
person("Joe", "Cheng", role = "aut", email = "joe@rstudio.com"),
|
||||
@@ -79,7 +79,7 @@ Imports:
|
||||
jsonlite (>= 0.9.16),
|
||||
xtable,
|
||||
fontawesome (>= 0.2.1),
|
||||
htmltools (>= 0.5.1.9003),
|
||||
htmltools (>= 0.5.1.9006),
|
||||
R6 (>= 2.0),
|
||||
sourcetools,
|
||||
later (>= 1.0.0),
|
||||
|
||||
@@ -50,7 +50,7 @@ bootstrapPage <- function(..., title = NULL, theme = NULL, lang = NULL) {
|
||||
# the tagList() contents to avoid breaking user code that makes assumptions
|
||||
# about the return value https://github.com/rstudio/shiny/issues/3235
|
||||
if (is_bs_theme(theme)) {
|
||||
args <- c(bootstrapLib(theme), args)
|
||||
args <- list(bootstrapLib(theme), args)
|
||||
ui <- do.call(tagList, args)
|
||||
} else {
|
||||
ui <- do.call(tagList, args)
|
||||
@@ -82,53 +82,30 @@ getLang <- function(ui) {
|
||||
#' @inheritParams bootstrapPage
|
||||
#' @export
|
||||
bootstrapLib <- function(theme = NULL) {
|
||||
tagFunction(function() {
|
||||
if (isRunning()) {
|
||||
# In the non-bslib case, return static HTML dependencies
|
||||
if (!is_bs_theme(theme)) {
|
||||
return(bootstrapDependency(theme))
|
||||
}
|
||||
# To support static rendering of Bootstrap version dependent markup (e.g.,
|
||||
# tabsetPanel()), setCurrentTheme() at the start of the render (since
|
||||
# bootstrapLib() comes first in bootstrapPage(), all other UI should then know
|
||||
# what version of Bootstrap is being used). Then restore state after render as
|
||||
# long as shiny isn't running (in that case, since setCurrentTheme() uses
|
||||
# shinyOptions(), state will be automatically be restored when the app exits)
|
||||
oldTheme <- NULL
|
||||
tagList(
|
||||
.renderHook = function(x) {
|
||||
oldTheme <<- getCurrentTheme()
|
||||
setCurrentTheme(theme)
|
||||
# For refreshing Bootstrap CSS when session$setCurrentTheme() happens
|
||||
if (isRunning()) registerThemeDependency(bs_theme_deps)
|
||||
attachDependencies(x, bslib::bs_theme_dependencies(theme))
|
||||
},
|
||||
.postRenderHook = function() {
|
||||
if (!isRunning()) setCurrentTheme(oldTheme)
|
||||
NULL
|
||||
}
|
||||
|
||||
# If we're not compiling Bootstrap Sass (from bslib), return the
|
||||
# static Bootstrap build.
|
||||
if (!is_bs_theme(theme)) {
|
||||
# We'll enter here if `theme` is the path to a .css file, like that
|
||||
# provided by `shinythemes::shinytheme("darkly")`.
|
||||
return(bootstrapDependency(theme))
|
||||
}
|
||||
|
||||
# Make bootstrap Sass available so other tagFunction()s (e.g.,
|
||||
# sliderInput() et al) can resolve their HTML dependencies at render time
|
||||
# using getCurrentTheme(). Note that we're making an implicit assumption
|
||||
# that this tagFunction() executes *before* all other tagFunction()s; but
|
||||
# that should be fine considering that, DOM tree order is preorder,
|
||||
# depth-first traversal, and at least in the bootstrapPage(theme) case, we
|
||||
# have control over the relative ordering.
|
||||
# https://dom.spec.whatwg.org/#concept-tree
|
||||
# https://stackoverflow.com/a/16113998/1583084
|
||||
#
|
||||
# Note also that since this is shinyOptions() (and not options()), the
|
||||
# option is automatically reset when the app (or session) exits
|
||||
if (isRunning()) {
|
||||
registerThemeDependency(bs_theme_deps)
|
||||
|
||||
} else {
|
||||
# Technically, this a potential issue (someone trying to execute/render
|
||||
# bootstrapLib outside of a Shiny app), but it seems that, in that case,
|
||||
# you likely have other problems, since sliderInput() et al. already assume
|
||||
# that Shiny is the one doing the rendering
|
||||
#warning(
|
||||
# "It appears `shiny::bootstrapLib()` was rendered outside of an Shiny ",
|
||||
# "application context, likely by calling `as.tags()`, `as.character()`, ",
|
||||
# "or `print()` directly on `bootstrapLib()` or UI components that may ",
|
||||
# "depend on it (e.g., `fluidPage()`, etc). For 'themable' UI components ",
|
||||
# "(e.g., `sliderInput()`, `selectInput()`, `dateInput()`, etc) to style ",
|
||||
# "themselves based on the Bootstrap theme, make sure `bootstrapLib()` is ",
|
||||
# "provided directly to the UI and that the UI is provided direction to ",
|
||||
# "`shinyApp()` (or `runApp()`)", call. = FALSE
|
||||
#)
|
||||
}
|
||||
|
||||
bslib::bs_theme_dependencies(theme)
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
# This is defined outside of bootstrapLib() because registerThemeDependency()
|
||||
|
||||
@@ -208,15 +208,6 @@ selectizeIt <- function(inputId, select, options, nonempty = FALSE) {
|
||||
options$plugins <- c(options$plugins, list('selectize-plugin-a11y'))
|
||||
}
|
||||
|
||||
# to prevent clipping of the selectize drop-down we set the dropdownParent
|
||||
# to "body". This might be necessary if e.g. overflow-x: scroll is set
|
||||
# on it's container, which forces overflow-y to 'auto' (as per
|
||||
# https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-y). Discussion
|
||||
# of usage here: https://github.com/selectize/selectize.js/issues/192
|
||||
if (is.null(options$dropdownParent)) {
|
||||
options$dropdownParent <- "body"
|
||||
}
|
||||
|
||||
res <- checkAsIs(options)
|
||||
|
||||
deps <- list(selectizeDependency())
|
||||
|
||||
File diff suppressed because one or more lines are too long
6755
inst/www/shared/shiny-es5.js
Normal file
6755
inst/www/shared/shiny-es5.js
Normal file
File diff suppressed because it is too large
Load Diff
1
inst/www/shared/shiny-es5.js.map
Normal file
1
inst/www/shared/shiny-es5.js.map
Normal file
File diff suppressed because one or more lines are too long
4
inst/www/shared/shiny-es5.min.js
vendored
Normal file
4
inst/www/shared/shiny-es5.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
inst/www/shared/shiny-es5.min.js.map
Normal file
1
inst/www/shared/shiny-es5.min.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -191,7 +191,7 @@
|
||||
"node_modules/core-js/internals/has.js": function(exports, module) {
|
||||
var toObject6 = require_to_object();
|
||||
var hasOwnProperty2 = {}.hasOwnProperty;
|
||||
module.exports = Object.hasOwn || function hasOwn(it, key) {
|
||||
module.exports = function hasOwn(it, key) {
|
||||
return hasOwnProperty2.call(toObject6(it), key);
|
||||
};
|
||||
}
|
||||
@@ -371,7 +371,7 @@
|
||||
(module.exports = function(key, value) {
|
||||
return store[key] || (store[key] = value !== void 0 ? value : {});
|
||||
})("versions", []).push({
|
||||
version: "3.14.0",
|
||||
version: "3.13.0",
|
||||
mode: IS_PURE2 ? "pure" : "global",
|
||||
copyright: "\xA9 2021 Denis Pushkarev (zloirock.ru)"
|
||||
});
|
||||
@@ -1015,8 +1015,7 @@
|
||||
var V8_VERSION2 = require_engine_v8_version();
|
||||
var fails11 = require_fails();
|
||||
module.exports = !!Object.getOwnPropertySymbols && !fails11(function() {
|
||||
var symbol = Symbol();
|
||||
return !String(symbol) || !(Object(symbol) instanceof Symbol) || !Symbol.sham && V8_VERSION2 && V8_VERSION2 < 41;
|
||||
return !String(Symbol()) || !Symbol.sham && V8_VERSION2 && V8_VERSION2 < 41;
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -2781,7 +2780,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
// srcts/src/initialize/disableForm.ts
|
||||
// src/initialize/disableForm.ts
|
||||
var import_jquery = __toModule(require_jquery());
|
||||
function disableFormSubmission() {
|
||||
(0, import_jquery.default)(document).on("submit", "form:not([action])", function(e) {
|
||||
@@ -2789,7 +2788,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// srcts/src/initialize/history.ts
|
||||
// src/initialize/history.ts
|
||||
var import_jquery2 = __toModule(require_jquery());
|
||||
function trackHistory() {
|
||||
var origPushState = window.history.pushState;
|
||||
@@ -2824,10 +2823,10 @@
|
||||
parseInt: parseIntImplementation
|
||||
});
|
||||
|
||||
// srcts/src/initialize/browser.ts
|
||||
// src/initialize/browser.ts
|
||||
var import_jquery3 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/utils/browser.ts
|
||||
// src/utils/browser.ts
|
||||
var isQtVal = false;
|
||||
var isIEVal = false;
|
||||
var IEVersionVal = -1;
|
||||
@@ -2850,13 +2849,13 @@
|
||||
return IEVersionVal;
|
||||
}
|
||||
|
||||
// srcts/src/utils/userAgent.ts
|
||||
// src/utils/userAgent.ts
|
||||
var userAgentVal;
|
||||
function setUserAgent(userAgent) {
|
||||
userAgentVal = userAgent;
|
||||
}
|
||||
|
||||
// srcts/src/initialize/browser.ts
|
||||
// src/initialize/browser.ts
|
||||
function getIEVersion() {
|
||||
var msie = userAgentVal.indexOf("MSIE ");
|
||||
if (isIE() && msie > 0) {
|
||||
@@ -2883,7 +2882,7 @@
|
||||
setIEVersion(getIEVersion());
|
||||
}
|
||||
|
||||
// srcts/src/window/libraries.ts
|
||||
// src/window/libraries.ts
|
||||
function windowShiny() {
|
||||
if (!window["Shiny"]) {
|
||||
window["Shiny"] = {};
|
||||
@@ -2891,7 +2890,7 @@
|
||||
return window["Shiny"];
|
||||
}
|
||||
|
||||
// srcts/src/shiny/index.ts
|
||||
// src/shiny/index.ts
|
||||
var import_jquery43 = __toModule(require_jquery());
|
||||
|
||||
// node_modules/core-js/modules/es.function.name.js
|
||||
@@ -2914,7 +2913,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// srcts/src/utils/index.ts
|
||||
// src/utils/index.ts
|
||||
var import_es_regexp_exec = __toModule(require_es_regexp_exec());
|
||||
|
||||
// node_modules/core-js/modules/es.string.replace.js
|
||||
@@ -3345,15 +3344,15 @@
|
||||
];
|
||||
}, UNSUPPORTED_Y);
|
||||
|
||||
// srcts/src/utils/index.ts
|
||||
// src/utils/index.ts
|
||||
var import_jquery5 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/window/pixelRatio.ts
|
||||
// src/window/pixelRatio.ts
|
||||
function windowDevicePixelRatio() {
|
||||
return window.devicePixelRatio;
|
||||
}
|
||||
|
||||
// srcts/src/utils/blob.ts
|
||||
// src/utils/blob.ts
|
||||
var import_jquery4 = __toModule(require_jquery());
|
||||
var BlobBuilder;
|
||||
function setBlobBuilder(BlobBuilder_) {
|
||||
@@ -3372,12 +3371,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
// srcts/src/utils/Object.ts
|
||||
// src/utils/Object.ts
|
||||
function hasOwnProperty(x, y) {
|
||||
return Object.prototype.hasOwnProperty.call(x, y);
|
||||
}
|
||||
|
||||
// srcts/src/utils/index.ts
|
||||
// src/utils/index.ts
|
||||
function escapeHTML(str) {
|
||||
var escaped = {
|
||||
"&": "&",
|
||||
@@ -3525,7 +3524,7 @@
|
||||
function mapValues(obj, f) {
|
||||
var newObj = {};
|
||||
for (var _key in obj) {
|
||||
if (hasOwnProperty(obj, _key))
|
||||
if (obj.hasOwnProperty(_key))
|
||||
newObj[_key] = f(obj[_key], _key, obj);
|
||||
}
|
||||
return newObj;
|
||||
@@ -3631,7 +3630,7 @@
|
||||
return !window.bootstrap;
|
||||
}
|
||||
|
||||
// srcts/src/bindings/registry.ts
|
||||
// src/bindings/registry.ts
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
@@ -3709,7 +3708,7 @@
|
||||
return BindingRegistry2;
|
||||
}();
|
||||
|
||||
// srcts/src/bindings/input/InputBinding.ts
|
||||
// src/bindings/input/InputBinding.ts
|
||||
function _classCallCheck2(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
@@ -4238,7 +4237,7 @@
|
||||
var defineWellKnownSymbol2 = require_define_well_known_symbol();
|
||||
defineWellKnownSymbol2("iterator");
|
||||
|
||||
// srcts/src/bindings/input/checkbox.ts
|
||||
// src/bindings/input/checkbox.ts
|
||||
var import_es_array_iterator = __toModule(require_es_array_iterator());
|
||||
|
||||
// node_modules/core-js/modules/es.string.iterator.js
|
||||
@@ -4304,7 +4303,7 @@
|
||||
var CollectionPrototype;
|
||||
var METHOD_NAME;
|
||||
|
||||
// srcts/src/bindings/input/checkbox.ts
|
||||
// src/bindings/input/checkbox.ts
|
||||
var import_jquery6 = __toModule(require_jquery());
|
||||
function _typeof(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
@@ -4468,7 +4467,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
// srcts/src/bindings/input/checkboxgroup.ts
|
||||
// src/bindings/input/checkboxgroup.ts
|
||||
var import_es_array_iterator2 = __toModule(require_es_array_iterator());
|
||||
var import_jquery7 = __toModule(require_jquery());
|
||||
function _typeof2(obj) {
|
||||
@@ -4748,7 +4747,7 @@
|
||||
var j;
|
||||
var key;
|
||||
|
||||
// srcts/src/bindings/input/number.ts
|
||||
// src/bindings/input/number.ts
|
||||
var import_es_array_iterator4 = __toModule(require_es_array_iterator());
|
||||
var import_jquery9 = __toModule(require_jquery());
|
||||
|
||||
@@ -4789,7 +4788,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
// srcts/src/bindings/input/text.ts
|
||||
// src/bindings/input/text.ts
|
||||
var import_es_array_iterator3 = __toModule(require_es_array_iterator());
|
||||
var import_jquery8 = __toModule(require_jquery());
|
||||
function _typeof3(obj) {
|
||||
@@ -5029,7 +5028,7 @@
|
||||
return TextInputBinding2;
|
||||
}(TextInputBindingBase);
|
||||
|
||||
// srcts/src/bindings/input/number.ts
|
||||
// src/bindings/input/number.ts
|
||||
function _typeof4(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
@@ -5197,7 +5196,7 @@
|
||||
return NumberInputBinding2;
|
||||
}(TextInputBindingBase);
|
||||
|
||||
// srcts/src/bindings/input/password.ts
|
||||
// src/bindings/input/password.ts
|
||||
var import_es_array_iterator5 = __toModule(require_es_array_iterator());
|
||||
var import_jquery10 = __toModule(require_jquery());
|
||||
function _typeof5(obj) {
|
||||
@@ -5318,7 +5317,7 @@
|
||||
return PasswordInputBinding2;
|
||||
}(TextInputBinding);
|
||||
|
||||
// srcts/src/bindings/input/textarea.ts
|
||||
// src/bindings/input/textarea.ts
|
||||
var import_es_array_iterator6 = __toModule(require_es_array_iterator());
|
||||
var import_jquery11 = __toModule(require_jquery());
|
||||
function _typeof6(obj) {
|
||||
@@ -5433,7 +5432,7 @@
|
||||
return TextareaInputBinding2;
|
||||
}(TextInputBinding);
|
||||
|
||||
// srcts/src/bindings/input/radio.ts
|
||||
// src/bindings/input/radio.ts
|
||||
var import_es_array_iterator7 = __toModule(require_es_array_iterator());
|
||||
var import_jquery12 = __toModule(require_jquery());
|
||||
function _typeof7(obj) {
|
||||
@@ -5630,7 +5629,7 @@
|
||||
return RadioInputBinding2;
|
||||
}(InputBinding);
|
||||
|
||||
// srcts/src/bindings/input/date.ts
|
||||
// src/bindings/input/date.ts
|
||||
var import_es_array_iterator8 = __toModule(require_es_array_iterator());
|
||||
var import_jquery13 = __toModule(require_jquery());
|
||||
function _typeof8(obj) {
|
||||
@@ -5960,7 +5959,7 @@
|
||||
return DateInputBinding2;
|
||||
}(DateInputBindingBase);
|
||||
|
||||
// srcts/src/bindings/input/slider.ts
|
||||
// src/bindings/input/slider.ts
|
||||
var import_es_regexp_exec2 = __toModule(require_es_regexp_exec());
|
||||
var import_es_array_iterator9 = __toModule(require_es_array_iterator());
|
||||
var import_jquery14 = __toModule(require_jquery());
|
||||
@@ -6350,7 +6349,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
// srcts/src/bindings/input/daterange.ts
|
||||
// src/bindings/input/daterange.ts
|
||||
var import_es_array_iterator10 = __toModule(require_es_array_iterator());
|
||||
var import_jquery15 = __toModule(require_jquery());
|
||||
function _typeof10(obj) {
|
||||
@@ -6589,14 +6588,14 @@
|
||||
return DateRangeInputBinding2;
|
||||
}(DateInputBindingBase);
|
||||
|
||||
// srcts/src/bindings/input/selectInput.ts
|
||||
// src/bindings/input/selectInput.ts
|
||||
var import_es_array_iterator11 = __toModule(require_es_array_iterator());
|
||||
var import_jquery16 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/utils/eval.ts
|
||||
// src/utils/eval.ts
|
||||
var indirectEval = eval;
|
||||
|
||||
// srcts/src/bindings/input/selectInput.ts
|
||||
// src/bindings/input/selectInput.ts
|
||||
function _typeof11(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
@@ -6905,7 +6904,7 @@
|
||||
return SelectInputBinding2;
|
||||
}(InputBinding);
|
||||
|
||||
// srcts/src/bindings/input/actionbutton.ts
|
||||
// src/bindings/input/actionbutton.ts
|
||||
var import_es_array_iterator12 = __toModule(require_es_array_iterator());
|
||||
var import_jquery17 = __toModule(require_jquery());
|
||||
function _typeof12(obj) {
|
||||
@@ -7082,7 +7081,7 @@
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// srcts/src/bindings/input/tabinput.ts
|
||||
// src/bindings/input/tabinput.ts
|
||||
var import_es_array_iterator13 = __toModule(require_es_array_iterator());
|
||||
var import_jquery18 = __toModule(require_jquery());
|
||||
function _typeof13(obj) {
|
||||
@@ -7256,7 +7255,7 @@
|
||||
return BootstrapTabInputBinding2;
|
||||
}(InputBinding);
|
||||
|
||||
// srcts/src/bindings/input/fileinput.ts
|
||||
// src/bindings/input/fileinput.ts
|
||||
var import_es_array_iterator15 = __toModule(require_es_array_iterator());
|
||||
var import_jquery21 = __toModule(require_jquery());
|
||||
|
||||
@@ -7272,11 +7271,11 @@
|
||||
}
|
||||
});
|
||||
|
||||
// srcts/src/file/FileProcessor.ts
|
||||
// src/file/FileProcessor.ts
|
||||
var import_es_array_iterator14 = __toModule(require_es_array_iterator());
|
||||
var import_jquery20 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/events/shiny_inputchanged.ts
|
||||
// src/events/shiny_inputchanged.ts
|
||||
var import_jquery19 = __toModule(require_jquery());
|
||||
function triggerFileInputChanged(name, value, binding, el, inputType, onEl) {
|
||||
var evt = import_jquery19.default.Event("shiny:inputchanged");
|
||||
@@ -7289,7 +7288,7 @@
|
||||
return evt;
|
||||
}
|
||||
|
||||
// srcts/src/shiny/initedMethods.ts
|
||||
// src/shiny/initedMethods.ts
|
||||
var fullShinyObj_ = null;
|
||||
function setShinyObj(shiny) {
|
||||
fullShinyObj_ = shiny;
|
||||
@@ -7336,7 +7335,7 @@
|
||||
return fullShinyObj_.createSocket;
|
||||
}
|
||||
|
||||
// srcts/src/file/FileProcessor.ts
|
||||
// src/file/FileProcessor.ts
|
||||
function _typeof14(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
@@ -7676,7 +7675,7 @@
|
||||
return FileUploader2;
|
||||
}(FileProcessor);
|
||||
|
||||
// srcts/src/bindings/input/fileinput.ts
|
||||
// src/bindings/input/fileinput.ts
|
||||
function _typeof15(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
@@ -7994,7 +7993,7 @@
|
||||
return FileInputBinding2;
|
||||
}(InputBinding);
|
||||
|
||||
// srcts/src/bindings/input/index.ts
|
||||
// src/bindings/input/index.ts
|
||||
function initInputBindings() {
|
||||
var inputBindings = new BindingRegistry();
|
||||
inputBindings.register(new TextInputBinding(), "shiny.textInput");
|
||||
@@ -8018,7 +8017,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
// srcts/src/bindings/output/text.ts
|
||||
// src/bindings/output/text.ts
|
||||
var import_es_array_iterator16 = __toModule(require_es_array_iterator());
|
||||
var import_jquery23 = __toModule(require_jquery());
|
||||
|
||||
@@ -8037,7 +8036,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
// srcts/src/bindings/output/OutputBinding.ts
|
||||
// src/bindings/output/OutputBinding.ts
|
||||
var import_es_regexp_exec3 = __toModule(require_es_regexp_exec());
|
||||
var import_jquery22 = __toModule(require_jquery());
|
||||
function _classCallCheck18(instance, Constructor) {
|
||||
@@ -8140,7 +8139,7 @@
|
||||
return OutputBinding2;
|
||||
}();
|
||||
|
||||
// srcts/src/bindings/output/text.ts
|
||||
// src/bindings/output/text.ts
|
||||
function _typeof16(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
@@ -8258,7 +8257,7 @@
|
||||
return TextOutputBinding2;
|
||||
}(OutputBinding);
|
||||
|
||||
// srcts/src/bindings/output/downloadlink.ts
|
||||
// src/bindings/output/downloadlink.ts
|
||||
var import_es_array_iterator17 = __toModule(require_es_array_iterator());
|
||||
var import_jquery24 = __toModule(require_jquery());
|
||||
function _typeof17(obj) {
|
||||
@@ -8385,7 +8384,7 @@
|
||||
(0, import_jquery24.default)(document).trigger(evt);
|
||||
});
|
||||
|
||||
// srcts/src/bindings/output/datatable.ts
|
||||
// src/bindings/output/datatable.ts
|
||||
var import_es_regexp_exec4 = __toModule(require_es_regexp_exec());
|
||||
|
||||
// node_modules/core-js/modules/es.string.search.js
|
||||
@@ -8419,11 +8418,11 @@
|
||||
];
|
||||
});
|
||||
|
||||
// srcts/src/bindings/output/datatable.ts
|
||||
// src/bindings/output/datatable.ts
|
||||
var import_es_array_iterator18 = __toModule(require_es_array_iterator());
|
||||
var import_jquery25 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/time/debounce.ts
|
||||
// src/time/debounce.ts
|
||||
function _classCallCheck21(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
@@ -8536,7 +8535,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
// srcts/src/time/invoke.ts
|
||||
// src/time/invoke.ts
|
||||
function _classCallCheck22(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
@@ -8595,7 +8594,7 @@
|
||||
return Invoker2;
|
||||
}();
|
||||
|
||||
// srcts/src/time/throttle.ts
|
||||
// src/time/throttle.ts
|
||||
function _classCallCheck23(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
@@ -8693,7 +8692,7 @@
|
||||
return Throttler2;
|
||||
}();
|
||||
|
||||
// srcts/src/bindings/output/datatable.ts
|
||||
// src/bindings/output/datatable.ts
|
||||
function _typeof18(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
@@ -8872,11 +8871,11 @@
|
||||
return DatatableOutputBinding2;
|
||||
}(OutputBinding);
|
||||
|
||||
// srcts/src/bindings/output/html.ts
|
||||
// src/bindings/output/html.ts
|
||||
var import_es_array_iterator20 = __toModule(require_es_array_iterator());
|
||||
var import_jquery28 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/shiny/render.ts
|
||||
// src/shiny/render.ts
|
||||
var import_es_regexp_exec6 = __toModule(require_es_regexp_exec());
|
||||
|
||||
// node_modules/core-js/modules/es.object.entries.js
|
||||
@@ -8888,7 +8887,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
// srcts/src/shiny/render.ts
|
||||
// src/shiny/render.ts
|
||||
var import_es_array_iterator19 = __toModule(require_es_array_iterator());
|
||||
|
||||
// node_modules/core-js/modules/es.array.from.js
|
||||
@@ -8902,10 +8901,10 @@
|
||||
from: from
|
||||
});
|
||||
|
||||
// srcts/src/shiny/render.ts
|
||||
// src/shiny/render.ts
|
||||
var import_jquery27 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/shiny/sendImageSize.ts
|
||||
// src/shiny/sendImageSize.ts
|
||||
function _classCallCheck25(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
@@ -8961,7 +8960,7 @@
|
||||
}();
|
||||
var sendImageSizeFns = new SendImageSize();
|
||||
|
||||
// srcts/src/shiny/singletons.ts
|
||||
// src/shiny/singletons.ts
|
||||
var import_es_regexp_exec5 = __toModule(require_es_regexp_exec());
|
||||
var import_jquery26 = __toModule(require_jquery());
|
||||
var _reSingleton = /<!--(SHINY.SINGLETON\[([\w]+)\])-->([\s\S]*?)<!--\/\1-->/;
|
||||
@@ -9040,7 +9039,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
// srcts/src/shiny/render.ts
|
||||
// src/shiny/render.ts
|
||||
function _slicedToArray(arr, i) {
|
||||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
||||
}
|
||||
@@ -9302,7 +9301,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
// srcts/src/bindings/output/html.ts
|
||||
// src/bindings/output/html.ts
|
||||
function _typeof20(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
@@ -9438,17 +9437,17 @@
|
||||
}
|
||||
});
|
||||
|
||||
// srcts/src/bindings/output/image.ts
|
||||
// src/bindings/output/image.ts
|
||||
var import_es_array_iterator21 = __toModule(require_es_array_iterator());
|
||||
var import_jquery33 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/imageutils/createBrush.ts
|
||||
// src/imageutils/createBrush.ts
|
||||
var import_jquery30 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/imageutils/initCoordmap.ts
|
||||
// src/imageutils/initCoordmap.ts
|
||||
var import_jquery29 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/imageutils/initPanelScales.ts
|
||||
// src/imageutils/initPanelScales.ts
|
||||
function mapLinear(x, domainMin, domainMax, rangeMin, rangeMax) {
|
||||
var clip = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true;
|
||||
clip = clip || true;
|
||||
@@ -9534,7 +9533,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
// srcts/src/imageutils/initCoordmap.ts
|
||||
// src/imageutils/initCoordmap.ts
|
||||
function findScalingRatio($el) {
|
||||
var boundingRect = $el[0].getBoundingClientRect();
|
||||
return {
|
||||
@@ -9731,7 +9730,7 @@
|
||||
return coordmap;
|
||||
}
|
||||
|
||||
// srcts/src/imageutils/findbox.ts
|
||||
// src/imageutils/findbox.ts
|
||||
function findBox(offset1, offset2) {
|
||||
return {
|
||||
xmin: Math.min(offset1.x, offset2.x),
|
||||
@@ -9741,7 +9740,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
// srcts/src/imageutils/shiftToRange.ts
|
||||
// src/imageutils/shiftToRange.ts
|
||||
function shiftToRange(vals, min4, max4) {
|
||||
if (!(vals instanceof Array))
|
||||
vals = [vals];
|
||||
@@ -9760,7 +9759,7 @@
|
||||
return newvals;
|
||||
}
|
||||
|
||||
// srcts/src/imageutils/createBrush.ts
|
||||
// src/imageutils/createBrush.ts
|
||||
function createBrush($el, opts, coordmap, expandPixels) {
|
||||
var resizeExpand = 10;
|
||||
var el = $el[0];
|
||||
@@ -10116,7 +10115,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
// srcts/src/imageutils/createClickInfo.ts
|
||||
// src/imageutils/createClickInfo.ts
|
||||
var import_jquery31 = __toModule(require_jquery());
|
||||
function createClickInfo($el, dblclickId, dblclickDelay) {
|
||||
var clickTimer = null;
|
||||
@@ -10171,7 +10170,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
// srcts/src/imageutils/createHandlers.ts
|
||||
// src/imageutils/createHandlers.ts
|
||||
var import_jquery32 = __toModule(require_jquery());
|
||||
function createClickHandler(inputId, clip, coordmap) {
|
||||
var clickInfoSender = coordmap.mouseCoordinateSender(inputId, clip);
|
||||
@@ -10380,7 +10379,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
// srcts/src/imageutils/disableDrag.ts
|
||||
// src/imageutils/disableDrag.ts
|
||||
function disableDrag($el, $img) {
|
||||
$img.css("-webkit-user-drag", "none");
|
||||
$img.off("dragstart.image_output");
|
||||
@@ -10393,7 +10392,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// srcts/src/bindings/output/image.ts
|
||||
// src/bindings/output/image.ts
|
||||
function _typeof21(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
@@ -10652,7 +10651,7 @@
|
||||
}(OutputBinding);
|
||||
var imageOutputBinding = new ImageOutputBinding();
|
||||
|
||||
// srcts/src/bindings/output/index.ts
|
||||
// src/bindings/output/index.ts
|
||||
function initOutputBindings() {
|
||||
var outputBindings = new BindingRegistry();
|
||||
outputBindings.register(new TextOutputBinding(), "shiny.textOutput");
|
||||
@@ -10665,7 +10664,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
// srcts/src/imageutils/resetBrush.ts
|
||||
// src/imageutils/resetBrush.ts
|
||||
function resetBrush(brushId) {
|
||||
shinySetInputValue(brushId, null);
|
||||
imageOutputBinding.find(document.documentElement).trigger("shiny-internal:brushed", {
|
||||
@@ -10674,7 +10673,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// srcts/src/shiny/notifications.ts
|
||||
// src/shiny/notifications.ts
|
||||
var import_es_regexp_exec7 = __toModule(require_es_regexp_exec());
|
||||
|
||||
// node_modules/core-js/modules/es.string.match.js
|
||||
@@ -10717,7 +10716,7 @@
|
||||
];
|
||||
});
|
||||
|
||||
// srcts/src/shiny/notifications.ts
|
||||
// src/shiny/notifications.ts
|
||||
var import_jquery34 = __toModule(require_jquery());
|
||||
var fadeDuration = 250;
|
||||
function show() {
|
||||
@@ -10809,7 +10808,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
// srcts/src/shiny/modal.ts
|
||||
// src/shiny/modal.ts
|
||||
var import_jquery35 = __toModule(require_jquery());
|
||||
function show2() {
|
||||
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref$html = _ref.html, html = _ref$html === void 0 ? "" : _ref$html, _ref$deps = _ref.deps, deps = _ref$deps === void 0 ? [] : _ref$deps;
|
||||
@@ -10849,7 +10848,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
// srcts/src/shiny/reconnectDialog.ts
|
||||
// src/shiny/reconnectDialog.ts
|
||||
var import_jquery36 = __toModule(require_jquery());
|
||||
function updateTime(reconnectTime) {
|
||||
var $time = (0, import_jquery36.default)("#shiny-reconnect-time");
|
||||
@@ -10885,15 +10884,15 @@
|
||||
remove("reconnect");
|
||||
}
|
||||
|
||||
// srcts/src/shiny/init.ts
|
||||
// src/shiny/init.ts
|
||||
var import_es_regexp_exec10 = __toModule(require_es_regexp_exec());
|
||||
var import_jquery42 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/inputPolicies/inputBatchSender.ts
|
||||
// src/inputPolicies/inputBatchSender.ts
|
||||
var import_es_array_iterator22 = __toModule(require_es_array_iterator());
|
||||
var import_jquery37 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/inputPolicies/InputPolicy.ts
|
||||
// src/inputPolicies/InputPolicy.ts
|
||||
function _classCallCheck28(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
@@ -10941,7 +10940,7 @@
|
||||
return InputPolicy2;
|
||||
}();
|
||||
|
||||
// srcts/src/inputPolicies/inputBatchSender.ts
|
||||
// src/inputPolicies/inputBatchSender.ts
|
||||
function _typeof22(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
@@ -11096,10 +11095,10 @@
|
||||
return InputBatchSender2;
|
||||
}(InputPolicy);
|
||||
|
||||
// srcts/src/inputPolicies/inputNoResendDecorator.ts
|
||||
// src/inputPolicies/inputNoResendDecorator.ts
|
||||
var import_es_array_iterator23 = __toModule(require_es_array_iterator());
|
||||
|
||||
// srcts/src/inputPolicies/splitInputNameType.ts
|
||||
// src/inputPolicies/splitInputNameType.ts
|
||||
var import_es_regexp_exec8 = __toModule(require_es_regexp_exec());
|
||||
function splitInputNameType(nameType) {
|
||||
var name2 = nameType.split(":");
|
||||
@@ -11109,7 +11108,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
// srcts/src/inputPolicies/inputNoResendDecorator.ts
|
||||
// src/inputPolicies/inputNoResendDecorator.ts
|
||||
function _typeof23(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
@@ -11266,7 +11265,7 @@
|
||||
return InputNoResendDecorator2;
|
||||
}(InputPolicy);
|
||||
|
||||
// srcts/src/inputPolicies/inputEventDecorator.ts
|
||||
// src/inputPolicies/inputEventDecorator.ts
|
||||
var import_es_array_iterator24 = __toModule(require_es_array_iterator());
|
||||
var import_jquery38 = __toModule(require_jquery());
|
||||
function _typeof24(obj) {
|
||||
@@ -11400,7 +11399,7 @@
|
||||
return InputEventDecorator2;
|
||||
}(InputPolicy);
|
||||
|
||||
// srcts/src/inputPolicies/inputRateDecorator.ts
|
||||
// src/inputPolicies/inputRateDecorator.ts
|
||||
var import_es_array_iterator25 = __toModule(require_es_array_iterator());
|
||||
function _typeof25(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
@@ -11554,7 +11553,7 @@
|
||||
return InputRateDecorator2;
|
||||
}(InputPolicy);
|
||||
|
||||
// srcts/src/inputPolicies/inputDeferDecorator.ts
|
||||
// src/inputPolicies/inputDeferDecorator.ts
|
||||
var import_es_array_iterator26 = __toModule(require_es_array_iterator());
|
||||
function _typeof26(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
@@ -11696,7 +11695,7 @@
|
||||
return InputDeferDecorator2;
|
||||
}(InputPolicy);
|
||||
|
||||
// srcts/src/inputPolicies/inputValidateDecorator.ts
|
||||
// src/inputPolicies/inputValidateDecorator.ts
|
||||
var import_jquery39 = __toModule(require_jquery());
|
||||
function _classCallCheck34(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
@@ -11741,10 +11740,10 @@
|
||||
this.target = target;
|
||||
};
|
||||
|
||||
// srcts/src/shiny/bind.ts
|
||||
// src/shiny/bind.ts
|
||||
var import_jquery40 = __toModule(require_jquery());
|
||||
|
||||
// srcts/src/bindings/output_adapter.ts
|
||||
// src/bindings/output_adapter.ts
|
||||
function _classCallCheck35(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
@@ -11816,7 +11815,7 @@
|
||||
return OutputBindingAdapter2;
|
||||
}();
|
||||
|
||||
// srcts/src/shiny/bind.ts
|
||||
// src/shiny/bind.ts
|
||||
var boundInputs = {};
|
||||
function valueChangeCallback(inputs, binding, el, allowDeferred) {
|
||||
var id = binding.getId(el);
|
||||
@@ -12065,7 +12064,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
// srcts/src/shiny/shinyapp.ts
|
||||
// src/shiny/shinyapp.ts
|
||||
var import_es_regexp_exec9 = __toModule(require_es_regexp_exec());
|
||||
|
||||
// node_modules/core-js/modules/es.array.for-each.js
|
||||
@@ -12094,7 +12093,7 @@
|
||||
var Collection;
|
||||
var CollectionPrototype;
|
||||
|
||||
// srcts/src/shiny/shinyapp.ts
|
||||
// src/shiny/shinyapp.ts
|
||||
var import_jquery41 = __toModule(require_jquery());
|
||||
function _classCallCheck36(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
@@ -13011,7 +13010,7 @@
|
||||
return ShinyApp2;
|
||||
}();
|
||||
|
||||
// srcts/src/shiny/init.ts
|
||||
// src/shiny/init.ts
|
||||
function initShiny(Shiny2) {
|
||||
setShinyObj(Shiny2);
|
||||
var shinyapp = Shiny2.shinyapp = new ShinyApp();
|
||||
@@ -13317,7 +13316,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// srcts/src/shiny/index.ts
|
||||
// src/shiny/index.ts
|
||||
var Shiny;
|
||||
function setShiny(Shiny_) {
|
||||
Shiny = Shiny_;
|
||||
@@ -13353,18 +13352,18 @@
|
||||
});
|
||||
}
|
||||
|
||||
// srcts/src/window/blobBuilder.ts
|
||||
// src/window/blobBuilder.ts
|
||||
function windowBlobBuilder() {
|
||||
var blob = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;
|
||||
return blob;
|
||||
}
|
||||
|
||||
// srcts/src/window/userAgent.ts
|
||||
// src/window/userAgent.ts
|
||||
function windowUserAgent() {
|
||||
return window.navigator.userAgent;
|
||||
}
|
||||
|
||||
// srcts/src/shiny/reactlog.ts
|
||||
// src/shiny/reactlog.ts
|
||||
var import_jquery44 = __toModule(require_jquery());
|
||||
function initReactlog() {
|
||||
(0, import_jquery44.default)(document).on("keydown", function(e) {
|
||||
@@ -13394,7 +13393,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// srcts/src/initialize/index.ts
|
||||
// src/initialize/index.ts
|
||||
function init() {
|
||||
setShiny(windowShiny());
|
||||
setUserAgent(windowUserAgent());
|
||||
@@ -13405,7 +13404,7 @@
|
||||
initReactlog();
|
||||
}
|
||||
|
||||
// srcts/src/index.ts
|
||||
// src/index.ts
|
||||
init();
|
||||
})();
|
||||
//# sourceMappingURL=shiny.js.map
|
||||
|
||||
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
10
srcts/.gitignore
vendored
Normal file
10
srcts/.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
node_modules/
|
||||
.cache
|
||||
.yarn/*
|
||||
!.yarn/releases
|
||||
!.yarn/plugins
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
.pnp.*
|
||||
coverage/
|
||||
madge.svg
|
||||
@@ -85,12 +85,12 @@
|
||||
* √ Each _file_ will be pulled out as possible into smaller files in separate PRs
|
||||
* √ Convert `FileProcessor` to a true class definition
|
||||
* Break up `./utils` into many files
|
||||
* √ Remove any `: any` types
|
||||
* √ Make `@typescript-eslint/explicit-module-boundary-types` an error
|
||||
* √ Fix all `// eslint-disable-next-line no-prototype-builtins` lines
|
||||
* Remove any `: any` types
|
||||
* Make `@typescript-eslint/explicit-module-boundary-types` an error
|
||||
* Fix all `// eslint-disable-next-line no-prototype-builtins` lines
|
||||
* TypeScript other shiny files (ex: showcasemode)
|
||||
* √ Completely remove `parcel` from `./package.json` and only use `esbuild`
|
||||
* √ Delete 'shiny-es5' files
|
||||
* Completely remove `parcel` from `./package.json` and only use `esbuild`
|
||||
* Delete 'shiny-es5' files
|
||||
* Delete 'old' folder
|
||||
* _Uglify_ js files (like in previous Gruntfile.js)
|
||||
* datepicker
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
// This build script must be executed from the root repo directory via
|
||||
// ```
|
||||
// yarn build
|
||||
// ```
|
||||
|
||||
import esbuild from "esbuild";
|
||||
import babel from "esbuild-plugin-babel";
|
||||
import readcontrol from "readcontrol";
|
||||
@@ -39,12 +34,12 @@ async function buildFile(
|
||||
};
|
||||
}
|
||||
|
||||
const outdir = "./inst/www/shared/";
|
||||
const outdir = "../inst/www/shared/";
|
||||
|
||||
console.log("Building " + fileName);
|
||||
await esbuild.build({
|
||||
outfile: outdir + fileName,
|
||||
entryPoints: ["srcts/src/index.ts"],
|
||||
entryPoints: ["src/index.ts"],
|
||||
bundle: true,
|
||||
incremental: incremental,
|
||||
watch: watch,
|
||||
@@ -60,7 +55,7 @@ async function buildFile(
|
||||
sourcemap: true,
|
||||
define: {
|
||||
"process.env.SHINY_VERSION": `"${
|
||||
readcontrol.readSync("./DESCRIPTION").version
|
||||
readcontrol.readSync("../DESCRIPTION").version
|
||||
}"`,
|
||||
},
|
||||
...extraOpts,
|
||||
@@ -1,8 +1,3 @@
|
||||
// This build script must be executed from the root repo directory via
|
||||
// ```
|
||||
// yarn build
|
||||
// ```
|
||||
|
||||
import { readdirSync, unlinkSync, writeFileSync } from "fs";
|
||||
import esbuild from "esbuild";
|
||||
import globalsPlugin from "esbuild-plugin-globals";
|
||||
@@ -10,7 +5,7 @@ import globalsPlugin from "esbuild-plugin-globals";
|
||||
// import process from "process";
|
||||
// let watch = process.argv.length >= 3 && process.argv[2] == "--watch";
|
||||
|
||||
let instdir = "./inst/";
|
||||
let instdir = "../inst/";
|
||||
|
||||
let opts = {
|
||||
bundle: false,
|
||||
@@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"version": "1.6.0",
|
||||
"main": "",
|
||||
"types": "srcts/types/shiny/index.d.ts",
|
||||
"types": "src_d/shiny/index.d.ts",
|
||||
"engines": {
|
||||
"node": ">= 14",
|
||||
"yarn": ">= 1.22"
|
||||
@@ -43,6 +43,8 @@
|
||||
"jquery": "3.6.0",
|
||||
"madge": "^4.0.2",
|
||||
"node-gyp": "^8.1.0",
|
||||
"parcel": "^1.12.4",
|
||||
"parcel-bundler": "^1.12.5",
|
||||
"phantomjs-prebuilt": "^2.1.16",
|
||||
"prettier": "2.3.0",
|
||||
"readcontrol": "^1.0.0",
|
||||
@@ -57,15 +59,18 @@
|
||||
"watch": "yarn run build_shiny --watch",
|
||||
"build": "yarn run build_shiny && yarn run bundle_external_libs",
|
||||
"build_shiny": "yarn run checks && yarn run bundle_shiny",
|
||||
"bundle_shiny": "node srcts/build/shiny.mjs",
|
||||
"circular_dep_image": "madge --circular --extensions ts --image madge.svg srcts/src",
|
||||
"bundle_external_libs": "node srcts/build/external_libs.mjs",
|
||||
"bundle_shiny": "node esbuild.config.mjs",
|
||||
"circular_dep_image": "madge --circular --extensions ts --image madge.svg src",
|
||||
"bundle_external_libs": "node esbuild.external_libs.mjs",
|
||||
"bundle_shiny_parcel2": "parcel build -d ../inst/www/shared --no-minify -o shiny.js src/index.ts",
|
||||
"watch_parcel2": "yarn run checks && parcel run -d ../inst/www/shared -o shiny.js srcjs/index.ts",
|
||||
"replace_shiny_version2": "replace --silent '\"[^\"]+\"; // @VERSION@' \"\\\"`node -e 'console.log(require(\"readcontrol\").readSync(\"../DESCRIPTION\").version)'`\\\"; // @VERSION@\" src/shiny.ts",
|
||||
"test": "jest --coverage",
|
||||
"test_phantom": "echo '\n\t!! Must manually stop phantomjs test !!\n\n' && yarn bundle_shiny && phantomjs --debug=yes ../inst/www/shared/shiny.js",
|
||||
"lint": "eslint --fix --ext .ts srcts/src",
|
||||
"lint": "eslint --fix --ext .ts src",
|
||||
"typescript-check": "tsc -p tsconfig.json",
|
||||
"type-check": "type-coverage -p tsconfig.json --detail --at-least 85",
|
||||
"import-check": "madge --circular --extensions ts srcts/src",
|
||||
"import-check": "madge --circular --extensions ts src",
|
||||
"checks": "yarn run lint && yarn run typescript-check && yarn run type-check && yarn run import-check"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -1,33 +1,5 @@
|
||||
import { asArray, mergeSort } from "../";
|
||||
import { asArray } from "../";
|
||||
|
||||
test("integer is converted to integer array", () => {
|
||||
expect(asArray(4)).toStrictEqual([4]);
|
||||
});
|
||||
|
||||
test("mergeSort merges two arrays", () => {
|
||||
function shuffleArray<T>(arr: Array<T>): Array<T> {
|
||||
if (arr.length < 2) return arr;
|
||||
|
||||
const copy = [...arr];
|
||||
|
||||
copy.sort(() => Math.random() - 0.5);
|
||||
for (let i = 0; i < copy.length; i++) {
|
||||
// if at least one entry is different, return it
|
||||
if (arr[i] !== copy[i]) {
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
// Try shuffling again (rare)
|
||||
return shuffleArray(arr);
|
||||
}
|
||||
|
||||
const original = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5];
|
||||
const input = shuffleArray(original);
|
||||
|
||||
const output = mergeSort(input, function (x, y) {
|
||||
return x - y;
|
||||
});
|
||||
|
||||
expect(original).not.toEqual(input);
|
||||
expect(original).toEqual(output);
|
||||
});
|
||||
|
||||
@@ -239,7 +239,8 @@ function mapValues<V, R>(
|
||||
const newObj: Record<string, R> = {};
|
||||
|
||||
for (const key in obj) {
|
||||
if (hasOwnProperty(obj, key)) newObj[key] = f(obj[key], key, obj);
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
if (obj.hasOwnProperty(key)) newObj[key] = f(obj[key], key, obj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
@@ -258,6 +259,7 @@ function _equal(x: unknown, y: unknown): boolean {
|
||||
|
||||
if (Object.keys(xo).length !== Object.keys(yo).length) return false;
|
||||
for (const prop in xo) {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
if (!hasOwnProperty(yo, prop) || !_equal(xo[prop], yo[prop]))
|
||||
return false;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user