contentoh-components-library 21.3.14 → 21.3.16

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 (154) hide show
  1. package/.env.development +0 -5
  2. package/dist/assets/fonts/{Roboto → roboto}/LICENSE.txt +0 -0
  3. package/dist/assets/fonts/{Roboto → roboto}/Roboto-Black.ttf +0 -0
  4. package/dist/assets/fonts/{Roboto → roboto}/Roboto-BlackItalic.ttf +0 -0
  5. package/dist/assets/fonts/{Roboto → roboto}/Roboto-Bold.ttf +0 -0
  6. package/dist/assets/fonts/{Roboto → roboto}/Roboto-BoldItalic.ttf +0 -0
  7. package/dist/assets/fonts/{Roboto → roboto}/Roboto-Italic.ttf +0 -0
  8. package/dist/assets/fonts/{Roboto → roboto}/Roboto-Light.ttf +0 -0
  9. package/dist/assets/fonts/{Roboto → roboto}/Roboto-LightItalic.ttf +0 -0
  10. package/dist/assets/fonts/{Roboto → roboto}/Roboto-Medium.ttf +0 -0
  11. package/dist/assets/fonts/{Roboto → roboto}/Roboto-MediumItalic.ttf +0 -0
  12. package/dist/assets/fonts/{Roboto → roboto}/Roboto-Regular.ttf +0 -0
  13. package/dist/assets/fonts/{Roboto → roboto}/Roboto-Thin.ttf +0 -0
  14. package/dist/assets/fonts/{Roboto → roboto}/Roboto-ThinItalic.ttf +0 -0
  15. package/dist/assets/images/generalButton/closeIcon.svg +2 -2
  16. package/dist/components/atoms/ProgressBar/index.js +6 -36
  17. package/dist/components/atoms/ProgressBar/styles.js +3 -11
  18. package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +22 -21
  19. package/dist/components/molecules/CustomSelect/SelectItem.js +1 -10
  20. package/dist/components/molecules/HeaderTop/index.js +6 -23
  21. package/dist/components/molecules/HeaderTop/styles.js +1 -1
  22. package/dist/components/molecules/ProductNameHeader/index.js +4 -6
  23. package/dist/components/organisms/FullProductNameHeader/index.js +0 -1
  24. package/dist/components/organisms/RangeCalendar/index.js +3 -4
  25. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +50 -65
  26. package/dist/components/pages/ProviderProductEdition/index.js +11 -15
  27. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +86 -60
  28. package/dist/components/pages/RetailerProductEdition/index.js +72 -65
  29. package/dist/global-files/fonts.css +0 -6
  30. package/dist/global-files/utils.js +2 -22
  31. package/dist/global-files/variables.js +0 -2
  32. package/dist/index.js +46 -267
  33. package/package.json +1 -12
  34. package/src/assets/images/generalButton/closeIcon.svg +2 -2
  35. package/src/components/atoms/ProgressBar/index.js +5 -40
  36. package/src/components/atoms/ProgressBar/styles.js +0 -24
  37. package/src/components/molecules/CustomSelect/CustomSelect.stories.js +12 -20
  38. package/src/components/molecules/CustomSelect/SelectItem.js +0 -7
  39. package/src/components/molecules/HeaderTop/index.js +8 -29
  40. package/src/components/molecules/HeaderTop/styles.js +0 -4
  41. package/src/components/molecules/ProductNameHeader/index.js +2 -7
  42. package/src/components/organisms/FullProductNameHeader/index.js +0 -1
  43. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +49 -67
  44. package/src/components/pages/ProviderProductEdition/index.js +7 -16
  45. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +85 -62
  46. package/src/components/pages/RetailerProductEdition/index.js +18 -18
  47. package/src/global-files/fonts.css +0 -6
  48. package/src/global-files/variables.js +0 -2
  49. package/src/index.js +0 -17
  50. package/dist/assets/images/chatPopup/Spinner.gif +0 -0
  51. package/dist/assets/images/chatPopup/close.svg +0 -3
  52. package/dist/assets/images/chatPopup/defaultImage.png +0 -0
  53. package/dist/assets/images/chatPopup/defaultProfile.png +0 -0
  54. package/dist/assets/images/chatPopup/doc.svg +0 -1
  55. package/dist/assets/images/chatPopup/document.svg +0 -1
  56. package/dist/assets/images/chatPopup/iconChat.svg +0 -19
  57. package/dist/assets/images/chatPopup/iconPlus.svg +0 -3
  58. package/dist/assets/images/chatPopup/pdf.svg +0 -75
  59. package/dist/assets/images/chatPopup/remove.svg +0 -4
  60. package/dist/assets/images/chatPopup/send.svg +0 -3
  61. package/dist/assets/images/chatPopup/svgIcon.svg +0 -109
  62. package/dist/assets/images/chatPopup/upload_file.svg +0 -3
  63. package/dist/assets/images/chatPopup/xls.svg +0 -53
  64. package/dist/components/atoms/ChatPopUp/ChatPopUp.stories.js +0 -28
  65. package/dist/components/atoms/ChatPopUp/index.js +0 -841
  66. package/dist/components/atoms/ChatPopUp/styles.js +0 -27
  67. package/dist/components/atoms/ChatPopUp/utils/handlersChat.js +0 -182
  68. package/dist/components/atoms/StatusTag/StatusTag.stories.js +0 -48
  69. package/dist/components/atoms/StatusTag/index.js +0 -58
  70. package/dist/components/atoms/StatusTag/styles.js +0 -20
  71. package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +0 -37
  72. package/dist/components/pages/RegistrationLoginFirstStep/index.js +0 -269
  73. package/dist/components/pages/RegistrationLoginFirstStep/styles.js +0 -20
  74. package/src/assets/images/customSelect/starIcon.svg +0 -14
  75. package/src/assets/images/defaultImages/Spinner.gif +0 -0
  76. package/src/assets/images/defaultImages/notFound.svg +0 -124
  77. package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -47
  78. package/src/components/atoms/ButtonFileChooser/index.js +0 -68
  79. package/src/components/atoms/ButtonFileChooser/styles.js +0 -4
  80. package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -53
  81. package/src/components/atoms/ButtonV2/index.js +0 -85
  82. package/src/components/atoms/ButtonV2/styles.js +0 -217
  83. package/src/components/atoms/CustomIcon/CustomIcon.stories.js +0 -36
  84. package/src/components/atoms/CustomIcon/index.js +0 -41
  85. package/src/components/atoms/CustomIcon/styles.js +0 -85
  86. package/src/components/atoms/IconFile/IconFile.stories.js +0 -35
  87. package/src/components/atoms/IconFile/index.js +0 -119
  88. package/src/components/atoms/IconFile/styles.js +0 -67
  89. package/src/components/atoms/Image/Image.stories.js +0 -51
  90. package/src/components/atoms/Image/index.js +0 -55
  91. package/src/components/atoms/Image/styles.js +0 -34
  92. package/src/components/atoms/ImageLink/ImageLink.stories.js +0 -43
  93. package/src/components/atoms/ImageLink/index.js +0 -57
  94. package/src/components/atoms/ImageLink/styles.js +0 -30
  95. package/src/components/atoms/ImagePreview/ImagePreview.stories.js +0 -52
  96. package/src/components/atoms/ImagePreview/index.js +0 -178
  97. package/src/components/atoms/ImagePreview/styles.js +0 -77
  98. package/src/components/atoms/InputText/InputText.stories.js +0 -39
  99. package/src/components/atoms/InputText/index.js +0 -61
  100. package/src/components/atoms/InputText/styles.js +0 -89
  101. package/src/components/atoms/NotFound/NotFound.stories.js +0 -19
  102. package/src/components/atoms/NotFound/index.js +0 -52
  103. package/src/components/atoms/NotFound/styles.js +0 -55
  104. package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -26
  105. package/src/components/atoms/SelectItemV2/index.js +0 -61
  106. package/src/components/atoms/SelectItemV2/styles.js +0 -90
  107. package/src/components/atoms/Tooltip/Tooltip.stories.js +0 -51
  108. package/src/components/atoms/Tooltip/index.js +0 -59
  109. package/src/components/atoms/Tooltip/styles.js +0 -42
  110. package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -54
  111. package/src/components/molecules/ButtonDownloadFile/index.js +0 -109
  112. package/src/components/molecules/ButtonDownloadFile/styles.js +0 -66
  113. package/src/components/molecules/Dropdown/Dropdown.stories.js +0 -103
  114. package/src/components/molecules/Dropdown/index.js +0 -150
  115. package/src/components/molecules/Dropdown/styles.js +0 -75
  116. package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -68
  117. package/src/components/molecules/ImageTooltip/index.js +0 -63
  118. package/src/components/molecules/ImageTooltip/styles.js +0 -18
  119. package/src/components/molecules/SelectV2/SelectV2.stories.js +0 -115
  120. package/src/components/molecules/SelectV2/index.js +0 -357
  121. package/src/components/molecules/SelectV2/styles.js +0 -105
  122. package/src/components/molecules/SelectV2/test.js +0 -61
  123. package/src/components/molecules/SelectV2/test.stories.js +0 -10
  124. package/src/components/organisms/Chat/Chat.stories.js +0 -147
  125. package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -65
  126. package/src/components/organisms/Chat/ChatLists/Rotoplas.jpeg +0 -0
  127. package/src/components/organisms/Chat/ChatLists/THD.png +0 -0
  128. package/src/components/organisms/Chat/ChatLists/index.js +0 -141
  129. package/src/components/organisms/Chat/ChatLists/styles.js +0 -162
  130. package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -142
  131. package/src/components/organisms/Chat/ContainerItems/index.js +0 -512
  132. package/src/components/organisms/Chat/ContainerItems/styles.js +0 -328
  133. package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -102
  134. package/src/components/organisms/Chat/ContentChat/Rotoplas.jpeg +0 -0
  135. package/src/components/organisms/Chat/ContentChat/THD.png +0 -0
  136. package/src/components/organisms/Chat/ContentChat/index.js +0 -897
  137. package/src/components/organisms/Chat/ContentChat/styles.js +0 -41
  138. package/src/components/organisms/Chat/Footer/Footer.stories.js +0 -22
  139. package/src/components/organisms/Chat/Footer/index.js +0 -661
  140. package/src/components/organisms/Chat/Footer/styles.js +0 -286
  141. package/src/components/organisms/Chat/Header/Header.stories.js +0 -66
  142. package/src/components/organisms/Chat/Header/index.js +0 -94
  143. package/src/components/organisms/Chat/Header/styles.js +0 -49
  144. package/src/components/organisms/Chat/index.js +0 -235
  145. package/src/components/organisms/Chat/styles.js +0 -42
  146. package/src/components/organisms/Modal/Modal.stories.js +0 -55
  147. package/src/components/organisms/Modal/index.js +0 -97
  148. package/src/components/organisms/Modal/styles.js +0 -103
  149. package/src/components/organisms/RangeCalendar/RangeCalendar.stories.js +0 -16
  150. package/src/components/organisms/RangeCalendar/index.js +0 -121
  151. package/src/components/organisms/RangeCalendar/styles.js +0 -883
  152. package/src/global-files/handle_http.js +0 -225
  153. package/src/global-files/handle_userTech.js +0 -7
  154. 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
- };