contentoh-components-library 21.2.73 → 21.2.74

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 (32) hide show
  1. package/.env.development +1 -4
  2. package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +22 -21
  3. package/dist/components/molecules/CustomSelect/SelectItem.js +1 -10
  4. package/dist/components/molecules/HeaderTop/index.js +5 -10
  5. package/dist/components/molecules/HeaderTop/styles.js +1 -1
  6. package/package.json +1 -6
  7. package/src/components/molecules/CustomSelect/CustomSelect.stories.js +12 -20
  8. package/src/components/molecules/CustomSelect/SelectItem.js +0 -7
  9. package/src/components/molecules/HeaderTop/index.js +6 -10
  10. package/src/components/molecules/HeaderTop/styles.js +0 -4
  11. package/src/assets/images/chatPopup/Spinner.gif +0 -0
  12. package/src/assets/images/chatPopup/close.svg +0 -3
  13. package/src/assets/images/chatPopup/defaultImage.png +0 -0
  14. package/src/assets/images/chatPopup/defaultProfile.png +0 -0
  15. package/src/assets/images/chatPopup/doc.svg +0 -1
  16. package/src/assets/images/chatPopup/document.svg +0 -1
  17. package/src/assets/images/chatPopup/iconChat.svg +0 -19
  18. package/src/assets/images/chatPopup/iconPlus.svg +0 -3
  19. package/src/assets/images/chatPopup/pdf.svg +0 -75
  20. package/src/assets/images/chatPopup/remove.svg +0 -4
  21. package/src/assets/images/chatPopup/send.svg +0 -3
  22. package/src/assets/images/chatPopup/svgIcon.svg +0 -109
  23. package/src/assets/images/chatPopup/upload_file.svg +0 -3
  24. package/src/assets/images/chatPopup/xls.svg +0 -53
  25. package/src/assets/images/customSelect/starIcon.svg +0 -14
  26. package/src/components/atoms/ChatPopUp/ChatPopUp.stories.js +0 -11
  27. package/src/components/atoms/ChatPopUp/index.js +0 -541
  28. package/src/components/atoms/ChatPopUp/styles.js +0 -278
  29. package/src/components/atoms/ChatPopUp/utils/handlersChat.js +0 -104
  30. package/src/components/atoms/Tooltip/Tooltip.stories.js +0 -15
  31. package/src/components/atoms/Tooltip/index.js +0 -35
  32. package/src/components/atoms/Tooltip/styles.js +0 -5
@@ -1,278 +0,0 @@
1
- import styled from "styled-components";
2
- import { GlobalColors, FontFamily } from "../../../global-files/variables";
3
-
4
- export const Container = styled.button`
5
- height: 34px;
6
- width: 34px;
7
- background-color: transparent;
8
- border: 1px solid #f0f0f0;
9
- border-radius: 50px;
10
- padding: 10px;
11
- display: flex;
12
- align-items: center;
13
- justify-content: center;
14
- position: relative;
15
- cursor: pointer;
16
- &:hover {
17
- background-color: #f0f0f0;
18
- }
19
- .icon-chat {
20
- margin: 0;
21
- width: 15px;
22
- height: 15px;
23
- }
24
- `;
25
- export const Slider = styled.div`
26
- -webkit-box-shadow: 0px 0px 10px -1px rgba(0, 0, 0, 0.8);
27
- box-shadow: 0px 0px 10px -1px rgba(0, 0, 0, 0.8);
28
- z-index: 200;
29
- width: 425px;
30
- height: 600px;
31
- border-radius: 10px;
32
- background: white;
33
- padding: 37px 16px 17px 20px;
34
- position: absolute;
35
- right: ${({ showMenu }) => (showMenu ? 2 : -50)}%;
36
- top: 3%;
37
- transition: right 2s ease 0;
38
- .image {
39
- display: flex;
40
- justify-content: center;
41
- align-content: center;
42
- background-color: #f7f7f7;
43
- border-radius: 10px;
44
- #myList {
45
- list-style: none;
46
- img {
47
- width: 365px;
48
- border-radius: 10px;
49
- }
50
- }
51
- }
52
- .close {
53
- background-color: #e33aa9;
54
- border: 3px solid white;
55
- height: 35px;
56
- width: 35px;
57
- border-radius: 50%;
58
- position: absolute;
59
- top: -18px;
60
- display: flex;
61
- justify-content: center;
62
- align-items: center;
63
- cursor: pointer;
64
- }
65
- .content-chat {
66
- height: 495px;
67
- max-height: 495px;
68
- overflow-y: auto;
69
- overflow-x: hidden;
70
- background-color: transparent;
71
- font-family: sans-serif;
72
- font-size: 12px;
73
- & + * {
74
- margin-top: 12px;
75
- }
76
- ::-webkit-scrollbar {
77
- width: 0;
78
- }
79
- .cargar-mas {
80
- border: none;
81
- border-radius: 10px;
82
- font: normal normal normal 11px/11px sans-serif;
83
- letter-spacing: 0.1px;
84
- color: #8a6caa;
85
- background-color: #f7f7fc;
86
- padding: 5px 17px;
87
- margin: 0 35%;
88
- display: flex;
89
- cursor: pointer;
90
- white-space: nowrap;
91
- &:hover {
92
- background-color: #f0f0f0;
93
- }
94
- img {
95
- margin-right: 7px;
96
- height: 13px;
97
- }
98
- }
99
- #myListChat {
100
- list-style: none;
101
- margin: 0;
102
- padding: 0;
103
- height: 100%;
104
- overflow-y: auto;
105
- overflow-x: hidden;
106
- display: flex;
107
- flex-direction: column-reverse;
108
- gap: 3px;
109
- .group-date {
110
- display: flex;
111
- justify-content: center;
112
- align-items: center;
113
- hr {
114
- width: 120px;
115
- border: 0.3px solid #f0f0f0;
116
- }
117
- p {
118
- margin: 0 10px;
119
- color: #b3b3b3;
120
- }
121
- }
122
- li {
123
- width: 100%;
124
- padding: 5px 0;
125
- margin: 0;
126
- display: flex;
127
- flex-direction: row-reverse;
128
- justify-content: flex-start;
129
- flex-wrap: nowrap;
130
- gap: 5px;
131
- align-items: center;
132
- .tooltip-userName {
133
- background-color: #f0f0f0;
134
- padding: 6px 10px;
135
- color: #000000;
136
- font-size: 11px;
137
- margin-bottom: 6px;
138
- .MuiTooltip-arrow {
139
- color: #f0f0f0;
140
- }
141
- }
142
-
143
- .profile {
144
- display: grid;
145
- place-items: center;
146
- align-self: start;
147
- width: 34px;
148
- height: 34px;
149
- border-radius: 50%;
150
- overflow: hidden;
151
- img {
152
- width: 100%;
153
- height: 100%;
154
- border-radius: inherit;
155
- }
156
- }
157
- .img-file {
158
- margin: 0 10px;
159
- width: 165px;
160
- img {
161
- width: 100%;
162
- object-fit: contain;
163
- border-radius: 10px;
164
- }
165
- }
166
- .body-message {
167
- margin: 0 10px;
168
- border-radius: 10px;
169
- box-sizing: border-box;
170
- background-color: #f0f0f0;
171
- padding: 10px 10px 10px 12px;
172
- max-width: 280px;
173
- p {
174
- color: #262626;
175
- margin: 0;
176
- padding: 0;
177
- }
178
- a {
179
- text-decoration: none;
180
- }
181
- div {
182
- cursor: pointer;
183
- background-color: white;
184
- border-radius: 10px;
185
- padding: 7px 10px;
186
- display: flex;
187
- align-items: center;
188
- img {
189
- height: 20px;
190
- width: 20px;
191
- margin-right: 5px;
192
- }
193
- p {
194
- color: #262626 !important;
195
- white-space: nowrap;
196
- text-overflow: ellipsis;
197
- overflow: hidden;
198
- }
199
- }
200
- }
201
- .date {
202
- display: flex;
203
- align-items: center;
204
- white-space: nowrap;
205
- p {
206
- color: #d9d9d9;
207
- font-size: 9px;
208
- }
209
- }
210
- &.own-message {
211
- flex-direction: row;
212
- justify-content: flex-start;
213
- .body-message {
214
- background-color: #8386ee;
215
- p {
216
- margin: 0;
217
- padding: 0;
218
- color: #ffffff;
219
- }
220
- }
221
- }
222
- }
223
- }
224
- }
225
- .input-chat {
226
- display: flex;
227
- align-items: center;
228
- border-radius: 17px;
229
- background-color: #f7f7f7;
230
- padding: 10px 7px 10px 15px;
231
- .send-message {
232
- background-color: transparent;
233
- width: 157%;
234
- border: none;
235
- font-family: sans-serif;
236
- font-size: 13px;
237
- line-height: initial;
238
- color: #242424;
239
- ::placeholder {
240
- font: normal normal medium 12px/14px sans-serif;
241
- letter-spacing: 0.6px;
242
- color: #b3b3b3;
243
- }
244
- :focus {
245
- outline: none;
246
- }
247
- & + * {
248
- margin-left: 10px;
249
- }
250
- }
251
- .upload {
252
- border: none;
253
- background: transparent;
254
- cursor: pointer;
255
- & + * {
256
- margin-left: 7px;
257
- }
258
- }
259
- .add-picture-input {
260
- display: none;
261
- }
262
- .send {
263
- width: 35.4px;
264
- height: 20px;
265
- border: none;
266
- background-color: #e33aa9;
267
- border-radius: 50%;
268
- display: flex;
269
- justify-content: center;
270
- cursor: pointer;
271
- align-items: center;
272
- img {
273
- width: 11px;
274
- height: 11px;
275
- }
276
- }
277
- }
278
- `;
@@ -1,104 +0,0 @@
1
-
2
- import axios from "axios";
3
-
4
-
5
- export const getBD = (
6
- id_article,
7
- version_article,
8
- get_type,
9
- item_date ,
10
- tokenUser
11
- ) => {
12
- return new Promise(async (response, error) => {
13
- try {
14
- let URL = `https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/products-chat`; // endpoint
15
- URL += `?id_article=${id_article}`;
16
- URL += `&version_article=${version_article}`;
17
- URL += `&get_type=${get_type}`;
18
- URL += `&item_date=${item_date}`;
19
-
20
- const respHTTPjson = await axios.get(URL, {
21
- headers: {
22
- // AQUI COLOCAR EL TOKEN DEL USUARIO CONECTADO
23
- Authorization: tokenUser,
24
- },
25
- });
26
- //console.log( "respHTTPjson" , respHTTPjson )
27
- // verificar si existe un error en la peticion realizada
28
- if (respHTTPjson.status != 200) {
29
- response({
30
- message: "No fue posible llevar a cabo la operacion",
31
- errorDetails: respHTTPjson.statusText,
32
- });
33
- return;
34
- }
35
- // obtener body backend
36
- const body = JSON.parse(respHTTPjson.data.body);
37
- //console.log( "resHTTP body:" , body );
38
- // verificar si existe error desde el backend
39
- if (respHTTPjson.data.statusCode != 200) {
40
- response({
41
- message: body.message,
42
- errorDetails: body.errorDetail,
43
- });
44
- return;
45
- }
46
- // cuando se ejecuto bien el create ... tomar un posible message
47
- response({ body });
48
- } catch (err) {
49
- //console.log("error catch get items chat" , err);
50
- response({
51
- message: "Algo salio mal al obtener los items del chat",
52
- errorDetails: err.message,
53
- });
54
- }
55
- });
56
- };
57
-
58
-
59
- export const createItemBD = (
60
- id_article,
61
- version_article,
62
- value_type,
63
- value ,
64
- tokenUser
65
- ) => {
66
- return new Promise(async (response, error) => {
67
- try {
68
- const URL = `https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/products-chat`;
69
- const bodyData = {
70
- id_article: id_article,
71
- version_article: version_article,
72
- value_type: value_type,
73
- value: value,
74
- };
75
-
76
- const respHTTPjson = await axios.post(URL, bodyData, {
77
- headers: {
78
- Authorization: tokenUser,
79
- },
80
- });
81
- if (respHTTPjson.status != 200) {
82
- response({
83
- message: "No fue posible llevar a cabo la operacion",
84
- errorDetails: respHTTPjson.statusText,
85
- });
86
- return;
87
- }
88
- const body = JSON.parse(respHTTPjson.data.body);
89
- if (respHTTPjson.data.statusCode != 200) {
90
- response({
91
- message: body.message,
92
- errorDetails: body.errorDetail,
93
- });
94
- return;
95
- }
96
- response({ body: true });
97
- } catch (err) {
98
- response({
99
- message: "Algo salio mal al agregar el item en el chat",
100
- errorDetails: err.message,
101
- });
102
- }
103
- });
104
- };
@@ -1,15 +0,0 @@
1
- import { CustomTooltip } from "./index";
2
-
3
- export default {
4
- title: "Components/atoms/CustomTooltip",
5
- component: CustomTooltip
6
- };
7
-
8
- const Template = (args) => <CustomTooltip {...args} />;
9
-
10
- export const TooltipDefault = Template.bind({});
11
- TooltipDefault.args = {
12
- componentTooltip: (<p> hola soy tooltip </p>) ,
13
- children: (<button> abrir tooltip </button>) ,
14
- className: "container-tooltip"
15
- };
@@ -1,35 +0,0 @@
1
- import { useEffect, useState } from "react";
2
- import { Tooltip } from "@mui/material";
3
- import { Container } from "./styles";
4
- import React from "react";
5
-
6
- export const CustomTooltip = ({
7
- componentTooltip ,
8
- children ,
9
- className ,
10
- ...props
11
- }) => {
12
-
13
- const MyComponent = React.forwardRef(function MyComponent(props, ref) {
14
- return (
15
- <div {...props} ref={ref}>
16
- Bin
17
- </div>
18
- );
19
- });
20
-
21
- return (
22
- <Tooltip
23
- {...props}
24
- arrow
25
- placement="top"
26
- componentsProps={{
27
- tooltip: {className: className} ,
28
- popper: {disablePortal: true}
29
- }}
30
- title={ componentTooltip }
31
- >
32
- {children}
33
- </Tooltip>
34
- )
35
- };
@@ -1,5 +0,0 @@
1
- import styled from "styled-components";
2
-
3
- export const Container = styled.div`
4
- border: 1px solid red;
5
- `;