contentoh-components-library 21.1.55 → 21.1.59

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 (29) hide show
  1. package/dist/components/atoms/GeneralInput/index.js +1 -0
  2. package/dist/components/molecules/HeaderTop/index.js +1 -4
  3. package/dist/components/molecules/RetailerSelector/index.js +0 -32
  4. package/dist/components/molecules/StatusAsignationInfo/index.js +2 -3
  5. package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
  6. package/dist/components/organisms/FullTabsMenu/index.js +1 -3
  7. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +64 -122
  8. package/dist/components/pages/ProviderProductEdition/index.js +348 -330
  9. package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +37 -0
  10. package/dist/components/pages/RegistrationLoginFirstStep/index.js +269 -0
  11. package/dist/components/pages/RegistrationLoginFirstStep/styles.js +20 -0
  12. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +86 -41
  13. package/dist/components/pages/RetailerProductEdition/index.js +210 -198
  14. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  15. package/dist/global-files/data.js +2 -1
  16. package/package.json +1 -1
  17. package/src/components/atoms/GeneralInput/index.js +1 -0
  18. package/src/components/atoms/ValidationPanel/index.js +1 -1
  19. package/src/components/molecules/HeaderTop/index.js +1 -6
  20. package/src/components/molecules/RetailerSelector/index.js +0 -15
  21. package/src/components/molecules/StatusAsignationInfo/index.js +2 -3
  22. package/src/components/organisms/FullProductNameHeader/index.js +1 -1
  23. package/src/components/organisms/FullTabsMenu/index.js +0 -2
  24. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +70 -140
  25. package/src/components/pages/ProviderProductEdition/index.js +170 -172
  26. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +87 -38
  27. package/src/components/pages/RetailerProductEdition/index.js +140 -166
  28. package/src/components/pages/RetailerProductEdition/styles.js +1 -1
  29. package/src/global-files/data.js +2 -1
@@ -65,6 +65,7 @@ var GeneralInput = function GeneralInput(_ref) {
65
65
  if ((optionList === null || optionList === void 0 ? void 0 : optionList.length) > 0) {
66
66
  var index = evt.target.selectedIndex;
67
67
  var valueSelected = evt.target.value;
68
+ console.log(valueSelected);
68
69
  generalValue = valueSelected;
69
70
  setTextValue({
70
71
  value: generalValue
@@ -26,10 +26,7 @@ var HeaderTop = function HeaderTop(_ref) {
26
26
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
27
27
  text: "Edici\xF3n de producto"
28
28
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
29
- buttonType: "close-button",
30
- onClick: function onClick() {
31
- window.location.href = "/products";
32
- }
29
+ buttonType: "close-button"
33
30
  })]
34
31
  });
35
32
  };
@@ -7,10 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.RetailerSelector = void 0;
9
9
 
10
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
-
12
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
13
-
14
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
15
11
 
16
12
  var _styles = require("./styles");
@@ -43,39 +39,11 @@ var RetailerSelector = function RetailerSelector(_ref) {
43
39
  }
44
40
  };
45
41
 
46
- var getRetailerImage = /*#__PURE__*/function () {
47
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
48
- return _regenerator.default.wrap(function _callee$(_context) {
49
- while (1) {
50
- switch (_context.prev = _context.next) {
51
- case 0:
52
- console.log("https://content-management-images.s3.amazonaws.com/retailers/".concat(activeRetailer.id, ".png"));
53
- activeRetailer.image = "https://content-management-images.s3.amazonaws.com/retailers/".concat(activeRetailer.id, ".png");
54
- retailers.forEach(function (retailer) {
55
- return retailer.image = "https://content-management-images.s3.amazonaws.com/retailers/".concat(retailer.id, ".png");
56
- });
57
-
58
- case 3:
59
- case "end":
60
- return _context.stop();
61
- }
62
- }
63
- }, _callee);
64
- }));
65
-
66
- return function getRetailerImage() {
67
- return _ref2.apply(this, arguments);
68
- };
69
- }();
70
-
71
42
  (0, _react.useEffect)(function () {
72
43
  if (retailersPanel) {
73
44
  document.addEventListener("click", closeRetailersPanel, false);
74
45
  }
75
46
  }, [retailersPanel]);
76
- (0, _react.useEffect)(function () {
77
- getRetailerImage();
78
- }, [activeRetailer]);
79
47
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
80
48
  id: "retailers-assignation",
81
49
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.Avatar, {
@@ -54,8 +54,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
54
54
  _ref$id = _ref.id,
55
55
  id = _ref$id === void 0 ? "default-id" : _ref$id,
56
56
  onClickSave = _ref.onClickSave,
57
- showSaveButton = _ref.showSaveButton,
58
- canAssign = _ref.canAssign;
57
+ showSaveButton = _ref.showSaveButton;
59
58
 
60
59
  var _useState = (0, _react.useState)(false),
61
60
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -147,7 +146,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
147
146
  color: "#969696",
148
147
  fontFamily: "Avenir Next",
149
148
  headerType: "input-name-header"
150
- }), showAsignationPanel && canAssign && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
149
+ }), showAsignationPanel && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
151
150
  className: "asignation-panel",
152
151
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
153
152
  className: "asignation-header",
@@ -47,7 +47,7 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
47
47
  var element = [];
48
48
  servicesData.forEach(function (sd) {
49
49
  if (sd.id_retailer === rt.id) {
50
- element.push(sd.status ? sd.status : "RECEIVED");
50
+ element.push(sd.status ? sd.status : "R");
51
51
  } else element.push("NA");
52
52
 
53
53
  rt["services"] = element;
@@ -32,8 +32,7 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
32
32
  downloadImages = _ref.downloadImages,
33
33
  askToDeleteImages = _ref.askToDeleteImages,
34
34
  onClickSave = _ref.onClickSave,
35
- showSaveButton = _ref.showSaveButton,
36
- canAssign = _ref.canAssign;
35
+ showSaveButton = _ref.showSaveButton;
37
36
 
38
37
  var _useState = (0, _react.useState)(false),
39
38
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -46,7 +45,6 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
46
45
  setImagesSection: setImagesSection,
47
46
  setActiveTab: setActiveTab
48
47
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.StatusAsignationInfo, {
49
- canAssign: canAssign,
50
48
  status: status,
51
49
  activeTab: activeTab,
52
50
  setImageLayout: setImageLayout,
@@ -31,123 +31,65 @@ ProviderProductEditionDefault.args = {
31
31
  "Ficha técnica": false,
32
32
  Imágenes: false
33
33
  },
34
- token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZ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25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJiNmYyMTUyNi05Y2M1LTQwZTYtYjY5Yi1lNDljZDk1MWNlMzUiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1ODE5MTg4MSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2NTgxOTU0ODEsImlhdCI6MTY1ODE5MTg4MSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.Ng3EvhD6fMIoHcpQW-K_KOoVqsBfK6zZ5iVOa8UbFtBEjFnhhvJ76xxpDfpsZ7ywTdIN0618qA-GlG99sbmnG0es_2gwADB9awSyRL0-zEJyNmlPeUcrK59RI6VVQGey8mzUUvBbebeV_4NfkAt_wvBuYcVUMMSadnbw86l4fbHX9k3um_00hhwJd4wS8OYRGW2b8QsiRl7S9ocxuLwVdGRxcGEK2xFjJwIW2YPMe9IMY8euK59-Gl2rLFo2TgkR9lQMpSJOhd9Ujl-8zbsqY-Pc2wK9OmndhzlQaw2upmitFapGi2SStvT4DWP4NxvGsAZX8nmqWhf5iXeM7OSbCg",
35
35
  articleId: 238,
36
36
  category: 846,
37
37
  version: 2,
38
38
  productSelected: {
39
- orderId: 55,
40
- article_status: "AP",
41
- datasheet_status: "AP",
42
- description_status: "AP",
43
- images_status: "AP",
44
- prio: "none",
39
+ id_article: 76125,
40
+ id_category: "682",
41
+ name: "prueba 11",
42
+ upc: "35646655",
43
+ timestamp: "2022-07-01T16:21:23.000Z",
44
+ status: "NULL",
45
+ categoryName: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
46
+ asignations: [],
45
47
  version: 2,
46
- brand: null,
47
- article: {
48
- category: "ILUMINACIÓN|FOCOS|FOCOS",
49
- company_name: "THD Proveedor",
48
+ version_status: "R",
49
+ retailersAvailable: [{
50
+ id: 2,
51
+ name: "Walmart Mercancías Generales",
50
52
  country: "México",
51
- id_category: "2143",
52
- id_article: 55118,
53
- name: "FOCO BLUETOOTH SPOT PHILIPS 6 WATTS 300 LÚMENES MULTICOLOR",
54
- upc: "145582"
55
- },
56
- retailers: [{
57
- id: 58,
58
- name: "The Home Depot Golden",
59
- services: ["AA", "AA", "AA", "AA"]
60
- }, {
61
- id: 59,
62
- name: "The Home Depot Platinum",
63
- services: ["NA", "NA", "NA", "AA"]
53
+ id_region: 1,
54
+ active: 1
64
55
  }, {
65
- id: 60,
66
- name: "The Home Depot Resizing"
56
+ id: 3,
57
+ name: "Sam´s Club",
58
+ country: "México",
59
+ id_region: 1,
60
+ active: 1
67
61
  }, {
68
- id: 61,
69
- name: "Home Depot TAB"
62
+ id: 5,
63
+ name: "Chedraui",
64
+ country: "México",
65
+ id_region: 1,
66
+ active: 1
70
67
  }],
71
- services: {
72
- datasheets: 1,
73
- descriptions: 1,
74
- images: 1
75
- },
76
- id_article: 55118,
77
- retailersAvailable: [{
78
- id: 58,
79
- name: "The Home Depot Golden",
80
- percentage: 100
81
- }, {
82
- id: 59,
83
- name: "The Home Depot Platinum",
84
- percentage: 100
85
- }, {
86
- id: 60,
87
- name: "The Home Depot Resizing"
88
- }, {
89
- id: 61,
90
- name: "Home Depot TAB"
91
- }]
68
+ missing: {}
92
69
  },
93
70
  productToEdit: {
94
- ArticleId: 55118,
95
- idCategory: "2143",
96
- product: {
97
- orderId: 55,
98
- article_status: "AP",
99
- datasheet_status: "AP",
100
- description_status: "AP",
101
- images_status: "AP",
102
- prio: "none",
103
- version: 2,
104
- brand: null,
105
- article: {
106
- category: "ILUMINACIÓN|FOCOS|FOCOS",
107
- company_name: "THD Proveedor",
108
- country: "México",
109
- id_category: "2143",
110
- id_article: 55118,
111
- name: "FOCO BLUETOOTH SPOT PHILIPS 6 WATTS 300 LÚMENES MULTICOLOR",
112
- upc: "145582"
113
- },
114
- retailers: [{
115
- id: 58,
116
- name: "The Home Depot Golden",
117
- services: ["AA", "AA", "AA", "NA"]
118
- }, {
119
- id: 59,
120
- name: "The Home Depot Platinum",
121
- services: ["NA", "NA", "NA", "AA"]
122
- }, {
123
- id: 60,
124
- name: "The Home Depot Resizing"
125
- }, {
126
- id: 61,
127
- name: "Home Depot TAB"
128
- }],
129
- services: {
130
- datasheets: 1,
131
- descriptions: 1,
132
- images: 1
133
- },
134
- id_article: 55118,
71
+ idCategory: "3028",
72
+ ArticleId: 76175,
73
+ product: [{
74
+ id_article: 76175,
75
+ id_category: "3028",
76
+ name: "Producto 1 C",
77
+ upc: "18072021",
78
+ timestamp: "2022-07-18T19:25:34.000Z",
79
+ status: "NULL",
80
+ categoryName: "Eléctrico|Casa Inteligente|Asistentes Inteligentes",
81
+ asignations: [],
82
+ version: 1,
83
+ version_status: null,
135
84
  retailersAvailable: [{
136
85
  id: 58,
137
86
  name: "The Home Depot Golden",
138
- percentage: 100
139
- }, {
140
- id: 59,
141
- name: "The Home Depot Platinum",
142
- percentage: 100
143
- }, {
144
- id: 60,
145
- name: "The Home Depot Resizing"
146
- }, {
147
- id: 61,
148
- name: "Home Depot TAB"
149
- }]
150
- }
87
+ country: "México",
88
+ id_region: 1,
89
+ active: 1
90
+ }],
91
+ missing: {}
92
+ }]
151
93
  },
152
94
  location: {
153
95
  product: {
@@ -155,40 +97,40 @@ ProviderProductEditionDefault.args = {
155
97
  versionId: 3
156
98
  },
157
99
  state: {
158
- origin: "Contentoh"
100
+ origin: "RequestWithContentoh"
159
101
  }
160
102
  },
161
103
  user: {
162
- id_user: 59,
163
- name: "The Home",
164
- last_name: "Depot",
165
- email: "cadena.ismael@allfreemail.net",
166
- position: "Admin",
104
+ id_user: 28,
105
+ name: "Proveedor",
106
+ last_name: "Colgate",
107
+ email: "ilopez@contentoh.com",
108
+ position: "Prueba Admin",
167
109
  telephone: "+523111366336",
168
110
  country: "México",
169
- id_company: 7,
170
- id_cognito: "5884ae34-59d6-4454-b98e-821518bcc3a7",
111
+ id_company: 1,
112
+ id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
171
113
  birth_Date: null,
172
114
  about_me: null,
173
115
  zip_code: null,
174
116
  address: null,
175
117
  job: null,
176
- id_stripe: "",
118
+ id_stripe: "cus_KuEt6R6vwmN09f",
177
119
  id_role: 0,
178
120
  active: 1,
179
121
  is_retailer: 0,
180
- email_notify: 1,
122
+ email_notify: 0,
181
123
  membership: {
182
- id: 24,
183
- start_date: "2021-11-23T03:35:50.000Z",
184
- end_date: "2022-11-23T03:35:50.000Z",
185
- planID: 9,
186
- plan: "prod_KtlkzZVGq6bRTO",
187
- name: "Plan Enterprise Full",
188
- user_limit: "30",
189
- products_limit: "10000",
124
+ id: 76,
125
+ start_date: "2022-01-18T17:25:35.000Z",
126
+ end_date: "2023-01-18T17:25:35.000Z",
127
+ planID: 8,
128
+ plan: "prod_KtlhECVSFG2iro",
129
+ name: "Plan Pro",
130
+ user_limit: "20",
131
+ products_limit: "5000",
190
132
  type: "Enterprise"
191
133
  },
192
- src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1656113146885"
134
+ src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1658189942624"
193
135
  }
194
136
  };