contentoh-components-library 6.0.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/AsignationOption/index.js +10 -5
- package/dist/components/atoms/AsignationOption/styles.js +1 -1
- package/dist/components/atoms/AtomList/index.js +5 -3
- package/dist/components/atoms/AtomList/styles.js +1 -1
- package/dist/components/atoms/Avatar/index.js +4 -2
- package/dist/components/atoms/Card/Card.stories.js +22 -0
- package/dist/components/atoms/Card/index.js +19 -0
- package/dist/components/atoms/Card/styles.js +18 -0
- package/dist/components/atoms/CheckBox/index.js +3 -1
- package/dist/components/atoms/Commentary/Commentary.stories.js +1 -0
- package/dist/components/atoms/Commentary/index.js +15 -0
- package/dist/components/atoms/Commentary/styles.js +20 -0
- package/dist/components/atoms/CustomerTypeImage/index.js +2 -1
- package/dist/components/atoms/EditField/EditField.stories.js +24 -0
- package/dist/components/atoms/EditField/index.js +29 -0
- package/dist/components/atoms/EditField/styles.js +20 -0
- package/dist/components/atoms/GeneralButton/GeneralButton.stories.js +1 -1
- package/dist/components/atoms/GeneralButton/index.js +3 -1
- package/dist/components/atoms/GeneralButton/styles.js +12 -2
- package/dist/components/atoms/GeneralInput/index.js +60 -8
- package/dist/components/atoms/GeneralInput/styles.js +4 -1
- package/dist/components/atoms/GeneralTextBox/styles.js +1 -1
- package/dist/components/atoms/GenericModal/GenericModal.stories.js +171 -0
- package/dist/components/atoms/GenericModal/index.js +23 -0
- package/dist/components/atoms/GenericModal/styles.js +22 -0
- package/dist/components/atoms/GradientPanel/GradientPanel.stories.js +135 -4
- package/dist/components/atoms/GradientPanel/index.js +4 -2
- package/dist/components/atoms/GradientPanel/styles.js +2 -2
- package/dist/components/atoms/Graphic/Graphic.stories.js +30 -0
- package/dist/components/atoms/Graphic/index.js +30 -0
- package/dist/components/atoms/Graphic/styles.js +18 -0
- package/dist/components/atoms/Input/index.js +19 -0
- package/dist/components/atoms/Input/style.js +26 -0
- package/dist/components/atoms/LabelToInput/index.js +48 -0
- package/dist/components/atoms/LabelToInput/style.js +22 -0
- package/dist/components/atoms/LoadImageMenu/LoadImageMenu.stories.js +29 -0
- package/dist/components/atoms/LoadImageMenu/index.js +74 -0
- package/dist/components/atoms/LoadImageMenu/styles.js +20 -0
- package/dist/components/atoms/LogoImage/LogoImage.stories.js +22 -0
- package/dist/components/atoms/LogoImage/index.js +23 -0
- package/dist/components/atoms/LogoImage/styles.js +18 -0
- package/dist/components/atoms/MenuNotification/MenuNotification.stories.js +33 -0
- package/dist/components/atoms/MenuNotification/index.js +35 -0
- package/dist/components/atoms/MenuNotification/styles.js +20 -0
- package/dist/components/atoms/MenuProfile/MenuProfile.stories.js +24 -0
- package/dist/components/atoms/MenuProfile/index.js +47 -0
- package/dist/components/atoms/MenuProfile/styles.js +20 -0
- package/dist/components/atoms/Notification/Notification.stories.js +30 -0
- package/dist/components/atoms/Notification/index.js +27 -0
- package/dist/components/atoms/Notification/styles.js +20 -0
- package/dist/components/atoms/Percent/Percent.stories.js +33 -0
- package/dist/components/atoms/Percent/index.js +32 -0
- package/dist/components/atoms/Percent/styles.js +20 -0
- package/dist/components/atoms/PriorityFlag/index.js +1 -1
- package/dist/components/atoms/ProductImage/styles.js +1 -1
- package/dist/components/atoms/ProgressBar/index.js +2 -2
- package/dist/components/atoms/ProgressBar/styles.js +3 -5
- package/dist/components/atoms/ScreenHeader/ScreenHeader.stories.js +9 -2
- package/dist/components/atoms/ScreenHeader/index.js +5 -3
- package/dist/components/atoms/ScreenHeader/styles.js +17 -2
- package/dist/components/atoms/Select/index.js +32 -0
- package/dist/components/atoms/Select/style.js +32 -0
- package/dist/components/atoms/StatusTag/styles.js +1 -1
- package/dist/components/atoms/ValidationPanel/index.js +4 -3
- package/dist/components/molecules/AddProvidersAndProducts/AddProvidersAndProducts.stories.js +28 -0
- package/dist/components/molecules/AddProvidersAndProducts/index.js +36 -0
- package/dist/components/molecules/AddProvidersAndProducts/styles.js +20 -0
- package/dist/components/molecules/AssignedWork/AssignedWork.stories.js +44 -0
- package/dist/components/molecules/AssignedWork/index.js +55 -0
- package/dist/components/molecules/AssignedWork/styles.js +20 -0
- package/dist/components/molecules/AvatarAndValidation/index.js +17 -7
- package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/dist/components/molecules/EditionActiveImage/index.js +6 -2
- package/dist/components/molecules/FeaturesBar/index.js +21 -2
- package/dist/components/molecules/FeaturesBar/styles.js +1 -1
- package/dist/components/molecules/GalleryElement/index.js +51 -20
- package/dist/components/molecules/GalleryElement/styles.js +1 -1
- package/dist/components/molecules/GalleryHeader/GalleryHeader.stories.js +22 -0
- package/dist/components/molecules/GalleryHeader/index.js +30 -0
- package/dist/components/molecules/GalleryHeader/styles.js +20 -0
- package/dist/components/molecules/ImageSelector/index.js +8 -5
- package/dist/components/molecules/ParentComponent/ParentComponent.stories.js +25 -0
- package/dist/components/molecules/ParentComponent/index.js +67 -0
- package/dist/components/molecules/ParentComponent/styles.js +18 -0
- package/dist/components/molecules/PayMethod/PayMethod.stories.js +22 -0
- package/dist/components/molecules/PayMethod/index.js +61 -0
- package/dist/components/molecules/PayMethod/styles.js +20 -0
- package/dist/components/molecules/PlanSelection/PlanSelection.stories.js +0 -3
- package/dist/components/molecules/PlanSelection/index.js +1 -1
- package/dist/components/molecules/PlanSelection/styles.js +1 -1
- package/dist/components/molecules/ProductNameHeader/index.js +1 -2
- package/dist/components/molecules/ProductNotification/ProductNotification.stories.js +24 -0
- package/dist/components/molecules/ProductNotification/index.js +71 -0
- package/dist/components/molecules/ProductNotification/styles.js +20 -0
- package/dist/components/molecules/ProfileHeader/ProfileHeader.stories.js +30 -0
- package/dist/components/molecules/ProfileHeader/index.js +73 -0
- package/dist/components/molecules/ProfileHeader/styles.js +20 -0
- package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +42 -0
- package/dist/components/molecules/RetailerSelector/index.js +71 -0
- package/dist/components/molecules/RetailerSelector/styles.js +20 -0
- package/dist/components/molecules/SidebarNotification/SidebarNotification.stories.js +98 -0
- package/dist/components/molecules/SidebarNotification/index.js +105 -0
- package/dist/components/molecules/SidebarNotification/styles.js +20 -0
- package/dist/components/molecules/StatusAsignationInfo/index.js +51 -12
- package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
- package/dist/components/molecules/TableHeader/index.js +5 -4
- package/dist/components/molecules/TabsMenu/index.js +4 -2
- package/dist/components/molecules/TagAndInput/index.js +28 -3
- package/dist/components/molecules/TagAndInput/styles.js +1 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +32 -8
- package/dist/components/organisms/FullTabsMenu/index.js +17 -5
- package/dist/components/organisms/FullTabsMenu/styles.js +1 -1
- package/dist/components/organisms/Fullplan/FullPlan.stories.js +13 -15
- package/dist/components/organisms/Fullplan/index.js +1 -1
- package/dist/components/organisms/Fullplan/styles.js +1 -1
- package/dist/components/organisms/ImageDataTable/index.js +77 -15
- package/dist/components/organisms/ImageDataTable/styles.js +7 -1
- package/dist/components/organisms/ImagePreviewer/index.js +6 -19
- package/dist/components/organisms/InputGroup/index.js +53 -8
- package/dist/components/organisms/InputGroup/styles.js +1 -1
- package/dist/components/organisms/ProductImageModal/ProductImageModal.stories.js +122 -120
- package/dist/components/organisms/ProductImageModal/index.js +28 -12
- package/dist/components/organisms/ProductImageModal/styles.js +1 -1
- package/dist/components/pages/CustomerLogin/CustomerLogin.stories.js +95 -0
- package/dist/components/pages/CustomerLogin/index.js +29 -0
- package/dist/components/pages/CustomerLogin/styles.js +18 -0
- package/dist/components/pages/CustomerPayMethod/CustomerPayMethod.stories.js +72 -0
- package/dist/components/pages/CustomerPayMethod/index.js +29 -0
- package/dist/components/pages/CustomerPayMethod/styles.js +18 -0
- package/dist/components/pages/CustomerType/CustomerType.stories.js +16 -5
- package/dist/components/pages/CustomerType/styles.js +1 -3
- package/dist/components/pages/OnboardPlan/OnboardPlan.stories.js +24 -10
- package/dist/components/pages/OnboardPlan/index.js +8 -10
- package/dist/components/pages/OnboardPlan/styles.js +1 -1
- package/dist/components/pages/RetailerPlan/RetailerPlan.stories.js +59 -0
- package/dist/components/pages/RetailerPlan/index.js +31 -0
- package/dist/components/pages/RetailerPlan/styles.js +18 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +101 -313
- package/dist/components/pages/RetailerProductEdition/index.js +1071 -39
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +219 -0
- package/dist/global-files/variables.js +1 -0
- package/dist/index.js +7 -2
- package/package.json +1 -1
- package/src/index.js +2 -1
|
@@ -15,13 +15,28 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.h2(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: ", ";\n font-style: normal;\n font-size: 36px;\n line-height: 42px;\n font-feature-settings: \"pnum\" on, \"lnum\" on;\n color: ", ";\n\n &.with-bold-text {\n span {\n font-family: ", ";\n }\n }\n\n &.product-name-header {\n font-size: 24px;\n line-height: 36px;\n font-weight: 500;\n letter-spacing: -0.015em;\n color: ", ";\n }\n\n &.retailer-name-header {\n font-size: 18px;\n font-weight: 400;\n line-height: 19px;\n color: ", ";\n }\n\n &.input-name-header {\n font-size: 14px;\n line-height: 19px;\n font-weight: 400;\n color: ", ";\n }\n\n &.date-header {\n font-family: ", ";\n color: ", ";\n font-size: 13px;\n font-weight: 400;\n line-height: 18px;\n }\n\n &.table-row-text {\n font-family: ", ";\n color: ", ";\n font-weight: 400;\n font-size: 11px;\n line-height: 18px;\n }\n\n &.gray-table-row {\n font-family: ", ";\n font-weight: 400;\n font-size: 11px;\n line-height: 19px;\n color: ", ";\n background-color: ", ";\n padding: 1px 3px;\n border-radius: 3px;\n }\n"])), function (props) {
|
|
18
|
+
var Container = _styledComponents.default.h2(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: ", ";\n font-style: normal;\n font-size: 36px;\n line-height: 42px;\n font-feature-settings: \"pnum\" on, \"lnum\" on;\n color: ", ";\n\n &.with-bold-text {\n span {\n font-family: ", ";\n }\n }\n\n &.product-name-header {\n font-size: 24px;\n line-height: 36px;\n font-weight: 500;\n letter-spacing: -0.015em;\n color: ", ";\n }\n\n &.retailer-name-header {\n font-size: 18px;\n font-weight: 400;\n line-height: 19px;\n color: ", ";\n }\n\n &.input-name-header {\n font-size: 14px;\n line-height: 19px;\n font-weight: 400;\n color: ", ";\n }\n\n &.date-header {\n font-family: ", ";\n color: ", ";\n font-size: 13px;\n font-weight: 400;\n line-height: 18px;\n }\n\n &.table-row-text {\n font-family: ", ";\n color: ", ";\n font-weight: 400;\n font-size: 11px;\n line-height: 18px;\n }\n\n &.gray-table-row {\n font-family: ", ";\n font-weight: 400;\n font-size: 11px;\n line-height: 19px;\n color: ", ";\n background-color: ", ";\n padding: 1px 3px;\n border-radius: 3px;\n }\n &.header-and-paragraph{\n font-family: ", ";\n font-size: 36px;\n color: ", ";\n p{\n font-family: ", ";\n font-size: 14px;\n color: ", ";\n letter-spacing: -0.015em;\n }\n }\n"])), function (props) {
|
|
19
19
|
return props.fontFamily;
|
|
20
20
|
}, function (props) {
|
|
21
21
|
return props.color;
|
|
22
22
|
}, _variables.FontFamily.Raleway_700, function (_ref) {
|
|
23
23
|
var color = _ref.color;
|
|
24
24
|
return color ? color : _variables.GlobalColors.secondary_magenta;
|
|
25
|
-
},
|
|
25
|
+
}, function (_ref2) {
|
|
26
|
+
var color = _ref2.color;
|
|
27
|
+
return color ? color : _variables.GlobalColors.s5;
|
|
28
|
+
}, function (_ref3) {
|
|
29
|
+
var color = _ref3.color;
|
|
30
|
+
return color ? color : _variables.GlobalColors.s5;
|
|
31
|
+
}, _variables.FontFamily.AvenirNext, function (_ref4) {
|
|
32
|
+
var color = _ref4.color;
|
|
33
|
+
return color ? color : _variables.GlobalColors.s4;
|
|
34
|
+
}, _variables.FontFamily.AvenirNext, function (_ref5) {
|
|
35
|
+
var color = _ref5.color;
|
|
36
|
+
return color ? color : _variables.GlobalColors.s4;
|
|
37
|
+
}, _variables.FontFamily.AvenirNext, function (_ref6) {
|
|
38
|
+
var color = _ref6.color;
|
|
39
|
+
return color ? color : _variables.GlobalColors.s5;
|
|
40
|
+
}, _variables.GlobalColors.s2, _variables.FontFamily.Raleway, _variables.GlobalColors.s5, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4);
|
|
26
41
|
|
|
27
42
|
exports.Container = Container;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Select;
|
|
7
|
+
|
|
8
|
+
var _style = require("./style");
|
|
9
|
+
|
|
10
|
+
function Select(props) {
|
|
11
|
+
return /*#__PURE__*/React.createElement(_style.Container, {
|
|
12
|
+
width: props.width
|
|
13
|
+
}, /*#__PURE__*/React.createElement(_style.SelectCustom, {
|
|
14
|
+
id: props.id,
|
|
15
|
+
width: props.width,
|
|
16
|
+
onChange: props.onChange,
|
|
17
|
+
defaultValue: props.valueSelected ? props.valueSelected : ""
|
|
18
|
+
}, /*#__PURE__*/React.createElement("option", {
|
|
19
|
+
value: "",
|
|
20
|
+
disabled: true
|
|
21
|
+
}, props.placeholder), props.options && props.options.map(function (item, i) {
|
|
22
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
23
|
+
key: "select-" + item.value ? item.value : item + "-" + i,
|
|
24
|
+
value: item.value ? item.value : item // selected={
|
|
25
|
+
// item.value
|
|
26
|
+
// ? item.value == props.valueSelected && "selected"
|
|
27
|
+
// : item === props.valueSelected && "selected"
|
|
28
|
+
// }
|
|
29
|
+
|
|
30
|
+
}, item.name ? item.name : item);
|
|
31
|
+
})), /*#__PURE__*/React.createElement(_style.BackgroundEnd, null));
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SelectCustom = exports.Container = exports.BackgroundEnd = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
15
|
+
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n height: 21px;\n line-height: 3;\n width: ", ";\n overflow: hidden;\n border-radius: 0.25em;\n &::after {\n border-left: 1px solid #e33aa9;\n border-top: 1px solid #e33aa9;\n width: 4px;\n content: \"\";\n height: 4px;\n position: absolute;\n right: 7px;\n -webkit-transform: rotate(-135deg);\n -ms-transform: rotate(-135deg);\n transform: rotate(-135deg);\n top: 35%;\n }\n &::before {\n border-left: 1px solid #e33aa9;\n width: 1px;\n content: \"\";\n height: 15px;\n right: 15px;\n position: absolute;\n z-index: 2;\n }\n"])), function (_ref) {
|
|
17
|
+
var width = _ref.width;
|
|
18
|
+
return width || "100%";
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
exports.Container = Container;
|
|
22
|
+
|
|
23
|
+
var BackgroundEnd = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n left: calc(100% - 18px);\n height: 100%;\n width: 18px;\n background-color: #fafafa;\n"])));
|
|
24
|
+
|
|
25
|
+
exports.BackgroundEnd = BackgroundEnd;
|
|
26
|
+
|
|
27
|
+
var SelectCustom = _styledComponents.default.select(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n background: #fafafa;\n -webkit-appearance: none;\n -moz-appearance: none;\n -ms-appearance: none;\n appearance: none;\n outline: 0;\n box-shadow: none;\n border: 0 !important;\n background-image: none;\n width: ", ";\n cursor: pointer;\n height: 21px;\n font-family: Avenir Next;\n font-style: normal;\n font-weight: normal;\n font-size: 12px;\n line-height: 21px;\n padding: 0 5px;\n box-sizing: border-box;\n &::-ms-expand {\n display: none;\n }\n &:option {\n background-color: blue;\n &:disabled {\n color: #d4d1d7;\n }\n &:invalid {\n color: gray;\n }\n }\n"])), function (_ref2) {
|
|
28
|
+
var width = _ref2.width;
|
|
29
|
+
return width || "100%";
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
exports.SelectCustom = SelectCustom;
|
|
@@ -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: 30px;\n height: 20px;\n background-color: ", ";\n border-radius: 3px;\n\n p {\n text-align: center;\n color: ", ";\n font-family: ", ";\n font-size: 12px;\n line-height: 20px;\n }\n\n &.status-As,\n &.status-P {\n background-color: ", ";\n }\n\n &.status-Pr,\n &.status-Rr {\n background-color: ", ";\n }\n\n &.status-AA,\n &.status-AP {\n background-color: ", ";\n }\n\n &.status-Dat,\n &.status-Dsc,\n &.status-Imgs {\n background-color: ", ";\n }\n\n &.status-Ex {\n background-color: ", ";\n }\n\n &.status-DDI {\n background-color: ", ";\n }\n\n &.status-GLD {\n background-color: ", ";\n }\n\n &.status-TAB {\n background-color: ", ";\n }\n\n &.status-Pt {\n background-color: ", ";\n color: ", ";\n }\n\n &.oval-form {\n border-radius: 10px;\n }\n"])), _variables.GlobalColors.s3, _variables.GlobalColors.white, _variables.FontFamily.Lato, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.s4, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.deep_gray, _variables.GlobalColors.s2, _variables.GlobalColors.s4);
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 30px;\n height: 20px;\n background-color: ", ";\n border-radius: 3px;\n\n p {\n text-align: center;\n color: ", ";\n font-family: ", ";\n font-size: 12px;\n line-height: 20px;\n }\n\n &.status-As,\n &.status-P {\n background-color: ", ";\n }\n\n &.status-Pr,\n &.status-Rr {\n background-color: ", ";\n }\n\n &.status-AA,\n &.status-AP,\n &.status-AC {\n background-color: ", ";\n }\n\n &.status-RA,\n &.status-RF,\n &.status-RP,\n &.status-RC {\n background-color: ", ";\n }\n\n &.status-Dat,\n &.status-Dsc,\n &.status-Imgs {\n background-color: ", ";\n }\n\n &.status-Ex {\n background-color: ", ";\n }\n\n &.status-DDI {\n background-color: ", ";\n }\n\n &.status-GLD {\n background-color: ", ";\n }\n\n &.status-TAB {\n background-color: ", ";\n }\n\n &.status-Pt {\n background-color: ", ";\n color: ", ";\n }\n\n &.oval-form {\n border-radius: 10px;\n }\n"])), _variables.GlobalColors.s3, _variables.GlobalColors.white, _variables.FontFamily.Lato, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.rejected_status, _variables.GlobalColors.s4, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.deep_gray, _variables.GlobalColors.s2, _variables.GlobalColors.s4);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -18,7 +18,8 @@ var _nullIcon = _interopRequireDefault(require("../../../assets/images/generalBu
|
|
|
18
18
|
var ValidationPanel = function ValidationPanel(_ref) {
|
|
19
19
|
var id = _ref.id,
|
|
20
20
|
setOptionClicked = _ref.setOptionClicked,
|
|
21
|
-
setShowValidationPanel = _ref.setShowValidationPanel
|
|
21
|
+
setShowValidationPanel = _ref.setShowValidationPanel,
|
|
22
|
+
sendToFacilitator = _ref.sendToFacilitator;
|
|
22
23
|
|
|
23
24
|
var optionSelected = function optionSelected(option) {
|
|
24
25
|
setOptionClicked("".concat(option, "-button"));
|
|
@@ -29,7 +30,7 @@ var ValidationPanel = function ValidationPanel(_ref) {
|
|
|
29
30
|
id: id
|
|
30
31
|
}, /*#__PURE__*/React.createElement("button", {
|
|
31
32
|
onClick: function onClick() {
|
|
32
|
-
|
|
33
|
+
sendToFacilitator("A");
|
|
33
34
|
},
|
|
34
35
|
className: "validation-option"
|
|
35
36
|
}, /*#__PURE__*/React.createElement("img", {
|
|
@@ -37,7 +38,7 @@ var ValidationPanel = function ValidationPanel(_ref) {
|
|
|
37
38
|
alt: "accept button"
|
|
38
39
|
}), /*#__PURE__*/React.createElement("p", null, "Validado")), /*#__PURE__*/React.createElement("button", {
|
|
39
40
|
onClick: function onClick() {
|
|
40
|
-
|
|
41
|
+
sendToFacilitator("R");
|
|
41
42
|
},
|
|
42
43
|
className: "validation-option"
|
|
43
44
|
}, /*#__PURE__*/React.createElement("img", {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.AddProvidersAndProductsDefault = void 0;
|
|
9
|
+
|
|
10
|
+
var _index = require("./index");
|
|
11
|
+
|
|
12
|
+
var _bags = _interopRequireDefault(require("../../../assets/images/generalImage/bags.svg"));
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
title: "Components/molecules/AddProvidersAndProducts",
|
|
16
|
+
component: _index.AddProvidersAndProducts
|
|
17
|
+
};
|
|
18
|
+
exports.default = _default;
|
|
19
|
+
|
|
20
|
+
var Template = function Template(args) {
|
|
21
|
+
return /*#__PURE__*/React.createElement(_index.AddProvidersAndProducts, args);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var AddProvidersAndProductsDefault = Template.bind({});
|
|
25
|
+
exports.AddProvidersAndProductsDefault = AddProvidersAndProductsDefault;
|
|
26
|
+
AddProvidersAndProductsDefault.args = {
|
|
27
|
+
image: _bags.default
|
|
28
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.AddProvidersAndProducts = void 0;
|
|
9
|
+
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
|
|
12
|
+
var _ScreenHeader = require("../../atoms/ScreenHeader");
|
|
13
|
+
|
|
14
|
+
var _bags = _interopRequireDefault(require("../../../assets/images/generalImage/bags.svg"));
|
|
15
|
+
|
|
16
|
+
var AddProvidersAndProducts = function AddProvidersAndProducts(_ref) {
|
|
17
|
+
var image = _ref.image,
|
|
18
|
+
altText = _ref.altText,
|
|
19
|
+
onClick = _ref.onClick,
|
|
20
|
+
className = _ref.className;
|
|
21
|
+
return /*#__PURE__*/React.createElement(_styles.Container, {
|
|
22
|
+
className: className,
|
|
23
|
+
onClick: onClick
|
|
24
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: "add-bags"
|
|
26
|
+
}, image && /*#__PURE__*/React.createElement("img", {
|
|
27
|
+
src: image,
|
|
28
|
+
alt: altText
|
|
29
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_ScreenHeader.ScreenHeader, {
|
|
30
|
+
headerType: "header-and-paragraph",
|
|
31
|
+
text: "Comienza agregando Proveedores",
|
|
32
|
+
Paragraph: "O tambien puedes comenzar agregando tu productos"
|
|
33
|
+
})));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.AddProvidersAndProducts = AddProvidersAndProducts;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\ndisplay: flex;\nalign-items: center;\nborder:1px solid ", ";\nborder-radius: 15px;\nbackground: transparent;\n\n.add-bags,.header-and-paragraph{\n margin:20px;\n}\n.add-bags{\n margin-right: 30px;\n}\n.header-and-paragraph{\n font-size: 18px;\n .p{\n font-size: 14px;\n }\n}\n"])), _variables.GlobalColors.magenta_s2);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.AssignedWorkDefault = void 0;
|
|
9
|
+
|
|
10
|
+
var _index = require("./index");
|
|
11
|
+
|
|
12
|
+
var _assignedImage = _interopRequireDefault(require("../../../assets/images/componentAssigned/assignedImage1.svg"));
|
|
13
|
+
|
|
14
|
+
var _assignedImage2 = _interopRequireDefault(require("../../../assets/images/componentAssigned/assignedImage2.svg"));
|
|
15
|
+
|
|
16
|
+
var status = ["-", "Pr", "Rc", "As", "P", "QF", "AF", "AA", "AP", "AC", "RA", "RF", "RP", "RC", "Ex"];
|
|
17
|
+
var _default = {
|
|
18
|
+
title: "Components/molecules/AssignedWork",
|
|
19
|
+
component: _index.AssignedWork,
|
|
20
|
+
argTypes: {
|
|
21
|
+
statusType: {
|
|
22
|
+
options: status,
|
|
23
|
+
control: {
|
|
24
|
+
type: "select"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.default = _default;
|
|
30
|
+
|
|
31
|
+
var Template = function Template(args) {
|
|
32
|
+
return /*#__PURE__*/React.createElement(_index.AssignedWork, args);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var AssignedWorkDefault = Template.bind({});
|
|
36
|
+
exports.AssignedWorkDefault = AssignedWorkDefault;
|
|
37
|
+
AssignedWorkDefault.args = {
|
|
38
|
+
statusType: "-",
|
|
39
|
+
assignedImage: [{
|
|
40
|
+
image: _assignedImage.default
|
|
41
|
+
}, {
|
|
42
|
+
image: _assignedImage2.default
|
|
43
|
+
}]
|
|
44
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.AssignedWork = void 0;
|
|
9
|
+
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
|
|
12
|
+
var _index = require("../../atoms/ScreenHeader/index");
|
|
13
|
+
|
|
14
|
+
var _clock = _interopRequireDefault(require("../../../assets/images/componentAssigned/clock.svg"));
|
|
15
|
+
|
|
16
|
+
var _flag = _interopRequireDefault(require("../../../assets/images/componentAssigned/flag.svg"));
|
|
17
|
+
|
|
18
|
+
var _index2 = require("../../atoms/Avatar/index");
|
|
19
|
+
|
|
20
|
+
var AssignedWork = function AssignedWork(_ref) {
|
|
21
|
+
var statusType = _ref.statusType,
|
|
22
|
+
assignedImage = _ref.assignedImage;
|
|
23
|
+
return /*#__PURE__*/React.createElement(_styles.Container, {
|
|
24
|
+
className: "status-".concat(statusType)
|
|
25
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: "header-flag"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(_index.ScreenHeader, {
|
|
28
|
+
headerType: "header-and-paragraph",
|
|
29
|
+
text: "Producto recibido",
|
|
30
|
+
Paragraph: "Actualizar producto 23441, descripci\xF3n e im\xE1genes"
|
|
31
|
+
}), /*#__PURE__*/React.createElement("img", {
|
|
32
|
+
className: "flag",
|
|
33
|
+
src: _flag.default
|
|
34
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: "clock-assigned"
|
|
36
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: "clock-header"
|
|
38
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
39
|
+
className: "clock",
|
|
40
|
+
src: _clock.default
|
|
41
|
+
}), /*#__PURE__*/React.createElement(_index.ScreenHeader, {
|
|
42
|
+
headerType: "date-header",
|
|
43
|
+
text: "12/04/2021"
|
|
44
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: "assigned"
|
|
46
|
+
}, assignedImage.reverse().map(function (assigned, index) {
|
|
47
|
+
return index < 2 && /*#__PURE__*/React.createElement(_index2.Avatar, {
|
|
48
|
+
key: index,
|
|
49
|
+
image: assigned.image,
|
|
50
|
+
imageType: "big-image"
|
|
51
|
+
});
|
|
52
|
+
}))));
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
exports.AssignedWork = AssignedWork;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 4px;\n background-color: transparent;\n padding: 8px;\n width: 250px;\n padding-bottom: 5px;\n position: relative;\n\n &.status-Pr,\n &.status-Rc {\n border: 1px solid ", ";\n .header-and-paragraph {\n color: ", ";\n }\n }\n &.status-- {\n border: 1px solid ", ";\n .header-and-paragraph {\n color: ", ";\n }\n }\n\n &.status-As,\n &.status-P,\n &.status-QF {\n border: 1px solid ", ";\n .header-and-paragraph {\n color: ", ";\n }\n }\n\n &.status-AF,\n &.status-AA,\n &.status-AP,\n &.status-AC {\n border: 1px solid ", ";\n .header-and-paragraph {\n color: ", ";\n }\n }\n\n &.status-RA,\n &.status-RF,\n &.status-RP,\n &.status-RC {\n border: 1px solid #d74ded;\n .header-and-paragraph {\n color: #d74ded;\n }\n }\n\n &.status-Ex {\n border: 1px solid ", ";\n .header-and-paragraph {\n color: ", ";\n \n }\n }\n\n .header-flag {\n display: flex;\n justify-content: space-between;\n .flag {\n position: absolute;\n right: 1px;\n top: 0px;\n }\n }\n .header-and-paragraph {\n font-size: 12px;\n line-height: 13px;\n p {\n line-height: 11px;\n font-size: 10px;\n color: ", ";\n }\n }\n\n .clock-assigned {\n display: flex;\n justify-content: space-between;\n align-items: center;\n .assigned {\n display: flex;\n flex-direction: row-reverse;\n .big-image {\n & + .big-image {\n margin-right: -5px;\n }\n }\n }\n }\n .clock-header {\n display: flex;\n border-radius: 4px;\n background: ", ";\n padding: 3px 10px;\n .clock {\n & + * {\n margin-left: 10px;\n }\n }\n .date-header {\n font-size: 11px;\n line-height: 13px;\n }\n }\n"])), _variables.GlobalColors.reception, _variables.GlobalColors.reception, _variables.GlobalColors.s3, _variables.GlobalColors.s3, _variables.GlobalColors.in_progress, _variables.GlobalColors.in_progress, _variables.GlobalColors.finished, _variables.GlobalColors.finished, _variables.GlobalColors.exported, _variables.GlobalColors.exported, _variables.GlobalColors.s4, _variables.GlobalColors.s2);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -21,10 +21,18 @@ var _GeneralButton = require("../../atoms/GeneralButton");
|
|
|
21
21
|
|
|
22
22
|
var _ValidationPanel = require("../../atoms/ValidationPanel");
|
|
23
23
|
|
|
24
|
+
var _RetailerSelector = require("../RetailerSelector");
|
|
25
|
+
|
|
24
26
|
//Components
|
|
25
27
|
var AvatarAndValidation = function AvatarAndValidation(_ref) {
|
|
26
|
-
var
|
|
27
|
-
validation = _ref.validation
|
|
28
|
+
var retailers = _ref.retailers,
|
|
29
|
+
validation = _ref.validation,
|
|
30
|
+
activeRetailer = _ref.activeRetailer,
|
|
31
|
+
setActiveRetailer = _ref.setActiveRetailer,
|
|
32
|
+
approveRejectButtons = _ref.approveRejectButtons,
|
|
33
|
+
sendToFacilitator = _ref.sendToFacilitator,
|
|
34
|
+
auditorAssigned = _ref.auditorAssigned,
|
|
35
|
+
userAssigned = _ref.userAssigned;
|
|
28
36
|
|
|
29
37
|
var _useState = (0, _react.useState)(false),
|
|
30
38
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -50,10 +58,11 @@ var AvatarAndValidation = function AvatarAndValidation(_ref) {
|
|
|
50
58
|
}, [showValidationPanel]);
|
|
51
59
|
return /*#__PURE__*/React.createElement(_styles.Container, null, /*#__PURE__*/React.createElement("div", {
|
|
52
60
|
className: "buttons-container"
|
|
53
|
-
}, /*#__PURE__*/React.createElement(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
}, /*#__PURE__*/React.createElement(_RetailerSelector.RetailerSelector, {
|
|
62
|
+
retailers: retailers,
|
|
63
|
+
activeRetailer: activeRetailer,
|
|
64
|
+
setActiveRetailer: setActiveRetailer
|
|
65
|
+
}), /*#__PURE__*/React.createElement(_DropDownButton.DropDownButton, null), approveRejectButtons() && (auditorAssigned() || userAssigned && userAssigned()) && /*#__PURE__*/React.createElement(_GeneralButton.Button, {
|
|
57
66
|
buttonType: "circular-button ".concat(buttonType),
|
|
58
67
|
onClick: function onClick() {
|
|
59
68
|
return setShowValidationPanel(true);
|
|
@@ -61,7 +70,8 @@ var AvatarAndValidation = function AvatarAndValidation(_ref) {
|
|
|
61
70
|
})), showValidationPanel && /*#__PURE__*/React.createElement(_ValidationPanel.ValidationPanel, {
|
|
62
71
|
id: "validation-panel",
|
|
63
72
|
setOptionClicked: setButtonType,
|
|
64
|
-
setShowValidationPanel: setShowValidationPanel
|
|
73
|
+
setShowValidationPanel: setShowValidationPanel,
|
|
74
|
+
sendToFacilitator: sendToFacilitator
|
|
65
75
|
}));
|
|
66
76
|
};
|
|
67
77
|
|
|
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n width: fit-content;\n\n .buttons-container {\n display: flex;\n align-items: center;\n\n * + * {\n margin-left: 3px;\n }\n }\n"])));
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n width: fit-content;\n\n .buttons-container {\n display: flex;\n align-items: center;\n\n > * + * {\n margin-left: 3px;\n }\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.Container = Container;
|
|
@@ -13,13 +13,17 @@ var _index2 = require("../../atoms/GeneralButton/index");
|
|
|
13
13
|
|
|
14
14
|
var EditionActiveImage = function EditionActiveImage(_ref) {
|
|
15
15
|
var img = _ref.img,
|
|
16
|
-
altText = _ref.altText
|
|
16
|
+
altText = _ref.altText,
|
|
17
|
+
setShowModal = _ref.setShowModal;
|
|
17
18
|
return /*#__PURE__*/React.createElement(_styles.Container, null, /*#__PURE__*/React.createElement(_index.ProductImage, {
|
|
18
19
|
img: img,
|
|
19
20
|
imageType: "main-image",
|
|
20
21
|
altText: altText
|
|
21
22
|
}), /*#__PURE__*/React.createElement(_index2.Button, {
|
|
22
|
-
buttonType: "open-modal-button"
|
|
23
|
+
buttonType: "open-modal-button",
|
|
24
|
+
onClick: function onClick() {
|
|
25
|
+
return setShowModal(true);
|
|
26
|
+
}
|
|
23
27
|
}));
|
|
24
28
|
};
|
|
25
29
|
|
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.FeaturesBar = void 0;
|
|
7
9
|
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
+
|
|
8
12
|
var _styles = require("./styles");
|
|
9
13
|
|
|
10
14
|
var _index = require("../../atoms/FeatureTag/index");
|
|
11
15
|
|
|
16
|
+
var _react = require("react");
|
|
17
|
+
|
|
12
18
|
var FeaturesBar = function FeaturesBar(_ref) {
|
|
13
19
|
var features = _ref.features;
|
|
14
|
-
|
|
15
|
-
|
|
20
|
+
|
|
21
|
+
var _useState = (0, _react.useState)(false),
|
|
22
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
23
|
+
isIE = _useState2[0],
|
|
24
|
+
setIsIE = _useState2[1];
|
|
25
|
+
|
|
26
|
+
(0, _react.useEffect)(function () {
|
|
27
|
+
var _window$navigator$use, _window$navigator$use2;
|
|
28
|
+
|
|
29
|
+
setIsIE(((_window$navigator$use = window.navigator.userAgentString) === null || _window$navigator$use === void 0 ? void 0 : _window$navigator$use.indexOf("MSIE")) > -1 || ((_window$navigator$use2 = window.navigator.userAgentString) === null || _window$navigator$use2 === void 0 ? void 0 : _window$navigator$use2.indexOf("rv:")) > -1);
|
|
30
|
+
}, []);
|
|
31
|
+
return /*#__PURE__*/React.createElement(_styles.Container, {
|
|
32
|
+
className: isIE ? "IEClass" : "gapClass"
|
|
33
|
+
}, features !== undefined && features.map(function (feature, index) {
|
|
34
|
+
return feature.value && /*#__PURE__*/React.createElement(_index.FeatureTag, {
|
|
16
35
|
key: index,
|
|
17
36
|
feature: feature.feature,
|
|
18
37
|
value: feature.value
|
|
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n\n * + * {\n
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-wrap: wrap;\n\n &.gapClass {\n gap: 8px;\n }\n\n &.IEClass {\n * + * {\n margin-left: 8px;\n }\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.Container = Container;
|
|
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.GalleryElement = void 0;
|
|
9
9
|
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
11
|
-
|
|
12
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
13
11
|
|
|
14
12
|
var _styles = require("./styles");
|
|
@@ -23,6 +21,8 @@ var _ValidationPanel = require("../../atoms/ValidationPanel");
|
|
|
23
21
|
|
|
24
22
|
var _react = require("react");
|
|
25
23
|
|
|
24
|
+
var _Select = _interopRequireDefault(require("../../atoms/Select"));
|
|
25
|
+
|
|
26
26
|
var GalleryElement = function GalleryElement(_ref) {
|
|
27
27
|
var _ref$validation = _ref.validation,
|
|
28
28
|
validation = _ref$validation === void 0 ? "null-button" : _ref$validation,
|
|
@@ -31,7 +31,12 @@ var GalleryElement = function GalleryElement(_ref) {
|
|
|
31
31
|
gridLayout = _ref$gridLayout === void 0 ? false : _ref$gridLayout,
|
|
32
32
|
_ref$id = _ref.id,
|
|
33
33
|
id = _ref$id === void 0 ? "chk-default" : _ref$id,
|
|
34
|
-
label = _ref.label
|
|
34
|
+
label = _ref.label,
|
|
35
|
+
index = _ref.index,
|
|
36
|
+
imageInputs = _ref.imageInputs,
|
|
37
|
+
imageType = _ref.imageType,
|
|
38
|
+
imagePackagingType = _ref.imagePackagingType,
|
|
39
|
+
changeImage = _ref.changeImage;
|
|
35
40
|
|
|
36
41
|
var _useState = (0, _react.useState)(validation),
|
|
37
42
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -59,30 +64,56 @@ var GalleryElement = function GalleryElement(_ref) {
|
|
|
59
64
|
className: gridLayout ? "grid-gallery" : "row-gallery"
|
|
60
65
|
}, /*#__PURE__*/React.createElement("div", {
|
|
61
66
|
className: "buttons-container"
|
|
62
|
-
}, /*#__PURE__*/React.createElement(_CheckBox.CheckBox,
|
|
67
|
+
}, /*#__PURE__*/React.createElement(_CheckBox.CheckBox, {
|
|
63
68
|
id: id,
|
|
64
|
-
label:
|
|
65
|
-
}, "label", label)), /*#__PURE__*/React.createElement(_GeneralButton.Button, {
|
|
66
|
-
buttonType: "circular-button ".concat(statusValidation),
|
|
67
|
-
onClick: function onClick() {
|
|
68
|
-
return setShowValidationPanel(true);
|
|
69
|
-
}
|
|
70
|
-
}), showValidationPanel && /*#__PURE__*/React.createElement(_ValidationPanel.ValidationPanel, {
|
|
71
|
-
id: "validation-panel",
|
|
72
|
-
setOptionClicked: setStatusValidation,
|
|
73
|
-
setShowValidationPanel: setShowValidationPanel
|
|
69
|
+
label: label
|
|
74
70
|
})), /*#__PURE__*/React.createElement("div", {
|
|
75
71
|
className: "image-container"
|
|
76
72
|
}, /*#__PURE__*/React.createElement(_ProductImage.ProductImage, {
|
|
77
|
-
img: image === null || image === void 0 ? void 0 : image.
|
|
73
|
+
img: image === null || image === void 0 ? void 0 : image.src,
|
|
78
74
|
altText: image === null || image === void 0 ? void 0 : image.altText,
|
|
79
|
-
imageType: gridLayout ? "
|
|
75
|
+
imageType: "catalogue-image-".concat(gridLayout ? "big" : "small", "-size")
|
|
80
76
|
}), /*#__PURE__*/React.createElement("div", {
|
|
81
77
|
className: "information-container"
|
|
82
|
-
}, /*#__PURE__*/React.createElement("p", null, image === null || image === void 0 ? void 0 : image.name), /*#__PURE__*/React.createElement("p", null, image
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
}, /*#__PURE__*/React.createElement("p", null, image === null || image === void 0 ? void 0 : image.name), !gridLayout && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, image.width, "x", image.height), /*#__PURE__*/React.createElement("p", null, image.ext), /*#__PURE__*/React.createElement(_Select.default, {
|
|
79
|
+
width: "100%",
|
|
80
|
+
placeholder: "Tipo de toma",
|
|
81
|
+
options: imageInputs,
|
|
82
|
+
valueSelected: image.image_id,
|
|
83
|
+
onChange: function onChange(e) {
|
|
84
|
+
changeImage({
|
|
85
|
+
action: "changeImageInfo",
|
|
86
|
+
attribute: "image_id",
|
|
87
|
+
value: +e.target.value,
|
|
88
|
+
index: index
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}), /*#__PURE__*/React.createElement(_Select.default, {
|
|
92
|
+
width: "100%",
|
|
93
|
+
placeholder: "Tipo de imagen",
|
|
94
|
+
options: imageType,
|
|
95
|
+
valueSelected: image.image_type,
|
|
96
|
+
onChange: function onChange(e) {
|
|
97
|
+
changeImage({
|
|
98
|
+
action: "changeImageInfo",
|
|
99
|
+
attribute: "image_type",
|
|
100
|
+
value: +e.target.value,
|
|
101
|
+
index: index
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}), /*#__PURE__*/React.createElement(_Select.default, {
|
|
105
|
+
width: "100%",
|
|
106
|
+
placeholder: "Tipo de empaque",
|
|
107
|
+
options: imagePackagingType,
|
|
108
|
+
valueSelected: image.packing_type,
|
|
109
|
+
onChange: function onChange(e) {
|
|
110
|
+
changeImage({
|
|
111
|
+
action: "changeImageInfo",
|
|
112
|
+
attribute: "packing_type",
|
|
113
|
+
value: +e.target.value,
|
|
114
|
+
index: index
|
|
115
|
+
});
|
|
116
|
+
}
|
|
86
117
|
})))));
|
|
87
118
|
};
|
|
88
119
|
|
|
@@ -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 &.grid-gallery {\n position: relative;\n width: 179px;\n border-radius: 3px;\n overflow: hidden;\n\n .buttons-container {\n position: absolute;\n top:
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &.grid-gallery {\n position: relative;\n width: 179px;\n border-radius: 3px;\n overflow: hidden;\n\n .buttons-container {\n position: absolute;\n top: 5px;\n left: 5px;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .image-container {\n border: 1px solid #f0eef2;\n\n .information-container {\n background-color: ", ";\n display: flex;\n justify-content: space-between;\n padding: 0 2px;\n\n p {\n font-family: ", ";\n color: ", ";\n font-size: 11px;\n line-height: 17px;\n }\n }\n }\n }\n\n &.row-gallery {\n display: flex;\n align-items: center;\n padding-right: 10px;\n\n .buttons-container {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .image-container {\n display: flex;\n align-items: center;\n flex: 1;\n .information-container {\n display: flex;\n flex: 1;\n\n p {\n font-family: ", ";\n color: ", ";\n font-size: 14px;\n line-height: 17px;\n text-align: center;\n\n &.highlighted-data {\n font-family: ", ";\n color: ", ";\n background-color: ", ";\n border-radius: 3px;\n font-weight: 600;\n font-size: 11px;\n line-height: 18px;\n padding: 0 10px;\n }\n\n &:nth-child(1) {\n //min-width: calc(20% - 76px);\n //flex: 1 0 20%;\n min-width: 22%;\n }\n\n &:nth-child(2),\n &:nth-child(3) {\n text-align: center;\n }\n &:nth-child(2) {\n max-width: 90px;\n min-width: 90px;\n }\n &:nth-child(3) {\n max-width: 60px;\n min-width: 60px;\n }\n /* &:nth-child(4) {\n max-width: 90px;\n min-width: 90px;\n }\n &:nth-child(5) {\n max-width: 80px;\n min-width: 80px;\n } */\n }\n\n & > * {\n flex: 1;\n padding: 5px;\n }\n }\n }\n }\n"])), _variables.GlobalColors.s2, _variables.FontFamily.Lato, _variables.GlobalColors.s4, _variables.FontFamily.Lato, _variables.GlobalColors.s4, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.s2);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.GalleryHeaderDefault = void 0;
|
|
7
|
+
|
|
8
|
+
var _ = require(".");
|
|
9
|
+
|
|
10
|
+
var _default = {
|
|
11
|
+
title: "Components/molecules/GalleryHeader",
|
|
12
|
+
component: _.GalleryHeader
|
|
13
|
+
};
|
|
14
|
+
exports.default = _default;
|
|
15
|
+
|
|
16
|
+
var Template = function Template(args) {
|
|
17
|
+
return /*#__PURE__*/React.createElement(_.GalleryHeader, args);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var GalleryHeaderDefault = Template.bind({});
|
|
21
|
+
exports.GalleryHeaderDefault = GalleryHeaderDefault;
|
|
22
|
+
GalleryHeaderDefault.args = {};
|