tabexseriescomponents 0.0.473 → 0.0.475

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.esm.js CHANGED
@@ -46671,6 +46671,7 @@ var CardsSection2 = function CardsSection2(props) {
46671
46671
  cardobj.productfeature = arrayItem === null || arrayItem === void 0 || (_arrayItem$features2 = arrayItem.features) === null || _arrayItem$features2 === void 0 ? void 0 : _arrayItem$features2.value_ar;
46672
46672
  }
46673
46673
  cardobj.productfeatureid = arrayItem === null || arrayItem === void 0 || (_arrayItem$features3 = arrayItem.features) === null || _arrayItem$features3 === void 0 ? void 0 : _arrayItem$features3.featureid;
46674
+ cardobj.productendpointurl = arrayItem.productinfo.productendpointurl;
46674
46675
  cardobj.hassale = arrayItem.productinfo.hassale;
46675
46676
  cardobj.productid = arrayItem.productinfo.productid;
46676
46677
  cardobj.hasvariants = arrayItem.productinfo.hasvariants;
@@ -47102,6 +47103,7 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
47102
47103
  image: ''
47103
47104
  };
47104
47105
  if (fetchingtype == 'products') {
47106
+ var _arrayItem$features3;
47105
47107
  var itemquantity = 0;
47106
47108
  if (langdetect == 'en') {
47107
47109
  cardobj.name = arrayItem.productinfo.name_en;
@@ -47113,6 +47115,11 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
47113
47115
  } else {
47114
47116
  cardobj.description = arrayItem.productinfo.description_ar;
47115
47117
  }
47118
+ if (langdetect == 'en') {
47119
+ cardobj.shortdescription = arrayItem.short_description_en;
47120
+ } else {
47121
+ cardobj.shortdescription = arrayItem.short_description_ar;
47122
+ }
47116
47123
  if (arrayItem.productinfo.hasvariants == 0) {
47117
47124
  fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
47118
47125
  if (cartitem.productid == arrayItem.productinfo.productid) {
@@ -47121,6 +47128,16 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
47121
47128
  });
47122
47129
  }
47123
47130
  cardobj.image = arrayItem.productinfo.productmainimage;
47131
+ cardobj.producttags = arrayItem.tags;
47132
+ if (langdetect == 'en') {
47133
+ var _arrayItem$features;
47134
+ cardobj.productfeature = arrayItem === null || arrayItem === void 0 || (_arrayItem$features = arrayItem.features) === null || _arrayItem$features === void 0 ? void 0 : _arrayItem$features.value_en;
47135
+ } else {
47136
+ var _arrayItem$features2;
47137
+ cardobj.productfeature = arrayItem === null || arrayItem === void 0 || (_arrayItem$features2 = arrayItem.features) === null || _arrayItem$features2 === void 0 ? void 0 : _arrayItem$features2.value_ar;
47138
+ }
47139
+ cardobj.productfeatureid = arrayItem === null || arrayItem === void 0 || (_arrayItem$features3 = arrayItem.features) === null || _arrayItem$features3 === void 0 ? void 0 : _arrayItem$features3.featureid;
47140
+ cardobj.productendpointurl = arrayItem.productinfo.productendpointurl;
47124
47141
  cardobj.hassale = arrayItem.productinfo.hassale;
47125
47142
  cardobj.productid = arrayItem.productinfo.productid;
47126
47143
  cardobj.hasvariants = arrayItem.productinfo.hasvariants;
@@ -47130,11 +47147,24 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
47130
47147
  cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
47131
47148
  cardobj.productimages = arrayItem.productinfo.productimages;
47132
47149
  cardobj.quantity = itemquantity;
47150
+ // cardobj.currentquantity = currentquantity;
47133
47151
  cardobj.timestamp = arrayItem.productinfo.timestamp;
47152
+ cardobj.productquantity = arrayItem.productinfo.productquantity;
47153
+ cardobj.currentquantity = arrayItem.productinfo.currentquantity;
47154
+ cardobj.quantavailtype = arrayItem.productinfo.quantavailtype;
47155
+ cardobj.isproducttobesold = arrayItem.productinfo.isproducttobesold;
47156
+ cardobj.measurmentunit = arrayItem.productinfo.measurmentunit;
47157
+ cardobj.prodaffpercentprofit = arrayItem.productinfo.prodaffpercentprofit;
47158
+ cardobj.productcashbackvalue = arrayItem.productinfo.productcashbackvalue;
47159
+ cardobj.product_phonenumber = arrayItem.productinfo.product_phonenumber;
47160
+ cardobj.productcanrate = arrayItem.productinfo.productcanrate;
47161
+ cardobj.sku = arrayItem.productinfo.sku;
47134
47162
  if (langdetect == 'en') {
47135
- cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_en;
47163
+ var _fetchAuthorizationQu;
47164
+ cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 || (_fetchAuthorizationQu = fetchAuthorizationQueryContext.data) === null || _fetchAuthorizationQu === void 0 || (_fetchAuthorizationQu = _fetchAuthorizationQu.data) === null || _fetchAuthorizationQu === void 0 ? void 0 : _fetchAuthorizationQu.currencyname_en;
47136
47165
  } else {
47137
- cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_ar;
47166
+ var _fetchAuthorizationQu2;
47167
+ cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 || (_fetchAuthorizationQu2 = fetchAuthorizationQueryContext.data) === null || _fetchAuthorizationQu2 === void 0 || (_fetchAuthorizationQu2 = _fetchAuthorizationQu2.data) === null || _fetchAuthorizationQu2 === void 0 ? void 0 : _fetchAuthorizationQu2.currencyname_ar;
47138
47168
  }
47139
47169
  if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
47140
47170
  favoriteprojectscountContext.forEach(function (favitem, favindex) {
@@ -47143,8 +47173,9 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
47143
47173
  }
47144
47174
  });
47145
47175
  }
47146
- } else if (fetchingtype == 'collections') {
47176
+ } else if (fetchingtype == 'collections' || fetchingtype == 'innerparentcollections') {
47147
47177
  cardobj.collectionid = arrayItem.collectionid;
47178
+ cardobj.skiplayeronclick = arrayItem === null || arrayItem === void 0 ? void 0 : arrayItem.skiplayeronclick;
47148
47179
  if (langdetect == 'en') {
47149
47180
  cardobj.name = arrayItem.title_en;
47150
47181
  cardobj.description = arrayItem.description_en;
@@ -47153,7 +47184,44 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
47153
47184
  cardobj.description = arrayItem.description_ar;
47154
47185
  }
47155
47186
  cardobj.image = arrayItem.collectionlogo;
47156
- } else ;
47187
+ cardobj.producttags = [];
47188
+ cardobj.productfeatures = [];
47189
+ } else if (fetchingtype == 'categories') {
47190
+ cardobj.collectionid = arrayItem.categoryid;
47191
+ cardobj.skiplayeronclick = arrayItem === null || arrayItem === void 0 ? void 0 : arrayItem.skiplayeronclick;
47192
+ if (langdetect == 'en') {
47193
+ cardobj.name = arrayItem.title_en;
47194
+ cardobj.description = arrayItem.description_en;
47195
+ } else if (langdetect == 'ar') {
47196
+ cardobj.name = arrayItem.title_ar;
47197
+ cardobj.description = arrayItem.description_ar;
47198
+ }
47199
+ cardobj.image = arrayItem.categorylogo;
47200
+ cardobj.producttags = [];
47201
+ cardobj.productfeatures = [];
47202
+ } else if (fetchingtype == 'parentcollections' || fetchingtype == 'innercategories') {
47203
+ cardobj.collectionid = arrayItem.parentcollectionid;
47204
+ cardobj.skiplayeronclick = arrayItem === null || arrayItem === void 0 ? void 0 : arrayItem.skiplayeronclick;
47205
+ if (langdetect == 'en') {
47206
+ cardobj.name = arrayItem.title_en;
47207
+ cardobj.description = arrayItem.description_en;
47208
+ } else if (langdetect == 'ar') {
47209
+ cardobj.name = arrayItem.title_ar;
47210
+ cardobj.description = arrayItem.description_ar;
47211
+ }
47212
+ cardobj.image = arrayItem.parentcollectionlogo;
47213
+ cardobj.producttags = [];
47214
+ cardobj.productfeatures = [];
47215
+ } else if (fetchingtype == 'custom') {
47216
+ cardobj.producttags = [];
47217
+ cardobj.productfeatures = [];
47218
+ } else if (fetchingtype == 'vendors') {
47219
+ cardobj.name = arrayItem.vendorname;
47220
+ cardobj.collectionid = arrayItem.vendorid;
47221
+ cardobj.image = arrayItem.vendorlogourl;
47222
+ cardobj.producttags = [];
47223
+ cardobj.productfeatures = [];
47224
+ }
47157
47225
  temparray.push(cardobj);
47158
47226
  });
47159
47227
  setcardsarray([].concat(temparray));
@@ -48426,25 +48494,8 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48426
48494
  _useState10 = _slicedToArray(_useState9, 2),
48427
48495
  ProductsFetchingTypeSectionObj = _useState10[0],
48428
48496
  setProductsFetchingTypeSectionObj = _useState10[1];
48429
- var _useState11 = useState([]),
48430
- _useState12 = _slicedToArray(_useState11, 2);
48431
- _useState12[0];
48432
- var setmaincontainerarrayofobjs = _useState12[1];
48433
- // React.useEffect(() => {
48434
- // if (inView) {
48435
- // fetchProductsQuery.fetchNextPage();
48436
- // }
48437
- // }, [inView]);
48497
+ var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
48438
48498
  useEffect(function () {
48439
- var productfilerobjtemp = ProductFilterObjContext;
48440
- if (props.filterparamsprops != undefined) {
48441
- var filterpar = decodeURIComponent(props.filterparamsprops);
48442
- var filterparsed = JSON.parse(filterpar);
48443
- if (filterparsed != undefined) {
48444
- productfilerobjtemp = filterparsed;
48445
- setProductFilterObjContext(filterparsed);
48446
- }
48447
- }
48448
48499
  StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
48449
48500
  if (sectionitem.sectionid == props.sectionidprops) {
48450
48501
  var secpropobj = {};
@@ -48467,6 +48518,8 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48467
48518
  });
48468
48519
  } else if (props.srcfromprops == 'InnerGroups' || props.srcfromprops == 'InnerCategory' || props.srcfromprops == 'InnerParentCollection') {
48469
48520
  setfetchingtype(props.grouptypeprops);
48521
+ } else if (props.srcfromprops == 'Innervendor') {
48522
+ setfetchingtype('vendors');
48470
48523
  } else {
48471
48524
  setfetchingtype(sectionitem.fetchingtype);
48472
48525
  setProductsFetchingTypeSectionObj({
@@ -48490,11 +48543,6 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48490
48543
  if (fetchProductsQuery.isSuccess) {
48491
48544
  var _fetchProductsQuery$d;
48492
48545
  var allpagesarr = [];
48493
- // fetchProductsQuery.data.pages.forEach((page) => {
48494
- // page.data.products.forEach((productobj) => {
48495
- // allpagesarr.push(productobj);
48496
- // });
48497
- // });
48498
48546
  fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 || (_fetchProductsQuery$d = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d === void 0 || (_fetchProductsQuery$d = _fetchProductsQuery$d.products) === null || _fetchProductsQuery$d === void 0 || _fetchProductsQuery$d.forEach(function (item) {
48499
48547
  allpagesarr.push(item);
48500
48548
  });
@@ -48531,35 +48579,49 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48531
48579
  tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
48532
48580
  setProductFilterObjContext(_objectSpread$1k({}, tempfetchproductsfilerobjcontext));
48533
48581
  }
48582
+ setFetchQueriesEngineContext(_objectSpread$1k({}, tempFetchQueriesEngineContext));
48583
+ }
48584
+ }, [fetchingtype, ProductsFetchingTypeSectionObj]);
48585
+ useEffect(function () {
48586
+ if ((fetchingtype === null || fetchingtype === void 0 ? void 0 : fetchingtype.length) != 0) {
48534
48587
  if (fetchingtype == 'categories') {
48535
- if (fetchAuthorizationQueryContext !== null && fetchAuthorizationQueryContext !== void 0 && fetchAuthorizationQueryContext.isSuccess) {
48536
- var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
48537
- cardobjassigner(categories);
48588
+ var categories = [];
48589
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
48590
+ var _fetchCategoriesQuery;
48591
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery === void 0 || (_fetchCategoriesQuery = _fetchCategoriesQuery.data) === null || _fetchCategoriesQuery === void 0 ? void 0 : _fetchCategoriesQuery.categories;
48538
48592
  }
48593
+ cardobjassigner(categories);
48539
48594
  }
48540
48595
  if (fetchingtype == 'parentcollections' || fetchingtype == 'innercategories') {
48541
- if (fetchAuthorizationQueryContext !== null && fetchAuthorizationQueryContext !== void 0 && fetchAuthorizationQueryContext.isSuccess) {
48542
- var _categories;
48543
- var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
48544
- var parentcollections = [];
48545
- (_categories = categories) === null || _categories === void 0 || _categories.forEach(function (catitem, catindex) {
48546
- catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
48596
+ var _categories;
48597
+ var categories = [];
48598
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
48599
+ var _fetchCategoriesQuery2;
48600
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery2 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery2 === void 0 || (_fetchCategoriesQuery2 = _fetchCategoriesQuery2.data) === null || _fetchCategoriesQuery2 === void 0 ? void 0 : _fetchCategoriesQuery2.categories;
48601
+ }
48602
+ // if (fetchAuthorizationQueryContext?.isSuccess) {
48603
+ // var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
48604
+ // alert(JSON.stringify(categories));
48605
+ var parentcollections = [];
48606
+ (_categories = categories) === null || _categories === void 0 || _categories.forEach(function (catitem, catindex) {
48607
+ catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
48608
+ if (parentcolitem.isshowntocustomers == 1) {
48547
48609
  parentcolitem.categoryid = catitem.categoryid;
48548
48610
  parentcollections.push(parentcolitem);
48549
- });
48550
- });
48551
- if (fetchingtype == 'parentcollections') {
48552
- 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') {
48553
- var arrafterfilter = [];
48554
- parentcollections.forEach(function (parentcolitem, parcolindex) {
48555
- if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
48556
- arrafterfilter.push(parentcolitem);
48557
- }
48558
- });
48559
- parentcollections = arrafterfilter;
48560
48611
  }
48612
+ });
48613
+ });
48614
+ if (fetchingtype == 'parentcollections') {
48615
+ 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') {
48616
+ var arrafterfilter = [];
48617
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
48618
+ if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
48619
+ arrafterfilter.push(parentcolitem);
48620
+ }
48621
+ });
48622
+ parentcollections = arrafterfilter;
48561
48623
  }
48562
- if (fetchingtype == 'innercategories') {
48624
+ if (props.collectionidprops != null && props.collectionidprops != undefined && props.collectionidprops != 'all') {
48563
48625
  var arrafterfilter = [];
48564
48626
  parentcollections.forEach(function (parentcolitem, parcolindex) {
48565
48627
  if (parentcolitem.categoryid == props.collectionidprops) {
@@ -48568,46 +48630,62 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48568
48630
  });
48569
48631
  parentcollections = arrafterfilter;
48570
48632
  }
48571
- cardobjassigner(parentcollections);
48572
48633
  }
48634
+ if (fetchingtype == 'innercategories') {
48635
+ var arrafterfilter = [];
48636
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
48637
+ if (parentcolitem.categoryid == props.collectionidprops) {
48638
+ arrafterfilter.push(parentcolitem);
48639
+ }
48640
+ });
48641
+ parentcollections = arrafterfilter;
48642
+ }
48643
+ cardobjassigner(parentcollections);
48644
+ // }
48573
48645
  } else if (fetchingtype == 'innerparentcollections') {
48574
- if (fetchAuthorizationQueryContext !== null && fetchAuthorizationQueryContext !== void 0 && fetchAuthorizationQueryContext.isSuccess) {
48575
- var _categories2;
48576
- var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
48577
- var collections = [];
48578
- (_categories2 = categories) === null || _categories2 === void 0 || _categories2.forEach(function (catitem, catindex) {
48579
- catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
48580
- var _parentcolitem$collec;
48581
- parentcolitem.categoryid = catitem.categoryid;
48582
- parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (collitem, colindex) {
48646
+ var _categories2;
48647
+ var categories = [];
48648
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
48649
+ var _fetchCategoriesQuery3;
48650
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery3 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery3 === void 0 || (_fetchCategoriesQuery3 = _fetchCategoriesQuery3.data) === null || _fetchCategoriesQuery3 === void 0 ? void 0 : _fetchCategoriesQuery3.categories;
48651
+ }
48652
+ // if (fetchAuthorizationQueryContext?.isSuccess) {
48653
+ // var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
48654
+ var collections = [];
48655
+ (_categories2 = categories) === null || _categories2 === void 0 || _categories2.forEach(function (catitem, catindex) {
48656
+ catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
48657
+ var _parentcolitem$collec;
48658
+ parentcolitem.categoryid = catitem.categoryid;
48659
+ parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (collitem, colindex) {
48660
+ if (collitem.isshowntocustomers == 1) {
48583
48661
  collitem.parentcollectionid = parentcolitem.parentcollectionid;
48584
48662
  collections.push(collitem);
48585
- });
48663
+ }
48586
48664
  });
48587
48665
  });
48588
- if (fetchingtype == 'innerparentcollections') {
48589
- var collectionsafterfilter = [];
48590
- collections.forEach(function (colitem, colindex) {
48591
- if (colitem.parentcollectionid == props.collectionidprops) {
48592
- var iscollexists = false;
48593
- collectionsafterfilter.forEach(function (existcolitem) {
48594
- if (colitem.collectionid == existcolitem.collectionid) {
48595
- iscollexists = true;
48596
- }
48597
- });
48598
- if (iscollexists == false) {
48599
- collectionsafterfilter.push(colitem);
48666
+ });
48667
+ if (fetchingtype == 'innerparentcollections') {
48668
+ var collectionsafterfilter = [];
48669
+ collections.forEach(function (colitem, colindex) {
48670
+ if (colitem.parentcollectionid == props.collectionidprops) {
48671
+ var iscollexists = false;
48672
+ collectionsafterfilter.forEach(function (existcolitem) {
48673
+ if (colitem.collectionid == existcolitem.collectionid) {
48674
+ iscollexists = true;
48600
48675
  }
48676
+ });
48677
+ if (iscollexists == false) {
48678
+ collectionsafterfilter.push(colitem);
48601
48679
  }
48602
- });
48603
- collections = collectionsafterfilter;
48604
- }
48605
- cardobjassigner(collections);
48680
+ }
48681
+ });
48682
+ collections = collectionsafterfilter;
48606
48683
  }
48684
+ cardobjassigner(collections);
48685
+ // }
48607
48686
  }
48608
- setFetchQueriesEngineContext(_objectSpread$1k({}, tempFetchQueriesEngineContext));
48609
48687
  }
48610
- }, [fetchingtype, ProductsFetchingTypeSectionObj]);
48688
+ }, [fetchingtype, ProductsFetchingTypeSectionObj, fetchCategoriesQueryContext.isSuccess]);
48611
48689
  useEffect(function () {
48612
48690
  if (fetchingtype == 'products') {
48613
48691
  if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
@@ -48626,7 +48704,7 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48626
48704
  cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
48627
48705
  }
48628
48706
  }
48629
- }, [fetchcollectionsQueryContext === null || fetchcollectionsQueryContext === void 0 ? void 0 : fetchcollectionsQueryContext.isSuccess]);
48707
+ }, [fetchcollectionsQueryContext === null || fetchcollectionsQueryContext === void 0 ? void 0 : fetchcollectionsQueryContext.isSuccess, fetchcollectionsQueryContext.data]);
48630
48708
  useEffect(function () {
48631
48709
  if (fetchingtype == 'vendors') {
48632
48710
  if (FetchVendorsQuery.isSuccess) {
@@ -48640,14 +48718,6 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48640
48718
  useEffect(function () {
48641
48719
  favassigner();
48642
48720
  }, [favoriteprojectscountContext]);
48643
- useEffect(function () {
48644
- if (sectionproperties.length != 0 && sectionproperties.maincontainerarrayofobjs != undefined) {
48645
- var maincontainerarrayofobjsparsed = JSON.parse(sectionproperties.maincontainerarrayofobjs);
48646
- if (Array.isArray(maincontainerarrayofobjsparsed)) {
48647
- setmaincontainerarrayofobjs(_toConsumableArray(maincontainerarrayofobjsparsed));
48648
- }
48649
- }
48650
- }, [sectionproperties]);
48651
48721
  var favassigner = function favassigner() {
48652
48722
  if (fetchingtype == 'products') {
48653
48723
  if (cardsarray.length != 0) {
@@ -48676,6 +48746,7 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48676
48746
  image: ''
48677
48747
  };
48678
48748
  if (fetchingtype == 'products') {
48749
+ var _arrayItem$features3;
48679
48750
  var itemquantity = 0;
48680
48751
  if (langdetect == 'en') {
48681
48752
  cardobj.name = arrayItem.productinfo.name_en;
@@ -48687,6 +48758,11 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48687
48758
  } else {
48688
48759
  cardobj.description = arrayItem.productinfo.description_ar;
48689
48760
  }
48761
+ if (langdetect == 'en') {
48762
+ cardobj.shortdescription = arrayItem.short_description_en;
48763
+ } else {
48764
+ cardobj.shortdescription = arrayItem.short_description_ar;
48765
+ }
48690
48766
  if (arrayItem.productinfo.hasvariants == 0) {
48691
48767
  fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
48692
48768
  if (cartitem.productid == arrayItem.productinfo.productid) {
@@ -48695,6 +48771,16 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48695
48771
  });
48696
48772
  }
48697
48773
  cardobj.image = arrayItem.productinfo.productmainimage;
48774
+ cardobj.producttags = arrayItem.tags;
48775
+ if (langdetect == 'en') {
48776
+ var _arrayItem$features;
48777
+ cardobj.productfeature = arrayItem === null || arrayItem === void 0 || (_arrayItem$features = arrayItem.features) === null || _arrayItem$features === void 0 ? void 0 : _arrayItem$features.value_en;
48778
+ } else {
48779
+ var _arrayItem$features2;
48780
+ cardobj.productfeature = arrayItem === null || arrayItem === void 0 || (_arrayItem$features2 = arrayItem.features) === null || _arrayItem$features2 === void 0 ? void 0 : _arrayItem$features2.value_ar;
48781
+ }
48782
+ cardobj.productfeatureid = arrayItem === null || arrayItem === void 0 || (_arrayItem$features3 = arrayItem.features) === null || _arrayItem$features3 === void 0 ? void 0 : _arrayItem$features3.featureid;
48783
+ cardobj.productendpointurl = arrayItem.productinfo.productendpointurl;
48698
48784
  cardobj.hassale = arrayItem.productinfo.hassale;
48699
48785
  cardobj.productid = arrayItem.productinfo.productid;
48700
48786
  cardobj.hasvariants = arrayItem.productinfo.hasvariants;
@@ -48704,13 +48790,24 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48704
48790
  cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
48705
48791
  cardobj.productimages = arrayItem.productinfo.productimages;
48706
48792
  cardobj.quantity = itemquantity;
48793
+ // cardobj.currentquantity = currentquantity;
48707
48794
  cardobj.timestamp = arrayItem.productinfo.timestamp;
48708
48795
  cardobj.productquantity = arrayItem.productinfo.productquantity;
48796
+ cardobj.currentquantity = arrayItem.productinfo.currentquantity;
48709
48797
  cardobj.quantavailtype = arrayItem.productinfo.quantavailtype;
48798
+ cardobj.isproducttobesold = arrayItem.productinfo.isproducttobesold;
48799
+ cardobj.measurmentunit = arrayItem.productinfo.measurmentunit;
48800
+ cardobj.prodaffpercentprofit = arrayItem.productinfo.prodaffpercentprofit;
48801
+ cardobj.productcashbackvalue = arrayItem.productinfo.productcashbackvalue;
48802
+ cardobj.product_phonenumber = arrayItem.productinfo.product_phonenumber;
48803
+ cardobj.productcanrate = arrayItem.productinfo.productcanrate;
48804
+ cardobj.sku = arrayItem.productinfo.sku;
48710
48805
  if (langdetect == 'en') {
48711
- cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_en;
48806
+ var _fetchAuthorizationQu;
48807
+ cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 || (_fetchAuthorizationQu = fetchAuthorizationQueryContext.data) === null || _fetchAuthorizationQu === void 0 || (_fetchAuthorizationQu = _fetchAuthorizationQu.data) === null || _fetchAuthorizationQu === void 0 ? void 0 : _fetchAuthorizationQu.currencyname_en;
48712
48808
  } else {
48713
- cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_ar;
48809
+ var _fetchAuthorizationQu2;
48810
+ cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 || (_fetchAuthorizationQu2 = fetchAuthorizationQueryContext.data) === null || _fetchAuthorizationQu2 === void 0 || (_fetchAuthorizationQu2 = _fetchAuthorizationQu2.data) === null || _fetchAuthorizationQu2 === void 0 ? void 0 : _fetchAuthorizationQu2.currencyname_ar;
48714
48811
  }
48715
48812
  if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
48716
48813
  favoriteprojectscountContext.forEach(function (favitem, favindex) {
@@ -48721,6 +48818,7 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48721
48818
  }
48722
48819
  } else if (fetchingtype == 'collections' || fetchingtype == 'innerparentcollections') {
48723
48820
  cardobj.collectionid = arrayItem.collectionid;
48821
+ cardobj.skiplayeronclick = arrayItem === null || arrayItem === void 0 ? void 0 : arrayItem.skiplayeronclick;
48724
48822
  if (langdetect == 'en') {
48725
48823
  cardobj.name = arrayItem.title_en;
48726
48824
  cardobj.description = arrayItem.description_en;
@@ -48729,8 +48827,11 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48729
48827
  cardobj.description = arrayItem.description_ar;
48730
48828
  }
48731
48829
  cardobj.image = arrayItem.collectionlogo;
48830
+ cardobj.producttags = [];
48831
+ cardobj.productfeatures = [];
48732
48832
  } else if (fetchingtype == 'categories') {
48733
48833
  cardobj.collectionid = arrayItem.categoryid;
48834
+ cardobj.skiplayeronclick = arrayItem === null || arrayItem === void 0 ? void 0 : arrayItem.skiplayeronclick;
48734
48835
  if (langdetect == 'en') {
48735
48836
  cardobj.name = arrayItem.title_en;
48736
48837
  cardobj.description = arrayItem.description_en;
@@ -48739,8 +48840,11 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48739
48840
  cardobj.description = arrayItem.description_ar;
48740
48841
  }
48741
48842
  cardobj.image = arrayItem.categorylogo;
48843
+ cardobj.producttags = [];
48844
+ cardobj.productfeatures = [];
48742
48845
  } else if (fetchingtype == 'parentcollections' || fetchingtype == 'innercategories') {
48743
48846
  cardobj.collectionid = arrayItem.parentcollectionid;
48847
+ cardobj.skiplayeronclick = arrayItem === null || arrayItem === void 0 ? void 0 : arrayItem.skiplayeronclick;
48744
48848
  if (langdetect == 'en') {
48745
48849
  cardobj.name = arrayItem.title_en;
48746
48850
  cardobj.description = arrayItem.description_en;
@@ -48749,10 +48853,17 @@ var RandomlyStructuredCollectionCards = function RandomlyStructuredCollectionCar
48749
48853
  cardobj.description = arrayItem.description_ar;
48750
48854
  }
48751
48855
  cardobj.image = arrayItem.parentcollectionlogo;
48752
- } else if (fetchingtype == 'custom') ; else if (fetchingtype == 'vendors') {
48856
+ cardobj.producttags = [];
48857
+ cardobj.productfeatures = [];
48858
+ } else if (fetchingtype == 'custom') {
48859
+ cardobj.producttags = [];
48860
+ cardobj.productfeatures = [];
48861
+ } else if (fetchingtype == 'vendors') {
48753
48862
  cardobj.name = arrayItem.vendorname;
48754
48863
  cardobj.collectionid = arrayItem.vendorid;
48755
48864
  cardobj.image = arrayItem.vendorlogourl;
48865
+ cardobj.producttags = [];
48866
+ cardobj.productfeatures = [];
48756
48867
  }
48757
48868
  temparray.push(cardobj);
48758
48869
  });