contentoh-components-library 21.5.92 → 21.5.93

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 (70) hide show
  1. package/dist/components/atoms/GeneralButton/styles.js +1 -1
  2. package/dist/components/atoms/GeneralInput/index.js +54 -245
  3. package/dist/components/atoms/GeneralInput/styles.js +3 -7
  4. package/dist/components/atoms/InputFormatter/index.js +68 -223
  5. package/dist/components/atoms/InputFormatter/styles.js +4 -20
  6. package/dist/components/molecules/StatusAsignationInfo/index.js +1 -11
  7. package/dist/components/molecules/TabsMenu/index.js +12 -13
  8. package/dist/components/molecules/TagAndInput/index.js +24 -361
  9. package/dist/components/molecules/TagAndInput/styles.js +2 -2
  10. package/dist/components/organisms/FullProductNameHeader/index.js +22 -6
  11. package/dist/components/organisms/InputGroup/index.js +18 -22
  12. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +337 -150
  13. package/dist/components/pages/ProviderProductEdition/context/provider-product-edition.context.js +15 -15
  14. package/dist/components/pages/ProviderProductEdition/index.js +362 -368
  15. package/dist/components/pages/ProviderProductEdition/utils.js +0 -1
  16. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +196 -179
  17. package/dist/components/pages/RetailerProductEdition/context/provider-product-edition.context.js +260 -59
  18. package/dist/components/pages/RetailerProductEdition/context/reducers/product.js +38 -50
  19. package/dist/components/pages/RetailerProductEdition/index.js +2234 -1716
  20. package/dist/components/pages/RetailerProductEdition/styles.js +2 -4
  21. package/dist/components/pages/RetailerProductEdition/utils.js +2 -251
  22. package/dist/contexts/AiProductEdition.js +158 -230
  23. package/package.json +2 -4
  24. package/src/components/atoms/GeneralButton/styles.js +0 -4
  25. package/src/components/atoms/GeneralInput/index.js +60 -237
  26. package/src/components/atoms/GeneralInput/styles.js +0 -81
  27. package/src/components/atoms/InputFormatter/index.js +51 -200
  28. package/src/components/atoms/InputFormatter/styles.js +0 -284
  29. package/src/components/molecules/StatusAsignationInfo/index.js +1 -9
  30. package/src/components/molecules/TabsMenu/index.js +11 -12
  31. package/src/components/molecules/TagAndInput/index.js +21 -286
  32. package/src/components/molecules/TagAndInput/styles.js +17 -59
  33. package/src/components/organisms/FullProductNameHeader/index.js +28 -4
  34. package/src/components/organisms/FullTabsMenu/index.js +1 -1
  35. package/src/components/organisms/InputGroup/index.js +4 -12
  36. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +202 -174
  37. package/src/components/pages/ProviderProductEdition/context/provider-product-edition.context.jsx +14 -14
  38. package/src/components/pages/ProviderProductEdition/index.js +452 -453
  39. package/src/components/pages/ProviderProductEdition/utils.js +2 -2
  40. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +224 -201
  41. package/src/components/pages/RetailerProductEdition/index.js +1718 -1547
  42. package/src/components/pages/RetailerProductEdition/styles.js +2 -67
  43. package/src/components/pages/RetailerProductEdition/utils.js +0 -240
  44. package/dist/ai/utils/compare-strings.js +0 -45
  45. package/dist/components/organisms/ChangeStatusModal/index.js +0 -531
  46. package/dist/components/organisms/ChangeStatusModal/styles.js +0 -85
  47. package/dist/global-files/statusDictionary.js +0 -103
  48. package/src/ai/utils/compare-strings.js +0 -45
  49. package/src/assets/images/Icons/arrow.png +0 -0
  50. package/src/assets/images/Icons/cancel.png +0 -0
  51. package/src/assets/images/Icons/ia-icon.png +0 -0
  52. package/src/assets/images/Icons/loading.svg +0 -5
  53. package/src/assets/images/Icons/reload.png +0 -0
  54. package/src/components/atoms/RetailerSelector/RetailerSelector.stories.js +0 -10
  55. package/src/components/atoms/RetailerSelector/index.js +0 -3
  56. package/src/components/atoms/RetailerSelector/styles.js +0 -0
  57. package/src/components/organisms/ChangeStatusModal/index.jsx +0 -488
  58. package/src/components/organisms/ChangeStatusModal/styles.js +0 -333
  59. package/src/components/pages/RetailerProductEdition/context/provider-product-edition.context.jsx +0 -575
  60. package/src/components/pages/RetailerProductEdition/context/provider-product-edition.reducer.js +0 -62
  61. package/src/components/pages/RetailerProductEdition/context/reducers/active-state.js +0 -344
  62. package/src/components/pages/RetailerProductEdition/context/reducers/inputs.js +0 -155
  63. package/src/components/pages/RetailerProductEdition/context/reducers/product.js +0 -114
  64. package/src/components/pages/RetailerProductEdition/context/reducers/system.js +0 -60
  65. package/src/components/pages/RetailerProductEdition/index_old.js +0 -1979
  66. package/src/components/pages/RetailerProductEdition/stories/Auditor.stories.js +0 -101
  67. package/src/components/pages/RetailerProductEdition/stories/ImageEditor.stories.js +0 -115
  68. package/src/components/pages/RetailerProductEdition/stories/TextEditor.stories.js +0 -174
  69. package/src/contexts/AiProductEdition.jsx +0 -339
  70. package/src/global-files/statusDictionary.js +0 -103
@@ -36,170 +36,357 @@ ProviderProductEditionFromProducts.args = {
36
36
  category: 102,
37
37
  version: 3,
38
38
  productSelected: {
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"
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"
91
60
  }, {
92
- "id": 70,
93
- "name": "Bodega Aurrera"
61
+ id_category: 6968,
62
+ retailer_id: 47,
63
+ categoryName: "Ropa, Accesorios, Fragancias y Joyería|Accesorios|Bolsas",
64
+ retailerName: "Palacio de Hierro"
94
65
  }],
95
- "statusByRetailer": {
96
- "9": {
97
- "datasheet": "AA",
98
- "description": "AA",
99
- "images": "AA"
66
+ percentages: [{
67
+ id_retailer: 10,
68
+ id_category: 6821,
69
+ datasheet: {
70
+ required: 100,
71
+ general: 79.72
100
72
  },
101
- "70": {
102
- "datasheet": "AA",
103
- "description": "AA",
104
- "images": "AA"
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
105
101
  }
106
- },
107
- "retailersAvailable": [{
108
- "id": 9,
109
- "name": "Amazon"
110
102
  }, {
111
- "id": 70,
112
- "name": "Bodega Aurrera"
113
- }],
114
- "categoryName": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
115
- "upc": "897654352",
116
- "id_article": 145207,
117
- "id_order": 10458
118
- },
119
- productToEdit: {
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
103
+ id_retailer: 47,
104
+ id_category: 6968,
105
+ datasheet: {
106
+ required: 100,
107
+ general: 98.46
136
108
  },
137
- "services": {
138
- "datasheets": 1,
139
- "descriptions": 1,
140
- "images": 1
109
+ descriptions: {
110
+ required: 100,
111
+ general: 100
141
112
  },
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
- }]
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
+ }
171
133
  },
172
- "retailers": [{
173
- "id": 9,
174
- "name": "Amazon"
134
+ percentagesGeneral: {
135
+ required: 100,
136
+ general: 69.85
137
+ }
138
+ }],
139
+ summary: {
140
+ totalRelations: 2,
141
+ averageRequired: 100,
142
+ averageGeneral: 66.72
143
+ },
144
+ article: {
145
+ id_article: 84864
146
+ }
147
+ },
148
+ 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
175
170
  }, {
176
- "id": 70,
177
- "name": "Bodega Aurrera"
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"
197
+ }, {
198
+ id_category: 6788,
199
+ retailer_id: 5,
200
+ categoryName: "Categoría Supermercado|Categoría Supermercado|Categoría Supermercado",
201
+ retailerName: "Chedraui"
178
202
  }],
179
- "statusByRetailer": {
180
- "9": {
181
- "datasheet": "AA",
182
- "description": "AA",
183
- "images": "AA"
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
184
213
  },
185
- "70": {
186
- "datasheet": "AA",
187
- "description": "AA",
188
- "images": "AA"
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
189
274
  }
190
- },
191
- "retailersAvailable": [{
192
- "id": 9,
193
- "name": "Amazon"
194
275
  }, {
195
- "id": 70,
196
- "name": "Bodega Aurrera"
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
346
+ }
347
+ }, {
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
+ }
197
383
  }],
198
- "categoryName": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
199
- "upc": "897654352",
200
- "id_article": 145207,
201
- "id_order": 10458
202
- }
384
+ summary: {
385
+ totalRelations: 5,
386
+ averageRequired: 35.76,
387
+ averageGeneral: 5.21
388
+ }
389
+ }]
203
390
  },
204
391
  location: {
205
392
  pathname: "/EditProducts",
@@ -57,20 +57,7 @@ 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)(); // 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;
60
+ var ProductEditionContext = /*#__PURE__*/(0, _react.createContext)(); // Provider component
74
61
 
75
62
  var ProviderProductEditionProvider = function ProviderProductEditionProvider(_ref) {
76
63
  var children = _ref.children;
@@ -617,4 +604,17 @@ var ProviderProductEditionProvider = function ProviderProductEditionProvider(_re
617
604
  });
618
605
  };
619
606
 
620
- exports.ProviderProductEditionProvider = ProviderProductEditionProvider;
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;