@panneau/field-upload 3.0.7 → 3.0.9
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/es/index.js +7 -1
- package/lib/index.js +8 -2
- package/package.json +10 -9
package/es/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
-
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
2
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
3
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
|
+
import { useLocation } from '@folklore/routes';
|
|
4
5
|
import { faTimes, faFileVideo, faFileImage, faFileAudio } from '@fortawesome/free-solid-svg-icons';
|
|
5
6
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
6
7
|
import { Dashboard, DashboardModal } from '@uppy/react';
|
|
@@ -106,6 +107,10 @@ var UploadField = function UploadField(_ref) {
|
|
|
106
107
|
disabled = _ref.disabled,
|
|
107
108
|
onChange = _ref.onChange,
|
|
108
109
|
className = _ref.className;
|
|
110
|
+
var _useLocation = useLocation(),
|
|
111
|
+
_useLocation2 = _slicedToArray(_useLocation, 1),
|
|
112
|
+
_useLocation2$0$pathn = _useLocation2[0].pathname,
|
|
113
|
+
pathname = _useLocation2$0$pathn === void 0 ? null : _useLocation2$0$pathn;
|
|
109
114
|
// const { ref: containerRef, entry = null } = useResizeObserver();
|
|
110
115
|
// const { contentRect } = entry || {};
|
|
111
116
|
// const { width: containerWidth = null } = contentRect || {};
|
|
@@ -359,6 +364,7 @@ var UploadField = function UploadField(_ref) {
|
|
|
359
364
|
onPageChange: onListPageChange,
|
|
360
365
|
onQueryChange: onListQueryChange,
|
|
361
366
|
onQueryReset: onListQueryReset,
|
|
367
|
+
baseUrl: pathname,
|
|
362
368
|
listProps: {
|
|
363
369
|
actions: ['select'],
|
|
364
370
|
actionsProps: {
|
package/lib/index.js
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
-
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
7
6
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
7
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
8
|
+
var routes = require('@folklore/routes');
|
|
8
9
|
var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
|
|
9
10
|
var reactFontawesome = require('@fortawesome/react-fontawesome');
|
|
10
11
|
var react = require('@uppy/react');
|
|
@@ -31,8 +32,8 @@ require('@uppy/status-bar/dist/style.min.css');
|
|
|
31
32
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
32
33
|
|
|
33
34
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
34
|
-
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
35
35
|
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
36
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
36
37
|
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
37
38
|
var get__default = /*#__PURE__*/_interopDefaultLegacy(get);
|
|
38
39
|
var isArray__default = /*#__PURE__*/_interopDefaultLegacy(isArray);
|
|
@@ -127,6 +128,10 @@ var UploadField = function UploadField(_ref) {
|
|
|
127
128
|
disabled = _ref.disabled,
|
|
128
129
|
onChange = _ref.onChange,
|
|
129
130
|
className = _ref.className;
|
|
131
|
+
var _useLocation = routes.useLocation(),
|
|
132
|
+
_useLocation2 = _slicedToArray__default["default"](_useLocation, 1),
|
|
133
|
+
_useLocation2$0$pathn = _useLocation2[0].pathname,
|
|
134
|
+
pathname = _useLocation2$0$pathn === void 0 ? null : _useLocation2$0$pathn;
|
|
130
135
|
// const { ref: containerRef, entry = null } = useResizeObserver();
|
|
131
136
|
// const { contentRect } = entry || {};
|
|
132
137
|
// const { width: containerWidth = null } = contentRect || {};
|
|
@@ -380,6 +385,7 @@ var UploadField = function UploadField(_ref) {
|
|
|
380
385
|
onPageChange: onListPageChange,
|
|
381
386
|
onQueryChange: onListQueryChange,
|
|
382
387
|
onQueryReset: onListQueryReset,
|
|
388
|
+
baseUrl: pathname,
|
|
383
389
|
listProps: {
|
|
384
390
|
actions: ['select'],
|
|
385
391
|
actionsProps: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/field-upload",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"description": "An Upload field",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -53,16 +53,17 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@babel/runtime": "^7.12.5",
|
|
56
|
+
"@folklore/routes": "^0.2.10",
|
|
56
57
|
"@fortawesome/fontawesome-svg-core": "^1.2.35",
|
|
57
58
|
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
|
58
59
|
"@fortawesome/react-fontawesome": "^0.1.14",
|
|
59
|
-
"@panneau/core": "^3.0.
|
|
60
|
-
"@panneau/element-button": "^3.0.
|
|
61
|
-
"@panneau/element-card": "^3.0.
|
|
62
|
-
"@panneau/element-label": "^3.0.
|
|
63
|
-
"@panneau/list-resource-items": "^3.0.
|
|
64
|
-
"@panneau/modal-dialog": "^3.0.
|
|
65
|
-
"@panneau/themes": "^3.0.
|
|
60
|
+
"@panneau/core": "^3.0.9",
|
|
61
|
+
"@panneau/element-button": "^3.0.9",
|
|
62
|
+
"@panneau/element-card": "^3.0.9",
|
|
63
|
+
"@panneau/element-label": "^3.0.9",
|
|
64
|
+
"@panneau/list-resource-items": "^3.0.9",
|
|
65
|
+
"@panneau/modal-dialog": "^3.0.9",
|
|
66
|
+
"@panneau/themes": "^3.0.9",
|
|
66
67
|
"@uppy/core": "^3.2.0",
|
|
67
68
|
"@uppy/dashboard": "^3.4.0",
|
|
68
69
|
"@uppy/drag-drop": "^3.0.2",
|
|
@@ -80,5 +81,5 @@
|
|
|
80
81
|
"publishConfig": {
|
|
81
82
|
"access": "public"
|
|
82
83
|
},
|
|
83
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "5725a31a8f873f1ae84c6df3ac712baf75be15b5"
|
|
84
85
|
}
|