contentoh-components-library 21.1.72 → 21.1.75

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 (44) hide show
  1. package/dist/components/atoms/AsignationOption/index.js +2 -2
  2. package/dist/components/atoms/ProductPercentCard/Percent.stories.js +1 -1
  3. package/dist/components/atoms/ProductPercentCard/styles.js +1 -1
  4. package/dist/components/atoms/Status/Status.stories.js +31 -0
  5. package/dist/components/atoms/Status/index.js +23 -0
  6. package/dist/components/atoms/Status/styles.js +20 -0
  7. package/dist/components/molecules/AssignedWork/AssignedWork.stories.js +1 -1
  8. package/dist/components/molecules/AssignedWork/styles.js +1 -1
  9. package/dist/components/molecules/ProductNameHeader/index.js +2 -2
  10. package/dist/components/molecules/StatusAsignationInfo/index.js +3 -3
  11. package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
  12. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +2 -6
  13. package/dist/components/pages/ProviderProductEdition/index.js +433 -433
  14. package/dist/components/pages/RetailerProductEdition/index.js +217 -200
  15. package/dist/global-files/customHooks.js +8 -12
  16. package/dist/global-files/data.js +8 -8
  17. package/dist/index.js +1 -14
  18. package/package.json +1 -1
  19. package/src/components/atoms/AsignationOption/index.js +2 -2
  20. package/src/components/atoms/ProductPercentCard/Percent.stories.js +11 -12
  21. package/src/components/atoms/ProductPercentCard/styles.js +9 -9
  22. package/src/components/atoms/Status/Status.stories.js +14 -0
  23. package/src/components/atoms/Status/index.js +9 -0
  24. package/src/components/atoms/{StatusTag → Status}/styles.js +7 -10
  25. package/src/components/molecules/AssignedWork/AssignedWork.stories.js +8 -8
  26. package/src/components/molecules/AssignedWork/styles.js +9 -10
  27. package/src/components/molecules/ProductNameHeader/index.js +2 -2
  28. package/src/components/molecules/StatusAsignationInfo/index.js +1 -1
  29. package/src/components/organisms/FullProductNameHeader/index.js +2 -2
  30. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +2 -3
  31. package/src/components/pages/ProviderProductEdition/index.js +233 -250
  32. package/src/components/pages/RetailerProductEdition/index.js +149 -173
  33. package/src/global-files/customHooks.js +13 -15
  34. package/src/global-files/data.js +8 -8
  35. package/src/index.js +1 -2
  36. package/dist/components/atoms/ProgressBar/styles.js +0 -22
  37. package/dist/components/atoms/StatusTag/StatusTag.stories.js +0 -48
  38. package/dist/components/atoms/StatusTag/index.js +0 -58
  39. package/dist/components/atoms/StatusTag/styles.js +0 -20
  40. package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +0 -37
  41. package/dist/components/pages/RegistrationLoginFirstStep/index.js +0 -269
  42. package/dist/components/pages/RegistrationLoginFirstStep/styles.js +0 -20
  43. package/src/components/atoms/ProgressBar/styles.js +0 -69
  44. package/src/components/atoms/StatusTag/index.js +0 -37
@@ -17,21 +17,17 @@ var closeModals = function closeModals(id) {
17
17
  showModal = _useState2[0],
18
18
  setShowModal = _useState2[1];
19
19
 
20
- var closeModal = function closeModal(e) {
21
- if ((!e.target.closest("#".concat(id)) || e.target.closest("#close-button") || e.target.closest("#add-version")) && showModal) {
22
- document.removeEventListener("click", closeModal, false);
23
- setShowModal(false);
24
- }
25
- };
26
-
27
20
  (0, _react.useEffect)(function () {
21
+ var closeModal = function closeModal(e) {
22
+ if ((!e.target.closest("#".concat(id)) || e.target.closest("#close-button") || e.target.closest("#add-version")) && showModal) {
23
+ document.removeEventListener("click", closeModal);
24
+ setShowModal(false);
25
+ }
26
+ };
27
+
28
28
  if (showModal) {
29
- document.addEventListener("click", closeModal, false);
29
+ document.addEventListener("click", closeModal);
30
30
  }
31
-
32
- return function () {
33
- document.removeEventListener("click", closeModal, false);
34
- };
35
31
  }, [showModal]);
36
32
  return [showModal, setShowModal];
37
33
  };
@@ -280,18 +280,18 @@ var getNewStatus = function getNewStatus(statusArray) {
280
280
  statusArray.forEach(function (element) {
281
281
  return lookupString += element + "/";
282
282
  });
283
- if (lookupString.includes("RF")) return "RF";
283
+ if (lookupString.includes("RCA")) return "RCA";
284
+ if (lookupString.includes("RC")) return "RC";
284
285
  if (lookupString.includes("RA")) return "RA";
285
286
  if (lookupString.includes("RP")) return "RP";
286
- if (lookupString.includes("RC")) return "RC";
287
- if (lookupString.includes("UNASSIGNED")) return "IN_PROGRESS";
288
- if (lookupString.includes("IN_PROGRESS")) return "IN_PROGRESS";
289
- if (lookupString.includes("QF")) return "QF";
290
- if (lookupString.includes("AF")) return "AF";
287
+ if (lookupString.includes("ACA")) return "ACA";
288
+ if (lookupString.includes("PA")) return "PA";
289
+ if (lookupString.includes("CA")) return "CA";
290
+ if (lookupString.includes("IE")) return "IE";
291
+ if (lookupString.includes("AC")) return "AC";
291
292
  if (lookupString.includes("AA")) return "AA";
292
293
  if (lookupString.includes("AP")) return "AP";
293
- if (lookupString.includes("AC")) return "AC";
294
- if (lookupString.includes("RECEIVED")) return "RECEIVED";
294
+ if (lookupString.includes("R")) return "R";
295
295
  if (lookupString.includes("NA")) return "NA";
296
296
  return new Error("Status not found");
297
297
  };
package/dist/index.js CHANGED
@@ -264,7 +264,7 @@ Object.keys(_index20).forEach(function (key) {
264
264
  });
265
265
  });
266
266
 
267
- var _index21 = require("./components/atoms/StatusTag/index");
267
+ var _index21 = require("./components/atoms/Status/index");
268
268
 
269
269
  Object.keys(_index21).forEach(function (key) {
270
270
  if (key === "default" || key === "__esModule") return;
@@ -784,19 +784,6 @@ Object.keys(_OnboardPlan).forEach(function (key) {
784
784
  });
785
785
  });
786
786
 
787
- var _RegistrationLoginFirstStep = require("./components/pages/RegistrationLoginFirstStep");
788
-
789
- Object.keys(_RegistrationLoginFirstStep).forEach(function (key) {
790
- if (key === "default" || key === "__esModule") return;
791
- if (key in exports && exports[key] === _RegistrationLoginFirstStep[key]) return;
792
- Object.defineProperty(exports, key, {
793
- enumerable: true,
794
- get: function get() {
795
- return _RegistrationLoginFirstStep[key];
796
- }
797
- });
798
- });
799
-
800
787
  var _RegistrationLoginSecondStep = require("./components/pages/RegistrationLoginSecondStep");
801
788
 
802
789
  Object.keys(_RegistrationLoginSecondStep).forEach(function (key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.1.72",
3
+ "version": "21.1.75",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -6,7 +6,7 @@ import requesToProvider from "../../../assets/images/asignationOptions/requestTo
6
6
  import requestToTeam from "../../../assets/images/asignationOptions/requestToTeam.svg";
7
7
  import availableIcon from "../../../assets/images/asignationOptions/availableIcon.svg";
8
8
  import { getNewStatus } from "../../../global-files/data";
9
- import { StatusTag } from "../StatusTag";
9
+ import { Status } from "../Status";
10
10
 
11
11
  export const AsignationOption = ({
12
12
  profileImage,
@@ -51,7 +51,7 @@ export const AsignationOption = ({
51
51
  {asignationType && iconsAsignation[asignationType]}
52
52
  {services && (
53
53
  <div className="status-container">
54
- <StatusTag statusType={getStatus()} />
54
+ <Status statusType={getStatus()} />
55
55
  </div>
56
56
  )}
57
57
  {active && <div className="green-circle"></div>}
@@ -3,18 +3,18 @@ import { ProductPercentCard } from "./index";
3
3
  const status = [
4
4
  "-",
5
5
  "Pr",
6
- "Rc",
7
- "As",
8
- "P",
9
- "QF",
10
- "AF",
6
+ "R",
7
+ "AS",
8
+ "CA",
9
+ "IE",
10
+ "AC",
11
11
  "AA",
12
12
  "AP",
13
- "AC",
13
+ "ACA",
14
14
  "RA",
15
- "RF",
16
- "RP",
17
15
  "RC",
16
+ "RP",
17
+ "RCA",
18
18
  "Ex",
19
19
  ];
20
20
 
@@ -29,13 +29,12 @@ export default {
29
29
  },
30
30
  };
31
31
 
32
- const Template = (args) => <ProductPercentCard {...args}/>;
32
+ const Template = (args) => <ProductPercentCard {...args} />;
33
33
 
34
- export const ProductPercentCardDefault = Template.bind ({});
34
+ export const ProductPercentCardDefault = Template.bind({});
35
35
 
36
36
  ProductPercentCardDefault.args = {
37
37
  statusType: "-",
38
38
  productsInStatus: 0,
39
39
  totalProcucts: 0,
40
-
41
- };
40
+ };
@@ -8,8 +8,8 @@ export const Container = styled.div`
8
8
  height: 83px;
9
9
  padding: 10px;
10
10
 
11
- &.status-Pr,
12
- &.status-Rc {
11
+ &.status-PA,
12
+ &.status-RC {
13
13
  border: 1px solid ${GlobalColors.reception};
14
14
  .span {
15
15
  color: ${GlobalColors.reception};
@@ -22,19 +22,19 @@ export const Container = styled.div`
22
22
  }
23
23
  }
24
24
 
25
- &.status-As,
26
- &.status-P,
27
- &.status-QF {
25
+ &.status-AS,
26
+ &.status-CA,
27
+ &.status-IE {
28
28
  border: 1px solid ${GlobalColors.in_progress};
29
29
  .span {
30
30
  color: ${GlobalColors.in_progress};
31
31
  }
32
32
  }
33
33
 
34
- &.status-AF,
34
+ &.status-AC,
35
35
  &.status-AA,
36
36
  &.status-AP,
37
- &.status-AC {
37
+ &.status-ACA {
38
38
  border: 1px solid ${GlobalColors.finished};
39
39
  .span {
40
40
  color: ${GlobalColors.finished};
@@ -42,9 +42,9 @@ export const Container = styled.div`
42
42
  }
43
43
 
44
44
  &.status-RA,
45
- &.status-RF,
45
+ &.status-RC,
46
46
  &.status-RP,
47
- &.status-RC {
47
+ &.status-RCA {
48
48
  border: 1px solid #d74ded;
49
49
  .span {
50
50
  color: #d74ded;
@@ -0,0 +1,14 @@
1
+ import { Status } from "./index";
2
+
3
+ export default {
4
+ title: "Components/atoms/Status",
5
+ component: Status,
6
+ };
7
+
8
+ const Template = (args) => <Status {...args} />;
9
+
10
+ export const StatusDefault = Template.bind({});
11
+ StatusDefault.args = {
12
+ statusType: "IE",
13
+ ovalForm: false,
14
+ };
@@ -0,0 +1,9 @@
1
+ import { Container } from "./styles";
2
+
3
+ export const Status = ({ statusType, ovalForm }) => {
4
+ return (
5
+ <Container className={`status-${statusType} ${ovalForm && "oval-form"}`}>
6
+ <p>{statusType}</p>
7
+ </Container>
8
+ );
9
+ };
@@ -16,30 +16,27 @@ export const Container = styled.div`
16
16
  line-height: 20px;
17
17
  }
18
18
 
19
- &.status-As,
20
- &.status-P,
21
- &.status-IN_PROGRESS,
22
- &.status-QF {
19
+ &.status-CA,
20
+ &.status-IE {
23
21
  background-color: ${GlobalColors.in_progress};
24
22
  }
25
23
 
26
- &.status-Pr,
27
- &.status-Rr,
28
- &.status-Rc {
24
+ &.status-R,
25
+ &.status-AS {
29
26
  background-color: ${GlobalColors.reception};
30
27
  }
31
28
 
32
29
  &.status-AA,
33
30
  &.status-AP,
34
31
  &.status-AC,
35
- &.status-AF {
32
+ &.status-ACA {
36
33
  background-color: ${GlobalColors.finished};
37
34
  }
38
35
 
39
36
  &.status-RA,
40
- &.status-RF,
37
+ &.status-RC,
41
38
  &.status-RP,
42
- &.status-RC {
39
+ &.status-RCA {
43
40
  background-color: ${GlobalColors.rejected_status};
44
41
  }
45
42
 
@@ -5,18 +5,18 @@ import assignedImage2 from "../../../assets/images/componentAssigned/assignedIma
5
5
  const status = [
6
6
  "-",
7
7
  "Pr",
8
- "Rc",
9
- "As",
10
- "P",
11
- "QF",
12
- "AF",
8
+ "R",
9
+ "AS",
10
+ "CA",
11
+ "IE",
12
+ "AC",
13
13
  "AA",
14
14
  "AP",
15
- "AC",
15
+ "ACA",
16
16
  "RA",
17
- "RF",
18
- "RP",
19
17
  "RC",
18
+ "RP",
19
+ "RCA",
20
20
  "Ex",
21
21
  ];
22
22
 
@@ -9,8 +9,8 @@ export const Container = styled.div`
9
9
  padding-bottom: 5px;
10
10
  position: relative;
11
11
 
12
- &.status-Pr,
13
- &.status-Rc {
12
+ &.status-PA,
13
+ &.status-R {
14
14
  border: 1px solid ${GlobalColors.reception};
15
15
  .header-and-paragraph {
16
16
  color: ${GlobalColors.reception};
@@ -23,19 +23,19 @@ export const Container = styled.div`
23
23
  }
24
24
  }
25
25
 
26
- &.status-As,
27
- &.status-P,
28
- &.status-QF {
26
+ &.status-AA,
27
+ &.status-CA,
28
+ &.status-IE {
29
29
  border: 1px solid ${GlobalColors.in_progress};
30
30
  .header-and-paragraph {
31
31
  color: ${GlobalColors.in_progress};
32
32
  }
33
33
  }
34
34
 
35
- &.status-AF,
35
+ &.status-AC,
36
36
  &.status-AA,
37
37
  &.status-AP,
38
- &.status-AC {
38
+ &.status-ACA {
39
39
  border: 1px solid ${GlobalColors.finished};
40
40
  .header-and-paragraph {
41
41
  color: ${GlobalColors.finished};
@@ -43,9 +43,9 @@ export const Container = styled.div`
43
43
  }
44
44
 
45
45
  &.status-RA,
46
- &.status-RF,
46
+ &.status-RC,
47
47
  &.status-RP,
48
- &.status-RC {
48
+ &.status-RCA {
49
49
  border: 1px solid #d74ded;
50
50
  .header-and-paragraph {
51
51
  color: #d74ded;
@@ -56,7 +56,6 @@ export const Container = styled.div`
56
56
  border: 1px solid ${GlobalColors.exported};
57
57
  .header-and-paragraph {
58
58
  color: ${GlobalColors.exported};
59
-
60
59
  }
61
60
  }
62
61
 
@@ -1,6 +1,6 @@
1
1
  import { Container } from "./styles";
2
2
  import { ScreenHeader } from "../../atoms/ScreenHeader/index";
3
- import { StatusTag } from "../../atoms/StatusTag/index";
3
+ import { Status } from "../../atoms/Status/index";
4
4
  import { ProgressBar } from "../../atoms/ProgressBar/index";
5
5
  import { PriorityFlag } from "../../atoms/PriorityFlag/index";
6
6
 
@@ -14,7 +14,7 @@ export const ProductNameHeader = ({
14
14
  return (
15
15
  <Container>
16
16
  <ScreenHeader headerType={"product-name-header"} text={productName} />
17
- <StatusTag statusType={statusType} />
17
+ <Status statusType={statusType} />
18
18
  <ProgressBar percent={percent} progressBarType={statusType} />
19
19
  <PriorityFlag priority={priority} />
20
20
  <ScreenHeader headerType={"date-header"} text={date} />
@@ -1,7 +1,7 @@
1
1
  import { Container } from "./styles";
2
2
  import { ScreenHeader } from "../../atoms/ScreenHeader/index";
3
3
  import { Avatar } from "../../atoms/Avatar";
4
- import { StatusTag } from "../../atoms/StatusTag/index";
4
+ import { Status as StatusTag } from "../../atoms/Status/index";
5
5
  import { Button } from "../../atoms/GeneralButton";
6
6
  import { useEffect, useState } from "react";
7
7
  import { AsignationOption } from "../../atoms/AsignationOption/index";
@@ -26,7 +26,7 @@ export const FullProductNameHeader = ({
26
26
  const element = [];
27
27
  servicesData.forEach((sd) => {
28
28
  if (sd.id_retailer === rt.id) {
29
- element.push(sd.status ? sd.status : "RECEIVED");
29
+ element.push(sd.status ? sd.status : "R");
30
30
  } else element.push("NA");
31
31
  rt["services"] = element;
32
32
  });
@@ -81,4 +81,4 @@ export const FullProductNameHeader = ({
81
81
  </div>
82
82
  </Container>
83
83
  );
84
- };
84
+ };
@@ -12,8 +12,8 @@ export const ProviderProductEditionDefault = Template.bind({});
12
12
  ProviderProductEditionDefault.args = {
13
13
  tabsSections: {
14
14
  Descripción: true,
15
- "Ficha técnica": false,
16
- Imágenes: false,
15
+ "Ficha técnica": true,
16
+ Imágenes: true,
17
17
  },
18
18
  token:
19
19
  "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5ZTQ0OGMwZS0xOGVkLTRlYWYtOWY4OC0zYjMxOTdkNGEyZmQiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjllNDQ4YzBlLTE4ZWQtNGVhZi05Zjg4LTNiMzE5N2Q0YTJmZCIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiI5ODg5YTFhYi1mMTljLTRiNzQtYjQ5Ni0xZDM3YzZjY2U3YmQiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NjQzMTQ5OCwibmFtZSI6IkdlcnNvbiBNYXJ0w61uZXoiLCJwaG9uZV9udW1iZXIiOiIrNTIxMjMxMjMxMjMiLCJleHAiOjE2NTY0MzUwOTgsImlhdCI6MTY1NjQzMTQ5OCwiZW1haWwiOiJnbWFydGluZXpAY29udGVudG9oLmNvbSJ9.qMBMYKxcaQrXT-3373y3K4eX73vgRApuFsT9-FVl9AuP_BKy51nHReEvwWHO4SMVpFxf3eHoQhUHG2PTl8qlvnoXlLqfCdgJEnq5DMFIOqcs_WzUHfb3k4r3y66DMzPwQI0aEk35ZYsAvkxd9m6Ax9fwJBuMCpb3jf7Az0SBpDvUgT7iRvS2b09UTwkW3ZIxfnaUE4uoqacoTUm7239AjuNe5Qh3UZl0rVvZ-mnh3SmAcNpxl-RtUEdcw4gO0MbIch39gIJ_1CcvBxXR2tVSUILZWfbpXI2ubA_sQZ0VJy5kWpe4pYF5beJISZ7sZ0Fzrv2ftE7poEtueYloftRfng",
@@ -96,7 +96,6 @@ ProviderProductEditionDefault.args = {
96
96
  ],
97
97
  },
98
98
  location: {
99
- product: { articleId: 109485, versionId: 3 },
100
99
  state: { origin: "Contentoh" },
101
100
  },
102
101
  user: {