tabexseriescomponents 0.0.477 → 0.0.479

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 CHANGED
@@ -19012,7 +19012,8 @@ var MarqueeHeader = function MarqueeHeader(props) {
19012
19012
  width: "100%",
19013
19013
  direction: "left",
19014
19014
  scrollamount: "3",
19015
- behavior: "scroll"
19015
+ behavior: "scroll",
19016
+ "class": "marquee"
19016
19017
  }, /*#__PURE__*/React__default["default"].createElement("span", {
19017
19018
  "class": "d-flex flex-row align-items-center"
19018
19019
  }, textarray.map(function (item, index) {
@@ -46514,92 +46515,115 @@ var Newsletterincenter = function Newsletterincenter(props) {
46514
46515
  function ownKeys$1o(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; }
46515
46516
  function _objectSpread$1o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1o(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
46516
46517
  var CardsSection2 = function CardsSection2(props) {
46518
+ var refscr = /*#__PURE__*/React.createRef();
46517
46519
  var _useInView = reactIntersectionObserver.useInView();
46518
46520
  _useInView.ref;
46519
- var inView = _useInView.inView;
46521
+ _useInView.inView;
46520
46522
  var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
46521
46523
  props.actions.lang;
46522
46524
  var langdetect = props.actions.langdetect;
46523
46525
  var fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
46524
46526
  var favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
46527
+ props.actions.routingcountext;
46528
+ props.actions.StaticPagesLinksContext;
46525
46529
  var ProductFilterObjContext = props.actions.ProductFilterObjContext;
46526
46530
  var setProductFilterObjContext = props.actions.setProductFilterObjContext;
46527
46531
  var TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
46528
46532
  var FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
46529
46533
  var setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
46530
- var SearchHeaderMutationContext = props.actions.SearchHeaderMutationContext;
46531
46534
  var fetchProductsQuery = props.actions.fetchProductsQuery;
46532
46535
  var fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
46533
46536
  var setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
46537
+ props.actions.ParentCollectionsForCollectionQueryArr;
46534
46538
  var setfetchingtype = props.actions.setfetchingtype;
46535
46539
  var fetchingtype = props.actions.fetchingtype;
46536
- props.actions.AddtoCartMutationContext;
46537
- props.actions.setShowProductInfoModalContext;
46538
- props.actions.authdetailsContext;
46539
- props.actions.productfiltercontext;
46540
- props.actions.setproductfiltercontext;
46540
+ props.actions.addtofavoritescontext;
46541
+ var fetchAuthorizationQueryContext = props.actions.fetchAuthorizationQueryContext;
46542
+ var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
46543
+ var FetchVendorsQuery = props.actions.FetchVendorsQuery;
46544
+ props.actions.ikimagecredcontext;
46545
+ props.actions.sortbycontext;
46546
+ props.actions.setsortbycontext;
46547
+ var _useState = React.useState(false),
46548
+ _useState2 = _slicedToArray__default["default"](_useState, 2);
46549
+ _useState2[0];
46550
+ _useState2[1];
46541
46551
  var actions = props.actions;
46542
- var _useState = React.useState(''),
46543
- _useState2 = _slicedToArray__default["default"](_useState, 2),
46544
- sectionproperties = _useState2[0],
46545
- setsectionproperties = _useState2[1];
46546
- var _useState3 = React.useState([]),
46552
+ var _useState3 = React.useState(''),
46547
46553
  _useState4 = _slicedToArray__default["default"](_useState3, 2),
46548
- cardsarray = _useState4[0],
46549
- setcardsarray = _useState4[1];
46550
- var _useState5 = React.useState(''),
46554
+ sectionproperties = _useState4[0],
46555
+ setsectionproperties = _useState4[1];
46556
+ var _useState5 = React.useState([]),
46551
46557
  _useState6 = _slicedToArray__default["default"](_useState5, 2),
46552
- searchinput = _useState6[0];
46553
- _useState6[1];
46554
- React__default["default"].useEffect(function () {
46555
- if (inView) {
46556
- fetchProductsQuery.fetchNextPage();
46557
- }
46558
- }, [inView]);
46559
- var _useState7 = React.useState({
46558
+ cardsarray = _useState6[0],
46559
+ setcardsarray = _useState6[1];
46560
+ var _useState7 = React.useState(''),
46561
+ _useState8 = _slicedToArray__default["default"](_useState7, 2),
46562
+ sectionitem = _useState8[0],
46563
+ setsectionitem = _useState8[1];
46564
+ var _useState9 = React.useState({
46560
46565
  productfetchingtype: 'Random',
46561
- collectionid: ''
46566
+ collectionid: '',
46567
+ grouptype: ''
46562
46568
  }),
46563
- _useState8 = _slicedToArray__default["default"](_useState7, 2),
46564
- ProductsFetchingTypeSectionObj = _useState8[0],
46565
- setProductsFetchingTypeSectionObj = _useState8[1];
46569
+ _useState10 = _slicedToArray__default["default"](_useState9, 2),
46570
+ ProductsFetchingTypeSectionObj = _useState10[0],
46571
+ setProductsFetchingTypeSectionObj = _useState10[1];
46572
+ var _useState11 = React.useState([]),
46573
+ _useState12 = _slicedToArray__default["default"](_useState11, 2);
46574
+ _useState12[0];
46575
+ var setmaincontainerarrayofobjs = _useState12[1];
46576
+ var _useState13 = React.useState(12),
46577
+ _useState14 = _slicedToArray__default["default"](_useState13, 2);
46578
+ _useState14[0];
46579
+ var setperpageItems = _useState14[1];
46580
+ props.actions.AddtoCartMutationContext;
46566
46581
  React.useEffect(function () {
46582
+ var productfilerobjtemp = ProductFilterObjContext;
46583
+ if (props.filterparamsprops != undefined) {
46584
+ var filterpar = decodeURIComponent(props.filterparamsprops);
46585
+ var filterparsed = JSON.parse(filterpar);
46586
+ if (filterparsed != undefined) {
46587
+ productfilerobjtemp = filterparsed;
46588
+ setProductFilterObjContext(filterparsed);
46589
+ }
46590
+ }
46567
46591
  StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
46568
46592
  if (sectionitem.sectionid == props.sectionidprops) {
46569
46593
  var secpropobj = {};
46594
+ setsectionitem(sectionitem);
46570
46595
  sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
46571
46596
  secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
46572
46597
  });
46573
46598
  setsectionproperties(_objectSpread$1o({}, secpropobj));
46574
46599
  if (props.srcfromprops == 'GeneralProductsComponent') {
46575
46600
  setfetchingtype('products');
46601
+ var lcproductfetchingtype = 'Random';
46602
+ if (productfilerobjtemp.ProductFetchingType != undefined && productfilerobjtemp.ProductFetchingType != null && productfilerobjtemp.ProductFetchingType.length != 0) {
46603
+ lcproductfetchingtype = productfilerobjtemp.ProductFetchingType;
46604
+ }
46576
46605
  setProductsFetchingTypeSectionObj({
46577
- productfetchingtype: 'Random',
46578
- collectionid: props.collectionidprops
46606
+ productfetchingtype: lcproductfetchingtype,
46607
+ collectionid: props.collectionidprops,
46608
+ grouptype: props.grouptypeprops,
46609
+ grouptyperefid: props.grouptyperefidprops
46579
46610
  });
46611
+ } else if (props.srcfromprops == 'InnerGroups' || props.srcfromprops == 'InnerCategory' || props.srcfromprops == 'InnerParentCollection') {
46612
+ setfetchingtype(props.grouptypeprops);
46613
+ } else if (props.srcfromprops == 'Innervendor') {
46614
+ setfetchingtype('vendors');
46580
46615
  } else {
46581
46616
  setfetchingtype(sectionitem.fetchingtype);
46582
46617
  setProductsFetchingTypeSectionObj({
46583
46618
  productfetchingtype: sectionitem.productsfetchingtype,
46584
- collectionid: sectionitem.productsfetchingtypeCollectioncollectionid
46619
+ collectionid: sectionitem.productsfetchingtypeCollectioncollectionid,
46620
+ grouptype: props.grouptypeprops,
46621
+ grouptyperefid: props.grouptyperefidprops
46585
46622
  });
46586
46623
  }
46587
46624
  }
46588
46625
  });
46589
46626
  }, [StatePagePropertiesContext]);
46590
- React.useEffect(function () {
46591
- SearchHeaderMutationContext.reset();
46592
- var delayDebounceFn = setTimeout(function () {
46593
- if (searchinput.length != 0) {
46594
- SearchHeaderMutationContext.mutate({
46595
- SearchHeaderValue: searchinput
46596
- });
46597
- }
46598
- }, 1000);
46599
- return function () {
46600
- return clearTimeout(delayDebounceFn);
46601
- };
46602
- }, [searchinput]);
46603
46627
  React.useEffect(function () {
46604
46628
  if (sectionproperties.length != 0) {
46605
46629
  if (cardsarray.length == 0) {
@@ -46616,16 +46640,19 @@ var CardsSection2 = function CardsSection2(props) {
46616
46640
  });
46617
46641
  cardobjassigner(allpagesarr);
46618
46642
  }
46643
+ } else if (fetchingtype == 'vendors') {
46644
+ if (FetchVendorsQuery.isSuccess) {
46645
+ var _FetchVendorsQuery$da;
46646
+ cardobjassigner(FetchVendorsQuery === null || FetchVendorsQuery === void 0 || (_FetchVendorsQuery$da = FetchVendorsQuery.data) === null || _FetchVendorsQuery$da === void 0 || (_FetchVendorsQuery$da = _FetchVendorsQuery$da.data) === null || _FetchVendorsQuery$da === void 0 ? void 0 : _FetchVendorsQuery$da.vendors);
46647
+ }
46619
46648
  }
46620
46649
  }
46621
46650
  }
46622
46651
  }, [sectionproperties]);
46623
46652
  React.useEffect(function () {
46624
- if (fetchingtype.length != 0) {
46653
+ if ((fetchingtype === null || fetchingtype === void 0 ? void 0 : fetchingtype.length) != 0) {
46625
46654
  var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
46626
46655
  if (fetchingtype == 'collections') {
46627
- // tempFetchQueriesEngineContext.collections = true;
46628
-
46629
46656
  if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
46630
46657
  setParentCollectionsForCollectionQueryArr('all');
46631
46658
  } else {
@@ -46635,34 +46662,166 @@ var CardsSection2 = function CardsSection2(props) {
46635
46662
  if (fetchingtype == 'products') {
46636
46663
  var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
46637
46664
  tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
46638
- tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
46665
+ if (ProductsFetchingTypeSectionObj.grouptype == 'collections' || ProductsFetchingTypeSectionObj.grouptype == 'categories' || ProductsFetchingTypeSectionObj.grouptype == 'parentcollections') ; else {
46666
+ if (tempfetchproductsfilerobjcontext.collections != undefined) {
46667
+ tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
46668
+ }
46669
+ }
46670
+ tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
46671
+ tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
46639
46672
  setProductFilterObjContext(_objectSpread$1o({}, tempfetchproductsfilerobjcontext));
46640
46673
  }
46641
46674
  setFetchQueriesEngineContext(_objectSpread$1o({}, tempFetchQueriesEngineContext));
46642
46675
  }
46643
46676
  }, [fetchingtype, ProductsFetchingTypeSectionObj]);
46677
+ React.useEffect(function () {
46678
+ if ((fetchingtype === null || fetchingtype === void 0 ? void 0 : fetchingtype.length) != 0) {
46679
+ if (fetchingtype == 'categories') {
46680
+ var categories = [];
46681
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
46682
+ var _fetchCategoriesQuery;
46683
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery === void 0 || (_fetchCategoriesQuery = _fetchCategoriesQuery.data) === null || _fetchCategoriesQuery === void 0 ? void 0 : _fetchCategoriesQuery.categories;
46684
+ }
46685
+ cardobjassigner(categories);
46686
+ }
46687
+ if (fetchingtype == 'parentcollections' || fetchingtype == 'innercategories') {
46688
+ var _categories;
46689
+ var categories = [];
46690
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
46691
+ var _fetchCategoriesQuery2;
46692
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery2 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery2 === void 0 || (_fetchCategoriesQuery2 = _fetchCategoriesQuery2.data) === null || _fetchCategoriesQuery2 === void 0 ? void 0 : _fetchCategoriesQuery2.categories;
46693
+ }
46694
+ // if (fetchAuthorizationQueryContext?.isSuccess) {
46695
+ // var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
46696
+ // alert(JSON.stringify(categories));
46697
+ var parentcollections = [];
46698
+ (_categories = categories) === null || _categories === void 0 || _categories.forEach(function (catitem, catindex) {
46699
+ catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
46700
+ if (parentcolitem.isshowntocustomers == 1) {
46701
+ parentcolitem.categoryid = catitem.categoryid;
46702
+ parentcollections.push(parentcolitem);
46703
+ }
46704
+ });
46705
+ });
46706
+ if (fetchingtype == 'parentcollections') {
46707
+ 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') {
46708
+ var arrafterfilter = [];
46709
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
46710
+ if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
46711
+ arrafterfilter.push(parentcolitem);
46712
+ }
46713
+ });
46714
+ parentcollections = arrafterfilter;
46715
+ }
46716
+ if (props.collectionidprops != null && props.collectionidprops != undefined && props.collectionidprops != 'all') {
46717
+ var arrafterfilter = [];
46718
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
46719
+ if (parentcolitem.categoryid == props.collectionidprops) {
46720
+ arrafterfilter.push(parentcolitem);
46721
+ }
46722
+ });
46723
+ parentcollections = arrafterfilter;
46724
+ }
46725
+ }
46726
+ if (fetchingtype == 'innercategories') {
46727
+ var arrafterfilter = [];
46728
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
46729
+ if (parentcolitem.categoryid == props.collectionidprops) {
46730
+ arrafterfilter.push(parentcolitem);
46731
+ }
46732
+ });
46733
+ parentcollections = arrafterfilter;
46734
+ }
46735
+ cardobjassigner(parentcollections);
46736
+ // }
46737
+ } else if (fetchingtype == 'innerparentcollections') {
46738
+ var _categories2;
46739
+ var categories = [];
46740
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
46741
+ var _fetchCategoriesQuery3;
46742
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery3 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery3 === void 0 || (_fetchCategoriesQuery3 = _fetchCategoriesQuery3.data) === null || _fetchCategoriesQuery3 === void 0 ? void 0 : _fetchCategoriesQuery3.categories;
46743
+ }
46744
+ // if (fetchAuthorizationQueryContext?.isSuccess) {
46745
+ // var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
46746
+ var collections = [];
46747
+ (_categories2 = categories) === null || _categories2 === void 0 || _categories2.forEach(function (catitem, catindex) {
46748
+ catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
46749
+ var _parentcolitem$collec;
46750
+ parentcolitem.categoryid = catitem.categoryid;
46751
+ parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (collitem, colindex) {
46752
+ if (collitem.isshowntocustomers == 1) {
46753
+ collitem.parentcollectionid = parentcolitem.parentcollectionid;
46754
+ collections.push(collitem);
46755
+ }
46756
+ });
46757
+ });
46758
+ });
46759
+ if (fetchingtype == 'innerparentcollections') {
46760
+ var collectionsafterfilter = [];
46761
+ collections.forEach(function (colitem, colindex) {
46762
+ if (colitem.parentcollectionid == props.collectionidprops) {
46763
+ var iscollexists = false;
46764
+ collectionsafterfilter.forEach(function (existcolitem) {
46765
+ if (colitem.collectionid == existcolitem.collectionid) {
46766
+ iscollexists = true;
46767
+ }
46768
+ });
46769
+ if (iscollexists == false) {
46770
+ collectionsafterfilter.push(colitem);
46771
+ }
46772
+ }
46773
+ });
46774
+ collections = collectionsafterfilter;
46775
+ }
46776
+ cardobjassigner(collections);
46777
+ // }
46778
+ }
46779
+ }
46780
+ }, [fetchingtype, ProductsFetchingTypeSectionObj, fetchCategoriesQueryContext.isSuccess]);
46644
46781
  React.useEffect(function () {
46645
46782
  if (fetchingtype == 'products') {
46646
46783
  if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
46647
- var _fetchProductsQuery$d2;
46784
+ var _fetchProductsQuery$d2, _fetchProductsQuery$d3, _fetchProductsQuery$d4, _fetchProductsQuery$d5;
46648
46785
  var allpagesarr = [];
46649
46786
  fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d2 = fetchProductsQuery.data) === null || _fetchProductsQuery$d2 === void 0 || (_fetchProductsQuery$d2 = _fetchProductsQuery$d2.data) === null || _fetchProductsQuery$d2 === void 0 || (_fetchProductsQuery$d2 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d2 === void 0 || _fetchProductsQuery$d2.forEach(function (item) {
46650
46787
  allpagesarr.push(item);
46651
46788
  });
46789
+ if ((fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d3 = fetchProductsQuery.data) === null || _fetchProductsQuery$d3 === void 0 || (_fetchProductsQuery$d3 = _fetchProductsQuery$d3.data) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.PerPageProducts) != undefined && (fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 || (_fetchProductsQuery$d4 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : _fetchProductsQuery$d4.PerPageProducts) != null && (fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d5 = fetchProductsQuery.data) === null || _fetchProductsQuery$d5 === void 0 || (_fetchProductsQuery$d5 = _fetchProductsQuery$d5.data) === null || _fetchProductsQuery$d5 === void 0 || (_fetchProductsQuery$d5 = _fetchProductsQuery$d5.PerPageProducts) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : _fetchProductsQuery$d5.length) != 0) {
46790
+ var _fetchProductsQuery$d6;
46791
+ setperpageItems(fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d6 = fetchProductsQuery.data) === null || _fetchProductsQuery$d6 === void 0 || (_fetchProductsQuery$d6 = _fetchProductsQuery$d6.data) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.PerPageProducts);
46792
+ }
46652
46793
  cardobjassigner(allpagesarr);
46653
46794
  }
46654
46795
  }
46655
- }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data, fetchcustomercartQueryContext.dataUpdatedAt]);
46796
+ }, [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]);
46656
46797
  React.useEffect(function () {
46657
46798
  if (fetchingtype == 'collections') {
46658
46799
  if (fetchcollectionsQueryContext.isSuccess) {
46659
46800
  cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
46660
46801
  }
46661
46802
  }
46662
- }, [fetchcollectionsQueryContext.isSuccess]);
46803
+ }, [fetchcollectionsQueryContext === null || fetchcollectionsQueryContext === void 0 ? void 0 : fetchcollectionsQueryContext.isSuccess, fetchcollectionsQueryContext.data]);
46804
+ React.useEffect(function () {
46805
+ if (fetchingtype == 'vendors') {
46806
+ if (FetchVendorsQuery.isSuccess) {
46807
+ if (FetchVendorsQuery.data.data.vendors != undefined && FetchVendorsQuery.data.data.vendors.length != 0) {
46808
+ var _FetchVendorsQuery$da2;
46809
+ cardobjassigner(FetchVendorsQuery === null || FetchVendorsQuery === void 0 || (_FetchVendorsQuery$da2 = FetchVendorsQuery.data) === null || _FetchVendorsQuery$da2 === void 0 || (_FetchVendorsQuery$da2 = _FetchVendorsQuery$da2.data) === null || _FetchVendorsQuery$da2 === void 0 ? void 0 : _FetchVendorsQuery$da2.vendors);
46810
+ }
46811
+ }
46812
+ }
46813
+ }, [FetchVendorsQuery.isSuccess]);
46663
46814
  React.useEffect(function () {
46664
46815
  favassigner();
46665
46816
  }, [favoriteprojectscountContext]);
46817
+ React.useEffect(function () {
46818
+ if (sectionproperties.length != 0 && sectionproperties.maincontainerarrayofobjs != undefined) {
46819
+ var maincontainerarrayofobjsparsed = JSON.parse(sectionproperties.maincontainerarrayofobjs);
46820
+ if (Array.isArray(maincontainerarrayofobjsparsed)) {
46821
+ setmaincontainerarrayofobjs(_toConsumableArray__default["default"](maincontainerarrayofobjsparsed));
46822
+ }
46823
+ }
46824
+ }, [sectionproperties]);
46666
46825
  var favassigner = function favassigner() {
46667
46826
  if (fetchingtype == 'products') {
46668
46827
  if (cardsarray.length != 0) {
@@ -46749,10 +46908,10 @@ var CardsSection2 = function CardsSection2(props) {
46749
46908
  cardobj.sku = arrayItem.productinfo.sku;
46750
46909
  if (langdetect == 'en') {
46751
46910
  var _fetchAuthorizationQu;
46752
- cardobj.currencyname = (_fetchAuthorizationQu = fetchAuthorizationQueryContext) === null || _fetchAuthorizationQu === void 0 || (_fetchAuthorizationQu = _fetchAuthorizationQu.data) === null || _fetchAuthorizationQu === void 0 || (_fetchAuthorizationQu = _fetchAuthorizationQu.data) === null || _fetchAuthorizationQu === void 0 ? void 0 : _fetchAuthorizationQu.currencyname_en;
46911
+ 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;
46753
46912
  } else {
46754
46913
  var _fetchAuthorizationQu2;
46755
- cardobj.currencyname = (_fetchAuthorizationQu2 = fetchAuthorizationQueryContext) === null || _fetchAuthorizationQu2 === void 0 || (_fetchAuthorizationQu2 = _fetchAuthorizationQu2.data) === null || _fetchAuthorizationQu2 === void 0 || (_fetchAuthorizationQu2 = _fetchAuthorizationQu2.data) === null || _fetchAuthorizationQu2 === void 0 ? void 0 : _fetchAuthorizationQu2.currencyname_ar;
46914
+ 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;
46756
46915
  }
46757
46916
  if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
46758
46917
  favoriteprojectscountContext.forEach(function (favitem, favindex) {
@@ -46987,7 +47146,8 @@ var CardsSection2 = function CardsSection2(props) {
46987
47146
  className: "row m-0 d-flex w-100 justify-content-center mb-md-4 ",
46988
47147
  style: {
46989
47148
  zIndex: 2
46990
- }
47149
+ },
47150
+ ref: refscr
46991
47151
  }, /*#__PURE__*/React__default["default"].createElement("div", {
46992
47152
  className: "col-lg-12 p-0 d-flex justify-content-center"
46993
47153
  }, sectionproperties.length != 0 && /*#__PURE__*/React__default["default"].createElement("div", {
package/dist/index.esm.js CHANGED
@@ -18963,7 +18963,8 @@ var MarqueeHeader = function MarqueeHeader(props) {
18963
18963
  width: "100%",
18964
18964
  direction: "left",
18965
18965
  scrollamount: "3",
18966
- behavior: "scroll"
18966
+ behavior: "scroll",
18967
+ "class": "marquee"
18967
18968
  }, /*#__PURE__*/React.createElement("span", {
18968
18969
  "class": "d-flex flex-row align-items-center"
18969
18970
  }, textarray.map(function (item, index) {
@@ -46465,92 +46466,115 @@ var Newsletterincenter = function Newsletterincenter(props) {
46465
46466
  function ownKeys$1o(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; }
46466
46467
  function _objectSpread$1o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
46467
46468
  var CardsSection2 = function CardsSection2(props) {
46469
+ var refscr = /*#__PURE__*/createRef();
46468
46470
  var _useInView = useInView();
46469
46471
  _useInView.ref;
46470
- var inView = _useInView.inView;
46472
+ _useInView.inView;
46471
46473
  var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
46472
46474
  props.actions.lang;
46473
46475
  var langdetect = props.actions.langdetect;
46474
46476
  var fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
46475
46477
  var favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
46478
+ props.actions.routingcountext;
46479
+ props.actions.StaticPagesLinksContext;
46476
46480
  var ProductFilterObjContext = props.actions.ProductFilterObjContext;
46477
46481
  var setProductFilterObjContext = props.actions.setProductFilterObjContext;
46478
46482
  var TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
46479
46483
  var FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
46480
46484
  var setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
46481
- var SearchHeaderMutationContext = props.actions.SearchHeaderMutationContext;
46482
46485
  var fetchProductsQuery = props.actions.fetchProductsQuery;
46483
46486
  var fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
46484
46487
  var setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
46488
+ props.actions.ParentCollectionsForCollectionQueryArr;
46485
46489
  var setfetchingtype = props.actions.setfetchingtype;
46486
46490
  var fetchingtype = props.actions.fetchingtype;
46487
- props.actions.AddtoCartMutationContext;
46488
- props.actions.setShowProductInfoModalContext;
46489
- props.actions.authdetailsContext;
46490
- props.actions.productfiltercontext;
46491
- props.actions.setproductfiltercontext;
46491
+ props.actions.addtofavoritescontext;
46492
+ var fetchAuthorizationQueryContext = props.actions.fetchAuthorizationQueryContext;
46493
+ var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
46494
+ var FetchVendorsQuery = props.actions.FetchVendorsQuery;
46495
+ props.actions.ikimagecredcontext;
46496
+ props.actions.sortbycontext;
46497
+ props.actions.setsortbycontext;
46498
+ var _useState = useState(false),
46499
+ _useState2 = _slicedToArray(_useState, 2);
46500
+ _useState2[0];
46501
+ _useState2[1];
46492
46502
  var actions = props.actions;
46493
- var _useState = useState(''),
46494
- _useState2 = _slicedToArray(_useState, 2),
46495
- sectionproperties = _useState2[0],
46496
- setsectionproperties = _useState2[1];
46497
- var _useState3 = useState([]),
46503
+ var _useState3 = useState(''),
46498
46504
  _useState4 = _slicedToArray(_useState3, 2),
46499
- cardsarray = _useState4[0],
46500
- setcardsarray = _useState4[1];
46501
- var _useState5 = useState(''),
46505
+ sectionproperties = _useState4[0],
46506
+ setsectionproperties = _useState4[1];
46507
+ var _useState5 = useState([]),
46502
46508
  _useState6 = _slicedToArray(_useState5, 2),
46503
- searchinput = _useState6[0];
46504
- _useState6[1];
46505
- React.useEffect(function () {
46506
- if (inView) {
46507
- fetchProductsQuery.fetchNextPage();
46508
- }
46509
- }, [inView]);
46510
- var _useState7 = useState({
46509
+ cardsarray = _useState6[0],
46510
+ setcardsarray = _useState6[1];
46511
+ var _useState7 = useState(''),
46512
+ _useState8 = _slicedToArray(_useState7, 2),
46513
+ sectionitem = _useState8[0],
46514
+ setsectionitem = _useState8[1];
46515
+ var _useState9 = useState({
46511
46516
  productfetchingtype: 'Random',
46512
- collectionid: ''
46517
+ collectionid: '',
46518
+ grouptype: ''
46513
46519
  }),
46514
- _useState8 = _slicedToArray(_useState7, 2),
46515
- ProductsFetchingTypeSectionObj = _useState8[0],
46516
- setProductsFetchingTypeSectionObj = _useState8[1];
46520
+ _useState10 = _slicedToArray(_useState9, 2),
46521
+ ProductsFetchingTypeSectionObj = _useState10[0],
46522
+ setProductsFetchingTypeSectionObj = _useState10[1];
46523
+ var _useState11 = useState([]),
46524
+ _useState12 = _slicedToArray(_useState11, 2);
46525
+ _useState12[0];
46526
+ var setmaincontainerarrayofobjs = _useState12[1];
46527
+ var _useState13 = useState(12),
46528
+ _useState14 = _slicedToArray(_useState13, 2);
46529
+ _useState14[0];
46530
+ var setperpageItems = _useState14[1];
46531
+ props.actions.AddtoCartMutationContext;
46517
46532
  useEffect(function () {
46533
+ var productfilerobjtemp = ProductFilterObjContext;
46534
+ if (props.filterparamsprops != undefined) {
46535
+ var filterpar = decodeURIComponent(props.filterparamsprops);
46536
+ var filterparsed = JSON.parse(filterpar);
46537
+ if (filterparsed != undefined) {
46538
+ productfilerobjtemp = filterparsed;
46539
+ setProductFilterObjContext(filterparsed);
46540
+ }
46541
+ }
46518
46542
  StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
46519
46543
  if (sectionitem.sectionid == props.sectionidprops) {
46520
46544
  var secpropobj = {};
46545
+ setsectionitem(sectionitem);
46521
46546
  sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
46522
46547
  secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
46523
46548
  });
46524
46549
  setsectionproperties(_objectSpread$1o({}, secpropobj));
46525
46550
  if (props.srcfromprops == 'GeneralProductsComponent') {
46526
46551
  setfetchingtype('products');
46552
+ var lcproductfetchingtype = 'Random';
46553
+ if (productfilerobjtemp.ProductFetchingType != undefined && productfilerobjtemp.ProductFetchingType != null && productfilerobjtemp.ProductFetchingType.length != 0) {
46554
+ lcproductfetchingtype = productfilerobjtemp.ProductFetchingType;
46555
+ }
46527
46556
  setProductsFetchingTypeSectionObj({
46528
- productfetchingtype: 'Random',
46529
- collectionid: props.collectionidprops
46557
+ productfetchingtype: lcproductfetchingtype,
46558
+ collectionid: props.collectionidprops,
46559
+ grouptype: props.grouptypeprops,
46560
+ grouptyperefid: props.grouptyperefidprops
46530
46561
  });
46562
+ } else if (props.srcfromprops == 'InnerGroups' || props.srcfromprops == 'InnerCategory' || props.srcfromprops == 'InnerParentCollection') {
46563
+ setfetchingtype(props.grouptypeprops);
46564
+ } else if (props.srcfromprops == 'Innervendor') {
46565
+ setfetchingtype('vendors');
46531
46566
  } else {
46532
46567
  setfetchingtype(sectionitem.fetchingtype);
46533
46568
  setProductsFetchingTypeSectionObj({
46534
46569
  productfetchingtype: sectionitem.productsfetchingtype,
46535
- collectionid: sectionitem.productsfetchingtypeCollectioncollectionid
46570
+ collectionid: sectionitem.productsfetchingtypeCollectioncollectionid,
46571
+ grouptype: props.grouptypeprops,
46572
+ grouptyperefid: props.grouptyperefidprops
46536
46573
  });
46537
46574
  }
46538
46575
  }
46539
46576
  });
46540
46577
  }, [StatePagePropertiesContext]);
46541
- useEffect(function () {
46542
- SearchHeaderMutationContext.reset();
46543
- var delayDebounceFn = setTimeout(function () {
46544
- if (searchinput.length != 0) {
46545
- SearchHeaderMutationContext.mutate({
46546
- SearchHeaderValue: searchinput
46547
- });
46548
- }
46549
- }, 1000);
46550
- return function () {
46551
- return clearTimeout(delayDebounceFn);
46552
- };
46553
- }, [searchinput]);
46554
46578
  useEffect(function () {
46555
46579
  if (sectionproperties.length != 0) {
46556
46580
  if (cardsarray.length == 0) {
@@ -46567,16 +46591,19 @@ var CardsSection2 = function CardsSection2(props) {
46567
46591
  });
46568
46592
  cardobjassigner(allpagesarr);
46569
46593
  }
46594
+ } else if (fetchingtype == 'vendors') {
46595
+ if (FetchVendorsQuery.isSuccess) {
46596
+ var _FetchVendorsQuery$da;
46597
+ cardobjassigner(FetchVendorsQuery === null || FetchVendorsQuery === void 0 || (_FetchVendorsQuery$da = FetchVendorsQuery.data) === null || _FetchVendorsQuery$da === void 0 || (_FetchVendorsQuery$da = _FetchVendorsQuery$da.data) === null || _FetchVendorsQuery$da === void 0 ? void 0 : _FetchVendorsQuery$da.vendors);
46598
+ }
46570
46599
  }
46571
46600
  }
46572
46601
  }
46573
46602
  }, [sectionproperties]);
46574
46603
  useEffect(function () {
46575
- if (fetchingtype.length != 0) {
46604
+ if ((fetchingtype === null || fetchingtype === void 0 ? void 0 : fetchingtype.length) != 0) {
46576
46605
  var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
46577
46606
  if (fetchingtype == 'collections') {
46578
- // tempFetchQueriesEngineContext.collections = true;
46579
-
46580
46607
  if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
46581
46608
  setParentCollectionsForCollectionQueryArr('all');
46582
46609
  } else {
@@ -46586,34 +46613,166 @@ var CardsSection2 = function CardsSection2(props) {
46586
46613
  if (fetchingtype == 'products') {
46587
46614
  var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
46588
46615
  tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
46589
- tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
46616
+ if (ProductsFetchingTypeSectionObj.grouptype == 'collections' || ProductsFetchingTypeSectionObj.grouptype == 'categories' || ProductsFetchingTypeSectionObj.grouptype == 'parentcollections') ; else {
46617
+ if (tempfetchproductsfilerobjcontext.collections != undefined) {
46618
+ tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
46619
+ }
46620
+ }
46621
+ tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
46622
+ tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
46590
46623
  setProductFilterObjContext(_objectSpread$1o({}, tempfetchproductsfilerobjcontext));
46591
46624
  }
46592
46625
  setFetchQueriesEngineContext(_objectSpread$1o({}, tempFetchQueriesEngineContext));
46593
46626
  }
46594
46627
  }, [fetchingtype, ProductsFetchingTypeSectionObj]);
46628
+ useEffect(function () {
46629
+ if ((fetchingtype === null || fetchingtype === void 0 ? void 0 : fetchingtype.length) != 0) {
46630
+ if (fetchingtype == 'categories') {
46631
+ var categories = [];
46632
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
46633
+ var _fetchCategoriesQuery;
46634
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery === void 0 || (_fetchCategoriesQuery = _fetchCategoriesQuery.data) === null || _fetchCategoriesQuery === void 0 ? void 0 : _fetchCategoriesQuery.categories;
46635
+ }
46636
+ cardobjassigner(categories);
46637
+ }
46638
+ if (fetchingtype == 'parentcollections' || fetchingtype == 'innercategories') {
46639
+ var _categories;
46640
+ var categories = [];
46641
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
46642
+ var _fetchCategoriesQuery2;
46643
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery2 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery2 === void 0 || (_fetchCategoriesQuery2 = _fetchCategoriesQuery2.data) === null || _fetchCategoriesQuery2 === void 0 ? void 0 : _fetchCategoriesQuery2.categories;
46644
+ }
46645
+ // if (fetchAuthorizationQueryContext?.isSuccess) {
46646
+ // var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
46647
+ // alert(JSON.stringify(categories));
46648
+ var parentcollections = [];
46649
+ (_categories = categories) === null || _categories === void 0 || _categories.forEach(function (catitem, catindex) {
46650
+ catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
46651
+ if (parentcolitem.isshowntocustomers == 1) {
46652
+ parentcolitem.categoryid = catitem.categoryid;
46653
+ parentcollections.push(parentcolitem);
46654
+ }
46655
+ });
46656
+ });
46657
+ if (fetchingtype == 'parentcollections') {
46658
+ 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') {
46659
+ var arrafterfilter = [];
46660
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
46661
+ if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
46662
+ arrafterfilter.push(parentcolitem);
46663
+ }
46664
+ });
46665
+ parentcollections = arrafterfilter;
46666
+ }
46667
+ if (props.collectionidprops != null && props.collectionidprops != undefined && props.collectionidprops != 'all') {
46668
+ var arrafterfilter = [];
46669
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
46670
+ if (parentcolitem.categoryid == props.collectionidprops) {
46671
+ arrafterfilter.push(parentcolitem);
46672
+ }
46673
+ });
46674
+ parentcollections = arrafterfilter;
46675
+ }
46676
+ }
46677
+ if (fetchingtype == 'innercategories') {
46678
+ var arrafterfilter = [];
46679
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
46680
+ if (parentcolitem.categoryid == props.collectionidprops) {
46681
+ arrafterfilter.push(parentcolitem);
46682
+ }
46683
+ });
46684
+ parentcollections = arrafterfilter;
46685
+ }
46686
+ cardobjassigner(parentcollections);
46687
+ // }
46688
+ } else if (fetchingtype == 'innerparentcollections') {
46689
+ var _categories2;
46690
+ var categories = [];
46691
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
46692
+ var _fetchCategoriesQuery3;
46693
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery3 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery3 === void 0 || (_fetchCategoriesQuery3 = _fetchCategoriesQuery3.data) === null || _fetchCategoriesQuery3 === void 0 ? void 0 : _fetchCategoriesQuery3.categories;
46694
+ }
46695
+ // if (fetchAuthorizationQueryContext?.isSuccess) {
46696
+ // var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
46697
+ var collections = [];
46698
+ (_categories2 = categories) === null || _categories2 === void 0 || _categories2.forEach(function (catitem, catindex) {
46699
+ catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
46700
+ var _parentcolitem$collec;
46701
+ parentcolitem.categoryid = catitem.categoryid;
46702
+ parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (collitem, colindex) {
46703
+ if (collitem.isshowntocustomers == 1) {
46704
+ collitem.parentcollectionid = parentcolitem.parentcollectionid;
46705
+ collections.push(collitem);
46706
+ }
46707
+ });
46708
+ });
46709
+ });
46710
+ if (fetchingtype == 'innerparentcollections') {
46711
+ var collectionsafterfilter = [];
46712
+ collections.forEach(function (colitem, colindex) {
46713
+ if (colitem.parentcollectionid == props.collectionidprops) {
46714
+ var iscollexists = false;
46715
+ collectionsafterfilter.forEach(function (existcolitem) {
46716
+ if (colitem.collectionid == existcolitem.collectionid) {
46717
+ iscollexists = true;
46718
+ }
46719
+ });
46720
+ if (iscollexists == false) {
46721
+ collectionsafterfilter.push(colitem);
46722
+ }
46723
+ }
46724
+ });
46725
+ collections = collectionsafterfilter;
46726
+ }
46727
+ cardobjassigner(collections);
46728
+ // }
46729
+ }
46730
+ }
46731
+ }, [fetchingtype, ProductsFetchingTypeSectionObj, fetchCategoriesQueryContext.isSuccess]);
46595
46732
  useEffect(function () {
46596
46733
  if (fetchingtype == 'products') {
46597
46734
  if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
46598
- var _fetchProductsQuery$d2;
46735
+ var _fetchProductsQuery$d2, _fetchProductsQuery$d3, _fetchProductsQuery$d4, _fetchProductsQuery$d5;
46599
46736
  var allpagesarr = [];
46600
46737
  fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d2 = fetchProductsQuery.data) === null || _fetchProductsQuery$d2 === void 0 || (_fetchProductsQuery$d2 = _fetchProductsQuery$d2.data) === null || _fetchProductsQuery$d2 === void 0 || (_fetchProductsQuery$d2 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d2 === void 0 || _fetchProductsQuery$d2.forEach(function (item) {
46601
46738
  allpagesarr.push(item);
46602
46739
  });
46740
+ if ((fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d3 = fetchProductsQuery.data) === null || _fetchProductsQuery$d3 === void 0 || (_fetchProductsQuery$d3 = _fetchProductsQuery$d3.data) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.PerPageProducts) != undefined && (fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 || (_fetchProductsQuery$d4 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : _fetchProductsQuery$d4.PerPageProducts) != null && (fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d5 = fetchProductsQuery.data) === null || _fetchProductsQuery$d5 === void 0 || (_fetchProductsQuery$d5 = _fetchProductsQuery$d5.data) === null || _fetchProductsQuery$d5 === void 0 || (_fetchProductsQuery$d5 = _fetchProductsQuery$d5.PerPageProducts) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : _fetchProductsQuery$d5.length) != 0) {
46741
+ var _fetchProductsQuery$d6;
46742
+ setperpageItems(fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d6 = fetchProductsQuery.data) === null || _fetchProductsQuery$d6 === void 0 || (_fetchProductsQuery$d6 = _fetchProductsQuery$d6.data) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.PerPageProducts);
46743
+ }
46603
46744
  cardobjassigner(allpagesarr);
46604
46745
  }
46605
46746
  }
46606
- }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data, fetchcustomercartQueryContext.dataUpdatedAt]);
46747
+ }, [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]);
46607
46748
  useEffect(function () {
46608
46749
  if (fetchingtype == 'collections') {
46609
46750
  if (fetchcollectionsQueryContext.isSuccess) {
46610
46751
  cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
46611
46752
  }
46612
46753
  }
46613
- }, [fetchcollectionsQueryContext.isSuccess]);
46754
+ }, [fetchcollectionsQueryContext === null || fetchcollectionsQueryContext === void 0 ? void 0 : fetchcollectionsQueryContext.isSuccess, fetchcollectionsQueryContext.data]);
46755
+ useEffect(function () {
46756
+ if (fetchingtype == 'vendors') {
46757
+ if (FetchVendorsQuery.isSuccess) {
46758
+ if (FetchVendorsQuery.data.data.vendors != undefined && FetchVendorsQuery.data.data.vendors.length != 0) {
46759
+ var _FetchVendorsQuery$da2;
46760
+ cardobjassigner(FetchVendorsQuery === null || FetchVendorsQuery === void 0 || (_FetchVendorsQuery$da2 = FetchVendorsQuery.data) === null || _FetchVendorsQuery$da2 === void 0 || (_FetchVendorsQuery$da2 = _FetchVendorsQuery$da2.data) === null || _FetchVendorsQuery$da2 === void 0 ? void 0 : _FetchVendorsQuery$da2.vendors);
46761
+ }
46762
+ }
46763
+ }
46764
+ }, [FetchVendorsQuery.isSuccess]);
46614
46765
  useEffect(function () {
46615
46766
  favassigner();
46616
46767
  }, [favoriteprojectscountContext]);
46768
+ useEffect(function () {
46769
+ if (sectionproperties.length != 0 && sectionproperties.maincontainerarrayofobjs != undefined) {
46770
+ var maincontainerarrayofobjsparsed = JSON.parse(sectionproperties.maincontainerarrayofobjs);
46771
+ if (Array.isArray(maincontainerarrayofobjsparsed)) {
46772
+ setmaincontainerarrayofobjs(_toConsumableArray(maincontainerarrayofobjsparsed));
46773
+ }
46774
+ }
46775
+ }, [sectionproperties]);
46617
46776
  var favassigner = function favassigner() {
46618
46777
  if (fetchingtype == 'products') {
46619
46778
  if (cardsarray.length != 0) {
@@ -46700,10 +46859,10 @@ var CardsSection2 = function CardsSection2(props) {
46700
46859
  cardobj.sku = arrayItem.productinfo.sku;
46701
46860
  if (langdetect == 'en') {
46702
46861
  var _fetchAuthorizationQu;
46703
- cardobj.currencyname = (_fetchAuthorizationQu = fetchAuthorizationQueryContext) === null || _fetchAuthorizationQu === void 0 || (_fetchAuthorizationQu = _fetchAuthorizationQu.data) === null || _fetchAuthorizationQu === void 0 || (_fetchAuthorizationQu = _fetchAuthorizationQu.data) === null || _fetchAuthorizationQu === void 0 ? void 0 : _fetchAuthorizationQu.currencyname_en;
46862
+ 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;
46704
46863
  } else {
46705
46864
  var _fetchAuthorizationQu2;
46706
- cardobj.currencyname = (_fetchAuthorizationQu2 = fetchAuthorizationQueryContext) === null || _fetchAuthorizationQu2 === void 0 || (_fetchAuthorizationQu2 = _fetchAuthorizationQu2.data) === null || _fetchAuthorizationQu2 === void 0 || (_fetchAuthorizationQu2 = _fetchAuthorizationQu2.data) === null || _fetchAuthorizationQu2 === void 0 ? void 0 : _fetchAuthorizationQu2.currencyname_ar;
46865
+ 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;
46707
46866
  }
46708
46867
  if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
46709
46868
  favoriteprojectscountContext.forEach(function (favitem, favindex) {
@@ -46938,7 +47097,8 @@ var CardsSection2 = function CardsSection2(props) {
46938
47097
  className: "row m-0 d-flex w-100 justify-content-center mb-md-4 ",
46939
47098
  style: {
46940
47099
  zIndex: 2
46941
- }
47100
+ },
47101
+ ref: refscr
46942
47102
  }, /*#__PURE__*/React.createElement("div", {
46943
47103
  className: "col-lg-12 p-0 d-flex justify-content-center"
46944
47104
  }, sectionproperties.length != 0 && /*#__PURE__*/React.createElement("div", {
package/dist/index.umd.js CHANGED
@@ -18838,7 +18838,8 @@
18838
18838
  width: "100%",
18839
18839
  direction: "left",
18840
18840
  scrollamount: "3",
18841
- behavior: "scroll"
18841
+ behavior: "scroll",
18842
+ "class": "marquee"
18842
18843
  }, /*#__PURE__*/React__default["default"].createElement("span", {
18843
18844
  "class": "d-flex flex-row align-items-center"
18844
18845
  }, textarray.map(function (item, index) {
@@ -46340,92 +46341,115 @@
46340
46341
  function ownKeys$1o(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; }
46341
46342
  function _objectSpread$1o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1o(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
46342
46343
  var CardsSection2 = function CardsSection2(props) {
46344
+ var refscr = /*#__PURE__*/React.createRef();
46343
46345
  var _useInView = reactIntersectionObserver.useInView();
46344
46346
  _useInView.ref;
46345
- var inView = _useInView.inView;
46347
+ _useInView.inView;
46346
46348
  var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
46347
46349
  props.actions.lang;
46348
46350
  var langdetect = props.actions.langdetect;
46349
46351
  var fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
46350
46352
  var favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
46353
+ props.actions.routingcountext;
46354
+ props.actions.StaticPagesLinksContext;
46351
46355
  var ProductFilterObjContext = props.actions.ProductFilterObjContext;
46352
46356
  var setProductFilterObjContext = props.actions.setProductFilterObjContext;
46353
46357
  var TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
46354
46358
  var FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
46355
46359
  var setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
46356
- var SearchHeaderMutationContext = props.actions.SearchHeaderMutationContext;
46357
46360
  var fetchProductsQuery = props.actions.fetchProductsQuery;
46358
46361
  var fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
46359
46362
  var setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
46363
+ props.actions.ParentCollectionsForCollectionQueryArr;
46360
46364
  var setfetchingtype = props.actions.setfetchingtype;
46361
46365
  var fetchingtype = props.actions.fetchingtype;
46362
- props.actions.AddtoCartMutationContext;
46363
- props.actions.setShowProductInfoModalContext;
46364
- props.actions.authdetailsContext;
46365
- props.actions.productfiltercontext;
46366
- props.actions.setproductfiltercontext;
46366
+ props.actions.addtofavoritescontext;
46367
+ var fetchAuthorizationQueryContext = props.actions.fetchAuthorizationQueryContext;
46368
+ var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
46369
+ var FetchVendorsQuery = props.actions.FetchVendorsQuery;
46370
+ props.actions.ikimagecredcontext;
46371
+ props.actions.sortbycontext;
46372
+ props.actions.setsortbycontext;
46373
+ var _useState = React.useState(false),
46374
+ _useState2 = _slicedToArray__default["default"](_useState, 2);
46375
+ _useState2[0];
46376
+ _useState2[1];
46367
46377
  var actions = props.actions;
46368
- var _useState = React.useState(''),
46369
- _useState2 = _slicedToArray__default["default"](_useState, 2),
46370
- sectionproperties = _useState2[0],
46371
- setsectionproperties = _useState2[1];
46372
- var _useState3 = React.useState([]),
46378
+ var _useState3 = React.useState(''),
46373
46379
  _useState4 = _slicedToArray__default["default"](_useState3, 2),
46374
- cardsarray = _useState4[0],
46375
- setcardsarray = _useState4[1];
46376
- var _useState5 = React.useState(''),
46380
+ sectionproperties = _useState4[0],
46381
+ setsectionproperties = _useState4[1];
46382
+ var _useState5 = React.useState([]),
46377
46383
  _useState6 = _slicedToArray__default["default"](_useState5, 2),
46378
- searchinput = _useState6[0];
46379
- _useState6[1];
46380
- React__default["default"].useEffect(function () {
46381
- if (inView) {
46382
- fetchProductsQuery.fetchNextPage();
46383
- }
46384
- }, [inView]);
46385
- var _useState7 = React.useState({
46384
+ cardsarray = _useState6[0],
46385
+ setcardsarray = _useState6[1];
46386
+ var _useState7 = React.useState(''),
46387
+ _useState8 = _slicedToArray__default["default"](_useState7, 2),
46388
+ sectionitem = _useState8[0],
46389
+ setsectionitem = _useState8[1];
46390
+ var _useState9 = React.useState({
46386
46391
  productfetchingtype: 'Random',
46387
- collectionid: ''
46392
+ collectionid: '',
46393
+ grouptype: ''
46388
46394
  }),
46389
- _useState8 = _slicedToArray__default["default"](_useState7, 2),
46390
- ProductsFetchingTypeSectionObj = _useState8[0],
46391
- setProductsFetchingTypeSectionObj = _useState8[1];
46395
+ _useState10 = _slicedToArray__default["default"](_useState9, 2),
46396
+ ProductsFetchingTypeSectionObj = _useState10[0],
46397
+ setProductsFetchingTypeSectionObj = _useState10[1];
46398
+ var _useState11 = React.useState([]),
46399
+ _useState12 = _slicedToArray__default["default"](_useState11, 2);
46400
+ _useState12[0];
46401
+ var setmaincontainerarrayofobjs = _useState12[1];
46402
+ var _useState13 = React.useState(12),
46403
+ _useState14 = _slicedToArray__default["default"](_useState13, 2);
46404
+ _useState14[0];
46405
+ var setperpageItems = _useState14[1];
46406
+ props.actions.AddtoCartMutationContext;
46392
46407
  React.useEffect(function () {
46408
+ var productfilerobjtemp = ProductFilterObjContext;
46409
+ if (props.filterparamsprops != undefined) {
46410
+ var filterpar = decodeURIComponent(props.filterparamsprops);
46411
+ var filterparsed = JSON.parse(filterpar);
46412
+ if (filterparsed != undefined) {
46413
+ productfilerobjtemp = filterparsed;
46414
+ setProductFilterObjContext(filterparsed);
46415
+ }
46416
+ }
46393
46417
  StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
46394
46418
  if (sectionitem.sectionid == props.sectionidprops) {
46395
46419
  var secpropobj = {};
46420
+ setsectionitem(sectionitem);
46396
46421
  sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
46397
46422
  secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
46398
46423
  });
46399
46424
  setsectionproperties(_objectSpread$1o({}, secpropobj));
46400
46425
  if (props.srcfromprops == 'GeneralProductsComponent') {
46401
46426
  setfetchingtype('products');
46427
+ var lcproductfetchingtype = 'Random';
46428
+ if (productfilerobjtemp.ProductFetchingType != undefined && productfilerobjtemp.ProductFetchingType != null && productfilerobjtemp.ProductFetchingType.length != 0) {
46429
+ lcproductfetchingtype = productfilerobjtemp.ProductFetchingType;
46430
+ }
46402
46431
  setProductsFetchingTypeSectionObj({
46403
- productfetchingtype: 'Random',
46404
- collectionid: props.collectionidprops
46432
+ productfetchingtype: lcproductfetchingtype,
46433
+ collectionid: props.collectionidprops,
46434
+ grouptype: props.grouptypeprops,
46435
+ grouptyperefid: props.grouptyperefidprops
46405
46436
  });
46437
+ } else if (props.srcfromprops == 'InnerGroups' || props.srcfromprops == 'InnerCategory' || props.srcfromprops == 'InnerParentCollection') {
46438
+ setfetchingtype(props.grouptypeprops);
46439
+ } else if (props.srcfromprops == 'Innervendor') {
46440
+ setfetchingtype('vendors');
46406
46441
  } else {
46407
46442
  setfetchingtype(sectionitem.fetchingtype);
46408
46443
  setProductsFetchingTypeSectionObj({
46409
46444
  productfetchingtype: sectionitem.productsfetchingtype,
46410
- collectionid: sectionitem.productsfetchingtypeCollectioncollectionid
46445
+ collectionid: sectionitem.productsfetchingtypeCollectioncollectionid,
46446
+ grouptype: props.grouptypeprops,
46447
+ grouptyperefid: props.grouptyperefidprops
46411
46448
  });
46412
46449
  }
46413
46450
  }
46414
46451
  });
46415
46452
  }, [StatePagePropertiesContext]);
46416
- React.useEffect(function () {
46417
- SearchHeaderMutationContext.reset();
46418
- var delayDebounceFn = setTimeout(function () {
46419
- if (searchinput.length != 0) {
46420
- SearchHeaderMutationContext.mutate({
46421
- SearchHeaderValue: searchinput
46422
- });
46423
- }
46424
- }, 1000);
46425
- return function () {
46426
- return clearTimeout(delayDebounceFn);
46427
- };
46428
- }, [searchinput]);
46429
46453
  React.useEffect(function () {
46430
46454
  if (sectionproperties.length != 0) {
46431
46455
  if (cardsarray.length == 0) {
@@ -46442,16 +46466,19 @@
46442
46466
  });
46443
46467
  cardobjassigner(allpagesarr);
46444
46468
  }
46469
+ } else if (fetchingtype == 'vendors') {
46470
+ if (FetchVendorsQuery.isSuccess) {
46471
+ var _FetchVendorsQuery$da;
46472
+ cardobjassigner(FetchVendorsQuery === null || FetchVendorsQuery === void 0 || (_FetchVendorsQuery$da = FetchVendorsQuery.data) === null || _FetchVendorsQuery$da === void 0 || (_FetchVendorsQuery$da = _FetchVendorsQuery$da.data) === null || _FetchVendorsQuery$da === void 0 ? void 0 : _FetchVendorsQuery$da.vendors);
46473
+ }
46445
46474
  }
46446
46475
  }
46447
46476
  }
46448
46477
  }, [sectionproperties]);
46449
46478
  React.useEffect(function () {
46450
- if (fetchingtype.length != 0) {
46479
+ if ((fetchingtype === null || fetchingtype === void 0 ? void 0 : fetchingtype.length) != 0) {
46451
46480
  var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
46452
46481
  if (fetchingtype == 'collections') {
46453
- // tempFetchQueriesEngineContext.collections = true;
46454
-
46455
46482
  if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
46456
46483
  setParentCollectionsForCollectionQueryArr('all');
46457
46484
  } else {
@@ -46461,34 +46488,166 @@
46461
46488
  if (fetchingtype == 'products') {
46462
46489
  var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
46463
46490
  tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
46464
- tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
46491
+ if (ProductsFetchingTypeSectionObj.grouptype == 'collections' || ProductsFetchingTypeSectionObj.grouptype == 'categories' || ProductsFetchingTypeSectionObj.grouptype == 'parentcollections') ; else {
46492
+ if (tempfetchproductsfilerobjcontext.collections != undefined) {
46493
+ tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
46494
+ }
46495
+ }
46496
+ tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
46497
+ tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
46465
46498
  setProductFilterObjContext(_objectSpread$1o({}, tempfetchproductsfilerobjcontext));
46466
46499
  }
46467
46500
  setFetchQueriesEngineContext(_objectSpread$1o({}, tempFetchQueriesEngineContext));
46468
46501
  }
46469
46502
  }, [fetchingtype, ProductsFetchingTypeSectionObj]);
46503
+ React.useEffect(function () {
46504
+ if ((fetchingtype === null || fetchingtype === void 0 ? void 0 : fetchingtype.length) != 0) {
46505
+ if (fetchingtype == 'categories') {
46506
+ var categories = [];
46507
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
46508
+ var _fetchCategoriesQuery;
46509
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery === void 0 || (_fetchCategoriesQuery = _fetchCategoriesQuery.data) === null || _fetchCategoriesQuery === void 0 ? void 0 : _fetchCategoriesQuery.categories;
46510
+ }
46511
+ cardobjassigner(categories);
46512
+ }
46513
+ if (fetchingtype == 'parentcollections' || fetchingtype == 'innercategories') {
46514
+ var _categories;
46515
+ var categories = [];
46516
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
46517
+ var _fetchCategoriesQuery2;
46518
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery2 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery2 === void 0 || (_fetchCategoriesQuery2 = _fetchCategoriesQuery2.data) === null || _fetchCategoriesQuery2 === void 0 ? void 0 : _fetchCategoriesQuery2.categories;
46519
+ }
46520
+ // if (fetchAuthorizationQueryContext?.isSuccess) {
46521
+ // var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
46522
+ // alert(JSON.stringify(categories));
46523
+ var parentcollections = [];
46524
+ (_categories = categories) === null || _categories === void 0 || _categories.forEach(function (catitem, catindex) {
46525
+ catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
46526
+ if (parentcolitem.isshowntocustomers == 1) {
46527
+ parentcolitem.categoryid = catitem.categoryid;
46528
+ parentcollections.push(parentcolitem);
46529
+ }
46530
+ });
46531
+ });
46532
+ if (fetchingtype == 'parentcollections') {
46533
+ 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') {
46534
+ var arrafterfilter = [];
46535
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
46536
+ if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
46537
+ arrafterfilter.push(parentcolitem);
46538
+ }
46539
+ });
46540
+ parentcollections = arrafterfilter;
46541
+ }
46542
+ if (props.collectionidprops != null && props.collectionidprops != undefined && props.collectionidprops != 'all') {
46543
+ var arrafterfilter = [];
46544
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
46545
+ if (parentcolitem.categoryid == props.collectionidprops) {
46546
+ arrafterfilter.push(parentcolitem);
46547
+ }
46548
+ });
46549
+ parentcollections = arrafterfilter;
46550
+ }
46551
+ }
46552
+ if (fetchingtype == 'innercategories') {
46553
+ var arrafterfilter = [];
46554
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
46555
+ if (parentcolitem.categoryid == props.collectionidprops) {
46556
+ arrafterfilter.push(parentcolitem);
46557
+ }
46558
+ });
46559
+ parentcollections = arrafterfilter;
46560
+ }
46561
+ cardobjassigner(parentcollections);
46562
+ // }
46563
+ } else if (fetchingtype == 'innerparentcollections') {
46564
+ var _categories2;
46565
+ var categories = [];
46566
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
46567
+ var _fetchCategoriesQuery3;
46568
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery3 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery3 === void 0 || (_fetchCategoriesQuery3 = _fetchCategoriesQuery3.data) === null || _fetchCategoriesQuery3 === void 0 ? void 0 : _fetchCategoriesQuery3.categories;
46569
+ }
46570
+ // if (fetchAuthorizationQueryContext?.isSuccess) {
46571
+ // var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
46572
+ var collections = [];
46573
+ (_categories2 = categories) === null || _categories2 === void 0 || _categories2.forEach(function (catitem, catindex) {
46574
+ catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
46575
+ var _parentcolitem$collec;
46576
+ parentcolitem.categoryid = catitem.categoryid;
46577
+ parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (collitem, colindex) {
46578
+ if (collitem.isshowntocustomers == 1) {
46579
+ collitem.parentcollectionid = parentcolitem.parentcollectionid;
46580
+ collections.push(collitem);
46581
+ }
46582
+ });
46583
+ });
46584
+ });
46585
+ if (fetchingtype == 'innerparentcollections') {
46586
+ var collectionsafterfilter = [];
46587
+ collections.forEach(function (colitem, colindex) {
46588
+ if (colitem.parentcollectionid == props.collectionidprops) {
46589
+ var iscollexists = false;
46590
+ collectionsafterfilter.forEach(function (existcolitem) {
46591
+ if (colitem.collectionid == existcolitem.collectionid) {
46592
+ iscollexists = true;
46593
+ }
46594
+ });
46595
+ if (iscollexists == false) {
46596
+ collectionsafterfilter.push(colitem);
46597
+ }
46598
+ }
46599
+ });
46600
+ collections = collectionsafterfilter;
46601
+ }
46602
+ cardobjassigner(collections);
46603
+ // }
46604
+ }
46605
+ }
46606
+ }, [fetchingtype, ProductsFetchingTypeSectionObj, fetchCategoriesQueryContext.isSuccess]);
46470
46607
  React.useEffect(function () {
46471
46608
  if (fetchingtype == 'products') {
46472
46609
  if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
46473
- var _fetchProductsQuery$d2;
46610
+ var _fetchProductsQuery$d2, _fetchProductsQuery$d3, _fetchProductsQuery$d4, _fetchProductsQuery$d5;
46474
46611
  var allpagesarr = [];
46475
46612
  fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d2 = fetchProductsQuery.data) === null || _fetchProductsQuery$d2 === void 0 || (_fetchProductsQuery$d2 = _fetchProductsQuery$d2.data) === null || _fetchProductsQuery$d2 === void 0 || (_fetchProductsQuery$d2 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d2 === void 0 || _fetchProductsQuery$d2.forEach(function (item) {
46476
46613
  allpagesarr.push(item);
46477
46614
  });
46615
+ if ((fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d3 = fetchProductsQuery.data) === null || _fetchProductsQuery$d3 === void 0 || (_fetchProductsQuery$d3 = _fetchProductsQuery$d3.data) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.PerPageProducts) != undefined && (fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 || (_fetchProductsQuery$d4 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : _fetchProductsQuery$d4.PerPageProducts) != null && (fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d5 = fetchProductsQuery.data) === null || _fetchProductsQuery$d5 === void 0 || (_fetchProductsQuery$d5 = _fetchProductsQuery$d5.data) === null || _fetchProductsQuery$d5 === void 0 || (_fetchProductsQuery$d5 = _fetchProductsQuery$d5.PerPageProducts) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : _fetchProductsQuery$d5.length) != 0) {
46616
+ var _fetchProductsQuery$d6;
46617
+ setperpageItems(fetchProductsQuery === null || fetchProductsQuery === void 0 || (_fetchProductsQuery$d6 = fetchProductsQuery.data) === null || _fetchProductsQuery$d6 === void 0 || (_fetchProductsQuery$d6 = _fetchProductsQuery$d6.data) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.PerPageProducts);
46618
+ }
46478
46619
  cardobjassigner(allpagesarr);
46479
46620
  }
46480
46621
  }
46481
- }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data, fetchcustomercartQueryContext.dataUpdatedAt]);
46622
+ }, [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]);
46482
46623
  React.useEffect(function () {
46483
46624
  if (fetchingtype == 'collections') {
46484
46625
  if (fetchcollectionsQueryContext.isSuccess) {
46485
46626
  cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
46486
46627
  }
46487
46628
  }
46488
- }, [fetchcollectionsQueryContext.isSuccess]);
46629
+ }, [fetchcollectionsQueryContext === null || fetchcollectionsQueryContext === void 0 ? void 0 : fetchcollectionsQueryContext.isSuccess, fetchcollectionsQueryContext.data]);
46630
+ React.useEffect(function () {
46631
+ if (fetchingtype == 'vendors') {
46632
+ if (FetchVendorsQuery.isSuccess) {
46633
+ if (FetchVendorsQuery.data.data.vendors != undefined && FetchVendorsQuery.data.data.vendors.length != 0) {
46634
+ var _FetchVendorsQuery$da2;
46635
+ cardobjassigner(FetchVendorsQuery === null || FetchVendorsQuery === void 0 || (_FetchVendorsQuery$da2 = FetchVendorsQuery.data) === null || _FetchVendorsQuery$da2 === void 0 || (_FetchVendorsQuery$da2 = _FetchVendorsQuery$da2.data) === null || _FetchVendorsQuery$da2 === void 0 ? void 0 : _FetchVendorsQuery$da2.vendors);
46636
+ }
46637
+ }
46638
+ }
46639
+ }, [FetchVendorsQuery.isSuccess]);
46489
46640
  React.useEffect(function () {
46490
46641
  favassigner();
46491
46642
  }, [favoriteprojectscountContext]);
46643
+ React.useEffect(function () {
46644
+ if (sectionproperties.length != 0 && sectionproperties.maincontainerarrayofobjs != undefined) {
46645
+ var maincontainerarrayofobjsparsed = JSON.parse(sectionproperties.maincontainerarrayofobjs);
46646
+ if (Array.isArray(maincontainerarrayofobjsparsed)) {
46647
+ setmaincontainerarrayofobjs(_toConsumableArray__default["default"](maincontainerarrayofobjsparsed));
46648
+ }
46649
+ }
46650
+ }, [sectionproperties]);
46492
46651
  var favassigner = function favassigner() {
46493
46652
  if (fetchingtype == 'products') {
46494
46653
  if (cardsarray.length != 0) {
@@ -46575,10 +46734,10 @@
46575
46734
  cardobj.sku = arrayItem.productinfo.sku;
46576
46735
  if (langdetect == 'en') {
46577
46736
  var _fetchAuthorizationQu;
46578
- cardobj.currencyname = (_fetchAuthorizationQu = fetchAuthorizationQueryContext) === null || _fetchAuthorizationQu === void 0 || (_fetchAuthorizationQu = _fetchAuthorizationQu.data) === null || _fetchAuthorizationQu === void 0 || (_fetchAuthorizationQu = _fetchAuthorizationQu.data) === null || _fetchAuthorizationQu === void 0 ? void 0 : _fetchAuthorizationQu.currencyname_en;
46737
+ 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;
46579
46738
  } else {
46580
46739
  var _fetchAuthorizationQu2;
46581
- cardobj.currencyname = (_fetchAuthorizationQu2 = fetchAuthorizationQueryContext) === null || _fetchAuthorizationQu2 === void 0 || (_fetchAuthorizationQu2 = _fetchAuthorizationQu2.data) === null || _fetchAuthorizationQu2 === void 0 || (_fetchAuthorizationQu2 = _fetchAuthorizationQu2.data) === null || _fetchAuthorizationQu2 === void 0 ? void 0 : _fetchAuthorizationQu2.currencyname_ar;
46740
+ 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;
46582
46741
  }
46583
46742
  if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
46584
46743
  favoriteprojectscountContext.forEach(function (favitem, favindex) {
@@ -46813,7 +46972,8 @@
46813
46972
  className: "row m-0 d-flex w-100 justify-content-center mb-md-4 ",
46814
46973
  style: {
46815
46974
  zIndex: 2
46816
- }
46975
+ },
46976
+ ref: refscr
46817
46977
  }, /*#__PURE__*/React__default["default"].createElement("div", {
46818
46978
  className: "col-lg-12 p-0 d-flex justify-content-center"
46819
46979
  }, sectionproperties.length != 0 && /*#__PURE__*/React__default["default"].createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabexseriescomponents",
3
- "version": "0.0.477",
3
+ "version": "0.0.479",
4
4
  "description": "your description",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {