contentoh-components-library 21.5.1 → 21.5.3
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/dist/components/organisms/Table/styles.js +1 -1
- package/dist/components/pages/MultipleEdition/saveData.js +19 -9
- package/dist/components/pages/MultipleEdition/styles.js +1 -1
- package/dist/components/pages/MultipleEdition/utils.js +153 -86
- package/package.json +1 -4
- package/src/components/atoms/Avatar/index.js +2 -8
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -1
- package/src/components/atoms/ButtonV2/index.js +0 -1
- package/src/components/atoms/ButtonV2/styles.js +0 -16
- package/src/components/atoms/CheckBox/CheckBox.stories.js +0 -5
- package/src/components/atoms/CheckBox/index.js +1 -5
- package/src/components/atoms/CheckBox/styles.js +3 -9
- package/src/components/atoms/GeneralButton/styles.js +0 -46
- package/src/components/atoms/GeneralInput/index.js +0 -3
- package/src/components/atoms/GeneralInput/styles.js +1 -19
- package/src/components/atoms/InputFormatter/index.js +1 -2
- package/src/components/atoms/InputFormatter/styles.js +4 -9
- package/src/components/atoms/ProductImage/index.js +11 -24
- package/src/components/atoms/ProductImage/styles.js +0 -7
- package/src/components/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/atoms/TabSection/index.js +1 -1
- package/src/components/atoms/TabSection/styles.js +3 -0
- package/src/components/molecules/BoxAttribute/index.js +25 -32
- package/src/components/molecules/BoxAttribute/styles.js +1 -1
- package/src/components/molecules/BoxButtons/index.js +22 -23
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/GalleryElement/index.js +1 -76
- package/src/components/molecules/GalleryHeader/index.js +0 -1
- package/src/components/molecules/HeaderTop/index.js +6 -52
- package/src/components/molecules/ProductNameHeader/index.js +1 -19
- package/src/components/molecules/SignInLogin/index.js +11 -11
- package/src/components/molecules/StatusAsignationInfo/FinancedCompanies.js +63 -501
- package/src/components/molecules/StatusAsignationInfo/index.js +1 -1
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
- package/src/components/molecules/TagAndInput/index.js +6 -8
- package/src/components/organisms/Chat/Chat.stories.js +7 -27
- package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
- package/src/components/organisms/Chat/ContainerItems/styles.js +2 -14
- package/src/components/organisms/Chat/ContentChat/index.js +12 -88
- package/src/components/organisms/Chat/Footer/index.js +0 -11
- package/src/components/organisms/Chat/index.js +4 -46
- package/src/components/organisms/Chat/styles.js +0 -4
- package/src/components/organisms/DashboardMetric/index.js +3 -6
- package/src/components/organisms/FullProductNameHeader/index.js +1 -13
- package/src/components/organisms/GridProducts/GridProducts.stories.js +107 -682
- package/src/components/organisms/InputGroup/index.js +144 -292
- package/src/components/organisms/InputGroup/styles.js +0 -31
- package/src/components/organisms/Modal/Modal.stories.js +1 -2
- package/src/components/organisms/Modal/index.js +2 -9
- package/src/components/organisms/Modal/styles.js +1 -8
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
- package/src/components/pages/Dashboard/Dashboard.stories.js +38 -33
- package/src/components/pages/Dashboard/index.js +7 -36
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +60 -56
- package/src/components/pages/ProviderProductEdition/index.js +133 -148
- package/src/components/pages/ProviderProductEdition/styles.js +1 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +0 -4
- package/src/components/pages/RetailerProductEdition/index.js +300 -293
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/global-files/data.js +10 -6
- package/src/global-files/variables.js +0 -6
- package/src/index.js +0 -12
- package/src/assets/images/Icons/addv2.svg +0 -8
- package/src/assets/images/Icons/beenhere.svg +0 -9
- package/src/assets/images/Icons/checkv2.svg +0 -8
- package/src/assets/images/Icons/close-magenta.svg +0 -9
- package/src/assets/images/Icons/close.svg +0 -8
- package/src/assets/images/Icons/closeCircle.svg +0 -8
- package/src/assets/images/Icons/delete-forever-red.svg +0 -9
- package/src/assets/images/Icons/delete-forever-white.svg +0 -10
- package/src/assets/images/Icons/edit.svg +0 -8
- package/src/assets/images/Icons/fullscreen.svg +0 -3
- package/src/assets/images/Icons/infoNR.svg +0 -8
- package/src/assets/images/Icons/options.svg +0 -3
- package/src/assets/images/Icons/save-white-gray.svg +0 -9
- package/src/assets/images/Icons/save-white.svg +0 -9
- package/src/assets/images/Icons/save.svg +0 -8
- package/src/assets/images/Icons/search.svg +0 -3
- package/src/assets/images/Icons/settings.svg +0 -8
- package/src/assets/images/Icons/trash.svg +0 -8
- package/src/assets/images/Icons/undo.svg +0 -8
- package/src/assets/images/Icons/upload-file-white.svg +0 -4
- package/src/assets/images/Icons/upload-file.svg +0 -10
- package/src/assets/images/Icons/upload_file.svg +0 -10
- package/src/assets/images/Icons/warningv2.svg +0 -3
- package/src/assets/images/checkBox/checkrosa.svg +0 -3
- package/src/assets/images/checkBox/checkverde.svg +0 -3
- package/src/assets/images/flagsv2/highPriority.svg +0 -3
- package/src/assets/images/flagsv2/lowPriority.svg +0 -3
- package/src/assets/images/flagsv2/mediumPriority.svg +0 -3
- package/src/assets/images/flagsv2/noPriority.svg +0 -3
- package/src/assets/images/generalButton/closeIconWhite.svg +0 -4
- package/src/assets/images/generalButton/closeIconv2.svg +0 -4
- package/src/assets/images/generalButton/saveIconpink.svg +0 -3
- package/src/components/atoms/CharsMissing/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/CharsMissing/index.js +0 -60
- package/src/components/atoms/CharsMissing/styles.js +0 -44
- package/src/components/atoms/CustomChip/CustomChip.stories.js +0 -16
- package/src/components/atoms/CustomChip/index.js +0 -34
- package/src/components/atoms/CustomChip/styles.js +0 -6
- package/src/components/atoms/FeatureTagv2/FeatureTagv2.stories.js +0 -16
- package/src/components/atoms/FeatureTagv2/index.js +0 -10
- package/src/components/atoms/FeatureTagv2/styles.js +0 -56
- package/src/components/atoms/GeneralInputv2/GeneralInputv2.stories.js +0 -33
- package/src/components/atoms/GeneralInputv2/index.js +0 -155
- package/src/components/atoms/GeneralInputv2/styles.js +0 -67
- package/src/components/atoms/InputFormatterv2/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/InputFormatterv2/index.js +0 -148
- package/src/components/atoms/InputFormatterv2/styles.js +0 -39
- package/src/components/atoms/InputImages/InputImages.stories.js +0 -19
- package/src/components/atoms/InputImages/index.js +0 -25
- package/src/components/atoms/InputImages/styles.js +0 -17
- package/src/components/atoms/Multiselect/Multiselect.stories.js +0 -364
- package/src/components/atoms/Multiselect/index.js +0 -351
- package/src/components/atoms/Multiselect/styles.js +0 -33
- package/src/components/atoms/NumberMandatory/NumberMandatory.stories.js +0 -19
- package/src/components/atoms/NumberMandatory/index.js +0 -16
- package/src/components/atoms/NumberMandatory/styles.js +0 -11
- package/src/components/atoms/ObservationFlag/ObservationFlag.stories.js +0 -20
- package/src/components/atoms/ObservationFlag/index.js +0 -167
- package/src/components/atoms/ObservationFlag/styles.js +0 -104
- package/src/components/atoms/PriorityFlagv2/PriorityFlagv2.stories.js +0 -20
- package/src/components/atoms/PriorityFlagv2/index.js +0 -20
- package/src/components/atoms/PriorityFlagv2/styles.js +0 -6
- package/src/components/atoms/ProductImagev2/ProductImagev2.stories.js +0 -28
- package/src/components/atoms/ProductImagev2/index.js +0 -16
- package/src/components/atoms/ProductImagev2/styles.js +0 -62
- package/src/components/atoms/Progress/Progress.stories.js +0 -25
- package/src/components/atoms/Progress/index.js +0 -74
- package/src/components/atoms/Progress/styles.js +0 -98
- package/src/components/atoms/ScreenHeaderv2/ScreenHeaderv2.stories.js +0 -53
- package/src/components/atoms/ScreenHeaderv2/index.js +0 -134
- package/src/components/atoms/ScreenHeaderv2/styles.js +0 -103
- package/src/components/atoms/Selectv2/VersionSelect.js +0 -27
- package/src/components/atoms/Selectv2/index.js +0 -35
- package/src/components/atoms/Selectv2/style.js +0 -93
- package/src/components/atoms/TabSectionv2/TabSection.stories.js +0 -25
- package/src/components/atoms/TabSectionv2/index.js +0 -9
- package/src/components/atoms/TabSectionv2/styles.js +0 -20
- package/src/components/atoms/TooltipLight/Tooltip.stories.js +0 -20
- package/src/components/atoms/TooltipLight/index.js +0 -46
- package/src/components/atoms/TooltipLight/styles.js +0 -65
- package/src/components/atoms/WordsMissing/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/WordsMissing/index.js +0 -60
- package/src/components/atoms/WordsMissing/styles.js +0 -10
- package/src/components/molecules/AddGroup/AddGroup.stories.js +0 -15
- package/src/components/molecules/AddGroup/index.js +0 -84
- package/src/components/molecules/AddGroup/styles.js +0 -141
- package/src/components/molecules/AsignationInfo/AsignationInfo.stories.js +0 -17
- package/src/components/molecules/AsignationInfo/index.js +0 -108
- package/src/components/molecules/AsignationInfo/styles.js +0 -86
- package/src/components/molecules/EditionActiveImagev2/EditionActiveImagev2.stories.js +0 -12
- package/src/components/molecules/EditionActiveImagev2/index.js +0 -15
- package/src/components/molecules/EditionActiveImagev2/styles.js +0 -7
- package/src/components/molecules/EditionTabs/EditionTabs.stories.js +0 -12
- package/src/components/molecules/EditionTabs/index.js +0 -33
- package/src/components/molecules/EditionTabs/styles.js +0 -24
- package/src/components/molecules/FeaturesBarv2/FeaturesBarv2.stories.js +0 -20
- package/src/components/molecules/FeaturesBarv2/index.js +0 -32
- package/src/components/molecules/FeaturesBarv2/styles.js +0 -17
- package/src/components/molecules/GalleryElementv2/GalleryElementv2.stories.js +0 -30
- package/src/components/molecules/GalleryElementv2/index.js +0 -142
- package/src/components/molecules/GalleryElementv2/styles.js +0 -119
- package/src/components/molecules/GalleryHeaderv2/GalleryHeaderv2.stories.js +0 -10
- package/src/components/molecules/GalleryHeaderv2/index.js +0 -25
- package/src/components/molecules/GalleryHeaderv2/styles.js +0 -47
- package/src/components/molecules/GroupSelect/GroupSelect.stories.js +0 -35
- package/src/components/molecules/GroupSelect/SelectItem.js +0 -105
- package/src/components/molecules/GroupSelect/index.js +0 -190
- package/src/components/molecules/GroupSelect/styles.js +0 -124
- package/src/components/molecules/HeaderTopv2/HeaderTopv2.stories.js +0 -10
- package/src/components/molecules/HeaderTopv2/index.js +0 -100
- package/src/components/molecules/HeaderTopv2/styles.js +0 -33
- package/src/components/molecules/ImageSelectorv2/ImageSelectorv2.stories.js +0 -46
- package/src/components/molecules/ImageSelectorv2/index.js +0 -22
- package/src/components/molecules/ImageSelectorv2/styles.js +0 -15
- package/src/components/molecules/Phase/Phase.stories.js +0 -107
- package/src/components/molecules/Phase/index.js +0 -391
- package/src/components/molecules/Phase/styles.js +0 -97
- package/src/components/molecules/ProductNameHeaderv2/ProductNameHeaderv2.stories.js +0 -37
- package/src/components/molecules/ProductNameHeaderv2/index.js +0 -12
- package/src/components/molecules/ProductNameHeaderv2/styles.js +0 -10
- package/src/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +0 -37
- package/src/components/molecules/ProductSkuStatus/index.js +0 -26
- package/src/components/molecules/ProductSkuStatus/styles.js +0 -7
- package/src/components/molecules/RetailerSelectorv2/RetailerSelectorv2.stories.js +0 -35
- package/src/components/molecules/RetailerSelectorv2/index.js +0 -80
- package/src/components/molecules/RetailerSelectorv2/styles.js +0 -21
- package/src/components/molecules/ServiceDataValidator/ServiceDataValidator.stories.js +0 -90
- package/src/components/molecules/ServiceDataValidator/index.js +0 -49
- package/src/components/molecules/ServiceDataValidator/styles.js +0 -36
- package/src/components/molecules/StatusRetailer/StatusAsignationInfo.stories.js +0 -17
- package/src/components/molecules/StatusRetailer/index.js +0 -55
- package/src/components/molecules/StatusRetailer/styles.js +0 -85
- package/src/components/molecules/TabsMenuv2/TabsMenuv2.stories.js +0 -19
- package/src/components/molecules/TabsMenuv2/index.js +0 -112
- package/src/components/molecules/TabsMenuv2/styles.js +0 -19
- package/src/components/molecules/TagAndInputv2/TagAndInputv2.stories.js +0 -24
- package/src/components/molecules/TagAndInputv2/index.js +0 -86
- package/src/components/molecules/TagAndInputv2/styles.js +0 -35
- package/src/components/molecules/Validation/Validation.stories.js +0 -12
- package/src/components/molecules/Validation/index.js +0 -77
- package/src/components/molecules/Validation/styles.js +0 -19
- package/src/components/molecules/VersionItemv2/VersionItemv2.stories.js +0 -14
- package/src/components/molecules/VersionItemv2/index.js +0 -59
- package/src/components/molecules/VersionItemv2/styles.js +0 -47
- package/src/components/organisms/BarButtons/BarButtons.stories.js +0 -13
- package/src/components/organisms/BarButtons/index.js +0 -150
- package/src/components/organisms/BarButtons/styles.js +0 -54
- package/src/components/organisms/Chatv2/ChatLists/ChatLists.stories.js +0 -65
- package/src/components/organisms/Chatv2/ChatLists/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chatv2/ChatLists/THD.png +0 -0
- package/src/components/organisms/Chatv2/ChatLists/index.js +0 -141
- package/src/components/organisms/Chatv2/ChatLists/styles.js +0 -162
- package/src/components/organisms/Chatv2/Chatv2.stories.js +0 -184
- package/src/components/organisms/Chatv2/ContainerItems/ContainerItems.stories.js +0 -142
- package/src/components/organisms/Chatv2/ContainerItems/index.js +0 -538
- package/src/components/organisms/Chatv2/ContainerItems/styles.js +0 -360
- package/src/components/organisms/Chatv2/ContentChat/ContentChat.stories.js +0 -102
- package/src/components/organisms/Chatv2/ContentChat/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chatv2/ContentChat/THD.png +0 -0
- package/src/components/organisms/Chatv2/ContentChat/index.js +0 -1016
- package/src/components/organisms/Chatv2/ContentChat/styles.js +0 -44
- package/src/components/organisms/Chatv2/Footer/Footer.stories.js +0 -22
- package/src/components/organisms/Chatv2/Footer/index.js +0 -668
- package/src/components/organisms/Chatv2/Footer/styles.js +0 -290
- package/src/components/organisms/Chatv2/Header/Header.stories.js +0 -66
- package/src/components/organisms/Chatv2/Header/index.js +0 -93
- package/src/components/organisms/Chatv2/Header/styles.js +0 -49
- package/src/components/organisms/Chatv2/index.js +0 -281
- package/src/components/organisms/Chatv2/styles.js +0 -85
- package/src/components/organisms/CompleteServices/CompleteServices.stories.js +0 -91
- package/src/components/organisms/CompleteServices/index.js +0 -82
- package/src/components/organisms/CompleteServices/styles.js +0 -35
- package/src/components/organisms/DragAndDropPhases/DragAndDropPhases.stories.js +0 -13
- package/src/components/organisms/DragAndDropPhases/index.js +0 -336
- package/src/components/organisms/DragAndDropPhases/styles.js +0 -107
- package/src/components/organisms/DragPrueba/DragPrueba.stories.js +0 -12
- package/src/components/organisms/DragPrueba/index.js +0 -57
- package/src/components/organisms/DragPrueba/styles.js +0 -8
- package/src/components/organisms/EditGroup/EditGroup.stories.js +0 -20
- package/src/components/organisms/EditGroup/index.js +0 -321
- package/src/components/organisms/EditGroup/styles.js +0 -207
- package/src/components/organisms/FullProductNamev2/FullProductNamev2.stories.js +0 -28
- package/src/components/organisms/FullProductNamev2/index.js +0 -101
- package/src/components/organisms/FullProductNamev2/styles.js +0 -49
- package/src/components/organisms/FullTabsMenuv2/FullTabsMenuv2.stories.js +0 -22
- package/src/components/organisms/FullTabsMenuv2/index.js +0 -142
- package/src/components/organisms/FullTabsMenuv2/styles.js +0 -47
- package/src/components/organisms/ImageDataTablev2/ImageDataTablev2.stories.js +0 -24
- package/src/components/organisms/ImageDataTablev2/index.js +0 -124
- package/src/components/organisms/ImageDataTablev2/styles.js +0 -18
- package/src/components/organisms/ImagePreviewerv2/ImagePreviewerv2.stories.js +0 -38
- package/src/components/organisms/ImagePreviewerv2/index.js +0 -22
- package/src/components/organisms/ImagePreviewerv2/styles.js +0 -7
- package/src/components/organisms/ImageUploader/ImageUploader.stories.js +0 -15
- package/src/components/organisms/ImageUploader/index.js +0 -62
- package/src/components/organisms/ImageUploader/styles.js +0 -29
- package/src/components/organisms/ImageVisor/ImageVisor.stories.js +0 -15
- package/src/components/organisms/ImageVisor/index.js +0 -143
- package/src/components/organisms/ImageVisor/styles.js +0 -106
- package/src/components/organisms/InputGroupv2/InputGroupv2.stories.js +0 -31
- package/src/components/organisms/InputGroupv2/index.js +0 -296
- package/src/components/organisms/InputGroupv2/styles.js +0 -90
- package/src/components/organisms/MandatoryBar/MandatoryBar.stories.js +0 -18
- package/src/components/organisms/MandatoryBar/index.js +0 -31
- package/src/components/organisms/MandatoryBar/styles.js +0 -12
- package/src/components/organisms/ProductImageModalv2/ProductImageModalv2.stories.js +0 -90
- package/src/components/organisms/ProductImageModalv2/index.js +0 -105
- package/src/components/organisms/ProductImageModalv2/styles.js +0 -71
- package/src/components/organisms/RenameImagesBar/RenameImagesBar.stories.js +0 -18
- package/src/components/organisms/RenameImagesBar/index.js +0 -30
- package/src/components/organisms/RenameImagesBar/styles.js +0 -12
- package/src/components/organisms/Table/Table.stories.js +0 -609
- package/src/components/organisms/Table/index.js +0 -84
- package/src/components/organisms/Table/styles.js +0 -114
- package/src/components/organisms/VersionSelectorv2/VersionSelectorv2.stories.js +0 -15
- package/src/components/organisms/VersionSelectorv2/index.js +0 -105
- package/src/components/organisms/VersionSelectorv2/styles.js +0 -45
- package/src/components/pages/MultipleEdition/MultipleEdition.stories.js +0 -17
- package/src/components/pages/MultipleEdition/components/ImageUploader.js +0 -62
- package/src/components/pages/MultipleEdition/components/ImageUploaderStyles.js +0 -29
- package/src/components/pages/MultipleEdition/components/ImageVisor.js +0 -143
- package/src/components/pages/MultipleEdition/components/styles.js +0 -106
- package/src/components/pages/MultipleEdition/index.js +0 -248
- package/src/components/pages/MultipleEdition/saveData.js +0 -92
- package/src/components/pages/MultipleEdition/styles.js +0 -201
- package/src/components/pages/MultipleEdition/utils.js +0 -1073
- package/src/components/pages/ProductEditionv2/ProductEditionv2.stories.js +0 -213
- package/src/components/pages/ProductEditionv2/index.js +0 -1758
- package/src/components/pages/ProductEditionv2/styles.js +0 -154
- package/src/components/pages/RetailerProductEdition/generateThumnail.js +0 -21
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from "react";
|
|
2
|
-
import ReactImageFallback from "react-image-fallback";
|
|
3
|
-
import { ImageContainer, ImageView } from "./styles.js";
|
|
4
|
-
import ImageUploader from "../ImageUploader";
|
|
5
|
-
import { getImageURL } from "../../../global-files/utils.js";
|
|
6
|
-
import defaultProductImage from "../../../assets/images/defaultImages/defaultProductImage.png";
|
|
7
|
-
import fullscreen from "../../../assets/images/Icons/fullscreen.svg";
|
|
8
|
-
import close from "../../../assets/images/Icons/close.svg";
|
|
9
|
-
import uploadFile from "../../../assets/images/Icons/upload-file.svg";
|
|
10
|
-
import deleteForever from "../../../assets/images/Icons/delete-forever-white.svg";
|
|
11
|
-
|
|
12
|
-
export const ImageVisor = ({
|
|
13
|
-
value,
|
|
14
|
-
name,
|
|
15
|
-
setModalFromTable,
|
|
16
|
-
setDataServices,
|
|
17
|
-
setModal,
|
|
18
|
-
...props
|
|
19
|
-
}) => {
|
|
20
|
-
const [smallSrc, setSmallSrc] = useState("");
|
|
21
|
-
function handleNewImage(imageFile) {
|
|
22
|
-
const payload = { ...props, ...imageFile };
|
|
23
|
-
setDataServices({ type: "updateImage", payload });
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function handleUpdateImage(file) {
|
|
27
|
-
if (file) {
|
|
28
|
-
const reader = new FileReader();
|
|
29
|
-
reader.onload = () => {
|
|
30
|
-
getImageDimensions(reader.result);
|
|
31
|
-
};
|
|
32
|
-
reader.readAsDataURL(file);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const getImageDimensions = (dataURL) => {
|
|
37
|
-
const img = new Image();
|
|
38
|
-
img.onload = () => {
|
|
39
|
-
const image = {
|
|
40
|
-
src: dataURL,
|
|
41
|
-
ext: img.src.includes("image/jpeg") ? "jpg" : "png",
|
|
42
|
-
width: img.width,
|
|
43
|
-
height: img.height,
|
|
44
|
-
};
|
|
45
|
-
handleNewImage(image);
|
|
46
|
-
changeVisor();
|
|
47
|
-
};
|
|
48
|
-
img.src = dataURL;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
function changeVisor(view) {
|
|
52
|
-
if (!view) {
|
|
53
|
-
setModalFromTable(null);
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
const isSmall = view === "small";
|
|
57
|
-
let src = isSmall
|
|
58
|
-
? smallSrc
|
|
59
|
-
: `${process.env.REACT_APP_IMAGES_ENDPOINT}/${value?.src}`;
|
|
60
|
-
setModalFromTable(
|
|
61
|
-
<ImageView visorView={view}>
|
|
62
|
-
<div className="header">
|
|
63
|
-
<p>{name}</p>
|
|
64
|
-
<div className="buttons">
|
|
65
|
-
{isSmall ? (
|
|
66
|
-
<>
|
|
67
|
-
{value?.src ? (
|
|
68
|
-
<img
|
|
69
|
-
src={fullscreen}
|
|
70
|
-
alt="Ver en pantalla completa"
|
|
71
|
-
onClick={() => changeVisor("fullscreen")}
|
|
72
|
-
/>
|
|
73
|
-
) : null}
|
|
74
|
-
<img src={close} alt="Cerrar" onClick={() => changeVisor()} />
|
|
75
|
-
</>
|
|
76
|
-
) : (
|
|
77
|
-
<>
|
|
78
|
-
<label className="borderCircle" htmlFor="fileInput">
|
|
79
|
-
<img src={uploadFile} alt="Actualizar imagen" />
|
|
80
|
-
<input
|
|
81
|
-
type="file"
|
|
82
|
-
id="fileInput"
|
|
83
|
-
accept="image/png, image/jpeg"
|
|
84
|
-
style={{ display: "none" }}
|
|
85
|
-
onChange={(e) => handleUpdateImage(e.target.files[0])}
|
|
86
|
-
/>
|
|
87
|
-
</label>
|
|
88
|
-
<img
|
|
89
|
-
className="borderCircle"
|
|
90
|
-
src={deleteForever}
|
|
91
|
-
alt="Eliminar imágen"
|
|
92
|
-
onClick={() => {
|
|
93
|
-
setModal({
|
|
94
|
-
type: "delete",
|
|
95
|
-
functions: { setModal, setDataServices },
|
|
96
|
-
payload: props,
|
|
97
|
-
});
|
|
98
|
-
changeVisor();
|
|
99
|
-
}}
|
|
100
|
-
/>
|
|
101
|
-
<img
|
|
102
|
-
className="borderCircle"
|
|
103
|
-
src={close}
|
|
104
|
-
alt="Cerrar"
|
|
105
|
-
onClick={() => changeVisor("small")}
|
|
106
|
-
/>
|
|
107
|
-
</>
|
|
108
|
-
)}
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<div className="body">
|
|
112
|
-
<ReactImageFallback
|
|
113
|
-
className="imageLoaded"
|
|
114
|
-
src={src}
|
|
115
|
-
fallbackImage={<ImageUploader handleNewImage={handleNewImage} />}
|
|
116
|
-
alt={name ?? "Imagen del producto"}
|
|
117
|
-
/>
|
|
118
|
-
</div>
|
|
119
|
-
</ImageView>
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
useEffect(() => {
|
|
124
|
-
let src = value?.src?.includes("image/")
|
|
125
|
-
? value?.src
|
|
126
|
-
: getImageURL(process.env.REACT_APP_IMAGES_BUCKET, value?.src, 250, 250);
|
|
127
|
-
setSmallSrc(src);
|
|
128
|
-
}, [value]);
|
|
129
|
-
|
|
130
|
-
return (
|
|
131
|
-
<>
|
|
132
|
-
<ImageContainer onClick={() => changeVisor("small")}>
|
|
133
|
-
<ReactImageFallback
|
|
134
|
-
src={smallSrc}
|
|
135
|
-
fallbackImage={defaultProductImage}
|
|
136
|
-
alt={name ?? "Imagen del producto"}
|
|
137
|
-
/>
|
|
138
|
-
</ImageContainer>
|
|
139
|
-
</>
|
|
140
|
-
);
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export default ImageVisor;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import styled, { css } from "styled-components";
|
|
2
|
-
import uploadFile from "../../../assets/images/Icons/upload-file.svg";
|
|
3
|
-
|
|
4
|
-
export const ImageContainer = styled.div`
|
|
5
|
-
align-items: center;
|
|
6
|
-
background: var(--white-main, #fff);
|
|
7
|
-
border-radius: 7px;
|
|
8
|
-
border: 1px solid var(--grey-medium, #cbcbcb);
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 52px;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
width: 52px;
|
|
14
|
-
& > img {
|
|
15
|
-
border-radius: 7px;
|
|
16
|
-
height: 100%;
|
|
17
|
-
width: 100%;
|
|
18
|
-
object-fit: contain;
|
|
19
|
-
}
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
export const ImageView = styled.div`
|
|
23
|
-
background: var(--white-main, #fff);
|
|
24
|
-
border-radius: 5px;
|
|
25
|
-
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.25);
|
|
26
|
-
height: 280px;
|
|
27
|
-
left: calc(50% - 125px);
|
|
28
|
-
position: absolute;
|
|
29
|
-
top: calc(50% - 140px);
|
|
30
|
-
width: 250px;
|
|
31
|
-
z-index: 10;
|
|
32
|
-
.header {
|
|
33
|
-
align-items: center;
|
|
34
|
-
background: var(--grey-medium, #cbcbcb);
|
|
35
|
-
border-radius: 5px 5px 0px 0px;
|
|
36
|
-
color: var(--white-main, #fff);
|
|
37
|
-
display: flex;
|
|
38
|
-
font-family: Roboto;
|
|
39
|
-
font-size: 12px;
|
|
40
|
-
font-style: normal;
|
|
41
|
-
font-weight: 500;
|
|
42
|
-
height: 30px;
|
|
43
|
-
justify-content: space-between;
|
|
44
|
-
line-height: normal;
|
|
45
|
-
overflow: hidden;
|
|
46
|
-
padding: 0 9px 0 10px;
|
|
47
|
-
text-overflow: ellipsis;
|
|
48
|
-
width: 100%;
|
|
49
|
-
.buttons {
|
|
50
|
-
display: flex;
|
|
51
|
-
gap: 10px;
|
|
52
|
-
img {
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
}
|
|
55
|
-
label {
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
padding: 3px;
|
|
59
|
-
}
|
|
60
|
-
.borderCircle {
|
|
61
|
-
border-radius: 20px;
|
|
62
|
-
border: 1px solid var(--white-main, #fff);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
.body {
|
|
67
|
-
width: 100%;
|
|
68
|
-
height: calc(100% - 30px);
|
|
69
|
-
.imageLoaded {
|
|
70
|
-
width: 100%;
|
|
71
|
-
height: 100%;
|
|
72
|
-
object-fit: contain;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
${({ visorView }) =>
|
|
76
|
-
visorView === "fullscreen" &&
|
|
77
|
-
css`
|
|
78
|
-
background: var(--black-main, #262626d9);
|
|
79
|
-
height: 100%;
|
|
80
|
-
left: 0;
|
|
81
|
-
top: 0;
|
|
82
|
-
width: 100%;
|
|
83
|
-
.header {
|
|
84
|
-
background: var(--black-main, #262626);
|
|
85
|
-
font-size: 14px;
|
|
86
|
-
height: 45px;
|
|
87
|
-
.buttons > img {
|
|
88
|
-
border-radius: 20px;
|
|
89
|
-
border: 1px solid var(--white-main, #fff);
|
|
90
|
-
padding: 3px;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
> div {
|
|
94
|
-
align-items: center;
|
|
95
|
-
display: flex;
|
|
96
|
-
height: 100%;
|
|
97
|
-
justify-content: center;
|
|
98
|
-
width: 100%;
|
|
99
|
-
& > img {
|
|
100
|
-
border-radius: 5px;
|
|
101
|
-
height: 500px;
|
|
102
|
-
width: 500px;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
`}
|
|
106
|
-
`;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { InputGroupv2 } from "./index";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/organisms/InputGroupv2",
|
|
5
|
-
component: InputGroupv2,
|
|
6
|
-
argTypes: {
|
|
7
|
-
activeSection: {
|
|
8
|
-
options: [true, false],
|
|
9
|
-
control: { type: "boolean" },
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const Template = (args) => <InputGroupv2 {...args} />;
|
|
15
|
-
|
|
16
|
-
export const InputGroupDefault = Template.bind({});
|
|
17
|
-
InputGroupDefault.args = {
|
|
18
|
-
InputGroupv2: {
|
|
19
|
-
name: "Información básica del producto",
|
|
20
|
-
inputs: [
|
|
21
|
-
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
22
|
-
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
23
|
-
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
24
|
-
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
25
|
-
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
26
|
-
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
27
|
-
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
28
|
-
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
};
|
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import { Container } from "./styles";
|
|
2
|
-
import { TagAndInputv2 } from "../../molecules/TagAndInputv2";
|
|
3
|
-
import { ScreenHeaderv2 } from "../../atoms/ScreenHeaderv2";
|
|
4
|
-
import { useState, useEffect } from "react";
|
|
5
|
-
import { Box } from "../Box";
|
|
6
|
-
|
|
7
|
-
export const InputGroupv2 = ({
|
|
8
|
-
inputGroup = {},
|
|
9
|
-
auditInputGroup,
|
|
10
|
-
activeSection,
|
|
11
|
-
dataInputs = {},
|
|
12
|
-
auditInputs = {},
|
|
13
|
-
updatedDescriptions,
|
|
14
|
-
setUpdatedDescriptions,
|
|
15
|
-
updatedDatasheets,
|
|
16
|
-
setUpdatedDatasheets,
|
|
17
|
-
articleId,
|
|
18
|
-
version,
|
|
19
|
-
dinamicHeight,
|
|
20
|
-
compare,
|
|
21
|
-
activeRetailer,
|
|
22
|
-
setUpdatedBoxData,
|
|
23
|
-
showMissingChars,
|
|
24
|
-
}) => {
|
|
25
|
-
const inputTypeValue = (type) => {
|
|
26
|
-
switch (type) {
|
|
27
|
-
case "Booleano":
|
|
28
|
-
return "checkbox";
|
|
29
|
-
case "Numérico":
|
|
30
|
-
return "number";
|
|
31
|
-
default:
|
|
32
|
-
return "text";
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const [showBox, setShowBox] = useState(false);
|
|
36
|
-
|
|
37
|
-
const isEquals = (dataInputsVal, auditInputsVal) => {
|
|
38
|
-
const result = dataInputsVal === auditInputsVal;
|
|
39
|
-
return result;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
if (inputGroup.groupId === "16" && activeRetailer && activeRetailer?.retailer?.id) {
|
|
45
|
-
if (activeRetailer?.retailer?.id === 68) {
|
|
46
|
-
setShowBox(true);
|
|
47
|
-
} else {
|
|
48
|
-
setShowBox(false);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}, [activeRetailer, inputGroup.groupId]);
|
|
52
|
-
|
|
53
|
-
// useEffect(() => {
|
|
54
|
-
// if (showBox) {
|
|
55
|
-
// // Realiza la acción que deseas cuando showBox es true
|
|
56
|
-
// console.log("showBox es true");
|
|
57
|
-
// } else {
|
|
58
|
-
// // Realiza la acción que deseas cuando showBox es false
|
|
59
|
-
// console.log("showBox es false");
|
|
60
|
-
// }
|
|
61
|
-
// }, [showBox]);
|
|
62
|
-
// console.log("dataInputs",dataInputs);
|
|
63
|
-
|
|
64
|
-
return (
|
|
65
|
-
<>
|
|
66
|
-
{inputGroup.groupId === "16" && activeRetailer?.retailer?.id === 68 && (
|
|
67
|
-
<Container
|
|
68
|
-
className={
|
|
69
|
-
activeSection === "Ficha técnica"
|
|
70
|
-
? "datasheets-layout"
|
|
71
|
-
: "descriptions-layout"
|
|
72
|
-
}
|
|
73
|
-
>
|
|
74
|
-
<Box
|
|
75
|
-
inputGroup={inputGroup}
|
|
76
|
-
dataInputs={dataInputs}
|
|
77
|
-
onChange={setUpdatedBoxData}
|
|
78
|
-
/>
|
|
79
|
-
</Container>
|
|
80
|
-
)}
|
|
81
|
-
{(inputGroup.groupId !== "16") && (
|
|
82
|
-
<Container
|
|
83
|
-
className={
|
|
84
|
-
activeSection === "Ficha técnica"
|
|
85
|
-
? "datasheets-layout"
|
|
86
|
-
: "descriptions-layout"
|
|
87
|
-
}
|
|
88
|
-
>
|
|
89
|
-
{inputGroup?.dataGroup && (
|
|
90
|
-
<ScreenHeaderv2
|
|
91
|
-
headerType={"retailer-name-header"}
|
|
92
|
-
text={`${inputGroup?.dataGroup}`}
|
|
93
|
-
/>
|
|
94
|
-
)}
|
|
95
|
-
<div className="inputs-container">
|
|
96
|
-
{inputGroup?.inputs?.map((input, index) =>
|
|
97
|
-
activeSection === "Ficha técnica" ? (
|
|
98
|
-
<>
|
|
99
|
-
<TagAndInputv2
|
|
100
|
-
key={
|
|
101
|
-
index +
|
|
102
|
-
"-" +
|
|
103
|
-
dataInputs[input]?.value +
|
|
104
|
-
"-" +
|
|
105
|
-
dataInputs[input]?.id +
|
|
106
|
-
"-" +
|
|
107
|
-
compare
|
|
108
|
-
}
|
|
109
|
-
//disabled={input === 40001}
|
|
110
|
-
disabled={false}
|
|
111
|
-
inputId={dataInputs[input]?.id}
|
|
112
|
-
version={version}
|
|
113
|
-
inputType={inputTypeValue(dataInputs[input]?.type)}
|
|
114
|
-
label={
|
|
115
|
-
dataInputs[input]?.name +
|
|
116
|
-
(dataInputs[input]?.required ? "*" : "")
|
|
117
|
-
}
|
|
118
|
-
value={
|
|
119
|
-
compare
|
|
120
|
-
? auditInputs[input]?.value
|
|
121
|
-
: dataInputs[input]?.value
|
|
122
|
-
}
|
|
123
|
-
inputPlaceHolder={input?.placeholder}
|
|
124
|
-
articleId={articleId}
|
|
125
|
-
isRequired={dataInputs[input]?.required}
|
|
126
|
-
required={dataInputs[input]?.required}
|
|
127
|
-
minWords={dataInputs[input]?.min_words}
|
|
128
|
-
maxWords={dataInputs[input]?.max_words}
|
|
129
|
-
minChar={dataInputs[input]?.min_chars}
|
|
130
|
-
updatedDatasheets={updatedDatasheets}
|
|
131
|
-
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
132
|
-
maxChar={
|
|
133
|
-
dataInputs[input]?.max_chars
|
|
134
|
-
? dataInputs[input]?.max_chars
|
|
135
|
-
: 999
|
|
136
|
-
}
|
|
137
|
-
optionList={dataInputs[input]?.option_list}
|
|
138
|
-
description={dataInputs[input]?.description}
|
|
139
|
-
showTooltip={true}
|
|
140
|
-
auditClass={
|
|
141
|
-
compare &&
|
|
142
|
-
!isEquals(dataInputs[input].value, auditInputs[input].value)
|
|
143
|
-
? "audit-class"
|
|
144
|
-
: ""
|
|
145
|
-
}
|
|
146
|
-
showMissingChars={showMissingChars}
|
|
147
|
-
/>
|
|
148
|
-
</>
|
|
149
|
-
) : (
|
|
150
|
-
<TagAndInputv2
|
|
151
|
-
key={index + "-" + input?.value + "-" + compare}
|
|
152
|
-
inputId={input.id}
|
|
153
|
-
index={index}
|
|
154
|
-
inputType={"textarea"}
|
|
155
|
-
label={input?.name + (input.required ? "*" : "")}
|
|
156
|
-
value={
|
|
157
|
-
compare ? auditInputGroup?.inputs[index]?.value : input?.value
|
|
158
|
-
}
|
|
159
|
-
isRequired={input.required}
|
|
160
|
-
required={input.required}
|
|
161
|
-
minWords={input?.min_words}
|
|
162
|
-
maxWords={input?.max_words}
|
|
163
|
-
minChar={input?.min_chars}
|
|
164
|
-
maxChar={input.max_chars}
|
|
165
|
-
inputPlaceHolder={input?.placeholder}
|
|
166
|
-
updatedDescriptions={updatedDescriptions}
|
|
167
|
-
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
168
|
-
articleId={articleId}
|
|
169
|
-
version={version}
|
|
170
|
-
dinamicHeight={dinamicHeight}
|
|
171
|
-
description={input?.description}
|
|
172
|
-
showTooltip={true}
|
|
173
|
-
auditClass={
|
|
174
|
-
compare &&
|
|
175
|
-
!isEquals(input?.value, auditInputGroup?.inputs[index]?.value)
|
|
176
|
-
? "audit-class"
|
|
177
|
-
: ""
|
|
178
|
-
}
|
|
179
|
-
showMissingChars={showMissingChars}
|
|
180
|
-
/>
|
|
181
|
-
)
|
|
182
|
-
)}
|
|
183
|
-
</div>
|
|
184
|
-
</Container>
|
|
185
|
-
)}
|
|
186
|
-
{(inputGroup.groupId === "16" && activeRetailer?.retailer?.id === 74) && (
|
|
187
|
-
<Container
|
|
188
|
-
className={
|
|
189
|
-
activeSection === "Ficha técnica"
|
|
190
|
-
? "datasheets-layout"
|
|
191
|
-
: "descriptions-layout"
|
|
192
|
-
}
|
|
193
|
-
>
|
|
194
|
-
{inputGroup?.dataGroup && (
|
|
195
|
-
<ScreenHeaderv2
|
|
196
|
-
headerType={"retailer-name-header"}
|
|
197
|
-
text={`${inputGroup?.dataGroup}`}
|
|
198
|
-
/>
|
|
199
|
-
)}
|
|
200
|
-
<div className="inputs-container">
|
|
201
|
-
{inputGroup?.inputs?.map((input, index) =>
|
|
202
|
-
activeSection === "Ficha técnica" ? (
|
|
203
|
-
<>
|
|
204
|
-
<TagAndInputv2
|
|
205
|
-
key={
|
|
206
|
-
index +
|
|
207
|
-
"-" +
|
|
208
|
-
dataInputs[input]?.value +
|
|
209
|
-
"-" +
|
|
210
|
-
dataInputs[input]?.id +
|
|
211
|
-
"-" +
|
|
212
|
-
compare
|
|
213
|
-
}
|
|
214
|
-
//disabled={input === 40001}
|
|
215
|
-
disabled={false}
|
|
216
|
-
inputId={dataInputs[input]?.id}
|
|
217
|
-
version={version}
|
|
218
|
-
inputType={inputTypeValue(dataInputs[input]?.type)}
|
|
219
|
-
label={
|
|
220
|
-
dataInputs[input]?.name +
|
|
221
|
-
(dataInputs[input]?.required ? "*" : "")
|
|
222
|
-
}
|
|
223
|
-
value={
|
|
224
|
-
compare
|
|
225
|
-
? auditInputs[input]?.value
|
|
226
|
-
: dataInputs[input]?.value
|
|
227
|
-
}
|
|
228
|
-
inputPlaceHolder={input?.placeholder}
|
|
229
|
-
articleId={articleId}
|
|
230
|
-
isRequired={dataInputs[input]?.required}
|
|
231
|
-
required={input.required}
|
|
232
|
-
minWords={input?.min_words}
|
|
233
|
-
maxWords={input?.max_words}
|
|
234
|
-
minChar={input?.min_chars}
|
|
235
|
-
updatedDatasheets={updatedDatasheets}
|
|
236
|
-
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
237
|
-
maxChar={
|
|
238
|
-
dataInputs[input]?.max_chars
|
|
239
|
-
? dataInputs[input]?.max_chars
|
|
240
|
-
: 999
|
|
241
|
-
}
|
|
242
|
-
optionList={dataInputs[input]?.option_list}
|
|
243
|
-
description={dataInputs[input]?.description}
|
|
244
|
-
showTooltip={true}
|
|
245
|
-
inputGroup={inputGroup}
|
|
246
|
-
dataInputs={dataInputs}
|
|
247
|
-
onChange={setUpdatedBoxData}
|
|
248
|
-
auditClass={
|
|
249
|
-
compare &&
|
|
250
|
-
!isEquals(dataInputs[input].value, auditInputs[input].value)
|
|
251
|
-
? "audit-class"
|
|
252
|
-
: ""
|
|
253
|
-
}
|
|
254
|
-
showMissingChars={showMissingChars}
|
|
255
|
-
/>
|
|
256
|
-
</>
|
|
257
|
-
) : (
|
|
258
|
-
<TagAndInputv2
|
|
259
|
-
key={index + "-" + input?.value + "-" + compare}
|
|
260
|
-
inputId={input.id}
|
|
261
|
-
index={index}
|
|
262
|
-
inputType={"textarea"}
|
|
263
|
-
label={input?.name + (input.required ? "*" : "")}
|
|
264
|
-
value={
|
|
265
|
-
compare ? auditInputGroup?.inputs[index]?.value : input?.value
|
|
266
|
-
}
|
|
267
|
-
isRequired={input.required}
|
|
268
|
-
required={input.required}
|
|
269
|
-
minWords={input?.min_words}
|
|
270
|
-
maxWords={input?.max_words}
|
|
271
|
-
minChar={input?.min_chars}
|
|
272
|
-
maxChar={input.max_chars}
|
|
273
|
-
inputPlaceHolder={input?.placeholder}
|
|
274
|
-
updatedDescriptions={updatedDescriptions}
|
|
275
|
-
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
276
|
-
articleId={articleId}
|
|
277
|
-
version={version}
|
|
278
|
-
dinamicHeight={dinamicHeight}
|
|
279
|
-
description={input?.description}
|
|
280
|
-
showTooltip={true}
|
|
281
|
-
auditClass={
|
|
282
|
-
compare &&
|
|
283
|
-
!isEquals(input?.value, auditInputGroup?.inputs[index]?.value)
|
|
284
|
-
? "audit-class"
|
|
285
|
-
: ""
|
|
286
|
-
}
|
|
287
|
-
showMissingChars={showMissingChars}
|
|
288
|
-
/>
|
|
289
|
-
)
|
|
290
|
-
)}
|
|
291
|
-
</div>
|
|
292
|
-
</Container>
|
|
293
|
-
)}
|
|
294
|
-
</>
|
|
295
|
-
);
|
|
296
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { GlobalColors } from "../../../global-files/variables";
|
|
3
|
-
|
|
4
|
-
export const Container = styled.div`
|
|
5
|
-
border-radius: 6px;
|
|
6
|
-
padding: 10px;
|
|
7
|
-
width: 100%;
|
|
8
|
-
|
|
9
|
-
.retailer-name-header {
|
|
10
|
-
& + * {
|
|
11
|
-
margin-top: 10px;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
&.datasheets-layout {
|
|
15
|
-
border: 1px solid ${GlobalColors.gray_light};
|
|
16
|
-
padding: 18px;
|
|
17
|
-
border-radius: 10px;
|
|
18
|
-
|
|
19
|
-
.inputs-container {
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-wrap: wrap;
|
|
22
|
-
width: 100%;
|
|
23
|
-
gap: 10px;
|
|
24
|
-
|
|
25
|
-
.input-container {
|
|
26
|
-
flex: 1 1 20%;
|
|
27
|
-
min-width: 227px;
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: row;
|
|
30
|
-
align-items: center;
|
|
31
|
-
gap: 10px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
&.datasheets-layout .title-container {
|
|
36
|
-
width:auto;
|
|
37
|
-
white-space:nowrap;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
& + * {
|
|
41
|
-
margin-top: 15px;
|
|
42
|
-
}
|
|
43
|
-
.title-container {
|
|
44
|
-
display:flex;
|
|
45
|
-
gap:8px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&.descriptions-layout .title-container {
|
|
49
|
-
width:20%;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&.descriptions-layout {
|
|
53
|
-
.inputs-container{
|
|
54
|
-
.input-container{
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
gap:8px;
|
|
58
|
-
margin-top:10px;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`;
|
|
63
|
-
export const ContainerIcon = styled.div`
|
|
64
|
-
cursor: pointer;
|
|
65
|
-
@font-face {
|
|
66
|
-
font-family: "Material Symbols Outlined";
|
|
67
|
-
font-style: normal;
|
|
68
|
-
font-weight: 100 700;
|
|
69
|
-
src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v68/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY.woff2)
|
|
70
|
-
format("woff2");
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.hola {
|
|
74
|
-
font-family: "Material Symbols Outlined";
|
|
75
|
-
font-size: 30px;
|
|
76
|
-
//line-height: 1;
|
|
77
|
-
margin-top: 10px;
|
|
78
|
-
}
|
|
79
|
-
.hola {
|
|
80
|
-
font-variation-settings: "FILL"
|
|
81
|
-
${(props) => (props.percentageRequired < 100 ? 0 : 1)},
|
|
82
|
-
"wght" 400, "GRAD" 0, "opsz" 48;
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
.icono-police{
|
|
86
|
-
font-size:20px;
|
|
87
|
-
color: ${(props) =>
|
|
88
|
-
props.percentageRequired < 100 ? "#d4d1d7" : "#ECDD1D"};
|
|
89
|
-
}
|
|
90
|
-
`;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { MandatoryBar } from "./index";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/organisms/MandatoryBar",
|
|
5
|
-
component: MandatoryBar,
|
|
6
|
-
argTypes: {
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const Template = (args) => <MandatoryBar {...args} />;
|
|
12
|
-
|
|
13
|
-
export const MandatoryBarDefault = Template.bind({});
|
|
14
|
-
MandatoryBarDefault.args = {
|
|
15
|
-
MandatoryBar: {
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
};
|