contentoh-components-library 21.4.26 → 21.4.27
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/.env.development +5 -2
- package/.env.production +3 -1
- package/dist/components/atoms/Avatar/index.js +3 -2
- package/dist/components/atoms/Card/index.js +46 -5
- package/dist/components/atoms/Card/styles.js +3 -1
- package/dist/components/atoms/CheckBox/index.js +7 -2
- package/dist/components/atoms/CheckBox/styles.js +1 -1
- package/dist/components/atoms/InputFormatter/styles.js +1 -1
- package/dist/components/atoms/SliderToolTip/styles.js +1 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/HeaderTop/index.js +68 -11
- package/dist/components/molecules/TagAndInput/index.js +1 -1
- package/dist/components/organisms/Chat/Chat.stories.js +27 -8
- package/dist/components/organisms/Chat/ContainerItems/index.js +19 -3
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +350 -197
- package/dist/components/organisms/Chat/ContentChat/styles.js +1 -1
- package/dist/components/organisms/Chat/Footer/index.js +48 -39
- package/dist/components/organisms/Chat/Footer/styles.js +1 -1
- package/dist/components/organisms/Chat/index.js +49 -4
- package/dist/components/organisms/Chat/styles.js +1 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/organisms/PanelLayout/PanelLayout.stories.js +1 -1
- package/dist/components/organisms/PanelLayout/index.js +7 -5
- package/dist/components/organisms/PanelLayout/styles.js +3 -3
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +60 -116
- package/dist/components/pages/ProviderProductEdition/index.js +117 -142
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +8 -4
- package/dist/components/pages/RetailerProductEdition/index.js +316 -308
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +61 -2
- package/dist/index.js +247 -52
- package/package.json +4 -1
- package/src/components/atoms/Avatar/index.js +8 -2
- package/src/components/atoms/Card/index.js +35 -2
- package/src/components/atoms/Card/styles.js +41 -5
- package/src/components/atoms/CheckBox/index.js +4 -1
- package/src/components/atoms/CheckBox/styles.js +2 -0
- package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +76 -0
- package/src/components/atoms/ImageCarousel/index.js +103 -0
- package/src/components/atoms/ImageCarousel/styles.js +79 -0
- package/src/components/atoms/InputFormatter/styles.js +2 -1
- package/src/components/atoms/PercentTag/PercentTag.stories.js +7 -0
- package/src/components/atoms/PercentTag/index.js +9 -0
- package/src/components/atoms/PercentTag/styles.js +69 -0
- package/src/components/atoms/RatingStars/RatingStars.stories.js +10 -0
- package/src/components/atoms/RatingStars/index.js +31 -0
- package/src/components/atoms/RatingStars/styles.js +28 -0
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +36 -0
- package/src/components/atoms/RetailerCatalog/index.js +49 -0
- package/src/components/atoms/RetailerCatalog/styles.js +30 -0
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +15 -0
- package/src/components/atoms/RetailerOption/index.js +53 -0
- package/src/components/atoms/RetailerOption/styles.js +41 -0
- package/src/components/atoms/RetailersList/RetailersList.stories.js +33 -0
- package/src/components/atoms/RetailersList/index.js +20 -0
- package/src/components/atoms/RetailersList/styles.js +19 -0
- package/src/components/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +67 -0
- package/src/components/atoms/UserCatalog/index.js +100 -0
- package/src/components/atoms/UserCatalog/styles.js +24 -0
- package/src/components/atoms/UserOption/UserOption.stories.js +25 -0
- package/src/components/atoms/UserOption/index.js +95 -0
- package/src/components/atoms/UserOption/styles.js +61 -0
- package/src/components/atoms/UserSelector/UserSelector.stories.js +25 -0
- package/src/components/atoms/UserSelector/index.js +86 -0
- package/src/components/atoms/UserSelector/styles.js +55 -0
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/GridItem/GridItem.stories.js +126 -0
- package/src/components/molecules/GridItem/index.js +105 -0
- package/src/components/molecules/GridItem/styles.js +104 -0
- package/src/components/molecules/HeaderItem/ColumnItem.js +9 -0
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +24 -0
- package/src/components/molecules/HeaderItem/index.js +26 -0
- package/src/components/molecules/HeaderItem/styles.js +27 -0
- package/src/components/molecules/HeaderTop/index.js +52 -6
- package/src/components/molecules/RowItem/ColumnItem.js +9 -0
- package/src/components/molecules/RowItem/RowItem.stories.js +5660 -0
- package/src/components/molecules/RowItem/index.js +45 -0
- package/src/components/molecules/RowItem/styles.js +40 -0
- package/src/components/molecules/StripeCardForm/StripeCardForm.stories.js +13 -0
- package/src/components/molecules/StripeCardForm/index.js +42 -0
- package/src/components/molecules/StripeCardForm/paymentForm.js +124 -0
- package/src/components/molecules/StripeCardForm/styles.js +73 -0
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +12 -0
- package/src/components/molecules/StripeCardSelector/index.js +44 -0
- package/src/components/molecules/StripeCardSelector/styles.js +4 -0
- package/src/components/molecules/StripeCardSelector/utils.js +17 -0
- package/src/components/molecules/TagAndInput/index.js +10 -8
- package/src/components/organisms/Chat/Chat.stories.js +27 -7
- package/src/components/organisms/Chat/ContainerItems/index.js +18 -2
- package/src/components/organisms/Chat/ContainerItems/styles.js +14 -2
- package/src/components/organisms/Chat/ContentChat/index.js +88 -12
- package/src/components/organisms/Chat/ContentChat/styles.js +1 -0
- package/src/components/organisms/Chat/Footer/index.js +11 -0
- package/src/components/organisms/Chat/Footer/styles.js +0 -4
- package/src/components/organisms/Chat/index.js +46 -4
- package/src/components/organisms/Chat/styles.js +4 -0
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/GridProducts/GridProducts.stories.js +5485 -0
- package/src/components/organisms/GridProducts/index.js +50 -0
- package/src/components/organisms/GridProducts/styles.js +14 -0
- package/src/components/organisms/GridProducts/utils.js +111 -0
- package/src/components/organisms/Modal/styles.js +4 -1
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +6 -16
- package/src/components/organisms/PanelLayout/PanelLayout.stories.js +63 -0
- package/src/components/organisms/PanelLayout/index.js +11 -0
- package/src/components/organisms/PanelLayout/styles.js +39 -0
- package/src/components/organisms/SideModal/SideModal.stories.js +23 -0
- package/src/components/organisms/SideModal/index.js +50 -0
- package/src/components/organisms/SideModal/styles.js +30 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +66 -116
- package/src/components/pages/ProviderProductEdition/index.js +97 -129
- package/src/components/pages/ProviderProductEdition/styles.js +5 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +7 -3
- package/src/components/pages/RetailerProductEdition/index.js +158 -184
- package/src/components/pages/RetailerProductEdition/styles.js +4 -0
- package/src/components/pages/RetailerProductEdition/utils.js +37 -0
- package/src/index.js +16 -0
|
@@ -15,6 +15,6 @@ var _variables = require("../../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n max-width: 700px;\n min-width: 350px;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 0px;\n background: white;\n padding: 0px;\n overflow: hidden;\n border-radius: inherit;\n //border: 1px solid red;\n\n .container-chatEmpty {\n width: 100%;\n flex-grow: 2;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 18px;\n background-color: transparent;\n\n .icon-chat {\n color: #808080;\n }\n\n label {\n font-family: ", ", sans-serif;\n font-size: 17px;\n text-align: center;\n color: #808080;\n }\n }\n @media (max-width: 600px) {\n min-width: 300px;\n }\n"])), _variables.FontFamily.RobotoRegular);
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n max-width: 700px;\n min-width: 350px;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 0px;\n background: white;\n padding: 0px;\n overflow: hidden;\n border-radius: inherit;\n //border: 1px solid red;\n\n .container-chatEmpty {\n width: 100%;\n flex-grow: 2;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 18px;\n background-color: transparent;\n\n .icon-chat {\n color: #808080;\n }\n\n label {\n font-family: ", ", sans-serif;\n font-size: 17px;\n text-align: center;\n color: #808080;\n }\n }\n\n @media (max-width: 600px) {\n min-width: 300px;\n }\n"])), _variables.FontFamily.RobotoRegular);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -168,7 +168,7 @@ var Footer = function Footer(props) {
|
|
|
168
168
|
switch (_context.prev = _context.next) {
|
|
169
169
|
case 0:
|
|
170
170
|
if (!createItemsChat) {
|
|
171
|
-
_context.next =
|
|
171
|
+
_context.next = 90;
|
|
172
172
|
break;
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -200,7 +200,7 @@ var Footer = function Footer(props) {
|
|
|
200
200
|
|
|
201
201
|
case 12:
|
|
202
202
|
if ((_step = _iterator.n()).done) {
|
|
203
|
-
_context.next =
|
|
203
|
+
_context.next = 41;
|
|
204
204
|
break;
|
|
205
205
|
}
|
|
206
206
|
|
|
@@ -228,7 +228,7 @@ var Footer = function Footer(props) {
|
|
|
228
228
|
|
|
229
229
|
fileKey = "chat/";
|
|
230
230
|
_context.t0 = chatType;
|
|
231
|
-
_context.next = _context.t0 === "merchant_product" ? 26 : _context.t0 === "order_product" ? 28 : _context.t0 === "ticket" ? 30 : 32;
|
|
231
|
+
_context.next = _context.t0 === "merchant_product" ? 26 : _context.t0 === "order_product" ? 28 : _context.t0 === "ticket" ? 30 : _context.t0 === "product_status" ? 32 : 34;
|
|
232
232
|
break;
|
|
233
233
|
|
|
234
234
|
case 26:
|
|
@@ -238,7 +238,7 @@ var Footer = function Footer(props) {
|
|
|
238
238
|
errorMessage = "El ID o la version del producto no es valido";
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
return _context.abrupt("break",
|
|
241
|
+
return _context.abrupt("break", 35);
|
|
242
242
|
|
|
243
243
|
case 28:
|
|
244
244
|
if ((0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.id) && (0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.version)) {
|
|
@@ -247,7 +247,7 @@ var Footer = function Footer(props) {
|
|
|
247
247
|
errorMessage = "El ID o la version del producto no es valido";
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
return _context.abrupt("break",
|
|
250
|
+
return _context.abrupt("break", 35);
|
|
251
251
|
|
|
252
252
|
case 30:
|
|
253
253
|
if ((0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.id)) {
|
|
@@ -256,12 +256,21 @@ var Footer = function Footer(props) {
|
|
|
256
256
|
errorMessage = "El ID del ticket no es valido";
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
return _context.abrupt("break",
|
|
259
|
+
return _context.abrupt("break", 35);
|
|
260
260
|
|
|
261
261
|
case 32:
|
|
262
|
+
if ((0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.id) && (0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.version) && (0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.retailerId)) {
|
|
263
|
+
fileKey += "productStatus/".concat(dataChat.id, "-").concat(dataChat === null || dataChat === void 0 ? void 0 : dataChat.version, "-").concat(dataChat === null || dataChat === void 0 ? void 0 : dataChat.retailerId, "/");
|
|
264
|
+
} else {
|
|
265
|
+
errorMessage = "El ID del ticket no es valido";
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
return _context.abrupt("break", 35);
|
|
269
|
+
|
|
270
|
+
case 34:
|
|
262
271
|
errorMessage = "El tipo de chat no se especifico de manera correcta";
|
|
263
272
|
|
|
264
|
-
case
|
|
273
|
+
case 35:
|
|
265
274
|
if (!errorMessage) {
|
|
266
275
|
today = new Date();
|
|
267
276
|
fileKey += "".concat((0, _uuid.v4)(), "-").concat(today.getTime(), ".").concat((0, _utils.getFileExtension)(file.name));
|
|
@@ -283,32 +292,32 @@ var Footer = function Footer(props) {
|
|
|
283
292
|
};
|
|
284
293
|
fileUploadRequests.push(myBucket.putObject(paramsCreate).promise());
|
|
285
294
|
|
|
286
|
-
case
|
|
295
|
+
case 39:
|
|
287
296
|
_context.next = 12;
|
|
288
297
|
break;
|
|
289
298
|
|
|
290
|
-
case
|
|
291
|
-
_context.next =
|
|
299
|
+
case 41:
|
|
300
|
+
_context.next = 46;
|
|
292
301
|
break;
|
|
293
302
|
|
|
294
|
-
case
|
|
295
|
-
_context.prev =
|
|
303
|
+
case 43:
|
|
304
|
+
_context.prev = 43;
|
|
296
305
|
_context.t1 = _context["catch"](10);
|
|
297
306
|
|
|
298
307
|
_iterator.e(_context.t1);
|
|
299
308
|
|
|
300
|
-
case
|
|
301
|
-
_context.prev =
|
|
309
|
+
case 46:
|
|
310
|
+
_context.prev = 46;
|
|
302
311
|
|
|
303
312
|
_iterator.f();
|
|
304
313
|
|
|
305
|
-
return _context.finish(
|
|
314
|
+
return _context.finish(46);
|
|
306
315
|
|
|
307
|
-
case
|
|
308
|
-
_context.next =
|
|
316
|
+
case 49:
|
|
317
|
+
_context.next = 51;
|
|
309
318
|
return Promise.allSettled(fileUploadRequests);
|
|
310
319
|
|
|
311
|
-
case
|
|
320
|
+
case 51:
|
|
312
321
|
responseAWS = _context.sent;
|
|
313
322
|
responseAWS.forEach(function (responseFile, index) {
|
|
314
323
|
if (responseFile.status === "rejected") {
|
|
@@ -318,11 +327,11 @@ var Footer = function Footer(props) {
|
|
|
318
327
|
customFiles[index].uploaded = true;
|
|
319
328
|
}
|
|
320
329
|
});
|
|
321
|
-
_context.next =
|
|
330
|
+
_context.next = 61;
|
|
322
331
|
break;
|
|
323
332
|
|
|
324
|
-
case
|
|
325
|
-
_context.prev =
|
|
333
|
+
case 55:
|
|
334
|
+
_context.prev = 55;
|
|
326
335
|
_context.t2 = _context["catch"](7);
|
|
327
336
|
console.log(_context.t2);
|
|
328
337
|
disableSecondaryContainer(false);
|
|
@@ -334,21 +343,21 @@ var Footer = function Footer(props) {
|
|
|
334
343
|
});
|
|
335
344
|
return _context.abrupt("return");
|
|
336
345
|
|
|
337
|
-
case
|
|
346
|
+
case 61:
|
|
338
347
|
// obtener las keys de los files subidos
|
|
339
348
|
items = [];
|
|
340
349
|
index = 0;
|
|
341
350
|
|
|
342
|
-
case
|
|
351
|
+
case 63:
|
|
343
352
|
if (!(index < customFiles.length)) {
|
|
344
|
-
_context.next =
|
|
353
|
+
_context.next = 76;
|
|
345
354
|
break;
|
|
346
355
|
}
|
|
347
356
|
|
|
348
357
|
_file = customFiles[index];
|
|
349
358
|
|
|
350
359
|
if (!_file.uploaded) {
|
|
351
|
-
_context.next =
|
|
360
|
+
_context.next = 73;
|
|
352
361
|
break;
|
|
353
362
|
}
|
|
354
363
|
|
|
@@ -358,14 +367,14 @@ var Footer = function Footer(props) {
|
|
|
358
367
|
}; // caso imagen -> obtener width y height
|
|
359
368
|
|
|
360
369
|
if (!(_file.itemType === "img")) {
|
|
361
|
-
_context.next =
|
|
370
|
+
_context.next = 72;
|
|
362
371
|
break;
|
|
363
372
|
}
|
|
364
373
|
|
|
365
|
-
_context.next =
|
|
374
|
+
_context.next = 70;
|
|
366
375
|
return (0, _utils.getImageSize)(files[index]);
|
|
367
376
|
|
|
368
|
-
case
|
|
377
|
+
case 70:
|
|
369
378
|
imgSize = _context.sent;
|
|
370
379
|
|
|
371
380
|
if (imgSize) {
|
|
@@ -373,31 +382,31 @@ var Footer = function Footer(props) {
|
|
|
373
382
|
valueItem.height = imgSize.height;
|
|
374
383
|
}
|
|
375
384
|
|
|
376
|
-
case
|
|
385
|
+
case 72:
|
|
377
386
|
items.push({
|
|
378
387
|
type: _file.itemType,
|
|
379
388
|
value: JSON.stringify(valueItem)
|
|
380
389
|
});
|
|
381
390
|
|
|
382
|
-
case
|
|
391
|
+
case 73:
|
|
383
392
|
index++;
|
|
384
|
-
_context.next =
|
|
393
|
+
_context.next = 63;
|
|
385
394
|
break;
|
|
386
395
|
|
|
387
|
-
case
|
|
396
|
+
case 76:
|
|
388
397
|
if (!items.length) {
|
|
389
|
-
_context.next =
|
|
398
|
+
_context.next = 84;
|
|
390
399
|
break;
|
|
391
400
|
}
|
|
392
401
|
|
|
393
|
-
_context.next =
|
|
402
|
+
_context.next = 79;
|
|
394
403
|
return createItemsChat(items);
|
|
395
404
|
|
|
396
|
-
case
|
|
405
|
+
case 79:
|
|
397
406
|
responseError = _context.sent;
|
|
398
407
|
|
|
399
408
|
if (!responseError) {
|
|
400
|
-
_context.next =
|
|
409
|
+
_context.next = 84;
|
|
401
410
|
break;
|
|
402
411
|
}
|
|
403
412
|
|
|
@@ -410,7 +419,7 @@ var Footer = function Footer(props) {
|
|
|
410
419
|
disableSecondaryContainer(false);
|
|
411
420
|
return _context.abrupt("return");
|
|
412
421
|
|
|
413
|
-
case
|
|
422
|
+
case 84:
|
|
414
423
|
// obtener los errores de los files no subidos a AWS
|
|
415
424
|
failedFiles = [];
|
|
416
425
|
errorDetailFiles = "";
|
|
@@ -439,12 +448,12 @@ var Footer = function Footer(props) {
|
|
|
439
448
|
disableSecondaryContainer(false);
|
|
440
449
|
setFilesPreview(failedFiles);
|
|
441
450
|
|
|
442
|
-
case
|
|
451
|
+
case 90:
|
|
443
452
|
case "end":
|
|
444
453
|
return _context.stop();
|
|
445
454
|
}
|
|
446
455
|
}
|
|
447
|
-
}, _callee, null, [[7,
|
|
456
|
+
}, _callee, null, [[7, 55], [10, 43, 46, 49]]);
|
|
448
457
|
}));
|
|
449
458
|
|
|
450
459
|
return function sendFilesPreview() {
|
|
@@ -15,7 +15,7 @@ var _variables = require("../../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n //height: 100%; // modo dev\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: flex-start;\n background: white;\n padding: 15px 14px 14px 14px;\n //border: 1px solid red;\n\n .container-chatDisabled {\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n background-color: #f7f7f7;\n border-radius: 17px;\n padding: 10px 15px;\n\n .label-chatDisabled {\n flex-grow: 2;\n font-family: ", ", sans-serif;\n font-size: 12px;\n text-align: center;\n color: #a2a2a2;\n }\n }\n\n .tooltipErrorUpdate {\n > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 5px;\n\n .label-title {\n font-family: ", ", sans-serif;\n font-size: 13px;\n text-align: center;\n color: #262626;\n }\n\n .label-detail {\n font-family: ", ", sans-serif;\n font-size: 11px;\n text-align: center;\n color: #262626;\n }\n }\n }\n\n .container-ErrorUpdate {\n width: 20px;\n height: 20px;\n display: grid;\n place-items: center;\n overflow: hidden;\n padding: 0px;\n }\n
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n //height: 100%; // modo dev\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: flex-start;\n background: white;\n padding: 15px 14px 14px 14px;\n //border: 1px solid red;\n\n .container-chatDisabled {\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n background-color: #f7f7f7;\n border-radius: 17px;\n padding: 10px 15px;\n\n .label-chatDisabled {\n flex-grow: 2;\n font-family: ", ", sans-serif;\n font-size: 12px;\n text-align: center;\n color: #a2a2a2;\n }\n }\n\n .tooltipErrorUpdate {\n > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 5px;\n\n .label-title {\n font-family: ", ", sans-serif;\n font-size: 13px;\n text-align: center;\n color: #262626;\n }\n\n .label-detail {\n font-family: ", ", sans-serif;\n font-size: 11px;\n text-align: center;\n color: #262626;\n }\n }\n }\n\n .container-ErrorUpdate {\n width: 20px;\n height: 20px;\n display: grid;\n place-items: center;\n overflow: hidden;\n padding: 0px;\n }\n"])), _variables.FontFamily.RobotoRegular, _variables.FontFamily.RobotoMedium, _variables.FontFamily.RobotoRegular);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
21
21
|
|
|
@@ -30,7 +30,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
30
30
|
var Chat = function Chat(props) {
|
|
31
31
|
var chatType = props.chatType,
|
|
32
32
|
chatContainerType = props.chatContainerType,
|
|
33
|
-
chatData = props.chatData,
|
|
33
|
+
_props$chatData = props.chatData,
|
|
34
|
+
chatData = _props$chatData === void 0 ? {} : _props$chatData,
|
|
34
35
|
classNameContainerFixed = props.classNameContainerFixed,
|
|
35
36
|
_props$size = props.size,
|
|
36
37
|
size = _props$size === void 0 ? 14 : _props$size;
|
|
@@ -46,7 +47,8 @@ var Chat = function Chat(props) {
|
|
|
46
47
|
setData = _useState4[1];
|
|
47
48
|
|
|
48
49
|
var _ref = chatData || {},
|
|
49
|
-
ticketCompany = _ref.ticketCompany
|
|
50
|
+
ticketCompany = _ref.ticketCompany,
|
|
51
|
+
retailerId = _ref.retailerId;
|
|
50
52
|
|
|
51
53
|
(0, _react.useEffect)(function () {
|
|
52
54
|
switch (chatType) {
|
|
@@ -62,6 +64,10 @@ var Chat = function Chat(props) {
|
|
|
62
64
|
validateChatTicket();
|
|
63
65
|
break;
|
|
64
66
|
|
|
67
|
+
case "product_status":
|
|
68
|
+
validateProductStatus();
|
|
69
|
+
break;
|
|
70
|
+
|
|
65
71
|
default:
|
|
66
72
|
setData({
|
|
67
73
|
code: 404,
|
|
@@ -71,6 +77,41 @@ var Chat = function Chat(props) {
|
|
|
71
77
|
}
|
|
72
78
|
}, [chatType]);
|
|
73
79
|
|
|
80
|
+
var validateProductStatus = function validateProductStatus() {
|
|
81
|
+
var userToken = chatData.userToken,
|
|
82
|
+
id = chatData.id,
|
|
83
|
+
version = chatData.version,
|
|
84
|
+
retailerId = chatData.retailerId,
|
|
85
|
+
status = chatData.status,
|
|
86
|
+
orderId = chatData.orderId;
|
|
87
|
+
if (!isValidGeneral(userToken, id)) return; // validar el ID de la cadena asociada al producto en la OT
|
|
88
|
+
|
|
89
|
+
if (!(0, _utils.isValidNaturalNumber)(retailerId)) {
|
|
90
|
+
setDataError("La cadena relacionada al producto no es válida");
|
|
91
|
+
return;
|
|
92
|
+
} // validar el ID de la version asociada al producto en la OT
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
if (!(0, _utils.isValidNaturalNumber)(version)) {
|
|
96
|
+
setDataError("La versión del producto no es válida");
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (orderId && !(0, _utils.isValidNaturalNumber)(orderId)) {
|
|
101
|
+
setDataError("La orden del producto no es válida");
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
setData({
|
|
106
|
+
userToken: userToken,
|
|
107
|
+
id: id,
|
|
108
|
+
version: version,
|
|
109
|
+
retailerId: retailerId,
|
|
110
|
+
orderId: orderId,
|
|
111
|
+
status: status
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
|
|
74
115
|
var isValidGeneral = function isValidGeneral(userToken, id) {
|
|
75
116
|
// validar token del user
|
|
76
117
|
if ((0, _utils.isStringEmpty)(userToken)) {
|
|
@@ -217,7 +258,9 @@ var Chat = function Chat(props) {
|
|
|
217
258
|
dataChat: data,
|
|
218
259
|
showBtnClose: false,
|
|
219
260
|
ticketCompany: ticketCompany,
|
|
220
|
-
activeRetailer: props.activeRetailer
|
|
261
|
+
activeRetailer: props.activeRetailer || {
|
|
262
|
+
id: retailerId
|
|
263
|
+
}
|
|
221
264
|
})
|
|
222
265
|
});
|
|
223
266
|
} else {
|
|
@@ -249,7 +292,9 @@ var Chat = function Chat(props) {
|
|
|
249
292
|
onClickBtnClose: function onClickBtnClose() {
|
|
250
293
|
setShowPopUpChat(false);
|
|
251
294
|
},
|
|
252
|
-
activeRetailer: props.activeRetailer
|
|
295
|
+
activeRetailer: props.activeRetailer || {
|
|
296
|
+
id: retailerId
|
|
297
|
+
}
|
|
253
298
|
})
|
|
254
299
|
})
|
|
255
300
|
})]
|
|
@@ -16,7 +16,7 @@ var _variables = require("../../../global-files/variables");
|
|
|
16
16
|
var _templateObject, _templateObject2, _templateObject3;
|
|
17
17
|
|
|
18
18
|
// Container para chat fixed
|
|
19
|
-
var ContainerFixed = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: auto;\n max-width: 550px;\n min-width: 325px;\n height: 100%;\n flex-grow: 2;\n background-color: white;\n border: 1px solid #f0f0f0;\n z-index: 1000;\n padding: 0px;\n @media (max-width: 600px) {\n width: 90%;\n min-width: 300px;\n }\n"])));
|
|
19
|
+
var ContainerFixed = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: auto;\n max-width: 550px;\n min-width: 325px;\n height: 100%;\n flex-grow: 2;\n background-color: white;\n border: 1px solid #f0f0f0;\n z-index: 1000;\n padding: 0px;\n @media (max-width: 1024px) { \n width: auto;\n max-width: 100%;\n }\n @media (max-width: 600px) {\n width: 90%;\n min-width: 300px;\n }\n"])));
|
|
20
20
|
|
|
21
21
|
exports.ContainerFixed = ContainerFixed;
|
|
22
22
|
|
|
@@ -43,7 +43,7 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
|
43
43
|
|
|
44
44
|
(0, _react.useEffect)(function () {
|
|
45
45
|
var rtls = (headerData === null || headerData === void 0 ? void 0 : headerData.retailers) || (headerData === null || headerData === void 0 ? void 0 : headerData.retailersAvailable);
|
|
46
|
-
servicesData && rtls.forEach(function (rt) {
|
|
46
|
+
servicesData && (rtls === null || rtls === void 0 ? void 0 : rtls.forEach(function (rt) {
|
|
47
47
|
var element = [];
|
|
48
48
|
servicesData.forEach(function (sd) {
|
|
49
49
|
if (sd.id_retailer === rt.id) {
|
|
@@ -52,7 +52,7 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
|
52
52
|
|
|
53
53
|
rt["services"] = element;
|
|
54
54
|
});
|
|
55
|
-
});
|
|
55
|
+
}));
|
|
56
56
|
setRetailers(rtls);
|
|
57
57
|
}, [servicesData]);
|
|
58
58
|
|
|
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var ContainerModal = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n overflow: auto;\n display: grid;\n place-items: center;\n background-color: rgba(0, 0, 0, 0.4);\n\n .contentModal {\n width: fit-content;\n max-width: 80%;\n min-width: 80px;\n height: fit-content;\n max-height: 90%;\n min-height: 120px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background-color: white;\n border-radius: 10px;\n padding: 25px 25px 20px 25px;\n box-shadow: 0px 2px 4px 0px #00000040;\n\n header {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 6px;\n
|
|
18
|
+
var ContainerModal = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n overflow: auto;\n display: grid;\n place-items: center;\n background-color: rgba(0, 0, 0, 0.4);\n\n .contentModal {\n width: fit-content;\n max-width: 80%;\n min-width: 80px;\n height: fit-content;\n max-height: 90%;\n min-height: 120px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background-color: white;\n border-radius: 10px;\n padding: 25px 25px 20px 25px;\n box-shadow: 0px 2px 4px 0px #00000040;\n\n header {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 6px;\n\n .label-title {\n width: 100%;\n text-align: center;\n font-family: ", ", sans-serif;\n font-size: 17px;\n line-height: 1.2;\n color: #262626;\n white-space: pre-wrap;\n }\n\n & + * {\n margin-top: 20px;\n }\n }\n\n .iconModal {\n width: 50px;\n height: 50px;\n font-size: 30px;\n border-width: 4px;\n margin-bottom: 20px;\n overflow: hidden;\n\n &.iconModal-error {\n background-color: #953737;\n border-color: #953737;\n color: white;\n }\n &.iconModal-warning {\n font-size: 27px;\n padding-bottom: 8px;\n color: #af9647;\n border-color: #af9647;\n }\n &.iconModal-info {\n border-color: #9e3e26;\n color: #9e3e26;\n }\n &.iconModal-success {\n }\n }\n\n .label-message {\n width: 100%;\n text-align: center;\n font-family: ", ", sans-serif;\n font-size: 13px;\n color: #707070;\n white-space: pre-wrap;\n }\n\n .container-customComponent {\n width: 100%;\n max-height: 50vh;\n display: flex;\n flex-direction: column;\n margin-top: 20px;\n padding: 0px 0px;\n //border: 1px solid red;\n }\n\n .container-buttons {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 12px;\n margin-top: 20px;\n //border: 1px solid red;\n }\n }\n"])), _variables.FontFamily.RobotoMedium, _variables.FontFamily.RobotoRegular);
|
|
19
19
|
|
|
20
20
|
exports.ContainerModal = ContainerModal;
|
|
@@ -45,7 +45,7 @@ PanelLayoutDefault.args = {
|
|
|
45
45
|
children: "Precio"
|
|
46
46
|
})]
|
|
47
47
|
}),
|
|
48
|
-
|
|
48
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
49
49
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(TwoColumns, {
|
|
50
50
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
51
51
|
className: "first",
|
|
@@ -11,14 +11,16 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
11
11
|
|
|
12
12
|
var PanelLayout = function PanelLayout(_ref) {
|
|
13
13
|
var header = _ref.header,
|
|
14
|
-
|
|
15
|
-
footer = _ref.footer
|
|
14
|
+
children = _ref.children,
|
|
15
|
+
footer = _ref.footer,
|
|
16
|
+
className = _ref.className;
|
|
16
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
18
|
+
className: className,
|
|
17
19
|
children: [header ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Header, {
|
|
18
20
|
children: header
|
|
19
|
-
}) : null,
|
|
20
|
-
children:
|
|
21
|
-
})
|
|
21
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Body, {
|
|
22
|
+
children: children
|
|
23
|
+
}), footer ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Footer, {
|
|
22
24
|
children: footer
|
|
23
25
|
}) : null]
|
|
24
26
|
});
|
|
@@ -15,7 +15,7 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n grid-auto-rows: 1fr;\n grid-template-columns: 1fr;\n grid-template-rows: 34px 1fr
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n grid-auto-rows: 1fr;\n grid-template-columns: 1fr;\n grid-template-rows: 34px 1fr 100%;\n gap: 0px 0px;\n grid-template-areas:\n \"header\"\n \"body\"\n \"footer\";\n font-family: ", ", sans-serif;\n font-size: 12px;\n"])), _variables.FontFamily.RobotoMedium);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
21
21
|
|
|
@@ -23,10 +23,10 @@ var Header = _styledComponents.default.div(_templateObject2 || (_templateObject2
|
|
|
23
23
|
|
|
24
24
|
exports.Header = Header;
|
|
25
25
|
|
|
26
|
-
var Body = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n grid-area: body;\n"])));
|
|
26
|
+
var Body = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n grid-area: body;\n border-left: 1px solid #f0f0f0;\n border-right: 1px solid #f0f0f0;\n"])));
|
|
27
27
|
|
|
28
28
|
exports.Body = Body;
|
|
29
29
|
|
|
30
|
-
var Footer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n grid-area: footer;\n"])));
|
|
30
|
+
var Footer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n grid-area: footer;\n display: flex;\n align-items: center;\n border: 1px solid #f0f0f0;\n border-radius: 0 0 5px 5px;\n"])));
|
|
31
31
|
|
|
32
32
|
exports.Footer = Footer;
|