contentoh-components-library 21.2.104 → 21.2.106
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/.env.development +5 -2
- package/.env.production +25 -25
- package/dist/assets/images/customSelect/starIcon.svg +14 -0
- package/dist/assets/images/defaultImages/Spinner.gif +0 -0
- package/dist/assets/images/defaultImages/notFound.svg +124 -0
- package/dist/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +72 -0
- package/dist/components/atoms/ButtonFileChooser/index.js +118 -0
- package/dist/components/atoms/ButtonFileChooser/styles.js +20 -0
- package/dist/components/atoms/ButtonV2/ButtonV2.stories.js +66 -0
- package/dist/components/atoms/ButtonV2/index.js +110 -0
- package/dist/components/atoms/ButtonV2/styles.js +53 -0
- package/dist/components/atoms/CustomIcon/CustomIcon.stories.js +50 -0
- package/dist/components/atoms/CustomIcon/index.js +40 -0
- package/dist/components/atoms/CustomIcon/styles.js +33 -0
- package/dist/components/atoms/GeneralButton/index.js +2 -6
- package/dist/components/atoms/IconFile/IconFile.stories.js +48 -0
- package/dist/components/atoms/IconFile/index.js +249 -0
- package/dist/components/atoms/IconFile/styles.js +23 -0
- package/dist/components/atoms/Image/Image.stories.js +73 -0
- package/dist/components/atoms/Image/index.js +76 -0
- package/dist/components/atoms/Image/styles.js +43 -0
- package/dist/components/atoms/ImageLink/ImageLink.stories.js +63 -0
- package/dist/components/atoms/ImageLink/index.js +77 -0
- package/dist/components/atoms/ImageLink/styles.js +40 -0
- package/dist/components/atoms/ImagePreview/ImagePreview.stories.js +70 -0
- package/dist/components/atoms/ImagePreview/index.js +222 -0
- package/dist/components/atoms/ImagePreview/styles.js +44 -0
- package/dist/components/atoms/InputText/InputText.stories.js +60 -0
- package/dist/components/atoms/InputText/index.js +66 -0
- package/dist/components/atoms/InputText/styles.js +32 -0
- package/dist/components/atoms/NotFound/NotFound.stories.js +36 -0
- package/dist/components/atoms/NotFound/index.js +75 -0
- package/dist/components/atoms/NotFound/styles.js +20 -0
- package/dist/components/atoms/Select/VersionSelect.js +1 -2
- package/dist/components/atoms/SelectItemV2/SelectItemV2.stories.js +45 -0
- package/dist/components/atoms/SelectItemV2/index.js +57 -0
- package/dist/components/atoms/SelectItemV2/styles.js +30 -0
- package/dist/components/atoms/Tooltip/Tooltip.stories.js +66 -0
- package/dist/components/atoms/Tooltip/index.js +72 -0
- package/dist/components/atoms/Tooltip/styles.js +20 -0
- package/dist/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +66 -0
- package/dist/components/molecules/ButtonDownloadFile/index.js +179 -0
- package/dist/components/molecules/ButtonDownloadFile/styles.js +23 -0
- package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +21 -22
- package/dist/components/molecules/CustomSelect/SelectItem.js +10 -1
- package/dist/components/molecules/Dropdown/Dropdown.stories.js +98 -0
- package/dist/components/molecules/Dropdown/index.js +150 -0
- package/dist/components/molecules/Dropdown/styles.js +26 -0
- package/dist/components/molecules/HeaderTop/index.js +10 -5
- package/dist/components/molecules/HeaderTop/styles.js +1 -1
- package/dist/components/molecules/ImageTooltip/ImageTooltip.stories.js +82 -0
- package/dist/components/molecules/ImageTooltip/index.js +85 -0
- package/dist/components/molecules/ImageTooltip/styles.js +33 -0
- package/dist/components/molecules/SelectV2/SelectV2.stories.js +119 -0
- package/dist/components/molecules/SelectV2/index.js +298 -0
- package/dist/components/molecules/SelectV2/styles.js +42 -0
- package/dist/components/organisms/Chat/Chat.stories.js +215 -0
- package/dist/components/organisms/Chat/ChatLists/ChatLists.stories.js +83 -0
- package/dist/components/organisms/Chat/ChatLists/index.js +160 -0
- package/dist/components/organisms/Chat/ChatLists/styles.js +29 -0
- package/dist/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +176 -0
- package/dist/components/organisms/Chat/ContainerItems/index.js +569 -0
- package/dist/components/organisms/Chat/ContainerItems/styles.js +20 -0
- package/dist/components/organisms/Chat/ContentChat/ContentChat.stories.js +142 -0
- package/dist/components/organisms/Chat/ContentChat/index.js +1422 -0
- package/dist/components/organisms/Chat/ContentChat/styles.js +20 -0
- package/dist/components/organisms/Chat/Footer/Footer.stories.js +43 -0
- package/dist/components/organisms/Chat/Footer/index.js +984 -0
- package/dist/components/organisms/Chat/Footer/styles.js +32 -0
- package/dist/components/organisms/Chat/Header/Header.stories.js +96 -0
- package/dist/components/organisms/Chat/Header/index.js +84 -0
- package/dist/components/organisms/Chat/Header/styles.js +20 -0
- package/dist/components/organisms/Chat/index.js +327 -0
- package/dist/components/organisms/Chat/styles.js +29 -0
- package/dist/components/organisms/CreateVersion/RenderChilds.js +11 -11
- package/dist/components/organisms/CreateVersion/index.js +89 -30
- package/dist/components/organisms/Modal/Modal.stories.js +66 -0
- package/dist/components/organisms/Modal/index.js +95 -0
- package/dist/components/organisms/Modal/styles.js +20 -0
- package/dist/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/dist/components/organisms/OrderDetail/index.js +11 -20
- package/dist/components/organisms/OrderDetail/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/utils.js +15 -45
- package/dist/components/organisms/VersionSelector/index.js +2 -28
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +147 -69
- package/dist/components/pages/ProviderProductEdition/index.js +22 -2
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +67 -77
- package/dist/components/pages/RetailerProductEdition/index.js +24 -5
- package/dist/global-files/fonts.css +12 -0
- package/dist/global-files/handle_http.js +383 -0
- package/dist/global-files/utils.js +472 -0
- package/dist/global-files/variables.js +2 -0
- package/dist/index.js +254 -46
- package/package.json +12 -1
- package/src/assets/images/customSelect/starIcon.svg +14 -0
- package/src/assets/images/defaultImages/Spinner.gif +0 -0
- package/src/assets/images/defaultImages/notFound.svg +124 -0
- package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +47 -0
- package/src/components/atoms/ButtonFileChooser/index.js +69 -0
- package/src/components/atoms/ButtonFileChooser/styles.js +4 -0
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +53 -0
- package/src/components/atoms/ButtonV2/index.js +85 -0
- package/src/components/atoms/ButtonV2/styles.js +217 -0
- package/src/components/atoms/CustomIcon/CustomIcon.stories.js +36 -0
- package/src/components/atoms/CustomIcon/index.js +41 -0
- package/src/components/atoms/CustomIcon/styles.js +85 -0
- package/src/components/atoms/GeneralButton/index.js +1 -4
- package/src/components/atoms/IconFile/IconFile.stories.js +35 -0
- package/src/components/atoms/IconFile/index.js +119 -0
- package/src/components/atoms/IconFile/styles.js +67 -0
- package/src/components/atoms/Image/Image.stories.js +51 -0
- package/src/components/atoms/Image/index.js +55 -0
- package/src/components/atoms/Image/styles.js +34 -0
- package/src/components/atoms/ImageLink/ImageLink.stories.js +43 -0
- package/src/components/atoms/ImageLink/index.js +57 -0
- package/src/components/atoms/ImageLink/styles.js +30 -0
- package/src/components/atoms/ImagePreview/ImagePreview.stories.js +52 -0
- package/src/components/atoms/ImagePreview/index.js +191 -0
- package/src/components/atoms/ImagePreview/styles.js +77 -0
- package/src/components/atoms/InputText/InputText.stories.js +39 -0
- package/src/components/atoms/InputText/index.js +61 -0
- package/src/components/atoms/InputText/styles.js +89 -0
- package/src/components/atoms/NotFound/NotFound.stories.js +19 -0
- package/src/components/atoms/NotFound/index.js +52 -0
- package/src/components/atoms/NotFound/styles.js +55 -0
- package/src/components/atoms/Select/VersionSelect.js +2 -4
- package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +26 -0
- package/src/components/atoms/SelectItemV2/index.js +61 -0
- package/src/components/atoms/SelectItemV2/styles.js +90 -0
- package/src/components/atoms/Tooltip/Tooltip.stories.js +51 -0
- package/src/components/atoms/Tooltip/index.js +59 -0
- package/src/components/atoms/Tooltip/styles.js +42 -0
- package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +54 -0
- package/src/components/molecules/ButtonDownloadFile/index.js +111 -0
- package/src/components/molecules/ButtonDownloadFile/styles.js +66 -0
- package/src/components/molecules/CustomSelect/CustomSelect.stories.js +20 -12
- package/src/components/molecules/CustomSelect/SelectItem.js +7 -0
- package/src/components/molecules/Dropdown/Dropdown.stories.js +103 -0
- package/src/components/molecules/Dropdown/index.js +150 -0
- package/src/components/molecules/Dropdown/styles.js +75 -0
- package/src/components/molecules/HeaderTop/index.js +11 -6
- package/src/components/molecules/HeaderTop/styles.js +4 -0
- package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +68 -0
- package/src/components/molecules/ImageTooltip/index.js +63 -0
- package/src/components/molecules/ImageTooltip/styles.js +18 -0
- package/src/components/molecules/SelectV2/SelectV2.stories.js +114 -0
- package/src/components/molecules/SelectV2/index.js +335 -0
- package/src/components/molecules/SelectV2/styles.js +105 -0
- package/src/components/organisms/Chat/Chat.stories.js +199 -0
- package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +65 -0
- package/src/components/organisms/Chat/ChatLists/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chat/ChatLists/THD.png +0 -0
- package/src/components/organisms/Chat/ChatLists/index.js +141 -0
- package/src/components/organisms/Chat/ChatLists/styles.js +162 -0
- package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +142 -0
- package/src/components/organisms/Chat/ContainerItems/index.js +549 -0
- package/src/components/organisms/Chat/ContainerItems/styles.js +328 -0
- package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +102 -0
- package/src/components/organisms/Chat/ContentChat/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chat/ContentChat/THD.png +0 -0
- package/src/components/organisms/Chat/ContentChat/index.js +900 -0
- package/src/components/organisms/Chat/ContentChat/styles.js +41 -0
- package/src/components/organisms/Chat/Footer/Footer.stories.js +22 -0
- package/src/components/organisms/Chat/Footer/index.js +669 -0
- package/src/components/organisms/Chat/Footer/styles.js +286 -0
- package/src/components/organisms/Chat/Header/Header.stories.js +66 -0
- package/src/components/organisms/Chat/Header/index.js +94 -0
- package/src/components/organisms/Chat/Header/styles.js +49 -0
- package/src/components/organisms/Chat/index.js +294 -0
- package/src/components/organisms/Chat/styles.js +42 -0
- package/src/components/organisms/CreateVersion/RenderChilds.js +34 -28
- package/src/components/organisms/CreateVersion/index.js +36 -16
- package/src/components/organisms/Modal/Modal.stories.js +55 -0
- package/src/components/organisms/Modal/index.js +97 -0
- package/src/components/organisms/Modal/styles.js +103 -0
- package/src/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/src/components/organisms/OrderDetail/index.js +12 -19
- package/src/components/organisms/OrderDetail/styles.js +0 -1
- package/src/components/organisms/OrderDetail/utils/Table/styles.js +0 -30
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +15 -30
- package/src/components/organisms/VersionSelector/index.js +3 -18
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +166 -75
- package/src/components/pages/ProviderProductEdition/index.js +21 -2
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +67 -79
- package/src/components/pages/RetailerProductEdition/index.js +14 -2
- package/src/global-files/customHooks.js +2 -2
- package/src/global-files/fonts.css +12 -0
- package/src/global-files/handle_http.js +231 -0
- package/src/global-files/utils.js +300 -0
- package/src/global-files/variables.js +2 -0
- package/src/index.js +16 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
import {
|
|
3
|
+
ClickAwayListener,
|
|
4
|
+
Fade,
|
|
5
|
+
Grow,
|
|
6
|
+
Popper,
|
|
7
|
+
Tooltip as TooltipMUI,
|
|
8
|
+
Zoom,
|
|
9
|
+
} from "@mui/material";
|
|
10
|
+
import { Container, ContainerSelect } from "./styles";
|
|
11
|
+
import React from "react";
|
|
12
|
+
import { ButtonV2 } from "../../atoms/ButtonV2";
|
|
13
|
+
import {
|
|
14
|
+
faCaretDown as IconDownArrow,
|
|
15
|
+
faSearch as IconSearch,
|
|
16
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
17
|
+
import { isArrayEmpty, isStringEmpty } from "../../../global-files/utils";
|
|
18
|
+
import { SelectItemV2 } from "../../atoms/SelectItemV2";
|
|
19
|
+
import { InputText } from "../../atoms/InputText";
|
|
20
|
+
|
|
21
|
+
export const SelectV2 = (props) => {
|
|
22
|
+
const {
|
|
23
|
+
items /* [
|
|
24
|
+
{
|
|
25
|
+
label: string,
|
|
26
|
+
value: string | number,
|
|
27
|
+
selected: (boolean) true -> item seleccionado al inicio
|
|
28
|
+
} ,
|
|
29
|
+
...
|
|
30
|
+
] */,
|
|
31
|
+
triggerType, // (string) "hover" | "click"
|
|
32
|
+
selectButton /* {
|
|
33
|
+
className: string,
|
|
34
|
+
type: (string) tipos validos de ButtonV2,
|
|
35
|
+
transparent: boolean,
|
|
36
|
+
disabled: boolean,
|
|
37
|
+
label: string ,
|
|
38
|
+
size: number ,
|
|
39
|
+
} */,
|
|
40
|
+
defaultItem /* {
|
|
41
|
+
label: string,
|
|
42
|
+
itemType: (string) "checkbox" | "marginCheckbox" | "labelOnly"
|
|
43
|
+
showLabelInSelect: boolean, cuando esta seleccionado ver label en el btnSelect??
|
|
44
|
+
} */,
|
|
45
|
+
inputSearch /* {
|
|
46
|
+
className: string,
|
|
47
|
+
defaultText: string ,
|
|
48
|
+
} */,
|
|
49
|
+
maxWidthSelect, // string
|
|
50
|
+
maxWidthDropdown, // string
|
|
51
|
+
maxHeightDropdown, // string
|
|
52
|
+
maxWidthItems, // string
|
|
53
|
+
alignmentItemsOverflow, // (string) "columns" | "rows" -> por default "rows"
|
|
54
|
+
typeSelectItems, // (string) "checkbox" | "marginCheckbox" | "labelOnly"
|
|
55
|
+
multiple, // (boolean) se permite multiple seleccion??
|
|
56
|
+
borderType, // (string) "rectangle" | "oval" -> por default oval
|
|
57
|
+
classNameSelect, // (string) clase del container select
|
|
58
|
+
classNameDropdown, // (string) clase del contenedor tooltip
|
|
59
|
+
positionDropdown, // (string) posicion del contenedor tooltip (values en object positions)
|
|
60
|
+
onChange, // (selectedItems: []) = {} array con los values de los items seleccionados
|
|
61
|
+
} = props;
|
|
62
|
+
const positions = {
|
|
63
|
+
topStart: "top-start",
|
|
64
|
+
topEnd: "top-end",
|
|
65
|
+
topCenter: "top",
|
|
66
|
+
|
|
67
|
+
rightStart: "right-start",
|
|
68
|
+
rightEnd: "right-end",
|
|
69
|
+
rightCenter: "right",
|
|
70
|
+
|
|
71
|
+
bottomStart: "bottom-start",
|
|
72
|
+
bottomEnd: "bottom-end",
|
|
73
|
+
bottomCenter: "bottom",
|
|
74
|
+
|
|
75
|
+
leftStart: "left-start",
|
|
76
|
+
leftEnd: "left-end",
|
|
77
|
+
leftCenter: "left",
|
|
78
|
+
};
|
|
79
|
+
const [selectedItems, setSelectedItems] = useState(); // { .. }
|
|
80
|
+
const [customItems, setCustomItems] = useState([]);
|
|
81
|
+
const [showDropdown, setShowDropdown] = useState(false);
|
|
82
|
+
const [labelSelect, setLabelSelect] = useState("Sin titulo");
|
|
83
|
+
const [textInputSearch, setTextInputSearch] = useState("");
|
|
84
|
+
|
|
85
|
+
const refInputTextSearch = useRef();
|
|
86
|
+
|
|
87
|
+
// cada que cambie la lista de items
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
if (isArrayEmpty(items)) {
|
|
90
|
+
setSelectedItems({});
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
// items iniciales seleccionados
|
|
94
|
+
let initialSelectedItems = {};
|
|
95
|
+
items.forEach((item) => {
|
|
96
|
+
if (item.selected) {
|
|
97
|
+
if (multiple) initialSelectedItems[item.value] = item.value;
|
|
98
|
+
else initialSelectedItems = { [item.value]: item.value };
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
setSelectedItems(initialSelectedItems);
|
|
102
|
+
}, [items]);
|
|
103
|
+
|
|
104
|
+
// cada que cambien los items seleccionados
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (!selectedItems) return;
|
|
107
|
+
renderItems();
|
|
108
|
+
renderLabelSelect();
|
|
109
|
+
onChange && onChange(Object.values(selectedItems));
|
|
110
|
+
}, [selectedItems]);
|
|
111
|
+
|
|
112
|
+
// evento click de cada item de la lista
|
|
113
|
+
const onClickItem = (isSelected, value) => {
|
|
114
|
+
let selectedItemsCopy = { ...selectedItems };
|
|
115
|
+
if (isSelected) {
|
|
116
|
+
multiple
|
|
117
|
+
? (selectedItemsCopy[value] = value)
|
|
118
|
+
: (selectedItemsCopy = { [value]: value });
|
|
119
|
+
} else delete selectedItemsCopy[value];
|
|
120
|
+
setSelectedItems(selectedItemsCopy);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const onClickSearch = () => {
|
|
124
|
+
setTextInputSearch(textInputSearch.trim());
|
|
125
|
+
refInputTextSearch?.current && refInputTextSearch.current.blur();
|
|
126
|
+
renderItems(textInputSearch.trim());
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const renderLabelSelect = () => {
|
|
130
|
+
if (!selectedItems) return;
|
|
131
|
+
const selectedItemsCopy = Object.values(selectedItems);
|
|
132
|
+
if (selectedItemsCopy.length > 1) {
|
|
133
|
+
setLabelSelect("Personalizado");
|
|
134
|
+
} else if (selectedItemsCopy.length === 1) {
|
|
135
|
+
let labelItem = undefined;
|
|
136
|
+
for (const item of items) {
|
|
137
|
+
if (item.value == selectedItemsCopy[0]) {
|
|
138
|
+
labelItem = item.label;
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
!isStringEmpty(labelItem)
|
|
143
|
+
? setLabelSelect(labelItem)
|
|
144
|
+
: setLabelSelect("Sin titulo");
|
|
145
|
+
} else {
|
|
146
|
+
if (
|
|
147
|
+
!isStringEmpty(defaultItem?.label) &&
|
|
148
|
+
defaultItem?.showLabelInSelect
|
|
149
|
+
) {
|
|
150
|
+
setLabelSelect(defaultItem.label);
|
|
151
|
+
} else if (!isStringEmpty(selectButton?.label)) {
|
|
152
|
+
setLabelSelect(selectButton.label);
|
|
153
|
+
} else {
|
|
154
|
+
setLabelSelect("Sin titulo");
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
const renderItems = (textSearch = "") => {
|
|
160
|
+
if (isArrayEmpty(items)) setCustomItems([]);
|
|
161
|
+
setCustomItems(
|
|
162
|
+
items.map((item, index) => {
|
|
163
|
+
if (
|
|
164
|
+
!isStringEmpty(textSearch) &&
|
|
165
|
+
!item.label
|
|
166
|
+
.trim()
|
|
167
|
+
.toLowerCase()
|
|
168
|
+
.includes(textSearch.trim().toLowerCase())
|
|
169
|
+
) {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
return (
|
|
173
|
+
<SelectItemV2
|
|
174
|
+
key={classNameSelect + "_item" + index}
|
|
175
|
+
label={item.label}
|
|
176
|
+
value={item.value}
|
|
177
|
+
checkbox={
|
|
178
|
+
typeSelectItems === "checkbox"
|
|
179
|
+
? true
|
|
180
|
+
: typeSelectItems === "marginCheckbox"
|
|
181
|
+
? false
|
|
182
|
+
: undefined
|
|
183
|
+
}
|
|
184
|
+
selected={selectedItems && selectedItems[item.value] ? true : false}
|
|
185
|
+
onClick={onClickItem}
|
|
186
|
+
/>
|
|
187
|
+
);
|
|
188
|
+
})
|
|
189
|
+
);
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
return (
|
|
193
|
+
<ClickAwayListener
|
|
194
|
+
onClickAway={(event) => {
|
|
195
|
+
if (triggerType !== "hover") setShowDropdown(false);
|
|
196
|
+
}}
|
|
197
|
+
>
|
|
198
|
+
<Container
|
|
199
|
+
className={!isStringEmpty(classNameSelect) ? classNameSelect : ""}
|
|
200
|
+
borderType={borderType}
|
|
201
|
+
maxWidthSelect={maxWidthSelect}
|
|
202
|
+
>
|
|
203
|
+
<TooltipMUI
|
|
204
|
+
placement={positions[positionDropdown] ?? positions.bottomCenter}
|
|
205
|
+
open={triggerType !== "hover" ? showDropdown : undefined}
|
|
206
|
+
arrow={false}
|
|
207
|
+
componentsProps={{
|
|
208
|
+
tooltip: {
|
|
209
|
+
className:
|
|
210
|
+
"dropdownSelect" +
|
|
211
|
+
(isStringEmpty(classNameDropdown)
|
|
212
|
+
? ""
|
|
213
|
+
: " " + classNameDropdown),
|
|
214
|
+
},
|
|
215
|
+
popper: { disablePortal: true },
|
|
216
|
+
transition: { timeout: 300 },
|
|
217
|
+
}}
|
|
218
|
+
TransitionComponent={Fade}
|
|
219
|
+
enterDelay={100}
|
|
220
|
+
followCursor={false}
|
|
221
|
+
disableFocusListener
|
|
222
|
+
disableTouchListener
|
|
223
|
+
disableHoverListener={
|
|
224
|
+
triggerType !== "hover" || selectButton?.disabled
|
|
225
|
+
}
|
|
226
|
+
title={
|
|
227
|
+
<>
|
|
228
|
+
{/* input search */}
|
|
229
|
+
{inputSearch && (
|
|
230
|
+
<div
|
|
231
|
+
className={
|
|
232
|
+
"container-inputSearch" +
|
|
233
|
+
(!isStringEmpty(inputSearch?.className)
|
|
234
|
+
? " " + inputSearch.className
|
|
235
|
+
: "")
|
|
236
|
+
}
|
|
237
|
+
>
|
|
238
|
+
<ButtonV2
|
|
239
|
+
className="buttonSearch"
|
|
240
|
+
type={"gray"}
|
|
241
|
+
transparent
|
|
242
|
+
size={14}
|
|
243
|
+
icon={IconSearch}
|
|
244
|
+
onClick={(event) => {
|
|
245
|
+
if (
|
|
246
|
+
isStringEmpty(textInputSearch) &&
|
|
247
|
+
refInputTextSearch?.current
|
|
248
|
+
) {
|
|
249
|
+
setTextInputSearch("");
|
|
250
|
+
refInputTextSearch.current.focus();
|
|
251
|
+
} else {
|
|
252
|
+
onClickSearch();
|
|
253
|
+
}
|
|
254
|
+
}}
|
|
255
|
+
/>
|
|
256
|
+
|
|
257
|
+
<InputText
|
|
258
|
+
className="inputSearch"
|
|
259
|
+
type="black"
|
|
260
|
+
transparent
|
|
261
|
+
size={12}
|
|
262
|
+
placeHolder={
|
|
263
|
+
isStringEmpty(inputSearch?.defaultText)
|
|
264
|
+
? "Texto a buscar"
|
|
265
|
+
: inputSearch.defaultText
|
|
266
|
+
}
|
|
267
|
+
text={textInputSearch}
|
|
268
|
+
onChangeText={(newValue) => setTextInputSearch(newValue)}
|
|
269
|
+
onEnter={(event) => onClickSearch()}
|
|
270
|
+
refInputText={refInputTextSearch}
|
|
271
|
+
/>
|
|
272
|
+
</div>
|
|
273
|
+
)}
|
|
274
|
+
|
|
275
|
+
{/* item por default */}
|
|
276
|
+
{defaultItem && (
|
|
277
|
+
<SelectItemV2
|
|
278
|
+
label={defaultItem.label}
|
|
279
|
+
value={null}
|
|
280
|
+
checkbox={
|
|
281
|
+
defaultItem.itemType === "checkbox"
|
|
282
|
+
? true
|
|
283
|
+
: defaultItem.itemType === "marginCheckbox"
|
|
284
|
+
? false
|
|
285
|
+
: undefined
|
|
286
|
+
}
|
|
287
|
+
selected={
|
|
288
|
+
selectedItems && Object.keys(selectedItems).length
|
|
289
|
+
? false
|
|
290
|
+
: true
|
|
291
|
+
}
|
|
292
|
+
onClick={(isSelected, value) => {
|
|
293
|
+
selectedItems &&
|
|
294
|
+
Object.keys(selectedItems).length &&
|
|
295
|
+
setSelectedItems({});
|
|
296
|
+
}}
|
|
297
|
+
/>
|
|
298
|
+
)}
|
|
299
|
+
|
|
300
|
+
{/* lista de items */}
|
|
301
|
+
<div className="container-items">{customItems}</div>
|
|
302
|
+
</>
|
|
303
|
+
}
|
|
304
|
+
>
|
|
305
|
+
<ContainerSelect
|
|
306
|
+
className={"container-buttonSelect"}
|
|
307
|
+
maxWidthDropdown={maxWidthDropdown}
|
|
308
|
+
maxHeightDropdown={maxHeightDropdown}
|
|
309
|
+
alignmentItemsOverflow={alignmentItemsOverflow}
|
|
310
|
+
maxWidthItems={maxWidthItems}
|
|
311
|
+
>
|
|
312
|
+
<ButtonV2
|
|
313
|
+
className={
|
|
314
|
+
"buttonSelect" +
|
|
315
|
+
(!isStringEmpty(selectButton?.className)
|
|
316
|
+
? " " + selectButton.className
|
|
317
|
+
: "")
|
|
318
|
+
}
|
|
319
|
+
disabled={selectButton?.disabled}
|
|
320
|
+
type={selectButton?.type}
|
|
321
|
+
transparent={selectButton?.transparent}
|
|
322
|
+
label={labelSelect}
|
|
323
|
+
size={selectButton?.size}
|
|
324
|
+
icon={IconDownArrow}
|
|
325
|
+
iconPosition="end"
|
|
326
|
+
onClick={(event) => {
|
|
327
|
+
if (triggerType !== "hover") setShowDropdown((prev) => !prev);
|
|
328
|
+
}}
|
|
329
|
+
/>
|
|
330
|
+
</ContainerSelect>
|
|
331
|
+
</TooltipMUI>
|
|
332
|
+
</Container>
|
|
333
|
+
</ClickAwayListener>
|
|
334
|
+
);
|
|
335
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { FontFamily } from "../../../global-files/variables";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
width: fit-content;
|
|
6
|
+
max-width: ${({ maxWidthSelect }) =>
|
|
7
|
+
maxWidthSelect ? maxWidthSelect : "unset"};
|
|
8
|
+
//border: 1px solid red;
|
|
9
|
+
border-radius: ${({ borderType }) => {
|
|
10
|
+
return borderType?.toLowerCase() === "rectangle"
|
|
11
|
+
? "6px"
|
|
12
|
+
: borderType?.toLowerCase() === "oval"
|
|
13
|
+
? "17px"
|
|
14
|
+
: "0px"; // default none
|
|
15
|
+
}};
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export const ContainerSelect = styled.div`
|
|
19
|
+
width: 100%;
|
|
20
|
+
border-radius: inherit;
|
|
21
|
+
|
|
22
|
+
.buttonSelect {
|
|
23
|
+
width: 100%;
|
|
24
|
+
border-radius: inherit;
|
|
25
|
+
|
|
26
|
+
.button {
|
|
27
|
+
padding: 10px 16px;
|
|
28
|
+
gap: 10px;
|
|
29
|
+
.icon {
|
|
30
|
+
font-size: 13px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
+ .MuiTooltip-popper {
|
|
36
|
+
background-color: transparent;
|
|
37
|
+
|
|
38
|
+
.dropdownSelect {
|
|
39
|
+
--background: white;
|
|
40
|
+
box-shadow: 0px 0px 10px 1px gray;
|
|
41
|
+
background-color: var(--background);
|
|
42
|
+
padding: 0px 0px;
|
|
43
|
+
border-radius: 7px;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: 0px;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
max-width: ${({ maxWidthDropdown }) =>
|
|
49
|
+
maxWidthDropdown ? maxWidthDropdown : "400px"};
|
|
50
|
+
max-height: ${({ maxHeightDropdown }) =>
|
|
51
|
+
maxHeightDropdown ? maxHeightDropdown : "80vh"};
|
|
52
|
+
|
|
53
|
+
.container-inputSearch {
|
|
54
|
+
width: 100%;
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: row;
|
|
57
|
+
flex-wrap: nowrap;
|
|
58
|
+
align-items: center;
|
|
59
|
+
gap: 0px;
|
|
60
|
+
padding: 0px 10px 8px 10px;
|
|
61
|
+
border-bottom: 1px solid #f0f0f0;
|
|
62
|
+
|
|
63
|
+
.inputSearch {
|
|
64
|
+
padding-left: 8px;
|
|
65
|
+
flex-grow: 2;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.selectItemV2 {
|
|
70
|
+
width: 100%;
|
|
71
|
+
|
|
72
|
+
.button {
|
|
73
|
+
justify-content: flex-start;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.container-items {
|
|
78
|
+
flex-grow: 2;
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
flex-wrap: ${({ alignmentItemsOverflow }) =>
|
|
82
|
+
alignmentItemsOverflow === "columns" ? "wrap" : "nowrap"};
|
|
83
|
+
overflow: auto;
|
|
84
|
+
|
|
85
|
+
.selectItemV2 {
|
|
86
|
+
width: ${({ maxWidthItems }) =>
|
|
87
|
+
maxWidthItems ? maxWidthItems : "100%"};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&[data-popper-placement*="bottom"] .dropdownSelect {
|
|
93
|
+
margin-top: 10px;
|
|
94
|
+
}
|
|
95
|
+
&[data-popper-placement*="top"] .dropdownSelect {
|
|
96
|
+
margin-bottom: 10px;
|
|
97
|
+
}
|
|
98
|
+
&[data-popper-placement*="left"] .dropdownSelect {
|
|
99
|
+
margin-right: 10px;
|
|
100
|
+
}
|
|
101
|
+
&[data-popper-placement*="right"] .dropdownSelect {
|
|
102
|
+
margin-left: 10px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { Chat } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/organisms/Chat",
|
|
5
|
+
component: Chat,
|
|
6
|
+
argTypes: {
|
|
7
|
+
chatContainerType: {
|
|
8
|
+
options: ["popUp", "fixed"],
|
|
9
|
+
control: { type: "select" },
|
|
10
|
+
},
|
|
11
|
+
chatType: {
|
|
12
|
+
options: ["order_product", "merchant_product", "ticket"],
|
|
13
|
+
control: { type: "select" },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const Template = (args) => <Chat {...args} />;
|
|
19
|
+
|
|
20
|
+
// ejemplo del chat orderProduct con user CADENA
|
|
21
|
+
export const chatCAD_orderProduct = Template.bind({});
|
|
22
|
+
chatCAD_orderProduct.args = {
|
|
23
|
+
chatType: "order_product",
|
|
24
|
+
chatContainerType: "popUp",
|
|
25
|
+
chatData: {
|
|
26
|
+
userToken:
|
|
27
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI2YmI0NzExMi03ZTNiLTRjYzUtYmVhZS02MzMxZjEwYjk3MzIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2NTYxNjI0MSwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjY1NjE5ODQxLCJpYXQiOjE2NjU2MTYyNDEsImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.gi1Jiua_O175vHLy-CYXOR945IRcObIj5j1LNk4_EhcKPz-MzPnfWDLH7L3sTiNS-VUhIRtAhtUVPUSYv0oP1qfJwFHomerxJvYgJge8SLWPjL6yGBnTxAvHVbuLU8kcaoZup2eNMV6XOIAEBAHeCDm4vW0rYWwfrKADPyYGZQF2si14o3wtgSMX5a4ccxGwikT3to3HttWBhmJs_I1Xr_BvBxePc4WghjQr5GVGbq8vhr4HwdkTmlcJAnQsc_fmIdbJ_ACyTa1wr343KYYOQVwBjAmZDa6rU16y0yTr_J4IVWY3aS5UpBEBHy4XE0c76UaN-_DcGiVl4ayWQIUz8A",
|
|
28
|
+
id: 84311,
|
|
29
|
+
retailerId: 68,
|
|
30
|
+
orderId: 3118,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// ejemplo del chat orderProduct con user PROVEEDOR
|
|
35
|
+
export const chatPROV_orderProduct = Template.bind({});
|
|
36
|
+
chatPROV_orderProduct.args = {
|
|
37
|
+
chatType: "order_product",
|
|
38
|
+
chatContainerType: "popUp",
|
|
39
|
+
chatData: {
|
|
40
|
+
userToken:
|
|
41
|
+
"eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5ZDBjYzVjOC1hODllLTRiZGQtOWUyZC0zNThhMDFjYzlhNjIiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJjb2duaXRvOnVzZXJuYW1lIjoiOWQwY2M1YzgtYTg5ZS00YmRkLTllMmQtMzU4YTAxY2M5YTYyIiwiYXVkIjoiNTJkOXNra2RjZzhxanA4OG9vazF1c2U2bWsiLCJldmVudF9pZCI6IjU1NDQ5NzhmLWExMGEtNGE5Ni05M2NkLWY5Y2ZmNTFlNWRlOCIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjY1NjI0MjYyLCJuYW1lIjoiSXNtYWVsIExvcGV6IiwicGhvbmVfbnVtYmVyIjoiKzUyMzExMTM2NjMzNiIsImV4cCI6MTY2NTYyNzg2MiwiaWF0IjoxNjY1NjI0MjYyLCJlbWFpbCI6Imlsb3BlekBjb250ZW50b2guY29tIn0.bIDIv57LRgafkymcUY4DqFRxR91iTBlZ7H7v1o3TnwJpIFPUEvzfvHObDR534xfa-R5ZRz46YCjsV6yQ-2hd8OA97VFLrqyC8Yqx_hjoIA1QxX_5_-b4UWaIib_1wSkrWd2gQtuKAUucfzAisZp1UNiY6Sm4VPGXsc5Lk6kLo1X_rctLUlQMhl5KaMNaSWqvbcYZLz5XSpbJR_MHegkdquKBaQJVKl76TkvDT8Eyr6rPUUAtnRBAPfnP4dW82HgT-aZp-0wUH5fYcb02agPg4-wqVsxPr8WxihATqn9rVfR5CjZWYOGPdSw7AUS33yYAkx5Nmnz4oIcRlPsvF5U62g",
|
|
42
|
+
id: 84311,
|
|
43
|
+
retailerId: 68,
|
|
44
|
+
orderId: 3118,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// ejemplo del chat orderProduct con user FABRICA 37
|
|
49
|
+
export const chatFAB_orderProduct_user37 = Template.bind({});
|
|
50
|
+
chatFAB_orderProduct_user37.args = {
|
|
51
|
+
chatType: "order_product",
|
|
52
|
+
chatContainerType: "popUp",
|
|
53
|
+
chatData: {
|
|
54
|
+
userToken:
|
|
55
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI1YTg4MmFkMS04OWFjLTQwYTYtYWRhMi02NzgyNWNjMzNiZTciLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2NjIwNTg2NSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2NjIwOTQ2NSwiaWF0IjoxNjY2MjA1ODY1LCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.HOsBuNBBeDL4Vwhi5Rou0jzZqOO_n_AIvoFOVRuFFiVppzaTDFNEVcapq9hCLIGQZT5NK8Arwo-nZkcVVAqHMsu8KKJsPQZIkGbHI6CVD7IkBBfm756e-tTuHHBYd4ND3HifVDWwno8mEODLZdaWRcy5MN3TErqCEy8cf1u7CQSguKmjeElL-8DHtNfLKMnxJOGGW_JAEa1JVWninzekPAeFKmWFOtByFCJZT1HBmL9XERIXXN6qWU_g0KlUm_wBWkmIDxuVRPorFEPinh0ETAGkGa5mf1SPaibXXSEoiF58DkFRyrOcTVKnV7Dixjo6DvBwN98fYW0zaeo3G5nSXw",
|
|
56
|
+
id: 84311,
|
|
57
|
+
retailerId: 68,
|
|
58
|
+
orderId: 3118,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// ejemplo del chat orderProduct con user FABRICA 49
|
|
63
|
+
export const chatFAB_orderProduct_user49 = Template.bind({});
|
|
64
|
+
chatFAB_orderProduct_user49.args = {
|
|
65
|
+
chatType: "order_product",
|
|
66
|
+
chatContainerType: "popUp",
|
|
67
|
+
chatData: {
|
|
68
|
+
userToken:
|
|
69
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxODA1MDQ1Mi0xOGQ0LTQxM2ItYjg2MC1iMWMyMzZmMTM5OWYiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjE4MDUwNDUyLTE4ZDQtNDEzYi1iODYwLWIxYzIzNmYxMzk5ZiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJkYmU1ODRmOS0xOTJmLTRkNDEtOWMxMS0xMzRkMDgzODVjMDQiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2NTcxNjI3NywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2NTcxOTg3NywiaWF0IjoxNjY1NzE2Mjc3LCJlbWFpbCI6Im16dW5pZ2FAY29udGVudG9oLmNvbSJ9.KoPNFy9gZYoYjiCGanSe_MvnuX7rSvNTXqQVffXSzGYeb4R3G6yDWrWItjHfgFmmo1jLlTmLT_yiVC4g9Vpo9WxebPwZA9rFwKDbc3vKeAs1JSUfaatQOwIqS1NsHwEkAM-agsO2s2Rnqq4h-FCcURqjiknbvHXUjcXqSea-3JlxtVFw3x7NLG3bUPqfPyVV1N5jR-XMrDOSZctS2k4WvPqhxf75Iv77U23YNFRoOIUZIAYx8SmSw792h4YwmJqMUuZlo48aBaaZO3NE83KdMR-mYvvoa-TDIE2d9ww-vPctauVL9ydB5ISSB8gUz90o8IZIWjrwQgbzE7eRPKxPWw",
|
|
70
|
+
id: 84311,
|
|
71
|
+
retailerId: 68,
|
|
72
|
+
orderId: 3118,
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// ejemplo del chat merchantProduct con user CADENA
|
|
77
|
+
export const chatCAD_merchantsProduct = Template.bind({});
|
|
78
|
+
chatCAD_merchantsProduct.args = {
|
|
79
|
+
chatType: "merchant_product",
|
|
80
|
+
chatContainerType: "popUp",
|
|
81
|
+
chatData: {
|
|
82
|
+
userToken:
|
|
83
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI2YmI0NzExMi03ZTNiLTRjYzUtYmVhZS02MzMxZjEwYjk3MzIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2NTYxNjI0MSwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjY1NjE5ODQxLCJpYXQiOjE2NjU2MTYyNDEsImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.gi1Jiua_O175vHLy-CYXOR945IRcObIj5j1LNk4_EhcKPz-MzPnfWDLH7L3sTiNS-VUhIRtAhtUVPUSYv0oP1qfJwFHomerxJvYgJge8SLWPjL6yGBnTxAvHVbuLU8kcaoZup2eNMV6XOIAEBAHeCDm4vW0rYWwfrKADPyYGZQF2si14o3wtgSMX5a4ccxGwikT3to3HttWBhmJs_I1Xr_BvBxePc4WghjQr5GVGbq8vhr4HwdkTmlcJAnQsc_fmIdbJ_ACyTa1wr343KYYOQVwBjAmZDa6rU16y0yTr_J4IVWY3aS5UpBEBHy4XE0c76UaN-_DcGiVl4ayWQIUz8A",
|
|
84
|
+
id: 84300,
|
|
85
|
+
version: 1,
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
export const chatPROV_merchantsProduct = Template.bind({});
|
|
91
|
+
chatPROV_merchantsProduct.args = {
|
|
92
|
+
userToken:
|
|
93
|
+
"eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5ZDBjYzVjOC1hODllLTRiZGQtOWUyZC0zNThhMDFjYzlhNjIiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJjb2duaXRvOnVzZXJuYW1lIjoiOWQwY2M1YzgtYTg5ZS00YmRkLTllMmQtMzU4YTAxY2M5YTYyIiwiYXVkIjoiNTJkOXNra2RjZzhxanA4OG9vazF1c2U2bWsiLCJldmVudF9pZCI6IjU1NDQ5NzhmLWExMGEtNGE5Ni05M2NkLWY5Y2ZmNTFlNWRlOCIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjY1NjI0MjYyLCJuYW1lIjoiSXNtYWVsIExvcGV6IiwicGhvbmVfbnVtYmVyIjoiKzUyMzExMTM2NjMzNiIsImV4cCI6MTY2NTYyNzg2MiwiaWF0IjoxNjY1NjI0MjYyLCJlbWFpbCI6Imlsb3BlekBjb250ZW50b2guY29tIn0.bIDIv57LRgafkymcUY4DqFRxR91iTBlZ7H7v1o3TnwJpIFPUEvzfvHObDR534xfa-R5ZRz46YCjsV6yQ-2hd8OA97VFLrqyC8Yqx_hjoIA1QxX_5_-b4UWaIib_1wSkrWd2gQtuKAUucfzAisZp1UNiY6Sm4VPGXsc5Lk6kLo1X_rctLUlQMhl5KaMNaSWqvbcYZLz5XSpbJR_MHegkdquKBaQJVKl76TkvDT8Eyr6rPUUAtnRBAPfnP4dW82HgT-aZp-0wUH5fYcb02agPg4-wqVsxPr8WxihATqn9rVfR5CjZWYOGPdSw7AUS33yYAkx5Nmnz4oIcRlPsvF5U62g",
|
|
94
|
+
chatType: "merchants_products",
|
|
95
|
+
articleId: "84300",
|
|
96
|
+
articleVersion: "1",
|
|
97
|
+
};*/
|
|
98
|
+
|
|
99
|
+
// ejemplo del chat ticket con user FAB
|
|
100
|
+
export const chatFAB_ticketClosed_user49 = Template.bind({});
|
|
101
|
+
chatFAB_ticketClosed_user49.args = {
|
|
102
|
+
chatType: "ticket",
|
|
103
|
+
chatContainerType: "fixed",
|
|
104
|
+
chatData: {
|
|
105
|
+
id: 10,
|
|
106
|
+
ticketOwnerUserId: 23,
|
|
107
|
+
statusTicket: "COMPLETED",
|
|
108
|
+
currentUser: {
|
|
109
|
+
id: 49,
|
|
110
|
+
companyId: 2,
|
|
111
|
+
isUserTech: false,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// ejemplo del chat ticket con user TECH
|
|
117
|
+
export const chatTECH_ticketClosed_user65 = Template.bind({});
|
|
118
|
+
chatTECH_ticketClosed_user65.args = {
|
|
119
|
+
chatType: "ticket",
|
|
120
|
+
chatContainerType: "fixed",
|
|
121
|
+
chatData: {
|
|
122
|
+
id: 10,
|
|
123
|
+
ticketOwnerUserId: 23,
|
|
124
|
+
statusTicket: "COMPLETED",
|
|
125
|
+
currentUser: {
|
|
126
|
+
id: 65,
|
|
127
|
+
companyId: 2,
|
|
128
|
+
isUserTech: true,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// ejemplo del chat ticket con user TECH propietario del ticket
|
|
134
|
+
export const chatTECH_ticketClosedOwn_user66 = Template.bind({});
|
|
135
|
+
chatTECH_ticketClosedOwn_user66.args = {
|
|
136
|
+
chatType: "ticket",
|
|
137
|
+
chatContainerType: "fixed",
|
|
138
|
+
chatData: {
|
|
139
|
+
id: 10,
|
|
140
|
+
ticketOwnerUserId: 66,
|
|
141
|
+
statusTicket: "COMPLETED",
|
|
142
|
+
currentUser: {
|
|
143
|
+
id: 66,
|
|
144
|
+
companyId: 2,
|
|
145
|
+
isUserTech: true,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
// ejemplo del chat ticket con user FAB
|
|
151
|
+
export const chatFAB_ticketOpen_user49 = Template.bind({});
|
|
152
|
+
chatFAB_ticketOpen_user49.args = {
|
|
153
|
+
chatType: "ticket",
|
|
154
|
+
chatContainerType: "fixed",
|
|
155
|
+
chatData: {
|
|
156
|
+
id: 11,
|
|
157
|
+
ticketOwnerUserId: 23,
|
|
158
|
+
statusTicket: "PENDING",
|
|
159
|
+
currentUser: {
|
|
160
|
+
id: 49,
|
|
161
|
+
companyId: 2,
|
|
162
|
+
isUserTech: false,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
// ejemplo del chat ticket con user TECH
|
|
168
|
+
export const chatTECH_ticketOpen_user65 = Template.bind({});
|
|
169
|
+
chatTECH_ticketOpen_user65.args = {
|
|
170
|
+
chatType: "ticket",
|
|
171
|
+
chatContainerType: "fixed",
|
|
172
|
+
chatData: {
|
|
173
|
+
id: 11,
|
|
174
|
+
ticketOwnerUserId: 23,
|
|
175
|
+
statusTicket: "PENDING",
|
|
176
|
+
currentUser: {
|
|
177
|
+
id: 65,
|
|
178
|
+
companyId: 2,
|
|
179
|
+
isUserTech: true,
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
// ejemplo del chat ticket con user TECH propietario del ticket
|
|
185
|
+
export const chatTECH_ticketOpenOwn_user66 = Template.bind({});
|
|
186
|
+
chatTECH_ticketOpenOwn_user66.args = {
|
|
187
|
+
chatType: "ticket",
|
|
188
|
+
chatContainerType: "fixed",
|
|
189
|
+
chatData: {
|
|
190
|
+
id: 11,
|
|
191
|
+
ticketOwnerUserId: 66,
|
|
192
|
+
statusTicket: "PENDING",
|
|
193
|
+
currentUser: {
|
|
194
|
+
id: 66,
|
|
195
|
+
companyId: 2,
|
|
196
|
+
isUserTech: true,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
};
|