@lideralia/alife-uikit 1.1.359 → 1.1.366
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/atoms/Checkbox/Checkbox.js +6 -2
- package/dist/atoms/CookieTable/CookieTable.js +88 -0
- package/dist/atoms/CookieTable/index.js +13 -0
- package/dist/molecules/Modal/Modal.js +14 -4
- package/dist/organisms/FamilyZone/FamilyHomeSection.js +13 -7
- package/dist/organisms/Modals/Confirmation.js +103 -0
- package/dist/organisms/Modals/Cookies.js +190 -0
- package/dist/organisms/Modals/Login.js +22 -19
- package/dist/organisms/Modals/Participants.js +176 -0
- package/dist/organisms/Modals/Register.js +37 -20
- package/dist/organisms/Modals/index.js +8 -0
- package/package.json +1 -1
|
@@ -37,7 +37,8 @@ var Checkbox = function Checkbox(props) {
|
|
|
37
37
|
isDisabled = props.isDisabled,
|
|
38
38
|
name = props.name,
|
|
39
39
|
label = props.label,
|
|
40
|
-
labelPosition = props.labelPosition
|
|
40
|
+
labelPosition = props.labelPosition,
|
|
41
|
+
isActiveCheckbox = props.isActiveCheckbox;
|
|
41
42
|
|
|
42
43
|
var _useState = (0, _react.useState)(defaultChecked),
|
|
43
44
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -63,7 +64,10 @@ var Checkbox = function Checkbox(props) {
|
|
|
63
64
|
setChecked(!isChecked);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
if (action)
|
|
67
|
+
if (action) {
|
|
68
|
+
action(name, !isChecked, !isChecked);
|
|
69
|
+
isActiveCheckbox(isChecked);
|
|
70
|
+
}
|
|
67
71
|
},
|
|
68
72
|
title: name,
|
|
69
73
|
zIndex: 2
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.CookieTable = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _Typography = require("../../atoms/Typography");
|
|
13
|
+
|
|
14
|
+
var _Layout = require("../../atoms/Layout");
|
|
15
|
+
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
|
|
20
|
+
var CookieTable = function CookieTable(props) {
|
|
21
|
+
var name = props.name,
|
|
22
|
+
labelName = props.labelName,
|
|
23
|
+
domain = props.domain,
|
|
24
|
+
labelDomain = props.labelDomain,
|
|
25
|
+
expiration = props.expiration,
|
|
26
|
+
labelExpiaration = props.labelExpiaration,
|
|
27
|
+
lineDown = props.lineDown;
|
|
28
|
+
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("hr", {
|
|
29
|
+
style: {
|
|
30
|
+
height: "1px",
|
|
31
|
+
borderWidth: 0,
|
|
32
|
+
color: "#E6E4E5",
|
|
33
|
+
backgroundColor: "#E6E4E5"
|
|
34
|
+
}
|
|
35
|
+
}), _react.default.createElement(_Layout.Flex, {
|
|
36
|
+
flexDirection: "row",
|
|
37
|
+
justifyContent: "space-between"
|
|
38
|
+
}, _react.default.createElement(_Typography.Text, {
|
|
39
|
+
fontWeight: "bold",
|
|
40
|
+
sizeText: "display12"
|
|
41
|
+
}, labelName), _react.default.createElement(_Typography.Text, {
|
|
42
|
+
sizeText: "display12"
|
|
43
|
+
}, name)), _react.default.createElement("hr", {
|
|
44
|
+
style: {
|
|
45
|
+
height: "1px",
|
|
46
|
+
borderWidth: 0,
|
|
47
|
+
color: "#E6E4E5",
|
|
48
|
+
backgroundColor: "#E6E4E5"
|
|
49
|
+
}
|
|
50
|
+
}), _react.default.createElement(_Layout.Flex, {
|
|
51
|
+
flexDirection: "row",
|
|
52
|
+
justifyContent: "space-between"
|
|
53
|
+
}, _react.default.createElement(_Typography.Text, {
|
|
54
|
+
sizeText: "display12",
|
|
55
|
+
fontWeight: "bold"
|
|
56
|
+
}, labelDomain), _react.default.createElement(_Typography.Text, {
|
|
57
|
+
sizeText: "display12"
|
|
58
|
+
}, domain)), _react.default.createElement("hr", {
|
|
59
|
+
style: {
|
|
60
|
+
height: "1px",
|
|
61
|
+
borderWidth: 0,
|
|
62
|
+
color: "#E6E4E5",
|
|
63
|
+
backgroundColor: "#E6E4E5"
|
|
64
|
+
}
|
|
65
|
+
}), _react.default.createElement(_Layout.Flex, {
|
|
66
|
+
flexDirection: "row",
|
|
67
|
+
justifyContent: "space-between"
|
|
68
|
+
}, _react.default.createElement(_Typography.Text, {
|
|
69
|
+
sizeText: "display12",
|
|
70
|
+
fontWeight: "bold"
|
|
71
|
+
}, labelExpiaration), _react.default.createElement(_Typography.Text, {
|
|
72
|
+
sizeText: "display12"
|
|
73
|
+
}, expiration)), lineDown && _react.default.createElement("hr", {
|
|
74
|
+
style: {
|
|
75
|
+
height: "1px",
|
|
76
|
+
borderWidth: 0,
|
|
77
|
+
color: "#E6E4E5",
|
|
78
|
+
backgroundColor: "#E6E4E5"
|
|
79
|
+
}
|
|
80
|
+
}));
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
exports.CookieTable = CookieTable;
|
|
84
|
+
CookieTable.defaultProps = {
|
|
85
|
+
labelName: "Nombre",
|
|
86
|
+
labelExpiaration: "Vencimiento",
|
|
87
|
+
labelDomain: "Dominio"
|
|
88
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "CookieTable", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _CookieTable.CookieTable;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _CookieTable = require("./CookieTable");
|
|
@@ -31,7 +31,9 @@ var _styles = require("./styles");
|
|
|
31
31
|
|
|
32
32
|
require("../../GlobalStyles");
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _Icon = require("../../atoms/Icon");
|
|
35
|
+
|
|
36
|
+
var _excluded = ["children", "fullScreen", "isOpen", "duration", "onModalClose", "onModalBack", "id", "title", "closeWithButton", "backWithButton", "hasError", "icon", "showCloseButton"];
|
|
35
37
|
|
|
36
38
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
39
|
|
|
@@ -54,6 +56,8 @@ var Modal = function Modal(_ref) {
|
|
|
54
56
|
closeWithButton = _ref.closeWithButton,
|
|
55
57
|
backWithButton = _ref.backWithButton,
|
|
56
58
|
hasError = _ref.hasError,
|
|
59
|
+
icon = _ref.icon,
|
|
60
|
+
showCloseButton = _ref.showCloseButton,
|
|
57
61
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
58
62
|
var modal = (0, _react.useRef)(null);
|
|
59
63
|
|
|
@@ -146,8 +150,13 @@ var Modal = function Modal(_ref) {
|
|
|
146
150
|
sizeText: "display16",
|
|
147
151
|
fontWeight: "bold",
|
|
148
152
|
textAlign: "left",
|
|
149
|
-
color: hasError ? 'white' : 'black'
|
|
150
|
-
|
|
153
|
+
color: hasError ? 'white' : 'black',
|
|
154
|
+
display: "flex"
|
|
155
|
+
}, icon && _react.default.createElement(_Icon.Icon, {
|
|
156
|
+
sizeIcon: "display24",
|
|
157
|
+
marginRight: 2,
|
|
158
|
+
color: "black84"
|
|
159
|
+
}, icon), title && title), showCloseButton && _react.default.createElement(_Layout.Box, {
|
|
151
160
|
position: "absolute",
|
|
152
161
|
right: 3,
|
|
153
162
|
top: 3
|
|
@@ -167,7 +176,8 @@ Modal.defaultProps = {
|
|
|
167
176
|
duration: 0,
|
|
168
177
|
id: '',
|
|
169
178
|
title: '',
|
|
170
|
-
hasError: ''
|
|
179
|
+
hasError: '',
|
|
180
|
+
showCloseButton: true
|
|
171
181
|
};
|
|
172
182
|
|
|
173
183
|
Modal.Content = function (_ref2) {
|
|
@@ -44,7 +44,7 @@ var renderInviteToLine = function renderInviteToLine(_ref) {
|
|
|
44
44
|
action: function action() {
|
|
45
45
|
return actionInvite();
|
|
46
46
|
},
|
|
47
|
-
marginBottom:
|
|
47
|
+
marginBottom: 1
|
|
48
48
|
}, _react.default.createElement(_Icon.Icon, {
|
|
49
49
|
marginRight: 3,
|
|
50
50
|
sizeIcon: "display24"
|
|
@@ -210,12 +210,15 @@ var FamilyHomeWithContentSection = function FamilyHomeWithContentSection(_ref4)
|
|
|
210
210
|
customTextColor = _ref4.customTextColor,
|
|
211
211
|
_ref4$line = _ref4.line,
|
|
212
212
|
content = _ref4$line.content,
|
|
213
|
-
userGroup = _ref4$line.userGroup
|
|
213
|
+
userGroup = _ref4$line.userGroup,
|
|
214
|
+
showActionVideo = _ref4.showActionVideo,
|
|
215
|
+
showActionQuote = _ref4.showActionQuote,
|
|
216
|
+
showActionPicture = _ref4.showActionPicture;
|
|
214
217
|
return _react.default.createElement(_react.default.Fragment, null, userGroup >= 2 && content && _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_FamilyZone.FamilyGridMini, {
|
|
215
218
|
elements: content,
|
|
216
219
|
customColor: customColor,
|
|
217
220
|
customTextColor: customTextColor
|
|
218
|
-
}), _react.default.createElement(_Button.Button, {
|
|
221
|
+
}), showActionPicture && _react.default.createElement(_Button.Button, {
|
|
219
222
|
backgroundColor: customColor,
|
|
220
223
|
colorType: customColor || "blue",
|
|
221
224
|
color: customTextColor,
|
|
@@ -224,7 +227,7 @@ var FamilyHomeWithContentSection = function FamilyHomeWithContentSection(_ref4)
|
|
|
224
227
|
return actionPicture();
|
|
225
228
|
},
|
|
226
229
|
marginTop: 3,
|
|
227
|
-
marginBottom: 1,
|
|
230
|
+
marginBottom: showActionVideo && showActionQuote ? 1 : 18,
|
|
228
231
|
justifyContent: "flex-start",
|
|
229
232
|
fullWidth: true
|
|
230
233
|
}, _react.default.createElement(_Icon.Icon, {
|
|
@@ -232,7 +235,7 @@ var FamilyHomeWithContentSection = function FamilyHomeWithContentSection(_ref4)
|
|
|
232
235
|
sizeIcon: "display24"
|
|
233
236
|
}, _react.default.createElement(_IconCamera.default, null)), actionPictureLabel || _react.default.createElement(_PlaceholderLoad.PlaceholderLoad, {
|
|
234
237
|
height: "22px"
|
|
235
|
-
})), _react.default.createElement(_Button.Button, {
|
|
238
|
+
})), showActionVideo && _react.default.createElement(_Button.Button, {
|
|
236
239
|
backgroundColor: customColor,
|
|
237
240
|
colorType: customColor || "blue",
|
|
238
241
|
color: customTextColor,
|
|
@@ -248,7 +251,7 @@ var FamilyHomeWithContentSection = function FamilyHomeWithContentSection(_ref4)
|
|
|
248
251
|
sizeIcon: "display24"
|
|
249
252
|
}, _react.default.createElement(_IconVideo.default, null)), actionVideoLabel || _react.default.createElement(_PlaceholderLoad.PlaceholderLoad, {
|
|
250
253
|
height: "22px"
|
|
251
|
-
})), _react.default.createElement(_Button.Button, {
|
|
254
|
+
})), showActionQuote && _react.default.createElement(_Button.Button, {
|
|
252
255
|
backgroundColor: customColor,
|
|
253
256
|
colorType: customColor || "blue",
|
|
254
257
|
color: customTextColor,
|
|
@@ -277,5 +280,8 @@ FamilyHomeWithContentSection.defaultProps = {
|
|
|
277
280
|
actionVideoLabel: null,
|
|
278
281
|
actionPictureLabel: null,
|
|
279
282
|
customColor: "",
|
|
280
|
-
customTextColor: ""
|
|
283
|
+
customTextColor: "",
|
|
284
|
+
showActionVideo: true,
|
|
285
|
+
showActionQuote: true,
|
|
286
|
+
showActionPicture: true
|
|
281
287
|
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.ModalConfirmation = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _Modal = require("../../molecules/Modal");
|
|
13
|
+
|
|
14
|
+
var _Layout = require("../../atoms/Layout");
|
|
15
|
+
|
|
16
|
+
var _Button = require("../../atoms/Button");
|
|
17
|
+
|
|
18
|
+
var _Typography = require("../../atoms/Typography");
|
|
19
|
+
|
|
20
|
+
var _Icons = require("../../atoms/Icons");
|
|
21
|
+
|
|
22
|
+
var _Icon = require("../../atoms/Icon");
|
|
23
|
+
|
|
24
|
+
var ModalConfirmation = function ModalConfirmation(_ref) {
|
|
25
|
+
var id = _ref.id,
|
|
26
|
+
isOpen = _ref.isOpen,
|
|
27
|
+
onModalClose = _ref.onModalClose,
|
|
28
|
+
onModalBack = _ref.onModalBack,
|
|
29
|
+
title = _ref.title,
|
|
30
|
+
body = _ref.body,
|
|
31
|
+
confirmationButton = _ref.confirmationButton,
|
|
32
|
+
buttons = _ref.buttons;
|
|
33
|
+
return _react.default.createElement(_Modal.Modal, {
|
|
34
|
+
width: "339px",
|
|
35
|
+
height: "auto",
|
|
36
|
+
id: id,
|
|
37
|
+
isOpen: isOpen,
|
|
38
|
+
hasError: 0,
|
|
39
|
+
title: title,
|
|
40
|
+
onModalClose: onModalClose,
|
|
41
|
+
marginX: 0,
|
|
42
|
+
marginY: 0,
|
|
43
|
+
onModalBack: onModalBack || function () {},
|
|
44
|
+
backWithButton: 0,
|
|
45
|
+
closeWithButton: true
|
|
46
|
+
}, _react.default.createElement(_Modal.Modal.Content, null, _react.default.createElement(_Typography.Text, {
|
|
47
|
+
sizeText: "display14",
|
|
48
|
+
as: "p",
|
|
49
|
+
color: "black84",
|
|
50
|
+
style: {
|
|
51
|
+
marginBottom: "18px"
|
|
52
|
+
}
|
|
53
|
+
}, body), _react.default.createElement(_Layout.Grid, {
|
|
54
|
+
gridTemplateColumns: "1fr 1fr",
|
|
55
|
+
gridTemplateRows: "1fr",
|
|
56
|
+
gridColumnGap: 3
|
|
57
|
+
}, _react.default.createElement(_Button.Button, {
|
|
58
|
+
colorType: "green",
|
|
59
|
+
action: function action() {
|
|
60
|
+
return confirmationButton(true);
|
|
61
|
+
}
|
|
62
|
+
}, _react.default.createElement(_Icon.Icon, {
|
|
63
|
+
sizeIcon: "display24",
|
|
64
|
+
color: "white",
|
|
65
|
+
style: {
|
|
66
|
+
marginRight: "13px"
|
|
67
|
+
}
|
|
68
|
+
}, _react.default.createElement(_Icons.IconCheckCircle, null)), " ", buttons.confirm), _react.default.createElement(_Button.Button, {
|
|
69
|
+
colorType: "red",
|
|
70
|
+
action: function action() {
|
|
71
|
+
return confirmationButton(false);
|
|
72
|
+
}
|
|
73
|
+
}, _react.default.createElement(_Icon.Icon, {
|
|
74
|
+
sizeIcon: "display24",
|
|
75
|
+
color: "white",
|
|
76
|
+
style: {
|
|
77
|
+
marginRight: "13px"
|
|
78
|
+
}
|
|
79
|
+
}, _react.default.createElement(_Icons.IconCloseCircle, null)), " ", buttons.cancel))));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
exports.ModalConfirmation = ModalConfirmation;
|
|
83
|
+
|
|
84
|
+
_Modal.Modal.Actions = function (_ref2) {
|
|
85
|
+
var children = _ref2.children;
|
|
86
|
+
return _react.default.createElement(_Layout.Box, {
|
|
87
|
+
paddingX: 3,
|
|
88
|
+
paddingBottom: 3,
|
|
89
|
+
width: "100%"
|
|
90
|
+
}, children);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
ModalConfirmation.defaultProps = {
|
|
94
|
+
title: "Confirmación",
|
|
95
|
+
body: "¿Quitar permiso a zona familiar?",
|
|
96
|
+
buttons: {
|
|
97
|
+
confirm: "Si",
|
|
98
|
+
cancel: "No"
|
|
99
|
+
},
|
|
100
|
+
hasError: false,
|
|
101
|
+
onModalClose: function onModalClose() {},
|
|
102
|
+
onModalBack: function onModalBack() {}
|
|
103
|
+
};
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.ModalCookies = void 0;
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _Layout = require("../../atoms/Layout");
|
|
19
|
+
|
|
20
|
+
var _Typography = require("../../atoms/Typography");
|
|
21
|
+
|
|
22
|
+
var _Modal = require("../../molecules/Modal");
|
|
23
|
+
|
|
24
|
+
var _Image = require("../../atoms/Image");
|
|
25
|
+
|
|
26
|
+
var _Button = require("../../atoms/Button");
|
|
27
|
+
|
|
28
|
+
var _Checkbox = require("../../atoms/Checkbox");
|
|
29
|
+
|
|
30
|
+
var _Icon = require("../../atoms/Icon");
|
|
31
|
+
|
|
32
|
+
var _Icons = require("../../atoms/Icons");
|
|
33
|
+
|
|
34
|
+
var _CookieTable = require("../../atoms/CookieTable");
|
|
35
|
+
|
|
36
|
+
var _excluded = ["isOpen", "actionInput", "onModalClose", "onModalBack", "backWithButton", "id", "title", "onSubmit", "content", "hasError", "errorMessage", "icon", "labelCheckInput", "idCheckInput", "labelAcceptButon", "labelCancelButon", "onDetail", "labelShowDetail", "labelMenuCookieDeclaration", "labelMenuAboutCookies", "aboutCookie", "cookieDeclarationText", "listOfCookies", "labelHideDetail", "cookieConsent"];
|
|
37
|
+
|
|
38
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
|
+
|
|
40
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
41
|
+
|
|
42
|
+
var ModalCookies = function ModalCookies(_ref) {
|
|
43
|
+
var isOpen = _ref.isOpen,
|
|
44
|
+
actionInput = _ref.actionInput,
|
|
45
|
+
onModalClose = _ref.onModalClose,
|
|
46
|
+
onModalBack = _ref.onModalBack,
|
|
47
|
+
backWithButton = _ref.backWithButton,
|
|
48
|
+
id = _ref.id,
|
|
49
|
+
title = _ref.title,
|
|
50
|
+
onSubmit = _ref.onSubmit,
|
|
51
|
+
content = _ref.content,
|
|
52
|
+
hasError = _ref.hasError,
|
|
53
|
+
errorMessage = _ref.errorMessage,
|
|
54
|
+
icon = _ref.icon,
|
|
55
|
+
labelCheckInput = _ref.labelCheckInput,
|
|
56
|
+
idCheckInput = _ref.idCheckInput,
|
|
57
|
+
labelAcceptButon = _ref.labelAcceptButon,
|
|
58
|
+
labelCancelButon = _ref.labelCancelButon,
|
|
59
|
+
onDetail = _ref.onDetail,
|
|
60
|
+
labelShowDetail = _ref.labelShowDetail,
|
|
61
|
+
labelMenuCookieDeclaration = _ref.labelMenuCookieDeclaration,
|
|
62
|
+
labelMenuAboutCookies = _ref.labelMenuAboutCookies,
|
|
63
|
+
aboutCookie = _ref.aboutCookie,
|
|
64
|
+
cookieDeclarationText = _ref.cookieDeclarationText,
|
|
65
|
+
listOfCookies = _ref.listOfCookies,
|
|
66
|
+
labelHideDetail = _ref.labelHideDetail,
|
|
67
|
+
cookieConsent = _ref.cookieConsent,
|
|
68
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
69
|
+
|
|
70
|
+
var _useState = (0, _react.useState)("cookie-declaration"),
|
|
71
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
72
|
+
whoIsActive = _useState2[0],
|
|
73
|
+
setWhoIsActive = _useState2[1];
|
|
74
|
+
|
|
75
|
+
var _useState3 = (0, _react.useState)(false),
|
|
76
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
77
|
+
showDetails = _useState4[0],
|
|
78
|
+
setShowDetails = _useState4[1];
|
|
79
|
+
|
|
80
|
+
return _react.default.createElement(_Modal.Modal, {
|
|
81
|
+
width: "339px",
|
|
82
|
+
id: id,
|
|
83
|
+
isOpen: isOpen,
|
|
84
|
+
duration: 100,
|
|
85
|
+
title: title,
|
|
86
|
+
hasError: hasError,
|
|
87
|
+
onModalClose: onModalClose,
|
|
88
|
+
marginX: 0,
|
|
89
|
+
marginY: 0,
|
|
90
|
+
onModalBack: onModalBack || function () {},
|
|
91
|
+
backWithButton: backWithButton,
|
|
92
|
+
closeWithButton: false,
|
|
93
|
+
icon: icon,
|
|
94
|
+
showCloseButton: false
|
|
95
|
+
}, _react.default.createElement(_Modal.Modal.Content, null, _react.default.createElement(_Layout.Box, {
|
|
96
|
+
overflowY: "scroll",
|
|
97
|
+
maxHeight: "300px"
|
|
98
|
+
}, _react.default.createElement(_Typography.Text, {
|
|
99
|
+
sizeText: "display14",
|
|
100
|
+
fontWeight: "medium",
|
|
101
|
+
color: "black84",
|
|
102
|
+
dangerouslySetInnerHTML: {
|
|
103
|
+
__html: content
|
|
104
|
+
}
|
|
105
|
+
})), hasError && errorMessage && _react.default.createElement(_Typography.Text, {
|
|
106
|
+
sizeText: "display14",
|
|
107
|
+
color: "red",
|
|
108
|
+
marginY: 1
|
|
109
|
+
}, errorMessage)), onSubmit && _react.default.createElement(_Modal.Modal.Actions, null, _react.default.createElement(_Layout.Box, null, _react.default.createElement(_Checkbox.Checkbox, {
|
|
110
|
+
hasError: hasError,
|
|
111
|
+
label: labelCheckInput,
|
|
112
|
+
color: "black36",
|
|
113
|
+
name: idCheckInput,
|
|
114
|
+
id: idCheckInput,
|
|
115
|
+
defaultChecked: cookieConsent,
|
|
116
|
+
action: function action(name, value) {
|
|
117
|
+
return actionInput(name, value);
|
|
118
|
+
}
|
|
119
|
+
})), _react.default.createElement(_Layout.Grid, {
|
|
120
|
+
marginTop: 2,
|
|
121
|
+
gridTemplateColumns: "1fr",
|
|
122
|
+
gridTemplateRows: "1fr",
|
|
123
|
+
gridColumnGap: 3
|
|
124
|
+
}, _react.default.createElement(_Button.Button, {
|
|
125
|
+
colorType: "orange",
|
|
126
|
+
action: function action() {
|
|
127
|
+
return onSubmit();
|
|
128
|
+
}
|
|
129
|
+
}, labelAcceptButon)), _react.default.createElement(_Layout.Flex, {
|
|
130
|
+
justifyContent: "center"
|
|
131
|
+
}, _react.default.createElement(_Button.Button, {
|
|
132
|
+
sizeText: "display16",
|
|
133
|
+
fontWeight: "bold",
|
|
134
|
+
color: "black",
|
|
135
|
+
justifyContent: "center",
|
|
136
|
+
display: "flex",
|
|
137
|
+
marginTop: 2,
|
|
138
|
+
colorType: "none",
|
|
139
|
+
action: function action() {
|
|
140
|
+
setShowDetails(!showDetails);
|
|
141
|
+
}
|
|
142
|
+
}, showDetails ? _react.default.createElement(_react.default.Fragment, null, " ", _react.default.createElement(_Icon.Icon, {
|
|
143
|
+
sizeIcon: "display24",
|
|
144
|
+
marginRight: 2,
|
|
145
|
+
color: "black84"
|
|
146
|
+
}, _react.default.createElement(_Icons.IconHide, null)), labelHideDetail) : _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_Icon.Icon, {
|
|
147
|
+
sizeIcon: "display24",
|
|
148
|
+
marginRight: 2,
|
|
149
|
+
color: "black84"
|
|
150
|
+
}, _react.default.createElement(_Icons.IconSee, null)), labelShowDetail))), showDetails && _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_Button.ButtonTabs, {
|
|
151
|
+
items: [{
|
|
152
|
+
id: "cookie-declaration",
|
|
153
|
+
children: _react.default.createElement(_react.default.Fragment, null, labelMenuCookieDeclaration),
|
|
154
|
+
isActive: whoIsActive === "cookie-declaration",
|
|
155
|
+
action: function action(e, target) {
|
|
156
|
+
return setWhoIsActive(target.id);
|
|
157
|
+
}
|
|
158
|
+
}, {
|
|
159
|
+
id: "about-cookies",
|
|
160
|
+
children: _react.default.createElement(_react.default.Fragment, null, labelMenuAboutCookies),
|
|
161
|
+
isActive: whoIsActive === "about-cookies",
|
|
162
|
+
action: function action(e, target) {
|
|
163
|
+
return setWhoIsActive(target.id);
|
|
164
|
+
}
|
|
165
|
+
}]
|
|
166
|
+
}), whoIsActive === "cookie-declaration" ? _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_Typography.Text, {
|
|
167
|
+
marginTop: 2,
|
|
168
|
+
sizeText: "display12"
|
|
169
|
+
}, cookieDeclarationText), listOfCookies === null || listOfCookies === void 0 ? void 0 : listOfCookies.map(function (item, i, array) {
|
|
170
|
+
return _react.default.createElement(_CookieTable.CookieTable, {
|
|
171
|
+
name: item.name,
|
|
172
|
+
domain: item.domain,
|
|
173
|
+
expiration: item.expiration,
|
|
174
|
+
lineDown: array.length - 1 === i
|
|
175
|
+
});
|
|
176
|
+
})) : _react.default.createElement(_Typography.Text, {
|
|
177
|
+
marginTop: 2,
|
|
178
|
+
sizeText: "display12"
|
|
179
|
+
}, aboutCookie))));
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
exports.ModalCookies = ModalCookies;
|
|
183
|
+
ModalCookies.defaultProps = {
|
|
184
|
+
hasError: false,
|
|
185
|
+
errorMessage: "",
|
|
186
|
+
onModalClose: function onModalClose() {},
|
|
187
|
+
onModalBack: function onModalBack() {},
|
|
188
|
+
backWithButton: false,
|
|
189
|
+
icon: _react.default.createElement(_Icons.IconCookie, null)
|
|
190
|
+
};
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
8
10
|
exports.ModalLogin = void 0;
|
|
9
11
|
|
|
10
|
-
var
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
15
|
|
|
12
16
|
var _Layout = require("../../atoms/Layout");
|
|
13
17
|
|
|
@@ -23,6 +27,10 @@ var _Input = require("../../atoms/Input");
|
|
|
23
27
|
|
|
24
28
|
var _Button = require("../../atoms/Button");
|
|
25
29
|
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
26
34
|
var ModalLogin = function ModalLogin(_ref) {
|
|
27
35
|
var _footer$action, _footer$action2;
|
|
28
36
|
|
|
@@ -42,6 +50,17 @@ var ModalLogin = function ModalLogin(_ref) {
|
|
|
42
50
|
backWithButton = _ref.backWithButton,
|
|
43
51
|
customColor = _ref.customColor,
|
|
44
52
|
customTextColor = _ref.customTextColor;
|
|
53
|
+
|
|
54
|
+
var _useState = (0, _react.useState)(prefix === null || prefix === void 0 ? void 0 : prefix.defaultValue),
|
|
55
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
56
|
+
prefixDefault = _useState2[0],
|
|
57
|
+
setPrefixDefault = _useState2[1];
|
|
58
|
+
|
|
59
|
+
(0, _react.useEffect)(function () {
|
|
60
|
+
if (prefix != null && (prefix === null || prefix === void 0 ? void 0 : prefix.defaultValue) != null) {
|
|
61
|
+
setPrefixDefault(prefix === null || prefix === void 0 ? void 0 : prefix.defaultValue);
|
|
62
|
+
}
|
|
63
|
+
}, [prefix]);
|
|
45
64
|
return _react.default.createElement(_Modal.Modal, {
|
|
46
65
|
width: "339px",
|
|
47
66
|
id: id,
|
|
@@ -62,12 +81,12 @@ var ModalLogin = function ModalLogin(_ref) {
|
|
|
62
81
|
marginTop: 0,
|
|
63
82
|
color: "black60",
|
|
64
83
|
fontWeight: "bold"
|
|
65
|
-
}, _react.default.createElement(_Layout.Flex, null, _react.default.createElement(_Selects.SelectPrefix, {
|
|
84
|
+
}, _react.default.createElement(_Layout.Flex, null, prefixDefault && _react.default.createElement(_Selects.SelectPrefix, {
|
|
66
85
|
hasError: hasError,
|
|
67
86
|
name: prefix === null || prefix === void 0 ? void 0 : prefix.name,
|
|
68
87
|
placeholderMessage: prefix === null || prefix === void 0 ? void 0 : prefix.placeholderMessage,
|
|
69
88
|
id: prefix === null || prefix === void 0 ? void 0 : prefix.id,
|
|
70
|
-
defaultValue:
|
|
89
|
+
defaultValue: prefixDefault,
|
|
71
90
|
options: prefix === null || prefix === void 0 ? void 0 : prefix.options,
|
|
72
91
|
action: prefix === null || prefix === void 0 ? void 0 : prefix.action
|
|
73
92
|
}), _react.default.createElement(_Layout.Box, {
|
|
@@ -118,22 +137,6 @@ ModalLogin.defaultProps = {
|
|
|
118
137
|
id: 'alife-login',
|
|
119
138
|
hasError: false,
|
|
120
139
|
errorMessage: '',
|
|
121
|
-
prefix: {
|
|
122
|
-
name: 'Prefix',
|
|
123
|
-
placeholderMessage: 'Prefijo',
|
|
124
|
-
id: 'prefix',
|
|
125
|
-
defaultValue: {
|
|
126
|
-
value: 'ES',
|
|
127
|
-
label: '+34'
|
|
128
|
-
},
|
|
129
|
-
options: [{
|
|
130
|
-
value: 'ES',
|
|
131
|
-
label: '+34'
|
|
132
|
-
}],
|
|
133
|
-
action: function action(name, value) {
|
|
134
|
-
return void 0;
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
140
|
idPhone: 'phone',
|
|
138
141
|
title: 'Iniciar sesión',
|
|
139
142
|
labelPhone: 'Escribe tu número de teéfono',
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.ModalParticipants = void 0;
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
14
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _Layout = require("../../atoms/Layout");
|
|
19
|
+
|
|
20
|
+
var _Modal = require("../../molecules/Modal");
|
|
21
|
+
|
|
22
|
+
var _Typography = require("../../atoms/Typography");
|
|
23
|
+
|
|
24
|
+
var _Card = require("../../atoms/Card");
|
|
25
|
+
|
|
26
|
+
var _Icon = require("../../atoms/Icon");
|
|
27
|
+
|
|
28
|
+
var _Icons = require("../../atoms/Icons");
|
|
29
|
+
|
|
30
|
+
var _Avatar = require("../../atoms/Avatar");
|
|
31
|
+
|
|
32
|
+
var _Button = require("../../atoms/Button");
|
|
33
|
+
|
|
34
|
+
var _Confirmation = require("./Confirmation");
|
|
35
|
+
|
|
36
|
+
var _excluded = ["id", "isOpen", "isOpenConfirmation", "onModalClose", "onModalBack", "title", "listparticipants", "isAdmin", "actionRemoveContent", "confirmationButton", "action"];
|
|
37
|
+
|
|
38
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
|
+
|
|
40
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
41
|
+
|
|
42
|
+
var ParticipantItem = function ParticipantItem(props) {
|
|
43
|
+
var participant = props.participant,
|
|
44
|
+
isAdmin = props.isAdmin,
|
|
45
|
+
actionRemoveContent = props.actionRemoveContent,
|
|
46
|
+
id = props.id,
|
|
47
|
+
line_id = props.line_id,
|
|
48
|
+
avatarImage = props.avatarImage;
|
|
49
|
+
return _react.default.createElement(_Card.Card, (0, _extends2.default)({
|
|
50
|
+
backgroundColor: "black06"
|
|
51
|
+
}, props, {
|
|
52
|
+
width: "95%",
|
|
53
|
+
marginY: "3px",
|
|
54
|
+
style: {
|
|
55
|
+
boxShadow: "none",
|
|
56
|
+
borderRadius: "12px"
|
|
57
|
+
}
|
|
58
|
+
}), _react.default.createElement(_Layout.Flex, {
|
|
59
|
+
padding: "6px",
|
|
60
|
+
width: "100%",
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
justifyContent: "space-between"
|
|
63
|
+
}, _react.default.createElement(_Layout.GridItem, {
|
|
64
|
+
gridArea: "avatar",
|
|
65
|
+
marginRight: 1
|
|
66
|
+
}, _react.default.createElement(_Avatar.Avatar, {
|
|
67
|
+
width: "36px",
|
|
68
|
+
height: "36px",
|
|
69
|
+
src: avatarImage,
|
|
70
|
+
alt: participant,
|
|
71
|
+
styleImg: {
|
|
72
|
+
objectFit: 'cover'
|
|
73
|
+
}
|
|
74
|
+
})), _react.default.createElement(_Typography.Text, {
|
|
75
|
+
sizeText: "display13",
|
|
76
|
+
color: "black",
|
|
77
|
+
fontWeight: "normal",
|
|
78
|
+
style: {
|
|
79
|
+
whiteSpace: "nowrap",
|
|
80
|
+
textOverflow: "ellipsis"
|
|
81
|
+
},
|
|
82
|
+
overflow: "hidden",
|
|
83
|
+
width: "200px"
|
|
84
|
+
}, participant), isAdmin && _react.default.createElement(_Icon.Icon, {
|
|
85
|
+
sizeIcon: "display24",
|
|
86
|
+
color: "black60",
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
return actionRemoveContent(id, line_id);
|
|
89
|
+
},
|
|
90
|
+
style: {
|
|
91
|
+
cursor: "pointer"
|
|
92
|
+
}
|
|
93
|
+
}, _react.default.createElement(_Icons.IconClose, null))));
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
var ModalParticipants = function ModalParticipants(_ref) {
|
|
97
|
+
var id = _ref.id,
|
|
98
|
+
isOpen = _ref.isOpen,
|
|
99
|
+
isOpenConfirmation = _ref.isOpenConfirmation,
|
|
100
|
+
onModalClose = _ref.onModalClose,
|
|
101
|
+
onModalBack = _ref.onModalBack,
|
|
102
|
+
title = _ref.title,
|
|
103
|
+
listparticipants = _ref.listparticipants,
|
|
104
|
+
isAdmin = _ref.isAdmin,
|
|
105
|
+
_actionRemoveContent = _ref.actionRemoveContent,
|
|
106
|
+
confirmationButton = _ref.confirmationButton,
|
|
107
|
+
action = _ref.action,
|
|
108
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
109
|
+
(0, _react.useEffect)(function () {}, [action]);
|
|
110
|
+
return !action ? _react.default.createElement(_Modal.Modal, {
|
|
111
|
+
width: "339px",
|
|
112
|
+
height: "414px",
|
|
113
|
+
id: id,
|
|
114
|
+
isOpen: isOpen,
|
|
115
|
+
duration: 100,
|
|
116
|
+
hasError: 0,
|
|
117
|
+
title: title,
|
|
118
|
+
onModalClose: onModalClose,
|
|
119
|
+
marginX: 0,
|
|
120
|
+
marginY: 0,
|
|
121
|
+
onModalBack: onModalBack || function () {},
|
|
122
|
+
backWithButton: 0,
|
|
123
|
+
closeWithButton: true
|
|
124
|
+
}, _react.default.createElement(_Modal.Modal.Content, null, _react.default.createElement(_Layout.Box, {
|
|
125
|
+
overflowY: "scroll",
|
|
126
|
+
maxHeight: "315px"
|
|
127
|
+
}, _react.default.createElement(_Layout.Flex, {
|
|
128
|
+
width: "100%",
|
|
129
|
+
minWidth: "100%",
|
|
130
|
+
height: "100%",
|
|
131
|
+
flexDirection: "column",
|
|
132
|
+
justifyContent: "space-evenly",
|
|
133
|
+
alignItems: "center"
|
|
134
|
+
}, listparticipants === null || listparticipants === void 0 ? void 0 : listparticipants.map(function (participant) {
|
|
135
|
+
var _participant$user_fol, _participant$user_fol3, _participant$owner_us;
|
|
136
|
+
|
|
137
|
+
return (participant === null || participant === void 0 ? void 0 : (_participant$user_fol = participant.user_follows_line) === null || _participant$user_fol === void 0 ? void 0 : _participant$user_fol.user_role) >= 2 && _react.default.createElement(ParticipantItem, {
|
|
138
|
+
key: participant === null || participant === void 0 ? void 0 : participant.id,
|
|
139
|
+
participant: participant === null || participant === void 0 ? void 0 : participant.full_name,
|
|
140
|
+
isAdmin: isAdmin,
|
|
141
|
+
actionRemoveContent: function actionRemoveContent() {
|
|
142
|
+
var _participant$user_fol2;
|
|
143
|
+
|
|
144
|
+
return _actionRemoveContent(participant === null || participant === void 0 ? void 0 : participant.user_id, participant === null || participant === void 0 ? void 0 : (_participant$user_fol2 = participant.user_follows_line) === null || _participant$user_fol2 === void 0 ? void 0 : _participant$user_fol2.line_id);
|
|
145
|
+
},
|
|
146
|
+
id: participant === null || participant === void 0 ? void 0 : participant.id,
|
|
147
|
+
line_id: participant === null || participant === void 0 ? void 0 : (_participant$user_fol3 = participant.user_follows_line) === null || _participant$user_fol3 === void 0 ? void 0 : _participant$user_fol3.line_id,
|
|
148
|
+
avatarImage: participant === null || participant === void 0 ? void 0 : (_participant$owner_us = participant.owner_user) === null || _participant$owner_us === void 0 ? void 0 : _participant$owner_us.profile_pic_url
|
|
149
|
+
});
|
|
150
|
+
}))))) : _react.default.createElement(_Confirmation.ModalConfirmation, {
|
|
151
|
+
isOpen: isOpenConfirmation,
|
|
152
|
+
confirmationButton: confirmationButton,
|
|
153
|
+
onModalClose: onModalClose,
|
|
154
|
+
onModalBack: onModalBack
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
exports.ModalParticipants = ModalParticipants;
|
|
159
|
+
|
|
160
|
+
_Modal.Modal.Actions = function (_ref2) {
|
|
161
|
+
var children = _ref2.children;
|
|
162
|
+
return _react.default.createElement(_Layout.Box, {
|
|
163
|
+
paddingX: 3,
|
|
164
|
+
paddingBottom: 3,
|
|
165
|
+
width: "100%"
|
|
166
|
+
}, children);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
ModalParticipants.defaultProps = {
|
|
170
|
+
hasError: false,
|
|
171
|
+
errorMessage: "",
|
|
172
|
+
onModalClose: function onModalClose() {},
|
|
173
|
+
onModalBack: function onModalBack() {},
|
|
174
|
+
actionRemoveContent: null,
|
|
175
|
+
action: false
|
|
176
|
+
};
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
8
10
|
exports.ModalRegister = void 0;
|
|
9
11
|
|
|
10
|
-
var
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
15
|
|
|
12
16
|
var _Layout = require("../../atoms/Layout");
|
|
13
17
|
|
|
@@ -25,6 +29,10 @@ var _Button = require("../../atoms/Button");
|
|
|
25
29
|
|
|
26
30
|
var _Checkbox = require("../../atoms/Checkbox");
|
|
27
31
|
|
|
32
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
+
|
|
34
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
+
|
|
28
36
|
var ModalRegister = function ModalRegister(_ref) {
|
|
29
37
|
var _footer$action, _footer$action2;
|
|
30
38
|
|
|
@@ -53,6 +61,27 @@ var ModalRegister = function ModalRegister(_ref) {
|
|
|
53
61
|
labelCheckCompanyOption = _ref.labelCheckCompanyOption,
|
|
54
62
|
customColor = _ref.customColor,
|
|
55
63
|
customTextColor = _ref.customTextColor;
|
|
64
|
+
|
|
65
|
+
var _useState = (0, _react.useState)(prefix === null || prefix === void 0 ? void 0 : prefix.defaultValue),
|
|
66
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
67
|
+
prefixDefault = _useState2[0],
|
|
68
|
+
setPrefixDefault = _useState2[1];
|
|
69
|
+
|
|
70
|
+
var _useState3 = (0, _react.useState)(true),
|
|
71
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
72
|
+
activeCheckbox = _useState4[0],
|
|
73
|
+
setActiveCheckbox = _useState4[1];
|
|
74
|
+
|
|
75
|
+
(0, _react.useEffect)(function () {
|
|
76
|
+
if (prefix != null && (prefix === null || prefix === void 0 ? void 0 : prefix.defaultValue) != null) {
|
|
77
|
+
setPrefixDefault(prefix === null || prefix === void 0 ? void 0 : prefix.defaultValue);
|
|
78
|
+
}
|
|
79
|
+
}, [prefix]);
|
|
80
|
+
|
|
81
|
+
var _isActiveCheckbox = function isActiveCheckbox(value) {
|
|
82
|
+
setActiveCheckbox(value);
|
|
83
|
+
};
|
|
84
|
+
|
|
56
85
|
return _react.default.createElement(_Modal.Modal, {
|
|
57
86
|
width: "339px",
|
|
58
87
|
id: id,
|
|
@@ -90,12 +119,12 @@ var ModalRegister = function ModalRegister(_ref) {
|
|
|
90
119
|
marginTop: 2,
|
|
91
120
|
color: "black60",
|
|
92
121
|
fontWeight: "bold"
|
|
93
|
-
}, _react.default.createElement(_Layout.Flex, null, _react.default.createElement(_Selects.SelectPrefix, {
|
|
122
|
+
}, _react.default.createElement(_Layout.Flex, null, prefixDefault && _react.default.createElement(_Selects.SelectPrefix, {
|
|
94
123
|
hasError: hasError,
|
|
95
124
|
name: prefix === null || prefix === void 0 ? void 0 : prefix.name,
|
|
96
125
|
placeholderMessage: prefix === null || prefix === void 0 ? void 0 : prefix.placeholderMessage,
|
|
97
126
|
id: prefix === null || prefix === void 0 ? void 0 : prefix.id,
|
|
98
|
-
defaultValue:
|
|
127
|
+
defaultValue: prefixDefault,
|
|
99
128
|
options: prefix === null || prefix === void 0 ? void 0 : prefix.options,
|
|
100
129
|
action: prefix === null || prefix === void 0 ? void 0 : prefix.action
|
|
101
130
|
}), _react.default.createElement(_Layout.Box, {
|
|
@@ -126,6 +155,9 @@ var ModalRegister = function ModalRegister(_ref) {
|
|
|
126
155
|
id: idCheckInput,
|
|
127
156
|
action: function action(name, value) {
|
|
128
157
|
return actionInput(name, value);
|
|
158
|
+
},
|
|
159
|
+
isActiveCheckbox: function isActiveCheckbox(value) {
|
|
160
|
+
return _isActiveCheckbox(value);
|
|
129
161
|
}
|
|
130
162
|
})), lastLineHaveCompanyOption && _react.default.createElement(_Layout.Box, {
|
|
131
163
|
marginBottom: 3
|
|
@@ -150,7 +182,8 @@ var ModalRegister = function ModalRegister(_ref) {
|
|
|
150
182
|
action: function action(e) {
|
|
151
183
|
e.preventDefault();
|
|
152
184
|
actionButton.action();
|
|
153
|
-
}
|
|
185
|
+
},
|
|
186
|
+
disabled: activeCheckbox
|
|
154
187
|
}, actionButton.label)))), _react.default.createElement(_Modal.Modal.Footer, null, _react.default.createElement(_Typography.Text, {
|
|
155
188
|
sizeText: "display14",
|
|
156
189
|
color: "black36"
|
|
@@ -168,22 +201,6 @@ ModalRegister.defaultProps = {
|
|
|
168
201
|
id: 'alife-login',
|
|
169
202
|
hasError: false,
|
|
170
203
|
errorMessage: '',
|
|
171
|
-
prefix: {
|
|
172
|
-
name: 'Prefix',
|
|
173
|
-
placeholderMessage: 'Prefijo',
|
|
174
|
-
id: 'prefix',
|
|
175
|
-
defaultValue: {
|
|
176
|
-
value: 'ES',
|
|
177
|
-
label: '+34'
|
|
178
|
-
},
|
|
179
|
-
options: [{
|
|
180
|
-
value: 'ES',
|
|
181
|
-
label: '+34'
|
|
182
|
-
}],
|
|
183
|
-
action: function action(name, value) {
|
|
184
|
-
return void 0;
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
204
|
idPhone: 'phone',
|
|
188
205
|
idCheckInput: 'rgpd',
|
|
189
206
|
labelCheckInput: 'He leído y acepto la Política de Privacidad y las Condiciones Generales',
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "ModalCookies", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _Cookies.ModalCookies;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "ModalDatailFlower", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -58,4 +64,6 @@ var _DatailFlower = require("./DatailFlower");
|
|
|
58
64
|
|
|
59
65
|
var _PaymentConfirmation = require("./PaymentConfirmation");
|
|
60
66
|
|
|
67
|
+
var _Cookies = require("./Cookies");
|
|
68
|
+
|
|
61
69
|
var _NotAllowedBuyFlowers = require("./NotAllowedBuyFlowers");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lideralia/alife-uikit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.366",
|
|
4
4
|
"description": "Librería y documentación de componentes, basada en el Design System de Alife.",
|
|
5
5
|
"homepage": "https://github.com/lideralia/alife-frontend-components#readme",
|
|
6
6
|
"bugs": {
|