Update formatting settings (#4065)

* Format JSON files on save

* Add prettier plugin for organizing imports

* Reorganize imports

* Fix 'routine' build issues

* `yarn build` (GitHub Actions)

---------

Co-authored-by: wch <wch@users.noreply.github.com>
This commit is contained in:
Winston Chang
2024-05-24 09:37:28 -05:00
committed by GitHub
parent 4a8400d2a5
commit 3e0efd8484
64 changed files with 9295 additions and 9272 deletions

View File

@@ -5,6 +5,7 @@ echo "Updating package.json version to match DESCRIPTION Version"
Rscript ./tools/updatePackageJsonVersion.R
if [ -n "$(git status --porcelain package.json)" ]
then
echo "package.json has changed after running ./tools/updatePackageJsonVersion.R. Re-running 'yarn build'"
yarn build
git add ./inst package.json && git commit -m 'Sync package version (GitHub Actions)' || echo "No package version to commit"
else

View File

@@ -15,4 +15,10 @@
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
},
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
},
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -69,6 +69,7 @@
"phantomjs-prebuilt": "^2.1.16",
"postcss": "^8.3.5",
"prettier": "^2.7.1",
"prettier-plugin-organize-imports": "^3.2.4",
"readcontrol": "^1.0.0",
"replace": "^1.2.1",
"ts-jest": "^26",
@@ -94,5 +95,11 @@
"coverage": "type-coverage -p tsconfig.json --at-least 90",
"circular": "madge --circular --extensions ts srcts/src",
"circular_image": "madge --circular --extensions ts --image madge.svg srcts/src"
},
"prettier": {
"plugins": [
"prettier-plugin-organize-imports"
],
"organizeImportsSkipDestructiveCodeActions": true
}
}

View File

@@ -1,6 +1,6 @@
import $ from "jquery";
import { InputBinding } from "./inputBinding";
import { hasDefinedProperty } from "../../utils";
import { InputBinding } from "./inputBinding";
type CheckedHTMLElement = HTMLInputElement;

View File

@@ -1,8 +1,8 @@
import $ from "jquery";
import { InputBinding } from "./inputBinding";
import { $escape, updateLabel, hasDefinedProperty } from "../../utils";
import { $escape, hasDefinedProperty, updateLabel } from "../../utils";
import type { CheckedHTMLElement } from "./checkbox";
import { InputBinding } from "./inputBinding";
type CheckboxGroupHTMLElement = CheckedHTMLElement;
type ValueLabelObject = {

View File

@@ -1,13 +1,13 @@
import $ from "jquery";
import { InputBinding } from "./inputBinding";
import {
formatDateUTC,
updateLabel,
$escape,
parseDate,
formatDateUTC,
hasDefinedProperty,
parseDate,
updateLabel,
} from "../../utils";
import type { NotUndefined } from "../../utils/extraTypes";
import { InputBinding } from "./inputBinding";
declare global {
interface JQuery {

View File

@@ -1,7 +1,7 @@
import $ from "jquery";
import { InputBinding } from "./inputBinding";
import { FileUploader } from "../../file/fileProcessor";
import { shinyShinyApp } from "../../shiny/initedMethods";
import { InputBinding } from "./inputBinding";
const zoneActive = "shiny-file-input-active";
const zoneOver = "shiny-file-input-over";

View File

@@ -2,20 +2,20 @@ import { BindingRegistry } from "../registry";
import { InputBinding } from "./inputBinding";
import { ActionButtonInputBinding } from "./actionbutton";
import { CheckboxInputBinding } from "./checkbox";
import { CheckboxGroupInputBinding } from "./checkboxgroup";
import { DateInputBinding } from "./date";
import { DateRangeInputBinding } from "./daterange";
import { FileInputBinding } from "./fileinput";
import { NumberInputBinding } from "./number";
import { PasswordInputBinding } from "./password";
import { RadioInputBinding } from "./radio";
import { SelectInputBinding } from "./selectInput";
import { SliderInputBinding } from "./slider";
import { BootstrapTabInputBinding } from "./tabinput";
import { TextInputBinding } from "./text";
import { TextareaInputBinding } from "./textarea";
import { RadioInputBinding } from "./radio";
import { DateInputBinding } from "./date";
import { SliderInputBinding } from "./slider";
import { DateRangeInputBinding } from "./daterange";
import { SelectInputBinding } from "./selectInput";
import { ActionButtonInputBinding } from "./actionbutton";
import { BootstrapTabInputBinding } from "./tabinput";
import { FileInputBinding } from "./fileinput";
// TODO-barret make this an init method
type InitInputBindings = {

View File

@@ -1,6 +1,6 @@
import $ from "jquery";
import { InputBinding } from "./inputBinding";
import { $escape, hasDefinedProperty, updateLabel } from "../../utils";
import { InputBinding } from "./inputBinding";
type RadioHTMLElement = HTMLInputElement;

View File

@@ -1,7 +1,7 @@
import $ from "jquery";
import { InputBinding } from "./inputBinding";
import { $escape, hasDefinedProperty, updateLabel } from "../../utils";
import { indirectEval } from "../../utils/eval";
import { InputBinding } from "./inputBinding";
type SelectHTMLElement = HTMLSelectElement & { nonempty: boolean };

View File

@@ -5,10 +5,10 @@ import type {
import $ from "jquery";
// import { NameValueHTMLElement } from ".";
import {
formatDateUTC,
updateLabel,
$escape,
formatDateUTC,
hasDefinedProperty,
updateLabel,
} from "../../utils";
import type { TextHTMLElement } from "./text";

View File

@@ -1,6 +1,6 @@
import $ from "jquery";
import { InputBinding } from "./inputBinding";
import { hasDefinedProperty, isBS3 } from "../../utils";
import { InputBinding } from "./inputBinding";
type TabInputReceiveMessageData = { value?: string };

View File

@@ -1,5 +1,5 @@
import $ from "jquery";
import { $escape, updateLabel, hasDefinedProperty } from "../../utils";
import { $escape, hasDefinedProperty, updateLabel } from "../../utils";
import { InputBinding } from "./inputBinding";
@@ -122,5 +122,4 @@ class TextInputBinding extends TextInputBindingBase {
}
export { TextInputBinding, TextInputBindingBase };
export type { TextHTMLElement, TextReceiveMessageData };

View File

@@ -1,11 +1,11 @@
import $ from "jquery";
import { OutputBinding } from "./outputBinding";
import { shinyUnbindAll } from "../../shiny/initedMethods";
import type { ErrorsMessageValue } from "../../shiny/shinyapp";
import { debounce } from "../../time";
import { escapeHTML } from "../../utils";
import { indirectEval } from "../../utils/eval";
import type { ErrorsMessageValue } from "../../shiny/shinyapp";
import { OutputBinding } from "./outputBinding";
class DatatableOutputBinding extends OutputBinding {
find(scope: HTMLElement): JQuery<HTMLElement> {

View File

@@ -1,9 +1,9 @@
import $ from "jquery";
import { OutputBinding } from "./outputBinding";
import { shinyUnbindAll } from "../../shiny/initedMethods";
import { renderContentAsync } from "../../shiny/render";
import type { ErrorsMessageValue } from "../../shiny/shinyapp";
import { OutputBinding } from "./outputBinding";
class HtmlOutputBinding extends OutputBinding {
find(scope: HTMLElement): JQuery<HTMLElement> {

View File

@@ -1,5 +1,4 @@
import $ from "jquery";
import { OutputBinding } from "./outputBinding";
import {
createBrushHandler,
createClickHandler,
@@ -8,16 +7,17 @@ import {
disableDrag,
initCoordmap,
} from "../../imageutils";
import type { CoordmapInit } from "../../imageutils/initCoordmap";
import type { ErrorsMessageValue } from "../../shiny/shinyapp";
import {
strToBool,
getComputedLinkColor,
getStyle,
hasOwnProperty,
strToBool,
} from "../../utils";
import { isIE, IEVersion } from "../../utils/browser";
import type { CoordmapInit } from "../../imageutils/initCoordmap";
import type { ErrorsMessageValue } from "../../shiny/shinyapp";
import { IEVersion, isIE } from "../../utils/browser";
import { ifUndefined } from "../../utils/object";
import { OutputBinding } from "./outputBinding";
class ImageOutputBinding extends OutputBinding {
find(scope: HTMLElement): JQuery<HTMLElement> {

View File

@@ -1,9 +1,9 @@
import { TextOutputBinding } from "./text";
import { BindingRegistry } from "../registry";
import { DownloadLinkOutputBinding } from "./downloadlink";
import { DatatableOutputBinding } from "./datatable";
import { DownloadLinkOutputBinding } from "./downloadlink";
import { HtmlOutputBinding } from "./html";
import { imageOutputBinding } from "./image";
import { TextOutputBinding } from "./text";
import { OutputBinding } from "./outputBinding";

View File

@@ -1,6 +1,6 @@
import $ from "jquery";
import { asArray } from "../../utils";
import type { ErrorsMessageValue } from "../../shiny/shinyapp";
import { asArray } from "../../utils";
class OutputBinding {
name!: string;

View File

@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { LitElement, html, css } from "lit";
import { css, html, LitElement } from "lit";
import { ShinyClientError } from "../shiny/error";
const buttonStyles = css`

View File

@@ -1,8 +1,8 @@
import $ from "jquery";
import { triggerFileInputChanged } from "../events/inputChanged";
import { $escape } from "../utils";
import type { ShinyApp } from "../shiny/shinyapp";
import { getFileInputBinding } from "../shiny/initedMethods";
import type { ShinyApp } from "../shiny/shinyapp";
import { $escape } from "../utils";
type JobId = string;
type UploadUrl = string;

View File

@@ -1,7 +1,7 @@
import $ from "jquery";
import { equal, isnan, mapValues, roundSignif } from "../utils";
import type { Coordmap } from "./initCoordmap";
import { findOrigin } from "./initCoordmap";
import { equal, isnan, mapValues, roundSignif } from "../utils";
import type { Panel } from "./initPanelScales";
import type { Offset } from "./findbox";
@@ -656,5 +656,4 @@ function createBrush(
}
export { createBrush };
export type { Bounds, BrushOpts, BoundsCss };

View File

@@ -1,13 +1,13 @@
import $ from "jquery";
import { imageOutputBinding } from "../bindings/output/image";
import type { InputRatePolicy } from "../inputPolicies";
import { shinySetInputValue } from "../shiny/initedMethods";
import { Debouncer, Throttler } from "../time";
import type { Bounds, BoundsCss, BrushOpts } from "./createBrush";
import { createBrush } from "./createBrush";
import type { BoundsCss, Bounds, BrushOpts } from "./createBrush";
import type { Offset } from "./findbox";
import type { Coordmap } from "./initCoordmap";
import type { Panel } from "./initPanelScales";
import type { InputRatePolicy } from "../inputPolicies";
// ----------------------------------------------------------
// Handler creators for click, hover, brush.

View File

@@ -1,9 +1,9 @@
import { createBrush } from "./createBrush";
import { createClickInfo } from "./createClickInfo";
import {
createBrushHandler,
createClickHandler,
createHoverHandler,
createBrushHandler,
} from "./createHandlers";
import { disableDrag } from "./disableDrag";
import { findBox } from "./findbox";

View File

@@ -1,8 +1,8 @@
import $ from "jquery";
import { shinySetInputValue } from "../shiny/initedMethods";
import { mapValues } from "../utils";
import type { Offset } from "./findbox";
import type { Bounds } from "./createBrush";
import type { Offset } from "./findbox";
import type { Panel, PanelInit } from "./initPanelScales";
import { initPanelScales } from "./initPanelScales";

View File

@@ -1,8 +1,8 @@
// Map a value x from a domain to a range. If clip is true, clip it to the
import type { Offset } from "./findbox";
import { mapValues } from "../utils";
import type { Bounds } from "./createBrush";
import type { Offset } from "./findbox";
// range.
function mapLinear(

View File

@@ -1,6 +1,6 @@
import $ from "jquery";
import { isIE, setIsQt, setIsIE, setIEVersion } from "../utils/browser";
import { isIE, setIEVersion, setIsIE, setIsQt } from "../utils/browser";
import { userAgent } from "../utils/userAgent";
function getIEVersion() {

View File

@@ -1,10 +1,10 @@
import { determineBrowserInfo } from "./browser";
import { disableFormSubmission } from "./disableForm";
import { trackHistory } from "./history";
import { determineBrowserInfo } from "./browser";
import { windowShiny } from "../window/libraries";
import { setShiny } from "../shiny";
import { setUserAgent } from "../utils/userAgent";
import { windowShiny } from "../window/libraries";
import { windowUserAgent } from "../window/userAgent";
import { initReactlog } from "../shiny/reactlog";

View File

@@ -1,12 +1,11 @@
import { InputBatchSender } from "./inputBatchSender";
import { InputNoResendDecorator } from "./inputNoResendDecorator";
import { InputEventDecorator } from "./inputEventDecorator";
import { InputRateDecorator } from "./inputRateDecorator";
import { InputDeferDecorator } from "./inputDeferDecorator";
import { InputEventDecorator } from "./inputEventDecorator";
import { InputNoResendDecorator } from "./inputNoResendDecorator";
import { InputRateDecorator } from "./inputRateDecorator";
import { InputValidateDecorator } from "./inputValidateDecorator";
import type { InputPolicy } from "./inputPolicy";
import type { EventPriority } from "./inputPolicy";
import type { EventPriority, InputPolicy } from "./inputPolicy";
import type { InputRatePolicy } from "./inputRatePolicy";
export {
@@ -17,5 +16,4 @@ export {
InputDeferDecorator,
InputValidateDecorator,
};
export type { InputPolicy, EventPriority, InputRatePolicy };

View File

@@ -1,5 +1,5 @@
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
import type { ShinyApp } from "../shiny/shinyapp";
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
// Schedules data to be sent to shinyapp at the next setTimeout(0).
// Batches multiple input calls into one websocket message.

View File

@@ -1,6 +1,9 @@
import type { EventPriority } from "./inputPolicy";
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
import { hasDefinedProperty } from "../utils";
import type {
EventPriority,
InputPolicy,
InputPolicyOpts,
} from "./inputPolicy";
class InputDeferDecorator implements InputPolicy {
pendingInput: {

View File

@@ -1,6 +1,6 @@
import $ from "jquery";
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
import type { ShinyEventInputChanged } from "../events/shinyEvents";
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
import { splitInputNameType } from "./splitInputNameType";
class InputEventDecorator implements InputPolicy {

View File

@@ -1,5 +1,5 @@
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
import { hasDefinedProperty } from "../utils";
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
import { splitInputNameType } from "./splitInputNameType";
type LastSentValues = { [key: string]: { [key: string]: string } };

View File

@@ -1,7 +1,7 @@
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
import { Debouncer, Invoker, Throttler } from "../time";
import { splitInputNameType } from "./splitInputNameType";
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
import type { InputRatePolicy } from "./inputRatePolicy";
import { splitInputNameType } from "./splitInputNameType";
type RatePolicyModes = "debounce" | "direct" | "throttle";
@@ -66,5 +66,4 @@ class InputRateDecorator implements InputPolicy {
}
export { InputRateDecorator };
export type { RatePolicyModes };

View File

@@ -6,9 +6,9 @@ import type {
InputRateDecorator,
InputValidateDecorator,
} from "../inputPolicies";
import { ShinyClientError } from "./error";
import { shinyAppBindOutput, shinyAppUnbindOutput } from "./initedMethods";
import { sendImageSizeFns } from "./sendImageSize";
import { ShinyClientError } from "./error";
type BindScope = HTMLElement | JQuery<HTMLElement>;
@@ -464,5 +464,4 @@ async function bindAll(
}
export { unbindAll, bindAll, _bindAll };
export type { BindScope, BindInputsCtx };

View File

@@ -1,33 +1,33 @@
import $ from "jquery";
import { InputBinding, OutputBinding } from "../bindings";
import { initInputBindings } from "../bindings/input";
import { initOutputBindings } from "../bindings/output";
import { showErrorInClientConsole } from "../components/errorConsole";
import { resetBrush } from "../imageutils/resetBrush";
import { $escape, compareVersion } from "../utils";
import { showNotification, removeNotification } from "./notifications";
import { showModal, removeModal } from "./modal";
import { showReconnectDialog, hideReconnectDialog } from "./reconnectDialog";
import {
renderContentAsync,
renderContent,
renderDependenciesAsync,
renderDependencies,
renderHtmlAsync,
renderHtml,
} from "./render";
import { initShiny } from "./init";
import type {
shinyBindAll,
shinyForgetLastInputValue,
shinySetInputValue,
shinyInitializeInputs,
shinySetInputValue,
shinyUnbindAll,
} from "./initedMethods";
import { setFileInputBinding } from "./initedMethods";
import { removeModal, showModal } from "./modal";
import { removeNotification, showNotification } from "./notifications";
import { hideReconnectDialog, showReconnectDialog } from "./reconnectDialog";
import {
renderContent,
renderContentAsync,
renderDependencies,
renderDependenciesAsync,
renderHtml,
renderHtmlAsync,
} from "./render";
import type { Handler, ShinyApp } from "./shinyapp";
import { addCustomMessageHandler } from "./shinyapp";
import { initInputBindings } from "../bindings/input";
import { initOutputBindings } from "../bindings/output";
import { showErrorInClientConsole } from "../components/errorConsole";
interface Shiny {
version: string;
@@ -138,5 +138,4 @@ function setShiny(windowShiny_: Shiny): void {
}
export { windowShiny, setShiny };
export type { Shiny };

View File

@@ -1,5 +1,6 @@
import $ from "jquery";
import type { Shiny } from ".";
import type { InputPolicy } from "../inputPolicies";
import {
InputBatchSender,
InputDeferDecorator,
@@ -8,7 +9,7 @@ import {
InputRateDecorator,
InputValidateDecorator,
} from "../inputPolicies";
import type { InputPolicy } from "../inputPolicies";
import type { InputPolicyOpts } from "../inputPolicies/inputPolicy";
import { addDefaultInputOpts } from "../inputPolicies/inputValidateDecorator";
import { debounce, Debouncer } from "../time";
import {
@@ -18,14 +19,13 @@ import {
mapValues,
pixelRatio,
} from "../utils";
import { bindAll, unbindAll, _bindAll } from "./bind";
import type { BindInputsCtx, BindScope } from "./bind";
import { bindAll, unbindAll, _bindAll } from "./bind";
import { setShinyObj } from "./initedMethods";
import { registerDependency } from "./render";
import { sendImageSizeFns } from "./sendImageSize";
import { ShinyApp } from "./shinyapp";
import { registerNames as singletonsRegisterNames } from "./singletons";
import type { InputPolicyOpts } from "../inputPolicies/inputPolicy";
// "init_shiny.js"
async function initShiny(windowShiny: Shiny): Promise<void> {

View File

@@ -3,8 +3,7 @@ import $ from "jquery";
import { $escape, randomId } from "../utils";
import { shinyUnbindAll } from "./initedMethods";
import type { HtmlDep } from "./render";
import { renderDependenciesAsync } from "./render";
import { renderContentAsync } from "./render";
import { renderContentAsync, renderDependenciesAsync } from "./render";
// Milliseconds to fade in or out
const fadeDuration = 250;

View File

@@ -1,6 +1,6 @@
import $ from "jquery";
import { showNotification, removeNotification } from "./notifications";
import { removeNotification, showNotification } from "./notifications";
function updateTime(reconnectTime: number): void {
const $time = $("#shiny-reconnect-time");

View File

@@ -9,8 +9,8 @@ import {
} from "./initedMethods";
import { sendImageSizeFns } from "./sendImageSize";
import { renderHtml as singletonsRenderHtml } from "./singletons";
import type { WherePosition } from "./singletons";
import { renderHtml as singletonsRenderHtml } from "./singletons";
// There are synchronous and asynchronous versions of the exported functions
// renderContent(), renderHtml(), and renderDependencies(). This is because they

View File

@@ -1,5 +1,19 @@
import $ from "jquery";
import type { InputBinding } from "../bindings";
import type { OutputBindingAdapter } from "../bindings/outputAdapter";
import { showErrorInClientConsole } from "../components/errorConsole";
import type {
ShinyEventError,
ShinyEventMessage,
ShinyEventUpdateInput,
ShinyEventValue,
} from "../events/shinyEvents";
import type { UploadEndValue, UploadInitValue } from "../file/fileProcessor";
import { resetBrush } from "../imageutils/resetBrush";
import { $escape, hasOwnProperty, randomId, scopeExprToFunc } from "../utils";
import { AsyncQueue } from "../utils/asyncQueue";
import { isQt } from "../utils/browser";
import { indirectEval } from "../utils/eval";
import {
getShinyCreateWebsocket,
getShinyOnCustomMessage,
@@ -7,26 +21,12 @@ import {
shinyForgetLastInputValue,
shinyUnbindAll,
} from "./initedMethods";
import { isQt } from "../utils/browser";
import { showNotification, removeNotification } from "./notifications";
import { showModal, removeModal } from "./modal";
import { renderContentAsync, renderHtmlAsync } from "./render";
import type { HtmlDep } from "./render";
import { removeModal, showModal } from "./modal";
import { removeNotification, showNotification } from "./notifications";
import { hideReconnectDialog, showReconnectDialog } from "./reconnectDialog";
import { resetBrush } from "../imageutils/resetBrush";
import type { OutputBindingAdapter } from "../bindings/outputAdapter";
import type {
ShinyEventError,
ShinyEventMessage,
ShinyEventValue,
ShinyEventUpdateInput,
} from "../events/shinyEvents";
import type { InputBinding } from "../bindings";
import { indirectEval } from "../utils/eval";
import type { HtmlDep } from "./render";
import { renderContentAsync, renderHtmlAsync } from "./render";
import type { WherePosition } from "./singletons";
import type { UploadInitValue, UploadEndValue } from "../file/fileProcessor";
import { AsyncQueue } from "../utils/asyncQueue";
import { showErrorInClientConsole } from "../components/errorConsole";
import { OutputProgressReporter } from "./outputProgress";

View File

@@ -1,4 +1,4 @@
import { Debouncer, debounce } from "./debounce";
import { debounce, Debouncer } from "./debounce";
import { Invoker } from "./invoke";
import { Throttler } from "./throttle";

View File

@@ -1,7 +1,7 @@
import $ from "jquery";
import { windowDevicePixelRatio } from "../window/pixelRatio";
import type { MapValuesUnion, MapWithResult } from "./extraTypes";
import { hasOwnProperty, hasDefinedProperty } from "./object";
import { hasDefinedProperty, hasOwnProperty } from "./object";
function escapeHTML(str: string): string {
/* eslint-disable @typescript-eslint/naming-convention */

View File

@@ -1,5 +1,5 @@
import { InputBinding } from "./inputBinding";
import type { CheckedHTMLElement } from "./checkbox";
import { InputBinding } from "./inputBinding";
type CheckboxGroupHTMLElement = CheckedHTMLElement;
type ValueLabelObject = {
value: HTMLInputElement["value"];

View File

@@ -1,5 +1,5 @@
import { OutputBinding } from "./outputBinding";
import type { ErrorsMessageValue } from "../../shiny/shinyapp";
import { OutputBinding } from "./outputBinding";
declare class DatatableOutputBinding extends OutputBinding {
find(scope: HTMLElement): JQuery<HTMLElement>;
onValueError(el: HTMLElement, err: ErrorsMessageValue): void;

View File

@@ -1,6 +1,6 @@
import { OutputBinding } from "./outputBinding";
import { renderContentAsync } from "../../shiny/render";
import type { ErrorsMessageValue } from "../../shiny/shinyapp";
import { OutputBinding } from "./outputBinding";
declare class HtmlOutputBinding extends OutputBinding {
find(scope: HTMLElement): JQuery<HTMLElement>;
onValueError(el: HTMLElement, err: ErrorsMessageValue): void;

View File

@@ -1,6 +1,6 @@
import { OutputBinding } from "./outputBinding";
import type { CoordmapInit } from "../../imageutils/initCoordmap";
import type { ErrorsMessageValue } from "../../shiny/shinyapp";
import { OutputBinding } from "./outputBinding";
declare class ImageOutputBinding extends OutputBinding {
find(scope: HTMLElement): JQuery<HTMLElement>;
renderValue(el: HTMLElement, data: {

View File

@@ -1,5 +1,5 @@
/// <reference types="jquery" />
import type { BoundsCss, Bounds, BrushOpts } from "./createBrush";
import type { Bounds, BoundsCss, BrushOpts } from "./createBrush";
import type { Offset } from "./findbox";
import type { Coordmap } from "./initCoordmap";
import type { Panel } from "./initPanelScales";

View File

@@ -1,6 +1,6 @@
import { createBrush } from "./createBrush";
import { createClickInfo } from "./createClickInfo";
import { createClickHandler, createHoverHandler, createBrushHandler } from "./createHandlers";
import { createBrushHandler, createClickHandler, createHoverHandler } from "./createHandlers";
import { disableDrag } from "./disableDrag";
import { findBox } from "./findbox";
import { initCoordmap } from "./initCoordmap";

View File

@@ -1,6 +1,6 @@
/// <reference types="jquery" />
import type { Offset } from "./findbox";
import type { Bounds } from "./createBrush";
import type { Offset } from "./findbox";
import type { Panel, PanelInit } from "./initPanelScales";
declare function findOrigin($el: JQuery<HTMLElement>): Offset;
type OffsetCss = {

View File

@@ -1,5 +1,5 @@
import type { Offset } from "./findbox";
import type { Bounds } from "./createBrush";
import type { Offset } from "./findbox";
type PanelInit = {
domain: {
top: number;

View File

@@ -1,11 +1,10 @@
import { InputBatchSender } from "./inputBatchSender";
import { InputNoResendDecorator } from "./inputNoResendDecorator";
import { InputEventDecorator } from "./inputEventDecorator";
import { InputRateDecorator } from "./inputRateDecorator";
import { InputDeferDecorator } from "./inputDeferDecorator";
import { InputEventDecorator } from "./inputEventDecorator";
import { InputNoResendDecorator } from "./inputNoResendDecorator";
import { InputRateDecorator } from "./inputRateDecorator";
import { InputValidateDecorator } from "./inputValidateDecorator";
import type { InputPolicy } from "./inputPolicy";
import type { EventPriority } from "./inputPolicy";
import type { EventPriority, InputPolicy } from "./inputPolicy";
import type { InputRatePolicy } from "./inputRatePolicy";
export { InputBatchSender, InputEventDecorator, InputNoResendDecorator, InputRateDecorator, InputDeferDecorator, InputValidateDecorator, };
export type { InputPolicy, EventPriority, InputRatePolicy };

View File

@@ -1,5 +1,5 @@
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
import type { ShinyApp } from "../shiny/shinyapp";
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
declare class InputBatchSender implements InputPolicy {
target: InputPolicy;
shinyapp: ShinyApp;

View File

@@ -1,5 +1,4 @@
import type { EventPriority } from "./inputPolicy";
import type { InputPolicy, InputPolicyOpts } from "./inputPolicy";
import type { EventPriority, InputPolicy, InputPolicyOpts } from "./inputPolicy";
declare class InputDeferDecorator implements InputPolicy {
pendingInput: {
[key: string]: {

View File

@@ -1,15 +1,15 @@
import { InputBinding, OutputBinding } from "../bindings";
import { resetBrush } from "../imageutils/resetBrush";
import { $escape, compareVersion } from "../utils";
import { showNotification, removeNotification } from "./notifications";
import { showModal, removeModal } from "./modal";
import { showReconnectDialog, hideReconnectDialog } from "./reconnectDialog";
import { renderContentAsync, renderContent, renderDependenciesAsync, renderDependencies, renderHtmlAsync, renderHtml } from "./render";
import type { shinyBindAll, shinyForgetLastInputValue, shinySetInputValue, shinyInitializeInputs, shinyUnbindAll } from "./initedMethods";
import type { Handler, ShinyApp } from "./shinyapp";
import { addCustomMessageHandler } from "./shinyapp";
import { initInputBindings } from "../bindings/input";
import { initOutputBindings } from "../bindings/output";
import { resetBrush } from "../imageutils/resetBrush";
import { $escape, compareVersion } from "../utils";
import type { shinyBindAll, shinyForgetLastInputValue, shinyInitializeInputs, shinySetInputValue, shinyUnbindAll } from "./initedMethods";
import { removeModal, showModal } from "./modal";
import { removeNotification, showNotification } from "./notifications";
import { hideReconnectDialog, showReconnectDialog } from "./reconnectDialog";
import { renderContent, renderContentAsync, renderDependencies, renderDependenciesAsync, renderHtml, renderHtmlAsync } from "./render";
import type { Handler, ShinyApp } from "./shinyapp";
import { addCustomMessageHandler } from "./shinyapp";
interface Shiny {
version: string;
$escape: typeof $escape;

View File

@@ -1,6 +1,6 @@
import type { BindScope } from "./bind";
import { renderHtml as singletonsRenderHtml } from "./singletons";
import type { WherePosition } from "./singletons";
import { renderHtml as singletonsRenderHtml } from "./singletons";
declare function renderContentAsync(el: BindScope, content: string | {
html: string;
deps?: HtmlDep[];

View File

@@ -1,5 +1,5 @@
import type { OutputBindingAdapter } from "../bindings/outputAdapter";
import type { UploadInitValue, UploadEndValue } from "../file/fileProcessor";
import type { UploadEndValue, UploadInitValue } from "../file/fileProcessor";
import { AsyncQueue } from "../utils/asyncQueue";
import { OutputProgressReporter } from "./outputProgress";
type ResponseValue = UploadEndValue | UploadInitValue;

View File

@@ -1,4 +1,4 @@
import { Debouncer, debounce } from "./debounce";
import { debounce, Debouncer } from "./debounce";
import { Invoker } from "./invoke";
import { Throttler } from "./throttle";
export { Debouncer, debounce, Invoker, Throttler };

View File

@@ -1,5 +1,5 @@
import type { MapValuesUnion, MapWithResult } from "./extraTypes";
import { hasOwnProperty, hasDefinedProperty } from "./object";
import { hasDefinedProperty, hasOwnProperty } from "./object";
declare function escapeHTML(str: string): string;
declare function randomId(): string;
declare function strToBool(str: string): boolean | undefined;

View File

@@ -1,5 +1,5 @@
# Updates the package.json `version` to match the DESCRIPTION `Version`
pkg <- jsonlite::read_json("package.json", simplifyVector = TRUE)
pkg <- jsonlite::read_json("package.json")
version <- as.list(read.dcf("DESCRIPTION")[1,])$Version
pkg$version <- gsub("^(\\d+).(\\d+).(\\d+).(.+)$", "\\1.\\2.\\3-alpha.\\4", version)
pkg$files <- as.list(pkg$files)

View File

@@ -2255,6 +2255,7 @@ __metadata:
phantomjs-prebuilt: ^2.1.16
postcss: ^8.3.5
prettier: ^2.7.1
prettier-plugin-organize-imports: ^3.2.4
readcontrol: ^1.0.0
replace: ^1.2.1
ts-jest: ^26
@@ -8281,6 +8282,23 @@ __metadata:
languageName: node
linkType: hard
"prettier-plugin-organize-imports@npm:^3.2.4":
version: 3.2.4
resolution: "prettier-plugin-organize-imports@npm:3.2.4"
peerDependencies:
"@volar/vue-language-plugin-pug": ^1.0.4
"@volar/vue-typescript": ^1.0.4
prettier: ">=2.0"
typescript: ">=2.9"
peerDependenciesMeta:
"@volar/vue-language-plugin-pug":
optional: true
"@volar/vue-typescript":
optional: true
checksum: 57ae97d7e403445e650ae92b7da586761d1d88a47e46b3ea274baeb96782165bebd0132db9c652081e185c41b50701ba1d30d615ad1c9000300cc0c67eb12b7a
languageName: node
linkType: hard
"prettier@npm:^2.7.1":
version: 2.8.4
resolution: "prettier@npm:2.8.4"