siam-ui-utils 3.0.28 → 3.0.30

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 (114) hide show
  1. package/dist/CustomBootstrap.js +9 -9
  2. package/dist/_virtual/_commonjsHelpers.js +7 -7
  3. package/dist/_virtual/events.js +6 -6
  4. package/dist/_virtual/events2.js +5 -5
  5. package/dist/_virtual/index.js +8 -8
  6. package/dist/_virtual/index2.js +5 -5
  7. package/dist/_virtual/react-dropzone.js +8 -8
  8. package/dist/_virtual/react-dropzone2.js +5 -5
  9. package/dist/assets/img/copiar.png.js +5 -5
  10. package/dist/assets/img/take-photo.jpg.js +5 -5
  11. package/dist/constants.js +9 -9
  12. package/dist/copy-link/index.js +60 -60
  13. package/dist/copy-link/styles.css +37 -37
  14. package/dist/custom-input/CustomInputCheckbox.js +36 -36
  15. package/dist/custom-input/CustomInputCurrency.js +85 -85
  16. package/dist/custom-input/CustomInputFile.js +46 -46
  17. package/dist/custom-input/CustomInputRadio.js +67 -67
  18. package/dist/custom-input/constant.js +5 -5
  19. package/dist/custom-input/index.js +12 -14
  20. package/dist/custom-input/index.js.map +1 -1
  21. package/dist/drag-and-dropzone/config.js +59 -59
  22. package/dist/drag-and-dropzone/index.js +39 -39
  23. package/dist/dropzone/Input.js +77 -77
  24. package/dist/dropzone/Layout.js +50 -50
  25. package/dist/dropzone/Preview.js +117 -117
  26. package/dist/dropzone/SubmitButton.js +34 -34
  27. package/dist/dropzone/assets/cancel.svg.js +5 -5
  28. package/dist/dropzone/assets/remove.svg.js +5 -5
  29. package/dist/dropzone/assets/restart.svg.js +5 -5
  30. package/dist/dropzone/index.js +514 -514
  31. package/dist/dropzone/utils.js +93 -93
  32. package/dist/dropzone-uploader/base/index.js +135 -135
  33. package/dist/dropzone-uploader/index.js +7 -7
  34. package/dist/dropzone-uploader/styled/index.js +149 -149
  35. package/dist/iconos/constants-svg.js +666 -666
  36. package/dist/iconos/icon-button-svg.js +50 -50
  37. package/dist/iconos/index.js +24 -24
  38. package/dist/iconos/styled-icon.js +26 -26
  39. package/dist/index.js +4 -4
  40. package/dist/intl-messages/index.js +11 -11
  41. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +8 -8
  42. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +13 -13
  43. package/dist/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +8 -8
  44. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +13 -13
  45. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +9 -9
  46. package/dist/node_modules/classnames/index.js +62 -62
  47. package/dist/node_modules/dom-helpers/esm/addClass.js +10 -10
  48. package/dist/node_modules/dom-helpers/esm/hasClass.js +8 -8
  49. package/dist/node_modules/dom-helpers/esm/removeClass.js +16 -16
  50. package/dist/node_modules/events/events.js +372 -372
  51. package/dist/node_modules/react-dropzone-component/dist/react-dropzone.js +1023 -1023
  52. package/dist/node_modules/react-multi-select-component/dist/esm/index.js +178 -178
  53. package/dist/node_modules/react-transition-group/esm/CSSTransition.js +275 -275
  54. package/dist/node_modules/react-transition-group/esm/Transition.js +441 -441
  55. package/dist/node_modules/react-transition-group/esm/TransitionGroup.js +146 -146
  56. package/dist/node_modules/react-transition-group/esm/TransitionGroupContext.js +6 -6
  57. package/dist/node_modules/react-transition-group/esm/config.js +7 -7
  58. package/dist/node_modules/react-transition-group/esm/utils/ChildMapping.js +100 -100
  59. package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +24 -24
  60. package/dist/node_modules/react-transition-group/esm/utils/reflow.js +7 -7
  61. package/dist/react-notifications/Notification.js +73 -73
  62. package/dist/react-notifications/NotificationContainer.js +59 -59
  63. package/dist/react-notifications/NotificationManager.js +174 -174
  64. package/dist/react-notifications/Notifications.js +72 -72
  65. package/dist/react-notifications/constants.js +26 -26
  66. package/dist/react-notifications/index.js +11 -11
  67. package/dist/select/custom-select/constants.js +8 -8
  68. package/dist/select/custom-select/index.js +90 -90
  69. package/dist/select/custom-select-input/index.js +12 -12
  70. package/dist/select/index.js +9 -9
  71. package/dist/select/multi-select/badge-label-multi-select.js +29 -29
  72. package/dist/select/multi-select/index.css +23 -23
  73. package/dist/select/multi-select/index.js +63 -63
  74. package/dist/select/multi-select/styled-component.js +24 -24
  75. package/dist/timer/index.js +60 -60
  76. package/dist/timer/styles.css +58 -58
  77. package/dist/tomar-foto/index.js +62 -62
  78. package/dist/view-layout/button-editor.js +14 -14
  79. package/dist/view-layout/constants.js +11 -11
  80. package/dist/view-layout/editor-layer.js +28 -28
  81. package/dist/view-layout/index.js +53 -53
  82. package/dist/view-layout/slot-wrapper.js +39 -39
  83. package/dist/view-layout/styles.css +126 -126
  84. package/dist/where-by-room/index.js +20 -20
  85. package/dist/where-by-room/room.js +78 -78
  86. package/package.json +1 -1
  87. package/dist/_virtual/browser.js +0 -8
  88. package/dist/_virtual/browser.js.map +0 -1
  89. package/dist/_virtual/warning.js +0 -8
  90. package/dist/_virtual/warning.js.map +0 -1
  91. package/dist/custom-input/customInputMask/children-wrapper.js +0 -12
  92. package/dist/custom-input/customInputMask/children-wrapper.js.map +0 -1
  93. package/dist/custom-input/customInputMask/constants.js +0 -19
  94. package/dist/custom-input/customInputMask/constants.js.map +0 -1
  95. package/dist/custom-input/customInputMask/hooks.js +0 -159
  96. package/dist/custom-input/customInputMask/hooks.js.map +0 -1
  97. package/dist/custom-input/customInputMask/index.js +0 -184
  98. package/dist/custom-input/customInputMask/index.js.map +0 -1
  99. package/dist/custom-input/customInputMask/utils/defer.js +0 -11
  100. package/dist/custom-input/customInputMask/utils/defer.js.map +0 -1
  101. package/dist/custom-input/customInputMask/utils/helpers.js +0 -42
  102. package/dist/custom-input/customInputMask/utils/helpers.js.map +0 -1
  103. package/dist/custom-input/customInputMask/utils/input.js +0 -25
  104. package/dist/custom-input/customInputMask/utils/input.js.map +0 -1
  105. package/dist/custom-input/customInputMask/utils/mask.js +0 -220
  106. package/dist/custom-input/customInputMask/utils/mask.js.map +0 -1
  107. package/dist/custom-input/customInputMask/utils/parse-mask.js +0 -72
  108. package/dist/custom-input/customInputMask/utils/parse-mask.js.map +0 -1
  109. package/dist/custom-input/customInputMask/validate-props.js +0 -35
  110. package/dist/custom-input/customInputMask/validate-props.js.map +0 -1
  111. package/dist/node_modules/invariant/browser.js +0 -39
  112. package/dist/node_modules/invariant/browser.js.map +0 -1
  113. package/dist/node_modules/warning/warning.js +0 -51
  114. package/dist/node_modules/warning/warning.js.map +0 -1
@@ -1,85 +1,85 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useState, useEffect } from "react";
3
- import { Input } from "reactstrap";
4
- import { fieldToCurrency } from "siam-utils";
5
- const CustomInputCurrency = (props) => {
6
- const {
7
- onChange = () => {
8
- },
9
- onFocus = () => {
10
- },
11
- value = {},
12
- maxLength = "20",
13
- style = {}
14
- } = props;
15
- const styleCurrency = { ...style, textAlign: "right" };
16
- const [valueInputCur, setValueInputCur] = useState("");
17
- const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
18
- const handleInputOnBlur = (event) => {
19
- const { target } = event;
20
- if (valueInputCur !== "") {
21
- const valor = valueInputCur.replace(".", "");
22
- const valorPersistence = valor.replace(",", ".");
23
- setValueInputCur(fieldToCurrency(valorPersistence));
24
- onChange({
25
- ...event,
26
- target: {
27
- ...target,
28
- value: valorPersistence,
29
- valueCurrency: fieldToCurrency(valorPersistence),
30
- valueFloat: parseFloat(valorPersistence)
31
- }
32
- });
33
- }
34
- };
35
- const handleInputOnFocus = (e) => {
36
- if (valueInputCur !== "") {
37
- const valor = valueInputCur.replace("$ ", "");
38
- const valor2 = valor.replace(/\./g, "");
39
- setValueInputCur(valor2);
40
- }
41
- onFocus(e);
42
- };
43
- const handleInputChange = (event) => {
44
- const { target } = event;
45
- const valor = target.value.replace("$ ", "");
46
- const valid = /^-?[0-9.]*(?:[,]\d?\d?)?$/;
47
- if (valid.test(valor)) {
48
- const sepDec = valor.slice(-1) === "." ? `${valor.slice(0, -1)},` : valor;
49
- const punto = new RegExp(escapeRegExp("."), "g");
50
- const sinSepMil = sepDec.replace(punto, "");
51
- const posPuntoDec = sinSepMil.indexOf(",");
52
- const parteDecimal = posPuntoDec >= 0 ? sinSepMil.slice(posPuntoDec) : "";
53
- const parteEntera = posPuntoDec >= 0 ? sinSepMil.slice(0, posPuntoDec) : sinSepMil;
54
- setValueInputCur(parteEntera + parteDecimal);
55
- }
56
- };
57
- useEffect(() => {
58
- if (value && value !== "") {
59
- if (typeof value != "number" && value && value.includes("$")) {
60
- setValueInputCur(value.toString());
61
- } else {
62
- setValueInputCur(fieldToCurrency(value.toString()));
63
- }
64
- } else {
65
- setValueInputCur("");
66
- }
67
- }, [value]);
68
- return /* @__PURE__ */ jsx(
69
- Input,
70
- {
71
- ...props,
72
- style: styleCurrency,
73
- maxLength,
74
- value: valueInputCur,
75
- onFocus: handleInputOnFocus,
76
- onChange: handleInputChange,
77
- onBlur: handleInputOnBlur
78
- }
79
- );
80
- };
81
- export {
82
- CustomInputCurrency,
83
- CustomInputCurrency as default
84
- };
85
- //# sourceMappingURL=CustomInputCurrency.js.map
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useState, useEffect } from "react";
3
+ import { Input } from "reactstrap";
4
+ import { fieldToCurrency } from "siam-utils";
5
+ const CustomInputCurrency = (props) => {
6
+ const {
7
+ onChange = () => {
8
+ },
9
+ onFocus = () => {
10
+ },
11
+ value = {},
12
+ maxLength = "20",
13
+ style = {}
14
+ } = props;
15
+ const styleCurrency = { ...style, textAlign: "right" };
16
+ const [valueInputCur, setValueInputCur] = useState("");
17
+ const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
18
+ const handleInputOnBlur = (event) => {
19
+ const { target } = event;
20
+ if (valueInputCur !== "") {
21
+ const valor = valueInputCur.replace(".", "");
22
+ const valorPersistence = valor.replace(",", ".");
23
+ setValueInputCur(fieldToCurrency(valorPersistence));
24
+ onChange({
25
+ ...event,
26
+ target: {
27
+ ...target,
28
+ value: valorPersistence,
29
+ valueCurrency: fieldToCurrency(valorPersistence),
30
+ valueFloat: parseFloat(valorPersistence)
31
+ }
32
+ });
33
+ }
34
+ };
35
+ const handleInputOnFocus = (e) => {
36
+ if (valueInputCur !== "") {
37
+ const valor = valueInputCur.replace("$ ", "");
38
+ const valor2 = valor.replace(/\./g, "");
39
+ setValueInputCur(valor2);
40
+ }
41
+ onFocus(e);
42
+ };
43
+ const handleInputChange = (event) => {
44
+ const { target } = event;
45
+ const valor = target.value.replace("$ ", "");
46
+ const valid = /^-?[0-9.]*(?:[,]\d?\d?)?$/;
47
+ if (valid.test(valor)) {
48
+ const sepDec = valor.slice(-1) === "." ? `${valor.slice(0, -1)},` : valor;
49
+ const punto = new RegExp(escapeRegExp("."), "g");
50
+ const sinSepMil = sepDec.replace(punto, "");
51
+ const posPuntoDec = sinSepMil.indexOf(",");
52
+ const parteDecimal = posPuntoDec >= 0 ? sinSepMil.slice(posPuntoDec) : "";
53
+ const parteEntera = posPuntoDec >= 0 ? sinSepMil.slice(0, posPuntoDec) : sinSepMil;
54
+ setValueInputCur(parteEntera + parteDecimal);
55
+ }
56
+ };
57
+ useEffect(() => {
58
+ if (value && value !== "") {
59
+ if (typeof value != "number" && value && value.includes("$")) {
60
+ setValueInputCur(value.toString());
61
+ } else {
62
+ setValueInputCur(fieldToCurrency(value.toString()));
63
+ }
64
+ } else {
65
+ setValueInputCur("");
66
+ }
67
+ }, [value]);
68
+ return /* @__PURE__ */ jsx(
69
+ Input,
70
+ {
71
+ ...props,
72
+ style: styleCurrency,
73
+ maxLength,
74
+ value: valueInputCur,
75
+ onFocus: handleInputOnFocus,
76
+ onChange: handleInputChange,
77
+ onBlur: handleInputOnBlur
78
+ }
79
+ );
80
+ };
81
+ export {
82
+ CustomInputCurrency,
83
+ CustomInputCurrency as default
84
+ };
85
+ //# sourceMappingURL=CustomInputCurrency.js.map
@@ -1,46 +1,46 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import { FormGroup, Label, Input } from "reactstrap";
4
- import { MENSAJE } from "./constant.js";
5
- import "./index.css";
6
- const CustomInputFile = ({
7
- accept,
8
- className = "",
9
- id,
10
- label,
11
- name,
12
- onChange
13
- }) => {
14
- const [fileName, setFileName] = useState(label || LABEL_FILE);
15
- const { LABEL_FILE } = MENSAJE;
16
- const handleFileChange = (event) => {
17
- const files = event.target.files;
18
- if (files.length > 0) {
19
- setFileName(files[0].name);
20
- } else {
21
- setFileName(label || LABEL_FILE);
22
- }
23
- if (onChange) {
24
- onChange(event);
25
- }
26
- };
27
- return /* @__PURE__ */ jsxs(FormGroup, { className: `custom-file ${className}`, children: [
28
- /* @__PURE__ */ jsx(Label, { for: id, className: "custom-file-label", children: fileName }),
29
- /* @__PURE__ */ jsx(
30
- Input,
31
- {
32
- id,
33
- name,
34
- accept,
35
- type: "file",
36
- onChange: handleFileChange,
37
- className: "custom-file-input"
38
- }
39
- )
40
- ] });
41
- };
42
- export {
43
- CustomInputFile,
44
- CustomInputFile as default
45
- };
46
- //# sourceMappingURL=CustomInputFile.js.map
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { FormGroup, Label, Input } from "reactstrap";
4
+ import { MENSAJE } from "./constant.js";
5
+ import "./index.css";
6
+ const CustomInputFile = ({
7
+ accept,
8
+ className = "",
9
+ id,
10
+ label,
11
+ name,
12
+ onChange
13
+ }) => {
14
+ const [fileName, setFileName] = useState(label || LABEL_FILE);
15
+ const { LABEL_FILE } = MENSAJE;
16
+ const handleFileChange = (event) => {
17
+ const files = event.target.files;
18
+ if (files.length > 0) {
19
+ setFileName(files[0].name);
20
+ } else {
21
+ setFileName(label || LABEL_FILE);
22
+ }
23
+ if (onChange) {
24
+ onChange(event);
25
+ }
26
+ };
27
+ return /* @__PURE__ */ jsxs(FormGroup, { className: `custom-file ${className}`, children: [
28
+ /* @__PURE__ */ jsx(Label, { for: id, className: "custom-file-label", children: fileName }),
29
+ /* @__PURE__ */ jsx(
30
+ Input,
31
+ {
32
+ id,
33
+ name,
34
+ accept,
35
+ type: "file",
36
+ onChange: handleFileChange,
37
+ className: "custom-file-input"
38
+ }
39
+ )
40
+ ] });
41
+ };
42
+ export {
43
+ CustomInputFile,
44
+ CustomInputFile as default
45
+ };
46
+ //# sourceMappingURL=CustomInputFile.js.map
@@ -1,67 +1,67 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { FormGroup, Input, Label } from "reactstrap";
3
- import "./index.css";
4
- const CustomInputRadio = ({
5
- className,
6
- customClassName,
7
- checked,
8
- disabled,
9
- id,
10
- inline,
11
- label,
12
- name,
13
- onChange,
14
- direction = "row"
15
- }) => {
16
- return /* @__PURE__ */ jsx(
17
- FormGroup,
18
- {
19
- inline,
20
- className: `custom-radio ${customClassName || ""}`,
21
- children: /* @__PURE__ */ jsxs(
22
- "div",
23
- {
24
- style: {
25
- display: "flex",
26
- flexDirection: direction,
27
- alignItems: "center",
28
- justifyContent: "center"
29
- },
30
- children: [
31
- /* @__PURE__ */ jsx(
32
- Input,
33
- {
34
- id,
35
- type: "radio",
36
- name,
37
- checked,
38
- onChange,
39
- disabled,
40
- className
41
- }
42
- ),
43
- /* @__PURE__ */ jsx(
44
- Label,
45
- {
46
- check: true,
47
- htmlFor: id,
48
- style: {
49
- alignItems: "center",
50
- justifyContent: "center",
51
- height: "25px",
52
- width: "25px"
53
- }
54
- }
55
- ),
56
- /* @__PURE__ */ jsx("div", { children: label })
57
- ]
58
- }
59
- )
60
- }
61
- );
62
- };
63
- export {
64
- CustomInputRadio,
65
- CustomInputRadio as default
66
- };
67
- //# sourceMappingURL=CustomInputRadio.js.map
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { FormGroup, Input, Label } from "reactstrap";
3
+ import "./index.css";
4
+ const CustomInputRadio = ({
5
+ className,
6
+ customClassName,
7
+ checked,
8
+ disabled,
9
+ id,
10
+ inline,
11
+ label,
12
+ name,
13
+ onChange,
14
+ direction = "row"
15
+ }) => {
16
+ return /* @__PURE__ */ jsx(
17
+ FormGroup,
18
+ {
19
+ inline,
20
+ className: `custom-radio ${customClassName || ""}`,
21
+ children: /* @__PURE__ */ jsxs(
22
+ "div",
23
+ {
24
+ style: {
25
+ display: "flex",
26
+ flexDirection: direction,
27
+ alignItems: "center",
28
+ justifyContent: "center"
29
+ },
30
+ children: [
31
+ /* @__PURE__ */ jsx(
32
+ Input,
33
+ {
34
+ id,
35
+ type: "radio",
36
+ name,
37
+ checked,
38
+ onChange,
39
+ disabled,
40
+ className
41
+ }
42
+ ),
43
+ /* @__PURE__ */ jsx(
44
+ Label,
45
+ {
46
+ check: true,
47
+ htmlFor: id,
48
+ style: {
49
+ alignItems: "center",
50
+ justifyContent: "center",
51
+ height: "25px",
52
+ width: "25px"
53
+ }
54
+ }
55
+ ),
56
+ /* @__PURE__ */ jsx("div", { children: label })
57
+ ]
58
+ }
59
+ )
60
+ }
61
+ );
62
+ };
63
+ export {
64
+ CustomInputRadio,
65
+ CustomInputRadio as default
66
+ };
67
+ //# sourceMappingURL=CustomInputRadio.js.map
@@ -1,5 +1,5 @@
1
- const MENSAJE = { LABEL_FILE: "Elija el archivo..." };
2
- export {
3
- MENSAJE
4
- };
5
- //# sourceMappingURL=constant.js.map
1
+ const MENSAJE = { LABEL_FILE: "Elija el archivo..." };
2
+ export {
3
+ MENSAJE
4
+ };
5
+ //# sourceMappingURL=constant.js.map
@@ -1,14 +1,12 @@
1
- import "./index.css";
2
- import { CustomInputCheckbox } from "./CustomInputCheckbox.js";
3
- import { CustomInputRadio } from "./CustomInputRadio.js";
4
- import { CustomInputFile } from "./CustomInputFile.js";
5
- import { CustomInputCurrency } from "./CustomInputCurrency.js";
6
- import { CustomInputMask } from "./customInputMask/index.js";
7
- export {
8
- CustomInputCheckbox,
9
- CustomInputCurrency,
10
- CustomInputFile,
11
- CustomInputMask,
12
- CustomInputRadio
13
- };
14
- //# sourceMappingURL=index.js.map
1
+ import "./index.css";
2
+ import { CustomInputCheckbox } from "./CustomInputCheckbox.js";
3
+ import { CustomInputRadio } from "./CustomInputRadio.js";
4
+ import { CustomInputFile } from "./CustomInputFile.js";
5
+ import { CustomInputCurrency } from "./CustomInputCurrency.js";
6
+ export {
7
+ CustomInputCheckbox,
8
+ CustomInputCurrency,
9
+ CustomInputFile,
10
+ CustomInputRadio
11
+ };
12
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -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 "../_virtual/react-dropzone.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 "../_virtual/react-dropzone.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