tabexseriescomponents 0.0.775 → 0.0.777
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/index.cjs.js +167 -70
- package/dist/index.esm.js +167 -70
- package/dist/index.umd.js +166 -71
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -73012,8 +73012,8 @@ var CardBadgeSlideFromTop = function CardBadgeSlideFromTop(props) {
|
|
|
73012
73012
|
}, plainString(langdetect == 'en' ? item.description_en : item.description_ar))))));
|
|
73013
73013
|
};
|
|
73014
73014
|
|
|
73015
|
-
var css_248z$c = ".Productccard_with_zoominonhover-module_productcard__8ASdR {\n\tposition: relative;\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\tposition: absolute;\n\ttop: 5px;\n\tright: 5px;\n\topacity: 0;\n\ttransition: .3s\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl {\n\tposition: relative;\n\tz-index: 1\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\topacity: 1;\n\tz-index: 8\n}\n.Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(10px);\n\ttransition: .3s;\n\ttransition-property: transform;\n\tdisplay: block\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(0)\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_product_details__3SLId {\n\tpadding-top: 10px ;\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t/* display: none; */\n\tpadding: 0 10px;\n\t/* width: 101% !important;\n\tleft: -1px; */\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK .Productccard_with_zoominonhover-module_price__12djA {\n\tdisplay: none\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\tdisplay: block;\n\tz-index: 1000 !important\n}\n@media screen and (max-width:800px) {\n\t.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t\tdisplay: block !important;\n\t\t/* border:none !important */\n\t}\n}";
|
|
73016
|
-
var cardsstyles$4 = {"productcard":"Productccard_with_zoominonhover-module_productcard__8ASdR","card_thumbnail":"Productccard_with_zoominonhover-module_card_thumbnail__xCWyB","wishlistbtn":"Productccard_with_zoominonhover-module_wishlistbtn__-9K6V","card_inner":"Productccard_with_zoominonhover-module_card_inner__-pVNl","product_details":"Productccard_with_zoominonhover-module_product_details__3SLId","card_informationcontainer":"Productccard_with_zoominonhover-module_card_informationcontainer__suyHK","price":"Productccard_with_zoominonhover-module_price__12djA"};
|
|
73015
|
+
var css_248z$c = ".Productccard_with_zoominonhover-module_productcard__8ASdR {\n\tposition: relative;\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\tposition: absolute;\n\ttop: 5px;\n\tright: 5px;\n\topacity: 0;\n\ttransition: .3s\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl {\n\tposition: relative;\n\tz-index: 1\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\topacity: 1;\n\tz-index: 8\n}\n.Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(10px);\n\ttransition: .3s;\n\ttransition-property: transform;\n\tdisplay: block\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(0)\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_product_details__3SLId {\n\tpadding-top: 10px ;\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t/* display: none; */\n\tpadding: 0 10px;\n\t/* width: 101% !important;\n\tleft: -1px; */\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK .Productccard_with_zoominonhover-module_price__12djA {\n\tdisplay: none\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\tdisplay: block;\n\tz-index: 1000 !important\n}\n@media screen and (max-width:800px) {\n\t.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t\tdisplay: block !important;\n\t\t/* border:none !important */\n\t}\n}\n.Productccard_with_zoominonhover-module_intialimage__8hcdc {\n visibility: visible !important;\n opacity: 1 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n.Productccard_with_zoominonhover-module_secondaryimage__EHpKK {\n visibility: hidden !important;\n\n opacity: 0 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n\n.Productccard_with_zoominonhover-module_img_container__lSsmX:hover .Productccard_with_zoominonhover-module_intialimage__8hcdc {\n visibility: hidden !important;\n\n opacity: 0 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n.Productccard_with_zoominonhover-module_img_container__lSsmX:hover .Productccard_with_zoominonhover-module_secondaryimage__EHpKK {\n visibility: visible !important;\n\n opacity: 1 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n.Productccard_with_zoominonhover-module_img_container__lSsmX {\n transition: all 0.4s !important;\n position: relative !important;\n}";
|
|
73016
|
+
var cardsstyles$4 = {"productcard":"Productccard_with_zoominonhover-module_productcard__8ASdR","card_thumbnail":"Productccard_with_zoominonhover-module_card_thumbnail__xCWyB","wishlistbtn":"Productccard_with_zoominonhover-module_wishlistbtn__-9K6V","card_inner":"Productccard_with_zoominonhover-module_card_inner__-pVNl","product_details":"Productccard_with_zoominonhover-module_product_details__3SLId","card_informationcontainer":"Productccard_with_zoominonhover-module_card_informationcontainer__suyHK","price":"Productccard_with_zoominonhover-module_price__12djA","intialimage":"Productccard_with_zoominonhover-module_intialimage__8hcdc","secondaryimage":"Productccard_with_zoominonhover-module_secondaryimage__EHpKK","img_container":"Productccard_with_zoominonhover-module_img_container__lSsmX"};
|
|
73017
73017
|
styleInject(css_248z$c);
|
|
73018
73018
|
|
|
73019
73019
|
function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -73040,20 +73040,24 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73040
73040
|
var cardonclickfunctionContext = props.actions.cardonclickfunctionContext;
|
|
73041
73041
|
var NotificationManager = props.actions.NotificationManager;
|
|
73042
73042
|
var ikimagecredcontext = props.actions.ikimagecredcontext;
|
|
73043
|
-
var _useState5 = React.useState(''),
|
|
73044
|
-
_useState6 = _slicedToArray__default["default"](_useState5, 2);
|
|
73045
|
-
_useState6[0];
|
|
73046
|
-
_useState6[1];
|
|
73047
73043
|
React.useEffect(function () {
|
|
73048
|
-
|
|
73049
|
-
|
|
73050
|
-
|
|
73051
|
-
|
|
73052
|
-
|
|
73053
|
-
|
|
73054
|
-
|
|
73055
|
-
|
|
73056
|
-
|
|
73044
|
+
if (props.srcfrom == 'addsectionform') {
|
|
73045
|
+
var secpropobj = {};
|
|
73046
|
+
props.defaultproperties.forEach(function (defaultpropobj, defaultpropindex) {
|
|
73047
|
+
secpropobj[defaultpropobj.property_css_name] = defaultpropobj.property_value;
|
|
73048
|
+
});
|
|
73049
|
+
setsectionproperties(_objectSpread$w({}, secpropobj));
|
|
73050
|
+
} else {
|
|
73051
|
+
var secpropobj = {};
|
|
73052
|
+
StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
73053
|
+
if (sectionitem.sectionid == props.sectionidprops) {
|
|
73054
|
+
sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
|
|
73055
|
+
secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
|
|
73056
|
+
});
|
|
73057
|
+
}
|
|
73058
|
+
});
|
|
73059
|
+
setsectionproperties(_objectSpread$w({}, secpropobj));
|
|
73060
|
+
}
|
|
73057
73061
|
}, [StatePagePropertiesContext]);
|
|
73058
73062
|
React.useEffect(function () {
|
|
73059
73063
|
setitem(props.cardinfoitemprops);
|
|
@@ -73061,6 +73065,8 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73061
73065
|
var updatequantity = function updatequantity(type) {
|
|
73062
73066
|
var tempitem = _objectSpread$w({}, item);
|
|
73063
73067
|
tempitem.quantity = 0;
|
|
73068
|
+
setitem(_objectSpread$w({}, tempitem));
|
|
73069
|
+
tempitem.quantity = parseInt(tempitem.quantity);
|
|
73064
73070
|
if (type == 'add') {
|
|
73065
73071
|
tempitem.quantity = tempitem.quantity + 1;
|
|
73066
73072
|
} else if (type == 'remove') {
|
|
@@ -73097,6 +73103,74 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73097
73103
|
AddtoCartContext(addtocardpayloadobj);
|
|
73098
73104
|
}
|
|
73099
73105
|
};
|
|
73106
|
+
var _useState5 = React.useState(''),
|
|
73107
|
+
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
73108
|
+
secondimage = _useState6[0],
|
|
73109
|
+
setsecondimage = _useState6[1];
|
|
73110
|
+
React.useEffect(function () {
|
|
73111
|
+
var _props$cardinfoitempr;
|
|
73112
|
+
setitem(props.cardinfoitemprops);
|
|
73113
|
+
if ((props === null || props === void 0 || (_props$cardinfoitempr = props.cardinfoitemprops) === null || _props$cardinfoitempr === void 0 || (_props$cardinfoitempr = _props$cardinfoitempr.productimages) === null || _props$cardinfoitempr === void 0 ? void 0 : _props$cardinfoitempr.length) == 1) {
|
|
73114
|
+
var _props$cardinfoitempr2;
|
|
73115
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr2 = props.cardinfoitemprops) === null || _props$cardinfoitempr2 === void 0 ? void 0 : _props$cardinfoitempr2.image);
|
|
73116
|
+
} else {
|
|
73117
|
+
var _props$cardinfoitempr3, _props$cardinfoitempr4;
|
|
73118
|
+
if ((props === null || props === void 0 ? void 0 : props.cardinfoitemprops) != undefined && (props === null || props === void 0 || (_props$cardinfoitempr3 = props.cardinfoitemprops) === null || _props$cardinfoitempr3 === void 0 ? void 0 : _props$cardinfoitempr3.productimages) != undefined && Array.isArray(props === null || props === void 0 || (_props$cardinfoitempr4 = props.cardinfoitemprops) === null || _props$cardinfoitempr4 === void 0 ? void 0 : _props$cardinfoitempr4.productimages)) {
|
|
73119
|
+
var _props$cardinfoitempr5, _props$cardinfoitempr6, _props$cardinfoitempr7;
|
|
73120
|
+
if ((props === null || props === void 0 || (_props$cardinfoitempr5 = props.cardinfoitemprops) === null || _props$cardinfoitempr5 === void 0 ? void 0 : _props$cardinfoitempr5.productimages[0]) != undefined && (props === null || props === void 0 || (_props$cardinfoitempr6 = props.cardinfoitemprops) === null || _props$cardinfoitempr6 === void 0 || (_props$cardinfoitempr6 = _props$cardinfoitempr6.productimages[0]) === null || _props$cardinfoitempr6 === void 0 ? void 0 : _props$cardinfoitempr6.path) == (props === null || props === void 0 || (_props$cardinfoitempr7 = props.cardinfoitemprops) === null || _props$cardinfoitempr7 === void 0 ? void 0 : _props$cardinfoitempr7.image)) {
|
|
73121
|
+
var _props$cardinfoitempr8;
|
|
73122
|
+
if ((props === null || props === void 0 || (_props$cardinfoitempr8 = props.cardinfoitemprops) === null || _props$cardinfoitempr8 === void 0 || (_props$cardinfoitempr8 = _props$cardinfoitempr8.productimages[1]) === null || _props$cardinfoitempr8 === void 0 ? void 0 : _props$cardinfoitempr8.length) != 0) {
|
|
73123
|
+
var _props$cardinfoitempr9;
|
|
73124
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr9 = props.cardinfoitemprops) === null || _props$cardinfoitempr9 === void 0 || (_props$cardinfoitempr9 = _props$cardinfoitempr9.productimages[1]) === null || _props$cardinfoitempr9 === void 0 ? void 0 : _props$cardinfoitempr9.path);
|
|
73125
|
+
} else {
|
|
73126
|
+
var _props$cardinfoitempr10;
|
|
73127
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr10 = props.cardinfoitemprops) === null || _props$cardinfoitempr10 === void 0 ? void 0 : _props$cardinfoitempr10.image);
|
|
73128
|
+
}
|
|
73129
|
+
} else {
|
|
73130
|
+
var _props$cardinfoitempr11;
|
|
73131
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr11 = props.cardinfoitemprops) === null || _props$cardinfoitempr11 === void 0 || (_props$cardinfoitempr11 = _props$cardinfoitempr11.productimages[0]) === null || _props$cardinfoitempr11 === void 0 ? void 0 : _props$cardinfoitempr11.path);
|
|
73132
|
+
}
|
|
73133
|
+
}
|
|
73134
|
+
}
|
|
73135
|
+
}, [props.cardinfoitemprops]);
|
|
73136
|
+
var Image = function Image(type) {
|
|
73137
|
+
var transition = false;
|
|
73138
|
+
if (sectionproperties.hideshowcardtransition == 'Show' && type != 'responsive') {
|
|
73139
|
+
transition = true;
|
|
73140
|
+
}
|
|
73141
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73142
|
+
"class": "w-100 cursor-pointer h-100",
|
|
73143
|
+
style: {
|
|
73144
|
+
position: 'relative'
|
|
73145
|
+
}
|
|
73146
|
+
}, /*#__PURE__*/React__default["default"].createElement(Imagekitimagecomp, {
|
|
73147
|
+
"class": transition ? cardsstyles$4.intialimage : '',
|
|
73148
|
+
urlEndpoint: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimageendpoint,
|
|
73149
|
+
publicKey: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimagepublickey,
|
|
73150
|
+
path: '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + item.image,
|
|
73151
|
+
loading: "lazy",
|
|
73152
|
+
style: {
|
|
73153
|
+
width: '100%',
|
|
73154
|
+
height: '100%',
|
|
73155
|
+
objectFit: sectionproperties.bgcovercontain == 'Cover' ? 'cover' : 'contain'
|
|
73156
|
+
}
|
|
73157
|
+
}), transition && /*#__PURE__*/React__default["default"].createElement(Imagekitimagecomp, {
|
|
73158
|
+
"class": cardsstyles$4.secondaryimage,
|
|
73159
|
+
urlEndpoint: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimageendpoint,
|
|
73160
|
+
publicKey: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimagepublickey,
|
|
73161
|
+
path: '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + secondimage,
|
|
73162
|
+
loading: "lazy",
|
|
73163
|
+
style: {
|
|
73164
|
+
width: '100%',
|
|
73165
|
+
height: '100%',
|
|
73166
|
+
objectFit: sectionproperties.bgcovercontain == 'Cover' ? 'cover' : 'contain'
|
|
73167
|
+
}
|
|
73168
|
+
}));
|
|
73169
|
+
};
|
|
73170
|
+
var _useState7 = React.useState(0),
|
|
73171
|
+
_useState8 = _slicedToArray__default["default"](_useState7, 2);
|
|
73172
|
+
_useState8[0];
|
|
73173
|
+
_useState8[1];
|
|
73100
73174
|
var cardsstyles2 = {
|
|
73101
73175
|
productcard: glamor.css({
|
|
73102
73176
|
background: sectionproperties.backgroundColortransparent == 'Transparent' ? 'transparent' : sectionproperties.backgroundColor,
|
|
@@ -73176,8 +73250,7 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73176
73250
|
transition: '.3s',
|
|
73177
73251
|
':hover': {
|
|
73178
73252
|
background: sectionproperties.cartbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColoronhover,
|
|
73179
|
-
color: sectionproperties.cartBtnTextcoloronhover
|
|
73180
|
-
borderColor: sectionproperties.cartBtnTextcoloronhover
|
|
73253
|
+
color: sectionproperties.cartBtnTextcoloronhover
|
|
73181
73254
|
}
|
|
73182
73255
|
}),
|
|
73183
73256
|
img_container: glamor.css({
|
|
@@ -73209,7 +73282,10 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73209
73282
|
position: 'relative',
|
|
73210
73283
|
fontWeight: sectionproperties.quantitybtn_textfontweight,
|
|
73211
73284
|
color: sectionproperties.quantitybtn_textcolor,
|
|
73212
|
-
fontSize: sectionproperties.quantitybtn_textfontsize + 'px'
|
|
73285
|
+
fontSize: sectionproperties.quantitybtn_textfontsize + 'px',
|
|
73286
|
+
'@media (max-width: 800px)': {
|
|
73287
|
+
width: '100%'
|
|
73288
|
+
}
|
|
73213
73289
|
}),
|
|
73214
73290
|
quantitybtn_text: glamor.css({
|
|
73215
73291
|
margin: 'auto'
|
|
@@ -73324,10 +73400,6 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73324
73400
|
})), langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic);
|
|
73325
73401
|
}
|
|
73326
73402
|
};
|
|
73327
|
-
var _useState7 = React.useState(0),
|
|
73328
|
-
_useState8 = _slicedToArray__default["default"](_useState7, 2);
|
|
73329
|
-
_useState8[0];
|
|
73330
|
-
_useState8[1];
|
|
73331
73403
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73332
73404
|
"class": "row ml-0 mr-0 w-100 mb-sm-5",
|
|
73333
73405
|
style: {
|
|
@@ -73355,22 +73427,7 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73355
73427
|
cursor: 'pointer',
|
|
73356
73428
|
overflow: 'hidden'
|
|
73357
73429
|
}
|
|
73358
|
-
},
|
|
73359
|
-
urlEndpoint: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimageendpoint,
|
|
73360
|
-
publicKey: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimagepublickey,
|
|
73361
|
-
path: '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + item.image,
|
|
73362
|
-
style: {
|
|
73363
|
-
width: sectionproperties.imageInnerWidth_Height + '%',
|
|
73364
|
-
height: sectionproperties.imageInnerWidth_Height + '%',
|
|
73365
|
-
objectFit: sectionproperties.bgcovercontain == 'Cover' ? 'cover' : 'contain',
|
|
73366
|
-
position: 'relative',
|
|
73367
|
-
borderBottomLeftRadius: langdetect == 'en' ? sectionproperties.image_borderBottomLeftRadius + 'px' : sectionproperties.image_borderBottomRightRadius + 'px',
|
|
73368
|
-
borderBottomRightRadius: langdetect == 'en' ? sectionproperties.image_borderBottomRightRadius + 'px' : sectionproperties.image_borderBottomLeftRadius + 'px',
|
|
73369
|
-
borderTopLeftRadius: langdetect == 'en' ? sectionproperties.image_bordertopleftradius + 'px' : sectionproperties.image_bordertoprightradius + 'px',
|
|
73370
|
-
borderTopRightRadius: langdetect == 'en' ? sectionproperties.image_bordertoprightradius + 'px' : sectionproperties.image_bordertopleftradius + 'px'
|
|
73371
|
-
},
|
|
73372
|
-
loading: "lazy"
|
|
73373
|
-
})), sectionproperties.favBtnShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73430
|
+
}, Image('normal')), sectionproperties.favBtnShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73374
73431
|
"class": "".concat(cardsstyles$4.wishlistbtn),
|
|
73375
73432
|
onClick: function onClick() {
|
|
73376
73433
|
addtofavoritescontext(item.productid);
|
|
@@ -73464,13 +73521,13 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73464
73521
|
color: sectionproperties.quantitycolor,
|
|
73465
73522
|
fontWeight: sectionproperties.quantityfontweight
|
|
73466
73523
|
}
|
|
73467
|
-
}, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, " ", item.currentquantity)), sectionproperties.prodNameShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73524
|
+
}, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, ": ", item.currentquantity)), sectionproperties.prodNameShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73468
73525
|
"class": "col-lg-12"
|
|
73469
73526
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
73470
73527
|
onClick: function onClick() {
|
|
73471
73528
|
cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item.productid, props.fetchingtypeprops, item.collectionid);
|
|
73472
73529
|
},
|
|
73473
|
-
"class": "".concat(cardsstyles2.productNameStyles) + ' m-0 p-0 wordbreak wordbreak1 ',
|
|
73530
|
+
"class": sectionproperties.wordbreak == '1' ? "".concat(cardsstyles2.productNameStyles) + ' m-0 p-0 wordbreak wordbreak1 ' : "".concat(cardsstyles2.productNameStyles) + ' m-0 p-0 wordbreak wordbreak2 ',
|
|
73474
73531
|
style: {
|
|
73475
73532
|
textAlign: langdetect == 'en' ? 'left' : 'right'
|
|
73476
73533
|
}
|
|
@@ -73482,16 +73539,17 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73482
73539
|
color: sectionproperties.measurementunitcolor
|
|
73483
73540
|
}
|
|
73484
73541
|
}, item.measurmentunit), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73485
|
-
"class": "col-lg-12 d-flex align-items-center"
|
|
73542
|
+
"class": "col-lg-12 d-flex align-items-center flex-md-column justify-content-start"
|
|
73486
73543
|
}, sectionproperties.prodPriceShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
73487
|
-
"class": "".concat(cardsstyles2.productPricestyles) + ' m-0 p-0 wordbreak ',
|
|
73544
|
+
"class": "".concat(cardsstyles2.productPricestyles) + ' m-0 p-0 wordbreak w-md-100 ',
|
|
73488
73545
|
style: {
|
|
73489
73546
|
textAlign: langdetect == 'en' ? 'left' : 'right'
|
|
73490
73547
|
}
|
|
73491
|
-
}, langdetect == 'en' ? item.currencyname : '', " ", item.hassale == 1 ? item.defaultsaleprice : item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname),
|
|
73492
|
-
"class": "".concat(cardsstyles2.productSalePricestyles) + ' linethrough mt-auto mb-0 p-0 wordbreak mr-1 ml-1
|
|
73548
|
+
}, langdetect == 'en' ? item.currencyname : '', " ", item.hassale == 1 ? item.defaultsaleprice : item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
73549
|
+
"class": "".concat(cardsstyles2.productSalePricestyles) + ' linethrough mt-auto mb-0 p-0 wordbreak mr-1 ml-1 w-md-100 ml-md-0 mr-md-0 ',
|
|
73493
73550
|
style: {
|
|
73494
|
-
textAlign: langdetect == 'en' ? 'left' : 'right'
|
|
73551
|
+
textAlign: langdetect == 'en' ? 'left' : 'right',
|
|
73552
|
+
visibility: item.hassale == 1 ? 'visible' : 'hidden'
|
|
73495
73553
|
}
|
|
73496
73554
|
}, langdetect == 'en' ? item.currencyname : '', " ", item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73497
73555
|
"class": "".concat(cardsstyles$4.card_informationcontainer)
|
|
@@ -73564,7 +73622,7 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73564
73622
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
73565
73623
|
"class": "fa fa-chevron-up font-12"
|
|
73566
73624
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73567
|
-
"class":
|
|
73625
|
+
"class": sectionproperties.total_fontsize != 0 ? 'd-flex justify-content-start pl-2 pr-2' : 'd-flex d-md-none justify-content-start pl-2 pr-2',
|
|
73568
73626
|
style: {
|
|
73569
73627
|
flex: 1
|
|
73570
73628
|
}
|
|
@@ -80332,10 +80390,14 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
80332
80390
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
80333
80391
|
sectionproperties = _useState2[0],
|
|
80334
80392
|
setsectionproperties = _useState2[1];
|
|
80335
|
-
var _useState3 = React.useState(
|
|
80393
|
+
var _useState3 = React.useState(''),
|
|
80336
80394
|
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
80337
|
-
|
|
80338
|
-
|
|
80395
|
+
variantObj = _useState4[0],
|
|
80396
|
+
setvariantObj = _useState4[1];
|
|
80397
|
+
var _useState5 = React.useState(props.cardinfoitemprops),
|
|
80398
|
+
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
80399
|
+
item = _useState6[0],
|
|
80400
|
+
setitem = _useState6[1];
|
|
80339
80401
|
var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
80340
80402
|
props.actions.lang;
|
|
80341
80403
|
var langdetect = props.actions.langdetect;
|
|
@@ -80344,13 +80406,13 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
80344
80406
|
var setProductIdProdutInfoModalContext = props.actions.setProductIdProdutInfoModalContext;
|
|
80345
80407
|
var cardonclickfunctionContext = props.actions.cardonclickfunctionContext;
|
|
80346
80408
|
var ikimagecredcontext = props.actions.ikimagecredcontext;
|
|
80347
|
-
props.actions.NotificationManager;
|
|
80409
|
+
var NotificationManager = props.actions.NotificationManager;
|
|
80348
80410
|
var AddtoCartContext = props.actions.AddtoCartContext;
|
|
80349
80411
|
var AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
|
|
80350
|
-
var
|
|
80351
|
-
|
|
80352
|
-
|
|
80353
|
-
|
|
80412
|
+
var _useState7 = React.useState(''),
|
|
80413
|
+
_useState8 = _slicedToArray__default["default"](_useState7, 2);
|
|
80414
|
+
_useState8[0];
|
|
80415
|
+
_useState8[1];
|
|
80354
80416
|
var plainString = function plainString(html) {
|
|
80355
80417
|
var divContainer = document.createElement('div');
|
|
80356
80418
|
divContainer.innerHTML = html;
|
|
@@ -80542,10 +80604,10 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
80542
80604
|
transform: "translateX(0px)"
|
|
80543
80605
|
})
|
|
80544
80606
|
};
|
|
80545
|
-
var
|
|
80546
|
-
|
|
80547
|
-
secondimage =
|
|
80548
|
-
setsecondimage =
|
|
80607
|
+
var _useState9 = React.useState(''),
|
|
80608
|
+
_useState10 = _slicedToArray__default["default"](_useState9, 2),
|
|
80609
|
+
secondimage = _useState10[0],
|
|
80610
|
+
setsecondimage = _useState10[1];
|
|
80549
80611
|
React.useEffect(function () {
|
|
80550
80612
|
var _props$cardinfoitempr;
|
|
80551
80613
|
setitem(props.cardinfoitemprops);
|
|
@@ -80573,13 +80635,44 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
80573
80635
|
}
|
|
80574
80636
|
}, [props.cardinfoitemprops]);
|
|
80575
80637
|
var addtocartfunc = function addtocartfunc() {
|
|
80576
|
-
var
|
|
80577
|
-
|
|
80578
|
-
|
|
80579
|
-
|
|
80580
|
-
|
|
80581
|
-
|
|
80638
|
+
var addtocardpayloadobj = {
|
|
80639
|
+
functype: 'add',
|
|
80640
|
+
productid: item.productid,
|
|
80641
|
+
variantid: '',
|
|
80642
|
+
quantity: item.quantity,
|
|
80643
|
+
vendorid: item.vendorid
|
|
80644
|
+
};
|
|
80645
|
+
var runfunc = false;
|
|
80646
|
+
if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
|
|
80647
|
+
if (item.hasvariants == 1) {
|
|
80648
|
+
// if (addtocardpayloadobj.variantid.length != 0) {
|
|
80649
|
+
if (variantObj != undefined && variantObj != null && Object.keys(variantObj).length != 0) {
|
|
80650
|
+
addtocardpayloadobj.variantid = variantObj.variantid;
|
|
80651
|
+
runfunc = true;
|
|
80652
|
+
} else {
|
|
80653
|
+
NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Product Options' : 'من فضلك اختر متغير');
|
|
80654
|
+
}
|
|
80655
|
+
} else {
|
|
80656
|
+
runfunc = true;
|
|
80657
|
+
}
|
|
80658
|
+
} else {
|
|
80659
|
+
NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Quantity' : 'من فضلك اختر الكمية');
|
|
80660
|
+
}
|
|
80661
|
+
if (runfunc == true) {
|
|
80662
|
+
AddtoCartContext(addtocardpayloadobj);
|
|
80663
|
+
}
|
|
80582
80664
|
};
|
|
80665
|
+
// const addtocartfunc = () => {
|
|
80666
|
+
// var runfunc = false;
|
|
80667
|
+
|
|
80668
|
+
// var tempaddtocardpayloadobj = { ...addtocardpayloadobj };
|
|
80669
|
+
// tempaddtocardpayloadobj.productid = item.productid;
|
|
80670
|
+
// tempaddtocardpayloadobj.functype = 'add';
|
|
80671
|
+
// tempaddtocardpayloadobj.item_type = 'product';
|
|
80672
|
+
// tempaddtocardpayloadobj.quantity = 1;
|
|
80673
|
+
|
|
80674
|
+
// AddtoCartContext(tempaddtocardpayloadobj);
|
|
80675
|
+
// };
|
|
80583
80676
|
var addtocartbuttonrender = function addtocartbuttonrender() {
|
|
80584
80677
|
if (AddtoCartMutationContext.isLoading) {
|
|
80585
80678
|
var _AddtoCartMutationCon;
|
|
@@ -80674,10 +80767,10 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
80674
80767
|
}
|
|
80675
80768
|
}));
|
|
80676
80769
|
};
|
|
80677
|
-
var
|
|
80678
|
-
|
|
80679
|
-
clickCount =
|
|
80680
|
-
setClickCount =
|
|
80770
|
+
var _useState11 = React.useState(0),
|
|
80771
|
+
_useState12 = _slicedToArray__default["default"](_useState11, 2),
|
|
80772
|
+
clickCount = _useState12[0],
|
|
80773
|
+
setClickCount = _useState12[1];
|
|
80681
80774
|
var handleClick = function handleClick() {
|
|
80682
80775
|
// Increase the click count by 1
|
|
80683
80776
|
setClickCount(function (prevCount) {
|
|
@@ -81013,7 +81106,9 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
81013
81106
|
sectionproperties: sectionproperties,
|
|
81014
81107
|
item: item
|
|
81015
81108
|
},
|
|
81016
|
-
foundMatchedVariantFunc: function foundMatchedVariantFunc(variantCompletedObj) {
|
|
81109
|
+
foundMatchedVariantFunc: function foundMatchedVariantFunc(variantCompletedObj) {
|
|
81110
|
+
setvariantObj(variantCompletedObj);
|
|
81111
|
+
}
|
|
81017
81112
|
})), sectionproperties.showprofitcontainer == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
81018
81113
|
"class": "col-lg-12 p-0",
|
|
81019
81114
|
style: {
|
|
@@ -81058,7 +81153,9 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
81058
81153
|
// }}
|
|
81059
81154
|
,
|
|
81060
81155
|
onClick: function onClick() {
|
|
81061
|
-
if (sectionproperties.showvariantscont == 'Show')
|
|
81156
|
+
if (sectionproperties.showvariantscont == 'Show') {
|
|
81157
|
+
addtocartfunc();
|
|
81158
|
+
} else {
|
|
81062
81159
|
if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 0) {
|
|
81063
81160
|
addtocartfunc();
|
|
81064
81161
|
} else if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 1) {
|
package/dist/index.esm.js
CHANGED
|
@@ -72963,8 +72963,8 @@ var CardBadgeSlideFromTop = function CardBadgeSlideFromTop(props) {
|
|
|
72963
72963
|
}, plainString(langdetect == 'en' ? item.description_en : item.description_ar))))));
|
|
72964
72964
|
};
|
|
72965
72965
|
|
|
72966
|
-
var css_248z$c = ".Productccard_with_zoominonhover-module_productcard__8ASdR {\n\tposition: relative;\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\tposition: absolute;\n\ttop: 5px;\n\tright: 5px;\n\topacity: 0;\n\ttransition: .3s\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl {\n\tposition: relative;\n\tz-index: 1\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\topacity: 1;\n\tz-index: 8\n}\n.Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(10px);\n\ttransition: .3s;\n\ttransition-property: transform;\n\tdisplay: block\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(0)\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_product_details__3SLId {\n\tpadding-top: 10px ;\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t/* display: none; */\n\tpadding: 0 10px;\n\t/* width: 101% !important;\n\tleft: -1px; */\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK .Productccard_with_zoominonhover-module_price__12djA {\n\tdisplay: none\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\tdisplay: block;\n\tz-index: 1000 !important\n}\n@media screen and (max-width:800px) {\n\t.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t\tdisplay: block !important;\n\t\t/* border:none !important */\n\t}\n}";
|
|
72967
|
-
var cardsstyles$4 = {"productcard":"Productccard_with_zoominonhover-module_productcard__8ASdR","card_thumbnail":"Productccard_with_zoominonhover-module_card_thumbnail__xCWyB","wishlistbtn":"Productccard_with_zoominonhover-module_wishlistbtn__-9K6V","card_inner":"Productccard_with_zoominonhover-module_card_inner__-pVNl","product_details":"Productccard_with_zoominonhover-module_product_details__3SLId","card_informationcontainer":"Productccard_with_zoominonhover-module_card_informationcontainer__suyHK","price":"Productccard_with_zoominonhover-module_price__12djA"};
|
|
72966
|
+
var css_248z$c = ".Productccard_with_zoominonhover-module_productcard__8ASdR {\n\tposition: relative;\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\tposition: absolute;\n\ttop: 5px;\n\tright: 5px;\n\topacity: 0;\n\ttransition: .3s\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl {\n\tposition: relative;\n\tz-index: 1\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\topacity: 1;\n\tz-index: 8\n}\n.Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(10px);\n\ttransition: .3s;\n\ttransition-property: transform;\n\tdisplay: block\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(0)\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_product_details__3SLId {\n\tpadding-top: 10px ;\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t/* display: none; */\n\tpadding: 0 10px;\n\t/* width: 101% !important;\n\tleft: -1px; */\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK .Productccard_with_zoominonhover-module_price__12djA {\n\tdisplay: none\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\tdisplay: block;\n\tz-index: 1000 !important\n}\n@media screen and (max-width:800px) {\n\t.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t\tdisplay: block !important;\n\t\t/* border:none !important */\n\t}\n}\n.Productccard_with_zoominonhover-module_intialimage__8hcdc {\n visibility: visible !important;\n opacity: 1 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n.Productccard_with_zoominonhover-module_secondaryimage__EHpKK {\n visibility: hidden !important;\n\n opacity: 0 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n\n.Productccard_with_zoominonhover-module_img_container__lSsmX:hover .Productccard_with_zoominonhover-module_intialimage__8hcdc {\n visibility: hidden !important;\n\n opacity: 0 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n.Productccard_with_zoominonhover-module_img_container__lSsmX:hover .Productccard_with_zoominonhover-module_secondaryimage__EHpKK {\n visibility: visible !important;\n\n opacity: 1 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n.Productccard_with_zoominonhover-module_img_container__lSsmX {\n transition: all 0.4s !important;\n position: relative !important;\n}";
|
|
72967
|
+
var cardsstyles$4 = {"productcard":"Productccard_with_zoominonhover-module_productcard__8ASdR","card_thumbnail":"Productccard_with_zoominonhover-module_card_thumbnail__xCWyB","wishlistbtn":"Productccard_with_zoominonhover-module_wishlistbtn__-9K6V","card_inner":"Productccard_with_zoominonhover-module_card_inner__-pVNl","product_details":"Productccard_with_zoominonhover-module_product_details__3SLId","card_informationcontainer":"Productccard_with_zoominonhover-module_card_informationcontainer__suyHK","price":"Productccard_with_zoominonhover-module_price__12djA","intialimage":"Productccard_with_zoominonhover-module_intialimage__8hcdc","secondaryimage":"Productccard_with_zoominonhover-module_secondaryimage__EHpKK","img_container":"Productccard_with_zoominonhover-module_img_container__lSsmX"};
|
|
72968
72968
|
styleInject(css_248z$c);
|
|
72969
72969
|
|
|
72970
72970
|
function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -72991,20 +72991,24 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
72991
72991
|
var cardonclickfunctionContext = props.actions.cardonclickfunctionContext;
|
|
72992
72992
|
var NotificationManager = props.actions.NotificationManager;
|
|
72993
72993
|
var ikimagecredcontext = props.actions.ikimagecredcontext;
|
|
72994
|
-
var _useState5 = useState(''),
|
|
72995
|
-
_useState6 = _slicedToArray(_useState5, 2);
|
|
72996
|
-
_useState6[0];
|
|
72997
|
-
_useState6[1];
|
|
72998
72994
|
useEffect(function () {
|
|
72999
|
-
|
|
73000
|
-
|
|
73001
|
-
|
|
73002
|
-
|
|
73003
|
-
|
|
73004
|
-
|
|
73005
|
-
|
|
73006
|
-
|
|
73007
|
-
|
|
72995
|
+
if (props.srcfrom == 'addsectionform') {
|
|
72996
|
+
var secpropobj = {};
|
|
72997
|
+
props.defaultproperties.forEach(function (defaultpropobj, defaultpropindex) {
|
|
72998
|
+
secpropobj[defaultpropobj.property_css_name] = defaultpropobj.property_value;
|
|
72999
|
+
});
|
|
73000
|
+
setsectionproperties(_objectSpread$w({}, secpropobj));
|
|
73001
|
+
} else {
|
|
73002
|
+
var secpropobj = {};
|
|
73003
|
+
StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
73004
|
+
if (sectionitem.sectionid == props.sectionidprops) {
|
|
73005
|
+
sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
|
|
73006
|
+
secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
|
|
73007
|
+
});
|
|
73008
|
+
}
|
|
73009
|
+
});
|
|
73010
|
+
setsectionproperties(_objectSpread$w({}, secpropobj));
|
|
73011
|
+
}
|
|
73008
73012
|
}, [StatePagePropertiesContext]);
|
|
73009
73013
|
useEffect(function () {
|
|
73010
73014
|
setitem(props.cardinfoitemprops);
|
|
@@ -73012,6 +73016,8 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73012
73016
|
var updatequantity = function updatequantity(type) {
|
|
73013
73017
|
var tempitem = _objectSpread$w({}, item);
|
|
73014
73018
|
tempitem.quantity = 0;
|
|
73019
|
+
setitem(_objectSpread$w({}, tempitem));
|
|
73020
|
+
tempitem.quantity = parseInt(tempitem.quantity);
|
|
73015
73021
|
if (type == 'add') {
|
|
73016
73022
|
tempitem.quantity = tempitem.quantity + 1;
|
|
73017
73023
|
} else if (type == 'remove') {
|
|
@@ -73048,6 +73054,74 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73048
73054
|
AddtoCartContext(addtocardpayloadobj);
|
|
73049
73055
|
}
|
|
73050
73056
|
};
|
|
73057
|
+
var _useState5 = useState(''),
|
|
73058
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
73059
|
+
secondimage = _useState6[0],
|
|
73060
|
+
setsecondimage = _useState6[1];
|
|
73061
|
+
useEffect(function () {
|
|
73062
|
+
var _props$cardinfoitempr;
|
|
73063
|
+
setitem(props.cardinfoitemprops);
|
|
73064
|
+
if ((props === null || props === void 0 || (_props$cardinfoitempr = props.cardinfoitemprops) === null || _props$cardinfoitempr === void 0 || (_props$cardinfoitempr = _props$cardinfoitempr.productimages) === null || _props$cardinfoitempr === void 0 ? void 0 : _props$cardinfoitempr.length) == 1) {
|
|
73065
|
+
var _props$cardinfoitempr2;
|
|
73066
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr2 = props.cardinfoitemprops) === null || _props$cardinfoitempr2 === void 0 ? void 0 : _props$cardinfoitempr2.image);
|
|
73067
|
+
} else {
|
|
73068
|
+
var _props$cardinfoitempr3, _props$cardinfoitempr4;
|
|
73069
|
+
if ((props === null || props === void 0 ? void 0 : props.cardinfoitemprops) != undefined && (props === null || props === void 0 || (_props$cardinfoitempr3 = props.cardinfoitemprops) === null || _props$cardinfoitempr3 === void 0 ? void 0 : _props$cardinfoitempr3.productimages) != undefined && Array.isArray(props === null || props === void 0 || (_props$cardinfoitempr4 = props.cardinfoitemprops) === null || _props$cardinfoitempr4 === void 0 ? void 0 : _props$cardinfoitempr4.productimages)) {
|
|
73070
|
+
var _props$cardinfoitempr5, _props$cardinfoitempr6, _props$cardinfoitempr7;
|
|
73071
|
+
if ((props === null || props === void 0 || (_props$cardinfoitempr5 = props.cardinfoitemprops) === null || _props$cardinfoitempr5 === void 0 ? void 0 : _props$cardinfoitempr5.productimages[0]) != undefined && (props === null || props === void 0 || (_props$cardinfoitempr6 = props.cardinfoitemprops) === null || _props$cardinfoitempr6 === void 0 || (_props$cardinfoitempr6 = _props$cardinfoitempr6.productimages[0]) === null || _props$cardinfoitempr6 === void 0 ? void 0 : _props$cardinfoitempr6.path) == (props === null || props === void 0 || (_props$cardinfoitempr7 = props.cardinfoitemprops) === null || _props$cardinfoitempr7 === void 0 ? void 0 : _props$cardinfoitempr7.image)) {
|
|
73072
|
+
var _props$cardinfoitempr8;
|
|
73073
|
+
if ((props === null || props === void 0 || (_props$cardinfoitempr8 = props.cardinfoitemprops) === null || _props$cardinfoitempr8 === void 0 || (_props$cardinfoitempr8 = _props$cardinfoitempr8.productimages[1]) === null || _props$cardinfoitempr8 === void 0 ? void 0 : _props$cardinfoitempr8.length) != 0) {
|
|
73074
|
+
var _props$cardinfoitempr9;
|
|
73075
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr9 = props.cardinfoitemprops) === null || _props$cardinfoitempr9 === void 0 || (_props$cardinfoitempr9 = _props$cardinfoitempr9.productimages[1]) === null || _props$cardinfoitempr9 === void 0 ? void 0 : _props$cardinfoitempr9.path);
|
|
73076
|
+
} else {
|
|
73077
|
+
var _props$cardinfoitempr10;
|
|
73078
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr10 = props.cardinfoitemprops) === null || _props$cardinfoitempr10 === void 0 ? void 0 : _props$cardinfoitempr10.image);
|
|
73079
|
+
}
|
|
73080
|
+
} else {
|
|
73081
|
+
var _props$cardinfoitempr11;
|
|
73082
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr11 = props.cardinfoitemprops) === null || _props$cardinfoitempr11 === void 0 || (_props$cardinfoitempr11 = _props$cardinfoitempr11.productimages[0]) === null || _props$cardinfoitempr11 === void 0 ? void 0 : _props$cardinfoitempr11.path);
|
|
73083
|
+
}
|
|
73084
|
+
}
|
|
73085
|
+
}
|
|
73086
|
+
}, [props.cardinfoitemprops]);
|
|
73087
|
+
var Image = function Image(type) {
|
|
73088
|
+
var transition = false;
|
|
73089
|
+
if (sectionproperties.hideshowcardtransition == 'Show' && type != 'responsive') {
|
|
73090
|
+
transition = true;
|
|
73091
|
+
}
|
|
73092
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
73093
|
+
"class": "w-100 cursor-pointer h-100",
|
|
73094
|
+
style: {
|
|
73095
|
+
position: 'relative'
|
|
73096
|
+
}
|
|
73097
|
+
}, /*#__PURE__*/React.createElement(Imagekitimagecomp, {
|
|
73098
|
+
"class": transition ? cardsstyles$4.intialimage : '',
|
|
73099
|
+
urlEndpoint: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimageendpoint,
|
|
73100
|
+
publicKey: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimagepublickey,
|
|
73101
|
+
path: '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + item.image,
|
|
73102
|
+
loading: "lazy",
|
|
73103
|
+
style: {
|
|
73104
|
+
width: '100%',
|
|
73105
|
+
height: '100%',
|
|
73106
|
+
objectFit: sectionproperties.bgcovercontain == 'Cover' ? 'cover' : 'contain'
|
|
73107
|
+
}
|
|
73108
|
+
}), transition && /*#__PURE__*/React.createElement(Imagekitimagecomp, {
|
|
73109
|
+
"class": cardsstyles$4.secondaryimage,
|
|
73110
|
+
urlEndpoint: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimageendpoint,
|
|
73111
|
+
publicKey: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimagepublickey,
|
|
73112
|
+
path: '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + secondimage,
|
|
73113
|
+
loading: "lazy",
|
|
73114
|
+
style: {
|
|
73115
|
+
width: '100%',
|
|
73116
|
+
height: '100%',
|
|
73117
|
+
objectFit: sectionproperties.bgcovercontain == 'Cover' ? 'cover' : 'contain'
|
|
73118
|
+
}
|
|
73119
|
+
}));
|
|
73120
|
+
};
|
|
73121
|
+
var _useState7 = useState(0),
|
|
73122
|
+
_useState8 = _slicedToArray(_useState7, 2);
|
|
73123
|
+
_useState8[0];
|
|
73124
|
+
_useState8[1];
|
|
73051
73125
|
var cardsstyles2 = {
|
|
73052
73126
|
productcard: css({
|
|
73053
73127
|
background: sectionproperties.backgroundColortransparent == 'Transparent' ? 'transparent' : sectionproperties.backgroundColor,
|
|
@@ -73127,8 +73201,7 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73127
73201
|
transition: '.3s',
|
|
73128
73202
|
':hover': {
|
|
73129
73203
|
background: sectionproperties.cartbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColoronhover,
|
|
73130
|
-
color: sectionproperties.cartBtnTextcoloronhover
|
|
73131
|
-
borderColor: sectionproperties.cartBtnTextcoloronhover
|
|
73204
|
+
color: sectionproperties.cartBtnTextcoloronhover
|
|
73132
73205
|
}
|
|
73133
73206
|
}),
|
|
73134
73207
|
img_container: css({
|
|
@@ -73160,7 +73233,10 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73160
73233
|
position: 'relative',
|
|
73161
73234
|
fontWeight: sectionproperties.quantitybtn_textfontweight,
|
|
73162
73235
|
color: sectionproperties.quantitybtn_textcolor,
|
|
73163
|
-
fontSize: sectionproperties.quantitybtn_textfontsize + 'px'
|
|
73236
|
+
fontSize: sectionproperties.quantitybtn_textfontsize + 'px',
|
|
73237
|
+
'@media (max-width: 800px)': {
|
|
73238
|
+
width: '100%'
|
|
73239
|
+
}
|
|
73164
73240
|
}),
|
|
73165
73241
|
quantitybtn_text: css({
|
|
73166
73242
|
margin: 'auto'
|
|
@@ -73275,10 +73351,6 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73275
73351
|
})), langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic);
|
|
73276
73352
|
}
|
|
73277
73353
|
};
|
|
73278
|
-
var _useState7 = useState(0),
|
|
73279
|
-
_useState8 = _slicedToArray(_useState7, 2);
|
|
73280
|
-
_useState8[0];
|
|
73281
|
-
_useState8[1];
|
|
73282
73354
|
return /*#__PURE__*/React.createElement("div", {
|
|
73283
73355
|
"class": "row ml-0 mr-0 w-100 mb-sm-5",
|
|
73284
73356
|
style: {
|
|
@@ -73306,22 +73378,7 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73306
73378
|
cursor: 'pointer',
|
|
73307
73379
|
overflow: 'hidden'
|
|
73308
73380
|
}
|
|
73309
|
-
},
|
|
73310
|
-
urlEndpoint: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimageendpoint,
|
|
73311
|
-
publicKey: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimagepublickey,
|
|
73312
|
-
path: '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + item.image,
|
|
73313
|
-
style: {
|
|
73314
|
-
width: sectionproperties.imageInnerWidth_Height + '%',
|
|
73315
|
-
height: sectionproperties.imageInnerWidth_Height + '%',
|
|
73316
|
-
objectFit: sectionproperties.bgcovercontain == 'Cover' ? 'cover' : 'contain',
|
|
73317
|
-
position: 'relative',
|
|
73318
|
-
borderBottomLeftRadius: langdetect == 'en' ? sectionproperties.image_borderBottomLeftRadius + 'px' : sectionproperties.image_borderBottomRightRadius + 'px',
|
|
73319
|
-
borderBottomRightRadius: langdetect == 'en' ? sectionproperties.image_borderBottomRightRadius + 'px' : sectionproperties.image_borderBottomLeftRadius + 'px',
|
|
73320
|
-
borderTopLeftRadius: langdetect == 'en' ? sectionproperties.image_bordertopleftradius + 'px' : sectionproperties.image_bordertoprightradius + 'px',
|
|
73321
|
-
borderTopRightRadius: langdetect == 'en' ? sectionproperties.image_bordertoprightradius + 'px' : sectionproperties.image_bordertopleftradius + 'px'
|
|
73322
|
-
},
|
|
73323
|
-
loading: "lazy"
|
|
73324
|
-
})), sectionproperties.favBtnShow == 'Show' && /*#__PURE__*/React.createElement("div", {
|
|
73381
|
+
}, Image('normal')), sectionproperties.favBtnShow == 'Show' && /*#__PURE__*/React.createElement("div", {
|
|
73325
73382
|
"class": "".concat(cardsstyles$4.wishlistbtn),
|
|
73326
73383
|
onClick: function onClick() {
|
|
73327
73384
|
addtofavoritescontext(item.productid);
|
|
@@ -73415,13 +73472,13 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73415
73472
|
color: sectionproperties.quantitycolor,
|
|
73416
73473
|
fontWeight: sectionproperties.quantityfontweight
|
|
73417
73474
|
}
|
|
73418
|
-
}, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, " ", item.currentquantity)), sectionproperties.prodNameShow == 'Show' && /*#__PURE__*/React.createElement("div", {
|
|
73475
|
+
}, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, ": ", item.currentquantity)), sectionproperties.prodNameShow == 'Show' && /*#__PURE__*/React.createElement("div", {
|
|
73419
73476
|
"class": "col-lg-12"
|
|
73420
73477
|
}, /*#__PURE__*/React.createElement("p", {
|
|
73421
73478
|
onClick: function onClick() {
|
|
73422
73479
|
cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item.productid, props.fetchingtypeprops, item.collectionid);
|
|
73423
73480
|
},
|
|
73424
|
-
"class": "".concat(cardsstyles2.productNameStyles) + ' m-0 p-0 wordbreak wordbreak1 ',
|
|
73481
|
+
"class": sectionproperties.wordbreak == '1' ? "".concat(cardsstyles2.productNameStyles) + ' m-0 p-0 wordbreak wordbreak1 ' : "".concat(cardsstyles2.productNameStyles) + ' m-0 p-0 wordbreak wordbreak2 ',
|
|
73425
73482
|
style: {
|
|
73426
73483
|
textAlign: langdetect == 'en' ? 'left' : 'right'
|
|
73427
73484
|
}
|
|
@@ -73433,16 +73490,17 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73433
73490
|
color: sectionproperties.measurementunitcolor
|
|
73434
73491
|
}
|
|
73435
73492
|
}, item.measurmentunit), /*#__PURE__*/React.createElement("div", {
|
|
73436
|
-
"class": "col-lg-12 d-flex align-items-center"
|
|
73493
|
+
"class": "col-lg-12 d-flex align-items-center flex-md-column justify-content-start"
|
|
73437
73494
|
}, sectionproperties.prodPriceShow == 'Show' && /*#__PURE__*/React.createElement("p", {
|
|
73438
|
-
"class": "".concat(cardsstyles2.productPricestyles) + ' m-0 p-0 wordbreak ',
|
|
73495
|
+
"class": "".concat(cardsstyles2.productPricestyles) + ' m-0 p-0 wordbreak w-md-100 ',
|
|
73439
73496
|
style: {
|
|
73440
73497
|
textAlign: langdetect == 'en' ? 'left' : 'right'
|
|
73441
73498
|
}
|
|
73442
|
-
}, langdetect == 'en' ? item.currencyname : '', " ", item.hassale == 1 ? item.defaultsaleprice : item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname),
|
|
73443
|
-
"class": "".concat(cardsstyles2.productSalePricestyles) + ' linethrough mt-auto mb-0 p-0 wordbreak mr-1 ml-1
|
|
73499
|
+
}, langdetect == 'en' ? item.currencyname : '', " ", item.hassale == 1 ? item.defaultsaleprice : item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname), /*#__PURE__*/React.createElement("p", {
|
|
73500
|
+
"class": "".concat(cardsstyles2.productSalePricestyles) + ' linethrough mt-auto mb-0 p-0 wordbreak mr-1 ml-1 w-md-100 ml-md-0 mr-md-0 ',
|
|
73444
73501
|
style: {
|
|
73445
|
-
textAlign: langdetect == 'en' ? 'left' : 'right'
|
|
73502
|
+
textAlign: langdetect == 'en' ? 'left' : 'right',
|
|
73503
|
+
visibility: item.hassale == 1 ? 'visible' : 'hidden'
|
|
73446
73504
|
}
|
|
73447
73505
|
}, langdetect == 'en' ? item.currencyname : '', " ", item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname))), /*#__PURE__*/React.createElement("div", {
|
|
73448
73506
|
"class": "".concat(cardsstyles$4.card_informationcontainer)
|
|
@@ -73515,7 +73573,7 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
|
|
|
73515
73573
|
}, /*#__PURE__*/React.createElement("i", {
|
|
73516
73574
|
"class": "fa fa-chevron-up font-12"
|
|
73517
73575
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
73518
|
-
"class":
|
|
73576
|
+
"class": sectionproperties.total_fontsize != 0 ? 'd-flex justify-content-start pl-2 pr-2' : 'd-flex d-md-none justify-content-start pl-2 pr-2',
|
|
73519
73577
|
style: {
|
|
73520
73578
|
flex: 1
|
|
73521
73579
|
}
|
|
@@ -80283,10 +80341,14 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
80283
80341
|
_useState2 = _slicedToArray(_useState, 2),
|
|
80284
80342
|
sectionproperties = _useState2[0],
|
|
80285
80343
|
setsectionproperties = _useState2[1];
|
|
80286
|
-
var _useState3 = useState(
|
|
80344
|
+
var _useState3 = useState(''),
|
|
80287
80345
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
80288
|
-
|
|
80289
|
-
|
|
80346
|
+
variantObj = _useState4[0],
|
|
80347
|
+
setvariantObj = _useState4[1];
|
|
80348
|
+
var _useState5 = useState(props.cardinfoitemprops),
|
|
80349
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
80350
|
+
item = _useState6[0],
|
|
80351
|
+
setitem = _useState6[1];
|
|
80290
80352
|
var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
80291
80353
|
props.actions.lang;
|
|
80292
80354
|
var langdetect = props.actions.langdetect;
|
|
@@ -80295,13 +80357,13 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
80295
80357
|
var setProductIdProdutInfoModalContext = props.actions.setProductIdProdutInfoModalContext;
|
|
80296
80358
|
var cardonclickfunctionContext = props.actions.cardonclickfunctionContext;
|
|
80297
80359
|
var ikimagecredcontext = props.actions.ikimagecredcontext;
|
|
80298
|
-
props.actions.NotificationManager;
|
|
80360
|
+
var NotificationManager = props.actions.NotificationManager;
|
|
80299
80361
|
var AddtoCartContext = props.actions.AddtoCartContext;
|
|
80300
80362
|
var AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
|
|
80301
|
-
var
|
|
80302
|
-
|
|
80303
|
-
|
|
80304
|
-
|
|
80363
|
+
var _useState7 = useState(''),
|
|
80364
|
+
_useState8 = _slicedToArray(_useState7, 2);
|
|
80365
|
+
_useState8[0];
|
|
80366
|
+
_useState8[1];
|
|
80305
80367
|
var plainString = function plainString(html) {
|
|
80306
80368
|
var divContainer = document.createElement('div');
|
|
80307
80369
|
divContainer.innerHTML = html;
|
|
@@ -80493,10 +80555,10 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
80493
80555
|
transform: "translateX(0px)"
|
|
80494
80556
|
})
|
|
80495
80557
|
};
|
|
80496
|
-
var
|
|
80497
|
-
|
|
80498
|
-
secondimage =
|
|
80499
|
-
setsecondimage =
|
|
80558
|
+
var _useState9 = useState(''),
|
|
80559
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
80560
|
+
secondimage = _useState10[0],
|
|
80561
|
+
setsecondimage = _useState10[1];
|
|
80500
80562
|
useEffect(function () {
|
|
80501
80563
|
var _props$cardinfoitempr;
|
|
80502
80564
|
setitem(props.cardinfoitemprops);
|
|
@@ -80524,13 +80586,44 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
80524
80586
|
}
|
|
80525
80587
|
}, [props.cardinfoitemprops]);
|
|
80526
80588
|
var addtocartfunc = function addtocartfunc() {
|
|
80527
|
-
var
|
|
80528
|
-
|
|
80529
|
-
|
|
80530
|
-
|
|
80531
|
-
|
|
80532
|
-
|
|
80589
|
+
var addtocardpayloadobj = {
|
|
80590
|
+
functype: 'add',
|
|
80591
|
+
productid: item.productid,
|
|
80592
|
+
variantid: '',
|
|
80593
|
+
quantity: item.quantity,
|
|
80594
|
+
vendorid: item.vendorid
|
|
80595
|
+
};
|
|
80596
|
+
var runfunc = false;
|
|
80597
|
+
if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
|
|
80598
|
+
if (item.hasvariants == 1) {
|
|
80599
|
+
// if (addtocardpayloadobj.variantid.length != 0) {
|
|
80600
|
+
if (variantObj != undefined && variantObj != null && Object.keys(variantObj).length != 0) {
|
|
80601
|
+
addtocardpayloadobj.variantid = variantObj.variantid;
|
|
80602
|
+
runfunc = true;
|
|
80603
|
+
} else {
|
|
80604
|
+
NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Product Options' : 'من فضلك اختر متغير');
|
|
80605
|
+
}
|
|
80606
|
+
} else {
|
|
80607
|
+
runfunc = true;
|
|
80608
|
+
}
|
|
80609
|
+
} else {
|
|
80610
|
+
NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Quantity' : 'من فضلك اختر الكمية');
|
|
80611
|
+
}
|
|
80612
|
+
if (runfunc == true) {
|
|
80613
|
+
AddtoCartContext(addtocardpayloadobj);
|
|
80614
|
+
}
|
|
80533
80615
|
};
|
|
80616
|
+
// const addtocartfunc = () => {
|
|
80617
|
+
// var runfunc = false;
|
|
80618
|
+
|
|
80619
|
+
// var tempaddtocardpayloadobj = { ...addtocardpayloadobj };
|
|
80620
|
+
// tempaddtocardpayloadobj.productid = item.productid;
|
|
80621
|
+
// tempaddtocardpayloadobj.functype = 'add';
|
|
80622
|
+
// tempaddtocardpayloadobj.item_type = 'product';
|
|
80623
|
+
// tempaddtocardpayloadobj.quantity = 1;
|
|
80624
|
+
|
|
80625
|
+
// AddtoCartContext(tempaddtocardpayloadobj);
|
|
80626
|
+
// };
|
|
80534
80627
|
var addtocartbuttonrender = function addtocartbuttonrender() {
|
|
80535
80628
|
if (AddtoCartMutationContext.isLoading) {
|
|
80536
80629
|
var _AddtoCartMutationCon;
|
|
@@ -80625,10 +80718,10 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
80625
80718
|
}
|
|
80626
80719
|
}));
|
|
80627
80720
|
};
|
|
80628
|
-
var
|
|
80629
|
-
|
|
80630
|
-
clickCount =
|
|
80631
|
-
setClickCount =
|
|
80721
|
+
var _useState11 = useState(0),
|
|
80722
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
80723
|
+
clickCount = _useState12[0],
|
|
80724
|
+
setClickCount = _useState12[1];
|
|
80632
80725
|
var handleClick = function handleClick() {
|
|
80633
80726
|
// Increase the click count by 1
|
|
80634
80727
|
setClickCount(function (prevCount) {
|
|
@@ -80964,7 +81057,9 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
80964
81057
|
sectionproperties: sectionproperties,
|
|
80965
81058
|
item: item
|
|
80966
81059
|
},
|
|
80967
|
-
foundMatchedVariantFunc: function foundMatchedVariantFunc(variantCompletedObj) {
|
|
81060
|
+
foundMatchedVariantFunc: function foundMatchedVariantFunc(variantCompletedObj) {
|
|
81061
|
+
setvariantObj(variantCompletedObj);
|
|
81062
|
+
}
|
|
80968
81063
|
})), sectionproperties.showprofitcontainer == 'Show' && /*#__PURE__*/React.createElement("div", {
|
|
80969
81064
|
"class": "col-lg-12 p-0",
|
|
80970
81065
|
style: {
|
|
@@ -81009,7 +81104,9 @@ var Simpleproductcard = function Simpleproductcard(props) {
|
|
|
81009
81104
|
// }}
|
|
81010
81105
|
,
|
|
81011
81106
|
onClick: function onClick() {
|
|
81012
|
-
if (sectionproperties.showvariantscont == 'Show')
|
|
81107
|
+
if (sectionproperties.showvariantscont == 'Show') {
|
|
81108
|
+
addtocartfunc();
|
|
81109
|
+
} else {
|
|
81013
81110
|
if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 0) {
|
|
81014
81111
|
addtocartfunc();
|
|
81015
81112
|
} else if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 1) {
|
package/dist/index.umd.js
CHANGED
|
@@ -72829,8 +72829,8 @@
|
|
|
72829
72829
|
}, plainString(langdetect == 'en' ? item.description_en : item.description_ar))))));
|
|
72830
72830
|
};
|
|
72831
72831
|
|
|
72832
|
-
var css_248z$c = ".Productccard_with_zoominonhover-module_productcard__8ASdR {\n\tposition: relative;\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\tposition: absolute;\n\ttop: 5px;\n\tright: 5px;\n\topacity: 0;\n\ttransition: .3s\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl {\n\tposition: relative;\n\tz-index: 1\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\topacity: 1;\n\tz-index: 8\n}\n.Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(10px);\n\ttransition: .3s;\n\ttransition-property: transform;\n\tdisplay: block\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(0)\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_product_details__3SLId {\n\tpadding-top: 10px ;\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t/* display: none; */\n\tpadding: 0 10px;\n\t/* width: 101% !important;\n\tleft: -1px; */\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK .Productccard_with_zoominonhover-module_price__12djA {\n\tdisplay: none\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\tdisplay: block;\n\tz-index: 1000 !important\n}\n@media screen and (max-width:800px) {\n\t.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t\tdisplay: block !important;\n\t\t/* border:none !important */\n\t}\n}";
|
|
72833
|
-
var cardsstyles$4 = {"productcard":"Productccard_with_zoominonhover-module_productcard__8ASdR","card_thumbnail":"Productccard_with_zoominonhover-module_card_thumbnail__xCWyB","wishlistbtn":"Productccard_with_zoominonhover-module_wishlistbtn__-9K6V","card_inner":"Productccard_with_zoominonhover-module_card_inner__-pVNl","product_details":"Productccard_with_zoominonhover-module_product_details__3SLId","card_informationcontainer":"Productccard_with_zoominonhover-module_card_informationcontainer__suyHK","price":"Productccard_with_zoominonhover-module_price__12djA"};
|
|
72832
|
+
var css_248z$c = ".Productccard_with_zoominonhover-module_productcard__8ASdR {\n\tposition: relative;\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\tposition: absolute;\n\ttop: 5px;\n\tright: 5px;\n\topacity: 0;\n\ttransition: .3s\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl {\n\tposition: relative;\n\tz-index: 1\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_thumbnail__xCWyB .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\topacity: 1;\n\tz-index: 8\n}\n.Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(10px);\n\ttransition: .3s;\n\ttransition-property: transform;\n\tdisplay: block\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_wishlistbtn__-9K6V {\n\ttransform: translateX(0)\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_product_details__3SLId {\n\tpadding-top: 10px ;\n\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t/* display: none; */\n\tpadding: 0 10px;\n\t/* width: 101% !important;\n\tleft: -1px; */\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK .Productccard_with_zoominonhover-module_price__12djA {\n\tdisplay: none\n}\n.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_inner__-pVNl:hover .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\tdisplay: block;\n\tz-index: 1000 !important\n}\n@media screen and (max-width:800px) {\n\t.Productccard_with_zoominonhover-module_productcard__8ASdR .Productccard_with_zoominonhover-module_card_informationcontainer__suyHK {\n\t\tdisplay: block !important;\n\t\t/* border:none !important */\n\t}\n}\n.Productccard_with_zoominonhover-module_intialimage__8hcdc {\n visibility: visible !important;\n opacity: 1 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n.Productccard_with_zoominonhover-module_secondaryimage__EHpKK {\n visibility: hidden !important;\n\n opacity: 0 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n\n.Productccard_with_zoominonhover-module_img_container__lSsmX:hover .Productccard_with_zoominonhover-module_intialimage__8hcdc {\n visibility: hidden !important;\n\n opacity: 0 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n.Productccard_with_zoominonhover-module_img_container__lSsmX:hover .Productccard_with_zoominonhover-module_secondaryimage__EHpKK {\n visibility: visible !important;\n\n opacity: 1 !important;\n transition: visibility 0.4s, opacity 0.4s linear !important;\n\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n.Productccard_with_zoominonhover-module_img_container__lSsmX {\n transition: all 0.4s !important;\n position: relative !important;\n}";
|
|
72833
|
+
var cardsstyles$4 = {"productcard":"Productccard_with_zoominonhover-module_productcard__8ASdR","card_thumbnail":"Productccard_with_zoominonhover-module_card_thumbnail__xCWyB","wishlistbtn":"Productccard_with_zoominonhover-module_wishlistbtn__-9K6V","card_inner":"Productccard_with_zoominonhover-module_card_inner__-pVNl","product_details":"Productccard_with_zoominonhover-module_product_details__3SLId","card_informationcontainer":"Productccard_with_zoominonhover-module_card_informationcontainer__suyHK","price":"Productccard_with_zoominonhover-module_price__12djA","intialimage":"Productccard_with_zoominonhover-module_intialimage__8hcdc","secondaryimage":"Productccard_with_zoominonhover-module_secondaryimage__EHpKK","img_container":"Productccard_with_zoominonhover-module_img_container__lSsmX"};
|
|
72834
72834
|
styleInject(css_248z$c);
|
|
72835
72835
|
|
|
72836
72836
|
function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -72857,27 +72857,31 @@
|
|
|
72857
72857
|
var cardonclickfunctionContext = props.actions.cardonclickfunctionContext;
|
|
72858
72858
|
var NotificationManager = props.actions.NotificationManager;
|
|
72859
72859
|
var ikimagecredcontext = props.actions.ikimagecredcontext;
|
|
72860
|
-
var _useState5 = React.useState(''),
|
|
72861
|
-
_useState6 = _slicedToArray__default["default"](_useState5, 2);
|
|
72862
|
-
_useState6[0];
|
|
72863
|
-
_useState6[1];
|
|
72864
72860
|
React.useEffect(function () {
|
|
72865
|
-
|
|
72866
|
-
|
|
72867
|
-
|
|
72868
|
-
|
|
72869
|
-
|
|
72870
|
-
|
|
72871
|
-
|
|
72872
|
-
|
|
72873
|
-
|
|
72861
|
+
if (props.srcfrom == 'addsectionform') {
|
|
72862
|
+
var secpropobj = {};
|
|
72863
|
+
props.defaultproperties.forEach(function (defaultpropobj, defaultpropindex) {
|
|
72864
|
+
secpropobj[defaultpropobj.property_css_name] = defaultpropobj.property_value;
|
|
72865
|
+
});
|
|
72866
|
+
setsectionproperties(_objectSpread$w({}, secpropobj));
|
|
72867
|
+
} else {
|
|
72868
|
+
var secpropobj = {};
|
|
72869
|
+
StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
72870
|
+
if (sectionitem.sectionid == props.sectionidprops) {
|
|
72871
|
+
sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
|
|
72872
|
+
secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
|
|
72873
|
+
});
|
|
72874
|
+
}
|
|
72875
|
+
});
|
|
72876
|
+
setsectionproperties(_objectSpread$w({}, secpropobj));
|
|
72877
|
+
}
|
|
72874
72878
|
}, [StatePagePropertiesContext]);
|
|
72875
72879
|
React.useEffect(function () {
|
|
72876
72880
|
setitem(props.cardinfoitemprops);
|
|
72877
72881
|
}, [props.cardinfoitemprops]);
|
|
72878
72882
|
var updatequantity = function updatequantity(type) {
|
|
72879
72883
|
var tempitem = _objectSpread$w({}, item);
|
|
72880
|
-
tempitem.quantity =
|
|
72884
|
+
tempitem.quantity = parseInt(tempitem.quantity);
|
|
72881
72885
|
if (type == 'add') {
|
|
72882
72886
|
tempitem.quantity = tempitem.quantity + 1;
|
|
72883
72887
|
} else if (type == 'remove') {
|
|
@@ -72914,6 +72918,74 @@
|
|
|
72914
72918
|
AddtoCartContext(addtocardpayloadobj);
|
|
72915
72919
|
}
|
|
72916
72920
|
};
|
|
72921
|
+
var _useState5 = React.useState(''),
|
|
72922
|
+
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
72923
|
+
secondimage = _useState6[0],
|
|
72924
|
+
setsecondimage = _useState6[1];
|
|
72925
|
+
React.useEffect(function () {
|
|
72926
|
+
var _props$cardinfoitempr;
|
|
72927
|
+
setitem(props.cardinfoitemprops);
|
|
72928
|
+
if ((props === null || props === void 0 || (_props$cardinfoitempr = props.cardinfoitemprops) === null || _props$cardinfoitempr === void 0 || (_props$cardinfoitempr = _props$cardinfoitempr.productimages) === null || _props$cardinfoitempr === void 0 ? void 0 : _props$cardinfoitempr.length) == 1) {
|
|
72929
|
+
var _props$cardinfoitempr2;
|
|
72930
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr2 = props.cardinfoitemprops) === null || _props$cardinfoitempr2 === void 0 ? void 0 : _props$cardinfoitempr2.image);
|
|
72931
|
+
} else {
|
|
72932
|
+
var _props$cardinfoitempr3, _props$cardinfoitempr4;
|
|
72933
|
+
if ((props === null || props === void 0 ? void 0 : props.cardinfoitemprops) != undefined && (props === null || props === void 0 || (_props$cardinfoitempr3 = props.cardinfoitemprops) === null || _props$cardinfoitempr3 === void 0 ? void 0 : _props$cardinfoitempr3.productimages) != undefined && Array.isArray(props === null || props === void 0 || (_props$cardinfoitempr4 = props.cardinfoitemprops) === null || _props$cardinfoitempr4 === void 0 ? void 0 : _props$cardinfoitempr4.productimages)) {
|
|
72934
|
+
var _props$cardinfoitempr5, _props$cardinfoitempr6, _props$cardinfoitempr7;
|
|
72935
|
+
if ((props === null || props === void 0 || (_props$cardinfoitempr5 = props.cardinfoitemprops) === null || _props$cardinfoitempr5 === void 0 ? void 0 : _props$cardinfoitempr5.productimages[0]) != undefined && (props === null || props === void 0 || (_props$cardinfoitempr6 = props.cardinfoitemprops) === null || _props$cardinfoitempr6 === void 0 || (_props$cardinfoitempr6 = _props$cardinfoitempr6.productimages[0]) === null || _props$cardinfoitempr6 === void 0 ? void 0 : _props$cardinfoitempr6.path) == (props === null || props === void 0 || (_props$cardinfoitempr7 = props.cardinfoitemprops) === null || _props$cardinfoitempr7 === void 0 ? void 0 : _props$cardinfoitempr7.image)) {
|
|
72936
|
+
var _props$cardinfoitempr8;
|
|
72937
|
+
if ((props === null || props === void 0 || (_props$cardinfoitempr8 = props.cardinfoitemprops) === null || _props$cardinfoitempr8 === void 0 || (_props$cardinfoitempr8 = _props$cardinfoitempr8.productimages[1]) === null || _props$cardinfoitempr8 === void 0 ? void 0 : _props$cardinfoitempr8.length) != 0) {
|
|
72938
|
+
var _props$cardinfoitempr9;
|
|
72939
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr9 = props.cardinfoitemprops) === null || _props$cardinfoitempr9 === void 0 || (_props$cardinfoitempr9 = _props$cardinfoitempr9.productimages[1]) === null || _props$cardinfoitempr9 === void 0 ? void 0 : _props$cardinfoitempr9.path);
|
|
72940
|
+
} else {
|
|
72941
|
+
var _props$cardinfoitempr10;
|
|
72942
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr10 = props.cardinfoitemprops) === null || _props$cardinfoitempr10 === void 0 ? void 0 : _props$cardinfoitempr10.image);
|
|
72943
|
+
}
|
|
72944
|
+
} else {
|
|
72945
|
+
var _props$cardinfoitempr11;
|
|
72946
|
+
setsecondimage(props === null || props === void 0 || (_props$cardinfoitempr11 = props.cardinfoitemprops) === null || _props$cardinfoitempr11 === void 0 || (_props$cardinfoitempr11 = _props$cardinfoitempr11.productimages[0]) === null || _props$cardinfoitempr11 === void 0 ? void 0 : _props$cardinfoitempr11.path);
|
|
72947
|
+
}
|
|
72948
|
+
}
|
|
72949
|
+
}
|
|
72950
|
+
}, [props.cardinfoitemprops]);
|
|
72951
|
+
var Image = function Image(type) {
|
|
72952
|
+
var transition = false;
|
|
72953
|
+
if (sectionproperties.hideshowcardtransition == 'Show' && type != 'responsive') {
|
|
72954
|
+
transition = true;
|
|
72955
|
+
}
|
|
72956
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
72957
|
+
"class": "w-100 cursor-pointer h-100",
|
|
72958
|
+
style: {
|
|
72959
|
+
position: 'relative'
|
|
72960
|
+
}
|
|
72961
|
+
}, /*#__PURE__*/React__default["default"].createElement(Imagekitimagecomp, {
|
|
72962
|
+
"class": transition ? cardsstyles$4.intialimage : '',
|
|
72963
|
+
urlEndpoint: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimageendpoint,
|
|
72964
|
+
publicKey: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimagepublickey,
|
|
72965
|
+
path: '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + item.image,
|
|
72966
|
+
loading: "lazy",
|
|
72967
|
+
style: {
|
|
72968
|
+
width: '100%',
|
|
72969
|
+
height: '100%',
|
|
72970
|
+
objectFit: sectionproperties.bgcovercontain == 'Cover' ? 'cover' : 'contain'
|
|
72971
|
+
}
|
|
72972
|
+
}), transition && /*#__PURE__*/React__default["default"].createElement(Imagekitimagecomp, {
|
|
72973
|
+
"class": cardsstyles$4.secondaryimage,
|
|
72974
|
+
urlEndpoint: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimageendpoint,
|
|
72975
|
+
publicKey: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimagepublickey,
|
|
72976
|
+
path: '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + secondimage,
|
|
72977
|
+
loading: "lazy",
|
|
72978
|
+
style: {
|
|
72979
|
+
width: '100%',
|
|
72980
|
+
height: '100%',
|
|
72981
|
+
objectFit: sectionproperties.bgcovercontain == 'Cover' ? 'cover' : 'contain'
|
|
72982
|
+
}
|
|
72983
|
+
}));
|
|
72984
|
+
};
|
|
72985
|
+
var _useState7 = React.useState(0),
|
|
72986
|
+
_useState8 = _slicedToArray__default["default"](_useState7, 2);
|
|
72987
|
+
_useState8[0];
|
|
72988
|
+
_useState8[1];
|
|
72917
72989
|
var cardsstyles2 = {
|
|
72918
72990
|
productcard: glamor.css({
|
|
72919
72991
|
background: sectionproperties.backgroundColortransparent == 'Transparent' ? 'transparent' : sectionproperties.backgroundColor,
|
|
@@ -72993,8 +73065,7 @@
|
|
|
72993
73065
|
transition: '.3s',
|
|
72994
73066
|
':hover': {
|
|
72995
73067
|
background: sectionproperties.cartbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColoronhover,
|
|
72996
|
-
color: sectionproperties.cartBtnTextcoloronhover
|
|
72997
|
-
borderColor: sectionproperties.cartBtnTextcoloronhover
|
|
73068
|
+
color: sectionproperties.cartBtnTextcoloronhover
|
|
72998
73069
|
}
|
|
72999
73070
|
}),
|
|
73000
73071
|
img_container: glamor.css({
|
|
@@ -73026,7 +73097,10 @@
|
|
|
73026
73097
|
position: 'relative',
|
|
73027
73098
|
fontWeight: sectionproperties.quantitybtn_textfontweight,
|
|
73028
73099
|
color: sectionproperties.quantitybtn_textcolor,
|
|
73029
|
-
fontSize: sectionproperties.quantitybtn_textfontsize + 'px'
|
|
73100
|
+
fontSize: sectionproperties.quantitybtn_textfontsize + 'px',
|
|
73101
|
+
'@media (max-width: 800px)': {
|
|
73102
|
+
width: '100%'
|
|
73103
|
+
}
|
|
73030
73104
|
}),
|
|
73031
73105
|
quantitybtn_text: glamor.css({
|
|
73032
73106
|
margin: 'auto'
|
|
@@ -73141,10 +73215,6 @@
|
|
|
73141
73215
|
})), langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic);
|
|
73142
73216
|
}
|
|
73143
73217
|
};
|
|
73144
|
-
var _useState7 = React.useState(0),
|
|
73145
|
-
_useState8 = _slicedToArray__default["default"](_useState7, 2);
|
|
73146
|
-
_useState8[0];
|
|
73147
|
-
_useState8[1];
|
|
73148
73218
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73149
73219
|
"class": "row ml-0 mr-0 w-100 mb-sm-5",
|
|
73150
73220
|
style: {
|
|
@@ -73172,22 +73242,7 @@
|
|
|
73172
73242
|
cursor: 'pointer',
|
|
73173
73243
|
overflow: 'hidden'
|
|
73174
73244
|
}
|
|
73175
|
-
},
|
|
73176
|
-
urlEndpoint: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimageendpoint,
|
|
73177
|
-
publicKey: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimagepublickey,
|
|
73178
|
-
path: '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + item.image,
|
|
73179
|
-
style: {
|
|
73180
|
-
width: sectionproperties.imageInnerWidth_Height + '%',
|
|
73181
|
-
height: sectionproperties.imageInnerWidth_Height + '%',
|
|
73182
|
-
objectFit: sectionproperties.bgcovercontain == 'Cover' ? 'cover' : 'contain',
|
|
73183
|
-
position: 'relative',
|
|
73184
|
-
borderBottomLeftRadius: langdetect == 'en' ? sectionproperties.image_borderBottomLeftRadius + 'px' : sectionproperties.image_borderBottomRightRadius + 'px',
|
|
73185
|
-
borderBottomRightRadius: langdetect == 'en' ? sectionproperties.image_borderBottomRightRadius + 'px' : sectionproperties.image_borderBottomLeftRadius + 'px',
|
|
73186
|
-
borderTopLeftRadius: langdetect == 'en' ? sectionproperties.image_bordertopleftradius + 'px' : sectionproperties.image_bordertoprightradius + 'px',
|
|
73187
|
-
borderTopRightRadius: langdetect == 'en' ? sectionproperties.image_bordertoprightradius + 'px' : sectionproperties.image_bordertopleftradius + 'px'
|
|
73188
|
-
},
|
|
73189
|
-
loading: "lazy"
|
|
73190
|
-
})), sectionproperties.favBtnShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73245
|
+
}, Image('normal')), sectionproperties.favBtnShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73191
73246
|
"class": "".concat(cardsstyles$4.wishlistbtn),
|
|
73192
73247
|
onClick: function onClick() {
|
|
73193
73248
|
addtofavoritescontext(item.productid);
|
|
@@ -73281,13 +73336,13 @@
|
|
|
73281
73336
|
color: sectionproperties.quantitycolor,
|
|
73282
73337
|
fontWeight: sectionproperties.quantityfontweight
|
|
73283
73338
|
}
|
|
73284
|
-
}, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, " ", item.currentquantity)), sectionproperties.prodNameShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73339
|
+
}, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, ": ", item.currentquantity)), sectionproperties.prodNameShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73285
73340
|
"class": "col-lg-12"
|
|
73286
73341
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
73287
73342
|
onClick: function onClick() {
|
|
73288
73343
|
cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item.productid, props.fetchingtypeprops, item.collectionid);
|
|
73289
73344
|
},
|
|
73290
|
-
"class": "".concat(cardsstyles2.productNameStyles) + ' m-0 p-0 wordbreak wordbreak1 ',
|
|
73345
|
+
"class": sectionproperties.wordbreak == '1' ? "".concat(cardsstyles2.productNameStyles) + ' m-0 p-0 wordbreak wordbreak1 ' : "".concat(cardsstyles2.productNameStyles) + ' m-0 p-0 wordbreak wordbreak2 ',
|
|
73291
73346
|
style: {
|
|
73292
73347
|
textAlign: langdetect == 'en' ? 'left' : 'right'
|
|
73293
73348
|
}
|
|
@@ -73299,16 +73354,17 @@
|
|
|
73299
73354
|
color: sectionproperties.measurementunitcolor
|
|
73300
73355
|
}
|
|
73301
73356
|
}, item.measurmentunit), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73302
|
-
"class": "col-lg-12 d-flex align-items-center"
|
|
73357
|
+
"class": "col-lg-12 d-flex align-items-center flex-md-column justify-content-start"
|
|
73303
73358
|
}, sectionproperties.prodPriceShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
73304
|
-
"class": "".concat(cardsstyles2.productPricestyles) + ' m-0 p-0 wordbreak ',
|
|
73359
|
+
"class": "".concat(cardsstyles2.productPricestyles) + ' m-0 p-0 wordbreak w-md-100 ',
|
|
73305
73360
|
style: {
|
|
73306
73361
|
textAlign: langdetect == 'en' ? 'left' : 'right'
|
|
73307
73362
|
}
|
|
73308
|
-
}, langdetect == 'en' ? item.currencyname : '', " ", item.hassale == 1 ? item.defaultsaleprice : item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname),
|
|
73309
|
-
"class": "".concat(cardsstyles2.productSalePricestyles) + ' linethrough mt-auto mb-0 p-0 wordbreak mr-1 ml-1
|
|
73363
|
+
}, langdetect == 'en' ? item.currencyname : '', " ", item.hassale == 1 ? item.defaultsaleprice : item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
73364
|
+
"class": "".concat(cardsstyles2.productSalePricestyles) + ' linethrough mt-auto mb-0 p-0 wordbreak mr-1 ml-1 w-md-100 ml-md-0 mr-md-0 ',
|
|
73310
73365
|
style: {
|
|
73311
|
-
textAlign: langdetect == 'en' ? 'left' : 'right'
|
|
73366
|
+
textAlign: langdetect == 'en' ? 'left' : 'right',
|
|
73367
|
+
visibility: item.hassale == 1 ? 'visible' : 'hidden'
|
|
73312
73368
|
}
|
|
73313
73369
|
}, langdetect == 'en' ? item.currencyname : '', " ", item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73314
73370
|
"class": "".concat(cardsstyles$4.card_informationcontainer)
|
|
@@ -73381,7 +73437,7 @@
|
|
|
73381
73437
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
73382
73438
|
"class": "fa fa-chevron-up font-12"
|
|
73383
73439
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
73384
|
-
"class":
|
|
73440
|
+
"class": sectionproperties.total_fontsize != 0 ? 'd-flex justify-content-start pl-2 pr-2' : 'd-flex d-md-none justify-content-start pl-2 pr-2',
|
|
73385
73441
|
style: {
|
|
73386
73442
|
flex: 1
|
|
73387
73443
|
}
|
|
@@ -80149,10 +80205,14 @@
|
|
|
80149
80205
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
80150
80206
|
sectionproperties = _useState2[0],
|
|
80151
80207
|
setsectionproperties = _useState2[1];
|
|
80152
|
-
var _useState3 = React.useState(
|
|
80208
|
+
var _useState3 = React.useState(''),
|
|
80153
80209
|
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
80154
|
-
|
|
80155
|
-
|
|
80210
|
+
variantObj = _useState4[0],
|
|
80211
|
+
setvariantObj = _useState4[1];
|
|
80212
|
+
var _useState5 = React.useState(props.cardinfoitemprops),
|
|
80213
|
+
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
80214
|
+
item = _useState6[0],
|
|
80215
|
+
setitem = _useState6[1];
|
|
80156
80216
|
var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
80157
80217
|
props.actions.lang;
|
|
80158
80218
|
var langdetect = props.actions.langdetect;
|
|
@@ -80161,13 +80221,13 @@
|
|
|
80161
80221
|
var setProductIdProdutInfoModalContext = props.actions.setProductIdProdutInfoModalContext;
|
|
80162
80222
|
var cardonclickfunctionContext = props.actions.cardonclickfunctionContext;
|
|
80163
80223
|
var ikimagecredcontext = props.actions.ikimagecredcontext;
|
|
80164
|
-
props.actions.NotificationManager;
|
|
80224
|
+
var NotificationManager = props.actions.NotificationManager;
|
|
80165
80225
|
var AddtoCartContext = props.actions.AddtoCartContext;
|
|
80166
80226
|
var AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
|
|
80167
|
-
var
|
|
80168
|
-
|
|
80169
|
-
|
|
80170
|
-
|
|
80227
|
+
var _useState7 = React.useState(''),
|
|
80228
|
+
_useState8 = _slicedToArray__default["default"](_useState7, 2);
|
|
80229
|
+
_useState8[0];
|
|
80230
|
+
_useState8[1];
|
|
80171
80231
|
var plainString = function plainString(html) {
|
|
80172
80232
|
var divContainer = document.createElement('div');
|
|
80173
80233
|
divContainer.innerHTML = html;
|
|
@@ -80359,10 +80419,10 @@
|
|
|
80359
80419
|
transform: "translateX(0px)"
|
|
80360
80420
|
})
|
|
80361
80421
|
};
|
|
80362
|
-
var
|
|
80363
|
-
|
|
80364
|
-
secondimage =
|
|
80365
|
-
setsecondimage =
|
|
80422
|
+
var _useState9 = React.useState(''),
|
|
80423
|
+
_useState10 = _slicedToArray__default["default"](_useState9, 2),
|
|
80424
|
+
secondimage = _useState10[0],
|
|
80425
|
+
setsecondimage = _useState10[1];
|
|
80366
80426
|
React.useEffect(function () {
|
|
80367
80427
|
var _props$cardinfoitempr;
|
|
80368
80428
|
setitem(props.cardinfoitemprops);
|
|
@@ -80390,13 +80450,44 @@
|
|
|
80390
80450
|
}
|
|
80391
80451
|
}, [props.cardinfoitemprops]);
|
|
80392
80452
|
var addtocartfunc = function addtocartfunc() {
|
|
80393
|
-
var
|
|
80394
|
-
|
|
80395
|
-
|
|
80396
|
-
|
|
80397
|
-
|
|
80398
|
-
|
|
80453
|
+
var addtocardpayloadobj = {
|
|
80454
|
+
functype: 'add',
|
|
80455
|
+
productid: item.productid,
|
|
80456
|
+
variantid: '',
|
|
80457
|
+
quantity: item.quantity,
|
|
80458
|
+
vendorid: item.vendorid
|
|
80459
|
+
};
|
|
80460
|
+
var runfunc = false;
|
|
80461
|
+
if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
|
|
80462
|
+
if (item.hasvariants == 1) {
|
|
80463
|
+
// if (addtocardpayloadobj.variantid.length != 0) {
|
|
80464
|
+
if (variantObj != undefined && variantObj != null && Object.keys(variantObj).length != 0) {
|
|
80465
|
+
addtocardpayloadobj.variantid = variantObj.variantid;
|
|
80466
|
+
runfunc = true;
|
|
80467
|
+
} else {
|
|
80468
|
+
NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Product Options' : 'من فضلك اختر متغير');
|
|
80469
|
+
}
|
|
80470
|
+
} else {
|
|
80471
|
+
runfunc = true;
|
|
80472
|
+
}
|
|
80473
|
+
} else {
|
|
80474
|
+
NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Quantity' : 'من فضلك اختر الكمية');
|
|
80475
|
+
}
|
|
80476
|
+
if (runfunc == true) {
|
|
80477
|
+
AddtoCartContext(addtocardpayloadobj);
|
|
80478
|
+
}
|
|
80399
80479
|
};
|
|
80480
|
+
// const addtocartfunc = () => {
|
|
80481
|
+
// var runfunc = false;
|
|
80482
|
+
|
|
80483
|
+
// var tempaddtocardpayloadobj = { ...addtocardpayloadobj };
|
|
80484
|
+
// tempaddtocardpayloadobj.productid = item.productid;
|
|
80485
|
+
// tempaddtocardpayloadobj.functype = 'add';
|
|
80486
|
+
// tempaddtocardpayloadobj.item_type = 'product';
|
|
80487
|
+
// tempaddtocardpayloadobj.quantity = 1;
|
|
80488
|
+
|
|
80489
|
+
// AddtoCartContext(tempaddtocardpayloadobj);
|
|
80490
|
+
// };
|
|
80400
80491
|
var addtocartbuttonrender = function addtocartbuttonrender() {
|
|
80401
80492
|
if (AddtoCartMutationContext.isLoading) {
|
|
80402
80493
|
var _AddtoCartMutationCon;
|
|
@@ -80491,10 +80582,10 @@
|
|
|
80491
80582
|
}
|
|
80492
80583
|
}));
|
|
80493
80584
|
};
|
|
80494
|
-
var
|
|
80495
|
-
|
|
80496
|
-
clickCount =
|
|
80497
|
-
setClickCount =
|
|
80585
|
+
var _useState11 = React.useState(0),
|
|
80586
|
+
_useState12 = _slicedToArray__default["default"](_useState11, 2),
|
|
80587
|
+
clickCount = _useState12[0],
|
|
80588
|
+
setClickCount = _useState12[1];
|
|
80498
80589
|
var handleClick = function handleClick() {
|
|
80499
80590
|
// Increase the click count by 1
|
|
80500
80591
|
setClickCount(function (prevCount) {
|
|
@@ -80830,7 +80921,9 @@
|
|
|
80830
80921
|
sectionproperties: sectionproperties,
|
|
80831
80922
|
item: item
|
|
80832
80923
|
},
|
|
80833
|
-
foundMatchedVariantFunc: function foundMatchedVariantFunc(variantCompletedObj) {
|
|
80924
|
+
foundMatchedVariantFunc: function foundMatchedVariantFunc(variantCompletedObj) {
|
|
80925
|
+
setvariantObj(variantCompletedObj);
|
|
80926
|
+
}
|
|
80834
80927
|
})), sectionproperties.showprofitcontainer == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
80835
80928
|
"class": "col-lg-12 p-0",
|
|
80836
80929
|
style: {
|
|
@@ -80875,7 +80968,9 @@
|
|
|
80875
80968
|
// }}
|
|
80876
80969
|
,
|
|
80877
80970
|
onClick: function onClick() {
|
|
80878
|
-
if (sectionproperties.showvariantscont == 'Show')
|
|
80971
|
+
if (sectionproperties.showvariantscont == 'Show') {
|
|
80972
|
+
addtocartfunc();
|
|
80973
|
+
} else {
|
|
80879
80974
|
if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 0) {
|
|
80880
80975
|
addtocartfunc();
|
|
80881
80976
|
} else if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 1) {
|