@uppy/dashboard
Advanced tools
Comparing version 1.15.0 to 1.16.0
@@ -36,4 +36,6 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var isSizeMD = props.containerWidth > WIDTH_MD; | ||
var wrapperClassName = classNames({ | ||
'uppy-Root': props.isTargetDOMEl | ||
}); | ||
var dashboardClassName = classNames({ | ||
'uppy-Root': props.isTargetDOMEl, | ||
'uppy-Dashboard': true, | ||
@@ -63,3 +65,3 @@ 'uppy-Dashboard--animateOpenClose': props.animateOpenClose, | ||
var showFileList = props.showSelectedFiles && !noFiles; | ||
return h("div", { | ||
var dashboard = h("div", { | ||
class: dashboardClassName, | ||
@@ -118,2 +120,8 @@ "data-uppy-theme": props.theme, | ||
}))))); | ||
return (// Wrap it for RTL language support | ||
h("div", { | ||
class: wrapperClassName, | ||
dir: props.direction | ||
}, dashboard) | ||
); | ||
}; |
@@ -31,2 +31,4 @@ var _class, _temp; | ||
var getTextDirection = require('@uppy/utils/lib/getTextDirection'); | ||
var trapFocus = require('./utils/trapFocus'); | ||
@@ -850,2 +852,3 @@ | ||
theme: theme, | ||
direction: _this.opts.direction, | ||
activePickerPanel: pluginState.activePickerPanel, | ||
@@ -1174,3 +1177,15 @@ showFileEditor: pluginState.showFileEditor, | ||
var _proto = Dashboard.prototype; | ||
_proto.onMount = function onMount() { | ||
// Set the text direction if the page has not defined one. | ||
var element = this.el; | ||
var direction = getTextDirection(element); | ||
if (!direction) { | ||
element.dir = 'ltr'; | ||
} | ||
}; | ||
return Dashboard; | ||
}(Plugin), _class.VERSION = "1.15.0", _temp); | ||
}(Plugin), _class.VERSION = "1.16.0", _temp); |
{ | ||
"name": "@uppy/dashboard", | ||
"description": "Universal UI plugin for Uppy.", | ||
"version": "1.15.0", | ||
"version": "1.16.0", | ||
"license": "MIT", | ||
@@ -26,7 +26,7 @@ "main": "lib/index.js", | ||
"@transloadit/prettier-bytes": "0.0.7", | ||
"@uppy/informer": "^1.5.15", | ||
"@uppy/provider-views": "^1.10.0", | ||
"@uppy/status-bar": "^1.8.2", | ||
"@uppy/thumbnail-generator": "^1.7.4", | ||
"@uppy/utils": "^3.3.1", | ||
"@uppy/informer": "^1.6.0", | ||
"@uppy/provider-views": "^1.11.0", | ||
"@uppy/status-bar": "^1.9.0", | ||
"@uppy/thumbnail-generator": "^1.7.5", | ||
"@uppy/utils": "^3.4.0", | ||
"classnames": "^2.2.6", | ||
@@ -44,3 +44,3 @@ "cuid": "^2.1.1", | ||
}, | ||
"gitHead": "e1efe07927e7c47b94bba5540d9c0f6fd1c4c514" | ||
"gitHead": "7c55bd855e456c536bcd318efeefd65e774cd903" | ||
} |
@@ -25,4 +25,7 @@ const FileList = require('./FileList') | ||
const wrapperClassName = classNames({ | ||
'uppy-Root': props.isTargetDOMEl | ||
}) | ||
const dashboardClassName = classNames({ | ||
'uppy-Root': props.isTargetDOMEl, | ||
'uppy-Dashboard': true, | ||
@@ -53,3 +56,3 @@ 'uppy-Dashboard--animateOpenClose': props.animateOpenClose, | ||
return ( | ||
const dashboard = ( | ||
<div | ||
@@ -136,2 +139,9 @@ class={dashboardClassName} | ||
) | ||
return ( | ||
// Wrap it for RTL language support | ||
<div class={wrapperClassName} dir={props.direction}> | ||
{dashboard} | ||
</div> | ||
) | ||
} |
@@ -11,2 +11,3 @@ const { h } = require('preact') | ||
const getDroppedFiles = require('@uppy/utils/lib/getDroppedFiles') | ||
const getTextDirection = require('@uppy/utils/lib/getTextDirection') | ||
const trapFocus = require('./utils/trapFocus') | ||
@@ -896,2 +897,3 @@ const cuid = require('cuid') | ||
theme, | ||
direction: this.opts.direction, | ||
activePickerPanel: pluginState.activePickerPanel, | ||
@@ -970,2 +972,11 @@ showFileEditor: pluginState.showFileEditor, | ||
onMount () { | ||
// Set the text direction if the page has not defined one. | ||
const element = this.el | ||
const direction = getTextDirection(element) | ||
if (!direction) { | ||
element.dir = 'ltr' | ||
} | ||
} | ||
install = () => { | ||
@@ -972,0 +983,0 @@ // Set default state for Dashboard |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
601525
8603
Updated@uppy/informer@^1.6.0
Updated@uppy/provider-views@^1.11.0
Updated@uppy/status-bar@^1.9.0
Updated@uppy/utils@^3.4.0