tabexseriescomponents 0.0.264 → 0.0.266
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 +413 -101
- package/dist/index.esm.js +413 -101
- package/dist/index.umd.js +413 -101
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -7669,7 +7669,7 @@
|
|
|
7669
7669
|
var _fetchAuthorizationQu, _fetchAuthorizationQu2, _fetchAuthorizationQu3, _fetchAuthorizationQu4, _fetchAuthorizationQu5, _fetchAuthorizationQu6, _css, _authdetailsContext$c, _authdetailsContext$c2;
|
|
7670
7670
|
var lang = props.actions.lang;
|
|
7671
7671
|
var langdetect = props.actions.langdetect;
|
|
7672
|
-
|
|
7672
|
+
props.actions.routingcountext;
|
|
7673
7673
|
var FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
|
|
7674
7674
|
var setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
|
|
7675
7675
|
var fetchinstitutecustomerinfosignupQueryContext = props.actions.fetchinstitutecustomerinfosignupQueryContext;
|
|
@@ -8487,9 +8487,9 @@
|
|
|
8487
8487
|
}, langdetect == 'en' ? sectionproperties.termsandconditiontext_en : sectionproperties.termsandconditiontext_ar, ' ', /*#__PURE__*/React__default["default"].createElement("span", {
|
|
8488
8488
|
"class": formstyles.terms + ' cursor-pointer ',
|
|
8489
8489
|
onClick: function onClick() {
|
|
8490
|
-
|
|
8490
|
+
window.open(window.location.origin + '/policies', '_blank');
|
|
8491
8491
|
}
|
|
8492
|
-
},
|
|
8492
|
+
}, langdetect == 'en' ? 'Terms & Conditions' : 'الشروط و الاحكام'))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8493
8493
|
className: "col-lg-12 col-md-12 col-sm-12 d-flex align-items-center justify-content-center mb-3 mt-3"
|
|
8494
8494
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
8495
8495
|
className: "".concat(formstyles.signupbtn) + ' d-flex align-items-center justify-content-center ',
|
|
@@ -11289,6 +11289,7 @@
|
|
|
11289
11289
|
cardobj.quantity = itemquantity;
|
|
11290
11290
|
cardobj.timestamp = arrayItem.productinfo.timestamp;
|
|
11291
11291
|
cardobj.productquantity = arrayItem.productinfo.productquantity;
|
|
11292
|
+
cardobj.quantavailtype = arrayItem.productinfo.quantavailtype;
|
|
11292
11293
|
if (langdetect == 'en') {
|
|
11293
11294
|
cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_en;
|
|
11294
11295
|
} else {
|
|
@@ -11672,19 +11673,24 @@
|
|
|
11672
11673
|
} else {
|
|
11673
11674
|
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, false);
|
|
11674
11675
|
}
|
|
11676
|
+
},
|
|
11677
|
+
style: {
|
|
11678
|
+
flexDirection: 'row'
|
|
11675
11679
|
}
|
|
11676
|
-
},
|
|
11680
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
11677
11681
|
"class": sectionproperties.sectiontitleposition == 'Centered' ? 'd-flex justify-content-center align-items-center' : 'd-flex justify-content-center align-items-center d-md-none'
|
|
11678
11682
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
11679
11683
|
"class": sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : ''
|
|
11680
|
-
}, langdetect == 'en' ? sectionproperties.viewmorebtn_text : sectionproperties.viewmorebtn_text_ar)
|
|
11681
|
-
"class": sectionproperties.sectiontitleposition == 'Centered' ? 'd-flex justify-content-center align-items-center' : 'd-flex justify-content-center align-items-center d-md-none'
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
+
}, langdetect == 'en' ? sectionproperties.viewmorebtn_text : sectionproperties.viewmorebtn_text_ar), sectionproperties.showIcon == 'Show' && /*#__PURE__*/React__default["default"].createElement("i", {
|
|
11685
|
+
"class": sectionproperties.sectiontitleposition == 'Centered' ? 'd-flex justify-content-center align-items-center h-100 allcentered' : 'd-flex justify-content-center align-items-center d-md-none h-100',
|
|
11686
|
+
style: {
|
|
11687
|
+
marginLeft: 5,
|
|
11688
|
+
marginRight: 5
|
|
11689
|
+
}
|
|
11684
11690
|
}, langdetect == 'en' ? /*#__PURE__*/React__default["default"].createElement(HiOutlineArrowRight.HiOutlineArrowRight, {
|
|
11685
|
-
size: sectionproperties.
|
|
11691
|
+
size: sectionproperties.viewmoreiconfontsize
|
|
11686
11692
|
}) : /*#__PURE__*/React__default["default"].createElement(HiOutlineArrowLeft.HiOutlineArrowLeft, {
|
|
11687
|
-
size: sectionproperties.
|
|
11693
|
+
size: sectionproperties.viewmoreiconfontsize
|
|
11688
11694
|
}))), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
11689
11695
|
"class": sectionproperties.sectiontitleposition == 'Centered' ? 'd-none align-items-center justify-content-center' : 'd-none d-md-flex align-items-center justify-content-center'
|
|
11690
11696
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
@@ -23772,7 +23778,7 @@
|
|
|
23772
23778
|
function ownKeys$1u(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23773
23779
|
function _objectSpread$1u(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1u(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1u(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23774
23780
|
var SearchFocusedHeader = function SearchFocusedHeader(props) {
|
|
23775
|
-
var _css, _authdetailsContext$i3, _authdetailsContext$i4, _logoarrayofobjects$, _logoarrayofobjects$2, _authdetailsContext$c, _authdetailsContext$
|
|
23781
|
+
var _css, _authdetailsContext$i3, _authdetailsContext$i4, _authdetailsContext$i5, _authdetailsContext$i8, _authdetailsContext$i11, _logoarrayofobjects$, _logoarrayofobjects$2, _authdetailsContext$c, _authdetailsContext$i14, _authdetailsContext$i15, _fetchcustomercartQue, _fetchcustomercartQue2, _fetchcustomercartQue3, _fetchcustomercartQue4, _fetchcustomercartQue5, _fetchcustomercartQue6, _authdetailsContext$i16, _authdetailsContext$i17;
|
|
23776
23782
|
var lang = props.actions.lang;
|
|
23777
23783
|
var langdetect = props.actions.langdetect;
|
|
23778
23784
|
var setlang = props.actions.setlang;
|
|
@@ -24239,35 +24245,35 @@
|
|
|
24239
24245
|
"class": "col-lg-3 d-flex align-items-center p-0"
|
|
24240
24246
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24241
24247
|
"class": "row m-0 d-flex justify-content-end w-100"
|
|
24242
|
-
}, sectionproperties.fbbtn_show == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24248
|
+
}, sectionproperties.fbbtn_show == 'Show' && (authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$i5 = authdetailsContext.instinfo) === null || _authdetailsContext$i5 === void 0 ? void 0 : _authdetailsContext$i5.facebooklink) != null && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24243
24249
|
"class": header_cssstyles.fbbtn + ' p-0 allcentered cursor-pointer ',
|
|
24244
24250
|
onClick: function onClick() {
|
|
24245
|
-
var _authdetailsContext$
|
|
24246
|
-
if ((authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$
|
|
24247
|
-
var _authdetailsContext$
|
|
24248
|
-
window.open(authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$
|
|
24251
|
+
var _authdetailsContext$i6;
|
|
24252
|
+
if ((authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$i6 = authdetailsContext.instinfo) === null || _authdetailsContext$i6 === void 0 ? void 0 : _authdetailsContext$i6.facebooklink) != null) {
|
|
24253
|
+
var _authdetailsContext$i7;
|
|
24254
|
+
window.open(authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$i7 = authdetailsContext.instinfo) === null || _authdetailsContext$i7 === void 0 ? void 0 : _authdetailsContext$i7.facebooklink, '_blank');
|
|
24249
24255
|
}
|
|
24250
24256
|
}
|
|
24251
24257
|
}, /*#__PURE__*/React__default["default"].createElement(FaFacebookF.FaFacebookF, {
|
|
24252
24258
|
size: sectionproperties.facebkbtnniconfontsize
|
|
24253
|
-
})), sectionproperties.youtbtn_show == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24259
|
+
})), sectionproperties.youtbtn_show == 'Show' && (authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$i8 = authdetailsContext.instinfo) === null || _authdetailsContext$i8 === void 0 ? void 0 : _authdetailsContext$i8.whatsappnumber) != null && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24254
24260
|
"class": header_cssstyles.whatsappbtn + ' p-0 allcentered cursor-pointer ',
|
|
24255
24261
|
onClick: function onClick() {
|
|
24256
|
-
var _authdetailsContext$
|
|
24257
|
-
if ((authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$
|
|
24258
|
-
var _authdetailsContext$
|
|
24259
|
-
window.open('https://api.whatsapp.com/send?phone=' + (authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$
|
|
24262
|
+
var _authdetailsContext$i9;
|
|
24263
|
+
if ((authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$i9 = authdetailsContext.instinfo) === null || _authdetailsContext$i9 === void 0 ? void 0 : _authdetailsContext$i9.whatsappnumber) != null) {
|
|
24264
|
+
var _authdetailsContext$i10;
|
|
24265
|
+
window.open('https://api.whatsapp.com/send?phone=' + (authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$i10 = authdetailsContext.instinfo) === null || _authdetailsContext$i10 === void 0 ? void 0 : _authdetailsContext$i10.whatsappnumber), '_blank');
|
|
24260
24266
|
}
|
|
24261
24267
|
}
|
|
24262
24268
|
}, /*#__PURE__*/React__default["default"].createElement(FaWhatsapp.FaWhatsapp, {
|
|
24263
24269
|
size: sectionproperties.youtubebtniconfontsize
|
|
24264
|
-
})), sectionproperties.instbtn_show == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24270
|
+
})), sectionproperties.instbtn_show == 'Show' && (authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$i11 = authdetailsContext.instinfo) === null || _authdetailsContext$i11 === void 0 ? void 0 : _authdetailsContext$i11.instagramlink) && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24265
24271
|
"class": header_cssstyles.instagrambtn + ' p-0 allcentered cursor-pointer ',
|
|
24266
24272
|
onClick: function onClick() {
|
|
24267
|
-
var _authdetailsContext$
|
|
24268
|
-
if ((authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$
|
|
24269
|
-
var _authdetailsContext$
|
|
24270
|
-
window.open(authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$
|
|
24273
|
+
var _authdetailsContext$i12;
|
|
24274
|
+
if ((authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$i12 = authdetailsContext.instinfo) === null || _authdetailsContext$i12 === void 0 ? void 0 : _authdetailsContext$i12.instagramlink) != null) {
|
|
24275
|
+
var _authdetailsContext$i13;
|
|
24276
|
+
window.open(authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$i13 = authdetailsContext.instinfo) === null || _authdetailsContext$i13 === void 0 ? void 0 : _authdetailsContext$i13.instagramlink, '_blank');
|
|
24271
24277
|
}
|
|
24272
24278
|
}
|
|
24273
24279
|
}, /*#__PURE__*/React__default["default"].createElement(AiOutlineInstagram.AiOutlineInstagram, {
|
|
@@ -24388,7 +24394,7 @@
|
|
|
24388
24394
|
onClick: function onClick() {
|
|
24389
24395
|
routingcountext(StaticPagesLinksContext.accountinfo);
|
|
24390
24396
|
}
|
|
24391
|
-
}, authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$
|
|
24397
|
+
}, authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$i14 = authdetailsContext.instinfo) === null || _authdetailsContext$i14 === void 0 ? void 0 : (_authdetailsContext$i15 = _authdetailsContext$i14.customerinfo) === null || _authdetailsContext$i15 === void 0 ? void 0 : _authdetailsContext$i15.name))), /*#__PURE__*/React__default["default"].createElement(Dropdown__default["default"].Divider, null), /*#__PURE__*/React__default["default"].createElement(Dropdown__default["default"].Item, {
|
|
24392
24398
|
onClick: function onClick() {
|
|
24393
24399
|
routingcountext(StaticPagesLinksContext.Ordershistory);
|
|
24394
24400
|
}
|
|
@@ -24564,7 +24570,7 @@
|
|
|
24564
24570
|
minWidth: '250px',
|
|
24565
24571
|
marginLeft: '0px'
|
|
24566
24572
|
}
|
|
24567
|
-
}, authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$
|
|
24573
|
+
}, authdetailsContext === null || authdetailsContext === void 0 ? void 0 : (_authdetailsContext$i16 = authdetailsContext.instinfo) === null || _authdetailsContext$i16 === void 0 ? void 0 : (_authdetailsContext$i17 = _authdetailsContext$i16.instcollections) === null || _authdetailsContext$i17 === void 0 ? void 0 : _authdetailsContext$i17.map(function (item, index) {
|
|
24568
24574
|
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(Dropdown__default["default"].Item, {
|
|
24569
24575
|
onClick: function onClick() {
|
|
24570
24576
|
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, 'collections/' + item.collectionid);
|
|
@@ -34370,105 +34376,381 @@
|
|
|
34370
34376
|
function ownKeys$19(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
34371
34377
|
function _objectSpread$19(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$19(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$19(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
34372
34378
|
var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCards(props) {
|
|
34373
|
-
var
|
|
34374
|
-
_useInView.ref;
|
|
34375
|
-
var inView = _useInView.inView;
|
|
34379
|
+
var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
34376
34380
|
props.actions.lang;
|
|
34377
34381
|
var langdetect = props.actions.langdetect;
|
|
34378
|
-
var
|
|
34382
|
+
var fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
|
|
34383
|
+
var favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
|
|
34384
|
+
var routingcountext = props.actions.routingcountext;
|
|
34385
|
+
var StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
|
|
34386
|
+
var ProductFilterObjContext = props.actions.ProductFilterObjContext;
|
|
34387
|
+
var setProductFilterObjContext = props.actions.setProductFilterObjContext;
|
|
34379
34388
|
props.actions.TabexSectionsComponentsContext;
|
|
34380
|
-
var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
34381
|
-
var fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
|
|
34382
34389
|
var FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
|
|
34383
34390
|
var setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
|
|
34384
|
-
var
|
|
34385
|
-
var
|
|
34391
|
+
var fetchProductsQuery = props.actions.fetchProductsQuery;
|
|
34392
|
+
var fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
|
|
34393
|
+
var setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
|
|
34394
|
+
props.actions.ParentCollectionsForCollectionQueryArr;
|
|
34386
34395
|
var setfetchingtype = props.actions.setfetchingtype;
|
|
34387
34396
|
var fetchingtype = props.actions.fetchingtype;
|
|
34397
|
+
props.actions.addtofavoritescontext;
|
|
34398
|
+
var fetchAuthorizationQueryContext = props.actions.fetchAuthorizationQueryContext;
|
|
34399
|
+
var FetchVendorsQuery = props.actions.FetchVendorsQuery;
|
|
34388
34400
|
var ikimagecredcontext = props.actions.ikimagecredcontext;
|
|
34401
|
+
var _useState = React.useState(false),
|
|
34402
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2);
|
|
34403
|
+
_useState2[0];
|
|
34404
|
+
_useState2[1];
|
|
34389
34405
|
props.actions;
|
|
34390
|
-
var
|
|
34391
|
-
props.actions.ParentCollectionsForCollectionQueryArr;
|
|
34392
|
-
var _useState = React.useState(''),
|
|
34393
|
-
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
34394
|
-
sectionproperties = _useState2[0],
|
|
34395
|
-
setsectionproperties = _useState2[1];
|
|
34396
|
-
var _useState3 = React.useState([]),
|
|
34406
|
+
var _useState3 = React.useState(''),
|
|
34397
34407
|
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
34398
|
-
|
|
34399
|
-
|
|
34400
|
-
var _useState5 = React.useState(
|
|
34408
|
+
sectionproperties = _useState4[0],
|
|
34409
|
+
setsectionproperties = _useState4[1];
|
|
34410
|
+
var _useState5 = React.useState([]),
|
|
34411
|
+
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
34412
|
+
cardsarray = _useState6[0],
|
|
34413
|
+
setcardsarray = _useState6[1];
|
|
34414
|
+
var _useState7 = React.useState(''),
|
|
34415
|
+
_useState8 = _slicedToArray__default["default"](_useState7, 2),
|
|
34416
|
+
sectionitem = _useState8[0],
|
|
34417
|
+
setsectionitem = _useState8[1];
|
|
34418
|
+
var _useState9 = React.useState({
|
|
34401
34419
|
productfetchingtype: 'Random',
|
|
34402
|
-
collectionid: ''
|
|
34420
|
+
collectionid: '',
|
|
34421
|
+
grouptype: ''
|
|
34403
34422
|
}),
|
|
34404
|
-
|
|
34405
|
-
ProductsFetchingTypeSectionObj =
|
|
34406
|
-
setProductsFetchingTypeSectionObj =
|
|
34407
|
-
|
|
34408
|
-
|
|
34409
|
-
|
|
34410
|
-
|
|
34411
|
-
|
|
34423
|
+
_useState10 = _slicedToArray__default["default"](_useState9, 2),
|
|
34424
|
+
ProductsFetchingTypeSectionObj = _useState10[0],
|
|
34425
|
+
setProductsFetchingTypeSectionObj = _useState10[1];
|
|
34426
|
+
var _useState11 = React.useState([]),
|
|
34427
|
+
_useState12 = _slicedToArray__default["default"](_useState11, 2);
|
|
34428
|
+
_useState12[0];
|
|
34429
|
+
var setmaincontainerarrayofobjs = _useState12[1];
|
|
34430
|
+
// React.useEffect(() => {
|
|
34431
|
+
// if (inView) {
|
|
34432
|
+
// fetchProductsQuery.fetchNextPage();
|
|
34433
|
+
// }
|
|
34434
|
+
// }, [inView]);
|
|
34412
34435
|
React.useEffect(function () {
|
|
34436
|
+
var productfilerobjtemp = ProductFilterObjContext;
|
|
34437
|
+
if (props.filterparamsprops != undefined) {
|
|
34438
|
+
var filterpar = decodeURIComponent(props.filterparamsprops);
|
|
34439
|
+
var filterparsed = JSON.parse(filterpar);
|
|
34440
|
+
if (filterparsed != undefined) {
|
|
34441
|
+
productfilerobjtemp = filterparsed;
|
|
34442
|
+
setProductFilterObjContext(filterparsed);
|
|
34443
|
+
}
|
|
34444
|
+
}
|
|
34413
34445
|
StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
34414
34446
|
if (sectionitem.sectionid == props.sectionidprops) {
|
|
34415
34447
|
var secpropobj = {};
|
|
34448
|
+
setsectionitem(sectionitem);
|
|
34416
34449
|
sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
|
|
34417
34450
|
secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
|
|
34418
34451
|
});
|
|
34419
34452
|
setsectionproperties(_objectSpread$19({}, secpropobj));
|
|
34420
|
-
|
|
34421
|
-
|
|
34422
|
-
|
|
34423
|
-
|
|
34424
|
-
|
|
34453
|
+
if (props.srcfromprops == 'GeneralProductsComponent') {
|
|
34454
|
+
setfetchingtype('products');
|
|
34455
|
+
var lcproductfetchingtype = 'Random';
|
|
34456
|
+
if (productfilerobjtemp.ProductFetchingType != undefined && productfilerobjtemp.ProductFetchingType != null && productfilerobjtemp.ProductFetchingType.length != 0) {
|
|
34457
|
+
lcproductfetchingtype = productfilerobjtemp.ProductFetchingType;
|
|
34458
|
+
}
|
|
34459
|
+
setProductsFetchingTypeSectionObj({
|
|
34460
|
+
productfetchingtype: lcproductfetchingtype,
|
|
34461
|
+
collectionid: props.collectionidprops,
|
|
34462
|
+
grouptype: props.grouptypeprops,
|
|
34463
|
+
grouptyperefid: props.grouptyperefidprops
|
|
34464
|
+
});
|
|
34465
|
+
} else if (props.srcfromprops == 'InnerGroups' || props.srcfromprops == 'InnerCategory' || props.srcfromprops == 'InnerParentCollection') {
|
|
34466
|
+
setfetchingtype(props.grouptypeprops);
|
|
34467
|
+
} else {
|
|
34468
|
+
setfetchingtype(sectionitem.fetchingtype);
|
|
34469
|
+
setProductsFetchingTypeSectionObj({
|
|
34470
|
+
productfetchingtype: sectionitem.productsfetchingtype,
|
|
34471
|
+
collectionid: sectionitem.productsfetchingtypeCollectioncollectionid,
|
|
34472
|
+
grouptype: props.grouptypeprops,
|
|
34473
|
+
grouptyperefid: props.grouptyperefidprops
|
|
34474
|
+
});
|
|
34475
|
+
}
|
|
34425
34476
|
}
|
|
34426
34477
|
});
|
|
34427
34478
|
}, [StatePagePropertiesContext]);
|
|
34428
34479
|
React.useEffect(function () {
|
|
34429
34480
|
if (sectionproperties.length != 0) {
|
|
34430
34481
|
if (cardsarray.length == 0) {
|
|
34431
|
-
if (
|
|
34432
|
-
|
|
34482
|
+
if (fetchingtype == 'collections') {
|
|
34483
|
+
if (fetchcollectionsQueryContext.isSuccess) {
|
|
34484
|
+
cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
|
|
34485
|
+
}
|
|
34486
|
+
} else if (fetchingtype == 'products') {
|
|
34487
|
+
if (fetchProductsQuery.isSuccess) {
|
|
34488
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
34489
|
+
var allpagesarr = [];
|
|
34490
|
+
// fetchProductsQuery.data.pages.forEach((page) => {
|
|
34491
|
+
// page.data.products.forEach((productobj) => {
|
|
34492
|
+
// allpagesarr.push(productobj);
|
|
34493
|
+
// });
|
|
34494
|
+
// });
|
|
34495
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
34496
|
+
allpagesarr.push(item);
|
|
34497
|
+
});
|
|
34498
|
+
cardobjassigner(allpagesarr);
|
|
34499
|
+
}
|
|
34500
|
+
} else if (fetchingtype == 'vendors') {
|
|
34501
|
+
if (FetchVendorsQuery.isSuccess) {
|
|
34502
|
+
var _FetchVendorsQuery$da, _FetchVendorsQuery$da2;
|
|
34503
|
+
cardobjassigner(FetchVendorsQuery === null || FetchVendorsQuery === void 0 ? void 0 : (_FetchVendorsQuery$da = FetchVendorsQuery.data) === null || _FetchVendorsQuery$da === void 0 ? void 0 : (_FetchVendorsQuery$da2 = _FetchVendorsQuery$da.data) === null || _FetchVendorsQuery$da2 === void 0 ? void 0 : _FetchVendorsQuery$da2.vendors);
|
|
34504
|
+
}
|
|
34433
34505
|
}
|
|
34434
34506
|
}
|
|
34435
34507
|
}
|
|
34436
34508
|
}, [sectionproperties]);
|
|
34437
34509
|
React.useEffect(function () {
|
|
34438
|
-
if (fetchingtype.length != 0) {
|
|
34510
|
+
if ((fetchingtype === null || fetchingtype === void 0 ? void 0 : fetchingtype.length) != 0) {
|
|
34439
34511
|
var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
|
|
34440
|
-
if (
|
|
34441
|
-
|
|
34442
|
-
|
|
34443
|
-
|
|
34512
|
+
if (fetchingtype == 'collections') {
|
|
34513
|
+
if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
|
|
34514
|
+
setParentCollectionsForCollectionQueryArr('all');
|
|
34515
|
+
} else {
|
|
34516
|
+
setParentCollectionsForCollectionQueryArr([ProductsFetchingTypeSectionObj.collectionid]);
|
|
34517
|
+
}
|
|
34518
|
+
}
|
|
34519
|
+
if (fetchingtype == 'products') {
|
|
34520
|
+
var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
34521
|
+
tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
|
|
34522
|
+
if (ProductsFetchingTypeSectionObj.grouptype == 'collections' || ProductsFetchingTypeSectionObj.grouptype == 'categories' || ProductsFetchingTypeSectionObj.grouptype == 'parentcollections') ; else {
|
|
34523
|
+
if (tempfetchproductsfilerobjcontext.collections != undefined) {
|
|
34524
|
+
tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
|
|
34525
|
+
}
|
|
34526
|
+
}
|
|
34527
|
+
tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
|
|
34528
|
+
tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
34529
|
+
setProductFilterObjContext(_objectSpread$19({}, tempfetchproductsfilerobjcontext));
|
|
34530
|
+
}
|
|
34531
|
+
if (fetchingtype == 'categories') {
|
|
34532
|
+
if (fetchAuthorizationQueryContext !== null && fetchAuthorizationQueryContext !== void 0 && fetchAuthorizationQueryContext.isSuccess) {
|
|
34533
|
+
var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
|
|
34534
|
+
cardobjassigner(categories);
|
|
34535
|
+
}
|
|
34536
|
+
}
|
|
34537
|
+
if (fetchingtype == 'parentcollections' || fetchingtype == 'innercategories') {
|
|
34538
|
+
if (fetchAuthorizationQueryContext !== null && fetchAuthorizationQueryContext !== void 0 && fetchAuthorizationQueryContext.isSuccess) {
|
|
34539
|
+
var _categories;
|
|
34540
|
+
var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
|
|
34541
|
+
var parentcollections = [];
|
|
34542
|
+
(_categories = categories) === null || _categories === void 0 ? void 0 : _categories.forEach(function (catitem, catindex) {
|
|
34543
|
+
catitem === null || catitem === void 0 ? void 0 : catitem.parentcolletions.forEach(function (parentcolitem) {
|
|
34544
|
+
parentcolitem.categoryid = catitem.categoryid;
|
|
34545
|
+
parentcollections.push(parentcolitem);
|
|
34546
|
+
});
|
|
34547
|
+
});
|
|
34548
|
+
if (fetchingtype == 'parentcollections') {
|
|
34549
|
+
if ((sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != null && (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != undefined && (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != 'all') {
|
|
34550
|
+
var arrafterfilter = [];
|
|
34551
|
+
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
34552
|
+
if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
|
|
34553
|
+
arrafterfilter.push(parentcolitem);
|
|
34554
|
+
}
|
|
34555
|
+
});
|
|
34556
|
+
parentcollections = arrafterfilter;
|
|
34557
|
+
}
|
|
34558
|
+
}
|
|
34559
|
+
if (fetchingtype == 'innercategories') {
|
|
34560
|
+
var arrafterfilter = [];
|
|
34561
|
+
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
34562
|
+
if (parentcolitem.categoryid == props.collectionidprops) {
|
|
34563
|
+
arrafterfilter.push(parentcolitem);
|
|
34564
|
+
}
|
|
34565
|
+
});
|
|
34566
|
+
parentcollections = arrafterfilter;
|
|
34567
|
+
}
|
|
34568
|
+
cardobjassigner(parentcollections);
|
|
34569
|
+
}
|
|
34570
|
+
} else if (fetchingtype == 'innerparentcollections') {
|
|
34571
|
+
if (fetchAuthorizationQueryContext !== null && fetchAuthorizationQueryContext !== void 0 && fetchAuthorizationQueryContext.isSuccess) {
|
|
34572
|
+
var _categories2;
|
|
34573
|
+
var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
|
|
34574
|
+
var collections = [];
|
|
34575
|
+
(_categories2 = categories) === null || _categories2 === void 0 ? void 0 : _categories2.forEach(function (catitem, catindex) {
|
|
34576
|
+
catitem === null || catitem === void 0 ? void 0 : catitem.parentcolletions.forEach(function (parentcolitem) {
|
|
34577
|
+
var _parentcolitem$collec;
|
|
34578
|
+
parentcolitem.categoryid = catitem.categoryid;
|
|
34579
|
+
parentcolitem === null || parentcolitem === void 0 ? void 0 : (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 ? void 0 : _parentcolitem$collec.forEach(function (collitem, colindex) {
|
|
34580
|
+
collitem.parentcollectionid = parentcolitem.parentcollectionid;
|
|
34581
|
+
collections.push(collitem);
|
|
34582
|
+
});
|
|
34583
|
+
});
|
|
34584
|
+
});
|
|
34585
|
+
if (fetchingtype == 'innerparentcollections') {
|
|
34586
|
+
var collectionsafterfilter = [];
|
|
34587
|
+
collections.forEach(function (colitem, colindex) {
|
|
34588
|
+
if (colitem.parentcollectionid == props.collectionidprops) {
|
|
34589
|
+
var iscollexists = false;
|
|
34590
|
+
collectionsafterfilter.forEach(function (existcolitem) {
|
|
34591
|
+
if (colitem.collectionid == existcolitem.collectionid) {
|
|
34592
|
+
iscollexists = true;
|
|
34593
|
+
}
|
|
34594
|
+
});
|
|
34595
|
+
if (iscollexists == false) {
|
|
34596
|
+
collectionsafterfilter.push(colitem);
|
|
34597
|
+
}
|
|
34598
|
+
}
|
|
34599
|
+
});
|
|
34600
|
+
collections = collectionsafterfilter;
|
|
34601
|
+
}
|
|
34602
|
+
cardobjassigner(collections);
|
|
34603
|
+
}
|
|
34444
34604
|
}
|
|
34445
34605
|
setFetchQueriesEngineContext(_objectSpread$19({}, tempFetchQueriesEngineContext));
|
|
34446
34606
|
}
|
|
34447
34607
|
}, [fetchingtype, ProductsFetchingTypeSectionObj]);
|
|
34448
34608
|
React.useEffect(function () {
|
|
34449
|
-
if (
|
|
34450
|
-
|
|
34609
|
+
if (fetchingtype == 'products') {
|
|
34610
|
+
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
34611
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
34612
|
+
var allpagesarr = [];
|
|
34613
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
34614
|
+
allpagesarr.push(item);
|
|
34615
|
+
});
|
|
34616
|
+
cardobjassigner(allpagesarr);
|
|
34617
|
+
}
|
|
34451
34618
|
}
|
|
34452
|
-
}, [
|
|
34619
|
+
}, [fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : fetchProductsQuery.isSuccess, fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : fetchProductsQuery.dataUpdatedAt, fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : fetchProductsQuery.data, fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 ? void 0 : fetchcustomercartQueryContext.dataUpdatedAt]);
|
|
34620
|
+
React.useEffect(function () {
|
|
34621
|
+
if (fetchingtype == 'collections') {
|
|
34622
|
+
if (fetchcollectionsQueryContext.isSuccess) {
|
|
34623
|
+
cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
|
|
34624
|
+
}
|
|
34625
|
+
}
|
|
34626
|
+
}, [fetchcollectionsQueryContext === null || fetchcollectionsQueryContext === void 0 ? void 0 : fetchcollectionsQueryContext.isSuccess]);
|
|
34627
|
+
React.useEffect(function () {
|
|
34628
|
+
if (fetchingtype == 'vendors') {
|
|
34629
|
+
if (FetchVendorsQuery.isSuccess) {
|
|
34630
|
+
if (FetchVendorsQuery.data.data.vendors != undefined && FetchVendorsQuery.data.data.vendors.length != 0) {
|
|
34631
|
+
var _FetchVendorsQuery$da3, _FetchVendorsQuery$da4;
|
|
34632
|
+
cardobjassigner(FetchVendorsQuery === null || FetchVendorsQuery === void 0 ? void 0 : (_FetchVendorsQuery$da3 = FetchVendorsQuery.data) === null || _FetchVendorsQuery$da3 === void 0 ? void 0 : (_FetchVendorsQuery$da4 = _FetchVendorsQuery$da3.data) === null || _FetchVendorsQuery$da4 === void 0 ? void 0 : _FetchVendorsQuery$da4.vendors);
|
|
34633
|
+
}
|
|
34634
|
+
}
|
|
34635
|
+
}
|
|
34636
|
+
}, [FetchVendorsQuery.isSuccess]);
|
|
34637
|
+
React.useEffect(function () {
|
|
34638
|
+
favassigner();
|
|
34639
|
+
}, [favoriteprojectscountContext]);
|
|
34640
|
+
React.useEffect(function () {
|
|
34641
|
+
if (sectionproperties.length != 0 && sectionproperties.maincontainerarrayofobjs != undefined) {
|
|
34642
|
+
var maincontainerarrayofobjsparsed = JSON.parse(sectionproperties.maincontainerarrayofobjs);
|
|
34643
|
+
if (Array.isArray(maincontainerarrayofobjsparsed)) {
|
|
34644
|
+
setmaincontainerarrayofobjs(_toConsumableArray__default["default"](maincontainerarrayofobjsparsed));
|
|
34645
|
+
}
|
|
34646
|
+
}
|
|
34647
|
+
}, [sectionproperties]);
|
|
34648
|
+
var favassigner = function favassigner() {
|
|
34649
|
+
if (fetchingtype == 'products') {
|
|
34650
|
+
if (cardsarray.length != 0) {
|
|
34651
|
+
if (favoriteprojectscountContext != undefined && Array.isArray(favoriteprojectscountContext)) {
|
|
34652
|
+
var tempcardsarray = _toConsumableArray__default["default"](cardsarray);
|
|
34653
|
+
tempcardsarray.forEach(function (arrayItem, arrayindex) {
|
|
34654
|
+
arrayItem.IsFavExists = false;
|
|
34655
|
+
});
|
|
34656
|
+
tempcardsarray.forEach(function (arrayItem, arrayindex) {
|
|
34657
|
+
favoriteprojectscountContext.forEach(function (favitem, favindex) {
|
|
34658
|
+
if (arrayItem.productid == favitem) {
|
|
34659
|
+
arrayItem.IsFavExists = true;
|
|
34660
|
+
}
|
|
34661
|
+
});
|
|
34662
|
+
});
|
|
34663
|
+
setcardsarray(_toConsumableArray__default["default"](tempcardsarray));
|
|
34664
|
+
}
|
|
34665
|
+
}
|
|
34666
|
+
}
|
|
34667
|
+
};
|
|
34453
34668
|
var cardobjassigner = function cardobjassigner(fetchedarray) {
|
|
34454
34669
|
var temparray = [];
|
|
34455
34670
|
fetchedarray.forEach(function (arrayItem, arrayindex) {
|
|
34456
34671
|
var cardobj = {
|
|
34457
34672
|
name: '',
|
|
34458
|
-
image: ''
|
|
34459
|
-
index: arrayindex,
|
|
34460
|
-
collectionid: ''
|
|
34673
|
+
image: ''
|
|
34461
34674
|
};
|
|
34462
|
-
|
|
34463
|
-
|
|
34464
|
-
|
|
34465
|
-
|
|
34466
|
-
|
|
34467
|
-
|
|
34468
|
-
|
|
34675
|
+
if (fetchingtype == 'products') {
|
|
34676
|
+
var itemquantity = 0;
|
|
34677
|
+
if (langdetect == 'en') {
|
|
34678
|
+
cardobj.name = arrayItem.productinfo.name_en;
|
|
34679
|
+
} else {
|
|
34680
|
+
cardobj.name = arrayItem.productinfo.name_ar;
|
|
34681
|
+
}
|
|
34682
|
+
if (langdetect == 'en') {
|
|
34683
|
+
cardobj.description = arrayItem.productinfo.description_en;
|
|
34684
|
+
} else {
|
|
34685
|
+
cardobj.description = arrayItem.productinfo.description_ar;
|
|
34686
|
+
}
|
|
34687
|
+
if (arrayItem.productinfo.hasvariants == 0) {
|
|
34688
|
+
fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
|
|
34689
|
+
if (cartitem.productid == arrayItem.productinfo.productid) {
|
|
34690
|
+
itemquantity = cartitem.quantity;
|
|
34691
|
+
}
|
|
34692
|
+
});
|
|
34693
|
+
}
|
|
34694
|
+
cardobj.image = arrayItem.productinfo.productmainimage;
|
|
34695
|
+
cardobj.hassale = arrayItem.productinfo.hassale;
|
|
34696
|
+
cardobj.productid = arrayItem.productinfo.productid;
|
|
34697
|
+
cardobj.hasvariants = arrayItem.productinfo.hasvariants;
|
|
34698
|
+
cardobj.description_en = arrayItem.productinfo.description_en;
|
|
34699
|
+
cardobj.description_ar = arrayItem.productinfo.description_ar;
|
|
34700
|
+
cardobj.defaultprice = arrayItem.productinfo.defaultprice;
|
|
34701
|
+
cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
|
|
34702
|
+
cardobj.productimages = arrayItem.productinfo.productimages;
|
|
34703
|
+
cardobj.quantity = itemquantity;
|
|
34704
|
+
cardobj.timestamp = arrayItem.productinfo.timestamp;
|
|
34705
|
+
cardobj.productquantity = arrayItem.productinfo.productquantity;
|
|
34706
|
+
cardobj.quantavailtype = arrayItem.productinfo.quantavailtype;
|
|
34707
|
+
if (langdetect == 'en') {
|
|
34708
|
+
cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_en;
|
|
34709
|
+
} else {
|
|
34710
|
+
cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_ar;
|
|
34711
|
+
}
|
|
34712
|
+
if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
|
|
34713
|
+
favoriteprojectscountContext.forEach(function (favitem, favindex) {
|
|
34714
|
+
if (arrayItem.productinfo.productid == favitem) {
|
|
34715
|
+
cardobj.IsFavExists = true;
|
|
34716
|
+
}
|
|
34717
|
+
});
|
|
34718
|
+
}
|
|
34719
|
+
} else if (fetchingtype == 'collections' || fetchingtype == 'innerparentcollections') {
|
|
34720
|
+
cardobj.collectionid = arrayItem.collectionid;
|
|
34721
|
+
if (langdetect == 'en') {
|
|
34722
|
+
cardobj.name = arrayItem.title_en;
|
|
34723
|
+
cardobj.description = arrayItem.description_en;
|
|
34724
|
+
} else if (langdetect == 'ar') {
|
|
34725
|
+
cardobj.name = arrayItem.title_ar;
|
|
34726
|
+
cardobj.description = arrayItem.description_ar;
|
|
34727
|
+
}
|
|
34728
|
+
cardobj.image = arrayItem.collectionlogo;
|
|
34729
|
+
} else if (fetchingtype == 'categories') {
|
|
34730
|
+
cardobj.collectionid = arrayItem.categoryid;
|
|
34731
|
+
if (langdetect == 'en') {
|
|
34732
|
+
cardobj.name = arrayItem.title_en;
|
|
34733
|
+
cardobj.description = arrayItem.description_en;
|
|
34734
|
+
} else if (langdetect == 'ar') {
|
|
34735
|
+
cardobj.name = arrayItem.title_ar;
|
|
34736
|
+
cardobj.description = arrayItem.description_ar;
|
|
34737
|
+
}
|
|
34738
|
+
cardobj.image = arrayItem.categorylogo;
|
|
34739
|
+
} else if (fetchingtype == 'parentcollections' || fetchingtype == 'innercategories') {
|
|
34740
|
+
cardobj.collectionid = arrayItem.parentcollectionid;
|
|
34741
|
+
if (langdetect == 'en') {
|
|
34742
|
+
cardobj.name = arrayItem.title_en;
|
|
34743
|
+
cardobj.description = arrayItem.description_en;
|
|
34744
|
+
} else if (langdetect == 'ar') {
|
|
34745
|
+
cardobj.name = arrayItem.title_ar;
|
|
34746
|
+
cardobj.description = arrayItem.description_ar;
|
|
34747
|
+
}
|
|
34748
|
+
cardobj.image = arrayItem.parentcollectionlogo;
|
|
34749
|
+
} else if (fetchingtype == 'custom') ; else if (fetchingtype == 'vendors') {
|
|
34750
|
+
cardobj.name = arrayItem.vendorname;
|
|
34751
|
+
cardobj.collectionid = arrayItem.vendorid;
|
|
34752
|
+
cardobj.image = arrayItem.vendorlogourl;
|
|
34469
34753
|
}
|
|
34470
|
-
cardobj.image = arrayItem.collectionlogo;
|
|
34471
|
-
cardobj.collectionid = arrayItem.collectionid;
|
|
34472
34754
|
temparray.push(cardobj);
|
|
34473
34755
|
});
|
|
34474
34756
|
setcardsarray([].concat(temparray));
|
|
@@ -40293,19 +40575,19 @@
|
|
|
40293
40575
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
40294
40576
|
"class": sectionproperties.image_height == 0 ? 'col-lg-6 col-md-12 d-flex justify-content-start justify-content-md-center h-auto p-0' : 'col-lg-6 col-md-12 d-flex justify-content-start justify-content-md-center p-0',
|
|
40295
40577
|
style: {
|
|
40296
|
-
cursor: ((_imagesarray$ = imagesarray[0]) === null || _imagesarray$ === void 0 ? void 0 : _imagesarray$.
|
|
40578
|
+
cursor: ((_imagesarray$ = imagesarray[0]) === null || _imagesarray$ === void 0 ? void 0 : _imagesarray$.IsClickableimg) == 'Yes' ? 'pointer' : 'default',
|
|
40297
40579
|
background: sectionproperties.image_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.image_bgcolor
|
|
40298
40580
|
},
|
|
40299
40581
|
onClick: function onClick() {
|
|
40300
40582
|
var _imagesarray$2;
|
|
40301
|
-
if (((_imagesarray$2 = imagesarray[0]) === null || _imagesarray$2 === void 0 ? void 0 : _imagesarray$2.
|
|
40583
|
+
if (((_imagesarray$2 = imagesarray[0]) === null || _imagesarray$2 === void 0 ? void 0 : _imagesarray$2.IsClickableimg) == 'Yes') {
|
|
40302
40584
|
var _imagesarray$3, _imagesarray$4;
|
|
40303
|
-
if ((_imagesarray$3 = imagesarray[0]) !== null && _imagesarray$3 !== void 0 && _imagesarray$3.
|
|
40585
|
+
if ((_imagesarray$3 = imagesarray[0]) !== null && _imagesarray$3 !== void 0 && _imagesarray$3.clickableimg_page_route && ((_imagesarray$4 = imagesarray[0]) === null || _imagesarray$4 === void 0 ? void 0 : _imagesarray$4.clickableimg_page_route.length) != 0) {
|
|
40304
40586
|
var _imagesarray$5;
|
|
40305
|
-
routingcountext((_imagesarray$5 = imagesarray[0]) === null || _imagesarray$5 === void 0 ? void 0 : _imagesarray$5.
|
|
40587
|
+
routingcountext((_imagesarray$5 = imagesarray[0]) === null || _imagesarray$5 === void 0 ? void 0 : _imagesarray$5.clickableimg_page_route, false, '');
|
|
40306
40588
|
} else {
|
|
40307
40589
|
var _imagesarray$6;
|
|
40308
|
-
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, 'collections/' + ((_imagesarray$6 = imagesarray[0]) === null || _imagesarray$6 === void 0 ? void 0 : _imagesarray$6.
|
|
40590
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, 'collections/' + ((_imagesarray$6 = imagesarray[0]) === null || _imagesarray$6 === void 0 ? void 0 : _imagesarray$6.Clickableimg_getcoection));
|
|
40309
40591
|
}
|
|
40310
40592
|
}
|
|
40311
40593
|
}
|
|
@@ -47496,7 +47778,6 @@
|
|
|
47496
47778
|
borderRadius: sectionproperties.fav_btn_borderBottomLeftRadius + 'px',
|
|
47497
47779
|
color: sectionproperties.favBtniconcolor,
|
|
47498
47780
|
fontSize: sectionproperties.favBtnTextfontsize + 'px',
|
|
47499
|
-
textTransform: sectionproperties.favBtnTexttransform,
|
|
47500
47781
|
fontWeight: sectionproperties.favBtnTextfontweight,
|
|
47501
47782
|
transition: '.3s',
|
|
47502
47783
|
border: sectionproperties.favbtnborderwidth + 'px solid ' + sectionproperties.favbtnbordercolor,
|
|
@@ -47528,7 +47809,8 @@
|
|
|
47528
47809
|
borderBottomRightRadius: langdetect == 'en' ? sectionproperties.image_borderBottomRightRadius + 'px' : sectionproperties.image_borderBottomLeftRadius + 'px',
|
|
47529
47810
|
borderTopLeftRadius: langdetect == 'en' ? sectionproperties.image_bordertopleftradius + 'px' : sectionproperties.image_bordertoprightradius + 'px',
|
|
47530
47811
|
borderTopRightRadius: langdetect == 'en' ? sectionproperties.image_bordertoprightradius + 'px' : sectionproperties.image_bordertopleftradius + 'px',
|
|
47531
|
-
background: sectionproperties.image_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.image_bgcolor
|
|
47812
|
+
background: sectionproperties.image_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.image_bgcolor,
|
|
47813
|
+
opacity: item.productquantity < 1 && sectionproperties.showoutofstock == 'Show' && item.quantavailtype == 'limit' ? 0.4 : 1
|
|
47532
47814
|
}),
|
|
47533
47815
|
quantitybtn: glamor.css({
|
|
47534
47816
|
flex: 1,
|
|
@@ -47583,6 +47865,21 @@
|
|
|
47583
47865
|
color: sectionproperties.remove_quantitybtn_textcoloronhover,
|
|
47584
47866
|
background: sectionproperties.remove_quantitybtn_bgcoloronhover
|
|
47585
47867
|
}
|
|
47868
|
+
}),
|
|
47869
|
+
outstockbadge: glamor.css({
|
|
47870
|
+
width: sectionproperties.outstock_width + 'px',
|
|
47871
|
+
height: sectionproperties.outstock_height + 'px',
|
|
47872
|
+
background: sectionproperties.outstock_bg,
|
|
47873
|
+
color: sectionproperties.outstock_color,
|
|
47874
|
+
fontSize: sectionproperties.outstock_fontSize + 'px',
|
|
47875
|
+
borderRadius: sectionproperties.outstock_borderradius + 'px',
|
|
47876
|
+
position: 'absolute',
|
|
47877
|
+
zIndex: 2,
|
|
47878
|
+
top: 0,
|
|
47879
|
+
bottom: 0,
|
|
47880
|
+
left: 0,
|
|
47881
|
+
right: 0,
|
|
47882
|
+
margin: 'auto'
|
|
47586
47883
|
})
|
|
47587
47884
|
};
|
|
47588
47885
|
var addtocartbuttonrender = function addtocartbuttonrender() {
|
|
@@ -47642,7 +47939,7 @@
|
|
|
47642
47939
|
size: sectionproperties.cartBtn_iconFontSize
|
|
47643
47940
|
}), sectionproperties.carticonstyle == 'Shopping cart 2' && /*#__PURE__*/React__default["default"].createElement(MdAddShoppingCart.MdAddShoppingCart, {
|
|
47644
47941
|
size: sectionproperties.cartBtn_iconFontSize
|
|
47645
|
-
})),
|
|
47942
|
+
})), langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic);
|
|
47646
47943
|
}
|
|
47647
47944
|
};
|
|
47648
47945
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -47658,7 +47955,10 @@
|
|
|
47658
47955
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
47659
47956
|
"class": "".concat(cardsstyles$4.card_inner)
|
|
47660
47957
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
47661
|
-
"class": "".concat(cardsstyles$4.card_thumbnail)
|
|
47958
|
+
"class": "".concat(cardsstyles$4.card_thumbnail),
|
|
47959
|
+
style: {
|
|
47960
|
+
position: 'relative'
|
|
47961
|
+
}
|
|
47662
47962
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
47663
47963
|
"class": "".concat(cardsstyles$4.img_container, " ").concat(cardsstyles2.img_container) + ' w-100 allcentered ',
|
|
47664
47964
|
onClick: function onClick() {
|
|
@@ -47732,7 +48032,11 @@
|
|
|
47732
48032
|
color: sectionproperties.badge_color,
|
|
47733
48033
|
fontSize: sectionproperties.badge_fontsize + 'px'
|
|
47734
48034
|
}
|
|
47735
|
-
}, langdetect == 'en' ? sectionproperties.badgeContentEn : sectionproperties.badgeContentAr))
|
|
48035
|
+
}, langdetect == 'en' ? sectionproperties.badgeContentEn : sectionproperties.badgeContentAr)), item.productquantity < 1 && sectionproperties.showoutofstock == 'Show' && item.quantavailtype == 'limit' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
48036
|
+
"class": "".concat(cardsstyles2.outstockbadge) + ' allcentered '
|
|
48037
|
+
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
48038
|
+
"class": "m-0 p-0"
|
|
48039
|
+
}, langdetect == 'en' ? sectionproperties.outstock_contenten : sectionproperties.outstock_contentar))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
47736
48040
|
"class": "".concat(cardsstyles$4.product_details) + ' mb-2 '
|
|
47737
48041
|
}, sectionproperties.prodNameShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
47738
48042
|
"class": "col-lg-12"
|
|
@@ -47768,7 +48072,9 @@
|
|
|
47768
48072
|
transform: ' rotate(-180deg)'
|
|
47769
48073
|
},
|
|
47770
48074
|
onClick: function onClick() {
|
|
47771
|
-
if (item.
|
|
48075
|
+
if (item.productquantity < 1 && sectionproperties.showoutofstock == 'Show' && item.quantavailtype == 'limit') {
|
|
48076
|
+
NotificationManager.warning('', langdetect == 'en' ? 'Sold Out' : 'نفذت الكمية');
|
|
48077
|
+
} else if (item.hasvariants == 0) {
|
|
47772
48078
|
updatequantity('remove');
|
|
47773
48079
|
} else {
|
|
47774
48080
|
setShowProductInfoModalContext(true);
|
|
@@ -47780,7 +48086,9 @@
|
|
|
47780
48086
|
})), langdetect == 'ar' && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
47781
48087
|
"class": "".concat(cardsstyles2.add_quantitybtn_icon_container) + ' m-1 ',
|
|
47782
48088
|
onClick: function onClick() {
|
|
47783
|
-
if (item.
|
|
48089
|
+
if (item.productquantity < 1 && sectionproperties.showoutofstock == 'Show' && item.quantavailtype == 'limit') {
|
|
48090
|
+
NotificationManager.warning('', langdetect == 'en' ? 'Sold Out' : 'نفذت الكمية');
|
|
48091
|
+
} else if (item.hasvariants == 0) {
|
|
47784
48092
|
updatequantity('add');
|
|
47785
48093
|
} else {
|
|
47786
48094
|
setShowProductInfoModalContext(true);
|
|
@@ -47797,7 +48105,9 @@
|
|
|
47797
48105
|
transform: ' rotate(-180deg)'
|
|
47798
48106
|
},
|
|
47799
48107
|
onClick: function onClick() {
|
|
47800
|
-
if (item.
|
|
48108
|
+
if (item.productquantity < 1 && sectionproperties.showoutofstock == 'Show' && item.quantavailtype == 'limit') {
|
|
48109
|
+
NotificationManager.warning('', langdetect == 'en' ? 'Sold Out' : 'نفذت الكمية');
|
|
48110
|
+
} else if (item.hasvariants == 0) {
|
|
47801
48111
|
updatequantity('remove');
|
|
47802
48112
|
} else {
|
|
47803
48113
|
setShowProductInfoModalContext(true);
|
|
@@ -47809,7 +48119,9 @@
|
|
|
47809
48119
|
})), langdetect == 'en' && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
47810
48120
|
"class": "".concat(cardsstyles2.add_quantitybtn_icon_container) + ' m-1 ',
|
|
47811
48121
|
onClick: function onClick() {
|
|
47812
|
-
if (item.
|
|
48122
|
+
if (item.productquantity < 1 && sectionproperties.showoutofstock == 'Show' && item.quantavailtype == 'limit') {
|
|
48123
|
+
NotificationManager.warning('', langdetect == 'en' ? 'Sold Out' : 'نفذت الكمية');
|
|
48124
|
+
} else if (item.hasvariants == 0) {
|
|
47813
48125
|
updatequantity('add');
|
|
47814
48126
|
} else {
|
|
47815
48127
|
setShowProductInfoModalContext(true);
|
|
@@ -51983,8 +52295,8 @@
|
|
|
51983
52295
|
path: '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_w + '/' + item.image,
|
|
51984
52296
|
loading: "lazy",
|
|
51985
52297
|
style: {
|
|
51986
|
-
width: '
|
|
51987
|
-
height: '
|
|
52298
|
+
width: sectionproperties.imageInnerWidth_Height + '%',
|
|
52299
|
+
height: sectionproperties.imageInnerWidth_Height + '%',
|
|
51988
52300
|
objectFit: sectionproperties.bgcovercontain == 'Cover' ? 'cover' : 'contain',
|
|
51989
52301
|
background: sectionproperties.image_bgcolortransparent == 'Transparent' ? '' : sectionproperties.image_bgcolor,
|
|
51990
52302
|
border: sectionproperties.image_borderwidth + 'px solid ' + sectionproperties.image_bordercolor,
|
|
@@ -53805,7 +54117,7 @@
|
|
|
53805
54117
|
borderTopLeftRadius: langdetect == 'en' ? sectionproperties.image_bordertopleftradius + 'px' : sectionproperties.image_bordertoprightradius + 'px',
|
|
53806
54118
|
borderTopRightRadius: langdetect == 'en' ? sectionproperties.image_bordertoprightradius + 'px' : sectionproperties.image_bordertopleftradius + 'px',
|
|
53807
54119
|
transition: '.3s',
|
|
53808
|
-
opacity: item.productquantity < 1 ? 0.4 : 1
|
|
54120
|
+
opacity: item.productquantity < 1 && sectionproperties.showoutofstock == 'Show' && item.quantavailtype == 'limit' ? 0.4 : 1
|
|
53809
54121
|
}),
|
|
53810
54122
|
productNameStyles: glamor.css({
|
|
53811
54123
|
color: sectionproperties.prodNameColor,
|
|
@@ -53997,7 +54309,7 @@
|
|
|
53997
54309
|
height: sectionproperties.imageInnerWidth_Height + '%',
|
|
53998
54310
|
objectFit: sectionproperties.bgcovercontain == 'Cover' ? 'cover' : 'contain'
|
|
53999
54311
|
}
|
|
54000
|
-
})), item.productquantity < 1 && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
54312
|
+
})), item.productquantity < 1 && sectionproperties.showoutofstock == 'Show' && item.quantavailtype == 'limit' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
54001
54313
|
"class": "".concat(card_cssstyles.outstockbadge) + ' allcentered '
|
|
54002
54314
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
54003
54315
|
"class": "m-0 p-0"
|
|
@@ -54030,7 +54342,7 @@
|
|
|
54030
54342
|
}, langdetect == 'en' ? 'EGP' : '', " ", item.defaultprice, " ", langdetect == 'en' ? '' : 'ج.م'))))), sectionproperties.cartBtnShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
54031
54343
|
"class": "".concat(card_cssstyles.cart_btn) + ' m-0 p-0 d-flex align-items-center justify-content-center mt-1 ',
|
|
54032
54344
|
onClick: function onClick() {
|
|
54033
|
-
if (item.productquantity
|
|
54345
|
+
if (item.productquantity < 1 && sectionproperties.showoutofstock == 'Show' && item.quantavailtype == 'limit') {
|
|
54034
54346
|
setShowProductInfoModalContext(true);
|
|
54035
54347
|
setProductIdProdutInfoModalContext(item.productid);
|
|
54036
54348
|
} else {
|