@lideralia/alife-uikit 1.2.23 → 1.2.25

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.
@@ -63,71 +63,74 @@ var setTypeNotification = {
63
63
  2072: 'eventAccomplished',
64
64
  2074: 'userAddedCommentToLine'
65
65
  };
66
- var setIconNotification = {
67
- adminLineInvitation: _react.default.createElement(_Icon.Icon, {
68
- sizeIcon: "display16",
69
- color: "orange"
70
- }, _react.default.createElement(_IconUsers.default, null)),
71
- accessToLineRequest: _react.default.createElement(_Icon.Icon, {
72
- sizeIcon: "display16",
73
- color: "blue"
74
- }, _react.default.createElement(_IconUserFamily.default, null)),
75
- moderateContent: _react.default.createElement(_Icon.Icon, {
76
- sizeIcon: "display16",
77
- color: "orange"
78
- }, _react.default.createElement(_IconStop.default, null)),
79
- contentAccepted: _react.default.createElement(_Icon.Icon, {
80
- sizeIcon: "display16",
81
- color: "green"
82
- }, _react.default.createElement(_IconCheckCircle.default, null)),
83
- contentRejected: _react.default.createElement(_Icon.Icon, {
84
- sizeIcon: "display16",
85
- color: "red"
86
- }, _react.default.createElement(_IconCloseCircle.default, null)),
87
- contentAdded: _react.default.createElement(_Icon.Icon, {
88
- sizeIcon: "display16",
89
- color: "blue"
90
- }, _react.default.createElement(_IconWrite.default, null)),
91
- lineFollowerAccepted: _react.default.createElement(_Icon.Icon, {
92
- sizeIcon: "display16",
93
- color: "blue"
94
- }, _react.default.createElement(_IconUserFamily.default, null)),
95
- lineInviteFollower: _react.default.createElement(_Icon.Icon, {
96
- sizeIcon: "display16",
97
- color: "blue"
98
- }, _react.default.createElement(_IconUserFamily.default, null)),
99
- badgeAdded: _react.default.createElement(_Icon.Icon, {
100
- sizeIcon: "display16",
101
- color: "orange"
102
- }, _react.default.createElement(_IconCommentary.default, null)),
103
- adminAddedThankYouLetter: _react.default.createElement(_Icon.Icon, {
104
- sizeIcon: "display16",
105
- color: "orange"
106
- }, _react.default.createElement(_IconMail.default, null)),
107
- adminRequestAccepted: _react.default.createElement(_Icon.Icon, {
108
- sizeIcon: "display16",
109
- color: "orange"
110
- }, _react.default.createElement(_IconUsers.default, null)),
111
- adminRequestRejected: _react.default.createElement(_Icon.Icon, {
112
- sizeIcon: "display16",
113
- color: "red"
114
- }, _react.default.createElement(_IconCloseCircle.default, null)),
115
- likeAdded: _react.default.createElement(_Icon.Icon, {
116
- sizeIcon: "display16",
117
- color: "red"
118
- }, _react.default.createElement(_IconLike.default, null)),
119
- userAddedYouAsFriend: _react.default.createElement(_Icon.Icon, {
120
- sizeIcon: "display16",
121
- color: "blue"
122
- }, _react.default.createElement(_IconLike.default, null)),
123
- eventAccomplished: _react.default.createElement(_Icon.Icon, {
124
- sizeIcon: "display16",
125
- color: "orange"
126
- }, _react.default.createElement(_IconEditText.default, null)),
127
- userAddedCommentToLine: _react.default.createElement(_Icon.Icon, {
128
- sizeIcon: "display16",
129
- color: "orange"
130
- }, _react.default.createElement(_IconCommentary.default, null))
66
+
67
+ var setIconNotification = function setIconNotification(color) {
68
+ return {
69
+ adminLineInvitation: _react.default.createElement(_Icon.Icon, {
70
+ sizeIcon: "display16",
71
+ color: color || 'orange'
72
+ }, _react.default.createElement(_IconUsers.default, null)),
73
+ accessToLineRequest: _react.default.createElement(_Icon.Icon, {
74
+ sizeIcon: "display16",
75
+ color: color || 'orange'
76
+ }, _react.default.createElement(_IconUserFamily.default, null)),
77
+ moderateContent: _react.default.createElement(_Icon.Icon, {
78
+ sizeIcon: "display16",
79
+ color: color || 'orange'
80
+ }, _react.default.createElement(_IconStop.default, null)),
81
+ contentAccepted: _react.default.createElement(_Icon.Icon, {
82
+ sizeIcon: "display16",
83
+ color: color || 'orange'
84
+ }, _react.default.createElement(_IconCheckCircle.default, null)),
85
+ contentRejected: _react.default.createElement(_Icon.Icon, {
86
+ sizeIcon: "display16",
87
+ color: color || 'orange'
88
+ }, _react.default.createElement(_IconCloseCircle.default, null)),
89
+ contentAdded: _react.default.createElement(_Icon.Icon, {
90
+ sizeIcon: "display16",
91
+ color: color || 'orange'
92
+ }, _react.default.createElement(_IconWrite.default, null)),
93
+ lineFollowerAccepted: _react.default.createElement(_Icon.Icon, {
94
+ sizeIcon: "display16",
95
+ color: color || 'orange'
96
+ }, _react.default.createElement(_IconUserFamily.default, null)),
97
+ lineInviteFollower: _react.default.createElement(_Icon.Icon, {
98
+ sizeIcon: "display16",
99
+ color: color || 'orange'
100
+ }, _react.default.createElement(_IconUserFamily.default, null)),
101
+ badgeAdded: _react.default.createElement(_Icon.Icon, {
102
+ sizeIcon: "display16",
103
+ color: color || 'orange'
104
+ }, _react.default.createElement(_IconCommentary.default, null)),
105
+ adminAddedThankYouLetter: _react.default.createElement(_Icon.Icon, {
106
+ sizeIcon: "display16",
107
+ color: color || 'orange'
108
+ }, _react.default.createElement(_IconMail.default, null)),
109
+ adminRequestAccepted: _react.default.createElement(_Icon.Icon, {
110
+ sizeIcon: "display16",
111
+ color: color || 'orange'
112
+ }, _react.default.createElement(_IconUsers.default, null)),
113
+ adminRequestRejected: _react.default.createElement(_Icon.Icon, {
114
+ sizeIcon: "display16",
115
+ color: color || 'orange'
116
+ }, _react.default.createElement(_IconCloseCircle.default, null)),
117
+ likeAdded: _react.default.createElement(_Icon.Icon, {
118
+ sizeIcon: "display16",
119
+ color: color || 'orange'
120
+ }, _react.default.createElement(_IconLike.default, null)),
121
+ userAddedYouAsFriend: _react.default.createElement(_Icon.Icon, {
122
+ sizeIcon: "display16",
123
+ color: color || 'orange'
124
+ }, _react.default.createElement(_IconLike.default, null)),
125
+ eventAccomplished: _react.default.createElement(_Icon.Icon, {
126
+ sizeIcon: "display16",
127
+ color: color || 'orange'
128
+ }, _react.default.createElement(_IconEditText.default, null)),
129
+ userAddedCommentToLine: _react.default.createElement(_Icon.Icon, {
130
+ sizeIcon: "display16",
131
+ color: color || 'orange'
132
+ }, _react.default.createElement(_IconCommentary.default, null))
133
+ };
131
134
  };
132
135
 
133
136
  var CardNotification = function CardNotification(_ref) {
@@ -170,7 +173,7 @@ CardNotification.Header = function (props) {
170
173
  }, _react.default.createElement(_Layout.GridItem, {
171
174
  gridArea: "icon",
172
175
  paddingTop: 3
173
- }, setIconNotification[type]), _react.default.createElement(_Layout.GridItem, {
176
+ }, setIconNotification(customColor)[type]), _react.default.createElement(_Layout.GridItem, {
174
177
  gridArea: "avatar"
175
178
  }, _react.default.createElement(_Avatar.Avatar, {
176
179
  src: picture,
@@ -32,7 +32,9 @@ var ModalAdministratorsOrUsers = function ModalAdministratorsOrUsers(_ref) {
32
32
  onModalBack = _ref.onModalBack,
33
33
  listparticipants = _ref.listparticipants,
34
34
  seeParticipants = _ref.seeParticipants,
35
- _actionAddAdmin = _ref.actionAddAdmin;
35
+ _actionAddAdmin = _ref.actionAddAdmin,
36
+ _actionRemoveContent = _ref.actionRemoveContent,
37
+ me = _ref.me;
36
38
  return _react.default.createElement(_Modal.Modal, {
37
39
  width: "339px",
38
40
  height: "414px",
@@ -64,11 +66,15 @@ var ModalAdministratorsOrUsers = function ModalAdministratorsOrUsers(_ref) {
64
66
  actionAddAdmin: function actionAddAdmin() {
65
67
  _actionAddAdmin(participant === null || participant === void 0 ? void 0 : participant.userId, participant === null || participant === void 0 ? void 0 : participant.lineId);
66
68
  },
69
+ actionRemoveContent: function actionRemoveContent() {
70
+ _actionRemoveContent(participant === null || participant === void 0 ? void 0 : participant.userId, participant === null || participant === void 0 ? void 0 : participant.lineId);
71
+ },
67
72
  id: participant === null || participant === void 0 ? void 0 : participant.id,
68
- line_id: participant === null || participant === void 0 ? void 0 : participant.lineId,
69
- user_role: participant === null || participant === void 0 ? void 0 : participant.userRole,
70
- user_id: participant === null || participant === void 0 ? void 0 : participant.userId,
71
- avatarImage: participant === null || participant === void 0 ? void 0 : participant.profilePicUrl
73
+ lineId: participant === null || participant === void 0 ? void 0 : participant.lineId,
74
+ userRole: participant === null || participant === void 0 ? void 0 : participant.userRole,
75
+ userId: participant === null || participant === void 0 ? void 0 : participant.userId,
76
+ avatarImage: participant === null || participant === void 0 ? void 0 : participant.profilePicUrl,
77
+ me: me
72
78
  });
73
79
  })))));
74
80
  };
@@ -81,7 +87,11 @@ var ParticipantItem = function ParticipantItem(props) {
81
87
  lineId = props.lineId,
82
88
  avatarImage = props.avatarImage,
83
89
  seeParticipants = props.seeParticipants,
84
- actionAddAdmin = props.actionAddAdmin;
90
+ actionAddAdmin = props.actionAddAdmin,
91
+ actionRemoveContent = props.actionRemoveContent,
92
+ me = props.me,
93
+ userRole = props.userRole,
94
+ userId = props.userId;
85
95
  return _react.default.createElement(_Card.Card, (0, _extends2.default)({
86
96
  backgroundColor: "black06"
87
97
  }, props, {
@@ -126,7 +136,16 @@ var ParticipantItem = function ParticipantItem(props) {
126
136
  style: {
127
137
  cursor: 'pointer'
128
138
  }
129
- }, _react.default.createElement(_Icons.IconAdd, null))));
139
+ }, _react.default.createElement(_Icons.IconAdd, null)), me != null && userRole != 4 && me.userRole > userRole && me.userId != userId && _react.default.createElement(_Icon.Icon, {
140
+ sizeIcon: "display24",
141
+ color: "black60",
142
+ onClick: function onClick() {
143
+ return actionRemoveContent(id, lineId);
144
+ },
145
+ style: {
146
+ cursor: 'pointer'
147
+ }
148
+ }, _react.default.createElement(_Icons.IconClose, null))));
130
149
  };
131
150
 
132
151
  ModalAdministratorsOrUsers.defaultProps = {
@@ -57,12 +57,16 @@ var AdministratorsOrUsers = Template.bind({});
57
57
  exports.AdministratorsOrUsers = AdministratorsOrUsers;
58
58
  AdministratorsOrUsers.args = {
59
59
  title: 'Administradores',
60
+ me: {
61
+ userRole: 5,
62
+ userId: 'E458FSD-sdfss'
63
+ },
60
64
  listparticipants: [{
61
65
  id: 1,
62
- userId: 'sdfgjklj48-sdfvcw2',
66
+ userId: 'E458FSD-sdfss',
63
67
  fullName: 'Eva María G.',
64
68
  profilePicUrl: 'https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460__480.png',
65
- userRole: 3,
69
+ userRole: 5,
66
70
  lineId: '5e626f4f-d146-4745-9087-cc30702'
67
71
  }, {
68
72
  id: 1,
@@ -110,5 +114,8 @@ AdministratorsOrUsers.args = {
110
114
  seeParticipants: true,
111
115
  actionAddAdmin: function actionAddAdmin(userId, lineId) {
112
116
  return void 0;
117
+ },
118
+ actionRemoveContent: function actionRemoveContent(userId, lineId) {
119
+ return void 0;
113
120
  }
114
121
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lideralia/alife-uikit",
3
- "version": "1.2.23",
3
+ "version": "1.2.25",
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": {