@panneau/field-upload 3.0.23 → 3.0.24

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 CHANGED
@@ -4,7 +4,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
4
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
5
5
  import { faTimes, faFileVideo, faFileImage, faFileAudio } from '@fortawesome/free-solid-svg-icons';
6
6
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
7
- import { Dashboard, DashboardModal } from '@uppy/react';
7
+ import { Dashboard } from '@uppy/react';
8
8
  import classNames from 'classnames';
9
9
  import get from 'lodash/get';
10
10
  import isArray from 'lodash/isArray';
@@ -387,14 +387,41 @@ var UploadField = function UploadField(_ref) {
387
387
  areInsidesReadyToBeVisible: true,
388
388
  proudlyDisplayPoweredByUppy: false,
389
389
  showProgressDetails: true
390
- }))) : null, !showResourceModal && !disabled && withButton && uppy !== null ? /*#__PURE__*/React.createElement(DashboardModal, {
391
- uppy: uppy,
392
- className: styles.dashboardModal,
390
+ }))) : null, !showResourceModal && !disabled && withButton && uppy !== null && modalOpened ?
391
+ /*#__PURE__*/
392
+ // <DashboardModal
393
+ // uppy={uppy}
394
+ // className={styles.dashboardModal}
395
+ // plugins={sources}
396
+ // open={modalOpened}
397
+ // isHidden={!modalOpened}
398
+ // {...(width !== null ? { width } : null)}
399
+ // {...(height !== null ? { height } : null)}
400
+ // onRequestClose={closeModal}
401
+ // proudlyDisplayPoweredByUppy={false}
402
+ // closeModalOnClickOutside
403
+ // />
404
+ React.createElement(Dialog, {
405
+ size: "lg",
406
+ onClose: closeModal,
407
+ title: addButtonLabel
408
+ }, /*#__PURE__*/React.createElement(Dashboard, Object.assign({
409
+ uppy: uppy
410
+ // {...(containerWidth !== null && height !== null
411
+ // ? { width: containerWidth }
412
+ // : null)}
413
+ }, width !== null ? {
414
+ width: width
415
+ } : null, height !== null ? {
416
+ height: height
417
+ } : null, {
393
418
  plugins: sources,
394
- open: modalOpened,
395
- onRequestClose: closeModal,
396
- closeModalOnClickOutside: true
397
- }) : null, showResourceModal ? /*#__PURE__*/React.createElement(Dialog, {
419
+ inline: true,
420
+ showProgressDetails: true,
421
+ areInsidesReadyToBeVisible: true,
422
+ proudlyDisplayPoweredByUppy: false,
423
+ doneButtonHandler: closeModal
424
+ }))) : null, showResourceModal ? /*#__PURE__*/React.createElement(Dialog, {
398
425
  title: /*#__PURE__*/React.createElement(Label, null, searchButtonLabel),
399
426
  size: "lg",
400
427
  onClose: closeResourceModal
package/lib/index.js CHANGED
@@ -409,14 +409,41 @@ var UploadField = function UploadField(_ref) {
409
409
  areInsidesReadyToBeVisible: true,
410
410
  proudlyDisplayPoweredByUppy: false,
411
411
  showProgressDetails: true
412
- }))) : null, !showResourceModal && !disabled && withButton && uppy$1 !== null ? /*#__PURE__*/React__default["default"].createElement(react.DashboardModal, {
413
- uppy: uppy$1,
414
- className: styles.dashboardModal,
412
+ }))) : null, !showResourceModal && !disabled && withButton && uppy$1 !== null && modalOpened ?
413
+ /*#__PURE__*/
414
+ // <DashboardModal
415
+ // uppy={uppy}
416
+ // className={styles.dashboardModal}
417
+ // plugins={sources}
418
+ // open={modalOpened}
419
+ // isHidden={!modalOpened}
420
+ // {...(width !== null ? { width } : null)}
421
+ // {...(height !== null ? { height } : null)}
422
+ // onRequestClose={closeModal}
423
+ // proudlyDisplayPoweredByUppy={false}
424
+ // closeModalOnClickOutside
425
+ // />
426
+ React__default["default"].createElement(Dialog__default["default"], {
427
+ size: "lg",
428
+ onClose: closeModal,
429
+ title: addButtonLabel
430
+ }, /*#__PURE__*/React__default["default"].createElement(react.Dashboard, Object.assign({
431
+ uppy: uppy$1
432
+ // {...(containerWidth !== null && height !== null
433
+ // ? { width: containerWidth }
434
+ // : null)}
435
+ }, width !== null ? {
436
+ width: width
437
+ } : null, height !== null ? {
438
+ height: height
439
+ } : null, {
415
440
  plugins: sources,
416
- open: modalOpened,
417
- onRequestClose: closeModal,
418
- closeModalOnClickOutside: true
419
- }) : null, showResourceModal ? /*#__PURE__*/React__default["default"].createElement(Dialog__default["default"], {
441
+ inline: true,
442
+ showProgressDetails: true,
443
+ areInsidesReadyToBeVisible: true,
444
+ proudlyDisplayPoweredByUppy: false,
445
+ doneButtonHandler: closeModal
446
+ }))) : null, showResourceModal ? /*#__PURE__*/React__default["default"].createElement(Dialog__default["default"], {
420
447
  title: /*#__PURE__*/React__default["default"].createElement(Label__default["default"], null, searchButtonLabel),
421
448
  size: "lg",
422
449
  onClose: closeResourceModal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/field-upload",
3
- "version": "3.0.23",
3
+ "version": "3.0.24",
4
4
  "description": "An Upload field",
5
5
  "keywords": [
6
6
  "javascript"
@@ -62,7 +62,7 @@
62
62
  "@panneau/element-card": "^3.0.23",
63
63
  "@panneau/element-label": "^3.0.23",
64
64
  "@panneau/list-resource-items": "^3.0.23",
65
- "@panneau/modal-dialog": "^3.0.23",
65
+ "@panneau/modal-dialog": "^3.0.24",
66
66
  "@panneau/themes": "^3.0.23",
67
67
  "@panneau/uppy": "^3.0.23",
68
68
  "@uppy/core": "^3.5.0",
@@ -82,5 +82,5 @@
82
82
  "publishConfig": {
83
83
  "access": "public"
84
84
  },
85
- "gitHead": "82545a45cec2f58e9a98d08527dd96fcf92d5daa"
85
+ "gitHead": "844eae65796ad7192cea4d5e50ac7234bcf0a6b9"
86
86
  }