tabexseriescomponents 0.0.174 → 0.0.175
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 +25 -259
- package/dist/index.esm.js +25 -259
- package/dist/index.umd.js +25 -259
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -9567,7 +9567,7 @@ var CardsSection = function CardsSection(props) {
|
|
|
9567
9567
|
var handlePageClick = function handlePageClick(event) {
|
|
9568
9568
|
props.scrolltotop();
|
|
9569
9569
|
var tempProductFilterObjContext = _objectSpread$1B({}, ProductFilterObjContext);
|
|
9570
|
-
tempProductFilterObjContext.page = event.selected;
|
|
9570
|
+
tempProductFilterObjContext.page = event === null || event === void 0 ? void 0 : event.selected;
|
|
9571
9571
|
setProductFilterObjContext(_objectSpread$1B({}, tempProductFilterObjContext));
|
|
9572
9572
|
};
|
|
9573
9573
|
function PaginatedItems(_ref) {
|
|
@@ -28867,11 +28867,10 @@ var CardsSection2 = function CardsSection2(props) {
|
|
|
28867
28867
|
}
|
|
28868
28868
|
} else if (fetchingtype == 'products') {
|
|
28869
28869
|
if (fetchProductsQuery.isSuccess) {
|
|
28870
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
28870
28871
|
var allpagesarr = [];
|
|
28871
|
-
fetchProductsQuery.data.
|
|
28872
|
-
|
|
28873
|
-
allpagesarr.push(productobj);
|
|
28874
|
-
});
|
|
28872
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
28873
|
+
allpagesarr.push(item);
|
|
28875
28874
|
});
|
|
28876
28875
|
cardobjassigner(allpagesarr);
|
|
28877
28876
|
}
|
|
@@ -28903,11 +28902,10 @@ var CardsSection2 = function CardsSection2(props) {
|
|
|
28903
28902
|
React.useEffect(function () {
|
|
28904
28903
|
if (fetchingtype == 'products') {
|
|
28905
28904
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
28905
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
28906
28906
|
var allpagesarr = [];
|
|
28907
|
-
fetchProductsQuery.data.
|
|
28908
|
-
|
|
28909
|
-
allpagesarr.push(productobj);
|
|
28910
|
-
});
|
|
28907
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
28908
|
+
allpagesarr.push(item);
|
|
28911
28909
|
});
|
|
28912
28910
|
cardobjassigner(allpagesarr);
|
|
28913
28911
|
}
|
|
@@ -29262,11 +29260,10 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
|
|
|
29262
29260
|
}
|
|
29263
29261
|
} else if (fetchingtype == 'products') {
|
|
29264
29262
|
if (fetchProductsQuery.isSuccess) {
|
|
29263
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
29265
29264
|
var allpagesarr = [];
|
|
29266
|
-
fetchProductsQuery.data.
|
|
29267
|
-
|
|
29268
|
-
allpagesarr.push(productobj);
|
|
29269
|
-
});
|
|
29265
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
29266
|
+
allpagesarr.push(item);
|
|
29270
29267
|
});
|
|
29271
29268
|
cardobjassigner(allpagesarr);
|
|
29272
29269
|
}
|
|
@@ -29297,11 +29294,10 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
|
|
|
29297
29294
|
React.useEffect(function () {
|
|
29298
29295
|
if (fetchingtype == 'products') {
|
|
29299
29296
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
29297
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
29300
29298
|
var allpagesarr = [];
|
|
29301
|
-
fetchProductsQuery.data.
|
|
29302
|
-
|
|
29303
|
-
allpagesarr.push(productobj);
|
|
29304
|
-
});
|
|
29299
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
29300
|
+
allpagesarr.push(item);
|
|
29305
29301
|
});
|
|
29306
29302
|
cardobjassigner(allpagesarr);
|
|
29307
29303
|
}
|
|
@@ -29658,222 +29654,6 @@ var ModernCardsSection = function ModernCardsSection(props) {
|
|
|
29658
29654
|
var _useInView = reactIntersectionObserver.useInView(),
|
|
29659
29655
|
ref = _useInView.ref,
|
|
29660
29656
|
inView = _useInView.inView;
|
|
29661
|
-
// const StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
29662
|
-
// const lang = props.actions.lang;
|
|
29663
|
-
// const langdetect = props.actions.langdetect;
|
|
29664
|
-
// const fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
|
|
29665
|
-
// const favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
|
|
29666
|
-
// const routingcountext = props.actions.routingcountext;
|
|
29667
|
-
// const StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
|
|
29668
|
-
// const ProductFilterObjContext = props.actions.ProductFilterObjContext;
|
|
29669
|
-
// const setProductFilterObjContext = props.actions.setProductFilterObjContext;
|
|
29670
|
-
// const TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
|
|
29671
|
-
// const FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
|
|
29672
|
-
// const setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
|
|
29673
|
-
// const fetchProductsQuery = props.actions.fetchProductsQuery;
|
|
29674
|
-
// const fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
|
|
29675
|
-
// const setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
|
|
29676
|
-
// const ParentCollectionsForCollectionQueryArr = props.actions.ParentCollectionsForCollectionQueryArr;
|
|
29677
|
-
// const setfetchingtype = props.actions.setfetchingtype;
|
|
29678
|
-
// const fetchingtype = props.actions.fetchingtype;
|
|
29679
|
-
// const addtofavoritescontext = props.actions.addtofavoritescontext;
|
|
29680
|
-
// const actions = props.actions;
|
|
29681
|
-
// const [sectionproperties, setsectionproperties] = useState('');
|
|
29682
|
-
// const [imagesarray, setimagesarray] = useState([]);
|
|
29683
|
-
// const [cardsarray, setcardsarray] = useState([]);
|
|
29684
|
-
// const [searchinput, setsearchinput] = useState('');
|
|
29685
|
-
// React.useEffect(() => {
|
|
29686
|
-
// if (inView) {
|
|
29687
|
-
// fetchProductsQuery.fetchNextPage();
|
|
29688
|
-
// }
|
|
29689
|
-
// }, [inView]);
|
|
29690
|
-
// const [ProductsFetchingTypeSectionObj, setProductsFetchingTypeSectionObj] = useState({ productfetchingtype: 'Random', collectionid: '', grouptype: '' });
|
|
29691
|
-
|
|
29692
|
-
// useEffect(() => {
|
|
29693
|
-
// StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
29694
|
-
// if (sectionitem.sectionid == props.sectionidprops) {
|
|
29695
|
-
// var secpropobj = {};
|
|
29696
|
-
// sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
|
|
29697
|
-
// secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
|
|
29698
|
-
// });
|
|
29699
|
-
// setsectionproperties({ ...secpropobj });
|
|
29700
|
-
|
|
29701
|
-
// if (props.srcfromprops == 'GeneralProductsComponent') {
|
|
29702
|
-
// setfetchingtype('products');
|
|
29703
|
-
// setProductsFetchingTypeSectionObj({
|
|
29704
|
-
// productfetchingtype: 'Random',
|
|
29705
|
-
// collectionid: props.collectionidprops,
|
|
29706
|
-
// grouptype: props.grouptypeprops,
|
|
29707
|
-
// grouptyperefid: props.grouptyperefidprops,
|
|
29708
|
-
// });
|
|
29709
|
-
// } else {
|
|
29710
|
-
// setfetchingtype(sectionitem.fetchingtype);
|
|
29711
|
-
// setProductsFetchingTypeSectionObj({
|
|
29712
|
-
// productfetchingtype: sectionitem.productsfetchingtype,
|
|
29713
|
-
// collectionid: sectionitem.productsfetchingtypeCollectioncollectionid,
|
|
29714
|
-
// grouptype: props.grouptypeprops,
|
|
29715
|
-
// grouptyperefid: props.grouptyperefidprops,
|
|
29716
|
-
// });
|
|
29717
|
-
// }
|
|
29718
|
-
// }
|
|
29719
|
-
// });
|
|
29720
|
-
// }, [StatePagePropertiesContext]);
|
|
29721
|
-
// useEffect(() => {
|
|
29722
|
-
// if (sectionproperties.length != 0) {
|
|
29723
|
-
// if (cardsarray.length == 0) {
|
|
29724
|
-
// if (fetchingtype == 'collections') {
|
|
29725
|
-
// if (fetchcollectionsQueryContext.isSuccess) {
|
|
29726
|
-
// cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
|
|
29727
|
-
// }
|
|
29728
|
-
// } else if (fetchingtype == 'products') {
|
|
29729
|
-
// if (fetchProductsQuery.isSuccess) {
|
|
29730
|
-
// var allpagesarr = [];
|
|
29731
|
-
// fetchProductsQuery.data.pages.forEach((page) => {
|
|
29732
|
-
// page.data.products.forEach((productobj) => {
|
|
29733
|
-
// allpagesarr.push(productobj);
|
|
29734
|
-
// });
|
|
29735
|
-
// });
|
|
29736
|
-
// cardobjassigner(allpagesarr);
|
|
29737
|
-
// }
|
|
29738
|
-
// }
|
|
29739
|
-
// }
|
|
29740
|
-
// }
|
|
29741
|
-
// }, [sectionproperties]);
|
|
29742
|
-
// useEffect(() => {
|
|
29743
|
-
// if (fetchingtype.length != 0) {
|
|
29744
|
-
// var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
|
|
29745
|
-
// if (fetchingtype == 'collections') {
|
|
29746
|
-
// // tempFetchQueriesEngineContext.collections = true;
|
|
29747
|
-
// if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
|
|
29748
|
-
// setParentCollectionsForCollectionQueryArr('all');
|
|
29749
|
-
// } else {
|
|
29750
|
-
// setParentCollectionsForCollectionQueryArr([ProductsFetchingTypeSectionObj.collectionid]);
|
|
29751
|
-
// }
|
|
29752
|
-
// }
|
|
29753
|
-
// if (fetchingtype == 'products') {
|
|
29754
|
-
// var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
29755
|
-
// tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
|
|
29756
|
-
// if (
|
|
29757
|
-
// ProductsFetchingTypeSectionObj.grouptype == 'collections' ||
|
|
29758
|
-
// ProductsFetchingTypeSectionObj.grouptype == 'categories' ||
|
|
29759
|
-
// ProductsFetchingTypeSectionObj.grouptype == 'parentcollections'
|
|
29760
|
-
// ) {
|
|
29761
|
-
// } else {
|
|
29762
|
-
// tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
|
|
29763
|
-
// }
|
|
29764
|
-
// tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
|
|
29765
|
-
// tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
29766
|
-
// setProductFilterObjContext({ ...tempfetchproductsfilerobjcontext });
|
|
29767
|
-
// }
|
|
29768
|
-
|
|
29769
|
-
// setFetchQueriesEngineContext({ ...tempFetchQueriesEngineContext });
|
|
29770
|
-
// }
|
|
29771
|
-
// }, [fetchingtype, ProductsFetchingTypeSectionObj]);
|
|
29772
|
-
// useEffect(() => {
|
|
29773
|
-
// if (fetchingtype == 'products') {
|
|
29774
|
-
// if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
29775
|
-
// var allpagesarr = [];
|
|
29776
|
-
// fetchProductsQuery.data.pages.forEach((page) => {
|
|
29777
|
-
// page.data.products.forEach((productobj) => {
|
|
29778
|
-
// allpagesarr.push(productobj);
|
|
29779
|
-
// });
|
|
29780
|
-
// });
|
|
29781
|
-
// cardobjassigner(allpagesarr);
|
|
29782
|
-
// }
|
|
29783
|
-
// }
|
|
29784
|
-
// }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data, fetchcustomercartQueryContext.dataUpdatedAt]);
|
|
29785
|
-
// useEffect(() => {
|
|
29786
|
-
// if (fetchingtype == 'collections') {
|
|
29787
|
-
// if (fetchcollectionsQueryContext.isSuccess) {
|
|
29788
|
-
// cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
|
|
29789
|
-
// }
|
|
29790
|
-
// }
|
|
29791
|
-
// }, [fetchcollectionsQueryContext.isSuccess]);
|
|
29792
|
-
// useEffect(() => {
|
|
29793
|
-
// favassigner();
|
|
29794
|
-
// }, [favoriteprojectscountContext]);
|
|
29795
|
-
// const favassigner = () => {
|
|
29796
|
-
// if (fetchingtype == 'products') {
|
|
29797
|
-
// if (cardsarray.length != 0) {
|
|
29798
|
-
// if (favoriteprojectscountContext != undefined && Array.isArray(favoriteprojectscountContext)) {
|
|
29799
|
-
// var tempcardsarray = [...cardsarray];
|
|
29800
|
-
// tempcardsarray.forEach(function (arrayItem, arrayindex) {
|
|
29801
|
-
// arrayItem.IsFavExists = false;
|
|
29802
|
-
// });
|
|
29803
|
-
// tempcardsarray.forEach(function (arrayItem, arrayindex) {
|
|
29804
|
-
// favoriteprojectscountContext.forEach(function (favitem, favindex) {
|
|
29805
|
-
// if (arrayItem.productid == favitem) {
|
|
29806
|
-
// arrayItem.IsFavExists = true;
|
|
29807
|
-
// }
|
|
29808
|
-
// });
|
|
29809
|
-
// });
|
|
29810
|
-
// setcardsarray([...tempcardsarray]);
|
|
29811
|
-
// }
|
|
29812
|
-
// }
|
|
29813
|
-
// }
|
|
29814
|
-
// };
|
|
29815
|
-
// const cardobjassigner = (fetchedarray) => {
|
|
29816
|
-
// var temparray = [];
|
|
29817
|
-
// fetchedarray.forEach(function (arrayItem, arrayindex) {
|
|
29818
|
-
// var cardobj = {
|
|
29819
|
-
// name: '',
|
|
29820
|
-
// image: '',
|
|
29821
|
-
// };
|
|
29822
|
-
// if (fetchingtype == 'products') {
|
|
29823
|
-
// var itemquantity = 0;
|
|
29824
|
-
// if (langdetect == 'en') {
|
|
29825
|
-
// cardobj.name = arrayItem.productinfo.name_en;
|
|
29826
|
-
// } else {
|
|
29827
|
-
// cardobj.name = arrayItem.productinfo.name_ar;
|
|
29828
|
-
// }
|
|
29829
|
-
// if (langdetect == 'en') {
|
|
29830
|
-
// cardobj.description = arrayItem.productinfo.description_en;
|
|
29831
|
-
// } else {
|
|
29832
|
-
// cardobj.description = arrayItem.productinfo.description_ar;
|
|
29833
|
-
// }
|
|
29834
|
-
// if (arrayItem.productinfo.hasvariants == 0) {
|
|
29835
|
-
// fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
|
|
29836
|
-
// if (cartitem.productid == arrayItem.productinfo.productid) {
|
|
29837
|
-
// itemquantity = cartitem.quantity;
|
|
29838
|
-
// }
|
|
29839
|
-
// });
|
|
29840
|
-
// }
|
|
29841
|
-
// cardobj.image = arrayItem.productinfo.productmainimage;
|
|
29842
|
-
// cardobj.hassale = arrayItem.productinfo.hassale;
|
|
29843
|
-
// cardobj.productid = arrayItem.productinfo.productid;
|
|
29844
|
-
// cardobj.hasvariants = arrayItem.productinfo.hasvariants;
|
|
29845
|
-
// cardobj.description_en = arrayItem.productinfo.description_en;
|
|
29846
|
-
// cardobj.description_ar = arrayItem.productinfo.description_ar;
|
|
29847
|
-
// cardobj.defaultprice = arrayItem.productinfo.defaultprice;
|
|
29848
|
-
// cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
|
|
29849
|
-
// cardobj.productimages = arrayItem.productinfo.productimages;
|
|
29850
|
-
// cardobj.quantity = itemquantity;
|
|
29851
|
-
// cardobj.timestamp = arrayItem.productinfo.timestamp;
|
|
29852
|
-
|
|
29853
|
-
// if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
|
|
29854
|
-
// favoriteprojectscountContext.forEach(function (favitem, favindex) {
|
|
29855
|
-
// if (arrayItem.productinfo.productid == favitem) {
|
|
29856
|
-
// cardobj.IsFavExists = true;
|
|
29857
|
-
// }
|
|
29858
|
-
// });
|
|
29859
|
-
// }
|
|
29860
|
-
// } else if (fetchingtype == 'collections') {
|
|
29861
|
-
// cardobj.collectionid = arrayItem.collectionid;
|
|
29862
|
-
// if (langdetect == 'en') {
|
|
29863
|
-
// cardobj.name = arrayItem.title_en;
|
|
29864
|
-
// cardobj.description = arrayItem.description_en;
|
|
29865
|
-
// } else if (langdetect == 'ar') {
|
|
29866
|
-
// cardobj.name = arrayItem.title_ar;
|
|
29867
|
-
// cardobj.description = arrayItem.description_ar;
|
|
29868
|
-
// }
|
|
29869
|
-
// cardobj.image = arrayItem.collectionlogo;
|
|
29870
|
-
// } else if (fetchingtype == 'custom') {
|
|
29871
|
-
// }
|
|
29872
|
-
// temparray.push(cardobj);
|
|
29873
|
-
// });
|
|
29874
|
-
|
|
29875
|
-
// setcardsarray([...temparray]);
|
|
29876
|
-
// };
|
|
29877
29657
|
var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
29878
29658
|
props.actions.lang;
|
|
29879
29659
|
var langdetect = props.actions.langdetect;
|
|
@@ -29960,11 +29740,10 @@ var ModernCardsSection = function ModernCardsSection(props) {
|
|
|
29960
29740
|
}
|
|
29961
29741
|
} else if (fetchingtype == 'products') {
|
|
29962
29742
|
if (fetchProductsQuery.isSuccess) {
|
|
29743
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
29963
29744
|
var allpagesarr = [];
|
|
29964
|
-
fetchProductsQuery.data.
|
|
29965
|
-
|
|
29966
|
-
allpagesarr.push(productobj);
|
|
29967
|
-
});
|
|
29745
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
29746
|
+
allpagesarr.push(item);
|
|
29968
29747
|
});
|
|
29969
29748
|
cardobjassigner(allpagesarr);
|
|
29970
29749
|
}
|
|
@@ -30073,11 +29852,10 @@ var ModernCardsSection = function ModernCardsSection(props) {
|
|
|
30073
29852
|
React.useEffect(function () {
|
|
30074
29853
|
if (fetchingtype == 'products') {
|
|
30075
29854
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
29855
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
30076
29856
|
var allpagesarr = [];
|
|
30077
|
-
fetchProductsQuery.data.
|
|
30078
|
-
|
|
30079
|
-
allpagesarr.push(productobj);
|
|
30080
|
-
});
|
|
29857
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
29858
|
+
allpagesarr.push(item);
|
|
30081
29859
|
});
|
|
30082
29860
|
cardobjassigner(allpagesarr);
|
|
30083
29861
|
}
|
|
@@ -31411,11 +31189,10 @@ var CardsSectionwithfilter = function CardsSectionwithfilter(props) {
|
|
|
31411
31189
|
}
|
|
31412
31190
|
// } else if (fetchingtype == 'products') {
|
|
31413
31191
|
if (fetchProductsQuery.isSuccess) {
|
|
31192
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
31414
31193
|
var allpagesarr = [];
|
|
31415
|
-
fetchProductsQuery.data.
|
|
31416
|
-
|
|
31417
|
-
allpagesarr.push(productobj);
|
|
31418
|
-
});
|
|
31194
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
31195
|
+
allpagesarr.push(item);
|
|
31419
31196
|
});
|
|
31420
31197
|
productcardobjassigner(allpagesarr);
|
|
31421
31198
|
}
|
|
@@ -31446,11 +31223,10 @@ var CardsSectionwithfilter = function CardsSectionwithfilter(props) {
|
|
|
31446
31223
|
React.useEffect(function () {
|
|
31447
31224
|
// if (fetchingtype == 'products') {
|
|
31448
31225
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
31226
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
31449
31227
|
var allpagesarr = [];
|
|
31450
|
-
fetchProductsQuery.data.
|
|
31451
|
-
|
|
31452
|
-
allpagesarr.push(productobj);
|
|
31453
|
-
});
|
|
31228
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
31229
|
+
allpagesarr.push(item);
|
|
31454
31230
|
});
|
|
31455
31231
|
productcardobjassigner(allpagesarr);
|
|
31456
31232
|
}
|
|
@@ -31872,16 +31648,6 @@ var CardsSectionwithfilter = function CardsSectionwithfilter(props) {
|
|
|
31872
31648
|
},
|
|
31873
31649
|
onClick: function onClick() {
|
|
31874
31650
|
alert('hh0');
|
|
31875
|
-
// if (fetchProductsQuery.isSuccess) {
|
|
31876
|
-
// var allpagesarr = [];
|
|
31877
|
-
// fetchProductsQuery.data.data.pages.forEach((page) => {
|
|
31878
|
-
// page.data.products.forEach((productobj) => {
|
|
31879
|
-
// allpagesarr.push(productobj);
|
|
31880
|
-
// });
|
|
31881
|
-
// });
|
|
31882
|
-
// cardobjassigner(allpagesarr);
|
|
31883
|
-
// alert(JSON.stringify(allpagesarr));
|
|
31884
|
-
// }
|
|
31885
31651
|
}
|
|
31886
31652
|
}, /*#__PURE__*/React__default["default"].createElement("p", null, item.name));
|
|
31887
31653
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
package/dist/index.esm.js
CHANGED
|
@@ -9523,7 +9523,7 @@ var CardsSection = function CardsSection(props) {
|
|
|
9523
9523
|
var handlePageClick = function handlePageClick(event) {
|
|
9524
9524
|
props.scrolltotop();
|
|
9525
9525
|
var tempProductFilterObjContext = _objectSpread$1B({}, ProductFilterObjContext);
|
|
9526
|
-
tempProductFilterObjContext.page = event.selected;
|
|
9526
|
+
tempProductFilterObjContext.page = event === null || event === void 0 ? void 0 : event.selected;
|
|
9527
9527
|
setProductFilterObjContext(_objectSpread$1B({}, tempProductFilterObjContext));
|
|
9528
9528
|
};
|
|
9529
9529
|
function PaginatedItems(_ref) {
|
|
@@ -28823,11 +28823,10 @@ var CardsSection2 = function CardsSection2(props) {
|
|
|
28823
28823
|
}
|
|
28824
28824
|
} else if (fetchingtype == 'products') {
|
|
28825
28825
|
if (fetchProductsQuery.isSuccess) {
|
|
28826
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
28826
28827
|
var allpagesarr = [];
|
|
28827
|
-
fetchProductsQuery.data.
|
|
28828
|
-
|
|
28829
|
-
allpagesarr.push(productobj);
|
|
28830
|
-
});
|
|
28828
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
28829
|
+
allpagesarr.push(item);
|
|
28831
28830
|
});
|
|
28832
28831
|
cardobjassigner(allpagesarr);
|
|
28833
28832
|
}
|
|
@@ -28859,11 +28858,10 @@ var CardsSection2 = function CardsSection2(props) {
|
|
|
28859
28858
|
useEffect(function () {
|
|
28860
28859
|
if (fetchingtype == 'products') {
|
|
28861
28860
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
28861
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
28862
28862
|
var allpagesarr = [];
|
|
28863
|
-
fetchProductsQuery.data.
|
|
28864
|
-
|
|
28865
|
-
allpagesarr.push(productobj);
|
|
28866
|
-
});
|
|
28863
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
28864
|
+
allpagesarr.push(item);
|
|
28867
28865
|
});
|
|
28868
28866
|
cardobjassigner(allpagesarr);
|
|
28869
28867
|
}
|
|
@@ -29218,11 +29216,10 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
|
|
|
29218
29216
|
}
|
|
29219
29217
|
} else if (fetchingtype == 'products') {
|
|
29220
29218
|
if (fetchProductsQuery.isSuccess) {
|
|
29219
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
29221
29220
|
var allpagesarr = [];
|
|
29222
|
-
fetchProductsQuery.data.
|
|
29223
|
-
|
|
29224
|
-
allpagesarr.push(productobj);
|
|
29225
|
-
});
|
|
29221
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
29222
|
+
allpagesarr.push(item);
|
|
29226
29223
|
});
|
|
29227
29224
|
cardobjassigner(allpagesarr);
|
|
29228
29225
|
}
|
|
@@ -29253,11 +29250,10 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
|
|
|
29253
29250
|
useEffect(function () {
|
|
29254
29251
|
if (fetchingtype == 'products') {
|
|
29255
29252
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
29253
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
29256
29254
|
var allpagesarr = [];
|
|
29257
|
-
fetchProductsQuery.data.
|
|
29258
|
-
|
|
29259
|
-
allpagesarr.push(productobj);
|
|
29260
|
-
});
|
|
29255
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
29256
|
+
allpagesarr.push(item);
|
|
29261
29257
|
});
|
|
29262
29258
|
cardobjassigner(allpagesarr);
|
|
29263
29259
|
}
|
|
@@ -29614,222 +29610,6 @@ var ModernCardsSection = function ModernCardsSection(props) {
|
|
|
29614
29610
|
var _useInView = useInView(),
|
|
29615
29611
|
ref = _useInView.ref,
|
|
29616
29612
|
inView = _useInView.inView;
|
|
29617
|
-
// const StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
29618
|
-
// const lang = props.actions.lang;
|
|
29619
|
-
// const langdetect = props.actions.langdetect;
|
|
29620
|
-
// const fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
|
|
29621
|
-
// const favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
|
|
29622
|
-
// const routingcountext = props.actions.routingcountext;
|
|
29623
|
-
// const StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
|
|
29624
|
-
// const ProductFilterObjContext = props.actions.ProductFilterObjContext;
|
|
29625
|
-
// const setProductFilterObjContext = props.actions.setProductFilterObjContext;
|
|
29626
|
-
// const TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
|
|
29627
|
-
// const FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
|
|
29628
|
-
// const setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
|
|
29629
|
-
// const fetchProductsQuery = props.actions.fetchProductsQuery;
|
|
29630
|
-
// const fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
|
|
29631
|
-
// const setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
|
|
29632
|
-
// const ParentCollectionsForCollectionQueryArr = props.actions.ParentCollectionsForCollectionQueryArr;
|
|
29633
|
-
// const setfetchingtype = props.actions.setfetchingtype;
|
|
29634
|
-
// const fetchingtype = props.actions.fetchingtype;
|
|
29635
|
-
// const addtofavoritescontext = props.actions.addtofavoritescontext;
|
|
29636
|
-
// const actions = props.actions;
|
|
29637
|
-
// const [sectionproperties, setsectionproperties] = useState('');
|
|
29638
|
-
// const [imagesarray, setimagesarray] = useState([]);
|
|
29639
|
-
// const [cardsarray, setcardsarray] = useState([]);
|
|
29640
|
-
// const [searchinput, setsearchinput] = useState('');
|
|
29641
|
-
// React.useEffect(() => {
|
|
29642
|
-
// if (inView) {
|
|
29643
|
-
// fetchProductsQuery.fetchNextPage();
|
|
29644
|
-
// }
|
|
29645
|
-
// }, [inView]);
|
|
29646
|
-
// const [ProductsFetchingTypeSectionObj, setProductsFetchingTypeSectionObj] = useState({ productfetchingtype: 'Random', collectionid: '', grouptype: '' });
|
|
29647
|
-
|
|
29648
|
-
// useEffect(() => {
|
|
29649
|
-
// StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
29650
|
-
// if (sectionitem.sectionid == props.sectionidprops) {
|
|
29651
|
-
// var secpropobj = {};
|
|
29652
|
-
// sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
|
|
29653
|
-
// secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
|
|
29654
|
-
// });
|
|
29655
|
-
// setsectionproperties({ ...secpropobj });
|
|
29656
|
-
|
|
29657
|
-
// if (props.srcfromprops == 'GeneralProductsComponent') {
|
|
29658
|
-
// setfetchingtype('products');
|
|
29659
|
-
// setProductsFetchingTypeSectionObj({
|
|
29660
|
-
// productfetchingtype: 'Random',
|
|
29661
|
-
// collectionid: props.collectionidprops,
|
|
29662
|
-
// grouptype: props.grouptypeprops,
|
|
29663
|
-
// grouptyperefid: props.grouptyperefidprops,
|
|
29664
|
-
// });
|
|
29665
|
-
// } else {
|
|
29666
|
-
// setfetchingtype(sectionitem.fetchingtype);
|
|
29667
|
-
// setProductsFetchingTypeSectionObj({
|
|
29668
|
-
// productfetchingtype: sectionitem.productsfetchingtype,
|
|
29669
|
-
// collectionid: sectionitem.productsfetchingtypeCollectioncollectionid,
|
|
29670
|
-
// grouptype: props.grouptypeprops,
|
|
29671
|
-
// grouptyperefid: props.grouptyperefidprops,
|
|
29672
|
-
// });
|
|
29673
|
-
// }
|
|
29674
|
-
// }
|
|
29675
|
-
// });
|
|
29676
|
-
// }, [StatePagePropertiesContext]);
|
|
29677
|
-
// useEffect(() => {
|
|
29678
|
-
// if (sectionproperties.length != 0) {
|
|
29679
|
-
// if (cardsarray.length == 0) {
|
|
29680
|
-
// if (fetchingtype == 'collections') {
|
|
29681
|
-
// if (fetchcollectionsQueryContext.isSuccess) {
|
|
29682
|
-
// cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
|
|
29683
|
-
// }
|
|
29684
|
-
// } else if (fetchingtype == 'products') {
|
|
29685
|
-
// if (fetchProductsQuery.isSuccess) {
|
|
29686
|
-
// var allpagesarr = [];
|
|
29687
|
-
// fetchProductsQuery.data.pages.forEach((page) => {
|
|
29688
|
-
// page.data.products.forEach((productobj) => {
|
|
29689
|
-
// allpagesarr.push(productobj);
|
|
29690
|
-
// });
|
|
29691
|
-
// });
|
|
29692
|
-
// cardobjassigner(allpagesarr);
|
|
29693
|
-
// }
|
|
29694
|
-
// }
|
|
29695
|
-
// }
|
|
29696
|
-
// }
|
|
29697
|
-
// }, [sectionproperties]);
|
|
29698
|
-
// useEffect(() => {
|
|
29699
|
-
// if (fetchingtype.length != 0) {
|
|
29700
|
-
// var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
|
|
29701
|
-
// if (fetchingtype == 'collections') {
|
|
29702
|
-
// // tempFetchQueriesEngineContext.collections = true;
|
|
29703
|
-
// if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
|
|
29704
|
-
// setParentCollectionsForCollectionQueryArr('all');
|
|
29705
|
-
// } else {
|
|
29706
|
-
// setParentCollectionsForCollectionQueryArr([ProductsFetchingTypeSectionObj.collectionid]);
|
|
29707
|
-
// }
|
|
29708
|
-
// }
|
|
29709
|
-
// if (fetchingtype == 'products') {
|
|
29710
|
-
// var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
29711
|
-
// tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
|
|
29712
|
-
// if (
|
|
29713
|
-
// ProductsFetchingTypeSectionObj.grouptype == 'collections' ||
|
|
29714
|
-
// ProductsFetchingTypeSectionObj.grouptype == 'categories' ||
|
|
29715
|
-
// ProductsFetchingTypeSectionObj.grouptype == 'parentcollections'
|
|
29716
|
-
// ) {
|
|
29717
|
-
// } else {
|
|
29718
|
-
// tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
|
|
29719
|
-
// }
|
|
29720
|
-
// tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
|
|
29721
|
-
// tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
29722
|
-
// setProductFilterObjContext({ ...tempfetchproductsfilerobjcontext });
|
|
29723
|
-
// }
|
|
29724
|
-
|
|
29725
|
-
// setFetchQueriesEngineContext({ ...tempFetchQueriesEngineContext });
|
|
29726
|
-
// }
|
|
29727
|
-
// }, [fetchingtype, ProductsFetchingTypeSectionObj]);
|
|
29728
|
-
// useEffect(() => {
|
|
29729
|
-
// if (fetchingtype == 'products') {
|
|
29730
|
-
// if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
29731
|
-
// var allpagesarr = [];
|
|
29732
|
-
// fetchProductsQuery.data.pages.forEach((page) => {
|
|
29733
|
-
// page.data.products.forEach((productobj) => {
|
|
29734
|
-
// allpagesarr.push(productobj);
|
|
29735
|
-
// });
|
|
29736
|
-
// });
|
|
29737
|
-
// cardobjassigner(allpagesarr);
|
|
29738
|
-
// }
|
|
29739
|
-
// }
|
|
29740
|
-
// }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data, fetchcustomercartQueryContext.dataUpdatedAt]);
|
|
29741
|
-
// useEffect(() => {
|
|
29742
|
-
// if (fetchingtype == 'collections') {
|
|
29743
|
-
// if (fetchcollectionsQueryContext.isSuccess) {
|
|
29744
|
-
// cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
|
|
29745
|
-
// }
|
|
29746
|
-
// }
|
|
29747
|
-
// }, [fetchcollectionsQueryContext.isSuccess]);
|
|
29748
|
-
// useEffect(() => {
|
|
29749
|
-
// favassigner();
|
|
29750
|
-
// }, [favoriteprojectscountContext]);
|
|
29751
|
-
// const favassigner = () => {
|
|
29752
|
-
// if (fetchingtype == 'products') {
|
|
29753
|
-
// if (cardsarray.length != 0) {
|
|
29754
|
-
// if (favoriteprojectscountContext != undefined && Array.isArray(favoriteprojectscountContext)) {
|
|
29755
|
-
// var tempcardsarray = [...cardsarray];
|
|
29756
|
-
// tempcardsarray.forEach(function (arrayItem, arrayindex) {
|
|
29757
|
-
// arrayItem.IsFavExists = false;
|
|
29758
|
-
// });
|
|
29759
|
-
// tempcardsarray.forEach(function (arrayItem, arrayindex) {
|
|
29760
|
-
// favoriteprojectscountContext.forEach(function (favitem, favindex) {
|
|
29761
|
-
// if (arrayItem.productid == favitem) {
|
|
29762
|
-
// arrayItem.IsFavExists = true;
|
|
29763
|
-
// }
|
|
29764
|
-
// });
|
|
29765
|
-
// });
|
|
29766
|
-
// setcardsarray([...tempcardsarray]);
|
|
29767
|
-
// }
|
|
29768
|
-
// }
|
|
29769
|
-
// }
|
|
29770
|
-
// };
|
|
29771
|
-
// const cardobjassigner = (fetchedarray) => {
|
|
29772
|
-
// var temparray = [];
|
|
29773
|
-
// fetchedarray.forEach(function (arrayItem, arrayindex) {
|
|
29774
|
-
// var cardobj = {
|
|
29775
|
-
// name: '',
|
|
29776
|
-
// image: '',
|
|
29777
|
-
// };
|
|
29778
|
-
// if (fetchingtype == 'products') {
|
|
29779
|
-
// var itemquantity = 0;
|
|
29780
|
-
// if (langdetect == 'en') {
|
|
29781
|
-
// cardobj.name = arrayItem.productinfo.name_en;
|
|
29782
|
-
// } else {
|
|
29783
|
-
// cardobj.name = arrayItem.productinfo.name_ar;
|
|
29784
|
-
// }
|
|
29785
|
-
// if (langdetect == 'en') {
|
|
29786
|
-
// cardobj.description = arrayItem.productinfo.description_en;
|
|
29787
|
-
// } else {
|
|
29788
|
-
// cardobj.description = arrayItem.productinfo.description_ar;
|
|
29789
|
-
// }
|
|
29790
|
-
// if (arrayItem.productinfo.hasvariants == 0) {
|
|
29791
|
-
// fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
|
|
29792
|
-
// if (cartitem.productid == arrayItem.productinfo.productid) {
|
|
29793
|
-
// itemquantity = cartitem.quantity;
|
|
29794
|
-
// }
|
|
29795
|
-
// });
|
|
29796
|
-
// }
|
|
29797
|
-
// cardobj.image = arrayItem.productinfo.productmainimage;
|
|
29798
|
-
// cardobj.hassale = arrayItem.productinfo.hassale;
|
|
29799
|
-
// cardobj.productid = arrayItem.productinfo.productid;
|
|
29800
|
-
// cardobj.hasvariants = arrayItem.productinfo.hasvariants;
|
|
29801
|
-
// cardobj.description_en = arrayItem.productinfo.description_en;
|
|
29802
|
-
// cardobj.description_ar = arrayItem.productinfo.description_ar;
|
|
29803
|
-
// cardobj.defaultprice = arrayItem.productinfo.defaultprice;
|
|
29804
|
-
// cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
|
|
29805
|
-
// cardobj.productimages = arrayItem.productinfo.productimages;
|
|
29806
|
-
// cardobj.quantity = itemquantity;
|
|
29807
|
-
// cardobj.timestamp = arrayItem.productinfo.timestamp;
|
|
29808
|
-
|
|
29809
|
-
// if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
|
|
29810
|
-
// favoriteprojectscountContext.forEach(function (favitem, favindex) {
|
|
29811
|
-
// if (arrayItem.productinfo.productid == favitem) {
|
|
29812
|
-
// cardobj.IsFavExists = true;
|
|
29813
|
-
// }
|
|
29814
|
-
// });
|
|
29815
|
-
// }
|
|
29816
|
-
// } else if (fetchingtype == 'collections') {
|
|
29817
|
-
// cardobj.collectionid = arrayItem.collectionid;
|
|
29818
|
-
// if (langdetect == 'en') {
|
|
29819
|
-
// cardobj.name = arrayItem.title_en;
|
|
29820
|
-
// cardobj.description = arrayItem.description_en;
|
|
29821
|
-
// } else if (langdetect == 'ar') {
|
|
29822
|
-
// cardobj.name = arrayItem.title_ar;
|
|
29823
|
-
// cardobj.description = arrayItem.description_ar;
|
|
29824
|
-
// }
|
|
29825
|
-
// cardobj.image = arrayItem.collectionlogo;
|
|
29826
|
-
// } else if (fetchingtype == 'custom') {
|
|
29827
|
-
// }
|
|
29828
|
-
// temparray.push(cardobj);
|
|
29829
|
-
// });
|
|
29830
|
-
|
|
29831
|
-
// setcardsarray([...temparray]);
|
|
29832
|
-
// };
|
|
29833
29613
|
var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
29834
29614
|
props.actions.lang;
|
|
29835
29615
|
var langdetect = props.actions.langdetect;
|
|
@@ -29916,11 +29696,10 @@ var ModernCardsSection = function ModernCardsSection(props) {
|
|
|
29916
29696
|
}
|
|
29917
29697
|
} else if (fetchingtype == 'products') {
|
|
29918
29698
|
if (fetchProductsQuery.isSuccess) {
|
|
29699
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
29919
29700
|
var allpagesarr = [];
|
|
29920
|
-
fetchProductsQuery.data.
|
|
29921
|
-
|
|
29922
|
-
allpagesarr.push(productobj);
|
|
29923
|
-
});
|
|
29701
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
29702
|
+
allpagesarr.push(item);
|
|
29924
29703
|
});
|
|
29925
29704
|
cardobjassigner(allpagesarr);
|
|
29926
29705
|
}
|
|
@@ -30029,11 +29808,10 @@ var ModernCardsSection = function ModernCardsSection(props) {
|
|
|
30029
29808
|
useEffect(function () {
|
|
30030
29809
|
if (fetchingtype == 'products') {
|
|
30031
29810
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
29811
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
30032
29812
|
var allpagesarr = [];
|
|
30033
|
-
fetchProductsQuery.data.
|
|
30034
|
-
|
|
30035
|
-
allpagesarr.push(productobj);
|
|
30036
|
-
});
|
|
29813
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
29814
|
+
allpagesarr.push(item);
|
|
30037
29815
|
});
|
|
30038
29816
|
cardobjassigner(allpagesarr);
|
|
30039
29817
|
}
|
|
@@ -31367,11 +31145,10 @@ var CardsSectionwithfilter = function CardsSectionwithfilter(props) {
|
|
|
31367
31145
|
}
|
|
31368
31146
|
// } else if (fetchingtype == 'products') {
|
|
31369
31147
|
if (fetchProductsQuery.isSuccess) {
|
|
31148
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
31370
31149
|
var allpagesarr = [];
|
|
31371
|
-
fetchProductsQuery.data.
|
|
31372
|
-
|
|
31373
|
-
allpagesarr.push(productobj);
|
|
31374
|
-
});
|
|
31150
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
31151
|
+
allpagesarr.push(item);
|
|
31375
31152
|
});
|
|
31376
31153
|
productcardobjassigner(allpagesarr);
|
|
31377
31154
|
}
|
|
@@ -31402,11 +31179,10 @@ var CardsSectionwithfilter = function CardsSectionwithfilter(props) {
|
|
|
31402
31179
|
useEffect(function () {
|
|
31403
31180
|
// if (fetchingtype == 'products') {
|
|
31404
31181
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
31182
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
31405
31183
|
var allpagesarr = [];
|
|
31406
|
-
fetchProductsQuery.data.
|
|
31407
|
-
|
|
31408
|
-
allpagesarr.push(productobj);
|
|
31409
|
-
});
|
|
31184
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
31185
|
+
allpagesarr.push(item);
|
|
31410
31186
|
});
|
|
31411
31187
|
productcardobjassigner(allpagesarr);
|
|
31412
31188
|
}
|
|
@@ -31828,16 +31604,6 @@ var CardsSectionwithfilter = function CardsSectionwithfilter(props) {
|
|
|
31828
31604
|
},
|
|
31829
31605
|
onClick: function onClick() {
|
|
31830
31606
|
alert('hh0');
|
|
31831
|
-
// if (fetchProductsQuery.isSuccess) {
|
|
31832
|
-
// var allpagesarr = [];
|
|
31833
|
-
// fetchProductsQuery.data.data.pages.forEach((page) => {
|
|
31834
|
-
// page.data.products.forEach((productobj) => {
|
|
31835
|
-
// allpagesarr.push(productobj);
|
|
31836
|
-
// });
|
|
31837
|
-
// });
|
|
31838
|
-
// cardobjassigner(allpagesarr);
|
|
31839
|
-
// alert(JSON.stringify(allpagesarr));
|
|
31840
|
-
// }
|
|
31841
31607
|
}
|
|
31842
31608
|
}, /*#__PURE__*/React.createElement("p", null, item.name));
|
|
31843
31609
|
}))), /*#__PURE__*/React.createElement("div", {
|
package/dist/index.umd.js
CHANGED
|
@@ -9428,7 +9428,7 @@
|
|
|
9428
9428
|
var handlePageClick = function handlePageClick(event) {
|
|
9429
9429
|
props.scrolltotop();
|
|
9430
9430
|
var tempProductFilterObjContext = _objectSpread$1B({}, ProductFilterObjContext);
|
|
9431
|
-
tempProductFilterObjContext.page = event.selected;
|
|
9431
|
+
tempProductFilterObjContext.page = event === null || event === void 0 ? void 0 : event.selected;
|
|
9432
9432
|
setProductFilterObjContext(_objectSpread$1B({}, tempProductFilterObjContext));
|
|
9433
9433
|
};
|
|
9434
9434
|
function PaginatedItems(_ref) {
|
|
@@ -28728,11 +28728,10 @@
|
|
|
28728
28728
|
}
|
|
28729
28729
|
} else if (fetchingtype == 'products') {
|
|
28730
28730
|
if (fetchProductsQuery.isSuccess) {
|
|
28731
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
28731
28732
|
var allpagesarr = [];
|
|
28732
|
-
fetchProductsQuery.data.
|
|
28733
|
-
|
|
28734
|
-
allpagesarr.push(productobj);
|
|
28735
|
-
});
|
|
28733
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
28734
|
+
allpagesarr.push(item);
|
|
28736
28735
|
});
|
|
28737
28736
|
cardobjassigner(allpagesarr);
|
|
28738
28737
|
}
|
|
@@ -28764,11 +28763,10 @@
|
|
|
28764
28763
|
React.useEffect(function () {
|
|
28765
28764
|
if (fetchingtype == 'products') {
|
|
28766
28765
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
28766
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
28767
28767
|
var allpagesarr = [];
|
|
28768
|
-
fetchProductsQuery.data.
|
|
28769
|
-
|
|
28770
|
-
allpagesarr.push(productobj);
|
|
28771
|
-
});
|
|
28768
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
28769
|
+
allpagesarr.push(item);
|
|
28772
28770
|
});
|
|
28773
28771
|
cardobjassigner(allpagesarr);
|
|
28774
28772
|
}
|
|
@@ -29123,11 +29121,10 @@
|
|
|
29123
29121
|
}
|
|
29124
29122
|
} else if (fetchingtype == 'products') {
|
|
29125
29123
|
if (fetchProductsQuery.isSuccess) {
|
|
29124
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
29126
29125
|
var allpagesarr = [];
|
|
29127
|
-
fetchProductsQuery.data.
|
|
29128
|
-
|
|
29129
|
-
allpagesarr.push(productobj);
|
|
29130
|
-
});
|
|
29126
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
29127
|
+
allpagesarr.push(item);
|
|
29131
29128
|
});
|
|
29132
29129
|
cardobjassigner(allpagesarr);
|
|
29133
29130
|
}
|
|
@@ -29158,11 +29155,10 @@
|
|
|
29158
29155
|
React.useEffect(function () {
|
|
29159
29156
|
if (fetchingtype == 'products') {
|
|
29160
29157
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
29158
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
29161
29159
|
var allpagesarr = [];
|
|
29162
|
-
fetchProductsQuery.data.
|
|
29163
|
-
|
|
29164
|
-
allpagesarr.push(productobj);
|
|
29165
|
-
});
|
|
29160
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
29161
|
+
allpagesarr.push(item);
|
|
29166
29162
|
});
|
|
29167
29163
|
cardobjassigner(allpagesarr);
|
|
29168
29164
|
}
|
|
@@ -29519,222 +29515,6 @@
|
|
|
29519
29515
|
var _useInView = reactIntersectionObserver.useInView(),
|
|
29520
29516
|
ref = _useInView.ref,
|
|
29521
29517
|
inView = _useInView.inView;
|
|
29522
|
-
// const StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
29523
|
-
// const lang = props.actions.lang;
|
|
29524
|
-
// const langdetect = props.actions.langdetect;
|
|
29525
|
-
// const fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
|
|
29526
|
-
// const favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
|
|
29527
|
-
// const routingcountext = props.actions.routingcountext;
|
|
29528
|
-
// const StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
|
|
29529
|
-
// const ProductFilterObjContext = props.actions.ProductFilterObjContext;
|
|
29530
|
-
// const setProductFilterObjContext = props.actions.setProductFilterObjContext;
|
|
29531
|
-
// const TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
|
|
29532
|
-
// const FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
|
|
29533
|
-
// const setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
|
|
29534
|
-
// const fetchProductsQuery = props.actions.fetchProductsQuery;
|
|
29535
|
-
// const fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
|
|
29536
|
-
// const setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
|
|
29537
|
-
// const ParentCollectionsForCollectionQueryArr = props.actions.ParentCollectionsForCollectionQueryArr;
|
|
29538
|
-
// const setfetchingtype = props.actions.setfetchingtype;
|
|
29539
|
-
// const fetchingtype = props.actions.fetchingtype;
|
|
29540
|
-
// const addtofavoritescontext = props.actions.addtofavoritescontext;
|
|
29541
|
-
// const actions = props.actions;
|
|
29542
|
-
// const [sectionproperties, setsectionproperties] = useState('');
|
|
29543
|
-
// const [imagesarray, setimagesarray] = useState([]);
|
|
29544
|
-
// const [cardsarray, setcardsarray] = useState([]);
|
|
29545
|
-
// const [searchinput, setsearchinput] = useState('');
|
|
29546
|
-
// React.useEffect(() => {
|
|
29547
|
-
// if (inView) {
|
|
29548
|
-
// fetchProductsQuery.fetchNextPage();
|
|
29549
|
-
// }
|
|
29550
|
-
// }, [inView]);
|
|
29551
|
-
// const [ProductsFetchingTypeSectionObj, setProductsFetchingTypeSectionObj] = useState({ productfetchingtype: 'Random', collectionid: '', grouptype: '' });
|
|
29552
|
-
|
|
29553
|
-
// useEffect(() => {
|
|
29554
|
-
// StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
29555
|
-
// if (sectionitem.sectionid == props.sectionidprops) {
|
|
29556
|
-
// var secpropobj = {};
|
|
29557
|
-
// sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
|
|
29558
|
-
// secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
|
|
29559
|
-
// });
|
|
29560
|
-
// setsectionproperties({ ...secpropobj });
|
|
29561
|
-
|
|
29562
|
-
// if (props.srcfromprops == 'GeneralProductsComponent') {
|
|
29563
|
-
// setfetchingtype('products');
|
|
29564
|
-
// setProductsFetchingTypeSectionObj({
|
|
29565
|
-
// productfetchingtype: 'Random',
|
|
29566
|
-
// collectionid: props.collectionidprops,
|
|
29567
|
-
// grouptype: props.grouptypeprops,
|
|
29568
|
-
// grouptyperefid: props.grouptyperefidprops,
|
|
29569
|
-
// });
|
|
29570
|
-
// } else {
|
|
29571
|
-
// setfetchingtype(sectionitem.fetchingtype);
|
|
29572
|
-
// setProductsFetchingTypeSectionObj({
|
|
29573
|
-
// productfetchingtype: sectionitem.productsfetchingtype,
|
|
29574
|
-
// collectionid: sectionitem.productsfetchingtypeCollectioncollectionid,
|
|
29575
|
-
// grouptype: props.grouptypeprops,
|
|
29576
|
-
// grouptyperefid: props.grouptyperefidprops,
|
|
29577
|
-
// });
|
|
29578
|
-
// }
|
|
29579
|
-
// }
|
|
29580
|
-
// });
|
|
29581
|
-
// }, [StatePagePropertiesContext]);
|
|
29582
|
-
// useEffect(() => {
|
|
29583
|
-
// if (sectionproperties.length != 0) {
|
|
29584
|
-
// if (cardsarray.length == 0) {
|
|
29585
|
-
// if (fetchingtype == 'collections') {
|
|
29586
|
-
// if (fetchcollectionsQueryContext.isSuccess) {
|
|
29587
|
-
// cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
|
|
29588
|
-
// }
|
|
29589
|
-
// } else if (fetchingtype == 'products') {
|
|
29590
|
-
// if (fetchProductsQuery.isSuccess) {
|
|
29591
|
-
// var allpagesarr = [];
|
|
29592
|
-
// fetchProductsQuery.data.pages.forEach((page) => {
|
|
29593
|
-
// page.data.products.forEach((productobj) => {
|
|
29594
|
-
// allpagesarr.push(productobj);
|
|
29595
|
-
// });
|
|
29596
|
-
// });
|
|
29597
|
-
// cardobjassigner(allpagesarr);
|
|
29598
|
-
// }
|
|
29599
|
-
// }
|
|
29600
|
-
// }
|
|
29601
|
-
// }
|
|
29602
|
-
// }, [sectionproperties]);
|
|
29603
|
-
// useEffect(() => {
|
|
29604
|
-
// if (fetchingtype.length != 0) {
|
|
29605
|
-
// var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
|
|
29606
|
-
// if (fetchingtype == 'collections') {
|
|
29607
|
-
// // tempFetchQueriesEngineContext.collections = true;
|
|
29608
|
-
// if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
|
|
29609
|
-
// setParentCollectionsForCollectionQueryArr('all');
|
|
29610
|
-
// } else {
|
|
29611
|
-
// setParentCollectionsForCollectionQueryArr([ProductsFetchingTypeSectionObj.collectionid]);
|
|
29612
|
-
// }
|
|
29613
|
-
// }
|
|
29614
|
-
// if (fetchingtype == 'products') {
|
|
29615
|
-
// var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
29616
|
-
// tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
|
|
29617
|
-
// if (
|
|
29618
|
-
// ProductsFetchingTypeSectionObj.grouptype == 'collections' ||
|
|
29619
|
-
// ProductsFetchingTypeSectionObj.grouptype == 'categories' ||
|
|
29620
|
-
// ProductsFetchingTypeSectionObj.grouptype == 'parentcollections'
|
|
29621
|
-
// ) {
|
|
29622
|
-
// } else {
|
|
29623
|
-
// tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
|
|
29624
|
-
// }
|
|
29625
|
-
// tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
|
|
29626
|
-
// tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
29627
|
-
// setProductFilterObjContext({ ...tempfetchproductsfilerobjcontext });
|
|
29628
|
-
// }
|
|
29629
|
-
|
|
29630
|
-
// setFetchQueriesEngineContext({ ...tempFetchQueriesEngineContext });
|
|
29631
|
-
// }
|
|
29632
|
-
// }, [fetchingtype, ProductsFetchingTypeSectionObj]);
|
|
29633
|
-
// useEffect(() => {
|
|
29634
|
-
// if (fetchingtype == 'products') {
|
|
29635
|
-
// if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
29636
|
-
// var allpagesarr = [];
|
|
29637
|
-
// fetchProductsQuery.data.pages.forEach((page) => {
|
|
29638
|
-
// page.data.products.forEach((productobj) => {
|
|
29639
|
-
// allpagesarr.push(productobj);
|
|
29640
|
-
// });
|
|
29641
|
-
// });
|
|
29642
|
-
// cardobjassigner(allpagesarr);
|
|
29643
|
-
// }
|
|
29644
|
-
// }
|
|
29645
|
-
// }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data, fetchcustomercartQueryContext.dataUpdatedAt]);
|
|
29646
|
-
// useEffect(() => {
|
|
29647
|
-
// if (fetchingtype == 'collections') {
|
|
29648
|
-
// if (fetchcollectionsQueryContext.isSuccess) {
|
|
29649
|
-
// cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
|
|
29650
|
-
// }
|
|
29651
|
-
// }
|
|
29652
|
-
// }, [fetchcollectionsQueryContext.isSuccess]);
|
|
29653
|
-
// useEffect(() => {
|
|
29654
|
-
// favassigner();
|
|
29655
|
-
// }, [favoriteprojectscountContext]);
|
|
29656
|
-
// const favassigner = () => {
|
|
29657
|
-
// if (fetchingtype == 'products') {
|
|
29658
|
-
// if (cardsarray.length != 0) {
|
|
29659
|
-
// if (favoriteprojectscountContext != undefined && Array.isArray(favoriteprojectscountContext)) {
|
|
29660
|
-
// var tempcardsarray = [...cardsarray];
|
|
29661
|
-
// tempcardsarray.forEach(function (arrayItem, arrayindex) {
|
|
29662
|
-
// arrayItem.IsFavExists = false;
|
|
29663
|
-
// });
|
|
29664
|
-
// tempcardsarray.forEach(function (arrayItem, arrayindex) {
|
|
29665
|
-
// favoriteprojectscountContext.forEach(function (favitem, favindex) {
|
|
29666
|
-
// if (arrayItem.productid == favitem) {
|
|
29667
|
-
// arrayItem.IsFavExists = true;
|
|
29668
|
-
// }
|
|
29669
|
-
// });
|
|
29670
|
-
// });
|
|
29671
|
-
// setcardsarray([...tempcardsarray]);
|
|
29672
|
-
// }
|
|
29673
|
-
// }
|
|
29674
|
-
// }
|
|
29675
|
-
// };
|
|
29676
|
-
// const cardobjassigner = (fetchedarray) => {
|
|
29677
|
-
// var temparray = [];
|
|
29678
|
-
// fetchedarray.forEach(function (arrayItem, arrayindex) {
|
|
29679
|
-
// var cardobj = {
|
|
29680
|
-
// name: '',
|
|
29681
|
-
// image: '',
|
|
29682
|
-
// };
|
|
29683
|
-
// if (fetchingtype == 'products') {
|
|
29684
|
-
// var itemquantity = 0;
|
|
29685
|
-
// if (langdetect == 'en') {
|
|
29686
|
-
// cardobj.name = arrayItem.productinfo.name_en;
|
|
29687
|
-
// } else {
|
|
29688
|
-
// cardobj.name = arrayItem.productinfo.name_ar;
|
|
29689
|
-
// }
|
|
29690
|
-
// if (langdetect == 'en') {
|
|
29691
|
-
// cardobj.description = arrayItem.productinfo.description_en;
|
|
29692
|
-
// } else {
|
|
29693
|
-
// cardobj.description = arrayItem.productinfo.description_ar;
|
|
29694
|
-
// }
|
|
29695
|
-
// if (arrayItem.productinfo.hasvariants == 0) {
|
|
29696
|
-
// fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
|
|
29697
|
-
// if (cartitem.productid == arrayItem.productinfo.productid) {
|
|
29698
|
-
// itemquantity = cartitem.quantity;
|
|
29699
|
-
// }
|
|
29700
|
-
// });
|
|
29701
|
-
// }
|
|
29702
|
-
// cardobj.image = arrayItem.productinfo.productmainimage;
|
|
29703
|
-
// cardobj.hassale = arrayItem.productinfo.hassale;
|
|
29704
|
-
// cardobj.productid = arrayItem.productinfo.productid;
|
|
29705
|
-
// cardobj.hasvariants = arrayItem.productinfo.hasvariants;
|
|
29706
|
-
// cardobj.description_en = arrayItem.productinfo.description_en;
|
|
29707
|
-
// cardobj.description_ar = arrayItem.productinfo.description_ar;
|
|
29708
|
-
// cardobj.defaultprice = arrayItem.productinfo.defaultprice;
|
|
29709
|
-
// cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
|
|
29710
|
-
// cardobj.productimages = arrayItem.productinfo.productimages;
|
|
29711
|
-
// cardobj.quantity = itemquantity;
|
|
29712
|
-
// cardobj.timestamp = arrayItem.productinfo.timestamp;
|
|
29713
|
-
|
|
29714
|
-
// if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
|
|
29715
|
-
// favoriteprojectscountContext.forEach(function (favitem, favindex) {
|
|
29716
|
-
// if (arrayItem.productinfo.productid == favitem) {
|
|
29717
|
-
// cardobj.IsFavExists = true;
|
|
29718
|
-
// }
|
|
29719
|
-
// });
|
|
29720
|
-
// }
|
|
29721
|
-
// } else if (fetchingtype == 'collections') {
|
|
29722
|
-
// cardobj.collectionid = arrayItem.collectionid;
|
|
29723
|
-
// if (langdetect == 'en') {
|
|
29724
|
-
// cardobj.name = arrayItem.title_en;
|
|
29725
|
-
// cardobj.description = arrayItem.description_en;
|
|
29726
|
-
// } else if (langdetect == 'ar') {
|
|
29727
|
-
// cardobj.name = arrayItem.title_ar;
|
|
29728
|
-
// cardobj.description = arrayItem.description_ar;
|
|
29729
|
-
// }
|
|
29730
|
-
// cardobj.image = arrayItem.collectionlogo;
|
|
29731
|
-
// } else if (fetchingtype == 'custom') {
|
|
29732
|
-
// }
|
|
29733
|
-
// temparray.push(cardobj);
|
|
29734
|
-
// });
|
|
29735
|
-
|
|
29736
|
-
// setcardsarray([...temparray]);
|
|
29737
|
-
// };
|
|
29738
29518
|
var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
29739
29519
|
props.actions.lang;
|
|
29740
29520
|
var langdetect = props.actions.langdetect;
|
|
@@ -29821,11 +29601,10 @@
|
|
|
29821
29601
|
}
|
|
29822
29602
|
} else if (fetchingtype == 'products') {
|
|
29823
29603
|
if (fetchProductsQuery.isSuccess) {
|
|
29604
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
29824
29605
|
var allpagesarr = [];
|
|
29825
|
-
fetchProductsQuery.data.
|
|
29826
|
-
|
|
29827
|
-
allpagesarr.push(productobj);
|
|
29828
|
-
});
|
|
29606
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
29607
|
+
allpagesarr.push(item);
|
|
29829
29608
|
});
|
|
29830
29609
|
cardobjassigner(allpagesarr);
|
|
29831
29610
|
}
|
|
@@ -29934,11 +29713,10 @@
|
|
|
29934
29713
|
React.useEffect(function () {
|
|
29935
29714
|
if (fetchingtype == 'products') {
|
|
29936
29715
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
29716
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
29937
29717
|
var allpagesarr = [];
|
|
29938
|
-
fetchProductsQuery.data.
|
|
29939
|
-
|
|
29940
|
-
allpagesarr.push(productobj);
|
|
29941
|
-
});
|
|
29718
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
29719
|
+
allpagesarr.push(item);
|
|
29942
29720
|
});
|
|
29943
29721
|
cardobjassigner(allpagesarr);
|
|
29944
29722
|
}
|
|
@@ -31272,11 +31050,10 @@
|
|
|
31272
31050
|
}
|
|
31273
31051
|
// } else if (fetchingtype == 'products') {
|
|
31274
31052
|
if (fetchProductsQuery.isSuccess) {
|
|
31053
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
31275
31054
|
var allpagesarr = [];
|
|
31276
|
-
fetchProductsQuery.data.
|
|
31277
|
-
|
|
31278
|
-
allpagesarr.push(productobj);
|
|
31279
|
-
});
|
|
31055
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d = fetchProductsQuery.data) === null || _fetchProductsQuery$d === void 0 ? void 0 : (_fetchProductsQuery$d2 = _fetchProductsQuery$d.data) === null || _fetchProductsQuery$d2 === void 0 ? void 0 : (_fetchProductsQuery$d3 = _fetchProductsQuery$d2.products) === null || _fetchProductsQuery$d3 === void 0 ? void 0 : _fetchProductsQuery$d3.forEach(function (item) {
|
|
31056
|
+
allpagesarr.push(item);
|
|
31280
31057
|
});
|
|
31281
31058
|
productcardobjassigner(allpagesarr);
|
|
31282
31059
|
}
|
|
@@ -31307,11 +31084,10 @@
|
|
|
31307
31084
|
React.useEffect(function () {
|
|
31308
31085
|
// if (fetchingtype == 'products') {
|
|
31309
31086
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
31087
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
31310
31088
|
var allpagesarr = [];
|
|
31311
|
-
fetchProductsQuery.data.
|
|
31312
|
-
|
|
31313
|
-
allpagesarr.push(productobj);
|
|
31314
|
-
});
|
|
31089
|
+
fetchProductsQuery === null || fetchProductsQuery === void 0 ? void 0 : (_fetchProductsQuery$d4 = fetchProductsQuery.data) === null || _fetchProductsQuery$d4 === void 0 ? void 0 : (_fetchProductsQuery$d5 = _fetchProductsQuery$d4.data) === null || _fetchProductsQuery$d5 === void 0 ? void 0 : (_fetchProductsQuery$d6 = _fetchProductsQuery$d5.products) === null || _fetchProductsQuery$d6 === void 0 ? void 0 : _fetchProductsQuery$d6.forEach(function (item) {
|
|
31090
|
+
allpagesarr.push(item);
|
|
31315
31091
|
});
|
|
31316
31092
|
productcardobjassigner(allpagesarr);
|
|
31317
31093
|
}
|
|
@@ -31733,16 +31509,6 @@
|
|
|
31733
31509
|
},
|
|
31734
31510
|
onClick: function onClick() {
|
|
31735
31511
|
alert('hh0');
|
|
31736
|
-
// if (fetchProductsQuery.isSuccess) {
|
|
31737
|
-
// var allpagesarr = [];
|
|
31738
|
-
// fetchProductsQuery.data.data.pages.forEach((page) => {
|
|
31739
|
-
// page.data.products.forEach((productobj) => {
|
|
31740
|
-
// allpagesarr.push(productobj);
|
|
31741
|
-
// });
|
|
31742
|
-
// });
|
|
31743
|
-
// cardobjassigner(allpagesarr);
|
|
31744
|
-
// alert(JSON.stringify(allpagesarr));
|
|
31745
|
-
// }
|
|
31746
31512
|
}
|
|
31747
31513
|
}, /*#__PURE__*/React__default["default"].createElement("p", null, item.name));
|
|
31748
31514
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|