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
package/dist/timer/styles.css
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
.av-video-timer {
|
|
2
|
-
color: inherit;
|
|
3
|
-
margin: 0 12px;
|
|
4
|
-
flex: 1;
|
|
5
|
-
text-align: center;
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
font-weight: bold;
|
|
9
|
-
align-items: center;
|
|
10
|
-
font-size: 1.3em;
|
|
11
|
-
width: 100%;
|
|
12
|
-
margin: 8px 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.timer {
|
|
16
|
-
font-size: clamp(5px, 2vw, 20px);
|
|
17
|
-
margin-right: 4px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.timer-green {
|
|
21
|
-
color: #28a745;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.timer-yellow {
|
|
25
|
-
color: #ffc107;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.timer-red {
|
|
29
|
-
color: #bd0300;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@keyframes vibrate {
|
|
33
|
-
0% {
|
|
34
|
-
transform: translateX(0);
|
|
35
|
-
}
|
|
36
|
-
20% {
|
|
37
|
-
transform: translateX(-3px);
|
|
38
|
-
}
|
|
39
|
-
40% {
|
|
40
|
-
transform: translateX(3px);
|
|
41
|
-
}
|
|
42
|
-
60% {
|
|
43
|
-
transform: translateX(-3px);
|
|
44
|
-
}
|
|
45
|
-
80% {
|
|
46
|
-
transform: translateX(3px);
|
|
47
|
-
}
|
|
48
|
-
100% {
|
|
49
|
-
transform: translateX(0);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
.timer-out {
|
|
53
|
-
color: #000000;
|
|
54
|
-
animation: vibrate 0.3s linear infinite;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.timer-over {
|
|
58
|
-
color: #c00805;
|
|
1
|
+
.av-video-timer {
|
|
2
|
+
color: inherit;
|
|
3
|
+
margin: 0 12px;
|
|
4
|
+
flex: 1;
|
|
5
|
+
text-align: center;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
font-weight: bold;
|
|
9
|
+
align-items: center;
|
|
10
|
+
font-size: 1.3em;
|
|
11
|
+
width: 100%;
|
|
12
|
+
margin: 8px 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.timer {
|
|
16
|
+
font-size: clamp(5px, 2vw, 20px);
|
|
17
|
+
margin-right: 4px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.timer-green {
|
|
21
|
+
color: #28a745;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.timer-yellow {
|
|
25
|
+
color: #ffc107;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.timer-red {
|
|
29
|
+
color: #bd0300;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes vibrate {
|
|
33
|
+
0% {
|
|
34
|
+
transform: translateX(0);
|
|
35
|
+
}
|
|
36
|
+
20% {
|
|
37
|
+
transform: translateX(-3px);
|
|
38
|
+
}
|
|
39
|
+
40% {
|
|
40
|
+
transform: translateX(3px);
|
|
41
|
+
}
|
|
42
|
+
60% {
|
|
43
|
+
transform: translateX(-3px);
|
|
44
|
+
}
|
|
45
|
+
80% {
|
|
46
|
+
transform: translateX(3px);
|
|
47
|
+
}
|
|
48
|
+
100% {
|
|
49
|
+
transform: translateX(0);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
.timer-out {
|
|
53
|
+
color: #000000;
|
|
54
|
+
animation: vibrate 0.3s linear infinite;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.timer-over {
|
|
58
|
+
color: #c00805;
|
|
59
59
|
}
|
package/dist/tomar-foto/index.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import Row from "../node_modules/@neolution-ch/reactstrap/esm/Row.js";
|
|
4
|
-
import { DropzoneUploader } from "../dropzone-uploader/base/index.js";
|
|
5
|
-
import { Colxx } from "../CustomBootstrap.js";
|
|
6
|
-
import imgHacerFoto from "../assets/img/take-photo.jpg.js";
|
|
7
|
-
import { TAKE_PHOTO } from "../constants.js";
|
|
8
|
-
const TomarFoto = ({
|
|
9
|
-
onFilesSelectedSelfie = () => {
|
|
10
|
-
},
|
|
11
|
-
isMobile = false
|
|
12
|
-
}) => {
|
|
13
|
-
const [filesTotalSelectedSelfie, setTotalFilesSelectedSelfie] = useState(0);
|
|
14
|
-
const {
|
|
15
|
-
LOAD_SELFIE_WITH_IDENTITY_CARD_MESSAGE,
|
|
16
|
-
MESSAGE_SELFIE_ONLY_CAN_TAKE_FROM_CELLPHONE,
|
|
17
|
-
TAKE_PHOTO_MESSAGE
|
|
18
|
-
} = TAKE_PHOTO;
|
|
19
|
-
const handleFilesSelectedSelfie = (files) => {
|
|
20
|
-
setTotalFilesSelectedSelfie(files.length);
|
|
21
|
-
onFilesSelectedSelfie(files);
|
|
22
|
-
};
|
|
23
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
-
/* @__PURE__ */ jsx(Row, { className: "pt-2 ml-4", children: /* @__PURE__ */ jsx(Colxx, { xxs: "11", md: "5", children: LOAD_SELFIE_WITH_IDENTITY_CARD_MESSAGE }) }),
|
|
25
|
-
/* @__PURE__ */ jsx(Row, { className: "pt-2 ml-2", children: /* @__PURE__ */ jsx(Colxx, { xxs: "12", md: "9", children: isMobile ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Colxx, { xxs: "12", className: "text-center", children: [
|
|
26
|
-
filesTotalSelectedSelfie === 0 && /* @__PURE__ */ jsx(
|
|
27
|
-
"img",
|
|
28
|
-
{
|
|
29
|
-
style: { width: "97%" },
|
|
30
|
-
alt: "hacerFotoDNI",
|
|
31
|
-
src: imgHacerFoto
|
|
32
|
-
}
|
|
33
|
-
),
|
|
34
|
-
/* @__PURE__ */ jsx(
|
|
35
|
-
DropzoneUploader,
|
|
36
|
-
{
|
|
37
|
-
className: "pt-2 ml-2",
|
|
38
|
-
maxFiles: 1,
|
|
39
|
-
onChangeFiles: handleFilesSelectedSelfie,
|
|
40
|
-
totalFiles: filesTotalSelectedSelfie,
|
|
41
|
-
accept: "image/jpg,image/jpeg",
|
|
42
|
-
capture: "environment",
|
|
43
|
-
nameFileLabel: TAKE_PHOTO_MESSAGE
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
] }) }) : /* @__PURE__ */ jsx(
|
|
47
|
-
"h2",
|
|
48
|
-
{
|
|
49
|
-
className: "view-icon iconsminds-smartphone-4 ml-2 mr-2",
|
|
50
|
-
style: {
|
|
51
|
-
color: "red",
|
|
52
|
-
margin: "10px 10px 0px 10px"
|
|
53
|
-
},
|
|
54
|
-
children: MESSAGE_SELFIE_ONLY_CAN_TAKE_FROM_CELLPHONE
|
|
55
|
-
}
|
|
56
|
-
) }) })
|
|
57
|
-
] });
|
|
58
|
-
};
|
|
59
|
-
export {
|
|
60
|
-
TomarFoto
|
|
61
|
-
};
|
|
62
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import Row from "../node_modules/@neolution-ch/reactstrap/esm/Row.js";
|
|
4
|
+
import { DropzoneUploader } from "../dropzone-uploader/base/index.js";
|
|
5
|
+
import { Colxx } from "../CustomBootstrap.js";
|
|
6
|
+
import imgHacerFoto from "../assets/img/take-photo.jpg.js";
|
|
7
|
+
import { TAKE_PHOTO } from "../constants.js";
|
|
8
|
+
const TomarFoto = ({
|
|
9
|
+
onFilesSelectedSelfie = () => {
|
|
10
|
+
},
|
|
11
|
+
isMobile = false
|
|
12
|
+
}) => {
|
|
13
|
+
const [filesTotalSelectedSelfie, setTotalFilesSelectedSelfie] = useState(0);
|
|
14
|
+
const {
|
|
15
|
+
LOAD_SELFIE_WITH_IDENTITY_CARD_MESSAGE,
|
|
16
|
+
MESSAGE_SELFIE_ONLY_CAN_TAKE_FROM_CELLPHONE,
|
|
17
|
+
TAKE_PHOTO_MESSAGE
|
|
18
|
+
} = TAKE_PHOTO;
|
|
19
|
+
const handleFilesSelectedSelfie = (files) => {
|
|
20
|
+
setTotalFilesSelectedSelfie(files.length);
|
|
21
|
+
onFilesSelectedSelfie(files);
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
+
/* @__PURE__ */ jsx(Row, { className: "pt-2 ml-4", children: /* @__PURE__ */ jsx(Colxx, { xxs: "11", md: "5", children: LOAD_SELFIE_WITH_IDENTITY_CARD_MESSAGE }) }),
|
|
25
|
+
/* @__PURE__ */ jsx(Row, { className: "pt-2 ml-2", children: /* @__PURE__ */ jsx(Colxx, { xxs: "12", md: "9", children: isMobile ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Colxx, { xxs: "12", className: "text-center", children: [
|
|
26
|
+
filesTotalSelectedSelfie === 0 && /* @__PURE__ */ jsx(
|
|
27
|
+
"img",
|
|
28
|
+
{
|
|
29
|
+
style: { width: "97%" },
|
|
30
|
+
alt: "hacerFotoDNI",
|
|
31
|
+
src: imgHacerFoto
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
DropzoneUploader,
|
|
36
|
+
{
|
|
37
|
+
className: "pt-2 ml-2",
|
|
38
|
+
maxFiles: 1,
|
|
39
|
+
onChangeFiles: handleFilesSelectedSelfie,
|
|
40
|
+
totalFiles: filesTotalSelectedSelfie,
|
|
41
|
+
accept: "image/jpg,image/jpeg",
|
|
42
|
+
capture: "environment",
|
|
43
|
+
nameFileLabel: TAKE_PHOTO_MESSAGE
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] }) }) : /* @__PURE__ */ jsx(
|
|
47
|
+
"h2",
|
|
48
|
+
{
|
|
49
|
+
className: "view-icon iconsminds-smartphone-4 ml-2 mr-2",
|
|
50
|
+
style: {
|
|
51
|
+
color: "red",
|
|
52
|
+
margin: "10px 10px 0px 10px"
|
|
53
|
+
},
|
|
54
|
+
children: MESSAGE_SELFIE_ONLY_CAN_TAKE_FROM_CELLPHONE
|
|
55
|
+
}
|
|
56
|
+
) }) })
|
|
57
|
+
] });
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
TomarFoto
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import "./styles.css";
|
|
3
|
-
const ButtonEditor = ({ activo, onClick }) => /* @__PURE__ */ jsx(
|
|
4
|
-
"button",
|
|
5
|
-
{
|
|
6
|
-
className: `visualizador-editor-btn ${activo ? "visualizador-editor-btn--activo" : "visualizador-editor-btn--inactivo"}`,
|
|
7
|
-
onClick,
|
|
8
|
-
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx("i", { className: "icon-eye simple-icon-eye" }) })
|
|
9
|
-
}
|
|
10
|
-
);
|
|
11
|
-
export {
|
|
12
|
-
ButtonEditor as default
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=button-editor.js.map
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "./styles.css";
|
|
3
|
+
const ButtonEditor = ({ activo, onClick }) => /* @__PURE__ */ jsx(
|
|
4
|
+
"button",
|
|
5
|
+
{
|
|
6
|
+
className: `visualizador-editor-btn ${activo ? "visualizador-editor-btn--activo" : "visualizador-editor-btn--inactivo"}`,
|
|
7
|
+
onClick,
|
|
8
|
+
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx("i", { className: "icon-eye simple-icon-eye" }) })
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
export {
|
|
12
|
+
ButtonEditor as default
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=button-editor.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const GRID_SIZES = {
|
|
2
|
-
sm: { cols: 18, rows: 18 },
|
|
3
|
-
md: { cols: 12, rows: 12 },
|
|
4
|
-
lg: { cols: 6, rows: 6 }
|
|
5
|
-
};
|
|
6
|
-
const LOCALHOST = ["localhost", "127.0.0.1"];
|
|
7
|
-
export {
|
|
8
|
-
GRID_SIZES,
|
|
9
|
-
LOCALHOST
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=constants.js.map
|
|
1
|
+
const GRID_SIZES = {
|
|
2
|
+
sm: { cols: 18, rows: 18 },
|
|
3
|
+
md: { cols: 12, rows: 12 },
|
|
4
|
+
lg: { cols: 6, rows: 6 }
|
|
5
|
+
};
|
|
6
|
+
const LOCALHOST = ["localhost", "127.0.0.1"];
|
|
7
|
+
export {
|
|
8
|
+
GRID_SIZES,
|
|
9
|
+
LOCALHOST
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import "./styles.css";
|
|
3
|
-
const EditorLayer = ({ gridCols, gridRows }) => {
|
|
4
|
-
return /* @__PURE__ */ jsx(
|
|
5
|
-
"div",
|
|
6
|
-
{
|
|
7
|
-
className: "editor-layer",
|
|
8
|
-
style: {
|
|
9
|
-
gridTemplateColumns: `repeat(${gridCols}, 1fr)`,
|
|
10
|
-
gridTemplateRows: `repeat(${gridRows}, 1fr)`
|
|
11
|
-
},
|
|
12
|
-
children: Array.from({ length: gridRows * gridCols }).map((_, idx) => {
|
|
13
|
-
const x = idx % gridCols;
|
|
14
|
-
const y = Math.floor(idx / gridCols);
|
|
15
|
-
return /* @__PURE__ */ jsx("div", { className: "editor-layer-cell", children: /* @__PURE__ */ jsxs("div", { className: "editor-layer-cell-coord", children: [
|
|
16
|
-
"x:",
|
|
17
|
-
x,
|
|
18
|
-
";y:",
|
|
19
|
-
y
|
|
20
|
-
] }) }, `cell-${x}-${y}`);
|
|
21
|
-
})
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
EditorLayer as default
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=editor-layer.js.map
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./styles.css";
|
|
3
|
+
const EditorLayer = ({ gridCols, gridRows }) => {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
className: "editor-layer",
|
|
8
|
+
style: {
|
|
9
|
+
gridTemplateColumns: `repeat(${gridCols}, 1fr)`,
|
|
10
|
+
gridTemplateRows: `repeat(${gridRows}, 1fr)`
|
|
11
|
+
},
|
|
12
|
+
children: Array.from({ length: gridRows * gridCols }).map((_, idx) => {
|
|
13
|
+
const x = idx % gridCols;
|
|
14
|
+
const y = Math.floor(idx / gridCols);
|
|
15
|
+
return /* @__PURE__ */ jsx("div", { className: "editor-layer-cell", children: /* @__PURE__ */ jsxs("div", { className: "editor-layer-cell-coord", children: [
|
|
16
|
+
"x:",
|
|
17
|
+
x,
|
|
18
|
+
";y:",
|
|
19
|
+
y
|
|
20
|
+
] }) }, `cell-${x}-${y}`);
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
EditorLayer as default
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=editor-layer.js.map
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, createElement } from "react";
|
|
3
|
-
import SlotWrapper from "./slot-wrapper.js";
|
|
4
|
-
import EditorLayer from "./editor-layer.js";
|
|
5
|
-
import { GRID_SIZES, LOCALHOST } from "./constants.js";
|
|
6
|
-
import ButtonEditor from "./button-editor.js";
|
|
7
|
-
import "./styles.css";
|
|
8
|
-
const ViewLayout = ({
|
|
9
|
-
slots = [],
|
|
10
|
-
size = "md",
|
|
11
|
-
alto = 80,
|
|
12
|
-
ancho = 90,
|
|
13
|
-
server = window?.location?.hostname,
|
|
14
|
-
...props
|
|
15
|
-
}) => {
|
|
16
|
-
const isLocalhost = LOCALHOST.includes(server);
|
|
17
|
-
const [isEditorActivo, setEditorActivo] = useState(false);
|
|
18
|
-
const gridCols = GRID_SIZES[size].cols;
|
|
19
|
-
const gridRows = GRID_SIZES[size].rows;
|
|
20
|
-
return /* @__PURE__ */ jsxs("div", { className: "visualizador-container", children: [
|
|
21
|
-
isLocalhost && /* @__PURE__ */ jsx(
|
|
22
|
-
ButtonEditor,
|
|
23
|
-
{
|
|
24
|
-
activo: isEditorActivo,
|
|
25
|
-
onClick: () => setEditorActivo((prev) => !prev)
|
|
26
|
-
}
|
|
27
|
-
),
|
|
28
|
-
/* @__PURE__ */ jsxs(
|
|
29
|
-
"div",
|
|
30
|
-
{
|
|
31
|
-
className: "visualizador-grid-css",
|
|
32
|
-
style: {
|
|
33
|
-
maxWidth: `${ancho}vw`,
|
|
34
|
-
height: `${alto}vh`,
|
|
35
|
-
gridTemplateColumns: `repeat(${gridCols}, 1fr)`,
|
|
36
|
-
gridTemplateRows: `repeat(${gridRows}, 1fr)`
|
|
37
|
-
},
|
|
38
|
-
...props,
|
|
39
|
-
children: [
|
|
40
|
-
isEditorActivo && /* @__PURE__ */ jsx(EditorLayer, { gridCols, gridRows }),
|
|
41
|
-
slots.map((slot) => {
|
|
42
|
-
const { x, y, w, h, legend } = slot;
|
|
43
|
-
return /* @__PURE__ */ createElement(SlotWrapper, { ...slot, legend, key: slot.slot });
|
|
44
|
-
})
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
] });
|
|
49
|
-
};
|
|
50
|
-
export {
|
|
51
|
-
ViewLayout
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, createElement } from "react";
|
|
3
|
+
import SlotWrapper from "./slot-wrapper.js";
|
|
4
|
+
import EditorLayer from "./editor-layer.js";
|
|
5
|
+
import { GRID_SIZES, LOCALHOST } from "./constants.js";
|
|
6
|
+
import ButtonEditor from "./button-editor.js";
|
|
7
|
+
import "./styles.css";
|
|
8
|
+
const ViewLayout = ({
|
|
9
|
+
slots = [],
|
|
10
|
+
size = "md",
|
|
11
|
+
alto = 80,
|
|
12
|
+
ancho = 90,
|
|
13
|
+
server = window?.location?.hostname,
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
16
|
+
const isLocalhost = LOCALHOST.includes(server);
|
|
17
|
+
const [isEditorActivo, setEditorActivo] = useState(false);
|
|
18
|
+
const gridCols = GRID_SIZES[size].cols;
|
|
19
|
+
const gridRows = GRID_SIZES[size].rows;
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", { className: "visualizador-container", children: [
|
|
21
|
+
isLocalhost && /* @__PURE__ */ jsx(
|
|
22
|
+
ButtonEditor,
|
|
23
|
+
{
|
|
24
|
+
activo: isEditorActivo,
|
|
25
|
+
onClick: () => setEditorActivo((prev) => !prev)
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ jsxs(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
className: "visualizador-grid-css",
|
|
32
|
+
style: {
|
|
33
|
+
maxWidth: `${ancho}vw`,
|
|
34
|
+
height: `${alto}vh`,
|
|
35
|
+
gridTemplateColumns: `repeat(${gridCols}, 1fr)`,
|
|
36
|
+
gridTemplateRows: `repeat(${gridRows}, 1fr)`
|
|
37
|
+
},
|
|
38
|
+
...props,
|
|
39
|
+
children: [
|
|
40
|
+
isEditorActivo && /* @__PURE__ */ jsx(EditorLayer, { gridCols, gridRows }),
|
|
41
|
+
slots.map((slot) => {
|
|
42
|
+
const { x, y, w, h, legend } = slot;
|
|
43
|
+
return /* @__PURE__ */ createElement(SlotWrapper, { ...slot, legend, key: slot.slot });
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
] });
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
ViewLayout
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
const SlotWrapper = ({
|
|
3
|
-
slot = 1,
|
|
4
|
-
component = null,
|
|
5
|
-
x = 0,
|
|
6
|
-
y = 0,
|
|
7
|
-
w = 2,
|
|
8
|
-
h = 2,
|
|
9
|
-
align = "stretch",
|
|
10
|
-
contentSize = "medium",
|
|
11
|
-
direction = "column",
|
|
12
|
-
justify = "flex-start",
|
|
13
|
-
legend,
|
|
14
|
-
showBorder = false
|
|
15
|
-
}) => {
|
|
16
|
-
return /* @__PURE__ */ jsxs(
|
|
17
|
-
"fieldset",
|
|
18
|
-
{
|
|
19
|
-
className: `visualizador-slot visualizador-slot-content--${contentSize} visualizador-slot--${direction} visualizador-slot-align--${align} visualizador-slot-justify--${justify} ` + (!showBorder ? "visualizador-slot--no-border" : ""),
|
|
20
|
-
style: {
|
|
21
|
-
position: "relative",
|
|
22
|
-
gridColumn: `${x + 1} / span ${w}`,
|
|
23
|
-
gridRow: `${y + 1} / span ${h}`,
|
|
24
|
-
display: "flex",
|
|
25
|
-
overflow: "hidden",
|
|
26
|
-
border: showBorder ? void 0 : "none"
|
|
27
|
-
},
|
|
28
|
-
children: [
|
|
29
|
-
/* @__PURE__ */ jsx("legend", { className: "slot-legend", children: legend }),
|
|
30
|
-
/* @__PURE__ */ jsx("div", { className: "slot-content", children: component })
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
slot
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
SlotWrapper as default
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=slot-wrapper.js.map
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SlotWrapper = ({
|
|
3
|
+
slot = 1,
|
|
4
|
+
component = null,
|
|
5
|
+
x = 0,
|
|
6
|
+
y = 0,
|
|
7
|
+
w = 2,
|
|
8
|
+
h = 2,
|
|
9
|
+
align = "stretch",
|
|
10
|
+
contentSize = "medium",
|
|
11
|
+
direction = "column",
|
|
12
|
+
justify = "flex-start",
|
|
13
|
+
legend,
|
|
14
|
+
showBorder = false
|
|
15
|
+
}) => {
|
|
16
|
+
return /* @__PURE__ */ jsxs(
|
|
17
|
+
"fieldset",
|
|
18
|
+
{
|
|
19
|
+
className: `visualizador-slot visualizador-slot-content--${contentSize} visualizador-slot--${direction} visualizador-slot-align--${align} visualizador-slot-justify--${justify} ` + (!showBorder ? "visualizador-slot--no-border" : ""),
|
|
20
|
+
style: {
|
|
21
|
+
position: "relative",
|
|
22
|
+
gridColumn: `${x + 1} / span ${w}`,
|
|
23
|
+
gridRow: `${y + 1} / span ${h}`,
|
|
24
|
+
display: "flex",
|
|
25
|
+
overflow: "hidden",
|
|
26
|
+
border: showBorder ? void 0 : "none"
|
|
27
|
+
},
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsx("legend", { className: "slot-legend", children: legend }),
|
|
30
|
+
/* @__PURE__ */ jsx("div", { className: "slot-content", children: component })
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
slot
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
SlotWrapper as default
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=slot-wrapper.js.map
|