@panneau/field-upload 3.0.106 → 3.0.107

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.
Files changed (3) hide show
  1. package/es/index.js +28 -33
  2. package/lib/index.js +27 -32
  3. package/package.json +2 -2
package/es/index.js CHANGED
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
3
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
4
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
5
- import { Dashboard, DashboardModal } from '@uppy/react';
5
+ import { Dashboard } from '@uppy/react';
6
6
  import classNames from 'classnames';
7
7
  import isArray from 'lodash/isArray';
8
8
  import isObject from 'lodash/isObject';
@@ -311,6 +311,12 @@ var UploadField = function UploadField(_ref) {
311
311
  onListPageChange = _useResourceQuery.onPageChange,
312
312
  onListQueryChange = _useResourceQuery.onQueryChange,
313
313
  onListQueryReset = _useResourceQuery.onQueryReset;
314
+
315
+ // console.log(
316
+ // 'modalOpened',
317
+ // !showResourceModal && !disabled && withButton && uppy !== null && modalOpened,
318
+ // );
319
+
314
320
  return /*#__PURE__*/React.createElement("div", {
315
321
  className: classNames([styles.container, _defineProperty({}, className, className !== null)])
316
322
  // ref={containerRef}
@@ -365,40 +371,29 @@ var UploadField = function UploadField(_ref) {
365
371
  showProgressDetails: true,
366
372
  areInsidesReadyToBeVisible: true,
367
373
  proudlyDisplayPoweredByUppy: false
368
- }))) : null, !showResourceModal && !disabled && withButton && uppy !== null && modalOpened ? /*#__PURE__*/React.createElement(DashboardModal, {
369
- uppy: uppy,
370
- className: styles.dashboardModal,
374
+ }))) : null, !showResourceModal && !disabled && withButton && uppy !== null && modalOpened ? /*#__PURE__*/React.createElement(Dialog, {
375
+ size: "lg",
376
+ onClose: closeModal,
377
+ title: addButtonLabel
378
+ }, /*#__PURE__*/React.createElement(Dashboard, Object.assign({
379
+ uppy: uppy
380
+ // {...(containerWidth !== null && height !== null
381
+ // ? { width: containerWidth }
382
+ // : null)}
383
+ }, width !== null ? {
384
+ width: width
385
+ } : null, height !== null ? {
386
+ height: height
387
+ } : null, {
371
388
  plugins: sources,
372
- open: true,
373
- onRequestClose: closeModal,
374
- proudlyDisplayPoweredByUppy: false,
375
- closeModalOnClickOutside: true
376
- // areInsidesReadyToBeVisible
377
- // isDashboardVisible
378
- ,
389
+ inline: true,
379
390
  showProgressDetails: true,
380
- showAddFilesPanel: true
381
- }) :
382
- // ) : //
383
- // <Dialog size="lg" onClose={closeModal} title={addButtonLabel}>
384
- // <Dashboard
385
- // uppy={uppy}
386
- // // {...(containerWidth !== null && height !== null
387
- // // ? { width: containerWidth }
388
- // // : null)}
389
- // {...(width !== null ? { width } : null)}
390
- // {...(height !== null ? { height } : null)}
391
- // plugins={sources}
392
- // inline
393
- // showProgressDetails
394
- // // areInsidesReadyToBeVisible
395
- // // isDashboardVisible
396
- // showAddFilesPanel
397
- // proudlyDisplayPoweredByUppy={false}
398
- // doneButtonHandler={closeModalAndClear}
399
- // />
400
- // </Dialog>
401
- null, showResourceModal ? /*#__PURE__*/React.createElement(Dialog, {
391
+ areInsidesReadyToBeVisible: true,
392
+ isDashboardVisible: true,
393
+ showAddFilesPanel: true,
394
+ proudlyDisplayPoweredByUppy: false,
395
+ doneButtonHandler: closeModal
396
+ }))) : null, showResourceModal ? /*#__PURE__*/React.createElement(Dialog, {
402
397
  title: /*#__PURE__*/React.createElement(Label, null, findButtonLabel),
403
398
  size: "xl",
404
399
  onClose: closeResourceModal
package/lib/index.js CHANGED
@@ -331,6 +331,12 @@ var UploadField = function UploadField(_ref) {
331
331
  onListPageChange = _useResourceQuery.onPageChange,
332
332
  onListQueryChange = _useResourceQuery.onQueryChange,
333
333
  onListQueryReset = _useResourceQuery.onQueryReset;
334
+
335
+ // console.log(
336
+ // 'modalOpened',
337
+ // !showResourceModal && !disabled && withButton && uppy !== null && modalOpened,
338
+ // );
339
+
334
340
  return /*#__PURE__*/React__default["default"].createElement("div", {
335
341
  className: classNames__default["default"]([styles.container, _defineProperty__default["default"]({}, className, className !== null)])
336
342
  // ref={containerRef}
@@ -385,40 +391,29 @@ var UploadField = function UploadField(_ref) {
385
391
  showProgressDetails: true,
386
392
  areInsidesReadyToBeVisible: true,
387
393
  proudlyDisplayPoweredByUppy: false
388
- }))) : null, !showResourceModal && !disabled && withButton && uppy$1 !== null && modalOpened ? /*#__PURE__*/React__default["default"].createElement(react.DashboardModal, {
389
- uppy: uppy$1,
390
- className: styles.dashboardModal,
394
+ }))) : null, !showResourceModal && !disabled && withButton && uppy$1 !== null && modalOpened ? /*#__PURE__*/React__default["default"].createElement(Dialog__default["default"], {
395
+ size: "lg",
396
+ onClose: closeModal,
397
+ title: addButtonLabel
398
+ }, /*#__PURE__*/React__default["default"].createElement(react.Dashboard, Object.assign({
399
+ uppy: uppy$1
400
+ // {...(containerWidth !== null && height !== null
401
+ // ? { width: containerWidth }
402
+ // : null)}
403
+ }, width !== null ? {
404
+ width: width
405
+ } : null, height !== null ? {
406
+ height: height
407
+ } : null, {
391
408
  plugins: sources,
392
- open: true,
393
- onRequestClose: closeModal,
394
- proudlyDisplayPoweredByUppy: false,
395
- closeModalOnClickOutside: true
396
- // areInsidesReadyToBeVisible
397
- // isDashboardVisible
398
- ,
409
+ inline: true,
399
410
  showProgressDetails: true,
400
- showAddFilesPanel: true
401
- }) :
402
- // ) : //
403
- // <Dialog size="lg" onClose={closeModal} title={addButtonLabel}>
404
- // <Dashboard
405
- // uppy={uppy}
406
- // // {...(containerWidth !== null && height !== null
407
- // // ? { width: containerWidth }
408
- // // : null)}
409
- // {...(width !== null ? { width } : null)}
410
- // {...(height !== null ? { height } : null)}
411
- // plugins={sources}
412
- // inline
413
- // showProgressDetails
414
- // // areInsidesReadyToBeVisible
415
- // // isDashboardVisible
416
- // showAddFilesPanel
417
- // proudlyDisplayPoweredByUppy={false}
418
- // doneButtonHandler={closeModalAndClear}
419
- // />
420
- // </Dialog>
421
- null, showResourceModal ? /*#__PURE__*/React__default["default"].createElement(Dialog__default["default"], {
411
+ areInsidesReadyToBeVisible: true,
412
+ isDashboardVisible: true,
413
+ showAddFilesPanel: true,
414
+ proudlyDisplayPoweredByUppy: false,
415
+ doneButtonHandler: closeModal
416
+ }))) : null, showResourceModal ? /*#__PURE__*/React__default["default"].createElement(Dialog__default["default"], {
422
417
  title: /*#__PURE__*/React__default["default"].createElement(Label__default["default"], null, findButtonLabel),
423
418
  size: "xl",
424
419
  onClose: closeResourceModal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/field-upload",
3
- "version": "3.0.106",
3
+ "version": "3.0.107",
4
4
  "description": "An Upload field",
5
5
  "keywords": [
6
6
  "javascript"
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "ffd1542a94896319b8315c7e83b04fc6b422fc5e"
84
+ "gitHead": "84147f217be4806d5a6fb111cee39c0e6b0719cc"
85
85
  }