contentoh-components-library 21.5.37 → 21.5.38
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/dist/components/atoms/GeneralInput/index.js +3 -5
- package/dist/components/molecules/TagAndInput/index.js +18 -3
- package/dist/components/molecules/TagAndInput/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +5 -5
- package/dist/components/pages/ProviderProductEdition/index.js +3 -0
- package/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +1 -1
- package/src/components/molecules/TagAndInput/index.js +20 -1
- package/src/components/molecules/TagAndInput/styles.js +11 -0
- package/src/components/organisms/Chat/ContentChat/index.js +5 -5
- package/src/components/pages/ProviderProductEdition/index.js +6 -0
|
@@ -131,10 +131,10 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
131
131
|
}, 0);
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
134
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
135
135
|
isRequired: requiredEmpty,
|
|
136
136
|
className: auditClass,
|
|
137
|
-
children:
|
|
137
|
+
children: (optionList === null || optionList === void 0 ? void 0 : optionList.length) > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("select", {
|
|
138
138
|
id: "dropdown".concat(inputId),
|
|
139
139
|
onChange: function onChange(e) {
|
|
140
140
|
return onHandleChange(e);
|
|
@@ -184,9 +184,7 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
184
184
|
maxChar: maxChar,
|
|
185
185
|
isRequired: isRequired,
|
|
186
186
|
disabled: disabled
|
|
187
|
-
})
|
|
188
|
-
children: description
|
|
189
|
-
})]
|
|
187
|
+
})
|
|
190
188
|
});
|
|
191
189
|
};
|
|
192
190
|
|
|
@@ -23,6 +23,12 @@ var _acceptIcon = _interopRequireDefault(require("../../../assets/images/general
|
|
|
23
23
|
|
|
24
24
|
var _rejectIcon = _interopRequireDefault(require("../../../assets/images/generalButton/rejectIcon.svg"));
|
|
25
25
|
|
|
26
|
+
var _infoIcon = _interopRequireDefault(require("../../../assets/images/sliderToolTip/infoIcon.svg"));
|
|
27
|
+
|
|
28
|
+
var _SliderToolTip = require("../../atoms/SliderToolTip");
|
|
29
|
+
|
|
30
|
+
var _Tooltip = require("../../atoms/Tooltip");
|
|
31
|
+
|
|
26
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
33
|
|
|
28
34
|
var TagAndInput = function TagAndInput(_ref) {
|
|
@@ -101,9 +107,18 @@ var TagAndInput = function TagAndInput(_ref) {
|
|
|
101
107
|
text: label,
|
|
102
108
|
headerType: "input-name-header",
|
|
103
109
|
color: color
|
|
104
|
-
}),
|
|
105
|
-
|
|
106
|
-
|
|
110
|
+
}), description && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
|
|
111
|
+
componentTooltip: /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
112
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
113
|
+
children: description
|
|
114
|
+
})
|
|
115
|
+
}),
|
|
116
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
117
|
+
src: _infoIcon.default,
|
|
118
|
+
alt: "info icon",
|
|
119
|
+
className: 'icon_information'
|
|
120
|
+
}),
|
|
121
|
+
classNameTooltip: "container-tooltip"
|
|
107
122
|
})]
|
|
108
123
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.GeneralInput, {
|
|
109
124
|
inputId: inputId,
|
|
@@ -15,7 +15,7 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .title-container {\n position: relative;\n .tooltip {\n display: none;\n position: absolute;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 14px;\n line-height: 19px;\n left: 0;\n top: 0;\n height: fit-content;\n transition: display 2s;\n }\n\n &:hover {\n .tooltip {\n display: block;\n }\n }\n }\n\n & > :first-child {\n & + * {\n margin-top: ", "px;\n }\n }\n & + * {\n margin-top: ", "px;\n }\n"])), _variables.GlobalColors.white, function (_ref) {
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .title-container {\n position: relative;\n\n display: flex;\n align-items: center;\n gap: .5rem;\n\n .icon_information{\n width: 1.35rem;\n height: 1.35rem;\n filter: brightness(.35);\n }\n\n .tooltip {\n display: none;\n position: absolute;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 14px;\n line-height: 19px;\n left: 0;\n top: 0;\n height: fit-content;\n transition: display 2s;\n }\n\n &:hover {\n .tooltip {\n display: block;\n }\n }\n }\n\n & > :first-child {\n & + * {\n margin-top: ", "px;\n }\n }\n & + * {\n margin-top: ", "px;\n }\n"])), _variables.GlobalColors.white, function (_ref) {
|
|
19
19
|
var color = _ref.color;
|
|
20
20
|
return color ? color : _variables.GlobalColors.s5;
|
|
21
21
|
}, _variables.FontFamily.Raleway, function (_ref2) {
|
|
@@ -250,14 +250,14 @@ var ContentChat = function ContentChat(props) {
|
|
|
250
250
|
case 0:
|
|
251
251
|
paramsQuery = {
|
|
252
252
|
articleData: JSON.stringify({
|
|
253
|
-
articleId: JSON.stringify(dataChat.id),
|
|
254
|
-
version: JSON.stringify(dataChat.version),
|
|
255
|
-
retailerId: JSON.stringify(dataChat.retailerId),
|
|
256
|
-
status: dataChat.status
|
|
253
|
+
articleId: JSON.stringify(dataChat === null || dataChat === void 0 ? void 0 : dataChat.id),
|
|
254
|
+
version: JSON.stringify(dataChat === null || dataChat === void 0 ? void 0 : dataChat.version),
|
|
255
|
+
retailerId: JSON.stringify(dataChat === null || dataChat === void 0 ? void 0 : dataChat.retailerId),
|
|
256
|
+
status: dataChat === null || dataChat === void 0 ? void 0 : dataChat.status
|
|
257
257
|
})
|
|
258
258
|
};
|
|
259
259
|
paramsHeaders = {
|
|
260
|
-
Authorization: dataChat.userToken
|
|
260
|
+
Authorization: dataChat === null || dataChat === void 0 ? void 0 : dataChat.userToken
|
|
261
261
|
};
|
|
262
262
|
_context.next = 4;
|
|
263
263
|
return (0, _handle_http.fetchGET)(process.env.REACT_APP_READ_MESSAGES, paramsQuery, paramsHeaders);
|
|
@@ -1132,9 +1132,12 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1132
1132
|
}, [percentages]);
|
|
1133
1133
|
|
|
1134
1134
|
var loadInputs = function loadInputs() {
|
|
1135
|
+
if (!services) return;
|
|
1136
|
+
|
|
1135
1137
|
if (services.length > 0) {
|
|
1136
1138
|
var _services$0$activeRet, _services$2, _services$3;
|
|
1137
1139
|
|
|
1140
|
+
if (!services[0]) return;
|
|
1138
1141
|
if ((_services$0$activeRet = services[0][activeRetailer.id]) !== null && _services$0$activeRet !== void 0 && _services$0$activeRet.data) services[0][activeRetailer.id].data = Object.values(services[0][activeRetailer.id].data);
|
|
1139
1142
|
setActivePercentage(Math.round(activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.percentage, 0));
|
|
1140
1143
|
var datagroups = services[0][activeRetailer.id];
|
package/package.json
CHANGED
|
@@ -4,6 +4,9 @@ import { GeneralInput } from "../../atoms/GeneralInput/index";
|
|
|
4
4
|
import { useState, useEffect } from "react";
|
|
5
5
|
import acceptIcon from "../../../assets/images/generalButton/acceptIcon.svg";
|
|
6
6
|
import rejectIcon from "../../../assets/images/generalButton/rejectIcon.svg";
|
|
7
|
+
import InfoIcon from "../../../assets/images/sliderToolTip/infoIcon.svg";
|
|
8
|
+
import { SliderToolTip } from "../../atoms/SliderToolTip";
|
|
9
|
+
import { Tooltip } from "../../atoms/Tooltip";
|
|
7
10
|
export const TagAndInput = ({
|
|
8
11
|
inputType,
|
|
9
12
|
label,
|
|
@@ -77,7 +80,23 @@ export const TagAndInput = ({
|
|
|
77
80
|
headerType={"input-name-header"}
|
|
78
81
|
color={color}
|
|
79
82
|
/>
|
|
80
|
-
{
|
|
83
|
+
{description && (
|
|
84
|
+
<Tooltip
|
|
85
|
+
componentTooltip={
|
|
86
|
+
<>
|
|
87
|
+
<p>{description}</p>
|
|
88
|
+
</>
|
|
89
|
+
}
|
|
90
|
+
children={
|
|
91
|
+
<img
|
|
92
|
+
src={InfoIcon}
|
|
93
|
+
alt="info icon"
|
|
94
|
+
className={'icon_information'}
|
|
95
|
+
/>
|
|
96
|
+
}
|
|
97
|
+
classNameTooltip={"container-tooltip"}
|
|
98
|
+
/>
|
|
99
|
+
)}
|
|
81
100
|
</div>
|
|
82
101
|
)}
|
|
83
102
|
<GeneralInput
|
|
@@ -4,6 +4,17 @@ import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
|
4
4
|
export const Container = styled.div`
|
|
5
5
|
.title-container {
|
|
6
6
|
position: relative;
|
|
7
|
+
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
gap: .5rem;
|
|
11
|
+
|
|
12
|
+
.icon_information{
|
|
13
|
+
width: 1.35rem;
|
|
14
|
+
height: 1.35rem;
|
|
15
|
+
filter: brightness(.35);
|
|
16
|
+
}
|
|
17
|
+
|
|
7
18
|
.tooltip {
|
|
8
19
|
display: none;
|
|
9
20
|
position: absolute;
|
|
@@ -142,13 +142,13 @@ export const ContentChat = (props) => {
|
|
|
142
142
|
const getInitialProductStatus = async () => {
|
|
143
143
|
const paramsQuery = {
|
|
144
144
|
articleData: JSON.stringify({
|
|
145
|
-
articleId: JSON.stringify(dataChat
|
|
146
|
-
version: JSON.stringify(dataChat
|
|
147
|
-
retailerId: JSON.stringify(dataChat
|
|
148
|
-
status: dataChat
|
|
145
|
+
articleId: JSON.stringify(dataChat?.id),
|
|
146
|
+
version: JSON.stringify(dataChat?.version),
|
|
147
|
+
retailerId: JSON.stringify(dataChat?.retailerId),
|
|
148
|
+
status: dataChat?.status,
|
|
149
149
|
})
|
|
150
150
|
};
|
|
151
|
-
const paramsHeaders = { Authorization: dataChat
|
|
151
|
+
const paramsHeaders = { Authorization: dataChat?.userToken };
|
|
152
152
|
const response = await fetchGET(
|
|
153
153
|
process.env.REACT_APP_READ_MESSAGES,
|
|
154
154
|
paramsQuery,
|
|
@@ -629,7 +629,13 @@ export const ProviderProductEdition = ({
|
|
|
629
629
|
}, [percentages]);
|
|
630
630
|
|
|
631
631
|
const loadInputs = () => {
|
|
632
|
+
|
|
633
|
+
if(!services) return;
|
|
634
|
+
|
|
632
635
|
if (services.length > 0) {
|
|
636
|
+
|
|
637
|
+
if(!services[0]) return;
|
|
638
|
+
|
|
633
639
|
if (services[0][activeRetailer.id]?.data)
|
|
634
640
|
services[0][activeRetailer.id].data = Object.values(
|
|
635
641
|
services[0][activeRetailer.id].data
|