contentoh-components-library 21.5.99 → 21.6.0

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 (63) hide show
  1. package/dist/components/atoms/GeneralButton/styles.js +1 -1
  2. package/dist/components/atoms/GeneralInput/index.js +249 -54
  3. package/dist/components/atoms/GeneralInput/styles.js +7 -3
  4. package/dist/components/atoms/InputFormatter/index.js +223 -68
  5. package/dist/components/atoms/InputFormatter/styles.js +20 -4
  6. package/dist/components/molecules/StatusAsignationInfo/index.js +11 -1
  7. package/dist/components/molecules/TabsMenu/index.js +13 -1
  8. package/dist/components/molecules/TagAndInput/index.js +364 -24
  9. package/dist/components/molecules/TagAndInput/styles.js +2 -2
  10. package/dist/components/organisms/FullProductNameHeader/index.js +6 -22
  11. package/dist/components/organisms/InputGroup/index.js +22 -18
  12. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +150 -337
  13. package/dist/components/pages/ProviderProductEdition/context/provider-product-edition.context.js +15 -15
  14. package/dist/components/pages/ProviderProductEdition/index.js +393 -352
  15. package/dist/components/pages/ProviderProductEdition/utils.js +1 -0
  16. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +125 -211
  17. package/dist/components/pages/RetailerProductEdition/index.js +1743 -2239
  18. package/dist/components/pages/RetailerProductEdition/styles.js +4 -2
  19. package/dist/components/pages/RetailerProductEdition/utils.js +251 -2
  20. package/package.json +4 -2
  21. package/src/ai/utils/compare-strings.js +45 -0
  22. package/src/assets/images/Icons/arrow.png +0 -0
  23. package/src/assets/images/Icons/cancel.png +0 -0
  24. package/src/assets/images/Icons/ia-icon.png +0 -0
  25. package/src/assets/images/Icons/loading.svg +5 -0
  26. package/src/assets/images/Icons/reload.png +0 -0
  27. package/src/components/atoms/GeneralButton/styles.js +4 -0
  28. package/src/components/atoms/GeneralInput/index.js +241 -60
  29. package/src/components/atoms/GeneralInput/styles.js +81 -0
  30. package/src/components/atoms/InputFormatter/index.js +200 -51
  31. package/src/components/atoms/InputFormatter/styles.js +284 -0
  32. package/src/components/atoms/RetailerSelector/RetailerSelector.stories.js +10 -0
  33. package/src/components/atoms/RetailerSelector/index.js +3 -0
  34. package/src/components/atoms/RetailerSelector/styles.js +0 -0
  35. package/src/components/molecules/StatusAsignationInfo/index.js +9 -1
  36. package/src/components/molecules/TabsMenu/index.js +12 -0
  37. package/src/components/molecules/TagAndInput/index.js +294 -21
  38. package/src/components/molecules/TagAndInput/styles.js +59 -17
  39. package/src/components/organisms/ChangeStatusModal/index.jsx +488 -0
  40. package/src/components/organisms/ChangeStatusModal/styles.js +333 -0
  41. package/src/components/organisms/FullProductNameHeader/index.js +4 -28
  42. package/src/components/organisms/FullTabsMenu/index.js +1 -1
  43. package/src/components/organisms/InputGroup/index.js +12 -4
  44. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +174 -202
  45. package/src/components/pages/ProviderProductEdition/context/provider-product-edition.context.jsx +14 -14
  46. package/src/components/pages/ProviderProductEdition/index.js +486 -417
  47. package/src/components/pages/ProviderProductEdition/utils.js +2 -2
  48. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +136 -243
  49. package/src/components/pages/RetailerProductEdition/context/provider-product-edition.context.jsx +575 -0
  50. package/src/components/pages/RetailerProductEdition/context/provider-product-edition.reducer.js +62 -0
  51. package/src/components/pages/RetailerProductEdition/context/reducers/active-state.js +344 -0
  52. package/src/components/pages/RetailerProductEdition/context/reducers/inputs.js +155 -0
  53. package/src/components/pages/RetailerProductEdition/context/reducers/product.js +114 -0
  54. package/src/components/pages/RetailerProductEdition/context/reducers/system.js +60 -0
  55. package/src/components/pages/RetailerProductEdition/index.js +1580 -1719
  56. package/src/components/pages/RetailerProductEdition/index_old.js +1979 -0
  57. package/src/components/pages/RetailerProductEdition/stories/Auditor.stories.js +101 -0
  58. package/src/components/pages/RetailerProductEdition/stories/ImageEditor.stories.js +115 -0
  59. package/src/components/pages/RetailerProductEdition/stories/TextEditor.stories.js +174 -0
  60. package/src/components/pages/RetailerProductEdition/styles.js +67 -2
  61. package/src/components/pages/RetailerProductEdition/utils.js +240 -0
  62. package/src/contexts/AiProductEdition.jsx +347 -0
  63. package/src/global-files/statusDictionary.js +103 -0
@@ -36,357 +36,170 @@ ProviderProductEditionFromProducts.args = {
36
36
  category: 102,
37
37
  version: 3,
38
38
  productSelected: {
39
- id_article: 84864,
40
- upc: "295900788",
41
- sku: null,
42
- name: "FUNDA MÓVIL COLGANTE T FUNNY ROJO",
43
- timestamp: "2022-10-24T22:43:39.000Z",
44
- id_user: 533,
45
- categoryName: "Ropa, Accesorios, Fragancias y Joyería|Accesorios|Bolsas",
46
- id_category: 610,
47
- version: 2,
48
- retailersAvailable: [{
49
- name: "Liverpool",
50
- id: 10
51
- }, {
52
- name: "Palacio de Hierro",
53
- id: 47
54
- }],
55
- categoryRetailer: [{
56
- id_category: 6821,
57
- retailer_id: 10,
58
- categoryName: "Ropa, Accesorios, Fragancias y Joyería|Accesorios|Bolsas",
59
- retailerName: "Liverpool"
39
+ "orderId": 10458,
40
+ "status": "AA",
41
+ "datasheet_status": "AA",
42
+ "prio": "none",
43
+ "version": 3,
44
+ "description_status": "AA",
45
+ "images_status": "AA",
46
+ "brand": "Generico",
47
+ "retailerOrder": 0,
48
+ "missing": {
49
+ "datasheet": null,
50
+ "descriptions": null,
51
+ "images": null
52
+ },
53
+ "services": {
54
+ "datasheets": 1,
55
+ "descriptions": 1,
56
+ "images": 1
57
+ },
58
+ "article": {
59
+ "category": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
60
+ "company_name": "LATAM LOGISTICS",
61
+ "country": "México",
62
+ "id_category": "6186",
63
+ "id_datasheet_especialist": 426,
64
+ "id_datasheet_facilitator": null,
65
+ "id_description_especialist": 426,
66
+ "id_description_facilitator": null,
67
+ "id_images_especialist": 427,
68
+ "id_images_facilitator": null,
69
+ "id_order": 10458,
70
+ "id_article": 145207,
71
+ "id_auditor": 425,
72
+ "name": "Serna Status Bug 5",
73
+ "timestamp": "2026-05-07T15:00:25.000Z",
74
+ "upc": "897654352",
75
+ "sku": "764535242",
76
+ "categoryRetailer": [{
77
+ "id_category": 4010,
78
+ "id_retailer": 70,
79
+ "category_name": "Accesorios de Bebés|Cuarto del Bebé Niño|Cuarto del Bebé Niño",
80
+ "retailer_name": "Bodega Aurrera"
81
+ }, {
82
+ "id_category": 6186,
83
+ "id_retailer": 9,
84
+ "category_name": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
85
+ "retailer_name": "Amazon"
86
+ }]
87
+ },
88
+ "retailers": [{
89
+ "id": 9,
90
+ "name": "Amazon"
60
91
  }, {
61
- id_category: 6968,
62
- retailer_id: 47,
63
- categoryName: "Ropa, Accesorios, Fragancias y Joyería|Accesorios|Bolsas",
64
- retailerName: "Palacio de Hierro"
92
+ "id": 70,
93
+ "name": "Bodega Aurrera"
65
94
  }],
66
- percentages: [{
67
- id_retailer: 10,
68
- id_category: 6821,
69
- datasheet: {
70
- required: 100,
71
- general: 79.72
95
+ "statusByRetailer": {
96
+ "9": {
97
+ "datasheet": "AA",
98
+ "description": "AA",
99
+ "images": "AA"
72
100
  },
73
- descriptions: {
74
- required: 100,
75
- general: 100
76
- },
77
- images: {
78
- required: 100,
79
- general: 80.01,
80
- details: {
81
- mandatoryShots: {
82
- total: 1,
83
- completed: 1,
84
- percentage: 100
85
- },
86
- optionalShots: {
87
- total: 35,
88
- completed: 3,
89
- percentage: 8.57
90
- },
91
- namingAttributes: {
92
- total: 1,
93
- completed: 1,
94
- percentage: 100
95
- }
96
- }
97
- },
98
- percentagesGeneral: {
99
- required: 100,
100
- general: 63.6
101
+ "70": {
102
+ "datasheet": "AA",
103
+ "description": "AA",
104
+ "images": "AA"
101
105
  }
106
+ },
107
+ "retailersAvailable": [{
108
+ "id": 9,
109
+ "name": "Amazon"
102
110
  }, {
103
- id_retailer: 47,
104
- id_category: 6968,
105
- datasheet: {
106
- required: 100,
107
- general: 98.46
108
- },
109
- descriptions: {
110
- required: 100,
111
- general: 100
112
- },
113
- images: {
114
- required: 100,
115
- general: 80.01,
116
- details: {
117
- mandatoryShots: {
118
- total: 1,
119
- completed: 1,
120
- percentage: 100
121
- },
122
- optionalShots: {
123
- total: 35,
124
- completed: 3,
125
- percentage: 8.57
126
- },
127
- namingAttributes: {
128
- total: 1,
129
- completed: 1,
130
- percentage: 100
131
- }
132
- }
133
- },
134
- percentagesGeneral: {
135
- required: 100,
136
- general: 69.85
137
- }
111
+ "id": 70,
112
+ "name": "Bodega Aurrera"
138
113
  }],
139
- summary: {
140
- totalRelations: 2,
141
- averageRequired: 100,
142
- averageGeneral: 66.72
143
- },
144
- article: {
145
- id_article: 84864
146
- }
114
+ "categoryName": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
115
+ "upc": "897654352",
116
+ "id_article": 145207,
117
+ "id_order": 10458
147
118
  },
148
119
  productToEdit: {
149
- idCategory: 1719,
150
- ArticleId: 142443,
151
- product: [{
152
- id_article: 142443,
153
- upc: "1235125",
154
- sku: "8849443",
155
- name: "Migración instancia 2",
156
- timestamp: "2025-08-07T04:47:06.000Z",
157
- id_user: 1989,
158
- categoryName: "Supermercado|Bebidas|Agua",
159
- id_category: 1719,
160
- version: 6,
161
- retailersAvailable: [{
162
- name: "Walmart Super y Superama",
163
- id: 4
164
- }, {
165
- name: "Chedraui",
166
- id: 5
167
- }, {
168
- name: "HEB",
169
- id: 6
170
- }, {
171
- name: "La Comer",
172
- id: 12
173
- }, {
174
- name: "Soriana",
175
- id: 13
176
- }],
177
- categoryRetailer: [{
178
- id_category: 3430,
179
- retailer_id: 12,
180
- categoryName: "Departamento General La Comer|Departamento General|Departamento General",
181
- retailerName: "La Comer"
182
- }, {
183
- id_category: 4767,
184
- retailer_id: 6,
185
- categoryName: "Supermercado|Bebidas|Agua",
186
- retailerName: "HEB"
187
- }, {
188
- id_category: 4941,
189
- retailer_id: 13,
190
- categoryName: "Supermercado Soriana|Supermercado|Supermercado",
191
- retailerName: "Soriana"
192
- }, {
193
- id_category: 6098,
194
- retailer_id: 4,
195
- categoryName: "Supermercado|Bebidas|Agua",
196
- retailerName: "Walmart Super y Superama"
120
+ "ArticleId": 145207,
121
+ "idCategory": "6186",
122
+ "product": {
123
+ "orderId": 10458,
124
+ "status": "AA",
125
+ "datasheet_status": "AA",
126
+ "prio": "none",
127
+ "version": 3,
128
+ "description_status": "AA",
129
+ "images_status": "AA",
130
+ "brand": "Generico",
131
+ "retailerOrder": 0,
132
+ "missing": {
133
+ "datasheet": null,
134
+ "descriptions": null,
135
+ "images": null
136
+ },
137
+ "services": {
138
+ "datasheets": 1,
139
+ "descriptions": 1,
140
+ "images": 1
141
+ },
142
+ "article": {
143
+ "category": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
144
+ "company_name": "LATAM LOGISTICS",
145
+ "country": "México",
146
+ "id_category": "6186",
147
+ "id_datasheet_especialist": 426,
148
+ "id_datasheet_facilitator": null,
149
+ "id_description_especialist": 426,
150
+ "id_description_facilitator": null,
151
+ "id_images_especialist": 427,
152
+ "id_images_facilitator": null,
153
+ "id_order": 10458,
154
+ "id_article": 145207,
155
+ "id_auditor": 425,
156
+ "name": "Serna Status Bug 5",
157
+ "timestamp": "2026-05-07T15:00:25.000Z",
158
+ "upc": "897654352",
159
+ "sku": "764535242",
160
+ "categoryRetailer": [{
161
+ "id_category": 4010,
162
+ "id_retailer": 70,
163
+ "category_name": "Accesorios de Bebés|Cuarto del Bebé Niño|Cuarto del Bebé Niño",
164
+ "retailer_name": "Bodega Aurrera"
165
+ }, {
166
+ "id_category": 6186,
167
+ "id_retailer": 9,
168
+ "category_name": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
169
+ "retailer_name": "Amazon"
170
+ }]
171
+ },
172
+ "retailers": [{
173
+ "id": 9,
174
+ "name": "Amazon"
197
175
  }, {
198
- id_category: 6788,
199
- retailer_id: 5,
200
- categoryName: "Categoría Supermercado|Categoría Supermercado|Categoría Supermercado",
201
- retailerName: "Chedraui"
176
+ "id": 70,
177
+ "name": "Bodega Aurrera"
202
178
  }],
203
- percentages: [{
204
- id_retailer: 12,
205
- id_category: 3430,
206
- datasheet: {
207
- required: 20,
208
- general: 10
209
- },
210
- descriptions: {
211
- required: 0,
212
- general: 0
179
+ "statusByRetailer": {
180
+ "9": {
181
+ "datasheet": "AA",
182
+ "description": "AA",
183
+ "images": "AA"
213
184
  },
214
- images: {
215
- required: 64.99,
216
- general: 51.99,
217
- details: {
218
- mandatoryShots: {
219
- total: 2,
220
- completed: 1,
221
- percentage: 50
222
- },
223
- optionalShots: {
224
- total: 10,
225
- completed: 0,
226
- percentage: 0
227
- },
228
- namingAttributes: {
229
- total: 1,
230
- completed: 1,
231
- percentage: 100
232
- }
233
- }
234
- },
235
- percentagesGeneral: {
236
- required: 23.33,
237
- general: 6.11
238
- }
239
- }, {
240
- id_retailer: 6,
241
- id_category: 4767,
242
- datasheet: {
243
- required: 25,
244
- general: 16.66
245
- },
246
- descriptions: {
247
- required: 0,
248
- general: 0
249
- },
250
- images: {
251
- required: 100,
252
- general: 80.01,
253
- details: {
254
- mandatoryShots: {
255
- total: 1,
256
- completed: 1,
257
- percentage: 100
258
- },
259
- optionalShots: {
260
- total: 36,
261
- completed: 2,
262
- percentage: 5.55
263
- },
264
- namingAttributes: {
265
- total: 1,
266
- completed: 1,
267
- percentage: 100
268
- }
269
- }
270
- },
271
- percentagesGeneral: {
272
- required: 41.67,
273
- general: 8.25
274
- }
275
- }, {
276
- id_retailer: 13,
277
- id_category: 4941,
278
- datasheet: {
279
- required: 14.28,
280
- general: 3.84
281
- },
282
- descriptions: {
283
- required: 0,
284
- general: 0
285
- },
286
- images: {
287
- required: 100,
288
- general: 80.01,
289
- details: {
290
- mandatoryShots: {
291
- total: 1,
292
- completed: 1,
293
- percentage: 100
294
- },
295
- optionalShots: {
296
- total: 37,
297
- completed: 2,
298
- percentage: 5.4
299
- },
300
- namingAttributes: {
301
- total: 1,
302
- completed: 1,
303
- percentage: 100
304
- }
305
- }
306
- },
307
- percentagesGeneral: {
308
- required: 38.09,
309
- general: 3.91
310
- }
311
- }, {
312
- id_retailer: 4,
313
- id_category: 6098,
314
- datasheet: {
315
- required: 20,
316
- general: 4.54
317
- },
318
- descriptions: {
319
- required: 0,
320
- general: 0
321
- },
322
- images: {
323
- required: 100,
324
- general: 80.01,
325
- details: {
326
- mandatoryShots: {
327
- total: 1,
328
- completed: 1,
329
- percentage: 100
330
- },
331
- optionalShots: {
332
- total: 37,
333
- completed: 3,
334
- percentage: 8.1
335
- },
336
- namingAttributes: {
337
- total: 1,
338
- completed: 1,
339
- percentage: 100
340
- }
341
- }
342
- },
343
- percentagesGeneral: {
344
- required: 40,
345
- general: 5.02
185
+ "70": {
186
+ "datasheet": "AA",
187
+ "description": "AA",
188
+ "images": "AA"
346
189
  }
190
+ },
191
+ "retailersAvailable": [{
192
+ "id": 9,
193
+ "name": "Amazon"
347
194
  }, {
348
- id_retailer: 5,
349
- id_category: 6788,
350
- datasheet: {
351
- required: 7.14,
352
- general: 2.63
353
- },
354
- descriptions: {
355
- required: 0,
356
- general: 0
357
- },
358
- images: {
359
- required: 100,
360
- general: 80,
361
- details: {
362
- mandatoryShots: {
363
- total: 1,
364
- completed: 1,
365
- percentage: 100
366
- },
367
- optionalShots: {
368
- total: 34,
369
- completed: 1,
370
- percentage: 2.94
371
- },
372
- namingAttributes: {
373
- total: 1,
374
- completed: 1,
375
- percentage: 100
376
- }
377
- }
378
- },
379
- percentagesGeneral: {
380
- required: 35.71,
381
- general: 2.78
382
- }
195
+ "id": 70,
196
+ "name": "Bodega Aurrera"
383
197
  }],
384
- summary: {
385
- totalRelations: 5,
386
- averageRequired: 35.76,
387
- averageGeneral: 5.21
388
- }
389
- }]
198
+ "categoryName": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
199
+ "upc": "897654352",
200
+ "id_article": 145207,
201
+ "id_order": 10458
202
+ }
390
203
  },
391
204
  location: {
392
205
  pathname: "/EditProducts",
@@ -57,7 +57,20 @@ var myBucket = new _awsSdk.default.S3({
57
57
  }); // Re-export ACTIONS for external use
58
58
 
59
59
  // Create context
60
- var ProductEditionContext = /*#__PURE__*/(0, _react.createContext)(); // Provider component
60
+ var ProductEditionContext = /*#__PURE__*/(0, _react.createContext)(); // Custom hook to use the context
61
+
62
+ var useProviderProductEdition = function useProviderProductEdition() {
63
+ var context = (0, _react.useContext)(ProductEditionContext);
64
+
65
+ if (!context) {
66
+ throw new Error("useProviderProductEdition must be used within a ProviderProductEditionProvider");
67
+ }
68
+
69
+ return context;
70
+ }; // Provider component
71
+
72
+
73
+ exports.useProviderProductEdition = useProviderProductEdition;
61
74
 
62
75
  var ProviderProductEditionProvider = function ProviderProductEditionProvider(_ref) {
63
76
  var children = _ref.children;
@@ -604,17 +617,4 @@ var ProviderProductEditionProvider = function ProviderProductEditionProvider(_re
604
617
  });
605
618
  };
606
619
 
607
- exports.ProviderProductEditionProvider = ProviderProductEditionProvider;
608
-
609
- // Custom hook to use the context
610
- var useProviderProductEdition = function useProviderProductEdition() {
611
- var context = (0, _react.useContext)(ProductEditionContext);
612
-
613
- if (!context) {
614
- throw new Error("useProviderProductEdition must be used within a ProviderProductEditionProvider");
615
- }
616
-
617
- return context;
618
- };
619
-
620
- exports.useProviderProductEdition = useProviderProductEdition;
620
+ exports.ProviderProductEditionProvider = ProviderProductEditionProvider;