contentoh-components-library 21.3.99 → 21.4.1
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/CheckBox/styles.js +1 -1
- package/dist/components/atoms/UserCatalog/index.js +4 -4
- package/dist/components/atoms/UserSelector/index.js +1 -1
- package/dist/components/molecules/RowItem/index.js +0 -1
- package/dist/components/molecules/TabsMenu/index.js +13 -7
- package/dist/components/organisms/FullTabsMenu/index.js +3 -1
- package/dist/components/pages/ProviderProductEdition/index.js +3 -2
- package/dist/components/pages/RetailerProductEdition/index.js +3 -2
- package/package.json +1 -1
- package/src/components/atoms/CheckBox/styles.js +1 -1
- package/src/components/atoms/UserCatalog/index.js +4 -4
- package/src/components/atoms/UserSelector/index.js +1 -1
- package/src/components/molecules/RowItem/index.js +1 -1
- package/src/components/molecules/TabsMenu/index.js +16 -10
- package/src/components/organisms/FullTabsMenu/index.js +3 -1
- package/src/components/pages/ProviderProductEdition/index.js +3 -2
- package/src/components/pages/RetailerProductEdition/index.js +3 -2
|
@@ -19,6 +19,6 @@ var _variables = require("../../../global-files/variables");
|
|
|
19
19
|
|
|
20
20
|
var _templateObject;
|
|
21
21
|
|
|
22
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n input {\n display: none;\n &:checked + label {\n &:before {\n background-color: ", ";\n background-image: url(", ");\n }\n }\n }\n\n label {\n position: relative;\n min-height: 16px;\n min-width: 16px;\n display: inline-block;\n\n p {\n display: inline;\n color: ", ";\n font-family: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 21px;\n margin-left: 20px;\n\n &.filter-text {\n color: ", ";\n font-size: 18px;\n line-height: 24px;\n margin-left: 23px;\n }\n }\n\n &:before {\n content: \"\";\n width: 16px;\n height: 16px;\n position: absolute;\n display: inline-block;\n top: 50%;\n transform: translateY(-50%);\n background-image: url(", ");\n z-index:
|
|
22
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n input {\n display: none;\n &:checked + label {\n &:before {\n background-color: ", ";\n background-image: url(", ");\n }\n }\n }\n\n label {\n position: relative;\n min-height: 16px;\n min-width: 16px;\n display: inline-block;\n\n p {\n display: inline;\n color: ", ";\n font-family: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 21px;\n margin-left: 20px;\n\n &.filter-text {\n color: ", ";\n font-size: 18px;\n line-height: 24px;\n margin-left: 23px;\n }\n }\n\n &:before {\n content: \"\";\n width: 16px;\n height: 16px;\n position: absolute;\n display: inline-block;\n top: 50%;\n transform: translateY(-50%);\n background-image: url(", ");\n z-index: 5;\n cursor: pointer;\n }\n }\n"])), _variables.GlobalColors.white, _checked.default, _variables.GlobalColors.s4, _variables.FontFamily.AvenirNext, _variables.GlobalColors.magenta_s2, _unchecked.default);
|
|
23
23
|
|
|
24
24
|
exports.Container = Container;
|
|
@@ -72,28 +72,28 @@ var UserCatalog = function UserCatalog(_ref) {
|
|
|
72
72
|
product: product,
|
|
73
73
|
userId: datasheet,
|
|
74
74
|
usersArray: textSpecialists,
|
|
75
|
-
id: id + "-"
|
|
75
|
+
id: id + "-datasheet",
|
|
76
76
|
index: "datasheet"
|
|
77
77
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserOption.UserOption, {
|
|
78
78
|
onAssign: onAssign,
|
|
79
79
|
product: product,
|
|
80
80
|
userId: description,
|
|
81
81
|
usersArray: textSpecialists,
|
|
82
|
-
id: id + "-"
|
|
82
|
+
id: id + "-description",
|
|
83
83
|
index: "description"
|
|
84
84
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserOption.UserOption, {
|
|
85
85
|
onAssign: onAssign,
|
|
86
86
|
product: product,
|
|
87
87
|
userId: images,
|
|
88
88
|
usersArray: imagesSpecialists,
|
|
89
|
-
id: id + "-"
|
|
89
|
+
id: id + "-images",
|
|
90
90
|
index: "image"
|
|
91
91
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserOption.UserOption, {
|
|
92
92
|
onAssign: onAssign,
|
|
93
93
|
product: product,
|
|
94
94
|
userId: auditor,
|
|
95
95
|
usersArray: auditors,
|
|
96
|
-
id: id + "-"
|
|
96
|
+
id: id + "-auditor",
|
|
97
97
|
index: "auditor"
|
|
98
98
|
})]
|
|
99
99
|
})]
|
|
@@ -59,7 +59,7 @@ var UserSelector = function UserSelector(_ref) {
|
|
|
59
59
|
|
|
60
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
61
61
|
position: position,
|
|
62
|
-
id: id,
|
|
62
|
+
id: id + "users-list",
|
|
63
63
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
64
64
|
className: "search-cotainer",
|
|
65
65
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
|
|
@@ -22,7 +22,6 @@ var RowItem = function RowItem(_ref) {
|
|
|
22
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
23
23
|
children: productsArray.map(function (_ref2, i) {
|
|
24
24
|
var cols = _ref2.cols,
|
|
25
|
-
id = _ref2.id,
|
|
26
25
|
product = _ref2.product,
|
|
27
26
|
article = _ref2.article;
|
|
28
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -29,7 +29,10 @@ var TabsMenu = function TabsMenu(_ref) {
|
|
|
29
29
|
activeTab = _ref.activeTab,
|
|
30
30
|
updatedDescriptions = _ref.updatedDescriptions,
|
|
31
31
|
updatedDatasheets = _ref.updatedDatasheets,
|
|
32
|
-
images = _ref.images
|
|
32
|
+
images = _ref.images,
|
|
33
|
+
setUpdatedDescriptions = _ref.setUpdatedDescriptions,
|
|
34
|
+
setUpdatedDatasheets = _ref.setUpdatedDatasheets,
|
|
35
|
+
setImages = _ref.setImages;
|
|
33
36
|
|
|
34
37
|
var _useState = (0, _react.useState)(tabsSections),
|
|
35
38
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -68,11 +71,14 @@ var TabsMenu = function TabsMenu(_ref) {
|
|
|
68
71
|
};
|
|
69
72
|
|
|
70
73
|
(0, _react.useEffect)(function () {
|
|
71
|
-
if (cancelAccept === "Aceptar"
|
|
74
|
+
if (cancelAccept === "Aceptar" && llave !== "") {
|
|
72
75
|
setCancelAccept("");
|
|
73
76
|
setModal(false);
|
|
74
77
|
activeSection(llave, objeto);
|
|
75
|
-
|
|
78
|
+
setUpdatedDescriptions([]);
|
|
79
|
+
setUpdatedDatasheets([]);
|
|
80
|
+
setImages({});
|
|
81
|
+
} else if (cancelAccept === "Cancelar" && llave !== "") {
|
|
76
82
|
setModal(false);
|
|
77
83
|
setCancelAccept("");
|
|
78
84
|
}
|
|
@@ -109,15 +115,15 @@ var TabsMenu = function TabsMenu(_ref) {
|
|
|
109
115
|
type: "white",
|
|
110
116
|
label: "Cancelar",
|
|
111
117
|
size: 12,
|
|
112
|
-
onClick: function onClick(
|
|
113
|
-
return setCancelAccept(
|
|
118
|
+
onClick: function onClick() {
|
|
119
|
+
return setCancelAccept("Cancelar");
|
|
114
120
|
}
|
|
115
121
|
}, "btn-Cancelar"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
116
122
|
type: "pink",
|
|
117
123
|
label: "Aceptar",
|
|
118
124
|
size: 12,
|
|
119
|
-
onClick: function onClick(
|
|
120
|
-
return setCancelAccept(
|
|
125
|
+
onClick: function onClick() {
|
|
126
|
+
return setCancelAccept("Aceptar");
|
|
121
127
|
}
|
|
122
128
|
}, "btn-Aceptar")]
|
|
123
129
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
@@ -40,9 +40,10 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
|
40
40
|
updatedDescriptions = _ref.updatedDescriptions,
|
|
41
41
|
updatedDatasheets = _ref.updatedDatasheets,
|
|
42
42
|
selectedImages = _ref.selectedImages,
|
|
43
|
+
setSelectedImages = _ref.setSelectedImages,
|
|
43
44
|
setUpdatedDescriptions = _ref.setUpdatedDescriptions,
|
|
44
45
|
setUpdatedDatasheets = _ref.setUpdatedDatasheets,
|
|
45
|
-
|
|
46
|
+
setImages = _ref.setImages;
|
|
46
47
|
|
|
47
48
|
var _useState = (0, _react.useState)(false),
|
|
48
49
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -61,6 +62,7 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
|
61
62
|
selectedImages: selectedImages,
|
|
62
63
|
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
63
64
|
setUpdatedDatasheets: setUpdatedDatasheets,
|
|
65
|
+
setImages: setImages,
|
|
64
66
|
setSelectedImages: setSelectedImages
|
|
65
67
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.StatusAsignationInfo, {
|
|
66
68
|
canAssign: canAssign,
|
|
@@ -2182,11 +2182,12 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2182
2182
|
showSaveButton: enableActions(product.version_status),
|
|
2183
2183
|
version: version,
|
|
2184
2184
|
updatedDescriptions: updatedDescriptions,
|
|
2185
|
+
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
2185
2186
|
updatedDatasheets: updatedDatasheets,
|
|
2187
|
+
setUpdatedDatasheets: setUpdatedDatasheets,
|
|
2186
2188
|
images: images,
|
|
2189
|
+
setImages: setImages,
|
|
2187
2190
|
selectedImages: selectedImages,
|
|
2188
|
-
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
2189
|
-
setUpdatedDatasheets: setUpdatedDatasheets,
|
|
2190
2191
|
setSelectedImages: setSelectedImages,
|
|
2191
2192
|
setShowVersionSelector: setShowVersionSelector,
|
|
2192
2193
|
onClickSave: function onClickSave() {
|
|
@@ -1996,11 +1996,12 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1996
1996
|
imag: imag,
|
|
1997
1997
|
setImag: setImag,
|
|
1998
1998
|
updatedDescriptions: updatedDescriptions,
|
|
1999
|
+
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
1999
2000
|
updatedDatasheets: updatedDatasheets,
|
|
2001
|
+
setUpdatedDatasheets: setUpdatedDatasheets,
|
|
2000
2002
|
images: images,
|
|
2003
|
+
setImages: setImages,
|
|
2001
2004
|
selectedImages: selectedImages,
|
|
2002
|
-
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
2003
|
-
setUpdatedDatasheets: setUpdatedDatasheets,
|
|
2004
2005
|
setSelectedImages: setSelectedImages,
|
|
2005
2006
|
setShowVersionSelector: setShowVersionSelector,
|
|
2006
2007
|
onClickSave: function onClickSave() {
|
package/package.json
CHANGED
|
@@ -62,7 +62,7 @@ export const UserCatalog = ({
|
|
|
62
62
|
product={product}
|
|
63
63
|
userId={datasheet}
|
|
64
64
|
usersArray={textSpecialists}
|
|
65
|
-
id={id + "-"
|
|
65
|
+
id={id + "-datasheet"}
|
|
66
66
|
index={"datasheet"}
|
|
67
67
|
/>
|
|
68
68
|
<UserOption
|
|
@@ -70,7 +70,7 @@ export const UserCatalog = ({
|
|
|
70
70
|
product={product}
|
|
71
71
|
userId={description}
|
|
72
72
|
usersArray={textSpecialists}
|
|
73
|
-
id={id + "-"
|
|
73
|
+
id={id + "-description"}
|
|
74
74
|
index={"description"}
|
|
75
75
|
/>
|
|
76
76
|
<UserOption
|
|
@@ -78,7 +78,7 @@ export const UserCatalog = ({
|
|
|
78
78
|
product={product}
|
|
79
79
|
userId={images}
|
|
80
80
|
usersArray={imagesSpecialists}
|
|
81
|
-
id={id + "-"
|
|
81
|
+
id={id + "-images"}
|
|
82
82
|
index={"image"}
|
|
83
83
|
/>
|
|
84
84
|
<UserOption
|
|
@@ -86,7 +86,7 @@ export const UserCatalog = ({
|
|
|
86
86
|
product={product}
|
|
87
87
|
userId={auditor}
|
|
88
88
|
usersArray={auditors}
|
|
89
|
-
id={id + "-"
|
|
89
|
+
id={id + "-auditor"}
|
|
90
90
|
index={"auditor"}
|
|
91
91
|
/>
|
|
92
92
|
</div>
|
|
@@ -10,7 +10,7 @@ export const RowItem = ({
|
|
|
10
10
|
}) => {
|
|
11
11
|
return (
|
|
12
12
|
<Container>
|
|
13
|
-
{productsArray.map(({ cols,
|
|
13
|
+
{productsArray.map(({ cols, product, article }, i) => (
|
|
14
14
|
<div
|
|
15
15
|
className="row-container"
|
|
16
16
|
key={article?.id_article + "-" + article?.id_order}
|
|
@@ -13,6 +13,9 @@ export const TabsMenu = ({
|
|
|
13
13
|
updatedDescriptions,
|
|
14
14
|
updatedDatasheets,
|
|
15
15
|
images,
|
|
16
|
+
setUpdatedDescriptions,
|
|
17
|
+
setUpdatedDatasheets,
|
|
18
|
+
setImages,
|
|
16
19
|
}) => {
|
|
17
20
|
const [sections, setSections] = useState(tabsSections);
|
|
18
21
|
|
|
@@ -32,11 +35,14 @@ export const TabsMenu = ({
|
|
|
32
35
|
};
|
|
33
36
|
|
|
34
37
|
useEffect(() => {
|
|
35
|
-
if (
|
|
38
|
+
if (cancelAccept === "Aceptar" && llave !== "") {
|
|
36
39
|
setCancelAccept("");
|
|
37
40
|
setModal(false);
|
|
38
41
|
activeSection(llave, objeto);
|
|
39
|
-
|
|
42
|
+
setUpdatedDescriptions([]);
|
|
43
|
+
setUpdatedDatasheets([]);
|
|
44
|
+
setImages({});
|
|
45
|
+
} else if (cancelAccept === "Cancelar" && llave !== "") {
|
|
40
46
|
setModal(false);
|
|
41
47
|
setCancelAccept("");
|
|
42
48
|
}
|
|
@@ -70,18 +76,18 @@ export const TabsMenu = ({
|
|
|
70
76
|
message="Estás cambiando de vista y aun no guardas cambios ¿Estás seguro?"
|
|
71
77
|
buttons={[
|
|
72
78
|
<ButtonV2
|
|
73
|
-
key=
|
|
74
|
-
type=
|
|
75
|
-
label=
|
|
79
|
+
key="btn-Cancelar"
|
|
80
|
+
type="white"
|
|
81
|
+
label="Cancelar"
|
|
76
82
|
size={12}
|
|
77
|
-
onClick={(
|
|
83
|
+
onClick={() => setCancelAccept("Cancelar")}
|
|
78
84
|
/>,
|
|
79
85
|
<ButtonV2
|
|
80
|
-
key=
|
|
81
|
-
type=
|
|
82
|
-
label=
|
|
86
|
+
key="btn-Aceptar"
|
|
87
|
+
type="pink"
|
|
88
|
+
label="Aceptar"
|
|
83
89
|
size={12}
|
|
84
|
-
onClick={(
|
|
90
|
+
onClick={() => setCancelAccept("Aceptar")}
|
|
85
91
|
/>,
|
|
86
92
|
]}
|
|
87
93
|
/>
|
|
@@ -23,9 +23,10 @@ export const FullTabsMenu = ({
|
|
|
23
23
|
updatedDescriptions,
|
|
24
24
|
updatedDatasheets,
|
|
25
25
|
selectedImages,
|
|
26
|
+
setSelectedImages,
|
|
26
27
|
setUpdatedDescriptions,
|
|
27
28
|
setUpdatedDatasheets,
|
|
28
|
-
|
|
29
|
+
setImages,
|
|
29
30
|
}) => {
|
|
30
31
|
const [imagesSection, setImagesSection] = useState(false);
|
|
31
32
|
|
|
@@ -42,6 +43,7 @@ export const FullTabsMenu = ({
|
|
|
42
43
|
selectedImages={selectedImages}
|
|
43
44
|
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
44
45
|
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
46
|
+
setImages={setImages}
|
|
45
47
|
setSelectedImages={setSelectedImages}
|
|
46
48
|
/>
|
|
47
49
|
<StatusAsignationInfo
|
|
@@ -1429,11 +1429,12 @@ export const ProviderProductEdition = ({
|
|
|
1429
1429
|
showSaveButton={enableActions(product.version_status)}
|
|
1430
1430
|
version={version}
|
|
1431
1431
|
updatedDescriptions={updatedDescriptions}
|
|
1432
|
+
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
1432
1433
|
updatedDatasheets={updatedDatasheets}
|
|
1434
|
+
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
1433
1435
|
images={images}
|
|
1436
|
+
setImages={setImages}
|
|
1434
1437
|
selectedImages={selectedImages}
|
|
1435
|
-
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
1436
|
-
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
1437
1438
|
setSelectedImages={setSelectedImages}
|
|
1438
1439
|
setShowVersionSelector={setShowVersionSelector}
|
|
1439
1440
|
onClickSave={() => {
|
|
@@ -1364,11 +1364,12 @@ export const RetailerProductEdition = ({
|
|
|
1364
1364
|
imag={imag}
|
|
1365
1365
|
setImag={setImag}
|
|
1366
1366
|
updatedDescriptions={updatedDescriptions}
|
|
1367
|
+
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
1367
1368
|
updatedDatasheets={updatedDatasheets}
|
|
1369
|
+
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
1368
1370
|
images={images}
|
|
1371
|
+
setImages={setImages}
|
|
1369
1372
|
selectedImages={selectedImages}
|
|
1370
|
-
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
1371
|
-
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
1372
1373
|
setSelectedImages={setSelectedImages}
|
|
1373
1374
|
setShowVersionSelector={setShowVersionSelector}
|
|
1374
1375
|
onClickSave={() => {
|