contentoh-components-library 21.3.17 → 21.3.19

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 (196) hide show
  1. package/.env.development +0 -5
  2. package/dist/assets/images/generalButton/closeIcon.svg +2 -2
  3. package/dist/components/atoms/GeneralInput/index.js +14 -1
  4. package/dist/components/atoms/ProgressBar/index.js +6 -36
  5. package/dist/components/atoms/ProgressBar/styles.js +3 -11
  6. package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +22 -21
  7. package/dist/components/molecules/CustomSelect/SelectItem.js +1 -10
  8. package/dist/components/molecules/HeaderTop/index.js +6 -23
  9. package/dist/components/molecules/HeaderTop/styles.js +1 -1
  10. package/dist/components/molecules/ProductNameHeader/index.js +4 -6
  11. package/dist/components/organisms/FullProductNameHeader/index.js +0 -1
  12. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +50 -65
  13. package/dist/components/pages/ProviderProductEdition/index.js +11 -15
  14. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +44 -36
  15. package/dist/components/pages/RetailerProductEdition/index.js +12 -13
  16. package/dist/global-files/data.js +23 -18
  17. package/dist/global-files/fonts.css +0 -6
  18. package/dist/global-files/variables.js +0 -2
  19. package/dist/index.js +46 -267
  20. package/package.json +1 -12
  21. package/src/assets/images/generalButton/closeIcon.svg +2 -2
  22. package/src/components/atoms/GeneralInput/index.js +10 -0
  23. package/src/components/atoms/ProgressBar/index.js +5 -40
  24. package/src/components/atoms/ProgressBar/styles.js +0 -24
  25. package/src/components/molecules/CustomSelect/CustomSelect.stories.js +12 -20
  26. package/src/components/molecules/CustomSelect/SelectItem.js +0 -7
  27. package/src/components/molecules/HeaderTop/index.js +8 -29
  28. package/src/components/molecules/HeaderTop/styles.js +0 -4
  29. package/src/components/molecules/ProductNameHeader/index.js +2 -7
  30. package/src/components/organisms/FullProductNameHeader/index.js +0 -1
  31. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +49 -67
  32. package/src/components/pages/ProviderProductEdition/index.js +9 -16
  33. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +46 -36
  34. package/src/components/pages/RetailerProductEdition/index.js +10 -14
  35. package/src/global-files/data.js +23 -18
  36. package/src/global-files/fonts.css +0 -6
  37. package/src/global-files/variables.js +0 -2
  38. package/src/index.js +0 -17
  39. package/dist/assets/images/customSelect/starIcon.svg +0 -14
  40. package/dist/assets/images/defaultImages/Spinner.gif +0 -0
  41. package/dist/assets/images/defaultImages/notFound.svg +0 -124
  42. package/dist/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -72
  43. package/dist/components/atoms/ButtonFileChooser/index.js +0 -110
  44. package/dist/components/atoms/ButtonFileChooser/styles.js +0 -20
  45. package/dist/components/atoms/ButtonV2/ButtonV2.stories.js +0 -66
  46. package/dist/components/atoms/ButtonV2/index.js +0 -110
  47. package/dist/components/atoms/ButtonV2/styles.js +0 -53
  48. package/dist/components/atoms/CustomIcon/CustomIcon.stories.js +0 -50
  49. package/dist/components/atoms/CustomIcon/index.js +0 -40
  50. package/dist/components/atoms/CustomIcon/styles.js +0 -33
  51. package/dist/components/atoms/IconFile/IconFile.stories.js +0 -48
  52. package/dist/components/atoms/IconFile/index.js +0 -249
  53. package/dist/components/atoms/IconFile/styles.js +0 -23
  54. package/dist/components/atoms/Image/Image.stories.js +0 -73
  55. package/dist/components/atoms/Image/index.js +0 -76
  56. package/dist/components/atoms/Image/styles.js +0 -43
  57. package/dist/components/atoms/ImageLink/ImageLink.stories.js +0 -63
  58. package/dist/components/atoms/ImageLink/index.js +0 -77
  59. package/dist/components/atoms/ImageLink/styles.js +0 -40
  60. package/dist/components/atoms/ImagePreview/ImagePreview.stories.js +0 -70
  61. package/dist/components/atoms/ImagePreview/index.js +0 -208
  62. package/dist/components/atoms/ImagePreview/styles.js +0 -44
  63. package/dist/components/atoms/InputText/InputText.stories.js +0 -60
  64. package/dist/components/atoms/InputText/index.js +0 -66
  65. package/dist/components/atoms/InputText/styles.js +0 -32
  66. package/dist/components/atoms/NotFound/NotFound.stories.js +0 -36
  67. package/dist/components/atoms/NotFound/index.js +0 -75
  68. package/dist/components/atoms/NotFound/styles.js +0 -20
  69. package/dist/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -45
  70. package/dist/components/atoms/SelectItemV2/index.js +0 -57
  71. package/dist/components/atoms/SelectItemV2/styles.js +0 -30
  72. package/dist/components/atoms/Tooltip/Tooltip.stories.js +0 -66
  73. package/dist/components/atoms/Tooltip/index.js +0 -72
  74. package/dist/components/atoms/Tooltip/styles.js +0 -20
  75. package/dist/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -66
  76. package/dist/components/molecules/ButtonDownloadFile/index.js +0 -179
  77. package/dist/components/molecules/ButtonDownloadFile/styles.js +0 -23
  78. package/dist/components/molecules/Dropdown/Dropdown.stories.js +0 -98
  79. package/dist/components/molecules/Dropdown/index.js +0 -150
  80. package/dist/components/molecules/Dropdown/styles.js +0 -26
  81. package/dist/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -82
  82. package/dist/components/molecules/ImageTooltip/index.js +0 -85
  83. package/dist/components/molecules/ImageTooltip/styles.js +0 -33
  84. package/dist/components/molecules/SelectV2/SelectV2.stories.js +0 -120
  85. package/dist/components/molecules/SelectV2/index.js +0 -306
  86. package/dist/components/molecules/SelectV2/styles.js +0 -42
  87. package/dist/components/molecules/SelectV2/test.js +0 -95
  88. package/dist/components/molecules/SelectV2/test.stories.js +0 -27
  89. package/dist/components/organisms/Chat/Chat.stories.js +0 -160
  90. package/dist/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -83
  91. package/dist/components/organisms/Chat/ChatLists/index.js +0 -160
  92. package/dist/components/organisms/Chat/ChatLists/styles.js +0 -29
  93. package/dist/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -176
  94. package/dist/components/organisms/Chat/ContainerItems/index.js +0 -537
  95. package/dist/components/organisms/Chat/ContainerItems/styles.js +0 -20
  96. package/dist/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -142
  97. package/dist/components/organisms/Chat/ContentChat/index.js +0 -1429
  98. package/dist/components/organisms/Chat/ContentChat/styles.js +0 -20
  99. package/dist/components/organisms/Chat/Footer/Footer.stories.js +0 -43
  100. package/dist/components/organisms/Chat/Footer/index.js +0 -976
  101. package/dist/components/organisms/Chat/Footer/styles.js +0 -32
  102. package/dist/components/organisms/Chat/Header/Header.stories.js +0 -96
  103. package/dist/components/organisms/Chat/Header/index.js +0 -84
  104. package/dist/components/organisms/Chat/Header/styles.js +0 -20
  105. package/dist/components/organisms/Chat/index.js +0 -253
  106. package/dist/components/organisms/Chat/styles.js +0 -29
  107. package/dist/components/organisms/Modal/Modal.stories.js +0 -66
  108. package/dist/components/organisms/Modal/index.js +0 -95
  109. package/dist/components/organisms/Modal/styles.js +0 -20
  110. package/dist/components/organisms/RangeCalendar/RangeCalendar.stories.js +0 -33
  111. package/dist/components/organisms/RangeCalendar/index.js +0 -149
  112. package/dist/components/organisms/RangeCalendar/styles.js +0 -27
  113. package/dist/global-files/handle_http.js +0 -381
  114. package/dist/global-files/handle_userTech.js +0 -20
  115. package/dist/global-files/utils.js +0 -514
  116. package/src/assets/images/customSelect/starIcon.svg +0 -14
  117. package/src/assets/images/defaultImages/Spinner.gif +0 -0
  118. package/src/assets/images/defaultImages/notFound.svg +0 -124
  119. package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -47
  120. package/src/components/atoms/ButtonFileChooser/index.js +0 -68
  121. package/src/components/atoms/ButtonFileChooser/styles.js +0 -4
  122. package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -53
  123. package/src/components/atoms/ButtonV2/index.js +0 -85
  124. package/src/components/atoms/ButtonV2/styles.js +0 -217
  125. package/src/components/atoms/CustomIcon/CustomIcon.stories.js +0 -36
  126. package/src/components/atoms/CustomIcon/index.js +0 -41
  127. package/src/components/atoms/CustomIcon/styles.js +0 -85
  128. package/src/components/atoms/IconFile/IconFile.stories.js +0 -35
  129. package/src/components/atoms/IconFile/index.js +0 -119
  130. package/src/components/atoms/IconFile/styles.js +0 -67
  131. package/src/components/atoms/Image/Image.stories.js +0 -51
  132. package/src/components/atoms/Image/index.js +0 -55
  133. package/src/components/atoms/Image/styles.js +0 -34
  134. package/src/components/atoms/ImageLink/ImageLink.stories.js +0 -43
  135. package/src/components/atoms/ImageLink/index.js +0 -57
  136. package/src/components/atoms/ImageLink/styles.js +0 -30
  137. package/src/components/atoms/ImagePreview/ImagePreview.stories.js +0 -52
  138. package/src/components/atoms/ImagePreview/index.js +0 -178
  139. package/src/components/atoms/ImagePreview/styles.js +0 -77
  140. package/src/components/atoms/InputText/InputText.stories.js +0 -39
  141. package/src/components/atoms/InputText/index.js +0 -61
  142. package/src/components/atoms/InputText/styles.js +0 -89
  143. package/src/components/atoms/NotFound/NotFound.stories.js +0 -19
  144. package/src/components/atoms/NotFound/index.js +0 -52
  145. package/src/components/atoms/NotFound/styles.js +0 -55
  146. package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -26
  147. package/src/components/atoms/SelectItemV2/index.js +0 -61
  148. package/src/components/atoms/SelectItemV2/styles.js +0 -90
  149. package/src/components/atoms/Tooltip/Tooltip.stories.js +0 -51
  150. package/src/components/atoms/Tooltip/index.js +0 -59
  151. package/src/components/atoms/Tooltip/styles.js +0 -42
  152. package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -54
  153. package/src/components/molecules/ButtonDownloadFile/index.js +0 -109
  154. package/src/components/molecules/ButtonDownloadFile/styles.js +0 -66
  155. package/src/components/molecules/Dropdown/Dropdown.stories.js +0 -103
  156. package/src/components/molecules/Dropdown/index.js +0 -150
  157. package/src/components/molecules/Dropdown/styles.js +0 -75
  158. package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -68
  159. package/src/components/molecules/ImageTooltip/index.js +0 -63
  160. package/src/components/molecules/ImageTooltip/styles.js +0 -18
  161. package/src/components/molecules/SelectV2/SelectV2.stories.js +0 -115
  162. package/src/components/molecules/SelectV2/index.js +0 -357
  163. package/src/components/molecules/SelectV2/styles.js +0 -105
  164. package/src/components/molecules/SelectV2/test.js +0 -61
  165. package/src/components/molecules/SelectV2/test.stories.js +0 -10
  166. package/src/components/organisms/Chat/Chat.stories.js +0 -147
  167. package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -65
  168. package/src/components/organisms/Chat/ChatLists/Rotoplas.jpeg +0 -0
  169. package/src/components/organisms/Chat/ChatLists/THD.png +0 -0
  170. package/src/components/organisms/Chat/ChatLists/index.js +0 -141
  171. package/src/components/organisms/Chat/ChatLists/styles.js +0 -162
  172. package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -142
  173. package/src/components/organisms/Chat/ContainerItems/index.js +0 -512
  174. package/src/components/organisms/Chat/ContainerItems/styles.js +0 -328
  175. package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -102
  176. package/src/components/organisms/Chat/ContentChat/Rotoplas.jpeg +0 -0
  177. package/src/components/organisms/Chat/ContentChat/THD.png +0 -0
  178. package/src/components/organisms/Chat/ContentChat/index.js +0 -897
  179. package/src/components/organisms/Chat/ContentChat/styles.js +0 -41
  180. package/src/components/organisms/Chat/Footer/Footer.stories.js +0 -22
  181. package/src/components/organisms/Chat/Footer/index.js +0 -661
  182. package/src/components/organisms/Chat/Footer/styles.js +0 -286
  183. package/src/components/organisms/Chat/Header/Header.stories.js +0 -66
  184. package/src/components/organisms/Chat/Header/index.js +0 -94
  185. package/src/components/organisms/Chat/Header/styles.js +0 -49
  186. package/src/components/organisms/Chat/index.js +0 -235
  187. package/src/components/organisms/Chat/styles.js +0 -42
  188. package/src/components/organisms/Modal/Modal.stories.js +0 -55
  189. package/src/components/organisms/Modal/index.js +0 -97
  190. package/src/components/organisms/Modal/styles.js +0 -103
  191. package/src/components/organisms/RangeCalendar/RangeCalendar.stories.js +0 -16
  192. package/src/components/organisms/RangeCalendar/index.js +0 -121
  193. package/src/components/organisms/RangeCalendar/styles.js +0 -883
  194. package/src/global-files/handle_http.js +0 -225
  195. package/src/global-files/handle_userTech.js +0 -7
  196. package/src/global-files/utils.js +0 -330
@@ -1,65 +0,0 @@
1
- import { ChatLists } from "./index";
2
- import THD from "./THD.png";
3
- import Rotoplas from "./Rotoplas.jpeg";
4
-
5
- export default {
6
- title: "Components/organisms/Chat/ChatLists",
7
- component: ChatLists,
8
- };
9
-
10
- const Template = (args) => <ChatLists {...args} />;
11
-
12
- // companies de prueba
13
- const companies = {
14
- 200: {
15
- name: "The Home Depot",
16
- src: THD,
17
- lastChatDate: "2022-11-4 21:01:00",
18
- statusChat: "disabled",
19
- },
20
- 300: {
21
- name: "Rotoplas",
22
- src: Rotoplas,
23
- lastChatDate: "2022-11-03 21:01:00",
24
- statusChat: "enabled",
25
- },
26
- 100: {
27
- name: "Content-oh!",
28
- src: "",
29
- lastChatDate: "2022-11-02 21:01:00",
30
- statusChat: "current",
31
- },
32
- };
33
- // companies de prueba sin chats cerrados
34
- const companies2 = {
35
- 300: {
36
- name: "Rotoplas",
37
- src: Rotoplas,
38
- lastChatDate: "2022-10-27 21:01:00",
39
- statusChat: "enabled",
40
- },
41
- 100: {
42
- name: "Content-oh!",
43
- src: "",
44
- lastChatDate: "2022-9-27 21:01:00",
45
- statusChat: "current",
46
- },
47
- };
48
-
49
- export const exampleChatLists = Template.bind({});
50
- exampleChatLists.args = {
51
- companies,
52
- currentCompanyId: 100,
53
- onClickCompany: (companyId) => {
54
- console.log("click en company:", companyId);
55
- },
56
- };
57
-
58
- export const onlyOpenChatLists = Template.bind({});
59
- onlyOpenChatLists.args = {
60
- companies: companies2,
61
- currentCompanyId: 100,
62
- onClickCompany: (companyId) => {
63
- console.log("click en company:", companyId);
64
- },
65
- };
@@ -1,141 +0,0 @@
1
- import { Container, ContainerItemChat, ContainerTooltip } from "./styles";
2
- import { useEffect, useState } from "react";
3
- import { getCustomDate } from "../../../../global-files/utils";
4
- import { faImage as IconImage } from "@fortawesome/free-solid-svg-icons";
5
- import { CustomIcon } from "../../../atoms/CustomIcon";
6
- import { Image } from "../../../atoms/Image";
7
- import { Tooltip } from "../../../atoms/Tooltip";
8
-
9
- export const ChatLists = (props) => {
10
- const {
11
- companies /* {
12
- id: { name , src , statusChat , items } ,
13
- ...
14
- } */,
15
- currentCompanyId, // number
16
- onClickCompany, // (id) => {}
17
- } = props;
18
- const [openChats, setOpenChats] = useState([]);
19
- const [closedChats, setClosedChats] = useState([]);
20
-
21
- useEffect(() => {
22
- renderChats();
23
- }, [companies]);
24
-
25
- const renderChats = () => {
26
- let jsxOpenChats = [];
27
- let jsxClosedChats = [];
28
-
29
- for (const companyId of Object.keys(companies)) {
30
- const company = companies[companyId];
31
- // crear el item chat
32
- const itemChat = (
33
- <ContainerItemChat
34
- key={"itemChat-" + companyId}
35
- onClick={(event) => {
36
- onClickCompany && onClickCompany(companyId);
37
- }}
38
- >
39
- {/* logo de la compañia */}
40
- <Image
41
- className="img-logoCompany"
42
- width={"34px"}
43
- sizeLoading={24}
44
- colorLoading={undefined}
45
- src={company.src}
46
- componentDefault={
47
- <CustomIcon
48
- className="icon-logoCompany"
49
- type={"white"}
50
- borderType={"circle"}
51
- size={15}
52
- icon={IconImage}
53
- />
54
- }
55
- />
56
-
57
- {/* name y date */}
58
- <div className="container-info">
59
- <label className="label-name"> {company.name} </label>
60
- <label className="label-lastDate">
61
- {getCustomDate(
62
- new Date(
63
- company.items.length ? company.items[0].date : undefined
64
- )
65
- )}
66
- </label>
67
- </div>
68
-
69
- {/* label interno */}
70
- <div className="container-indicators">
71
- {currentCompanyId == companyId && (
72
- <div className="label-ownCompany">Interno</div>
73
- )}
74
- </div>
75
- </ContainerItemChat>
76
- );
77
-
78
- // checar si es chat abierto
79
- if (company.statusChat == "closed") jsxClosedChats.push(itemChat);
80
- else jsxOpenChats.push(itemChat);
81
- }
82
- setOpenChats(jsxOpenChats);
83
- setClosedChats(jsxClosedChats);
84
- };
85
-
86
- return (
87
- <>
88
- <Container>
89
- {openChats.length !== 0 && (
90
- <section>
91
- <div className="container-headerChats">
92
- <Tooltip
93
- className={"tooltip-title"}
94
- position={"topCenter"}
95
- addArrow={false}
96
- transitionType={"zoom"}
97
- followCursor={false}
98
- componentTooltip={
99
- <ContainerTooltip>
100
- <label className="label-title"> Chats abiertos </label>
101
- <label className="label-message">{`De acuerdo al estatus
102
- actual del producto, puedes establecer una conversación
103
- con estas compañias`}</label>
104
- </ContainerTooltip>
105
- }
106
- >
107
- <label> Chats abiertos </label>
108
- </Tooltip>
109
- </div>
110
- <div className="container-bodyChats">{openChats}</div>
111
- </section>
112
- )}
113
-
114
- {closedChats.length !== 0 && (
115
- <section>
116
- <div className="container-headerChats">
117
- <Tooltip
118
- className={"tooltip-title"}
119
- position={"topCenter"}
120
- addArrow={false}
121
- transitionType={"zoom"}
122
- followCursor={false}
123
- componentTooltip={
124
- <ContainerTooltip>
125
- <label className="label-title"> Chats cerrados </label>
126
- <label className="label-message">{`Las conversaciones
127
- con estas compañias han finalizado debido al cambio de
128
- estatus, sigue el flujo de trabajo con tus chats abiertos`}</label>
129
- </ContainerTooltip>
130
- }
131
- >
132
- <label> Chats cerrados </label>
133
- </Tooltip>
134
- </div>
135
- <div className="container-bodyChats">{closedChats}</div>
136
- </section>
137
- )}
138
- </Container>
139
- </>
140
- );
141
- };
@@ -1,162 +0,0 @@
1
- import styled from "styled-components";
2
- import { GlobalColors, FontFamily } from "../../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- width: 100%;
6
- max-height: 100%;
7
- flex-grow: 2;
8
- display: flex;
9
- flex-direction: column;
10
- justify-content: flex-start;
11
- gap: 30px;
12
- background: white;
13
- padding: 20px;
14
- overflow: auto;
15
- //border: 1px solid red;
16
-
17
- section {
18
- width: 100%;
19
- display: flex;
20
- flex-direction: column;
21
- gap: 15px;
22
-
23
- // container del nombre de la seccion con su icono info
24
- .container-headerChats {
25
- width: 100%;
26
- display: flex;
27
- flex-direction: row;
28
- flex-wrap: nowrap;
29
- align-items: center;
30
- gap: 5px;
31
-
32
- .tooltip-title {
33
- max-width: 100%;
34
-
35
- label {
36
- font-family: ${FontFamily.RobotoMedium}, sans-serif;
37
- font-size: 15px;
38
- text-align: left;
39
- color: #262626;
40
- }
41
- }
42
- }
43
-
44
- // container de la lista de los items chats de la seccion
45
- .container-bodyChats {
46
- width: 100%;
47
- display: flex;
48
- flex-direction: column;
49
- gap: 10px;
50
- }
51
- }
52
- `;
53
-
54
- export const ContainerItemChat = styled.div`
55
- width: 100%;
56
- min-width: min-content;
57
- display: flex;
58
- flex-direction: row;
59
- align-items: center;
60
- justify-content: flex-start;
61
- gap: 20px;
62
- background: #f7f7fc;
63
- padding: 15px;
64
- border-radius: 10px;
65
- cursor: pointer;
66
- transition: background 0.25s;
67
-
68
- * {
69
- cursor: inherit;
70
- }
71
-
72
- // imagen del logo de la compañia
73
- .img-logoCompany {
74
- border-radius: 50%;
75
- overflow: hidden;
76
- height: 34px;
77
- width: 34px;
78
-
79
- .icon-logoCompany {
80
- width: 100%;
81
- height: 100%;
82
- }
83
- }
84
-
85
- // container de las etiquetas "name" y "lastDate"
86
- .container-info {
87
- flex-grow: 2;
88
- display: flex;
89
- flex-direction: column;
90
- align-items: flex-start;
91
- gap: 4px;
92
-
93
- .label-name {
94
- font-family: ${FontFamily.RobotoMedium}, sans-serif;
95
- font-size: 15px;
96
- text-align: left;
97
- color: #262626;
98
- }
99
- .label-lastDate {
100
- font-family: ${FontFamily.RobotoRegular}, sans-serif;
101
- font-size: 11px;
102
- text-align: left;
103
- color: #b3b3b3;
104
- }
105
- }
106
-
107
- .container-indicators {
108
- display: flex;
109
- flex-direction: row;
110
- align-items: center;
111
- gap: 7px;
112
-
113
- // label "Interno"
114
- .label-ownCompany {
115
- padding: 5px 10px;
116
- border-radius: 3px;
117
- font-family: ${FontFamily.RobotoRegular}, sans-serif;
118
- font-size: 10px;
119
- background-color: rgba(0, 0, 0, 0.05);
120
- color: #707070;
121
- }
122
- }
123
-
124
- // cuando el item chat tenga el cursor
125
- &:hover {
126
- background-color: #d7d7dd;
127
-
128
- .container-info {
129
- .label-lastDate {
130
- color: #959292;
131
- }
132
- }
133
-
134
- /*
135
- .label-ownCompany {
136
- background-color: ;
137
- }*/
138
- }
139
- `;
140
-
141
- // container con 2 labels "label-title" y "label-message"
142
- export const ContainerTooltip = styled.div`
143
- min-width: min-content;
144
- display: flex;
145
- flex-direction: column;
146
- align-items: flex-start;
147
- gap: 5px;
148
- background: transparent;
149
-
150
- .label-title {
151
- font-family: ${FontFamily.RobotoMedium}, sans-serif;
152
- font-size: 12px;
153
- text-align: left;
154
- color: #262626;
155
- }
156
- .label-message {
157
- font-family: ${FontFamily.RobotoRegular}, sans-serif;
158
- font-size: 11px;
159
- text-align: left;
160
- color: #262626;
161
- }
162
- `;
@@ -1,142 +0,0 @@
1
- import { ContainerItems } from "./index";
2
-
3
- export default {
4
- title: "Components/organisms/Chat/ContainerItems",
5
- component: ContainerItems,
6
- };
7
-
8
- const Template = (args) => <ContainerItems {...args} />;
9
-
10
- // items de prueba
11
- const items = {
12
- 1: {
13
- date: "2022-10-13 10:10:00",
14
- type: "message",
15
- value: "mensaje 1 user10",
16
- userId: 10,
17
- },
18
- 2: {
19
- date: "2022-10-12 13:19:00",
20
- type: "message",
21
- value: "mensaje 1 user20",
22
- userId: 20,
23
- },
24
- 3: {
25
- date: "2022-10-12 12:33:00",
26
- type: "comment",
27
- value: "comentario 1 user20",
28
- userId: 20,
29
- },
30
- 4: {
31
- date: "2022-10-12 11:56:00",
32
- type: "comment",
33
- value: "comentario 1 user30",
34
- userId: 30,
35
- },
36
- 5: {
37
- date: "2022-10-12 8:41:00",
38
- type: "statusService",
39
- value: "La sección imágenes ha sido validada",
40
- userId: 20,
41
- },
42
- 6: {
43
- date: "2022-10-11 14:58:00",
44
- type: "img",
45
- value: "84300/1/chat/playa-213f791b-d890-48e1-be19-28bf5a95d517.jpeg",
46
- userId: 10,
47
- },
48
- 7: {
49
- date: "2022-10-10 16:12:00",
50
- type: "img",
51
- value: `84300/1/chat/21dba1da-3c60-42c4-97bd-033664808256-fb19ff57-b91c-4ef2-ba2a-d857b55fb33b.svg`,
52
- userId: 30,
53
- },
54
- 8: {
55
- date: "2022-10-10 15:55:00",
56
- type: "statusArticle",
57
- value: "El estatus cambio a Aprobado Coordinador",
58
- userId: 20,
59
- },
60
- 9: {
61
- date: "2022-10-10 9:15:00",
62
- type: "comment",
63
- value: "comentario 1 user10",
64
- userId: 10,
65
- },
66
- 10: {
67
- date: "2022-10-9 6:24:00",
68
- type: "file",
69
- value:
70
- "84300/1/chat/acuse RFC-8b2eb177-5bfc-4266-9b26-4e7297880594-9e2e5853-4697-442a-8ff7-3b7a1ede0856.pdf",
71
- userId: 10,
72
- },
73
- 11: {
74
- date: "2022-10-9 4:29:00",
75
- type: "file",
76
- value: "84300/1/chat/noExiste.docx",
77
- userId: 30,
78
- },
79
- 12: {
80
- date: "2022-10-9 2:39:00",
81
- type: "file",
82
- value: "84300/1/chat/noExiste2.xlsx",
83
- userId: 20,
84
- },
85
- 13: {
86
- date: "2022-10-8 23:46:00",
87
- type: "file",
88
- value: "84300/1/chat/noExiste3.csv",
89
- userId: 20,
90
- },
91
- 14: {
92
- date: "2022-10-8 23:22:00",
93
- type: "file",
94
- value: "84300/1/chat/noExiste4.pptx",
95
- userId: 30,
96
- },
97
- 15: {
98
- date: "2022-10-8 21:01:00",
99
- type: "file",
100
- value: "84300/1/chat/noExiste5.zip",
101
- userId: 10,
102
- },
103
- 16: {
104
- date: "2022-10-8 20:11:00",
105
- type: "file",
106
- value: "84300/1/chat/noExiste6.txt",
107
- userId: 10,
108
- },
109
- };
110
-
111
- // users de prueba
112
- const users = {
113
- 10: { name: "Pedro Castillo", companyId: 100 },
114
- 20: { name: "Ana Carranza", companyId: 200 },
115
- 30: { name: "Javier Aguayo", companyId: 100 },
116
- };
117
-
118
- // companies de prueba multiple
119
- const companies = {
120
- 100: { name: "Fábrica", statusChat: "enabled" },
121
- 200: { name: "Proveedor", statusChat: "current" },
122
- };
123
-
124
- export const exampleChat = Template.bind({});
125
- exampleChat.args = {
126
- chatData: {
127
- items,
128
- users,
129
- companies,
130
- },
131
- currentUser: { id: 10, companyId: 100 },
132
- };
133
-
134
- export const emptyChat = Template.bind({});
135
- emptyChat.args = {
136
- chatData: {
137
- items: [],
138
- users: [],
139
- companies: [],
140
- },
141
- currentUser: { id: 10, companyId: 100 },
142
- };