siam-ui-utils 3.1.0 → 3.1.2
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/dist/CustomBootstrap.js +9 -9
- package/dist/_virtual/_commonjsHelpers.js +7 -7
- package/dist/_virtual/events.js +6 -6
- package/dist/_virtual/events2.js +5 -5
- package/dist/_virtual/index.js +8 -8
- package/dist/_virtual/index2.js +5 -5
- package/dist/assets/img/copiar.png.js +5 -5
- package/dist/assets/img/take-photo.jpg.js +5 -5
- package/dist/constants.js +9 -9
- package/dist/copy-link/index.js +60 -60
- package/dist/copy-link/styles.css +37 -37
- package/dist/custom-input/CustomInputCheckbox.js +37 -37
- package/dist/custom-input/CustomInputCurrency.js +84 -84
- package/dist/custom-input/CustomInputFile.js +47 -47
- package/dist/custom-input/CustomInputRadio.js +68 -68
- package/dist/custom-input/constant.js +5 -5
- package/dist/custom-input/index.js +12 -12
- package/dist/drag-and-dropzone/DropzoneComponent.js +83 -83
- package/dist/drag-and-dropzone/config.js +59 -59
- package/dist/drag-and-dropzone/index.js +39 -39
- package/dist/dropzone/Input.js +77 -77
- package/dist/dropzone/Layout.js +50 -50
- package/dist/dropzone/Preview.js +117 -117
- package/dist/dropzone/SubmitButton.js +34 -34
- package/dist/dropzone/assets/cancel.svg.js +5 -5
- package/dist/dropzone/assets/remove.svg.js +5 -5
- package/dist/dropzone/assets/restart.svg.js +5 -5
- package/dist/dropzone/index.js +514 -514
- package/dist/dropzone/utils.js +93 -93
- package/dist/dropzone-uploader/base/index.js +135 -135
- package/dist/dropzone-uploader/index.js +7 -7
- package/dist/dropzone-uploader/styled/index.js +148 -148
- package/dist/iconos/constants-svg.js +666 -666
- package/dist/iconos/icon-button-svg.js +50 -50
- package/dist/iconos/index.js +24 -24
- package/dist/iconos/styled-icon.js +26 -26
- package/dist/index.js +4 -4
- package/dist/intl-messages/index.js +11 -11
- package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +8 -8
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +13 -13
- package/dist/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +8 -8
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +13 -13
- package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +9 -9
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js +77 -0
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js.map +1 -0
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Button.js +111 -111
- package/dist/node_modules/@neolution-ch/reactstrap/esm/CloseButton.js +106 -106
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Col.js +125 -125
- package/dist/node_modules/@neolution-ch/reactstrap/esm/FormGroup.js +75 -75
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Input.js +225 -225
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Label.js +122 -122
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Row.js +83 -83
- package/dist/node_modules/@neolution-ch/reactstrap/esm/utils.js +68 -68
- package/dist/node_modules/classnames/index.js +62 -62
- package/dist/node_modules/dom-helpers/esm/addClass.js +10 -10
- package/dist/node_modules/dom-helpers/esm/hasClass.js +8 -8
- package/dist/node_modules/dom-helpers/esm/removeClass.js +16 -16
- package/dist/node_modules/dropzone/dist/dropzone.js +1968 -1968
- package/dist/node_modules/events/events.js +372 -372
- package/dist/node_modules/just-extend/index.esm.js +43 -43
- package/dist/node_modules/react-transition-group/esm/CSSTransition.js +275 -275
- package/dist/node_modules/react-transition-group/esm/Transition.js +441 -441
- package/dist/node_modules/react-transition-group/esm/TransitionGroup.js +146 -146
- package/dist/node_modules/react-transition-group/esm/TransitionGroupContext.js +6 -6
- package/dist/node_modules/react-transition-group/esm/config.js +7 -7
- package/dist/node_modules/react-transition-group/esm/utils/ChildMapping.js +100 -100
- package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +24 -24
- package/dist/node_modules/react-transition-group/esm/utils/reflow.js +7 -7
- package/dist/react-notifications/Notification.js +73 -73
- package/dist/react-notifications/NotificationContainer.js +59 -59
- package/dist/react-notifications/NotificationManager.js +174 -174
- package/dist/react-notifications/Notifications.js +72 -72
- package/dist/react-notifications/constants.js +26 -26
- package/dist/react-notifications/index.js +11 -11
- package/dist/select/custom-select/constants.js +8 -8
- package/dist/select/custom-select/index.js +89 -89
- package/dist/select/custom-select-input/index.js +12 -12
- package/dist/select/index.js +9 -9
- package/dist/select/multi-select/badge-label-multi-select.js +29 -29
- package/dist/select/multi-select/index.css +36 -36
- package/dist/select/multi-select/index.js +171 -171
- package/dist/select/multi-select/index.js.map +1 -1
- package/dist/select/multi-select/styled-component.js +23 -23
- package/dist/select/multi-select/styled-component.js.map +1 -1
- package/dist/timer/index.js +60 -60
- package/dist/timer/styles.css +58 -58
- package/dist/tomar-foto/index.js +62 -62
- package/dist/view-layout/button-editor.js +14 -14
- package/dist/view-layout/constants.js +11 -11
- package/dist/view-layout/editor-layer.js +28 -28
- package/dist/view-layout/index.js +53 -53
- package/dist/view-layout/slot-wrapper.js +39 -39
- package/dist/view-layout/styles.css +126 -126
- package/dist/where-by-room/index.js +20 -20
- package/dist/where-by-room/room.js +78 -78
- package/package.json +1 -4
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
const dropzoneComponentConfig = {
|
|
2
|
-
postUrl: "no-url"
|
|
3
|
-
};
|
|
4
|
-
const dropzoneConfig = {
|
|
5
|
-
thumbnailHeight: 160,
|
|
6
|
-
acceptedFiles: "image/*,application/pdf,",
|
|
7
|
-
maxFilesize: 10,
|
|
8
|
-
maxFiles: 20,
|
|
9
|
-
dictDefaultMessage: "Presione para agregar imagenes",
|
|
10
|
-
previewTemplate: `
|
|
11
|
-
<div class="dz-preview dz-file-preview mb-0">
|
|
12
|
-
<div class="d-flex flex-row">
|
|
13
|
-
<div class="p-0 w-30 position-relative">
|
|
14
|
-
<div class="dz-error-mark">
|
|
15
|
-
<span>
|
|
16
|
-
<i></i>
|
|
17
|
-
</span>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="dz-success-mark">
|
|
20
|
-
<span>
|
|
21
|
-
<i></i>
|
|
22
|
-
</span>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="preview-container">
|
|
25
|
-
<img
|
|
26
|
-
data-dz-thumbnail
|
|
27
|
-
class="img-thumbnail border-0"
|
|
28
|
-
alt="preview_image"
|
|
29
|
-
/>
|
|
30
|
-
<i class="simple-icon-doc preview-icon"></i>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<div class="pl-3 pt-2 pr-2 pb-1 w-70 dz-details position-relative">
|
|
35
|
-
<div>
|
|
36
|
-
<span data-dz-name></span>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="text-primary text-extra-small" data-dz-size></div>
|
|
39
|
-
<div class="dz-progress">
|
|
40
|
-
<span class="dz-upload" data-dz-uploadprogress></span>
|
|
41
|
-
</div>
|
|
42
|
-
<div class="dz-error-message">
|
|
43
|
-
<span data-dz-errormessage></span>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
<a href="#/" class="remove dz-remove" data-dz-remove>
|
|
49
|
-
<i class="glyph-icon simple-icon-trash"></i>
|
|
50
|
-
</a>
|
|
51
|
-
</div>
|
|
52
|
-
`,
|
|
53
|
-
autoProcessQueue: false
|
|
54
|
-
};
|
|
55
|
-
export {
|
|
56
|
-
dropzoneComponentConfig,
|
|
57
|
-
dropzoneConfig
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=config.js.map
|
|
1
|
+
const dropzoneComponentConfig = {
|
|
2
|
+
postUrl: "no-url"
|
|
3
|
+
};
|
|
4
|
+
const dropzoneConfig = {
|
|
5
|
+
thumbnailHeight: 160,
|
|
6
|
+
acceptedFiles: "image/*,application/pdf,",
|
|
7
|
+
maxFilesize: 10,
|
|
8
|
+
maxFiles: 20,
|
|
9
|
+
dictDefaultMessage: "Presione para agregar imagenes",
|
|
10
|
+
previewTemplate: `
|
|
11
|
+
<div class="dz-preview dz-file-preview mb-0">
|
|
12
|
+
<div class="d-flex flex-row">
|
|
13
|
+
<div class="p-0 w-30 position-relative">
|
|
14
|
+
<div class="dz-error-mark">
|
|
15
|
+
<span>
|
|
16
|
+
<i></i>
|
|
17
|
+
</span>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="dz-success-mark">
|
|
20
|
+
<span>
|
|
21
|
+
<i></i>
|
|
22
|
+
</span>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="preview-container">
|
|
25
|
+
<img
|
|
26
|
+
data-dz-thumbnail
|
|
27
|
+
class="img-thumbnail border-0"
|
|
28
|
+
alt="preview_image"
|
|
29
|
+
/>
|
|
30
|
+
<i class="simple-icon-doc preview-icon"></i>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="pl-3 pt-2 pr-2 pb-1 w-70 dz-details position-relative">
|
|
35
|
+
<div>
|
|
36
|
+
<span data-dz-name></span>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="text-primary text-extra-small" data-dz-size></div>
|
|
39
|
+
<div class="dz-progress">
|
|
40
|
+
<span class="dz-upload" data-dz-uploadprogress></span>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="dz-error-message">
|
|
43
|
+
<span data-dz-errormessage></span>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<a href="#/" class="remove dz-remove" data-dz-remove>
|
|
49
|
+
<i class="glyph-icon simple-icon-trash"></i>
|
|
50
|
+
</a>
|
|
51
|
+
</div>
|
|
52
|
+
`,
|
|
53
|
+
autoProcessQueue: false
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
dropzoneComponentConfig,
|
|
57
|
+
dropzoneConfig
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import DropzoneComponent from "./DropzoneComponent.js";
|
|
3
|
-
import { dropzoneConfig, dropzoneComponentConfig } from "./config.js";
|
|
4
|
-
import "./index.css";
|
|
5
|
-
const DragAndDropZone = ({
|
|
6
|
-
files = [],
|
|
7
|
-
keyDc = null,
|
|
8
|
-
disableUpload = false,
|
|
9
|
-
onDeleteFile = () => {
|
|
10
|
-
},
|
|
11
|
-
onInsertFile = () => {
|
|
12
|
-
},
|
|
13
|
-
className = ""
|
|
14
|
-
}) => {
|
|
15
|
-
const _className = className + disableUpload === true ? "dz-disable" : "dz-eneable";
|
|
16
|
-
return /* @__PURE__ */ jsx(
|
|
17
|
-
DropzoneComponent,
|
|
18
|
-
{
|
|
19
|
-
config: dropzoneComponentConfig,
|
|
20
|
-
initialFiles: [files],
|
|
21
|
-
className: _className,
|
|
22
|
-
djsConfig: dropzoneConfig,
|
|
23
|
-
eventHandlers: {
|
|
24
|
-
removedfile: (file) => {
|
|
25
|
-
onDeleteFile(file);
|
|
26
|
-
},
|
|
27
|
-
addedfile: (file) => {
|
|
28
|
-
onInsertFile(file);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
keyDc
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
export {
|
|
36
|
-
DragAndDropZone,
|
|
37
|
-
DragAndDropZone as default
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import DropzoneComponent from "./DropzoneComponent.js";
|
|
3
|
+
import { dropzoneConfig, dropzoneComponentConfig } from "./config.js";
|
|
4
|
+
import "./index.css";
|
|
5
|
+
const DragAndDropZone = ({
|
|
6
|
+
files = [],
|
|
7
|
+
keyDc = null,
|
|
8
|
+
disableUpload = false,
|
|
9
|
+
onDeleteFile = () => {
|
|
10
|
+
},
|
|
11
|
+
onInsertFile = () => {
|
|
12
|
+
},
|
|
13
|
+
className = ""
|
|
14
|
+
}) => {
|
|
15
|
+
const _className = className + disableUpload === true ? "dz-disable" : "dz-eneable";
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
DropzoneComponent,
|
|
18
|
+
{
|
|
19
|
+
config: dropzoneComponentConfig,
|
|
20
|
+
initialFiles: [files],
|
|
21
|
+
className: _className,
|
|
22
|
+
djsConfig: dropzoneConfig,
|
|
23
|
+
eventHandlers: {
|
|
24
|
+
removedfile: (file) => {
|
|
25
|
+
onDeleteFile(file);
|
|
26
|
+
},
|
|
27
|
+
addedfile: (file) => {
|
|
28
|
+
onInsertFile(file);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
keyDc
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
DragAndDropZone,
|
|
37
|
+
DragAndDropZone as default
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
package/dist/dropzone/Input.js
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
const Input = (props) => {
|
|
4
|
-
const {
|
|
5
|
-
className,
|
|
6
|
-
labelClassName,
|
|
7
|
-
labelWithFilesClassName,
|
|
8
|
-
style,
|
|
9
|
-
labelStyle,
|
|
10
|
-
labelWithFilesStyle,
|
|
11
|
-
getFilesFromEvent,
|
|
12
|
-
accept,
|
|
13
|
-
multiple,
|
|
14
|
-
disabled,
|
|
15
|
-
content,
|
|
16
|
-
withFilesContent,
|
|
17
|
-
onFiles,
|
|
18
|
-
files
|
|
19
|
-
} = props;
|
|
20
|
-
return /* @__PURE__ */ jsxs(
|
|
21
|
-
"label",
|
|
22
|
-
{
|
|
23
|
-
className: files.length > 0 ? labelWithFilesClassName : labelClassName,
|
|
24
|
-
style: files.length > 0 ? labelWithFilesStyle : labelStyle,
|
|
25
|
-
children: [
|
|
26
|
-
files.length > 0 ? withFilesContent : content,
|
|
27
|
-
/* @__PURE__ */ jsx(
|
|
28
|
-
"input",
|
|
29
|
-
{
|
|
30
|
-
className,
|
|
31
|
-
style,
|
|
32
|
-
type: "file",
|
|
33
|
-
accept,
|
|
34
|
-
multiple,
|
|
35
|
-
disabled,
|
|
36
|
-
onChange: async (e) => {
|
|
37
|
-
const target = e.target;
|
|
38
|
-
const chosenFiles = await getFilesFromEvent(e);
|
|
39
|
-
onFiles(chosenFiles);
|
|
40
|
-
target.value = null;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
Input.propTypes = {
|
|
49
|
-
className: PropTypes.string,
|
|
50
|
-
labelClassName: PropTypes.string,
|
|
51
|
-
labelWithFilesClassName: PropTypes.string,
|
|
52
|
-
style: PropTypes.object,
|
|
53
|
-
labelStyle: PropTypes.object,
|
|
54
|
-
labelWithFilesStyle: PropTypes.object,
|
|
55
|
-
getFilesFromEvent: PropTypes.func.isRequired,
|
|
56
|
-
accept: PropTypes.string.isRequired,
|
|
57
|
-
multiple: PropTypes.bool.isRequired,
|
|
58
|
-
disabled: PropTypes.bool.isRequired,
|
|
59
|
-
content: PropTypes.node,
|
|
60
|
-
withFilesContent: PropTypes.node,
|
|
61
|
-
onFiles: PropTypes.func.isRequired,
|
|
62
|
-
files: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
63
|
-
extra: PropTypes.shape({
|
|
64
|
-
active: PropTypes.bool.isRequired,
|
|
65
|
-
reject: PropTypes.bool.isRequired,
|
|
66
|
-
dragged: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
67
|
-
accept: PropTypes.string.isRequired,
|
|
68
|
-
multiple: PropTypes.bool.isRequired,
|
|
69
|
-
minSizeBytes: PropTypes.number.isRequired,
|
|
70
|
-
maxSizeBytes: PropTypes.number.isRequired,
|
|
71
|
-
maxFiles: PropTypes.number.isRequired
|
|
72
|
-
}).isRequired
|
|
73
|
-
};
|
|
74
|
-
export {
|
|
75
|
-
Input as default
|
|
76
|
-
};
|
|
77
|
-
//# sourceMappingURL=Input.js.map
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
const Input = (props) => {
|
|
4
|
+
const {
|
|
5
|
+
className,
|
|
6
|
+
labelClassName,
|
|
7
|
+
labelWithFilesClassName,
|
|
8
|
+
style,
|
|
9
|
+
labelStyle,
|
|
10
|
+
labelWithFilesStyle,
|
|
11
|
+
getFilesFromEvent,
|
|
12
|
+
accept,
|
|
13
|
+
multiple,
|
|
14
|
+
disabled,
|
|
15
|
+
content,
|
|
16
|
+
withFilesContent,
|
|
17
|
+
onFiles,
|
|
18
|
+
files
|
|
19
|
+
} = props;
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
"label",
|
|
22
|
+
{
|
|
23
|
+
className: files.length > 0 ? labelWithFilesClassName : labelClassName,
|
|
24
|
+
style: files.length > 0 ? labelWithFilesStyle : labelStyle,
|
|
25
|
+
children: [
|
|
26
|
+
files.length > 0 ? withFilesContent : content,
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
"input",
|
|
29
|
+
{
|
|
30
|
+
className,
|
|
31
|
+
style,
|
|
32
|
+
type: "file",
|
|
33
|
+
accept,
|
|
34
|
+
multiple,
|
|
35
|
+
disabled,
|
|
36
|
+
onChange: async (e) => {
|
|
37
|
+
const target = e.target;
|
|
38
|
+
const chosenFiles = await getFilesFromEvent(e);
|
|
39
|
+
onFiles(chosenFiles);
|
|
40
|
+
target.value = null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
Input.propTypes = {
|
|
49
|
+
className: PropTypes.string,
|
|
50
|
+
labelClassName: PropTypes.string,
|
|
51
|
+
labelWithFilesClassName: PropTypes.string,
|
|
52
|
+
style: PropTypes.object,
|
|
53
|
+
labelStyle: PropTypes.object,
|
|
54
|
+
labelWithFilesStyle: PropTypes.object,
|
|
55
|
+
getFilesFromEvent: PropTypes.func.isRequired,
|
|
56
|
+
accept: PropTypes.string.isRequired,
|
|
57
|
+
multiple: PropTypes.bool.isRequired,
|
|
58
|
+
disabled: PropTypes.bool.isRequired,
|
|
59
|
+
content: PropTypes.node,
|
|
60
|
+
withFilesContent: PropTypes.node,
|
|
61
|
+
onFiles: PropTypes.func.isRequired,
|
|
62
|
+
files: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
63
|
+
extra: PropTypes.shape({
|
|
64
|
+
active: PropTypes.bool.isRequired,
|
|
65
|
+
reject: PropTypes.bool.isRequired,
|
|
66
|
+
dragged: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
67
|
+
accept: PropTypes.string.isRequired,
|
|
68
|
+
multiple: PropTypes.bool.isRequired,
|
|
69
|
+
minSizeBytes: PropTypes.number.isRequired,
|
|
70
|
+
maxSizeBytes: PropTypes.number.isRequired,
|
|
71
|
+
maxFiles: PropTypes.number.isRequired
|
|
72
|
+
}).isRequired
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
Input as default
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=Input.js.map
|
package/dist/dropzone/Layout.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { jsxs } from "react/jsx-runtime";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
const Layout = (props) => {
|
|
4
|
-
const {
|
|
5
|
-
input,
|
|
6
|
-
previews,
|
|
7
|
-
submitButton,
|
|
8
|
-
dropzoneProps,
|
|
9
|
-
files,
|
|
10
|
-
extra: { maxFiles }
|
|
11
|
-
} = props;
|
|
12
|
-
return /* @__PURE__ */ jsxs("div", { ...dropzoneProps, children: [
|
|
13
|
-
previews,
|
|
14
|
-
files.length < maxFiles && input,
|
|
15
|
-
files.length > 0 && submitButton
|
|
16
|
-
] });
|
|
17
|
-
};
|
|
18
|
-
Layout.propTypes = {
|
|
19
|
-
input: PropTypes.node,
|
|
20
|
-
previews: PropTypes.arrayOf(PropTypes.node),
|
|
21
|
-
submitButton: PropTypes.node,
|
|
22
|
-
dropzoneProps: PropTypes.shape({
|
|
23
|
-
ref: PropTypes.any.isRequired,
|
|
24
|
-
className: PropTypes.string.isRequired,
|
|
25
|
-
style: PropTypes.object,
|
|
26
|
-
onDragEnter: PropTypes.func.isRequired,
|
|
27
|
-
onDragOver: PropTypes.func.isRequired,
|
|
28
|
-
onDragLeave: PropTypes.func.isRequired,
|
|
29
|
-
onDrop: PropTypes.func.isRequired
|
|
30
|
-
}).isRequired,
|
|
31
|
-
files: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
32
|
-
extra: PropTypes.shape({
|
|
33
|
-
active: PropTypes.bool.isRequired,
|
|
34
|
-
reject: PropTypes.bool.isRequired,
|
|
35
|
-
dragged: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
36
|
-
accept: PropTypes.string.isRequired,
|
|
37
|
-
multiple: PropTypes.bool.isRequired,
|
|
38
|
-
minSizeBytes: PropTypes.number.isRequired,
|
|
39
|
-
maxSizeBytes: PropTypes.number.isRequired,
|
|
40
|
-
maxFiles: PropTypes.number.isRequired,
|
|
41
|
-
onFiles: PropTypes.func.isRequired,
|
|
42
|
-
onCancelFile: PropTypes.func.isRequired,
|
|
43
|
-
onRemoveFile: PropTypes.func.isRequired,
|
|
44
|
-
onRestartFile: PropTypes.func.isRequired
|
|
45
|
-
}).isRequired
|
|
46
|
-
};
|
|
47
|
-
export {
|
|
48
|
-
Layout as default
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=Layout.js.map
|
|
1
|
+
import { jsxs } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
const Layout = (props) => {
|
|
4
|
+
const {
|
|
5
|
+
input,
|
|
6
|
+
previews,
|
|
7
|
+
submitButton,
|
|
8
|
+
dropzoneProps,
|
|
9
|
+
files,
|
|
10
|
+
extra: { maxFiles }
|
|
11
|
+
} = props;
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", { ...dropzoneProps, children: [
|
|
13
|
+
previews,
|
|
14
|
+
files.length < maxFiles && input,
|
|
15
|
+
files.length > 0 && submitButton
|
|
16
|
+
] });
|
|
17
|
+
};
|
|
18
|
+
Layout.propTypes = {
|
|
19
|
+
input: PropTypes.node,
|
|
20
|
+
previews: PropTypes.arrayOf(PropTypes.node),
|
|
21
|
+
submitButton: PropTypes.node,
|
|
22
|
+
dropzoneProps: PropTypes.shape({
|
|
23
|
+
ref: PropTypes.any.isRequired,
|
|
24
|
+
className: PropTypes.string.isRequired,
|
|
25
|
+
style: PropTypes.object,
|
|
26
|
+
onDragEnter: PropTypes.func.isRequired,
|
|
27
|
+
onDragOver: PropTypes.func.isRequired,
|
|
28
|
+
onDragLeave: PropTypes.func.isRequired,
|
|
29
|
+
onDrop: PropTypes.func.isRequired
|
|
30
|
+
}).isRequired,
|
|
31
|
+
files: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
32
|
+
extra: PropTypes.shape({
|
|
33
|
+
active: PropTypes.bool.isRequired,
|
|
34
|
+
reject: PropTypes.bool.isRequired,
|
|
35
|
+
dragged: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
36
|
+
accept: PropTypes.string.isRequired,
|
|
37
|
+
multiple: PropTypes.bool.isRequired,
|
|
38
|
+
minSizeBytes: PropTypes.number.isRequired,
|
|
39
|
+
maxSizeBytes: PropTypes.number.isRequired,
|
|
40
|
+
maxFiles: PropTypes.number.isRequired,
|
|
41
|
+
onFiles: PropTypes.func.isRequired,
|
|
42
|
+
onCancelFile: PropTypes.func.isRequired,
|
|
43
|
+
onRemoveFile: PropTypes.func.isRequired,
|
|
44
|
+
onRestartFile: PropTypes.func.isRequired
|
|
45
|
+
}).isRequired
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
Layout as default
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=Layout.js.map
|